blob: 617440262c8828280015b59be5cdc9d0829822f0 [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",
kwiberg529662a2017-09-04 05:43:17 -0700224 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700225 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100226 "../../api/audio:aec3_config",
227 "../../api/audio:echo_control",
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",
Alex Loiko153f11e2018-02-16 12:39:00 +0100552 "audio_frame_view_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800553 "beamformer/array_util_unittest.cc",
554 "beamformer/complex_matrix_unittest.cc",
555 "beamformer/covariance_matrix_generator_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100556 "beamformer/matrix_test_helpers.h",
ehmaldonado36268652017-01-19 08:27:11 -0800557 "beamformer/matrix_unittest.cc",
558 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800559 "config_unittest.cc",
560 "echo_cancellation_impl_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100561 "gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800562 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200563 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800564 "transient/dyadic_decimator_unittest.cc",
565 "transient/file_utils.cc",
566 "transient/file_utils.h",
567 "transient/file_utils_unittest.cc",
568 "transient/moving_moments_unittest.cc",
569 "transient/transient_detector_unittest.cc",
570 "transient/transient_suppressor_unittest.cc",
571 "transient/wpd_node_unittest.cc",
572 "transient/wpd_tree_unittest.cc",
573 "utility/block_mean_calculator_unittest.cc",
574 "utility/delay_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800575 ]
576
577 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100578 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200579 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100580 ":apm_logging",
Alex Loiko153f11e2018-02-16 12:39:00 +0100581 ":audio_frame_view",
ehmaldonado36268652017-01-19 08:27:11 -0800582 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800583 ":audioproc_test_utils",
Patrik Höglund62139292017-12-19 16:44:45 +0100584 ":mocks",
mbonadei1140f972017-04-26 03:38:35 -0700585 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800586 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100587 "../../:typedefs",
kwiberg529662a2017-09-04 05:43:17 -0700588 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700589 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100590 "../../api/audio:aec3_config",
ehmaldonado36268652017-01-19 08:27:11 -0800591 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100592 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100593 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700594 "../../rtc_base:gtest_prod",
595 "../../rtc_base:protobuf_utils",
596 "../../rtc_base:rtc_base",
597 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100598 "../../system_wrappers",
599 "../../system_wrappers:cpu_features_api",
ehmaldonado36268652017-01-19 08:27:11 -0800600 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200601 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700602 "aec_dump:mock_aec_dump_unittests",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100603 "agc2:fixed_digital_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700604 "test/conversational_speech:unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100605 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800606 "//testing/gtest",
607 ]
608
609 defines = []
610
ehmaldonado36268652017-01-19 08:27:11 -0800611 if (rtc_enable_intelligibility_enhancer) {
612 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
613 sources += [
614 "intelligibility/intelligibility_enhancer_unittest.cc",
615 "intelligibility/intelligibility_utils_unittest.cc",
616 ]
617 } else {
618 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
619 }
620
621 if (rtc_prefer_fixed_point) {
622 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
623 } else {
624 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
625 }
626
627 if (rtc_enable_protobuf) {
628 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
629 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800630 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800631 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200632 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800633 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700634 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700635 "aec_dump",
636 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800637 ]
638 sources += [
peah522d71b2017-02-23 05:16:26 -0800639 "aec3/adaptive_fir_filter_unittest.cc",
640 "aec3/aec3_fft_unittest.cc",
641 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800642 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800643 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800644 "aec3/block_processor_unittest.cc",
645 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800646 "aec3/comfort_noise_generator_unittest.cc",
Per Åhgren38e2d952017-11-17 14:54:28 +0100647 "aec3/decimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800648 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800649 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800650 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800651 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800652 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800653 "aec3/erl_estimator_unittest.cc",
654 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800655 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800656 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800657 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800658 "aec3/matched_filter_lag_aggregator_unittest.cc",
659 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800660 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700661 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800662 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800663 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800664 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800665 "aec3/render_signal_analyzer_unittest.cc",
666 "aec3/residual_echo_estimator_unittest.cc",
667 "aec3/shadow_filter_update_gain_unittest.cc",
668 "aec3/subtractor_unittest.cc",
669 "aec3/suppression_filter_unittest.cc",
670 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700671 "aec3/vector_math_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800672 "audio_processing_impl_locking_unittest.cc",
673 "audio_processing_impl_unittest.cc",
674 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800675 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800676 "echo_cancellation_bit_exact_unittest.cc",
677 "echo_control_mobile_unittest.cc",
678 "echo_detector/circular_buffer_unittest.cc",
679 "echo_detector/mean_variance_estimator_unittest.cc",
680 "echo_detector/moving_max_unittest.cc",
681 "echo_detector/normalized_covariance_estimator_unittest.cc",
682 "gain_control_unittest.cc",
683 "level_controller/level_controller_unittest.cc",
684 "level_estimator_unittest.cc",
685 "low_cut_filter_unittest.cc",
686 "noise_suppression_unittest.cc",
687 "residual_echo_detector_unittest.cc",
688 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800689 "test/debug_dump_replayer.cc",
690 "test/debug_dump_replayer.h",
691 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800692 "test/echo_canceller_test_tools.cc",
693 "test/echo_canceller_test_tools.h",
694 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800695 "test/test_utils.h",
696 "voice_detection_unittest.cc",
697 ]
698 }
699
700 if ((!build_with_chromium || is_win) && is_clang) {
701 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
702 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
703 }
704 }
705
ehmaldonado021eef32017-01-05 07:09:50 -0800706 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800707 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700708
ehmaldonado021eef32017-01-05 07:09:50 -0800709 sources = [
710 "audio_processing_performance_unittest.cc",
711 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800712 ]
713 deps = [
714 ":audio_processing",
715 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100716 "../../api:array_view",
717 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700718 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100719 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100720 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100721 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100722 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800723 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700724
ehmaldonado021eef32017-01-05 07:09:50 -0800725 if (rtc_enable_intelligibility_enhancer) {
726 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
727 } else {
728 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
729 }
730 }
731
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200732 rtc_source_set("analog_mic_simulation") {
733 sources = [
734 "test/fake_recording_device.cc",
735 "test/fake_recording_device.h",
736 ]
737 deps = [
738 "../../api:array_view",
739 "../../common_audio:common_audio",
740 "../../modules:module_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100741 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200742 "../../rtc_base:rtc_base_approved",
743 ]
744 }
745
ehmaldonado1fd08c12017-01-17 02:37:34 -0800746 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800747 rtc_executable("audioproc_f") {
748 testonly = true
749 sources = [
750 "test/aec_dump_based_simulator.cc",
751 "test/aec_dump_based_simulator.h",
752 "test/audio_processing_simulator.cc",
753 "test/audio_processing_simulator.h",
754 "test/audioproc_float.cc",
755 "test/wav_based_simulator.cc",
756 "test/wav_based_simulator.h",
757 ]
peahc3ec1fd2016-08-07 23:19:30 -0700758
ehmaldonado1fd08c12017-01-17 02:37:34 -0800759 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200760 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800761 ":audio_processing",
762 ":audioproc_debug_proto",
763 ":audioproc_protobuf_utils",
764 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700765 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800766 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100767 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700768 "../../rtc_base:protobuf_utils",
769 "../../rtc_base:rtc_base_approved",
770 "../../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100771 "../../rtc_base:stringutils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800772 "../../system_wrappers",
773 "../../system_wrappers:system_wrappers_default",
774 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700775 "aec_dump",
776 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800777 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800778 ]
779 } # audioproc_f
780 }
peahc3ec1fd2016-08-07 23:19:30 -0700781
ehmaldonado38a21322016-09-02 04:10:34 -0700782 rtc_source_set("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000783 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700784 testonly = true
785 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700786 "test/audio_buffer_tools.cc",
787 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200788 "test/bitexactness_tools.cc",
789 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800790 "test/performance_timer.cc",
791 "test/performance_timer.h",
792 "test/simulator_buffers.cc",
793 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700794 "test/test_utils.cc",
795 "test/test_utils.h",
796 ]
797
kjellanderfb114242016-06-13 00:19:48 -0700798 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800799 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700800 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700801 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700802 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700803 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100804 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700805 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100806 "../../system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200807 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200808 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200809 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700810 ]
811 }
812
ehmaldonado38a21322016-09-02 04:10:34 -0700813 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700814 testonly = true
815 sources = [
816 "transient/file_utils.cc",
817 "transient/file_utils.h",
818 "transient/transient_suppression_test.cc",
819 ]
820 deps = [
821 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700822 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800823 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100824 "../../:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800825 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700826 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100827 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100828 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700829 "../../test:test_support",
830 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700831 ]
kwiberg7a770e02016-08-25 02:32:43 -0700832 }
833
ehmaldonado38a21322016-09-02 04:10:34 -0700834 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700835 testonly = true
836 sources = [
837 "transient/click_annotate.cc",
838 "transient/file_utils.cc",
839 "transient/file_utils.h",
840 ]
841 deps = [
842 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800843 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100844 "../../:typedefs",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100845 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700846 "../../system_wrappers:metrics_default",
847 ]
848 }
849
ehmaldonado38a21322016-09-02 04:10:34 -0700850 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700851 testonly = true
852 sources = [
853 "beamformer/nonlinear_beamformer_test.cc",
854 ]
855 deps = [
856 ":audio_processing",
857 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800858 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100859 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700860 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700861 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700862 ]
kwiberg7a770e02016-08-25 02:32:43 -0700863 }
864
peah1bcfce52016-08-26 07:16:04 -0700865 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700866 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700867 testonly = true
868 sources = [
869 "intelligibility/test/intelligibility_proc.cc",
870 ]
871 deps = [
872 ":audio_processing",
873 ":audioproc_test_utils",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100874 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700875 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700876 "../../system_wrappers:metrics_default",
877 "../../test:test_support",
878 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700879 ]
kwiberg7a770e02016-08-25 02:32:43 -0700880 }
881 }
882
kjellanderfb114242016-06-13 00:19:48 -0700883 if (rtc_enable_protobuf) {
884 proto_library("audioproc_unittest_proto") {
885 sources = [
886 "test/unittest.proto",
887 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200888 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700889 }
890
kjellanderb62dbbe2016-09-23 00:38:52 -0700891 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700892 sources = [
893 "test/protobuf_utils.cc",
894 "test/protobuf_utils.h",
895 ]
896
897 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700898 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800899 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100900 "../../:typedefs",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700901 "../../rtc_base:protobuf_utils",
902 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700903 ]
904 }
905 }
906}