2018-07-06 14:54:30 +02:00
|
|
|
# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
#
|
|
|
|
|
# Use of this source code is governed by a BSD-style license
|
|
|
|
|
# that can be found in the LICENSE file in the root of the source
|
|
|
|
|
# tree. An additional intellectual property rights grant can be found
|
|
|
|
|
# in the file PATENTS. All contributing project authors may
|
|
|
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
|
|
|
|
|
import("../../../webrtc.gni")
|
|
|
|
|
|
2019-10-15 10:10:26 +02:00
|
|
|
rtc_source_set("gain_control_interface") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "gain_control.h" ]
|
2019-10-15 10:10:26 +02:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("agc") {
|
2018-07-06 14:54:30 +02:00
|
|
|
sources = [
|
|
|
|
|
"agc_manager_direct.cc",
|
|
|
|
|
"agc_manager_direct.h",
|
|
|
|
|
]
|
|
|
|
|
configs += [ "..:apm_debug_dump" ]
|
|
|
|
|
deps = [
|
2019-10-15 10:10:26 +02:00
|
|
|
":gain_control_interface",
|
2018-07-06 14:54:30 +02:00
|
|
|
":level_estimation",
|
2022-07-19 12:18:38 +02:00
|
|
|
"..:api",
|
2018-07-06 14:54:30 +02:00
|
|
|
"..:apm_logging",
|
2019-11-22 12:11:40 +01:00
|
|
|
"..:audio_buffer",
|
2021-06-03 03:29:38 +02:00
|
|
|
"..:audio_frame_view",
|
2022-02-03 16:30:25 +01:00
|
|
|
"../../../api:array_view",
|
2019-08-20 09:19:21 +02:00
|
|
|
"../../../common_audio",
|
|
|
|
|
"../../../common_audio:common_audio_c",
|
2018-07-06 14:54:30 +02:00
|
|
|
"../../../rtc_base:checks",
|
2018-08-09 15:04:24 +02:00
|
|
|
"../../../rtc_base:gtest_prod",
|
2018-07-06 14:54:30 +02:00
|
|
|
"../../../rtc_base:logging",
|
|
|
|
|
"../../../rtc_base:safe_minmax",
|
2019-11-04 13:59:21 +01:00
|
|
|
"../../../system_wrappers:field_trial",
|
2018-09-28 08:51:10 +02:00
|
|
|
"../../../system_wrappers:metrics",
|
2022-10-04 16:06:19 +02:00
|
|
|
"../agc2:clipping_predictor",
|
|
|
|
|
"../agc2:gain_map",
|
2022-12-12 17:07:12 +01:00
|
|
|
"../agc2:input_volume_stats_reporter",
|
2018-07-06 14:54:30 +02:00
|
|
|
"../vad",
|
|
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
2018-07-06 14:54:30 +02:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("level_estimation") {
|
2018-07-06 14:54:30 +02:00
|
|
|
sources = [
|
|
|
|
|
"agc.cc",
|
|
|
|
|
"agc.h",
|
|
|
|
|
"loudness_histogram.cc",
|
|
|
|
|
"loudness_histogram.h",
|
|
|
|
|
"utility.cc",
|
|
|
|
|
"utility.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
2022-02-03 16:30:25 +01:00
|
|
|
"../../../api:array_view",
|
2018-07-06 14:54:30 +02:00
|
|
|
"../../../rtc_base:checks",
|
|
|
|
|
"../vad",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-20 15:50:14 +01:00
|
|
|
rtc_library("legacy_agc") {
|
2018-07-06 14:54:30 +02:00
|
|
|
visibility = [
|
|
|
|
|
":*",
|
|
|
|
|
"..:*",
|
|
|
|
|
] # Only targets in this file and in
|
|
|
|
|
# audio_processing can depend on
|
|
|
|
|
# this.
|
|
|
|
|
|
|
|
|
|
sources = [
|
2020-03-20 15:50:14 +01:00
|
|
|
"legacy/analog_agc.cc",
|
2018-07-06 14:54:30 +02:00
|
|
|
"legacy/analog_agc.h",
|
2020-03-20 15:50:14 +01:00
|
|
|
"legacy/digital_agc.cc",
|
2018-07-06 14:54:30 +02:00
|
|
|
"legacy/digital_agc.h",
|
|
|
|
|
"legacy/gain_control.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
"../../../common_audio",
|
|
|
|
|
"../../../common_audio:common_audio_c",
|
2020-04-21 09:56:16 +02:00
|
|
|
"../../../common_audio/third_party/ooura:fft_size_256",
|
2018-07-06 14:54:30 +02:00
|
|
|
"../../../rtc_base:checks",
|
2020-09-05 21:55:35 +02:00
|
|
|
"../../../system_wrappers",
|
2018-07-06 14:54:30 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if (rtc_build_with_neon) {
|
|
|
|
|
if (current_cpu != "arm64") {
|
2018-08-01 12:18:05 +02:00
|
|
|
# Enable compilation for the NEON instruction set.
|
2018-07-06 14:54:30 +02:00
|
|
|
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
|
|
|
|
|
cflags = [ "-mfpu=neon" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (rtc_include_tests) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("agc_unittests") {
|
2018-07-06 14:54:30 +02:00
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
"agc_manager_direct_unittest.cc",
|
|
|
|
|
"loudness_histogram_unittest.cc",
|
|
|
|
|
"mock_agc.h",
|
|
|
|
|
]
|
|
|
|
|
configs += [ "..:apm_debug_dump" ]
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
":agc",
|
2019-10-15 10:10:26 +02:00
|
|
|
":gain_control_interface",
|
2018-07-06 14:54:30 +02:00
|
|
|
":level_estimation",
|
|
|
|
|
"..:mocks",
|
2022-02-03 16:30:25 +01:00
|
|
|
"../../../api:array_view",
|
2021-06-02 23:03:24 +02:00
|
|
|
"../../../rtc_base:checks",
|
2022-04-14 12:41:26 +02:00
|
|
|
"../../../rtc_base:random",
|
2021-06-16 14:55:40 +02:00
|
|
|
"../../../rtc_base:safe_conversions",
|
2022-09-05 16:04:31 +02:00
|
|
|
"../../../rtc_base:safe_minmax",
|
2022-02-04 17:06:55 +01:00
|
|
|
"../../../rtc_base:stringutils",
|
2021-10-29 14:55:45 +02:00
|
|
|
"../../../system_wrappers:metrics",
|
2019-11-04 13:59:21 +01:00
|
|
|
"../../../test:field_trial",
|
2018-07-06 14:54:30 +02:00
|
|
|
"../../../test:fileutils",
|
|
|
|
|
"../../../test:test_support",
|
|
|
|
|
"//testing/gtest",
|
|
|
|
|
]
|
2022-08-16 14:44:38 +02:00
|
|
|
absl_deps = [
|
|
|
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
|
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
|
|
|
]
|
2018-07-06 14:54:30 +02:00
|
|
|
}
|
|
|
|
|
}
|