blob: 75d890d4f12735a5d753f1c4d73dd3ab71e15ece [file] [log] [blame]
Gustaf Ullbergf35c6662018-02-23 13:18:29 +01001# Copyright (c) 2018 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
9import("//build/config/arm.gni")
10import("../../../webrtc.gni")
11
Gustaf Ullbergf35c6662018-02-23 13:18:29 +010012rtc_static_library("aec3") {
13 visibility = [ "*" ]
Gustaf Ullberg0efa9412018-02-27 13:58:45 +010014 configs += [ "..:apm_debug_dump" ]
Gustaf Ullbergf35c6662018-02-23 13:18:29 +010015 sources = [
16 "adaptive_fir_filter.cc",
17 "adaptive_fir_filter.h",
18 "aec3_common.cc",
19 "aec3_common.h",
20 "aec3_fft.cc",
21 "aec3_fft.h",
22 "aec_state.cc",
23 "aec_state.h",
24 "block_framer.cc",
25 "block_framer.h",
26 "block_processor.cc",
27 "block_processor.h",
28 "block_processor_metrics.cc",
29 "block_processor_metrics.h",
30 "cascaded_biquad_filter.cc",
31 "cascaded_biquad_filter.h",
Per Åhgren47d7fbd2018-04-24 12:44:29 +020032 "coherence_gain.cc",
33 "coherence_gain.h",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +010034 "comfort_noise_generator.cc",
35 "comfort_noise_generator.h",
36 "decimator.cc",
37 "decimator.h",
38 "delay_estimate.h",
39 "downsampled_render_buffer.cc",
40 "downsampled_render_buffer.h",
Jesús de Vicente Peñad5cb4772018-04-25 13:58:45 +020041 "echo_audibility.cc",
42 "echo_audibility.h",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +010043 "echo_canceller3.cc",
44 "echo_canceller3.h",
45 "echo_path_delay_estimator.cc",
46 "echo_path_delay_estimator.h",
47 "echo_path_variability.cc",
48 "echo_path_variability.h",
49 "echo_remover.cc",
50 "echo_remover.h",
51 "echo_remover_metrics.cc",
52 "echo_remover_metrics.h",
53 "erl_estimator.cc",
54 "erl_estimator.h",
55 "erle_estimator.cc",
56 "erle_estimator.h",
57 "fft_buffer.cc",
58 "fft_buffer.h",
59 "fft_data.h",
Per Åhgren5c532d32018-03-22 00:29:25 +010060 "filter_analyzer.cc",
61 "filter_analyzer.h",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +010062 "frame_blocker.cc",
63 "frame_blocker.h",
64 "main_filter_update_gain.cc",
65 "main_filter_update_gain.h",
66 "matched_filter.cc",
67 "matched_filter.h",
68 "matched_filter_lag_aggregator.cc",
69 "matched_filter_lag_aggregator.h",
70 "matrix_buffer.cc",
71 "matrix_buffer.h",
Gustaf Ullberg8406c432018-06-19 12:31:33 +020072 "moving_average.cc",
73 "moving_average.h",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +010074 "render_buffer.cc",
75 "render_buffer.h",
76 "render_delay_buffer.cc",
77 "render_delay_buffer.h",
78 "render_delay_controller.cc",
79 "render_delay_controller.h",
80 "render_delay_controller_metrics.cc",
81 "render_delay_controller_metrics.h",
82 "render_signal_analyzer.cc",
83 "render_signal_analyzer.h",
84 "residual_echo_estimator.cc",
85 "residual_echo_estimator.h",
Jesús de Vicente Peña075cb2b2018-06-13 15:13:55 +020086 "reverb_model.cc",
87 "reverb_model.h",
Jesús de Vicente Peña496cedf2018-07-04 11:02:09 +020088 "reverb_model_estimator.cc",
89 "reverb_model_estimator.h",
Jesús de Vicente Peña075cb2b2018-06-13 15:13:55 +020090 "reverb_model_fallback.cc",
91 "reverb_model_fallback.h",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +010092 "shadow_filter_update_gain.cc",
93 "shadow_filter_update_gain.h",
94 "skew_estimator.cc",
95 "skew_estimator.h",
Jesús de Vicente Peñad5cb4772018-04-25 13:58:45 +020096 "stationarity_estimator.cc",
97 "stationarity_estimator.h",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +010098 "subtractor.cc",
99 "subtractor.h",
100 "subtractor_output.h",
101 "suppression_filter.cc",
102 "suppression_filter.h",
103 "suppression_gain.cc",
104 "suppression_gain.h",
Per Åhgren12eb8582018-03-06 10:40:51 +0100105 "suppression_gain_limiter.cc",
106 "suppression_gain_limiter.h",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100107 "vector_buffer.cc",
108 "vector_buffer.h",
109 "vector_math.h",
110 ]
111
112 defines = []
113 deps = [
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100114 "..:apm_logging",
115 "..:audio_processing",
116 "../../..:typedefs",
117 "../../../api:array_view",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100118 "../../../api/audio:aec3_config",
119 "../../../api/audio:echo_control",
120 "../../../common_audio:common_audio_c",
121 "../../../rtc_base:checks",
122 "../../../rtc_base:rtc_base_approved",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100123 "../../../rtc_base:safe_minmax",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100124 "../../../system_wrappers:cpu_features_api",
Gustaf Ullberg0e6375e2018-05-04 11:29:02 +0200125 "../../../system_wrappers:field_trial_api",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100126 "../../../system_wrappers:metrics_api",
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200127 "../utility:ooura_fft",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200128 "//third_party/abseil-cpp/absl/types:optional",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100129 ]
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100130}
131
132if (rtc_include_tests) {
133 rtc_source_set("aec3_unittests") {
134 testonly = true
135
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100136 configs += [ "..:apm_debug_dump" ]
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100137 sources = [
138 "mock/mock_block_processor.h",
139 "mock/mock_echo_remover.h",
140 "mock/mock_render_delay_buffer.h",
141 "mock/mock_render_delay_controller.h",
142 ]
143
144 deps = [
145 ":aec3",
146 "..:apm_logging",
147 "..:audio_processing",
148 "..:audio_processing_unittests",
149 "../../..:typedefs",
150 "../../../api:array_view",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100151 "../../../api/audio:aec3_config",
152 "../../../rtc_base:checks",
153 "../../../rtc_base:rtc_base_approved",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100154 "../../../rtc_base:safe_minmax",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100155 "../../../system_wrappers:cpu_features_api",
156 "../../../test:test_support",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200157 "//third_party/abseil-cpp/absl/types:optional",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100158 ]
159
160 defines = []
161
162 if (rtc_enable_protobuf) {
163 sources += [
164 "adaptive_fir_filter_unittest.cc",
165 "aec3_fft_unittest.cc",
166 "aec_state_unittest.cc",
167 "block_framer_unittest.cc",
168 "block_processor_metrics_unittest.cc",
169 "block_processor_unittest.cc",
170 "cascaded_biquad_filter_unittest.cc",
171 "comfort_noise_generator_unittest.cc",
172 "decimator_unittest.cc",
173 "echo_canceller3_unittest.cc",
174 "echo_path_delay_estimator_unittest.cc",
175 "echo_path_variability_unittest.cc",
176 "echo_remover_metrics_unittest.cc",
177 "echo_remover_unittest.cc",
178 "erl_estimator_unittest.cc",
179 "erle_estimator_unittest.cc",
180 "fft_data_unittest.cc",
181 "frame_blocker_unittest.cc",
182 "main_filter_update_gain_unittest.cc",
183 "matched_filter_lag_aggregator_unittest.cc",
184 "matched_filter_unittest.cc",
Gustaf Ullbergbbfcc702018-06-19 12:33:36 +0200185 "moving_average_unittest.cc",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100186 "render_buffer_unittest.cc",
187 "render_delay_buffer_unittest.cc",
188 "render_delay_controller_metrics_unittest.cc",
189 "render_delay_controller_unittest.cc",
190 "render_signal_analyzer_unittest.cc",
191 "residual_echo_estimator_unittest.cc",
Jesús de Vicente Peña496cedf2018-07-04 11:02:09 +0200192 "reverb_model_estimator_unittest.cc",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100193 "shadow_filter_update_gain_unittest.cc",
194 "skew_estimator_unittest.cc",
195 "subtractor_unittest.cc",
196 "suppression_filter_unittest.cc",
197 "suppression_gain_unittest.cc",
198 "vector_math_unittest.cc",
199 ]
200 }
201
202 if ((!build_with_chromium || is_win) && is_clang) {
203 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
204 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
205 }
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100206 }
207}