Chromium Code Reviews| 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..d53612d430cb50324ece69fe2912a74e777936dd 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 erle and the linear power |
|
AleBzk
2017/04/07 09:34:39
"erle" stands for Echo Return Loss Enhancement, ri
peah-webrtc
2017/04/07 12:19:44
Good point! Will do that!
Done.
|
| + // 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); |
| }; |