AEC3: Correction of the suppressor behavior at delay changes
This CL adjusts the behavior of the AEC3 echo suppressor behavior initially in the call, and when there has been delay changes. The results is that short echo blips/bursts present in some such cases no longer occur. In particular this CL: -Ensures that the suppressor back-off under stationary render conditions does not occur until the linear filter has had the ability to converge. -Ensures that a previously converged filter behavior detection is not sticky for stable and linear echo paths, which in turn prevents echo leakage due to the more liberal echo suppressor behavior applied on such platforms. -Removes a bug that caused a random and jittery behavior for the usage of the linear filter output initially in the calls and after echo path changes Bug: webrtc:9737, chromium:882396 Change-Id: Id2b46e366dc58ab8137f19ed59a2034c89ca3087 Reviewed-on: https://webrtc-review.googlesource.com/99063 Commit-Queue: Per Åhgren <peah@webrtc.org> Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24656}
This commit is contained in:
parent
e4f8b38091
commit
b2d7116733
@ -155,6 +155,9 @@ void AecState::HandleEchoPathChange(
|
||||
suppression_gain_limiter_.Reset();
|
||||
blocks_since_converged_filter_ = kBlocksSinceConvergencedFilterInit;
|
||||
diverged_blocks_ = 0;
|
||||
if (config_.echo_removal_control.linear_and_stable_echo_path) {
|
||||
converged_filter_seen_ = false;
|
||||
}
|
||||
if (reset_erle_after_echo_path_changes_) {
|
||||
erle_estimator_.Reset();
|
||||
}
|
||||
@ -262,10 +265,6 @@ void AecState::Update(
|
||||
blocks_with_proper_filter_adaptation_ >= 1.5f * kNumBlocksPerSecond;
|
||||
}
|
||||
|
||||
if (converged_filter && early_entry_to_converged_mode_) {
|
||||
filter_has_had_time_to_converge_ = true;
|
||||
}
|
||||
|
||||
if (!filter_should_have_converged_) {
|
||||
filter_should_have_converged_ =
|
||||
blocks_with_proper_filter_adaptation_ > 6 * kNumBlocksPerSecond;
|
||||
|
||||
@ -60,7 +60,8 @@ class AecState {
|
||||
// Returns the appropriate scaling of the residual echo to match the
|
||||
// audibility.
|
||||
void GetResidualEchoScaling(rtc::ArrayView<float> residual_scaling) const {
|
||||
echo_audibility_.GetResidualEchoScaling(residual_scaling);
|
||||
echo_audibility_.GetResidualEchoScaling(filter_has_had_time_to_converge_,
|
||||
residual_scaling);
|
||||
}
|
||||
|
||||
// Returns whether the stationary properties of the signals are used in the
|
||||
|
||||
@ -39,11 +39,12 @@ class EchoAudibility {
|
||||
int delay_blocks,
|
||||
bool external_delay_seen,
|
||||
float reverb_decay);
|
||||
|
||||
// Get the residual echo scaling.
|
||||
void GetResidualEchoScaling(rtc::ArrayView<float> residual_scaling) const {
|
||||
void GetResidualEchoScaling(bool filter_has_had_time_to_converge,
|
||||
rtc::ArrayView<float> residual_scaling) const {
|
||||
for (size_t band = 0; band < residual_scaling.size(); ++band) {
|
||||
if (render_stationarity_.IsBandStationary(band)) {
|
||||
if (render_stationarity_.IsBandStationary(band) &&
|
||||
filter_has_had_time_to_converge) {
|
||||
residual_scaling[band] = 0.f;
|
||||
} else {
|
||||
residual_scaling[band] = 1.0f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user