Removed redundant max operation and corrected comment
Bug: webrtc:8379 Change-Id: I20d0d469a8cc465ca45c18bfde8bbc945cb00e74 Reviewed-on: https://webrtc-review.googlesource.com/8303 Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20242}
This commit is contained in:
parent
fa4c0c768a
commit
6229d92a52
@ -32,13 +32,13 @@ void MatchedFilterLagAggregator::Reset() {
|
||||
|
||||
rtc::Optional<size_t> MatchedFilterLagAggregator::Aggregate(
|
||||
rtc::ArrayView<const MatchedFilter::LagEstimate> lag_estimates) {
|
||||
// hoose the strongest lag estimate as the best one.
|
||||
// Choose the strongest lag estimate as the best one.
|
||||
float best_accuracy = 0.f;
|
||||
int best_lag_estimate_index = -1;
|
||||
for (size_t k = 0; k < lag_estimates.size(); ++k) {
|
||||
if (lag_estimates[k].updated && lag_estimates[k].reliable) {
|
||||
if (lag_estimates[k].accuracy > best_accuracy) {
|
||||
best_accuracy = std::max(0.f, lag_estimates[k].accuracy);
|
||||
best_accuracy = lag_estimates[k].accuracy;
|
||||
best_lag_estimate_index = static_cast<int>(k);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user