blob: ddabdb318a05711ccfdeed4093beac81ebb85ec1 [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",
kwiberg529662a2017-09-04 05:43:17 -0700224 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700225 "../../api:optional",
aleloi6321b492016-12-05 01:46:09 -0800226 "../../audio/utility:audio_frame_operations",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100227 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100228 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100229 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700230 "../../rtc_base:gtest_prod",
231 "../../rtc_base:protobuf_utils",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100232 "../../rtc_base:sanitizer",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100233 "../../system_wrappers:cpu_features_api",
Per Åhgren11556462017-12-22 16:13:57 +0100234 "../../system_wrappers:field_trial_api",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100235 "../../system_wrappers:metrics_api",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100236 "vad",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200237 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000238
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000239 if (aec_untrusted_delay_for_testing) {
240 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
241 }
242
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000243 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000244 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
245 deps += [ ":audioproc_debug_proto" ]
246 }
247
peah1bcfce52016-08-26 07:16:04 -0700248 if (rtc_enable_intelligibility_enhancer) {
249 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
250 sources += [
251 "intelligibility/intelligibility_enhancer.cc",
252 "intelligibility/intelligibility_enhancer.h",
253 "intelligibility/intelligibility_utils.cc",
254 "intelligibility/intelligibility_utils.h",
255 ]
256 } else {
257 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
258 }
259
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000260 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000261 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000262 } else {
263 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000264 }
265
kjellander8f4419b2016-06-02 02:09:52 -0700266 # TODO(jschuh): Bug 1348: fix this warning.
267 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000268
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000269 deps += [
270 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100271 "../../common_audio:fir_filter",
272 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700273 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000274 "../../system_wrappers",
275 ]
276}
277
Ivo Creusen56d46092017-11-24 17:29:59 +0100278rtc_source_set("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000279 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100280 sources = [
281 "include/audio_processing_statistics.cc",
282 "include/audio_processing_statistics.h",
283 ]
284 deps = [
285 "../../api:optional",
286 ]
287}
288
aleloi868f32f2017-05-23 07:20:05 -0700289rtc_source_set("aec_dump_interface") {
290 sources = [
291 "include/aec_dump.cc",
292 "include/aec_dump.h",
293 ]
294
295 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700296 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700297 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700298 ]
299}
300
kjellander7439f972016-12-05 22:47:46 -0800301rtc_source_set("audio_processing_c") {
302 visibility = [ ":*" ] # Only targets in this file can depend on this.
303 sources = [
304 "agc/legacy/analog_agc.c",
305 "agc/legacy/analog_agc.h",
306 "agc/legacy/digital_agc.c",
307 "agc/legacy/digital_agc.h",
308 "agc/legacy/gain_control.h",
309 ]
310
311 if (rtc_prefer_fixed_point) {
312 sources += [
313 "ns/noise_suppression_x.c",
314 "ns/noise_suppression_x.h",
315 "ns/nsx_core.c",
316 "ns/nsx_core.h",
317 "ns/nsx_defines.h",
318 ]
319 if (current_cpu == "mipsel") {
320 sources += [ "ns/nsx_core_mips.c" ]
321 } else {
322 sources += [ "ns/nsx_core_c.c" ]
323 }
324 } else {
325 sources += [
326 "ns/defines.h",
327 "ns/noise_suppression.c",
328 "ns/noise_suppression.h",
329 "ns/ns_core.c",
330 "ns/ns_core.h",
331 "ns/windows_private.h",
332 ]
333 }
334
335 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800336 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100337 "../../:typedefs",
kjellander7439f972016-12-05 22:47:46 -0800338 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100339 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100340 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700341 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100342 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800343 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800344
345 if (rtc_build_with_neon) {
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100346 sources += [ "ns/nsx_core_neon.c" ]
347
348 if (current_cpu != "arm64") {
349 # Enable compilation for the NEON instruction set. This is needed
350 # since //build/config/arm.gni only enables NEON for iOS, not Android.
351 # This provides the same functionality as webrtc/build/arm_neon.gypi.
352 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
353 cflags = [ "-mfpu=neon" ]
354 }
355
356 # Disable LTO on NEON targets due to compiler bug.
357 # TODO(fdegans): Enable this. See crbug.com/408997.
358 if (rtc_use_lto) {
359 cflags -= [
360 "-flto",
361 "-ffat-lto-objects",
362 ]
363 }
mbonadeie5dc3ce2017-01-25 05:34:46 -0800364 }
kjellander7439f972016-12-05 22:47:46 -0800365}
366
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000367if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000368 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200369 sources = [
370 "debug.proto",
371 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000372
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200373 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000374 }
375}
376
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100377rtc_source_set("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100378 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100379 sources = [
380 "logging/apm_data_dumper.cc",
381 "logging/apm_data_dumper.h",
382 ]
383 deps = [
384 "../../api:array_view",
385 "../../common_audio:common_audio",
386 "../../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100387 "../../rtc_base:stringutils",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100388 ]
389 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100390}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000391
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100392rtc_source_set("aec_core") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100393 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100394 sources = [
Patrik Höglund62139292017-12-19 16:44:45 +0100395 "aec/aec_common.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100396 "aec/aec_core.cc",
397 "aec/aec_core.h",
398 "aec/aec_core_optimized_methods.h",
399 "aecm/aecm_core.cc",
400 "aecm/aecm_core.h",
Patrik Höglund62139292017-12-19 16:44:45 +0100401 "aecm/aecm_defines.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100402 "aecm/echo_control_mobile.cc",
403 "aecm/echo_control_mobile.h",
404 "utility/block_mean_calculator.cc",
405 "utility/block_mean_calculator.h",
406 "utility/delay_estimator.cc",
407 "utility/delay_estimator.h",
408 "utility/delay_estimator_internal.h",
409 "utility/delay_estimator_wrapper.cc",
410 "utility/delay_estimator_wrapper.h",
411 "utility/ooura_fft.cc",
412 "utility/ooura_fft.h",
413 "utility/ooura_fft_tables_common.h",
414 ]
415 deps = [
416 ":apm_logging",
417 ":audio_processing_statistics",
418 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100419 "../../:typedefs",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100420 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100421 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100422 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100423 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100424 "../../rtc_base:sanitizer",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100425 "../../system_wrappers:cpu_features_api",
426 "../../system_wrappers:metrics_api",
427 ]
428 cflags = []
429 defines = []
430
431 if (current_cpu == "x86" || current_cpu == "x64") {
432 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800433 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700434 "utility/ooura_fft_sse2.cc",
435 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000436 ]
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200437 if (is_posix) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100438 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700439 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000440 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000441
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100442 if (rtc_build_with_neon) {
443 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800444 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700445 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700446 "utility/ooura_fft_neon.cc",
447 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000448 ]
449
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000450 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700451 # Enable compilation for the NEON instruction set. This is needed
452 # since //build/config/arm.gni only enables NEON for iOS, not Android.
453 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700454 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100455 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000456 }
457
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700458 # Disable LTO on NEON targets due to compiler bug.
459 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000460 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000461 cflags -= [
462 "-flto",
463 "-ffat-lto-objects",
464 ]
465 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700466
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100467 deps += [ "../../common_audio" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000468 }
kjellander7439f972016-12-05 22:47:46 -0800469
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100470 if (current_cpu == "mipsel") {
471 sources += [ "aecm/aecm_core_mips.cc" ]
472 if (mips_float_abi == "hard") {
473 sources += [
474 "aec/aec_core_mips.cc",
475 "utility/ooura_fft_mips.cc",
476 ]
477 }
478 } else {
479 sources += [ "aecm/aecm_core_c.cc" ]
480 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100481
482 # TODO(jschuh): Bug 1348: fix this warning.
483 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100484}
485
kjellanderfb114242016-06-13 00:19:48 -0700486if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100487 rtc_source_set("mocks") {
488 testonly = true
489 sources = [
490 "include/mock_audio_processing.h",
491 ]
492 deps = [
493 ":aec_dump_interface",
494 ":audio_processing",
495 ":audio_processing_statistics",
496 "../../test:test_support",
497 ]
498 }
499
kjellander6ceab082016-10-28 05:44:03 -0700500 group("audio_processing_tests") {
501 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100502 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700503 ":audioproc_test_utils",
504 ":click_annotate",
505 ":nonlinear_beamformer_test",
506 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700507 ]
508
509 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100510 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700511 }
512
513 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100514 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800515 ":audioproc_f",
516 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200517 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700518 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800519 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800520 ]
kjellander6ceab082016-10-28 05:44:03 -0700521 }
522 }
523
ehmaldonado36268652017-01-19 08:27:11 -0800524 rtc_source_set("audio_processing_unittests") {
525 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700526
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100527 configs += [ ":apm_debug_dump" ]
ehmaldonado36268652017-01-19 08:27:11 -0800528 sources = [
529 "aec/echo_cancellation_unittest.cc",
530 "aec/system_delay_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100531 "aec3/mock/mock_block_processor.h",
532 "aec3/mock/mock_echo_remover.h",
533 "aec3/mock/mock_render_delay_buffer.h",
534 "aec3/mock/mock_render_delay_controller.h",
ehmaldonado36268652017-01-19 08:27:11 -0800535 "agc/agc_manager_direct_unittest.cc",
536 "agc/loudness_histogram_unittest.cc",
537 "agc/mock_agc.h",
538 "audio_buffer_unittest.cc",
539 "beamformer/array_util_unittest.cc",
540 "beamformer/complex_matrix_unittest.cc",
541 "beamformer/covariance_matrix_generator_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100542 "beamformer/matrix_test_helpers.h",
ehmaldonado36268652017-01-19 08:27:11 -0800543 "beamformer/matrix_unittest.cc",
544 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800545 "config_unittest.cc",
546 "echo_cancellation_impl_unittest.cc",
547 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200548 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800549 "transient/dyadic_decimator_unittest.cc",
550 "transient/file_utils.cc",
551 "transient/file_utils.h",
552 "transient/file_utils_unittest.cc",
553 "transient/moving_moments_unittest.cc",
554 "transient/transient_detector_unittest.cc",
555 "transient/transient_suppressor_unittest.cc",
556 "transient/wpd_node_unittest.cc",
557 "transient/wpd_tree_unittest.cc",
558 "utility/block_mean_calculator_unittest.cc",
559 "utility/delay_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800560 ]
561
562 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100563 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200564 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100565 ":apm_logging",
ehmaldonado36268652017-01-19 08:27:11 -0800566 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800567 ":audioproc_test_utils",
Patrik Höglund62139292017-12-19 16:44:45 +0100568 ":mocks",
mbonadei1140f972017-04-26 03:38:35 -0700569 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800570 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100571 "../../:typedefs",
kwiberg529662a2017-09-04 05:43:17 -0700572 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700573 "../../api:optional",
ehmaldonado36268652017-01-19 08:27:11 -0800574 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100575 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100576 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700577 "../../rtc_base:gtest_prod",
578 "../../rtc_base:protobuf_utils",
579 "../../rtc_base:rtc_base",
580 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100581 "../../system_wrappers",
582 "../../system_wrappers:cpu_features_api",
ehmaldonado36268652017-01-19 08:27:11 -0800583 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200584 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700585 "aec_dump:mock_aec_dump_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700586 "test/conversational_speech:unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100587 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800588 "//testing/gtest",
589 ]
590
591 defines = []
592
ehmaldonado36268652017-01-19 08:27:11 -0800593 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") {
ehmaldonado021eef32017-01-05 07:09:50 -0800690 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700691
ehmaldonado021eef32017-01-05 07:09:50 -0800692 sources = [
693 "audio_processing_performance_unittest.cc",
694 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800695 ]
696 deps = [
697 ":audio_processing",
698 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100699 "../../api:array_view",
700 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700701 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100702 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100703 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100704 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100705 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800706 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700707
ehmaldonado021eef32017-01-05 07:09:50 -0800708 if (rtc_enable_intelligibility_enhancer) {
709 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
710 } else {
711 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
712 }
713 }
714
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200715 rtc_source_set("analog_mic_simulation") {
716 sources = [
717 "test/fake_recording_device.cc",
718 "test/fake_recording_device.h",
719 ]
720 deps = [
721 "../../api:array_view",
722 "../../common_audio:common_audio",
723 "../../modules:module_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100724 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200725 "../../rtc_base:rtc_base_approved",
726 ]
727 }
728
ehmaldonado1fd08c12017-01-17 02:37:34 -0800729 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800730 rtc_executable("audioproc_f") {
731 testonly = true
732 sources = [
733 "test/aec_dump_based_simulator.cc",
734 "test/aec_dump_based_simulator.h",
735 "test/audio_processing_simulator.cc",
736 "test/audio_processing_simulator.h",
737 "test/audioproc_float.cc",
738 "test/wav_based_simulator.cc",
739 "test/wav_based_simulator.h",
740 ]
peahc3ec1fd2016-08-07 23:19:30 -0700741
ehmaldonado1fd08c12017-01-17 02:37:34 -0800742 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200743 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800744 ":audio_processing",
745 ":audioproc_debug_proto",
746 ":audioproc_protobuf_utils",
747 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700748 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800749 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100750 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700751 "../../rtc_base:protobuf_utils",
752 "../../rtc_base:rtc_base_approved",
753 "../../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100754 "../../rtc_base:stringutils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800755 "../../system_wrappers",
756 "../../system_wrappers:system_wrappers_default",
757 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700758 "aec_dump",
759 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800760 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800761 ]
762 } # audioproc_f
763 }
peahc3ec1fd2016-08-07 23:19:30 -0700764
ehmaldonado38a21322016-09-02 04:10:34 -0700765 rtc_source_set("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000766 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700767 testonly = true
768 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700769 "test/audio_buffer_tools.cc",
770 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200771 "test/bitexactness_tools.cc",
772 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800773 "test/performance_timer.cc",
774 "test/performance_timer.h",
775 "test/simulator_buffers.cc",
776 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700777 "test/test_utils.cc",
778 "test/test_utils.h",
779 ]
780
kjellanderfb114242016-06-13 00:19:48 -0700781 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800782 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700783 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700784 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700785 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700786 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100787 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700788 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100789 "../../system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200790 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200791 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200792 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700793 ]
794 }
795
ehmaldonado38a21322016-09-02 04:10:34 -0700796 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700797 testonly = true
798 sources = [
799 "transient/file_utils.cc",
800 "transient/file_utils.h",
801 "transient/transient_suppression_test.cc",
802 ]
803 deps = [
804 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700805 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800806 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100807 "../../:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800808 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700809 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100810 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100811 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700812 "../../test:test_support",
813 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700814 ]
kwiberg7a770e02016-08-25 02:32:43 -0700815 }
816
ehmaldonado38a21322016-09-02 04:10:34 -0700817 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700818 testonly = true
819 sources = [
820 "transient/click_annotate.cc",
821 "transient/file_utils.cc",
822 "transient/file_utils.h",
823 ]
824 deps = [
825 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800826 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100827 "../../:typedefs",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100828 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700829 "../../system_wrappers:metrics_default",
830 ]
831 }
832
ehmaldonado38a21322016-09-02 04:10:34 -0700833 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700834 testonly = true
835 sources = [
836 "beamformer/nonlinear_beamformer_test.cc",
837 ]
838 deps = [
839 ":audio_processing",
840 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800841 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100842 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700843 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700844 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700845 ]
kwiberg7a770e02016-08-25 02:32:43 -0700846 }
847
peah1bcfce52016-08-26 07:16:04 -0700848 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700849 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700850 testonly = true
851 sources = [
852 "intelligibility/test/intelligibility_proc.cc",
853 ]
854 deps = [
855 ":audio_processing",
856 ":audioproc_test_utils",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100857 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700858 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700859 "../../system_wrappers:metrics_default",
860 "../../test:test_support",
861 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700862 ]
kwiberg7a770e02016-08-25 02:32:43 -0700863 }
864 }
865
kjellanderfb114242016-06-13 00:19:48 -0700866 if (rtc_enable_protobuf) {
867 proto_library("audioproc_unittest_proto") {
868 sources = [
869 "test/unittest.proto",
870 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200871 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700872 }
873
kjellanderb62dbbe2016-09-23 00:38:52 -0700874 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700875 sources = [
876 "test/protobuf_utils.cc",
877 "test/protobuf_utils.h",
878 ]
879
880 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700881 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800882 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100883 "../../:typedefs",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700884 "../../rtc_base:protobuf_utils",
885 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700886 ]
887 }
888 }
889}