blob: 6c7766d65baeca557d47b26abfb4b5c2ce50f424 [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",
919 ]
minyue25f6a392016-09-22 22:23:20 -0700920
minyue41b9c802016-10-06 07:13:54 -0700921 deps = [
922 "../..:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -0800923 "../../base:rtc_base_approved",
924 "../../common_audio",
minyue4b7c9522017-01-24 04:54:59 -0800925 "../../logging:rtc_event_log_api",
minyue41b9c802016-10-06 07:13:54 -0700926 "../../system_wrappers",
927 ]
928
minyue25f6a392016-09-22 22:23:20 -0700929 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700930 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700931 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700932 ":ana_debug_dump_proto",
933 ]
934 defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ]
935 }
minyue4b7c9522017-01-24 04:54:59 -0800936
937 if (!build_with_chromium && is_clang) {
938 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
939 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
940 }
minyue7610f852016-09-07 13:51:51 -0700941}
942
kwiberg65cb70d2017-03-03 06:16:28 -0800943rtc_source_set("neteq_decoder_enum") {
944 sources = [
945 "neteq/neteq_decoder_enum.cc",
946 "neteq/neteq_decoder_enum.h",
947 ]
948 deps = [
949 "../../api/audio_codecs:audio_codecs_api",
950 "../../base:rtc_base_approved",
951 ]
952}
kjellander676e08f2016-12-07 08:23:27 -0800953
kwiberg65cb70d2017-03-03 06:16:28 -0800954rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000955 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000956 "neteq/accelerate.cc",
957 "neteq/accelerate.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000958 "neteq/audio_decoder_impl.cc",
959 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000960 "neteq/audio_multi_vector.cc",
961 "neteq/audio_multi_vector.h",
962 "neteq/audio_vector.cc",
963 "neteq/audio_vector.h",
964 "neteq/background_noise.cc",
965 "neteq/background_noise.h",
966 "neteq/buffer_level_filter.cc",
967 "neteq/buffer_level_filter.h",
968 "neteq/comfort_noise.cc",
969 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700970 "neteq/cross_correlation.cc",
971 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000972 "neteq/decision_logic.cc",
973 "neteq/decision_logic.h",
974 "neteq/decision_logic_fax.cc",
975 "neteq/decision_logic_fax.h",
976 "neteq/decision_logic_normal.cc",
977 "neteq/decision_logic_normal.h",
978 "neteq/decoder_database.cc",
979 "neteq/decoder_database.h",
980 "neteq/defines.h",
981 "neteq/delay_manager.cc",
982 "neteq/delay_manager.h",
983 "neteq/delay_peak_detector.cc",
984 "neteq/delay_peak_detector.h",
985 "neteq/dsp_helper.cc",
986 "neteq/dsp_helper.h",
987 "neteq/dtmf_buffer.cc",
988 "neteq/dtmf_buffer.h",
989 "neteq/dtmf_tone_generator.cc",
990 "neteq/dtmf_tone_generator.h",
991 "neteq/expand.cc",
992 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +0100993 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000994 "neteq/merge.cc",
995 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -0700996 "neteq/nack_tracker.cc",
997 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200998 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000999 "neteq/neteq_impl.cc",
1000 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001001 "neteq/normal.cc",
1002 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -07001003 "neteq/packet.cc",
1004 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001005 "neteq/packet_buffer.cc",
1006 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001007 "neteq/post_decode_vad.cc",
1008 "neteq/post_decode_vad.h",
1009 "neteq/preemptive_expand.cc",
1010 "neteq/preemptive_expand.h",
1011 "neteq/random_vector.cc",
1012 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -07001013 "neteq/red_payload_splitter.cc",
1014 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001015 "neteq/rtcp.cc",
1016 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001017 "neteq/statistics_calculator.cc",
1018 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001019 "neteq/sync_buffer.cc",
1020 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -07001021 "neteq/tick_timer.cc",
1022 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001023 "neteq/time_stretch.cc",
1024 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001025 "neteq/timestamp_scaler.cc",
1026 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001027 ]
1028
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001029 deps = [
kwiberg65cb70d2017-03-03 06:16:28 -08001030 ":audio_coding_module_typedefs",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001031 ":cng",
1032 ":g711",
kjellander676e08f2016-12-07 08:23:27 -08001033 ":isac_fix",
kwiberg65cb70d2017-03-03 06:16:28 -08001034 ":neteq_decoder_enum",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001035 ":pcm16b",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +00001036 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001037 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001038 "../../base:gtest_prod",
1039 "../../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001040 "../../common_audio",
1041 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001042 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001043
1044 defines = []
1045
kwibergf8c2bac2016-01-18 06:38:32 -08001046 if (rtc_include_ilbc) {
1047 defines += [ "WEBRTC_CODEC_ILBC" ]
1048 deps += [ ":ilbc" ]
1049 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001050 if (rtc_include_opus) {
1051 defines += [ "WEBRTC_CODEC_OPUS" ]
1052 deps += [ ":webrtc_opus" ]
1053 }
kwiberg98ab3a42015-09-30 21:54:21 -07001054 if (!build_with_mozilla) {
1055 if (current_cpu == "arm") {
1056 defines += [ "WEBRTC_CODEC_ISACFX" ]
1057 deps += [ ":isac_fix" ]
1058 } else {
1059 defines += [ "WEBRTC_CODEC_ISAC" ]
1060 deps += [ ":isac" ]
1061 }
1062 defines += [ "WEBRTC_CODEC_G722" ]
1063 deps += [ ":g722" ]
1064 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001065}
kjellanderfb114242016-06-13 00:19:48 -07001066
henrik.lundin58466f62016-10-05 02:27:42 -07001067# Although providing only test support, this target must be outside of the
1068# rtc_include_tests conditional. The reason is that it supports fuzzer tests
1069# that ultimately are built and run as a part of the Chromium ecosystem, which
1070# does not set the rtc_include_tests flag.
1071rtc_source_set("neteq_test_minimal") {
1072 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001073
1074 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1075 # Has cyclic dependency with :neteq_unittest_tools
1076 check_includes = false
1077
henrik.lundin58466f62016-10-05 02:27:42 -07001078 sources = [
1079 "neteq/tools/encode_neteq_input.cc",
1080 "neteq/tools/encode_neteq_input.h",
1081 "neteq/tools/neteq_test.cc",
1082 "neteq/tools/neteq_test.h",
1083 ]
1084
kjellandere40a7ee2016-10-16 23:56:12 -07001085 if (!build_with_chromium && is_clang) {
1086 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
henrik.lundin58466f62016-10-05 02:27:42 -07001087 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1088 }
kjellander676e08f2016-12-07 08:23:27 -08001089
1090 deps = [
1091 ":audio_encoder_interface",
kjellander676e08f2016-12-07 08:23:27 -08001092 ":neteq",
1093 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001094 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001095 "../../base:rtc_base_approved",
1096 ]
henrik.lundin58466f62016-10-05 02:27:42 -07001097}
1098
kjellanderfb114242016-06-13 00:19:48 -07001099if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -07001100 group("audio_coding_tests") {
1101 testonly = true
1102 public_deps = [
1103 ":RTPchange",
1104 ":RTPencode",
1105 ":RTPjitter",
1106 ":RTPtimeshift",
1107 ":acm_receive_test",
1108 ":acm_send_test",
kjellander6ceab082016-10-28 05:44:03 -07001109 ":audio_codec_speed_tests",
1110 ":audio_decoder_unittests",
1111 ":audio_decoder_unittests",
1112 ":delay_test",
1113 ":g711_test",
1114 ":g722_test",
1115 ":ilbc_test",
1116 ":insert_packet_with_timing",
1117 ":isac_api_test",
1118 ":isac_fix_test",
1119 ":isac_switch_samprate_test",
1120 ":isac_test",
1121 ":neteq_ilbc_quality_test",
1122 ":neteq_isac_quality_test",
1123 ":neteq_opus_quality_test",
1124 ":neteq_pcmu_quality_test",
1125 ":neteq_speed_test",
1126 ":rtp_analyze",
1127 ":rtpcat",
1128 ":webrtc_opus_fec_test",
1129 ]
1130 if (rtc_enable_protobuf) {
1131 public_deps += [ ":neteq_rtpplay" ]
1132 }
1133 }
1134
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001135 rtc_source_set("audio_coding_modules_tests") {
1136 testonly = true
1137 sources = [
1138 "test/APITest.cc",
1139 "test/Channel.cc",
1140 "test/EncodeDecodeTest.cc",
1141 "test/PCMFile.cc",
1142 "test/PacketLossTest.cc",
1143 "test/RTPFile.cc",
1144 "test/TestAllCodecs.cc",
1145 "test/TestRedFec.cc",
1146 "test/TestStereo.cc",
1147 "test/TestVADDTX.cc",
1148 "test/Tester.cc",
1149 "test/TwoWayCommunication.cc",
1150 "test/iSACTest.cc",
1151 "test/opus_test.cc",
1152 "test/target_delay_unittest.cc",
1153 "test/utility.cc",
1154 ]
1155 deps = [
1156 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001157 ":audio_coding_module_typedefs",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001158 ":audio_format_conversion",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001159 ":pcm16b_c",
1160 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001161 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001162 "../../base:rtc_base_approved",
1163 "../../system_wrappers:system_wrappers",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001164 "../../test:test_support",
1165 ]
1166 defines = audio_coding_defines
1167 if (is_win) {
1168 cflags = [
1169 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1170 "/wd4373", # virtual function override.
1171 ]
1172 }
1173 if (!build_with_chromium && is_clang) {
1174 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1175 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1176 }
1177 }
1178
ehmaldonado021eef32017-01-05 07:09:50 -08001179 rtc_source_set("audio_coding_perf_tests") {
1180 testonly = true
1181 sources = [
1182 "codecs/opus/opus_complexity_unittest.cc",
1183 "neteq/test/neteq_performance_unittest.cc",
1184 ]
1185 deps = [
1186 ":neteq_test_support",
1187 ":neteq_unittest_tools",
1188 ":webrtc_opus",
1189 "../..:webrtc_common",
1190 "../../base:rtc_base_approved",
1191 "../../system_wrappers:system_wrappers",
1192 "../../test:test_support",
1193 ]
1194 if (!build_with_chromium && is_clang) {
1195 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1196 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1197 }
1198 }
1199
ehmaldonado38a21322016-09-02 04:10:34 -07001200 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -07001201 testonly = true
1202 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001203 "acm2/acm_receive_test.cc",
1204 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001205 ]
1206
kjellanderfb114242016-06-13 00:19:48 -07001207 defines = audio_coding_defines
1208
1209 deps = audio_coding_deps + [
1210 ":audio_coding",
kjellander676e08f2016-12-07 08:23:27 -08001211 ":audio_format_conversion",
kwiberg087bd342017-02-10 08:15:44 -08001212 "../../api/audio_codecs:audio_codecs_api",
1213 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellanderfb114242016-06-13 00:19:48 -07001214 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001215 "../../base:rtc_base_approved",
1216 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001217 "//testing/gtest",
1218 ]
1219 }
1220
ehmaldonado38a21322016-09-02 04:10:34 -07001221 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -07001222 testonly = true
1223 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001224 "acm2/acm_send_test.cc",
1225 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001226 ]
1227
kjellanderfb114242016-06-13 00:19:48 -07001228 defines = audio_coding_defines
1229
1230 deps = audio_coding_deps + [
1231 ":audio_coding",
kwiberg087bd342017-02-10 08:15:44 -08001232 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001233 ":audio_encoder_interface",
kjellanderfb114242016-06-13 00:19:48 -07001234 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001235 "../../base:rtc_base_approved",
1236 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001237 "//testing/gtest",
1238 ]
1239 }
1240
ehmaldonado38a21322016-09-02 04:10:34 -07001241 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -07001242 testonly = true
1243 sources = [
1244 "test/Channel.cc",
1245 "test/PCMFile.cc",
1246 "test/delay_test.cc",
1247 "test/utility.cc",
1248 ]
1249
aleloi333f2062016-07-28 01:21:29 -07001250 deps = [
1251 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001252 ":audio_coding_module_typedefs",
kwibergda2bf4e2016-10-24 13:47:09 -07001253 ":audio_format_conversion",
aleloi333f2062016-07-28 01:21:29 -07001254 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001255 "../../base:rtc_base_approved",
aleloi333f2062016-07-28 01:21:29 -07001256 "../../system_wrappers",
1257 "../../system_wrappers:system_wrappers_default",
1258 "../../test:test_support",
1259 "../rtp_rtcp",
1260 "//testing/gtest",
1261 "//third_party/gflags:gflags",
1262 ]
1263 } # delay_test
1264
ehmaldonado38a21322016-09-02 04:10:34 -07001265 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -07001266 testonly = true
1267 sources = [
1268 "test/Channel.cc",
1269 "test/PCMFile.cc",
1270 "test/insert_packet_with_timing.cc",
1271 ]
1272
kjellandere40a7ee2016-10-16 23:56:12 -07001273 if (!build_with_chromium && is_clang) {
1274 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001275 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -07001276 }
1277
1278 deps = [
1279 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001280 ":audio_format_conversion",
aleloi00730c72016-07-28 01:27:10 -07001281 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001282 "../../base:rtc_base_approved",
aleloi00730c72016-07-28 01:27:10 -07001283 "../../system_wrappers",
1284 "../../system_wrappers:system_wrappers_default",
1285 "../../test:test_support",
1286 "../rtp_rtcp",
1287 "//testing/gtest",
1288 "//third_party/gflags:gflags",
1289 ]
1290 } # insert_packet_with_timing
1291
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001292 audio_decoder_unittests_resources =
1293 [ "//resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -07001294
1295 if (is_ios) {
1296 bundle_data("audio_decoder_unittests_bundle_data") {
1297 testonly = true
1298 sources = audio_decoder_unittests_resources
1299 outputs = [
1300 "{{bundle_resources_dir}}/{{source_file_part}}",
1301 ]
1302 }
1303 }
1304
ehmaldonado38a21322016-09-02 04:10:34 -07001305 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -07001306 testonly = true
1307 sources = [
1308 "neteq/audio_decoder_unittest.cc",
1309 ]
1310
kjellandere40a7ee2016-10-16 23:56:12 -07001311 if (!build_with_chromium && is_clang) {
1312 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001313 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -07001314 }
1315
1316 deps = []
1317
1318 defines = neteq_defines
1319
1320 deps += audio_coding_deps
1321 deps += [
ehmaldonado87b8e9f2017-02-07 06:26:29 -08001322 ":ilbc",
charujainddf3e4a2016-08-01 07:49:42 -07001323 ":isac",
1324 ":isac_fix",
1325 ":neteq",
1326 ":neteq_unittest_tools",
kwiberg087bd342017-02-10 08:15:44 -08001327 "../../api/audio_codecs:audio_codecs_api",
kjellander6ceab082016-10-28 05:44:03 -07001328 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001329 "../../test:test_main",
charujainddf3e4a2016-08-01 07:49:42 -07001330 "//testing/gtest",
1331 ]
1332
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001333 data = audio_decoder_unittests_resources
1334
charujainddf3e4a2016-08-01 07:49:42 -07001335 if (is_android) {
1336 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001337 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001338 }
kjellander32c4a202016-08-30 02:53:49 -07001339 if (is_ios) {
1340 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001341 }
1342 } # audio_decoder_unittests
1343
kjellanderfb114242016-06-13 00:19:48 -07001344 if (rtc_enable_protobuf) {
1345 proto_library("neteq_unittest_proto") {
1346 sources = [
1347 "neteq/neteq_unittest.proto",
1348 ]
kjellandere3e902e2017-02-28 08:01:46 -08001349 proto_out_dir = "webrtc/modules/audio_coding/neteq"
kjellanderfb114242016-06-13 00:19:48 -07001350 }
henrik.lundin03153f12016-06-21 05:38:42 -07001351
kjellanderb62dbbe2016-09-23 00:38:52 -07001352 rtc_static_library("rtc_event_log_source") {
henrik.lundin03153f12016-06-21 05:38:42 -07001353 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001354
1355 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1356 # Needs call.h to be moved to webrtc/api first.
1357 check_includes = false
1358
henrik.lundin03153f12016-06-21 05:38:42 -07001359 sources = [
1360 "neteq/tools/rtc_event_log_source.cc",
1361 "neteq/tools/rtc_event_log_source.h",
1362 ]
1363
kjellandere40a7ee2016-10-16 23:56:12 -07001364 if (!build_with_chromium && is_clang) {
1365 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001366 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001367 }
1368
1369 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001370 "../../base:rtc_base_approved",
skvladcc91d282016-10-03 18:31:22 -07001371 "../../logging:rtc_event_log_parser",
henrik.lundin03153f12016-06-21 05:38:42 -07001372 ]
1373 public_deps = [
skvladcc91d282016-10-03 18:31:22 -07001374 "../../logging:rtc_event_log_proto",
henrik.lundin03153f12016-06-21 05:38:42 -07001375 ]
1376 }
1377
ehmaldonado38a21322016-09-02 04:10:34 -07001378 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001379 testonly = true
1380 defines = []
1381 deps = []
1382 sources = [
1383 "neteq/tools/neteq_rtpplay.cc",
1384 ]
1385
kjellandere40a7ee2016-10-16 23:56:12 -07001386 if (!build_with_chromium && is_clang) {
1387 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001388 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001389 }
1390
1391 if (is_win) {
1392 cflags = [
1393 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1394 "/wd4373", # virtual function override.
1395 ]
1396 }
1397
1398 deps += [
1399 ":neteq",
1400 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001401 "../..:webrtc_common",
1402 "../../base:rtc_base_approved",
henrik.lundin03153f12016-06-21 05:38:42 -07001403 "../../system_wrappers:system_wrappers_default",
1404 "../../test:test_support",
1405 "//third_party/gflags",
1406 ]
1407 }
kjellanderfb114242016-06-13 00:19:48 -07001408 }
1409
ehmaldonado38a21322016-09-02 04:10:34 -07001410 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001411 testonly = true
1412 defines = []
1413 deps = []
1414 sources = [
1415 "codecs/isac/fix/test/isac_speed_test.cc",
1416 "codecs/opus/opus_speed_test.cc",
1417 "codecs/tools/audio_codec_speed_test.cc",
1418 "codecs/tools/audio_codec_speed_test.h",
1419 ]
1420
kjellandere40a7ee2016-10-16 23:56:12 -07001421 if (!build_with_chromium && is_clang) {
1422 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001423 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001424 }
1425
1426 if (is_android) {
1427 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001428 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001429 }
1430
1431 deps += [
1432 ":isac_fix",
1433 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001434 "../..:webrtc_common",
1435 "../../base:rtc_base_approved",
aleloie6b60a42016-07-28 02:34:30 -07001436 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001437 "../../test:test_main",
kjellander6ceab082016-10-28 05:44:03 -07001438 "../audio_processing",
aleloie6b60a42016-07-28 02:34:30 -07001439 "//testing/gtest",
1440 ]
1441 }
1442
ehmaldonado38a21322016-09-02 04:10:34 -07001443 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001444 testonly = true
1445 sources = [
1446 "neteq/tools/neteq_external_decoder_test.cc",
1447 "neteq/tools/neteq_external_decoder_test.h",
1448 "neteq/tools/neteq_performance_test.cc",
1449 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001450 ]
1451
kjellandere40a7ee2016-10-16 23:56:12 -07001452 if (!build_with_chromium && is_clang) {
1453 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001454 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001455 }
1456
1457 deps = [
1458 ":neteq",
1459 ":neteq_unittest_tools",
1460 ":pcm16b",
kjellander676e08f2016-12-07 08:23:27 -08001461 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001462 "../../api/audio_codecs:audio_codecs_api",
1463 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001464 "../../base:rtc_base_approved",
1465 "../../system_wrappers",
1466 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001467 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001468 ]
1469 }
1470
ehmaldonado38a21322016-09-02 04:10:34 -07001471 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001472 testonly = true
1473 sources = [
1474 "neteq/tools/neteq_quality_test.cc",
1475 "neteq/tools/neteq_quality_test.h",
1476 ]
1477
kjellandere40a7ee2016-10-16 23:56:12 -07001478 if (!build_with_chromium && is_clang) {
1479 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001480 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001481 }
1482
1483 deps = [
1484 ":neteq",
1485 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001486 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001487 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001488 "../../base:rtc_base_approved",
1489 "../../test:test_support",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001490 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001491 "//third_party/gflags",
1492 ]
1493 }
1494
kjellanderfb114242016-06-13 00:19:48 -07001495 config("neteq_unittest_tools_config") {
1496 include_dirs = [ "tools" ]
1497 }
1498
ehmaldonado38a21322016-09-02 04:10:34 -07001499 rtc_source_set("neteq_unittest_tools") {
kjellanderfb114242016-06-13 00:19:48 -07001500 testonly = true
1501 sources = [
1502 "neteq/tools/audio_checksum.h",
1503 "neteq/tools/audio_loop.cc",
1504 "neteq/tools/audio_loop.h",
aleloi0e0be0a2016-08-10 04:55:20 -07001505 "neteq/tools/audio_sink.cc",
kjellanderfb114242016-06-13 00:19:48 -07001506 "neteq/tools/audio_sink.h",
1507 "neteq/tools/constant_pcm_packet_source.cc",
1508 "neteq/tools/constant_pcm_packet_source.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001509 "neteq/tools/fake_decode_from_file.cc",
1510 "neteq/tools/fake_decode_from_file.h",
kjellanderfb114242016-06-13 00:19:48 -07001511 "neteq/tools/input_audio_file.cc",
1512 "neteq/tools/input_audio_file.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001513 "neteq/tools/neteq_input.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001514 "neteq/tools/neteq_replacement_input.cc",
1515 "neteq/tools/neteq_replacement_input.h",
kjellanderfb114242016-06-13 00:19:48 -07001516 "neteq/tools/output_audio_file.h",
1517 "neteq/tools/output_wav_file.h",
1518 "neteq/tools/packet.cc",
1519 "neteq/tools/packet.h",
kwibergb8e56ee2016-08-29 06:37:33 -07001520 "neteq/tools/packet_source.cc",
kjellanderfb114242016-06-13 00:19:48 -07001521 "neteq/tools/packet_source.h",
1522 "neteq/tools/resample_input_audio_file.cc",
1523 "neteq/tools/resample_input_audio_file.h",
1524 "neteq/tools/rtp_file_source.cc",
1525 "neteq/tools/rtp_file_source.h",
1526 "neteq/tools/rtp_generator.cc",
1527 "neteq/tools/rtp_generator.h",
1528 ]
1529
ehmaldonadoe9cc6862016-09-05 06:10:18 -07001530 public_configs = [ ":neteq_unittest_tools_config" ]
kjellanderfb114242016-06-13 00:19:48 -07001531
kjellandere40a7ee2016-10-16 23:56:12 -07001532 if (!build_with_chromium && is_clang) {
1533 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001534 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001535 }
1536
1537 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001538 ":audio_encoder_interface",
1539 ":pcm16b",
1540 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001541 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001542 "../../base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -07001543 "../../common_audio",
1544 "../../test:rtp_test_utils",
1545 "../rtp_rtcp",
1546 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001547
kjellander676e08f2016-12-07 08:23:27 -08001548 public_deps = [
1549 ":neteq_test_minimal",
1550 ]
1551
henrik.lundine8a77e32016-06-22 06:34:03 -07001552 if (rtc_enable_protobuf) {
ehmaldonado36268652017-01-19 08:27:11 -08001553 sources += [
1554 "neteq/tools/neteq_packet_source_input.cc",
1555 "neteq/tools/neteq_packet_source_input.h",
1556 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001557 deps += [ ":rtc_event_log_source" ]
1558 }
kjellanderfb114242016-06-13 00:19:48 -07001559 }
aleloi3022a342016-07-26 06:36:03 -07001560
ehmaldonado38a21322016-09-02 04:10:34 -07001561 rtc_source_set("neteq_test_tools") {
aleloi3022a342016-07-26 06:36:03 -07001562 testonly = true
1563 sources = [
1564 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1565 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1566 "neteq/test/NETEQTEST_RTPpacket.cc",
1567 "neteq/test/NETEQTEST_RTPpacket.h",
1568 ]
1569
1570 deps = [
1571 ":cng",
1572 ":g711",
1573 ":g722",
1574 ":ilbc",
1575 ":isac",
1576 ":pcm16b",
1577 "../..:webrtc_common",
1578 "//testing/gtest",
1579 ]
1580
1581 include_dirs = [
1582 "neteq/include",
1583 "neteq/test",
1584 "../../",
1585 ]
1586
1587 if (is_win) {
1588 cflags = [
1589 # Disable warnings to enable Win64 build, issue 1323.
1590 "/wd4267", # size_t to int truncation
1591 ]
1592 }
1593 }
aleloi47bded42016-07-26 06:46:19 -07001594
aleloi82667732016-08-02 01:45:50 -07001595 config("RTPencode_config") {
1596 defines = [
1597 "CODEC_ILBC",
1598 "CODEC_PCM16B",
1599 "CODEC_G711",
1600 "CODEC_G722",
1601 "CODEC_ISAC",
1602 "CODEC_PCM16B_WB",
1603 "CODEC_ISAC_SWB",
1604 "CODEC_PCM16B_32KHZ",
1605 "CODEC_PCM16B_48KHZ",
1606 "CODEC_CNGCODEC8",
1607 "CODEC_CNGCODEC16",
1608 "CODEC_CNGCODEC32",
1609 "CODEC_ATEVENT_DECODE",
1610 "CODEC_RED",
1611 "CODEC_OPUS",
1612 ]
1613 }
1614
ehmaldonado38a21322016-09-02 04:10:34 -07001615 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001616 testonly = true
1617
1618 deps = [
1619 # TODO(hlundin): Make RTPencode use ACM to encode files.
1620 ":cng",
1621 ":g711",
1622 ":g722",
1623 ":ilbc",
1624 ":isac",
kjellander676e08f2016-12-07 08:23:27 -08001625 ":neteq",
aleloi82667732016-08-02 01:45:50 -07001626 ":neteq_test_tools",
1627 ":pcm16b",
1628 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001629 "../..:webrtc_common",
1630 "../../base:rtc_base_approved",
aleloi82667732016-08-02 01:45:50 -07001631 "../../common_audio",
1632 ]
1633
1634 configs += [ ":RTPencode_config" ]
1635
1636 sources = [
1637 "neteq/test/RTPencode.cc",
1638 ]
1639
1640 include_dirs = [
1641 "neteq/include",
1642 "neteq/test",
1643 ]
1644
1645 if (is_win) {
1646 cflags = [
1647 # Disable warnings to enable Win64 build, issue 1323.
1648 "/wd4267", # size_t to int truncation
1649 ]
1650 }
1651 }
1652
ehmaldonado38a21322016-09-02 04:10:34 -07001653 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001654 testonly = true
1655
1656 sources = [
1657 "neteq/test/RTPchange.cc",
1658 ]
1659
1660 deps = [
1661 ":neteq_test_tools",
1662 ]
1663 }
1664
ehmaldonado38a21322016-09-02 04:10:34 -07001665 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001666 testonly = true
1667
1668 sources = [
1669 "neteq/tools/rtpcat.cc",
1670 ]
1671
1672 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001673 "../../base:rtc_base_approved",
aleloi5556dcb2016-08-02 04:27:25 -07001674 "../../system_wrappers:system_wrappers_default",
1675 "../../test:rtp_test_utils",
1676 "//testing/gtest",
1677 ]
1678 }
1679
ehmaldonado38a21322016-09-02 04:10:34 -07001680 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001681 testonly = true
1682
1683 sources = [
1684 "neteq/test/RTPtimeshift.cc",
1685 ]
1686
1687 deps = [
1688 ":neteq_test_tools",
kjellander676e08f2016-12-07 08:23:27 -08001689 "../../test:test_support",
aleloi5a746502016-08-02 06:06:33 -07001690 "//testing/gtest",
1691 ]
1692 }
1693
ehmaldonado38a21322016-09-02 04:10:34 -07001694 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001695 testonly = true
1696 deps = [
1697 "../..:webrtc_common",
kthelgason29a44e32016-09-27 03:52:02 -07001698 "../../base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001699 "../../test:test_support",
aleloi17dfa742016-08-03 01:17:25 -07001700 "//testing/gtest",
1701 ]
1702 sources = [
1703 "neteq/test/RTPjitter.cc",
1704 ]
1705 }
1706
ehmaldonado38a21322016-09-02 04:10:34 -07001707 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001708 testonly = true
1709
1710 sources = [
1711 "neteq/tools/rtp_analyze.cc",
1712 ]
1713
1714 deps = [
1715 ":neteq",
1716 ":neteq_unittest_tools",
1717 ":pcm16b",
1718 "../../system_wrappers:system_wrappers_default",
1719 "//testing/gtest",
1720 "//third_party/gflags:gflags",
1721 ]
1722
kjellandere40a7ee2016-10-16 23:56:12 -07001723 if (!build_with_chromium && is_clang) {
1724 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001725 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001726 }
1727 }
aleloi630c6d52016-08-10 02:11:30 -07001728
ehmaldonado38a21322016-09-02 04:10:34 -07001729 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001730 testonly = true
1731
1732 sources = [
1733 "neteq/test/neteq_opus_quality_test.cc",
1734 ]
1735
1736 deps = [
1737 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001738 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001739 ":neteq_unittest_tools",
aleloi630c6d52016-08-10 02:11:30 -07001740 ":webrtc_opus",
ehmaldonado26bddb92016-11-30 06:12:01 -08001741 "../../test:test_main",
aleloi630c6d52016-08-10 02:11:30 -07001742 "//testing/gtest",
1743 "//third_party/gflags",
1744 ]
aleloi630c6d52016-08-10 02:11:30 -07001745 }
aleloi116fd612016-08-10 04:16:36 -07001746
ehmaldonado38a21322016-09-02 04:10:34 -07001747 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001748 testonly = true
1749
1750 sources = [
1751 "neteq/test/neteq_speed_test.cc",
1752 ]
1753
1754 deps = [
1755 ":neteq",
1756 ":neteq_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001757 "../..:webrtc_common",
aleloi116fd612016-08-10 04:16:36 -07001758 "../../system_wrappers:system_wrappers_default",
1759 "../../test:test_support",
1760 "//third_party/gflags",
1761 ]
1762 }
aleloi63910122016-08-10 04:41:14 -07001763
ehmaldonado38a21322016-09-02 04:10:34 -07001764 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001765 testonly = true
1766
1767 sources = [
1768 "neteq/test/neteq_ilbc_quality_test.cc",
1769 ]
1770
1771 deps = [
1772 ":ilbc",
1773 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001774 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001775 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001776 "../..:webrtc_common",
1777 "../../base:rtc_base_approved",
aleloi0e0be0a2016-08-10 04:55:20 -07001778 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001779 "../../test:test_main",
aleloi0e0be0a2016-08-10 04:55:20 -07001780 "//testing/gtest",
1781 "//third_party/gflags",
1782 ]
1783 }
aleloi6df36dc2016-08-10 05:04:47 -07001784
ehmaldonado38a21322016-09-02 04:10:34 -07001785 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001786 testonly = true
1787
1788 sources = [
1789 "neteq/test/neteq_isac_quality_test.cc",
1790 ]
1791
1792 deps = [
1793 ":isac_fix",
1794 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001795 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001796 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001797 "../../test:test_main",
aleloi6df36dc2016-08-10 05:04:47 -07001798 "//testing/gtest",
1799 "//third_party/gflags",
1800 ]
1801 }
aleloic4ac7002016-08-10 05:06:27 -07001802
ehmaldonado38a21322016-09-02 04:10:34 -07001803 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001804 testonly = true
1805
1806 sources = [
1807 "neteq/test/neteq_pcmu_quality_test.cc",
1808 ]
1809
1810 deps = [
1811 ":g711",
1812 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001813 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001814 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001815 "../../test:test_main",
aleloic4ac7002016-08-10 05:06:27 -07001816 "//testing/gtest",
1817 "//third_party/gflags",
1818 ]
1819 }
aleloib7186d02016-08-16 01:47:16 -07001820
ehmaldonado38a21322016-09-02 04:10:34 -07001821 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001822 testonly = true
1823
1824 sources = [
1825 "codecs/isac/fix/test/kenny.cc",
1826 ]
1827
1828 deps = [
1829 ":isac_fix",
1830 "../../test:test_support",
1831 ]
1832
1833 if (is_win) {
1834 cflags = [
1835 # Disable warnings to enable Win64 build, issue 1323.
1836 "/wd4267", # size_t to int truncation
1837 ]
1838 }
1839 }
aleloi16f55a12016-08-23 08:08:23 -07001840
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001841 config("isac_test_warnings_config") {
1842 if (is_win && is_clang) {
1843 cflags = [
1844 # Disable warnings failing when compiling with Clang on Windows.
1845 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1846 "-Wno-format",
1847 ]
1848 }
1849 }
1850
kjellander7439f972016-12-05 22:47:46 -08001851 rtc_source_set("isac_test_util") {
1852 testonly = true
1853 sources = [
1854 "codecs/isac/main/util/utility.c",
1855 ]
1856 }
1857
ehmaldonado38a21322016-09-02 04:10:34 -07001858 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001859 testonly = true
1860
1861 sources = [
1862 "codecs/isac/main/test/simpleKenny.c",
ivoce51b41a2016-08-24 02:25:57 -07001863 ]
1864
1865 include_dirs = [
1866 "codecs/isac/main/include",
1867 "codecs/isac/main/test",
1868 "codecs/isac/main/util",
1869 ]
1870
1871 deps = [
1872 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001873 ":isac_test_util",
ivoc48052312016-08-25 04:43:45 -07001874 "../../base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001875 ]
1876
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001877 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001878 }
1879
ehmaldonado38a21322016-09-02 04:10:34 -07001880 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001881 testonly = true
1882
1883 sources = [
1884 "codecs/g711/test/testG711.cc",
1885 ]
1886
aleloi16f55a12016-08-23 08:08:23 -07001887 deps = [
1888 ":g711",
1889 ]
1890 }
aleloi9a117842016-08-23 08:36:10 -07001891
ehmaldonado38a21322016-09-02 04:10:34 -07001892 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001893 testonly = true
1894
1895 sources = [
1896 "codecs/g722/test/testG722.cc",
1897 ]
1898
aleloi9a117842016-08-23 08:36:10 -07001899 deps = [
1900 ":g722",
1901 "../..:webrtc_common",
1902 ]
1903 }
ivoc2c670db2016-08-24 06:11:18 -07001904
ehmaldonado38a21322016-09-02 04:10:34 -07001905 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07001906 testonly = true
1907
1908 sources = [
1909 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
aleloicfee2152016-08-29 04:09:19 -07001910 ]
1911
aleloicfee2152016-08-29 04:09:19 -07001912 deps = [
1913 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001914 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001915 "../../base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07001916 ]
1917
1918 include_dirs = [
1919 "codecs/isac/main/include",
1920 "codecs/isac/main/test",
1921 "codecs/isac/main/util",
1922 ]
1923 }
1924
ehmaldonado38a21322016-09-02 04:10:34 -07001925 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07001926 testonly = true
1927
1928 sources = [
1929 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
aleloicfee2152016-08-29 04:09:19 -07001930 ]
1931
aleloicfee2152016-08-29 04:09:19 -07001932 deps = [
1933 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001934 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001935 ]
1936
1937 include_dirs = [
1938 "codecs/isac/main/include",
1939 "codecs/isac/main/test",
1940 "codecs/isac/main/util",
1941 "../../common_audio/signal_processing/include",
1942 ]
1943 }
1944
ehmaldonado38a21322016-09-02 04:10:34 -07001945 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07001946 testonly = true
1947
1948 sources = [
1949 "codecs/ilbc/test/iLBC_test.c",
1950 ]
1951
aleloicfee2152016-08-29 04:09:19 -07001952 deps = [
1953 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07001954 ]
1955 }
1956
ehmaldonado38a21322016-09-02 04:10:34 -07001957 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07001958 testonly = true
1959
1960 sources = [
1961 "codecs/opus/opus_fec_test.cc",
1962 ]
1963
1964 deps = [
1965 ":webrtc_opus",
ivoc48052312016-08-25 04:43:45 -07001966 "../../base:rtc_base_approved",
ivoc2c670db2016-08-24 06:11:18 -07001967 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001968 "../../test:test_main",
ivoc2c670db2016-08-24 06:11:18 -07001969 "//testing/gtest",
1970 ]
1971
kjellandere40a7ee2016-10-16 23:56:12 -07001972 if (!build_with_chromium && is_clang) {
1973 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001974 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07001975 }
1976 }
ehmaldonado36268652017-01-19 08:27:11 -08001977
1978 rtc_source_set("audio_coding_unittests") {
1979 testonly = true
1980
1981 sources = [
1982 "acm2/acm_receiver_unittest.cc",
1983 "acm2/audio_coding_module_unittest.cc",
1984 "acm2/call_statistics_unittest.cc",
1985 "acm2/codec_manager_unittest.cc",
1986 "acm2/rent_a_codec_unittest.cc",
1987 "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc",
1988 "audio_network_adaptor/bitrate_controller_unittest.cc",
1989 "audio_network_adaptor/channel_controller_unittest.cc",
1990 "audio_network_adaptor/controller_manager_unittest.cc",
1991 "audio_network_adaptor/dtx_controller_unittest.cc",
minyue4b7c9522017-01-24 04:54:59 -08001992 "audio_network_adaptor/event_log_writer_unittest.cc",
elad.alon6d7900d2017-03-24 04:12:56 -07001993 "audio_network_adaptor/fec_controller_plr_based_unittest.cc",
1994 "audio_network_adaptor/fec_controller_rplr_based_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08001995 "audio_network_adaptor/frame_length_controller_unittest.cc",
1996 "audio_network_adaptor/mock/mock_controller.h",
1997 "audio_network_adaptor/mock/mock_controller_manager.h",
kwiberg087bd342017-02-10 08:15:44 -08001998 "codecs/builtin_audio_decoder_factory_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08001999 "codecs/cng/audio_encoder_cng_unittest.cc",
2000 "codecs/cng/cng_unittest.cc",
2001 "codecs/ilbc/ilbc_unittest.cc",
2002 "codecs/isac/fix/source/filterbanks_unittest.cc",
2003 "codecs/isac/fix/source/filters_unittest.cc",
2004 "codecs/isac/fix/source/lpc_masking_model_unittest.cc",
2005 "codecs/isac/fix/source/transform_unittest.cc",
2006 "codecs/isac/main/source/audio_encoder_isac_unittest.cc",
2007 "codecs/isac/main/source/isac_unittest.cc",
2008 "codecs/isac/unittest.cc",
2009 "codecs/legacy_encoded_audio_frame_unittest.cc",
2010 "codecs/mock/mock_audio_encoder.cc",
2011 "codecs/opus/audio_encoder_opus_unittest.cc",
2012 "codecs/opus/opus_unittest.cc",
2013 "codecs/red/audio_encoder_copy_red_unittest.cc",
2014 "neteq/audio_multi_vector_unittest.cc",
2015 "neteq/audio_vector_unittest.cc",
2016 "neteq/background_noise_unittest.cc",
2017 "neteq/buffer_level_filter_unittest.cc",
2018 "neteq/comfort_noise_unittest.cc",
2019 "neteq/decision_logic_unittest.cc",
2020 "neteq/decoder_database_unittest.cc",
2021 "neteq/delay_manager_unittest.cc",
2022 "neteq/delay_peak_detector_unittest.cc",
2023 "neteq/dsp_helper_unittest.cc",
2024 "neteq/dtmf_buffer_unittest.cc",
2025 "neteq/dtmf_tone_generator_unittest.cc",
2026 "neteq/expand_unittest.cc",
2027 "neteq/merge_unittest.cc",
2028 "neteq/mock/mock_audio_decoder.h",
2029 "neteq/mock/mock_buffer_level_filter.h",
2030 "neteq/mock/mock_decoder_database.h",
2031 "neteq/mock/mock_delay_manager.h",
2032 "neteq/mock/mock_delay_peak_detector.h",
2033 "neteq/mock/mock_dtmf_buffer.h",
2034 "neteq/mock/mock_dtmf_tone_generator.h",
2035 "neteq/mock/mock_expand.h",
2036 "neteq/mock/mock_external_decoder_pcm16b.h",
2037 "neteq/mock/mock_packet_buffer.h",
2038 "neteq/mock/mock_red_payload_splitter.h",
2039 "neteq/nack_tracker_unittest.cc",
2040 "neteq/neteq_external_decoder_unittest.cc",
2041 "neteq/neteq_impl_unittest.cc",
2042 "neteq/neteq_network_stats_unittest.cc",
2043 "neteq/neteq_stereo_unittest.cc",
2044 "neteq/neteq_unittest.cc",
2045 "neteq/normal_unittest.cc",
2046 "neteq/packet_buffer_unittest.cc",
2047 "neteq/post_decode_vad_unittest.cc",
2048 "neteq/random_vector_unittest.cc",
2049 "neteq/red_payload_splitter_unittest.cc",
2050 "neteq/sync_buffer_unittest.cc",
2051 "neteq/tick_timer_unittest.cc",
2052 "neteq/time_stretch_unittest.cc",
2053 "neteq/timestamp_scaler_unittest.cc",
2054 "neteq/tools/input_audio_file_unittest.cc",
2055 "neteq/tools/packet_unittest.cc",
2056 ]
2057
2058 deps = [
2059 ":acm_receive_test",
2060 ":acm_send_test",
2061 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08002062 ":audio_coding_module_typedefs",
ehmaldonado36268652017-01-19 08:27:11 -08002063 ":audio_encoder_interface",
2064 ":audio_format_conversion",
2065 ":audio_network_adaptor",
ehmaldonado36268652017-01-19 08:27:11 -08002066 ":cng",
2067 ":g711",
2068 ":ilbc",
kwiberga6ca5182017-01-30 05:28:54 -08002069 ":isac",
ehmaldonado36268652017-01-19 08:27:11 -08002070 ":isac_c",
2071 ":isac_fix",
kwiberg087bd342017-02-10 08:15:44 -08002072 ":legacy_encoded_audio_frame",
ehmaldonado36268652017-01-19 08:27:11 -08002073 ":neteq",
2074 ":neteq_test_support",
2075 ":neteq_unittest_tools",
2076 ":pcm16b",
2077 ":red",
2078 ":rent_a_codec",
2079 ":webrtc_opus",
2080 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08002081 "../../api/audio_codecs:audio_codecs_api",
2082 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado36268652017-01-19 08:27:11 -08002083 "../../base:rtc_base",
2084 "../../base:rtc_base_approved",
2085 "../../base:rtc_base_tests_utils",
2086 "../../common_audio",
2087 "../../system_wrappers:system_wrappers",
2088 "../../test:field_trial",
2089 "../../test:rtp_test_utils",
2090 "../../test:test_common",
2091 "../../test:test_support",
2092 "//testing/gmock",
2093 "//testing/gtest",
2094 "//third_party/gflags",
2095 ]
2096
2097 defines = audio_coding_defines
2098
2099 if (rtc_enable_protobuf) {
2100 defines += [
2101 "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP",
2102 "WEBRTC_NETEQ_UNITTEST_BITEXACT",
2103 ]
2104 deps += [
2105 ":ana_config_proto",
2106 ":neteq_unittest_proto",
2107 ]
2108 }
2109
2110 if (!build_with_chromium && is_clang) {
2111 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
2112 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
2113 }
2114 }
kjellanderfb114242016-06-13 00:19:48 -07002115}
kwiberg087bd342017-02-10 08:15:44 -08002116
2117# For backwards compatibility only! Use
2118# webrtc/api/audio_codecs:audio_codecs_api instead.
2119# TODO(kwiberg): Remove this.
2120rtc_source_set("audio_decoder_interface") {
2121 sources = [
2122 "codecs/audio_decoder.h",
2123 ]
2124 deps = [
2125 "../../api/audio_codecs:audio_codecs_api",
2126 ]
2127}
2128
2129# For backwards compatibility only! Use
2130# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2131# TODO(kwiberg): Remove this.
2132rtc_source_set("builtin_audio_decoder_factory") {
2133 sources = [
2134 "codecs/builtin_audio_decoder_factory.h",
2135 ]
2136 deps = [
2137 "../../api/audio_codecs:builtin_audio_decoder_factory",
2138 ]
2139}