blob: 15ea369005b0779acbc381edfe8bfeac31749bb3 [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")
Ivo Creusen747d5f62015-06-23 10:08:11 +020010import("//third_party/protobuf/proto_library.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000011import("../../build/webrtc.gni")
12
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000013config("audio_coding_config") {
14 include_dirs = [
15 "main/interface",
16 "../interface",
17 ]
18}
19
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000020source_set("audio_coding") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000021 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000022 "main/acm2/acm_codec_database.cc",
23 "main/acm2/acm_codec_database.h",
24 "main/acm2/acm_common_defs.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000025 "main/acm2/acm_receiver.cc",
26 "main/acm2/acm_receiver.h",
27 "main/acm2/acm_resampler.cc",
28 "main/acm2/acm_resampler.h",
29 "main/acm2/audio_coding_module.cc",
30 "main/acm2/audio_coding_module_impl.cc",
31 "main/acm2/audio_coding_module_impl.h",
32 "main/acm2/call_statistics.cc",
33 "main/acm2/call_statistics.h",
Henrik Lundin45c64492015-03-30 19:00:44 +020034 "main/acm2/codec_manager.cc",
35 "main/acm2/codec_manager.h",
Karl Wiberg2ea71c32015-05-07 15:49:23 +020036 "main/acm2/codec_owner.cc",
37 "main/acm2/codec_owner.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000038 "main/acm2/initial_delay_manager.cc",
39 "main/acm2/initial_delay_manager.h",
40 "main/acm2/nack.cc",
41 "main/acm2/nack.h",
42 "main/interface/audio_coding_module.h",
43 "main/interface/audio_coding_module_typedefs.h",
44 ]
45
46 defines = []
47
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000048 configs += [ "../..:common_config" ]
49
50 public_configs = [
51 "../..:common_inherited_config",
52 ":audio_coding_config",
53 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000054
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000055 if (is_win) {
56 cflags = [
57 # TODO(kjellander): Bug 261: fix this warning.
58 "/wd4373", # virtual function override.
59 ]
60 }
61
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000062 deps = [
63 ":cng",
64 ":g711",
65 ":g722",
66 ":ilbc",
67 ":isac",
Zeke Chin786dbdc2015-06-10 13:45:08 -070068 ":isac_fix",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000069 ":neteq",
70 ":pcm16b",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +000071 ":red",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000072 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000073 "../../common_audio",
74 "../../system_wrappers",
75 ]
76
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000077 if (rtc_include_opus) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000078 defines += [ "WEBRTC_CODEC_OPUS" ]
79 deps += [ ":webrtc_opus" ]
80 }
81}
82
Ivo Creusen747d5f62015-06-23 10:08:11 +020083proto_library("acm_dump_proto") {
84 sources = [
85 "main/acm2/dump.proto",
86 ]
87 proto_out_dir = "webrtc/audio_coding"
88}
89
90source_set("acm_dump") {
91 sources = [
92 "main/acm2/acm_dump.cc",
93 "main/acm2/acm_dump.h",
94 ]
95
96 defines = []
97
98 configs += [ "../..:common_config" ]
99
100 public_configs = [ "../..:common_inherited_config" ]
101
102 deps = [
103 ":acm_dump_proto",
104 "../..:webrtc_common",
105 ]
106
107 if (rtc_enable_protobuf) {
108 defines += [ "RTC_AUDIOCODING_DEBUG_DUMP" ]
109 }
110}
111
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000112source_set("audio_decoder_interface") {
113 sources = [
114 "codecs/audio_decoder.cc",
115 "codecs/audio_decoder.h",
116 ]
117 configs += [ "../..:common_config" ]
118 public_configs = [ "../..:common_inherited_config" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200119 deps = [
120 "../..:webrtc_common",
121 ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000122}
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" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200131 deps = [
132 "../..:webrtc_common",
133 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000134}
135
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000136config("cng_config") {
137 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000138 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000139 "codecs/cng/include",
140 ]
141}
142
143source_set("cng") {
144 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000145 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000146 "codecs/cng/cng_helpfuns.c",
147 "codecs/cng/cng_helpfuns.h",
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000148 "codecs/cng/include/audio_encoder_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000149 "codecs/cng/include/webrtc_cng.h",
150 "codecs/cng/webrtc_cng.c",
151 ]
152
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000153 configs += [ "../..:common_config" ]
154
155 public_configs = [
156 "../..:common_inherited_config",
157 ":cng_config",
158 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000159
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000160 deps = [
161 "../../common_audio",
162 ":audio_encoder_interface",
163 ]
164}
165
166config("red_config") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200167 include_dirs = [ "codecs/red" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000168}
169
170source_set("red") {
171 sources = [
172 "codecs/red/audio_encoder_copy_red.cc",
173 "codecs/red/audio_encoder_copy_red.h",
174 ]
175
176 configs += [ "../..:common_config" ]
177
178 public_configs = [
179 "../..:common_inherited_config",
180 ":red_config",
181 ]
182
183 deps = [
184 "../../common_audio",
185 ":audio_encoder_interface",
186 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000187}
188
189config("g711_config") {
190 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000191 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000192 "codecs/g711/include",
193 ]
194}
195
196source_set("g711") {
197 sources = [
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000198 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000199 "codecs/g711/g711.c",
200 "codecs/g711/g711.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200201 "codecs/g711/g711_interface.c",
202 "codecs/g711/include/audio_encoder_pcm.h",
203 "codecs/g711/include/g711_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000204 ]
205
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000206 configs += [ "../..:common_config" ]
207
208 public_configs = [
209 "../..:common_inherited_config",
210 ":g711_config",
211 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000212
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200213 deps = [
214 ":audio_encoder_interface",
215 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000216}
217
218config("g722_config") {
219 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000220 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000221 "codecs/g722/include",
222 ]
223}
224
225source_set("g722") {
226 sources = [
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000227 "codecs/g722/audio_encoder_g722.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000228 "codecs/g722/g722_decode.c",
229 "codecs/g722/g722_enc_dec.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200230 "codecs/g722/g722_encode.c",
231 "codecs/g722/g722_interface.c",
232 "codecs/g722/include/audio_encoder_g722.h",
233 "codecs/g722/include/g722_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000234 ]
235
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000236 configs += [ "../..:common_config" ]
237
238 public_configs = [
239 "../..:common_inherited_config",
240 ":g722_config",
241 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000242
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200243 deps = [
244 ":audio_encoder_interface",
245 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000246}
247
248config("ilbc_config") {
249 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000250 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000251 "codecs/ilbc/interface",
252 ]
253}
254
255source_set("ilbc") {
256 sources = [
257 "codecs/ilbc/abs_quant.c",
258 "codecs/ilbc/abs_quant.h",
259 "codecs/ilbc/abs_quant_loop.c",
260 "codecs/ilbc/abs_quant_loop.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200261 "codecs/ilbc/audio_encoder_ilbc.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000262 "codecs/ilbc/augmented_cb_corr.c",
263 "codecs/ilbc/augmented_cb_corr.h",
264 "codecs/ilbc/bw_expand.c",
265 "codecs/ilbc/bw_expand.h",
266 "codecs/ilbc/cb_construct.c",
267 "codecs/ilbc/cb_construct.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200268 "codecs/ilbc/cb_mem_energy.c",
269 "codecs/ilbc/cb_mem_energy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000270 "codecs/ilbc/cb_mem_energy_augmentation.c",
271 "codecs/ilbc/cb_mem_energy_augmentation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000272 "codecs/ilbc/cb_mem_energy_calc.c",
273 "codecs/ilbc/cb_mem_energy_calc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000274 "codecs/ilbc/cb_search.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200275 "codecs/ilbc/cb_search.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000276 "codecs/ilbc/cb_search_core.c",
277 "codecs/ilbc/cb_search_core.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000278 "codecs/ilbc/cb_update_best_index.c",
279 "codecs/ilbc/cb_update_best_index.h",
280 "codecs/ilbc/chebyshev.c",
281 "codecs/ilbc/chebyshev.h",
282 "codecs/ilbc/comp_corr.c",
283 "codecs/ilbc/comp_corr.h",
284 "codecs/ilbc/constants.c",
285 "codecs/ilbc/constants.h",
286 "codecs/ilbc/create_augmented_vec.c",
287 "codecs/ilbc/create_augmented_vec.h",
288 "codecs/ilbc/decode.c",
289 "codecs/ilbc/decode.h",
290 "codecs/ilbc/decode_residual.c",
291 "codecs/ilbc/decode_residual.h",
292 "codecs/ilbc/decoder_interpolate_lsf.c",
293 "codecs/ilbc/decoder_interpolate_lsf.h",
294 "codecs/ilbc/defines.h",
295 "codecs/ilbc/do_plc.c",
296 "codecs/ilbc/do_plc.h",
297 "codecs/ilbc/encode.c",
298 "codecs/ilbc/encode.h",
299 "codecs/ilbc/energy_inverse.c",
300 "codecs/ilbc/energy_inverse.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200301 "codecs/ilbc/enh_upsample.c",
302 "codecs/ilbc/enh_upsample.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000303 "codecs/ilbc/enhancer.c",
304 "codecs/ilbc/enhancer.h",
305 "codecs/ilbc/enhancer_interface.c",
306 "codecs/ilbc/enhancer_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000307 "codecs/ilbc/filtered_cb_vecs.c",
308 "codecs/ilbc/filtered_cb_vecs.h",
309 "codecs/ilbc/frame_classify.c",
310 "codecs/ilbc/frame_classify.h",
311 "codecs/ilbc/gain_dequant.c",
312 "codecs/ilbc/gain_dequant.h",
313 "codecs/ilbc/gain_quant.c",
314 "codecs/ilbc/gain_quant.h",
315 "codecs/ilbc/get_cd_vec.c",
316 "codecs/ilbc/get_cd_vec.h",
317 "codecs/ilbc/get_lsp_poly.c",
318 "codecs/ilbc/get_lsp_poly.h",
319 "codecs/ilbc/get_sync_seq.c",
320 "codecs/ilbc/get_sync_seq.h",
321 "codecs/ilbc/hp_input.c",
322 "codecs/ilbc/hp_input.h",
323 "codecs/ilbc/hp_output.c",
324 "codecs/ilbc/hp_output.h",
325 "codecs/ilbc/ilbc.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200326 "codecs/ilbc/include/audio_encoder_ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000327 "codecs/ilbc/index_conv_dec.c",
328 "codecs/ilbc/index_conv_dec.h",
329 "codecs/ilbc/index_conv_enc.c",
330 "codecs/ilbc/index_conv_enc.h",
331 "codecs/ilbc/init_decode.c",
332 "codecs/ilbc/init_decode.h",
333 "codecs/ilbc/init_encode.c",
334 "codecs/ilbc/init_encode.h",
335 "codecs/ilbc/interface/ilbc.h",
336 "codecs/ilbc/interpolate.c",
337 "codecs/ilbc/interpolate.h",
338 "codecs/ilbc/interpolate_samples.c",
339 "codecs/ilbc/interpolate_samples.h",
340 "codecs/ilbc/lpc_encode.c",
341 "codecs/ilbc/lpc_encode.h",
342 "codecs/ilbc/lsf_check.c",
343 "codecs/ilbc/lsf_check.h",
344 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
345 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
346 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
347 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
348 "codecs/ilbc/lsf_to_lsp.c",
349 "codecs/ilbc/lsf_to_lsp.h",
350 "codecs/ilbc/lsf_to_poly.c",
351 "codecs/ilbc/lsf_to_poly.h",
352 "codecs/ilbc/lsp_to_lsf.c",
353 "codecs/ilbc/lsp_to_lsf.h",
354 "codecs/ilbc/my_corr.c",
355 "codecs/ilbc/my_corr.h",
356 "codecs/ilbc/nearest_neighbor.c",
357 "codecs/ilbc/nearest_neighbor.h",
358 "codecs/ilbc/pack_bits.c",
359 "codecs/ilbc/pack_bits.h",
360 "codecs/ilbc/poly_to_lsf.c",
361 "codecs/ilbc/poly_to_lsf.h",
362 "codecs/ilbc/poly_to_lsp.c",
363 "codecs/ilbc/poly_to_lsp.h",
364 "codecs/ilbc/refiner.c",
365 "codecs/ilbc/refiner.h",
366 "codecs/ilbc/simple_interpolate_lsf.c",
367 "codecs/ilbc/simple_interpolate_lsf.h",
368 "codecs/ilbc/simple_lpc_analysis.c",
369 "codecs/ilbc/simple_lpc_analysis.h",
370 "codecs/ilbc/simple_lsf_dequant.c",
371 "codecs/ilbc/simple_lsf_dequant.h",
372 "codecs/ilbc/simple_lsf_quant.c",
373 "codecs/ilbc/simple_lsf_quant.h",
374 "codecs/ilbc/smooth.c",
375 "codecs/ilbc/smooth.h",
376 "codecs/ilbc/smooth_out_data.c",
377 "codecs/ilbc/smooth_out_data.h",
378 "codecs/ilbc/sort_sq.c",
379 "codecs/ilbc/sort_sq.h",
380 "codecs/ilbc/split_vq.c",
381 "codecs/ilbc/split_vq.h",
382 "codecs/ilbc/state_construct.c",
383 "codecs/ilbc/state_construct.h",
384 "codecs/ilbc/state_search.c",
385 "codecs/ilbc/state_search.h",
386 "codecs/ilbc/swap_bytes.c",
387 "codecs/ilbc/swap_bytes.h",
388 "codecs/ilbc/unpack_bits.c",
389 "codecs/ilbc/unpack_bits.h",
390 "codecs/ilbc/vq3.c",
391 "codecs/ilbc/vq3.h",
392 "codecs/ilbc/vq4.c",
393 "codecs/ilbc/vq4.h",
394 "codecs/ilbc/window32_w32.c",
395 "codecs/ilbc/window32_w32.h",
396 "codecs/ilbc/xcorr_coef.c",
397 "codecs/ilbc/xcorr_coef.h",
398 ]
399
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000400 configs += [ "../..:common_config" ]
401
402 public_configs = [
403 "../..:common_inherited_config",
404 ":ilbc_config",
405 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000406
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000407 deps = [
408 "../../common_audio",
409 ":audio_encoder_interface",
410 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000411}
412
413config("isac_config") {
414 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000415 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000416 "codecs/isac/main/interface",
417 ]
418}
419
420source_set("isac") {
421 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000422 "codecs/isac/audio_encoder_isac_t.h",
423 "codecs/isac/audio_encoder_isac_t_impl.h",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000424 "codecs/isac/main/interface/audio_encoder_isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000425 "codecs/isac/main/interface/isac.h",
426 "codecs/isac/main/source/arith_routines.c",
427 "codecs/isac/main/source/arith_routines.h",
428 "codecs/isac/main/source/arith_routines_hist.c",
429 "codecs/isac/main/source/arith_routines_logist.c",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000430 "codecs/isac/main/source/audio_encoder_isac.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000431 "codecs/isac/main/source/bandwidth_estimator.c",
432 "codecs/isac/main/source/bandwidth_estimator.h",
433 "codecs/isac/main/source/codec.h",
434 "codecs/isac/main/source/crc.c",
435 "codecs/isac/main/source/crc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000436 "codecs/isac/main/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200437 "codecs/isac/main/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000438 "codecs/isac/main/source/encode.c",
439 "codecs/isac/main/source/encode_lpc_swb.c",
440 "codecs/isac/main/source/encode_lpc_swb.h",
441 "codecs/isac/main/source/entropy_coding.c",
442 "codecs/isac/main/source/entropy_coding.h",
443 "codecs/isac/main/source/fft.c",
444 "codecs/isac/main/source/fft.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200445 "codecs/isac/main/source/filter_functions.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000446 "codecs/isac/main/source/filterbank_tables.c",
447 "codecs/isac/main/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200448 "codecs/isac/main/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000449 "codecs/isac/main/source/intialize.c",
450 "codecs/isac/main/source/isac.c",
451 "codecs/isac/main/source/lattice.c",
452 "codecs/isac/main/source/lpc_analysis.c",
453 "codecs/isac/main/source/lpc_analysis.h",
454 "codecs/isac/main/source/lpc_gain_swb_tables.c",
455 "codecs/isac/main/source/lpc_gain_swb_tables.h",
456 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
457 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
458 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
459 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
460 "codecs/isac/main/source/lpc_tables.c",
461 "codecs/isac/main/source/lpc_tables.h",
462 "codecs/isac/main/source/os_specific_inline.h",
463 "codecs/isac/main/source/pitch_estimator.c",
464 "codecs/isac/main/source/pitch_estimator.h",
465 "codecs/isac/main/source/pitch_filter.c",
466 "codecs/isac/main/source/pitch_gain_tables.c",
467 "codecs/isac/main/source/pitch_gain_tables.h",
468 "codecs/isac/main/source/pitch_lag_tables.c",
469 "codecs/isac/main/source/pitch_lag_tables.h",
470 "codecs/isac/main/source/settings.h",
471 "codecs/isac/main/source/spectrum_ar_model_tables.c",
472 "codecs/isac/main/source/spectrum_ar_model_tables.h",
473 "codecs/isac/main/source/structs.h",
474 "codecs/isac/main/source/transform.c",
475 ]
476
477 if (is_linux) {
478 libs = [ "m" ]
479 }
480
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000481 configs += [ "../..:common_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000482
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000483 public_configs = [
484 "../..:common_inherited_config",
485 ":isac_config",
486 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000487
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000488 deps = [
489 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000490 ":audio_encoder_interface",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000491 "../../common_audio",
492 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000493}
494
495config("isac_fix_config") {
496 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000497 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000498 "codecs/isac/fix/interface",
499 ]
500}
501
Zeke Chin786dbdc2015-06-10 13:45:08 -0700502source_set("isac_fix") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000503 sources = [
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000504 "codecs/isac/audio_encoder_isac_t.h",
505 "codecs/isac/audio_encoder_isac_t_impl.h",
506 "codecs/isac/fix/interface/audio_encoder_isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000507 "codecs/isac/fix/interface/isacfix.h",
508 "codecs/isac/fix/source/arith_routines.c",
509 "codecs/isac/fix/source/arith_routines_hist.c",
510 "codecs/isac/fix/source/arith_routines_logist.c",
511 "codecs/isac/fix/source/arith_routins.h",
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000512 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000513 "codecs/isac/fix/source/bandwidth_estimator.c",
514 "codecs/isac/fix/source/bandwidth_estimator.h",
515 "codecs/isac/fix/source/codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000516 "codecs/isac/fix/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200517 "codecs/isac/fix/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000518 "codecs/isac/fix/source/decode_plc.c",
519 "codecs/isac/fix/source/encode.c",
520 "codecs/isac/fix/source/entropy_coding.c",
521 "codecs/isac/fix/source/entropy_coding.h",
522 "codecs/isac/fix/source/fft.c",
523 "codecs/isac/fix/source/fft.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000524 "codecs/isac/fix/source/filterbank_tables.c",
525 "codecs/isac/fix/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200526 "codecs/isac/fix/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000527 "codecs/isac/fix/source/filters.c",
528 "codecs/isac/fix/source/initialize.c",
529 "codecs/isac/fix/source/isacfix.c",
530 "codecs/isac/fix/source/lattice.c",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700531 "codecs/isac/fix/source/lattice_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000532 "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",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700538 "codecs/isac/fix/source/pitch_estimator_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000539 "codecs/isac/fix/source/pitch_filter.c",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700540 "codecs/isac/fix/source/pitch_filter_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000541 "codecs/isac/fix/source/pitch_gain_tables.c",
542 "codecs/isac/fix/source/pitch_gain_tables.h",
543 "codecs/isac/fix/source/pitch_lag_tables.c",
544 "codecs/isac/fix/source/pitch_lag_tables.h",
545 "codecs/isac/fix/source/settings.h",
546 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
547 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
548 "codecs/isac/fix/source/structs.h",
549 "codecs/isac/fix/source/transform.c",
550 "codecs/isac/fix/source/transform_tables.c",
551 ]
552
553 if (!is_win) {
554 defines = [ "WEBRTC_LINUX" ]
555 }
556
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000557 configs += [ "../..:common_config" ]
558
559 public_configs = [
560 "../..:common_inherited_config",
561 ":isac_fix_config",
562 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000563
564 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000565 ":audio_encoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000566 "../../common_audio",
567 "../../system_wrappers",
568 ]
569
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700570 if (rtc_build_with_neon) {
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800571 deps += [ ":isac_neon" ]
572 }
573
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700574 if (current_cpu == "arm" && arm_version >= 7) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000575 sources += [
576 "codecs/isac/fix/source/lattice_armv7.S",
577 "codecs/isac/fix/source/pitch_filter_armv6.S",
578 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700579 sources -= [
580 "codecs/isac/fix/source/lattice_c.c",
581 "codecs/isac/fix/source/pitch_filter_c.c",
582 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000583 }
584
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000585 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000586 sources += [
587 "codecs/isac/fix/source/entropy_coding_mips.c",
588 "codecs/isac/fix/source/filters_mips.c",
589 "codecs/isac/fix/source/lattice_mips.c",
590 "codecs/isac/fix/source/pitch_estimator_mips.c",
591 "codecs/isac/fix/source/transform_mips.c",
592 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700593 sources -= [
594 "codecs/isac/fix/source/lattice_c.c",
595 "codecs/isac/fix/source/pitch_estimator_c.c",
596 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000597 if (mips_dsp_rev > 0) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200598 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000599 }
600 if (mips_dsp_rev > 1) {
601 sources += [
602 "codecs/isac/fix/source/lpc_masking_model_mips.c",
603 "codecs/isac/fix/source/pitch_filter_mips.c",
604 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200605 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000606 }
607 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000608}
609
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700610if (rtc_build_with_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000611 source_set("isac_neon") {
Zhongwei Yaof242e662015-05-06 16:39:17 +0800612 sources = [
613 "codecs/isac/fix/source/entropy_coding_neon.c",
614 "codecs/isac/fix/source/filters_neon.c",
615 "codecs/isac/fix/source/lattice_neon.c",
616 "codecs/isac/fix/source/transform_neon.c",
617 ]
Zhongwei Yaof242e662015-05-06 16:39:17 +0800618 if (current_cpu != "arm64" || !is_clang) {
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800619 # Disable AllpassFilter2FixDec16Neon function due to a clang bug.
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700620 # For more details refer to:
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800621 # https://code.google.com/p/webrtc/issues/detail?id=4567
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200622 sources += [ "codecs/isac/fix/source/filterbanks_neon.c" ]
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800623 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000624
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700625 if (current_cpu != "arm64") {
626 # Enable compilation for the NEON instruction set. This is needed
627 # since //build/config/arm.gni only enables NEON for iOS, not Android.
628 # This provides the same functionality as webrtc/build/arm_neon.gypi.
629 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
630 cflags = [ "-mfpu=neon" ]
631 }
632
633 # Disable LTO on NEON targets due to compiler bug.
634 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000635 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000636 cflags -= [
637 "-flto",
638 "-ffat-lto-objects",
639 ]
640 }
641
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000642 configs += [ "../..:common_config" ]
643 public_configs = [ "../..:common_inherited_config" ]
644
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200645 deps = [
646 "../../common_audio",
647 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000648 }
649}
650
651config("pcm16b_config") {
652 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000653 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000654 "codecs/pcm16b/include",
655 ]
656}
657
658source_set("pcm16b") {
659 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200660 "codecs/pcm16b/audio_encoder_pcm16b.cc",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000661 "codecs/pcm16b/include/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000662 "codecs/pcm16b/include/pcm16b.h",
663 "codecs/pcm16b/pcm16b.c",
664 ]
665
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000666 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000667 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000668 ":g711",
669 ]
670
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000671 configs += [ "../..:common_config" ]
672
673 public_configs = [
674 "../..:common_inherited_config",
675 ":pcm16b_config",
676 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000677}
678
679config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000680 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000681}
682
683source_set("webrtc_opus") {
684 sources = [
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000685 "codecs/opus/audio_encoder_opus.cc",
686 "codecs/opus/interface/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000687 "codecs/opus/interface/opus_interface.h",
688 "codecs/opus/opus_inst.h",
689 "codecs/opus/opus_interface.c",
690 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000691
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200692 deps = [
693 ":audio_encoder_interface",
694 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000695
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000696 if (rtc_build_opus) {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000697 configs += [ "../..:common_config" ]
698 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000699
kjellander@webrtc.orgce22f132015-02-16 12:47:20 +0000700 deps += [ rtc_opus_dir ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000701 forward_dependent_configs_from = [ rtc_opus_dir ]
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000702 } else if (build_with_mozilla) {
703 include_dirs = [ getenv("DIST") + "/include/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000704 }
705}
706
707config("neteq_config") {
708 include_dirs = [
709 # Need Opus header files for the audio classifier.
710 "//third_party/opus/src/celt",
711 "//third_party/opus/src/src",
712 ]
713}
714
715source_set("neteq") {
716 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000717 "neteq/accelerate.cc",
718 "neteq/accelerate.h",
719 "neteq/audio_classifier.cc",
720 "neteq/audio_classifier.h",
721 "neteq/audio_decoder_impl.cc",
722 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000723 "neteq/audio_multi_vector.cc",
724 "neteq/audio_multi_vector.h",
725 "neteq/audio_vector.cc",
726 "neteq/audio_vector.h",
727 "neteq/background_noise.cc",
728 "neteq/background_noise.h",
729 "neteq/buffer_level_filter.cc",
730 "neteq/buffer_level_filter.h",
731 "neteq/comfort_noise.cc",
732 "neteq/comfort_noise.h",
733 "neteq/decision_logic.cc",
734 "neteq/decision_logic.h",
735 "neteq/decision_logic_fax.cc",
736 "neteq/decision_logic_fax.h",
737 "neteq/decision_logic_normal.cc",
738 "neteq/decision_logic_normal.h",
739 "neteq/decoder_database.cc",
740 "neteq/decoder_database.h",
741 "neteq/defines.h",
742 "neteq/delay_manager.cc",
743 "neteq/delay_manager.h",
744 "neteq/delay_peak_detector.cc",
745 "neteq/delay_peak_detector.h",
746 "neteq/dsp_helper.cc",
747 "neteq/dsp_helper.h",
748 "neteq/dtmf_buffer.cc",
749 "neteq/dtmf_buffer.h",
750 "neteq/dtmf_tone_generator.cc",
751 "neteq/dtmf_tone_generator.h",
752 "neteq/expand.cc",
753 "neteq/expand.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200754 "neteq/interface/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000755 "neteq/merge.cc",
756 "neteq/merge.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200757 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000758 "neteq/neteq_impl.cc",
759 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000760 "neteq/normal.cc",
761 "neteq/normal.h",
762 "neteq/packet_buffer.cc",
763 "neteq/packet_buffer.h",
764 "neteq/payload_splitter.cc",
765 "neteq/payload_splitter.h",
766 "neteq/post_decode_vad.cc",
767 "neteq/post_decode_vad.h",
768 "neteq/preemptive_expand.cc",
769 "neteq/preemptive_expand.h",
770 "neteq/random_vector.cc",
771 "neteq/random_vector.h",
772 "neteq/rtcp.cc",
773 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200774 "neteq/statistics_calculator.cc",
775 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000776 "neteq/sync_buffer.cc",
777 "neteq/sync_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000778 "neteq/time_stretch.cc",
779 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200780 "neteq/timestamp_scaler.cc",
781 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000782 ]
783
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000784 configs += [ "../..:common_config" ]
785
786 public_configs = [
787 "../..:common_inherited_config",
788 ":neteq_config",
789 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000790
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000791 deps = [
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000792 ":audio_decoder_interface",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000793 ":cng",
794 ":g711",
795 ":g722",
796 ":ilbc",
797 ":isac",
Zeke Chin786dbdc2015-06-10 13:45:08 -0700798 ":isac_fix",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000799 ":pcm16b",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000800 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000801 "../../common_audio",
802 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000803 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000804
805 defines = []
806
807 if (rtc_include_opus) {
808 defines += [ "WEBRTC_CODEC_OPUS" ]
809 deps += [ ":webrtc_opus" ]
810 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000811}