From 9750e84d7a8511456c18ebc055249fcb674820ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Thu, 28 Nov 2019 17:19:27 +0100 Subject: [PATCH] AEC3:Turning off default downmix in surround alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL changes the downmixing of the input to the delay estimation for surround/stereo signals to be off by default. A kill-switch is also added for enforcing the downmix to be on. Bug: webrtc:10913 Change-Id: I1030fef593ba56416deeb13b80d2f3812bffb9ed Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161012 Commit-Queue: Per Ã…hgren Commit-Queue: Sam Zackrisson Reviewed-by: Sam Zackrisson Cr-Commit-Position: refs/heads/master@{#29951} --- api/audio/echo_canceller3_config.h | 2 +- modules/audio_processing/aec3/echo_canceller3.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/audio/echo_canceller3_config.h b/api/audio/echo_canceller3_config.h index dddc220d3b..f54ad908d0 100644 --- a/api/audio/echo_canceller3_config.h +++ b/api/audio/echo_canceller3_config.h @@ -47,7 +47,7 @@ struct RTC_EXPORT EchoCanceller3Config { int converged; } delay_selection_thresholds = {5, 20}; bool use_external_delay_estimator = false; - bool downmix_before_delay_estimation = true; + bool downmix_before_delay_estimation = false; bool log_warning_on_delay_changes = false; } delay; diff --git a/modules/audio_processing/aec3/echo_canceller3.cc b/modules/audio_processing/aec3/echo_canceller3.cc index a68ae01a98..e387940885 100644 --- a/modules/audio_processing/aec3/echo_canceller3.cc +++ b/modules/audio_processing/aec3/echo_canceller3.cc @@ -51,6 +51,10 @@ EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) { adjusted_cfg.erle.clamp_quality_estimate_to_one = false; } + if (field_trial::IsEnabled("WebRTC-Aec3AlignmentOnLeftChannelKillSwitch")) { + adjusted_cfg.delay.downmix_before_delay_estimation = true; + } + return adjusted_cfg; }