blob: 0c087ecef3eaeca54e62a1553b5d97735025139f [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 = [
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000150 "codecs/g711/include/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000151 "codecs/g711/include/g711_interface.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000152 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000153 "codecs/g711/g711_interface.c",
154 "codecs/g711/g711.c",
155 "codecs/g711/g711.h",
156 ]
157
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000158 configs += [ "../..:common_config" ]
159
160 public_configs = [
161 "../..:common_inherited_config",
162 ":g711_config",
163 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000164}
165
166config("g722_config") {
167 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000168 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000169 "codecs/g722/include",
170 ]
171}
172
173source_set("g722") {
174 sources = [
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000175 "codecs/g722/audio_encoder_g722.cc",
176 "codecs/g722/include/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000177 "codecs/g722/include/g722_interface.h",
178 "codecs/g722/g722_interface.c",
179 "codecs/g722/g722_encode.c",
180 "codecs/g722/g722_decode.c",
181 "codecs/g722/g722_enc_dec.h",
182 ]
183
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000184 configs += [ "../..:common_config" ]
185
186 public_configs = [
187 "../..:common_inherited_config",
188 ":g722_config",
189 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000190}
191
192config("ilbc_config") {
193 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000194 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000195 "codecs/ilbc/interface",
196 ]
197}
198
199source_set("ilbc") {
200 sources = [
201 "codecs/ilbc/abs_quant.c",
202 "codecs/ilbc/abs_quant.h",
203 "codecs/ilbc/abs_quant_loop.c",
204 "codecs/ilbc/abs_quant_loop.h",
205 "codecs/ilbc/augmented_cb_corr.c",
206 "codecs/ilbc/augmented_cb_corr.h",
207 "codecs/ilbc/bw_expand.c",
208 "codecs/ilbc/bw_expand.h",
209 "codecs/ilbc/cb_construct.c",
210 "codecs/ilbc/cb_construct.h",
211 "codecs/ilbc/cb_mem_energy_augmentation.c",
212 "codecs/ilbc/cb_mem_energy_augmentation.h",
213 "codecs/ilbc/cb_mem_energy.c",
214 "codecs/ilbc/cb_mem_energy_calc.c",
215 "codecs/ilbc/cb_mem_energy_calc.h",
216 "codecs/ilbc/cb_mem_energy.h",
217 "codecs/ilbc/cb_search.c",
218 "codecs/ilbc/cb_search_core.c",
219 "codecs/ilbc/cb_search_core.h",
220 "codecs/ilbc/cb_search.h",
221 "codecs/ilbc/cb_update_best_index.c",
222 "codecs/ilbc/cb_update_best_index.h",
223 "codecs/ilbc/chebyshev.c",
224 "codecs/ilbc/chebyshev.h",
225 "codecs/ilbc/comp_corr.c",
226 "codecs/ilbc/comp_corr.h",
227 "codecs/ilbc/constants.c",
228 "codecs/ilbc/constants.h",
229 "codecs/ilbc/create_augmented_vec.c",
230 "codecs/ilbc/create_augmented_vec.h",
231 "codecs/ilbc/decode.c",
232 "codecs/ilbc/decode.h",
233 "codecs/ilbc/decode_residual.c",
234 "codecs/ilbc/decode_residual.h",
235 "codecs/ilbc/decoder_interpolate_lsf.c",
236 "codecs/ilbc/decoder_interpolate_lsf.h",
237 "codecs/ilbc/defines.h",
238 "codecs/ilbc/do_plc.c",
239 "codecs/ilbc/do_plc.h",
240 "codecs/ilbc/encode.c",
241 "codecs/ilbc/encode.h",
242 "codecs/ilbc/energy_inverse.c",
243 "codecs/ilbc/energy_inverse.h",
244 "codecs/ilbc/enhancer.c",
245 "codecs/ilbc/enhancer.h",
246 "codecs/ilbc/enhancer_interface.c",
247 "codecs/ilbc/enhancer_interface.h",
248 "codecs/ilbc/enh_upsample.c",
249 "codecs/ilbc/enh_upsample.h",
250 "codecs/ilbc/filtered_cb_vecs.c",
251 "codecs/ilbc/filtered_cb_vecs.h",
252 "codecs/ilbc/frame_classify.c",
253 "codecs/ilbc/frame_classify.h",
254 "codecs/ilbc/gain_dequant.c",
255 "codecs/ilbc/gain_dequant.h",
256 "codecs/ilbc/gain_quant.c",
257 "codecs/ilbc/gain_quant.h",
258 "codecs/ilbc/get_cd_vec.c",
259 "codecs/ilbc/get_cd_vec.h",
260 "codecs/ilbc/get_lsp_poly.c",
261 "codecs/ilbc/get_lsp_poly.h",
262 "codecs/ilbc/get_sync_seq.c",
263 "codecs/ilbc/get_sync_seq.h",
264 "codecs/ilbc/hp_input.c",
265 "codecs/ilbc/hp_input.h",
266 "codecs/ilbc/hp_output.c",
267 "codecs/ilbc/hp_output.h",
268 "codecs/ilbc/ilbc.c",
269 "codecs/ilbc/index_conv_dec.c",
270 "codecs/ilbc/index_conv_dec.h",
271 "codecs/ilbc/index_conv_enc.c",
272 "codecs/ilbc/index_conv_enc.h",
273 "codecs/ilbc/init_decode.c",
274 "codecs/ilbc/init_decode.h",
275 "codecs/ilbc/init_encode.c",
276 "codecs/ilbc/init_encode.h",
277 "codecs/ilbc/interface/ilbc.h",
278 "codecs/ilbc/interpolate.c",
279 "codecs/ilbc/interpolate.h",
280 "codecs/ilbc/interpolate_samples.c",
281 "codecs/ilbc/interpolate_samples.h",
282 "codecs/ilbc/lpc_encode.c",
283 "codecs/ilbc/lpc_encode.h",
284 "codecs/ilbc/lsf_check.c",
285 "codecs/ilbc/lsf_check.h",
286 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
287 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
288 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
289 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
290 "codecs/ilbc/lsf_to_lsp.c",
291 "codecs/ilbc/lsf_to_lsp.h",
292 "codecs/ilbc/lsf_to_poly.c",
293 "codecs/ilbc/lsf_to_poly.h",
294 "codecs/ilbc/lsp_to_lsf.c",
295 "codecs/ilbc/lsp_to_lsf.h",
296 "codecs/ilbc/my_corr.c",
297 "codecs/ilbc/my_corr.h",
298 "codecs/ilbc/nearest_neighbor.c",
299 "codecs/ilbc/nearest_neighbor.h",
300 "codecs/ilbc/pack_bits.c",
301 "codecs/ilbc/pack_bits.h",
302 "codecs/ilbc/poly_to_lsf.c",
303 "codecs/ilbc/poly_to_lsf.h",
304 "codecs/ilbc/poly_to_lsp.c",
305 "codecs/ilbc/poly_to_lsp.h",
306 "codecs/ilbc/refiner.c",
307 "codecs/ilbc/refiner.h",
308 "codecs/ilbc/simple_interpolate_lsf.c",
309 "codecs/ilbc/simple_interpolate_lsf.h",
310 "codecs/ilbc/simple_lpc_analysis.c",
311 "codecs/ilbc/simple_lpc_analysis.h",
312 "codecs/ilbc/simple_lsf_dequant.c",
313 "codecs/ilbc/simple_lsf_dequant.h",
314 "codecs/ilbc/simple_lsf_quant.c",
315 "codecs/ilbc/simple_lsf_quant.h",
316 "codecs/ilbc/smooth.c",
317 "codecs/ilbc/smooth.h",
318 "codecs/ilbc/smooth_out_data.c",
319 "codecs/ilbc/smooth_out_data.h",
320 "codecs/ilbc/sort_sq.c",
321 "codecs/ilbc/sort_sq.h",
322 "codecs/ilbc/split_vq.c",
323 "codecs/ilbc/split_vq.h",
324 "codecs/ilbc/state_construct.c",
325 "codecs/ilbc/state_construct.h",
326 "codecs/ilbc/state_search.c",
327 "codecs/ilbc/state_search.h",
328 "codecs/ilbc/swap_bytes.c",
329 "codecs/ilbc/swap_bytes.h",
330 "codecs/ilbc/unpack_bits.c",
331 "codecs/ilbc/unpack_bits.h",
332 "codecs/ilbc/vq3.c",
333 "codecs/ilbc/vq3.h",
334 "codecs/ilbc/vq4.c",
335 "codecs/ilbc/vq4.h",
336 "codecs/ilbc/window32_w32.c",
337 "codecs/ilbc/window32_w32.h",
338 "codecs/ilbc/xcorr_coef.c",
339 "codecs/ilbc/xcorr_coef.h",
340 ]
341
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000342 configs += [ "../..:common_config" ]
343
344 public_configs = [
345 "../..:common_inherited_config",
346 ":ilbc_config",
347 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000348
349 deps = [ "../../common_audio" ]
350}
351
352config("isac_config") {
353 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000354 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000355 "codecs/isac/main/interface",
356 ]
357}
358
359source_set("isac") {
360 sources = [
361 "codecs/isac/main/interface/isac.h",
362 "codecs/isac/main/source/arith_routines.c",
363 "codecs/isac/main/source/arith_routines.h",
364 "codecs/isac/main/source/arith_routines_hist.c",
365 "codecs/isac/main/source/arith_routines_logist.c",
366 "codecs/isac/main/source/bandwidth_estimator.c",
367 "codecs/isac/main/source/bandwidth_estimator.h",
368 "codecs/isac/main/source/codec.h",
369 "codecs/isac/main/source/crc.c",
370 "codecs/isac/main/source/crc.h",
371 "codecs/isac/main/source/decode_bwe.c",
372 "codecs/isac/main/source/decode.c",
373 "codecs/isac/main/source/encode.c",
374 "codecs/isac/main/source/encode_lpc_swb.c",
375 "codecs/isac/main/source/encode_lpc_swb.h",
376 "codecs/isac/main/source/entropy_coding.c",
377 "codecs/isac/main/source/entropy_coding.h",
378 "codecs/isac/main/source/fft.c",
379 "codecs/isac/main/source/fft.h",
380 "codecs/isac/main/source/filterbanks.c",
381 "codecs/isac/main/source/filterbank_tables.c",
382 "codecs/isac/main/source/filterbank_tables.h",
383 "codecs/isac/main/source/filter_functions.c",
384 "codecs/isac/main/source/intialize.c",
385 "codecs/isac/main/source/isac.c",
386 "codecs/isac/main/source/lattice.c",
387 "codecs/isac/main/source/lpc_analysis.c",
388 "codecs/isac/main/source/lpc_analysis.h",
389 "codecs/isac/main/source/lpc_gain_swb_tables.c",
390 "codecs/isac/main/source/lpc_gain_swb_tables.h",
391 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
392 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
393 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
394 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
395 "codecs/isac/main/source/lpc_tables.c",
396 "codecs/isac/main/source/lpc_tables.h",
397 "codecs/isac/main/source/os_specific_inline.h",
398 "codecs/isac/main/source/pitch_estimator.c",
399 "codecs/isac/main/source/pitch_estimator.h",
400 "codecs/isac/main/source/pitch_filter.c",
401 "codecs/isac/main/source/pitch_gain_tables.c",
402 "codecs/isac/main/source/pitch_gain_tables.h",
403 "codecs/isac/main/source/pitch_lag_tables.c",
404 "codecs/isac/main/source/pitch_lag_tables.h",
405 "codecs/isac/main/source/settings.h",
406 "codecs/isac/main/source/spectrum_ar_model_tables.c",
407 "codecs/isac/main/source/spectrum_ar_model_tables.h",
408 "codecs/isac/main/source/structs.h",
409 "codecs/isac/main/source/transform.c",
410 ]
411
412 if (is_linux) {
413 libs = [ "m" ]
414 }
415
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000416 configs += [ "../..:common_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000417
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000418 public_configs = [
419 "../..:common_inherited_config",
420 ":isac_config",
421 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000422
423 deps = [ "../../common_audio" ]
424}
425
426config("isac_fix_config") {
427 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000428 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000429 "codecs/isac/fix/interface",
430 ]
431}
432
433source_set("isacfix") {
434 sources = [
435 "codecs/isac/fix/interface/isacfix.h",
436 "codecs/isac/fix/source/arith_routines.c",
437 "codecs/isac/fix/source/arith_routines_hist.c",
438 "codecs/isac/fix/source/arith_routines_logist.c",
439 "codecs/isac/fix/source/arith_routins.h",
440 "codecs/isac/fix/source/bandwidth_estimator.c",
441 "codecs/isac/fix/source/bandwidth_estimator.h",
442 "codecs/isac/fix/source/codec.h",
443 "codecs/isac/fix/source/decode_bwe.c",
444 "codecs/isac/fix/source/decode.c",
445 "codecs/isac/fix/source/decode_plc.c",
446 "codecs/isac/fix/source/encode.c",
447 "codecs/isac/fix/source/entropy_coding.c",
448 "codecs/isac/fix/source/entropy_coding.h",
449 "codecs/isac/fix/source/fft.c",
450 "codecs/isac/fix/source/fft.h",
451 "codecs/isac/fix/source/filterbanks.c",
452 "codecs/isac/fix/source/filterbank_tables.c",
453 "codecs/isac/fix/source/filterbank_tables.h",
454 "codecs/isac/fix/source/filters.c",
455 "codecs/isac/fix/source/initialize.c",
456 "codecs/isac/fix/source/isacfix.c",
457 "codecs/isac/fix/source/lattice.c",
458 "codecs/isac/fix/source/lpc_masking_model.c",
459 "codecs/isac/fix/source/lpc_masking_model.h",
460 "codecs/isac/fix/source/lpc_tables.c",
461 "codecs/isac/fix/source/lpc_tables.h",
462 "codecs/isac/fix/source/pitch_estimator.c",
463 "codecs/isac/fix/source/pitch_estimator.h",
464 "codecs/isac/fix/source/pitch_filter.c",
465 "codecs/isac/fix/source/pitch_gain_tables.c",
466 "codecs/isac/fix/source/pitch_gain_tables.h",
467 "codecs/isac/fix/source/pitch_lag_tables.c",
468 "codecs/isac/fix/source/pitch_lag_tables.h",
469 "codecs/isac/fix/source/settings.h",
470 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
471 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
472 "codecs/isac/fix/source/structs.h",
473 "codecs/isac/fix/source/transform.c",
474 "codecs/isac/fix/source/transform_tables.c",
475 ]
476
477 if (!is_win) {
478 defines = [ "WEBRTC_LINUX" ]
479 }
480
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000481 configs += [ "../..:common_config" ]
482
483 public_configs = [
484 "../..:common_inherited_config",
485 ":isac_fix_config",
486 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000487
488 deps = [
489 "../../common_audio",
490 "../../system_wrappers",
491 ]
492
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000493 if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000494 deps += [ ":isac_neon" ]
495
496 # Enable compilation for the ARM v7 Neon instruction set. This is needed
497 # since //build/config/arm.gni only enables Neon for iOS, not Android.
498 # This provides the same functionality as webrtc/build/arm_neon.gypi.
499 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
500 # //build/config/arm.gni instead, to reduce code duplication.
501 # Remove the -mfpu=vfpv3-d16 cflag.
502 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
503 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000504 "-mfpu=neon",
505 ]
506
507 sources += [
508 "codecs/isac/fix/source/lattice_armv7.S",
509 "codecs/isac/fix/source/pitch_filter_armv6.S",
510 ]
511 } else {
512 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
513 }
514
515 if (cpu_arch == "mipsel") {
516 sources += [
517 "codecs/isac/fix/source/entropy_coding_mips.c",
518 "codecs/isac/fix/source/filters_mips.c",
519 "codecs/isac/fix/source/lattice_mips.c",
520 "codecs/isac/fix/source/pitch_estimator_mips.c",
521 "codecs/isac/fix/source/transform_mips.c",
522 ]
523 if (mips_dsp_rev > 0) {
524 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
525 }
526 if (mips_dsp_rev > 1) {
527 sources += [
528 "codecs/isac/fix/source/lpc_masking_model_mips.c",
529 "codecs/isac/fix/source/pitch_filter_mips.c",
530 ]
531 } else {
532 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
533 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000534 } else {
535 sources += [ "codecs/isac/fix/source/pitch_estimator_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000536 }
537
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000538 if (!rtc_build_armv7_neon && cpu_arch != "mipsel") {
539 sources += [ "codecs/isac/fix/source/lattice_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000540 }
541}
542
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000543if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000544 source_set("isac_neon") {
545 sources = [
546 "codecs/isac/fix/source/entropy_coding_neon.c",
547 "codecs/isac/fix/source/filterbanks_neon.S",
548 "codecs/isac/fix/source/filters_neon.S",
549 "codecs/isac/fix/source/lattice_neon.S",
550 "codecs/isac/fix/source/lpc_masking_model_neon.S",
551 "codecs/isac/fix/source/transform_neon.S",
552 ]
553
554 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000555 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000556 ]
557
558 # Disable LTO in audio_processing_neon target due to compiler bug.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000559 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000560 cflags -= [
561 "-flto",
562 "-ffat-lto-objects",
563 ]
564 }
565
566 # Enable compilation for the ARM v7 Neon instruction set. This is needed
567 # since //build/config/arm.gni only enables Neon for iOS, not Android.
568 # This provides the same functionality as webrtc/build/arm_neon.gypi.
569 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
570 # //build/config/arm.gni instead, to reduce code duplication.
571 # Remove the -mfpu=vfpv3-d16 cflag.
572 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
573 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000574 "-mfpu=neon",
575 ]
576
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000577 configs += [ "../..:common_config" ]
578 public_configs = [ "../..:common_inherited_config" ]
579
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000580 deps = [ "../../common_audio" ]
581 }
582}
583
584config("pcm16b_config") {
585 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000586 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000587 "codecs/pcm16b/include",
588 ]
589}
590
591source_set("pcm16b") {
592 sources = [
593 "codecs/pcm16b/include/pcm16b.h",
594 "codecs/pcm16b/pcm16b.c",
595 ]
596
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000597 configs += [ "../..:common_config" ]
598
599 public_configs = [
600 "../..:common_inherited_config",
601 ":pcm16b_config",
602 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000603}
604
605config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000606 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000607}
608
609source_set("webrtc_opus") {
610 sources = [
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000611 "codecs/opus/audio_encoder_opus.cc",
612 "codecs/opus/interface/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000613 "codecs/opus/interface/opus_interface.h",
614 "codecs/opus/opus_inst.h",
615 "codecs/opus/opus_interface.c",
616 ]
617 if (build_with_mozilla) {
618 include_dirs = [ getenv("DIST") + "/include/opus" ]
619 } else {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000620 configs += [ "../..:common_config" ]
621 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000622
623 deps = [ "//third_party/opus" ]
624 }
625}
626
627config("neteq_config") {
628 include_dirs = [
629 # Need Opus header files for the audio classifier.
630 "//third_party/opus/src/celt",
631 "//third_party/opus/src/src",
632 ]
633}
634
635source_set("neteq") {
636 sources = [
kwiberg@webrtc.org3800e132014-12-03 16:28:17 +0000637 "neteq/interface/audio_decoder.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000638 "neteq/interface/neteq.h",
639 "neteq/accelerate.cc",
640 "neteq/accelerate.h",
641 "neteq/audio_classifier.cc",
642 "neteq/audio_classifier.h",
643 "neteq/audio_decoder_impl.cc",
644 "neteq/audio_decoder_impl.h",
kwiberg@webrtc.org3800e132014-12-03 16:28:17 +0000645 "neteq/audio_decoder.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000646 "neteq/audio_multi_vector.cc",
647 "neteq/audio_multi_vector.h",
648 "neteq/audio_vector.cc",
649 "neteq/audio_vector.h",
650 "neteq/background_noise.cc",
651 "neteq/background_noise.h",
652 "neteq/buffer_level_filter.cc",
653 "neteq/buffer_level_filter.h",
654 "neteq/comfort_noise.cc",
655 "neteq/comfort_noise.h",
656 "neteq/decision_logic.cc",
657 "neteq/decision_logic.h",
658 "neteq/decision_logic_fax.cc",
659 "neteq/decision_logic_fax.h",
660 "neteq/decision_logic_normal.cc",
661 "neteq/decision_logic_normal.h",
662 "neteq/decoder_database.cc",
663 "neteq/decoder_database.h",
664 "neteq/defines.h",
665 "neteq/delay_manager.cc",
666 "neteq/delay_manager.h",
667 "neteq/delay_peak_detector.cc",
668 "neteq/delay_peak_detector.h",
669 "neteq/dsp_helper.cc",
670 "neteq/dsp_helper.h",
671 "neteq/dtmf_buffer.cc",
672 "neteq/dtmf_buffer.h",
673 "neteq/dtmf_tone_generator.cc",
674 "neteq/dtmf_tone_generator.h",
675 "neteq/expand.cc",
676 "neteq/expand.h",
677 "neteq/merge.cc",
678 "neteq/merge.h",
679 "neteq/neteq_impl.cc",
680 "neteq/neteq_impl.h",
681 "neteq/neteq.cc",
682 "neteq/statistics_calculator.cc",
683 "neteq/statistics_calculator.h",
684 "neteq/normal.cc",
685 "neteq/normal.h",
686 "neteq/packet_buffer.cc",
687 "neteq/packet_buffer.h",
688 "neteq/payload_splitter.cc",
689 "neteq/payload_splitter.h",
690 "neteq/post_decode_vad.cc",
691 "neteq/post_decode_vad.h",
692 "neteq/preemptive_expand.cc",
693 "neteq/preemptive_expand.h",
694 "neteq/random_vector.cc",
695 "neteq/random_vector.h",
696 "neteq/rtcp.cc",
697 "neteq/rtcp.h",
698 "neteq/sync_buffer.cc",
699 "neteq/sync_buffer.h",
700 "neteq/timestamp_scaler.cc",
701 "neteq/timestamp_scaler.h",
702 "neteq/time_stretch.cc",
703 "neteq/time_stretch.h",
704 ]
705
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000706 configs += [ "../..:common_config" ]
707
708 public_configs = [
709 "../..:common_inherited_config",
710 ":neteq_config",
711 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000712
713 forward_dependent_configs_from = [ "//third_party/opus" ]
714
715 if (is_clang) {
716 # Suppress warnings from Chrome's Clang plugins.
717 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
718 configs -= [ "//build/config/clang:find_bad_constructs" ]
719 }
720
721 deps = [
722 ":cng",
723 ":g711",
724 ":g722",
725 ":ilbc",
726 ":isac",
727 ":isacfix",
728 ":pcm16b",
729 "../../common_audio",
730 "../../system_wrappers",
731 "//third_party/opus",
732 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000733}