From b04e5cae08b8a7bc27041c1606547f807aaa2fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Fri, 20 Apr 2018 15:35:15 +0200 Subject: [PATCH] Making the delay estimator more robust to noisy nearends and low echoes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL reduces the delay estimator step size to make it react better in scenarios where the environment is noisy, or the echo level is fairly low. Bug: webrtc:9177,chromium:835281 Change-Id: I482d898c91eddc497e1284ee500d26df21a0574a Reviewed-on: https://webrtc-review.googlesource.com/71486 Reviewed-by: Gustaf Ullberg Commit-Queue: Per Ã…hgren Cr-Commit-Position: refs/heads/master@{#22990} --- modules/audio_processing/aec3/matched_filter.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/audio_processing/aec3/matched_filter.cc b/modules/audio_processing/aec3/matched_filter.cc index 466acd41b3..d8de2a97eb 100644 --- a/modules/audio_processing/aec3/matched_filter.cc +++ b/modules/audio_processing/aec3/matched_filter.cc @@ -100,10 +100,10 @@ void MatchedFilterCore_NEON(size_t x_start_index, // Update the matched filter estimate in an NLMS manner. if (x2_sum > x2_sum_threshold && !saturation) { RTC_DCHECK_LT(0.f, x2_sum); - const float alpha = 0.7f * e / x2_sum; + const float alpha = 0.1f * e / x2_sum; const float32x4_t alpha_128 = vmovq_n_f32(alpha); - // filter = filter + 0.7 * (y - filter * x) / x * x. + // filter = filter + 0.1 * (y - filter * x) / x * x. float* h_p = &h[0]; x_p = &x[x_start_index]; @@ -215,10 +215,10 @@ void MatchedFilterCore_SSE2(size_t x_start_index, // Update the matched filter estimate in an NLMS manner. if (x2_sum > x2_sum_threshold && !saturation) { RTC_DCHECK_LT(0.f, x2_sum); - const float alpha = 0.7f * e / x2_sum; + const float alpha = 0.1f * e / x2_sum; const __m128 alpha_128 = _mm_set1_ps(alpha); - // filter = filter + 0.7 * (y - filter * x) / x * x. + // filter = filter + 0.1 * (y - filter * x) / x * x. float* h_p = &h[0]; x_p = &x[x_start_index]; @@ -286,9 +286,9 @@ void MatchedFilterCore(size_t x_start_index, // Update the matched filter estimate in an NLMS manner. if (x2_sum > x2_sum_threshold && !saturation) { RTC_DCHECK_LT(0.f, x2_sum); - const float alpha = 0.7f * e / x2_sum; + const float alpha = 0.1f * e / x2_sum; - // filter = filter + 0.7 * (y - filter * x) / x * x. + // filter = filter + 0.1 * (y - filter * x) / x * x. size_t x_index = x_start_index; for (size_t k = 0; k < h.size(); ++k) { h[k] += alpha * x[x_index];