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

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

Issue 2782423003: Major updates to the echo removal functionality in AEC3 (Closed)
Patch Set: Added initialization of uninitialized vector Created 3 years, 8 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
Index: webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc
diff --git a/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc b/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc
index e8710b83759463585726a12a5d337663a3650dd0..312391b0e9a49dfab4d76b0ac7077bae6832ed1e 100644
--- a/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc
+++ b/webrtc/modules/audio_processing/aec3/suppression_filter_unittest.cc
@@ -44,8 +44,9 @@ TEST(SuppressionFilter, NullOutput) {
FftData cn_high_bands;
std::array<float, kFftLengthBy2Plus1> gain;
- EXPECT_DEATH(
- SuppressionFilter(16000).ApplyGain(cn, cn_high_bands, gain, nullptr), "");
+ EXPECT_DEATH(SuppressionFilter(16000).ApplyGain(cn, cn_high_bands, gain, 1.0f,
+ nullptr),
+ "");
}
// Verifies the check for allowed sample rate.
@@ -70,7 +71,7 @@ TEST(SuppressionFilter, ComfortNoiseInUnityGain) {
std::vector<std::vector<float>> e(3, std::vector<float>(kBlockSize, 0.f));
std::vector<std::vector<float>> e_ref = e;
- filter.ApplyGain(cn, cn_high_bands, gain, &e);
+ filter.ApplyGain(cn, cn_high_bands, gain, 1.f, &e);
for (size_t k = 0; k < e.size(); ++k) {
EXPECT_EQ(e_ref[k], e[k]);
@@ -102,7 +103,7 @@ TEST(SuppressionFilter, SignalSuppression) {
e[0]);
e0_input =
std::inner_product(e[0].begin(), e[0].end(), e[0].begin(), e0_input);
- filter.ApplyGain(cn, cn_high_bands, gain, &e);
+ filter.ApplyGain(cn, cn_high_bands, gain, 1.f, &e);
e0_output =
std::inner_product(e[0].begin(), e[0].end(), e[0].begin(), e0_output);
}
@@ -136,7 +137,7 @@ TEST(SuppressionFilter, SignalTransparency) {
e[0]);
e0_input =
std::inner_product(e[0].begin(), e[0].end(), e[0].begin(), e0_input);
- filter.ApplyGain(cn, cn_high_bands, gain, &e);
+ filter.ApplyGain(cn, cn_high_bands, gain, 1.f, &e);
e0_output =
std::inner_product(e[0].begin(), e[0].end(), e[0].begin(), e0_output);
}
@@ -166,7 +167,7 @@ TEST(SuppressionFilter, Delay) {
}
}
- filter.ApplyGain(cn, cn_high_bands, gain, &e);
+ filter.ApplyGain(cn, cn_high_bands, gain, 1.f, &e);
if (k > 2) {
for (size_t j = 0; j < 2; ++j) {
for (size_t i = 0; i < kBlockSize; ++i) {
« no previous file with comments | « webrtc/modules/audio_processing/aec3/suppression_filter.cc ('k') | webrtc/modules/audio_processing/aec3/suppression_gain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698