blob: 3a2d20a800e8326fe4b6077992474c7213ffd31d [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",
minyued0ede442016-09-22 06:20:50 -0700912 "audio_network_adaptor/fec_controller.cc",
913 "audio_network_adaptor/fec_controller.h",
minyuee35d3292016-09-21 16:00:31 -0700914 "audio_network_adaptor/frame_length_controller.cc",
915 "audio_network_adaptor/frame_length_controller.h",
minyue7610f852016-09-07 13:51:51 -0700916 "audio_network_adaptor/include/audio_network_adaptor.h",
917 ]
minyue25f6a392016-09-22 22:23:20 -0700918
minyue41b9c802016-10-06 07:13:54 -0700919 deps = [
920 "../..:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -0800921 "../../base:rtc_base_approved",
922 "../../common_audio",
minyue4b7c9522017-01-24 04:54:59 -0800923 "../../logging:rtc_event_log_api",
minyue41b9c802016-10-06 07:13:54 -0700924 "../../system_wrappers",
925 ]
926
minyue25f6a392016-09-22 22:23:20 -0700927 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700928 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700929 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700930 ":ana_debug_dump_proto",
931 ]
932 defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ]
933 }
minyue4b7c9522017-01-24 04:54:59 -0800934
935 if (!build_with_chromium && is_clang) {
936 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
937 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
938 }
minyue7610f852016-09-07 13:51:51 -0700939}
940
kwiberg65cb70d2017-03-03 06:16:28 -0800941rtc_source_set("neteq_decoder_enum") {
942 sources = [
943 "neteq/neteq_decoder_enum.cc",
944 "neteq/neteq_decoder_enum.h",
945 ]
946 deps = [
947 "../../api/audio_codecs:audio_codecs_api",
948 "../../base:rtc_base_approved",
949 ]
950}
kjellander676e08f2016-12-07 08:23:27 -0800951
kwiberg65cb70d2017-03-03 06:16:28 -0800952rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000953 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000954 "neteq/accelerate.cc",
955 "neteq/accelerate.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000956 "neteq/audio_decoder_impl.cc",
957 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000958 "neteq/audio_multi_vector.cc",
959 "neteq/audio_multi_vector.h",
960 "neteq/audio_vector.cc",
961 "neteq/audio_vector.h",
962 "neteq/background_noise.cc",
963 "neteq/background_noise.h",
964 "neteq/buffer_level_filter.cc",
965 "neteq/buffer_level_filter.h",
966 "neteq/comfort_noise.cc",
967 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700968 "neteq/cross_correlation.cc",
969 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000970 "neteq/decision_logic.cc",
971 "neteq/decision_logic.h",
972 "neteq/decision_logic_fax.cc",
973 "neteq/decision_logic_fax.h",
974 "neteq/decision_logic_normal.cc",
975 "neteq/decision_logic_normal.h",
976 "neteq/decoder_database.cc",
977 "neteq/decoder_database.h",
978 "neteq/defines.h",
979 "neteq/delay_manager.cc",
980 "neteq/delay_manager.h",
981 "neteq/delay_peak_detector.cc",
982 "neteq/delay_peak_detector.h",
983 "neteq/dsp_helper.cc",
984 "neteq/dsp_helper.h",
985 "neteq/dtmf_buffer.cc",
986 "neteq/dtmf_buffer.h",
987 "neteq/dtmf_tone_generator.cc",
988 "neteq/dtmf_tone_generator.h",
989 "neteq/expand.cc",
990 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +0100991 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000992 "neteq/merge.cc",
993 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -0700994 "neteq/nack_tracker.cc",
995 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200996 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000997 "neteq/neteq_impl.cc",
998 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000999 "neteq/normal.cc",
1000 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -07001001 "neteq/packet.cc",
1002 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001003 "neteq/packet_buffer.cc",
1004 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001005 "neteq/post_decode_vad.cc",
1006 "neteq/post_decode_vad.h",
1007 "neteq/preemptive_expand.cc",
1008 "neteq/preemptive_expand.h",
1009 "neteq/random_vector.cc",
1010 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -07001011 "neteq/red_payload_splitter.cc",
1012 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001013 "neteq/rtcp.cc",
1014 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001015 "neteq/statistics_calculator.cc",
1016 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001017 "neteq/sync_buffer.cc",
1018 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -07001019 "neteq/tick_timer.cc",
1020 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001021 "neteq/time_stretch.cc",
1022 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001023 "neteq/timestamp_scaler.cc",
1024 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001025 ]
1026
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001027 deps = [
kwiberg65cb70d2017-03-03 06:16:28 -08001028 ":audio_coding_module_typedefs",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001029 ":cng",
1030 ":g711",
kjellander676e08f2016-12-07 08:23:27 -08001031 ":isac_fix",
kwiberg65cb70d2017-03-03 06:16:28 -08001032 ":neteq_decoder_enum",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001033 ":pcm16b",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +00001034 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001035 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001036 "../../base:gtest_prod",
1037 "../../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001038 "../../common_audio",
1039 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001040 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001041
1042 defines = []
1043
kwibergf8c2bac2016-01-18 06:38:32 -08001044 if (rtc_include_ilbc) {
1045 defines += [ "WEBRTC_CODEC_ILBC" ]
1046 deps += [ ":ilbc" ]
1047 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001048 if (rtc_include_opus) {
1049 defines += [ "WEBRTC_CODEC_OPUS" ]
1050 deps += [ ":webrtc_opus" ]
1051 }
kwiberg98ab3a42015-09-30 21:54:21 -07001052 if (!build_with_mozilla) {
1053 if (current_cpu == "arm") {
1054 defines += [ "WEBRTC_CODEC_ISACFX" ]
1055 deps += [ ":isac_fix" ]
1056 } else {
1057 defines += [ "WEBRTC_CODEC_ISAC" ]
1058 deps += [ ":isac" ]
1059 }
1060 defines += [ "WEBRTC_CODEC_G722" ]
1061 deps += [ ":g722" ]
1062 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001063}
kjellanderfb114242016-06-13 00:19:48 -07001064
henrik.lundin58466f62016-10-05 02:27:42 -07001065# Although providing only test support, this target must be outside of the
1066# rtc_include_tests conditional. The reason is that it supports fuzzer tests
1067# that ultimately are built and run as a part of the Chromium ecosystem, which
1068# does not set the rtc_include_tests flag.
1069rtc_source_set("neteq_test_minimal") {
1070 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001071
1072 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1073 # Has cyclic dependency with :neteq_unittest_tools
1074 check_includes = false
1075
henrik.lundin58466f62016-10-05 02:27:42 -07001076 sources = [
1077 "neteq/tools/encode_neteq_input.cc",
1078 "neteq/tools/encode_neteq_input.h",
1079 "neteq/tools/neteq_test.cc",
1080 "neteq/tools/neteq_test.h",
1081 ]
1082
kjellandere40a7ee2016-10-16 23:56:12 -07001083 if (!build_with_chromium && is_clang) {
1084 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
henrik.lundin58466f62016-10-05 02:27:42 -07001085 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1086 }
kjellander676e08f2016-12-07 08:23:27 -08001087
1088 deps = [
1089 ":audio_encoder_interface",
kjellander676e08f2016-12-07 08:23:27 -08001090 ":neteq",
1091 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001092 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001093 "../../base:rtc_base_approved",
1094 ]
henrik.lundin58466f62016-10-05 02:27:42 -07001095}
1096
kjellanderfb114242016-06-13 00:19:48 -07001097if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -07001098 group("audio_coding_tests") {
1099 testonly = true
1100 public_deps = [
1101 ":RTPchange",
1102 ":RTPencode",
1103 ":RTPjitter",
1104 ":RTPtimeshift",
1105 ":acm_receive_test",
1106 ":acm_send_test",
kjellander6ceab082016-10-28 05:44:03 -07001107 ":audio_codec_speed_tests",
1108 ":audio_decoder_unittests",
1109 ":audio_decoder_unittests",
1110 ":delay_test",
1111 ":g711_test",
1112 ":g722_test",
1113 ":ilbc_test",
1114 ":insert_packet_with_timing",
1115 ":isac_api_test",
1116 ":isac_fix_test",
1117 ":isac_switch_samprate_test",
1118 ":isac_test",
1119 ":neteq_ilbc_quality_test",
1120 ":neteq_isac_quality_test",
1121 ":neteq_opus_quality_test",
1122 ":neteq_pcmu_quality_test",
1123 ":neteq_speed_test",
1124 ":rtp_analyze",
1125 ":rtpcat",
1126 ":webrtc_opus_fec_test",
1127 ]
1128 if (rtc_enable_protobuf) {
1129 public_deps += [ ":neteq_rtpplay" ]
1130 }
1131 }
1132
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001133 rtc_source_set("audio_coding_modules_tests") {
1134 testonly = true
1135 sources = [
1136 "test/APITest.cc",
1137 "test/Channel.cc",
1138 "test/EncodeDecodeTest.cc",
1139 "test/PCMFile.cc",
1140 "test/PacketLossTest.cc",
1141 "test/RTPFile.cc",
1142 "test/TestAllCodecs.cc",
1143 "test/TestRedFec.cc",
1144 "test/TestStereo.cc",
1145 "test/TestVADDTX.cc",
1146 "test/Tester.cc",
1147 "test/TwoWayCommunication.cc",
1148 "test/iSACTest.cc",
1149 "test/opus_test.cc",
1150 "test/target_delay_unittest.cc",
1151 "test/utility.cc",
1152 ]
1153 deps = [
1154 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001155 ":audio_coding_module_typedefs",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001156 ":audio_format_conversion",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001157 ":pcm16b_c",
1158 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001159 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001160 "../../base:rtc_base_approved",
1161 "../../system_wrappers:system_wrappers",
1162 "../../test:fileutils",
1163 "../../test:test_support",
1164 ]
1165 defines = audio_coding_defines
1166 if (is_win) {
1167 cflags = [
1168 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1169 "/wd4373", # virtual function override.
1170 ]
1171 }
1172 if (!build_with_chromium && is_clang) {
1173 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1174 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1175 }
1176 }
1177
ehmaldonado021eef32017-01-05 07:09:50 -08001178 rtc_source_set("audio_coding_perf_tests") {
1179 testonly = true
1180 sources = [
1181 "codecs/opus/opus_complexity_unittest.cc",
1182 "neteq/test/neteq_performance_unittest.cc",
1183 ]
1184 deps = [
1185 ":neteq_test_support",
1186 ":neteq_unittest_tools",
1187 ":webrtc_opus",
1188 "../..:webrtc_common",
1189 "../../base:rtc_base_approved",
1190 "../../system_wrappers:system_wrappers",
1191 "../../test:test_support",
1192 ]
1193 if (!build_with_chromium && is_clang) {
1194 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1195 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1196 }
1197 }
1198
ehmaldonado38a21322016-09-02 04:10:34 -07001199 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -07001200 testonly = true
1201 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001202 "acm2/acm_receive_test.cc",
1203 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001204 ]
1205
kjellanderfb114242016-06-13 00:19:48 -07001206 defines = audio_coding_defines
1207
1208 deps = audio_coding_deps + [
1209 ":audio_coding",
kjellander676e08f2016-12-07 08:23:27 -08001210 ":audio_format_conversion",
kwiberg087bd342017-02-10 08:15:44 -08001211 "../../api/audio_codecs:audio_codecs_api",
1212 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellanderfb114242016-06-13 00:19:48 -07001213 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001214 "../../base:rtc_base_approved",
1215 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001216 "//testing/gtest",
1217 ]
1218 }
1219
ehmaldonado38a21322016-09-02 04:10:34 -07001220 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -07001221 testonly = true
1222 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001223 "acm2/acm_send_test.cc",
1224 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001225 ]
1226
kjellanderfb114242016-06-13 00:19:48 -07001227 defines = audio_coding_defines
1228
1229 deps = audio_coding_deps + [
1230 ":audio_coding",
kwiberg087bd342017-02-10 08:15:44 -08001231 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001232 ":audio_encoder_interface",
kjellanderfb114242016-06-13 00:19:48 -07001233 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001234 "../../base:rtc_base_approved",
1235 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001236 "//testing/gtest",
1237 ]
1238 }
1239
ehmaldonado38a21322016-09-02 04:10:34 -07001240 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -07001241 testonly = true
1242 sources = [
1243 "test/Channel.cc",
1244 "test/PCMFile.cc",
1245 "test/delay_test.cc",
1246 "test/utility.cc",
1247 ]
1248
aleloi333f2062016-07-28 01:21:29 -07001249 deps = [
1250 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001251 ":audio_coding_module_typedefs",
kwibergda2bf4e2016-10-24 13:47:09 -07001252 ":audio_format_conversion",
aleloi333f2062016-07-28 01:21:29 -07001253 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001254 "../../base:rtc_base_approved",
aleloi333f2062016-07-28 01:21:29 -07001255 "../../system_wrappers",
1256 "../../system_wrappers:system_wrappers_default",
1257 "../../test:test_support",
1258 "../rtp_rtcp",
1259 "//testing/gtest",
1260 "//third_party/gflags:gflags",
1261 ]
1262 } # delay_test
1263
ehmaldonado38a21322016-09-02 04:10:34 -07001264 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -07001265 testonly = true
1266 sources = [
1267 "test/Channel.cc",
1268 "test/PCMFile.cc",
1269 "test/insert_packet_with_timing.cc",
1270 ]
1271
kjellandere40a7ee2016-10-16 23:56:12 -07001272 if (!build_with_chromium && is_clang) {
1273 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001274 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -07001275 }
1276
1277 deps = [
1278 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001279 ":audio_format_conversion",
aleloi00730c72016-07-28 01:27:10 -07001280 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001281 "../../base:rtc_base_approved",
aleloi00730c72016-07-28 01:27:10 -07001282 "../../system_wrappers",
1283 "../../system_wrappers:system_wrappers_default",
1284 "../../test:test_support",
1285 "../rtp_rtcp",
1286 "//testing/gtest",
1287 "//third_party/gflags:gflags",
1288 ]
1289 } # insert_packet_with_timing
1290
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001291 audio_decoder_unittests_resources =
1292 [ "//resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -07001293
1294 if (is_ios) {
1295 bundle_data("audio_decoder_unittests_bundle_data") {
1296 testonly = true
1297 sources = audio_decoder_unittests_resources
1298 outputs = [
1299 "{{bundle_resources_dir}}/{{source_file_part}}",
1300 ]
1301 }
1302 }
1303
ehmaldonado38a21322016-09-02 04:10:34 -07001304 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -07001305 testonly = true
1306 sources = [
1307 "neteq/audio_decoder_unittest.cc",
1308 ]
1309
kjellandere40a7ee2016-10-16 23:56:12 -07001310 if (!build_with_chromium && is_clang) {
1311 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001312 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -07001313 }
1314
1315 deps = []
1316
1317 defines = neteq_defines
1318
1319 deps += audio_coding_deps
1320 deps += [
ehmaldonado87b8e9f2017-02-07 06:26:29 -08001321 ":ilbc",
charujainddf3e4a2016-08-01 07:49:42 -07001322 ":isac",
1323 ":isac_fix",
1324 ":neteq",
1325 ":neteq_unittest_tools",
kwiberg087bd342017-02-10 08:15:44 -08001326 "../../api/audio_codecs:audio_codecs_api",
kjellander6ceab082016-10-28 05:44:03 -07001327 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001328 "../../test:test_main",
charujainddf3e4a2016-08-01 07:49:42 -07001329 "//testing/gtest",
1330 ]
1331
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001332 data = audio_decoder_unittests_resources
1333
charujainddf3e4a2016-08-01 07:49:42 -07001334 if (is_android) {
1335 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001336 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001337 }
kjellander32c4a202016-08-30 02:53:49 -07001338 if (is_ios) {
1339 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001340 }
1341 } # audio_decoder_unittests
1342
kjellanderfb114242016-06-13 00:19:48 -07001343 if (rtc_enable_protobuf) {
1344 proto_library("neteq_unittest_proto") {
1345 sources = [
1346 "neteq/neteq_unittest.proto",
1347 ]
kjellandere3e902e2017-02-28 08:01:46 -08001348 proto_out_dir = "webrtc/modules/audio_coding/neteq"
kjellanderfb114242016-06-13 00:19:48 -07001349 }
henrik.lundin03153f12016-06-21 05:38:42 -07001350
kjellanderb62dbbe2016-09-23 00:38:52 -07001351 rtc_static_library("rtc_event_log_source") {
henrik.lundin03153f12016-06-21 05:38:42 -07001352 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001353
1354 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1355 # Needs call.h to be moved to webrtc/api first.
1356 check_includes = false
1357
henrik.lundin03153f12016-06-21 05:38:42 -07001358 sources = [
1359 "neteq/tools/rtc_event_log_source.cc",
1360 "neteq/tools/rtc_event_log_source.h",
1361 ]
1362
kjellandere40a7ee2016-10-16 23:56:12 -07001363 if (!build_with_chromium && is_clang) {
1364 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001365 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001366 }
1367
1368 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001369 "../../base:rtc_base_approved",
skvladcc91d282016-10-03 18:31:22 -07001370 "../../logging:rtc_event_log_parser",
henrik.lundin03153f12016-06-21 05:38:42 -07001371 ]
1372 public_deps = [
skvladcc91d282016-10-03 18:31:22 -07001373 "../../logging:rtc_event_log_proto",
henrik.lundin03153f12016-06-21 05:38:42 -07001374 ]
1375 }
1376
ehmaldonado38a21322016-09-02 04:10:34 -07001377 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001378 testonly = true
1379 defines = []
1380 deps = []
1381 sources = [
1382 "neteq/tools/neteq_rtpplay.cc",
1383 ]
1384
kjellandere40a7ee2016-10-16 23:56:12 -07001385 if (!build_with_chromium && is_clang) {
1386 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001387 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001388 }
1389
1390 if (is_win) {
1391 cflags = [
1392 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1393 "/wd4373", # virtual function override.
1394 ]
1395 }
1396
1397 deps += [
1398 ":neteq",
1399 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001400 "../..:webrtc_common",
1401 "../../base:rtc_base_approved",
henrik.lundin03153f12016-06-21 05:38:42 -07001402 "../../system_wrappers:system_wrappers_default",
1403 "../../test:test_support",
1404 "//third_party/gflags",
1405 ]
1406 }
kjellanderfb114242016-06-13 00:19:48 -07001407 }
1408
ehmaldonado38a21322016-09-02 04:10:34 -07001409 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001410 testonly = true
1411 defines = []
1412 deps = []
1413 sources = [
1414 "codecs/isac/fix/test/isac_speed_test.cc",
1415 "codecs/opus/opus_speed_test.cc",
1416 "codecs/tools/audio_codec_speed_test.cc",
1417 "codecs/tools/audio_codec_speed_test.h",
1418 ]
1419
kjellandere40a7ee2016-10-16 23:56:12 -07001420 if (!build_with_chromium && is_clang) {
1421 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001422 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001423 }
1424
1425 if (is_android) {
1426 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001427 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001428 }
1429
1430 deps += [
1431 ":isac_fix",
1432 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001433 "../..:webrtc_common",
1434 "../../base:rtc_base_approved",
aleloie6b60a42016-07-28 02:34:30 -07001435 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001436 "../../test:test_main",
kjellander6ceab082016-10-28 05:44:03 -07001437 "../audio_processing",
aleloie6b60a42016-07-28 02:34:30 -07001438 "//testing/gtest",
1439 ]
1440 }
1441
ehmaldonado38a21322016-09-02 04:10:34 -07001442 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001443 testonly = true
1444 sources = [
1445 "neteq/tools/neteq_external_decoder_test.cc",
1446 "neteq/tools/neteq_external_decoder_test.h",
1447 "neteq/tools/neteq_performance_test.cc",
1448 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001449 ]
1450
kjellandere40a7ee2016-10-16 23:56:12 -07001451 if (!build_with_chromium && is_clang) {
1452 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001453 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001454 }
1455
1456 deps = [
1457 ":neteq",
1458 ":neteq_unittest_tools",
1459 ":pcm16b",
kjellander676e08f2016-12-07 08:23:27 -08001460 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001461 "../../api/audio_codecs:audio_codecs_api",
1462 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001463 "../../base:rtc_base_approved",
1464 "../../system_wrappers",
1465 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001466 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001467 ]
1468 }
1469
ehmaldonado38a21322016-09-02 04:10:34 -07001470 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001471 testonly = true
1472 sources = [
1473 "neteq/tools/neteq_quality_test.cc",
1474 "neteq/tools/neteq_quality_test.h",
1475 ]
1476
kjellandere40a7ee2016-10-16 23:56:12 -07001477 if (!build_with_chromium && is_clang) {
1478 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001479 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001480 }
1481
1482 deps = [
1483 ":neteq",
1484 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001485 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001486 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001487 "../../base:rtc_base_approved",
1488 "../../test:test_support",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001489 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001490 "//third_party/gflags",
1491 ]
1492 }
1493
kjellanderfb114242016-06-13 00:19:48 -07001494 config("neteq_unittest_tools_config") {
1495 include_dirs = [ "tools" ]
1496 }
1497
ehmaldonado38a21322016-09-02 04:10:34 -07001498 rtc_source_set("neteq_unittest_tools") {
kjellanderfb114242016-06-13 00:19:48 -07001499 testonly = true
1500 sources = [
1501 "neteq/tools/audio_checksum.h",
1502 "neteq/tools/audio_loop.cc",
1503 "neteq/tools/audio_loop.h",
aleloi0e0be0a2016-08-10 04:55:20 -07001504 "neteq/tools/audio_sink.cc",
kjellanderfb114242016-06-13 00:19:48 -07001505 "neteq/tools/audio_sink.h",
1506 "neteq/tools/constant_pcm_packet_source.cc",
1507 "neteq/tools/constant_pcm_packet_source.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001508 "neteq/tools/fake_decode_from_file.cc",
1509 "neteq/tools/fake_decode_from_file.h",
kjellanderfb114242016-06-13 00:19:48 -07001510 "neteq/tools/input_audio_file.cc",
1511 "neteq/tools/input_audio_file.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001512 "neteq/tools/neteq_input.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001513 "neteq/tools/neteq_replacement_input.cc",
1514 "neteq/tools/neteq_replacement_input.h",
kjellanderfb114242016-06-13 00:19:48 -07001515 "neteq/tools/output_audio_file.h",
1516 "neteq/tools/output_wav_file.h",
1517 "neteq/tools/packet.cc",
1518 "neteq/tools/packet.h",
kwibergb8e56ee2016-08-29 06:37:33 -07001519 "neteq/tools/packet_source.cc",
kjellanderfb114242016-06-13 00:19:48 -07001520 "neteq/tools/packet_source.h",
1521 "neteq/tools/resample_input_audio_file.cc",
1522 "neteq/tools/resample_input_audio_file.h",
1523 "neteq/tools/rtp_file_source.cc",
1524 "neteq/tools/rtp_file_source.h",
1525 "neteq/tools/rtp_generator.cc",
1526 "neteq/tools/rtp_generator.h",
1527 ]
1528
ehmaldonadoe9cc6862016-09-05 06:10:18 -07001529 public_configs = [ ":neteq_unittest_tools_config" ]
kjellanderfb114242016-06-13 00:19:48 -07001530
kjellandere40a7ee2016-10-16 23:56:12 -07001531 if (!build_with_chromium && is_clang) {
1532 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001533 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001534 }
1535
1536 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001537 ":audio_encoder_interface",
1538 ":pcm16b",
1539 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001540 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001541 "../../base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -07001542 "../../common_audio",
1543 "../../test:rtp_test_utils",
1544 "../rtp_rtcp",
1545 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001546
kjellander676e08f2016-12-07 08:23:27 -08001547 public_deps = [
1548 ":neteq_test_minimal",
1549 ]
1550
henrik.lundine8a77e32016-06-22 06:34:03 -07001551 if (rtc_enable_protobuf) {
ehmaldonado36268652017-01-19 08:27:11 -08001552 sources += [
1553 "neteq/tools/neteq_packet_source_input.cc",
1554 "neteq/tools/neteq_packet_source_input.h",
1555 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001556 deps += [ ":rtc_event_log_source" ]
1557 }
kjellanderfb114242016-06-13 00:19:48 -07001558 }
aleloi3022a342016-07-26 06:36:03 -07001559
ehmaldonado38a21322016-09-02 04:10:34 -07001560 rtc_source_set("neteq_test_tools") {
aleloi3022a342016-07-26 06:36:03 -07001561 testonly = true
1562 sources = [
1563 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1564 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1565 "neteq/test/NETEQTEST_RTPpacket.cc",
1566 "neteq/test/NETEQTEST_RTPpacket.h",
1567 ]
1568
1569 deps = [
1570 ":cng",
1571 ":g711",
1572 ":g722",
1573 ":ilbc",
1574 ":isac",
1575 ":pcm16b",
1576 "../..:webrtc_common",
1577 "//testing/gtest",
1578 ]
1579
1580 include_dirs = [
1581 "neteq/include",
1582 "neteq/test",
1583 "../../",
1584 ]
1585
1586 if (is_win) {
1587 cflags = [
1588 # Disable warnings to enable Win64 build, issue 1323.
1589 "/wd4267", # size_t to int truncation
1590 ]
1591 }
1592 }
aleloi47bded42016-07-26 06:46:19 -07001593
aleloi82667732016-08-02 01:45:50 -07001594 config("RTPencode_config") {
1595 defines = [
1596 "CODEC_ILBC",
1597 "CODEC_PCM16B",
1598 "CODEC_G711",
1599 "CODEC_G722",
1600 "CODEC_ISAC",
1601 "CODEC_PCM16B_WB",
1602 "CODEC_ISAC_SWB",
1603 "CODEC_PCM16B_32KHZ",
1604 "CODEC_PCM16B_48KHZ",
1605 "CODEC_CNGCODEC8",
1606 "CODEC_CNGCODEC16",
1607 "CODEC_CNGCODEC32",
1608 "CODEC_ATEVENT_DECODE",
1609 "CODEC_RED",
1610 "CODEC_OPUS",
1611 ]
1612 }
1613
ehmaldonado38a21322016-09-02 04:10:34 -07001614 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001615 testonly = true
1616
1617 deps = [
1618 # TODO(hlundin): Make RTPencode use ACM to encode files.
1619 ":cng",
1620 ":g711",
1621 ":g722",
1622 ":ilbc",
1623 ":isac",
kjellander676e08f2016-12-07 08:23:27 -08001624 ":neteq",
aleloi82667732016-08-02 01:45:50 -07001625 ":neteq_test_tools",
1626 ":pcm16b",
1627 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001628 "../..:webrtc_common",
1629 "../../base:rtc_base_approved",
aleloi82667732016-08-02 01:45:50 -07001630 "../../common_audio",
1631 ]
1632
1633 configs += [ ":RTPencode_config" ]
1634
1635 sources = [
1636 "neteq/test/RTPencode.cc",
1637 ]
1638
1639 include_dirs = [
1640 "neteq/include",
1641 "neteq/test",
1642 ]
1643
1644 if (is_win) {
1645 cflags = [
1646 # Disable warnings to enable Win64 build, issue 1323.
1647 "/wd4267", # size_t to int truncation
1648 ]
1649 }
1650 }
1651
ehmaldonado38a21322016-09-02 04:10:34 -07001652 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001653 testonly = true
1654
1655 sources = [
1656 "neteq/test/RTPchange.cc",
1657 ]
1658
1659 deps = [
1660 ":neteq_test_tools",
1661 ]
1662 }
1663
ehmaldonado38a21322016-09-02 04:10:34 -07001664 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001665 testonly = true
1666
1667 sources = [
1668 "neteq/tools/rtpcat.cc",
1669 ]
1670
1671 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001672 "../../base:rtc_base_approved",
aleloi5556dcb2016-08-02 04:27:25 -07001673 "../../system_wrappers:system_wrappers_default",
1674 "../../test:rtp_test_utils",
1675 "//testing/gtest",
1676 ]
1677 }
1678
ehmaldonado38a21322016-09-02 04:10:34 -07001679 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001680 testonly = true
1681
1682 sources = [
1683 "neteq/test/RTPtimeshift.cc",
1684 ]
1685
1686 deps = [
1687 ":neteq_test_tools",
kjellander676e08f2016-12-07 08:23:27 -08001688 "../../test:test_support",
aleloi5a746502016-08-02 06:06:33 -07001689 "//testing/gtest",
1690 ]
1691 }
1692
ehmaldonado38a21322016-09-02 04:10:34 -07001693 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001694 testonly = true
1695 deps = [
1696 "../..:webrtc_common",
kthelgason29a44e32016-09-27 03:52:02 -07001697 "../../base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001698 "../../test:test_support",
aleloi17dfa742016-08-03 01:17:25 -07001699 "//testing/gtest",
1700 ]
1701 sources = [
1702 "neteq/test/RTPjitter.cc",
1703 ]
1704 }
1705
ehmaldonado38a21322016-09-02 04:10:34 -07001706 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001707 testonly = true
1708
1709 sources = [
1710 "neteq/tools/rtp_analyze.cc",
1711 ]
1712
1713 deps = [
1714 ":neteq",
1715 ":neteq_unittest_tools",
1716 ":pcm16b",
1717 "../../system_wrappers:system_wrappers_default",
1718 "//testing/gtest",
1719 "//third_party/gflags:gflags",
1720 ]
1721
kjellandere40a7ee2016-10-16 23:56:12 -07001722 if (!build_with_chromium && is_clang) {
1723 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001724 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001725 }
1726 }
aleloi630c6d52016-08-10 02:11:30 -07001727
ehmaldonado38a21322016-09-02 04:10:34 -07001728 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001729 testonly = true
1730
1731 sources = [
1732 "neteq/test/neteq_opus_quality_test.cc",
1733 ]
1734
1735 deps = [
1736 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001737 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001738 ":neteq_unittest_tools",
aleloi630c6d52016-08-10 02:11:30 -07001739 ":webrtc_opus",
ehmaldonado26bddb92016-11-30 06:12:01 -08001740 "../../test:test_main",
aleloi630c6d52016-08-10 02:11:30 -07001741 "//testing/gtest",
1742 "//third_party/gflags",
1743 ]
aleloi630c6d52016-08-10 02:11:30 -07001744 }
aleloi116fd612016-08-10 04:16:36 -07001745
ehmaldonado38a21322016-09-02 04:10:34 -07001746 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001747 testonly = true
1748
1749 sources = [
1750 "neteq/test/neteq_speed_test.cc",
1751 ]
1752
1753 deps = [
1754 ":neteq",
1755 ":neteq_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001756 "../..:webrtc_common",
aleloi116fd612016-08-10 04:16:36 -07001757 "../../system_wrappers:system_wrappers_default",
1758 "../../test:test_support",
1759 "//third_party/gflags",
1760 ]
1761 }
aleloi63910122016-08-10 04:41:14 -07001762
ehmaldonado38a21322016-09-02 04:10:34 -07001763 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001764 testonly = true
1765
1766 sources = [
1767 "neteq/test/neteq_ilbc_quality_test.cc",
1768 ]
1769
1770 deps = [
1771 ":ilbc",
1772 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001773 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001774 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001775 "../..:webrtc_common",
1776 "../../base:rtc_base_approved",
aleloi0e0be0a2016-08-10 04:55:20 -07001777 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001778 "../../test:test_main",
aleloi0e0be0a2016-08-10 04:55:20 -07001779 "//testing/gtest",
1780 "//third_party/gflags",
1781 ]
1782 }
aleloi6df36dc2016-08-10 05:04:47 -07001783
ehmaldonado38a21322016-09-02 04:10:34 -07001784 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001785 testonly = true
1786
1787 sources = [
1788 "neteq/test/neteq_isac_quality_test.cc",
1789 ]
1790
1791 deps = [
1792 ":isac_fix",
1793 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001794 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001795 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001796 "../../test:test_main",
aleloi6df36dc2016-08-10 05:04:47 -07001797 "//testing/gtest",
1798 "//third_party/gflags",
1799 ]
1800 }
aleloic4ac7002016-08-10 05:06:27 -07001801
ehmaldonado38a21322016-09-02 04:10:34 -07001802 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001803 testonly = true
1804
1805 sources = [
1806 "neteq/test/neteq_pcmu_quality_test.cc",
1807 ]
1808
1809 deps = [
1810 ":g711",
1811 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001812 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001813 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001814 "../../test:test_main",
aleloic4ac7002016-08-10 05:06:27 -07001815 "//testing/gtest",
1816 "//third_party/gflags",
1817 ]
1818 }
aleloib7186d02016-08-16 01:47:16 -07001819
ehmaldonado38a21322016-09-02 04:10:34 -07001820 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001821 testonly = true
1822
1823 sources = [
1824 "codecs/isac/fix/test/kenny.cc",
1825 ]
1826
1827 deps = [
1828 ":isac_fix",
1829 "../../test:test_support",
1830 ]
1831
1832 if (is_win) {
1833 cflags = [
1834 # Disable warnings to enable Win64 build, issue 1323.
1835 "/wd4267", # size_t to int truncation
1836 ]
1837 }
1838 }
aleloi16f55a12016-08-23 08:08:23 -07001839
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001840 config("isac_test_warnings_config") {
1841 if (is_win && is_clang) {
1842 cflags = [
1843 # Disable warnings failing when compiling with Clang on Windows.
1844 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1845 "-Wno-format",
1846 ]
1847 }
1848 }
1849
kjellander7439f972016-12-05 22:47:46 -08001850 rtc_source_set("isac_test_util") {
1851 testonly = true
1852 sources = [
1853 "codecs/isac/main/util/utility.c",
1854 ]
1855 }
1856
ehmaldonado38a21322016-09-02 04:10:34 -07001857 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001858 testonly = true
1859
1860 sources = [
1861 "codecs/isac/main/test/simpleKenny.c",
ivoce51b41a2016-08-24 02:25:57 -07001862 ]
1863
1864 include_dirs = [
1865 "codecs/isac/main/include",
1866 "codecs/isac/main/test",
1867 "codecs/isac/main/util",
1868 ]
1869
1870 deps = [
1871 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001872 ":isac_test_util",
ivoc48052312016-08-25 04:43:45 -07001873 "../../base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001874 ]
1875
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001876 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001877 }
1878
ehmaldonado38a21322016-09-02 04:10:34 -07001879 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001880 testonly = true
1881
1882 sources = [
1883 "codecs/g711/test/testG711.cc",
1884 ]
1885
aleloi16f55a12016-08-23 08:08:23 -07001886 deps = [
1887 ":g711",
1888 ]
1889 }
aleloi9a117842016-08-23 08:36:10 -07001890
ehmaldonado38a21322016-09-02 04:10:34 -07001891 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001892 testonly = true
1893
1894 sources = [
1895 "codecs/g722/test/testG722.cc",
1896 ]
1897
aleloi9a117842016-08-23 08:36:10 -07001898 deps = [
1899 ":g722",
1900 "../..:webrtc_common",
1901 ]
1902 }
ivoc2c670db2016-08-24 06:11:18 -07001903
ehmaldonado38a21322016-09-02 04:10:34 -07001904 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07001905 testonly = true
1906
1907 sources = [
1908 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
aleloicfee2152016-08-29 04:09:19 -07001909 ]
1910
aleloicfee2152016-08-29 04:09:19 -07001911 deps = [
1912 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001913 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001914 "../../base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07001915 ]
1916
1917 include_dirs = [
1918 "codecs/isac/main/include",
1919 "codecs/isac/main/test",
1920 "codecs/isac/main/util",
1921 ]
1922 }
1923
ehmaldonado38a21322016-09-02 04:10:34 -07001924 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07001925 testonly = true
1926
1927 sources = [
1928 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
aleloicfee2152016-08-29 04:09:19 -07001929 ]
1930
aleloicfee2152016-08-29 04:09:19 -07001931 deps = [
1932 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001933 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001934 ]
1935
1936 include_dirs = [
1937 "codecs/isac/main/include",
1938 "codecs/isac/main/test",
1939 "codecs/isac/main/util",
1940 "../../common_audio/signal_processing/include",
1941 ]
1942 }
1943
ehmaldonado38a21322016-09-02 04:10:34 -07001944 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07001945 testonly = true
1946
1947 sources = [
1948 "codecs/ilbc/test/iLBC_test.c",
1949 ]
1950
aleloicfee2152016-08-29 04:09:19 -07001951 deps = [
1952 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07001953 ]
1954 }
1955
ehmaldonado38a21322016-09-02 04:10:34 -07001956 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07001957 testonly = true
1958
1959 sources = [
1960 "codecs/opus/opus_fec_test.cc",
1961 ]
1962
1963 deps = [
1964 ":webrtc_opus",
ivoc48052312016-08-25 04:43:45 -07001965 "../../base:rtc_base_approved",
ivoc2c670db2016-08-24 06:11:18 -07001966 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001967 "../../test:test_main",
ivoc2c670db2016-08-24 06:11:18 -07001968 "//testing/gtest",
1969 ]
1970
kjellandere40a7ee2016-10-16 23:56:12 -07001971 if (!build_with_chromium && is_clang) {
1972 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001973 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07001974 }
1975 }
ehmaldonado36268652017-01-19 08:27:11 -08001976
1977 rtc_source_set("audio_coding_unittests") {
1978 testonly = true
1979
1980 sources = [
1981 "acm2/acm_receiver_unittest.cc",
1982 "acm2/audio_coding_module_unittest.cc",
1983 "acm2/call_statistics_unittest.cc",
1984 "acm2/codec_manager_unittest.cc",
1985 "acm2/rent_a_codec_unittest.cc",
1986 "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc",
1987 "audio_network_adaptor/bitrate_controller_unittest.cc",
1988 "audio_network_adaptor/channel_controller_unittest.cc",
1989 "audio_network_adaptor/controller_manager_unittest.cc",
1990 "audio_network_adaptor/dtx_controller_unittest.cc",
minyue4b7c9522017-01-24 04:54:59 -08001991 "audio_network_adaptor/event_log_writer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08001992 "audio_network_adaptor/fec_controller_unittest.cc",
1993 "audio_network_adaptor/frame_length_controller_unittest.cc",
1994 "audio_network_adaptor/mock/mock_controller.h",
1995 "audio_network_adaptor/mock/mock_controller_manager.h",
kwiberg087bd342017-02-10 08:15:44 -08001996 "codecs/builtin_audio_decoder_factory_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08001997 "codecs/cng/audio_encoder_cng_unittest.cc",
1998 "codecs/cng/cng_unittest.cc",
1999 "codecs/ilbc/ilbc_unittest.cc",
2000 "codecs/isac/fix/source/filterbanks_unittest.cc",
2001 "codecs/isac/fix/source/filters_unittest.cc",
2002 "codecs/isac/fix/source/lpc_masking_model_unittest.cc",
2003 "codecs/isac/fix/source/transform_unittest.cc",
2004 "codecs/isac/main/source/audio_encoder_isac_unittest.cc",
2005 "codecs/isac/main/source/isac_unittest.cc",
2006 "codecs/isac/unittest.cc",
2007 "codecs/legacy_encoded_audio_frame_unittest.cc",
2008 "codecs/mock/mock_audio_encoder.cc",
2009 "codecs/opus/audio_encoder_opus_unittest.cc",
2010 "codecs/opus/opus_unittest.cc",
2011 "codecs/red/audio_encoder_copy_red_unittest.cc",
2012 "neteq/audio_multi_vector_unittest.cc",
2013 "neteq/audio_vector_unittest.cc",
2014 "neteq/background_noise_unittest.cc",
2015 "neteq/buffer_level_filter_unittest.cc",
2016 "neteq/comfort_noise_unittest.cc",
2017 "neteq/decision_logic_unittest.cc",
2018 "neteq/decoder_database_unittest.cc",
2019 "neteq/delay_manager_unittest.cc",
2020 "neteq/delay_peak_detector_unittest.cc",
2021 "neteq/dsp_helper_unittest.cc",
2022 "neteq/dtmf_buffer_unittest.cc",
2023 "neteq/dtmf_tone_generator_unittest.cc",
2024 "neteq/expand_unittest.cc",
2025 "neteq/merge_unittest.cc",
2026 "neteq/mock/mock_audio_decoder.h",
2027 "neteq/mock/mock_buffer_level_filter.h",
2028 "neteq/mock/mock_decoder_database.h",
2029 "neteq/mock/mock_delay_manager.h",
2030 "neteq/mock/mock_delay_peak_detector.h",
2031 "neteq/mock/mock_dtmf_buffer.h",
2032 "neteq/mock/mock_dtmf_tone_generator.h",
2033 "neteq/mock/mock_expand.h",
2034 "neteq/mock/mock_external_decoder_pcm16b.h",
2035 "neteq/mock/mock_packet_buffer.h",
2036 "neteq/mock/mock_red_payload_splitter.h",
2037 "neteq/nack_tracker_unittest.cc",
2038 "neteq/neteq_external_decoder_unittest.cc",
2039 "neteq/neteq_impl_unittest.cc",
2040 "neteq/neteq_network_stats_unittest.cc",
2041 "neteq/neteq_stereo_unittest.cc",
2042 "neteq/neteq_unittest.cc",
2043 "neteq/normal_unittest.cc",
2044 "neteq/packet_buffer_unittest.cc",
2045 "neteq/post_decode_vad_unittest.cc",
2046 "neteq/random_vector_unittest.cc",
2047 "neteq/red_payload_splitter_unittest.cc",
2048 "neteq/sync_buffer_unittest.cc",
2049 "neteq/tick_timer_unittest.cc",
2050 "neteq/time_stretch_unittest.cc",
2051 "neteq/timestamp_scaler_unittest.cc",
2052 "neteq/tools/input_audio_file_unittest.cc",
2053 "neteq/tools/packet_unittest.cc",
2054 ]
2055
2056 deps = [
2057 ":acm_receive_test",
2058 ":acm_send_test",
2059 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08002060 ":audio_coding_module_typedefs",
ehmaldonado36268652017-01-19 08:27:11 -08002061 ":audio_encoder_interface",
2062 ":audio_format_conversion",
2063 ":audio_network_adaptor",
ehmaldonado36268652017-01-19 08:27:11 -08002064 ":cng",
2065 ":g711",
2066 ":ilbc",
kwiberga6ca5182017-01-30 05:28:54 -08002067 ":isac",
ehmaldonado36268652017-01-19 08:27:11 -08002068 ":isac_c",
2069 ":isac_fix",
kwiberg087bd342017-02-10 08:15:44 -08002070 ":legacy_encoded_audio_frame",
ehmaldonado36268652017-01-19 08:27:11 -08002071 ":neteq",
2072 ":neteq_test_support",
2073 ":neteq_unittest_tools",
2074 ":pcm16b",
2075 ":red",
2076 ":rent_a_codec",
2077 ":webrtc_opus",
2078 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08002079 "../../api/audio_codecs:audio_codecs_api",
2080 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado36268652017-01-19 08:27:11 -08002081 "../../base:rtc_base",
2082 "../../base:rtc_base_approved",
2083 "../../base:rtc_base_tests_utils",
2084 "../../common_audio",
2085 "../../system_wrappers:system_wrappers",
2086 "../../test:field_trial",
2087 "../../test:rtp_test_utils",
2088 "../../test:test_common",
2089 "../../test:test_support",
2090 "//testing/gmock",
2091 "//testing/gtest",
2092 "//third_party/gflags",
2093 ]
2094
2095 defines = audio_coding_defines
2096
2097 if (rtc_enable_protobuf) {
2098 defines += [
2099 "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP",
2100 "WEBRTC_NETEQ_UNITTEST_BITEXACT",
2101 ]
2102 deps += [
2103 ":ana_config_proto",
2104 ":neteq_unittest_proto",
2105 ]
2106 }
2107
2108 if (!build_with_chromium && is_clang) {
2109 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
2110 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
2111 }
2112 }
kjellanderfb114242016-06-13 00:19:48 -07002113}
kwiberg087bd342017-02-10 08:15:44 -08002114
2115# For backwards compatibility only! Use
2116# webrtc/api/audio_codecs:audio_codecs_api instead.
2117# TODO(kwiberg): Remove this.
2118rtc_source_set("audio_decoder_interface") {
2119 sources = [
2120 "codecs/audio_decoder.h",
2121 ]
2122 deps = [
2123 "../../api/audio_codecs:audio_codecs_api",
2124 ]
2125}
2126
2127# For backwards compatibility only! Use
2128# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2129# TODO(kwiberg): Remove this.
2130rtc_source_set("builtin_audio_decoder_factory") {
2131 sources = [
2132 "codecs/builtin_audio_decoder_factory.h",
2133 ]
2134 deps = [
2135 "../../api/audio_codecs:builtin_audio_decoder_factory",
2136 ]
2137}