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}
This commit is contained in:
Alessio Bazzica
2021-10-04 13:35:55 +02:00
committed by WebRTC LUCI CQ
parent 41b4397e1a
commit a850e6c8b6
14 changed files with 350 additions and 261 deletions

View File

@ -90,6 +90,8 @@ bool Agc1Config::operator==(const Agc1Config& rhs) const {
bool Agc2Config::AdaptiveDigital::operator==(
const Agc2Config::AdaptiveDigital& rhs) const {
return enabled == rhs.enabled && dry_run == rhs.dry_run &&
headroom_db == rhs.headroom_db && max_gain_db == rhs.max_gain_db &&
initial_gain_db == rhs.initial_gain_db &&
vad_reset_period_ms == rhs.vad_reset_period_ms &&
adjacent_speech_frames_threshold ==
rhs.adjacent_speech_frames_threshold &&
@ -197,6 +199,10 @@ std::string AudioProcessing::Config::ToString() const {
<< " }, adaptive_digital: { enabled: "
<< gain_controller2.adaptive_digital.enabled
<< ", dry_run: " << gain_controller2.adaptive_digital.dry_run
<< ", headroom_db: " << gain_controller2.adaptive_digital.headroom_db
<< ", max_gain_db: " << gain_controller2.adaptive_digital.max_gain_db
<< ", initial_gain_db: "
<< gain_controller2.adaptive_digital.initial_gain_db
<< ", vad_reset_period_ms: "
<< gain_controller2.adaptive_digital.vad_reset_period_ms
<< ", adjacent_speech_frames_threshold: "