blob: 60605e90cc9265fe235be3b2042c6596b1b9441a [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",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000123 "audio_buffer.cc",
124 "audio_buffer.h",
125 "audio_processing_impl.cc",
126 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -0700127 "beamformer/array_util.cc",
128 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000129 "beamformer/complex_matrix.h",
130 "beamformer/covariance_matrix_generator.cc",
131 "beamformer/covariance_matrix_generator.h",
132 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +0000133 "beamformer/nonlinear_beamformer.cc",
134 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000135 "common.h",
136 "echo_cancellation_impl.cc",
137 "echo_cancellation_impl.h",
138 "echo_control_mobile_impl.cc",
139 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -0700140 "echo_detector/circular_buffer.cc",
141 "echo_detector/circular_buffer.h",
142 "echo_detector/mean_variance_estimator.cc",
143 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -0800144 "echo_detector/moving_max.cc",
145 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -0700146 "echo_detector/normalized_covariance_estimator.cc",
147 "echo_detector/normalized_covariance_estimator.h",
peahbe615622016-02-13 16:40:47 -0800148 "gain_control_for_experimental_agc.cc",
149 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000150 "gain_control_impl.cc",
151 "gain_control_impl.h",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100152 "gain_controller2.cc",
153 "gain_controller2.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",
peahca4cac72016-06-29 15:26:12 -0700158 "level_controller/biquad_filter.cc",
159 "level_controller/biquad_filter.h",
160 "level_controller/down_sampler.cc",
161 "level_controller/down_sampler.h",
162 "level_controller/gain_applier.cc",
163 "level_controller/gain_applier.h",
164 "level_controller/gain_selector.cc",
165 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -0700166 "level_controller/level_controller.cc",
167 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -0700168 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -0700169 "level_controller/noise_level_estimator.cc",
170 "level_controller/noise_level_estimator.h",
171 "level_controller/noise_spectrum_estimator.cc",
172 "level_controller/noise_spectrum_estimator.h",
173 "level_controller/peak_level_estimator.cc",
174 "level_controller/peak_level_estimator.h",
175 "level_controller/saturating_gain_estimator.cc",
176 "level_controller/saturating_gain_estimator.h",
177 "level_controller/signal_classifier.cc",
178 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000179 "level_estimator_impl.cc",
180 "level_estimator_impl.h",
peah8271d042016-11-22 07:24:52 -0800181 "low_cut_filter.cc",
182 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000183 "noise_suppression_impl.cc",
184 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800185 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700186 "residual_echo_detector.cc",
187 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000188 "rms_level.cc",
189 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000190 "splitting_filter.cc",
191 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700192 "three_band_filter_bank.cc",
193 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000194 "transient/common.h",
195 "transient/daubechies_8_wavelet_coeffs.h",
196 "transient/dyadic_decimator.h",
197 "transient/moving_moments.cc",
198 "transient/moving_moments.h",
199 "transient/transient_detector.cc",
200 "transient/transient_detector.h",
201 "transient/transient_suppressor.cc",
202 "transient/transient_suppressor.h",
203 "transient/wpd_node.cc",
204 "transient/wpd_node.h",
205 "transient/wpd_tree.cc",
206 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000207 "typing_detection.cc",
208 "typing_detection.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000209 "voice_detection_impl.cc",
210 "voice_detection_impl.h",
211 ]
212
213 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200214 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100215 ":aec_core",
aleloi868f32f2017-05-23 07:20:05 -0700216 ":aec_dump_interface",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100217 ":apm_logging",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100218 ":audio_frame_view",
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",
Gustaf Ullbergfd4ce502018-02-15 10:09:09 +0100226 "../../api:echo_control",
kwiberg84f6a3f2017-09-05 08:43:13 -0700227 "../../api:optional",
aleloi6321b492016-12-05 01:46:09 -0800228 "../../audio/utility:audio_frame_operations",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100229 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100230 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100231 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700232 "../../rtc_base:gtest_prod",
233 "../../rtc_base:protobuf_utils",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100234 "../../rtc_base:sanitizer",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100235 "../../system_wrappers:cpu_features_api",
Per Åhgren11556462017-12-22 16:13:57 +0100236 "../../system_wrappers:field_trial_api",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100237 "../../system_wrappers:metrics_api",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100238 "agc2",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100239 "vad",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200240 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000241
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000242 if (aec_untrusted_delay_for_testing) {
243 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
244 }
245
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000246 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000247 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
248 deps += [ ":audioproc_debug_proto" ]
249 }
250
peah1bcfce52016-08-26 07:16:04 -0700251 if (rtc_enable_intelligibility_enhancer) {
252 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
253 sources += [
254 "intelligibility/intelligibility_enhancer.cc",
255 "intelligibility/intelligibility_enhancer.h",
256 "intelligibility/intelligibility_utils.cc",
257 "intelligibility/intelligibility_utils.h",
258 ]
259 } else {
260 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
261 }
262
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000263 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000264 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000265 } else {
266 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000267 }
268
kjellander8f4419b2016-06-02 02:09:52 -0700269 # TODO(jschuh): Bug 1348: fix this warning.
270 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000271
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000272 deps += [
273 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100274 "../../common_audio:fir_filter",
275 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700276 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000277 "../../system_wrappers",
278 ]
279}
280
Ivo Creusen56d46092017-11-24 17:29:59 +0100281rtc_source_set("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000282 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100283 sources = [
284 "include/audio_processing_statistics.cc",
285 "include/audio_processing_statistics.h",
286 ]
287 deps = [
288 "../../api:optional",
289 ]
290}
291
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100292rtc_source_set("audio_frame_view") {
293 sources = [
294 "include/audio_frame_view.h",
295 ]
296 deps = [
297 "../../api:array_view",
298 ]
299}
300
aleloi868f32f2017-05-23 07:20:05 -0700301rtc_source_set("aec_dump_interface") {
302 sources = [
303 "include/aec_dump.cc",
304 "include/aec_dump.h",
305 ]
306
307 deps = [
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100308 ":audio_frame_view",
kwiberg529662a2017-09-04 05:43:17 -0700309 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700310 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700311 ]
312}
313
kjellander7439f972016-12-05 22:47:46 -0800314rtc_source_set("audio_processing_c") {
315 visibility = [ ":*" ] # Only targets in this file can depend on this.
316 sources = [
317 "agc/legacy/analog_agc.c",
318 "agc/legacy/analog_agc.h",
319 "agc/legacy/digital_agc.c",
320 "agc/legacy/digital_agc.h",
321 "agc/legacy/gain_control.h",
322 ]
323
324 if (rtc_prefer_fixed_point) {
325 sources += [
326 "ns/noise_suppression_x.c",
327 "ns/noise_suppression_x.h",
328 "ns/nsx_core.c",
329 "ns/nsx_core.h",
330 "ns/nsx_defines.h",
331 ]
332 if (current_cpu == "mipsel") {
333 sources += [ "ns/nsx_core_mips.c" ]
334 } else {
335 sources += [ "ns/nsx_core_c.c" ]
336 }
337 } else {
338 sources += [
339 "ns/defines.h",
340 "ns/noise_suppression.c",
341 "ns/noise_suppression.h",
342 "ns/ns_core.c",
343 "ns/ns_core.h",
344 "ns/windows_private.h",
345 ]
346 }
347
348 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800349 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100350 "../../:typedefs",
kjellander7439f972016-12-05 22:47:46 -0800351 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100352 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100353 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700354 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100355 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800356 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800357
358 if (rtc_build_with_neon) {
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100359 sources += [ "ns/nsx_core_neon.c" ]
360
361 if (current_cpu != "arm64") {
362 # Enable compilation for the NEON instruction set. This is needed
363 # since //build/config/arm.gni only enables NEON for iOS, not Android.
364 # This provides the same functionality as webrtc/build/arm_neon.gypi.
365 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
366 cflags = [ "-mfpu=neon" ]
367 }
368
369 # Disable LTO on NEON targets due to compiler bug.
370 # TODO(fdegans): Enable this. See crbug.com/408997.
371 if (rtc_use_lto) {
372 cflags -= [
373 "-flto",
374 "-ffat-lto-objects",
375 ]
376 }
mbonadeie5dc3ce2017-01-25 05:34:46 -0800377 }
kjellander7439f972016-12-05 22:47:46 -0800378}
379
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000380if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000381 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200382 sources = [
383 "debug.proto",
384 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000385
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200386 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000387 }
388}
389
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100390rtc_source_set("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100391 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100392 sources = [
393 "logging/apm_data_dumper.cc",
394 "logging/apm_data_dumper.h",
395 ]
396 deps = [
397 "../../api:array_view",
398 "../../common_audio:common_audio",
399 "../../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100400 "../../rtc_base:stringutils",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100401 ]
402 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100403}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000404
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100405rtc_source_set("aec_core") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100406 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100407 sources = [
Patrik Höglund62139292017-12-19 16:44:45 +0100408 "aec/aec_common.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100409 "aec/aec_core.cc",
410 "aec/aec_core.h",
411 "aec/aec_core_optimized_methods.h",
412 "aecm/aecm_core.cc",
413 "aecm/aecm_core.h",
Patrik Höglund62139292017-12-19 16:44:45 +0100414 "aecm/aecm_defines.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100415 "aecm/echo_control_mobile.cc",
416 "aecm/echo_control_mobile.h",
417 "utility/block_mean_calculator.cc",
418 "utility/block_mean_calculator.h",
419 "utility/delay_estimator.cc",
420 "utility/delay_estimator.h",
421 "utility/delay_estimator_internal.h",
422 "utility/delay_estimator_wrapper.cc",
423 "utility/delay_estimator_wrapper.h",
424 "utility/ooura_fft.cc",
425 "utility/ooura_fft.h",
426 "utility/ooura_fft_tables_common.h",
427 ]
428 deps = [
429 ":apm_logging",
430 ":audio_processing_statistics",
431 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100432 "../../:typedefs",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100433 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100434 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100435 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100436 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100437 "../../rtc_base:sanitizer",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100438 "../../system_wrappers:cpu_features_api",
439 "../../system_wrappers:metrics_api",
440 ]
441 cflags = []
442 defines = []
443
444 if (current_cpu == "x86" || current_cpu == "x64") {
445 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800446 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700447 "utility/ooura_fft_sse2.cc",
448 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000449 ]
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200450 if (is_posix) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100451 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700452 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000453 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000454
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100455 if (rtc_build_with_neon) {
456 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800457 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700458 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700459 "utility/ooura_fft_neon.cc",
460 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000461 ]
462
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000463 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700464 # Enable compilation for the NEON instruction set. This is needed
465 # since //build/config/arm.gni only enables NEON for iOS, not Android.
466 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700467 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100468 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000469 }
470
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700471 # Disable LTO on NEON targets due to compiler bug.
472 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000473 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000474 cflags -= [
475 "-flto",
476 "-ffat-lto-objects",
477 ]
478 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700479
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100480 deps += [ "../../common_audio" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000481 }
kjellander7439f972016-12-05 22:47:46 -0800482
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100483 if (current_cpu == "mipsel") {
484 sources += [ "aecm/aecm_core_mips.cc" ]
485 if (mips_float_abi == "hard") {
486 sources += [
487 "aec/aec_core_mips.cc",
488 "utility/ooura_fft_mips.cc",
489 ]
490 }
491 } else {
492 sources += [ "aecm/aecm_core_c.cc" ]
493 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100494
495 # TODO(jschuh): Bug 1348: fix this warning.
496 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100497}
498
kjellanderfb114242016-06-13 00:19:48 -0700499if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100500 rtc_source_set("mocks") {
501 testonly = true
502 sources = [
503 "include/mock_audio_processing.h",
504 ]
505 deps = [
506 ":aec_dump_interface",
507 ":audio_processing",
508 ":audio_processing_statistics",
509 "../../test:test_support",
510 ]
511 }
512
kjellander6ceab082016-10-28 05:44:03 -0700513 group("audio_processing_tests") {
514 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100515 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700516 ":audioproc_test_utils",
517 ":click_annotate",
518 ":nonlinear_beamformer_test",
519 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700520 ]
521
522 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100523 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700524 }
525
526 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100527 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800528 ":audioproc_f",
529 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200530 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700531 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800532 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800533 ]
kjellander6ceab082016-10-28 05:44:03 -0700534 }
535 }
536
ehmaldonado36268652017-01-19 08:27:11 -0800537 rtc_source_set("audio_processing_unittests") {
538 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700539
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100540 configs += [ ":apm_debug_dump" ]
ehmaldonado36268652017-01-19 08:27:11 -0800541 sources = [
542 "aec/echo_cancellation_unittest.cc",
543 "aec/system_delay_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100544 "aec3/mock/mock_block_processor.h",
545 "aec3/mock/mock_echo_remover.h",
546 "aec3/mock/mock_render_delay_buffer.h",
547 "aec3/mock/mock_render_delay_controller.h",
ehmaldonado36268652017-01-19 08:27:11 -0800548 "agc/agc_manager_direct_unittest.cc",
549 "agc/loudness_histogram_unittest.cc",
550 "agc/mock_agc.h",
551 "audio_buffer_unittest.cc",
552 "beamformer/array_util_unittest.cc",
553 "beamformer/complex_matrix_unittest.cc",
554 "beamformer/covariance_matrix_generator_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100555 "beamformer/matrix_test_helpers.h",
ehmaldonado36268652017-01-19 08:27:11 -0800556 "beamformer/matrix_unittest.cc",
557 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800558 "config_unittest.cc",
559 "echo_cancellation_impl_unittest.cc",
560 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200561 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800562 "transient/dyadic_decimator_unittest.cc",
563 "transient/file_utils.cc",
564 "transient/file_utils.h",
565 "transient/file_utils_unittest.cc",
566 "transient/moving_moments_unittest.cc",
567 "transient/transient_detector_unittest.cc",
568 "transient/transient_suppressor_unittest.cc",
569 "transient/wpd_node_unittest.cc",
570 "transient/wpd_tree_unittest.cc",
571 "utility/block_mean_calculator_unittest.cc",
572 "utility/delay_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800573 ]
574
575 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100576 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200577 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100578 ":apm_logging",
ehmaldonado36268652017-01-19 08:27:11 -0800579 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800580 ":audioproc_test_utils",
Patrik Höglund62139292017-12-19 16:44:45 +0100581 ":mocks",
mbonadei1140f972017-04-26 03:38:35 -0700582 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800583 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100584 "../../:typedefs",
Gustaf Ullberg3646f972018-02-14 15:19:04 +0100585 "../../api:aec3_config",
kwiberg529662a2017-09-04 05:43:17 -0700586 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700587 "../../api:optional",
ehmaldonado36268652017-01-19 08:27:11 -0800588 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100589 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100590 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700591 "../../rtc_base:gtest_prod",
592 "../../rtc_base:protobuf_utils",
593 "../../rtc_base:rtc_base",
594 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100595 "../../system_wrappers",
596 "../../system_wrappers:cpu_features_api",
ehmaldonado36268652017-01-19 08:27:11 -0800597 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200598 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700599 "aec_dump:mock_aec_dump_unittests",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100600 "agc2:fixed_digital_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700601 "test/conversational_speech:unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100602 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800603 "//testing/gtest",
604 ]
605
606 defines = []
607
ehmaldonado36268652017-01-19 08:27:11 -0800608 if (rtc_enable_intelligibility_enhancer) {
609 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
610 sources += [
611 "intelligibility/intelligibility_enhancer_unittest.cc",
612 "intelligibility/intelligibility_utils_unittest.cc",
613 ]
614 } else {
615 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
616 }
617
618 if (rtc_prefer_fixed_point) {
619 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
620 } else {
621 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
622 }
623
624 if (rtc_enable_protobuf) {
625 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
626 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800627 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800628 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200629 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800630 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700631 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700632 "aec_dump",
633 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800634 ]
635 sources += [
peah522d71b2017-02-23 05:16:26 -0800636 "aec3/adaptive_fir_filter_unittest.cc",
637 "aec3/aec3_fft_unittest.cc",
638 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800639 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800640 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800641 "aec3/block_processor_unittest.cc",
642 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800643 "aec3/comfort_noise_generator_unittest.cc",
Per Åhgren38e2d952017-11-17 14:54:28 +0100644 "aec3/decimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800645 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800646 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800647 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800648 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800649 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800650 "aec3/erl_estimator_unittest.cc",
651 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800652 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800653 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800654 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800655 "aec3/matched_filter_lag_aggregator_unittest.cc",
656 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800657 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700658 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800659 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800660 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800661 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800662 "aec3/render_signal_analyzer_unittest.cc",
663 "aec3/residual_echo_estimator_unittest.cc",
664 "aec3/shadow_filter_update_gain_unittest.cc",
665 "aec3/subtractor_unittest.cc",
666 "aec3/suppression_filter_unittest.cc",
667 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700668 "aec3/vector_math_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800669 "audio_processing_impl_locking_unittest.cc",
670 "audio_processing_impl_unittest.cc",
671 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800672 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800673 "echo_cancellation_bit_exact_unittest.cc",
674 "echo_control_mobile_unittest.cc",
675 "echo_detector/circular_buffer_unittest.cc",
676 "echo_detector/mean_variance_estimator_unittest.cc",
677 "echo_detector/moving_max_unittest.cc",
678 "echo_detector/normalized_covariance_estimator_unittest.cc",
679 "gain_control_unittest.cc",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100680 "gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800681 "level_controller/level_controller_unittest.cc",
682 "level_estimator_unittest.cc",
683 "low_cut_filter_unittest.cc",
684 "noise_suppression_unittest.cc",
685 "residual_echo_detector_unittest.cc",
686 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800687 "test/debug_dump_replayer.cc",
688 "test/debug_dump_replayer.h",
689 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800690 "test/echo_canceller_test_tools.cc",
691 "test/echo_canceller_test_tools.h",
692 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800693 "test/test_utils.h",
694 "voice_detection_unittest.cc",
695 ]
696 }
697
698 if ((!build_with_chromium || is_win) && is_clang) {
699 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
700 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
701 }
702 }
703
ehmaldonado021eef32017-01-05 07:09:50 -0800704 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800705 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700706
ehmaldonado021eef32017-01-05 07:09:50 -0800707 sources = [
708 "audio_processing_performance_unittest.cc",
709 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800710 ]
711 deps = [
712 ":audio_processing",
713 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100714 "../../api:array_view",
715 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700716 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100717 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100718 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100719 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100720 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800721 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700722
ehmaldonado021eef32017-01-05 07:09:50 -0800723 if (rtc_enable_intelligibility_enhancer) {
724 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
725 } else {
726 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
727 }
728 }
729
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200730 rtc_source_set("analog_mic_simulation") {
731 sources = [
732 "test/fake_recording_device.cc",
733 "test/fake_recording_device.h",
734 ]
735 deps = [
736 "../../api:array_view",
737 "../../common_audio:common_audio",
738 "../../modules:module_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100739 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200740 "../../rtc_base:rtc_base_approved",
741 ]
742 }
743
ehmaldonado1fd08c12017-01-17 02:37:34 -0800744 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800745 rtc_executable("audioproc_f") {
746 testonly = true
747 sources = [
748 "test/aec_dump_based_simulator.cc",
749 "test/aec_dump_based_simulator.h",
750 "test/audio_processing_simulator.cc",
751 "test/audio_processing_simulator.h",
752 "test/audioproc_float.cc",
753 "test/wav_based_simulator.cc",
754 "test/wav_based_simulator.h",
755 ]
peahc3ec1fd2016-08-07 23:19:30 -0700756
ehmaldonado1fd08c12017-01-17 02:37:34 -0800757 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200758 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800759 ":audio_processing",
760 ":audioproc_debug_proto",
761 ":audioproc_protobuf_utils",
762 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700763 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800764 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100765 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700766 "../../rtc_base:protobuf_utils",
767 "../../rtc_base:rtc_base_approved",
768 "../../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100769 "../../rtc_base:stringutils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800770 "../../system_wrappers",
771 "../../system_wrappers:system_wrappers_default",
772 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700773 "aec_dump",
774 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800775 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800776 ]
777 } # audioproc_f
778 }
peahc3ec1fd2016-08-07 23:19:30 -0700779
ehmaldonado38a21322016-09-02 04:10:34 -0700780 rtc_source_set("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000781 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700782 testonly = true
783 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700784 "test/audio_buffer_tools.cc",
785 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200786 "test/bitexactness_tools.cc",
787 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800788 "test/performance_timer.cc",
789 "test/performance_timer.h",
790 "test/simulator_buffers.cc",
791 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700792 "test/test_utils.cc",
793 "test/test_utils.h",
794 ]
795
kjellanderfb114242016-06-13 00:19:48 -0700796 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800797 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700798 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700799 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700800 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700801 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100802 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700803 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100804 "../../system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200805 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200806 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200807 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700808 ]
809 }
810
ehmaldonado38a21322016-09-02 04:10:34 -0700811 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700812 testonly = true
813 sources = [
814 "transient/file_utils.cc",
815 "transient/file_utils.h",
816 "transient/transient_suppression_test.cc",
817 ]
818 deps = [
819 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700820 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800821 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100822 "../../:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800823 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700824 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100825 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100826 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700827 "../../test:test_support",
828 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700829 ]
kwiberg7a770e02016-08-25 02:32:43 -0700830 }
831
ehmaldonado38a21322016-09-02 04:10:34 -0700832 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700833 testonly = true
834 sources = [
835 "transient/click_annotate.cc",
836 "transient/file_utils.cc",
837 "transient/file_utils.h",
838 ]
839 deps = [
840 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800841 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100842 "../../:typedefs",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100843 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700844 "../../system_wrappers:metrics_default",
845 ]
846 }
847
ehmaldonado38a21322016-09-02 04:10:34 -0700848 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700849 testonly = true
850 sources = [
851 "beamformer/nonlinear_beamformer_test.cc",
852 ]
853 deps = [
854 ":audio_processing",
855 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800856 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100857 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700858 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700859 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700860 ]
kwiberg7a770e02016-08-25 02:32:43 -0700861 }
862
peah1bcfce52016-08-26 07:16:04 -0700863 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700864 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700865 testonly = true
866 sources = [
867 "intelligibility/test/intelligibility_proc.cc",
868 ]
869 deps = [
870 ":audio_processing",
871 ":audioproc_test_utils",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100872 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700873 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700874 "../../system_wrappers:metrics_default",
875 "../../test:test_support",
876 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700877 ]
kwiberg7a770e02016-08-25 02:32:43 -0700878 }
879 }
880
kjellanderfb114242016-06-13 00:19:48 -0700881 if (rtc_enable_protobuf) {
882 proto_library("audioproc_unittest_proto") {
883 sources = [
884 "test/unittest.proto",
885 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200886 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700887 }
888
kjellanderb62dbbe2016-09-23 00:38:52 -0700889 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700890 sources = [
891 "test/protobuf_utils.cc",
892 "test/protobuf_utils.h",
893 ]
894
895 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700896 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800897 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100898 "../../:typedefs",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700899 "../../rtc_base:protobuf_utils",
900 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700901 ]
902 }
903 }
904}