blob: ea3a1b716b5e71c8108f781e1169637ba20f417f [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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../../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_conversion") {
43 sources = [
44 "codecs/audio_format_conversion.cc",
45 "codecs/audio_format_conversion.h",
46 ]
47 deps = [
kwiberga6b82982016-10-24 16:31:17 -070048 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -080049 "../../api/audio_codecs:audio_codecs_api",
kwiberga6b82982016-10-24 16:31:17 -070050 "../../base:rtc_base_approved",
kwibergda2bf4e2016-10-24 13:47:09 -070051 ]
52}
53
kwiberg087bd342017-02-10 08:15:44 -080054rtc_static_library("builtin_audio_decoder_factory_internal") {
kwibergda2bf4e2016-10-24 13:47:09 -070055 sources = [
kwiberg087bd342017-02-10 08:15:44 -080056 "codecs/builtin_audio_decoder_factory_internal.cc",
57 "codecs/builtin_audio_decoder_factory_internal.h",
kwibergc01c6a42016-04-28 14:23:32 -070058 ]
kwibergc01c6a42016-04-28 14:23:32 -070059 deps = [
60 "../..:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -080061 "../../base:rtc_base_approved",
kwiberg087bd342017-02-10 08:15:44 -080062 "../../api/audio_codecs:audio_codecs_api",
kwibergc01c6a42016-04-28 14:23:32 -070063 ] + audio_codec_deps
64 defines = audio_codec_defines
65}
66
kjellanderb62dbbe2016-09-23 00:38:52 -070067rtc_static_library("rent_a_codec") {
kwibergfce4a942015-10-27 11:40:24 -070068 sources = [
kjellander3e6db232015-11-26 04:44:54 -080069 "acm2/acm_codec_database.cc",
70 "acm2/acm_codec_database.h",
71 "acm2/rent_a_codec.cc",
72 "acm2/rent_a_codec.h",
kwibergfce4a942015-10-27 11:40:24 -070073 ]
kjellander676e08f2016-12-07 08:23:27 -080074 deps = [
kwiberg087bd342017-02-10 08:15:44 -080075 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -080076 "../..:webrtc_common",
77 "../../base:rtc_base_approved",
kwiberg65cb70d2017-03-03 06:16:28 -080078 "../../system_wrappers",
79 ":audio_coding_module_typedefs",
80 ":audio_encoder_interface",
81 ":isac_common",
82 ":isac_fix_c",
83 ":neteq_decoder_enum",
kjellander676e08f2016-12-07 08:23:27 -080084 ] + audio_codec_deps
kwiberg0edb05b2016-01-19 05:54:28 -080085 defines = audio_codec_defines
kwibergfce4a942015-10-27 11:40:24 -070086}
87
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000088config("audio_coding_config") {
89 include_dirs = [
kjellander3e6db232015-11-26 04:44:54 -080090 "include",
Henrik Kjellanderff761fb2015-11-04 08:31:52 +010091 "../include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000092 ]
93}
94
kwiberg65cb70d2017-03-03 06:16:28 -080095rtc_source_set("audio_coding_module_typedefs") {
96 sources = [
97 "include/audio_coding_module_typedefs.h",
98 ]
99 deps = [
100 "../..:webrtc_common",
101 ]
102}
103
kjellanderb62dbbe2016-09-23 00:38:52 -0700104rtc_static_library("audio_coding") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105 sources = [
kjellander3e6db232015-11-26 04:44:54 -0800106 "acm2/acm_receiver.cc",
107 "acm2/acm_receiver.h",
108 "acm2/acm_resampler.cc",
109 "acm2/acm_resampler.h",
110 "acm2/audio_coding_module.cc",
kjellander3e6db232015-11-26 04:44:54 -0800111 "acm2/call_statistics.cc",
112 "acm2/call_statistics.h",
113 "acm2/codec_manager.cc",
114 "acm2/codec_manager.h",
kjellander3e6db232015-11-26 04:44:54 -0800115 "include/audio_coding_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000116 ]
117
118 defines = []
119
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700120 public_configs = [ ":audio_coding_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000121
kjellanderfb114242016-06-13 00:19:48 -0700122 if (rtc_include_opus) {
123 public_deps = [
124 ":webrtc_opus",
125 ]
126 }
127
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000128 if (is_win) {
129 cflags = [
130 # TODO(kjellander): Bug 261: fix this warning.
131 "/wd4373", # virtual function override.
132 ]
133 }
134
kjellanderfb114242016-06-13 00:19:48 -0700135 deps = audio_coding_deps + [
kwiberg087bd342017-02-10 08:15:44 -0800136 "../../api/audio_codecs:audio_codecs_api",
137 "../../api/audio_codecs:builtin_audio_decoder_factory",
kwiberg65cb70d2017-03-03 06:16:28 -0800138 ":audio_coding_module_typedefs",
139 ":audio_encoder_interface",
kwiberg0edb05b2016-01-19 05:54:28 -0800140 ":neteq",
141 ":rent_a_codec",
kjellander676e08f2016-12-07 08:23:27 -0800142 "../../base:rtc_base_approved",
skvladcc91d282016-10-03 18:31:22 -0700143 "../../logging:rtc_event_log_api",
kwiberg0edb05b2016-01-19 05:54:28 -0800144 ]
kjellanderfb114242016-06-13 00:19:48 -0700145 defines = audio_coding_defines
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000146}
147
kwiberg087bd342017-02-10 08:15:44 -0800148rtc_static_library("legacy_encoded_audio_frame") {
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000149 sources = [
ossu7f40ba42016-09-21 05:50:37 -0700150 "codecs/legacy_encoded_audio_frame.cc",
151 "codecs/legacy_encoded_audio_frame.h",
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000152 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200153 deps = [
kwiberg087bd342017-02-10 08:15:44 -0800154 "../../api/audio_codecs:audio_codecs_api",
kjellander4e7f6c12016-04-25 21:59:50 -0700155 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200156 ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000157}
158
kjellanderb62dbbe2016-09-23 00:38:52 -0700159rtc_static_library("audio_encoder_interface") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000160 sources = [
161 "codecs/audio_encoder.cc",
162 "codecs/audio_encoder.h",
163 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200164 deps = [
165 "../..:webrtc_common",
kjellander4e7f6c12016-04-25 21:59:50 -0700166 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200167 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000168}
169
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000170config("cng_config") {
171 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000172 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000173 "codecs/cng/include",
174 ]
175}
176
kjellanderb62dbbe2016-09-23 00:38:52 -0700177rtc_static_library("cng") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000178 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000179 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100180 "codecs/cng/audio_encoder_cng.h",
ossu97ba30e2016-04-25 07:55:58 -0700181 "codecs/cng/webrtc_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100182 "codecs/cng/webrtc_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000183 ]
184
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700185 public_configs = [ ":cng_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000186
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000187 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000188 ":audio_encoder_interface",
kjellander676e08f2016-12-07 08:23:27 -0800189 "../..:webrtc_common",
190 "../../base:rtc_base_approved",
Henrik Lundind048aa02015-12-03 17:47:21 +0100191 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000192 ]
193}
194
195config("red_config") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200196 include_dirs = [ "codecs/red" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000197}
198
kjellanderb62dbbe2016-09-23 00:38:52 -0700199rtc_static_library("red") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000200 sources = [
201 "codecs/red/audio_encoder_copy_red.cc",
202 "codecs/red/audio_encoder_copy_red.h",
203 ]
204
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700205 public_configs = [ ":red_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000206
207 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000208 ":audio_encoder_interface",
kjellander676e08f2016-12-07 08:23:27 -0800209 "../../base:rtc_base_approved",
Henrik Lundind048aa02015-12-03 17:47:21 +0100210 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000211 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000212}
213
214config("g711_config") {
215 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000216 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000217 "codecs/g711/include",
218 ]
219}
220
kjellanderb62dbbe2016-09-23 00:38:52 -0700221rtc_static_library("g711") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000222 sources = [
kwiberg6faf5be2015-09-22 06:16:51 -0700223 "codecs/g711/audio_decoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100224 "codecs/g711/audio_decoder_pcm.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000225 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100226 "codecs/g711/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000227 ]
228
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700229 public_configs = [ ":g711_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000230
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200231 deps = [
232 ":audio_encoder_interface",
kwiberg087bd342017-02-10 08:15:44 -0800233 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800234 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800235 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800236 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200237 ]
kjellander7439f972016-12-05 22:47:46 -0800238 public_deps = [
239 ":g711_c",
240 ]
241}
242
243rtc_source_set("g711_c") {
244 visibility = [ ":*" ] # Only targets in this file can depend on this.
245 sources = [
246 "codecs/g711/g711.c",
247 "codecs/g711/g711.h",
248 "codecs/g711/g711_interface.c",
249 "codecs/g711/g711_interface.h",
250 ]
kjellander676e08f2016-12-07 08:23:27 -0800251 deps = [
252 "../..:webrtc_common",
253 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000254}
255
256config("g722_config") {
257 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000258 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000259 "codecs/g722/include",
260 ]
261}
262
kjellanderb62dbbe2016-09-23 00:38:52 -0700263rtc_static_library("g722") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000264 sources = [
kwibergada4c132015-09-17 03:12:35 -0700265 "codecs/g722/audio_decoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100266 "codecs/g722/audio_decoder_g722.h",
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000267 "codecs/g722/audio_encoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100268 "codecs/g722/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000269 ]
270
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700271 public_configs = [ ":g722_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000272
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200273 deps = [
274 ":audio_encoder_interface",
kwiberg087bd342017-02-10 08:15:44 -0800275 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800276 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800277 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800278 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200279 ]
kjellander7439f972016-12-05 22:47:46 -0800280 public_deps = [
281 ":g722_c",
282 ]
283}
284
285rtc_source_set("g722_c") {
286 visibility = [ ":*" ] # Only targets in this file can depend on this.
287 sources = [
288 "codecs/g722/g722_decode.c",
289 "codecs/g722/g722_enc_dec.h",
290 "codecs/g722/g722_encode.c",
291 "codecs/g722/g722_interface.c",
292 "codecs/g722/g722_interface.h",
293 ]
kjellander676e08f2016-12-07 08:23:27 -0800294 deps = [
295 "../..:webrtc_common",
296 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000297}
298
299config("ilbc_config") {
300 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000301 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100302 "codecs/ilbc/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000303 ]
304}
305
kjellanderb62dbbe2016-09-23 00:38:52 -0700306rtc_static_library("ilbc") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000307 sources = [
kwibergfff9f172015-09-16 21:26:32 -0700308 "codecs/ilbc/audio_decoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100309 "codecs/ilbc/audio_decoder_ilbc.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200310 "codecs/ilbc/audio_encoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100311 "codecs/ilbc/audio_encoder_ilbc.h",
kjellander7439f972016-12-05 22:47:46 -0800312 ]
313
314 public_configs = [ ":ilbc_config" ]
315
316 deps = [
kjellander7439f972016-12-05 22:47:46 -0800317 ":audio_encoder_interface",
kwiberg087bd342017-02-10 08:15:44 -0800318 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800319 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800320 "../../api/audio_codecs:audio_codecs_api",
kjellander7439f972016-12-05 22:47:46 -0800321 "../../base:rtc_base_approved",
322 "../../common_audio",
323 ]
324 public_deps = [
325 ":ilbc_c",
326 ]
327}
328
329rtc_source_set("ilbc_c") {
330 visibility = [ ":*" ] # Only targets in this file can depend on this.
331 sources = [
332 "codecs/ilbc/abs_quant.c",
333 "codecs/ilbc/abs_quant.h",
334 "codecs/ilbc/abs_quant_loop.c",
335 "codecs/ilbc/abs_quant_loop.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000336 "codecs/ilbc/augmented_cb_corr.c",
337 "codecs/ilbc/augmented_cb_corr.h",
338 "codecs/ilbc/bw_expand.c",
339 "codecs/ilbc/bw_expand.h",
340 "codecs/ilbc/cb_construct.c",
341 "codecs/ilbc/cb_construct.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200342 "codecs/ilbc/cb_mem_energy.c",
343 "codecs/ilbc/cb_mem_energy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000344 "codecs/ilbc/cb_mem_energy_augmentation.c",
345 "codecs/ilbc/cb_mem_energy_augmentation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000346 "codecs/ilbc/cb_mem_energy_calc.c",
347 "codecs/ilbc/cb_mem_energy_calc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000348 "codecs/ilbc/cb_search.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200349 "codecs/ilbc/cb_search.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000350 "codecs/ilbc/cb_search_core.c",
351 "codecs/ilbc/cb_search_core.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000352 "codecs/ilbc/cb_update_best_index.c",
353 "codecs/ilbc/cb_update_best_index.h",
354 "codecs/ilbc/chebyshev.c",
355 "codecs/ilbc/chebyshev.h",
356 "codecs/ilbc/comp_corr.c",
357 "codecs/ilbc/comp_corr.h",
358 "codecs/ilbc/constants.c",
359 "codecs/ilbc/constants.h",
360 "codecs/ilbc/create_augmented_vec.c",
361 "codecs/ilbc/create_augmented_vec.h",
362 "codecs/ilbc/decode.c",
363 "codecs/ilbc/decode.h",
364 "codecs/ilbc/decode_residual.c",
365 "codecs/ilbc/decode_residual.h",
366 "codecs/ilbc/decoder_interpolate_lsf.c",
367 "codecs/ilbc/decoder_interpolate_lsf.h",
368 "codecs/ilbc/defines.h",
369 "codecs/ilbc/do_plc.c",
370 "codecs/ilbc/do_plc.h",
371 "codecs/ilbc/encode.c",
372 "codecs/ilbc/encode.h",
373 "codecs/ilbc/energy_inverse.c",
374 "codecs/ilbc/energy_inverse.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200375 "codecs/ilbc/enh_upsample.c",
376 "codecs/ilbc/enh_upsample.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000377 "codecs/ilbc/enhancer.c",
378 "codecs/ilbc/enhancer.h",
379 "codecs/ilbc/enhancer_interface.c",
380 "codecs/ilbc/enhancer_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000381 "codecs/ilbc/filtered_cb_vecs.c",
382 "codecs/ilbc/filtered_cb_vecs.h",
383 "codecs/ilbc/frame_classify.c",
384 "codecs/ilbc/frame_classify.h",
385 "codecs/ilbc/gain_dequant.c",
386 "codecs/ilbc/gain_dequant.h",
387 "codecs/ilbc/gain_quant.c",
388 "codecs/ilbc/gain_quant.h",
389 "codecs/ilbc/get_cd_vec.c",
390 "codecs/ilbc/get_cd_vec.h",
391 "codecs/ilbc/get_lsp_poly.c",
392 "codecs/ilbc/get_lsp_poly.h",
393 "codecs/ilbc/get_sync_seq.c",
394 "codecs/ilbc/get_sync_seq.h",
395 "codecs/ilbc/hp_input.c",
396 "codecs/ilbc/hp_input.h",
397 "codecs/ilbc/hp_output.c",
398 "codecs/ilbc/hp_output.h",
399 "codecs/ilbc/ilbc.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100400 "codecs/ilbc/ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000401 "codecs/ilbc/index_conv_dec.c",
402 "codecs/ilbc/index_conv_dec.h",
403 "codecs/ilbc/index_conv_enc.c",
404 "codecs/ilbc/index_conv_enc.h",
405 "codecs/ilbc/init_decode.c",
406 "codecs/ilbc/init_decode.h",
407 "codecs/ilbc/init_encode.c",
408 "codecs/ilbc/init_encode.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000409 "codecs/ilbc/interpolate.c",
410 "codecs/ilbc/interpolate.h",
411 "codecs/ilbc/interpolate_samples.c",
412 "codecs/ilbc/interpolate_samples.h",
413 "codecs/ilbc/lpc_encode.c",
414 "codecs/ilbc/lpc_encode.h",
415 "codecs/ilbc/lsf_check.c",
416 "codecs/ilbc/lsf_check.h",
417 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
418 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
419 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
420 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
421 "codecs/ilbc/lsf_to_lsp.c",
422 "codecs/ilbc/lsf_to_lsp.h",
423 "codecs/ilbc/lsf_to_poly.c",
424 "codecs/ilbc/lsf_to_poly.h",
425 "codecs/ilbc/lsp_to_lsf.c",
426 "codecs/ilbc/lsp_to_lsf.h",
427 "codecs/ilbc/my_corr.c",
428 "codecs/ilbc/my_corr.h",
429 "codecs/ilbc/nearest_neighbor.c",
430 "codecs/ilbc/nearest_neighbor.h",
431 "codecs/ilbc/pack_bits.c",
432 "codecs/ilbc/pack_bits.h",
433 "codecs/ilbc/poly_to_lsf.c",
434 "codecs/ilbc/poly_to_lsf.h",
435 "codecs/ilbc/poly_to_lsp.c",
436 "codecs/ilbc/poly_to_lsp.h",
437 "codecs/ilbc/refiner.c",
438 "codecs/ilbc/refiner.h",
439 "codecs/ilbc/simple_interpolate_lsf.c",
440 "codecs/ilbc/simple_interpolate_lsf.h",
441 "codecs/ilbc/simple_lpc_analysis.c",
442 "codecs/ilbc/simple_lpc_analysis.h",
443 "codecs/ilbc/simple_lsf_dequant.c",
444 "codecs/ilbc/simple_lsf_dequant.h",
445 "codecs/ilbc/simple_lsf_quant.c",
446 "codecs/ilbc/simple_lsf_quant.h",
447 "codecs/ilbc/smooth.c",
448 "codecs/ilbc/smooth.h",
449 "codecs/ilbc/smooth_out_data.c",
450 "codecs/ilbc/smooth_out_data.h",
451 "codecs/ilbc/sort_sq.c",
452 "codecs/ilbc/sort_sq.h",
453 "codecs/ilbc/split_vq.c",
454 "codecs/ilbc/split_vq.h",
455 "codecs/ilbc/state_construct.c",
456 "codecs/ilbc/state_construct.h",
457 "codecs/ilbc/state_search.c",
458 "codecs/ilbc/state_search.h",
459 "codecs/ilbc/swap_bytes.c",
460 "codecs/ilbc/swap_bytes.h",
461 "codecs/ilbc/unpack_bits.c",
462 "codecs/ilbc/unpack_bits.h",
463 "codecs/ilbc/vq3.c",
464 "codecs/ilbc/vq3.h",
465 "codecs/ilbc/vq4.c",
466 "codecs/ilbc/vq4.h",
467 "codecs/ilbc/window32_w32.c",
468 "codecs/ilbc/window32_w32.h",
469 "codecs/ilbc/xcorr_coef.c",
470 "codecs/ilbc/xcorr_coef.h",
471 ]
472
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700473 public_configs = [ ":ilbc_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000474
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000475 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800476 ":audio_encoder_interface",
477 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800478 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800479 "../../base:rtc_base_approved",
Henrik Lundind048aa02015-12-03 17:47:21 +0100480 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000481 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000482}
483
kjellanderb62dbbe2016-09-23 00:38:52 -0700484rtc_static_library("isac_common") {
kwiberg608c3cf2015-08-24 02:03:23 -0700485 sources = [
486 "codecs/isac/audio_encoder_isac_t.h",
487 "codecs/isac/audio_encoder_isac_t_impl.h",
488 "codecs/isac/locked_bandwidth_info.cc",
489 "codecs/isac/locked_bandwidth_info.h",
490 ]
kjellander676e08f2016-12-07 08:23:27 -0800491 deps = [
492 ":audio_encoder_interface",
kwiberga6ca5182017-01-30 05:28:54 -0800493 "../..:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -0800494 "../../base:rtc_base_approved",
495 ]
kwiberg608c3cf2015-08-24 02:03:23 -0700496}
497
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000498config("isac_config") {
499 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000500 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100501 "codecs/isac/main/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000502 ]
503}
504
kjellanderb62dbbe2016-09-23 00:38:52 -0700505rtc_static_library("isac") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000506 sources = [
kwiberga6ca5182017-01-30 05:28:54 -0800507 "codecs/isac/main/include/audio_decoder_isac.h",
508 "codecs/isac/main/include/audio_encoder_isac.h",
kjellander7439f972016-12-05 22:47:46 -0800509 "codecs/isac/main/source/audio_decoder_isac.cc",
510 "codecs/isac/main/source/audio_encoder_isac.cc",
511 ]
512
513 deps = [
kjellander7439f972016-12-05 22:47:46 -0800514 ":audio_encoder_interface",
515 ":isac_common",
kwiberg087bd342017-02-10 08:15:44 -0800516 "../../api/audio_codecs:audio_codecs_api",
kjellander7439f972016-12-05 22:47:46 -0800517 ]
518 public_deps = [
519 ":isac_c",
520 ]
521}
522
523rtc_static_library("isac_c") {
524 visibility = [ ":*" ] # Only targets in this file can depend on this.
525 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100526 "codecs/isac/main/include/isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000527 "codecs/isac/main/source/arith_routines.c",
528 "codecs/isac/main/source/arith_routines.h",
529 "codecs/isac/main/source/arith_routines_hist.c",
530 "codecs/isac/main/source/arith_routines_logist.c",
531 "codecs/isac/main/source/bandwidth_estimator.c",
532 "codecs/isac/main/source/bandwidth_estimator.h",
533 "codecs/isac/main/source/codec.h",
534 "codecs/isac/main/source/crc.c",
535 "codecs/isac/main/source/crc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000536 "codecs/isac/main/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200537 "codecs/isac/main/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000538 "codecs/isac/main/source/encode.c",
539 "codecs/isac/main/source/encode_lpc_swb.c",
540 "codecs/isac/main/source/encode_lpc_swb.h",
541 "codecs/isac/main/source/entropy_coding.c",
542 "codecs/isac/main/source/entropy_coding.h",
543 "codecs/isac/main/source/fft.c",
544 "codecs/isac/main/source/fft.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200545 "codecs/isac/main/source/filter_functions.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000546 "codecs/isac/main/source/filterbank_tables.c",
547 "codecs/isac/main/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200548 "codecs/isac/main/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000549 "codecs/isac/main/source/intialize.c",
550 "codecs/isac/main/source/isac.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200551 "codecs/isac/main/source/isac_float_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000552 "codecs/isac/main/source/lattice.c",
553 "codecs/isac/main/source/lpc_analysis.c",
554 "codecs/isac/main/source/lpc_analysis.h",
555 "codecs/isac/main/source/lpc_gain_swb_tables.c",
556 "codecs/isac/main/source/lpc_gain_swb_tables.h",
557 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
558 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
559 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
560 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
561 "codecs/isac/main/source/lpc_tables.c",
562 "codecs/isac/main/source/lpc_tables.h",
563 "codecs/isac/main/source/os_specific_inline.h",
564 "codecs/isac/main/source/pitch_estimator.c",
565 "codecs/isac/main/source/pitch_estimator.h",
566 "codecs/isac/main/source/pitch_filter.c",
567 "codecs/isac/main/source/pitch_gain_tables.c",
568 "codecs/isac/main/source/pitch_gain_tables.h",
569 "codecs/isac/main/source/pitch_lag_tables.c",
570 "codecs/isac/main/source/pitch_lag_tables.h",
571 "codecs/isac/main/source/settings.h",
572 "codecs/isac/main/source/spectrum_ar_model_tables.c",
573 "codecs/isac/main/source/spectrum_ar_model_tables.h",
574 "codecs/isac/main/source/structs.h",
575 "codecs/isac/main/source/transform.c",
576 ]
577
578 if (is_linux) {
579 libs = [ "m" ]
580 }
581
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700582 public_configs = [ ":isac_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000583
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000584 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800585 ":isac_common",
aleloicfee2152016-08-29 04:09:19 -0700586 "../..:webrtc_common",
587 "../../base:rtc_base_approved",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000588 "../../common_audio",
589 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000590}
591
592config("isac_fix_config") {
593 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000594 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100595 "codecs/isac/fix/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000596 ]
597}
598
kjellanderb62dbbe2016-09-23 00:38:52 -0700599rtc_static_library("isac_fix") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000600 sources = [
kjellander7439f972016-12-05 22:47:46 -0800601 "codecs/isac/fix/source/audio_decoder_isacfix.cc",
602 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
603 ]
604
605 public_configs = [ ":isac_fix_config" ]
606
607 deps = [
kjellander7439f972016-12-05 22:47:46 -0800608 ":audio_encoder_interface",
609 ":isac_common",
kwiberg087bd342017-02-10 08:15:44 -0800610 "../../api/audio_codecs:audio_codecs_api",
kjellander7439f972016-12-05 22:47:46 -0800611 "../../common_audio",
612 "../../system_wrappers",
613 ]
614 public_deps = [
615 ":isac_fix_c",
616 ]
617
618 if (rtc_build_with_neon) {
619 deps += [ ":isac_neon" ]
620 }
621}
622
kwiberga6ca5182017-01-30 05:28:54 -0800623rtc_source_set("isac_fix_common") {
624 visibility = [ ":*" ] # Only targets in this file can depend on this.
625 sources = [
626 "codecs/isac/fix/source/codec.h",
627 "codecs/isac/fix/source/fft.c",
628 "codecs/isac/fix/source/fft.h",
629 "codecs/isac/fix/source/settings.h",
630 ]
631 public_configs = [ ":isac_fix_config" ]
632}
kjellander676e08f2016-12-07 08:23:27 -0800633
kwiberga6ca5182017-01-30 05:28:54 -0800634rtc_source_set("isac_fix_c") {
kjellander7439f972016-12-05 22:47:46 -0800635 visibility = [ ":*" ] # Only targets in this file can depend on this.
636 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100637 "codecs/isac/fix/include/audio_decoder_isacfix.h",
638 "codecs/isac/fix/include/audio_encoder_isacfix.h",
639 "codecs/isac/fix/include/isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000640 "codecs/isac/fix/source/arith_routines.c",
641 "codecs/isac/fix/source/arith_routines_hist.c",
642 "codecs/isac/fix/source/arith_routines_logist.c",
643 "codecs/isac/fix/source/arith_routins.h",
644 "codecs/isac/fix/source/bandwidth_estimator.c",
645 "codecs/isac/fix/source/bandwidth_estimator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000646 "codecs/isac/fix/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200647 "codecs/isac/fix/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000648 "codecs/isac/fix/source/decode_plc.c",
649 "codecs/isac/fix/source/encode.c",
650 "codecs/isac/fix/source/entropy_coding.c",
651 "codecs/isac/fix/source/entropy_coding.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000652 "codecs/isac/fix/source/filterbank_tables.c",
653 "codecs/isac/fix/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200654 "codecs/isac/fix/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000655 "codecs/isac/fix/source/filters.c",
656 "codecs/isac/fix/source/initialize.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200657 "codecs/isac/fix/source/isac_fix_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000658 "codecs/isac/fix/source/isacfix.c",
659 "codecs/isac/fix/source/lattice.c",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700660 "codecs/isac/fix/source/lattice_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000661 "codecs/isac/fix/source/lpc_masking_model.c",
662 "codecs/isac/fix/source/lpc_masking_model.h",
663 "codecs/isac/fix/source/lpc_tables.c",
664 "codecs/isac/fix/source/lpc_tables.h",
665 "codecs/isac/fix/source/pitch_estimator.c",
666 "codecs/isac/fix/source/pitch_estimator.h",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700667 "codecs/isac/fix/source/pitch_estimator_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000668 "codecs/isac/fix/source/pitch_filter.c",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700669 "codecs/isac/fix/source/pitch_filter_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000670 "codecs/isac/fix/source/pitch_gain_tables.c",
671 "codecs/isac/fix/source/pitch_gain_tables.h",
672 "codecs/isac/fix/source/pitch_lag_tables.c",
673 "codecs/isac/fix/source/pitch_lag_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000674 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
675 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
676 "codecs/isac/fix/source/structs.h",
677 "codecs/isac/fix/source/transform.c",
678 "codecs/isac/fix/source/transform_tables.c",
679 ]
680
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700681 public_configs = [ ":isac_fix_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000682
kjellander676e08f2016-12-07 08:23:27 -0800683 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800684 ":audio_encoder_interface",
685 ":isac_common",
686 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800687 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800688 "../../base:rtc_base_approved",
689 "../../common_audio",
690 "../../system_wrappers",
691 ]
692
kwiberga6ca5182017-01-30 05:28:54 -0800693 public_deps = [
694 ":isac_fix_common",
695 ]
696
mbonadeie5dc3ce2017-01-25 05:34:46 -0800697 if (rtc_build_with_neon) {
698 deps += [ ":isac_neon" ]
699 }
700
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700701 if (current_cpu == "arm" && arm_version >= 7) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000702 sources += [
703 "codecs/isac/fix/source/lattice_armv7.S",
704 "codecs/isac/fix/source/pitch_filter_armv6.S",
705 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700706 sources -= [
707 "codecs/isac/fix/source/lattice_c.c",
708 "codecs/isac/fix/source/pitch_filter_c.c",
709 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000710 }
711
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000712 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000713 sources += [
714 "codecs/isac/fix/source/entropy_coding_mips.c",
715 "codecs/isac/fix/source/filters_mips.c",
716 "codecs/isac/fix/source/lattice_mips.c",
717 "codecs/isac/fix/source/pitch_estimator_mips.c",
718 "codecs/isac/fix/source/transform_mips.c",
719 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700720 sources -= [
721 "codecs/isac/fix/source/lattice_c.c",
722 "codecs/isac/fix/source/pitch_estimator_c.c",
723 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000724 if (mips_dsp_rev > 0) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200725 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000726 }
727 if (mips_dsp_rev > 1) {
728 sources += [
729 "codecs/isac/fix/source/lpc_masking_model_mips.c",
730 "codecs/isac/fix/source/pitch_filter_mips.c",
731 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200732 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000733 }
734 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000735}
736
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700737if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700738 rtc_static_library("isac_neon") {
Zhongwei Yaof242e662015-05-06 16:39:17 +0800739 sources = [
740 "codecs/isac/fix/source/entropy_coding_neon.c",
Zhongwei Yaob3cc77f2015-07-28 11:17:40 +0800741 "codecs/isac/fix/source/filterbanks_neon.c",
Zhongwei Yaof242e662015-05-06 16:39:17 +0800742 "codecs/isac/fix/source/filters_neon.c",
743 "codecs/isac/fix/source/lattice_neon.c",
744 "codecs/isac/fix/source/transform_neon.c",
745 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000746
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700747 if (current_cpu != "arm64") {
748 # Enable compilation for the NEON instruction set. This is needed
749 # since //build/config/arm.gni only enables NEON for iOS, not Android.
750 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700751 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700752 cflags = [ "-mfpu=neon" ]
753 }
754
755 # Disable LTO on NEON targets due to compiler bug.
756 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000757 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000758 cflags -= [
759 "-flto",
760 "-ffat-lto-objects",
761 ]
762 }
763
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200764 deps = [
kwiberga6ca5182017-01-30 05:28:54 -0800765 ":isac_fix_common",
kjellander676e08f2016-12-07 08:23:27 -0800766 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200767 "../../common_audio",
768 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000769 }
770}
771
772config("pcm16b_config") {
773 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000774 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000775 "codecs/pcm16b/include",
776 ]
777}
778
kjellanderb62dbbe2016-09-23 00:38:52 -0700779rtc_static_library("pcm16b") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000780 sources = [
Karl Wibergc0ac6ca2015-09-17 07:47:34 +0200781 "codecs/pcm16b/audio_decoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100782 "codecs/pcm16b/audio_decoder_pcm16b.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200783 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100784 "codecs/pcm16b/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000785 ]
786
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000787 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000788 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000789 ":g711",
kwiberg087bd342017-02-10 08:15:44 -0800790 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800791 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800792 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800793 "../../base:rtc_base_approved",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000794 ]
kjellander7439f972016-12-05 22:47:46 -0800795 public_deps = [
796 ":pcm16b_c",
797 ]
798 public_configs = [ ":pcm16b_config" ]
799}
800
801rtc_source_set("pcm16b_c") {
802 visibility = [ ":*" ] # Only targets in this file can depend on this.
803 sources = [
804 "codecs/pcm16b/pcm16b.c",
805 "codecs/pcm16b/pcm16b.h",
806 ]
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000807
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700808 public_configs = [ ":pcm16b_config" ]
kjellander676e08f2016-12-07 08:23:27 -0800809 deps = [
810 "../..:webrtc_common",
811 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000812}
813
814config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000815 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000816}
817
kjellanderb62dbbe2016-09-23 00:38:52 -0700818rtc_static_library("webrtc_opus") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000819 sources = [
Karl Wiberg0b058792015-09-15 17:28:18 +0200820 "codecs/opus/audio_decoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100821 "codecs/opus/audio_decoder_opus.h",
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000822 "codecs/opus/audio_encoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100823 "codecs/opus/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000824 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000825
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200826 deps = [
827 ":audio_encoder_interface",
minyue41b9c802016-10-06 07:13:54 -0700828 ":audio_network_adaptor",
kjellander676e08f2016-12-07 08:23:27 -0800829 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800830 "../../api/audio_codecs:audio_codecs_api",
Henrik Lundind048aa02015-12-03 17:47:21 +0100831 "../../base:rtc_base_approved",
tereliusbc5d9212017-01-13 09:14:33 -0800832 "../../base:rtc_numerics",
michaelt566d8202017-01-12 10:17:38 -0800833 "../../common_audio",
kjellander676e08f2016-12-07 08:23:27 -0800834 "../../system_wrappers",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200835 ]
kjellander7439f972016-12-05 22:47:46 -0800836 public_deps = [
837 ":webrtc_opus_c",
838 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000839
michaelta55f0212017-02-02 07:47:19 -0800840 defines = audio_codec_defines
henrik.lundinfd87f4a2016-11-28 11:15:54 -0800841 if (rtc_opus_variable_complexity) {
842 defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=1" ]
843 } else {
844 defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=0" ]
845 }
henrik.lundin875862c2016-11-22 02:07:54 -0800846
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000847 if (rtc_build_opus) {
kjellander7439f972016-12-05 22:47:46 -0800848 public_deps += [ rtc_opus_dir ]
849 } else if (build_with_mozilla) {
850 include_dirs = [ getenv("DIST") + "/include/opus" ]
851 }
852}
853
854rtc_source_set("webrtc_opus_c") {
855 visibility = [ ":*" ] # Only targets in this file can depend on this.
856 sources = [
857 "codecs/opus/opus_inst.h",
858 "codecs/opus/opus_interface.c",
859 "codecs/opus/opus_interface.h",
860 ]
861
minyue2e03c662017-02-01 17:31:11 -0800862 defines = audio_coding_defines
863
kjellander7439f972016-12-05 22:47:46 -0800864 if (rtc_build_opus) {
tfarina702f3972015-09-25 05:57:37 -0700865 public_deps = [
866 rtc_opus_dir,
867 ]
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000868 } else if (build_with_mozilla) {
869 include_dirs = [ getenv("DIST") + "/include/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000870 }
kjellander7439f972016-12-05 22:47:46 -0800871
872 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800873 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800874 "../../base:rtc_base_approved",
875 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000876}
877
minyue25f6a392016-09-22 22:23:20 -0700878if (rtc_enable_protobuf) {
879 proto_library("ana_debug_dump_proto") {
880 sources = [
881 "audio_network_adaptor/debug_dump.proto",
882 ]
sakal363a2912017-01-13 06:52:12 -0800883 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
minyue25f6a392016-09-22 22:23:20 -0700884 }
minyuea1d9ad02016-10-02 14:53:37 -0700885 proto_library("ana_config_proto") {
886 sources = [
887 "audio_network_adaptor/config.proto",
888 ]
889 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
890 }
minyue25f6a392016-09-22 22:23:20 -0700891}
892
minyue0d382ef2016-10-07 07:59:28 -0700893rtc_static_library("audio_network_adaptor") {
minyue7610f852016-09-07 13:51:51 -0700894 sources = [
895 "audio_network_adaptor/audio_network_adaptor.cc",
minyuecaa9cb22016-09-13 13:34:15 -0700896 "audio_network_adaptor/audio_network_adaptor_impl.cc",
897 "audio_network_adaptor/audio_network_adaptor_impl.h",
minyue4aec1d42016-09-21 23:01:26 -0700898 "audio_network_adaptor/bitrate_controller.cc",
899 "audio_network_adaptor/bitrate_controller.h",
minyue2e164c62016-09-14 06:47:36 -0700900 "audio_network_adaptor/channel_controller.cc",
901 "audio_network_adaptor/channel_controller.h",
minyuecaa9cb22016-09-13 13:34:15 -0700902 "audio_network_adaptor/controller.cc",
903 "audio_network_adaptor/controller.h",
904 "audio_network_adaptor/controller_manager.cc",
905 "audio_network_adaptor/controller_manager.h",
minyue25f6a392016-09-22 22:23:20 -0700906 "audio_network_adaptor/debug_dump_writer.cc",
907 "audio_network_adaptor/debug_dump_writer.h",
minyue186cd062016-09-16 05:54:39 -0700908 "audio_network_adaptor/dtx_controller.cc",
909 "audio_network_adaptor/dtx_controller.h",
minyue4b7c9522017-01-24 04:54:59 -0800910 "audio_network_adaptor/event_log_writer.cc",
911 "audio_network_adaptor/event_log_writer.h",
elad.alon6d7900d2017-03-24 04:12:56 -0700912 "audio_network_adaptor/fec_controller_plr_based.cc",
913 "audio_network_adaptor/fec_controller_plr_based.h",
914 "audio_network_adaptor/fec_controller_rplr_based.cc",
915 "audio_network_adaptor/fec_controller_rplr_based.h",
minyuee35d3292016-09-21 16:00:31 -0700916 "audio_network_adaptor/frame_length_controller.cc",
917 "audio_network_adaptor/frame_length_controller.h",
minyue7610f852016-09-07 13:51:51 -0700918 "audio_network_adaptor/include/audio_network_adaptor.h",
elad.alon326263a2017-03-29 03:16:58 -0700919 "audio_network_adaptor/util/threshold_curve.h",
minyue7610f852016-09-07 13:51:51 -0700920 ]
minyue25f6a392016-09-22 22:23:20 -0700921
minyue41b9c802016-10-06 07:13:54 -0700922 deps = [
923 "../..:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -0800924 "../../base:rtc_base_approved",
925 "../../common_audio",
minyue4b7c9522017-01-24 04:54:59 -0800926 "../../logging:rtc_event_log_api",
minyue41b9c802016-10-06 07:13:54 -0700927 "../../system_wrappers",
928 ]
929
minyue25f6a392016-09-22 22:23:20 -0700930 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700931 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700932 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700933 ":ana_debug_dump_proto",
934 ]
935 defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ]
936 }
minyue4b7c9522017-01-24 04:54:59 -0800937
938 if (!build_with_chromium && is_clang) {
939 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
940 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
941 }
minyue7610f852016-09-07 13:51:51 -0700942}
943
kwiberg65cb70d2017-03-03 06:16:28 -0800944rtc_source_set("neteq_decoder_enum") {
945 sources = [
946 "neteq/neteq_decoder_enum.cc",
947 "neteq/neteq_decoder_enum.h",
948 ]
949 deps = [
950 "../../api/audio_codecs:audio_codecs_api",
951 "../../base:rtc_base_approved",
952 ]
953}
kjellander676e08f2016-12-07 08:23:27 -0800954
kwiberg65cb70d2017-03-03 06:16:28 -0800955rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000956 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000957 "neteq/accelerate.cc",
958 "neteq/accelerate.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000959 "neteq/audio_decoder_impl.cc",
960 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000961 "neteq/audio_multi_vector.cc",
962 "neteq/audio_multi_vector.h",
963 "neteq/audio_vector.cc",
964 "neteq/audio_vector.h",
965 "neteq/background_noise.cc",
966 "neteq/background_noise.h",
967 "neteq/buffer_level_filter.cc",
968 "neteq/buffer_level_filter.h",
969 "neteq/comfort_noise.cc",
970 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700971 "neteq/cross_correlation.cc",
972 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000973 "neteq/decision_logic.cc",
974 "neteq/decision_logic.h",
975 "neteq/decision_logic_fax.cc",
976 "neteq/decision_logic_fax.h",
977 "neteq/decision_logic_normal.cc",
978 "neteq/decision_logic_normal.h",
979 "neteq/decoder_database.cc",
980 "neteq/decoder_database.h",
981 "neteq/defines.h",
982 "neteq/delay_manager.cc",
983 "neteq/delay_manager.h",
984 "neteq/delay_peak_detector.cc",
985 "neteq/delay_peak_detector.h",
986 "neteq/dsp_helper.cc",
987 "neteq/dsp_helper.h",
988 "neteq/dtmf_buffer.cc",
989 "neteq/dtmf_buffer.h",
990 "neteq/dtmf_tone_generator.cc",
991 "neteq/dtmf_tone_generator.h",
992 "neteq/expand.cc",
993 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +0100994 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000995 "neteq/merge.cc",
996 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -0700997 "neteq/nack_tracker.cc",
998 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200999 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001000 "neteq/neteq_impl.cc",
1001 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001002 "neteq/normal.cc",
1003 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -07001004 "neteq/packet.cc",
1005 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001006 "neteq/packet_buffer.cc",
1007 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001008 "neteq/post_decode_vad.cc",
1009 "neteq/post_decode_vad.h",
1010 "neteq/preemptive_expand.cc",
1011 "neteq/preemptive_expand.h",
1012 "neteq/random_vector.cc",
1013 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -07001014 "neteq/red_payload_splitter.cc",
1015 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001016 "neteq/rtcp.cc",
1017 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001018 "neteq/statistics_calculator.cc",
1019 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001020 "neteq/sync_buffer.cc",
1021 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -07001022 "neteq/tick_timer.cc",
1023 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001024 "neteq/time_stretch.cc",
1025 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001026 "neteq/timestamp_scaler.cc",
1027 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001028 ]
1029
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001030 deps = [
kwiberg65cb70d2017-03-03 06:16:28 -08001031 ":audio_coding_module_typedefs",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001032 ":cng",
1033 ":g711",
kjellander676e08f2016-12-07 08:23:27 -08001034 ":isac_fix",
kwiberg65cb70d2017-03-03 06:16:28 -08001035 ":neteq_decoder_enum",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001036 ":pcm16b",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +00001037 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001038 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001039 "../../base:gtest_prod",
1040 "../../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001041 "../../common_audio",
1042 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001043 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001044
1045 defines = []
1046
kwibergf8c2bac2016-01-18 06:38:32 -08001047 if (rtc_include_ilbc) {
1048 defines += [ "WEBRTC_CODEC_ILBC" ]
1049 deps += [ ":ilbc" ]
1050 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001051 if (rtc_include_opus) {
1052 defines += [ "WEBRTC_CODEC_OPUS" ]
1053 deps += [ ":webrtc_opus" ]
1054 }
kwiberg98ab3a42015-09-30 21:54:21 -07001055 if (!build_with_mozilla) {
1056 if (current_cpu == "arm") {
1057 defines += [ "WEBRTC_CODEC_ISACFX" ]
1058 deps += [ ":isac_fix" ]
1059 } else {
1060 defines += [ "WEBRTC_CODEC_ISAC" ]
1061 deps += [ ":isac" ]
1062 }
1063 defines += [ "WEBRTC_CODEC_G722" ]
1064 deps += [ ":g722" ]
1065 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001066}
kjellanderfb114242016-06-13 00:19:48 -07001067
henrik.lundin58466f62016-10-05 02:27:42 -07001068# Although providing only test support, this target must be outside of the
1069# rtc_include_tests conditional. The reason is that it supports fuzzer tests
1070# that ultimately are built and run as a part of the Chromium ecosystem, which
1071# does not set the rtc_include_tests flag.
1072rtc_source_set("neteq_test_minimal") {
1073 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001074
1075 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1076 # Has cyclic dependency with :neteq_unittest_tools
1077 check_includes = false
1078
henrik.lundin58466f62016-10-05 02:27:42 -07001079 sources = [
1080 "neteq/tools/encode_neteq_input.cc",
1081 "neteq/tools/encode_neteq_input.h",
1082 "neteq/tools/neteq_test.cc",
1083 "neteq/tools/neteq_test.h",
1084 ]
1085
kjellandere40a7ee2016-10-16 23:56:12 -07001086 if (!build_with_chromium && is_clang) {
1087 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
henrik.lundin58466f62016-10-05 02:27:42 -07001088 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1089 }
kjellander676e08f2016-12-07 08:23:27 -08001090
1091 deps = [
1092 ":audio_encoder_interface",
kjellander676e08f2016-12-07 08:23:27 -08001093 ":neteq",
1094 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001095 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001096 "../../base:rtc_base_approved",
1097 ]
henrik.lundin58466f62016-10-05 02:27:42 -07001098}
1099
kjellanderfb114242016-06-13 00:19:48 -07001100if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -07001101 group("audio_coding_tests") {
1102 testonly = true
1103 public_deps = [
1104 ":RTPchange",
1105 ":RTPencode",
1106 ":RTPjitter",
1107 ":RTPtimeshift",
1108 ":acm_receive_test",
1109 ":acm_send_test",
kjellander6ceab082016-10-28 05:44:03 -07001110 ":audio_codec_speed_tests",
1111 ":audio_decoder_unittests",
1112 ":audio_decoder_unittests",
1113 ":delay_test",
1114 ":g711_test",
1115 ":g722_test",
1116 ":ilbc_test",
1117 ":insert_packet_with_timing",
1118 ":isac_api_test",
1119 ":isac_fix_test",
1120 ":isac_switch_samprate_test",
1121 ":isac_test",
1122 ":neteq_ilbc_quality_test",
1123 ":neteq_isac_quality_test",
1124 ":neteq_opus_quality_test",
1125 ":neteq_pcmu_quality_test",
1126 ":neteq_speed_test",
1127 ":rtp_analyze",
1128 ":rtpcat",
1129 ":webrtc_opus_fec_test",
1130 ]
1131 if (rtc_enable_protobuf) {
1132 public_deps += [ ":neteq_rtpplay" ]
1133 }
1134 }
1135
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001136 rtc_source_set("audio_coding_modules_tests") {
1137 testonly = true
1138 sources = [
1139 "test/APITest.cc",
1140 "test/Channel.cc",
1141 "test/EncodeDecodeTest.cc",
1142 "test/PCMFile.cc",
1143 "test/PacketLossTest.cc",
1144 "test/RTPFile.cc",
1145 "test/TestAllCodecs.cc",
1146 "test/TestRedFec.cc",
1147 "test/TestStereo.cc",
1148 "test/TestVADDTX.cc",
1149 "test/Tester.cc",
1150 "test/TwoWayCommunication.cc",
1151 "test/iSACTest.cc",
1152 "test/opus_test.cc",
1153 "test/target_delay_unittest.cc",
1154 "test/utility.cc",
1155 ]
1156 deps = [
1157 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001158 ":audio_coding_module_typedefs",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001159 ":audio_format_conversion",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001160 ":pcm16b_c",
1161 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001162 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001163 "../../base:rtc_base_approved",
1164 "../../system_wrappers:system_wrappers",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001165 "../../test:test_support",
1166 ]
1167 defines = audio_coding_defines
1168 if (is_win) {
1169 cflags = [
1170 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1171 "/wd4373", # virtual function override.
1172 ]
1173 }
1174 if (!build_with_chromium && is_clang) {
1175 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1176 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1177 }
1178 }
1179
ehmaldonado021eef32017-01-05 07:09:50 -08001180 rtc_source_set("audio_coding_perf_tests") {
1181 testonly = true
1182 sources = [
1183 "codecs/opus/opus_complexity_unittest.cc",
1184 "neteq/test/neteq_performance_unittest.cc",
1185 ]
1186 deps = [
1187 ":neteq_test_support",
1188 ":neteq_unittest_tools",
1189 ":webrtc_opus",
1190 "../..:webrtc_common",
1191 "../../base:rtc_base_approved",
1192 "../../system_wrappers:system_wrappers",
1193 "../../test:test_support",
1194 ]
1195 if (!build_with_chromium && is_clang) {
1196 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1197 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1198 }
1199 }
1200
ehmaldonado38a21322016-09-02 04:10:34 -07001201 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -07001202 testonly = true
1203 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001204 "acm2/acm_receive_test.cc",
1205 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001206 ]
1207
kjellanderfb114242016-06-13 00:19:48 -07001208 defines = audio_coding_defines
1209
1210 deps = audio_coding_deps + [
1211 ":audio_coding",
kjellander676e08f2016-12-07 08:23:27 -08001212 ":audio_format_conversion",
kwiberg087bd342017-02-10 08:15:44 -08001213 "../../api/audio_codecs:audio_codecs_api",
1214 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellanderfb114242016-06-13 00:19:48 -07001215 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001216 "../../base:rtc_base_approved",
1217 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001218 "//testing/gtest",
1219 ]
1220 }
1221
ehmaldonado38a21322016-09-02 04:10:34 -07001222 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -07001223 testonly = true
1224 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001225 "acm2/acm_send_test.cc",
1226 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001227 ]
1228
kjellanderfb114242016-06-13 00:19:48 -07001229 defines = audio_coding_defines
1230
1231 deps = audio_coding_deps + [
1232 ":audio_coding",
kwiberg087bd342017-02-10 08:15:44 -08001233 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001234 ":audio_encoder_interface",
kjellanderfb114242016-06-13 00:19:48 -07001235 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001236 "../../base:rtc_base_approved",
1237 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001238 "//testing/gtest",
1239 ]
1240 }
1241
ehmaldonado38a21322016-09-02 04:10:34 -07001242 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -07001243 testonly = true
1244 sources = [
1245 "test/Channel.cc",
1246 "test/PCMFile.cc",
1247 "test/delay_test.cc",
1248 "test/utility.cc",
1249 ]
1250
aleloi333f2062016-07-28 01:21:29 -07001251 deps = [
1252 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001253 ":audio_coding_module_typedefs",
kwibergda2bf4e2016-10-24 13:47:09 -07001254 ":audio_format_conversion",
aleloi333f2062016-07-28 01:21:29 -07001255 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001256 "../../base:rtc_base_approved",
aleloi333f2062016-07-28 01:21:29 -07001257 "../../system_wrappers",
1258 "../../system_wrappers:system_wrappers_default",
1259 "../../test:test_support",
1260 "../rtp_rtcp",
1261 "//testing/gtest",
1262 "//third_party/gflags:gflags",
1263 ]
1264 } # delay_test
1265
ehmaldonado38a21322016-09-02 04:10:34 -07001266 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -07001267 testonly = true
1268 sources = [
1269 "test/Channel.cc",
1270 "test/PCMFile.cc",
1271 "test/insert_packet_with_timing.cc",
1272 ]
1273
kjellandere40a7ee2016-10-16 23:56:12 -07001274 if (!build_with_chromium && is_clang) {
1275 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001276 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -07001277 }
1278
1279 deps = [
1280 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001281 ":audio_format_conversion",
aleloi00730c72016-07-28 01:27:10 -07001282 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001283 "../../base:rtc_base_approved",
aleloi00730c72016-07-28 01:27:10 -07001284 "../../system_wrappers",
1285 "../../system_wrappers:system_wrappers_default",
1286 "../../test:test_support",
1287 "../rtp_rtcp",
1288 "//testing/gtest",
1289 "//third_party/gflags:gflags",
1290 ]
1291 } # insert_packet_with_timing
1292
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001293 audio_decoder_unittests_resources =
1294 [ "//resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -07001295
1296 if (is_ios) {
1297 bundle_data("audio_decoder_unittests_bundle_data") {
1298 testonly = true
1299 sources = audio_decoder_unittests_resources
1300 outputs = [
1301 "{{bundle_resources_dir}}/{{source_file_part}}",
1302 ]
1303 }
1304 }
1305
ehmaldonado38a21322016-09-02 04:10:34 -07001306 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -07001307 testonly = true
1308 sources = [
1309 "neteq/audio_decoder_unittest.cc",
1310 ]
1311
kjellandere40a7ee2016-10-16 23:56:12 -07001312 if (!build_with_chromium && is_clang) {
1313 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001314 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -07001315 }
1316
1317 deps = []
1318
1319 defines = neteq_defines
1320
1321 deps += audio_coding_deps
1322 deps += [
ehmaldonado87b8e9f2017-02-07 06:26:29 -08001323 ":ilbc",
charujainddf3e4a2016-08-01 07:49:42 -07001324 ":isac",
1325 ":isac_fix",
1326 ":neteq",
1327 ":neteq_unittest_tools",
kwiberg087bd342017-02-10 08:15:44 -08001328 "../../api/audio_codecs:audio_codecs_api",
kjellander6ceab082016-10-28 05:44:03 -07001329 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001330 "../../test:test_main",
charujainddf3e4a2016-08-01 07:49:42 -07001331 "//testing/gtest",
1332 ]
1333
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001334 data = audio_decoder_unittests_resources
1335
charujainddf3e4a2016-08-01 07:49:42 -07001336 if (is_android) {
1337 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001338 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001339 }
kjellander32c4a202016-08-30 02:53:49 -07001340 if (is_ios) {
1341 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001342 }
1343 } # audio_decoder_unittests
1344
kjellanderfb114242016-06-13 00:19:48 -07001345 if (rtc_enable_protobuf) {
1346 proto_library("neteq_unittest_proto") {
1347 sources = [
1348 "neteq/neteq_unittest.proto",
1349 ]
kjellandere3e902e2017-02-28 08:01:46 -08001350 proto_out_dir = "webrtc/modules/audio_coding/neteq"
kjellanderfb114242016-06-13 00:19:48 -07001351 }
henrik.lundin03153f12016-06-21 05:38:42 -07001352
kjellanderb62dbbe2016-09-23 00:38:52 -07001353 rtc_static_library("rtc_event_log_source") {
henrik.lundin03153f12016-06-21 05:38:42 -07001354 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001355
1356 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1357 # Needs call.h to be moved to webrtc/api first.
1358 check_includes = false
1359
henrik.lundin03153f12016-06-21 05:38:42 -07001360 sources = [
1361 "neteq/tools/rtc_event_log_source.cc",
1362 "neteq/tools/rtc_event_log_source.h",
1363 ]
1364
kjellandere40a7ee2016-10-16 23:56:12 -07001365 if (!build_with_chromium && is_clang) {
1366 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001367 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001368 }
1369
1370 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001371 "../../base:rtc_base_approved",
skvladcc91d282016-10-03 18:31:22 -07001372 "../../logging:rtc_event_log_parser",
henrik.lundin03153f12016-06-21 05:38:42 -07001373 ]
1374 public_deps = [
skvladcc91d282016-10-03 18:31:22 -07001375 "../../logging:rtc_event_log_proto",
henrik.lundin03153f12016-06-21 05:38:42 -07001376 ]
1377 }
1378
ehmaldonado38a21322016-09-02 04:10:34 -07001379 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001380 testonly = true
1381 defines = []
1382 deps = []
1383 sources = [
1384 "neteq/tools/neteq_rtpplay.cc",
1385 ]
1386
kjellandere40a7ee2016-10-16 23:56:12 -07001387 if (!build_with_chromium && is_clang) {
1388 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001389 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001390 }
1391
1392 if (is_win) {
1393 cflags = [
1394 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1395 "/wd4373", # virtual function override.
1396 ]
1397 }
1398
1399 deps += [
1400 ":neteq",
1401 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001402 "../..:webrtc_common",
1403 "../../base:rtc_base_approved",
henrik.lundin03153f12016-06-21 05:38:42 -07001404 "../../system_wrappers:system_wrappers_default",
1405 "../../test:test_support",
1406 "//third_party/gflags",
1407 ]
1408 }
kjellanderfb114242016-06-13 00:19:48 -07001409 }
1410
ehmaldonado38a21322016-09-02 04:10:34 -07001411 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001412 testonly = true
1413 defines = []
1414 deps = []
1415 sources = [
1416 "codecs/isac/fix/test/isac_speed_test.cc",
1417 "codecs/opus/opus_speed_test.cc",
1418 "codecs/tools/audio_codec_speed_test.cc",
1419 "codecs/tools/audio_codec_speed_test.h",
1420 ]
1421
kjellandere40a7ee2016-10-16 23:56:12 -07001422 if (!build_with_chromium && is_clang) {
1423 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001424 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001425 }
1426
1427 if (is_android) {
1428 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001429 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001430 }
1431
1432 deps += [
1433 ":isac_fix",
1434 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001435 "../..:webrtc_common",
1436 "../../base:rtc_base_approved",
aleloie6b60a42016-07-28 02:34:30 -07001437 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001438 "../../test:test_main",
kjellander6ceab082016-10-28 05:44:03 -07001439 "../audio_processing",
aleloie6b60a42016-07-28 02:34:30 -07001440 "//testing/gtest",
1441 ]
1442 }
1443
ehmaldonado38a21322016-09-02 04:10:34 -07001444 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001445 testonly = true
1446 sources = [
1447 "neteq/tools/neteq_external_decoder_test.cc",
1448 "neteq/tools/neteq_external_decoder_test.h",
1449 "neteq/tools/neteq_performance_test.cc",
1450 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001451 ]
1452
kjellandere40a7ee2016-10-16 23:56:12 -07001453 if (!build_with_chromium && is_clang) {
1454 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001455 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001456 }
1457
1458 deps = [
1459 ":neteq",
1460 ":neteq_unittest_tools",
1461 ":pcm16b",
kjellander676e08f2016-12-07 08:23:27 -08001462 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001463 "../../api/audio_codecs:audio_codecs_api",
1464 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001465 "../../base:rtc_base_approved",
1466 "../../system_wrappers",
1467 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001468 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001469 ]
1470 }
1471
ehmaldonado38a21322016-09-02 04:10:34 -07001472 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001473 testonly = true
1474 sources = [
1475 "neteq/tools/neteq_quality_test.cc",
1476 "neteq/tools/neteq_quality_test.h",
1477 ]
1478
kjellandere40a7ee2016-10-16 23:56:12 -07001479 if (!build_with_chromium && is_clang) {
1480 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001481 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001482 }
1483
1484 deps = [
1485 ":neteq",
1486 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001487 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001488 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001489 "../../base:rtc_base_approved",
1490 "../../test:test_support",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001491 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001492 "//third_party/gflags",
1493 ]
1494 }
1495
kjellanderfb114242016-06-13 00:19:48 -07001496 config("neteq_unittest_tools_config") {
1497 include_dirs = [ "tools" ]
1498 }
1499
ehmaldonado38a21322016-09-02 04:10:34 -07001500 rtc_source_set("neteq_unittest_tools") {
kjellanderfb114242016-06-13 00:19:48 -07001501 testonly = true
1502 sources = [
1503 "neteq/tools/audio_checksum.h",
1504 "neteq/tools/audio_loop.cc",
1505 "neteq/tools/audio_loop.h",
aleloi0e0be0a2016-08-10 04:55:20 -07001506 "neteq/tools/audio_sink.cc",
kjellanderfb114242016-06-13 00:19:48 -07001507 "neteq/tools/audio_sink.h",
1508 "neteq/tools/constant_pcm_packet_source.cc",
1509 "neteq/tools/constant_pcm_packet_source.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001510 "neteq/tools/fake_decode_from_file.cc",
1511 "neteq/tools/fake_decode_from_file.h",
kjellanderfb114242016-06-13 00:19:48 -07001512 "neteq/tools/input_audio_file.cc",
1513 "neteq/tools/input_audio_file.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001514 "neteq/tools/neteq_input.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001515 "neteq/tools/neteq_replacement_input.cc",
1516 "neteq/tools/neteq_replacement_input.h",
kjellanderfb114242016-06-13 00:19:48 -07001517 "neteq/tools/output_audio_file.h",
1518 "neteq/tools/output_wav_file.h",
1519 "neteq/tools/packet.cc",
1520 "neteq/tools/packet.h",
kwibergb8e56ee2016-08-29 06:37:33 -07001521 "neteq/tools/packet_source.cc",
kjellanderfb114242016-06-13 00:19:48 -07001522 "neteq/tools/packet_source.h",
1523 "neteq/tools/resample_input_audio_file.cc",
1524 "neteq/tools/resample_input_audio_file.h",
1525 "neteq/tools/rtp_file_source.cc",
1526 "neteq/tools/rtp_file_source.h",
1527 "neteq/tools/rtp_generator.cc",
1528 "neteq/tools/rtp_generator.h",
1529 ]
1530
ehmaldonadoe9cc6862016-09-05 06:10:18 -07001531 public_configs = [ ":neteq_unittest_tools_config" ]
kjellanderfb114242016-06-13 00:19:48 -07001532
kjellandere40a7ee2016-10-16 23:56:12 -07001533 if (!build_with_chromium && is_clang) {
1534 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001535 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001536 }
1537
1538 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001539 ":audio_encoder_interface",
1540 ":pcm16b",
1541 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001542 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001543 "../../base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -07001544 "../../common_audio",
1545 "../../test:rtp_test_utils",
1546 "../rtp_rtcp",
1547 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001548
kjellander676e08f2016-12-07 08:23:27 -08001549 public_deps = [
1550 ":neteq_test_minimal",
1551 ]
1552
henrik.lundine8a77e32016-06-22 06:34:03 -07001553 if (rtc_enable_protobuf) {
ehmaldonado36268652017-01-19 08:27:11 -08001554 sources += [
1555 "neteq/tools/neteq_packet_source_input.cc",
1556 "neteq/tools/neteq_packet_source_input.h",
1557 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001558 deps += [ ":rtc_event_log_source" ]
1559 }
kjellanderfb114242016-06-13 00:19:48 -07001560 }
aleloi3022a342016-07-26 06:36:03 -07001561
ehmaldonado38a21322016-09-02 04:10:34 -07001562 rtc_source_set("neteq_test_tools") {
aleloi3022a342016-07-26 06:36:03 -07001563 testonly = true
1564 sources = [
1565 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1566 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1567 "neteq/test/NETEQTEST_RTPpacket.cc",
1568 "neteq/test/NETEQTEST_RTPpacket.h",
1569 ]
1570
1571 deps = [
1572 ":cng",
1573 ":g711",
1574 ":g722",
1575 ":ilbc",
1576 ":isac",
1577 ":pcm16b",
1578 "../..:webrtc_common",
1579 "//testing/gtest",
1580 ]
1581
1582 include_dirs = [
1583 "neteq/include",
1584 "neteq/test",
1585 "../../",
1586 ]
1587
1588 if (is_win) {
1589 cflags = [
1590 # Disable warnings to enable Win64 build, issue 1323.
1591 "/wd4267", # size_t to int truncation
1592 ]
1593 }
1594 }
aleloi47bded42016-07-26 06:46:19 -07001595
aleloi82667732016-08-02 01:45:50 -07001596 config("RTPencode_config") {
1597 defines = [
1598 "CODEC_ILBC",
1599 "CODEC_PCM16B",
1600 "CODEC_G711",
1601 "CODEC_G722",
1602 "CODEC_ISAC",
1603 "CODEC_PCM16B_WB",
1604 "CODEC_ISAC_SWB",
1605 "CODEC_PCM16B_32KHZ",
1606 "CODEC_PCM16B_48KHZ",
1607 "CODEC_CNGCODEC8",
1608 "CODEC_CNGCODEC16",
1609 "CODEC_CNGCODEC32",
1610 "CODEC_ATEVENT_DECODE",
1611 "CODEC_RED",
1612 "CODEC_OPUS",
1613 ]
1614 }
1615
ehmaldonado38a21322016-09-02 04:10:34 -07001616 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001617 testonly = true
1618
1619 deps = [
1620 # TODO(hlundin): Make RTPencode use ACM to encode files.
1621 ":cng",
1622 ":g711",
1623 ":g722",
1624 ":ilbc",
1625 ":isac",
kjellander676e08f2016-12-07 08:23:27 -08001626 ":neteq",
aleloi82667732016-08-02 01:45:50 -07001627 ":neteq_test_tools",
1628 ":pcm16b",
1629 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001630 "../..:webrtc_common",
1631 "../../base:rtc_base_approved",
aleloi82667732016-08-02 01:45:50 -07001632 "../../common_audio",
1633 ]
1634
1635 configs += [ ":RTPencode_config" ]
1636
1637 sources = [
1638 "neteq/test/RTPencode.cc",
1639 ]
1640
1641 include_dirs = [
1642 "neteq/include",
1643 "neteq/test",
1644 ]
1645
1646 if (is_win) {
1647 cflags = [
1648 # Disable warnings to enable Win64 build, issue 1323.
1649 "/wd4267", # size_t to int truncation
1650 ]
1651 }
1652 }
1653
ehmaldonado38a21322016-09-02 04:10:34 -07001654 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001655 testonly = true
1656
1657 sources = [
1658 "neteq/test/RTPchange.cc",
1659 ]
1660
1661 deps = [
1662 ":neteq_test_tools",
1663 ]
1664 }
1665
ehmaldonado38a21322016-09-02 04:10:34 -07001666 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001667 testonly = true
1668
1669 sources = [
1670 "neteq/tools/rtpcat.cc",
1671 ]
1672
1673 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001674 "../../base:rtc_base_approved",
aleloi5556dcb2016-08-02 04:27:25 -07001675 "../../system_wrappers:system_wrappers_default",
1676 "../../test:rtp_test_utils",
1677 "//testing/gtest",
1678 ]
1679 }
1680
ehmaldonado38a21322016-09-02 04:10:34 -07001681 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001682 testonly = true
1683
1684 sources = [
1685 "neteq/test/RTPtimeshift.cc",
1686 ]
1687
1688 deps = [
1689 ":neteq_test_tools",
kjellander676e08f2016-12-07 08:23:27 -08001690 "../../test:test_support",
aleloi5a746502016-08-02 06:06:33 -07001691 "//testing/gtest",
1692 ]
1693 }
1694
ehmaldonado38a21322016-09-02 04:10:34 -07001695 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001696 testonly = true
1697 deps = [
1698 "../..:webrtc_common",
kthelgason29a44e32016-09-27 03:52:02 -07001699 "../../base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001700 "../../test:test_support",
aleloi17dfa742016-08-03 01:17:25 -07001701 "//testing/gtest",
1702 ]
1703 sources = [
1704 "neteq/test/RTPjitter.cc",
1705 ]
1706 }
1707
ehmaldonado38a21322016-09-02 04:10:34 -07001708 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001709 testonly = true
1710
1711 sources = [
1712 "neteq/tools/rtp_analyze.cc",
1713 ]
1714
1715 deps = [
1716 ":neteq",
1717 ":neteq_unittest_tools",
1718 ":pcm16b",
1719 "../../system_wrappers:system_wrappers_default",
1720 "//testing/gtest",
1721 "//third_party/gflags:gflags",
1722 ]
1723
kjellandere40a7ee2016-10-16 23:56:12 -07001724 if (!build_with_chromium && is_clang) {
1725 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001726 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001727 }
1728 }
aleloi630c6d52016-08-10 02:11:30 -07001729
ehmaldonado38a21322016-09-02 04:10:34 -07001730 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001731 testonly = true
1732
1733 sources = [
1734 "neteq/test/neteq_opus_quality_test.cc",
1735 ]
1736
1737 deps = [
1738 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001739 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001740 ":neteq_unittest_tools",
aleloi630c6d52016-08-10 02:11:30 -07001741 ":webrtc_opus",
ehmaldonado26bddb92016-11-30 06:12:01 -08001742 "../../test:test_main",
aleloi630c6d52016-08-10 02:11:30 -07001743 "//testing/gtest",
1744 "//third_party/gflags",
1745 ]
aleloi630c6d52016-08-10 02:11:30 -07001746 }
aleloi116fd612016-08-10 04:16:36 -07001747
ehmaldonado38a21322016-09-02 04:10:34 -07001748 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001749 testonly = true
1750
1751 sources = [
1752 "neteq/test/neteq_speed_test.cc",
1753 ]
1754
1755 deps = [
1756 ":neteq",
1757 ":neteq_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001758 "../..:webrtc_common",
aleloi116fd612016-08-10 04:16:36 -07001759 "../../system_wrappers:system_wrappers_default",
1760 "../../test:test_support",
1761 "//third_party/gflags",
1762 ]
1763 }
aleloi63910122016-08-10 04:41:14 -07001764
ehmaldonado38a21322016-09-02 04:10:34 -07001765 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001766 testonly = true
1767
1768 sources = [
1769 "neteq/test/neteq_ilbc_quality_test.cc",
1770 ]
1771
1772 deps = [
1773 ":ilbc",
1774 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001775 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001776 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001777 "../..:webrtc_common",
1778 "../../base:rtc_base_approved",
aleloi0e0be0a2016-08-10 04:55:20 -07001779 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001780 "../../test:test_main",
aleloi0e0be0a2016-08-10 04:55:20 -07001781 "//testing/gtest",
1782 "//third_party/gflags",
1783 ]
1784 }
aleloi6df36dc2016-08-10 05:04:47 -07001785
ehmaldonado38a21322016-09-02 04:10:34 -07001786 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001787 testonly = true
1788
1789 sources = [
1790 "neteq/test/neteq_isac_quality_test.cc",
1791 ]
1792
1793 deps = [
1794 ":isac_fix",
1795 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001796 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001797 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001798 "../../test:test_main",
aleloi6df36dc2016-08-10 05:04:47 -07001799 "//testing/gtest",
1800 "//third_party/gflags",
1801 ]
1802 }
aleloic4ac7002016-08-10 05:06:27 -07001803
ehmaldonado38a21322016-09-02 04:10:34 -07001804 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001805 testonly = true
1806
1807 sources = [
1808 "neteq/test/neteq_pcmu_quality_test.cc",
1809 ]
1810
1811 deps = [
1812 ":g711",
1813 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001814 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001815 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001816 "../../test:test_main",
aleloic4ac7002016-08-10 05:06:27 -07001817 "//testing/gtest",
1818 "//third_party/gflags",
1819 ]
1820 }
aleloib7186d02016-08-16 01:47:16 -07001821
ehmaldonado38a21322016-09-02 04:10:34 -07001822 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001823 testonly = true
1824
1825 sources = [
1826 "codecs/isac/fix/test/kenny.cc",
1827 ]
1828
1829 deps = [
1830 ":isac_fix",
1831 "../../test:test_support",
1832 ]
1833
1834 if (is_win) {
1835 cflags = [
1836 # Disable warnings to enable Win64 build, issue 1323.
1837 "/wd4267", # size_t to int truncation
1838 ]
1839 }
1840 }
aleloi16f55a12016-08-23 08:08:23 -07001841
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001842 config("isac_test_warnings_config") {
1843 if (is_win && is_clang) {
1844 cflags = [
1845 # Disable warnings failing when compiling with Clang on Windows.
1846 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1847 "-Wno-format",
1848 ]
1849 }
1850 }
1851
kjellander7439f972016-12-05 22:47:46 -08001852 rtc_source_set("isac_test_util") {
1853 testonly = true
1854 sources = [
1855 "codecs/isac/main/util/utility.c",
1856 ]
1857 }
1858
ehmaldonado38a21322016-09-02 04:10:34 -07001859 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001860 testonly = true
1861
1862 sources = [
1863 "codecs/isac/main/test/simpleKenny.c",
ivoce51b41a2016-08-24 02:25:57 -07001864 ]
1865
1866 include_dirs = [
1867 "codecs/isac/main/include",
1868 "codecs/isac/main/test",
1869 "codecs/isac/main/util",
1870 ]
1871
1872 deps = [
1873 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001874 ":isac_test_util",
ivoc48052312016-08-25 04:43:45 -07001875 "../../base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001876 ]
1877
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001878 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001879 }
1880
ehmaldonado38a21322016-09-02 04:10:34 -07001881 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001882 testonly = true
1883
1884 sources = [
1885 "codecs/g711/test/testG711.cc",
1886 ]
1887
aleloi16f55a12016-08-23 08:08:23 -07001888 deps = [
1889 ":g711",
1890 ]
1891 }
aleloi9a117842016-08-23 08:36:10 -07001892
ehmaldonado38a21322016-09-02 04:10:34 -07001893 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001894 testonly = true
1895
1896 sources = [
1897 "codecs/g722/test/testG722.cc",
1898 ]
1899
aleloi9a117842016-08-23 08:36:10 -07001900 deps = [
1901 ":g722",
1902 "../..:webrtc_common",
1903 ]
1904 }
ivoc2c670db2016-08-24 06:11:18 -07001905
ehmaldonado38a21322016-09-02 04:10:34 -07001906 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07001907 testonly = true
1908
1909 sources = [
1910 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
aleloicfee2152016-08-29 04:09:19 -07001911 ]
1912
aleloicfee2152016-08-29 04:09:19 -07001913 deps = [
1914 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001915 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001916 "../../base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07001917 ]
1918
1919 include_dirs = [
1920 "codecs/isac/main/include",
1921 "codecs/isac/main/test",
1922 "codecs/isac/main/util",
1923 ]
1924 }
1925
ehmaldonado38a21322016-09-02 04:10:34 -07001926 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07001927 testonly = true
1928
1929 sources = [
1930 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
aleloicfee2152016-08-29 04:09:19 -07001931 ]
1932
aleloicfee2152016-08-29 04:09:19 -07001933 deps = [
1934 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001935 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001936 ]
1937
1938 include_dirs = [
1939 "codecs/isac/main/include",
1940 "codecs/isac/main/test",
1941 "codecs/isac/main/util",
1942 "../../common_audio/signal_processing/include",
1943 ]
1944 }
1945
ehmaldonado38a21322016-09-02 04:10:34 -07001946 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07001947 testonly = true
1948
1949 sources = [
1950 "codecs/ilbc/test/iLBC_test.c",
1951 ]
1952
aleloicfee2152016-08-29 04:09:19 -07001953 deps = [
1954 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07001955 ]
1956 }
1957
ehmaldonado38a21322016-09-02 04:10:34 -07001958 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07001959 testonly = true
1960
1961 sources = [
1962 "codecs/opus/opus_fec_test.cc",
1963 ]
1964
1965 deps = [
1966 ":webrtc_opus",
ivoc48052312016-08-25 04:43:45 -07001967 "../../base:rtc_base_approved",
ivoc2c670db2016-08-24 06:11:18 -07001968 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001969 "../../test:test_main",
ivoc2c670db2016-08-24 06:11:18 -07001970 "//testing/gtest",
1971 ]
1972
kjellandere40a7ee2016-10-16 23:56:12 -07001973 if (!build_with_chromium && is_clang) {
1974 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001975 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07001976 }
1977 }
ehmaldonado36268652017-01-19 08:27:11 -08001978
1979 rtc_source_set("audio_coding_unittests") {
1980 testonly = true
1981
1982 sources = [
1983 "acm2/acm_receiver_unittest.cc",
1984 "acm2/audio_coding_module_unittest.cc",
1985 "acm2/call_statistics_unittest.cc",
1986 "acm2/codec_manager_unittest.cc",
1987 "acm2/rent_a_codec_unittest.cc",
1988 "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc",
1989 "audio_network_adaptor/bitrate_controller_unittest.cc",
1990 "audio_network_adaptor/channel_controller_unittest.cc",
1991 "audio_network_adaptor/controller_manager_unittest.cc",
1992 "audio_network_adaptor/dtx_controller_unittest.cc",
minyue4b7c9522017-01-24 04:54:59 -08001993 "audio_network_adaptor/event_log_writer_unittest.cc",
elad.alon6d7900d2017-03-24 04:12:56 -07001994 "audio_network_adaptor/fec_controller_plr_based_unittest.cc",
1995 "audio_network_adaptor/fec_controller_rplr_based_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08001996 "audio_network_adaptor/frame_length_controller_unittest.cc",
1997 "audio_network_adaptor/mock/mock_controller.h",
1998 "audio_network_adaptor/mock/mock_controller_manager.h",
elad.alon326263a2017-03-29 03:16:58 -07001999 "audio_network_adaptor/util/threshold_curve_unittest.cc",
kwiberg087bd342017-02-10 08:15:44 -08002000 "codecs/builtin_audio_decoder_factory_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002001 "codecs/cng/audio_encoder_cng_unittest.cc",
2002 "codecs/cng/cng_unittest.cc",
2003 "codecs/ilbc/ilbc_unittest.cc",
2004 "codecs/isac/fix/source/filterbanks_unittest.cc",
2005 "codecs/isac/fix/source/filters_unittest.cc",
2006 "codecs/isac/fix/source/lpc_masking_model_unittest.cc",
2007 "codecs/isac/fix/source/transform_unittest.cc",
2008 "codecs/isac/main/source/audio_encoder_isac_unittest.cc",
2009 "codecs/isac/main/source/isac_unittest.cc",
2010 "codecs/isac/unittest.cc",
2011 "codecs/legacy_encoded_audio_frame_unittest.cc",
2012 "codecs/mock/mock_audio_encoder.cc",
2013 "codecs/opus/audio_encoder_opus_unittest.cc",
2014 "codecs/opus/opus_unittest.cc",
2015 "codecs/red/audio_encoder_copy_red_unittest.cc",
2016 "neteq/audio_multi_vector_unittest.cc",
2017 "neteq/audio_vector_unittest.cc",
2018 "neteq/background_noise_unittest.cc",
2019 "neteq/buffer_level_filter_unittest.cc",
2020 "neteq/comfort_noise_unittest.cc",
2021 "neteq/decision_logic_unittest.cc",
2022 "neteq/decoder_database_unittest.cc",
2023 "neteq/delay_manager_unittest.cc",
2024 "neteq/delay_peak_detector_unittest.cc",
2025 "neteq/dsp_helper_unittest.cc",
2026 "neteq/dtmf_buffer_unittest.cc",
2027 "neteq/dtmf_tone_generator_unittest.cc",
2028 "neteq/expand_unittest.cc",
2029 "neteq/merge_unittest.cc",
2030 "neteq/mock/mock_audio_decoder.h",
2031 "neteq/mock/mock_buffer_level_filter.h",
2032 "neteq/mock/mock_decoder_database.h",
2033 "neteq/mock/mock_delay_manager.h",
2034 "neteq/mock/mock_delay_peak_detector.h",
2035 "neteq/mock/mock_dtmf_buffer.h",
2036 "neteq/mock/mock_dtmf_tone_generator.h",
2037 "neteq/mock/mock_expand.h",
2038 "neteq/mock/mock_external_decoder_pcm16b.h",
2039 "neteq/mock/mock_packet_buffer.h",
2040 "neteq/mock/mock_red_payload_splitter.h",
2041 "neteq/nack_tracker_unittest.cc",
2042 "neteq/neteq_external_decoder_unittest.cc",
2043 "neteq/neteq_impl_unittest.cc",
2044 "neteq/neteq_network_stats_unittest.cc",
2045 "neteq/neteq_stereo_unittest.cc",
2046 "neteq/neteq_unittest.cc",
2047 "neteq/normal_unittest.cc",
2048 "neteq/packet_buffer_unittest.cc",
2049 "neteq/post_decode_vad_unittest.cc",
2050 "neteq/random_vector_unittest.cc",
2051 "neteq/red_payload_splitter_unittest.cc",
2052 "neteq/sync_buffer_unittest.cc",
2053 "neteq/tick_timer_unittest.cc",
2054 "neteq/time_stretch_unittest.cc",
2055 "neteq/timestamp_scaler_unittest.cc",
2056 "neteq/tools/input_audio_file_unittest.cc",
2057 "neteq/tools/packet_unittest.cc",
2058 ]
2059
2060 deps = [
2061 ":acm_receive_test",
2062 ":acm_send_test",
2063 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08002064 ":audio_coding_module_typedefs",
ehmaldonado36268652017-01-19 08:27:11 -08002065 ":audio_encoder_interface",
2066 ":audio_format_conversion",
2067 ":audio_network_adaptor",
ehmaldonado36268652017-01-19 08:27:11 -08002068 ":cng",
2069 ":g711",
2070 ":ilbc",
kwiberga6ca5182017-01-30 05:28:54 -08002071 ":isac",
ehmaldonado36268652017-01-19 08:27:11 -08002072 ":isac_c",
2073 ":isac_fix",
kwiberg087bd342017-02-10 08:15:44 -08002074 ":legacy_encoded_audio_frame",
ehmaldonado36268652017-01-19 08:27:11 -08002075 ":neteq",
2076 ":neteq_test_support",
2077 ":neteq_unittest_tools",
2078 ":pcm16b",
2079 ":red",
2080 ":rent_a_codec",
2081 ":webrtc_opus",
2082 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08002083 "../../api/audio_codecs:audio_codecs_api",
2084 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado36268652017-01-19 08:27:11 -08002085 "../../base:rtc_base",
2086 "../../base:rtc_base_approved",
2087 "../../base:rtc_base_tests_utils",
2088 "../../common_audio",
2089 "../../system_wrappers:system_wrappers",
2090 "../../test:field_trial",
2091 "../../test:rtp_test_utils",
2092 "../../test:test_common",
2093 "../../test:test_support",
2094 "//testing/gmock",
2095 "//testing/gtest",
2096 "//third_party/gflags",
2097 ]
2098
2099 defines = audio_coding_defines
2100
2101 if (rtc_enable_protobuf) {
2102 defines += [
2103 "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP",
2104 "WEBRTC_NETEQ_UNITTEST_BITEXACT",
2105 ]
2106 deps += [
2107 ":ana_config_proto",
2108 ":neteq_unittest_proto",
2109 ]
2110 }
2111
2112 if (!build_with_chromium && is_clang) {
2113 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
2114 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
2115 }
2116 }
kjellanderfb114242016-06-13 00:19:48 -07002117}
kwiberg087bd342017-02-10 08:15:44 -08002118
2119# For backwards compatibility only! Use
2120# webrtc/api/audio_codecs:audio_codecs_api instead.
2121# TODO(kwiberg): Remove this.
2122rtc_source_set("audio_decoder_interface") {
2123 sources = [
2124 "codecs/audio_decoder.h",
2125 ]
2126 deps = [
2127 "../../api/audio_codecs:audio_codecs_api",
2128 ]
2129}
2130
2131# For backwards compatibility only! Use
2132# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2133# TODO(kwiberg): Remove this.
2134rtc_source_set("builtin_audio_decoder_factory") {
2135 sources = [
2136 "codecs/builtin_audio_decoder_factory.h",
2137 ]
2138 deps = [
2139 "../../api/audio_codecs:builtin_audio_decoder_factory",
2140 ]
2141}