blob: 4b53c39cc07b54bc4ac5ea50c2708b5e477e9237 [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
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00009import("//build/config/arm.gni")
10import("//third_party/protobuf/proto_library.gni")
mbonadei9aa3f0a2017-01-24 06:58:22 -080011import("../../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000012
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000013declare_args() {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000014 # Disables the usual mode where we trust the reported system delay
15 # values the AEC receives. The corresponding define is set appropriately
16 # in the code, but it can be force-enabled here for testing.
17 aec_untrusted_delay_for_testing = false
18}
19
kjellanderb62dbbe2016-09-23 00:38:52 -070020rtc_static_library("audio_processing") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000021 sources = [
peah88950cf2016-03-04 00:12:40 -080022 "aec/aec_resampler.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000023 "aec/aec_resampler.h",
peah8df5d4f2016-02-23 14:34:59 -080024 "aec/echo_cancellation.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010025 "aec/echo_cancellation.h",
peah522d71b2017-02-23 05:16:26 -080026 "aec3/adaptive_fir_filter.cc",
27 "aec3/adaptive_fir_filter.h",
28 "aec3/aec3_common.cc",
29 "aec3/aec3_common.h",
30 "aec3/aec3_fft.cc",
31 "aec3/aec3_fft.h",
32 "aec3/aec_state.cc",
33 "aec3/aec_state.h",
peahd0263542017-01-03 04:20:34 -080034 "aec3/block_framer.cc",
35 "aec3/block_framer.h",
36 "aec3/block_processor.cc",
37 "aec3/block_processor.h",
peahe985b3f2017-02-28 22:08:53 -080038 "aec3/block_processor_metrics.cc",
39 "aec3/block_processor_metrics.h",
peahd0263542017-01-03 04:20:34 -080040 "aec3/cascaded_biquad_filter.cc",
41 "aec3/cascaded_biquad_filter.h",
peah522d71b2017-02-23 05:16:26 -080042 "aec3/comfort_noise_generator.cc",
43 "aec3/comfort_noise_generator.h",
Per Åhgren38e2d952017-11-17 14:54:28 +010044 "aec3/decimator.cc",
45 "aec3/decimator.h",
peahcf02cf12017-04-05 14:18:07 -070046 "aec3/downsampled_render_buffer.cc",
47 "aec3/downsampled_render_buffer.h",
peahe0eae3c2016-12-14 01:16:23 -080048 "aec3/echo_canceller3.cc",
49 "aec3/echo_canceller3.h",
peah69221db2017-01-27 03:28:19 -080050 "aec3/echo_path_delay_estimator.cc",
51 "aec3/echo_path_delay_estimator.h",
peah522d71b2017-02-23 05:16:26 -080052 "aec3/echo_path_variability.cc",
peah69221db2017-01-27 03:28:19 -080053 "aec3/echo_path_variability.h",
54 "aec3/echo_remover.cc",
55 "aec3/echo_remover.h",
peahe985b3f2017-02-28 22:08:53 -080056 "aec3/echo_remover_metrics.cc",
57 "aec3/echo_remover_metrics.h",
peah522d71b2017-02-23 05:16:26 -080058 "aec3/erl_estimator.cc",
59 "aec3/erl_estimator.h",
60 "aec3/erle_estimator.cc",
61 "aec3/erle_estimator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010062 "aec3/fft_buffer.cc",
63 "aec3/fft_buffer.h",
peah522d71b2017-02-23 05:16:26 -080064 "aec3/fft_data.h",
peahd0263542017-01-03 04:20:34 -080065 "aec3/frame_blocker.cc",
66 "aec3/frame_blocker.h",
peah522d71b2017-02-23 05:16:26 -080067 "aec3/main_filter_update_gain.cc",
68 "aec3/main_filter_update_gain.h",
peah21920892017-02-08 05:08:56 -080069 "aec3/matched_filter.cc",
70 "aec3/matched_filter.h",
71 "aec3/matched_filter_lag_aggregator.cc",
72 "aec3/matched_filter_lag_aggregator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010073 "aec3/matrix_buffer.cc",
74 "aec3/matrix_buffer.h",
peah522d71b2017-02-23 05:16:26 -080075 "aec3/output_selector.cc",
76 "aec3/output_selector.h",
peahcf02cf12017-04-05 14:18:07 -070077 "aec3/render_buffer.cc",
78 "aec3/render_buffer.h",
peah69221db2017-01-27 03:28:19 -080079 "aec3/render_delay_buffer.cc",
80 "aec3/render_delay_buffer.h",
81 "aec3/render_delay_controller.cc",
82 "aec3/render_delay_controller.h",
peahe985b3f2017-02-28 22:08:53 -080083 "aec3/render_delay_controller_metrics.cc",
84 "aec3/render_delay_controller_metrics.h",
peah522d71b2017-02-23 05:16:26 -080085 "aec3/render_signal_analyzer.cc",
86 "aec3/render_signal_analyzer.h",
87 "aec3/residual_echo_estimator.cc",
88 "aec3/residual_echo_estimator.h",
89 "aec3/shadow_filter_update_gain.cc",
90 "aec3/shadow_filter_update_gain.h",
91 "aec3/subtractor.cc",
92 "aec3/subtractor.h",
93 "aec3/subtractor_output.h",
94 "aec3/suppression_filter.cc",
95 "aec3/suppression_filter.h",
96 "aec3/suppression_gain.cc",
97 "aec3/suppression_gain.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010098 "aec3/vector_buffer.cc",
99 "aec3/vector_buffer.h",
peah5e79b292017-04-12 01:20:45 -0700100 "aec3/vector_math.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000101 "agc/agc.cc",
102 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000103 "agc/agc_manager_direct.cc",
104 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000105 "agc/gain_map_internal.h",
peahbbe42332016-06-08 06:42:02 -0700106 "agc/loudness_histogram.cc",
107 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000108 "agc/utility.cc",
109 "agc/utility.h",
alessiob3ec96df2017-05-22 06:57:06 -0700110 "agc2/gain_controller2.cc",
111 "agc2/gain_controller2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000112 "audio_buffer.cc",
113 "audio_buffer.h",
114 "audio_processing_impl.cc",
115 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -0700116 "beamformer/array_util.cc",
117 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000118 "beamformer/complex_matrix.h",
119 "beamformer/covariance_matrix_generator.cc",
120 "beamformer/covariance_matrix_generator.h",
121 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +0000122 "beamformer/nonlinear_beamformer.cc",
123 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000124 "common.h",
125 "echo_cancellation_impl.cc",
126 "echo_cancellation_impl.h",
127 "echo_control_mobile_impl.cc",
128 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -0700129 "echo_detector/circular_buffer.cc",
130 "echo_detector/circular_buffer.h",
131 "echo_detector/mean_variance_estimator.cc",
132 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -0800133 "echo_detector/moving_max.cc",
134 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -0700135 "echo_detector/normalized_covariance_estimator.cc",
136 "echo_detector/normalized_covariance_estimator.h",
peahbe615622016-02-13 16:40:47 -0800137 "gain_control_for_experimental_agc.cc",
138 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000139 "gain_control_impl.cc",
140 "gain_control_impl.h",
peahc19f3122016-10-07 14:54:10 -0700141 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000142 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -0700143 "include/config.cc",
144 "include/config.h",
peahca4cac72016-06-29 15:26:12 -0700145 "level_controller/biquad_filter.cc",
146 "level_controller/biquad_filter.h",
147 "level_controller/down_sampler.cc",
148 "level_controller/down_sampler.h",
149 "level_controller/gain_applier.cc",
150 "level_controller/gain_applier.h",
151 "level_controller/gain_selector.cc",
152 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -0700153 "level_controller/level_controller.cc",
154 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -0700155 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -0700156 "level_controller/noise_level_estimator.cc",
157 "level_controller/noise_level_estimator.h",
158 "level_controller/noise_spectrum_estimator.cc",
159 "level_controller/noise_spectrum_estimator.h",
160 "level_controller/peak_level_estimator.cc",
161 "level_controller/peak_level_estimator.h",
162 "level_controller/saturating_gain_estimator.cc",
163 "level_controller/saturating_gain_estimator.h",
164 "level_controller/signal_classifier.cc",
165 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000166 "level_estimator_impl.cc",
167 "level_estimator_impl.h",
peah8271d042016-11-22 07:24:52 -0800168 "low_cut_filter.cc",
169 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000170 "noise_suppression_impl.cc",
171 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800172 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700173 "residual_echo_detector.cc",
174 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000175 "rms_level.cc",
176 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000177 "splitting_filter.cc",
178 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700179 "three_band_filter_bank.cc",
180 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000181 "transient/common.h",
182 "transient/daubechies_8_wavelet_coeffs.h",
183 "transient/dyadic_decimator.h",
184 "transient/moving_moments.cc",
185 "transient/moving_moments.h",
186 "transient/transient_detector.cc",
187 "transient/transient_detector.h",
188 "transient/transient_suppressor.cc",
189 "transient/transient_suppressor.h",
190 "transient/wpd_node.cc",
191 "transient/wpd_node.h",
192 "transient/wpd_tree.cc",
193 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000194 "typing_detection.cc",
195 "typing_detection.h",
aluebsecf6b812015-06-25 12:28:48 -0700196 "vad/common.h",
197 "vad/gmm.cc",
198 "vad/gmm.h",
199 "vad/noise_gmm_tables.h",
200 "vad/pitch_based_vad.cc",
201 "vad/pitch_based_vad.h",
202 "vad/pitch_internal.cc",
203 "vad/pitch_internal.h",
204 "vad/pole_zero_filter.cc",
205 "vad/pole_zero_filter.h",
206 "vad/standalone_vad.cc",
207 "vad/standalone_vad.h",
208 "vad/vad_audio_proc.cc",
209 "vad/vad_audio_proc.h",
210 "vad/vad_audio_proc_internal.h",
211 "vad/vad_circular_buffer.cc",
212 "vad/vad_circular_buffer.h",
213 "vad/voice_activity_detector.cc",
214 "vad/voice_activity_detector.h",
215 "vad/voice_gmm_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000216 "voice_detection_impl.cc",
217 "voice_detection_impl.h",
218 ]
219
220 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200221 deps = [
Patrik Höglund0af83702017-12-01 11:15:28 +0100222 ":aec_core",
aleloi868f32f2017-05-23 07:20:05 -0700223 ":aec_dump_interface",
Patrik Höglund0af83702017-12-01 11:15:28 +0100224 ":apm_logging",
Ivo Creusen56d46092017-11-24 17:29:59 +0100225 ":audio_processing_statistics",
mbonadei1140f972017-04-26 03:38:35 -0700226 "..:module_api",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200227 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700228 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700229 "../../api:optional",
aleloi6321b492016-12-05 01:46:09 -0800230 "../../audio/utility:audio_frame_operations",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700231 "../../rtc_base:gtest_prod",
232 "../../rtc_base:protobuf_utils",
kwiberg98ab3a42015-09-30 21:54:21 -0700233 "../audio_coding:isac",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200234 ]
kjellander7439f972016-12-05 22:47:46 -0800235 public_deps = [
236 ":audio_processing_c",
237 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000238
peahf28a3892016-09-01 08:58:21 -0700239 if (apm_debug_dump) {
240 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700241 } else {
peahf28a3892016-09-01 08:58:21 -0700242 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000243 }
244
245 if (aec_untrusted_delay_for_testing) {
246 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
247 }
248
Patrik Höglund0af83702017-12-01 11:15:28 +0100249 if (current_cpu == "x86" || current_cpu == "x64") {
250 deps += [ ":audio_processing_sse2" ]
251 }
252
253 if (rtc_build_with_neon) {
254 deps += [ ":audio_processing_neon" ]
255 }
256
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000257 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000258 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
259 deps += [ ":audioproc_debug_proto" ]
260 }
261
peah1bcfce52016-08-26 07:16:04 -0700262 if (rtc_enable_intelligibility_enhancer) {
263 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
264 sources += [
265 "intelligibility/intelligibility_enhancer.cc",
266 "intelligibility/intelligibility_enhancer.h",
267 "intelligibility/intelligibility_utils.cc",
268 "intelligibility/intelligibility_utils.h",
269 ]
270 } else {
271 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
272 }
273
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000274 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000275 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000276 } else {
277 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000278 }
279
kjellander8f4419b2016-06-02 02:09:52 -0700280 # TODO(jschuh): Bug 1348: fix this warning.
281 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000282
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000283 deps += [
284 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100285 "../../common_audio:fir_filter",
286 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700287 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000288 "../../system_wrappers",
289 ]
290}
291
Ivo Creusen56d46092017-11-24 17:29:59 +0100292rtc_source_set("audio_processing_statistics") {
293 sources = [
294 "include/audio_processing_statistics.cc",
295 "include/audio_processing_statistics.h",
296 ]
297 deps = [
298 "../../api:optional",
299 ]
300}
301
aleloi868f32f2017-05-23 07:20:05 -0700302rtc_source_set("aec_dump_interface") {
303 sources = [
304 "include/aec_dump.cc",
305 "include/aec_dump.h",
306 ]
307
308 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700309 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700310 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700311 ]
312}
313
kjellander7439f972016-12-05 22:47:46 -0800314rtc_source_set("audio_processing_c") {
315 visibility = [ ":*" ] # Only targets in this file can depend on this.
316 sources = [
317 "agc/legacy/analog_agc.c",
318 "agc/legacy/analog_agc.h",
319 "agc/legacy/digital_agc.c",
320 "agc/legacy/digital_agc.h",
321 "agc/legacy/gain_control.h",
322 ]
323
324 if (rtc_prefer_fixed_point) {
325 sources += [
326 "ns/noise_suppression_x.c",
327 "ns/noise_suppression_x.h",
328 "ns/nsx_core.c",
329 "ns/nsx_core.h",
330 "ns/nsx_defines.h",
331 ]
332 if (current_cpu == "mipsel") {
333 sources += [ "ns/nsx_core_mips.c" ]
334 } else {
335 sources += [ "ns/nsx_core_c.c" ]
336 }
337 } else {
338 sources += [
339 "ns/defines.h",
340 "ns/noise_suppression.c",
341 "ns/noise_suppression.h",
342 "ns/ns_core.c",
343 "ns/ns_core.h",
344 "ns/windows_private.h",
345 ]
346 }
347
348 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800349 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800350 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700351 "../../rtc_base:rtc_base_approved",
kjellander7439f972016-12-05 22:47:46 -0800352 "../../system_wrappers",
353 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800354
355 if (rtc_build_with_neon) {
356 deps += [ ":audio_processing_neon_c" ]
357 }
kjellander7439f972016-12-05 22:47:46 -0800358}
359
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000360if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000361 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200362 sources = [
363 "debug.proto",
364 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000365
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200366 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000367 }
368}
369
Patrik Höglund0af83702017-12-01 11:15:28 +0100370rtc_source_set("apm_logging") {
371 sources = [
372 "logging/apm_data_dumper.cc",
373 "logging/apm_data_dumper.h",
374 ]
375 deps = [
376 "../../api:array_view",
377 "../../common_audio:common_audio",
378 "../../rtc_base:rtc_base_approved",
379 ]
380 defines = []
381 if (apm_debug_dump) {
382 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
383 } else {
384 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
385 }
386}
387
388rtc_source_set("aec_core") {
389 sources = [
390 "aec/aec_core.cc",
391 "aec/aec_core.h",
392 "aec/aec_core_optimized_methods.h",
393 "aecm/aecm_core.cc",
394 "aecm/aecm_core.h",
395 "aecm/echo_control_mobile.cc",
396 "aecm/echo_control_mobile.h",
397 "utility/block_mean_calculator.cc",
398 "utility/block_mean_calculator.h",
399 "utility/delay_estimator.cc",
400 "utility/delay_estimator.h",
401 "utility/delay_estimator_internal.h",
402 "utility/delay_estimator_wrapper.cc",
403 "utility/delay_estimator_wrapper.h",
404 "utility/ooura_fft.cc",
405 "utility/ooura_fft.h",
406 "utility/ooura_fft_tables_common.h",
407 ]
408 deps = [
409 ":apm_logging",
410 ":audio_processing_statistics",
411 "../..:webrtc_common",
412 "../../common_audio:common_audio",
413 "../../rtc_base:rtc_base_approved",
414 "../../system_wrappers:cpu_features_api",
415 "../../system_wrappers:metrics_api",
416 ]
417
418 if (current_cpu == "mipsel") {
419 sources += [ "aecm/aecm_core_mips.cc" ]
420 if (mips_float_abi == "hard") {
421 sources += [
422 "aec/aec_core_mips.cc",
423 "utility/ooura_fft_mips.cc",
424 ]
425 }
426 } else {
427 sources += [ "aecm/aecm_core_c.cc" ]
428 }
429 defines = []
430 if (apm_debug_dump) {
431 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
432 } else {
433 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
434 }
435}
436
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000437if (current_cpu == "x86" || current_cpu == "x64") {
kjellanderb62dbbe2016-09-23 00:38:52 -0700438 rtc_static_library("audio_processing_sse2") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000439 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800440 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700441 "utility/ooura_fft_sse2.cc",
442 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000443 ]
444
Patrik Höglund0af83702017-12-01 11:15:28 +0100445 deps = [
446 ":aec_core",
447 "../../common_audio:common_audio",
448 ]
449
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200450 if (is_posix) {
451 cflags = [ "-msse2" ]
452 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000453
peahf28a3892016-09-01 08:58:21 -0700454 if (apm_debug_dump) {
455 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700456 } else {
peahf28a3892016-09-01 08:58:21 -0700457 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
peahb46083e2016-05-03 07:01:18 -0700458 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000459 }
460}
461
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700462if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700463 rtc_static_library("audio_processing_neon") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000464 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800465 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700466 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700467 "utility/ooura_fft_neon.cc",
468 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000469 ]
470
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000471 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700472 # Enable compilation for the NEON instruction set. This is needed
473 # since //build/config/arm.gni only enables NEON for iOS, not Android.
474 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700475 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200476 cflags = [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000477 }
478
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700479 # Disable LTO on NEON targets due to compiler bug.
480 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000481 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000482 cflags -= [
483 "-flto",
484 "-ffat-lto-objects",
485 ]
486 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700487
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700488 deps = [
Patrik Höglund0af83702017-12-01 11:15:28 +0100489 ":aec_core",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700490 "../../common_audio",
Patrik Höglund0af83702017-12-01 11:15:28 +0100491 "../../rtc_base:rtc_base_approved",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700492 ]
kjellander7439f972016-12-05 22:47:46 -0800493 public_deps = [
494 ":audio_processing_neon_c",
495 ]
peahb46083e2016-05-03 07:01:18 -0700496
peahf28a3892016-09-01 08:58:21 -0700497 if (apm_debug_dump) {
498 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700499 } else {
peahf28a3892016-09-01 08:58:21 -0700500 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
peahb46083e2016-05-03 07:01:18 -0700501 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000502 }
kjellander7439f972016-12-05 22:47:46 -0800503
504 rtc_static_library("audio_processing_neon_c") {
mbonadeie5dc3ce2017-01-25 05:34:46 -0800505 # TODO(mbonadei): Remove (bugs.webrtc.org/6828)
506 # Errors on cyclic dependency with :audio_processing_c if enabled.
507 check_includes = false
508
kjellander7439f972016-12-05 22:47:46 -0800509 sources = [
510 "ns/nsx_core_neon.c",
511 ]
512
513 if (current_cpu != "arm64") {
514 # Enable compilation for the NEON instruction set. This is needed
515 # since //build/config/arm.gni only enables NEON for iOS, not Android.
516 # This provides the same functionality as webrtc/build/arm_neon.gypi.
517 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
518 cflags = [ "-mfpu=neon" ]
519 }
520
521 # Disable LTO on NEON targets due to compiler bug.
522 # TODO(fdegans): Enable this. See crbug.com/408997.
523 if (rtc_use_lto) {
524 cflags -= [
525 "-flto",
526 "-ffat-lto-objects",
527 ]
528 }
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800529 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700530 "../../rtc_base:rtc_base_approved",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800531 ]
kjellander7439f972016-12-05 22:47:46 -0800532 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000533}
kjellanderfb114242016-06-13 00:19:48 -0700534
535if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -0700536 group("audio_processing_tests") {
537 testonly = true
538 public_deps = [
kjellander6ceab082016-10-28 05:44:03 -0700539 ":audioproc_test_utils",
540 ":click_annotate",
541 ":nonlinear_beamformer_test",
542 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700543 ]
544
545 if (rtc_enable_intelligibility_enhancer) {
546 public_deps += [ ":intelligibility_proc" ]
547 }
548
549 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800550 public_deps += [
551 ":audioproc_f",
552 ":audioproc_unittest_proto",
553 ":unpack_aecdump",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200554 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700555 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800556 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800557 ]
kjellander6ceab082016-10-28 05:44:03 -0700558 }
559 }
560
ehmaldonado36268652017-01-19 08:27:11 -0800561 rtc_source_set("audio_processing_unittests") {
562 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700563
ehmaldonado36268652017-01-19 08:27:11 -0800564 sources = [
565 "aec/echo_cancellation_unittest.cc",
566 "aec/system_delay_unittest.cc",
567 "agc/agc_manager_direct_unittest.cc",
568 "agc/loudness_histogram_unittest.cc",
569 "agc/mock_agc.h",
570 "audio_buffer_unittest.cc",
571 "beamformer/array_util_unittest.cc",
572 "beamformer/complex_matrix_unittest.cc",
573 "beamformer/covariance_matrix_generator_unittest.cc",
574 "beamformer/matrix_unittest.cc",
575 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800576 "config_unittest.cc",
577 "echo_cancellation_impl_unittest.cc",
578 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200579 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800580 "transient/dyadic_decimator_unittest.cc",
581 "transient/file_utils.cc",
582 "transient/file_utils.h",
583 "transient/file_utils_unittest.cc",
584 "transient/moving_moments_unittest.cc",
585 "transient/transient_detector_unittest.cc",
586 "transient/transient_suppressor_unittest.cc",
587 "transient/wpd_node_unittest.cc",
588 "transient/wpd_tree_unittest.cc",
589 "utility/block_mean_calculator_unittest.cc",
590 "utility/delay_estimator_unittest.cc",
591 "vad/gmm_unittest.cc",
592 "vad/pitch_based_vad_unittest.cc",
593 "vad/pitch_internal_unittest.cc",
594 "vad/pole_zero_filter_unittest.cc",
595 "vad/standalone_vad_unittest.cc",
596 "vad/vad_audio_proc_unittest.cc",
597 "vad/vad_circular_buffer_unittest.cc",
598 "vad/voice_activity_detector_unittest.cc",
599 ]
600
601 deps = [
Patrik Höglund0af83702017-12-01 11:15:28 +0100602 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200603 ":analog_mic_simulation",
Patrik Höglund0af83702017-12-01 11:15:28 +0100604 ":apm_logging",
ehmaldonado36268652017-01-19 08:27:11 -0800605 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800606 ":audioproc_test_utils",
mbonadei1140f972017-04-26 03:38:35 -0700607 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800608 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700609 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700610 "../../api:optional",
ehmaldonado36268652017-01-19 08:27:11 -0800611 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700612 "../../rtc_base:gtest_prod",
613 "../../rtc_base:protobuf_utils",
614 "../../rtc_base:rtc_base",
615 "../../rtc_base:rtc_base_approved",
ehmaldonado36268652017-01-19 08:27:11 -0800616 "../../system_wrappers:system_wrappers",
617 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200618 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700619 "aec_dump:mock_aec_dump_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700620 "test/conversational_speech:unittest",
ehmaldonado36268652017-01-19 08:27:11 -0800621 "//testing/gmock",
622 "//testing/gtest",
623 ]
624
625 defines = []
626
627 if (apm_debug_dump) {
628 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
629 } else {
630 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
631 }
632
633 if (rtc_enable_intelligibility_enhancer) {
634 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
635 sources += [
636 "intelligibility/intelligibility_enhancer_unittest.cc",
637 "intelligibility/intelligibility_utils_unittest.cc",
638 ]
639 } else {
640 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
641 }
642
643 if (rtc_prefer_fixed_point) {
644 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
645 } else {
646 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
647 }
648
649 if (rtc_enable_protobuf) {
650 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
651 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800652 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800653 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200654 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800655 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700656 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700657 "aec_dump",
658 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800659 ]
660 sources += [
peah522d71b2017-02-23 05:16:26 -0800661 "aec3/adaptive_fir_filter_unittest.cc",
662 "aec3/aec3_fft_unittest.cc",
663 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800664 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800665 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800666 "aec3/block_processor_unittest.cc",
667 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800668 "aec3/comfort_noise_generator_unittest.cc",
Per Åhgren38e2d952017-11-17 14:54:28 +0100669 "aec3/decimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800670 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800671 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800672 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800673 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800674 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800675 "aec3/erl_estimator_unittest.cc",
676 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800677 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800678 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800679 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800680 "aec3/matched_filter_lag_aggregator_unittest.cc",
681 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800682 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700683 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800684 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800685 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800686 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800687 "aec3/render_signal_analyzer_unittest.cc",
688 "aec3/residual_echo_estimator_unittest.cc",
689 "aec3/shadow_filter_update_gain_unittest.cc",
690 "aec3/subtractor_unittest.cc",
691 "aec3/suppression_filter_unittest.cc",
692 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700693 "aec3/vector_math_unittest.cc",
alessiob3ec96df2017-05-22 06:57:06 -0700694 "agc2/gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800695 "audio_processing_impl_locking_unittest.cc",
696 "audio_processing_impl_unittest.cc",
697 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800698 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800699 "echo_cancellation_bit_exact_unittest.cc",
700 "echo_control_mobile_unittest.cc",
701 "echo_detector/circular_buffer_unittest.cc",
702 "echo_detector/mean_variance_estimator_unittest.cc",
703 "echo_detector/moving_max_unittest.cc",
704 "echo_detector/normalized_covariance_estimator_unittest.cc",
705 "gain_control_unittest.cc",
706 "level_controller/level_controller_unittest.cc",
707 "level_estimator_unittest.cc",
708 "low_cut_filter_unittest.cc",
709 "noise_suppression_unittest.cc",
710 "residual_echo_detector_unittest.cc",
711 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800712 "test/debug_dump_replayer.cc",
713 "test/debug_dump_replayer.h",
714 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800715 "test/echo_canceller_test_tools.cc",
716 "test/echo_canceller_test_tools.h",
717 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800718 "test/test_utils.h",
719 "voice_detection_unittest.cc",
720 ]
721 }
722
723 if ((!build_with_chromium || is_win) && is_clang) {
724 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
725 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
726 }
727 }
728
ehmaldonado021eef32017-01-05 07:09:50 -0800729 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800730 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700731
ehmaldonado021eef32017-01-05 07:09:50 -0800732 sources = [
733 "audio_processing_performance_unittest.cc",
734 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800735 ]
736 deps = [
737 ":audio_processing",
738 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100739 "../../api:array_view",
740 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700741 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100742 "../../rtc_base:rtc_base_approved",
743 "../../system_wrappers:system_wrappers",
744 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800745 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700746
ehmaldonado021eef32017-01-05 07:09:50 -0800747 if (rtc_enable_intelligibility_enhancer) {
748 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
749 } else {
750 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
751 }
752 }
753
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200754 rtc_source_set("analog_mic_simulation") {
755 sources = [
756 "test/fake_recording_device.cc",
757 "test/fake_recording_device.h",
758 ]
759 deps = [
760 "../../api:array_view",
761 "../../common_audio:common_audio",
762 "../../modules:module_api",
763 "../../rtc_base:rtc_base_approved",
764 ]
765 }
766
ehmaldonado1fd08c12017-01-17 02:37:34 -0800767 if (rtc_enable_protobuf) {
768 rtc_executable("unpack_aecdump") {
769 testonly = true
770 sources = [
771 "test/unpack.cc",
772 ]
peahc3ec1fd2016-08-07 23:19:30 -0700773
ehmaldonado1fd08c12017-01-17 02:37:34 -0800774 deps = [
775 ":audio_processing",
776 ":audioproc_debug_proto",
777 ":audioproc_protobuf_utils",
778 ":audioproc_test_utils",
779 "../..:webrtc_common",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800780 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700781 "../../rtc_base:protobuf_utils",
782 "../../rtc_base:rtc_base_approved",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800783 "../../system_wrappers:system_wrappers_default",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800784 ]
785 } # unpack_aecdump
peahc3ec1fd2016-08-07 23:19:30 -0700786
ehmaldonado1fd08c12017-01-17 02:37:34 -0800787 rtc_executable("audioproc_f") {
788 testonly = true
789 sources = [
790 "test/aec_dump_based_simulator.cc",
791 "test/aec_dump_based_simulator.h",
792 "test/audio_processing_simulator.cc",
793 "test/audio_processing_simulator.h",
794 "test/audioproc_float.cc",
795 "test/wav_based_simulator.cc",
796 "test/wav_based_simulator.h",
797 ]
peahc3ec1fd2016-08-07 23:19:30 -0700798
ehmaldonado1fd08c12017-01-17 02:37:34 -0800799 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200800 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800801 ":audio_processing",
802 ":audioproc_debug_proto",
803 ":audioproc_protobuf_utils",
804 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700805 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800806 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700807 "../../rtc_base:protobuf_utils",
808 "../../rtc_base:rtc_base_approved",
809 "../../rtc_base:rtc_task_queue",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800810 "../../system_wrappers",
811 "../../system_wrappers:system_wrappers_default",
812 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700813 "aec_dump",
814 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800815 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800816 ]
817 } # audioproc_f
818 }
peahc3ec1fd2016-08-07 23:19:30 -0700819
ehmaldonado38a21322016-09-02 04:10:34 -0700820 rtc_source_set("audioproc_test_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700821 testonly = true
822 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700823 "test/audio_buffer_tools.cc",
824 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200825 "test/bitexactness_tools.cc",
826 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800827 "test/performance_timer.cc",
828 "test/performance_timer.h",
829 "test/simulator_buffers.cc",
830 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700831 "test/test_utils.cc",
832 "test/test_utils.h",
833 ]
834
kjellanderfb114242016-06-13 00:19:48 -0700835 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800836 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700837 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700838 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700839 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700840 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700841 "../../rtc_base:rtc_base_approved",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800842 "../../system_wrappers:system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200843 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200844 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200845 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700846 ]
847 }
848
ehmaldonado38a21322016-09-02 04:10:34 -0700849 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700850 testonly = true
851 sources = [
852 "transient/file_utils.cc",
853 "transient/file_utils.h",
854 "transient/transient_suppression_test.cc",
855 ]
856 deps = [
857 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700858 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800859 "../..:webrtc_common",
860 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700861 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700862 "../../system_wrappers:metrics_default",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800863 "../../system_wrappers:system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700864 "../../test:test_support",
865 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700866 ]
kwiberg7a770e02016-08-25 02:32:43 -0700867 }
868
ehmaldonado38a21322016-09-02 04:10:34 -0700869 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700870 testonly = true
871 sources = [
872 "transient/click_annotate.cc",
873 "transient/file_utils.cc",
874 "transient/file_utils.h",
875 ]
876 deps = [
877 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800878 "../..:webrtc_common",
kwiberg7a770e02016-08-25 02:32:43 -0700879 "../../system_wrappers:metrics_default",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800880 "../../system_wrappers:system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700881 ]
882 }
883
ehmaldonado38a21322016-09-02 04:10:34 -0700884 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700885 testonly = true
886 sources = [
887 "beamformer/nonlinear_beamformer_test.cc",
888 ]
889 deps = [
890 ":audio_processing",
891 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800892 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700893 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700894 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700895 ]
kwiberg7a770e02016-08-25 02:32:43 -0700896 }
897
peah1bcfce52016-08-26 07:16:04 -0700898 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700899 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700900 testonly = true
901 sources = [
902 "intelligibility/test/intelligibility_proc.cc",
903 ]
904 deps = [
905 ":audio_processing",
906 ":audioproc_test_utils",
oprypin6e09d872017-08-31 03:21:39 -0700907 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700908 "../../system_wrappers:metrics_default",
909 "../../test:test_support",
910 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700911 ]
kwiberg7a770e02016-08-25 02:32:43 -0700912 }
913 }
914
kjellanderfb114242016-06-13 00:19:48 -0700915 if (rtc_enable_protobuf) {
916 proto_library("audioproc_unittest_proto") {
917 sources = [
918 "test/unittest.proto",
919 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200920 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700921 }
922
kjellanderb62dbbe2016-09-23 00:38:52 -0700923 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700924 sources = [
925 "test/protobuf_utils.cc",
926 "test/protobuf_utils.h",
927 ]
928
929 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700930 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800931 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700932 "../../rtc_base:protobuf_utils",
933 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700934 ]
935 }
936 }
937}