blob: 854ddb8fc3b1f111680c1de15f85e4c6869b1cb3 [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
kwiberg@webrtc.org00ba1a72014-12-03 14:23:23 +0000116source_set("audio_decoder_interface") {
117 sources = [
118 "codecs/audio_decoder.cc",
119 "codecs/audio_decoder.h",
120 ]
121}
122
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000123config("cng_config") {
124 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000125 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000126 "codecs/cng/include",
127 ]
128}
129
130source_set("cng") {
131 sources = [
132 "codecs/cng/cng_helpfuns.c",
133 "codecs/cng/cng_helpfuns.h",
134 "codecs/cng/include/webrtc_cng.h",
135 "codecs/cng/webrtc_cng.c",
136 ]
137
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000138 configs += [ "../..:common_config" ]
139
140 public_configs = [
141 "../..:common_inherited_config",
142 ":cng_config",
143 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000144
145 deps = [ "../../common_audio" ]
146}
147
148config("g711_config") {
149 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000150 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000151 "codecs/g711/include",
152 ]
153}
154
155source_set("g711") {
156 sources = [
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000157 "codecs/g711/include/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000158 "codecs/g711/include/g711_interface.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000159 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000160 "codecs/g711/g711_interface.c",
161 "codecs/g711/g711.c",
162 "codecs/g711/g711.h",
163 ]
164
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000165 configs += [ "../..:common_config" ]
166
167 public_configs = [
168 "../..:common_inherited_config",
169 ":g711_config",
170 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000171}
172
173config("g722_config") {
174 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000175 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000176 "codecs/g722/include",
177 ]
178}
179
180source_set("g722") {
181 sources = [
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000182 "codecs/g722/audio_encoder_g722.cc",
183 "codecs/g722/include/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000184 "codecs/g722/include/g722_interface.h",
185 "codecs/g722/g722_interface.c",
186 "codecs/g722/g722_encode.c",
187 "codecs/g722/g722_decode.c",
188 "codecs/g722/g722_enc_dec.h",
189 ]
190
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000191 configs += [ "../..:common_config" ]
192
193 public_configs = [
194 "../..:common_inherited_config",
195 ":g722_config",
196 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000197}
198
199config("ilbc_config") {
200 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000201 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000202 "codecs/ilbc/interface",
203 ]
204}
205
206source_set("ilbc") {
207 sources = [
208 "codecs/ilbc/abs_quant.c",
209 "codecs/ilbc/abs_quant.h",
210 "codecs/ilbc/abs_quant_loop.c",
211 "codecs/ilbc/abs_quant_loop.h",
212 "codecs/ilbc/augmented_cb_corr.c",
213 "codecs/ilbc/augmented_cb_corr.h",
214 "codecs/ilbc/bw_expand.c",
215 "codecs/ilbc/bw_expand.h",
216 "codecs/ilbc/cb_construct.c",
217 "codecs/ilbc/cb_construct.h",
218 "codecs/ilbc/cb_mem_energy_augmentation.c",
219 "codecs/ilbc/cb_mem_energy_augmentation.h",
220 "codecs/ilbc/cb_mem_energy.c",
221 "codecs/ilbc/cb_mem_energy_calc.c",
222 "codecs/ilbc/cb_mem_energy_calc.h",
223 "codecs/ilbc/cb_mem_energy.h",
224 "codecs/ilbc/cb_search.c",
225 "codecs/ilbc/cb_search_core.c",
226 "codecs/ilbc/cb_search_core.h",
227 "codecs/ilbc/cb_search.h",
228 "codecs/ilbc/cb_update_best_index.c",
229 "codecs/ilbc/cb_update_best_index.h",
230 "codecs/ilbc/chebyshev.c",
231 "codecs/ilbc/chebyshev.h",
232 "codecs/ilbc/comp_corr.c",
233 "codecs/ilbc/comp_corr.h",
234 "codecs/ilbc/constants.c",
235 "codecs/ilbc/constants.h",
236 "codecs/ilbc/create_augmented_vec.c",
237 "codecs/ilbc/create_augmented_vec.h",
238 "codecs/ilbc/decode.c",
239 "codecs/ilbc/decode.h",
240 "codecs/ilbc/decode_residual.c",
241 "codecs/ilbc/decode_residual.h",
242 "codecs/ilbc/decoder_interpolate_lsf.c",
243 "codecs/ilbc/decoder_interpolate_lsf.h",
244 "codecs/ilbc/defines.h",
245 "codecs/ilbc/do_plc.c",
246 "codecs/ilbc/do_plc.h",
247 "codecs/ilbc/encode.c",
248 "codecs/ilbc/encode.h",
249 "codecs/ilbc/energy_inverse.c",
250 "codecs/ilbc/energy_inverse.h",
251 "codecs/ilbc/enhancer.c",
252 "codecs/ilbc/enhancer.h",
253 "codecs/ilbc/enhancer_interface.c",
254 "codecs/ilbc/enhancer_interface.h",
255 "codecs/ilbc/enh_upsample.c",
256 "codecs/ilbc/enh_upsample.h",
257 "codecs/ilbc/filtered_cb_vecs.c",
258 "codecs/ilbc/filtered_cb_vecs.h",
259 "codecs/ilbc/frame_classify.c",
260 "codecs/ilbc/frame_classify.h",
261 "codecs/ilbc/gain_dequant.c",
262 "codecs/ilbc/gain_dequant.h",
263 "codecs/ilbc/gain_quant.c",
264 "codecs/ilbc/gain_quant.h",
265 "codecs/ilbc/get_cd_vec.c",
266 "codecs/ilbc/get_cd_vec.h",
267 "codecs/ilbc/get_lsp_poly.c",
268 "codecs/ilbc/get_lsp_poly.h",
269 "codecs/ilbc/get_sync_seq.c",
270 "codecs/ilbc/get_sync_seq.h",
271 "codecs/ilbc/hp_input.c",
272 "codecs/ilbc/hp_input.h",
273 "codecs/ilbc/hp_output.c",
274 "codecs/ilbc/hp_output.h",
275 "codecs/ilbc/ilbc.c",
276 "codecs/ilbc/index_conv_dec.c",
277 "codecs/ilbc/index_conv_dec.h",
278 "codecs/ilbc/index_conv_enc.c",
279 "codecs/ilbc/index_conv_enc.h",
280 "codecs/ilbc/init_decode.c",
281 "codecs/ilbc/init_decode.h",
282 "codecs/ilbc/init_encode.c",
283 "codecs/ilbc/init_encode.h",
284 "codecs/ilbc/interface/ilbc.h",
285 "codecs/ilbc/interpolate.c",
286 "codecs/ilbc/interpolate.h",
287 "codecs/ilbc/interpolate_samples.c",
288 "codecs/ilbc/interpolate_samples.h",
289 "codecs/ilbc/lpc_encode.c",
290 "codecs/ilbc/lpc_encode.h",
291 "codecs/ilbc/lsf_check.c",
292 "codecs/ilbc/lsf_check.h",
293 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
294 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
295 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
296 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
297 "codecs/ilbc/lsf_to_lsp.c",
298 "codecs/ilbc/lsf_to_lsp.h",
299 "codecs/ilbc/lsf_to_poly.c",
300 "codecs/ilbc/lsf_to_poly.h",
301 "codecs/ilbc/lsp_to_lsf.c",
302 "codecs/ilbc/lsp_to_lsf.h",
303 "codecs/ilbc/my_corr.c",
304 "codecs/ilbc/my_corr.h",
305 "codecs/ilbc/nearest_neighbor.c",
306 "codecs/ilbc/nearest_neighbor.h",
307 "codecs/ilbc/pack_bits.c",
308 "codecs/ilbc/pack_bits.h",
309 "codecs/ilbc/poly_to_lsf.c",
310 "codecs/ilbc/poly_to_lsf.h",
311 "codecs/ilbc/poly_to_lsp.c",
312 "codecs/ilbc/poly_to_lsp.h",
313 "codecs/ilbc/refiner.c",
314 "codecs/ilbc/refiner.h",
315 "codecs/ilbc/simple_interpolate_lsf.c",
316 "codecs/ilbc/simple_interpolate_lsf.h",
317 "codecs/ilbc/simple_lpc_analysis.c",
318 "codecs/ilbc/simple_lpc_analysis.h",
319 "codecs/ilbc/simple_lsf_dequant.c",
320 "codecs/ilbc/simple_lsf_dequant.h",
321 "codecs/ilbc/simple_lsf_quant.c",
322 "codecs/ilbc/simple_lsf_quant.h",
323 "codecs/ilbc/smooth.c",
324 "codecs/ilbc/smooth.h",
325 "codecs/ilbc/smooth_out_data.c",
326 "codecs/ilbc/smooth_out_data.h",
327 "codecs/ilbc/sort_sq.c",
328 "codecs/ilbc/sort_sq.h",
329 "codecs/ilbc/split_vq.c",
330 "codecs/ilbc/split_vq.h",
331 "codecs/ilbc/state_construct.c",
332 "codecs/ilbc/state_construct.h",
333 "codecs/ilbc/state_search.c",
334 "codecs/ilbc/state_search.h",
335 "codecs/ilbc/swap_bytes.c",
336 "codecs/ilbc/swap_bytes.h",
337 "codecs/ilbc/unpack_bits.c",
338 "codecs/ilbc/unpack_bits.h",
339 "codecs/ilbc/vq3.c",
340 "codecs/ilbc/vq3.h",
341 "codecs/ilbc/vq4.c",
342 "codecs/ilbc/vq4.h",
343 "codecs/ilbc/window32_w32.c",
344 "codecs/ilbc/window32_w32.h",
345 "codecs/ilbc/xcorr_coef.c",
346 "codecs/ilbc/xcorr_coef.h",
347 ]
348
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000349 configs += [ "../..:common_config" ]
350
351 public_configs = [
352 "../..:common_inherited_config",
353 ":ilbc_config",
354 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000355
356 deps = [ "../../common_audio" ]
357}
358
359config("isac_config") {
360 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000361 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000362 "codecs/isac/main/interface",
363 ]
364}
365
366source_set("isac") {
367 sources = [
368 "codecs/isac/main/interface/isac.h",
369 "codecs/isac/main/source/arith_routines.c",
370 "codecs/isac/main/source/arith_routines.h",
371 "codecs/isac/main/source/arith_routines_hist.c",
372 "codecs/isac/main/source/arith_routines_logist.c",
373 "codecs/isac/main/source/bandwidth_estimator.c",
374 "codecs/isac/main/source/bandwidth_estimator.h",
375 "codecs/isac/main/source/codec.h",
376 "codecs/isac/main/source/crc.c",
377 "codecs/isac/main/source/crc.h",
378 "codecs/isac/main/source/decode_bwe.c",
379 "codecs/isac/main/source/decode.c",
380 "codecs/isac/main/source/encode.c",
381 "codecs/isac/main/source/encode_lpc_swb.c",
382 "codecs/isac/main/source/encode_lpc_swb.h",
383 "codecs/isac/main/source/entropy_coding.c",
384 "codecs/isac/main/source/entropy_coding.h",
385 "codecs/isac/main/source/fft.c",
386 "codecs/isac/main/source/fft.h",
387 "codecs/isac/main/source/filterbanks.c",
388 "codecs/isac/main/source/filterbank_tables.c",
389 "codecs/isac/main/source/filterbank_tables.h",
390 "codecs/isac/main/source/filter_functions.c",
391 "codecs/isac/main/source/intialize.c",
392 "codecs/isac/main/source/isac.c",
393 "codecs/isac/main/source/lattice.c",
394 "codecs/isac/main/source/lpc_analysis.c",
395 "codecs/isac/main/source/lpc_analysis.h",
396 "codecs/isac/main/source/lpc_gain_swb_tables.c",
397 "codecs/isac/main/source/lpc_gain_swb_tables.h",
398 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
399 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
400 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
401 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
402 "codecs/isac/main/source/lpc_tables.c",
403 "codecs/isac/main/source/lpc_tables.h",
404 "codecs/isac/main/source/os_specific_inline.h",
405 "codecs/isac/main/source/pitch_estimator.c",
406 "codecs/isac/main/source/pitch_estimator.h",
407 "codecs/isac/main/source/pitch_filter.c",
408 "codecs/isac/main/source/pitch_gain_tables.c",
409 "codecs/isac/main/source/pitch_gain_tables.h",
410 "codecs/isac/main/source/pitch_lag_tables.c",
411 "codecs/isac/main/source/pitch_lag_tables.h",
412 "codecs/isac/main/source/settings.h",
413 "codecs/isac/main/source/spectrum_ar_model_tables.c",
414 "codecs/isac/main/source/spectrum_ar_model_tables.h",
415 "codecs/isac/main/source/structs.h",
416 "codecs/isac/main/source/transform.c",
417 ]
418
419 if (is_linux) {
420 libs = [ "m" ]
421 }
422
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000423 configs += [ "../..:common_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000424
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000425 public_configs = [
426 "../..:common_inherited_config",
427 ":isac_config",
428 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000429
430 deps = [ "../../common_audio" ]
431}
432
433config("isac_fix_config") {
434 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000435 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000436 "codecs/isac/fix/interface",
437 ]
438}
439
440source_set("isacfix") {
441 sources = [
442 "codecs/isac/fix/interface/isacfix.h",
443 "codecs/isac/fix/source/arith_routines.c",
444 "codecs/isac/fix/source/arith_routines_hist.c",
445 "codecs/isac/fix/source/arith_routines_logist.c",
446 "codecs/isac/fix/source/arith_routins.h",
447 "codecs/isac/fix/source/bandwidth_estimator.c",
448 "codecs/isac/fix/source/bandwidth_estimator.h",
449 "codecs/isac/fix/source/codec.h",
450 "codecs/isac/fix/source/decode_bwe.c",
451 "codecs/isac/fix/source/decode.c",
452 "codecs/isac/fix/source/decode_plc.c",
453 "codecs/isac/fix/source/encode.c",
454 "codecs/isac/fix/source/entropy_coding.c",
455 "codecs/isac/fix/source/entropy_coding.h",
456 "codecs/isac/fix/source/fft.c",
457 "codecs/isac/fix/source/fft.h",
458 "codecs/isac/fix/source/filterbanks.c",
459 "codecs/isac/fix/source/filterbank_tables.c",
460 "codecs/isac/fix/source/filterbank_tables.h",
461 "codecs/isac/fix/source/filters.c",
462 "codecs/isac/fix/source/initialize.c",
463 "codecs/isac/fix/source/isacfix.c",
464 "codecs/isac/fix/source/lattice.c",
465 "codecs/isac/fix/source/lpc_masking_model.c",
466 "codecs/isac/fix/source/lpc_masking_model.h",
467 "codecs/isac/fix/source/lpc_tables.c",
468 "codecs/isac/fix/source/lpc_tables.h",
469 "codecs/isac/fix/source/pitch_estimator.c",
470 "codecs/isac/fix/source/pitch_estimator.h",
471 "codecs/isac/fix/source/pitch_filter.c",
472 "codecs/isac/fix/source/pitch_gain_tables.c",
473 "codecs/isac/fix/source/pitch_gain_tables.h",
474 "codecs/isac/fix/source/pitch_lag_tables.c",
475 "codecs/isac/fix/source/pitch_lag_tables.h",
476 "codecs/isac/fix/source/settings.h",
477 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
478 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
479 "codecs/isac/fix/source/structs.h",
480 "codecs/isac/fix/source/transform.c",
481 "codecs/isac/fix/source/transform_tables.c",
482 ]
483
484 if (!is_win) {
485 defines = [ "WEBRTC_LINUX" ]
486 }
487
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000488 configs += [ "../..:common_config" ]
489
490 public_configs = [
491 "../..:common_inherited_config",
492 ":isac_fix_config",
493 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000494
495 deps = [
496 "../../common_audio",
497 "../../system_wrappers",
498 ]
499
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000500 if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000501 deps += [ ":isac_neon" ]
502
503 # Enable compilation for the ARM v7 Neon instruction set. This is needed
504 # since //build/config/arm.gni only enables Neon for iOS, not Android.
505 # This provides the same functionality as webrtc/build/arm_neon.gypi.
506 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
507 # //build/config/arm.gni instead, to reduce code duplication.
508 # Remove the -mfpu=vfpv3-d16 cflag.
509 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
510 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000511 "-mfpu=neon",
512 ]
513
514 sources += [
515 "codecs/isac/fix/source/lattice_armv7.S",
516 "codecs/isac/fix/source/pitch_filter_armv6.S",
517 ]
518 } else {
519 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
520 }
521
522 if (cpu_arch == "mipsel") {
523 sources += [
524 "codecs/isac/fix/source/entropy_coding_mips.c",
525 "codecs/isac/fix/source/filters_mips.c",
526 "codecs/isac/fix/source/lattice_mips.c",
527 "codecs/isac/fix/source/pitch_estimator_mips.c",
528 "codecs/isac/fix/source/transform_mips.c",
529 ]
530 if (mips_dsp_rev > 0) {
531 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
532 }
533 if (mips_dsp_rev > 1) {
534 sources += [
535 "codecs/isac/fix/source/lpc_masking_model_mips.c",
536 "codecs/isac/fix/source/pitch_filter_mips.c",
537 ]
538 } else {
539 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
540 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000541 } else {
542 sources += [ "codecs/isac/fix/source/pitch_estimator_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000543 }
544
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000545 if (!rtc_build_armv7_neon && cpu_arch != "mipsel") {
546 sources += [ "codecs/isac/fix/source/lattice_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000547 }
548}
549
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000550if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000551 source_set("isac_neon") {
552 sources = [
553 "codecs/isac/fix/source/entropy_coding_neon.c",
554 "codecs/isac/fix/source/filterbanks_neon.S",
555 "codecs/isac/fix/source/filters_neon.S",
556 "codecs/isac/fix/source/lattice_neon.S",
557 "codecs/isac/fix/source/lpc_masking_model_neon.S",
558 "codecs/isac/fix/source/transform_neon.S",
559 ]
560
561 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000562 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000563 ]
564
565 # Disable LTO in audio_processing_neon target due to compiler bug.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000566 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000567 cflags -= [
568 "-flto",
569 "-ffat-lto-objects",
570 ]
571 }
572
573 # Enable compilation for the ARM v7 Neon instruction set. This is needed
574 # since //build/config/arm.gni only enables Neon for iOS, not Android.
575 # This provides the same functionality as webrtc/build/arm_neon.gypi.
576 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
577 # //build/config/arm.gni instead, to reduce code duplication.
578 # Remove the -mfpu=vfpv3-d16 cflag.
579 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
580 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000581 "-mfpu=neon",
582 ]
583
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000584 configs += [ "../..:common_config" ]
585 public_configs = [ "../..:common_inherited_config" ]
586
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000587 deps = [ "../../common_audio" ]
588 }
589}
590
591config("pcm16b_config") {
592 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000593 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000594 "codecs/pcm16b/include",
595 ]
596}
597
598source_set("pcm16b") {
599 sources = [
600 "codecs/pcm16b/include/pcm16b.h",
601 "codecs/pcm16b/pcm16b.c",
602 ]
603
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000604 configs += [ "../..:common_config" ]
605
606 public_configs = [
607 "../..:common_inherited_config",
608 ":pcm16b_config",
609 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000610}
611
612config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000613 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000614}
615
616source_set("webrtc_opus") {
617 sources = [
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000618 "codecs/opus/audio_encoder_opus.cc",
619 "codecs/opus/interface/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000620 "codecs/opus/interface/opus_interface.h",
621 "codecs/opus/opus_inst.h",
622 "codecs/opus/opus_interface.c",
623 ]
624 if (build_with_mozilla) {
625 include_dirs = [ getenv("DIST") + "/include/opus" ]
626 } else {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000627 configs += [ "../..:common_config" ]
628 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000629
630 deps = [ "//third_party/opus" ]
631 }
632}
633
634config("neteq_config") {
635 include_dirs = [
636 # Need Opus header files for the audio classifier.
637 "//third_party/opus/src/celt",
638 "//third_party/opus/src/src",
639 ]
640}
641
642source_set("neteq") {
643 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000644 "neteq/interface/neteq.h",
645 "neteq/accelerate.cc",
646 "neteq/accelerate.h",
647 "neteq/audio_classifier.cc",
648 "neteq/audio_classifier.h",
649 "neteq/audio_decoder_impl.cc",
650 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000651 "neteq/audio_multi_vector.cc",
652 "neteq/audio_multi_vector.h",
653 "neteq/audio_vector.cc",
654 "neteq/audio_vector.h",
655 "neteq/background_noise.cc",
656 "neteq/background_noise.h",
657 "neteq/buffer_level_filter.cc",
658 "neteq/buffer_level_filter.h",
659 "neteq/comfort_noise.cc",
660 "neteq/comfort_noise.h",
661 "neteq/decision_logic.cc",
662 "neteq/decision_logic.h",
663 "neteq/decision_logic_fax.cc",
664 "neteq/decision_logic_fax.h",
665 "neteq/decision_logic_normal.cc",
666 "neteq/decision_logic_normal.h",
667 "neteq/decoder_database.cc",
668 "neteq/decoder_database.h",
669 "neteq/defines.h",
670 "neteq/delay_manager.cc",
671 "neteq/delay_manager.h",
672 "neteq/delay_peak_detector.cc",
673 "neteq/delay_peak_detector.h",
674 "neteq/dsp_helper.cc",
675 "neteq/dsp_helper.h",
676 "neteq/dtmf_buffer.cc",
677 "neteq/dtmf_buffer.h",
678 "neteq/dtmf_tone_generator.cc",
679 "neteq/dtmf_tone_generator.h",
680 "neteq/expand.cc",
681 "neteq/expand.h",
682 "neteq/merge.cc",
683 "neteq/merge.h",
684 "neteq/neteq_impl.cc",
685 "neteq/neteq_impl.h",
686 "neteq/neteq.cc",
687 "neteq/statistics_calculator.cc",
688 "neteq/statistics_calculator.h",
689 "neteq/normal.cc",
690 "neteq/normal.h",
691 "neteq/packet_buffer.cc",
692 "neteq/packet_buffer.h",
693 "neteq/payload_splitter.cc",
694 "neteq/payload_splitter.h",
695 "neteq/post_decode_vad.cc",
696 "neteq/post_decode_vad.h",
697 "neteq/preemptive_expand.cc",
698 "neteq/preemptive_expand.h",
699 "neteq/random_vector.cc",
700 "neteq/random_vector.h",
701 "neteq/rtcp.cc",
702 "neteq/rtcp.h",
703 "neteq/sync_buffer.cc",
704 "neteq/sync_buffer.h",
705 "neteq/timestamp_scaler.cc",
706 "neteq/timestamp_scaler.h",
707 "neteq/time_stretch.cc",
708 "neteq/time_stretch.h",
709 ]
710
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000711 configs += [ "../..:common_config" ]
712
713 public_configs = [
714 "../..:common_inherited_config",
715 ":neteq_config",
716 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000717
718 forward_dependent_configs_from = [ "//third_party/opus" ]
719
720 if (is_clang) {
721 # Suppress warnings from Chrome's Clang plugins.
722 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
723 configs -= [ "//build/config/clang:find_bad_constructs" ]
724 }
725
726 deps = [
kwiberg@webrtc.org00ba1a72014-12-03 14:23:23 +0000727 ":audio_decoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000728 ":cng",
729 ":g711",
730 ":g722",
731 ":ilbc",
732 ":isac",
733 ":isacfix",
734 ":pcm16b",
735 "../../common_audio",
736 "../../system_wrappers",
737 "//third_party/opus",
738 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000739}