blob: 25b576768c6417b265513bfe4a05783d9cb83616 [file] [log] [blame]
Alex Loikoe36e8bb2018-02-16 11:54:07 +01001# Copyright (c) 2017 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("../../../webrtc.gni")
10
Alex Loiko2bac8962018-03-27 13:38:36 +020011group("agc2") {
12 deps = [
13 ":adaptive_digital",
14 ":fixed_digital",
15 ]
16}
17
Mirko Bonadei86d053c2019-10-17 21:32:04 +020018rtc_library("level_estimation_agc") {
Alex Loiko2ffafa82018-07-06 15:35:42 +020019 sources = [
20 "adaptive_mode_level_estimator_agc.cc",
21 "adaptive_mode_level_estimator_agc.h",
22 ]
23 configs += [ "..:apm_debug_dump" ]
24 deps = [
25 ":adaptive_digital",
26 ":common",
27 ":gain_applier",
28 ":noise_level_estimator",
29 ":rnn_vad_with_level",
Alessio Bazzica1e2542f2018-11-13 14:44:15 +010030 "..:api",
Alex Loiko2ffafa82018-07-06 15:35:42 +020031 "..:apm_logging",
32 "..:audio_frame_view",
Alex Loiko2ffafa82018-07-06 15:35:42 +020033 "../../../api:array_view",
34 "../../../common_audio",
35 "../../../rtc_base:checks",
36 "../../../rtc_base:rtc_base_approved",
37 "../../../rtc_base:safe_minmax",
38 "../agc:level_estimation",
39 "../vad",
40 ]
41}
42
Mirko Bonadei86d053c2019-10-17 21:32:04 +020043rtc_library("adaptive_digital") {
Alex Loikoe36e8bb2018-02-16 11:54:07 +010044 sources = [
Alex Loiko2bac8962018-03-27 13:38:36 +020045 "adaptive_agc.cc",
46 "adaptive_agc.h",
47 "adaptive_digital_gain_applier.cc",
48 "adaptive_digital_gain_applier.h",
49 "adaptive_mode_level_estimator.cc",
50 "adaptive_mode_level_estimator.h",
Alex Loiko1e48e802018-03-28 09:45:29 +020051 "saturation_protector.cc",
52 "saturation_protector.h",
Alex Loiko2bac8962018-03-27 13:38:36 +020053 ]
54
55 configs += [ "..:apm_debug_dump" ]
56
57 deps = [
58 ":common",
Alex Loiko8a3eadd2018-04-13 11:15:34 +020059 ":gain_applier",
Alex Loiko4ed47d02018-04-04 15:05:57 +020060 ":noise_level_estimator",
Alex Loikodb6af362018-06-20 14:14:18 +020061 ":rnn_vad_with_level",
Alessio Bazzica1e2542f2018-11-13 14:44:15 +010062 "..:api",
Alex Loiko2bac8962018-03-27 13:38:36 +020063 "..:apm_logging",
64 "..:audio_frame_view",
65 "../../../api:array_view",
66 "../../../common_audio",
67 "../../../rtc_base:checks",
68 "../../../rtc_base:rtc_base_approved",
69 "../../../rtc_base:safe_minmax",
Mirko Bonadei17f48782018-09-28 08:51:10 +020070 "../../../system_wrappers:metrics",
Alex Loiko2bac8962018-03-27 13:38:36 +020071 ]
72}
73
Mirko Bonadei86d053c2019-10-17 21:32:04 +020074rtc_library("biquad_filter") {
Alessio Bazzicabeb1d342018-05-14 20:22:18 +020075 visibility = [ "./*" ]
Alessio Bazzicad8d02142018-05-07 13:26:47 +020076 sources = [
77 "biquad_filter.cc",
78 "biquad_filter.h",
79 ]
80 deps = [
81 "../../../api:array_view",
82 "../../../rtc_base:rtc_base_approved",
83 ]
84}
85
Mirko Bonadei86d053c2019-10-17 21:32:04 +020086rtc_library("common") {
Alessio Bazzicad8d02142018-05-07 13:26:47 +020087 sources = [
Alex Loiko4bb1e4a2018-10-05 11:06:14 +020088 "agc2_common.cc",
Alessio Bazzicad8d02142018-05-07 13:26:47 +020089 "agc2_common.h",
90 ]
91 deps = [
92 "../../../rtc_base:rtc_base_approved",
Alex Loiko4bb1e4a2018-10-05 11:06:14 +020093 "../../../system_wrappers:field_trial",
Alessio Bazzicad8d02142018-05-07 13:26:47 +020094 ]
95}
96
Mirko Bonadei86d053c2019-10-17 21:32:04 +020097rtc_library("fixed_digital") {
Alex Loiko2bac8962018-03-27 13:38:36 +020098 sources = [
Alex Loiko153f11e2018-02-16 12:39:00 +010099 "fixed_digital_level_estimator.cc",
100 "fixed_digital_level_estimator.h",
Alex Loikoa05ee822018-02-20 15:58:36 +0100101 "interpolated_gain_curve.cc",
102 "interpolated_gain_curve.h",
Alessio Bazzica746d46b2018-10-30 10:48:38 +0100103 "limiter.cc",
104 "limiter.h",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100105 ]
106
107 configs += [ "..:apm_debug_dump" ]
108
109 deps = [
Alex Loiko2bac8962018-03-27 13:38:36 +0200110 ":common",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100111 "..:apm_logging",
112 "..:audio_frame_view",
113 "../../../api:array_view",
114 "../../../common_audio",
115 "../../../rtc_base:checks",
Alex Loikoa05ee822018-02-20 15:58:36 +0100116 "../../../rtc_base:gtest_prod",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100117 "../../../rtc_base:rtc_base_approved",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100118 "../../../rtc_base:safe_minmax",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200119 "../../../system_wrappers:metrics",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100120 ]
121}
122
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200123rtc_library("gain_applier") {
Alex Loiko8a3eadd2018-04-13 11:15:34 +0200124 sources = [
125 "gain_applier.cc",
126 "gain_applier.h",
127 ]
128 deps = [
129 ":common",
130 "..:audio_frame_view",
Yves Gerey988cc082018-10-23 12:03:01 +0200131 "../../../api:array_view",
Alex Loiko8a3eadd2018-04-13 11:15:34 +0200132 "../../../rtc_base:safe_minmax",
133 ]
134}
135
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200136rtc_library("noise_level_estimator") {
Alex Loiko2bac8962018-03-27 13:38:36 +0200137 sources = [
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200138 "down_sampler.cc",
139 "down_sampler.h",
140 "noise_level_estimator.cc",
141 "noise_level_estimator.h",
142 "noise_spectrum_estimator.cc",
143 "noise_spectrum_estimator.h",
144 "signal_classifier.cc",
145 "signal_classifier.h",
Alex Loiko2bac8962018-03-27 13:38:36 +0200146 ]
147 deps = [
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200148 ":biquad_filter",
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200149 "..:apm_logging",
Alex Loiko2bac8962018-03-27 13:38:36 +0200150 "..:audio_frame_view",
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200151 "../../../api:array_view",
152 "../../../common_audio",
153 "../../../rtc_base:checks",
154 "../../../rtc_base:macromagic",
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200155 "../utility:ooura_fft",
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200156 ]
157
158 configs += [ "..:apm_debug_dump" ]
159}
160
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200161rtc_library("rnn_vad_with_level") {
Alex Loikodb6af362018-06-20 14:14:18 +0200162 sources = [
163 "vad_with_level.cc",
164 "vad_with_level.h",
165 ]
166 deps = [
167 "..:audio_frame_view",
168 "../../../api:array_view",
169 "../../../common_audio",
170 "../../../rtc_base:checks",
Alessio Bazzica55bf92a2018-08-01 10:24:15 +0200171 "rnn_vad",
Alex Loikodb6af362018-06-20 14:14:18 +0200172 ]
173}
174
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200175rtc_library("adaptive_digital_unittests") {
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200176 testonly = true
177 configs += [ "..:apm_debug_dump" ]
178
179 sources = [
180 "adaptive_digital_gain_applier_unittest.cc",
181 "adaptive_mode_level_estimator_unittest.cc",
182 "gain_applier_unittest.cc",
183 "saturation_protector_unittest.cc",
184 ]
185 deps = [
186 ":adaptive_digital",
187 ":common",
188 ":gain_applier",
189 ":test_utils",
190 "..:apm_logging",
191 "..:audio_frame_view",
192 "../../../api:array_view",
193 "../../../common_audio",
Alex Loiko2bac8962018-03-27 13:38:36 +0200194 "../../../rtc_base:checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100195 "../../../rtc_base:gunit_helpers",
Alex Loiko2bac8962018-03-27 13:38:36 +0200196 "../../../rtc_base:rtc_base_approved",
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200197 ]
198}
199
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200200rtc_library("biquad_filter_unittests") {
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200201 testonly = true
202 sources = [
203 "biquad_filter_unittest.cc",
204 ]
205 deps = [
206 ":biquad_filter",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100207 "../../../rtc_base:gunit_helpers",
Alex Loiko2bac8962018-03-27 13:38:36 +0200208 ]
209}
210
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200211rtc_library("fixed_digital_unittests") {
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100212 testonly = true
213 configs += [ "..:apm_debug_dump" ]
214
215 sources = [
Alex Loikoa05ee822018-02-20 15:58:36 +0100216 "agc2_testing_common_unittest.cc",
217 "compute_interpolated_gain_curve.cc",
218 "compute_interpolated_gain_curve.h",
Alex Loiko153f11e2018-02-16 12:39:00 +0100219 "fixed_digital_level_estimator_unittest.cc",
Alex Loikoa05ee822018-02-20 15:58:36 +0100220 "interpolated_gain_curve_unittest.cc",
Alessio Bazzica087e9be2018-10-18 14:56:06 +0200221 "limiter_db_gain_curve.cc",
222 "limiter_db_gain_curve.h",
223 "limiter_db_gain_curve_unittest.cc",
Alessio Bazzica746d46b2018-10-30 10:48:38 +0100224 "limiter_unittest.cc",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100225 ]
226 deps = [
Alex Loiko2bac8962018-03-27 13:38:36 +0200227 ":common",
228 ":fixed_digital",
229 ":test_utils",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100230 "..:apm_logging",
231 "..:audio_frame_view",
232 "../../../api:array_view",
Alex Loiko153f11e2018-02-16 12:39:00 +0100233 "../../../common_audio",
Alex Loikoa05ee822018-02-20 15:58:36 +0100234 "../../../rtc_base:checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100235 "../../../rtc_base:gunit_helpers",
Alex Loikoa05ee822018-02-20 15:58:36 +0100236 "../../../rtc_base:rtc_base_approved",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200237 "../../../system_wrappers:metrics",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100238 ]
239}
Alex Loiko1e48e802018-03-28 09:45:29 +0200240
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200241rtc_library("noise_estimator_unittests") {
Alex Loiko4ed47d02018-04-04 15:05:57 +0200242 testonly = true
243 configs += [ "..:apm_debug_dump" ]
244
245 sources = [
246 "noise_level_estimator_unittest.cc",
247 "signal_classifier_unittest.cc",
248 ]
249 deps = [
250 ":noise_level_estimator",
251 ":test_utils",
252 "..:apm_logging",
253 "..:audio_frame_view",
254 "../../../api:array_view",
255 "../../../rtc_base:checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100256 "../../../rtc_base:gunit_helpers",
Alex Loiko4ed47d02018-04-04 15:05:57 +0200257 "../../../rtc_base:rtc_base_approved",
Alex Loiko4ed47d02018-04-04 15:05:57 +0200258 ]
259}
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200260
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200261rtc_library("rnn_vad_with_level_unittests") {
Alessio Bazzica1e2542f2018-11-13 14:44:15 +0100262 testonly = true
263 sources = [
264 "vad_with_level_unittest.cc",
265 ]
266 deps = [
267 ":rnn_vad_with_level",
268 "..:audio_frame_view",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100269 "../../../rtc_base:gunit_helpers",
Alessio Bazzica1e2542f2018-11-13 14:44:15 +0100270 ]
271}
272
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200273rtc_library("test_utils") {
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200274 testonly = true
Alessio Bazzica3e4c77f2018-11-01 21:31:38 +0100275 visibility = [
276 ":*",
277 "..:audio_processing_unittests",
278 ]
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200279 sources = [
280 "agc2_testing_common.cc",
281 "agc2_testing_common.h",
282 "vector_float_frame.cc",
283 "vector_float_frame.h",
284 ]
285 deps = [
286 "..:audio_frame_view",
287 "../../../rtc_base:checks",
288 "../../../rtc_base:rtc_base_approved",
289 ]
290}