AEC3: Increase the look window in the delay estimator.

Bug: webrtc:9374,chromium:850525
Change-Id: I587cb7951acf8e5ec92d9941f1979ba2c9887876
Reviewed-on: https://webrtc-review.googlesource.com/81747
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23561}
This commit is contained in:
Per Åhgren
2018-06-08 10:26:40 +02:00
committed by Commit Bot
parent 43568dd67e
commit fddaf7528a
2 changed files with 12 additions and 1 deletions

View File

@ -22,7 +22,7 @@ struct EchoCanceller3Config {
struct Delay {
size_t default_delay = 5;
size_t down_sampling_factor = 4;
size_t num_filters = 5;
size_t num_filters = 6;
size_t api_call_jitter_blocks = 26;
size_t min_echo_path_delay_blocks = 0;
size_t delay_headroom_blocks = 2;

View File

@ -12,6 +12,7 @@
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/atomicops.h"
#include "rtc_base/logging.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
@ -28,6 +29,10 @@ bool DetectSaturation(rtc::ArrayView<const float> y) {
return false;
}
bool UseShortDelayEstimatorWindow() {
return field_trial::IsEnabled("WebRTC-Aec3UseShortDelayEstimatorWindow");
}
// Method for adjusting config parameter dependencies..
EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) {
EchoCanceller3Config adjusted_cfg = config;
@ -62,6 +67,12 @@ EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) {
adjusted_cfg.echo_model.nonlinear_release = 0.6f;
}
}
if (UseShortDelayEstimatorWindow()) {
adjusted_cfg.delay.num_filters =
std::min(adjusted_cfg.delay.num_filters, static_cast<size_t>(5));
}
return adjusted_cfg;
}