Flags and settings for AGC2 in AgcManagerDirect.
This CL adds two flags to audioproc_f. The flags control
AgcManagerDirect. The flags are
'--experimental_agc_agc2_level_estimator' and
'--experimental_agc_agc2_digital_adaptive'.
After this CL, the flags are be applied to AgcManagerDirect. The flags
have no effect in release-mode. They cause a crash in debug-mode.
In an upcoming CL, '--experimental_agc_agc2_level_estimator 1' will
replace the speech level estimation in ExperimentalAgc with that of
AGC2.
'--experimental_agc_agc2_digital_adaptive 1' will replace the digital
gain selection and application with that of AGC2.
These audioproc_f will activate both new settings:
./out/Target/audioproc_f --agc 1 --experimental_agc 1
--experimental_agc_agc2_digital_adaptive 1
--experimental_agc_agc2_level_estimator 1 --simulate_mic_gain 1
--simulated_mic_kind 2
See also https://webrtc-review.googlesource.com/c/src/+/79360
Bug: webrtc:7494
Change-Id: If0e65893dffdddb312e553787b8cedaf9a334323
Reviewed-on: https://webrtc-review.googlesource.com/86548
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23802}
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index d24502e..0882d33 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -122,6 +122,13 @@
struct ExperimentalAgc {
ExperimentalAgc() = default;
explicit ExperimentalAgc(bool enabled) : enabled(enabled) {}
+ ExperimentalAgc(bool enabled,
+ bool enabled_agc2_level_estimator,
+ bool enabled_agc2_digital_adaptive)
+ : enabled(enabled),
+ enabled_agc2_level_estimator(enabled_agc2_level_estimator),
+ enabled_agc2_digital_adaptive(enabled_agc2_digital_adaptive) {}
+
ExperimentalAgc(bool enabled, int startup_min_volume)
: enabled(enabled), startup_min_volume(startup_min_volume) {}
ExperimentalAgc(bool enabled, int startup_min_volume, int clipped_level_min)
@@ -133,6 +140,8 @@
int startup_min_volume = kAgcStartupMinVolume;
// Lowest microphone level that will be applied in response to clipping.
int clipped_level_min = kClippedLevelMin;
+ bool enabled_agc2_level_estimator = false;
+ bool enabled_agc2_digital_adaptive = false;
};
// Use to enable experimental noise suppression. It can be set in the