AGC2 config: allow tuning of headroom, max gain and initial gain
This CL does *not* change the behavior of the AGC2 adaptive digital
controller - bitexactness verified with audioproc_f on a collection of
AEC dumps and Wav files (42 recordings in total).
Tested: compiled Chrome with this patch and made an appr.tc test call
Bug: webrtc:7494
Change-Id: Ia8a9f6fbc3a3459b888a2eed87e108f0d39cfe99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233520
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35140}
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index 8f07c6e..121e430 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -367,12 +367,19 @@
}
bool enabled = false;
- // Run the adaptive digital controller but the signal is not modified.
+ // When true, the adaptive digital controller runs but the signal is not
+ // modified.
bool dry_run = false;
+ float headroom_db = 6.0f;
+ // TODO(bugs.webrtc.org/7494): Consider removing and inferring from
+ // `max_output_noise_level_dbfs`.
+ float max_gain_db = 30.0f;
+ float initial_gain_db = 8.0f;
int vad_reset_period_ms = 1500;
int adjacent_speech_frames_threshold = 12;
float max_gain_change_db_per_second = 3.0f;
float max_output_noise_level_dbfs = -50.0f;
+ // TODO(bugs.webrtc.org/7494): Replace with field trials.
bool sse2_allowed = true;
bool avx2_allowed = true;
bool neon_allowed = true;