Updated the behavior for the filter adaptation in echo canceller 3

This CL adjusts the filter adaptation behavior to better handle
reverberant environments and environments with poor SNR.

It furthermore updates the unittests to handle the reduced adaptation
speed.

Bug: webrtc:8661
Change-Id: I5f1b5a4a34b333bd6c643ed3727899d0838dbf90
Reviewed-on: https://webrtc-review.googlesource.com/34184
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21323}
This commit is contained in:
Per Åhgren
2017-12-18 11:38:39 +01:00
committed by Commit Bot
parent e98c3de793
commit 019008bd93
5 changed files with 38 additions and 26 deletions

View File

@ -164,7 +164,13 @@ TEST(Subtractor, Convergence) {
float echo_to_nearend_power =
RunSubtractorTest(300, delay_samples, filter_length_blocks, false,
blocks_with_echo_path_changes);
EXPECT_GT(0.1f, echo_to_nearend_power);
// Use different criteria to take overmodelling into account.
if (filter_length_blocks == 12) {
EXPECT_GT(0.1f, echo_to_nearend_power);
} else {
EXPECT_GT(1.f, echo_to_nearend_power);
}
}
}
}
@ -177,9 +183,9 @@ TEST(Subtractor, NonConvergenceOnUncorrelatedSignals) {
SCOPED_TRACE(ProduceDebugText(delay_samples, filter_length_blocks));
float echo_to_nearend_power =
RunSubtractorTest(100, delay_samples, filter_length_blocks, true,
RunSubtractorTest(300, delay_samples, filter_length_blocks, true,
blocks_with_echo_path_changes);
EXPECT_NEAR(1.f, echo_to_nearend_power, 0.05);
EXPECT_NEAR(1.f, echo_to_nearend_power, 0.1);
}
}
}