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

Unified Diff: webrtc/modules/audio_processing/aec/aec_core_internal.h

Issue 1739993003: Adding fraction of filter divergence in AEC metrics. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: adding a header Created 4 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
« no previous file with comments | « webrtc/modules/audio_processing/aec/aec_core.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/aec/aec_core_internal.h
diff --git a/webrtc/modules/audio_processing/aec/aec_core_internal.h b/webrtc/modules/audio_processing/aec/aec_core_internal.h
index ea5889f50309683a3ce168303da3a190f6396504..05f5083c4ad919065048ec157456bfc6936c473a 100644
--- a/webrtc/modules/audio_processing/aec/aec_core_internal.h
+++ b/webrtc/modules/audio_processing/aec/aec_core_internal.h
@@ -48,6 +48,31 @@ typedef struct PowerLevel {
float minlevel;
} PowerLevel;
+class DivergentFilterFraction {
+ public:
+ DivergentFilterFraction();
+
+ // Reset.
+ void Reset();
+
+ void AddObservation(const PowerLevel& nearlevel,
+ const PowerLevel& linoutlevel,
+ const PowerLevel& nlpoutlevel);
+
+ // Return the latest fraction.
+ float GetLatestFraction() const;
+
+ private:
+ // Clear all values added.
+ void Clear();
+
+ size_t count_;
+ size_t occurrence_;
+ float fraction_;
+
+ RTC_DISALLOW_COPY_AND_ASSIGN(DivergentFilterFraction);
+};
+
struct AecCore {
AecCore();
@@ -121,6 +146,7 @@ struct AecCore {
Stats erle;
Stats aNlp;
Stats rerl;
+ DivergentFilterFraction divergent_filter_fraction;
// Quantities to control H band scaling for SWB input
int freq_avg_ic; // initial bin for averaging nlp gain
« no previous file with comments | « webrtc/modules/audio_processing/aec/aec_core.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698