Revert "Making the delay estimator more robust to noisy nearends and low echoes"

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 <gustaf@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> 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 <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23042}
This commit is contained in:
Per Åhgren 2018-04-26 14:57:49 +00:00 committed by Commit Bot
parent efbdcb0008
commit 280a31fc30

View File

@ -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];