blob: dfd74bee00550ad665e3ae8f5300def5042ffb1d [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")
mbonadei9aa3f0a2017-01-24 06:58:22 -080010import("../../webrtc.gni")
Dan Minor9c686132018-01-15 10:20:00 -050011if (!build_with_mozilla) {
12 import("//third_party/protobuf/proto_library.gni")
13}
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000014
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000015declare_args() {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000016 # Disables the usual mode where we trust the reported system delay
17 # values the AEC receives. The corresponding define is set appropriately
18 # in the code, but it can be force-enabled here for testing.
19 aec_untrusted_delay_for_testing = false
20}
21
Patrik Höglundd75c8dc2017-12-19 09:45:24 +010022config("apm_debug_dump") {
23 if (apm_debug_dump) {
24 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
25 } else {
26 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
27 }
28}
29
kjellanderb62dbbe2016-09-23 00:38:52 -070030rtc_static_library("audio_processing") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000031 visibility = [ "*" ]
Patrik Höglundd75c8dc2017-12-19 09:45:24 +010032 configs += [ ":apm_debug_dump" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000033 sources = [
peah88950cf2016-03-04 00:12:40 -080034 "aec/aec_resampler.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000035 "aec/aec_resampler.h",
peah8df5d4f2016-02-23 14:34:59 -080036 "aec/echo_cancellation.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010037 "aec/echo_cancellation.h",
peah522d71b2017-02-23 05:16:26 -080038 "aec3/adaptive_fir_filter.cc",
39 "aec3/adaptive_fir_filter.h",
40 "aec3/aec3_common.cc",
41 "aec3/aec3_common.h",
42 "aec3/aec3_fft.cc",
43 "aec3/aec3_fft.h",
44 "aec3/aec_state.cc",
45 "aec3/aec_state.h",
peahd0263542017-01-03 04:20:34 -080046 "aec3/block_framer.cc",
47 "aec3/block_framer.h",
48 "aec3/block_processor.cc",
49 "aec3/block_processor.h",
peahe985b3f2017-02-28 22:08:53 -080050 "aec3/block_processor_metrics.cc",
51 "aec3/block_processor_metrics.h",
peahd0263542017-01-03 04:20:34 -080052 "aec3/cascaded_biquad_filter.cc",
53 "aec3/cascaded_biquad_filter.h",
peah522d71b2017-02-23 05:16:26 -080054 "aec3/comfort_noise_generator.cc",
55 "aec3/comfort_noise_generator.h",
Per Åhgren38e2d952017-11-17 14:54:28 +010056 "aec3/decimator.cc",
57 "aec3/decimator.h",
Per Åhgrena76ef9d2018-01-25 07:01:34 +010058 "aec3/delay_estimate.h",
peahcf02cf12017-04-05 14:18:07 -070059 "aec3/downsampled_render_buffer.cc",
60 "aec3/downsampled_render_buffer.h",
peahe0eae3c2016-12-14 01:16:23 -080061 "aec3/echo_canceller3.cc",
62 "aec3/echo_canceller3.h",
peah69221db2017-01-27 03:28:19 -080063 "aec3/echo_path_delay_estimator.cc",
64 "aec3/echo_path_delay_estimator.h",
peah522d71b2017-02-23 05:16:26 -080065 "aec3/echo_path_variability.cc",
peah69221db2017-01-27 03:28:19 -080066 "aec3/echo_path_variability.h",
67 "aec3/echo_remover.cc",
68 "aec3/echo_remover.h",
peahe985b3f2017-02-28 22:08:53 -080069 "aec3/echo_remover_metrics.cc",
70 "aec3/echo_remover_metrics.h",
peah522d71b2017-02-23 05:16:26 -080071 "aec3/erl_estimator.cc",
72 "aec3/erl_estimator.h",
73 "aec3/erle_estimator.cc",
74 "aec3/erle_estimator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010075 "aec3/fft_buffer.cc",
76 "aec3/fft_buffer.h",
peah522d71b2017-02-23 05:16:26 -080077 "aec3/fft_data.h",
peahd0263542017-01-03 04:20:34 -080078 "aec3/frame_blocker.cc",
79 "aec3/frame_blocker.h",
peah522d71b2017-02-23 05:16:26 -080080 "aec3/main_filter_update_gain.cc",
81 "aec3/main_filter_update_gain.h",
peah21920892017-02-08 05:08:56 -080082 "aec3/matched_filter.cc",
83 "aec3/matched_filter.h",
84 "aec3/matched_filter_lag_aggregator.cc",
85 "aec3/matched_filter_lag_aggregator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010086 "aec3/matrix_buffer.cc",
87 "aec3/matrix_buffer.h",
peah522d71b2017-02-23 05:16:26 -080088 "aec3/output_selector.cc",
89 "aec3/output_selector.h",
peahcf02cf12017-04-05 14:18:07 -070090 "aec3/render_buffer.cc",
91 "aec3/render_buffer.h",
peah69221db2017-01-27 03:28:19 -080092 "aec3/render_delay_buffer.cc",
93 "aec3/render_delay_buffer.h",
94 "aec3/render_delay_controller.cc",
95 "aec3/render_delay_controller.h",
peahe985b3f2017-02-28 22:08:53 -080096 "aec3/render_delay_controller_metrics.cc",
97 "aec3/render_delay_controller_metrics.h",
peah522d71b2017-02-23 05:16:26 -080098 "aec3/render_signal_analyzer.cc",
99 "aec3/render_signal_analyzer.h",
100 "aec3/residual_echo_estimator.cc",
101 "aec3/residual_echo_estimator.h",
102 "aec3/shadow_filter_update_gain.cc",
103 "aec3/shadow_filter_update_gain.h",
104 "aec3/subtractor.cc",
105 "aec3/subtractor.h",
106 "aec3/subtractor_output.h",
107 "aec3/suppression_filter.cc",
108 "aec3/suppression_filter.h",
109 "aec3/suppression_gain.cc",
110 "aec3/suppression_gain.h",
Per Åhgren8ba58612017-12-01 23:01:44 +0100111 "aec3/vector_buffer.cc",
112 "aec3/vector_buffer.h",
peah5e79b292017-04-12 01:20:45 -0700113 "aec3/vector_math.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000114 "agc/agc.cc",
115 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000116 "agc/agc_manager_direct.cc",
117 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000118 "agc/gain_map_internal.h",
peahbbe42332016-06-08 06:42:02 -0700119 "agc/loudness_histogram.cc",
120 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000121 "agc/utility.cc",
122 "agc/utility.h",
alessiob3ec96df2017-05-22 06:57:06 -0700123 "agc2/gain_controller2.cc",
124 "agc2/gain_controller2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000125 "audio_buffer.cc",
126 "audio_buffer.h",
127 "audio_processing_impl.cc",
128 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -0700129 "beamformer/array_util.cc",
130 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000131 "beamformer/complex_matrix.h",
132 "beamformer/covariance_matrix_generator.cc",
133 "beamformer/covariance_matrix_generator.h",
134 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +0000135 "beamformer/nonlinear_beamformer.cc",
136 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000137 "common.h",
138 "echo_cancellation_impl.cc",
139 "echo_cancellation_impl.h",
140 "echo_control_mobile_impl.cc",
141 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -0700142 "echo_detector/circular_buffer.cc",
143 "echo_detector/circular_buffer.h",
144 "echo_detector/mean_variance_estimator.cc",
145 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -0800146 "echo_detector/moving_max.cc",
147 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -0700148 "echo_detector/normalized_covariance_estimator.cc",
149 "echo_detector/normalized_covariance_estimator.h",
peahbe615622016-02-13 16:40:47 -0800150 "gain_control_for_experimental_agc.cc",
151 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000152 "gain_control_impl.cc",
153 "gain_control_impl.h",
peahc19f3122016-10-07 14:54:10 -0700154 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000155 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -0700156 "include/config.cc",
157 "include/config.h",
Gustaf Ullberg8e467df2018-02-05 14:39:38 +0100158 "include/echo_control.h",
peahca4cac72016-06-29 15:26:12 -0700159 "level_controller/biquad_filter.cc",
160 "level_controller/biquad_filter.h",
161 "level_controller/down_sampler.cc",
162 "level_controller/down_sampler.h",
163 "level_controller/gain_applier.cc",
164 "level_controller/gain_applier.h",
165 "level_controller/gain_selector.cc",
166 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -0700167 "level_controller/level_controller.cc",
168 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -0700169 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -0700170 "level_controller/noise_level_estimator.cc",
171 "level_controller/noise_level_estimator.h",
172 "level_controller/noise_spectrum_estimator.cc",
173 "level_controller/noise_spectrum_estimator.h",
174 "level_controller/peak_level_estimator.cc",
175 "level_controller/peak_level_estimator.h",
176 "level_controller/saturating_gain_estimator.cc",
177 "level_controller/saturating_gain_estimator.h",
178 "level_controller/signal_classifier.cc",
179 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000180 "level_estimator_impl.cc",
181 "level_estimator_impl.h",
peah8271d042016-11-22 07:24:52 -0800182 "low_cut_filter.cc",
183 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000184 "noise_suppression_impl.cc",
185 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800186 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700187 "residual_echo_detector.cc",
188 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000189 "rms_level.cc",
190 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000191 "splitting_filter.cc",
192 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700193 "three_band_filter_bank.cc",
194 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000195 "transient/common.h",
196 "transient/daubechies_8_wavelet_coeffs.h",
197 "transient/dyadic_decimator.h",
198 "transient/moving_moments.cc",
199 "transient/moving_moments.h",
200 "transient/transient_detector.cc",
201 "transient/transient_detector.h",
202 "transient/transient_suppressor.cc",
203 "transient/transient_suppressor.h",
204 "transient/wpd_node.cc",
205 "transient/wpd_node.h",
206 "transient/wpd_tree.cc",
207 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000208 "typing_detection.cc",
209 "typing_detection.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000210 "voice_detection_impl.cc",
211 "voice_detection_impl.h",
212 ]
213
214 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200215 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100216 ":aec_core",
aleloi868f32f2017-05-23 07:20:05 -0700217 ":aec_dump_interface",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100218 ":apm_logging",
Mirko Bonadei10679932017-12-05 15:07:16 +0100219 ":audio_processing_c",
Ivo Creusen56d46092017-11-24 17:29:59 +0100220 ":audio_processing_statistics",
mbonadei1140f972017-04-26 03:38:35 -0700221 "..:module_api",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200222 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100223 "../../:typedefs",
Gustaf Ullbergbffa3002018-02-14 15:12:00 +0100224 "../../api:aec3_config",
kwiberg529662a2017-09-04 05:43:17 -0700225 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700226 "../../api:optional",
aleloi6321b492016-12-05 01:46:09 -0800227 "../../audio/utility:audio_frame_operations",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100228 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100229 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100230 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700231 "../../rtc_base:gtest_prod",
232 "../../rtc_base:protobuf_utils",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100233 "../../rtc_base:sanitizer",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100234 "../../system_wrappers:cpu_features_api",
Per Åhgren11556462017-12-22 16:13:57 +0100235 "../../system_wrappers:field_trial_api",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100236 "../../system_wrappers:metrics_api",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100237 "vad",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200238 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000239
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000240 if (aec_untrusted_delay_for_testing) {
241 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
242 }
243
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000244 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000245 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
246 deps += [ ":audioproc_debug_proto" ]
247 }
248
peah1bcfce52016-08-26 07:16:04 -0700249 if (rtc_enable_intelligibility_enhancer) {
250 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
251 sources += [
252 "intelligibility/intelligibility_enhancer.cc",
253 "intelligibility/intelligibility_enhancer.h",
254 "intelligibility/intelligibility_utils.cc",
255 "intelligibility/intelligibility_utils.h",
256 ]
257 } else {
258 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
259 }
260
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000261 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000262 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000263 } else {
264 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000265 }
266
kjellander8f4419b2016-06-02 02:09:52 -0700267 # TODO(jschuh): Bug 1348: fix this warning.
268 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000269
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000270 deps += [
271 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100272 "../../common_audio:fir_filter",
273 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700274 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000275 "../../system_wrappers",
276 ]
277}
278
Ivo Creusen56d46092017-11-24 17:29:59 +0100279rtc_source_set("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000280 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100281 sources = [
282 "include/audio_processing_statistics.cc",
283 "include/audio_processing_statistics.h",
284 ]
285 deps = [
286 "../../api:optional",
287 ]
288}
289
aleloi868f32f2017-05-23 07:20:05 -0700290rtc_source_set("aec_dump_interface") {
291 sources = [
292 "include/aec_dump.cc",
293 "include/aec_dump.h",
294 ]
295
296 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700297 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700298 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700299 ]
300}
301
kjellander7439f972016-12-05 22:47:46 -0800302rtc_source_set("audio_processing_c") {
303 visibility = [ ":*" ] # Only targets in this file can depend on this.
304 sources = [
305 "agc/legacy/analog_agc.c",
306 "agc/legacy/analog_agc.h",
307 "agc/legacy/digital_agc.c",
308 "agc/legacy/digital_agc.h",
309 "agc/legacy/gain_control.h",
310 ]
311
312 if (rtc_prefer_fixed_point) {
313 sources += [
314 "ns/noise_suppression_x.c",
315 "ns/noise_suppression_x.h",
316 "ns/nsx_core.c",
317 "ns/nsx_core.h",
318 "ns/nsx_defines.h",
319 ]
320 if (current_cpu == "mipsel") {
321 sources += [ "ns/nsx_core_mips.c" ]
322 } else {
323 sources += [ "ns/nsx_core_c.c" ]
324 }
325 } else {
326 sources += [
327 "ns/defines.h",
328 "ns/noise_suppression.c",
329 "ns/noise_suppression.h",
330 "ns/ns_core.c",
331 "ns/ns_core.h",
332 "ns/windows_private.h",
333 ]
334 }
335
336 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800337 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100338 "../../:typedefs",
kjellander7439f972016-12-05 22:47:46 -0800339 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100340 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100341 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700342 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100343 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800344 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800345
346 if (rtc_build_with_neon) {
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100347 sources += [ "ns/nsx_core_neon.c" ]
348
349 if (current_cpu != "arm64") {
350 # Enable compilation for the NEON instruction set. This is needed
351 # since //build/config/arm.gni only enables NEON for iOS, not Android.
352 # This provides the same functionality as webrtc/build/arm_neon.gypi.
353 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
354 cflags = [ "-mfpu=neon" ]
355 }
356
357 # Disable LTO on NEON targets due to compiler bug.
358 # TODO(fdegans): Enable this. See crbug.com/408997.
359 if (rtc_use_lto) {
360 cflags -= [
361 "-flto",
362 "-ffat-lto-objects",
363 ]
364 }
mbonadeie5dc3ce2017-01-25 05:34:46 -0800365 }
kjellander7439f972016-12-05 22:47:46 -0800366}
367
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000368if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000369 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200370 sources = [
371 "debug.proto",
372 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000373
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200374 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000375 }
376}
377
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100378rtc_source_set("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100379 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100380 sources = [
381 "logging/apm_data_dumper.cc",
382 "logging/apm_data_dumper.h",
383 ]
384 deps = [
385 "../../api:array_view",
386 "../../common_audio:common_audio",
387 "../../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100388 "../../rtc_base:stringutils",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100389 ]
390 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100391}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000392
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100393rtc_source_set("aec_core") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100394 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100395 sources = [
Patrik Höglund62139292017-12-19 16:44:45 +0100396 "aec/aec_common.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100397 "aec/aec_core.cc",
398 "aec/aec_core.h",
399 "aec/aec_core_optimized_methods.h",
400 "aecm/aecm_core.cc",
401 "aecm/aecm_core.h",
Patrik Höglund62139292017-12-19 16:44:45 +0100402 "aecm/aecm_defines.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100403 "aecm/echo_control_mobile.cc",
404 "aecm/echo_control_mobile.h",
405 "utility/block_mean_calculator.cc",
406 "utility/block_mean_calculator.h",
407 "utility/delay_estimator.cc",
408 "utility/delay_estimator.h",
409 "utility/delay_estimator_internal.h",
410 "utility/delay_estimator_wrapper.cc",
411 "utility/delay_estimator_wrapper.h",
412 "utility/ooura_fft.cc",
413 "utility/ooura_fft.h",
414 "utility/ooura_fft_tables_common.h",
415 ]
416 deps = [
417 ":apm_logging",
418 ":audio_processing_statistics",
419 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100420 "../../:typedefs",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100421 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100422 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100423 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100424 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100425 "../../rtc_base:sanitizer",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100426 "../../system_wrappers:cpu_features_api",
427 "../../system_wrappers:metrics_api",
428 ]
429 cflags = []
430 defines = []
431
432 if (current_cpu == "x86" || current_cpu == "x64") {
433 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800434 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700435 "utility/ooura_fft_sse2.cc",
436 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000437 ]
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200438 if (is_posix) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100439 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700440 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000441 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000442
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100443 if (rtc_build_with_neon) {
444 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800445 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700446 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700447 "utility/ooura_fft_neon.cc",
448 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000449 ]
450
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000451 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700452 # Enable compilation for the NEON instruction set. This is needed
453 # since //build/config/arm.gni only enables NEON for iOS, not Android.
454 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700455 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100456 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000457 }
458
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700459 # Disable LTO on NEON targets due to compiler bug.
460 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000461 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000462 cflags -= [
463 "-flto",
464 "-ffat-lto-objects",
465 ]
466 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700467
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100468 deps += [ "../../common_audio" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000469 }
kjellander7439f972016-12-05 22:47:46 -0800470
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100471 if (current_cpu == "mipsel") {
472 sources += [ "aecm/aecm_core_mips.cc" ]
473 if (mips_float_abi == "hard") {
474 sources += [
475 "aec/aec_core_mips.cc",
476 "utility/ooura_fft_mips.cc",
477 ]
478 }
479 } else {
480 sources += [ "aecm/aecm_core_c.cc" ]
481 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100482
483 # TODO(jschuh): Bug 1348: fix this warning.
484 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100485}
486
kjellanderfb114242016-06-13 00:19:48 -0700487if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100488 rtc_source_set("mocks") {
489 testonly = true
490 sources = [
491 "include/mock_audio_processing.h",
492 ]
493 deps = [
494 ":aec_dump_interface",
495 ":audio_processing",
496 ":audio_processing_statistics",
497 "../../test:test_support",
498 ]
499 }
500
kjellander6ceab082016-10-28 05:44:03 -0700501 group("audio_processing_tests") {
502 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100503 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700504 ":audioproc_test_utils",
505 ":click_annotate",
506 ":nonlinear_beamformer_test",
507 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700508 ]
509
510 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100511 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700512 }
513
514 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100515 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800516 ":audioproc_f",
517 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200518 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700519 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800520 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800521 ]
kjellander6ceab082016-10-28 05:44:03 -0700522 }
523 }
524
ehmaldonado36268652017-01-19 08:27:11 -0800525 rtc_source_set("audio_processing_unittests") {
526 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700527
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100528 configs += [ ":apm_debug_dump" ]
ehmaldonado36268652017-01-19 08:27:11 -0800529 sources = [
530 "aec/echo_cancellation_unittest.cc",
531 "aec/system_delay_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100532 "aec3/mock/mock_block_processor.h",
533 "aec3/mock/mock_echo_remover.h",
534 "aec3/mock/mock_render_delay_buffer.h",
535 "aec3/mock/mock_render_delay_controller.h",
ehmaldonado36268652017-01-19 08:27:11 -0800536 "agc/agc_manager_direct_unittest.cc",
537 "agc/loudness_histogram_unittest.cc",
538 "agc/mock_agc.h",
539 "audio_buffer_unittest.cc",
540 "beamformer/array_util_unittest.cc",
541 "beamformer/complex_matrix_unittest.cc",
542 "beamformer/covariance_matrix_generator_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100543 "beamformer/matrix_test_helpers.h",
ehmaldonado36268652017-01-19 08:27:11 -0800544 "beamformer/matrix_unittest.cc",
545 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800546 "config_unittest.cc",
547 "echo_cancellation_impl_unittest.cc",
548 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200549 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800550 "transient/dyadic_decimator_unittest.cc",
551 "transient/file_utils.cc",
552 "transient/file_utils.h",
553 "transient/file_utils_unittest.cc",
554 "transient/moving_moments_unittest.cc",
555 "transient/transient_detector_unittest.cc",
556 "transient/transient_suppressor_unittest.cc",
557 "transient/wpd_node_unittest.cc",
558 "transient/wpd_tree_unittest.cc",
559 "utility/block_mean_calculator_unittest.cc",
560 "utility/delay_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800561 ]
562
563 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100564 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200565 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100566 ":apm_logging",
ehmaldonado36268652017-01-19 08:27:11 -0800567 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800568 ":audioproc_test_utils",
Patrik Höglund62139292017-12-19 16:44:45 +0100569 ":mocks",
mbonadei1140f972017-04-26 03:38:35 -0700570 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800571 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100572 "../../:typedefs",
kwiberg529662a2017-09-04 05:43:17 -0700573 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700574 "../../api:optional",
ehmaldonado36268652017-01-19 08:27:11 -0800575 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100576 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100577 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700578 "../../rtc_base:gtest_prod",
579 "../../rtc_base:protobuf_utils",
580 "../../rtc_base:rtc_base",
581 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100582 "../../system_wrappers",
583 "../../system_wrappers:cpu_features_api",
ehmaldonado36268652017-01-19 08:27:11 -0800584 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200585 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700586 "aec_dump:mock_aec_dump_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700587 "test/conversational_speech:unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100588 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800589 "//testing/gtest",
590 ]
591
592 defines = []
593
ehmaldonado36268652017-01-19 08:27:11 -0800594 if (rtc_enable_intelligibility_enhancer) {
595 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
596 sources += [
597 "intelligibility/intelligibility_enhancer_unittest.cc",
598 "intelligibility/intelligibility_utils_unittest.cc",
599 ]
600 } else {
601 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
602 }
603
604 if (rtc_prefer_fixed_point) {
605 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
606 } else {
607 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
608 }
609
610 if (rtc_enable_protobuf) {
611 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
612 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800613 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800614 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200615 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800616 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700617 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700618 "aec_dump",
619 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800620 ]
621 sources += [
peah522d71b2017-02-23 05:16:26 -0800622 "aec3/adaptive_fir_filter_unittest.cc",
623 "aec3/aec3_fft_unittest.cc",
624 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800625 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800626 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800627 "aec3/block_processor_unittest.cc",
628 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800629 "aec3/comfort_noise_generator_unittest.cc",
Per Åhgren38e2d952017-11-17 14:54:28 +0100630 "aec3/decimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800631 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800632 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800633 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800634 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800635 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800636 "aec3/erl_estimator_unittest.cc",
637 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800638 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800639 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800640 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800641 "aec3/matched_filter_lag_aggregator_unittest.cc",
642 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800643 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700644 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800645 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800646 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800647 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800648 "aec3/render_signal_analyzer_unittest.cc",
649 "aec3/residual_echo_estimator_unittest.cc",
650 "aec3/shadow_filter_update_gain_unittest.cc",
651 "aec3/subtractor_unittest.cc",
652 "aec3/suppression_filter_unittest.cc",
653 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700654 "aec3/vector_math_unittest.cc",
alessiob3ec96df2017-05-22 06:57:06 -0700655 "agc2/gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800656 "audio_processing_impl_locking_unittest.cc",
657 "audio_processing_impl_unittest.cc",
658 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800659 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800660 "echo_cancellation_bit_exact_unittest.cc",
661 "echo_control_mobile_unittest.cc",
662 "echo_detector/circular_buffer_unittest.cc",
663 "echo_detector/mean_variance_estimator_unittest.cc",
664 "echo_detector/moving_max_unittest.cc",
665 "echo_detector/normalized_covariance_estimator_unittest.cc",
666 "gain_control_unittest.cc",
667 "level_controller/level_controller_unittest.cc",
668 "level_estimator_unittest.cc",
669 "low_cut_filter_unittest.cc",
670 "noise_suppression_unittest.cc",
671 "residual_echo_detector_unittest.cc",
672 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800673 "test/debug_dump_replayer.cc",
674 "test/debug_dump_replayer.h",
675 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800676 "test/echo_canceller_test_tools.cc",
677 "test/echo_canceller_test_tools.h",
678 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800679 "test/test_utils.h",
680 "voice_detection_unittest.cc",
681 ]
682 }
683
684 if ((!build_with_chromium || is_win) && is_clang) {
685 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
686 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
687 }
688 }
689
ehmaldonado021eef32017-01-05 07:09:50 -0800690 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800691 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700692
ehmaldonado021eef32017-01-05 07:09:50 -0800693 sources = [
694 "audio_processing_performance_unittest.cc",
695 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800696 ]
697 deps = [
698 ":audio_processing",
699 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100700 "../../api:array_view",
701 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700702 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100703 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100704 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100705 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100706 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800707 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700708
ehmaldonado021eef32017-01-05 07:09:50 -0800709 if (rtc_enable_intelligibility_enhancer) {
710 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
711 } else {
712 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
713 }
714 }
715
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200716 rtc_source_set("analog_mic_simulation") {
717 sources = [
718 "test/fake_recording_device.cc",
719 "test/fake_recording_device.h",
720 ]
721 deps = [
722 "../../api:array_view",
723 "../../common_audio:common_audio",
724 "../../modules:module_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100725 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200726 "../../rtc_base:rtc_base_approved",
727 ]
728 }
729
ehmaldonado1fd08c12017-01-17 02:37:34 -0800730 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800731 rtc_executable("audioproc_f") {
732 testonly = true
733 sources = [
734 "test/aec_dump_based_simulator.cc",
735 "test/aec_dump_based_simulator.h",
736 "test/audio_processing_simulator.cc",
737 "test/audio_processing_simulator.h",
738 "test/audioproc_float.cc",
739 "test/wav_based_simulator.cc",
740 "test/wav_based_simulator.h",
741 ]
peahc3ec1fd2016-08-07 23:19:30 -0700742
ehmaldonado1fd08c12017-01-17 02:37:34 -0800743 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200744 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800745 ":audio_processing",
746 ":audioproc_debug_proto",
747 ":audioproc_protobuf_utils",
748 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700749 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800750 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100751 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700752 "../../rtc_base:protobuf_utils",
753 "../../rtc_base:rtc_base_approved",
754 "../../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100755 "../../rtc_base:stringutils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800756 "../../system_wrappers",
757 "../../system_wrappers:system_wrappers_default",
758 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700759 "aec_dump",
760 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800761 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800762 ]
763 } # audioproc_f
764 }
peahc3ec1fd2016-08-07 23:19:30 -0700765
ehmaldonado38a21322016-09-02 04:10:34 -0700766 rtc_source_set("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000767 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700768 testonly = true
769 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700770 "test/audio_buffer_tools.cc",
771 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200772 "test/bitexactness_tools.cc",
773 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800774 "test/performance_timer.cc",
775 "test/performance_timer.h",
776 "test/simulator_buffers.cc",
777 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700778 "test/test_utils.cc",
779 "test/test_utils.h",
780 ]
781
kjellanderfb114242016-06-13 00:19:48 -0700782 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800783 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700784 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700785 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700786 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700787 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100788 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700789 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100790 "../../system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200791 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200792 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200793 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700794 ]
795 }
796
ehmaldonado38a21322016-09-02 04:10:34 -0700797 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700798 testonly = true
799 sources = [
800 "transient/file_utils.cc",
801 "transient/file_utils.h",
802 "transient/transient_suppression_test.cc",
803 ]
804 deps = [
805 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700806 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800807 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100808 "../../:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800809 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700810 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100811 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100812 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700813 "../../test:test_support",
814 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700815 ]
kwiberg7a770e02016-08-25 02:32:43 -0700816 }
817
ehmaldonado38a21322016-09-02 04:10:34 -0700818 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700819 testonly = true
820 sources = [
821 "transient/click_annotate.cc",
822 "transient/file_utils.cc",
823 "transient/file_utils.h",
824 ]
825 deps = [
826 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800827 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100828 "../../:typedefs",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100829 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700830 "../../system_wrappers:metrics_default",
831 ]
832 }
833
ehmaldonado38a21322016-09-02 04:10:34 -0700834 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700835 testonly = true
836 sources = [
837 "beamformer/nonlinear_beamformer_test.cc",
838 ]
839 deps = [
840 ":audio_processing",
841 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800842 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100843 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700844 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700845 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700846 ]
kwiberg7a770e02016-08-25 02:32:43 -0700847 }
848
peah1bcfce52016-08-26 07:16:04 -0700849 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700850 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700851 testonly = true
852 sources = [
853 "intelligibility/test/intelligibility_proc.cc",
854 ]
855 deps = [
856 ":audio_processing",
857 ":audioproc_test_utils",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100858 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700859 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700860 "../../system_wrappers:metrics_default",
861 "../../test:test_support",
862 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700863 ]
kwiberg7a770e02016-08-25 02:32:43 -0700864 }
865 }
866
kjellanderfb114242016-06-13 00:19:48 -0700867 if (rtc_enable_protobuf) {
868 proto_library("audioproc_unittest_proto") {
869 sources = [
870 "test/unittest.proto",
871 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200872 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700873 }
874
kjellanderb62dbbe2016-09-23 00:38:52 -0700875 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700876 sources = [
877 "test/protobuf_utils.cc",
878 "test/protobuf_utils.h",
879 ]
880
881 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700882 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800883 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100884 "../../:typedefs",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700885 "../../rtc_base:protobuf_utils",
886 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700887 ]
888 }
889 }
890}