Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc

Issue 2886733002: Transparency increasing tuning for AEC3 (Closed)
Patch Set: Fixed memory issue Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_processing/aec3/suppression_gain.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
diff --git a/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc b/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
index 1fd011f10c83e6aa63293008a82ad2bab7882ecd..9a6521c67b00599b7ddde37a54b714e74be07328 100644
--- a/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
+++ b/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
@@ -33,7 +33,7 @@ TEST(SuppressionGain, NullOutputGains) {
.GetGain(E2, R2, N2, false,
std::vector<std::vector<float>>(
3, std::vector<float>(kBlockSize, 0.f)),
- 1, false, &high_bands_gain, nullptr),
+ false, &high_bands_gain, nullptr),
"");
}
@@ -54,8 +54,7 @@ TEST(SuppressionGain, BasicGainComputation) {
R2.fill(0.1f);
N2.fill(100.f);
for (int k = 0; k < 10; ++k) {
- suppression_gain.GetGain(E2, R2, N2, false, x, 1, false, &high_bands_gain,
- &g);
+ suppression_gain.GetGain(E2, R2, N2, false, x, false, &high_bands_gain, &g);
}
std::for_each(g.begin(), g.end(),
[](float a) { EXPECT_NEAR(1.f, a, 0.001); });
@@ -65,25 +64,23 @@ TEST(SuppressionGain, BasicGainComputation) {
R2.fill(0.1f);
N2.fill(0.f);
for (int k = 0; k < 10; ++k) {
- suppression_gain.GetGain(E2, R2, N2, false, x, 1, false, &high_bands_gain,
- &g);
+ suppression_gain.GetGain(E2, R2, N2, false, x, false, &high_bands_gain, &g);
}
std::for_each(g.begin(), g.end(),
[](float a) { EXPECT_NEAR(1.f, a, 0.001); });
// Ensure that a strong echo is suppressed.
- E2.fill(0.1f);
- R2.fill(100.f);
+ E2.fill(1000000000.f);
+ R2.fill(10000000000000.f);
N2.fill(0.f);
for (int k = 0; k < 10; ++k) {
- suppression_gain.GetGain(E2, R2, N2, false, x, 1, false, &high_bands_gain,
- &g);
+ suppression_gain.GetGain(E2, R2, N2, false, x, false, &high_bands_gain, &g);
}
std::for_each(g.begin(), g.end(),
[](float a) { EXPECT_NEAR(0.f, a, 0.001); });
// Verify the functionality for forcing a zero gain.
- suppression_gain.GetGain(E2, R2, N2, false, x, 1, true, &high_bands_gain, &g);
+ suppression_gain.GetGain(E2, R2, N2, false, x, true, &high_bands_gain, &g);
std::for_each(g.begin(), g.end(), [](float a) { EXPECT_FLOAT_EQ(0.f, a); });
EXPECT_FLOAT_EQ(0.f, high_bands_gain);
}
« no previous file with comments | « webrtc/modules/audio_processing/aec3/suppression_gain.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698