AEC3: Decrease latency until the delay has been detected

This CL utilizes the existing, but unused, ability to set
different histogram thresholds for early and late delay
estimation. It does so by tuning the parameters for these.

On top of that, some corrections are added to correctly
handle resets and the use of the hysteresis thresholds.

Bug: webrtc:19886,chromium:896334
Change-Id: I950ac107c124541af8f02b4403f477dda71cc1a1
Reviewed-on: https://webrtc-review.googlesource.com/c/106706
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25443}
This commit is contained in:
Per Åhgren
2018-10-30 23:44:40 +01:00
committed by Commit Bot
parent f577ab3d38
commit 8b7d206d37
13 changed files with 98 additions and 47 deletions

View File

@ -108,7 +108,7 @@ void BlockProcessorImpl::ProcessCapture(
if (!capture_properly_started_) {
capture_properly_started_ = true;
render_buffer_->Reset();
delay_controller_->Reset();
delay_controller_->Reset(true);
}
} else {
// If no render data has yet arrived, do not process the capture signal.
@ -123,7 +123,7 @@ void BlockProcessorImpl::ProcessCapture(
render_properly_started_) {
echo_path_variability.delay_change =
EchoPathVariability::DelayAdjustment::kBufferFlush;
delay_controller_->Reset();
delay_controller_->Reset(true);
RTC_LOG(LS_WARNING) << "Reset due to render buffer overrun at block "
<< capture_call_counter_;
}
@ -139,7 +139,7 @@ void BlockProcessorImpl::ProcessCapture(
estimated_delay_->quality == DelayEstimate::Quality::kRefined) {
echo_path_variability.delay_change =
EchoPathVariability::DelayAdjustment::kDelayReset;
delay_controller_->Reset();
delay_controller_->Reset(true);
capture_properly_started_ = false;
render_properly_started_ = false;
@ -151,7 +151,7 @@ void BlockProcessorImpl::ProcessCapture(
// echo.
echo_path_variability.delay_change =
EchoPathVariability::DelayAdjustment::kDelayReset;
delay_controller_->Reset();
delay_controller_->Reset(true);
capture_properly_started_ = false;
render_properly_started_ = false;
RTC_LOG(LS_WARNING) << "Reset due to render buffer api skew at block "
@ -184,7 +184,7 @@ void BlockProcessorImpl::ProcessCapture(
if (estimated_delay_->quality == DelayEstimate::Quality::kRefined) {
echo_path_variability.delay_change =
EchoPathVariability::DelayAdjustment::kDelayReset;
delay_controller_->Reset();
delay_controller_->Reset(true);
render_buffer_->Reset();
capture_properly_started_ = false;
render_properly_started_ = false;