From 280a31fc30e9362a2666e65f2ca05cd9d5da6173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Thu, 26 Apr 2018 14:57:49 +0000 Subject: [PATCH] Revert "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 reverts commit b04e5cae08b8a7bc27041c1606547f807aaa2fc1. Reason for revert: The reason for the revert is that some scenarios were detected where this caused the delay estimation to occur too slowly. Original change's description: > Making the delay estimator more robust to noisy nearends and low echoes > > 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} TBR=gustaf@webrtc.org,peah@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:9177, chromium:835281 Change-Id: I33e09ebfed8ad8330419e554f482c956608befce Reviewed-on: https://webrtc-review.googlesource.com/72843 Reviewed-by: Per Åhgren Reviewed-by: Gustaf Ullberg Commit-Queue: Oleh Prypin Cr-Commit-Position: refs/heads/master@{#23042} --- 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 d8de2a97eb..466acd41b3 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.1f * e / x2_sum; + const float alpha = 0.7f * e / x2_sum; const float32x4_t alpha_128 = vmovq_n_f32(alpha); - // filter = filter + 0.1 * (y - filter * x) / x * x. + // filter = filter + 0.7 * (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.1f * e / x2_sum; + const float alpha = 0.7f * e / x2_sum; const __m128 alpha_128 = _mm_set1_ps(alpha); - // filter = filter + 0.1 * (y - filter * x) / x * x. + // filter = filter + 0.7 * (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.1f * e / x2_sum; + const float alpha = 0.7f * e / x2_sum; - // filter = filter + 0.1 * (y - filter * x) / x * x. + // filter = filter + 0.7 * (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];