AEC3: Audibility improvements
This CL is created from a work initiated at https://webrtc-review.googlesource.com/c/src/+/61160 The purpose of this work is to improve the performance of the echo canceler (AEC3) when the farend signal contains stationary noises: - An stationarity estimator of the farend signal has been added for detecting the portions of the farend signal that are pure noise. - When the echo canceler deals with a portion of the signal that contains basically noise, the echo suppressor is able to back-off and avoid the fading of the nearend speech. Change-Id: Id4b87fc59f4765bf1fca36d1cab39a49aabe104a Bug: webrtc:9193,chromium:836790 Reviewed-on: https://webrtc-review.googlesource.com/64141 Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23024}
This commit is contained in:
committed by
Commit Bot
parent
74e5f804e4
commit
d5cb477576
@ -67,6 +67,21 @@ class RenderBuffer {
|
||||
// Specifies the recent activity seen in the render signal.
|
||||
void SetRenderActivity(bool activity) { render_activity_ = activity; }
|
||||
|
||||
// Returns the headroom between the write and the read positions in the
|
||||
// buffer;
|
||||
int Headroom() const {
|
||||
// The write and read indices are decreased over time.
|
||||
int headroom =
|
||||
fft_buffer_->write < fft_buffer_->read
|
||||
? fft_buffer_->read - fft_buffer_->write
|
||||
: fft_buffer_->size - fft_buffer_->write + fft_buffer_->read;
|
||||
|
||||
RTC_DCHECK_LE(0, headroom);
|
||||
RTC_DCHECK_GE(fft_buffer_->size, headroom);
|
||||
|
||||
return headroom;
|
||||
}
|
||||
|
||||
private:
|
||||
const MatrixBuffer* const block_buffer_;
|
||||
const VectorBuffer* const spectrum_buffer_;
|
||||
|
||||
Reference in New Issue
Block a user