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 |