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

Unified Diff: webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h

Issue 1207353002: Add new variance update option and unittests for intelligibility (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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.h
diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
index 075b8ad46bea1823fb78a9376001c3bb06bd20bf..769f4c769eef5794c219f2239537d379722f16e9 100644
--- a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
+++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
@@ -43,7 +43,8 @@ class VarianceArray {
kStepInfinite = 0,
kStepDecaying,
kStepWindowed,
- kStepBlocked
+ kStepBlocked,
+ kStepBlockBasedMovingAverage
};
// Construct an instance for the given input array length (|freqs|) and
@@ -77,6 +78,7 @@ class VarianceArray {
void DecayStep(const std::complex<float>* data, bool dummy);
void WindowedStep(const std::complex<float>* data, bool dummy);
void BlockedStep(const std::complex<float>* data, bool dummy);
+ void BlockBasedMovingAverage(const std::complex<float>* data, bool dummy);
// TODO(ekmeyerson): Switch the following running means
// and histories from rtc::scoped_ptr to std::vector.
@@ -105,6 +107,7 @@ class VarianceArray {
int history_cursor_;
int count_;
float array_mean_;
+ bool buffer_full_;
void (VarianceArray::*step_func_)(const std::complex<float>*, bool);
};

Powered by Google App Engine
This is Rietveld 408576698