AEC3: Increasing the accuracy of the detection for early reverb

This CL introduces an adaptive estimation of the early reverb
in the estimation for the room reverberation. The benefits of
this is that for room with long early reflections there is
a lower risk of underestimating the reverberation.

This CL is for a landing the code in
https://webrtc-review.googlesource.com/c/src/+/87420,
and the review of the code was done in that CL. The author of
code is devicentepena@webrtc.org

Bug: webrtc:9479, chromium:865397
Change-Id: Id6f57e2a684664aef96e8c502e66775f37da59da
Reviewed-on: https://webrtc-review.googlesource.com/91162
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24146}
This commit is contained in:
Per Åhgren
2018-07-31 00:03:46 +02:00
committed by Commit Bot
parent 1899c1270f
commit ef5d5af3a0
15 changed files with 732 additions and 412 deletions

View File

@ -67,17 +67,6 @@ class AecState {
// aec.
bool UseStationaryProperties() const { return use_stationary_properties_; }
// Returns true if the current render block is estimated as stationary.
bool IsBlockStationary() const {
if (UseStationaryProperties()) {
return echo_audibility_.IsBlockStationary();
} else {
// Assume that a non stationary block when the use of
// stationary properties are not enabled.
return false;
}
}
// Returns the ERLE.
const std::array<float, kFftLengthBy2Plus1>& Erle() const {
return erle_estimator_.Erle();
@ -130,6 +119,11 @@ class AecState {
// Returns the decay factor for the echo reverberation.
float ReverbDecay() const { return reverb_model_estimator_.ReverbDecay(); }
// Return the frequency response of the reverberant echo.
rtc::ArrayView<const float> GetReverbFrequencyResponse() const {
return reverb_model_estimator_.GetReverbFrequencyResponse();
}
// Returns the upper limit for the echo suppression gain.
float SuppressionGainLimit() const {
return suppression_gain_limiter_.Limit();
@ -159,11 +153,6 @@ class AecState {
const SubtractorOutput& subtractor_output,
rtc::ArrayView<const float> y);
// Returns the tail freq. response of the linear filter.
rtc::ArrayView<const float> GetFreqRespTail() const {
return reverb_model_estimator_.GetFreqRespTail();
}
// Returns filter length in blocks.
int FilterLengthBlocks() const {
return filter_analyzer_.FilterLengthBlocks();