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

Unified Diff: webrtc/modules/audio_processing/residual_echo_detector.h

Issue 2629563003: Added a new echo likelihood stat that reports the maximum value from a previous time period. (Closed)
Patch Set: Small bugfix. Created 3 years, 11 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/residual_echo_detector.h
diff --git a/webrtc/modules/audio_processing/residual_echo_detector.h b/webrtc/modules/audio_processing/residual_echo_detector.h
index e8f51cda3e2316be4882f76af3a1fadee472477c..ba0d0d3c2843aa5f61a6ba94677d678ae8e8d8d8 100644
--- a/webrtc/modules/audio_processing/residual_echo_detector.h
+++ b/webrtc/modules/audio_processing/residual_echo_detector.h
@@ -16,6 +16,7 @@
#include "webrtc/base/array_view.h"
#include "webrtc/modules/audio_processing/echo_detector/circular_buffer.h"
#include "webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.h"
+#include "webrtc/modules/audio_processing/echo_detector/moving_max.h"
#include "webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h"
namespace webrtc {
@@ -46,6 +47,10 @@ class ResidualEchoDetector {
// This function should be called while holding the capture lock.
float echo_likelihood() const { return echo_likelihood_; }
+ float echo_likelihood_recent_max() const {
+ return recent_likelihood_max_.max();
+ }
+
private:
// Keep track if the |Process| function has been previously called.
bool first_process_call_ = true;
@@ -76,6 +81,7 @@ class ResidualEchoDetector {
float echo_likelihood_ = 0.f;
// Reliability of the current likelihood.
float reliability_ = 0.f;
+ MovingMax recent_likelihood_max_;
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698