blob: 994ff32afd63c31c97e0ccde65491838a7f66d64 [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",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000025 "main/acm2/acm_cng.cc",
26 "main/acm2/acm_cng.h",
27 "main/acm2/acm_codec_database.cc",
28 "main/acm2/acm_codec_database.h",
29 "main/acm2/acm_common_defs.h",
30 "main/acm2/acm_dtmf_playout.cc",
31 "main/acm2/acm_dtmf_playout.h",
32 "main/acm2/acm_g722.cc",
33 "main/acm2/acm_g722.h",
34 "main/acm2/acm_g7221.cc",
35 "main/acm2/acm_g7221.h",
36 "main/acm2/acm_g7221c.cc",
37 "main/acm2/acm_g7221c.h",
38 "main/acm2/acm_g729.cc",
39 "main/acm2/acm_g729.h",
40 "main/acm2/acm_g7291.cc",
41 "main/acm2/acm_g7291.h",
42 "main/acm2/acm_generic_codec.cc",
43 "main/acm2/acm_generic_codec.h",
44 "main/acm2/acm_gsmfr.cc",
45 "main/acm2/acm_gsmfr.h",
46 "main/acm2/acm_ilbc.cc",
47 "main/acm2/acm_ilbc.h",
48 "main/acm2/acm_isac.cc",
49 "main/acm2/acm_isac.h",
50 "main/acm2/acm_isac_macros.h",
51 "main/acm2/acm_opus.cc",
52 "main/acm2/acm_opus.h",
53 "main/acm2/acm_speex.cc",
54 "main/acm2/acm_speex.h",
55 "main/acm2/acm_pcm16b.cc",
56 "main/acm2/acm_pcm16b.h",
57 "main/acm2/acm_pcma.cc",
58 "main/acm2/acm_pcma.h",
59 "main/acm2/acm_pcmu.cc",
60 "main/acm2/acm_pcmu.h",
61 "main/acm2/acm_red.cc",
62 "main/acm2/acm_red.h",
63 "main/acm2/acm_receiver.cc",
64 "main/acm2/acm_receiver.h",
65 "main/acm2/acm_resampler.cc",
66 "main/acm2/acm_resampler.h",
67 "main/acm2/audio_coding_module.cc",
68 "main/acm2/audio_coding_module_impl.cc",
69 "main/acm2/audio_coding_module_impl.h",
70 "main/acm2/call_statistics.cc",
71 "main/acm2/call_statistics.h",
72 "main/acm2/initial_delay_manager.cc",
73 "main/acm2/initial_delay_manager.h",
74 "main/acm2/nack.cc",
75 "main/acm2/nack.h",
76 "main/interface/audio_coding_module.h",
77 "main/interface/audio_coding_module_typedefs.h",
78 ]
79
80 defines = []
81
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000082 configs += [ "../..:common_config" ]
83
84 public_configs = [
85 "../..:common_inherited_config",
86 ":audio_coding_config",
87 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000088
89 if (is_clang) {
90 # Suppress warnings from Chrome's Clang plugins.
91 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
92 configs -= [ "//build/config/clang:find_bad_constructs" ]
93 }
94
95 deps = [
96 ":cng",
97 ":g711",
98 ":g722",
99 ":ilbc",
100 ":isac",
101 ":isacfix",
102 ":neteq",
103 ":pcm16b",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000104 ":red",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105 "../../common_audio",
106 "../../system_wrappers",
107 ]
108
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000109 if (rtc_include_opus) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000110 defines += [ "WEBRTC_CODEC_OPUS" ]
111 deps += [ ":webrtc_opus" ]
112 }
113}
114
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000115source_set("audio_decoder_interface") {
116 sources = [
117 "codecs/audio_decoder.cc",
118 "codecs/audio_decoder.h",
119 ]
120 configs += [ "../..:common_config" ]
121 public_configs = [ "../..:common_inherited_config" ]
122}
123
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000124source_set("audio_encoder_interface") {
125 sources = [
126 "codecs/audio_encoder.cc",
127 "codecs/audio_encoder.h",
128 ]
129 configs += [ "../..:common_config" ]
130 public_configs = [ "../..:common_inherited_config" ]
131}
132
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000133config("cng_config") {
134 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000135 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000136 "codecs/cng/include",
137 ]
138}
139
140source_set("cng") {
141 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000142 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000143 "codecs/cng/cng_helpfuns.c",
144 "codecs/cng/cng_helpfuns.h",
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000145 "codecs/cng/include/audio_encoder_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000146 "codecs/cng/include/webrtc_cng.h",
147 "codecs/cng/webrtc_cng.c",
148 ]
149
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000150 configs += [ "../..:common_config" ]
151
152 public_configs = [
153 "../..:common_inherited_config",
154 ":cng_config",
155 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000156
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000157 deps = [
158 "../../common_audio",
159 ":audio_encoder_interface",
160 ]
161}
162
163config("red_config") {
164 include_dirs = [
165 "codecs/red",
166 ]
167}
168
169source_set("red") {
170 sources = [
171 "codecs/red/audio_encoder_copy_red.cc",
172 "codecs/red/audio_encoder_copy_red.h",
173 ]
174
175 configs += [ "../..:common_config" ]
176
177 public_configs = [
178 "../..:common_inherited_config",
179 ":red_config",
180 ]
181
182 deps = [
183 "../../common_audio",
184 ":audio_encoder_interface",
185 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000186}
187
188config("g711_config") {
189 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000190 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000191 "codecs/g711/include",
192 ]
193}
194
195source_set("g711") {
196 sources = [
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000197 "codecs/g711/include/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000198 "codecs/g711/include/g711_interface.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000199 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000200 "codecs/g711/g711_interface.c",
201 "codecs/g711/g711.c",
202 "codecs/g711/g711.h",
203 ]
204
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000205 configs += [ "../..:common_config" ]
206
207 public_configs = [
208 "../..:common_inherited_config",
209 ":g711_config",
210 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000211
212 deps = [ ":audio_encoder_interface" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000213}
214
215config("g722_config") {
216 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000217 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000218 "codecs/g722/include",
219 ]
220}
221
222source_set("g722") {
223 sources = [
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000224 "codecs/g722/audio_encoder_g722.cc",
225 "codecs/g722/include/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000226 "codecs/g722/include/g722_interface.h",
227 "codecs/g722/g722_interface.c",
228 "codecs/g722/g722_encode.c",
229 "codecs/g722/g722_decode.c",
230 "codecs/g722/g722_enc_dec.h",
231 ]
232
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000233 configs += [ "../..:common_config" ]
234
235 public_configs = [
236 "../..:common_inherited_config",
237 ":g722_config",
238 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000239
240 deps = [ ":audio_encoder_interface" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000241}
242
243config("ilbc_config") {
244 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000245 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000246 "codecs/ilbc/interface",
247 ]
248}
249
250source_set("ilbc") {
251 sources = [
kwiberg@webrtc.orgcb858ba2014-12-08 17:11:44 +0000252 "codecs/ilbc/audio_encoder_ilbc.cc",
253 "codecs/ilbc/include/audio_encoder_ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000254 "codecs/ilbc/abs_quant.c",
255 "codecs/ilbc/abs_quant.h",
256 "codecs/ilbc/abs_quant_loop.c",
257 "codecs/ilbc/abs_quant_loop.h",
258 "codecs/ilbc/augmented_cb_corr.c",
259 "codecs/ilbc/augmented_cb_corr.h",
260 "codecs/ilbc/bw_expand.c",
261 "codecs/ilbc/bw_expand.h",
262 "codecs/ilbc/cb_construct.c",
263 "codecs/ilbc/cb_construct.h",
264 "codecs/ilbc/cb_mem_energy_augmentation.c",
265 "codecs/ilbc/cb_mem_energy_augmentation.h",
266 "codecs/ilbc/cb_mem_energy.c",
267 "codecs/ilbc/cb_mem_energy_calc.c",
268 "codecs/ilbc/cb_mem_energy_calc.h",
269 "codecs/ilbc/cb_mem_energy.h",
270 "codecs/ilbc/cb_search.c",
271 "codecs/ilbc/cb_search_core.c",
272 "codecs/ilbc/cb_search_core.h",
273 "codecs/ilbc/cb_search.h",
274 "codecs/ilbc/cb_update_best_index.c",
275 "codecs/ilbc/cb_update_best_index.h",
276 "codecs/ilbc/chebyshev.c",
277 "codecs/ilbc/chebyshev.h",
278 "codecs/ilbc/comp_corr.c",
279 "codecs/ilbc/comp_corr.h",
280 "codecs/ilbc/constants.c",
281 "codecs/ilbc/constants.h",
282 "codecs/ilbc/create_augmented_vec.c",
283 "codecs/ilbc/create_augmented_vec.h",
284 "codecs/ilbc/decode.c",
285 "codecs/ilbc/decode.h",
286 "codecs/ilbc/decode_residual.c",
287 "codecs/ilbc/decode_residual.h",
288 "codecs/ilbc/decoder_interpolate_lsf.c",
289 "codecs/ilbc/decoder_interpolate_lsf.h",
290 "codecs/ilbc/defines.h",
291 "codecs/ilbc/do_plc.c",
292 "codecs/ilbc/do_plc.h",
293 "codecs/ilbc/encode.c",
294 "codecs/ilbc/encode.h",
295 "codecs/ilbc/energy_inverse.c",
296 "codecs/ilbc/energy_inverse.h",
297 "codecs/ilbc/enhancer.c",
298 "codecs/ilbc/enhancer.h",
299 "codecs/ilbc/enhancer_interface.c",
300 "codecs/ilbc/enhancer_interface.h",
301 "codecs/ilbc/enh_upsample.c",
302 "codecs/ilbc/enh_upsample.h",
303 "codecs/ilbc/filtered_cb_vecs.c",
304 "codecs/ilbc/filtered_cb_vecs.h",
305 "codecs/ilbc/frame_classify.c",
306 "codecs/ilbc/frame_classify.h",
307 "codecs/ilbc/gain_dequant.c",
308 "codecs/ilbc/gain_dequant.h",
309 "codecs/ilbc/gain_quant.c",
310 "codecs/ilbc/gain_quant.h",
311 "codecs/ilbc/get_cd_vec.c",
312 "codecs/ilbc/get_cd_vec.h",
313 "codecs/ilbc/get_lsp_poly.c",
314 "codecs/ilbc/get_lsp_poly.h",
315 "codecs/ilbc/get_sync_seq.c",
316 "codecs/ilbc/get_sync_seq.h",
317 "codecs/ilbc/hp_input.c",
318 "codecs/ilbc/hp_input.h",
319 "codecs/ilbc/hp_output.c",
320 "codecs/ilbc/hp_output.h",
321 "codecs/ilbc/ilbc.c",
322 "codecs/ilbc/index_conv_dec.c",
323 "codecs/ilbc/index_conv_dec.h",
324 "codecs/ilbc/index_conv_enc.c",
325 "codecs/ilbc/index_conv_enc.h",
326 "codecs/ilbc/init_decode.c",
327 "codecs/ilbc/init_decode.h",
328 "codecs/ilbc/init_encode.c",
329 "codecs/ilbc/init_encode.h",
330 "codecs/ilbc/interface/ilbc.h",
331 "codecs/ilbc/interpolate.c",
332 "codecs/ilbc/interpolate.h",
333 "codecs/ilbc/interpolate_samples.c",
334 "codecs/ilbc/interpolate_samples.h",
335 "codecs/ilbc/lpc_encode.c",
336 "codecs/ilbc/lpc_encode.h",
337 "codecs/ilbc/lsf_check.c",
338 "codecs/ilbc/lsf_check.h",
339 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
340 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
341 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
342 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
343 "codecs/ilbc/lsf_to_lsp.c",
344 "codecs/ilbc/lsf_to_lsp.h",
345 "codecs/ilbc/lsf_to_poly.c",
346 "codecs/ilbc/lsf_to_poly.h",
347 "codecs/ilbc/lsp_to_lsf.c",
348 "codecs/ilbc/lsp_to_lsf.h",
349 "codecs/ilbc/my_corr.c",
350 "codecs/ilbc/my_corr.h",
351 "codecs/ilbc/nearest_neighbor.c",
352 "codecs/ilbc/nearest_neighbor.h",
353 "codecs/ilbc/pack_bits.c",
354 "codecs/ilbc/pack_bits.h",
355 "codecs/ilbc/poly_to_lsf.c",
356 "codecs/ilbc/poly_to_lsf.h",
357 "codecs/ilbc/poly_to_lsp.c",
358 "codecs/ilbc/poly_to_lsp.h",
359 "codecs/ilbc/refiner.c",
360 "codecs/ilbc/refiner.h",
361 "codecs/ilbc/simple_interpolate_lsf.c",
362 "codecs/ilbc/simple_interpolate_lsf.h",
363 "codecs/ilbc/simple_lpc_analysis.c",
364 "codecs/ilbc/simple_lpc_analysis.h",
365 "codecs/ilbc/simple_lsf_dequant.c",
366 "codecs/ilbc/simple_lsf_dequant.h",
367 "codecs/ilbc/simple_lsf_quant.c",
368 "codecs/ilbc/simple_lsf_quant.h",
369 "codecs/ilbc/smooth.c",
370 "codecs/ilbc/smooth.h",
371 "codecs/ilbc/smooth_out_data.c",
372 "codecs/ilbc/smooth_out_data.h",
373 "codecs/ilbc/sort_sq.c",
374 "codecs/ilbc/sort_sq.h",
375 "codecs/ilbc/split_vq.c",
376 "codecs/ilbc/split_vq.h",
377 "codecs/ilbc/state_construct.c",
378 "codecs/ilbc/state_construct.h",
379 "codecs/ilbc/state_search.c",
380 "codecs/ilbc/state_search.h",
381 "codecs/ilbc/swap_bytes.c",
382 "codecs/ilbc/swap_bytes.h",
383 "codecs/ilbc/unpack_bits.c",
384 "codecs/ilbc/unpack_bits.h",
385 "codecs/ilbc/vq3.c",
386 "codecs/ilbc/vq3.h",
387 "codecs/ilbc/vq4.c",
388 "codecs/ilbc/vq4.h",
389 "codecs/ilbc/window32_w32.c",
390 "codecs/ilbc/window32_w32.h",
391 "codecs/ilbc/xcorr_coef.c",
392 "codecs/ilbc/xcorr_coef.h",
393 ]
394
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000395 configs += [ "../..:common_config" ]
396
397 public_configs = [
398 "../..:common_inherited_config",
399 ":ilbc_config",
400 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000401
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000402 deps = [
403 "../../common_audio",
404 ":audio_encoder_interface",
405 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000406}
407
408config("isac_config") {
409 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000410 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000411 "codecs/isac/main/interface",
412 ]
413}
414
415source_set("isac") {
416 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000417 "codecs/isac/audio_encoder_isac_t.h",
418 "codecs/isac/audio_encoder_isac_t_impl.h",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000419 "codecs/isac/main/interface/audio_encoder_isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000420 "codecs/isac/main/interface/isac.h",
421 "codecs/isac/main/source/arith_routines.c",
422 "codecs/isac/main/source/arith_routines.h",
423 "codecs/isac/main/source/arith_routines_hist.c",
424 "codecs/isac/main/source/arith_routines_logist.c",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000425 "codecs/isac/main/source/audio_encoder_isac.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000426 "codecs/isac/main/source/bandwidth_estimator.c",
427 "codecs/isac/main/source/bandwidth_estimator.h",
428 "codecs/isac/main/source/codec.h",
429 "codecs/isac/main/source/crc.c",
430 "codecs/isac/main/source/crc.h",
431 "codecs/isac/main/source/decode_bwe.c",
432 "codecs/isac/main/source/decode.c",
433 "codecs/isac/main/source/encode.c",
434 "codecs/isac/main/source/encode_lpc_swb.c",
435 "codecs/isac/main/source/encode_lpc_swb.h",
436 "codecs/isac/main/source/entropy_coding.c",
437 "codecs/isac/main/source/entropy_coding.h",
438 "codecs/isac/main/source/fft.c",
439 "codecs/isac/main/source/fft.h",
440 "codecs/isac/main/source/filterbanks.c",
441 "codecs/isac/main/source/filterbank_tables.c",
442 "codecs/isac/main/source/filterbank_tables.h",
443 "codecs/isac/main/source/filter_functions.c",
444 "codecs/isac/main/source/intialize.c",
445 "codecs/isac/main/source/isac.c",
446 "codecs/isac/main/source/lattice.c",
447 "codecs/isac/main/source/lpc_analysis.c",
448 "codecs/isac/main/source/lpc_analysis.h",
449 "codecs/isac/main/source/lpc_gain_swb_tables.c",
450 "codecs/isac/main/source/lpc_gain_swb_tables.h",
451 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
452 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
453 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
454 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
455 "codecs/isac/main/source/lpc_tables.c",
456 "codecs/isac/main/source/lpc_tables.h",
457 "codecs/isac/main/source/os_specific_inline.h",
458 "codecs/isac/main/source/pitch_estimator.c",
459 "codecs/isac/main/source/pitch_estimator.h",
460 "codecs/isac/main/source/pitch_filter.c",
461 "codecs/isac/main/source/pitch_gain_tables.c",
462 "codecs/isac/main/source/pitch_gain_tables.h",
463 "codecs/isac/main/source/pitch_lag_tables.c",
464 "codecs/isac/main/source/pitch_lag_tables.h",
465 "codecs/isac/main/source/settings.h",
466 "codecs/isac/main/source/spectrum_ar_model_tables.c",
467 "codecs/isac/main/source/spectrum_ar_model_tables.h",
468 "codecs/isac/main/source/structs.h",
469 "codecs/isac/main/source/transform.c",
470 ]
471
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000472 if (is_clang) {
473 # Suppress warnings from Chrome's Clang plugins.
474 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
475 configs -= [ "//build/config/clang:find_bad_constructs" ]
476 }
477
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000478 if (is_linux) {
479 libs = [ "m" ]
480 }
481
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000482 configs += [ "../..:common_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000483
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000484 public_configs = [
485 "../..:common_inherited_config",
486 ":isac_config",
487 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000488
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000489 deps = [
490 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000491 ":audio_encoder_interface",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000492 "../../common_audio",
493 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000494}
495
496config("isac_fix_config") {
497 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000498 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000499 "codecs/isac/fix/interface",
500 ]
501}
502
503source_set("isacfix") {
504 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000505 "codecs/isac/audio_encoder_isac_t.h",
506 "codecs/isac/audio_encoder_isac_t_impl.h",
507 "codecs/isac/fix/interface/audio_encoder_isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000508 "codecs/isac/fix/interface/isacfix.h",
509 "codecs/isac/fix/source/arith_routines.c",
510 "codecs/isac/fix/source/arith_routines_hist.c",
511 "codecs/isac/fix/source/arith_routines_logist.c",
512 "codecs/isac/fix/source/arith_routins.h",
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000513 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000514 "codecs/isac/fix/source/bandwidth_estimator.c",
515 "codecs/isac/fix/source/bandwidth_estimator.h",
516 "codecs/isac/fix/source/codec.h",
517 "codecs/isac/fix/source/decode_bwe.c",
518 "codecs/isac/fix/source/decode.c",
519 "codecs/isac/fix/source/decode_plc.c",
520 "codecs/isac/fix/source/encode.c",
521 "codecs/isac/fix/source/entropy_coding.c",
522 "codecs/isac/fix/source/entropy_coding.h",
523 "codecs/isac/fix/source/fft.c",
524 "codecs/isac/fix/source/fft.h",
525 "codecs/isac/fix/source/filterbanks.c",
526 "codecs/isac/fix/source/filterbank_tables.c",
527 "codecs/isac/fix/source/filterbank_tables.h",
528 "codecs/isac/fix/source/filters.c",
529 "codecs/isac/fix/source/initialize.c",
530 "codecs/isac/fix/source/isacfix.c",
531 "codecs/isac/fix/source/lattice.c",
532 "codecs/isac/fix/source/lpc_masking_model.c",
533 "codecs/isac/fix/source/lpc_masking_model.h",
534 "codecs/isac/fix/source/lpc_tables.c",
535 "codecs/isac/fix/source/lpc_tables.h",
536 "codecs/isac/fix/source/pitch_estimator.c",
537 "codecs/isac/fix/source/pitch_estimator.h",
538 "codecs/isac/fix/source/pitch_filter.c",
539 "codecs/isac/fix/source/pitch_gain_tables.c",
540 "codecs/isac/fix/source/pitch_gain_tables.h",
541 "codecs/isac/fix/source/pitch_lag_tables.c",
542 "codecs/isac/fix/source/pitch_lag_tables.h",
543 "codecs/isac/fix/source/settings.h",
544 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
545 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
546 "codecs/isac/fix/source/structs.h",
547 "codecs/isac/fix/source/transform.c",
548 "codecs/isac/fix/source/transform_tables.c",
549 ]
550
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000551 if (is_clang) {
552 # Suppress warnings from Chrome's Clang plugins.
553 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
554 configs -= [ "//build/config/clang:find_bad_constructs" ]
555 }
556
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000557 if (!is_win) {
558 defines = [ "WEBRTC_LINUX" ]
559 }
560
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000561 configs += [ "../..:common_config" ]
562
563 public_configs = [
564 "../..:common_inherited_config",
565 ":isac_fix_config",
566 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000567
568 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000569 ":audio_encoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000570 "../../common_audio",
571 "../../system_wrappers",
572 ]
573
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000574 if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000575 deps += [ ":isac_neon" ]
576
577 # Enable compilation for the ARM v7 Neon instruction set. This is needed
578 # since //build/config/arm.gni only enables Neon for iOS, not Android.
579 # This provides the same functionality as webrtc/build/arm_neon.gypi.
580 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
581 # //build/config/arm.gni instead, to reduce code duplication.
582 # Remove the -mfpu=vfpv3-d16 cflag.
583 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
584 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000585 "-mfpu=neon",
586 ]
587
588 sources += [
589 "codecs/isac/fix/source/lattice_armv7.S",
590 "codecs/isac/fix/source/pitch_filter_armv6.S",
591 ]
592 } else {
593 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
594 }
595
596 if (cpu_arch == "mipsel") {
597 sources += [
598 "codecs/isac/fix/source/entropy_coding_mips.c",
599 "codecs/isac/fix/source/filters_mips.c",
600 "codecs/isac/fix/source/lattice_mips.c",
601 "codecs/isac/fix/source/pitch_estimator_mips.c",
602 "codecs/isac/fix/source/transform_mips.c",
603 ]
604 if (mips_dsp_rev > 0) {
605 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
606 }
607 if (mips_dsp_rev > 1) {
608 sources += [
609 "codecs/isac/fix/source/lpc_masking_model_mips.c",
610 "codecs/isac/fix/source/pitch_filter_mips.c",
611 ]
612 } else {
613 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
614 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000615 } else {
616 sources += [ "codecs/isac/fix/source/pitch_estimator_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000617 }
618
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000619 if (!rtc_build_armv7_neon && cpu_arch != "mipsel") {
620 sources += [ "codecs/isac/fix/source/lattice_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000621 }
622}
623
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000624if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000625 source_set("isac_neon") {
626 sources = [
627 "codecs/isac/fix/source/entropy_coding_neon.c",
628 "codecs/isac/fix/source/filterbanks_neon.S",
629 "codecs/isac/fix/source/filters_neon.S",
630 "codecs/isac/fix/source/lattice_neon.S",
631 "codecs/isac/fix/source/lpc_masking_model_neon.S",
632 "codecs/isac/fix/source/transform_neon.S",
633 ]
634
635 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000636 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000637 ]
638
639 # Disable LTO in audio_processing_neon target due to compiler bug.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000640 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000641 cflags -= [
642 "-flto",
643 "-ffat-lto-objects",
644 ]
645 }
646
647 # Enable compilation for the ARM v7 Neon instruction set. This is needed
648 # since //build/config/arm.gni only enables Neon for iOS, not Android.
649 # This provides the same functionality as webrtc/build/arm_neon.gypi.
650 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
651 # //build/config/arm.gni instead, to reduce code duplication.
652 # Remove the -mfpu=vfpv3-d16 cflag.
653 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
654 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000655 "-mfpu=neon",
656 ]
657
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000658 configs += [ "../..:common_config" ]
659 public_configs = [ "../..:common_inherited_config" ]
660
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000661 deps = [ "../../common_audio" ]
662 }
663}
664
665config("pcm16b_config") {
666 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000667 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000668 "codecs/pcm16b/include",
669 ]
670}
671
672source_set("pcm16b") {
673 sources = [
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000674 "codecs/pcm16b/include/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000675 "codecs/pcm16b/include/pcm16b.h",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000676 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000677 "codecs/pcm16b/pcm16b.c",
678 ]
679
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000680 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000681 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000682 ":g711",
683 ]
684
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000685 configs += [ "../..:common_config" ]
686
687 public_configs = [
688 "../..:common_inherited_config",
689 ":pcm16b_config",
690 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000691}
692
693config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000694 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000695}
696
697source_set("webrtc_opus") {
698 sources = [
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000699 "codecs/opus/audio_encoder_opus.cc",
700 "codecs/opus/interface/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000701 "codecs/opus/interface/opus_interface.h",
702 "codecs/opus/opus_inst.h",
703 "codecs/opus/opus_interface.c",
704 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000705
706 deps = [ ":audio_encoder_interface" ]
707
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000708 if (build_with_mozilla) {
709 include_dirs = [ getenv("DIST") + "/include/opus" ]
710 } else {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000711 configs += [ "../..:common_config" ]
712 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000713
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000714 deps += [ "//third_party/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000715 }
716}
717
718config("neteq_config") {
719 include_dirs = [
720 # Need Opus header files for the audio classifier.
721 "//third_party/opus/src/celt",
722 "//third_party/opus/src/src",
723 ]
724}
725
726source_set("neteq") {
727 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000728 "neteq/interface/neteq.h",
729 "neteq/accelerate.cc",
730 "neteq/accelerate.h",
731 "neteq/audio_classifier.cc",
732 "neteq/audio_classifier.h",
733 "neteq/audio_decoder_impl.cc",
734 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000735 "neteq/audio_multi_vector.cc",
736 "neteq/audio_multi_vector.h",
737 "neteq/audio_vector.cc",
738 "neteq/audio_vector.h",
739 "neteq/background_noise.cc",
740 "neteq/background_noise.h",
741 "neteq/buffer_level_filter.cc",
742 "neteq/buffer_level_filter.h",
743 "neteq/comfort_noise.cc",
744 "neteq/comfort_noise.h",
745 "neteq/decision_logic.cc",
746 "neteq/decision_logic.h",
747 "neteq/decision_logic_fax.cc",
748 "neteq/decision_logic_fax.h",
749 "neteq/decision_logic_normal.cc",
750 "neteq/decision_logic_normal.h",
751 "neteq/decoder_database.cc",
752 "neteq/decoder_database.h",
753 "neteq/defines.h",
754 "neteq/delay_manager.cc",
755 "neteq/delay_manager.h",
756 "neteq/delay_peak_detector.cc",
757 "neteq/delay_peak_detector.h",
758 "neteq/dsp_helper.cc",
759 "neteq/dsp_helper.h",
760 "neteq/dtmf_buffer.cc",
761 "neteq/dtmf_buffer.h",
762 "neteq/dtmf_tone_generator.cc",
763 "neteq/dtmf_tone_generator.h",
764 "neteq/expand.cc",
765 "neteq/expand.h",
766 "neteq/merge.cc",
767 "neteq/merge.h",
768 "neteq/neteq_impl.cc",
769 "neteq/neteq_impl.h",
770 "neteq/neteq.cc",
771 "neteq/statistics_calculator.cc",
772 "neteq/statistics_calculator.h",
773 "neteq/normal.cc",
774 "neteq/normal.h",
775 "neteq/packet_buffer.cc",
776 "neteq/packet_buffer.h",
777 "neteq/payload_splitter.cc",
778 "neteq/payload_splitter.h",
779 "neteq/post_decode_vad.cc",
780 "neteq/post_decode_vad.h",
781 "neteq/preemptive_expand.cc",
782 "neteq/preemptive_expand.h",
783 "neteq/random_vector.cc",
784 "neteq/random_vector.h",
785 "neteq/rtcp.cc",
786 "neteq/rtcp.h",
787 "neteq/sync_buffer.cc",
788 "neteq/sync_buffer.h",
789 "neteq/timestamp_scaler.cc",
790 "neteq/timestamp_scaler.h",
791 "neteq/time_stretch.cc",
792 "neteq/time_stretch.h",
793 ]
794
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000795 configs += [ "../..:common_config" ]
796
797 public_configs = [
798 "../..:common_inherited_config",
799 ":neteq_config",
800 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000801
802 forward_dependent_configs_from = [ "//third_party/opus" ]
803
804 if (is_clang) {
805 # Suppress warnings from Chrome's Clang plugins.
806 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
807 configs -= [ "//build/config/clang:find_bad_constructs" ]
808 }
809
810 deps = [
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000811 ":audio_decoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000812 ":cng",
813 ":g711",
814 ":g722",
815 ":ilbc",
816 ":isac",
817 ":isacfix",
818 ":pcm16b",
819 "../../common_audio",
820 "../../system_wrappers",
821 "//third_party/opus",
822 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000823}