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

Unified Diff: webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc

Issue 1693823004: Use VAD to get a better speech power estimation in the IntelligibilityEnhancer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@pow
Patch Set: Created 4 years, 10 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/intelligibility/intelligibility_utils_unittest.cc
diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc
index 42fae582830fd245b5fc9cc415c0adfc43cadc9d..2a7a830c444d1bb0ca1cc06ffd5047148aab394a 100644
--- a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc
+++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils_unittest.cc
@@ -38,16 +38,15 @@ TEST(IntelligibilityUtilsTest, TestPowerEstimator) {
const std::vector<std::vector<std::complex<float>>> test_data(
GenerateTestData(kFreqs, kSamples));
PowerEstimator power_estimator(kFreqs, kDecay);
- EXPECT_EQ(0, power_estimator.Power()[0]);
+ EXPECT_EQ(0, power_estimator.power()[0]);
// Makes sure Step is doing something.
power_estimator.Step(&test_data[0][0]);
for (size_t i = 1; i < kSamples; ++i) {
power_estimator.Step(&test_data[i][0]);
for (size_t j = 0; j < kFreqs; ++j) {
- const float* power = power_estimator.Power();
- EXPECT_GE(power[j], 0.f);
- EXPECT_LE(power[j], 1.f);
+ EXPECT_GE(power_estimator.power()[j], 0.f);
+ EXPECT_LE(power_estimator.power()[j], 1.f);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698