blob: b3c954d7f7c8b3a8698b9c90ce6bb7ad939f57a6 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00009import("//build/config/arm.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010import("../../build/webrtc.gni")
11
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000012config("audio_coding_config") {
13 include_dirs = [
14 "main/interface",
15 "../interface",
16 ]
17}
18
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000019source_set("audio_coding") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000020 sources = [
21 "main/acm2/acm_amr.cc",
22 "main/acm2/acm_amr.h",
23 "main/acm2/acm_amrwb.cc",
24 "main/acm2/acm_amrwb.h",
25 "main/acm2/acm_celt.cc",
26 "main/acm2/acm_celt.h",
27 "main/acm2/acm_cng.cc",
28 "main/acm2/acm_cng.h",
29 "main/acm2/acm_codec_database.cc",
30 "main/acm2/acm_codec_database.h",
31 "main/acm2/acm_common_defs.h",
32 "main/acm2/acm_dtmf_playout.cc",
33 "main/acm2/acm_dtmf_playout.h",
34 "main/acm2/acm_g722.cc",
35 "main/acm2/acm_g722.h",
36 "main/acm2/acm_g7221.cc",
37 "main/acm2/acm_g7221.h",
38 "main/acm2/acm_g7221c.cc",
39 "main/acm2/acm_g7221c.h",
40 "main/acm2/acm_g729.cc",
41 "main/acm2/acm_g729.h",
42 "main/acm2/acm_g7291.cc",
43 "main/acm2/acm_g7291.h",
44 "main/acm2/acm_generic_codec.cc",
45 "main/acm2/acm_generic_codec.h",
46 "main/acm2/acm_gsmfr.cc",
47 "main/acm2/acm_gsmfr.h",
48 "main/acm2/acm_ilbc.cc",
49 "main/acm2/acm_ilbc.h",
50 "main/acm2/acm_isac.cc",
51 "main/acm2/acm_isac.h",
52 "main/acm2/acm_isac_macros.h",
53 "main/acm2/acm_opus.cc",
54 "main/acm2/acm_opus.h",
55 "main/acm2/acm_speex.cc",
56 "main/acm2/acm_speex.h",
57 "main/acm2/acm_pcm16b.cc",
58 "main/acm2/acm_pcm16b.h",
59 "main/acm2/acm_pcma.cc",
60 "main/acm2/acm_pcma.h",
61 "main/acm2/acm_pcmu.cc",
62 "main/acm2/acm_pcmu.h",
63 "main/acm2/acm_red.cc",
64 "main/acm2/acm_red.h",
65 "main/acm2/acm_receiver.cc",
66 "main/acm2/acm_receiver.h",
67 "main/acm2/acm_resampler.cc",
68 "main/acm2/acm_resampler.h",
69 "main/acm2/audio_coding_module.cc",
70 "main/acm2/audio_coding_module_impl.cc",
71 "main/acm2/audio_coding_module_impl.h",
72 "main/acm2/call_statistics.cc",
73 "main/acm2/call_statistics.h",
74 "main/acm2/initial_delay_manager.cc",
75 "main/acm2/initial_delay_manager.h",
76 "main/acm2/nack.cc",
77 "main/acm2/nack.h",
78 "main/interface/audio_coding_module.h",
79 "main/interface/audio_coding_module_typedefs.h",
80 ]
81
82 defines = []
83
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000084 configs += [ "../..:common_config" ]
85
86 public_configs = [
87 "../..:common_inherited_config",
88 ":audio_coding_config",
89 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000090
91 if (is_clang) {
92 # Suppress warnings from Chrome's Clang plugins.
93 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
94 configs -= [ "//build/config/clang:find_bad_constructs" ]
95 }
96
97 deps = [
98 ":cng",
99 ":g711",
100 ":g722",
101 ":ilbc",
102 ":isac",
103 ":isacfix",
104 ":neteq",
105 ":pcm16b",
106 "../../common_audio",
107 "../../system_wrappers",
108 ]
109
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000110 if (rtc_include_opus) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000111 defines += [ "WEBRTC_CODEC_OPUS" ]
112 deps += [ ":webrtc_opus" ]
113 }
114}
115
116config("cng_config") {
117 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000118 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000119 "codecs/cng/include",
120 ]
121}
122
123source_set("cng") {
124 sources = [
125 "codecs/cng/cng_helpfuns.c",
126 "codecs/cng/cng_helpfuns.h",
127 "codecs/cng/include/webrtc_cng.h",
128 "codecs/cng/webrtc_cng.c",
129 ]
130
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000131 configs += [ "../..:common_config" ]
132
133 public_configs = [
134 "../..:common_inherited_config",
135 ":cng_config",
136 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000137
138 deps = [ "../../common_audio" ]
139}
140
141config("g711_config") {
142 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000143 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000144 "codecs/g711/include",
145 ]
146}
147
148source_set("g711") {
149 sources = [
150 "codecs/g711/include/g711_interface.h",
151 "codecs/g711/g711_interface.c",
152 "codecs/g711/g711.c",
153 "codecs/g711/g711.h",
154 ]
155
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000156 configs += [ "../..:common_config" ]
157
158 public_configs = [
159 "../..:common_inherited_config",
160 ":g711_config",
161 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000162}
163
164config("g722_config") {
165 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000166 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000167 "codecs/g722/include",
168 ]
169}
170
171source_set("g722") {
172 sources = [
173 "codecs/g722/include/g722_interface.h",
174 "codecs/g722/g722_interface.c",
175 "codecs/g722/g722_encode.c",
176 "codecs/g722/g722_decode.c",
177 "codecs/g722/g722_enc_dec.h",
178 ]
179
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000180 configs += [ "../..:common_config" ]
181
182 public_configs = [
183 "../..:common_inherited_config",
184 ":g722_config",
185 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000186}
187
188config("ilbc_config") {
189 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000190 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000191 "codecs/ilbc/interface",
192 ]
193}
194
195source_set("ilbc") {
196 sources = [
197 "codecs/ilbc/abs_quant.c",
198 "codecs/ilbc/abs_quant.h",
199 "codecs/ilbc/abs_quant_loop.c",
200 "codecs/ilbc/abs_quant_loop.h",
201 "codecs/ilbc/augmented_cb_corr.c",
202 "codecs/ilbc/augmented_cb_corr.h",
203 "codecs/ilbc/bw_expand.c",
204 "codecs/ilbc/bw_expand.h",
205 "codecs/ilbc/cb_construct.c",
206 "codecs/ilbc/cb_construct.h",
207 "codecs/ilbc/cb_mem_energy_augmentation.c",
208 "codecs/ilbc/cb_mem_energy_augmentation.h",
209 "codecs/ilbc/cb_mem_energy.c",
210 "codecs/ilbc/cb_mem_energy_calc.c",
211 "codecs/ilbc/cb_mem_energy_calc.h",
212 "codecs/ilbc/cb_mem_energy.h",
213 "codecs/ilbc/cb_search.c",
214 "codecs/ilbc/cb_search_core.c",
215 "codecs/ilbc/cb_search_core.h",
216 "codecs/ilbc/cb_search.h",
217 "codecs/ilbc/cb_update_best_index.c",
218 "codecs/ilbc/cb_update_best_index.h",
219 "codecs/ilbc/chebyshev.c",
220 "codecs/ilbc/chebyshev.h",
221 "codecs/ilbc/comp_corr.c",
222 "codecs/ilbc/comp_corr.h",
223 "codecs/ilbc/constants.c",
224 "codecs/ilbc/constants.h",
225 "codecs/ilbc/create_augmented_vec.c",
226 "codecs/ilbc/create_augmented_vec.h",
227 "codecs/ilbc/decode.c",
228 "codecs/ilbc/decode.h",
229 "codecs/ilbc/decode_residual.c",
230 "codecs/ilbc/decode_residual.h",
231 "codecs/ilbc/decoder_interpolate_lsf.c",
232 "codecs/ilbc/decoder_interpolate_lsf.h",
233 "codecs/ilbc/defines.h",
234 "codecs/ilbc/do_plc.c",
235 "codecs/ilbc/do_plc.h",
236 "codecs/ilbc/encode.c",
237 "codecs/ilbc/encode.h",
238 "codecs/ilbc/energy_inverse.c",
239 "codecs/ilbc/energy_inverse.h",
240 "codecs/ilbc/enhancer.c",
241 "codecs/ilbc/enhancer.h",
242 "codecs/ilbc/enhancer_interface.c",
243 "codecs/ilbc/enhancer_interface.h",
244 "codecs/ilbc/enh_upsample.c",
245 "codecs/ilbc/enh_upsample.h",
246 "codecs/ilbc/filtered_cb_vecs.c",
247 "codecs/ilbc/filtered_cb_vecs.h",
248 "codecs/ilbc/frame_classify.c",
249 "codecs/ilbc/frame_classify.h",
250 "codecs/ilbc/gain_dequant.c",
251 "codecs/ilbc/gain_dequant.h",
252 "codecs/ilbc/gain_quant.c",
253 "codecs/ilbc/gain_quant.h",
254 "codecs/ilbc/get_cd_vec.c",
255 "codecs/ilbc/get_cd_vec.h",
256 "codecs/ilbc/get_lsp_poly.c",
257 "codecs/ilbc/get_lsp_poly.h",
258 "codecs/ilbc/get_sync_seq.c",
259 "codecs/ilbc/get_sync_seq.h",
260 "codecs/ilbc/hp_input.c",
261 "codecs/ilbc/hp_input.h",
262 "codecs/ilbc/hp_output.c",
263 "codecs/ilbc/hp_output.h",
264 "codecs/ilbc/ilbc.c",
265 "codecs/ilbc/index_conv_dec.c",
266 "codecs/ilbc/index_conv_dec.h",
267 "codecs/ilbc/index_conv_enc.c",
268 "codecs/ilbc/index_conv_enc.h",
269 "codecs/ilbc/init_decode.c",
270 "codecs/ilbc/init_decode.h",
271 "codecs/ilbc/init_encode.c",
272 "codecs/ilbc/init_encode.h",
273 "codecs/ilbc/interface/ilbc.h",
274 "codecs/ilbc/interpolate.c",
275 "codecs/ilbc/interpolate.h",
276 "codecs/ilbc/interpolate_samples.c",
277 "codecs/ilbc/interpolate_samples.h",
278 "codecs/ilbc/lpc_encode.c",
279 "codecs/ilbc/lpc_encode.h",
280 "codecs/ilbc/lsf_check.c",
281 "codecs/ilbc/lsf_check.h",
282 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
283 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
284 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
285 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
286 "codecs/ilbc/lsf_to_lsp.c",
287 "codecs/ilbc/lsf_to_lsp.h",
288 "codecs/ilbc/lsf_to_poly.c",
289 "codecs/ilbc/lsf_to_poly.h",
290 "codecs/ilbc/lsp_to_lsf.c",
291 "codecs/ilbc/lsp_to_lsf.h",
292 "codecs/ilbc/my_corr.c",
293 "codecs/ilbc/my_corr.h",
294 "codecs/ilbc/nearest_neighbor.c",
295 "codecs/ilbc/nearest_neighbor.h",
296 "codecs/ilbc/pack_bits.c",
297 "codecs/ilbc/pack_bits.h",
298 "codecs/ilbc/poly_to_lsf.c",
299 "codecs/ilbc/poly_to_lsf.h",
300 "codecs/ilbc/poly_to_lsp.c",
301 "codecs/ilbc/poly_to_lsp.h",
302 "codecs/ilbc/refiner.c",
303 "codecs/ilbc/refiner.h",
304 "codecs/ilbc/simple_interpolate_lsf.c",
305 "codecs/ilbc/simple_interpolate_lsf.h",
306 "codecs/ilbc/simple_lpc_analysis.c",
307 "codecs/ilbc/simple_lpc_analysis.h",
308 "codecs/ilbc/simple_lsf_dequant.c",
309 "codecs/ilbc/simple_lsf_dequant.h",
310 "codecs/ilbc/simple_lsf_quant.c",
311 "codecs/ilbc/simple_lsf_quant.h",
312 "codecs/ilbc/smooth.c",
313 "codecs/ilbc/smooth.h",
314 "codecs/ilbc/smooth_out_data.c",
315 "codecs/ilbc/smooth_out_data.h",
316 "codecs/ilbc/sort_sq.c",
317 "codecs/ilbc/sort_sq.h",
318 "codecs/ilbc/split_vq.c",
319 "codecs/ilbc/split_vq.h",
320 "codecs/ilbc/state_construct.c",
321 "codecs/ilbc/state_construct.h",
322 "codecs/ilbc/state_search.c",
323 "codecs/ilbc/state_search.h",
324 "codecs/ilbc/swap_bytes.c",
325 "codecs/ilbc/swap_bytes.h",
326 "codecs/ilbc/unpack_bits.c",
327 "codecs/ilbc/unpack_bits.h",
328 "codecs/ilbc/vq3.c",
329 "codecs/ilbc/vq3.h",
330 "codecs/ilbc/vq4.c",
331 "codecs/ilbc/vq4.h",
332 "codecs/ilbc/window32_w32.c",
333 "codecs/ilbc/window32_w32.h",
334 "codecs/ilbc/xcorr_coef.c",
335 "codecs/ilbc/xcorr_coef.h",
336 ]
337
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000338 configs += [ "../..:common_config" ]
339
340 public_configs = [
341 "../..:common_inherited_config",
342 ":ilbc_config",
343 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000344
345 deps = [ "../../common_audio" ]
346}
347
348config("isac_config") {
349 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000350 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000351 "codecs/isac/main/interface",
352 ]
353}
354
355source_set("isac") {
356 sources = [
357 "codecs/isac/main/interface/isac.h",
358 "codecs/isac/main/source/arith_routines.c",
359 "codecs/isac/main/source/arith_routines.h",
360 "codecs/isac/main/source/arith_routines_hist.c",
361 "codecs/isac/main/source/arith_routines_logist.c",
362 "codecs/isac/main/source/bandwidth_estimator.c",
363 "codecs/isac/main/source/bandwidth_estimator.h",
364 "codecs/isac/main/source/codec.h",
365 "codecs/isac/main/source/crc.c",
366 "codecs/isac/main/source/crc.h",
367 "codecs/isac/main/source/decode_bwe.c",
368 "codecs/isac/main/source/decode.c",
369 "codecs/isac/main/source/encode.c",
370 "codecs/isac/main/source/encode_lpc_swb.c",
371 "codecs/isac/main/source/encode_lpc_swb.h",
372 "codecs/isac/main/source/entropy_coding.c",
373 "codecs/isac/main/source/entropy_coding.h",
374 "codecs/isac/main/source/fft.c",
375 "codecs/isac/main/source/fft.h",
376 "codecs/isac/main/source/filterbanks.c",
377 "codecs/isac/main/source/filterbank_tables.c",
378 "codecs/isac/main/source/filterbank_tables.h",
379 "codecs/isac/main/source/filter_functions.c",
380 "codecs/isac/main/source/intialize.c",
381 "codecs/isac/main/source/isac.c",
382 "codecs/isac/main/source/lattice.c",
383 "codecs/isac/main/source/lpc_analysis.c",
384 "codecs/isac/main/source/lpc_analysis.h",
385 "codecs/isac/main/source/lpc_gain_swb_tables.c",
386 "codecs/isac/main/source/lpc_gain_swb_tables.h",
387 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
388 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
389 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
390 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
391 "codecs/isac/main/source/lpc_tables.c",
392 "codecs/isac/main/source/lpc_tables.h",
393 "codecs/isac/main/source/os_specific_inline.h",
394 "codecs/isac/main/source/pitch_estimator.c",
395 "codecs/isac/main/source/pitch_estimator.h",
396 "codecs/isac/main/source/pitch_filter.c",
397 "codecs/isac/main/source/pitch_gain_tables.c",
398 "codecs/isac/main/source/pitch_gain_tables.h",
399 "codecs/isac/main/source/pitch_lag_tables.c",
400 "codecs/isac/main/source/pitch_lag_tables.h",
401 "codecs/isac/main/source/settings.h",
402 "codecs/isac/main/source/spectrum_ar_model_tables.c",
403 "codecs/isac/main/source/spectrum_ar_model_tables.h",
404 "codecs/isac/main/source/structs.h",
405 "codecs/isac/main/source/transform.c",
406 ]
407
408 if (is_linux) {
409 libs = [ "m" ]
410 }
411
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000412 configs += [ "../..:common_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000413
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000414 public_configs = [
415 "../..:common_inherited_config",
416 ":isac_config",
417 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000418
419 deps = [ "../../common_audio" ]
420}
421
422config("isac_fix_config") {
423 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000424 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000425 "codecs/isac/fix/interface",
426 ]
427}
428
429source_set("isacfix") {
430 sources = [
431 "codecs/isac/fix/interface/isacfix.h",
432 "codecs/isac/fix/source/arith_routines.c",
433 "codecs/isac/fix/source/arith_routines_hist.c",
434 "codecs/isac/fix/source/arith_routines_logist.c",
435 "codecs/isac/fix/source/arith_routins.h",
436 "codecs/isac/fix/source/bandwidth_estimator.c",
437 "codecs/isac/fix/source/bandwidth_estimator.h",
438 "codecs/isac/fix/source/codec.h",
439 "codecs/isac/fix/source/decode_bwe.c",
440 "codecs/isac/fix/source/decode.c",
441 "codecs/isac/fix/source/decode_plc.c",
442 "codecs/isac/fix/source/encode.c",
443 "codecs/isac/fix/source/entropy_coding.c",
444 "codecs/isac/fix/source/entropy_coding.h",
445 "codecs/isac/fix/source/fft.c",
446 "codecs/isac/fix/source/fft.h",
447 "codecs/isac/fix/source/filterbanks.c",
448 "codecs/isac/fix/source/filterbank_tables.c",
449 "codecs/isac/fix/source/filterbank_tables.h",
450 "codecs/isac/fix/source/filters.c",
451 "codecs/isac/fix/source/initialize.c",
452 "codecs/isac/fix/source/isacfix.c",
453 "codecs/isac/fix/source/lattice.c",
454 "codecs/isac/fix/source/lpc_masking_model.c",
455 "codecs/isac/fix/source/lpc_masking_model.h",
456 "codecs/isac/fix/source/lpc_tables.c",
457 "codecs/isac/fix/source/lpc_tables.h",
458 "codecs/isac/fix/source/pitch_estimator.c",
459 "codecs/isac/fix/source/pitch_estimator.h",
460 "codecs/isac/fix/source/pitch_filter.c",
461 "codecs/isac/fix/source/pitch_gain_tables.c",
462 "codecs/isac/fix/source/pitch_gain_tables.h",
463 "codecs/isac/fix/source/pitch_lag_tables.c",
464 "codecs/isac/fix/source/pitch_lag_tables.h",
465 "codecs/isac/fix/source/settings.h",
466 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
467 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
468 "codecs/isac/fix/source/structs.h",
469 "codecs/isac/fix/source/transform.c",
470 "codecs/isac/fix/source/transform_tables.c",
471 ]
472
473 if (!is_win) {
474 defines = [ "WEBRTC_LINUX" ]
475 }
476
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000477 configs += [ "../..:common_config" ]
478
479 public_configs = [
480 "../..:common_inherited_config",
481 ":isac_fix_config",
482 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000483
484 deps = [
485 "../../common_audio",
486 "../../system_wrappers",
487 ]
488
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000489 if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000490 deps += [ ":isac_neon" ]
491
492 # Enable compilation for the ARM v7 Neon instruction set. This is needed
493 # since //build/config/arm.gni only enables Neon for iOS, not Android.
494 # This provides the same functionality as webrtc/build/arm_neon.gypi.
495 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
496 # //build/config/arm.gni instead, to reduce code duplication.
497 # Remove the -mfpu=vfpv3-d16 cflag.
498 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
499 cflags = [
500 "-flax-vector-conversions",
501 "-mfpu=neon",
502 ]
503
504 sources += [
505 "codecs/isac/fix/source/lattice_armv7.S",
506 "codecs/isac/fix/source/pitch_filter_armv6.S",
507 ]
508 } else {
509 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
510 }
511
512 if (cpu_arch == "mipsel") {
513 sources += [
514 "codecs/isac/fix/source/entropy_coding_mips.c",
515 "codecs/isac/fix/source/filters_mips.c",
516 "codecs/isac/fix/source/lattice_mips.c",
517 "codecs/isac/fix/source/pitch_estimator_mips.c",
518 "codecs/isac/fix/source/transform_mips.c",
519 ]
520 if (mips_dsp_rev > 0) {
521 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
522 }
523 if (mips_dsp_rev > 1) {
524 sources += [
525 "codecs/isac/fix/source/lpc_masking_model_mips.c",
526 "codecs/isac/fix/source/pitch_filter_mips.c",
527 ]
528 } else {
529 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
530 }
531 }
532
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000533 if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000534 sources += [
535 "codecs/isac/fix/source/lattice_c.c",
536 "codecs/isac/fix/source/pitch_estimator_c.c",
537 ]
538 }
539}
540
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000541if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000542 source_set("isac_neon") {
543 sources = [
544 "codecs/isac/fix/source/entropy_coding_neon.c",
545 "codecs/isac/fix/source/filterbanks_neon.S",
546 "codecs/isac/fix/source/filters_neon.S",
547 "codecs/isac/fix/source/lattice_neon.S",
548 "codecs/isac/fix/source/lpc_masking_model_neon.S",
549 "codecs/isac/fix/source/transform_neon.S",
550 ]
551
552 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000553 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000554 ]
555
556 # Disable LTO in audio_processing_neon target due to compiler bug.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000557 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000558 cflags -= [
559 "-flto",
560 "-ffat-lto-objects",
561 ]
562 }
563
564 # Enable compilation for the ARM v7 Neon instruction set. This is needed
565 # since //build/config/arm.gni only enables Neon for iOS, not Android.
566 # This provides the same functionality as webrtc/build/arm_neon.gypi.
567 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
568 # //build/config/arm.gni instead, to reduce code duplication.
569 # Remove the -mfpu=vfpv3-d16 cflag.
570 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
571 cflags = [
572 "-flax-vector-conversions",
573 "-mfpu=neon",
574 ]
575
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000576 configs += [ "../..:common_config" ]
577 public_configs = [ "../..:common_inherited_config" ]
578
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000579 deps = [ "../../common_audio" ]
580 }
581}
582
583config("pcm16b_config") {
584 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000585 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000586 "codecs/pcm16b/include",
587 ]
588}
589
590source_set("pcm16b") {
591 sources = [
592 "codecs/pcm16b/include/pcm16b.h",
593 "codecs/pcm16b/pcm16b.c",
594 ]
595
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000596 configs += [ "../..:common_config" ]
597
598 public_configs = [
599 "../..:common_inherited_config",
600 ":pcm16b_config",
601 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000602}
603
604config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000605 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000606}
607
608source_set("webrtc_opus") {
609 sources = [
610 "codecs/opus/interface/opus_interface.h",
611 "codecs/opus/opus_inst.h",
612 "codecs/opus/opus_interface.c",
613 ]
614 if (build_with_mozilla) {
615 include_dirs = [ getenv("DIST") + "/include/opus" ]
616 } else {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000617 configs += [ "../..:common_config" ]
618 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000619
620 deps = [ "//third_party/opus" ]
621 }
622}
623
624config("neteq_config") {
625 include_dirs = [
626 # Need Opus header files for the audio classifier.
627 "//third_party/opus/src/celt",
628 "//third_party/opus/src/src",
629 ]
630}
631
632source_set("neteq") {
633 sources = [
634 "neteq/interface/audio_decoder.h",
635 "neteq/interface/neteq.h",
636 "neteq/accelerate.cc",
637 "neteq/accelerate.h",
638 "neteq/audio_classifier.cc",
639 "neteq/audio_classifier.h",
640 "neteq/audio_decoder_impl.cc",
641 "neteq/audio_decoder_impl.h",
642 "neteq/audio_decoder.cc",
643 "neteq/audio_multi_vector.cc",
644 "neteq/audio_multi_vector.h",
645 "neteq/audio_vector.cc",
646 "neteq/audio_vector.h",
647 "neteq/background_noise.cc",
648 "neteq/background_noise.h",
649 "neteq/buffer_level_filter.cc",
650 "neteq/buffer_level_filter.h",
651 "neteq/comfort_noise.cc",
652 "neteq/comfort_noise.h",
653 "neteq/decision_logic.cc",
654 "neteq/decision_logic.h",
655 "neteq/decision_logic_fax.cc",
656 "neteq/decision_logic_fax.h",
657 "neteq/decision_logic_normal.cc",
658 "neteq/decision_logic_normal.h",
659 "neteq/decoder_database.cc",
660 "neteq/decoder_database.h",
661 "neteq/defines.h",
662 "neteq/delay_manager.cc",
663 "neteq/delay_manager.h",
664 "neteq/delay_peak_detector.cc",
665 "neteq/delay_peak_detector.h",
666 "neteq/dsp_helper.cc",
667 "neteq/dsp_helper.h",
668 "neteq/dtmf_buffer.cc",
669 "neteq/dtmf_buffer.h",
670 "neteq/dtmf_tone_generator.cc",
671 "neteq/dtmf_tone_generator.h",
672 "neteq/expand.cc",
673 "neteq/expand.h",
674 "neteq/merge.cc",
675 "neteq/merge.h",
676 "neteq/neteq_impl.cc",
677 "neteq/neteq_impl.h",
678 "neteq/neteq.cc",
679 "neteq/statistics_calculator.cc",
680 "neteq/statistics_calculator.h",
681 "neteq/normal.cc",
682 "neteq/normal.h",
683 "neteq/packet_buffer.cc",
684 "neteq/packet_buffer.h",
685 "neteq/payload_splitter.cc",
686 "neteq/payload_splitter.h",
687 "neteq/post_decode_vad.cc",
688 "neteq/post_decode_vad.h",
689 "neteq/preemptive_expand.cc",
690 "neteq/preemptive_expand.h",
691 "neteq/random_vector.cc",
692 "neteq/random_vector.h",
693 "neteq/rtcp.cc",
694 "neteq/rtcp.h",
695 "neteq/sync_buffer.cc",
696 "neteq/sync_buffer.h",
697 "neteq/timestamp_scaler.cc",
698 "neteq/timestamp_scaler.h",
699 "neteq/time_stretch.cc",
700 "neteq/time_stretch.h",
701 ]
702
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000703 configs += [ "../..:common_config" ]
704
705 public_configs = [
706 "../..:common_inherited_config",
707 ":neteq_config",
708 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000709
710 forward_dependent_configs_from = [ "//third_party/opus" ]
711
712 if (is_clang) {
713 # Suppress warnings from Chrome's Clang plugins.
714 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
715 configs -= [ "//build/config/clang:find_bad_constructs" ]
716 }
717
718 deps = [
719 ":cng",
720 ":g711",
721 ":g722",
722 ":ilbc",
723 ":isac",
724 ":isacfix",
725 ":pcm16b",
726 "../../common_audio",
727 "../../system_wrappers",
728 "//third_party/opus",
729 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000730}