Transparency increasing tuning for AEC3.

This CL increases the transparency of the AEC3 via tuning.
The major changes are
1) Limiting the suppression gain to the 16 bit sample floor.
2) Controlling the rate of the suppression gain increase
   according to the signal characteristics.

Apart from these tunings, the code for the suppression gain
was refactored to increase/maintain the code quality after
the above changes.

BUG=webrtc:7519,webrtc:7528, chromium:715893

Review-Url: https://codereview.webrtc.org/2886733002
Cr-Commit-Position: refs/heads/master@{#18229}
This commit is contained in:
peah
2017-05-23 04:07:10 -07:00
committed by Commit bot
parent 5e171752a2
commit 1d68089f4b
7 changed files with 304 additions and 193 deletions

View File

@ -114,9 +114,13 @@ TEST(AecState, NormalUsage) {
{
const auto& erle = state.Erle();
EXPECT_EQ(erle[0], erle[1]);
for (size_t k = 1; k < erle.size() - 1; ++k) {
constexpr size_t kLowFrequencyLimit = 32;
for (size_t k = 1; k < kLowFrequencyLimit; ++k) {
EXPECT_NEAR(k % 2 == 0 ? 8.f : 1.f, erle[k], 0.1);
}
for (size_t k = kLowFrequencyLimit; k < erle.size() - 1; ++k) {
EXPECT_NEAR(k % 2 == 0 ? 1.5f : 1.f, erle[k], 0.1);
}
EXPECT_EQ(erle[erle.size() - 2], erle[erle.size() - 1]);
}
@ -131,9 +135,13 @@ TEST(AecState, NormalUsage) {
{
const auto& erle = state.Erle();
EXPECT_EQ(erle[0], erle[1]);
for (size_t k = 1; k < erle.size() - 1; ++k) {
constexpr size_t kLowFrequencyLimit = 32;
for (size_t k = 1; k < kLowFrequencyLimit; ++k) {
EXPECT_NEAR(k % 2 == 0 ? 5.f : 1.f, erle[k], 0.1);
}
for (size_t k = kLowFrequencyLimit; k < erle.size() - 1; ++k) {
EXPECT_NEAR(k % 2 == 0 ? 1.5f : 1.f, erle[k], 0.1);
}
EXPECT_EQ(erle[erle.size() - 2], erle[erle.size() - 1]);
}
}