blob: b102816f962f21944a281faf346ed6c0798b0184 [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",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000075 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000076 "../../common_audio",
77 "../../system_wrappers",
78 ]
79
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000080 if (rtc_include_opus) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000081 defines += [ "WEBRTC_CODEC_OPUS" ]
82 deps += [ ":webrtc_opus" ]
83 }
84}
85
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +000086source_set("audio_decoder_interface") {
87 sources = [
88 "codecs/audio_decoder.cc",
89 "codecs/audio_decoder.h",
90 ]
91 configs += [ "../..:common_config" ]
92 public_configs = [ "../..:common_inherited_config" ]
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000093 deps = [ "../..:webrtc_common" ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +000094}
95
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +000096source_set("audio_encoder_interface") {
97 sources = [
98 "codecs/audio_encoder.cc",
99 "codecs/audio_encoder.h",
100 ]
101 configs += [ "../..:common_config" ]
102 public_configs = [ "../..:common_inherited_config" ]
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000103 deps = [ "../..:webrtc_common" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000104}
105
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000106config("cng_config") {
107 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000108 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000109 "codecs/cng/include",
110 ]
111}
112
113source_set("cng") {
114 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000115 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000116 "codecs/cng/cng_helpfuns.c",
117 "codecs/cng/cng_helpfuns.h",
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000118 "codecs/cng/include/audio_encoder_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000119 "codecs/cng/include/webrtc_cng.h",
120 "codecs/cng/webrtc_cng.c",
121 ]
122
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000123 configs += [ "../..:common_config" ]
124
125 public_configs = [
126 "../..:common_inherited_config",
127 ":cng_config",
128 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000129
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000130 deps = [
131 "../../common_audio",
132 ":audio_encoder_interface",
133 ]
134}
135
136config("red_config") {
137 include_dirs = [
138 "codecs/red",
139 ]
140}
141
142source_set("red") {
143 sources = [
144 "codecs/red/audio_encoder_copy_red.cc",
145 "codecs/red/audio_encoder_copy_red.h",
146 ]
147
148 configs += [ "../..:common_config" ]
149
150 public_configs = [
151 "../..:common_inherited_config",
152 ":red_config",
153 ]
154
155 deps = [
156 "../../common_audio",
157 ":audio_encoder_interface",
158 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000159}
160
161config("g711_config") {
162 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000163 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000164 "codecs/g711/include",
165 ]
166}
167
168source_set("g711") {
169 sources = [
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000170 "codecs/g711/include/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000171 "codecs/g711/include/g711_interface.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000172 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000173 "codecs/g711/g711_interface.c",
174 "codecs/g711/g711.c",
175 "codecs/g711/g711.h",
176 ]
177
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000178 configs += [ "../..:common_config" ]
179
180 public_configs = [
181 "../..:common_inherited_config",
182 ":g711_config",
183 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000184
185 deps = [ ":audio_encoder_interface" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000186}
187
188config("g722_config") {
189 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000190 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000191 "codecs/g722/include",
192 ]
193}
194
195source_set("g722") {
196 sources = [
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000197 "codecs/g722/audio_encoder_g722.cc",
198 "codecs/g722/include/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000199 "codecs/g722/include/g722_interface.h",
200 "codecs/g722/g722_interface.c",
201 "codecs/g722/g722_encode.c",
202 "codecs/g722/g722_decode.c",
203 "codecs/g722/g722_enc_dec.h",
204 ]
205
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000206 configs += [ "../..:common_config" ]
207
208 public_configs = [
209 "../..:common_inherited_config",
210 ":g722_config",
211 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000212
213 deps = [ ":audio_encoder_interface" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000214}
215
216config("ilbc_config") {
217 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000218 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000219 "codecs/ilbc/interface",
220 ]
221}
222
223source_set("ilbc") {
224 sources = [
kwiberg@webrtc.orgcb858ba2014-12-08 17:11:44 +0000225 "codecs/ilbc/audio_encoder_ilbc.cc",
226 "codecs/ilbc/include/audio_encoder_ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000227 "codecs/ilbc/abs_quant.c",
228 "codecs/ilbc/abs_quant.h",
229 "codecs/ilbc/abs_quant_loop.c",
230 "codecs/ilbc/abs_quant_loop.h",
231 "codecs/ilbc/augmented_cb_corr.c",
232 "codecs/ilbc/augmented_cb_corr.h",
233 "codecs/ilbc/bw_expand.c",
234 "codecs/ilbc/bw_expand.h",
235 "codecs/ilbc/cb_construct.c",
236 "codecs/ilbc/cb_construct.h",
237 "codecs/ilbc/cb_mem_energy_augmentation.c",
238 "codecs/ilbc/cb_mem_energy_augmentation.h",
239 "codecs/ilbc/cb_mem_energy.c",
240 "codecs/ilbc/cb_mem_energy_calc.c",
241 "codecs/ilbc/cb_mem_energy_calc.h",
242 "codecs/ilbc/cb_mem_energy.h",
243 "codecs/ilbc/cb_search.c",
244 "codecs/ilbc/cb_search_core.c",
245 "codecs/ilbc/cb_search_core.h",
246 "codecs/ilbc/cb_search.h",
247 "codecs/ilbc/cb_update_best_index.c",
248 "codecs/ilbc/cb_update_best_index.h",
249 "codecs/ilbc/chebyshev.c",
250 "codecs/ilbc/chebyshev.h",
251 "codecs/ilbc/comp_corr.c",
252 "codecs/ilbc/comp_corr.h",
253 "codecs/ilbc/constants.c",
254 "codecs/ilbc/constants.h",
255 "codecs/ilbc/create_augmented_vec.c",
256 "codecs/ilbc/create_augmented_vec.h",
257 "codecs/ilbc/decode.c",
258 "codecs/ilbc/decode.h",
259 "codecs/ilbc/decode_residual.c",
260 "codecs/ilbc/decode_residual.h",
261 "codecs/ilbc/decoder_interpolate_lsf.c",
262 "codecs/ilbc/decoder_interpolate_lsf.h",
263 "codecs/ilbc/defines.h",
264 "codecs/ilbc/do_plc.c",
265 "codecs/ilbc/do_plc.h",
266 "codecs/ilbc/encode.c",
267 "codecs/ilbc/encode.h",
268 "codecs/ilbc/energy_inverse.c",
269 "codecs/ilbc/energy_inverse.h",
270 "codecs/ilbc/enhancer.c",
271 "codecs/ilbc/enhancer.h",
272 "codecs/ilbc/enhancer_interface.c",
273 "codecs/ilbc/enhancer_interface.h",
274 "codecs/ilbc/enh_upsample.c",
275 "codecs/ilbc/enh_upsample.h",
276 "codecs/ilbc/filtered_cb_vecs.c",
277 "codecs/ilbc/filtered_cb_vecs.h",
278 "codecs/ilbc/frame_classify.c",
279 "codecs/ilbc/frame_classify.h",
280 "codecs/ilbc/gain_dequant.c",
281 "codecs/ilbc/gain_dequant.h",
282 "codecs/ilbc/gain_quant.c",
283 "codecs/ilbc/gain_quant.h",
284 "codecs/ilbc/get_cd_vec.c",
285 "codecs/ilbc/get_cd_vec.h",
286 "codecs/ilbc/get_lsp_poly.c",
287 "codecs/ilbc/get_lsp_poly.h",
288 "codecs/ilbc/get_sync_seq.c",
289 "codecs/ilbc/get_sync_seq.h",
290 "codecs/ilbc/hp_input.c",
291 "codecs/ilbc/hp_input.h",
292 "codecs/ilbc/hp_output.c",
293 "codecs/ilbc/hp_output.h",
294 "codecs/ilbc/ilbc.c",
295 "codecs/ilbc/index_conv_dec.c",
296 "codecs/ilbc/index_conv_dec.h",
297 "codecs/ilbc/index_conv_enc.c",
298 "codecs/ilbc/index_conv_enc.h",
299 "codecs/ilbc/init_decode.c",
300 "codecs/ilbc/init_decode.h",
301 "codecs/ilbc/init_encode.c",
302 "codecs/ilbc/init_encode.h",
303 "codecs/ilbc/interface/ilbc.h",
304 "codecs/ilbc/interpolate.c",
305 "codecs/ilbc/interpolate.h",
306 "codecs/ilbc/interpolate_samples.c",
307 "codecs/ilbc/interpolate_samples.h",
308 "codecs/ilbc/lpc_encode.c",
309 "codecs/ilbc/lpc_encode.h",
310 "codecs/ilbc/lsf_check.c",
311 "codecs/ilbc/lsf_check.h",
312 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
313 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
314 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
315 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
316 "codecs/ilbc/lsf_to_lsp.c",
317 "codecs/ilbc/lsf_to_lsp.h",
318 "codecs/ilbc/lsf_to_poly.c",
319 "codecs/ilbc/lsf_to_poly.h",
320 "codecs/ilbc/lsp_to_lsf.c",
321 "codecs/ilbc/lsp_to_lsf.h",
322 "codecs/ilbc/my_corr.c",
323 "codecs/ilbc/my_corr.h",
324 "codecs/ilbc/nearest_neighbor.c",
325 "codecs/ilbc/nearest_neighbor.h",
326 "codecs/ilbc/pack_bits.c",
327 "codecs/ilbc/pack_bits.h",
328 "codecs/ilbc/poly_to_lsf.c",
329 "codecs/ilbc/poly_to_lsf.h",
330 "codecs/ilbc/poly_to_lsp.c",
331 "codecs/ilbc/poly_to_lsp.h",
332 "codecs/ilbc/refiner.c",
333 "codecs/ilbc/refiner.h",
334 "codecs/ilbc/simple_interpolate_lsf.c",
335 "codecs/ilbc/simple_interpolate_lsf.h",
336 "codecs/ilbc/simple_lpc_analysis.c",
337 "codecs/ilbc/simple_lpc_analysis.h",
338 "codecs/ilbc/simple_lsf_dequant.c",
339 "codecs/ilbc/simple_lsf_dequant.h",
340 "codecs/ilbc/simple_lsf_quant.c",
341 "codecs/ilbc/simple_lsf_quant.h",
342 "codecs/ilbc/smooth.c",
343 "codecs/ilbc/smooth.h",
344 "codecs/ilbc/smooth_out_data.c",
345 "codecs/ilbc/smooth_out_data.h",
346 "codecs/ilbc/sort_sq.c",
347 "codecs/ilbc/sort_sq.h",
348 "codecs/ilbc/split_vq.c",
349 "codecs/ilbc/split_vq.h",
350 "codecs/ilbc/state_construct.c",
351 "codecs/ilbc/state_construct.h",
352 "codecs/ilbc/state_search.c",
353 "codecs/ilbc/state_search.h",
354 "codecs/ilbc/swap_bytes.c",
355 "codecs/ilbc/swap_bytes.h",
356 "codecs/ilbc/unpack_bits.c",
357 "codecs/ilbc/unpack_bits.h",
358 "codecs/ilbc/vq3.c",
359 "codecs/ilbc/vq3.h",
360 "codecs/ilbc/vq4.c",
361 "codecs/ilbc/vq4.h",
362 "codecs/ilbc/window32_w32.c",
363 "codecs/ilbc/window32_w32.h",
364 "codecs/ilbc/xcorr_coef.c",
365 "codecs/ilbc/xcorr_coef.h",
366 ]
367
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000368 configs += [ "../..:common_config" ]
369
370 public_configs = [
371 "../..:common_inherited_config",
372 ":ilbc_config",
373 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000374
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000375 deps = [
376 "../../common_audio",
377 ":audio_encoder_interface",
378 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000379}
380
381config("isac_config") {
382 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000383 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000384 "codecs/isac/main/interface",
385 ]
386}
387
388source_set("isac") {
389 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000390 "codecs/isac/audio_encoder_isac_t.h",
391 "codecs/isac/audio_encoder_isac_t_impl.h",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000392 "codecs/isac/main/interface/audio_encoder_isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000393 "codecs/isac/main/interface/isac.h",
394 "codecs/isac/main/source/arith_routines.c",
395 "codecs/isac/main/source/arith_routines.h",
396 "codecs/isac/main/source/arith_routines_hist.c",
397 "codecs/isac/main/source/arith_routines_logist.c",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000398 "codecs/isac/main/source/audio_encoder_isac.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000399 "codecs/isac/main/source/bandwidth_estimator.c",
400 "codecs/isac/main/source/bandwidth_estimator.h",
401 "codecs/isac/main/source/codec.h",
402 "codecs/isac/main/source/crc.c",
403 "codecs/isac/main/source/crc.h",
404 "codecs/isac/main/source/decode_bwe.c",
405 "codecs/isac/main/source/decode.c",
406 "codecs/isac/main/source/encode.c",
407 "codecs/isac/main/source/encode_lpc_swb.c",
408 "codecs/isac/main/source/encode_lpc_swb.h",
409 "codecs/isac/main/source/entropy_coding.c",
410 "codecs/isac/main/source/entropy_coding.h",
411 "codecs/isac/main/source/fft.c",
412 "codecs/isac/main/source/fft.h",
413 "codecs/isac/main/source/filterbanks.c",
414 "codecs/isac/main/source/filterbank_tables.c",
415 "codecs/isac/main/source/filterbank_tables.h",
416 "codecs/isac/main/source/filter_functions.c",
417 "codecs/isac/main/source/intialize.c",
418 "codecs/isac/main/source/isac.c",
419 "codecs/isac/main/source/lattice.c",
420 "codecs/isac/main/source/lpc_analysis.c",
421 "codecs/isac/main/source/lpc_analysis.h",
422 "codecs/isac/main/source/lpc_gain_swb_tables.c",
423 "codecs/isac/main/source/lpc_gain_swb_tables.h",
424 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
425 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
426 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
427 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
428 "codecs/isac/main/source/lpc_tables.c",
429 "codecs/isac/main/source/lpc_tables.h",
430 "codecs/isac/main/source/os_specific_inline.h",
431 "codecs/isac/main/source/pitch_estimator.c",
432 "codecs/isac/main/source/pitch_estimator.h",
433 "codecs/isac/main/source/pitch_filter.c",
434 "codecs/isac/main/source/pitch_gain_tables.c",
435 "codecs/isac/main/source/pitch_gain_tables.h",
436 "codecs/isac/main/source/pitch_lag_tables.c",
437 "codecs/isac/main/source/pitch_lag_tables.h",
438 "codecs/isac/main/source/settings.h",
439 "codecs/isac/main/source/spectrum_ar_model_tables.c",
440 "codecs/isac/main/source/spectrum_ar_model_tables.h",
441 "codecs/isac/main/source/structs.h",
442 "codecs/isac/main/source/transform.c",
443 ]
444
445 if (is_linux) {
446 libs = [ "m" ]
447 }
448
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000449 configs += [ "../..:common_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000450
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000451 public_configs = [
452 "../..:common_inherited_config",
453 ":isac_config",
454 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000455
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000456 deps = [
457 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000458 ":audio_encoder_interface",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000459 "../../common_audio",
460 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000461}
462
463config("isac_fix_config") {
464 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000465 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000466 "codecs/isac/fix/interface",
467 ]
468}
469
470source_set("isacfix") {
471 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000472 "codecs/isac/audio_encoder_isac_t.h",
473 "codecs/isac/audio_encoder_isac_t_impl.h",
474 "codecs/isac/fix/interface/audio_encoder_isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000475 "codecs/isac/fix/interface/isacfix.h",
476 "codecs/isac/fix/source/arith_routines.c",
477 "codecs/isac/fix/source/arith_routines_hist.c",
478 "codecs/isac/fix/source/arith_routines_logist.c",
479 "codecs/isac/fix/source/arith_routins.h",
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000480 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000481 "codecs/isac/fix/source/bandwidth_estimator.c",
482 "codecs/isac/fix/source/bandwidth_estimator.h",
483 "codecs/isac/fix/source/codec.h",
484 "codecs/isac/fix/source/decode_bwe.c",
485 "codecs/isac/fix/source/decode.c",
486 "codecs/isac/fix/source/decode_plc.c",
487 "codecs/isac/fix/source/encode.c",
488 "codecs/isac/fix/source/entropy_coding.c",
489 "codecs/isac/fix/source/entropy_coding.h",
490 "codecs/isac/fix/source/fft.c",
491 "codecs/isac/fix/source/fft.h",
492 "codecs/isac/fix/source/filterbanks.c",
493 "codecs/isac/fix/source/filterbank_tables.c",
494 "codecs/isac/fix/source/filterbank_tables.h",
495 "codecs/isac/fix/source/filters.c",
496 "codecs/isac/fix/source/initialize.c",
497 "codecs/isac/fix/source/isacfix.c",
498 "codecs/isac/fix/source/lattice.c",
499 "codecs/isac/fix/source/lpc_masking_model.c",
500 "codecs/isac/fix/source/lpc_masking_model.h",
501 "codecs/isac/fix/source/lpc_tables.c",
502 "codecs/isac/fix/source/lpc_tables.h",
503 "codecs/isac/fix/source/pitch_estimator.c",
504 "codecs/isac/fix/source/pitch_estimator.h",
505 "codecs/isac/fix/source/pitch_filter.c",
506 "codecs/isac/fix/source/pitch_gain_tables.c",
507 "codecs/isac/fix/source/pitch_gain_tables.h",
508 "codecs/isac/fix/source/pitch_lag_tables.c",
509 "codecs/isac/fix/source/pitch_lag_tables.h",
510 "codecs/isac/fix/source/settings.h",
511 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
512 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
513 "codecs/isac/fix/source/structs.h",
514 "codecs/isac/fix/source/transform.c",
515 "codecs/isac/fix/source/transform_tables.c",
516 ]
517
518 if (!is_win) {
519 defines = [ "WEBRTC_LINUX" ]
520 }
521
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000522 configs += [ "../..:common_config" ]
523
524 public_configs = [
525 "../..:common_inherited_config",
526 ":isac_fix_config",
527 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000528
529 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000530 ":audio_encoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000531 "../../common_audio",
532 "../../system_wrappers",
533 ]
534
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000535 if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000536 deps += [ ":isac_neon" ]
537
538 # Enable compilation for the ARM v7 Neon instruction set. This is needed
539 # since //build/config/arm.gni only enables Neon for iOS, not Android.
540 # This provides the same functionality as webrtc/build/arm_neon.gypi.
541 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
542 # //build/config/arm.gni instead, to reduce code duplication.
543 # Remove the -mfpu=vfpv3-d16 cflag.
544 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
545 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000546 "-mfpu=neon",
547 ]
548
549 sources += [
550 "codecs/isac/fix/source/lattice_armv7.S",
551 "codecs/isac/fix/source/pitch_filter_armv6.S",
552 ]
553 } else {
554 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
555 }
556
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000557 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000558 sources += [
559 "codecs/isac/fix/source/entropy_coding_mips.c",
560 "codecs/isac/fix/source/filters_mips.c",
561 "codecs/isac/fix/source/lattice_mips.c",
562 "codecs/isac/fix/source/pitch_estimator_mips.c",
563 "codecs/isac/fix/source/transform_mips.c",
564 ]
565 if (mips_dsp_rev > 0) {
566 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
567 }
568 if (mips_dsp_rev > 1) {
569 sources += [
570 "codecs/isac/fix/source/lpc_masking_model_mips.c",
571 "codecs/isac/fix/source/pitch_filter_mips.c",
572 ]
573 } else {
574 sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
575 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000576 } else {
577 sources += [ "codecs/isac/fix/source/pitch_estimator_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000578 }
579
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000580 if (!rtc_build_armv7_neon && current_cpu != "mipsel") {
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000581 sources += [ "codecs/isac/fix/source/lattice_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000582 }
583}
584
kjellander@webrtc.org6b56d072015-03-09 11:08:02 +0000585if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000586 source_set("isac_neon") {
kjellander@webrtc.org6b56d072015-03-09 11:08:02 +0000587 sources = [
588 "codecs/isac/fix/source/entropy_coding_neon.c",
589 "codecs/isac/fix/source/filterbanks_neon.S",
590 "codecs/isac/fix/source/filters_neon.S",
591 "codecs/isac/fix/source/lattice_neon.S",
592 "codecs/isac/fix/source/lpc_masking_model_neon.S",
593 "codecs/isac/fix/source/transform_neon.S",
594 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000595
596 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000597 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000598 ]
599
600 # Disable LTO in audio_processing_neon target due to compiler bug.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000601 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000602 cflags -= [
603 "-flto",
604 "-ffat-lto-objects",
605 ]
606 }
607
kjellander@webrtc.org6b56d072015-03-09 11:08:02 +0000608 # Enable compilation for the ARM v7 Neon instruction set. This is needed
609 # since //build/config/arm.gni only enables Neon for iOS, not Android.
610 # This provides the same functionality as webrtc/build/arm_neon.gypi.
611 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
612 # //build/config/arm.gni instead, to reduce code duplication.
613 # Remove the -mfpu=vfpv3-d16 cflag.
614 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
615 cflags = [
616 "-mfpu=neon",
617 ]
618
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000619 configs += [ "../..:common_config" ]
620 public_configs = [ "../..:common_inherited_config" ]
621
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000622 deps = [ "../../common_audio" ]
623 }
624}
625
626config("pcm16b_config") {
627 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000628 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000629 "codecs/pcm16b/include",
630 ]
631}
632
633source_set("pcm16b") {
634 sources = [
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000635 "codecs/pcm16b/include/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000636 "codecs/pcm16b/include/pcm16b.h",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000637 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000638 "codecs/pcm16b/pcm16b.c",
639 ]
640
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000641 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000642 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000643 ":g711",
644 ]
645
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000646 configs += [ "../..:common_config" ]
647
648 public_configs = [
649 "../..:common_inherited_config",
650 ":pcm16b_config",
651 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000652}
653
654config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000655 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000656}
657
658source_set("webrtc_opus") {
659 sources = [
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000660 "codecs/opus/audio_encoder_opus.cc",
661 "codecs/opus/interface/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000662 "codecs/opus/interface/opus_interface.h",
663 "codecs/opus/opus_inst.h",
664 "codecs/opus/opus_interface.c",
665 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000666
667 deps = [ ":audio_encoder_interface" ]
668
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000669 if (build_with_mozilla) {
670 include_dirs = [ getenv("DIST") + "/include/opus" ]
671 } else {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000672 configs += [ "../..:common_config" ]
673 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000674
kjellander@webrtc.orgce22f132015-02-16 12:47:20 +0000675 deps += [ rtc_opus_dir ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000676 forward_dependent_configs_from = [ rtc_opus_dir ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000677 }
678}
679
680config("neteq_config") {
681 include_dirs = [
682 # Need Opus header files for the audio classifier.
683 "//third_party/opus/src/celt",
684 "//third_party/opus/src/src",
685 ]
686}
687
688source_set("neteq") {
689 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000690 "neteq/interface/neteq.h",
691 "neteq/accelerate.cc",
692 "neteq/accelerate.h",
693 "neteq/audio_classifier.cc",
694 "neteq/audio_classifier.h",
695 "neteq/audio_decoder_impl.cc",
696 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000697 "neteq/audio_multi_vector.cc",
698 "neteq/audio_multi_vector.h",
699 "neteq/audio_vector.cc",
700 "neteq/audio_vector.h",
701 "neteq/background_noise.cc",
702 "neteq/background_noise.h",
703 "neteq/buffer_level_filter.cc",
704 "neteq/buffer_level_filter.h",
705 "neteq/comfort_noise.cc",
706 "neteq/comfort_noise.h",
707 "neteq/decision_logic.cc",
708 "neteq/decision_logic.h",
709 "neteq/decision_logic_fax.cc",
710 "neteq/decision_logic_fax.h",
711 "neteq/decision_logic_normal.cc",
712 "neteq/decision_logic_normal.h",
713 "neteq/decoder_database.cc",
714 "neteq/decoder_database.h",
715 "neteq/defines.h",
716 "neteq/delay_manager.cc",
717 "neteq/delay_manager.h",
718 "neteq/delay_peak_detector.cc",
719 "neteq/delay_peak_detector.h",
720 "neteq/dsp_helper.cc",
721 "neteq/dsp_helper.h",
722 "neteq/dtmf_buffer.cc",
723 "neteq/dtmf_buffer.h",
724 "neteq/dtmf_tone_generator.cc",
725 "neteq/dtmf_tone_generator.h",
726 "neteq/expand.cc",
727 "neteq/expand.h",
728 "neteq/merge.cc",
729 "neteq/merge.h",
730 "neteq/neteq_impl.cc",
731 "neteq/neteq_impl.h",
732 "neteq/neteq.cc",
733 "neteq/statistics_calculator.cc",
734 "neteq/statistics_calculator.h",
735 "neteq/normal.cc",
736 "neteq/normal.h",
737 "neteq/packet_buffer.cc",
738 "neteq/packet_buffer.h",
739 "neteq/payload_splitter.cc",
740 "neteq/payload_splitter.h",
741 "neteq/post_decode_vad.cc",
742 "neteq/post_decode_vad.h",
743 "neteq/preemptive_expand.cc",
744 "neteq/preemptive_expand.h",
745 "neteq/random_vector.cc",
746 "neteq/random_vector.h",
747 "neteq/rtcp.cc",
748 "neteq/rtcp.h",
749 "neteq/sync_buffer.cc",
750 "neteq/sync_buffer.h",
751 "neteq/timestamp_scaler.cc",
752 "neteq/timestamp_scaler.h",
753 "neteq/time_stretch.cc",
754 "neteq/time_stretch.h",
755 ]
756
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000757 configs += [ "../..:common_config" ]
758
759 public_configs = [
760 "../..:common_inherited_config",
761 ":neteq_config",
762 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000763
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000764 if (is_clang) {
765 # Suppress warnings from Chrome's Clang plugins.
766 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
767 configs -= [ "//build/config/clang:find_bad_constructs" ]
768 }
769
770 deps = [
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000771 ":audio_decoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000772 ":cng",
773 ":g711",
774 ":g722",
775 ":ilbc",
776 ":isac",
777 ":isacfix",
778 ":pcm16b",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000779 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000780 "../../common_audio",
781 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000782 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000783
784 defines = []
785
786 if (rtc_include_opus) {
787 defines += [ "WEBRTC_CODEC_OPUS" ]
788 deps += [ ":webrtc_opus" ]
789 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000790}