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

Side by Side Diff: webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.cc

Issue 2782423003: Major updates to the echo removal functionality in AEC3 (Closed)
Patch Set: Added initialization of uninitialized vector Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 if (!initial_update) { 45 if (!initial_update) {
46 if (delay_samples) { 46 if (delay_samples) {
47 ++reliable_delay_estimate_counter_; 47 ++reliable_delay_estimate_counter_;
48 size_t delay_blocks = (*delay_samples) / kBlockSize; 48 size_t delay_blocks = (*delay_samples) / kBlockSize;
49 49
50 if (delay_blocks != delay_blocks_) { 50 if (delay_blocks != delay_blocks_) {
51 ++delay_change_counter_; 51 ++delay_change_counter_;
52 delay_blocks_ = delay_blocks; 52 delay_blocks_ = delay_blocks;
53 } 53 }
54 } 54 }
55 } else if (++initial_call_counter_ == 5 * 250) { 55 } else if (++initial_call_counter_ == 5 * kNumBlocksPerSecond) {
56 initial_update = false; 56 initial_update = false;
57 } 57 }
58 58
59 if (call_counter_ == kMetricsReportingIntervalBlocks) { 59 if (call_counter_ == kMetricsReportingIntervalBlocks) {
60 int value_to_report = static_cast<int>(delay_blocks_); 60 int value_to_report = static_cast<int>(delay_blocks_);
61 value_to_report = std::min(124, value_to_report); 61 value_to_report = std::min(124, value_to_report);
62 RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.EchoCanceller.EchoPathDelay", 62 RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.EchoCanceller.EchoPathDelay",
63 value_to_report, 0, 124, 125); 63 value_to_report, 0, 124, 125);
64 64
65 value_to_report = static_cast<int>(buffer_delay_blocks); 65 value_to_report = static_cast<int>(buffer_delay_blocks);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 metrics_reported_ = false; 108 metrics_reported_ = false;
109 } 109 }
110 } 110 }
111 111
112 void RenderDelayControllerMetrics::ResetMetrics() { 112 void RenderDelayControllerMetrics::ResetMetrics() {
113 delay_change_counter_ = 0; 113 delay_change_counter_ = 0;
114 reliable_delay_estimate_counter_ = 0; 114 reliable_delay_estimate_counter_ = 0;
115 } 115 }
116 116
117 } // namespace webrtc 117 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698