blob: df565d06f09bda5a170692e478daf389b51b2916 [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",
Henrik Lundin45c64492015-03-30 19:00:44 +020035 "main/acm2/codec_manager.cc",
36 "main/acm2/codec_manager.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000037 "main/acm2/initial_delay_manager.cc",
38 "main/acm2/initial_delay_manager.h",
39 "main/acm2/nack.cc",
40 "main/acm2/nack.h",
41 "main/interface/audio_coding_module.h",
42 "main/interface/audio_coding_module_typedefs.h",
43 ]
44
45 defines = []
46
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000047 configs += [ "../..:common_config" ]
48
49 public_configs = [
50 "../..:common_inherited_config",
51 ":audio_coding_config",
52 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000053
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000054 if (is_win) {
55 cflags = [
56 # TODO(kjellander): Bug 261: fix this warning.
57 "/wd4373", # virtual function override.
58 ]
59 }
60
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000061 deps = [
62 ":cng",
63 ":g711",
64 ":g722",
65 ":ilbc",
66 ":isac",
67 ":isacfix",
68 ":neteq",
69 ":pcm16b",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +000070 ":red",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000071 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000072 "../../common_audio",
73 "../../system_wrappers",
74 ]
75
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000076 if (rtc_include_opus) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000077 defines += [ "WEBRTC_CODEC_OPUS" ]
78 deps += [ ":webrtc_opus" ]
79 }
80}
81
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +000082source_set("audio_decoder_interface") {
83 sources = [
84 "codecs/audio_decoder.cc",
85 "codecs/audio_decoder.h",
86 ]
87 configs += [ "../..:common_config" ]
88 public_configs = [ "../..:common_inherited_config" ]
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000089 deps = [ "../..:webrtc_common" ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +000090}
91
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +000092source_set("audio_encoder_interface") {
93 sources = [
94 "codecs/audio_encoder.cc",
95 "codecs/audio_encoder.h",
96 ]
97 configs += [ "../..:common_config" ]
98 public_configs = [ "../..:common_inherited_config" ]
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000099 deps = [ "../..:webrtc_common" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000100}
101
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000102config("cng_config") {
103 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000104 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105 "codecs/cng/include",
106 ]
107}
108
109source_set("cng") {
110 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000111 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000112 "codecs/cng/cng_helpfuns.c",
113 "codecs/cng/cng_helpfuns.h",
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000114 "codecs/cng/include/audio_encoder_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000115 "codecs/cng/include/webrtc_cng.h",
116 "codecs/cng/webrtc_cng.c",
117 ]
118
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000119 configs += [ "../..:common_config" ]
120
121 public_configs = [
122 "../..:common_inherited_config",
123 ":cng_config",
124 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000125
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000126 deps = [
127 "../../common_audio",
128 ":audio_encoder_interface",
129 ]
130}
131
132config("red_config") {
133 include_dirs = [
134 "codecs/red",
135 ]
136}
137
138source_set("red") {
139 sources = [
140 "codecs/red/audio_encoder_copy_red.cc",
141 "codecs/red/audio_encoder_copy_red.h",
142 ]
143
144 configs += [ "../..:common_config" ]
145
146 public_configs = [
147 "../..:common_inherited_config",
148 ":red_config",
149 ]
150
151 deps = [
152 "../../common_audio",
153 ":audio_encoder_interface",
154 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000155}
156
157config("g711_config") {
158 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000159 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000160 "codecs/g711/include",
161 ]
162}
163
164source_set("g711") {
165 sources = [
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000166 "codecs/g711/include/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000167 "codecs/g711/include/g711_interface.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000168 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000169 "codecs/g711/g711_interface.c",
170 "codecs/g711/g711.c",
171 "codecs/g711/g711.h",
172 ]
173
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000174 configs += [ "../..:common_config" ]
175
176 public_configs = [
177 "../..:common_inherited_config",
178 ":g711_config",
179 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000180
181 deps = [ ":audio_encoder_interface" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000182}
183
184config("g722_config") {
185 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000186 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000187 "codecs/g722/include",
188 ]
189}
190
191source_set("g722") {
192 sources = [
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000193 "codecs/g722/audio_encoder_g722.cc",
194 "codecs/g722/include/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000195 "codecs/g722/include/g722_interface.h",
196 "codecs/g722/g722_interface.c",
197 "codecs/g722/g722_encode.c",
198 "codecs/g722/g722_decode.c",
199 "codecs/g722/g722_enc_dec.h",
200 ]
201
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000202 configs += [ "../..:common_config" ]
203
204 public_configs = [
205 "../..:common_inherited_config",
206 ":g722_config",
207 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000208
209 deps = [ ":audio_encoder_interface" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000210}
211
212config("ilbc_config") {
213 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000214 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000215 "codecs/ilbc/interface",
216 ]
217}
218
219source_set("ilbc") {
220 sources = [
kwiberg@webrtc.orgcb858ba2014-12-08 17:11:44 +0000221 "codecs/ilbc/audio_encoder_ilbc.cc",
222 "codecs/ilbc/include/audio_encoder_ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000223 "codecs/ilbc/abs_quant.c",
224 "codecs/ilbc/abs_quant.h",
225 "codecs/ilbc/abs_quant_loop.c",
226 "codecs/ilbc/abs_quant_loop.h",
227 "codecs/ilbc/augmented_cb_corr.c",
228 "codecs/ilbc/augmented_cb_corr.h",
229 "codecs/ilbc/bw_expand.c",
230 "codecs/ilbc/bw_expand.h",
231 "codecs/ilbc/cb_construct.c",
232 "codecs/ilbc/cb_construct.h",
233 "codecs/ilbc/cb_mem_energy_augmentation.c",
234 "codecs/ilbc/cb_mem_energy_augmentation.h",
235 "codecs/ilbc/cb_mem_energy.c",
236 "codecs/ilbc/cb_mem_energy_calc.c",
237 "codecs/ilbc/cb_mem_energy_calc.h",
238 "codecs/ilbc/cb_mem_energy.h",
239 "codecs/ilbc/cb_search.c",
240 "codecs/ilbc/cb_search_core.c",
241 "codecs/ilbc/cb_search_core.h",
242 "codecs/ilbc/cb_search.h",
243 "codecs/ilbc/cb_update_best_index.c",
244 "codecs/ilbc/cb_update_best_index.h",
245 "codecs/ilbc/chebyshev.c",
246 "codecs/ilbc/chebyshev.h",
247 "codecs/ilbc/comp_corr.c",
248 "codecs/ilbc/comp_corr.h",
249 "codecs/ilbc/constants.c",
250 "codecs/ilbc/constants.h",
251 "codecs/ilbc/create_augmented_vec.c",
252 "codecs/ilbc/create_augmented_vec.h",
253 "codecs/ilbc/decode.c",
254 "codecs/ilbc/decode.h",
255 "codecs/ilbc/decode_residual.c",
256 "codecs/ilbc/decode_residual.h",
257 "codecs/ilbc/decoder_interpolate_lsf.c",
258 "codecs/ilbc/decoder_interpolate_lsf.h",
259 "codecs/ilbc/defines.h",
260 "codecs/ilbc/do_plc.c",
261 "codecs/ilbc/do_plc.h",
262 "codecs/ilbc/encode.c",
263 "codecs/ilbc/encode.h",
264 "codecs/ilbc/energy_inverse.c",
265 "codecs/ilbc/energy_inverse.h",
266 "codecs/ilbc/enhancer.c",
267 "codecs/ilbc/enhancer.h",
268 "codecs/ilbc/enhancer_interface.c",
269 "codecs/ilbc/enhancer_interface.h",
270 "codecs/ilbc/enh_upsample.c",
271 "codecs/ilbc/enh_upsample.h",
272 "codecs/ilbc/filtered_cb_vecs.c",
273 "codecs/ilbc/filtered_cb_vecs.h",
274 "codecs/ilbc/frame_classify.c",
275 "codecs/ilbc/frame_classify.h",
276 "codecs/ilbc/gain_dequant.c",
277 "codecs/ilbc/gain_dequant.h",
278 "codecs/ilbc/gain_quant.c",
279 "codecs/ilbc/gain_quant.h",
280 "codecs/ilbc/get_cd_vec.c",
281 "codecs/ilbc/get_cd_vec.h",
282 "codecs/ilbc/get_lsp_poly.c",
283 "codecs/ilbc/get_lsp_poly.h",
284 "codecs/ilbc/get_sync_seq.c",
285 "codecs/ilbc/get_sync_seq.h",
286 "codecs/ilbc/hp_input.c",
287 "codecs/ilbc/hp_input.h",
288 "codecs/ilbc/hp_output.c",
289 "codecs/ilbc/hp_output.h",
290 "codecs/ilbc/ilbc.c",
291 "codecs/ilbc/index_conv_dec.c",
292 "codecs/ilbc/index_conv_dec.h",
293 "codecs/ilbc/index_conv_enc.c",
294 "codecs/ilbc/index_conv_enc.h",
295 "codecs/ilbc/init_decode.c",
296 "codecs/ilbc/init_decode.h",
297 "codecs/ilbc/init_encode.c",
298 "codecs/ilbc/init_encode.h",
299 "codecs/ilbc/interface/ilbc.h",
300 "codecs/ilbc/interpolate.c",
301 "codecs/ilbc/interpolate.h",
302 "codecs/ilbc/interpolate_samples.c",
303 "codecs/ilbc/interpolate_samples.h",
304 "codecs/ilbc/lpc_encode.c",
305 "codecs/ilbc/lpc_encode.h",
306 "codecs/ilbc/lsf_check.c",
307 "codecs/ilbc/lsf_check.h",
308 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
309 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
310 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
311 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
312 "codecs/ilbc/lsf_to_lsp.c",
313 "codecs/ilbc/lsf_to_lsp.h",
314 "codecs/ilbc/lsf_to_poly.c",
315 "codecs/ilbc/lsf_to_poly.h",
316 "codecs/ilbc/lsp_to_lsf.c",
317 "codecs/ilbc/lsp_to_lsf.h",
318 "codecs/ilbc/my_corr.c",
319 "codecs/ilbc/my_corr.h",
320 "codecs/ilbc/nearest_neighbor.c",
321 "codecs/ilbc/nearest_neighbor.h",
322 "codecs/ilbc/pack_bits.c",
323 "codecs/ilbc/pack_bits.h",
324 "codecs/ilbc/poly_to_lsf.c",
325 "codecs/ilbc/poly_to_lsf.h",
326 "codecs/ilbc/poly_to_lsp.c",
327 "codecs/ilbc/poly_to_lsp.h",
328 "codecs/ilbc/refiner.c",
329 "codecs/ilbc/refiner.h",
330 "codecs/ilbc/simple_interpolate_lsf.c",
331 "codecs/ilbc/simple_interpolate_lsf.h",
332 "codecs/ilbc/simple_lpc_analysis.c",
333 "codecs/ilbc/simple_lpc_analysis.h",
334 "codecs/ilbc/simple_lsf_dequant.c",
335 "codecs/ilbc/simple_lsf_dequant.h",
336 "codecs/ilbc/simple_lsf_quant.c",
337 "codecs/ilbc/simple_lsf_quant.h",
338 "codecs/ilbc/smooth.c",
339 "codecs/ilbc/smooth.h",
340 "codecs/ilbc/smooth_out_data.c",
341 "codecs/ilbc/smooth_out_data.h",
342 "codecs/ilbc/sort_sq.c",
343 "codecs/ilbc/sort_sq.h",
344 "codecs/ilbc/split_vq.c",
345 "codecs/ilbc/split_vq.h",
346 "codecs/ilbc/state_construct.c",
347 "codecs/ilbc/state_construct.h",
348 "codecs/ilbc/state_search.c",
349 "codecs/ilbc/state_search.h",
350 "codecs/ilbc/swap_bytes.c",
351 "codecs/ilbc/swap_bytes.h",
352 "codecs/ilbc/unpack_bits.c",
353 "codecs/ilbc/unpack_bits.h",
354 "codecs/ilbc/vq3.c",
355 "codecs/ilbc/vq3.h",
356 "codecs/ilbc/vq4.c",
357 "codecs/ilbc/vq4.h",
358 "codecs/ilbc/window32_w32.c",
359 "codecs/ilbc/window32_w32.h",
360 "codecs/ilbc/xcorr_coef.c",
361 "codecs/ilbc/xcorr_coef.h",
362 ]
363
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000364 configs += [ "../..:common_config" ]
365
366 public_configs = [
367 "../..:common_inherited_config",
368 ":ilbc_config",
369 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000370
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000371 deps = [
372 "../../common_audio",
373 ":audio_encoder_interface",
374 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000375}
376
377config("isac_config") {
378 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000379 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000380 "codecs/isac/main/interface",
381 ]
382}
383
384source_set("isac") {
385 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000386 "codecs/isac/audio_encoder_isac_t.h",
387 "codecs/isac/audio_encoder_isac_t_impl.h",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000388 "codecs/isac/main/interface/audio_encoder_isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000389 "codecs/isac/main/interface/isac.h",
390 "codecs/isac/main/source/arith_routines.c",
391 "codecs/isac/main/source/arith_routines.h",
392 "codecs/isac/main/source/arith_routines_hist.c",
393 "codecs/isac/main/source/arith_routines_logist.c",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000394 "codecs/isac/main/source/audio_encoder_isac.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000395 "codecs/isac/main/source/bandwidth_estimator.c",
396 "codecs/isac/main/source/bandwidth_estimator.h",
397 "codecs/isac/main/source/codec.h",
398 "codecs/isac/main/source/crc.c",
399 "codecs/isac/main/source/crc.h",
400 "codecs/isac/main/source/decode_bwe.c",
401 "codecs/isac/main/source/decode.c",
402 "codecs/isac/main/source/encode.c",
403 "codecs/isac/main/source/encode_lpc_swb.c",
404 "codecs/isac/main/source/encode_lpc_swb.h",
405 "codecs/isac/main/source/entropy_coding.c",
406 "codecs/isac/main/source/entropy_coding.h",
407 "codecs/isac/main/source/fft.c",
408 "codecs/isac/main/source/fft.h",
409 "codecs/isac/main/source/filterbanks.c",
410 "codecs/isac/main/source/filterbank_tables.c",
411 "codecs/isac/main/source/filterbank_tables.h",
412 "codecs/isac/main/source/filter_functions.c",
413 "codecs/isac/main/source/intialize.c",
414 "codecs/isac/main/source/isac.c",
415 "codecs/isac/main/source/lattice.c",
416 "codecs/isac/main/source/lpc_analysis.c",
417 "codecs/isac/main/source/lpc_analysis.h",
418 "codecs/isac/main/source/lpc_gain_swb_tables.c",
419 "codecs/isac/main/source/lpc_gain_swb_tables.h",
420 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
421 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
422 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
423 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
424 "codecs/isac/main/source/lpc_tables.c",
425 "codecs/isac/main/source/lpc_tables.h",
426 "codecs/isac/main/source/os_specific_inline.h",
427 "codecs/isac/main/source/pitch_estimator.c",
428 "codecs/isac/main/source/pitch_estimator.h",
429 "codecs/isac/main/source/pitch_filter.c",
430 "codecs/isac/main/source/pitch_gain_tables.c",
431 "codecs/isac/main/source/pitch_gain_tables.h",
432 "codecs/isac/main/source/pitch_lag_tables.c",
433 "codecs/isac/main/source/pitch_lag_tables.h",
434 "codecs/isac/main/source/settings.h",
435 "codecs/isac/main/source/spectrum_ar_model_tables.c",
436 "codecs/isac/main/source/spectrum_ar_model_tables.h",
437 "codecs/isac/main/source/structs.h",
438 "codecs/isac/main/source/transform.c",
439 ]
440
441 if (is_linux) {
442 libs = [ "m" ]
443 }
444
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000445 configs += [ "../..:common_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000446
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000447 public_configs = [
448 "../..:common_inherited_config",
449 ":isac_config",
450 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000451
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000452 deps = [
453 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000454 ":audio_encoder_interface",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000455 "../../common_audio",
456 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000457}
458
459config("isac_fix_config") {
460 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000461 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000462 "codecs/isac/fix/interface",
463 ]
464}
465
466source_set("isacfix") {
467 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000468 "codecs/isac/audio_encoder_isac_t.h",
469 "codecs/isac/audio_encoder_isac_t_impl.h",
470 "codecs/isac/fix/interface/audio_encoder_isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000471 "codecs/isac/fix/interface/isacfix.h",
472 "codecs/isac/fix/source/arith_routines.c",
473 "codecs/isac/fix/source/arith_routines_hist.c",
474 "codecs/isac/fix/source/arith_routines_logist.c",
475 "codecs/isac/fix/source/arith_routins.h",
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000476 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000477 "codecs/isac/fix/source/bandwidth_estimator.c",
478 "codecs/isac/fix/source/bandwidth_estimator.h",
479 "codecs/isac/fix/source/codec.h",
480 "codecs/isac/fix/source/decode_bwe.c",
481 "codecs/isac/fix/source/decode.c",
482 "codecs/isac/fix/source/decode_plc.c",
483 "codecs/isac/fix/source/encode.c",
484 "codecs/isac/fix/source/entropy_coding.c",
485 "codecs/isac/fix/source/entropy_coding.h",
486 "codecs/isac/fix/source/fft.c",
487 "codecs/isac/fix/source/fft.h",
488 "codecs/isac/fix/source/filterbanks.c",
489 "codecs/isac/fix/source/filterbank_tables.c",
490 "codecs/isac/fix/source/filterbank_tables.h",
491 "codecs/isac/fix/source/filters.c",
492 "codecs/isac/fix/source/initialize.c",
493 "codecs/isac/fix/source/isacfix.c",
494 "codecs/isac/fix/source/lattice.c",
495 "codecs/isac/fix/source/lpc_masking_model.c",
496 "codecs/isac/fix/source/lpc_masking_model.h",
497 "codecs/isac/fix/source/lpc_tables.c",
498 "codecs/isac/fix/source/lpc_tables.h",
499 "codecs/isac/fix/source/pitch_estimator.c",
500 "codecs/isac/fix/source/pitch_estimator.h",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700501 "codecs/isac/fix/source/pitch_estimator_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000502 "codecs/isac/fix/source/pitch_filter.c",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700503 "codecs/isac/fix/source/pitch_filter_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000504 "codecs/isac/fix/source/pitch_gain_tables.c",
505 "codecs/isac/fix/source/pitch_gain_tables.h",
506 "codecs/isac/fix/source/pitch_lag_tables.c",
507 "codecs/isac/fix/source/pitch_lag_tables.h",
508 "codecs/isac/fix/source/settings.h",
509 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
510 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
511 "codecs/isac/fix/source/structs.h",
512 "codecs/isac/fix/source/transform.c",
513 "codecs/isac/fix/source/transform_tables.c",
514 ]
515
516 if (!is_win) {
517 defines = [ "WEBRTC_LINUX" ]
518 }
519
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000520 configs += [ "../..:common_config" ]
521
522 public_configs = [
523 "../..:common_inherited_config",
524 ":isac_fix_config",
525 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000526
527 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000528 ":audio_encoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000529 "../../common_audio",
530 "../../system_wrappers",
531 ]
532
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800533 if (current_cpu == "arm64") {
534 deps += [ ":isac_neon" ]
535 }
536
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000537 if (rtc_build_armv7_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000538 deps += [ ":isac_neon" ]
539
540 # Enable compilation for the ARM v7 Neon instruction set. This is needed
541 # since //build/config/arm.gni only enables Neon for iOS, not Android.
542 # This provides the same functionality as webrtc/build/arm_neon.gypi.
543 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
544 # //build/config/arm.gni instead, to reduce code duplication.
545 # Remove the -mfpu=vfpv3-d16 cflag.
546 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
547 cflags = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000548 "-mfpu=neon",
549 ]
550
551 sources += [
552 "codecs/isac/fix/source/lattice_armv7.S",
553 "codecs/isac/fix/source/pitch_filter_armv6.S",
554 ]
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700555 sources -= [
556 "codecs/isac/fix/source/pitch_filter_c.c",
557 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000558 }
559
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000560 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000561 sources += [
562 "codecs/isac/fix/source/entropy_coding_mips.c",
563 "codecs/isac/fix/source/filters_mips.c",
564 "codecs/isac/fix/source/lattice_mips.c",
565 "codecs/isac/fix/source/pitch_estimator_mips.c",
566 "codecs/isac/fix/source/transform_mips.c",
567 ]
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700568 sources -= [
569 "codecs/isac/fix/source/pitch_estimator_c.c"
570 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000571 if (mips_dsp_rev > 0) {
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700572 sources += [
573 "codecs/isac/fix/source/filterbanks_mips.c"
574 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000575 }
576 if (mips_dsp_rev > 1) {
577 sources += [
578 "codecs/isac/fix/source/lpc_masking_model_mips.c",
579 "codecs/isac/fix/source/pitch_filter_mips.c",
580 ]
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700581 sources -= [
582 "codecs/isac/fix/source/pitch_filter_c.c"
583 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000584 }
585 }
586
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000587 if (!rtc_build_armv7_neon && current_cpu != "mipsel") {
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000588 sources += [ "codecs/isac/fix/source/lattice_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000589 }
590}
591
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800592if (rtc_build_armv7_neon || current_cpu == "arm64") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000593 source_set("isac_neon") {
Zhongwei Yaof242e662015-05-06 16:39:17 +0800594 sources = [
595 "codecs/isac/fix/source/entropy_coding_neon.c",
596 "codecs/isac/fix/source/filters_neon.c",
597 "codecs/isac/fix/source/lattice_neon.c",
598 "codecs/isac/fix/source/transform_neon.c",
599 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000600
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800601 if (rtc_build_armv7_neon) {
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800602 # Enable compilation for the ARM v7 Neon instruction set. This is needed
603 # since //build/config/arm.gni only enables Neon for iOS, not Android.
604 # This provides the same functionality as webrtc/build/arm_neon.gypi.
605 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
606 # //build/config/arm.gni instead, to reduce code duplication.
607 # Remove the -mfpu=vfpv3-d16 cflag.
608 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
609 cflags = [
610 "-mfpu=neon",
611 ]
612 }
613
Zhongwei Yaof242e662015-05-06 16:39:17 +0800614 if (current_cpu != "arm64" || !is_clang) {
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800615 # Disable AllpassFilter2FixDec16Neon function due to a clang bug.
616 # Refer more details at:
617 # https://code.google.com/p/webrtc/issues/detail?id=4567
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800618 sources += [ "codecs/isac/fix/source/filterbanks_neon.c", ]
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800619 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000620
621 # Disable LTO in audio_processing_neon target due to compiler bug.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000622 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000623 cflags -= [
624 "-flto",
625 "-ffat-lto-objects",
626 ]
627 }
628
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000629 configs += [ "../..:common_config" ]
630 public_configs = [ "../..:common_inherited_config" ]
631
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000632 deps = [ "../../common_audio" ]
633 }
634}
635
636config("pcm16b_config") {
637 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000638 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000639 "codecs/pcm16b/include",
640 ]
641}
642
643source_set("pcm16b") {
644 sources = [
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000645 "codecs/pcm16b/include/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000646 "codecs/pcm16b/include/pcm16b.h",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000647 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000648 "codecs/pcm16b/pcm16b.c",
649 ]
650
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000651 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000652 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000653 ":g711",
654 ]
655
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000656 configs += [ "../..:common_config" ]
657
658 public_configs = [
659 "../..:common_inherited_config",
660 ":pcm16b_config",
661 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000662}
663
664config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000665 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000666}
667
668source_set("webrtc_opus") {
669 sources = [
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000670 "codecs/opus/audio_encoder_opus.cc",
671 "codecs/opus/interface/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000672 "codecs/opus/interface/opus_interface.h",
673 "codecs/opus/opus_inst.h",
674 "codecs/opus/opus_interface.c",
675 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000676
677 deps = [ ":audio_encoder_interface" ]
678
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000679 if (rtc_build_opus) {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000680 configs += [ "../..:common_config" ]
681 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000682
kjellander@webrtc.orgce22f132015-02-16 12:47:20 +0000683 deps += [ rtc_opus_dir ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000684 forward_dependent_configs_from = [ rtc_opus_dir ]
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000685 } else if (build_with_mozilla) {
686 include_dirs = [ getenv("DIST") + "/include/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000687 }
688}
689
690config("neteq_config") {
691 include_dirs = [
692 # Need Opus header files for the audio classifier.
693 "//third_party/opus/src/celt",
694 "//third_party/opus/src/src",
695 ]
696}
697
698source_set("neteq") {
699 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000700 "neteq/interface/neteq.h",
701 "neteq/accelerate.cc",
702 "neteq/accelerate.h",
703 "neteq/audio_classifier.cc",
704 "neteq/audio_classifier.h",
705 "neteq/audio_decoder_impl.cc",
706 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000707 "neteq/audio_multi_vector.cc",
708 "neteq/audio_multi_vector.h",
709 "neteq/audio_vector.cc",
710 "neteq/audio_vector.h",
711 "neteq/background_noise.cc",
712 "neteq/background_noise.h",
713 "neteq/buffer_level_filter.cc",
714 "neteq/buffer_level_filter.h",
715 "neteq/comfort_noise.cc",
716 "neteq/comfort_noise.h",
717 "neteq/decision_logic.cc",
718 "neteq/decision_logic.h",
719 "neteq/decision_logic_fax.cc",
720 "neteq/decision_logic_fax.h",
721 "neteq/decision_logic_normal.cc",
722 "neteq/decision_logic_normal.h",
723 "neteq/decoder_database.cc",
724 "neteq/decoder_database.h",
725 "neteq/defines.h",
726 "neteq/delay_manager.cc",
727 "neteq/delay_manager.h",
728 "neteq/delay_peak_detector.cc",
729 "neteq/delay_peak_detector.h",
730 "neteq/dsp_helper.cc",
731 "neteq/dsp_helper.h",
732 "neteq/dtmf_buffer.cc",
733 "neteq/dtmf_buffer.h",
734 "neteq/dtmf_tone_generator.cc",
735 "neteq/dtmf_tone_generator.h",
736 "neteq/expand.cc",
737 "neteq/expand.h",
738 "neteq/merge.cc",
739 "neteq/merge.h",
740 "neteq/neteq_impl.cc",
741 "neteq/neteq_impl.h",
742 "neteq/neteq.cc",
743 "neteq/statistics_calculator.cc",
744 "neteq/statistics_calculator.h",
745 "neteq/normal.cc",
746 "neteq/normal.h",
747 "neteq/packet_buffer.cc",
748 "neteq/packet_buffer.h",
749 "neteq/payload_splitter.cc",
750 "neteq/payload_splitter.h",
751 "neteq/post_decode_vad.cc",
752 "neteq/post_decode_vad.h",
753 "neteq/preemptive_expand.cc",
754 "neteq/preemptive_expand.h",
755 "neteq/random_vector.cc",
756 "neteq/random_vector.h",
757 "neteq/rtcp.cc",
758 "neteq/rtcp.h",
759 "neteq/sync_buffer.cc",
760 "neteq/sync_buffer.h",
761 "neteq/timestamp_scaler.cc",
762 "neteq/timestamp_scaler.h",
763 "neteq/time_stretch.cc",
764 "neteq/time_stretch.h",
765 ]
766
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000767 configs += [ "../..:common_config" ]
768
769 public_configs = [
770 "../..:common_inherited_config",
771 ":neteq_config",
772 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000773
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000774 deps = [
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000775 ":audio_decoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000776 ":cng",
777 ":g711",
778 ":g722",
779 ":ilbc",
780 ":isac",
781 ":isacfix",
782 ":pcm16b",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000783 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000784 "../../common_audio",
785 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000786 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000787
788 defines = []
789
790 if (rtc_include_opus) {
791 defines += [ "WEBRTC_CODEC_OPUS" ]
792 deps += [ ":webrtc_opus" ]
793 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000794}