blob: efbf7e051b60c8be826afa53a4fe2980e2e4749a [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
9import("../../build/webrtc.gni")
kjellanderfb114242016-06-13 00:19:48 -070010import("audio_coding.gni")
11import("//build/config/arm.gni")
kjellanderfb114242016-06-13 00:19:48 -070012import("//third_party/protobuf/proto_library.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000013
kwiberg0edb05b2016-01-19 05:54:28 -080014audio_codec_deps = [
15 ":cng",
16 ":g711",
17 ":pcm16b",
18]
kwiberg0edb05b2016-01-19 05:54:28 -080019if (rtc_include_ilbc) {
kwiberg0edb05b2016-01-19 05:54:28 -080020 audio_codec_deps += [ ":ilbc" ]
21}
22if (rtc_include_opus) {
kwiberg0edb05b2016-01-19 05:54:28 -080023 audio_codec_deps += [ ":webrtc_opus" ]
24}
25if (!build_with_mozilla) {
26 if (current_cpu == "arm") {
kwiberg0edb05b2016-01-19 05:54:28 -080027 audio_codec_deps += [ ":isac_fix" ]
28 } else {
kwiberg0edb05b2016-01-19 05:54:28 -080029 audio_codec_deps += [ ":isac" ]
30 }
kwiberg0edb05b2016-01-19 05:54:28 -080031 audio_codec_deps += [ ":g722" ]
32}
33if (!build_with_mozilla && !build_with_chromium) {
kwiberg0edb05b2016-01-19 05:54:28 -080034 audio_codec_deps += [ ":red" ]
35}
kjellanderfb114242016-06-13 00:19:48 -070036audio_coding_deps = audio_codec_deps + [
37 "../..:webrtc_common",
38 "../../common_audio",
39 "../../system_wrappers",
40 ]
kwiberg0edb05b2016-01-19 05:54:28 -080041
kwibergda2bf4e2016-10-24 13:47:09 -070042rtc_static_library("audio_format") {
kwibergc01c6a42016-04-28 14:23:32 -070043 sources = [
kwibergc01c6a42016-04-28 14:23:32 -070044 "codecs/audio_format.cc",
45 "codecs/audio_format.h",
46 ]
kwibergc01c6a42016-04-28 14:23:32 -070047 deps = [
kwiberga6b82982016-10-24 16:31:17 -070048 "../..:webrtc_common",
kwibergda2bf4e2016-10-24 13:47:09 -070049 ]
50}
51
52rtc_static_library("audio_format_conversion") {
53 sources = [
54 "codecs/audio_format_conversion.cc",
55 "codecs/audio_format_conversion.h",
56 ]
57 deps = [
58 ":audio_format",
kwiberga6b82982016-10-24 16:31:17 -070059 "../..:webrtc_common",
60 "../../base:rtc_base_approved",
kwibergda2bf4e2016-10-24 13:47:09 -070061 ]
62}
63
64rtc_source_set("audio_decoder_factory_interface") {
65 sources = [
66 "codecs/audio_decoder_factory.h",
67 ]
68 deps = [
69 ":audio_decoder_interface",
70 ":audio_format",
charujain1515e952016-11-02 08:43:34 -070071
72 # TODO(charujain): Clean this dependency when downstream projects are
73 # updated to properly depend on audio_format_conversion target.
74 ":audio_format_conversion",
kwiberga6b82982016-10-24 16:31:17 -070075 "../../base:rtc_base_approved",
kwibergc01c6a42016-04-28 14:23:32 -070076 ]
77}
78
kjellanderb62dbbe2016-09-23 00:38:52 -070079rtc_static_library("builtin_audio_decoder_factory") {
kwibergc01c6a42016-04-28 14:23:32 -070080 sources = [
81 "codecs/builtin_audio_decoder_factory.cc",
82 "codecs/builtin_audio_decoder_factory.h",
83 ]
kwibergc01c6a42016-04-28 14:23:32 -070084 deps = [
85 "../..:webrtc_common",
86 ":audio_decoder_factory_interface",
87 ] + audio_codec_deps
88 defines = audio_codec_defines
89}
90
kjellanderb62dbbe2016-09-23 00:38:52 -070091rtc_static_library("rent_a_codec") {
kwibergfce4a942015-10-27 11:40:24 -070092 sources = [
kjellander3e6db232015-11-26 04:44:54 -080093 "acm2/acm_codec_database.cc",
94 "acm2/acm_codec_database.h",
95 "acm2/rent_a_codec.cc",
96 "acm2/rent_a_codec.h",
kwibergfce4a942015-10-27 11:40:24 -070097 ]
kwiberg0edb05b2016-01-19 05:54:28 -080098 deps = [ "../..:webrtc_common" ] + audio_codec_deps
99 defines = audio_codec_defines
kwibergfce4a942015-10-27 11:40:24 -0700100}
101
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000102config("audio_coding_config") {
103 include_dirs = [
kjellander3e6db232015-11-26 04:44:54 -0800104 "include",
Henrik Kjellanderff761fb2015-11-04 08:31:52 +0100105 "../include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000106 ]
107}
108
kjellanderb62dbbe2016-09-23 00:38:52 -0700109rtc_static_library("audio_coding") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000110 sources = [
kjellander3e6db232015-11-26 04:44:54 -0800111 "acm2/acm_common_defs.h",
112 "acm2/acm_receiver.cc",
113 "acm2/acm_receiver.h",
114 "acm2/acm_resampler.cc",
115 "acm2/acm_resampler.h",
116 "acm2/audio_coding_module.cc",
kjellander3e6db232015-11-26 04:44:54 -0800117 "acm2/call_statistics.cc",
118 "acm2/call_statistics.h",
119 "acm2/codec_manager.cc",
120 "acm2/codec_manager.h",
kjellander3e6db232015-11-26 04:44:54 -0800121 "include/audio_coding_module.h",
122 "include/audio_coding_module_typedefs.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000123 ]
124
125 defines = []
126
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700127 public_configs = [ ":audio_coding_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000128
kjellanderfb114242016-06-13 00:19:48 -0700129 if (rtc_include_opus) {
130 public_deps = [
131 ":webrtc_opus",
132 ]
133 }
134
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000135 if (is_win) {
136 cflags = [
137 # TODO(kjellander): Bug 261: fix this warning.
138 "/wd4373", # virtual function override.
139 ]
140 }
141
kjellanderfb114242016-06-13 00:19:48 -0700142 deps = audio_coding_deps + [
kwiberg0edb05b2016-01-19 05:54:28 -0800143 ":neteq",
144 ":rent_a_codec",
skvladcc91d282016-10-03 18:31:22 -0700145 "../../logging:rtc_event_log_api",
kwiberg0edb05b2016-01-19 05:54:28 -0800146 ]
kjellanderfb114242016-06-13 00:19:48 -0700147 defines = audio_coding_defines
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148}
149
kjellanderb62dbbe2016-09-23 00:38:52 -0700150rtc_static_library("audio_decoder_interface") {
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000151 sources = [
152 "codecs/audio_decoder.cc",
153 "codecs/audio_decoder.h",
ossu7f40ba42016-09-21 05:50:37 -0700154 "codecs/legacy_encoded_audio_frame.cc",
155 "codecs/legacy_encoded_audio_frame.h",
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000156 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200157 deps = [
158 "../..:webrtc_common",
kjellander4e7f6c12016-04-25 21:59:50 -0700159 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200160 ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000161}
162
kjellanderb62dbbe2016-09-23 00:38:52 -0700163rtc_static_library("audio_encoder_interface") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000164 sources = [
165 "codecs/audio_encoder.cc",
166 "codecs/audio_encoder.h",
167 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200168 deps = [
169 "../..:webrtc_common",
kjellander4e7f6c12016-04-25 21:59:50 -0700170 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200171 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000172}
173
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000174config("cng_config") {
175 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000176 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000177 "codecs/cng/include",
178 ]
179}
180
kjellanderb62dbbe2016-09-23 00:38:52 -0700181rtc_static_library("cng") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000182 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000183 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100184 "codecs/cng/audio_encoder_cng.h",
ossu97ba30e2016-04-25 07:55:58 -0700185 "codecs/cng/webrtc_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100186 "codecs/cng/webrtc_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000187 ]
188
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700189 public_configs = [ ":cng_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000190
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000191 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000192 ":audio_encoder_interface",
Henrik Lundind048aa02015-12-03 17:47:21 +0100193 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000194 ]
195}
196
197config("red_config") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200198 include_dirs = [ "codecs/red" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000199}
200
kjellanderb62dbbe2016-09-23 00:38:52 -0700201rtc_static_library("red") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000202 sources = [
203 "codecs/red/audio_encoder_copy_red.cc",
204 "codecs/red/audio_encoder_copy_red.h",
205 ]
206
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700207 public_configs = [ ":red_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000208
209 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000210 ":audio_encoder_interface",
Henrik Lundind048aa02015-12-03 17:47:21 +0100211 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000212 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000213}
214
215config("g711_config") {
216 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000217 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000218 "codecs/g711/include",
219 ]
220}
221
kjellanderb62dbbe2016-09-23 00:38:52 -0700222rtc_static_library("g711") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000223 sources = [
kwiberg6faf5be2015-09-22 06:16:51 -0700224 "codecs/g711/audio_decoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100225 "codecs/g711/audio_decoder_pcm.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000226 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100227 "codecs/g711/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000228 ]
229
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700230 public_configs = [ ":g711_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000231
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200232 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100233 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200234 ":audio_encoder_interface",
235 ]
kjellander7439f972016-12-05 22:47:46 -0800236 public_deps = [
237 ":g711_c",
238 ]
239}
240
241rtc_source_set("g711_c") {
242 visibility = [ ":*" ] # Only targets in this file can depend on this.
243 sources = [
244 "codecs/g711/g711.c",
245 "codecs/g711/g711.h",
246 "codecs/g711/g711_interface.c",
247 "codecs/g711/g711_interface.h",
248 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000249}
250
251config("g722_config") {
252 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000253 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000254 "codecs/g722/include",
255 ]
256}
257
kjellanderb62dbbe2016-09-23 00:38:52 -0700258rtc_static_library("g722") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000259 sources = [
kwibergada4c132015-09-17 03:12:35 -0700260 "codecs/g722/audio_decoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100261 "codecs/g722/audio_decoder_g722.h",
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000262 "codecs/g722/audio_encoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100263 "codecs/g722/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000264 ]
265
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700266 public_configs = [ ":g722_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000267
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200268 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100269 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200270 ":audio_encoder_interface",
271 ]
kjellander7439f972016-12-05 22:47:46 -0800272 public_deps = [
273 ":g722_c",
274 ]
275}
276
277rtc_source_set("g722_c") {
278 visibility = [ ":*" ] # Only targets in this file can depend on this.
279 sources = [
280 "codecs/g722/g722_decode.c",
281 "codecs/g722/g722_enc_dec.h",
282 "codecs/g722/g722_encode.c",
283 "codecs/g722/g722_interface.c",
284 "codecs/g722/g722_interface.h",
285 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000286}
287
288config("ilbc_config") {
289 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000290 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100291 "codecs/ilbc/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000292 ]
293}
294
kjellanderb62dbbe2016-09-23 00:38:52 -0700295rtc_static_library("ilbc") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000296 sources = [
kwibergfff9f172015-09-16 21:26:32 -0700297 "codecs/ilbc/audio_decoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100298 "codecs/ilbc/audio_decoder_ilbc.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200299 "codecs/ilbc/audio_encoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100300 "codecs/ilbc/audio_encoder_ilbc.h",
kjellander7439f972016-12-05 22:47:46 -0800301 ]
302
303 public_configs = [ ":ilbc_config" ]
304
305 deps = [
306 ":audio_decoder_interface",
307 ":audio_encoder_interface",
308 "../../base:rtc_base_approved",
309 "../../common_audio",
310 ]
311 public_deps = [
312 ":ilbc_c",
313 ]
314}
315
316rtc_source_set("ilbc_c") {
317 visibility = [ ":*" ] # Only targets in this file can depend on this.
318 sources = [
319 "codecs/ilbc/abs_quant.c",
320 "codecs/ilbc/abs_quant.h",
321 "codecs/ilbc/abs_quant_loop.c",
322 "codecs/ilbc/abs_quant_loop.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000323 "codecs/ilbc/augmented_cb_corr.c",
324 "codecs/ilbc/augmented_cb_corr.h",
325 "codecs/ilbc/bw_expand.c",
326 "codecs/ilbc/bw_expand.h",
327 "codecs/ilbc/cb_construct.c",
328 "codecs/ilbc/cb_construct.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200329 "codecs/ilbc/cb_mem_energy.c",
330 "codecs/ilbc/cb_mem_energy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000331 "codecs/ilbc/cb_mem_energy_augmentation.c",
332 "codecs/ilbc/cb_mem_energy_augmentation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000333 "codecs/ilbc/cb_mem_energy_calc.c",
334 "codecs/ilbc/cb_mem_energy_calc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000335 "codecs/ilbc/cb_search.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200336 "codecs/ilbc/cb_search.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000337 "codecs/ilbc/cb_search_core.c",
338 "codecs/ilbc/cb_search_core.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000339 "codecs/ilbc/cb_update_best_index.c",
340 "codecs/ilbc/cb_update_best_index.h",
341 "codecs/ilbc/chebyshev.c",
342 "codecs/ilbc/chebyshev.h",
343 "codecs/ilbc/comp_corr.c",
344 "codecs/ilbc/comp_corr.h",
345 "codecs/ilbc/constants.c",
346 "codecs/ilbc/constants.h",
347 "codecs/ilbc/create_augmented_vec.c",
348 "codecs/ilbc/create_augmented_vec.h",
349 "codecs/ilbc/decode.c",
350 "codecs/ilbc/decode.h",
351 "codecs/ilbc/decode_residual.c",
352 "codecs/ilbc/decode_residual.h",
353 "codecs/ilbc/decoder_interpolate_lsf.c",
354 "codecs/ilbc/decoder_interpolate_lsf.h",
355 "codecs/ilbc/defines.h",
356 "codecs/ilbc/do_plc.c",
357 "codecs/ilbc/do_plc.h",
358 "codecs/ilbc/encode.c",
359 "codecs/ilbc/encode.h",
360 "codecs/ilbc/energy_inverse.c",
361 "codecs/ilbc/energy_inverse.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200362 "codecs/ilbc/enh_upsample.c",
363 "codecs/ilbc/enh_upsample.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000364 "codecs/ilbc/enhancer.c",
365 "codecs/ilbc/enhancer.h",
366 "codecs/ilbc/enhancer_interface.c",
367 "codecs/ilbc/enhancer_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000368 "codecs/ilbc/filtered_cb_vecs.c",
369 "codecs/ilbc/filtered_cb_vecs.h",
370 "codecs/ilbc/frame_classify.c",
371 "codecs/ilbc/frame_classify.h",
372 "codecs/ilbc/gain_dequant.c",
373 "codecs/ilbc/gain_dequant.h",
374 "codecs/ilbc/gain_quant.c",
375 "codecs/ilbc/gain_quant.h",
376 "codecs/ilbc/get_cd_vec.c",
377 "codecs/ilbc/get_cd_vec.h",
378 "codecs/ilbc/get_lsp_poly.c",
379 "codecs/ilbc/get_lsp_poly.h",
380 "codecs/ilbc/get_sync_seq.c",
381 "codecs/ilbc/get_sync_seq.h",
382 "codecs/ilbc/hp_input.c",
383 "codecs/ilbc/hp_input.h",
384 "codecs/ilbc/hp_output.c",
385 "codecs/ilbc/hp_output.h",
386 "codecs/ilbc/ilbc.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100387 "codecs/ilbc/ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000388 "codecs/ilbc/index_conv_dec.c",
389 "codecs/ilbc/index_conv_dec.h",
390 "codecs/ilbc/index_conv_enc.c",
391 "codecs/ilbc/index_conv_enc.h",
392 "codecs/ilbc/init_decode.c",
393 "codecs/ilbc/init_decode.h",
394 "codecs/ilbc/init_encode.c",
395 "codecs/ilbc/init_encode.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000396 "codecs/ilbc/interpolate.c",
397 "codecs/ilbc/interpolate.h",
398 "codecs/ilbc/interpolate_samples.c",
399 "codecs/ilbc/interpolate_samples.h",
400 "codecs/ilbc/lpc_encode.c",
401 "codecs/ilbc/lpc_encode.h",
402 "codecs/ilbc/lsf_check.c",
403 "codecs/ilbc/lsf_check.h",
404 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
405 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
406 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
407 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
408 "codecs/ilbc/lsf_to_lsp.c",
409 "codecs/ilbc/lsf_to_lsp.h",
410 "codecs/ilbc/lsf_to_poly.c",
411 "codecs/ilbc/lsf_to_poly.h",
412 "codecs/ilbc/lsp_to_lsf.c",
413 "codecs/ilbc/lsp_to_lsf.h",
414 "codecs/ilbc/my_corr.c",
415 "codecs/ilbc/my_corr.h",
416 "codecs/ilbc/nearest_neighbor.c",
417 "codecs/ilbc/nearest_neighbor.h",
418 "codecs/ilbc/pack_bits.c",
419 "codecs/ilbc/pack_bits.h",
420 "codecs/ilbc/poly_to_lsf.c",
421 "codecs/ilbc/poly_to_lsf.h",
422 "codecs/ilbc/poly_to_lsp.c",
423 "codecs/ilbc/poly_to_lsp.h",
424 "codecs/ilbc/refiner.c",
425 "codecs/ilbc/refiner.h",
426 "codecs/ilbc/simple_interpolate_lsf.c",
427 "codecs/ilbc/simple_interpolate_lsf.h",
428 "codecs/ilbc/simple_lpc_analysis.c",
429 "codecs/ilbc/simple_lpc_analysis.h",
430 "codecs/ilbc/simple_lsf_dequant.c",
431 "codecs/ilbc/simple_lsf_dequant.h",
432 "codecs/ilbc/simple_lsf_quant.c",
433 "codecs/ilbc/simple_lsf_quant.h",
434 "codecs/ilbc/smooth.c",
435 "codecs/ilbc/smooth.h",
436 "codecs/ilbc/smooth_out_data.c",
437 "codecs/ilbc/smooth_out_data.h",
438 "codecs/ilbc/sort_sq.c",
439 "codecs/ilbc/sort_sq.h",
440 "codecs/ilbc/split_vq.c",
441 "codecs/ilbc/split_vq.h",
442 "codecs/ilbc/state_construct.c",
443 "codecs/ilbc/state_construct.h",
444 "codecs/ilbc/state_search.c",
445 "codecs/ilbc/state_search.h",
446 "codecs/ilbc/swap_bytes.c",
447 "codecs/ilbc/swap_bytes.h",
448 "codecs/ilbc/unpack_bits.c",
449 "codecs/ilbc/unpack_bits.h",
450 "codecs/ilbc/vq3.c",
451 "codecs/ilbc/vq3.h",
452 "codecs/ilbc/vq4.c",
453 "codecs/ilbc/vq4.h",
454 "codecs/ilbc/window32_w32.c",
455 "codecs/ilbc/window32_w32.h",
456 "codecs/ilbc/xcorr_coef.c",
457 "codecs/ilbc/xcorr_coef.h",
458 ]
459
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700460 public_configs = [ ":ilbc_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000461
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000462 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100463 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000464 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000465}
466
kjellanderb62dbbe2016-09-23 00:38:52 -0700467rtc_static_library("isac_common") {
kwiberg608c3cf2015-08-24 02:03:23 -0700468 sources = [
469 "codecs/isac/audio_encoder_isac_t.h",
470 "codecs/isac/audio_encoder_isac_t_impl.h",
471 "codecs/isac/locked_bandwidth_info.cc",
472 "codecs/isac/locked_bandwidth_info.h",
473 ]
474}
475
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000476config("isac_config") {
477 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000478 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100479 "codecs/isac/main/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000480 ]
481}
482
kjellanderb62dbbe2016-09-23 00:38:52 -0700483rtc_static_library("isac") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000484 sources = [
kjellander7439f972016-12-05 22:47:46 -0800485 "codecs/isac/main/source/audio_decoder_isac.cc",
486 "codecs/isac/main/source/audio_encoder_isac.cc",
487 ]
488
489 deps = [
490 ":audio_decoder_interface",
491 ":audio_encoder_interface",
492 ":isac_common",
493 ]
494 public_deps = [
495 ":isac_c",
496 ]
497}
498
499rtc_static_library("isac_c") {
500 visibility = [ ":*" ] # Only targets in this file can depend on this.
501 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100502 "codecs/isac/main/include/audio_decoder_isac.h",
503 "codecs/isac/main/include/audio_encoder_isac.h",
504 "codecs/isac/main/include/isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000505 "codecs/isac/main/source/arith_routines.c",
506 "codecs/isac/main/source/arith_routines.h",
507 "codecs/isac/main/source/arith_routines_hist.c",
508 "codecs/isac/main/source/arith_routines_logist.c",
509 "codecs/isac/main/source/bandwidth_estimator.c",
510 "codecs/isac/main/source/bandwidth_estimator.h",
511 "codecs/isac/main/source/codec.h",
512 "codecs/isac/main/source/crc.c",
513 "codecs/isac/main/source/crc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000514 "codecs/isac/main/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200515 "codecs/isac/main/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000516 "codecs/isac/main/source/encode.c",
517 "codecs/isac/main/source/encode_lpc_swb.c",
518 "codecs/isac/main/source/encode_lpc_swb.h",
519 "codecs/isac/main/source/entropy_coding.c",
520 "codecs/isac/main/source/entropy_coding.h",
521 "codecs/isac/main/source/fft.c",
522 "codecs/isac/main/source/fft.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200523 "codecs/isac/main/source/filter_functions.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000524 "codecs/isac/main/source/filterbank_tables.c",
525 "codecs/isac/main/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200526 "codecs/isac/main/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000527 "codecs/isac/main/source/intialize.c",
528 "codecs/isac/main/source/isac.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200529 "codecs/isac/main/source/isac_float_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000530 "codecs/isac/main/source/lattice.c",
531 "codecs/isac/main/source/lpc_analysis.c",
532 "codecs/isac/main/source/lpc_analysis.h",
533 "codecs/isac/main/source/lpc_gain_swb_tables.c",
534 "codecs/isac/main/source/lpc_gain_swb_tables.h",
535 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
536 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
537 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
538 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
539 "codecs/isac/main/source/lpc_tables.c",
540 "codecs/isac/main/source/lpc_tables.h",
541 "codecs/isac/main/source/os_specific_inline.h",
542 "codecs/isac/main/source/pitch_estimator.c",
543 "codecs/isac/main/source/pitch_estimator.h",
544 "codecs/isac/main/source/pitch_filter.c",
545 "codecs/isac/main/source/pitch_gain_tables.c",
546 "codecs/isac/main/source/pitch_gain_tables.h",
547 "codecs/isac/main/source/pitch_lag_tables.c",
548 "codecs/isac/main/source/pitch_lag_tables.h",
549 "codecs/isac/main/source/settings.h",
550 "codecs/isac/main/source/spectrum_ar_model_tables.c",
551 "codecs/isac/main/source/spectrum_ar_model_tables.h",
552 "codecs/isac/main/source/structs.h",
553 "codecs/isac/main/source/transform.c",
554 ]
555
556 if (is_linux) {
557 libs = [ "m" ]
558 }
559
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700560 public_configs = [ ":isac_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000561
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000562 deps = [
aleloicfee2152016-08-29 04:09:19 -0700563 "../..:webrtc_common",
564 "../../base:rtc_base_approved",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000565 "../../common_audio",
566 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000567}
568
569config("isac_fix_config") {
570 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000571 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100572 "codecs/isac/fix/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000573 ]
574}
575
kjellanderb62dbbe2016-09-23 00:38:52 -0700576rtc_static_library("isac_fix") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000577 sources = [
kjellander7439f972016-12-05 22:47:46 -0800578 "codecs/isac/fix/source/audio_decoder_isacfix.cc",
579 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
580 ]
581
582 public_configs = [ ":isac_fix_config" ]
583
584 deps = [
585 ":audio_decoder_interface",
586 ":audio_encoder_interface",
587 ":isac_common",
588 "../../common_audio",
589 "../../system_wrappers",
590 ]
591 public_deps = [
592 ":isac_fix_c",
593 ]
594
595 if (rtc_build_with_neon) {
596 deps += [ ":isac_neon" ]
597 }
598}
599
600rtc_source_set("isac_fix_c") {
601 visibility = [ ":*" ] # Only targets in this file can depend on this.
602 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100603 "codecs/isac/fix/include/audio_decoder_isacfix.h",
604 "codecs/isac/fix/include/audio_encoder_isacfix.h",
605 "codecs/isac/fix/include/isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000606 "codecs/isac/fix/source/arith_routines.c",
607 "codecs/isac/fix/source/arith_routines_hist.c",
608 "codecs/isac/fix/source/arith_routines_logist.c",
609 "codecs/isac/fix/source/arith_routins.h",
610 "codecs/isac/fix/source/bandwidth_estimator.c",
611 "codecs/isac/fix/source/bandwidth_estimator.h",
612 "codecs/isac/fix/source/codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000613 "codecs/isac/fix/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200614 "codecs/isac/fix/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000615 "codecs/isac/fix/source/decode_plc.c",
616 "codecs/isac/fix/source/encode.c",
617 "codecs/isac/fix/source/entropy_coding.c",
618 "codecs/isac/fix/source/entropy_coding.h",
619 "codecs/isac/fix/source/fft.c",
620 "codecs/isac/fix/source/fft.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000621 "codecs/isac/fix/source/filterbank_tables.c",
622 "codecs/isac/fix/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200623 "codecs/isac/fix/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000624 "codecs/isac/fix/source/filters.c",
625 "codecs/isac/fix/source/initialize.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200626 "codecs/isac/fix/source/isac_fix_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000627 "codecs/isac/fix/source/isacfix.c",
628 "codecs/isac/fix/source/lattice.c",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700629 "codecs/isac/fix/source/lattice_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000630 "codecs/isac/fix/source/lpc_masking_model.c",
631 "codecs/isac/fix/source/lpc_masking_model.h",
632 "codecs/isac/fix/source/lpc_tables.c",
633 "codecs/isac/fix/source/lpc_tables.h",
634 "codecs/isac/fix/source/pitch_estimator.c",
635 "codecs/isac/fix/source/pitch_estimator.h",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700636 "codecs/isac/fix/source/pitch_estimator_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000637 "codecs/isac/fix/source/pitch_filter.c",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700638 "codecs/isac/fix/source/pitch_filter_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000639 "codecs/isac/fix/source/pitch_gain_tables.c",
640 "codecs/isac/fix/source/pitch_gain_tables.h",
641 "codecs/isac/fix/source/pitch_lag_tables.c",
642 "codecs/isac/fix/source/pitch_lag_tables.h",
643 "codecs/isac/fix/source/settings.h",
644 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
645 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
646 "codecs/isac/fix/source/structs.h",
647 "codecs/isac/fix/source/transform.c",
648 "codecs/isac/fix/source/transform_tables.c",
649 ]
650
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700651 public_configs = [ ":isac_fix_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000652
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700653 if (current_cpu == "arm" && arm_version >= 7) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000654 sources += [
655 "codecs/isac/fix/source/lattice_armv7.S",
656 "codecs/isac/fix/source/pitch_filter_armv6.S",
657 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700658 sources -= [
659 "codecs/isac/fix/source/lattice_c.c",
660 "codecs/isac/fix/source/pitch_filter_c.c",
661 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000662 }
663
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000664 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000665 sources += [
666 "codecs/isac/fix/source/entropy_coding_mips.c",
667 "codecs/isac/fix/source/filters_mips.c",
668 "codecs/isac/fix/source/lattice_mips.c",
669 "codecs/isac/fix/source/pitch_estimator_mips.c",
670 "codecs/isac/fix/source/transform_mips.c",
671 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700672 sources -= [
673 "codecs/isac/fix/source/lattice_c.c",
674 "codecs/isac/fix/source/pitch_estimator_c.c",
675 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000676 if (mips_dsp_rev > 0) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200677 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000678 }
679 if (mips_dsp_rev > 1) {
680 sources += [
681 "codecs/isac/fix/source/lpc_masking_model_mips.c",
682 "codecs/isac/fix/source/pitch_filter_mips.c",
683 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200684 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000685 }
686 }
kjellander7439f972016-12-05 22:47:46 -0800687
688 deps = [
689 "../../common_audio",
690 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000691}
692
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700693if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700694 rtc_static_library("isac_neon") {
Zhongwei Yaof242e662015-05-06 16:39:17 +0800695 sources = [
696 "codecs/isac/fix/source/entropy_coding_neon.c",
Zhongwei Yaob3cc77f2015-07-28 11:17:40 +0800697 "codecs/isac/fix/source/filterbanks_neon.c",
Zhongwei Yaof242e662015-05-06 16:39:17 +0800698 "codecs/isac/fix/source/filters_neon.c",
699 "codecs/isac/fix/source/lattice_neon.c",
700 "codecs/isac/fix/source/transform_neon.c",
701 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000702
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700703 if (current_cpu != "arm64") {
704 # Enable compilation for the NEON instruction set. This is needed
705 # since //build/config/arm.gni only enables NEON for iOS, not Android.
706 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700707 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700708 cflags = [ "-mfpu=neon" ]
709 }
710
711 # Disable LTO on NEON targets due to compiler bug.
712 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000713 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000714 cflags -= [
715 "-flto",
716 "-ffat-lto-objects",
717 ]
718 }
719
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200720 deps = [
721 "../../common_audio",
722 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000723 }
724}
725
726config("pcm16b_config") {
727 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000728 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000729 "codecs/pcm16b/include",
730 ]
731}
732
kjellanderb62dbbe2016-09-23 00:38:52 -0700733rtc_static_library("pcm16b") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000734 sources = [
Karl Wibergc0ac6ca2015-09-17 07:47:34 +0200735 "codecs/pcm16b/audio_decoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100736 "codecs/pcm16b/audio_decoder_pcm16b.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200737 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100738 "codecs/pcm16b/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000739 ]
740
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000741 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100742 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000743 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000744 ":g711",
745 ]
kjellander7439f972016-12-05 22:47:46 -0800746 public_deps = [
747 ":pcm16b_c",
748 ]
749 public_configs = [ ":pcm16b_config" ]
750}
751
752rtc_source_set("pcm16b_c") {
753 visibility = [ ":*" ] # Only targets in this file can depend on this.
754 sources = [
755 "codecs/pcm16b/pcm16b.c",
756 "codecs/pcm16b/pcm16b.h",
757 ]
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000758
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700759 public_configs = [ ":pcm16b_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000760}
761
762config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000763 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000764}
765
kjellanderb62dbbe2016-09-23 00:38:52 -0700766rtc_static_library("webrtc_opus") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000767 sources = [
Karl Wiberg0b058792015-09-15 17:28:18 +0200768 "codecs/opus/audio_decoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100769 "codecs/opus/audio_decoder_opus.h",
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000770 "codecs/opus/audio_encoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100771 "codecs/opus/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000772 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000773
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200774 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100775 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200776 ":audio_encoder_interface",
minyue41b9c802016-10-06 07:13:54 -0700777 ":audio_network_adaptor",
minyue69b627d2016-11-24 11:01:09 -0800778 "../../base:rtc_analytics",
Henrik Lundind048aa02015-12-03 17:47:21 +0100779 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200780 ]
kjellander7439f972016-12-05 22:47:46 -0800781 public_deps = [
782 ":webrtc_opus_c",
783 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000784
henrik.lundin875862c2016-11-22 02:07:54 -0800785 defines = []
henrik.lundinfd87f4a2016-11-28 11:15:54 -0800786 if (rtc_opus_variable_complexity) {
787 defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=1" ]
788 } else {
789 defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=0" ]
790 }
henrik.lundin875862c2016-11-22 02:07:54 -0800791
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000792 if (rtc_build_opus) {
kjellander7439f972016-12-05 22:47:46 -0800793 public_deps += [ rtc_opus_dir ]
794 } else if (build_with_mozilla) {
795 include_dirs = [ getenv("DIST") + "/include/opus" ]
796 }
797}
798
799rtc_source_set("webrtc_opus_c") {
800 visibility = [ ":*" ] # Only targets in this file can depend on this.
801 sources = [
802 "codecs/opus/opus_inst.h",
803 "codecs/opus/opus_interface.c",
804 "codecs/opus/opus_interface.h",
805 ]
806
807 if (rtc_build_opus) {
tfarina702f3972015-09-25 05:57:37 -0700808 public_deps = [
809 rtc_opus_dir,
810 ]
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000811 } else if (build_with_mozilla) {
812 include_dirs = [ getenv("DIST") + "/include/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000813 }
kjellander7439f972016-12-05 22:47:46 -0800814
815 deps = [
816 "../../base:rtc_base_approved",
817 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000818}
819
minyue25f6a392016-09-22 22:23:20 -0700820if (rtc_enable_protobuf) {
821 proto_library("ana_debug_dump_proto") {
822 sources = [
823 "audio_network_adaptor/debug_dump.proto",
824 ]
825 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
826 }
minyuea1d9ad02016-10-02 14:53:37 -0700827 proto_library("ana_config_proto") {
828 sources = [
829 "audio_network_adaptor/config.proto",
830 ]
831 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
832 }
minyue25f6a392016-09-22 22:23:20 -0700833}
834
minyue0d382ef2016-10-07 07:59:28 -0700835rtc_static_library("audio_network_adaptor") {
minyue7610f852016-09-07 13:51:51 -0700836 sources = [
837 "audio_network_adaptor/audio_network_adaptor.cc",
minyuecaa9cb22016-09-13 13:34:15 -0700838 "audio_network_adaptor/audio_network_adaptor_impl.cc",
839 "audio_network_adaptor/audio_network_adaptor_impl.h",
minyue4aec1d42016-09-21 23:01:26 -0700840 "audio_network_adaptor/bitrate_controller.cc",
841 "audio_network_adaptor/bitrate_controller.h",
minyue2e164c62016-09-14 06:47:36 -0700842 "audio_network_adaptor/channel_controller.cc",
843 "audio_network_adaptor/channel_controller.h",
minyuecaa9cb22016-09-13 13:34:15 -0700844 "audio_network_adaptor/controller.cc",
845 "audio_network_adaptor/controller.h",
846 "audio_network_adaptor/controller_manager.cc",
847 "audio_network_adaptor/controller_manager.h",
minyue25f6a392016-09-22 22:23:20 -0700848 "audio_network_adaptor/debug_dump_writer.cc",
849 "audio_network_adaptor/debug_dump_writer.h",
minyue186cd062016-09-16 05:54:39 -0700850 "audio_network_adaptor/dtx_controller.cc",
851 "audio_network_adaptor/dtx_controller.h",
minyued0ede442016-09-22 06:20:50 -0700852 "audio_network_adaptor/fec_controller.cc",
853 "audio_network_adaptor/fec_controller.h",
minyuee35d3292016-09-21 16:00:31 -0700854 "audio_network_adaptor/frame_length_controller.cc",
855 "audio_network_adaptor/frame_length_controller.h",
minyue7610f852016-09-07 13:51:51 -0700856 "audio_network_adaptor/include/audio_network_adaptor.h",
857 ]
minyue25f6a392016-09-22 22:23:20 -0700858
minyue41b9c802016-10-06 07:13:54 -0700859 deps = [
860 "../..:webrtc_common",
861 "../../system_wrappers",
862 ]
863
minyue25f6a392016-09-22 22:23:20 -0700864 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700865 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700866 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700867 ":ana_debug_dump_proto",
868 ]
869 defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ]
870 }
minyue7610f852016-09-07 13:51:51 -0700871}
872
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000873config("neteq_config") {
874 include_dirs = [
875 # Need Opus header files for the audio classifier.
876 "//third_party/opus/src/celt",
877 "//third_party/opus/src/src",
878 ]
879}
880
kjellanderb62dbbe2016-09-23 00:38:52 -0700881rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000882 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000883 "neteq/accelerate.cc",
884 "neteq/accelerate.h",
885 "neteq/audio_classifier.cc",
886 "neteq/audio_classifier.h",
887 "neteq/audio_decoder_impl.cc",
888 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000889 "neteq/audio_multi_vector.cc",
890 "neteq/audio_multi_vector.h",
891 "neteq/audio_vector.cc",
892 "neteq/audio_vector.h",
893 "neteq/background_noise.cc",
894 "neteq/background_noise.h",
895 "neteq/buffer_level_filter.cc",
896 "neteq/buffer_level_filter.h",
897 "neteq/comfort_noise.cc",
898 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700899 "neteq/cross_correlation.cc",
900 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000901 "neteq/decision_logic.cc",
902 "neteq/decision_logic.h",
903 "neteq/decision_logic_fax.cc",
904 "neteq/decision_logic_fax.h",
905 "neteq/decision_logic_normal.cc",
906 "neteq/decision_logic_normal.h",
907 "neteq/decoder_database.cc",
908 "neteq/decoder_database.h",
909 "neteq/defines.h",
910 "neteq/delay_manager.cc",
911 "neteq/delay_manager.h",
912 "neteq/delay_peak_detector.cc",
913 "neteq/delay_peak_detector.h",
914 "neteq/dsp_helper.cc",
915 "neteq/dsp_helper.h",
916 "neteq/dtmf_buffer.cc",
917 "neteq/dtmf_buffer.h",
918 "neteq/dtmf_tone_generator.cc",
919 "neteq/dtmf_tone_generator.h",
920 "neteq/expand.cc",
921 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +0100922 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000923 "neteq/merge.cc",
924 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -0700925 "neteq/nack_tracker.cc",
926 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200927 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000928 "neteq/neteq_impl.cc",
929 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000930 "neteq/normal.cc",
931 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -0700932 "neteq/packet.cc",
933 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000934 "neteq/packet_buffer.cc",
935 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000936 "neteq/post_decode_vad.cc",
937 "neteq/post_decode_vad.h",
938 "neteq/preemptive_expand.cc",
939 "neteq/preemptive_expand.h",
940 "neteq/random_vector.cc",
941 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -0700942 "neteq/red_payload_splitter.cc",
943 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000944 "neteq/rtcp.cc",
945 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200946 "neteq/statistics_calculator.cc",
947 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000948 "neteq/sync_buffer.cc",
949 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -0700950 "neteq/tick_timer.cc",
951 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000952 "neteq/time_stretch.cc",
953 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200954 "neteq/timestamp_scaler.cc",
955 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000956 ]
957
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700958 public_configs = [ ":neteq_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000959
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000960 deps = [
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000961 ":audio_decoder_interface",
kwiberg5178ee82016-05-03 01:39:01 -0700962 ":builtin_audio_decoder_factory",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000963 ":cng",
964 ":g711",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000965 ":pcm16b",
kwiberg5178ee82016-05-03 01:39:01 -0700966 ":rent_a_codec",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000967 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000968 "../../common_audio",
969 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000970 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000971
972 defines = []
973
kwibergf8c2bac2016-01-18 06:38:32 -0800974 if (rtc_include_ilbc) {
975 defines += [ "WEBRTC_CODEC_ILBC" ]
976 deps += [ ":ilbc" ]
977 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000978 if (rtc_include_opus) {
979 defines += [ "WEBRTC_CODEC_OPUS" ]
980 deps += [ ":webrtc_opus" ]
981 }
kwiberg98ab3a42015-09-30 21:54:21 -0700982 if (!build_with_mozilla) {
983 if (current_cpu == "arm") {
984 defines += [ "WEBRTC_CODEC_ISACFX" ]
985 deps += [ ":isac_fix" ]
986 } else {
987 defines += [ "WEBRTC_CODEC_ISAC" ]
988 deps += [ ":isac" ]
989 }
990 defines += [ "WEBRTC_CODEC_G722" ]
991 deps += [ ":g722" ]
992 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000993}
kjellanderfb114242016-06-13 00:19:48 -0700994
henrik.lundin58466f62016-10-05 02:27:42 -0700995# Although providing only test support, this target must be outside of the
996# rtc_include_tests conditional. The reason is that it supports fuzzer tests
997# that ultimately are built and run as a part of the Chromium ecosystem, which
998# does not set the rtc_include_tests flag.
999rtc_source_set("neteq_test_minimal") {
1000 testonly = true
1001 sources = [
1002 "neteq/tools/encode_neteq_input.cc",
1003 "neteq/tools/encode_neteq_input.h",
1004 "neteq/tools/neteq_test.cc",
1005 "neteq/tools/neteq_test.h",
1006 ]
1007
kjellandere40a7ee2016-10-16 23:56:12 -07001008 if (!build_with_chromium && is_clang) {
1009 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
henrik.lundin58466f62016-10-05 02:27:42 -07001010 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1011 }
1012}
1013
kjellanderfb114242016-06-13 00:19:48 -07001014if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -07001015 group("audio_coding_tests") {
1016 testonly = true
1017 public_deps = [
1018 ":RTPchange",
1019 ":RTPencode",
1020 ":RTPjitter",
1021 ":RTPtimeshift",
1022 ":acm_receive_test",
1023 ":acm_send_test",
1024 ":audio_classifier_test",
1025 ":audio_codec_speed_tests",
1026 ":audio_decoder_unittests",
1027 ":audio_decoder_unittests",
1028 ":delay_test",
1029 ":g711_test",
1030 ":g722_test",
1031 ":ilbc_test",
1032 ":insert_packet_with_timing",
1033 ":isac_api_test",
1034 ":isac_fix_test",
1035 ":isac_switch_samprate_test",
1036 ":isac_test",
1037 ":neteq_ilbc_quality_test",
1038 ":neteq_isac_quality_test",
1039 ":neteq_opus_quality_test",
1040 ":neteq_pcmu_quality_test",
1041 ":neteq_speed_test",
1042 ":rtp_analyze",
1043 ":rtpcat",
1044 ":webrtc_opus_fec_test",
1045 ]
1046 if (rtc_enable_protobuf) {
1047 public_deps += [ ":neteq_rtpplay" ]
1048 }
1049 }
1050
ehmaldonado38a21322016-09-02 04:10:34 -07001051 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -07001052 testonly = true
1053 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001054 "acm2/acm_receive_test.cc",
1055 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001056 ]
1057
kjellanderfb114242016-06-13 00:19:48 -07001058 defines = audio_coding_defines
1059
1060 deps = audio_coding_deps + [
1061 ":audio_coding",
1062 ":neteq_unittest_tools",
1063 "//testing/gtest",
1064 ]
1065 }
1066
ehmaldonado38a21322016-09-02 04:10:34 -07001067 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -07001068 testonly = true
1069 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001070 "acm2/acm_send_test.cc",
1071 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001072 ]
1073
kjellanderfb114242016-06-13 00:19:48 -07001074 defines = audio_coding_defines
1075
1076 deps = audio_coding_deps + [
1077 ":audio_coding",
1078 ":neteq_unittest_tools",
1079 "//testing/gtest",
1080 ]
1081 }
1082
ehmaldonado38a21322016-09-02 04:10:34 -07001083 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -07001084 testonly = true
1085 sources = [
1086 "test/Channel.cc",
1087 "test/PCMFile.cc",
1088 "test/delay_test.cc",
1089 "test/utility.cc",
1090 ]
1091
aleloi333f2062016-07-28 01:21:29 -07001092 deps = [
1093 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001094 ":audio_format_conversion",
aleloi333f2062016-07-28 01:21:29 -07001095 "../../:webrtc_common",
1096 "../../system_wrappers",
1097 "../../system_wrappers:system_wrappers_default",
1098 "../../test:test_support",
1099 "../rtp_rtcp",
1100 "//testing/gtest",
1101 "//third_party/gflags:gflags",
1102 ]
1103 } # delay_test
1104
ehmaldonado38a21322016-09-02 04:10:34 -07001105 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -07001106 testonly = true
1107 sources = [
1108 "test/Channel.cc",
1109 "test/PCMFile.cc",
1110 "test/insert_packet_with_timing.cc",
1111 ]
1112
kjellandere40a7ee2016-10-16 23:56:12 -07001113 if (!build_with_chromium && is_clang) {
1114 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001115 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -07001116 }
1117
1118 deps = [
1119 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001120 ":audio_format_conversion",
aleloi00730c72016-07-28 01:27:10 -07001121 "../../:webrtc_common",
1122 "../../system_wrappers",
1123 "../../system_wrappers:system_wrappers_default",
1124 "../../test:test_support",
1125 "../rtp_rtcp",
1126 "//testing/gtest",
1127 "//third_party/gflags:gflags",
1128 ]
1129 } # insert_packet_with_timing
1130
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001131 audio_decoder_unittests_resources =
1132 [ "//resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -07001133
1134 if (is_ios) {
1135 bundle_data("audio_decoder_unittests_bundle_data") {
1136 testonly = true
1137 sources = audio_decoder_unittests_resources
1138 outputs = [
1139 "{{bundle_resources_dir}}/{{source_file_part}}",
1140 ]
1141 }
1142 }
1143
ehmaldonado38a21322016-09-02 04:10:34 -07001144 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -07001145 testonly = true
1146 sources = [
1147 "neteq/audio_decoder_unittest.cc",
1148 ]
1149
kjellandere40a7ee2016-10-16 23:56:12 -07001150 if (!build_with_chromium && is_clang) {
1151 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001152 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -07001153 }
1154
1155 deps = []
1156
1157 defines = neteq_defines
1158
1159 deps += audio_coding_deps
1160 deps += [
1161 ":audio_decoder_interface",
1162 ":isac",
1163 ":isac_fix",
1164 ":neteq",
1165 ":neteq_unittest_tools",
kjellander6ceab082016-10-28 05:44:03 -07001166 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001167 "../../test:test_main",
charujainddf3e4a2016-08-01 07:49:42 -07001168 "//testing/gtest",
1169 ]
1170
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001171 data = audio_decoder_unittests_resources
1172
charujainddf3e4a2016-08-01 07:49:42 -07001173 if (is_android) {
1174 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001175 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001176 }
kjellander32c4a202016-08-30 02:53:49 -07001177 if (is_ios) {
1178 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001179 }
1180 } # audio_decoder_unittests
1181
kjellanderfb114242016-06-13 00:19:48 -07001182 if (rtc_enable_protobuf) {
1183 proto_library("neteq_unittest_proto") {
1184 sources = [
1185 "neteq/neteq_unittest.proto",
1186 ]
1187 proto_out_dir = "webrtc/audio_coding/neteq"
1188 }
henrik.lundin03153f12016-06-21 05:38:42 -07001189
kjellanderb62dbbe2016-09-23 00:38:52 -07001190 rtc_static_library("rtc_event_log_source") {
henrik.lundin03153f12016-06-21 05:38:42 -07001191 testonly = true
1192 sources = [
1193 "neteq/tools/rtc_event_log_source.cc",
1194 "neteq/tools/rtc_event_log_source.h",
1195 ]
1196
kjellandere40a7ee2016-10-16 23:56:12 -07001197 if (!build_with_chromium && is_clang) {
1198 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001199 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001200 }
1201
1202 deps = [
skvladcc91d282016-10-03 18:31:22 -07001203 "../../logging:rtc_event_log_parser",
henrik.lundin03153f12016-06-21 05:38:42 -07001204 ]
1205 public_deps = [
skvladcc91d282016-10-03 18:31:22 -07001206 "../../logging:rtc_event_log_proto",
henrik.lundin03153f12016-06-21 05:38:42 -07001207 ]
1208 }
1209
ehmaldonado38a21322016-09-02 04:10:34 -07001210 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001211 testonly = true
1212 defines = []
1213 deps = []
1214 sources = [
1215 "neteq/tools/neteq_rtpplay.cc",
1216 ]
1217
kjellandere40a7ee2016-10-16 23:56:12 -07001218 if (!build_with_chromium && is_clang) {
1219 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001220 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001221 }
1222
1223 if (is_win) {
1224 cflags = [
1225 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1226 "/wd4373", # virtual function override.
1227 ]
1228 }
1229
1230 deps += [
1231 ":neteq",
1232 ":neteq_unittest_tools",
henrik.lundin03153f12016-06-21 05:38:42 -07001233 "../../system_wrappers:system_wrappers_default",
1234 "../../test:test_support",
1235 "//third_party/gflags",
1236 ]
1237 }
kjellanderfb114242016-06-13 00:19:48 -07001238 }
1239
ehmaldonado38a21322016-09-02 04:10:34 -07001240 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001241 testonly = true
1242 defines = []
1243 deps = []
1244 sources = [
1245 "codecs/isac/fix/test/isac_speed_test.cc",
1246 "codecs/opus/opus_speed_test.cc",
1247 "codecs/tools/audio_codec_speed_test.cc",
1248 "codecs/tools/audio_codec_speed_test.h",
1249 ]
1250
kjellandere40a7ee2016-10-16 23:56:12 -07001251 if (!build_with_chromium && is_clang) {
1252 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001253 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001254 }
1255
1256 if (is_android) {
1257 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001258 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001259 }
1260
1261 deps += [
1262 ":isac_fix",
1263 ":webrtc_opus",
1264 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001265 "../../test:test_main",
kjellander6ceab082016-10-28 05:44:03 -07001266 "../audio_processing",
aleloie6b60a42016-07-28 02:34:30 -07001267 "//testing/gtest",
1268 ]
1269 }
1270
ehmaldonado38a21322016-09-02 04:10:34 -07001271 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001272 testonly = true
1273 sources = [
1274 "neteq/tools/neteq_external_decoder_test.cc",
1275 "neteq/tools/neteq_external_decoder_test.h",
1276 "neteq/tools/neteq_performance_test.cc",
1277 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001278 ]
1279
kjellandere40a7ee2016-10-16 23:56:12 -07001280 if (!build_with_chromium && is_clang) {
1281 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001282 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001283 }
1284
1285 deps = [
1286 ":neteq",
1287 ":neteq_unittest_tools",
1288 ":pcm16b",
1289 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001290 ]
1291 }
1292
ehmaldonado38a21322016-09-02 04:10:34 -07001293 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001294 testonly = true
1295 sources = [
1296 "neteq/tools/neteq_quality_test.cc",
1297 "neteq/tools/neteq_quality_test.h",
1298 ]
1299
kjellandere40a7ee2016-10-16 23:56:12 -07001300 if (!build_with_chromium && is_clang) {
1301 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001302 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001303 }
1304
1305 deps = [
1306 ":neteq",
1307 ":neteq_unittest_tools",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001308 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001309 "//third_party/gflags",
1310 ]
1311 }
1312
kjellanderfb114242016-06-13 00:19:48 -07001313 config("neteq_unittest_tools_config") {
1314 include_dirs = [ "tools" ]
1315 }
1316
ehmaldonado38a21322016-09-02 04:10:34 -07001317 rtc_source_set("neteq_unittest_tools") {
kjellanderfb114242016-06-13 00:19:48 -07001318 testonly = true
1319 sources = [
1320 "neteq/tools/audio_checksum.h",
1321 "neteq/tools/audio_loop.cc",
1322 "neteq/tools/audio_loop.h",
aleloi0e0be0a2016-08-10 04:55:20 -07001323 "neteq/tools/audio_sink.cc",
kjellanderfb114242016-06-13 00:19:48 -07001324 "neteq/tools/audio_sink.h",
1325 "neteq/tools/constant_pcm_packet_source.cc",
1326 "neteq/tools/constant_pcm_packet_source.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001327 "neteq/tools/fake_decode_from_file.cc",
1328 "neteq/tools/fake_decode_from_file.h",
kjellanderfb114242016-06-13 00:19:48 -07001329 "neteq/tools/input_audio_file.cc",
1330 "neteq/tools/input_audio_file.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001331 "neteq/tools/neteq_input.h",
1332 "neteq/tools/neteq_packet_source_input.cc",
1333 "neteq/tools/neteq_packet_source_input.h",
1334 "neteq/tools/neteq_replacement_input.cc",
1335 "neteq/tools/neteq_replacement_input.h",
kjellanderfb114242016-06-13 00:19:48 -07001336 "neteq/tools/output_audio_file.h",
1337 "neteq/tools/output_wav_file.h",
1338 "neteq/tools/packet.cc",
1339 "neteq/tools/packet.h",
kwibergb8e56ee2016-08-29 06:37:33 -07001340 "neteq/tools/packet_source.cc",
kjellanderfb114242016-06-13 00:19:48 -07001341 "neteq/tools/packet_source.h",
1342 "neteq/tools/resample_input_audio_file.cc",
1343 "neteq/tools/resample_input_audio_file.h",
1344 "neteq/tools/rtp_file_source.cc",
1345 "neteq/tools/rtp_file_source.h",
1346 "neteq/tools/rtp_generator.cc",
1347 "neteq/tools/rtp_generator.h",
1348 ]
1349
ehmaldonadoe9cc6862016-09-05 06:10:18 -07001350 public_configs = [ ":neteq_unittest_tools_config" ]
kjellanderfb114242016-06-13 00:19:48 -07001351
kjellandere40a7ee2016-10-16 23:56:12 -07001352 if (!build_with_chromium && is_clang) {
1353 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001354 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001355 }
1356
1357 deps = [
henrik.lundin58466f62016-10-05 02:27:42 -07001358 ":neteq_test_minimal",
kjellanderfb114242016-06-13 00:19:48 -07001359 "../../common_audio",
1360 "../../test:rtp_test_utils",
1361 "../rtp_rtcp",
1362 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001363
1364 if (rtc_enable_protobuf) {
1365 deps += [ ":rtc_event_log_source" ]
1366 }
kjellanderfb114242016-06-13 00:19:48 -07001367 }
aleloi3022a342016-07-26 06:36:03 -07001368
ehmaldonado38a21322016-09-02 04:10:34 -07001369 rtc_source_set("neteq_test_tools") {
aleloi3022a342016-07-26 06:36:03 -07001370 testonly = true
1371 sources = [
1372 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1373 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1374 "neteq/test/NETEQTEST_RTPpacket.cc",
1375 "neteq/test/NETEQTEST_RTPpacket.h",
1376 ]
1377
1378 deps = [
1379 ":cng",
1380 ":g711",
1381 ":g722",
1382 ":ilbc",
1383 ":isac",
1384 ":pcm16b",
1385 "../..:webrtc_common",
1386 "//testing/gtest",
1387 ]
1388
1389 include_dirs = [
1390 "neteq/include",
1391 "neteq/test",
1392 "../../",
1393 ]
1394
1395 if (is_win) {
1396 cflags = [
1397 # Disable warnings to enable Win64 build, issue 1323.
1398 "/wd4267", # size_t to int truncation
1399 ]
1400 }
1401 }
aleloi47bded42016-07-26 06:46:19 -07001402
aleloi82667732016-08-02 01:45:50 -07001403 config("RTPencode_config") {
1404 defines = [
1405 "CODEC_ILBC",
1406 "CODEC_PCM16B",
1407 "CODEC_G711",
1408 "CODEC_G722",
1409 "CODEC_ISAC",
1410 "CODEC_PCM16B_WB",
1411 "CODEC_ISAC_SWB",
1412 "CODEC_PCM16B_32KHZ",
1413 "CODEC_PCM16B_48KHZ",
1414 "CODEC_CNGCODEC8",
1415 "CODEC_CNGCODEC16",
1416 "CODEC_CNGCODEC32",
1417 "CODEC_ATEVENT_DECODE",
1418 "CODEC_RED",
1419 "CODEC_OPUS",
1420 ]
1421 }
1422
ehmaldonado38a21322016-09-02 04:10:34 -07001423 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001424 testonly = true
1425
1426 deps = [
1427 # TODO(hlundin): Make RTPencode use ACM to encode files.
1428 ":cng",
1429 ":g711",
1430 ":g722",
1431 ":ilbc",
1432 ":isac",
1433 ":neteq_test_tools",
1434 ":pcm16b",
1435 ":webrtc_opus",
1436 "../../common_audio",
1437 ]
1438
1439 configs += [ ":RTPencode_config" ]
1440
1441 sources = [
1442 "neteq/test/RTPencode.cc",
1443 ]
1444
1445 include_dirs = [
1446 "neteq/include",
1447 "neteq/test",
1448 ]
1449
1450 if (is_win) {
1451 cflags = [
1452 # Disable warnings to enable Win64 build, issue 1323.
1453 "/wd4267", # size_t to int truncation
1454 ]
1455 }
1456 }
1457
ehmaldonado38a21322016-09-02 04:10:34 -07001458 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001459 testonly = true
1460
1461 sources = [
1462 "neteq/test/RTPchange.cc",
1463 ]
1464
1465 deps = [
1466 ":neteq_test_tools",
1467 ]
1468 }
1469
ehmaldonado38a21322016-09-02 04:10:34 -07001470 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001471 testonly = true
1472
1473 sources = [
1474 "neteq/tools/rtpcat.cc",
1475 ]
1476
1477 deps = [
1478 "../../system_wrappers:system_wrappers_default",
1479 "../../test:rtp_test_utils",
1480 "//testing/gtest",
1481 ]
1482 }
1483
ehmaldonado38a21322016-09-02 04:10:34 -07001484 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001485 testonly = true
1486
1487 sources = [
1488 "neteq/test/RTPtimeshift.cc",
1489 ]
1490
1491 deps = [
1492 ":neteq_test_tools",
1493 "//testing/gtest",
1494 ]
1495 }
1496
ehmaldonado38a21322016-09-02 04:10:34 -07001497 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001498 testonly = true
1499 deps = [
1500 "../..:webrtc_common",
kthelgason29a44e32016-09-27 03:52:02 -07001501 "../../base:rtc_base_approved",
aleloi17dfa742016-08-03 01:17:25 -07001502 "//testing/gtest",
1503 ]
1504 sources = [
1505 "neteq/test/RTPjitter.cc",
1506 ]
1507 }
1508
ehmaldonado38a21322016-09-02 04:10:34 -07001509 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001510 testonly = true
1511
1512 sources = [
1513 "neteq/tools/rtp_analyze.cc",
1514 ]
1515
1516 deps = [
1517 ":neteq",
1518 ":neteq_unittest_tools",
1519 ":pcm16b",
1520 "../../system_wrappers:system_wrappers_default",
1521 "//testing/gtest",
1522 "//third_party/gflags:gflags",
1523 ]
1524
kjellandere40a7ee2016-10-16 23:56:12 -07001525 if (!build_with_chromium && is_clang) {
1526 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001527 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001528 }
1529 }
aleloi630c6d52016-08-10 02:11:30 -07001530
ehmaldonado38a21322016-09-02 04:10:34 -07001531 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001532 testonly = true
1533
1534 sources = [
1535 "neteq/test/neteq_opus_quality_test.cc",
1536 ]
1537
1538 deps = [
1539 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001540 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001541 ":neteq_unittest_tools",
aleloi630c6d52016-08-10 02:11:30 -07001542 ":webrtc_opus",
ehmaldonado26bddb92016-11-30 06:12:01 -08001543 "../../test:test_main",
aleloi630c6d52016-08-10 02:11:30 -07001544 "//testing/gtest",
1545 "//third_party/gflags",
1546 ]
aleloi630c6d52016-08-10 02:11:30 -07001547 }
aleloi116fd612016-08-10 04:16:36 -07001548
ehmaldonado38a21322016-09-02 04:10:34 -07001549 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001550 testonly = true
1551
1552 sources = [
1553 "neteq/test/neteq_speed_test.cc",
1554 ]
1555
1556 deps = [
1557 ":neteq",
1558 ":neteq_test_support",
1559 "../../system_wrappers:system_wrappers_default",
1560 "../../test:test_support",
1561 "//third_party/gflags",
1562 ]
1563 }
aleloi63910122016-08-10 04:41:14 -07001564
ehmaldonado38a21322016-09-02 04:10:34 -07001565 rtc_executable("audio_classifier_test") {
aleloi63910122016-08-10 04:41:14 -07001566 testonly = true
1567 sources = [
1568 "neteq/test/audio_classifier_test.cc",
1569 ]
1570 deps = [
1571 ":neteq",
1572 ":webrtc_opus",
1573 "../../system_wrappers:system_wrappers_default",
1574 ]
1575 }
aleloi0e0be0a2016-08-10 04:55:20 -07001576
ehmaldonado38a21322016-09-02 04:10:34 -07001577 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001578 testonly = true
1579
1580 sources = [
1581 "neteq/test/neteq_ilbc_quality_test.cc",
1582 ]
1583
1584 deps = [
1585 ":ilbc",
1586 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001587 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001588 ":neteq_unittest_tools",
1589 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001590 "../../test:test_main",
aleloi0e0be0a2016-08-10 04:55:20 -07001591 "//testing/gtest",
1592 "//third_party/gflags",
1593 ]
1594 }
aleloi6df36dc2016-08-10 05:04:47 -07001595
ehmaldonado38a21322016-09-02 04:10:34 -07001596 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001597 testonly = true
1598
1599 sources = [
1600 "neteq/test/neteq_isac_quality_test.cc",
1601 ]
1602
1603 deps = [
1604 ":isac_fix",
1605 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001606 ":neteq_quality_test_support",
ehmaldonado26bddb92016-11-30 06:12:01 -08001607 "../../test:test_main",
aleloi6df36dc2016-08-10 05:04:47 -07001608 "//testing/gtest",
1609 "//third_party/gflags",
1610 ]
1611 }
aleloic4ac7002016-08-10 05:06:27 -07001612
ehmaldonado38a21322016-09-02 04:10:34 -07001613 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001614 testonly = true
1615
1616 sources = [
1617 "neteq/test/neteq_pcmu_quality_test.cc",
1618 ]
1619
1620 deps = [
1621 ":g711",
1622 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001623 ":neteq_quality_test_support",
ehmaldonado26bddb92016-11-30 06:12:01 -08001624 "../../test:test_main",
aleloic4ac7002016-08-10 05:06:27 -07001625 "//testing/gtest",
1626 "//third_party/gflags",
1627 ]
1628 }
aleloib7186d02016-08-16 01:47:16 -07001629
ehmaldonado38a21322016-09-02 04:10:34 -07001630 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001631 testonly = true
1632
1633 sources = [
1634 "codecs/isac/fix/test/kenny.cc",
1635 ]
1636
1637 deps = [
1638 ":isac_fix",
1639 "../../test:test_support",
1640 ]
1641
1642 if (is_win) {
1643 cflags = [
1644 # Disable warnings to enable Win64 build, issue 1323.
1645 "/wd4267", # size_t to int truncation
1646 ]
1647 }
1648 }
aleloi16f55a12016-08-23 08:08:23 -07001649
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001650 config("isac_test_warnings_config") {
1651 if (is_win && is_clang) {
1652 cflags = [
1653 # Disable warnings failing when compiling with Clang on Windows.
1654 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1655 "-Wno-format",
1656 ]
1657 }
1658 }
1659
kjellander7439f972016-12-05 22:47:46 -08001660 rtc_source_set("isac_test_util") {
1661 testonly = true
1662 sources = [
1663 "codecs/isac/main/util/utility.c",
1664 ]
1665 }
1666
ehmaldonado38a21322016-09-02 04:10:34 -07001667 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001668 testonly = true
1669
1670 sources = [
1671 "codecs/isac/main/test/simpleKenny.c",
ivoce51b41a2016-08-24 02:25:57 -07001672 ]
1673
1674 include_dirs = [
1675 "codecs/isac/main/include",
1676 "codecs/isac/main/test",
1677 "codecs/isac/main/util",
1678 ]
1679
1680 deps = [
1681 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001682 ":isac_test_util",
ivoc48052312016-08-25 04:43:45 -07001683 "../../base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001684 ]
1685
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001686 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001687 }
1688
ehmaldonado38a21322016-09-02 04:10:34 -07001689 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001690 testonly = true
1691
1692 sources = [
1693 "codecs/g711/test/testG711.cc",
1694 ]
1695
aleloi16f55a12016-08-23 08:08:23 -07001696 deps = [
1697 ":g711",
1698 ]
1699 }
aleloi9a117842016-08-23 08:36:10 -07001700
ehmaldonado38a21322016-09-02 04:10:34 -07001701 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001702 testonly = true
1703
1704 sources = [
1705 "codecs/g722/test/testG722.cc",
1706 ]
1707
aleloi9a117842016-08-23 08:36:10 -07001708 deps = [
1709 ":g722",
1710 "../..:webrtc_common",
1711 ]
1712 }
ivoc2c670db2016-08-24 06:11:18 -07001713
ehmaldonado38a21322016-09-02 04:10:34 -07001714 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07001715 testonly = true
1716
1717 sources = [
1718 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
aleloicfee2152016-08-29 04:09:19 -07001719 ]
1720
aleloicfee2152016-08-29 04:09:19 -07001721 deps = [
1722 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001723 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001724 "../../base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07001725 ]
1726
1727 include_dirs = [
1728 "codecs/isac/main/include",
1729 "codecs/isac/main/test",
1730 "codecs/isac/main/util",
1731 ]
1732 }
1733
ehmaldonado38a21322016-09-02 04:10:34 -07001734 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07001735 testonly = true
1736
1737 sources = [
1738 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
aleloicfee2152016-08-29 04:09:19 -07001739 ]
1740
aleloicfee2152016-08-29 04:09:19 -07001741 deps = [
1742 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001743 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001744 ]
1745
1746 include_dirs = [
1747 "codecs/isac/main/include",
1748 "codecs/isac/main/test",
1749 "codecs/isac/main/util",
1750 "../../common_audio/signal_processing/include",
1751 ]
1752 }
1753
ehmaldonado38a21322016-09-02 04:10:34 -07001754 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07001755 testonly = true
1756
1757 sources = [
1758 "codecs/ilbc/test/iLBC_test.c",
1759 ]
1760
aleloicfee2152016-08-29 04:09:19 -07001761 deps = [
1762 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07001763 ]
1764 }
1765
ehmaldonado38a21322016-09-02 04:10:34 -07001766 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07001767 testonly = true
1768
1769 sources = [
1770 "codecs/opus/opus_fec_test.cc",
1771 ]
1772
1773 deps = [
1774 ":webrtc_opus",
ivoc48052312016-08-25 04:43:45 -07001775 "../../base:rtc_base_approved",
ivoc2c670db2016-08-24 06:11:18 -07001776 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001777 "../../test:test_main",
ivoc2c670db2016-08-24 06:11:18 -07001778 "../../test:test_support",
ivoc2c670db2016-08-24 06:11:18 -07001779 "//testing/gtest",
1780 ]
1781
kjellandere40a7ee2016-10-16 23:56:12 -07001782 if (!build_with_chromium && is_clang) {
1783 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001784 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07001785 }
1786 }
kjellanderfb114242016-06-13 00:19:48 -07001787}