diff options
author | Bjorn Volcker <bjornv@webrtc.org> | 2015-05-06 11:58:04 +0200 |
---|---|---|
committer | Bjorn Volcker <bjornv@webrtc.org> | 2015-05-06 09:58:09 +0000 |
commit | 532531b65643a3abb82fd6f3878d25b613b6fb80 (patch) | |
tree | d50eb7ae347193b1c395e6c83dcf78706020079b | |
parent | 40a6d593d26cb87421ab40c3a7ec023f6501721c (diff) | |
download | webrtc-532531b65643a3abb82fd6f3878d25b613b6fb80.tar.gz |
audio_processing/delay_estimator: Always update robust validation statistics
The delay estimator has a robust_validation mode used to deliver more stable delay etimates. The cost is increased reaction time when we have a delay jump.
This mode can be turned on and off on the fly, but statistics are not updated while disabled. This makes the estimator unreliable if it is enabled on the fly.
This CL makes sure the update is always done.
BUG=4472
R=kwiberg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/50889004
Cr-Commit-Position: refs/heads/master@{#9143}
-rw-r--r-- | webrtc/modules/audio_processing/utility/delay_estimator.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/webrtc/modules/audio_processing/utility/delay_estimator.c b/webrtc/modules/audio_processing/utility/delay_estimator.c index 60c7a04214..f9f3dc2457 100644 --- a/webrtc/modules/audio_processing/utility/delay_estimator.c +++ b/webrtc/modules/audio_processing/utility/delay_estimator.c @@ -615,11 +615,10 @@ int WebRtc_ProcessBinarySpectrum(BinaryDelayEstimator* self, ((value_best_candidate < self->minimum_probability) || (value_best_candidate < self->last_delay_probability))); + UpdateRobustValidationStatistics(self, candidate_delay, valley_depth, + value_best_candidate); if (self->robust_validation_enabled) { - int is_histogram_valid = 0; - UpdateRobustValidationStatistics(self, candidate_delay, valley_depth, - value_best_candidate); - is_histogram_valid = HistogramBasedValidation(self, candidate_delay); + int is_histogram_valid = HistogramBasedValidation(self, candidate_delay); valid_candidate = RobustValidation(self, candidate_delay, valid_candidate, is_histogram_valid); |