Increasing the API call skew hysteresis limit in AEC3

This CL increases the allowed variations in the API call skew limit in
AEC3.

Bug: webrtc:9283,chromium:888042
Change-Id: Ib5e784c6f3dcf1bf3a2cbfe2b1559953db9227a8
Reviewed-on: https://webrtc-review.googlesource.com/77430
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23305}
This commit is contained in:
Per Åhgren
2018-05-17 17:24:29 +02:00
committed by Commit Bot
parent 9a6133e1a0
commit 2d9a3b1aba
2 changed files with 14 additions and 3 deletions

View File

@ -23,11 +23,23 @@
#include "rtc_base/atomicops.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/logging.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
namespace {
int GetSkewHysteresis(const EchoCanceller3Config& config) {
if (field_trial::IsEnabled("WebRTC-Aec3EnforceSkewHysteresis1")) {
return 1;
}
if (field_trial::IsEnabled("WebRTC-Aec3EnforceSkewHysteresis2")) {
return 2;
}
return static_cast<int>(config.delay.skew_hysteresis_blocks);
}
constexpr int kSkewHistorySizeLog2 = 8;
class RenderDelayControllerImpl final : public RenderDelayController {
@ -118,8 +130,7 @@ RenderDelayControllerImpl::RenderDelayControllerImpl(
static_cast<int>(config.delay.hysteresis_limit_1_blocks)),
hysteresis_limit_2_blocks_(
static_cast<int>(config.delay.hysteresis_limit_2_blocks)),
skew_hysteresis_blocks_(
static_cast<int>(config.delay.skew_hysteresis_blocks)),
skew_hysteresis_blocks_(GetSkewHysteresis(config)),
delay_estimator_(data_dumper_.get(), config),
delay_buf_(kBlockSize * non_causal_offset, 0.f),
skew_estimator_(kSkewHistorySizeLog2) {