Index: webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc |
diff --git a/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc b/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc |
index 0b8b68bfbdd0a247851e145e9bdee7078cb84a1f..8408f014048205e7f982dfe3bd7f2162d37ec087 100644 |
--- a/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc |
+++ b/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc |
@@ -10,6 +10,10 @@ |
#include "webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.h" |
+#include <math.h> |
+ |
+#include "webrtc/base/checks.h" |
+ |
namespace webrtc { |
namespace { |
@@ -27,6 +31,8 @@ void NormalizedCovarianceEstimator::Update(float x, |
covariance_ = |
(1.f - kAlpha) * covariance_ + kAlpha * (x - x_mean) * (y - y_mean); |
normalized_cross_correlation_ = covariance_ / (x_sigma * y_sigma + .0001f); |
+ RTC_DCHECK(isfinite(covariance_)); |
+ RTC_DCHECK(isfinite(normalized_cross_correlation_)); |
} |
void NormalizedCovarianceEstimator::Clear() { |