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

Unified Diff: webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc

Issue 2877803002: Adds fuzzer for the residual echo detector. (Closed)
Patch Set: Review comments by Henrik. Created 3 years, 7 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 | « no previous file | webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
diff --git a/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc b/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
index 06baf68b8a72ccd5d00118871a175b58a2585412..f0de0f09fe4d0f3e7492ee974531f3e5fc14fd68 100644
--- a/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
+++ b/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
@@ -26,6 +26,8 @@ void MeanVarianceEstimator::Update(float value) {
mean_ = (1.f - kAlpha) * mean_ + kAlpha * value;
variance_ =
(1.f - kAlpha) * variance_ + kAlpha * (value - mean_) * (value - mean_);
+ RTC_DCHECK(isfinite(mean_));
+ RTC_DCHECK(isfinite(variance_));
}
float MeanVarianceEstimator::std_deviation() const {
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698