APM: move AnalogGainStatsReporter to AGC2

Bug: webrtc:7494
Change-Id: Ifb924e6eda47dd96a591a0b55b1e7fcfdbbbbe18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280222
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38464}
This commit is contained in:
Alessio Bazzica 2022-10-24 22:05:19 +02:00 committed by WebRTC LUCI CQ
parent 99c4c73dbf
commit d226c5731d
7 changed files with 32 additions and 23 deletions

View File

@ -202,9 +202,9 @@ rtc_library("audio_processing") {
"aec_dump:aec_dump",
"aecm:aecm_core",
"agc",
"agc:analog_gain_stats_reporter",
"agc:gain_control_interface",
"agc:legacy_agc",
"agc2:input_volume_stats_reporter",
"capture_levels_adjuster",
"ns",
"transient:transient_suppressor_api",
@ -419,6 +419,7 @@ if (rtc_include_tests) {
"agc2:biquad_filter_unittests",
"agc2:fixed_digital_unittests",
"agc2:input_volume_controller_unittests",
"agc2:input_volume_stats_reporter_unittests",
"agc2:noise_estimator_unittests",
"agc2:test_utils",
"agc2:vad_wrapper_unittests",

View File

@ -41,20 +41,6 @@ rtc_library("agc") {
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("analog_gain_stats_reporter") {
sources = [
"analog_gain_stats_reporter.cc",
"analog_gain_stats_reporter.h",
]
deps = [
"../../../rtc_base:gtest_prod",
"../../../rtc_base:logging",
"../../../rtc_base:safe_minmax",
"../../../system_wrappers:metrics",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("level_estimation") {
sources = [
"agc.cc",
@ -109,7 +95,6 @@ if (rtc_include_tests) {
testonly = true
sources = [
"agc_manager_direct_unittest.cc",
"analog_gain_stats_reporter_unittest.cc",
"loudness_histogram_unittest.cc",
"mock_agc.h",
]
@ -117,7 +102,6 @@ if (rtc_include_tests) {
deps = [
":agc",
":analog_gain_stats_reporter",
":gain_control_interface",
":level_estimation",
"..:mocks",

View File

@ -381,3 +381,27 @@ rtc_library("test_utils") {
"../../../rtc_base:random",
]
}
rtc_library("input_volume_stats_reporter") {
sources = [
"input_volume_stats_reporter.cc",
"input_volume_stats_reporter.h",
]
deps = [
"../../../rtc_base:gtest_prod",
"../../../rtc_base:logging",
"../../../rtc_base:safe_minmax",
"../../../system_wrappers:metrics",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("input_volume_stats_reporter_unittests") {
testonly = true
sources = [ "input_volume_stats_reporter_unittest.cc" ]
deps = [
":input_volume_stats_reporter",
"../../../system_wrappers:metrics",
"../../../test:test_support",
]
}

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "modules/audio_processing/agc/analog_gain_stats_reporter.h"
#include "modules/audio_processing/agc2/input_volume_stats_reporter.h"
#include <cmath>

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef MODULES_AUDIO_PROCESSING_AGC_ANALOG_GAIN_STATS_REPORTER_H_
#define MODULES_AUDIO_PROCESSING_AGC_ANALOG_GAIN_STATS_REPORTER_H_
#ifndef MODULES_AUDIO_PROCESSING_AGC2_INPUT_VOLUME_STATS_REPORTER_H_
#define MODULES_AUDIO_PROCESSING_AGC2_INPUT_VOLUME_STATS_REPORTER_H_
#include "absl/types/optional.h"
#include "rtc_base/gtest_prod_util.h"
@ -64,4 +64,4 @@ class AnalogGainStatsReporter {
};
} // namespace webrtc
#endif // MODULES_AUDIO_PROCESSING_AGC_ANALOG_GAIN_STATS_REPORTER_H_
#endif // MODULES_AUDIO_PROCESSING_AGC2_INPUT_VOLUME_STATS_REPORTER_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "modules/audio_processing/agc/analog_gain_stats_reporter.h"
#include "modules/audio_processing/agc2/input_volume_stats_reporter.h"
#include "system_wrappers/include/metrics.h"
#include "test/gmock.h"

View File

@ -25,8 +25,8 @@
#include "api/function_view.h"
#include "modules/audio_processing/aec3/echo_canceller3.h"
#include "modules/audio_processing/agc/agc_manager_direct.h"
#include "modules/audio_processing/agc/analog_gain_stats_reporter.h"
#include "modules/audio_processing/agc/gain_control.h"
#include "modules/audio_processing/agc2/input_volume_stats_reporter.h"
#include "modules/audio_processing/audio_buffer.h"
#include "modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.h"
#include "modules/audio_processing/echo_control_mobile_impl.h"