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

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

Issue 2804223002: Adding support for handling highly reverberant echoes in AEC3 (Closed)
Patch Set: Added limiting of the delay size Created 3 years, 8 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.h
diff --git a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h
index 1334e63256b475b3a7bd024fe86fec792e1ff50b..6c8a7b26e4e18c77e03a56ea3d4145d03cd51bcd 100644
--- a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h
+++ b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.h
@@ -36,8 +36,37 @@ class ResidualEchoEstimator {
std::array<float, kFftLengthBy2Plus1>* R2);
private:
+ // Resets the state.
+ void Reset();
+
+ // Estimates the residual echo power based on the echo return loss enhancement
+ // (ERLE) and the linear power estimate.
+ void LinearEstimate(const std::array<float, kFftLengthBy2Plus1>& S2_linear,
+ const std::array<float, kFftLengthBy2Plus1>& erle,
+ size_t delay,
+ std::array<float, kFftLengthBy2Plus1>* R2);
+
+ // Estimates the residual echo power based on the estimate of the echo path
+ // gain.
+ void NonLinearEstimate(const std::array<float, kFftLengthBy2Plus1>& X2,
+ const std::array<float, kFftLengthBy2Plus1>& Y2,
+ std::array<float, kFftLengthBy2Plus1>* R2);
+
+ // Adds the estimated unmodelled echo power to the residual echo power
+ // estimate.
+ void AddEchoReverb(const std::array<float, kFftLengthBy2Plus1>& S2,
+ bool saturated_echo,
+ size_t delay,
+ float reverb_decay_factor,
+ std::array<float, kFftLengthBy2Plus1>* R2);
+
std::array<float, kFftLengthBy2Plus1> R2_old_;
std::array<int, kFftLengthBy2Plus1> R2_hold_counter_;
+ std::array<float, kFftLengthBy2Plus1> R2_reverb_;
+ int S2_old_index_ = 0;
+ std::array<std::array<float, kFftLengthBy2Plus1>, kAdaptiveFilterLength>
+ S2_old_;
+ bool headset_detected_cached_ = false;
RTC_DISALLOW_COPY_AND_ASSIGN(ResidualEchoEstimator);
};
« no previous file with comments | « webrtc/modules/audio_processing/aec3/aec_state.h ('k') | webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698