AEC3: ERLE: Allowing increases of the ERLE estimate for low render signals.

Specially for devices with high echo path gain, even low render signal can allow the linear filter of the AEC3 to converge. However, the conditions that were used for updating the ERLE avoided to update that estimation. In this commit, we allow adapting the ERLE estimator using even low render signal but the update of the ERLE is constraint in a way that decreases are not allowed.

Bug: webrtc:9776
Change-Id: Ic4331efcc47a0b05f394cdea9a88f336292de5a1
Reviewed-on: https://webrtc-review.googlesource.com/101641
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24859}
This commit is contained in:
Jesús de Vicente Peña
2018-09-27 11:49:39 +02:00
committed by Commit Bot
parent 49ac5959c2
commit e9a7e90625
12 changed files with 600 additions and 346 deletions

View File

@ -76,7 +76,7 @@ TEST(ErleEstimator, VerifyErleIncreaseAndHold) {
for (size_t k = 0; k < 200; ++k) {
estimator.Update(X2, Y2, E2, true, true);
}
VerifyErle(estimator.Erle(), std::pow(2.f, estimator.ErleTimeDomainLog2()),
VerifyErle(estimator.Erle(), std::pow(2.f, estimator.FullbandErleLog2()),
kMaxErleLf, kMaxErleHf);
FormNearendFrame(&X2, &E2, &Y2);
@ -85,7 +85,7 @@ TEST(ErleEstimator, VerifyErleIncreaseAndHold) {
for (size_t k = 0; k < 50; ++k) {
estimator.Update(X2, Y2, E2, true, true);
}
VerifyErle(estimator.Erle(), std::pow(2.f, estimator.ErleTimeDomainLog2()),
VerifyErle(estimator.Erle(), std::pow(2.f, estimator.FullbandErleLog2()),
kMaxErleLf, kMaxErleHf);
}
@ -116,24 +116,7 @@ TEST(ErleEstimator, VerifyErleTrackingOnOnsets) {
estimator.Update(X2, Y2, E2, true, true);
}
// Verifies that during ne activity, Erle converges to the Erle for onsets.
VerifyErle(estimator.Erle(), std::pow(2.f, estimator.ErleTimeDomainLog2()),
kMinErle, kMinErle);
}
TEST(ErleEstimator, VerifyNoErleUpdateDuringLowActivity) {
std::array<float, kFftLengthBy2Plus1> X2;
std::array<float, kFftLengthBy2Plus1> E2;
std::array<float, kFftLengthBy2Plus1> Y2;
ErleEstimator estimator(kMinErle, kMaxErleLf, kMaxErleHf);
// Verifies that the ERLE estimate is is not updated for low-level render
// signals.
X2.fill(1000.f * 1000.f);
Y2.fill(10 * E2[0]);
for (size_t k = 0; k < 200; ++k) {
estimator.Update(X2, Y2, E2, true, true);
}
VerifyErle(estimator.Erle(), std::pow(2.f, estimator.ErleTimeDomainLog2()),
VerifyErle(estimator.Erle(), std::pow(2.f, estimator.FullbandErleLog2()),
kMinErle, kMinErle);
}