Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1229)

Unified Diff: webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc

Issue 2974583004: Transparency improvements in the echo canceller 3 (Closed)
Patch Set: Corrected wrong echo estimate vector in unittest Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
diff --git a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
index 6ec00e40fad6d05f7a13a27b81f3a4d71ba051cd..d17afa6906d2e49ee74ca721168d7b869f64e04f 100644
--- a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
+++ b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
@@ -111,7 +111,7 @@ void ResidualEchoEstimator::Estimate(
const int filter_delay = *aec_state.FilterDelay();
LinearEstimate(S2_linear, aec_state.Erle(), filter_delay, R2);
AddEchoReverb(S2_linear, aec_state.SaturatedEcho(), filter_delay,
- aec_state.ReverbDecayFactor(), R2);
+ aec_state.ReverbDecay(), R2);
} else {
// Estimate the echo generating signal power.
std::array<float, kFftLengthBy2Plus1> X2;
@@ -142,7 +142,12 @@ void ResidualEchoEstimator::Estimate(
AddEchoReverb(*R2, aec_state.SaturatedEcho(),
std::min(static_cast<size_t>(kAdaptiveFilterLength),
delay.value_or(kAdaptiveFilterLength)),
- aec_state.ReverbDecayFactor(), R2);
+ aec_state.ReverbDecay(), R2);
+ }
+
+ // If the echo is deemed inaudible, set the residual echo to zero.
+ if (aec_state.InaudibleEcho()) {
+ R2->fill(0.f);
}
// If the echo is saturated, estimate the echo power as the maximum echo power

Powered by Google App Engine
This is Rietveld 408576698