blob: 1d4a9d429f7edd800ce520da872987319e84a0f3 [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 = [
Patrik Höglunda36d0e22017-12-04 10:11:11 +000022 "aec/aec_core.cc",
23 "aec/aec_core.h",
24 "aec/aec_core_optimized_methods.h",
peah88950cf2016-03-04 00:12:40 -080025 "aec/aec_resampler.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000026 "aec/aec_resampler.h",
peah8df5d4f2016-02-23 14:34:59 -080027 "aec/echo_cancellation.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010028 "aec/echo_cancellation.h",
peah522d71b2017-02-23 05:16:26 -080029 "aec3/adaptive_fir_filter.cc",
30 "aec3/adaptive_fir_filter.h",
31 "aec3/aec3_common.cc",
32 "aec3/aec3_common.h",
33 "aec3/aec3_fft.cc",
34 "aec3/aec3_fft.h",
35 "aec3/aec_state.cc",
36 "aec3/aec_state.h",
peahd0263542017-01-03 04:20:34 -080037 "aec3/block_framer.cc",
38 "aec3/block_framer.h",
39 "aec3/block_processor.cc",
40 "aec3/block_processor.h",
peahe985b3f2017-02-28 22:08:53 -080041 "aec3/block_processor_metrics.cc",
42 "aec3/block_processor_metrics.h",
peahd0263542017-01-03 04:20:34 -080043 "aec3/cascaded_biquad_filter.cc",
44 "aec3/cascaded_biquad_filter.h",
peah522d71b2017-02-23 05:16:26 -080045 "aec3/comfort_noise_generator.cc",
46 "aec3/comfort_noise_generator.h",
Per Åhgren38e2d952017-11-17 14:54:28 +010047 "aec3/decimator.cc",
48 "aec3/decimator.h",
peahcf02cf12017-04-05 14:18:07 -070049 "aec3/downsampled_render_buffer.cc",
50 "aec3/downsampled_render_buffer.h",
peahe0eae3c2016-12-14 01:16:23 -080051 "aec3/echo_canceller3.cc",
52 "aec3/echo_canceller3.h",
peah69221db2017-01-27 03:28:19 -080053 "aec3/echo_path_delay_estimator.cc",
54 "aec3/echo_path_delay_estimator.h",
peah522d71b2017-02-23 05:16:26 -080055 "aec3/echo_path_variability.cc",
peah69221db2017-01-27 03:28:19 -080056 "aec3/echo_path_variability.h",
57 "aec3/echo_remover.cc",
58 "aec3/echo_remover.h",
peahe985b3f2017-02-28 22:08:53 -080059 "aec3/echo_remover_metrics.cc",
60 "aec3/echo_remover_metrics.h",
peah522d71b2017-02-23 05:16:26 -080061 "aec3/erl_estimator.cc",
62 "aec3/erl_estimator.h",
63 "aec3/erle_estimator.cc",
64 "aec3/erle_estimator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010065 "aec3/fft_buffer.cc",
66 "aec3/fft_buffer.h",
peah522d71b2017-02-23 05:16:26 -080067 "aec3/fft_data.h",
peahd0263542017-01-03 04:20:34 -080068 "aec3/frame_blocker.cc",
69 "aec3/frame_blocker.h",
peah522d71b2017-02-23 05:16:26 -080070 "aec3/main_filter_update_gain.cc",
71 "aec3/main_filter_update_gain.h",
peah21920892017-02-08 05:08:56 -080072 "aec3/matched_filter.cc",
73 "aec3/matched_filter.h",
74 "aec3/matched_filter_lag_aggregator.cc",
75 "aec3/matched_filter_lag_aggregator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010076 "aec3/matrix_buffer.cc",
77 "aec3/matrix_buffer.h",
peah522d71b2017-02-23 05:16:26 -080078 "aec3/output_selector.cc",
79 "aec3/output_selector.h",
peahcf02cf12017-04-05 14:18:07 -070080 "aec3/render_buffer.cc",
81 "aec3/render_buffer.h",
peah69221db2017-01-27 03:28:19 -080082 "aec3/render_delay_buffer.cc",
83 "aec3/render_delay_buffer.h",
84 "aec3/render_delay_controller.cc",
85 "aec3/render_delay_controller.h",
peahe985b3f2017-02-28 22:08:53 -080086 "aec3/render_delay_controller_metrics.cc",
87 "aec3/render_delay_controller_metrics.h",
peah522d71b2017-02-23 05:16:26 -080088 "aec3/render_signal_analyzer.cc",
89 "aec3/render_signal_analyzer.h",
90 "aec3/residual_echo_estimator.cc",
91 "aec3/residual_echo_estimator.h",
92 "aec3/shadow_filter_update_gain.cc",
93 "aec3/shadow_filter_update_gain.h",
94 "aec3/subtractor.cc",
95 "aec3/subtractor.h",
96 "aec3/subtractor_output.h",
97 "aec3/suppression_filter.cc",
98 "aec3/suppression_filter.h",
99 "aec3/suppression_gain.cc",
100 "aec3/suppression_gain.h",
Per Åhgren8ba58612017-12-01 23:01:44 +0100101 "aec3/vector_buffer.cc",
102 "aec3/vector_buffer.h",
peah5e79b292017-04-12 01:20:45 -0700103 "aec3/vector_math.h",
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000104 "aecm/aecm_core.cc",
105 "aecm/aecm_core.h",
106 "aecm/echo_control_mobile.cc",
107 "aecm/echo_control_mobile.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000108 "agc/agc.cc",
109 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000110 "agc/agc_manager_direct.cc",
111 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000112 "agc/gain_map_internal.h",
peahbbe42332016-06-08 06:42:02 -0700113 "agc/loudness_histogram.cc",
114 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000115 "agc/utility.cc",
116 "agc/utility.h",
alessiob3ec96df2017-05-22 06:57:06 -0700117 "agc2/gain_controller2.cc",
118 "agc2/gain_controller2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000119 "audio_buffer.cc",
120 "audio_buffer.h",
121 "audio_processing_impl.cc",
122 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -0700123 "beamformer/array_util.cc",
124 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000125 "beamformer/complex_matrix.h",
126 "beamformer/covariance_matrix_generator.cc",
127 "beamformer/covariance_matrix_generator.h",
128 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +0000129 "beamformer/nonlinear_beamformer.cc",
130 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000131 "common.h",
132 "echo_cancellation_impl.cc",
133 "echo_cancellation_impl.h",
134 "echo_control_mobile_impl.cc",
135 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -0700136 "echo_detector/circular_buffer.cc",
137 "echo_detector/circular_buffer.h",
138 "echo_detector/mean_variance_estimator.cc",
139 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -0800140 "echo_detector/moving_max.cc",
141 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -0700142 "echo_detector/normalized_covariance_estimator.cc",
143 "echo_detector/normalized_covariance_estimator.h",
peahbe615622016-02-13 16:40:47 -0800144 "gain_control_for_experimental_agc.cc",
145 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000146 "gain_control_impl.cc",
147 "gain_control_impl.h",
peahc19f3122016-10-07 14:54:10 -0700148 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000149 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -0700150 "include/config.cc",
151 "include/config.h",
peahca4cac72016-06-29 15:26:12 -0700152 "level_controller/biquad_filter.cc",
153 "level_controller/biquad_filter.h",
154 "level_controller/down_sampler.cc",
155 "level_controller/down_sampler.h",
156 "level_controller/gain_applier.cc",
157 "level_controller/gain_applier.h",
158 "level_controller/gain_selector.cc",
159 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -0700160 "level_controller/level_controller.cc",
161 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -0700162 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -0700163 "level_controller/noise_level_estimator.cc",
164 "level_controller/noise_level_estimator.h",
165 "level_controller/noise_spectrum_estimator.cc",
166 "level_controller/noise_spectrum_estimator.h",
167 "level_controller/peak_level_estimator.cc",
168 "level_controller/peak_level_estimator.h",
169 "level_controller/saturating_gain_estimator.cc",
170 "level_controller/saturating_gain_estimator.h",
171 "level_controller/signal_classifier.cc",
172 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000173 "level_estimator_impl.cc",
174 "level_estimator_impl.h",
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000175 "logging/apm_data_dumper.cc",
176 "logging/apm_data_dumper.h",
peah8271d042016-11-22 07:24:52 -0800177 "low_cut_filter.cc",
178 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000179 "noise_suppression_impl.cc",
180 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800181 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700182 "residual_echo_detector.cc",
183 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000184 "rms_level.cc",
185 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000186 "splitting_filter.cc",
187 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700188 "three_band_filter_bank.cc",
189 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000190 "transient/common.h",
191 "transient/daubechies_8_wavelet_coeffs.h",
192 "transient/dyadic_decimator.h",
193 "transient/moving_moments.cc",
194 "transient/moving_moments.h",
195 "transient/transient_detector.cc",
196 "transient/transient_detector.h",
197 "transient/transient_suppressor.cc",
198 "transient/transient_suppressor.h",
199 "transient/wpd_node.cc",
200 "transient/wpd_node.h",
201 "transient/wpd_tree.cc",
202 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000203 "typing_detection.cc",
204 "typing_detection.h",
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000205 "utility/block_mean_calculator.cc",
206 "utility/block_mean_calculator.h",
207 "utility/delay_estimator.cc",
208 "utility/delay_estimator.h",
209 "utility/delay_estimator_internal.h",
210 "utility/delay_estimator_wrapper.cc",
211 "utility/delay_estimator_wrapper.h",
212 "utility/ooura_fft.cc",
213 "utility/ooura_fft.h",
214 "utility/ooura_fft_tables_common.h",
aluebsecf6b812015-06-25 12:28:48 -0700215 "vad/common.h",
216 "vad/gmm.cc",
217 "vad/gmm.h",
218 "vad/noise_gmm_tables.h",
219 "vad/pitch_based_vad.cc",
220 "vad/pitch_based_vad.h",
221 "vad/pitch_internal.cc",
222 "vad/pitch_internal.h",
223 "vad/pole_zero_filter.cc",
224 "vad/pole_zero_filter.h",
225 "vad/standalone_vad.cc",
226 "vad/standalone_vad.h",
227 "vad/vad_audio_proc.cc",
228 "vad/vad_audio_proc.h",
229 "vad/vad_audio_proc_internal.h",
230 "vad/vad_circular_buffer.cc",
231 "vad/vad_circular_buffer.h",
232 "vad/voice_activity_detector.cc",
233 "vad/voice_activity_detector.h",
234 "vad/voice_gmm_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000235 "voice_detection_impl.cc",
236 "voice_detection_impl.h",
237 ]
238
239 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200240 deps = [
aleloi868f32f2017-05-23 07:20:05 -0700241 ":aec_dump_interface",
Mirko Bonadei10679932017-12-05 15:07:16 +0100242 ":audio_processing_c",
Ivo Creusen56d46092017-11-24 17:29:59 +0100243 ":audio_processing_statistics",
mbonadei1140f972017-04-26 03:38:35 -0700244 "..:module_api",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200245 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700246 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700247 "../../api:optional",
aleloi6321b492016-12-05 01:46:09 -0800248 "../../audio/utility:audio_frame_operations",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700249 "../../rtc_base:gtest_prod",
250 "../../rtc_base:protobuf_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100251 "../../system_wrappers:cpu_features_api",
252 "../../system_wrappers:metrics_api",
kwiberg98ab3a42015-09-30 21:54:21 -0700253 "../audio_coding:isac",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200254 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000255
peahf28a3892016-09-01 08:58:21 -0700256 if (apm_debug_dump) {
257 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700258 } else {
peahf28a3892016-09-01 08:58:21 -0700259 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000260 }
261
262 if (aec_untrusted_delay_for_testing) {
263 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
264 }
265
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000266 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000267 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
268 deps += [ ":audioproc_debug_proto" ]
269 }
270
peah1bcfce52016-08-26 07:16:04 -0700271 if (rtc_enable_intelligibility_enhancer) {
272 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
273 sources += [
274 "intelligibility/intelligibility_enhancer.cc",
275 "intelligibility/intelligibility_enhancer.h",
276 "intelligibility/intelligibility_utils.cc",
277 "intelligibility/intelligibility_utils.h",
278 ]
279 } else {
280 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
281 }
282
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000283 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000284 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000285 } else {
286 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000287 }
288
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000289 if (current_cpu == "x86" || current_cpu == "x64") {
290 deps += [ ":audio_processing_sse2" ]
291 }
292
293 if (rtc_build_with_neon) {
294 deps += [ ":audio_processing_neon" ]
295 }
296
297 if (current_cpu == "mipsel") {
298 sources += [ "aecm/aecm_core_mips.cc" ]
299 if (mips_float_abi == "hard") {
300 sources += [
301 "aec/aec_core_mips.cc",
302 "utility/ooura_fft_mips.cc",
303 ]
304 }
305 } else {
306 sources += [ "aecm/aecm_core_c.cc" ]
307 }
308
kjellander8f4419b2016-06-02 02:09:52 -0700309 # TODO(jschuh): Bug 1348: fix this warning.
310 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000311
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000312 deps += [
313 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100314 "../../common_audio:fir_filter",
315 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700316 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000317 "../../system_wrappers",
318 ]
319}
320
Ivo Creusen56d46092017-11-24 17:29:59 +0100321rtc_source_set("audio_processing_statistics") {
322 sources = [
323 "include/audio_processing_statistics.cc",
324 "include/audio_processing_statistics.h",
325 ]
326 deps = [
327 "../../api:optional",
328 ]
329}
330
aleloi868f32f2017-05-23 07:20:05 -0700331rtc_source_set("aec_dump_interface") {
332 sources = [
333 "include/aec_dump.cc",
334 "include/aec_dump.h",
335 ]
336
337 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700338 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700339 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700340 ]
341}
342
kjellander7439f972016-12-05 22:47:46 -0800343rtc_source_set("audio_processing_c") {
344 visibility = [ ":*" ] # Only targets in this file can depend on this.
345 sources = [
346 "agc/legacy/analog_agc.c",
347 "agc/legacy/analog_agc.h",
348 "agc/legacy/digital_agc.c",
349 "agc/legacy/digital_agc.h",
350 "agc/legacy/gain_control.h",
351 ]
352
353 if (rtc_prefer_fixed_point) {
354 sources += [
355 "ns/noise_suppression_x.c",
356 "ns/noise_suppression_x.h",
357 "ns/nsx_core.c",
358 "ns/nsx_core.h",
359 "ns/nsx_defines.h",
360 ]
361 if (current_cpu == "mipsel") {
362 sources += [ "ns/nsx_core_mips.c" ]
363 } else {
364 sources += [ "ns/nsx_core_c.c" ]
365 }
366 } else {
367 sources += [
368 "ns/defines.h",
369 "ns/noise_suppression.c",
370 "ns/noise_suppression.h",
371 "ns/ns_core.c",
372 "ns/ns_core.h",
373 "ns/windows_private.h",
374 ]
375 }
376
377 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800378 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800379 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700380 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100381 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800382 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800383
384 if (rtc_build_with_neon) {
385 deps += [ ":audio_processing_neon_c" ]
386 }
kjellander7439f972016-12-05 22:47:46 -0800387}
388
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000389if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000390 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200391 sources = [
392 "debug.proto",
393 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000394
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200395 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000396 }
397}
398
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000399if (current_cpu == "x86" || current_cpu == "x64") {
kjellanderb62dbbe2016-09-23 00:38:52 -0700400 rtc_static_library("audio_processing_sse2") {
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000401 # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828)
402 # Errors on cyclic dependency with :audio_processing if enabled.
403 check_includes = false
404
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000405 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800406 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700407 "utility/ooura_fft_sse2.cc",
408 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000409 ]
410
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200411 if (is_posix) {
412 cflags = [ "-msse2" ]
413 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000414
peahf28a3892016-09-01 08:58:21 -0700415 if (apm_debug_dump) {
416 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700417 } else {
peahf28a3892016-09-01 08:58:21 -0700418 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
peahb46083e2016-05-03 07:01:18 -0700419 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000420 }
421}
422
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700423if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700424 rtc_static_library("audio_processing_neon") {
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000425 # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828)
426 # Errors on cyclic dependency with :audio_processing if enabled.
427 check_includes = false
428
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000429 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800430 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700431 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700432 "utility/ooura_fft_neon.cc",
433 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000434 ]
435
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000436 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700437 # Enable compilation for the NEON instruction set. This is needed
438 # since //build/config/arm.gni only enables NEON for iOS, not Android.
439 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700440 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200441 cflags = [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000442 }
443
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700444 # Disable LTO on NEON targets due to compiler bug.
445 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000446 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000447 cflags -= [
448 "-flto",
449 "-ffat-lto-objects",
450 ]
451 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700452
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700453 deps = [
kjellander7439f972016-12-05 22:47:46 -0800454 ":audio_processing_neon_c",
Mirko Bonadei10679932017-12-05 15:07:16 +0100455 "../../common_audio",
kjellander7439f972016-12-05 22:47:46 -0800456 ]
peahb46083e2016-05-03 07:01:18 -0700457
peahf28a3892016-09-01 08:58:21 -0700458 if (apm_debug_dump) {
459 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700460 } else {
peahf28a3892016-09-01 08:58:21 -0700461 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
peahb46083e2016-05-03 07:01:18 -0700462 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000463 }
kjellander7439f972016-12-05 22:47:46 -0800464
465 rtc_static_library("audio_processing_neon_c") {
mbonadeie5dc3ce2017-01-25 05:34:46 -0800466 # TODO(mbonadei): Remove (bugs.webrtc.org/6828)
467 # Errors on cyclic dependency with :audio_processing_c if enabled.
468 check_includes = false
469
kjellander7439f972016-12-05 22:47:46 -0800470 sources = [
471 "ns/nsx_core_neon.c",
472 ]
473
474 if (current_cpu != "arm64") {
475 # Enable compilation for the NEON instruction set. This is needed
476 # since //build/config/arm.gni only enables NEON for iOS, not Android.
477 # This provides the same functionality as webrtc/build/arm_neon.gypi.
478 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
479 cflags = [ "-mfpu=neon" ]
480 }
481
482 # Disable LTO on NEON targets due to compiler bug.
483 # TODO(fdegans): Enable this. See crbug.com/408997.
484 if (rtc_use_lto) {
485 cflags -= [
486 "-flto",
487 "-ffat-lto-objects",
488 ]
489 }
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800490 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700491 "../../rtc_base:rtc_base_approved",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800492 ]
kjellander7439f972016-12-05 22:47:46 -0800493 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000494}
kjellanderfb114242016-06-13 00:19:48 -0700495
496if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -0700497 group("audio_processing_tests") {
498 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100499 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700500 ":audioproc_test_utils",
501 ":click_annotate",
502 ":nonlinear_beamformer_test",
503 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700504 ]
505
506 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100507 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700508 }
509
510 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100511 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800512 ":audioproc_f",
513 ":audioproc_unittest_proto",
514 ":unpack_aecdump",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200515 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700516 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800517 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800518 ]
kjellander6ceab082016-10-28 05:44:03 -0700519 }
520 }
521
ehmaldonado36268652017-01-19 08:27:11 -0800522 rtc_source_set("audio_processing_unittests") {
523 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700524
ehmaldonado36268652017-01-19 08:27:11 -0800525 sources = [
526 "aec/echo_cancellation_unittest.cc",
527 "aec/system_delay_unittest.cc",
528 "agc/agc_manager_direct_unittest.cc",
529 "agc/loudness_histogram_unittest.cc",
530 "agc/mock_agc.h",
531 "audio_buffer_unittest.cc",
532 "beamformer/array_util_unittest.cc",
533 "beamformer/complex_matrix_unittest.cc",
534 "beamformer/covariance_matrix_generator_unittest.cc",
535 "beamformer/matrix_unittest.cc",
536 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800537 "config_unittest.cc",
538 "echo_cancellation_impl_unittest.cc",
539 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200540 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800541 "transient/dyadic_decimator_unittest.cc",
542 "transient/file_utils.cc",
543 "transient/file_utils.h",
544 "transient/file_utils_unittest.cc",
545 "transient/moving_moments_unittest.cc",
546 "transient/transient_detector_unittest.cc",
547 "transient/transient_suppressor_unittest.cc",
548 "transient/wpd_node_unittest.cc",
549 "transient/wpd_tree_unittest.cc",
550 "utility/block_mean_calculator_unittest.cc",
551 "utility/delay_estimator_unittest.cc",
552 "vad/gmm_unittest.cc",
553 "vad/pitch_based_vad_unittest.cc",
554 "vad/pitch_internal_unittest.cc",
555 "vad/pole_zero_filter_unittest.cc",
556 "vad/standalone_vad_unittest.cc",
557 "vad/vad_audio_proc_unittest.cc",
558 "vad/vad_circular_buffer_unittest.cc",
559 "vad/voice_activity_detector_unittest.cc",
560 ]
561
562 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200563 ":analog_mic_simulation",
ehmaldonado36268652017-01-19 08:27:11 -0800564 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800565 ":audioproc_test_utils",
mbonadei1140f972017-04-26 03:38:35 -0700566 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800567 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700568 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700569 "../../api:optional",
ehmaldonado36268652017-01-19 08:27:11 -0800570 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700571 "../../rtc_base:gtest_prod",
572 "../../rtc_base:protobuf_utils",
573 "../../rtc_base:rtc_base",
574 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100575 "../../system_wrappers",
576 "../../system_wrappers:cpu_features_api",
ehmaldonado36268652017-01-19 08:27:11 -0800577 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200578 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700579 "aec_dump:mock_aec_dump_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700580 "test/conversational_speech:unittest",
ehmaldonado36268652017-01-19 08:27:11 -0800581 "//testing/gmock",
582 "//testing/gtest",
583 ]
584
585 defines = []
586
587 if (apm_debug_dump) {
588 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
589 } else {
590 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
591 }
592
593 if (rtc_enable_intelligibility_enhancer) {
594 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
595 sources += [
596 "intelligibility/intelligibility_enhancer_unittest.cc",
597 "intelligibility/intelligibility_utils_unittest.cc",
598 ]
599 } else {
600 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
601 }
602
603 if (rtc_prefer_fixed_point) {
604 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
605 } else {
606 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
607 }
608
609 if (rtc_enable_protobuf) {
610 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
611 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800612 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800613 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200614 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800615 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700616 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700617 "aec_dump",
618 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800619 ]
620 sources += [
peah522d71b2017-02-23 05:16:26 -0800621 "aec3/adaptive_fir_filter_unittest.cc",
622 "aec3/aec3_fft_unittest.cc",
623 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800624 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800625 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800626 "aec3/block_processor_unittest.cc",
627 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800628 "aec3/comfort_noise_generator_unittest.cc",
Per Åhgren38e2d952017-11-17 14:54:28 +0100629 "aec3/decimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800630 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800631 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800632 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800633 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800634 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800635 "aec3/erl_estimator_unittest.cc",
636 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800637 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800638 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800639 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800640 "aec3/matched_filter_lag_aggregator_unittest.cc",
641 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800642 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700643 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800644 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800645 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800646 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800647 "aec3/render_signal_analyzer_unittest.cc",
648 "aec3/residual_echo_estimator_unittest.cc",
649 "aec3/shadow_filter_update_gain_unittest.cc",
650 "aec3/subtractor_unittest.cc",
651 "aec3/suppression_filter_unittest.cc",
652 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700653 "aec3/vector_math_unittest.cc",
alessiob3ec96df2017-05-22 06:57:06 -0700654 "agc2/gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800655 "audio_processing_impl_locking_unittest.cc",
656 "audio_processing_impl_unittest.cc",
657 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800658 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800659 "echo_cancellation_bit_exact_unittest.cc",
660 "echo_control_mobile_unittest.cc",
661 "echo_detector/circular_buffer_unittest.cc",
662 "echo_detector/mean_variance_estimator_unittest.cc",
663 "echo_detector/moving_max_unittest.cc",
664 "echo_detector/normalized_covariance_estimator_unittest.cc",
665 "gain_control_unittest.cc",
666 "level_controller/level_controller_unittest.cc",
667 "level_estimator_unittest.cc",
668 "low_cut_filter_unittest.cc",
669 "noise_suppression_unittest.cc",
670 "residual_echo_detector_unittest.cc",
671 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800672 "test/debug_dump_replayer.cc",
673 "test/debug_dump_replayer.h",
674 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800675 "test/echo_canceller_test_tools.cc",
676 "test/echo_canceller_test_tools.h",
677 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800678 "test/test_utils.h",
679 "voice_detection_unittest.cc",
680 ]
681 }
682
683 if ((!build_with_chromium || is_win) && is_clang) {
684 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
685 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
686 }
687 }
688
ehmaldonado021eef32017-01-05 07:09:50 -0800689 rtc_source_set("audio_processing_perf_tests") {
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000690 # Has problems with autogenerated targets on Android and iOS
691 # Dependency chain (there may also be others):
692 # :audio_processing_perf_tests -->
693 # ..:modules_unittests --[private]-->
694 # ..:modules_unittests_apk -->
695 # ..:modules_unittests_apk__create -->
696 # ..:modules_unittests_apk__create__finalize -->
697 # ..:modules_unittests_apk__create__package --[private]-->
698 # ..:_modules_unittests__library
699 check_includes = false
ehmaldonado021eef32017-01-05 07:09:50 -0800700 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700701
ehmaldonado021eef32017-01-05 07:09:50 -0800702 sources = [
703 "audio_processing_performance_unittest.cc",
704 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800705 ]
706 deps = [
707 ":audio_processing",
708 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100709 "../../api:array_view",
710 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700711 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100712 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100713 "../../system_wrappers",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100714 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800715 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700716
ehmaldonado021eef32017-01-05 07:09:50 -0800717 if (rtc_enable_intelligibility_enhancer) {
718 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
719 } else {
720 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
721 }
722 }
723
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200724 rtc_source_set("analog_mic_simulation") {
725 sources = [
726 "test/fake_recording_device.cc",
727 "test/fake_recording_device.h",
728 ]
729 deps = [
730 "../../api:array_view",
731 "../../common_audio:common_audio",
732 "../../modules:module_api",
733 "../../rtc_base:rtc_base_approved",
734 ]
735 }
736
ehmaldonado1fd08c12017-01-17 02:37:34 -0800737 if (rtc_enable_protobuf) {
738 rtc_executable("unpack_aecdump") {
739 testonly = true
740 sources = [
741 "test/unpack.cc",
742 ]
peahc3ec1fd2016-08-07 23:19:30 -0700743
ehmaldonado1fd08c12017-01-17 02:37:34 -0800744 deps = [
745 ":audio_processing",
746 ":audioproc_debug_proto",
747 ":audioproc_protobuf_utils",
748 ":audioproc_test_utils",
749 "../..:webrtc_common",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800750 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700751 "../../rtc_base:protobuf_utils",
752 "../../rtc_base:rtc_base_approved",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800753 "../../system_wrappers:system_wrappers_default",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800754 ]
755 } # unpack_aecdump
peahc3ec1fd2016-08-07 23:19:30 -0700756
ehmaldonado1fd08c12017-01-17 02:37:34 -0800757 rtc_executable("audioproc_f") {
758 testonly = true
759 sources = [
760 "test/aec_dump_based_simulator.cc",
761 "test/aec_dump_based_simulator.h",
762 "test/audio_processing_simulator.cc",
763 "test/audio_processing_simulator.h",
764 "test/audioproc_float.cc",
765 "test/wav_based_simulator.cc",
766 "test/wav_based_simulator.h",
767 ]
peahc3ec1fd2016-08-07 23:19:30 -0700768
ehmaldonado1fd08c12017-01-17 02:37:34 -0800769 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200770 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800771 ":audio_processing",
772 ":audioproc_debug_proto",
773 ":audioproc_protobuf_utils",
774 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700775 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800776 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700777 "../../rtc_base:protobuf_utils",
778 "../../rtc_base:rtc_base_approved",
779 "../../rtc_base:rtc_task_queue",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800780 "../../system_wrappers",
781 "../../system_wrappers:system_wrappers_default",
782 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700783 "aec_dump",
784 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800785 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800786 ]
787 } # audioproc_f
788 }
peahc3ec1fd2016-08-07 23:19:30 -0700789
ehmaldonado38a21322016-09-02 04:10:34 -0700790 rtc_source_set("audioproc_test_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700791 testonly = true
792 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700793 "test/audio_buffer_tools.cc",
794 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200795 "test/bitexactness_tools.cc",
796 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800797 "test/performance_timer.cc",
798 "test/performance_timer.h",
799 "test/simulator_buffers.cc",
800 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700801 "test/test_utils.cc",
802 "test/test_utils.h",
803 ]
804
kjellanderfb114242016-06-13 00:19:48 -0700805 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800806 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700807 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700808 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700809 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700810 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700811 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100812 "../../system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200813 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200814 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200815 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700816 ]
817 }
818
ehmaldonado38a21322016-09-02 04:10:34 -0700819 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700820 testonly = true
821 sources = [
822 "transient/file_utils.cc",
823 "transient/file_utils.h",
824 "transient/transient_suppression_test.cc",
825 ]
826 deps = [
827 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700828 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800829 "../..:webrtc_common",
830 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700831 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100832 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700833 "../../test:test_support",
834 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700835 ]
kwiberg7a770e02016-08-25 02:32:43 -0700836 }
837
ehmaldonado38a21322016-09-02 04:10:34 -0700838 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700839 testonly = true
840 sources = [
841 "transient/click_annotate.cc",
842 "transient/file_utils.cc",
843 "transient/file_utils.h",
844 ]
845 deps = [
846 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800847 "../..:webrtc_common",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100848 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700849 "../../system_wrappers:metrics_default",
850 ]
851 }
852
ehmaldonado38a21322016-09-02 04:10:34 -0700853 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700854 testonly = true
855 sources = [
856 "beamformer/nonlinear_beamformer_test.cc",
857 ]
858 deps = [
859 ":audio_processing",
860 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800861 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700862 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700863 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700864 ]
kwiberg7a770e02016-08-25 02:32:43 -0700865 }
866
peah1bcfce52016-08-26 07:16:04 -0700867 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700868 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700869 testonly = true
870 sources = [
871 "intelligibility/test/intelligibility_proc.cc",
872 ]
873 deps = [
874 ":audio_processing",
875 ":audioproc_test_utils",
oprypin6e09d872017-08-31 03:21:39 -0700876 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700877 "../../system_wrappers:metrics_default",
878 "../../test:test_support",
879 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700880 ]
kwiberg7a770e02016-08-25 02:32:43 -0700881 }
882 }
883
kjellanderfb114242016-06-13 00:19:48 -0700884 if (rtc_enable_protobuf) {
885 proto_library("audioproc_unittest_proto") {
886 sources = [
887 "test/unittest.proto",
888 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200889 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700890 }
891
kjellanderb62dbbe2016-09-23 00:38:52 -0700892 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700893 sources = [
894 "test/protobuf_utils.cc",
895 "test/protobuf_utils.h",
896 ]
897
898 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700899 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800900 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700901 "../../rtc_base:protobuf_utils",
902 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700903 ]
904 }
905 }
906}