AGC2 lightweight noise floor estimator

The current noise level estimator has a bug due to which the estimated
level decays to the lower bound in a few seconds when speech is observed.
Instead of fixing the current implementation, which is based on a
stationarity classifier, an alternative, lightweight, noise floor
estimator has been added and tuned for AGC2.

Tested on several AEC dumps including HW mute, music and fast talking.

Bug: webrtc:7494
Change-Id: Iae4cff9fc955a716878f830957e893cd5bc59446
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214133
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33733}
This commit is contained in:
Alessio Bazzica
2021-04-14 16:17:09 +02:00
committed by Commit Bot
parent 3ab7a55f6e
commit 61982a7f2d
10 changed files with 246 additions and 42 deletions

View File

@ -90,7 +90,8 @@ void GainController2::ApplyConfig(
}
gain_applier_.SetGainFactor(DbToRatio(config_.fixed_digital.gain_db));
if (config_.adaptive_digital.enabled) {
adaptive_agc_ = std::make_unique<AdaptiveAgc>(&data_dumper_, config_);
adaptive_agc_ =
std::make_unique<AdaptiveAgc>(&data_dumper_, config_.adaptive_digital);
} else {
adaptive_agc_.reset();
}