blob: a90f5be1efdfdd6e69dd6e8590415a52ee0d444c [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 = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000021 "main/acm2/acm_codec_database.cc",
22 "main/acm2/acm_codec_database.h",
23 "main/acm2/acm_common_defs.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000024 "main/acm2/acm_generic_codec.cc",
25 "main/acm2/acm_generic_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000026 "main/acm2/acm_receiver.cc",
27 "main/acm2/acm_receiver.h",
28 "main/acm2/acm_resampler.cc",
29 "main/acm2/acm_resampler.h",
30 "main/acm2/audio_coding_module.cc",
31 "main/acm2/audio_coding_module_impl.cc",
32 "main/acm2/audio_coding_module_impl.h",
33 "main/acm2/call_statistics.cc",
34 "main/acm2/call_statistics.h",
35 "main/acm2/initial_delay_manager.cc",
36 "main/acm2/initial_delay_manager.h",
37 "main/acm2/nack.cc",
38 "main/acm2/nack.h",
39 "main/interface/audio_coding_module.h",
40 "main/interface/audio_coding_module_typedefs.h",
41 ]
42
43 defines = []
44
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000045 configs += [ "../..:common_config" ]
46
47 public_configs = [
48 "../..:common_inherited_config",
49 ":audio_coding_config",
50 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000051
52 if (is_clang) {
53 # Suppress warnings from Chrome's Clang plugins.
54 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
55 configs -= [ "//build/config/clang:find_bad_constructs" ]
56 }
57
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000058 if (is_win) {
59 cflags = [
60 # TODO(kjellander): Bug 261: fix this warning.
61 "/wd4373", # virtual function override.
62 ]
63 }
64
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000065 deps = [
66 ":cng",
67 ":g711",
68 ":g722",
69 ":ilbc",
70 ":isac",
71 ":isacfix",
72 ":neteq",
73 ":pcm16b",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +000074 ":red",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000075 "../../common_audio",
76 "../../system_wrappers",
77 ]
78
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000079 if (rtc_include_opus) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000080 defines += [ "WEBRTC_CODEC_OPUS" ]
81 deps += [ ":webrtc_opus" ]
82 }
83}
84
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +000085source_set("audio_decoder_interface") {
86 sources = [
87 "codecs/audio_decoder.cc",
88 "codecs/audio_decoder.h",
89 ]
90 configs += [ "../..:common_config" ]
91 public_configs = [ "../..:common_inherited_config" ]
92}
93
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +000094source_set("audio_encoder_interface") {
95 sources = [
96 "codecs/audio_encoder.cc",
97 "codecs/audio_encoder.h",
98 ]
99 configs += [ "../..:common_config" ]
100 public_configs = [ "../..:common_inherited_config" ]
101}
102
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000103config("cng_config") {
104 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000105 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000106 "codecs/cng/include",
107 ]
108}
109
110source_set("cng") {
111 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000112 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000113 "codecs/cng/cng_helpfuns.c",
114 "codecs/cng/cng_helpfuns.h",
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000115 "codecs/cng/include/audio_encoder_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000116 "codecs/cng/include/webrtc_cng.h",
117 "codecs/cng/webrtc_cng.c",
118 ]
119
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000120 configs += [ "../..:common_config" ]
121
122 public_configs = [
123 "../..:common_inherited_config",
124 ":cng_config",
125 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000126
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000127 deps = [
128 "../../common_audio",
129 ":audio_encoder_interface",
130 ]
131}
132
133config("red_config") {
134 include_dirs = [
135 "codecs/red",
136 ]
137}
138
139source_set("red") {
140 sources = [
141 "codecs/red/audio_encoder_copy_red.cc",
142 "codecs/red/audio_encoder_copy_red.h",
143 ]
144
145 configs += [ "../..:common_config" ]
146
147 public_configs = [
148 "../..:common_inherited_config",
149 ":red_config",
150 ]
151
152 deps = [
153 "../../common_audio",
154 ":audio_encoder_interface",
155 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000156}
157
158config("g711_config") {
159 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000160 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000161 "codecs/g711/include",
162 ]
163}
164
165source_set("g711") {
166 sources = [
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000167 "codecs/g711/include/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000168 "codecs/g711/include/g711_interface.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000169 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000170 "codecs/g711/g711_interface.c",
171 "codecs/g711/g711.c",
172 "codecs/g711/g711.h",
173 ]
174
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000175 configs += [ "../..:common_config" ]
176
177 public_configs = [
178 "../..:common_inherited_config",
179 ":g711_config",
180 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000181
182 deps = [ ":audio_encoder_interface" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000183}
184
185config("g722_config") {
186 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000187 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000188 "codecs/g722/include",
189 ]
190}
191
192source_set("g722") {
193 sources = [
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000194 "codecs/g722/audio_encoder_g722.cc",
195 "codecs/g722/include/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000196 "codecs/g722/include/g722_interface.h",
197 "codecs/g722/g722_interface.c",
198 "codecs/g722/g722_encode.c",
199 "codecs/g722/g722_decode.c",
200 "codecs/g722/g722_enc_dec.h",
201 ]
202
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000203 configs += [ "../..:common_config" ]
204
205 public_configs = [
206 "../..:common_inherited_config",
207 ":g722_config",
208 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000209
210 deps = [ ":audio_encoder_interface" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000211}
212
213config("ilbc_config") {
214 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000215 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000216 "codecs/ilbc/interface",
217 ]
218}
219
220source_set("ilbc") {
221 sources = [
kwiberg@webrtc.orgcb858ba2014-12-08 17:11:44 +0000222 "codecs/ilbc/audio_encoder_ilbc.cc",
223 "codecs/ilbc/include/audio_encoder_ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000224 "codecs/ilbc/abs_quant.c",
225 "codecs/ilbc/abs_quant.h",
226 "codecs/ilbc/abs_quant_loop.c",
227 "codecs/ilbc/abs_quant_loop.h",
228 "codecs/ilbc/augmented_cb_corr.c",
229 "codecs/ilbc/augmented_cb_corr.h",
230 "codecs/ilbc/bw_expand.c",
231 "codecs/ilbc/bw_expand.h",
232 "codecs/ilbc/cb_construct.c",
233 "codecs/ilbc/cb_construct.h",
234 "codecs/ilbc/cb_mem_energy_augmentation.c",
235 "codecs/ilbc/cb_mem_energy_augmentation.h",
236 "codecs/ilbc/cb_mem_energy.c",
237 "codecs/ilbc/cb_mem_energy_calc.c",
238 "codecs/ilbc/cb_mem_energy_calc.h",
239 "codecs/ilbc/cb_mem_energy.h",
240 "codecs/ilbc/cb_search.c",
241 "codecs/ilbc/cb_search_core.c",
242 "codecs/ilbc/cb_search_core.h",
243 "codecs/ilbc/cb_search.h",
244 "codecs/ilbc/cb_update_best_index.c",
245 "codecs/ilbc/cb_update_best_index.h",
246 "codecs/ilbc/chebyshev.c",
247 "codecs/ilbc/chebyshev.h",
248 "codecs/ilbc/comp_corr.c",
249 "codecs/ilbc/comp_corr.h",
250 "codecs/ilbc/constants.c",
251 "codecs/ilbc/constants.h",
252 "codecs/ilbc/create_augmented_vec.c",
253 "codecs/ilbc/create_augmented_vec.h",
254 "codecs/ilbc/decode.c",
255 "codecs/ilbc/decode.h",
256 "codecs/ilbc/decode_residual.c",
257 "codecs/ilbc/decode_residual.h",
258 "codecs/ilbc/decoder_interpolate_lsf.c",
259 "codecs/ilbc/decoder_interpolate_lsf.h",
260 "codecs/ilbc/defines.h",
261 "codecs/ilbc/do_plc.c",
262 "codecs/ilbc/do_plc.h",
263 "codecs/ilbc/encode.c",
264 "codecs/ilbc/encode.h",
265 "codecs/ilbc/energy_inverse.c",
266 "codecs/ilbc/energy_inverse.h",
267 "codecs/ilbc/enhancer.c",
268 "codecs/ilbc/enhancer.h",
269 "codecs/ilbc/enhancer_interface.c",
270 "codecs/ilbc/enhancer_interface.h",
271 "codecs/ilbc/enh_upsample.c",
272 "codecs/ilbc/enh_upsample.h",
273 "codecs/ilbc/filtered_cb_vecs.c",
274 "codecs/ilbc/filtered_cb_vecs.h",
275 "codecs/ilbc/frame_classify.c",
276 "codecs/ilbc/frame_classify.h",
277 "codecs/ilbc/gain_dequant.c",
278 "codecs/ilbc/gain_dequant.h",
279 "codecs/ilbc/gain_quant.c",
280 "codecs/ilbc/gain_quant.h",
281 "codecs/ilbc/get_cd_vec.c",
282 "codecs/ilbc/get_cd_vec.h",
283 "codecs/ilbc/get_lsp_poly.c",
284 "codecs/ilbc/get_lsp_poly.h",
285 "codecs/ilbc/get_sync_seq.c",
286 "codecs/ilbc/get_sync_seq.h",
287 "codecs/ilbc/hp_input.c",
288 "codecs/ilbc/hp_input.h",
289 "codecs/ilbc/hp_output.c",
290 "codecs/ilbc/hp_output.h",
291 "codecs/ilbc/ilbc.c",
292 "codecs/ilbc/index_conv_dec.c",
293 "codecs/ilbc/index_conv_dec.h",
294 "codecs/ilbc/index_conv_enc.c",
295 "codecs/ilbc/index_conv_enc.h",
296 "codecs/ilbc/init_decode.c",
297 "codecs/ilbc/init_decode.h",
298 "codecs/ilbc/init_encode.c",
299 "codecs/ilbc/init_encode.h",
300 "codecs/ilbc/interface/ilbc.h",
301 "codecs/ilbc/interpolate.c",
302 "codecs/ilbc/interpolate.h",
303 "codecs/ilbc/interpolate_samples.c",
304 "codecs/ilbc/interpolate_samples.h",
305 "codecs/ilbc/lpc_encode.c",
306 "codecs/ilbc/lpc_encode.h",
307 "codecs/ilbc/lsf_check.c",
308 "codecs/ilbc/lsf_check.h",
309 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
310 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
311 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
312 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
313 "codecs/ilbc/lsf_to_lsp.c",
314 "codecs/ilbc/lsf_to_lsp.h",
315 "codecs/ilbc/lsf_to_poly.c",
316 "codecs/ilbc/lsf_to_poly.h",
317 "codecs/ilbc/lsp_to_lsf.c",
318 "codecs/ilbc/lsp_to_lsf.h",
319 "codecs/ilbc/my_corr.c",
320 "codecs/ilbc/my_corr.h",
321 "codecs/ilbc/nearest_neighbor.c",
322 "codecs/ilbc/nearest_neighbor.h",
323 "codecs/ilbc/pack_bits.c",
324 "codecs/ilbc/pack_bits.h",
325 "codecs/ilbc/poly_to_lsf.c",
326 "codecs/ilbc/poly_to_lsf.h",
327 "codecs/ilbc/poly_to_lsp.c",
328 "codecs/ilbc/poly_to_lsp.h",
329 "codecs/ilbc/refiner.c",
330 "codecs/ilbc/refiner.h",
331 "codecs/ilbc/simple_interpolate_lsf.c",
332 "codecs/ilbc/simple_interpolate_lsf.h",
333 "codecs/ilbc/simple_lpc_analysis.c",
334 "codecs/ilbc/simple_lpc_analysis.h",
335 "codecs/ilbc/simple_lsf_dequant.c",
336 "codecs/ilbc/simple_lsf_dequant.h",
337 "codecs/ilbc/simple_lsf_quant.c",
338 "codecs/ilbc/simple_lsf_quant.h",
339 "codecs/ilbc/smooth.c",
340 "codecs/ilbc/smooth.h",
341 "codecs/ilbc/smooth_out_data.c",
342 "codecs/ilbc/smooth_out_data.h",
343 "codecs/ilbc/sort_sq.c",
344 "codecs/ilbc/sort_sq.h",
345 "codecs/ilbc/split_vq.c",
346 "codecs/ilbc/split_vq.h",
347 "codecs/ilbc/state_construct.c",
348 "codecs/ilbc/state_construct.h",
349 "codecs/ilbc/state_search.c",
350 "codecs/ilbc/state_search.h",
351 "codecs/ilbc/swap_bytes.c",
352 "codecs/ilbc/swap_bytes.h",
353 "codecs/ilbc/unpack_bits.c",
354 "codecs/ilbc/unpack_bits.h",
355 "codecs/ilbc/vq3.c",
356 "codecs/ilbc/vq3.h",
357 "codecs/ilbc/vq4.c",
358 "codecs/ilbc/vq4.h",
359 "codecs/ilbc/window32_w32.c",
360 "codecs/ilbc/window32_w32.h",
361 "codecs/ilbc/xcorr_coef.c",
362 "codecs/ilbc/xcorr_coef.h",
363 ]
364
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000365 configs += [ "../..:common_config" ]
366
367 public_configs = [
368 "../..:common_inherited_config",
369 ":ilbc_config",
370 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000371
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000372 deps = [
373 "../../common_audio",
374 ":audio_encoder_interface",
375 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000376}
377
378config("isac_config") {
379 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000380 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000381 "codecs/isac/main/interface",
382 ]
383}
384
385source_set("isac") {
386 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000387 "codecs/isac/audio_encoder_isac_t.h",
388 "codecs/isac/audio_encoder_isac_t_impl.h",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000389 "codecs/isac/main/interface/audio_encoder_isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000390 "codecs/isac/main/interface/isac.h",
391 "codecs/isac/main/source/arith_routines.c",
392 "codecs/isac/main/source/arith_routines.h",
393 "codecs/isac/main/source/arith_routines_hist.c",
394 "codecs/isac/main/source/arith_routines_logist.c",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000395 "codecs/isac/main/source/audio_encoder_isac.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000396 "codecs/isac/main/source/bandwidth_estimator.c",
397 "codecs/isac/main/source/bandwidth_estimator.h",
398 "codecs/isac/main/source/codec.h",
399 "codecs/isac/main/source/crc.c",
400 "codecs/isac/main/source/crc.h",
401 "codecs/isac/main/source/decode_bwe.c",
402 "codecs/isac/main/source/decode.c",
403 "codecs/isac/main/source/encode.c",
404 "codecs/isac/main/source/encode_lpc_swb.c",
405 "codecs/isac/main/source/encode_lpc_swb.h",
406 "codecs/isac/main/source/entropy_coding.c",
407 "codecs/isac/main/source/entropy_coding.h",
408 "codecs/isac/main/source/fft.c",
409 "codecs/isac/main/source/fft.h",
410 "codecs/isac/main/source/filterbanks.c",
411 "codecs/isac/main/source/filterbank_tables.c",
412 "codecs/isac/main/source/filterbank_tables.h",
413 "codecs/isac/main/source/filter_functions.c",
414 "codecs/isac/main/source/intialize.c",
415 "codecs/isac/main/source/isac.c",
416 "codecs/isac/main/source/lattice.c",
417 "codecs/isac/main/source/lpc_analysis.c",
418 "codecs/isac/main/source/lpc_analysis.h",
419 "codecs/isac/main/source/lpc_gain_swb_tables.c",
420 "codecs/isac/main/source/lpc_gain_swb_tables.h",
421 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
422 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
423 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
424 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
425 "codecs/isac/main/source/lpc_tables.c",
426 "codecs/isac/main/source/lpc_tables.h",
427 "codecs/isac/main/source/os_specific_inline.h",
428 "codecs/isac/main/source/pitch_estimator.c",
429 "codecs/isac/main/source/pitch_estimator.h",
430 "codecs/isac/main/source/pitch_filter.c",
431 "codecs/isac/main/source/pitch_gain_tables.c",
432 "codecs/isac/main/source/pitch_gain_tables.h",
433 "codecs/isac/main/source/pitch_lag_tables.c",
434 "codecs/isac/main/source/pitch_lag_tables.h",
435 "codecs/isac/main/source/settings.h",
436 "codecs/isac/main/source/spectrum_ar_model_tables.c",
437 "codecs/isac/main/source/spectrum_ar_model_tables.h",
438 "codecs/isac/main/source/structs.h",
439 "codecs/isac/main/source/transform.c",
440 ]
441
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000442 if (is_clang) {
443 # Suppress warnings from Chrome's Clang plugins.
444 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
445 configs -= [ "//build/config/clang:find_bad_constructs" ]
446 }
447
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000448 if (is_linux) {
449 libs = [ "m" ]
450 }
451
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000452 configs += [ "../..:common_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000453
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000454 public_configs = [
455 "../..:common_inherited_config",
456 ":isac_config",
457 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000458
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000459 deps = [
460 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000461 ":audio_encoder_interface",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000462 "../../common_audio",
463 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000464}
465
466config("isac_fix_config") {
467 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000468 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000469 "codecs/isac/fix/interface",
470 ]
471}
472
473source_set("isacfix") {
474 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000475 "codecs/isac/audio_encoder_isac_t.h",
476 "codecs/isac/audio_encoder_isac_t_impl.h",
477 "codecs/isac/fix/interface/audio_encoder_isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000478 "codecs/isac/fix/interface/isacfix.h",
479 "codecs/isac/fix/source/arith_routines.c",
480 "codecs/isac/fix/source/arith_routines_hist.c",
481 "codecs/isac/fix/source/arith_routines_logist.c",
482 "codecs/isac/fix/source/arith_routins.h",
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000483 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000484 "codecs/isac/fix/source/bandwidth_estimator.c",
485 "codecs/isac/fix/source/bandwidth_estimator.h",
486 "codecs/isac/fix/source/codec.h",
487 "codecs/isac/fix/source/decode_bwe.c",
488 "codecs/isac/fix/source/decode.c",
489 "codecs/isac/fix/source/decode_plc.c",
490 "codecs/isac/fix/source/encode.c",
491 "codecs/isac/fix/source/entropy_coding.c",
492 "codecs/isac/fix/source/entropy_coding.h",
493 "codecs/isac/fix/source/fft.c",
494 "codecs/isac/fix/source/fft.h",
495 "codecs/isac/fix/source/filterbanks.c",
496 "codecs/isac/fix/source/filterbank_tables.c",
497 "codecs/isac/fix/source/filterbank_tables.h",
498 "codecs/isac/fix/source/filters.c",
499 "codecs/isac/fix/source/initialize.c",
500 "codecs/isac/fix/source/isacfix.c",
501 "codecs/isac/fix/source/lattice.c",
502 "codecs/isac/fix/source/lpc_masking_model.c",
503 "codecs/isac/fix/source/lpc_masking_model.h",
504 "codecs/isac/fix/source/lpc_tables.c",
505 "codecs/isac/fix/source/lpc_tables.h",
506 "codecs/isac/fix/source/pitch_estimator.c",
507 "codecs/isac/fix/source/pitch_estimator.h",
508 "codecs/isac/fix/source/pitch_filter.c",
509 "codecs/isac/fix/source/pitch_gain_tables.c",
510 "codecs/isac/fix/source/pitch_gain_tables.h",
511 "codecs/isac/fix/source/pitch_lag_tables.c",
512 "codecs/isac/fix/source/pitch_lag_tables.h",
513 "codecs/isac/fix/source/settings.h",
514 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
515 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
516 "codecs/isac/fix/source/structs.h",
517 "codecs/isac/fix/source/transform.c",
518 "codecs/isac/fix/source/transform_tables.c",
519 ]
520
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000521 if (is_clang) {
522 # Suppress warnings from Chrome's Clang plugins.
523 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
524 configs -= [ "//build/config/clang:find_bad_constructs" ]
525 }
526
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000527 if (!is_win) {
528 defines = [ "WEBRTC_LINUX" ]
529 }
530
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000531 configs += [ "../..:common_config" ]
532
533 public_configs = [
534 "../..:common_inherited_config",
535 ":isac_fix_config",
536 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000537
538 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000539 ":audio_encoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000540 "../../common_audio",
541 "../../system_wrappers",
542 ]
543
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000544 if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000545 deps += [ ":isac_neon" ]
546
547 # Enable compilation for the ARM v7 Neon instruction set. This is needed
548 # since //build/config/arm.gni only enables Neon for iOS, not Android.
549 # This provides the same functionality as webrtc/build/arm_neon.gypi.
550 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
551 # //build/config/arm.gni instead, to reduce code duplication.
552 # Remove the -mfpu=vfpv3-d16 cflag.
553 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
554 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000555 "-mfpu=neon",
556 ]
557
558 sources += [
559 "codecs/isac/fix/source/lattice_armv7.S",
560 "codecs/isac/fix/source/pitch_filter_armv6.S",
561 ]
562 } else {
563 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
564 }
565
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000566 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000567 sources += [
568 "codecs/isac/fix/source/entropy_coding_mips.c",
569 "codecs/isac/fix/source/filters_mips.c",
570 "codecs/isac/fix/source/lattice_mips.c",
571 "codecs/isac/fix/source/pitch_estimator_mips.c",
572 "codecs/isac/fix/source/transform_mips.c",
573 ]
574 if (mips_dsp_rev > 0) {
575 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
576 }
577 if (mips_dsp_rev > 1) {
578 sources += [
579 "codecs/isac/fix/source/lpc_masking_model_mips.c",
580 "codecs/isac/fix/source/pitch_filter_mips.c",
581 ]
582 } else {
583 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
584 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000585 } else {
586 sources += [ "codecs/isac/fix/source/pitch_estimator_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000587 }
588
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000589 if (!rtc_build_armv7_neon && current_cpu != "mipsel") {
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000590 sources += [ "codecs/isac/fix/source/lattice_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000591 }
592}
593
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000594if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000595 source_set("isac_neon") {
596 sources = [
597 "codecs/isac/fix/source/entropy_coding_neon.c",
598 "codecs/isac/fix/source/filterbanks_neon.S",
599 "codecs/isac/fix/source/filters_neon.S",
600 "codecs/isac/fix/source/lattice_neon.S",
601 "codecs/isac/fix/source/lpc_masking_model_neon.S",
602 "codecs/isac/fix/source/transform_neon.S",
603 ]
604
605 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000606 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000607 ]
608
609 # Disable LTO in audio_processing_neon target due to compiler bug.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000610 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000611 cflags -= [
612 "-flto",
613 "-ffat-lto-objects",
614 ]
615 }
616
617 # Enable compilation for the ARM v7 Neon instruction set. This is needed
618 # since //build/config/arm.gni only enables Neon for iOS, not Android.
619 # This provides the same functionality as webrtc/build/arm_neon.gypi.
620 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
621 # //build/config/arm.gni instead, to reduce code duplication.
622 # Remove the -mfpu=vfpv3-d16 cflag.
623 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
624 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000625 "-mfpu=neon",
626 ]
627
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000628 configs += [ "../..:common_config" ]
629 public_configs = [ "../..:common_inherited_config" ]
630
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000631 deps = [ "../../common_audio" ]
632 }
633}
634
635config("pcm16b_config") {
636 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000637 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000638 "codecs/pcm16b/include",
639 ]
640}
641
642source_set("pcm16b") {
643 sources = [
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000644 "codecs/pcm16b/include/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000645 "codecs/pcm16b/include/pcm16b.h",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000646 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000647 "codecs/pcm16b/pcm16b.c",
648 ]
649
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000650 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000651 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000652 ":g711",
653 ]
654
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000655 configs += [ "../..:common_config" ]
656
657 public_configs = [
658 "../..:common_inherited_config",
659 ":pcm16b_config",
660 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000661}
662
663config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000664 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000665}
666
667source_set("webrtc_opus") {
668 sources = [
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000669 "codecs/opus/audio_encoder_opus.cc",
670 "codecs/opus/interface/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000671 "codecs/opus/interface/opus_interface.h",
672 "codecs/opus/opus_inst.h",
673 "codecs/opus/opus_interface.c",
674 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000675
676 deps = [ ":audio_encoder_interface" ]
677
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000678 if (build_with_mozilla) {
679 include_dirs = [ getenv("DIST") + "/include/opus" ]
680 } else {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000681 configs += [ "../..:common_config" ]
682 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000683
kjellander@webrtc.orgce22f132015-02-16 12:47:20 +0000684 deps += [ rtc_opus_dir ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000685 }
686}
687
688config("neteq_config") {
689 include_dirs = [
690 # Need Opus header files for the audio classifier.
691 "//third_party/opus/src/celt",
692 "//third_party/opus/src/src",
693 ]
694}
695
696source_set("neteq") {
697 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000698 "neteq/interface/neteq.h",
699 "neteq/accelerate.cc",
700 "neteq/accelerate.h",
701 "neteq/audio_classifier.cc",
702 "neteq/audio_classifier.h",
703 "neteq/audio_decoder_impl.cc",
704 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000705 "neteq/audio_multi_vector.cc",
706 "neteq/audio_multi_vector.h",
707 "neteq/audio_vector.cc",
708 "neteq/audio_vector.h",
709 "neteq/background_noise.cc",
710 "neteq/background_noise.h",
711 "neteq/buffer_level_filter.cc",
712 "neteq/buffer_level_filter.h",
713 "neteq/comfort_noise.cc",
714 "neteq/comfort_noise.h",
715 "neteq/decision_logic.cc",
716 "neteq/decision_logic.h",
717 "neteq/decision_logic_fax.cc",
718 "neteq/decision_logic_fax.h",
719 "neteq/decision_logic_normal.cc",
720 "neteq/decision_logic_normal.h",
721 "neteq/decoder_database.cc",
722 "neteq/decoder_database.h",
723 "neteq/defines.h",
724 "neteq/delay_manager.cc",
725 "neteq/delay_manager.h",
726 "neteq/delay_peak_detector.cc",
727 "neteq/delay_peak_detector.h",
728 "neteq/dsp_helper.cc",
729 "neteq/dsp_helper.h",
730 "neteq/dtmf_buffer.cc",
731 "neteq/dtmf_buffer.h",
732 "neteq/dtmf_tone_generator.cc",
733 "neteq/dtmf_tone_generator.h",
734 "neteq/expand.cc",
735 "neteq/expand.h",
736 "neteq/merge.cc",
737 "neteq/merge.h",
738 "neteq/neteq_impl.cc",
739 "neteq/neteq_impl.h",
740 "neteq/neteq.cc",
741 "neteq/statistics_calculator.cc",
742 "neteq/statistics_calculator.h",
743 "neteq/normal.cc",
744 "neteq/normal.h",
745 "neteq/packet_buffer.cc",
746 "neteq/packet_buffer.h",
747 "neteq/payload_splitter.cc",
748 "neteq/payload_splitter.h",
749 "neteq/post_decode_vad.cc",
750 "neteq/post_decode_vad.h",
751 "neteq/preemptive_expand.cc",
752 "neteq/preemptive_expand.h",
753 "neteq/random_vector.cc",
754 "neteq/random_vector.h",
755 "neteq/rtcp.cc",
756 "neteq/rtcp.h",
757 "neteq/sync_buffer.cc",
758 "neteq/sync_buffer.h",
759 "neteq/timestamp_scaler.cc",
760 "neteq/timestamp_scaler.h",
761 "neteq/time_stretch.cc",
762 "neteq/time_stretch.h",
763 ]
764
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000765 configs += [ "../..:common_config" ]
766
767 public_configs = [
768 "../..:common_inherited_config",
769 ":neteq_config",
770 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000771
kjellander@webrtc.orgce22f132015-02-16 12:47:20 +0000772 forward_dependent_configs_from = [ rtc_opus_dir ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000773
774 if (is_clang) {
775 # Suppress warnings from Chrome's Clang plugins.
776 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
777 configs -= [ "//build/config/clang:find_bad_constructs" ]
778 }
779
780 deps = [
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000781 ":audio_decoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000782 ":cng",
783 ":g711",
784 ":g722",
785 ":ilbc",
786 ":isac",
787 ":isacfix",
788 ":pcm16b",
789 "../../common_audio",
790 "../../system_wrappers",
kjellander@webrtc.orgce22f132015-02-16 12:47:20 +0000791 rtc_opus_dir,
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000792 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000793}