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}
This commit is contained in:
Per Åhgren
2018-04-20 15:35:15 +02:00
committed by Commit Bot
parent e987f2b765
commit b04e5cae08

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