blob: 5ae3164b26a644e27ddd025f6066adf0b459fb0d [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
ossua1a040a2017-04-06 10:03:21 -070054rtc_source_set("audio_encoder_factory_interface") {
55 sources = [
56 "codecs/audio_encoder_factory.h",
57 ]
58 deps = [
59 ":audio_encoder_interface",
60 "../../api/audio_codecs:audio_codecs_api",
61 "../../base:rtc_base_approved",
62 ]
63}
64
65rtc_static_library("builtin_audio_encoder_factory") {
66 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
67 # Errors on cyclic dependency with :isac_fix if enabled.
68 check_includes = false
69 sources = [
70 "codecs/builtin_audio_encoder_factory.cc",
71 "codecs/builtin_audio_encoder_factory.h",
72 ]
73 deps = [
74 "../..:webrtc_common",
75 "../../base:rtc_base_approved",
76 ":audio_encoder_factory_interface",
77 ] + audio_codec_deps
78 defines = audio_codec_defines
79}
80
kwiberg087bd342017-02-10 08:15:44 -080081rtc_static_library("builtin_audio_decoder_factory_internal") {
kwibergda2bf4e2016-10-24 13:47:09 -070082 sources = [
kwiberg087bd342017-02-10 08:15:44 -080083 "codecs/builtin_audio_decoder_factory_internal.cc",
84 "codecs/builtin_audio_decoder_factory_internal.h",
kwibergc01c6a42016-04-28 14:23:32 -070085 ]
kwibergc01c6a42016-04-28 14:23:32 -070086 deps = [
87 "../..:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -080088 "../../base:rtc_base_approved",
kwiberg087bd342017-02-10 08:15:44 -080089 "../../api/audio_codecs:audio_codecs_api",
kwibergc01c6a42016-04-28 14:23:32 -070090 ] + audio_codec_deps
91 defines = audio_codec_defines
92}
93
kjellanderb62dbbe2016-09-23 00:38:52 -070094rtc_static_library("rent_a_codec") {
kwibergfce4a942015-10-27 11:40:24 -070095 sources = [
kjellander3e6db232015-11-26 04:44:54 -080096 "acm2/acm_codec_database.cc",
97 "acm2/acm_codec_database.h",
98 "acm2/rent_a_codec.cc",
99 "acm2/rent_a_codec.h",
kwibergfce4a942015-10-27 11:40:24 -0700100 ]
kjellander676e08f2016-12-07 08:23:27 -0800101 deps = [
kwiberg087bd342017-02-10 08:15:44 -0800102 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800103 "../..:webrtc_common",
104 "../../base:rtc_base_approved",
kwiberg65cb70d2017-03-03 06:16:28 -0800105 "../../system_wrappers",
106 ":audio_coding_module_typedefs",
107 ":audio_encoder_interface",
108 ":isac_common",
109 ":isac_fix_c",
110 ":neteq_decoder_enum",
kjellander676e08f2016-12-07 08:23:27 -0800111 ] + audio_codec_deps
kwiberg0edb05b2016-01-19 05:54:28 -0800112 defines = audio_codec_defines
kwibergfce4a942015-10-27 11:40:24 -0700113}
114
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000115config("audio_coding_config") {
116 include_dirs = [
kjellander3e6db232015-11-26 04:44:54 -0800117 "include",
Henrik Kjellanderff761fb2015-11-04 08:31:52 +0100118 "../include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000119 ]
120}
121
kwiberg65cb70d2017-03-03 06:16:28 -0800122rtc_source_set("audio_coding_module_typedefs") {
123 sources = [
124 "include/audio_coding_module_typedefs.h",
125 ]
126 deps = [
127 "../..:webrtc_common",
128 ]
129}
130
kjellanderb62dbbe2016-09-23 00:38:52 -0700131rtc_static_library("audio_coding") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000132 sources = [
kjellander3e6db232015-11-26 04:44:54 -0800133 "acm2/acm_receiver.cc",
134 "acm2/acm_receiver.h",
135 "acm2/acm_resampler.cc",
136 "acm2/acm_resampler.h",
137 "acm2/audio_coding_module.cc",
kjellander3e6db232015-11-26 04:44:54 -0800138 "acm2/call_statistics.cc",
139 "acm2/call_statistics.h",
140 "acm2/codec_manager.cc",
141 "acm2/codec_manager.h",
kjellander3e6db232015-11-26 04:44:54 -0800142 "include/audio_coding_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000143 ]
144
145 defines = []
146
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700147 public_configs = [ ":audio_coding_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148
kjellanderfb114242016-06-13 00:19:48 -0700149 if (rtc_include_opus) {
150 public_deps = [
151 ":webrtc_opus",
152 ]
153 }
154
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000155 if (is_win) {
156 cflags = [
157 # TODO(kjellander): Bug 261: fix this warning.
158 "/wd4373", # virtual function override.
159 ]
160 }
161
kjellanderfb114242016-06-13 00:19:48 -0700162 deps = audio_coding_deps + [
kwiberg087bd342017-02-10 08:15:44 -0800163 "../../api/audio_codecs:audio_codecs_api",
164 "../../api/audio_codecs:builtin_audio_decoder_factory",
kwiberg65cb70d2017-03-03 06:16:28 -0800165 ":audio_coding_module_typedefs",
166 ":audio_encoder_interface",
kwiberg0edb05b2016-01-19 05:54:28 -0800167 ":neteq",
168 ":rent_a_codec",
kjellander676e08f2016-12-07 08:23:27 -0800169 "../../base:rtc_base_approved",
skvladcc91d282016-10-03 18:31:22 -0700170 "../../logging:rtc_event_log_api",
kwiberg0edb05b2016-01-19 05:54:28 -0800171 ]
kjellanderfb114242016-06-13 00:19:48 -0700172 defines = audio_coding_defines
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000173}
174
kwiberg087bd342017-02-10 08:15:44 -0800175rtc_static_library("legacy_encoded_audio_frame") {
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000176 sources = [
ossu7f40ba42016-09-21 05:50:37 -0700177 "codecs/legacy_encoded_audio_frame.cc",
178 "codecs/legacy_encoded_audio_frame.h",
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000179 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200180 deps = [
kwiberg087bd342017-02-10 08:15:44 -0800181 "../../api/audio_codecs:audio_codecs_api",
kjellander4e7f6c12016-04-25 21:59:50 -0700182 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200183 ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000184}
185
kjellanderb62dbbe2016-09-23 00:38:52 -0700186rtc_static_library("audio_encoder_interface") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000187 sources = [
188 "codecs/audio_encoder.cc",
189 "codecs/audio_encoder.h",
190 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200191 deps = [
192 "../..:webrtc_common",
kjellander4e7f6c12016-04-25 21:59:50 -0700193 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200194 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000195}
196
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000197config("cng_config") {
198 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000199 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000200 "codecs/cng/include",
201 ]
202}
203
kjellanderb62dbbe2016-09-23 00:38:52 -0700204rtc_static_library("cng") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000205 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000206 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100207 "codecs/cng/audio_encoder_cng.h",
ossu97ba30e2016-04-25 07:55:58 -0700208 "codecs/cng/webrtc_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100209 "codecs/cng/webrtc_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000210 ]
211
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700212 public_configs = [ ":cng_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000213
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000214 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000215 ":audio_encoder_interface",
kjellander676e08f2016-12-07 08:23:27 -0800216 "../..:webrtc_common",
217 "../../base:rtc_base_approved",
Henrik Lundind048aa02015-12-03 17:47:21 +0100218 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000219 ]
220}
221
222config("red_config") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200223 include_dirs = [ "codecs/red" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000224}
225
kjellanderb62dbbe2016-09-23 00:38:52 -0700226rtc_static_library("red") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000227 sources = [
228 "codecs/red/audio_encoder_copy_red.cc",
229 "codecs/red/audio_encoder_copy_red.h",
230 ]
231
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700232 public_configs = [ ":red_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000233
234 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000235 ":audio_encoder_interface",
kjellander676e08f2016-12-07 08:23:27 -0800236 "../../base:rtc_base_approved",
Henrik Lundind048aa02015-12-03 17:47:21 +0100237 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000238 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000239}
240
241config("g711_config") {
242 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000243 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000244 "codecs/g711/include",
245 ]
246}
247
kjellanderb62dbbe2016-09-23 00:38:52 -0700248rtc_static_library("g711") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000249 sources = [
kwiberg6faf5be2015-09-22 06:16:51 -0700250 "codecs/g711/audio_decoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100251 "codecs/g711/audio_decoder_pcm.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000252 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100253 "codecs/g711/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000254 ]
255
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700256 public_configs = [ ":g711_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000257
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200258 deps = [
259 ":audio_encoder_interface",
kwiberg087bd342017-02-10 08:15:44 -0800260 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800261 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800262 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800263 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200264 ]
kjellander7439f972016-12-05 22:47:46 -0800265 public_deps = [
266 ":g711_c",
267 ]
268}
269
270rtc_source_set("g711_c") {
271 visibility = [ ":*" ] # Only targets in this file can depend on this.
272 sources = [
273 "codecs/g711/g711.c",
274 "codecs/g711/g711.h",
275 "codecs/g711/g711_interface.c",
276 "codecs/g711/g711_interface.h",
277 ]
kjellander676e08f2016-12-07 08:23:27 -0800278 deps = [
279 "../..:webrtc_common",
280 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000281}
282
283config("g722_config") {
284 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000285 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000286 "codecs/g722/include",
287 ]
288}
289
kjellanderb62dbbe2016-09-23 00:38:52 -0700290rtc_static_library("g722") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000291 sources = [
kwibergada4c132015-09-17 03:12:35 -0700292 "codecs/g722/audio_decoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100293 "codecs/g722/audio_decoder_g722.h",
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000294 "codecs/g722/audio_encoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100295 "codecs/g722/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000296 ]
297
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700298 public_configs = [ ":g722_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000299
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200300 deps = [
301 ":audio_encoder_interface",
kwiberg087bd342017-02-10 08:15:44 -0800302 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800303 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800304 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800305 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200306 ]
kjellander7439f972016-12-05 22:47:46 -0800307 public_deps = [
308 ":g722_c",
309 ]
310}
311
312rtc_source_set("g722_c") {
313 visibility = [ ":*" ] # Only targets in this file can depend on this.
314 sources = [
315 "codecs/g722/g722_decode.c",
316 "codecs/g722/g722_enc_dec.h",
317 "codecs/g722/g722_encode.c",
318 "codecs/g722/g722_interface.c",
319 "codecs/g722/g722_interface.h",
320 ]
kjellander676e08f2016-12-07 08:23:27 -0800321 deps = [
322 "../..:webrtc_common",
323 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000324}
325
326config("ilbc_config") {
327 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000328 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100329 "codecs/ilbc/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000330 ]
331}
332
kjellanderb62dbbe2016-09-23 00:38:52 -0700333rtc_static_library("ilbc") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000334 sources = [
kwibergfff9f172015-09-16 21:26:32 -0700335 "codecs/ilbc/audio_decoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100336 "codecs/ilbc/audio_decoder_ilbc.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200337 "codecs/ilbc/audio_encoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100338 "codecs/ilbc/audio_encoder_ilbc.h",
kjellander7439f972016-12-05 22:47:46 -0800339 ]
340
341 public_configs = [ ":ilbc_config" ]
342
343 deps = [
kjellander7439f972016-12-05 22:47:46 -0800344 ":audio_encoder_interface",
kwiberg087bd342017-02-10 08:15:44 -0800345 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800346 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800347 "../../api/audio_codecs:audio_codecs_api",
kjellander7439f972016-12-05 22:47:46 -0800348 "../../base:rtc_base_approved",
349 "../../common_audio",
350 ]
351 public_deps = [
352 ":ilbc_c",
353 ]
354}
355
356rtc_source_set("ilbc_c") {
357 visibility = [ ":*" ] # Only targets in this file can depend on this.
358 sources = [
359 "codecs/ilbc/abs_quant.c",
360 "codecs/ilbc/abs_quant.h",
361 "codecs/ilbc/abs_quant_loop.c",
362 "codecs/ilbc/abs_quant_loop.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000363 "codecs/ilbc/augmented_cb_corr.c",
364 "codecs/ilbc/augmented_cb_corr.h",
365 "codecs/ilbc/bw_expand.c",
366 "codecs/ilbc/bw_expand.h",
367 "codecs/ilbc/cb_construct.c",
368 "codecs/ilbc/cb_construct.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200369 "codecs/ilbc/cb_mem_energy.c",
370 "codecs/ilbc/cb_mem_energy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000371 "codecs/ilbc/cb_mem_energy_augmentation.c",
372 "codecs/ilbc/cb_mem_energy_augmentation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000373 "codecs/ilbc/cb_mem_energy_calc.c",
374 "codecs/ilbc/cb_mem_energy_calc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000375 "codecs/ilbc/cb_search.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200376 "codecs/ilbc/cb_search.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000377 "codecs/ilbc/cb_search_core.c",
378 "codecs/ilbc/cb_search_core.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000379 "codecs/ilbc/cb_update_best_index.c",
380 "codecs/ilbc/cb_update_best_index.h",
381 "codecs/ilbc/chebyshev.c",
382 "codecs/ilbc/chebyshev.h",
383 "codecs/ilbc/comp_corr.c",
384 "codecs/ilbc/comp_corr.h",
385 "codecs/ilbc/constants.c",
386 "codecs/ilbc/constants.h",
387 "codecs/ilbc/create_augmented_vec.c",
388 "codecs/ilbc/create_augmented_vec.h",
389 "codecs/ilbc/decode.c",
390 "codecs/ilbc/decode.h",
391 "codecs/ilbc/decode_residual.c",
392 "codecs/ilbc/decode_residual.h",
393 "codecs/ilbc/decoder_interpolate_lsf.c",
394 "codecs/ilbc/decoder_interpolate_lsf.h",
395 "codecs/ilbc/defines.h",
396 "codecs/ilbc/do_plc.c",
397 "codecs/ilbc/do_plc.h",
398 "codecs/ilbc/encode.c",
399 "codecs/ilbc/encode.h",
400 "codecs/ilbc/energy_inverse.c",
401 "codecs/ilbc/energy_inverse.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200402 "codecs/ilbc/enh_upsample.c",
403 "codecs/ilbc/enh_upsample.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000404 "codecs/ilbc/enhancer.c",
405 "codecs/ilbc/enhancer.h",
406 "codecs/ilbc/enhancer_interface.c",
407 "codecs/ilbc/enhancer_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000408 "codecs/ilbc/filtered_cb_vecs.c",
409 "codecs/ilbc/filtered_cb_vecs.h",
410 "codecs/ilbc/frame_classify.c",
411 "codecs/ilbc/frame_classify.h",
412 "codecs/ilbc/gain_dequant.c",
413 "codecs/ilbc/gain_dequant.h",
414 "codecs/ilbc/gain_quant.c",
415 "codecs/ilbc/gain_quant.h",
416 "codecs/ilbc/get_cd_vec.c",
417 "codecs/ilbc/get_cd_vec.h",
418 "codecs/ilbc/get_lsp_poly.c",
419 "codecs/ilbc/get_lsp_poly.h",
420 "codecs/ilbc/get_sync_seq.c",
421 "codecs/ilbc/get_sync_seq.h",
422 "codecs/ilbc/hp_input.c",
423 "codecs/ilbc/hp_input.h",
424 "codecs/ilbc/hp_output.c",
425 "codecs/ilbc/hp_output.h",
426 "codecs/ilbc/ilbc.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100427 "codecs/ilbc/ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000428 "codecs/ilbc/index_conv_dec.c",
429 "codecs/ilbc/index_conv_dec.h",
430 "codecs/ilbc/index_conv_enc.c",
431 "codecs/ilbc/index_conv_enc.h",
432 "codecs/ilbc/init_decode.c",
433 "codecs/ilbc/init_decode.h",
434 "codecs/ilbc/init_encode.c",
435 "codecs/ilbc/init_encode.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000436 "codecs/ilbc/interpolate.c",
437 "codecs/ilbc/interpolate.h",
438 "codecs/ilbc/interpolate_samples.c",
439 "codecs/ilbc/interpolate_samples.h",
440 "codecs/ilbc/lpc_encode.c",
441 "codecs/ilbc/lpc_encode.h",
442 "codecs/ilbc/lsf_check.c",
443 "codecs/ilbc/lsf_check.h",
444 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
445 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
446 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
447 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
448 "codecs/ilbc/lsf_to_lsp.c",
449 "codecs/ilbc/lsf_to_lsp.h",
450 "codecs/ilbc/lsf_to_poly.c",
451 "codecs/ilbc/lsf_to_poly.h",
452 "codecs/ilbc/lsp_to_lsf.c",
453 "codecs/ilbc/lsp_to_lsf.h",
454 "codecs/ilbc/my_corr.c",
455 "codecs/ilbc/my_corr.h",
456 "codecs/ilbc/nearest_neighbor.c",
457 "codecs/ilbc/nearest_neighbor.h",
458 "codecs/ilbc/pack_bits.c",
459 "codecs/ilbc/pack_bits.h",
460 "codecs/ilbc/poly_to_lsf.c",
461 "codecs/ilbc/poly_to_lsf.h",
462 "codecs/ilbc/poly_to_lsp.c",
463 "codecs/ilbc/poly_to_lsp.h",
464 "codecs/ilbc/refiner.c",
465 "codecs/ilbc/refiner.h",
466 "codecs/ilbc/simple_interpolate_lsf.c",
467 "codecs/ilbc/simple_interpolate_lsf.h",
468 "codecs/ilbc/simple_lpc_analysis.c",
469 "codecs/ilbc/simple_lpc_analysis.h",
470 "codecs/ilbc/simple_lsf_dequant.c",
471 "codecs/ilbc/simple_lsf_dequant.h",
472 "codecs/ilbc/simple_lsf_quant.c",
473 "codecs/ilbc/simple_lsf_quant.h",
474 "codecs/ilbc/smooth.c",
475 "codecs/ilbc/smooth.h",
476 "codecs/ilbc/smooth_out_data.c",
477 "codecs/ilbc/smooth_out_data.h",
478 "codecs/ilbc/sort_sq.c",
479 "codecs/ilbc/sort_sq.h",
480 "codecs/ilbc/split_vq.c",
481 "codecs/ilbc/split_vq.h",
482 "codecs/ilbc/state_construct.c",
483 "codecs/ilbc/state_construct.h",
484 "codecs/ilbc/state_search.c",
485 "codecs/ilbc/state_search.h",
486 "codecs/ilbc/swap_bytes.c",
487 "codecs/ilbc/swap_bytes.h",
488 "codecs/ilbc/unpack_bits.c",
489 "codecs/ilbc/unpack_bits.h",
490 "codecs/ilbc/vq3.c",
491 "codecs/ilbc/vq3.h",
492 "codecs/ilbc/vq4.c",
493 "codecs/ilbc/vq4.h",
494 "codecs/ilbc/window32_w32.c",
495 "codecs/ilbc/window32_w32.h",
496 "codecs/ilbc/xcorr_coef.c",
497 "codecs/ilbc/xcorr_coef.h",
498 ]
499
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700500 public_configs = [ ":ilbc_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000501
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000502 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800503 ":audio_encoder_interface",
504 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800505 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800506 "../../base:rtc_base_approved",
Henrik Lundind048aa02015-12-03 17:47:21 +0100507 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000508 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000509}
510
kjellanderb62dbbe2016-09-23 00:38:52 -0700511rtc_static_library("isac_common") {
kwiberg608c3cf2015-08-24 02:03:23 -0700512 sources = [
513 "codecs/isac/audio_encoder_isac_t.h",
514 "codecs/isac/audio_encoder_isac_t_impl.h",
515 "codecs/isac/locked_bandwidth_info.cc",
516 "codecs/isac/locked_bandwidth_info.h",
517 ]
kjellander676e08f2016-12-07 08:23:27 -0800518 deps = [
519 ":audio_encoder_interface",
kwiberga6ca5182017-01-30 05:28:54 -0800520 "../..:webrtc_common",
ossua1a040a2017-04-06 10:03:21 -0700521 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800522 "../../base:rtc_base_approved",
523 ]
kwiberg608c3cf2015-08-24 02:03:23 -0700524}
525
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000526config("isac_config") {
527 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000528 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100529 "codecs/isac/main/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000530 ]
531}
532
kjellanderb62dbbe2016-09-23 00:38:52 -0700533rtc_static_library("isac") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000534 sources = [
kwiberga6ca5182017-01-30 05:28:54 -0800535 "codecs/isac/main/include/audio_decoder_isac.h",
536 "codecs/isac/main/include/audio_encoder_isac.h",
kjellander7439f972016-12-05 22:47:46 -0800537 "codecs/isac/main/source/audio_decoder_isac.cc",
538 "codecs/isac/main/source/audio_encoder_isac.cc",
539 ]
540
541 deps = [
kjellander7439f972016-12-05 22:47:46 -0800542 ":audio_encoder_interface",
543 ":isac_common",
kwiberg087bd342017-02-10 08:15:44 -0800544 "../../api/audio_codecs:audio_codecs_api",
kjellander7439f972016-12-05 22:47:46 -0800545 ]
546 public_deps = [
547 ":isac_c",
548 ]
549}
550
551rtc_static_library("isac_c") {
552 visibility = [ ":*" ] # Only targets in this file can depend on this.
553 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100554 "codecs/isac/main/include/isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000555 "codecs/isac/main/source/arith_routines.c",
556 "codecs/isac/main/source/arith_routines.h",
557 "codecs/isac/main/source/arith_routines_hist.c",
558 "codecs/isac/main/source/arith_routines_logist.c",
559 "codecs/isac/main/source/bandwidth_estimator.c",
560 "codecs/isac/main/source/bandwidth_estimator.h",
561 "codecs/isac/main/source/codec.h",
562 "codecs/isac/main/source/crc.c",
563 "codecs/isac/main/source/crc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000564 "codecs/isac/main/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200565 "codecs/isac/main/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000566 "codecs/isac/main/source/encode.c",
567 "codecs/isac/main/source/encode_lpc_swb.c",
568 "codecs/isac/main/source/encode_lpc_swb.h",
569 "codecs/isac/main/source/entropy_coding.c",
570 "codecs/isac/main/source/entropy_coding.h",
571 "codecs/isac/main/source/fft.c",
572 "codecs/isac/main/source/fft.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200573 "codecs/isac/main/source/filter_functions.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000574 "codecs/isac/main/source/filterbank_tables.c",
575 "codecs/isac/main/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200576 "codecs/isac/main/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000577 "codecs/isac/main/source/intialize.c",
578 "codecs/isac/main/source/isac.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200579 "codecs/isac/main/source/isac_float_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000580 "codecs/isac/main/source/lattice.c",
581 "codecs/isac/main/source/lpc_analysis.c",
582 "codecs/isac/main/source/lpc_analysis.h",
583 "codecs/isac/main/source/lpc_gain_swb_tables.c",
584 "codecs/isac/main/source/lpc_gain_swb_tables.h",
585 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
586 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
587 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
588 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
589 "codecs/isac/main/source/lpc_tables.c",
590 "codecs/isac/main/source/lpc_tables.h",
591 "codecs/isac/main/source/os_specific_inline.h",
592 "codecs/isac/main/source/pitch_estimator.c",
593 "codecs/isac/main/source/pitch_estimator.h",
594 "codecs/isac/main/source/pitch_filter.c",
595 "codecs/isac/main/source/pitch_gain_tables.c",
596 "codecs/isac/main/source/pitch_gain_tables.h",
597 "codecs/isac/main/source/pitch_lag_tables.c",
598 "codecs/isac/main/source/pitch_lag_tables.h",
599 "codecs/isac/main/source/settings.h",
600 "codecs/isac/main/source/spectrum_ar_model_tables.c",
601 "codecs/isac/main/source/spectrum_ar_model_tables.h",
602 "codecs/isac/main/source/structs.h",
603 "codecs/isac/main/source/transform.c",
604 ]
605
606 if (is_linux) {
607 libs = [ "m" ]
608 }
609
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700610 public_configs = [ ":isac_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000611
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000612 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800613 ":isac_common",
aleloicfee2152016-08-29 04:09:19 -0700614 "../..:webrtc_common",
615 "../../base:rtc_base_approved",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000616 "../../common_audio",
617 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000618}
619
620config("isac_fix_config") {
621 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000622 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100623 "codecs/isac/fix/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000624 ]
625}
626
kjellanderb62dbbe2016-09-23 00:38:52 -0700627rtc_static_library("isac_fix") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000628 sources = [
kjellander7439f972016-12-05 22:47:46 -0800629 "codecs/isac/fix/source/audio_decoder_isacfix.cc",
630 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
631 ]
632
633 public_configs = [ ":isac_fix_config" ]
634
635 deps = [
kjellander7439f972016-12-05 22:47:46 -0800636 ":audio_encoder_interface",
637 ":isac_common",
kwiberg087bd342017-02-10 08:15:44 -0800638 "../../api/audio_codecs:audio_codecs_api",
kjellander7439f972016-12-05 22:47:46 -0800639 "../../common_audio",
640 "../../system_wrappers",
641 ]
642 public_deps = [
643 ":isac_fix_c",
644 ]
645
646 if (rtc_build_with_neon) {
647 deps += [ ":isac_neon" ]
648 }
649}
650
kwiberga6ca5182017-01-30 05:28:54 -0800651rtc_source_set("isac_fix_common") {
652 visibility = [ ":*" ] # Only targets in this file can depend on this.
653 sources = [
654 "codecs/isac/fix/source/codec.h",
655 "codecs/isac/fix/source/fft.c",
656 "codecs/isac/fix/source/fft.h",
657 "codecs/isac/fix/source/settings.h",
658 ]
659 public_configs = [ ":isac_fix_config" ]
660}
kjellander676e08f2016-12-07 08:23:27 -0800661
kwiberga6ca5182017-01-30 05:28:54 -0800662rtc_source_set("isac_fix_c") {
kjellander7439f972016-12-05 22:47:46 -0800663 visibility = [ ":*" ] # Only targets in this file can depend on this.
664 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100665 "codecs/isac/fix/include/audio_decoder_isacfix.h",
666 "codecs/isac/fix/include/audio_encoder_isacfix.h",
667 "codecs/isac/fix/include/isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000668 "codecs/isac/fix/source/arith_routines.c",
669 "codecs/isac/fix/source/arith_routines_hist.c",
670 "codecs/isac/fix/source/arith_routines_logist.c",
671 "codecs/isac/fix/source/arith_routins.h",
672 "codecs/isac/fix/source/bandwidth_estimator.c",
673 "codecs/isac/fix/source/bandwidth_estimator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000674 "codecs/isac/fix/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200675 "codecs/isac/fix/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000676 "codecs/isac/fix/source/decode_plc.c",
677 "codecs/isac/fix/source/encode.c",
678 "codecs/isac/fix/source/entropy_coding.c",
679 "codecs/isac/fix/source/entropy_coding.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000680 "codecs/isac/fix/source/filterbank_tables.c",
681 "codecs/isac/fix/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200682 "codecs/isac/fix/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000683 "codecs/isac/fix/source/filters.c",
684 "codecs/isac/fix/source/initialize.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200685 "codecs/isac/fix/source/isac_fix_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000686 "codecs/isac/fix/source/isacfix.c",
687 "codecs/isac/fix/source/lattice.c",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700688 "codecs/isac/fix/source/lattice_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000689 "codecs/isac/fix/source/lpc_masking_model.c",
690 "codecs/isac/fix/source/lpc_masking_model.h",
691 "codecs/isac/fix/source/lpc_tables.c",
692 "codecs/isac/fix/source/lpc_tables.h",
693 "codecs/isac/fix/source/pitch_estimator.c",
694 "codecs/isac/fix/source/pitch_estimator.h",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700695 "codecs/isac/fix/source/pitch_estimator_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000696 "codecs/isac/fix/source/pitch_filter.c",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700697 "codecs/isac/fix/source/pitch_filter_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000698 "codecs/isac/fix/source/pitch_gain_tables.c",
699 "codecs/isac/fix/source/pitch_gain_tables.h",
700 "codecs/isac/fix/source/pitch_lag_tables.c",
701 "codecs/isac/fix/source/pitch_lag_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000702 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
703 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
704 "codecs/isac/fix/source/structs.h",
705 "codecs/isac/fix/source/transform.c",
706 "codecs/isac/fix/source/transform_tables.c",
707 ]
708
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700709 public_configs = [ ":isac_fix_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000710
kjellander676e08f2016-12-07 08:23:27 -0800711 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800712 ":audio_encoder_interface",
713 ":isac_common",
714 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800715 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800716 "../../base:rtc_base_approved",
717 "../../common_audio",
718 "../../system_wrappers",
719 ]
720
kwiberga6ca5182017-01-30 05:28:54 -0800721 public_deps = [
722 ":isac_fix_common",
723 ]
724
mbonadeie5dc3ce2017-01-25 05:34:46 -0800725 if (rtc_build_with_neon) {
726 deps += [ ":isac_neon" ]
727 }
728
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700729 if (current_cpu == "arm" && arm_version >= 7) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000730 sources += [
731 "codecs/isac/fix/source/lattice_armv7.S",
732 "codecs/isac/fix/source/pitch_filter_armv6.S",
733 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700734 sources -= [
735 "codecs/isac/fix/source/lattice_c.c",
736 "codecs/isac/fix/source/pitch_filter_c.c",
737 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000738 }
739
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000740 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000741 sources += [
742 "codecs/isac/fix/source/entropy_coding_mips.c",
743 "codecs/isac/fix/source/filters_mips.c",
744 "codecs/isac/fix/source/lattice_mips.c",
745 "codecs/isac/fix/source/pitch_estimator_mips.c",
746 "codecs/isac/fix/source/transform_mips.c",
747 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700748 sources -= [
749 "codecs/isac/fix/source/lattice_c.c",
750 "codecs/isac/fix/source/pitch_estimator_c.c",
751 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000752 if (mips_dsp_rev > 0) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200753 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000754 }
755 if (mips_dsp_rev > 1) {
756 sources += [
757 "codecs/isac/fix/source/lpc_masking_model_mips.c",
758 "codecs/isac/fix/source/pitch_filter_mips.c",
759 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200760 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000761 }
762 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000763}
764
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700765if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700766 rtc_static_library("isac_neon") {
Zhongwei Yaof242e662015-05-06 16:39:17 +0800767 sources = [
768 "codecs/isac/fix/source/entropy_coding_neon.c",
Zhongwei Yaob3cc77f2015-07-28 11:17:40 +0800769 "codecs/isac/fix/source/filterbanks_neon.c",
Zhongwei Yaof242e662015-05-06 16:39:17 +0800770 "codecs/isac/fix/source/filters_neon.c",
771 "codecs/isac/fix/source/lattice_neon.c",
772 "codecs/isac/fix/source/transform_neon.c",
773 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000774
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700775 if (current_cpu != "arm64") {
776 # Enable compilation for the NEON instruction set. This is needed
777 # since //build/config/arm.gni only enables NEON for iOS, not Android.
778 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700779 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700780 cflags = [ "-mfpu=neon" ]
781 }
782
783 # Disable LTO on NEON targets due to compiler bug.
784 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000785 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000786 cflags -= [
787 "-flto",
788 "-ffat-lto-objects",
789 ]
790 }
791
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200792 deps = [
kwiberga6ca5182017-01-30 05:28:54 -0800793 ":isac_fix_common",
kjellander676e08f2016-12-07 08:23:27 -0800794 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200795 "../../common_audio",
796 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000797 }
798}
799
800config("pcm16b_config") {
801 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000802 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000803 "codecs/pcm16b/include",
804 ]
805}
806
kjellanderb62dbbe2016-09-23 00:38:52 -0700807rtc_static_library("pcm16b") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000808 sources = [
Karl Wibergc0ac6ca2015-09-17 07:47:34 +0200809 "codecs/pcm16b/audio_decoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100810 "codecs/pcm16b/audio_decoder_pcm16b.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200811 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100812 "codecs/pcm16b/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000813 ]
814
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000815 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000816 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000817 ":g711",
kwiberg087bd342017-02-10 08:15:44 -0800818 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800819 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800820 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800821 "../../base:rtc_base_approved",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000822 ]
kjellander7439f972016-12-05 22:47:46 -0800823 public_deps = [
824 ":pcm16b_c",
825 ]
826 public_configs = [ ":pcm16b_config" ]
827}
828
829rtc_source_set("pcm16b_c") {
830 visibility = [ ":*" ] # Only targets in this file can depend on this.
831 sources = [
832 "codecs/pcm16b/pcm16b.c",
833 "codecs/pcm16b/pcm16b.h",
834 ]
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000835
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700836 public_configs = [ ":pcm16b_config" ]
kjellander676e08f2016-12-07 08:23:27 -0800837 deps = [
838 "../..:webrtc_common",
839 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000840}
841
842config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000843 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000844}
845
kjellanderb62dbbe2016-09-23 00:38:52 -0700846rtc_static_library("webrtc_opus") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000847 sources = [
Karl Wiberg0b058792015-09-15 17:28:18 +0200848 "codecs/opus/audio_decoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100849 "codecs/opus/audio_decoder_opus.h",
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000850 "codecs/opus/audio_encoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100851 "codecs/opus/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000852 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000853
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200854 deps = [
855 ":audio_encoder_interface",
minyue41b9c802016-10-06 07:13:54 -0700856 ":audio_network_adaptor",
kjellander676e08f2016-12-07 08:23:27 -0800857 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800858 "../../api/audio_codecs:audio_codecs_api",
Henrik Lundind048aa02015-12-03 17:47:21 +0100859 "../../base:rtc_base_approved",
tereliusbc5d9212017-01-13 09:14:33 -0800860 "../../base:rtc_numerics",
michaelt566d8202017-01-12 10:17:38 -0800861 "../../common_audio",
kjellander676e08f2016-12-07 08:23:27 -0800862 "../../system_wrappers",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200863 ]
kjellander7439f972016-12-05 22:47:46 -0800864 public_deps = [
865 ":webrtc_opus_c",
866 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000867
michaelta55f0212017-02-02 07:47:19 -0800868 defines = audio_codec_defines
henrik.lundinfd87f4a2016-11-28 11:15:54 -0800869 if (rtc_opus_variable_complexity) {
870 defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=1" ]
871 } else {
872 defines += [ "WEBRTC_OPUS_VARIABLE_COMPLEXITY=0" ]
873 }
henrik.lundin875862c2016-11-22 02:07:54 -0800874
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000875 if (rtc_build_opus) {
kjellander7439f972016-12-05 22:47:46 -0800876 public_deps += [ rtc_opus_dir ]
877 } else if (build_with_mozilla) {
878 include_dirs = [ getenv("DIST") + "/include/opus" ]
879 }
880}
881
882rtc_source_set("webrtc_opus_c") {
883 visibility = [ ":*" ] # Only targets in this file can depend on this.
884 sources = [
885 "codecs/opus/opus_inst.h",
886 "codecs/opus/opus_interface.c",
887 "codecs/opus/opus_interface.h",
888 ]
889
minyue2e03c662017-02-01 17:31:11 -0800890 defines = audio_coding_defines
891
kjellander7439f972016-12-05 22:47:46 -0800892 if (rtc_build_opus) {
tfarina702f3972015-09-25 05:57:37 -0700893 public_deps = [
894 rtc_opus_dir,
895 ]
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000896 } else if (build_with_mozilla) {
897 include_dirs = [ getenv("DIST") + "/include/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000898 }
kjellander7439f972016-12-05 22:47:46 -0800899
900 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800901 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800902 "../../base:rtc_base_approved",
903 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000904}
905
minyue25f6a392016-09-22 22:23:20 -0700906if (rtc_enable_protobuf) {
907 proto_library("ana_debug_dump_proto") {
908 sources = [
909 "audio_network_adaptor/debug_dump.proto",
910 ]
sakal363a2912017-01-13 06:52:12 -0800911 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
minyue25f6a392016-09-22 22:23:20 -0700912 }
minyuea1d9ad02016-10-02 14:53:37 -0700913 proto_library("ana_config_proto") {
914 sources = [
915 "audio_network_adaptor/config.proto",
916 ]
917 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
918 }
minyue25f6a392016-09-22 22:23:20 -0700919}
920
minyue0d382ef2016-10-07 07:59:28 -0700921rtc_static_library("audio_network_adaptor") {
minyue7610f852016-09-07 13:51:51 -0700922 sources = [
923 "audio_network_adaptor/audio_network_adaptor.cc",
minyuecaa9cb22016-09-13 13:34:15 -0700924 "audio_network_adaptor/audio_network_adaptor_impl.cc",
925 "audio_network_adaptor/audio_network_adaptor_impl.h",
minyue4aec1d42016-09-21 23:01:26 -0700926 "audio_network_adaptor/bitrate_controller.cc",
927 "audio_network_adaptor/bitrate_controller.h",
minyue2e164c62016-09-14 06:47:36 -0700928 "audio_network_adaptor/channel_controller.cc",
929 "audio_network_adaptor/channel_controller.h",
minyuecaa9cb22016-09-13 13:34:15 -0700930 "audio_network_adaptor/controller.cc",
931 "audio_network_adaptor/controller.h",
932 "audio_network_adaptor/controller_manager.cc",
933 "audio_network_adaptor/controller_manager.h",
minyue25f6a392016-09-22 22:23:20 -0700934 "audio_network_adaptor/debug_dump_writer.cc",
935 "audio_network_adaptor/debug_dump_writer.h",
minyue186cd062016-09-16 05:54:39 -0700936 "audio_network_adaptor/dtx_controller.cc",
937 "audio_network_adaptor/dtx_controller.h",
minyue4b7c9522017-01-24 04:54:59 -0800938 "audio_network_adaptor/event_log_writer.cc",
939 "audio_network_adaptor/event_log_writer.h",
elad.alon6d7900d2017-03-24 04:12:56 -0700940 "audio_network_adaptor/fec_controller_plr_based.cc",
941 "audio_network_adaptor/fec_controller_plr_based.h",
942 "audio_network_adaptor/fec_controller_rplr_based.cc",
943 "audio_network_adaptor/fec_controller_rplr_based.h",
minyuee35d3292016-09-21 16:00:31 -0700944 "audio_network_adaptor/frame_length_controller.cc",
945 "audio_network_adaptor/frame_length_controller.h",
minyue7610f852016-09-07 13:51:51 -0700946 "audio_network_adaptor/include/audio_network_adaptor.h",
elad.alon326263a2017-03-29 03:16:58 -0700947 "audio_network_adaptor/util/threshold_curve.h",
minyue7610f852016-09-07 13:51:51 -0700948 ]
minyue25f6a392016-09-22 22:23:20 -0700949
minyue41b9c802016-10-06 07:13:54 -0700950 deps = [
951 "../..:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -0800952 "../../base:rtc_base_approved",
953 "../../common_audio",
minyue4b7c9522017-01-24 04:54:59 -0800954 "../../logging:rtc_event_log_api",
minyue41b9c802016-10-06 07:13:54 -0700955 "../../system_wrappers",
956 ]
957
minyue25f6a392016-09-22 22:23:20 -0700958 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700959 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700960 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700961 ":ana_debug_dump_proto",
962 ]
963 defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ]
964 }
minyue4b7c9522017-01-24 04:54:59 -0800965
966 if (!build_with_chromium && is_clang) {
967 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
968 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
969 }
minyue7610f852016-09-07 13:51:51 -0700970}
971
kwiberg65cb70d2017-03-03 06:16:28 -0800972rtc_source_set("neteq_decoder_enum") {
973 sources = [
974 "neteq/neteq_decoder_enum.cc",
975 "neteq/neteq_decoder_enum.h",
976 ]
977 deps = [
978 "../../api/audio_codecs:audio_codecs_api",
979 "../../base:rtc_base_approved",
980 ]
981}
kjellander676e08f2016-12-07 08:23:27 -0800982
kwiberg65cb70d2017-03-03 06:16:28 -0800983rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000984 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000985 "neteq/accelerate.cc",
986 "neteq/accelerate.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000987 "neteq/audio_decoder_impl.cc",
988 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000989 "neteq/audio_multi_vector.cc",
990 "neteq/audio_multi_vector.h",
991 "neteq/audio_vector.cc",
992 "neteq/audio_vector.h",
993 "neteq/background_noise.cc",
994 "neteq/background_noise.h",
995 "neteq/buffer_level_filter.cc",
996 "neteq/buffer_level_filter.h",
997 "neteq/comfort_noise.cc",
998 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700999 "neteq/cross_correlation.cc",
1000 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001001 "neteq/decision_logic.cc",
1002 "neteq/decision_logic.h",
1003 "neteq/decision_logic_fax.cc",
1004 "neteq/decision_logic_fax.h",
1005 "neteq/decision_logic_normal.cc",
1006 "neteq/decision_logic_normal.h",
1007 "neteq/decoder_database.cc",
1008 "neteq/decoder_database.h",
1009 "neteq/defines.h",
1010 "neteq/delay_manager.cc",
1011 "neteq/delay_manager.h",
1012 "neteq/delay_peak_detector.cc",
1013 "neteq/delay_peak_detector.h",
1014 "neteq/dsp_helper.cc",
1015 "neteq/dsp_helper.h",
1016 "neteq/dtmf_buffer.cc",
1017 "neteq/dtmf_buffer.h",
1018 "neteq/dtmf_tone_generator.cc",
1019 "neteq/dtmf_tone_generator.h",
1020 "neteq/expand.cc",
1021 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +01001022 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001023 "neteq/merge.cc",
1024 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -07001025 "neteq/nack_tracker.cc",
1026 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001027 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001028 "neteq/neteq_impl.cc",
1029 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001030 "neteq/normal.cc",
1031 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -07001032 "neteq/packet.cc",
1033 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001034 "neteq/packet_buffer.cc",
1035 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001036 "neteq/post_decode_vad.cc",
1037 "neteq/post_decode_vad.h",
1038 "neteq/preemptive_expand.cc",
1039 "neteq/preemptive_expand.h",
1040 "neteq/random_vector.cc",
1041 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -07001042 "neteq/red_payload_splitter.cc",
1043 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001044 "neteq/rtcp.cc",
1045 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001046 "neteq/statistics_calculator.cc",
1047 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001048 "neteq/sync_buffer.cc",
1049 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -07001050 "neteq/tick_timer.cc",
1051 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001052 "neteq/time_stretch.cc",
1053 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001054 "neteq/timestamp_scaler.cc",
1055 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001056 ]
1057
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001058 deps = [
kwiberg65cb70d2017-03-03 06:16:28 -08001059 ":audio_coding_module_typedefs",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001060 ":cng",
1061 ":g711",
kjellander676e08f2016-12-07 08:23:27 -08001062 ":isac_fix",
kwiberg65cb70d2017-03-03 06:16:28 -08001063 ":neteq_decoder_enum",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001064 ":pcm16b",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +00001065 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001066 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001067 "../../base:gtest_prod",
1068 "../../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001069 "../../common_audio",
1070 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001071 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001072
1073 defines = []
1074
kwibergf8c2bac2016-01-18 06:38:32 -08001075 if (rtc_include_ilbc) {
1076 defines += [ "WEBRTC_CODEC_ILBC" ]
1077 deps += [ ":ilbc" ]
1078 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001079 if (rtc_include_opus) {
1080 defines += [ "WEBRTC_CODEC_OPUS" ]
1081 deps += [ ":webrtc_opus" ]
1082 }
kwiberg98ab3a42015-09-30 21:54:21 -07001083 if (!build_with_mozilla) {
1084 if (current_cpu == "arm") {
1085 defines += [ "WEBRTC_CODEC_ISACFX" ]
1086 deps += [ ":isac_fix" ]
1087 } else {
1088 defines += [ "WEBRTC_CODEC_ISAC" ]
1089 deps += [ ":isac" ]
1090 }
1091 defines += [ "WEBRTC_CODEC_G722" ]
1092 deps += [ ":g722" ]
1093 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001094}
kjellanderfb114242016-06-13 00:19:48 -07001095
henrik.lundin58466f62016-10-05 02:27:42 -07001096# Although providing only test support, this target must be outside of the
1097# rtc_include_tests conditional. The reason is that it supports fuzzer tests
1098# that ultimately are built and run as a part of the Chromium ecosystem, which
1099# does not set the rtc_include_tests flag.
1100rtc_source_set("neteq_test_minimal") {
1101 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001102
1103 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1104 # Has cyclic dependency with :neteq_unittest_tools
1105 check_includes = false
1106
henrik.lundin58466f62016-10-05 02:27:42 -07001107 sources = [
1108 "neteq/tools/encode_neteq_input.cc",
1109 "neteq/tools/encode_neteq_input.h",
1110 "neteq/tools/neteq_test.cc",
1111 "neteq/tools/neteq_test.h",
1112 ]
1113
kjellandere40a7ee2016-10-16 23:56:12 -07001114 if (!build_with_chromium && is_clang) {
1115 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
henrik.lundin58466f62016-10-05 02:27:42 -07001116 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1117 }
kjellander676e08f2016-12-07 08:23:27 -08001118
1119 deps = [
1120 ":audio_encoder_interface",
kjellander676e08f2016-12-07 08:23:27 -08001121 ":neteq",
1122 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001123 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001124 "../../base:rtc_base_approved",
1125 ]
henrik.lundin58466f62016-10-05 02:27:42 -07001126}
1127
kjellanderfb114242016-06-13 00:19:48 -07001128if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -07001129 group("audio_coding_tests") {
1130 testonly = true
1131 public_deps = [
1132 ":RTPchange",
1133 ":RTPencode",
1134 ":RTPjitter",
1135 ":RTPtimeshift",
1136 ":acm_receive_test",
1137 ":acm_send_test",
kjellander6ceab082016-10-28 05:44:03 -07001138 ":audio_codec_speed_tests",
1139 ":audio_decoder_unittests",
1140 ":audio_decoder_unittests",
1141 ":delay_test",
1142 ":g711_test",
1143 ":g722_test",
1144 ":ilbc_test",
1145 ":insert_packet_with_timing",
1146 ":isac_api_test",
1147 ":isac_fix_test",
1148 ":isac_switch_samprate_test",
1149 ":isac_test",
1150 ":neteq_ilbc_quality_test",
1151 ":neteq_isac_quality_test",
1152 ":neteq_opus_quality_test",
1153 ":neteq_pcmu_quality_test",
1154 ":neteq_speed_test",
1155 ":rtp_analyze",
1156 ":rtpcat",
1157 ":webrtc_opus_fec_test",
1158 ]
1159 if (rtc_enable_protobuf) {
1160 public_deps += [ ":neteq_rtpplay" ]
1161 }
1162 }
1163
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001164 rtc_source_set("audio_coding_modules_tests") {
1165 testonly = true
1166 sources = [
1167 "test/APITest.cc",
1168 "test/Channel.cc",
1169 "test/EncodeDecodeTest.cc",
1170 "test/PCMFile.cc",
1171 "test/PacketLossTest.cc",
1172 "test/RTPFile.cc",
1173 "test/TestAllCodecs.cc",
1174 "test/TestRedFec.cc",
1175 "test/TestStereo.cc",
1176 "test/TestVADDTX.cc",
1177 "test/Tester.cc",
1178 "test/TwoWayCommunication.cc",
1179 "test/iSACTest.cc",
1180 "test/opus_test.cc",
1181 "test/target_delay_unittest.cc",
1182 "test/utility.cc",
1183 ]
1184 deps = [
1185 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001186 ":audio_coding_module_typedefs",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001187 ":audio_format_conversion",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001188 ":pcm16b_c",
1189 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001190 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001191 "../../base:rtc_base_approved",
1192 "../../system_wrappers:system_wrappers",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001193 "../../test:test_support",
1194 ]
1195 defines = audio_coding_defines
1196 if (is_win) {
1197 cflags = [
1198 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1199 "/wd4373", # virtual function override.
1200 ]
1201 }
1202 if (!build_with_chromium && is_clang) {
1203 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1204 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1205 }
1206 }
1207
ehmaldonado021eef32017-01-05 07:09:50 -08001208 rtc_source_set("audio_coding_perf_tests") {
1209 testonly = true
1210 sources = [
1211 "codecs/opus/opus_complexity_unittest.cc",
1212 "neteq/test/neteq_performance_unittest.cc",
1213 ]
1214 deps = [
1215 ":neteq_test_support",
1216 ":neteq_unittest_tools",
1217 ":webrtc_opus",
1218 "../..:webrtc_common",
1219 "../../base:rtc_base_approved",
1220 "../../system_wrappers:system_wrappers",
1221 "../../test:test_support",
1222 ]
1223 if (!build_with_chromium && is_clang) {
1224 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1225 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1226 }
1227 }
1228
ehmaldonado38a21322016-09-02 04:10:34 -07001229 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -07001230 testonly = true
1231 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001232 "acm2/acm_receive_test.cc",
1233 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001234 ]
1235
kjellanderfb114242016-06-13 00:19:48 -07001236 defines = audio_coding_defines
1237
1238 deps = audio_coding_deps + [
1239 ":audio_coding",
kjellander676e08f2016-12-07 08:23:27 -08001240 ":audio_format_conversion",
kwiberg087bd342017-02-10 08:15:44 -08001241 "../../api/audio_codecs:audio_codecs_api",
1242 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellanderfb114242016-06-13 00:19:48 -07001243 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001244 "../../base:rtc_base_approved",
1245 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001246 "//testing/gtest",
1247 ]
1248 }
1249
ehmaldonado38a21322016-09-02 04:10:34 -07001250 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -07001251 testonly = true
1252 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001253 "acm2/acm_send_test.cc",
1254 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001255 ]
1256
kjellanderfb114242016-06-13 00:19:48 -07001257 defines = audio_coding_defines
1258
1259 deps = audio_coding_deps + [
1260 ":audio_coding",
kwiberg087bd342017-02-10 08:15:44 -08001261 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001262 ":audio_encoder_interface",
kjellanderfb114242016-06-13 00:19:48 -07001263 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001264 "../../base:rtc_base_approved",
1265 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001266 "//testing/gtest",
1267 ]
1268 }
1269
ehmaldonado38a21322016-09-02 04:10:34 -07001270 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -07001271 testonly = true
1272 sources = [
1273 "test/Channel.cc",
1274 "test/PCMFile.cc",
1275 "test/delay_test.cc",
1276 "test/utility.cc",
1277 ]
1278
aleloi333f2062016-07-28 01:21:29 -07001279 deps = [
1280 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001281 ":audio_coding_module_typedefs",
kwibergda2bf4e2016-10-24 13:47:09 -07001282 ":audio_format_conversion",
aleloi333f2062016-07-28 01:21:29 -07001283 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001284 "../../base:rtc_base_approved",
aleloi333f2062016-07-28 01:21:29 -07001285 "../../system_wrappers",
1286 "../../system_wrappers:system_wrappers_default",
1287 "../../test:test_support",
1288 "../rtp_rtcp",
1289 "//testing/gtest",
1290 "//third_party/gflags:gflags",
1291 ]
1292 } # delay_test
1293
ehmaldonado38a21322016-09-02 04:10:34 -07001294 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -07001295 testonly = true
1296 sources = [
1297 "test/Channel.cc",
1298 "test/PCMFile.cc",
1299 "test/insert_packet_with_timing.cc",
1300 ]
1301
kjellandere40a7ee2016-10-16 23:56:12 -07001302 if (!build_with_chromium && is_clang) {
1303 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001304 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -07001305 }
1306
1307 deps = [
1308 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001309 ":audio_format_conversion",
aleloi00730c72016-07-28 01:27:10 -07001310 "../../:webrtc_common",
kjellander676e08f2016-12-07 08:23:27 -08001311 "../../base:rtc_base_approved",
aleloi00730c72016-07-28 01:27:10 -07001312 "../../system_wrappers",
1313 "../../system_wrappers:system_wrappers_default",
1314 "../../test:test_support",
1315 "../rtp_rtcp",
1316 "//testing/gtest",
1317 "//third_party/gflags:gflags",
1318 ]
1319 } # insert_packet_with_timing
1320
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001321 audio_decoder_unittests_resources =
1322 [ "//resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -07001323
1324 if (is_ios) {
1325 bundle_data("audio_decoder_unittests_bundle_data") {
1326 testonly = true
1327 sources = audio_decoder_unittests_resources
1328 outputs = [
1329 "{{bundle_resources_dir}}/{{source_file_part}}",
1330 ]
1331 }
1332 }
1333
ehmaldonado38a21322016-09-02 04:10:34 -07001334 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -07001335 testonly = true
1336 sources = [
1337 "neteq/audio_decoder_unittest.cc",
1338 ]
1339
kjellandere40a7ee2016-10-16 23:56:12 -07001340 if (!build_with_chromium && is_clang) {
1341 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001342 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -07001343 }
1344
1345 deps = []
1346
1347 defines = neteq_defines
1348
1349 deps += audio_coding_deps
1350 deps += [
ehmaldonado87b8e9f2017-02-07 06:26:29 -08001351 ":ilbc",
charujainddf3e4a2016-08-01 07:49:42 -07001352 ":isac",
1353 ":isac_fix",
1354 ":neteq",
1355 ":neteq_unittest_tools",
kwiberg087bd342017-02-10 08:15:44 -08001356 "../../api/audio_codecs:audio_codecs_api",
kjellander6ceab082016-10-28 05:44:03 -07001357 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001358 "../../test:test_main",
charujainddf3e4a2016-08-01 07:49:42 -07001359 "//testing/gtest",
1360 ]
1361
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001362 data = audio_decoder_unittests_resources
1363
charujainddf3e4a2016-08-01 07:49:42 -07001364 if (is_android) {
1365 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001366 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001367 }
kjellander32c4a202016-08-30 02:53:49 -07001368 if (is_ios) {
1369 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001370 }
1371 } # audio_decoder_unittests
1372
kjellanderfb114242016-06-13 00:19:48 -07001373 if (rtc_enable_protobuf) {
1374 proto_library("neteq_unittest_proto") {
1375 sources = [
1376 "neteq/neteq_unittest.proto",
1377 ]
kjellandere3e902e2017-02-28 08:01:46 -08001378 proto_out_dir = "webrtc/modules/audio_coding/neteq"
kjellanderfb114242016-06-13 00:19:48 -07001379 }
henrik.lundin03153f12016-06-21 05:38:42 -07001380
kjellanderb62dbbe2016-09-23 00:38:52 -07001381 rtc_static_library("rtc_event_log_source") {
henrik.lundin03153f12016-06-21 05:38:42 -07001382 testonly = true
kjellander676e08f2016-12-07 08:23:27 -08001383
1384 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1385 # Needs call.h to be moved to webrtc/api first.
1386 check_includes = false
1387
henrik.lundin03153f12016-06-21 05:38:42 -07001388 sources = [
1389 "neteq/tools/rtc_event_log_source.cc",
1390 "neteq/tools/rtc_event_log_source.h",
1391 ]
1392
kjellandere40a7ee2016-10-16 23:56:12 -07001393 if (!build_with_chromium && is_clang) {
1394 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001395 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001396 }
1397
1398 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001399 "../../base:rtc_base_approved",
skvladcc91d282016-10-03 18:31:22 -07001400 "../../logging:rtc_event_log_parser",
henrik.lundin03153f12016-06-21 05:38:42 -07001401 ]
1402 public_deps = [
skvladcc91d282016-10-03 18:31:22 -07001403 "../../logging:rtc_event_log_proto",
henrik.lundin03153f12016-06-21 05:38:42 -07001404 ]
1405 }
1406
ehmaldonado38a21322016-09-02 04:10:34 -07001407 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001408 testonly = true
1409 defines = []
1410 deps = []
1411 sources = [
1412 "neteq/tools/neteq_rtpplay.cc",
1413 ]
1414
kjellandere40a7ee2016-10-16 23:56:12 -07001415 if (!build_with_chromium && is_clang) {
1416 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001417 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001418 }
1419
1420 if (is_win) {
1421 cflags = [
1422 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1423 "/wd4373", # virtual function override.
1424 ]
1425 }
1426
1427 deps += [
1428 ":neteq",
1429 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001430 "../..:webrtc_common",
1431 "../../base:rtc_base_approved",
henrik.lundin03153f12016-06-21 05:38:42 -07001432 "../../system_wrappers:system_wrappers_default",
1433 "../../test:test_support",
1434 "//third_party/gflags",
1435 ]
1436 }
kjellanderfb114242016-06-13 00:19:48 -07001437 }
1438
ehmaldonado38a21322016-09-02 04:10:34 -07001439 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001440 testonly = true
1441 defines = []
1442 deps = []
1443 sources = [
1444 "codecs/isac/fix/test/isac_speed_test.cc",
1445 "codecs/opus/opus_speed_test.cc",
1446 "codecs/tools/audio_codec_speed_test.cc",
1447 "codecs/tools/audio_codec_speed_test.h",
1448 ]
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" ]
aleloie6b60a42016-07-28 02:34:30 -07001453 }
1454
1455 if (is_android) {
1456 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001457 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001458 }
1459
1460 deps += [
1461 ":isac_fix",
1462 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001463 "../..:webrtc_common",
1464 "../../base:rtc_base_approved",
aleloie6b60a42016-07-28 02:34:30 -07001465 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001466 "../../test:test_main",
kjellander6ceab082016-10-28 05:44:03 -07001467 "../audio_processing",
aleloie6b60a42016-07-28 02:34:30 -07001468 "//testing/gtest",
1469 ]
1470 }
1471
ehmaldonado38a21322016-09-02 04:10:34 -07001472 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001473 testonly = true
1474 sources = [
1475 "neteq/tools/neteq_external_decoder_test.cc",
1476 "neteq/tools/neteq_external_decoder_test.h",
1477 "neteq/tools/neteq_performance_test.cc",
1478 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001479 ]
1480
kjellandere40a7ee2016-10-16 23:56:12 -07001481 if (!build_with_chromium && is_clang) {
1482 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001483 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001484 }
1485
1486 deps = [
1487 ":neteq",
1488 ":neteq_unittest_tools",
1489 ":pcm16b",
kjellander676e08f2016-12-07 08:23:27 -08001490 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001491 "../../api/audio_codecs:audio_codecs_api",
1492 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001493 "../../base:rtc_base_approved",
1494 "../../system_wrappers",
1495 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001496 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001497 ]
1498 }
1499
ehmaldonado38a21322016-09-02 04:10:34 -07001500 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001501 testonly = true
1502 sources = [
1503 "neteq/tools/neteq_quality_test.cc",
1504 "neteq/tools/neteq_quality_test.h",
1505 ]
1506
kjellandere40a7ee2016-10-16 23:56:12 -07001507 if (!build_with_chromium && is_clang) {
1508 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001509 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001510 }
1511
1512 deps = [
1513 ":neteq",
1514 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001515 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001516 "../../api/audio_codecs:builtin_audio_decoder_factory",
kjellander676e08f2016-12-07 08:23:27 -08001517 "../../base:rtc_base_approved",
1518 "../../test:test_support",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001519 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001520 "//third_party/gflags",
1521 ]
1522 }
1523
kjellanderfb114242016-06-13 00:19:48 -07001524 config("neteq_unittest_tools_config") {
1525 include_dirs = [ "tools" ]
1526 }
1527
ehmaldonado38a21322016-09-02 04:10:34 -07001528 rtc_source_set("neteq_unittest_tools") {
kjellanderfb114242016-06-13 00:19:48 -07001529 testonly = true
1530 sources = [
1531 "neteq/tools/audio_checksum.h",
1532 "neteq/tools/audio_loop.cc",
1533 "neteq/tools/audio_loop.h",
aleloi0e0be0a2016-08-10 04:55:20 -07001534 "neteq/tools/audio_sink.cc",
kjellanderfb114242016-06-13 00:19:48 -07001535 "neteq/tools/audio_sink.h",
1536 "neteq/tools/constant_pcm_packet_source.cc",
1537 "neteq/tools/constant_pcm_packet_source.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001538 "neteq/tools/fake_decode_from_file.cc",
1539 "neteq/tools/fake_decode_from_file.h",
kjellanderfb114242016-06-13 00:19:48 -07001540 "neteq/tools/input_audio_file.cc",
1541 "neteq/tools/input_audio_file.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001542 "neteq/tools/neteq_input.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001543 "neteq/tools/neteq_replacement_input.cc",
1544 "neteq/tools/neteq_replacement_input.h",
kjellanderfb114242016-06-13 00:19:48 -07001545 "neteq/tools/output_audio_file.h",
1546 "neteq/tools/output_wav_file.h",
1547 "neteq/tools/packet.cc",
1548 "neteq/tools/packet.h",
kwibergb8e56ee2016-08-29 06:37:33 -07001549 "neteq/tools/packet_source.cc",
kjellanderfb114242016-06-13 00:19:48 -07001550 "neteq/tools/packet_source.h",
1551 "neteq/tools/resample_input_audio_file.cc",
1552 "neteq/tools/resample_input_audio_file.h",
1553 "neteq/tools/rtp_file_source.cc",
1554 "neteq/tools/rtp_file_source.h",
1555 "neteq/tools/rtp_generator.cc",
1556 "neteq/tools/rtp_generator.h",
1557 ]
1558
ehmaldonadoe9cc6862016-09-05 06:10:18 -07001559 public_configs = [ ":neteq_unittest_tools_config" ]
kjellanderfb114242016-06-13 00:19:48 -07001560
kjellandere40a7ee2016-10-16 23:56:12 -07001561 if (!build_with_chromium && is_clang) {
1562 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001563 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001564 }
1565
1566 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001567 ":audio_encoder_interface",
1568 ":pcm16b",
1569 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001570 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -08001571 "../../base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -07001572 "../../common_audio",
1573 "../../test:rtp_test_utils",
1574 "../rtp_rtcp",
1575 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001576
kjellander676e08f2016-12-07 08:23:27 -08001577 public_deps = [
1578 ":neteq_test_minimal",
1579 ]
1580
henrik.lundine8a77e32016-06-22 06:34:03 -07001581 if (rtc_enable_protobuf) {
ehmaldonado36268652017-01-19 08:27:11 -08001582 sources += [
1583 "neteq/tools/neteq_packet_source_input.cc",
1584 "neteq/tools/neteq_packet_source_input.h",
1585 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001586 deps += [ ":rtc_event_log_source" ]
1587 }
kjellanderfb114242016-06-13 00:19:48 -07001588 }
aleloi3022a342016-07-26 06:36:03 -07001589
ehmaldonado38a21322016-09-02 04:10:34 -07001590 rtc_source_set("neteq_test_tools") {
aleloi3022a342016-07-26 06:36:03 -07001591 testonly = true
1592 sources = [
1593 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1594 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1595 "neteq/test/NETEQTEST_RTPpacket.cc",
1596 "neteq/test/NETEQTEST_RTPpacket.h",
1597 ]
1598
1599 deps = [
1600 ":cng",
1601 ":g711",
1602 ":g722",
1603 ":ilbc",
1604 ":isac",
1605 ":pcm16b",
1606 "../..:webrtc_common",
1607 "//testing/gtest",
1608 ]
1609
1610 include_dirs = [
1611 "neteq/include",
1612 "neteq/test",
1613 "../../",
1614 ]
1615
1616 if (is_win) {
1617 cflags = [
1618 # Disable warnings to enable Win64 build, issue 1323.
1619 "/wd4267", # size_t to int truncation
1620 ]
1621 }
1622 }
aleloi47bded42016-07-26 06:46:19 -07001623
aleloi82667732016-08-02 01:45:50 -07001624 config("RTPencode_config") {
1625 defines = [
1626 "CODEC_ILBC",
1627 "CODEC_PCM16B",
1628 "CODEC_G711",
1629 "CODEC_G722",
1630 "CODEC_ISAC",
1631 "CODEC_PCM16B_WB",
1632 "CODEC_ISAC_SWB",
1633 "CODEC_PCM16B_32KHZ",
1634 "CODEC_PCM16B_48KHZ",
1635 "CODEC_CNGCODEC8",
1636 "CODEC_CNGCODEC16",
1637 "CODEC_CNGCODEC32",
1638 "CODEC_ATEVENT_DECODE",
1639 "CODEC_RED",
1640 "CODEC_OPUS",
1641 ]
1642 }
1643
ehmaldonado38a21322016-09-02 04:10:34 -07001644 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001645 testonly = true
1646
1647 deps = [
1648 # TODO(hlundin): Make RTPencode use ACM to encode files.
1649 ":cng",
1650 ":g711",
1651 ":g722",
1652 ":ilbc",
1653 ":isac",
kjellander676e08f2016-12-07 08:23:27 -08001654 ":neteq",
aleloi82667732016-08-02 01:45:50 -07001655 ":neteq_test_tools",
1656 ":pcm16b",
1657 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001658 "../..:webrtc_common",
1659 "../../base:rtc_base_approved",
aleloi82667732016-08-02 01:45:50 -07001660 "../../common_audio",
1661 ]
1662
1663 configs += [ ":RTPencode_config" ]
1664
1665 sources = [
1666 "neteq/test/RTPencode.cc",
1667 ]
1668
1669 include_dirs = [
1670 "neteq/include",
1671 "neteq/test",
1672 ]
1673
1674 if (is_win) {
1675 cflags = [
1676 # Disable warnings to enable Win64 build, issue 1323.
1677 "/wd4267", # size_t to int truncation
1678 ]
1679 }
1680 }
1681
ehmaldonado38a21322016-09-02 04:10:34 -07001682 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001683 testonly = true
1684
1685 sources = [
1686 "neteq/test/RTPchange.cc",
1687 ]
1688
1689 deps = [
1690 ":neteq_test_tools",
1691 ]
1692 }
1693
ehmaldonado38a21322016-09-02 04:10:34 -07001694 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001695 testonly = true
1696
1697 sources = [
1698 "neteq/tools/rtpcat.cc",
1699 ]
1700
1701 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001702 "../../base:rtc_base_approved",
aleloi5556dcb2016-08-02 04:27:25 -07001703 "../../system_wrappers:system_wrappers_default",
1704 "../../test:rtp_test_utils",
1705 "//testing/gtest",
1706 ]
1707 }
1708
ehmaldonado38a21322016-09-02 04:10:34 -07001709 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001710 testonly = true
1711
1712 sources = [
1713 "neteq/test/RTPtimeshift.cc",
1714 ]
1715
1716 deps = [
1717 ":neteq_test_tools",
kjellander676e08f2016-12-07 08:23:27 -08001718 "../../test:test_support",
aleloi5a746502016-08-02 06:06:33 -07001719 "//testing/gtest",
1720 ]
1721 }
1722
ehmaldonado38a21322016-09-02 04:10:34 -07001723 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001724 testonly = true
1725 deps = [
1726 "../..:webrtc_common",
kthelgason29a44e32016-09-27 03:52:02 -07001727 "../../base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001728 "../../test:test_support",
aleloi17dfa742016-08-03 01:17:25 -07001729 "//testing/gtest",
1730 ]
1731 sources = [
1732 "neteq/test/RTPjitter.cc",
1733 ]
1734 }
1735
ehmaldonado38a21322016-09-02 04:10:34 -07001736 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001737 testonly = true
1738
1739 sources = [
1740 "neteq/tools/rtp_analyze.cc",
1741 ]
1742
1743 deps = [
1744 ":neteq",
1745 ":neteq_unittest_tools",
1746 ":pcm16b",
1747 "../../system_wrappers:system_wrappers_default",
1748 "//testing/gtest",
1749 "//third_party/gflags:gflags",
1750 ]
1751
kjellandere40a7ee2016-10-16 23:56:12 -07001752 if (!build_with_chromium && is_clang) {
1753 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001754 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001755 }
1756 }
aleloi630c6d52016-08-10 02:11:30 -07001757
ehmaldonado38a21322016-09-02 04:10:34 -07001758 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001759 testonly = true
1760
1761 sources = [
1762 "neteq/test/neteq_opus_quality_test.cc",
1763 ]
1764
1765 deps = [
1766 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001767 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001768 ":neteq_unittest_tools",
aleloi630c6d52016-08-10 02:11:30 -07001769 ":webrtc_opus",
ehmaldonado26bddb92016-11-30 06:12:01 -08001770 "../../test:test_main",
aleloi630c6d52016-08-10 02:11:30 -07001771 "//testing/gtest",
1772 "//third_party/gflags",
1773 ]
aleloi630c6d52016-08-10 02:11:30 -07001774 }
aleloi116fd612016-08-10 04:16:36 -07001775
ehmaldonado38a21322016-09-02 04:10:34 -07001776 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001777 testonly = true
1778
1779 sources = [
1780 "neteq/test/neteq_speed_test.cc",
1781 ]
1782
1783 deps = [
1784 ":neteq",
1785 ":neteq_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001786 "../..:webrtc_common",
aleloi116fd612016-08-10 04:16:36 -07001787 "../../system_wrappers:system_wrappers_default",
1788 "../../test:test_support",
1789 "//third_party/gflags",
1790 ]
1791 }
aleloi63910122016-08-10 04:41:14 -07001792
ehmaldonado38a21322016-09-02 04:10:34 -07001793 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001794 testonly = true
1795
1796 sources = [
1797 "neteq/test/neteq_ilbc_quality_test.cc",
1798 ]
1799
1800 deps = [
1801 ":ilbc",
1802 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001803 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001804 ":neteq_unittest_tools",
kjellander676e08f2016-12-07 08:23:27 -08001805 "../..:webrtc_common",
1806 "../../base:rtc_base_approved",
aleloi0e0be0a2016-08-10 04:55:20 -07001807 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001808 "../../test:test_main",
aleloi0e0be0a2016-08-10 04:55:20 -07001809 "//testing/gtest",
1810 "//third_party/gflags",
1811 ]
1812 }
aleloi6df36dc2016-08-10 05:04:47 -07001813
ehmaldonado38a21322016-09-02 04:10:34 -07001814 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001815 testonly = true
1816
1817 sources = [
1818 "neteq/test/neteq_isac_quality_test.cc",
1819 ]
1820
1821 deps = [
1822 ":isac_fix",
1823 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001824 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001825 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001826 "../../test:test_main",
aleloi6df36dc2016-08-10 05:04:47 -07001827 "//testing/gtest",
1828 "//third_party/gflags",
1829 ]
1830 }
aleloic4ac7002016-08-10 05:06:27 -07001831
ehmaldonado38a21322016-09-02 04:10:34 -07001832 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001833 testonly = true
1834
1835 sources = [
1836 "neteq/test/neteq_pcmu_quality_test.cc",
1837 ]
1838
1839 deps = [
1840 ":g711",
1841 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001842 ":neteq_quality_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001843 "../../base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001844 "../../test:test_main",
aleloic4ac7002016-08-10 05:06:27 -07001845 "//testing/gtest",
1846 "//third_party/gflags",
1847 ]
1848 }
aleloib7186d02016-08-16 01:47:16 -07001849
ehmaldonado38a21322016-09-02 04:10:34 -07001850 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001851 testonly = true
1852
1853 sources = [
1854 "codecs/isac/fix/test/kenny.cc",
1855 ]
1856
1857 deps = [
1858 ":isac_fix",
1859 "../../test:test_support",
1860 ]
1861
1862 if (is_win) {
1863 cflags = [
1864 # Disable warnings to enable Win64 build, issue 1323.
1865 "/wd4267", # size_t to int truncation
1866 ]
1867 }
1868 }
aleloi16f55a12016-08-23 08:08:23 -07001869
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001870 config("isac_test_warnings_config") {
1871 if (is_win && is_clang) {
1872 cflags = [
1873 # Disable warnings failing when compiling with Clang on Windows.
1874 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1875 "-Wno-format",
1876 ]
1877 }
1878 }
1879
kjellander7439f972016-12-05 22:47:46 -08001880 rtc_source_set("isac_test_util") {
1881 testonly = true
1882 sources = [
1883 "codecs/isac/main/util/utility.c",
1884 ]
1885 }
1886
ehmaldonado38a21322016-09-02 04:10:34 -07001887 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001888 testonly = true
1889
1890 sources = [
1891 "codecs/isac/main/test/simpleKenny.c",
ivoce51b41a2016-08-24 02:25:57 -07001892 ]
1893
1894 include_dirs = [
1895 "codecs/isac/main/include",
1896 "codecs/isac/main/test",
1897 "codecs/isac/main/util",
1898 ]
1899
1900 deps = [
1901 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001902 ":isac_test_util",
ivoc48052312016-08-25 04:43:45 -07001903 "../../base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001904 ]
1905
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001906 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001907 }
1908
ehmaldonado38a21322016-09-02 04:10:34 -07001909 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001910 testonly = true
1911
1912 sources = [
1913 "codecs/g711/test/testG711.cc",
1914 ]
1915
aleloi16f55a12016-08-23 08:08:23 -07001916 deps = [
1917 ":g711",
1918 ]
1919 }
aleloi9a117842016-08-23 08:36:10 -07001920
ehmaldonado38a21322016-09-02 04:10:34 -07001921 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001922 testonly = true
1923
1924 sources = [
1925 "codecs/g722/test/testG722.cc",
1926 ]
1927
aleloi9a117842016-08-23 08:36:10 -07001928 deps = [
1929 ":g722",
1930 "../..:webrtc_common",
1931 ]
1932 }
ivoc2c670db2016-08-24 06:11:18 -07001933
ehmaldonado38a21322016-09-02 04:10:34 -07001934 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07001935 testonly = true
1936
1937 sources = [
1938 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
aleloicfee2152016-08-29 04:09:19 -07001939 ]
1940
aleloicfee2152016-08-29 04:09:19 -07001941 deps = [
1942 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001943 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001944 "../../base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07001945 ]
1946
1947 include_dirs = [
1948 "codecs/isac/main/include",
1949 "codecs/isac/main/test",
1950 "codecs/isac/main/util",
1951 ]
1952 }
1953
ehmaldonado38a21322016-09-02 04:10:34 -07001954 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07001955 testonly = true
1956
1957 sources = [
1958 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
aleloicfee2152016-08-29 04:09:19 -07001959 ]
1960
aleloicfee2152016-08-29 04:09:19 -07001961 deps = [
1962 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001963 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07001964 ]
1965
1966 include_dirs = [
1967 "codecs/isac/main/include",
1968 "codecs/isac/main/test",
1969 "codecs/isac/main/util",
1970 "../../common_audio/signal_processing/include",
1971 ]
1972 }
1973
ehmaldonado38a21322016-09-02 04:10:34 -07001974 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07001975 testonly = true
1976
1977 sources = [
1978 "codecs/ilbc/test/iLBC_test.c",
1979 ]
1980
aleloicfee2152016-08-29 04:09:19 -07001981 deps = [
1982 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07001983 ]
1984 }
1985
ehmaldonado38a21322016-09-02 04:10:34 -07001986 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07001987 testonly = true
1988
1989 sources = [
1990 "codecs/opus/opus_fec_test.cc",
1991 ]
1992
1993 deps = [
1994 ":webrtc_opus",
ivoc48052312016-08-25 04:43:45 -07001995 "../../base:rtc_base_approved",
ivoc2c670db2016-08-24 06:11:18 -07001996 "../../common_audio",
ehmaldonado26bddb92016-11-30 06:12:01 -08001997 "../../test:test_main",
ivoc2c670db2016-08-24 06:11:18 -07001998 "//testing/gtest",
1999 ]
2000
kjellandere40a7ee2016-10-16 23:56:12 -07002001 if (!build_with_chromium && is_clang) {
2002 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07002003 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07002004 }
2005 }
ehmaldonado36268652017-01-19 08:27:11 -08002006
2007 rtc_source_set("audio_coding_unittests") {
2008 testonly = true
2009
2010 sources = [
2011 "acm2/acm_receiver_unittest.cc",
2012 "acm2/audio_coding_module_unittest.cc",
2013 "acm2/call_statistics_unittest.cc",
2014 "acm2/codec_manager_unittest.cc",
2015 "acm2/rent_a_codec_unittest.cc",
2016 "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc",
2017 "audio_network_adaptor/bitrate_controller_unittest.cc",
2018 "audio_network_adaptor/channel_controller_unittest.cc",
2019 "audio_network_adaptor/controller_manager_unittest.cc",
2020 "audio_network_adaptor/dtx_controller_unittest.cc",
minyue4b7c9522017-01-24 04:54:59 -08002021 "audio_network_adaptor/event_log_writer_unittest.cc",
elad.alon6d7900d2017-03-24 04:12:56 -07002022 "audio_network_adaptor/fec_controller_plr_based_unittest.cc",
2023 "audio_network_adaptor/fec_controller_rplr_based_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002024 "audio_network_adaptor/frame_length_controller_unittest.cc",
2025 "audio_network_adaptor/mock/mock_controller.h",
2026 "audio_network_adaptor/mock/mock_controller_manager.h",
elad.alon326263a2017-03-29 03:16:58 -07002027 "audio_network_adaptor/util/threshold_curve_unittest.cc",
kwiberg087bd342017-02-10 08:15:44 -08002028 "codecs/builtin_audio_decoder_factory_unittest.cc",
ossua1a040a2017-04-06 10:03:21 -07002029 "codecs/builtin_audio_encoder_factory_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002030 "codecs/cng/audio_encoder_cng_unittest.cc",
2031 "codecs/cng/cng_unittest.cc",
2032 "codecs/ilbc/ilbc_unittest.cc",
2033 "codecs/isac/fix/source/filterbanks_unittest.cc",
2034 "codecs/isac/fix/source/filters_unittest.cc",
2035 "codecs/isac/fix/source/lpc_masking_model_unittest.cc",
2036 "codecs/isac/fix/source/transform_unittest.cc",
2037 "codecs/isac/main/source/audio_encoder_isac_unittest.cc",
2038 "codecs/isac/main/source/isac_unittest.cc",
2039 "codecs/isac/unittest.cc",
2040 "codecs/legacy_encoded_audio_frame_unittest.cc",
2041 "codecs/mock/mock_audio_encoder.cc",
2042 "codecs/opus/audio_encoder_opus_unittest.cc",
2043 "codecs/opus/opus_unittest.cc",
2044 "codecs/red/audio_encoder_copy_red_unittest.cc",
2045 "neteq/audio_multi_vector_unittest.cc",
2046 "neteq/audio_vector_unittest.cc",
2047 "neteq/background_noise_unittest.cc",
2048 "neteq/buffer_level_filter_unittest.cc",
2049 "neteq/comfort_noise_unittest.cc",
2050 "neteq/decision_logic_unittest.cc",
2051 "neteq/decoder_database_unittest.cc",
2052 "neteq/delay_manager_unittest.cc",
2053 "neteq/delay_peak_detector_unittest.cc",
2054 "neteq/dsp_helper_unittest.cc",
2055 "neteq/dtmf_buffer_unittest.cc",
2056 "neteq/dtmf_tone_generator_unittest.cc",
2057 "neteq/expand_unittest.cc",
2058 "neteq/merge_unittest.cc",
2059 "neteq/mock/mock_audio_decoder.h",
2060 "neteq/mock/mock_buffer_level_filter.h",
2061 "neteq/mock/mock_decoder_database.h",
2062 "neteq/mock/mock_delay_manager.h",
2063 "neteq/mock/mock_delay_peak_detector.h",
2064 "neteq/mock/mock_dtmf_buffer.h",
2065 "neteq/mock/mock_dtmf_tone_generator.h",
2066 "neteq/mock/mock_expand.h",
2067 "neteq/mock/mock_external_decoder_pcm16b.h",
2068 "neteq/mock/mock_packet_buffer.h",
2069 "neteq/mock/mock_red_payload_splitter.h",
2070 "neteq/nack_tracker_unittest.cc",
2071 "neteq/neteq_external_decoder_unittest.cc",
2072 "neteq/neteq_impl_unittest.cc",
2073 "neteq/neteq_network_stats_unittest.cc",
2074 "neteq/neteq_stereo_unittest.cc",
2075 "neteq/neteq_unittest.cc",
2076 "neteq/normal_unittest.cc",
2077 "neteq/packet_buffer_unittest.cc",
2078 "neteq/post_decode_vad_unittest.cc",
2079 "neteq/random_vector_unittest.cc",
2080 "neteq/red_payload_splitter_unittest.cc",
2081 "neteq/sync_buffer_unittest.cc",
2082 "neteq/tick_timer_unittest.cc",
2083 "neteq/time_stretch_unittest.cc",
2084 "neteq/timestamp_scaler_unittest.cc",
2085 "neteq/tools/input_audio_file_unittest.cc",
2086 "neteq/tools/packet_unittest.cc",
2087 ]
2088
2089 deps = [
2090 ":acm_receive_test",
2091 ":acm_send_test",
2092 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08002093 ":audio_coding_module_typedefs",
ehmaldonado36268652017-01-19 08:27:11 -08002094 ":audio_encoder_interface",
2095 ":audio_format_conversion",
2096 ":audio_network_adaptor",
ossua1a040a2017-04-06 10:03:21 -07002097 ":builtin_audio_encoder_factory",
ehmaldonado36268652017-01-19 08:27:11 -08002098 ":cng",
2099 ":g711",
2100 ":ilbc",
kwiberga6ca5182017-01-30 05:28:54 -08002101 ":isac",
ehmaldonado36268652017-01-19 08:27:11 -08002102 ":isac_c",
2103 ":isac_fix",
kwiberg087bd342017-02-10 08:15:44 -08002104 ":legacy_encoded_audio_frame",
ehmaldonado36268652017-01-19 08:27:11 -08002105 ":neteq",
2106 ":neteq_test_support",
2107 ":neteq_unittest_tools",
2108 ":pcm16b",
2109 ":red",
2110 ":rent_a_codec",
2111 ":webrtc_opus",
2112 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08002113 "../../api/audio_codecs:audio_codecs_api",
2114 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonado36268652017-01-19 08:27:11 -08002115 "../../base:rtc_base",
2116 "../../base:rtc_base_approved",
2117 "../../base:rtc_base_tests_utils",
2118 "../../common_audio",
2119 "../../system_wrappers:system_wrappers",
2120 "../../test:field_trial",
2121 "../../test:rtp_test_utils",
2122 "../../test:test_common",
2123 "../../test:test_support",
2124 "//testing/gmock",
2125 "//testing/gtest",
2126 "//third_party/gflags",
2127 ]
2128
2129 defines = audio_coding_defines
2130
2131 if (rtc_enable_protobuf) {
2132 defines += [
2133 "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP",
2134 "WEBRTC_NETEQ_UNITTEST_BITEXACT",
2135 ]
2136 deps += [
2137 ":ana_config_proto",
2138 ":neteq_unittest_proto",
2139 ]
2140 }
2141
2142 if (!build_with_chromium && is_clang) {
2143 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
2144 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
2145 }
2146 }
kjellanderfb114242016-06-13 00:19:48 -07002147}
kwiberg087bd342017-02-10 08:15:44 -08002148
2149# For backwards compatibility only! Use
2150# webrtc/api/audio_codecs:audio_codecs_api instead.
2151# TODO(kwiberg): Remove this.
2152rtc_source_set("audio_decoder_interface") {
2153 sources = [
2154 "codecs/audio_decoder.h",
2155 ]
2156 deps = [
2157 "../../api/audio_codecs:audio_codecs_api",
2158 ]
2159}
2160
2161# For backwards compatibility only! Use
2162# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2163# TODO(kwiberg): Remove this.
2164rtc_source_set("builtin_audio_decoder_factory") {
2165 sources = [
2166 "codecs/builtin_audio_decoder_factory.h",
2167 ]
2168 deps = [
2169 "../../api/audio_codecs:builtin_audio_decoder_factory",
2170 ]
2171}