blob: 67ed45307a57be341cc5fca57bda41c7aa476eb5 [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",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001162 "../../test:test_support",
1163 ]
1164 defines = audio_coding_defines
1165 if (is_win) {
1166 cflags = [
1167 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1168 "/wd4373", # virtual function override.
1169 ]
1170 }
1171 if (!build_with_chromium && is_clang) {
1172 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1173 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1174 }
1175 }
1176
ehmaldonado021eef32017-01-05 07:09:50 -08001177 rtc_source_set("audio_coding_perf_tests") {
1178 testonly = true
1179 sources = [
1180 "codecs/opus/opus_complexity_unittest.cc",
1181 "neteq/test/neteq_performance_unittest.cc",
1182 ]
1183 deps = [
1184 ":neteq_test_support",
1185 ":neteq_unittest_tools",
1186 ":webrtc_opus",
1187 "../..:webrtc_common",
1188 "../../base:rtc_base_approved",
1189 "../../system_wrappers:system_wrappers",
1190 "../../test:test_support",
1191 ]
1192 if (!build_with_chromium && is_clang) {
1193 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1194 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1195 }
1196 }
1197
ehmaldonado38a21322016-09-02 04:10:34 -07001198 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -07001199 testonly = true
1200 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001201 "acm2/acm_receive_test.cc",
1202 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001203 ]
1204
kjellanderfb114242016-06-13 00:19:48 -07001205 defines = audio_coding_defines
1206
1207 deps = audio_coding_deps + [
1208 ":audio_coding",
kjellander676e08f2016-12-07 08:23:27 -08001209 ":audio_format_conversion",
kwiberg087bd342017-02-10 08:15:44 -08001210 "../../api/audio_codecs:audio_codecs_api",
1211 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellanderfb114242016-06-13 00:19:48 -07001212 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001213 "../../base:rtc_base_approved",
1214 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001215 "//testing/gtest",
1216 ]
1217 }
1218
ehmaldonado38a21322016-09-02 04:10:34 -07001219 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -07001220 testonly = true
1221 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001222 "acm2/acm_send_test.cc",
1223 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001224 ]
1225
kjellanderfb114242016-06-13 00:19:48 -07001226 defines = audio_coding_defines
1227
1228 deps = audio_coding_deps + [
1229 ":audio_coding",
kwiberg087bd342017-02-10 08:15:44 -08001230 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001231 ":audio_encoder_interface",
kjellanderfb114242016-06-13 00:19:48 -07001232 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001233 "../../base:rtc_base_approved",
1234 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001235 "//testing/gtest",
1236 ]
1237 }
1238
ehmaldonado38a21322016-09-02 04:10:34 -07001239 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -07001240 testonly = true
1241 sources = [
1242 "test/Channel.cc",
1243 "test/PCMFile.cc",
1244 "test/delay_test.cc",
1245 "test/utility.cc",
1246 ]
1247
aleloi333f2062016-07-28 01:21:29 -07001248 deps = [
1249 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001250 ":audio_coding_module_typedefs",
kwibergda2bf4e2016-10-24 13:47:09 -07001251 ":audio_format_conversion",
aleloi333f2062016-07-28 01:21:29 -07001252 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001253 "../../base:rtc_base_approved",
aleloi333f2062016-07-28 01:21:29 -07001254 "../../system_wrappers",
1255 "../../system_wrappers:system_wrappers_default",
1256 "../../test:test_support",
1257 "../rtp_rtcp",
1258 "//testing/gtest",
1259 "//third_party/gflags:gflags",
1260 ]
1261 } # delay_test
1262
ehmaldonado38a21322016-09-02 04:10:34 -07001263 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -07001264 testonly = true
1265 sources = [
1266 "test/Channel.cc",
1267 "test/PCMFile.cc",
1268 "test/insert_packet_with_timing.cc",
1269 ]
1270
kjellandere40a7ee2016-10-16 23:56:12 -07001271 if (!build_with_chromium && is_clang) {
1272 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001273 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -07001274 }
1275
1276 deps = [
1277 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001278 ":audio_format_conversion",
aleloi00730c72016-07-28 01:27:10 -07001279 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001280 "../../base:rtc_base_approved",
aleloi00730c72016-07-28 01:27:10 -07001281 "../../system_wrappers",
1282 "../../system_wrappers:system_wrappers_default",
1283 "../../test:test_support",
1284 "../rtp_rtcp",
1285 "//testing/gtest",
1286 "//third_party/gflags:gflags",
1287 ]
1288 } # insert_packet_with_timing
1289
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001290 audio_decoder_unittests_resources =
1291 [ "//resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -07001292
1293 if (is_ios) {
1294 bundle_data("audio_decoder_unittests_bundle_data") {
1295 testonly = true
1296 sources = audio_decoder_unittests_resources
1297 outputs = [
1298 "{{bundle_resources_dir}}/{{source_file_part}}",
1299 ]
1300 }
1301 }
1302
ehmaldonado38a21322016-09-02 04:10:34 -07001303 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -07001304 testonly = true
1305 sources = [
1306 "neteq/audio_decoder_unittest.cc",
1307 ]
1308
kjellandere40a7ee2016-10-16 23:56:12 -07001309 if (!build_with_chromium && is_clang) {
1310 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001311 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -07001312 }
1313
1314 deps = []
1315
1316 defines = neteq_defines
1317
1318 deps += audio_coding_deps
1319 deps += [
ehmaldonado87b8e9f2017-02-07 06:26:29 -08001320 ":ilbc",
charujainddf3e4a2016-08-01 07:49:42 -07001321 ":isac",
1322 ":isac_fix",
1323 ":neteq",
1324 ":neteq_unittest_tools",
kwiberg087bd342017-02-10 08:15:44 -08001325 "../../api/audio_codecs:audio_codecs_api",
kjellander6ceab082016-10-28 05:44:03 -07001326 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001327 "../../test:test_main",
charujainddf3e4a2016-08-01 07:49:42 -07001328 "//testing/gtest",
1329 ]
1330
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001331 data = audio_decoder_unittests_resources
1332
charujainddf3e4a2016-08-01 07:49:42 -07001333 if (is_android) {
1334 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001335 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001336 }
kjellander32c4a202016-08-30 02:53:49 -07001337 if (is_ios) {
1338 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001339 }
1340 } # audio_decoder_unittests
1341
kjellanderfb114242016-06-13 00:19:48 -07001342 if (rtc_enable_protobuf) {
1343 proto_library("neteq_unittest_proto") {
1344 sources = [
1345 "neteq/neteq_unittest.proto",
1346 ]
kjellandere3e902e2017-02-28 08:01:46 -08001347 proto_out_dir = "webrtc/modules/audio_coding/neteq"
kjellanderfb114242016-06-13 00:19:48 -07001348 }
henrik.lundin03153f12016-06-21 05:38:42 -07001349
kjellanderb62dbbe2016-09-23 00:38:52 -07001350 rtc_static_library("rtc_event_log_source") {
henrik.lundin03153f12016-06-21 05:38:42 -07001351 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001352
1353 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1354 # Needs call.h to be moved to webrtc/api first.
1355 check_includes = false
1356
henrik.lundin03153f12016-06-21 05:38:42 -07001357 sources = [
1358 "neteq/tools/rtc_event_log_source.cc",
1359 "neteq/tools/rtc_event_log_source.h",
1360 ]
1361
kjellandere40a7ee2016-10-16 23:56:12 -07001362 if (!build_with_chromium && is_clang) {
1363 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001364 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001365 }
1366
1367 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001368 "../../base:rtc_base_approved",
skvladcc91d282016-10-03 18:31:22 -07001369 "../../logging:rtc_event_log_parser",
henrik.lundin03153f12016-06-21 05:38:42 -07001370 ]
1371 public_deps = [
skvladcc91d282016-10-03 18:31:22 -07001372 "../../logging:rtc_event_log_proto",
henrik.lundin03153f12016-06-21 05:38:42 -07001373 ]
1374 }
1375
ehmaldonado38a21322016-09-02 04:10:34 -07001376 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001377 testonly = true
1378 defines = []
1379 deps = []
1380 sources = [
1381 "neteq/tools/neteq_rtpplay.cc",
1382 ]
1383
kjellandere40a7ee2016-10-16 23:56:12 -07001384 if (!build_with_chromium && is_clang) {
1385 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001386 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001387 }
1388
1389 if (is_win) {
1390 cflags = [
1391 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1392 "/wd4373", # virtual function override.
1393 ]
1394 }
1395
1396 deps += [
1397 ":neteq",
1398 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001399 "../..:webrtc_common",
1400 "../../base:rtc_base_approved",
henrik.lundin03153f12016-06-21 05:38:42 -07001401 "../../system_wrappers:system_wrappers_default",
1402 "../../test:test_support",
1403 "//third_party/gflags",
1404 ]
1405 }
kjellanderfb114242016-06-13 00:19:48 -07001406 }
1407
ehmaldonado38a21322016-09-02 04:10:34 -07001408 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001409 testonly = true
1410 defines = []
1411 deps = []
1412 sources = [
1413 "codecs/isac/fix/test/isac_speed_test.cc",
1414 "codecs/opus/opus_speed_test.cc",
1415 "codecs/tools/audio_codec_speed_test.cc",
1416 "codecs/tools/audio_codec_speed_test.h",
1417 ]
1418
kjellandere40a7ee2016-10-16 23:56:12 -07001419 if (!build_with_chromium && is_clang) {
1420 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001421 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001422 }
1423
1424 if (is_android) {
1425 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001426 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001427 }
1428
1429 deps += [
1430 ":isac_fix",
1431 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001432 "../..:webrtc_common",
1433 "../../base:rtc_base_approved",
aleloie6b60a42016-07-28 02:34:30 -07001434 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001435 "../../test:test_main",
kjellander6ceab082016-10-28 05:44:03 -07001436 "../audio_processing",
aleloie6b60a42016-07-28 02:34:30 -07001437 "//testing/gtest",
1438 ]
1439 }
1440
ehmaldonado38a21322016-09-02 04:10:34 -07001441 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001442 testonly = true
1443 sources = [
1444 "neteq/tools/neteq_external_decoder_test.cc",
1445 "neteq/tools/neteq_external_decoder_test.h",
1446 "neteq/tools/neteq_performance_test.cc",
1447 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001448 ]
1449
kjellandere40a7ee2016-10-16 23:56:12 -07001450 if (!build_with_chromium && is_clang) {
1451 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001452 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001453 }
1454
1455 deps = [
1456 ":neteq",
1457 ":neteq_unittest_tools",
1458 ":pcm16b",
kjellander676e08f2016-12-07 08:23:27 -08001459 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001460 "../../api/audio_codecs:audio_codecs_api",
1461 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001462 "../../base:rtc_base_approved",
1463 "../../system_wrappers",
1464 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001465 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001466 ]
1467 }
1468
ehmaldonado38a21322016-09-02 04:10:34 -07001469 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001470 testonly = true
1471 sources = [
1472 "neteq/tools/neteq_quality_test.cc",
1473 "neteq/tools/neteq_quality_test.h",
1474 ]
1475
kjellandere40a7ee2016-10-16 23:56:12 -07001476 if (!build_with_chromium && is_clang) {
1477 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001478 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001479 }
1480
1481 deps = [
1482 ":neteq",
1483 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001484 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001485 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001486 "../../base:rtc_base_approved",
1487 "../../test:test_support",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001488 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001489 "//third_party/gflags",
1490 ]
1491 }
1492
kjellanderfb114242016-06-13 00:19:48 -07001493 config("neteq_unittest_tools_config") {
1494 include_dirs = [ "tools" ]
1495 }
1496
ehmaldonado38a21322016-09-02 04:10:34 -07001497 rtc_source_set("neteq_unittest_tools") {
kjellanderfb114242016-06-13 00:19:48 -07001498 testonly = true
1499 sources = [
1500 "neteq/tools/audio_checksum.h",
1501 "neteq/tools/audio_loop.cc",
1502 "neteq/tools/audio_loop.h",
aleloi0e0be0a2016-08-10 04:55:20 -07001503 "neteq/tools/audio_sink.cc",
kjellanderfb114242016-06-13 00:19:48 -07001504 "neteq/tools/audio_sink.h",
1505 "neteq/tools/constant_pcm_packet_source.cc",
1506 "neteq/tools/constant_pcm_packet_source.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001507 "neteq/tools/fake_decode_from_file.cc",
1508 "neteq/tools/fake_decode_from_file.h",
kjellanderfb114242016-06-13 00:19:48 -07001509 "neteq/tools/input_audio_file.cc",
1510 "neteq/tools/input_audio_file.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001511 "neteq/tools/neteq_input.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001512 "neteq/tools/neteq_replacement_input.cc",
1513 "neteq/tools/neteq_replacement_input.h",
kjellanderfb114242016-06-13 00:19:48 -07001514 "neteq/tools/output_audio_file.h",
1515 "neteq/tools/output_wav_file.h",
1516 "neteq/tools/packet.cc",
1517 "neteq/tools/packet.h",
kwibergb8e56ee2016-08-29 06:37:33 -07001518 "neteq/tools/packet_source.cc",
kjellanderfb114242016-06-13 00:19:48 -07001519 "neteq/tools/packet_source.h",
1520 "neteq/tools/resample_input_audio_file.cc",
1521 "neteq/tools/resample_input_audio_file.h",
1522 "neteq/tools/rtp_file_source.cc",
1523 "neteq/tools/rtp_file_source.h",
1524 "neteq/tools/rtp_generator.cc",
1525 "neteq/tools/rtp_generator.h",
1526 ]
1527
ehmaldonadoe9cc6862016-09-05 06:10:18 -07001528 public_configs = [ ":neteq_unittest_tools_config" ]
kjellanderfb114242016-06-13 00:19:48 -07001529
kjellandere40a7ee2016-10-16 23:56:12 -07001530 if (!build_with_chromium && is_clang) {
1531 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001532 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001533 }
1534
1535 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001536 ":audio_encoder_interface",
1537 ":pcm16b",
1538 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001539 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001540 "../../base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -07001541 "../../common_audio",
1542 "../../test:rtp_test_utils",
1543 "../rtp_rtcp",
1544 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001545
kjellander676e08f2016-12-07 08:23:27 -08001546 public_deps = [
1547 ":neteq_test_minimal",
1548 ]
1549
henrik.lundine8a77e32016-06-22 06:34:03 -07001550 if (rtc_enable_protobuf) {
ehmaldonado36268652017-01-19 08:27:11 -08001551 sources += [
1552 "neteq/tools/neteq_packet_source_input.cc",
1553 "neteq/tools/neteq_packet_source_input.h",
1554 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001555 deps += [ ":rtc_event_log_source" ]
1556 }
kjellanderfb114242016-06-13 00:19:48 -07001557 }
aleloi3022a342016-07-26 06:36:03 -07001558
ehmaldonado38a21322016-09-02 04:10:34 -07001559 rtc_source_set("neteq_test_tools") {
aleloi3022a342016-07-26 06:36:03 -07001560 testonly = true
1561 sources = [
1562 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1563 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1564 "neteq/test/NETEQTEST_RTPpacket.cc",
1565 "neteq/test/NETEQTEST_RTPpacket.h",
1566 ]
1567
1568 deps = [
1569 ":cng",
1570 ":g711",
1571 ":g722",
1572 ":ilbc",
1573 ":isac",
1574 ":pcm16b",
1575 "../..:webrtc_common",
1576 "//testing/gtest",
1577 ]
1578
1579 include_dirs = [
1580 "neteq/include",
1581 "neteq/test",
1582 "../../",
1583 ]
1584
1585 if (is_win) {
1586 cflags = [
1587 # Disable warnings to enable Win64 build, issue 1323.
1588 "/wd4267", # size_t to int truncation
1589 ]
1590 }
1591 }
aleloi47bded42016-07-26 06:46:19 -07001592
aleloi82667732016-08-02 01:45:50 -07001593 config("RTPencode_config") {
1594 defines = [
1595 "CODEC_ILBC",
1596 "CODEC_PCM16B",
1597 "CODEC_G711",
1598 "CODEC_G722",
1599 "CODEC_ISAC",
1600 "CODEC_PCM16B_WB",
1601 "CODEC_ISAC_SWB",
1602 "CODEC_PCM16B_32KHZ",
1603 "CODEC_PCM16B_48KHZ",
1604 "CODEC_CNGCODEC8",
1605 "CODEC_CNGCODEC16",
1606 "CODEC_CNGCODEC32",
1607 "CODEC_ATEVENT_DECODE",
1608 "CODEC_RED",
1609 "CODEC_OPUS",
1610 ]
1611 }
1612
ehmaldonado38a21322016-09-02 04:10:34 -07001613 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001614 testonly = true
1615
1616 deps = [
1617 # TODO(hlundin): Make RTPencode use ACM to encode files.
1618 ":cng",
1619 ":g711",
1620 ":g722",
1621 ":ilbc",
1622 ":isac",
kjellander676e08f2016-12-07 08:23:27 -08001623 ":neteq",
aleloi82667732016-08-02 01:45:50 -07001624 ":neteq_test_tools",
1625 ":pcm16b",
1626 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001627 "../..:webrtc_common",
1628 "../../base:rtc_base_approved",
aleloi82667732016-08-02 01:45:50 -07001629 "../../common_audio",
1630 ]
1631
1632 configs += [ ":RTPencode_config" ]
1633
1634 sources = [
1635 "neteq/test/RTPencode.cc",
1636 ]
1637
1638 include_dirs = [
1639 "neteq/include",
1640 "neteq/test",
1641 ]
1642
1643 if (is_win) {
1644 cflags = [
1645 # Disable warnings to enable Win64 build, issue 1323.
1646 "/wd4267", # size_t to int truncation
1647 ]
1648 }
1649 }
1650
ehmaldonado38a21322016-09-02 04:10:34 -07001651 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001652 testonly = true
1653
1654 sources = [
1655 "neteq/test/RTPchange.cc",
1656 ]
1657
1658 deps = [
1659 ":neteq_test_tools",
1660 ]
1661 }
1662
ehmaldonado38a21322016-09-02 04:10:34 -07001663 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001664 testonly = true
1665
1666 sources = [
1667 "neteq/tools/rtpcat.cc",
1668 ]
1669
1670 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001671 "../../base:rtc_base_approved",
aleloi5556dcb2016-08-02 04:27:25 -07001672 "../../system_wrappers:system_wrappers_default",
1673 "../../test:rtp_test_utils",
1674 "//testing/gtest",
1675 ]
1676 }
1677
ehmaldonado38a21322016-09-02 04:10:34 -07001678 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001679 testonly = true
1680
1681 sources = [
1682 "neteq/test/RTPtimeshift.cc",
1683 ]
1684
1685 deps = [
1686 ":neteq_test_tools",
kjellander676e08f2016-12-07 08:23:27 -08001687 "../../test:test_support",
aleloi5a746502016-08-02 06:06:33 -07001688 "//testing/gtest",
1689 ]
1690 }
1691
ehmaldonado38a21322016-09-02 04:10:34 -07001692 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001693 testonly = true
1694 deps = [
1695 "../..:webrtc_common",
kthelgason29a44e32016-09-27 03:52:02 -07001696 "../../base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001697 "../../test:test_support",
aleloi17dfa742016-08-03 01:17:25 -07001698 "//testing/gtest",
1699 ]
1700 sources = [
1701 "neteq/test/RTPjitter.cc",
1702 ]
1703 }
1704
ehmaldonado38a21322016-09-02 04:10:34 -07001705 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001706 testonly = true
1707
1708 sources = [
1709 "neteq/tools/rtp_analyze.cc",
1710 ]
1711
1712 deps = [
1713 ":neteq",
1714 ":neteq_unittest_tools",
1715 ":pcm16b",
1716 "../../system_wrappers:system_wrappers_default",
1717 "//testing/gtest",
1718 "//third_party/gflags:gflags",
1719 ]
1720
kjellandere40a7ee2016-10-16 23:56:12 -07001721 if (!build_with_chromium && is_clang) {
1722 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001723 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001724 }
1725 }
aleloi630c6d52016-08-10 02:11:30 -07001726
ehmaldonado38a21322016-09-02 04:10:34 -07001727 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001728 testonly = true
1729
1730 sources = [
1731 "neteq/test/neteq_opus_quality_test.cc",
1732 ]
1733
1734 deps = [
1735 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001736 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001737 ":neteq_unittest_tools",
aleloi630c6d52016-08-10 02:11:30 -07001738 ":webrtc_opus",
ehmaldonado26bddb92016-11-30 06:12:01 -08001739 "../../test:test_main",
aleloi630c6d52016-08-10 02:11:30 -07001740 "//testing/gtest",
1741 "//third_party/gflags",
1742 ]
aleloi630c6d52016-08-10 02:11:30 -07001743 }
aleloi116fd612016-08-10 04:16:36 -07001744
ehmaldonado38a21322016-09-02 04:10:34 -07001745 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001746 testonly = true
1747
1748 sources = [
1749 "neteq/test/neteq_speed_test.cc",
1750 ]
1751
1752 deps = [
1753 ":neteq",
1754 ":neteq_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001755 "../..:webrtc_common",
aleloi116fd612016-08-10 04:16:36 -07001756 "../../system_wrappers:system_wrappers_default",
1757 "../../test:test_support",
1758 "//third_party/gflags",
1759 ]
1760 }
aleloi63910122016-08-10 04:41:14 -07001761
ehmaldonado38a21322016-09-02 04:10:34 -07001762 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001763 testonly = true
1764
1765 sources = [
1766 "neteq/test/neteq_ilbc_quality_test.cc",
1767 ]
1768
1769 deps = [
1770 ":ilbc",
1771 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001772 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001773 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001774 "../..:webrtc_common",
1775 "../../base:rtc_base_approved",
aleloi0e0be0a2016-08-10 04:55:20 -07001776 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001777 "../../test:test_main",
aleloi0e0be0a2016-08-10 04:55:20 -07001778 "//testing/gtest",
1779 "//third_party/gflags",
1780 ]
1781 }
aleloi6df36dc2016-08-10 05:04:47 -07001782
ehmaldonado38a21322016-09-02 04:10:34 -07001783 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001784 testonly = true
1785
1786 sources = [
1787 "neteq/test/neteq_isac_quality_test.cc",
1788 ]
1789
1790 deps = [
1791 ":isac_fix",
1792 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001793 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001794 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001795 "../../test:test_main",
aleloi6df36dc2016-08-10 05:04:47 -07001796 "//testing/gtest",
1797 "//third_party/gflags",
1798 ]
1799 }
aleloic4ac7002016-08-10 05:06:27 -07001800
ehmaldonado38a21322016-09-02 04:10:34 -07001801 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001802 testonly = true
1803
1804 sources = [
1805 "neteq/test/neteq_pcmu_quality_test.cc",
1806 ]
1807
1808 deps = [
1809 ":g711",
1810 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001811 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001812 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001813 "../../test:test_main",
aleloic4ac7002016-08-10 05:06:27 -07001814 "//testing/gtest",
1815 "//third_party/gflags",
1816 ]
1817 }
aleloib7186d02016-08-16 01:47:16 -07001818
ehmaldonado38a21322016-09-02 04:10:34 -07001819 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001820 testonly = true
1821
1822 sources = [
1823 "codecs/isac/fix/test/kenny.cc",
1824 ]
1825
1826 deps = [
1827 ":isac_fix",
1828 "../../test:test_support",
1829 ]
1830
1831 if (is_win) {
1832 cflags = [
1833 # Disable warnings to enable Win64 build, issue 1323.
1834 "/wd4267", # size_t to int truncation
1835 ]
1836 }
1837 }
aleloi16f55a12016-08-23 08:08:23 -07001838
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001839 config("isac_test_warnings_config") {
1840 if (is_win && is_clang) {
1841 cflags = [
1842 # Disable warnings failing when compiling with Clang on Windows.
1843 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1844 "-Wno-format",
1845 ]
1846 }
1847 }
1848
kjellander7439f972016-12-05 22:47:46 -08001849 rtc_source_set("isac_test_util") {
1850 testonly = true
1851 sources = [
1852 "codecs/isac/main/util/utility.c",
1853 ]
1854 }
1855
ehmaldonado38a21322016-09-02 04:10:34 -07001856 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001857 testonly = true
1858
1859 sources = [
1860 "codecs/isac/main/test/simpleKenny.c",
ivoce51b41a2016-08-24 02:25:57 -07001861 ]
1862
1863 include_dirs = [
1864 "codecs/isac/main/include",
1865 "codecs/isac/main/test",
1866 "codecs/isac/main/util",
1867 ]
1868
1869 deps = [
1870 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001871 ":isac_test_util",
ivoc48052312016-08-25 04:43:45 -07001872 "../../base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001873 ]
1874
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001875 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001876 }
1877
ehmaldonado38a21322016-09-02 04:10:34 -07001878 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001879 testonly = true
1880
1881 sources = [
1882 "codecs/g711/test/testG711.cc",
1883 ]
1884
aleloi16f55a12016-08-23 08:08:23 -07001885 deps = [
1886 ":g711",
1887 ]
1888 }
aleloi9a117842016-08-23 08:36:10 -07001889
ehmaldonado38a21322016-09-02 04:10:34 -07001890 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001891 testonly = true
1892
1893 sources = [
1894 "codecs/g722/test/testG722.cc",
1895 ]
1896
aleloi9a117842016-08-23 08:36:10 -07001897 deps = [
1898 ":g722",
1899 "../..:webrtc_common",
1900 ]
1901 }
ivoc2c670db2016-08-24 06:11:18 -07001902
ehmaldonado38a21322016-09-02 04:10:34 -07001903 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07001904 testonly = true
1905
1906 sources = [
1907 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
aleloicfee2152016-08-29 04:09:19 -07001908 ]
1909
aleloicfee2152016-08-29 04:09:19 -07001910 deps = [
1911 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001912 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001913 "../../base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07001914 ]
1915
1916 include_dirs = [
1917 "codecs/isac/main/include",
1918 "codecs/isac/main/test",
1919 "codecs/isac/main/util",
1920 ]
1921 }
1922
ehmaldonado38a21322016-09-02 04:10:34 -07001923 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07001924 testonly = true
1925
1926 sources = [
1927 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
aleloicfee2152016-08-29 04:09:19 -07001928 ]
1929
aleloicfee2152016-08-29 04:09:19 -07001930 deps = [
1931 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001932 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001933 ]
1934
1935 include_dirs = [
1936 "codecs/isac/main/include",
1937 "codecs/isac/main/test",
1938 "codecs/isac/main/util",
1939 "../../common_audio/signal_processing/include",
1940 ]
1941 }
1942
ehmaldonado38a21322016-09-02 04:10:34 -07001943 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07001944 testonly = true
1945
1946 sources = [
1947 "codecs/ilbc/test/iLBC_test.c",
1948 ]
1949
aleloicfee2152016-08-29 04:09:19 -07001950 deps = [
1951 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07001952 ]
1953 }
1954
ehmaldonado38a21322016-09-02 04:10:34 -07001955 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07001956 testonly = true
1957
1958 sources = [
1959 "codecs/opus/opus_fec_test.cc",
1960 ]
1961
1962 deps = [
1963 ":webrtc_opus",
ivoc48052312016-08-25 04:43:45 -07001964 "../../base:rtc_base_approved",
ivoc2c670db2016-08-24 06:11:18 -07001965 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001966 "../../test:test_main",
ivoc2c670db2016-08-24 06:11:18 -07001967 "//testing/gtest",
1968 ]
1969
kjellandere40a7ee2016-10-16 23:56:12 -07001970 if (!build_with_chromium && is_clang) {
1971 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001972 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07001973 }
1974 }
ehmaldonado36268652017-01-19 08:27:11 -08001975
1976 rtc_source_set("audio_coding_unittests") {
1977 testonly = true
1978
1979 sources = [
1980 "acm2/acm_receiver_unittest.cc",
1981 "acm2/audio_coding_module_unittest.cc",
1982 "acm2/call_statistics_unittest.cc",
1983 "acm2/codec_manager_unittest.cc",
1984 "acm2/rent_a_codec_unittest.cc",
1985 "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc",
1986 "audio_network_adaptor/bitrate_controller_unittest.cc",
1987 "audio_network_adaptor/channel_controller_unittest.cc",
1988 "audio_network_adaptor/controller_manager_unittest.cc",
1989 "audio_network_adaptor/dtx_controller_unittest.cc",
minyue4b7c9522017-01-24 04:54:59 -08001990 "audio_network_adaptor/event_log_writer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08001991 "audio_network_adaptor/fec_controller_unittest.cc",
1992 "audio_network_adaptor/frame_length_controller_unittest.cc",
1993 "audio_network_adaptor/mock/mock_controller.h",
1994 "audio_network_adaptor/mock/mock_controller_manager.h",
kwiberg087bd342017-02-10 08:15:44 -08001995 "codecs/builtin_audio_decoder_factory_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08001996 "codecs/cng/audio_encoder_cng_unittest.cc",
1997 "codecs/cng/cng_unittest.cc",
1998 "codecs/ilbc/ilbc_unittest.cc",
1999 "codecs/isac/fix/source/filterbanks_unittest.cc",
2000 "codecs/isac/fix/source/filters_unittest.cc",
2001 "codecs/isac/fix/source/lpc_masking_model_unittest.cc",
2002 "codecs/isac/fix/source/transform_unittest.cc",
2003 "codecs/isac/main/source/audio_encoder_isac_unittest.cc",
2004 "codecs/isac/main/source/isac_unittest.cc",
2005 "codecs/isac/unittest.cc",
2006 "codecs/legacy_encoded_audio_frame_unittest.cc",
2007 "codecs/mock/mock_audio_encoder.cc",
2008 "codecs/opus/audio_encoder_opus_unittest.cc",
2009 "codecs/opus/opus_unittest.cc",
2010 "codecs/red/audio_encoder_copy_red_unittest.cc",
2011 "neteq/audio_multi_vector_unittest.cc",
2012 "neteq/audio_vector_unittest.cc",
2013 "neteq/background_noise_unittest.cc",
2014 "neteq/buffer_level_filter_unittest.cc",
2015 "neteq/comfort_noise_unittest.cc",
2016 "neteq/decision_logic_unittest.cc",
2017 "neteq/decoder_database_unittest.cc",
2018 "neteq/delay_manager_unittest.cc",
2019 "neteq/delay_peak_detector_unittest.cc",
2020 "neteq/dsp_helper_unittest.cc",
2021 "neteq/dtmf_buffer_unittest.cc",
2022 "neteq/dtmf_tone_generator_unittest.cc",
2023 "neteq/expand_unittest.cc",
2024 "neteq/merge_unittest.cc",
2025 "neteq/mock/mock_audio_decoder.h",
2026 "neteq/mock/mock_buffer_level_filter.h",
2027 "neteq/mock/mock_decoder_database.h",
2028 "neteq/mock/mock_delay_manager.h",
2029 "neteq/mock/mock_delay_peak_detector.h",
2030 "neteq/mock/mock_dtmf_buffer.h",
2031 "neteq/mock/mock_dtmf_tone_generator.h",
2032 "neteq/mock/mock_expand.h",
2033 "neteq/mock/mock_external_decoder_pcm16b.h",
2034 "neteq/mock/mock_packet_buffer.h",
2035 "neteq/mock/mock_red_payload_splitter.h",
2036 "neteq/nack_tracker_unittest.cc",
2037 "neteq/neteq_external_decoder_unittest.cc",
2038 "neteq/neteq_impl_unittest.cc",
2039 "neteq/neteq_network_stats_unittest.cc",
2040 "neteq/neteq_stereo_unittest.cc",
2041 "neteq/neteq_unittest.cc",
2042 "neteq/normal_unittest.cc",
2043 "neteq/packet_buffer_unittest.cc",
2044 "neteq/post_decode_vad_unittest.cc",
2045 "neteq/random_vector_unittest.cc",
2046 "neteq/red_payload_splitter_unittest.cc",
2047 "neteq/sync_buffer_unittest.cc",
2048 "neteq/tick_timer_unittest.cc",
2049 "neteq/time_stretch_unittest.cc",
2050 "neteq/timestamp_scaler_unittest.cc",
2051 "neteq/tools/input_audio_file_unittest.cc",
2052 "neteq/tools/packet_unittest.cc",
2053 ]
2054
2055 deps = [
2056 ":acm_receive_test",
2057 ":acm_send_test",
2058 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08002059 ":audio_coding_module_typedefs",
ehmaldonado36268652017-01-19 08:27:11 -08002060 ":audio_encoder_interface",
2061 ":audio_format_conversion",
2062 ":audio_network_adaptor",
ehmaldonado36268652017-01-19 08:27:11 -08002063 ":cng",
2064 ":g711",
2065 ":ilbc",
kwiberga6ca5182017-01-30 05:28:54 -08002066 ":isac",
ehmaldonado36268652017-01-19 08:27:11 -08002067 ":isac_c",
2068 ":isac_fix",
kwiberg087bd342017-02-10 08:15:44 -08002069 ":legacy_encoded_audio_frame",
ehmaldonado36268652017-01-19 08:27:11 -08002070 ":neteq",
2071 ":neteq_test_support",
2072 ":neteq_unittest_tools",
2073 ":pcm16b",
2074 ":red",
2075 ":rent_a_codec",
2076 ":webrtc_opus",
2077 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08002078 "../../api/audio_codecs:audio_codecs_api",
2079 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado36268652017-01-19 08:27:11 -08002080 "../../base:rtc_base",
2081 "../../base:rtc_base_approved",
2082 "../../base:rtc_base_tests_utils",
2083 "../../common_audio",
2084 "../../system_wrappers:system_wrappers",
2085 "../../test:field_trial",
2086 "../../test:rtp_test_utils",
2087 "../../test:test_common",
2088 "../../test:test_support",
2089 "//testing/gmock",
2090 "//testing/gtest",
2091 "//third_party/gflags",
2092 ]
2093
2094 defines = audio_coding_defines
2095
2096 if (rtc_enable_protobuf) {
2097 defines += [
2098 "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP",
2099 "WEBRTC_NETEQ_UNITTEST_BITEXACT",
2100 ]
2101 deps += [
2102 ":ana_config_proto",
2103 ":neteq_unittest_proto",
2104 ]
2105 }
2106
2107 if (!build_with_chromium && is_clang) {
2108 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
2109 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
2110 }
2111 }
kjellanderfb114242016-06-13 00:19:48 -07002112}
kwiberg087bd342017-02-10 08:15:44 -08002113
2114# For backwards compatibility only! Use
2115# webrtc/api/audio_codecs:audio_codecs_api instead.
2116# TODO(kwiberg): Remove this.
2117rtc_source_set("audio_decoder_interface") {
2118 sources = [
2119 "codecs/audio_decoder.h",
2120 ]
2121 deps = [
2122 "../../api/audio_codecs:audio_codecs_api",
2123 ]
2124}
2125
2126# For backwards compatibility only! Use
2127# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2128# TODO(kwiberg): Remove this.
2129rtc_source_set("builtin_audio_decoder_factory") {
2130 sources = [
2131 "codecs/builtin_audio_decoder_factory.h",
2132 ]
2133 deps = [
2134 "../../api/audio_codecs:builtin_audio_decoder_factory",
2135 ]
2136}