blob: 0528479fdd66478a1c613042697511d4720abf9b [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",
Per Åhgren39f491e2018-02-22 00:39:23 +0100104 "aec3/skew_estimator.cc",
105 "aec3/skew_estimator.h",
peah522d71b2017-02-23 05:16:26 -0800106 "aec3/subtractor.cc",
107 "aec3/subtractor.h",
108 "aec3/subtractor_output.h",
109 "aec3/suppression_filter.cc",
110 "aec3/suppression_filter.h",
111 "aec3/suppression_gain.cc",
112 "aec3/suppression_gain.h",
Per Åhgren8ba58612017-12-01 23:01:44 +0100113 "aec3/vector_buffer.cc",
114 "aec3/vector_buffer.h",
peah5e79b292017-04-12 01:20:45 -0700115 "aec3/vector_math.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000116 "agc/agc.cc",
117 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000118 "agc/agc_manager_direct.cc",
119 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000120 "agc/gain_map_internal.h",
peahbbe42332016-06-08 06:42:02 -0700121 "agc/loudness_histogram.cc",
122 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000123 "agc/utility.cc",
124 "agc/utility.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",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100154 "gain_controller2.cc",
155 "gain_controller2.h",
peahc19f3122016-10-07 14:54:10 -0700156 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000157 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -0700158 "include/config.cc",
159 "include/config.h",
peahca4cac72016-06-29 15:26:12 -0700160 "level_controller/biquad_filter.cc",
161 "level_controller/biquad_filter.h",
162 "level_controller/down_sampler.cc",
163 "level_controller/down_sampler.h",
164 "level_controller/gain_applier.cc",
165 "level_controller/gain_applier.h",
166 "level_controller/gain_selector.cc",
167 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -0700168 "level_controller/level_controller.cc",
169 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -0700170 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -0700171 "level_controller/noise_level_estimator.cc",
172 "level_controller/noise_level_estimator.h",
173 "level_controller/noise_spectrum_estimator.cc",
174 "level_controller/noise_spectrum_estimator.h",
175 "level_controller/peak_level_estimator.cc",
176 "level_controller/peak_level_estimator.h",
177 "level_controller/saturating_gain_estimator.cc",
178 "level_controller/saturating_gain_estimator.h",
179 "level_controller/signal_classifier.cc",
180 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000181 "level_estimator_impl.cc",
182 "level_estimator_impl.h",
peah8271d042016-11-22 07:24:52 -0800183 "low_cut_filter.cc",
184 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000185 "noise_suppression_impl.cc",
186 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800187 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700188 "residual_echo_detector.cc",
189 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000190 "rms_level.cc",
191 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000192 "splitting_filter.cc",
193 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700194 "three_band_filter_bank.cc",
195 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000196 "transient/common.h",
197 "transient/daubechies_8_wavelet_coeffs.h",
198 "transient/dyadic_decimator.h",
199 "transient/moving_moments.cc",
200 "transient/moving_moments.h",
201 "transient/transient_detector.cc",
202 "transient/transient_detector.h",
203 "transient/transient_suppressor.cc",
204 "transient/transient_suppressor.h",
205 "transient/wpd_node.cc",
206 "transient/wpd_node.h",
207 "transient/wpd_tree.cc",
208 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000209 "typing_detection.cc",
210 "typing_detection.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000211 "voice_detection_impl.cc",
212 "voice_detection_impl.h",
213 ]
214
215 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200216 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100217 ":aec_core",
aleloi868f32f2017-05-23 07:20:05 -0700218 ":aec_dump_interface",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100219 ":apm_logging",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100220 ":audio_frame_view",
Mirko Bonadei10679932017-12-05 15:07:16 +0100221 ":audio_processing_c",
Ivo Creusen56d46092017-11-24 17:29:59 +0100222 ":audio_processing_statistics",
mbonadei1140f972017-04-26 03:38:35 -0700223 "..:module_api",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200224 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100225 "../../:typedefs",
kwiberg529662a2017-09-04 05:43:17 -0700226 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700227 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100228 "../../api/audio:aec3_config",
229 "../../api/audio:echo_control",
aleloi6321b492016-12-05 01:46:09 -0800230 "../../audio/utility:audio_frame_operations",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100231 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100232 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100233 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700234 "../../rtc_base:gtest_prod",
235 "../../rtc_base:protobuf_utils",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100236 "../../rtc_base:sanitizer",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100237 "../../system_wrappers:cpu_features_api",
Per Åhgren11556462017-12-22 16:13:57 +0100238 "../../system_wrappers:field_trial_api",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100239 "../../system_wrappers:metrics_api",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100240 "agc2",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100241 "vad",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200242 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000243
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000244 if (aec_untrusted_delay_for_testing) {
245 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
246 }
247
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000248 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000249 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
250 deps += [ ":audioproc_debug_proto" ]
251 }
252
peah1bcfce52016-08-26 07:16:04 -0700253 if (rtc_enable_intelligibility_enhancer) {
254 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
255 sources += [
256 "intelligibility/intelligibility_enhancer.cc",
257 "intelligibility/intelligibility_enhancer.h",
258 "intelligibility/intelligibility_utils.cc",
259 "intelligibility/intelligibility_utils.h",
260 ]
261 } else {
262 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
263 }
264
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000265 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000266 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000267 } else {
268 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000269 }
270
kjellander8f4419b2016-06-02 02:09:52 -0700271 # TODO(jschuh): Bug 1348: fix this warning.
272 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000273
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000274 deps += [
275 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100276 "../../common_audio:fir_filter",
277 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700278 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000279 "../../system_wrappers",
280 ]
281}
282
Ivo Creusen56d46092017-11-24 17:29:59 +0100283rtc_source_set("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000284 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100285 sources = [
286 "include/audio_processing_statistics.cc",
287 "include/audio_processing_statistics.h",
288 ]
289 deps = [
290 "../../api:optional",
291 ]
292}
293
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100294rtc_source_set("audio_frame_view") {
295 sources = [
296 "include/audio_frame_view.h",
297 ]
298 deps = [
299 "../../api:array_view",
300 ]
301}
302
aleloi868f32f2017-05-23 07:20:05 -0700303rtc_source_set("aec_dump_interface") {
304 sources = [
305 "include/aec_dump.cc",
306 "include/aec_dump.h",
307 ]
308
309 deps = [
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100310 ":audio_frame_view",
kwiberg529662a2017-09-04 05:43:17 -0700311 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700312 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700313 ]
314}
315
kjellander7439f972016-12-05 22:47:46 -0800316rtc_source_set("audio_processing_c") {
317 visibility = [ ":*" ] # Only targets in this file can depend on this.
318 sources = [
319 "agc/legacy/analog_agc.c",
320 "agc/legacy/analog_agc.h",
321 "agc/legacy/digital_agc.c",
322 "agc/legacy/digital_agc.h",
323 "agc/legacy/gain_control.h",
324 ]
325
326 if (rtc_prefer_fixed_point) {
327 sources += [
328 "ns/noise_suppression_x.c",
329 "ns/noise_suppression_x.h",
330 "ns/nsx_core.c",
331 "ns/nsx_core.h",
332 "ns/nsx_defines.h",
333 ]
334 if (current_cpu == "mipsel") {
335 sources += [ "ns/nsx_core_mips.c" ]
336 } else {
337 sources += [ "ns/nsx_core_c.c" ]
338 }
339 } else {
340 sources += [
341 "ns/defines.h",
342 "ns/noise_suppression.c",
343 "ns/noise_suppression.h",
344 "ns/ns_core.c",
345 "ns/ns_core.h",
346 "ns/windows_private.h",
347 ]
348 }
349
350 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800351 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100352 "../../:typedefs",
kjellander7439f972016-12-05 22:47:46 -0800353 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100354 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100355 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700356 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100357 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800358 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800359
360 if (rtc_build_with_neon) {
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100361 sources += [ "ns/nsx_core_neon.c" ]
362
363 if (current_cpu != "arm64") {
364 # Enable compilation for the NEON instruction set. This is needed
365 # since //build/config/arm.gni only enables NEON for iOS, not Android.
366 # This provides the same functionality as webrtc/build/arm_neon.gypi.
367 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
368 cflags = [ "-mfpu=neon" ]
369 }
370
371 # Disable LTO on NEON targets due to compiler bug.
372 # TODO(fdegans): Enable this. See crbug.com/408997.
373 if (rtc_use_lto) {
374 cflags -= [
375 "-flto",
376 "-ffat-lto-objects",
377 ]
378 }
mbonadeie5dc3ce2017-01-25 05:34:46 -0800379 }
kjellander7439f972016-12-05 22:47:46 -0800380}
381
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000382if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000383 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200384 sources = [
385 "debug.proto",
386 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000387
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200388 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000389 }
390}
391
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100392rtc_source_set("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100393 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100394 sources = [
395 "logging/apm_data_dumper.cc",
396 "logging/apm_data_dumper.h",
397 ]
398 deps = [
399 "../../api:array_view",
400 "../../common_audio:common_audio",
401 "../../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100402 "../../rtc_base:stringutils",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100403 ]
404 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100405}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000406
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100407rtc_source_set("aec_core") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100408 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100409 sources = [
Patrik Höglund62139292017-12-19 16:44:45 +0100410 "aec/aec_common.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100411 "aec/aec_core.cc",
412 "aec/aec_core.h",
413 "aec/aec_core_optimized_methods.h",
414 "aecm/aecm_core.cc",
415 "aecm/aecm_core.h",
Patrik Höglund62139292017-12-19 16:44:45 +0100416 "aecm/aecm_defines.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100417 "aecm/echo_control_mobile.cc",
418 "aecm/echo_control_mobile.h",
419 "utility/block_mean_calculator.cc",
420 "utility/block_mean_calculator.h",
421 "utility/delay_estimator.cc",
422 "utility/delay_estimator.h",
423 "utility/delay_estimator_internal.h",
424 "utility/delay_estimator_wrapper.cc",
425 "utility/delay_estimator_wrapper.h",
426 "utility/ooura_fft.cc",
427 "utility/ooura_fft.h",
428 "utility/ooura_fft_tables_common.h",
429 ]
430 deps = [
431 ":apm_logging",
432 ":audio_processing_statistics",
433 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100434 "../../:typedefs",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100435 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100436 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100437 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100438 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100439 "../../rtc_base:sanitizer",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100440 "../../system_wrappers:cpu_features_api",
441 "../../system_wrappers:metrics_api",
442 ]
443 cflags = []
444 defines = []
445
446 if (current_cpu == "x86" || current_cpu == "x64") {
447 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800448 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700449 "utility/ooura_fft_sse2.cc",
450 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000451 ]
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200452 if (is_posix) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100453 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700454 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000455 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000456
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100457 if (rtc_build_with_neon) {
458 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800459 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700460 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700461 "utility/ooura_fft_neon.cc",
462 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000463 ]
464
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000465 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700466 # Enable compilation for the NEON instruction set. This is needed
467 # since //build/config/arm.gni only enables NEON for iOS, not Android.
468 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700469 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100470 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000471 }
472
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700473 # Disable LTO on NEON targets due to compiler bug.
474 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000475 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000476 cflags -= [
477 "-flto",
478 "-ffat-lto-objects",
479 ]
480 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700481
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100482 deps += [ "../../common_audio" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000483 }
kjellander7439f972016-12-05 22:47:46 -0800484
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100485 if (current_cpu == "mipsel") {
486 sources += [ "aecm/aecm_core_mips.cc" ]
487 if (mips_float_abi == "hard") {
488 sources += [
489 "aec/aec_core_mips.cc",
490 "utility/ooura_fft_mips.cc",
491 ]
492 }
493 } else {
494 sources += [ "aecm/aecm_core_c.cc" ]
495 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100496
497 # TODO(jschuh): Bug 1348: fix this warning.
498 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100499}
500
kjellanderfb114242016-06-13 00:19:48 -0700501if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100502 rtc_source_set("mocks") {
503 testonly = true
504 sources = [
505 "include/mock_audio_processing.h",
506 ]
507 deps = [
508 ":aec_dump_interface",
509 ":audio_processing",
510 ":audio_processing_statistics",
511 "../../test:test_support",
512 ]
513 }
514
kjellander6ceab082016-10-28 05:44:03 -0700515 group("audio_processing_tests") {
516 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100517 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700518 ":audioproc_test_utils",
519 ":click_annotate",
520 ":nonlinear_beamformer_test",
521 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700522 ]
523
524 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100525 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700526 }
527
528 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100529 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800530 ":audioproc_f",
531 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200532 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700533 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800534 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800535 ]
kjellander6ceab082016-10-28 05:44:03 -0700536 }
537 }
538
ehmaldonado36268652017-01-19 08:27:11 -0800539 rtc_source_set("audio_processing_unittests") {
540 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700541
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100542 configs += [ ":apm_debug_dump" ]
ehmaldonado36268652017-01-19 08:27:11 -0800543 sources = [
544 "aec/echo_cancellation_unittest.cc",
545 "aec/system_delay_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100546 "aec3/mock/mock_block_processor.h",
547 "aec3/mock/mock_echo_remover.h",
548 "aec3/mock/mock_render_delay_buffer.h",
549 "aec3/mock/mock_render_delay_controller.h",
ehmaldonado36268652017-01-19 08:27:11 -0800550 "agc/agc_manager_direct_unittest.cc",
551 "agc/loudness_histogram_unittest.cc",
552 "agc/mock_agc.h",
553 "audio_buffer_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100554 "audio_frame_view_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800555 "beamformer/array_util_unittest.cc",
556 "beamformer/complex_matrix_unittest.cc",
557 "beamformer/covariance_matrix_generator_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100558 "beamformer/matrix_test_helpers.h",
ehmaldonado36268652017-01-19 08:27:11 -0800559 "beamformer/matrix_unittest.cc",
560 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800561 "config_unittest.cc",
562 "echo_cancellation_impl_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100563 "gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800564 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200565 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800566 "transient/dyadic_decimator_unittest.cc",
567 "transient/file_utils.cc",
568 "transient/file_utils.h",
569 "transient/file_utils_unittest.cc",
570 "transient/moving_moments_unittest.cc",
571 "transient/transient_detector_unittest.cc",
572 "transient/transient_suppressor_unittest.cc",
573 "transient/wpd_node_unittest.cc",
574 "transient/wpd_tree_unittest.cc",
575 "utility/block_mean_calculator_unittest.cc",
576 "utility/delay_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800577 ]
578
579 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100580 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200581 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100582 ":apm_logging",
Alex Loiko153f11e2018-02-16 12:39:00 +0100583 ":audio_frame_view",
ehmaldonado36268652017-01-19 08:27:11 -0800584 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800585 ":audioproc_test_utils",
Patrik Höglund62139292017-12-19 16:44:45 +0100586 ":mocks",
mbonadei1140f972017-04-26 03:38:35 -0700587 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800588 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100589 "../../:typedefs",
kwiberg529662a2017-09-04 05:43:17 -0700590 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700591 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100592 "../../api/audio:aec3_config",
ehmaldonado36268652017-01-19 08:27:11 -0800593 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100594 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100595 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700596 "../../rtc_base:gtest_prod",
597 "../../rtc_base:protobuf_utils",
598 "../../rtc_base:rtc_base",
599 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100600 "../../system_wrappers",
601 "../../system_wrappers:cpu_features_api",
ehmaldonado36268652017-01-19 08:27:11 -0800602 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200603 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700604 "aec_dump:mock_aec_dump_unittests",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100605 "agc2:fixed_digital_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700606 "test/conversational_speech:unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100607 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800608 "//testing/gtest",
609 ]
610
611 defines = []
612
ehmaldonado36268652017-01-19 08:27:11 -0800613 if (rtc_enable_intelligibility_enhancer) {
614 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
615 sources += [
616 "intelligibility/intelligibility_enhancer_unittest.cc",
617 "intelligibility/intelligibility_utils_unittest.cc",
618 ]
619 } else {
620 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
621 }
622
623 if (rtc_prefer_fixed_point) {
624 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
625 } else {
626 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
627 }
628
629 if (rtc_enable_protobuf) {
630 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
631 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800632 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800633 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200634 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800635 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700636 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700637 "aec_dump",
638 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800639 ]
640 sources += [
peah522d71b2017-02-23 05:16:26 -0800641 "aec3/adaptive_fir_filter_unittest.cc",
642 "aec3/aec3_fft_unittest.cc",
643 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800644 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800645 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800646 "aec3/block_processor_unittest.cc",
647 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800648 "aec3/comfort_noise_generator_unittest.cc",
Per Åhgren38e2d952017-11-17 14:54:28 +0100649 "aec3/decimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800650 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800651 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800652 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800653 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800654 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800655 "aec3/erl_estimator_unittest.cc",
656 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800657 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800658 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800659 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800660 "aec3/matched_filter_lag_aggregator_unittest.cc",
661 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800662 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700663 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800664 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800665 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800666 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800667 "aec3/render_signal_analyzer_unittest.cc",
668 "aec3/residual_echo_estimator_unittest.cc",
669 "aec3/shadow_filter_update_gain_unittest.cc",
Per Åhgren39f491e2018-02-22 00:39:23 +0100670 "aec3/skew_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800671 "aec3/subtractor_unittest.cc",
672 "aec3/suppression_filter_unittest.cc",
673 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700674 "aec3/vector_math_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800675 "audio_processing_impl_locking_unittest.cc",
676 "audio_processing_impl_unittest.cc",
677 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800678 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800679 "echo_cancellation_bit_exact_unittest.cc",
680 "echo_control_mobile_unittest.cc",
681 "echo_detector/circular_buffer_unittest.cc",
682 "echo_detector/mean_variance_estimator_unittest.cc",
683 "echo_detector/moving_max_unittest.cc",
684 "echo_detector/normalized_covariance_estimator_unittest.cc",
685 "gain_control_unittest.cc",
686 "level_controller/level_controller_unittest.cc",
687 "level_estimator_unittest.cc",
688 "low_cut_filter_unittest.cc",
689 "noise_suppression_unittest.cc",
690 "residual_echo_detector_unittest.cc",
691 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800692 "test/debug_dump_replayer.cc",
693 "test/debug_dump_replayer.h",
694 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800695 "test/echo_canceller_test_tools.cc",
696 "test/echo_canceller_test_tools.h",
697 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800698 "test/test_utils.h",
699 "voice_detection_unittest.cc",
700 ]
701 }
702
703 if ((!build_with_chromium || is_win) && is_clang) {
704 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
705 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
706 }
707 }
708
ehmaldonado021eef32017-01-05 07:09:50 -0800709 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800710 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700711
ehmaldonado021eef32017-01-05 07:09:50 -0800712 sources = [
713 "audio_processing_performance_unittest.cc",
714 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800715 ]
716 deps = [
717 ":audio_processing",
718 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100719 "../../api:array_view",
720 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700721 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100722 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100723 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100724 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100725 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800726 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700727
ehmaldonado021eef32017-01-05 07:09:50 -0800728 if (rtc_enable_intelligibility_enhancer) {
729 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
730 } else {
731 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
732 }
733 }
734
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200735 rtc_source_set("analog_mic_simulation") {
736 sources = [
737 "test/fake_recording_device.cc",
738 "test/fake_recording_device.h",
739 ]
740 deps = [
741 "../../api:array_view",
742 "../../common_audio:common_audio",
743 "../../modules:module_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100744 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200745 "../../rtc_base:rtc_base_approved",
746 ]
747 }
748
ehmaldonado1fd08c12017-01-17 02:37:34 -0800749 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800750 rtc_executable("audioproc_f") {
751 testonly = true
752 sources = [
753 "test/aec_dump_based_simulator.cc",
754 "test/aec_dump_based_simulator.h",
755 "test/audio_processing_simulator.cc",
756 "test/audio_processing_simulator.h",
757 "test/audioproc_float.cc",
758 "test/wav_based_simulator.cc",
759 "test/wav_based_simulator.h",
760 ]
peahc3ec1fd2016-08-07 23:19:30 -0700761
ehmaldonado1fd08c12017-01-17 02:37:34 -0800762 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200763 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800764 ":audio_processing",
765 ":audioproc_debug_proto",
766 ":audioproc_protobuf_utils",
767 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700768 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800769 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100770 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700771 "../../rtc_base:protobuf_utils",
772 "../../rtc_base:rtc_base_approved",
773 "../../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100774 "../../rtc_base:stringutils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800775 "../../system_wrappers",
776 "../../system_wrappers:system_wrappers_default",
777 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700778 "aec_dump",
779 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800780 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800781 ]
782 } # audioproc_f
783 }
peahc3ec1fd2016-08-07 23:19:30 -0700784
ehmaldonado38a21322016-09-02 04:10:34 -0700785 rtc_source_set("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000786 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700787 testonly = true
788 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700789 "test/audio_buffer_tools.cc",
790 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200791 "test/bitexactness_tools.cc",
792 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800793 "test/performance_timer.cc",
794 "test/performance_timer.h",
795 "test/simulator_buffers.cc",
796 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700797 "test/test_utils.cc",
798 "test/test_utils.h",
799 ]
800
kjellanderfb114242016-06-13 00:19:48 -0700801 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800802 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700803 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700804 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700805 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700806 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100807 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700808 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100809 "../../system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200810 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200811 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200812 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700813 ]
814 }
815
ehmaldonado38a21322016-09-02 04:10:34 -0700816 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700817 testonly = true
818 sources = [
819 "transient/file_utils.cc",
820 "transient/file_utils.h",
821 "transient/transient_suppression_test.cc",
822 ]
823 deps = [
824 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700825 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800826 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100827 "../../:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800828 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700829 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100830 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100831 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700832 "../../test:test_support",
833 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700834 ]
kwiberg7a770e02016-08-25 02:32:43 -0700835 }
836
ehmaldonado38a21322016-09-02 04:10:34 -0700837 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700838 testonly = true
839 sources = [
840 "transient/click_annotate.cc",
841 "transient/file_utils.cc",
842 "transient/file_utils.h",
843 ]
844 deps = [
845 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800846 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100847 "../../:typedefs",
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",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100862 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700863 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700864 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700865 ]
kwiberg7a770e02016-08-25 02:32:43 -0700866 }
867
peah1bcfce52016-08-26 07:16:04 -0700868 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700869 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700870 testonly = true
871 sources = [
872 "intelligibility/test/intelligibility_proc.cc",
873 ]
874 deps = [
875 ":audio_processing",
876 ":audioproc_test_utils",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100877 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700878 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700879 "../../system_wrappers:metrics_default",
880 "../../test:test_support",
881 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700882 ]
kwiberg7a770e02016-08-25 02:32:43 -0700883 }
884 }
885
kjellanderfb114242016-06-13 00:19:48 -0700886 if (rtc_enable_protobuf) {
887 proto_library("audioproc_unittest_proto") {
888 sources = [
889 "test/unittest.proto",
890 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200891 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700892 }
893
kjellanderb62dbbe2016-09-23 00:38:52 -0700894 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700895 sources = [
896 "test/protobuf_utils.cc",
897 "test/protobuf_utils.h",
898 ]
899
900 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700901 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800902 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100903 "../../:typedefs",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700904 "../../rtc_base:protobuf_utils",
905 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700906 ]
907 }
908 }
909}