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

Side by Side Diff: webrtc/modules/audio_coding/neteq/statistics_calculator.cc

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 stats->preemptive_rate = 143 stats->preemptive_rate =
144 CalculateQ14Ratio(preemptive_samples_, timestamps_since_last_report_); 144 CalculateQ14Ratio(preemptive_samples_, timestamps_since_last_report_);
145 145
146 stats->expand_rate = 146 stats->expand_rate =
147 CalculateQ14Ratio(expanded_speech_samples_ + expanded_noise_samples_, 147 CalculateQ14Ratio(expanded_speech_samples_ + expanded_noise_samples_,
148 timestamps_since_last_report_); 148 timestamps_since_last_report_);
149 149
150 stats->speech_expand_rate = 150 stats->speech_expand_rate =
151 CalculateQ14Ratio(expanded_speech_samples_, 151 CalculateQ14Ratio(expanded_speech_samples_,
152 timestamps_since_last_report_); 152 timestamps_since_last_report_);
153 153
154 stats->secondary_decoded_rate = 154 stats->secondary_decoded_rate =
155 CalculateQ14Ratio(secondary_decoded_samples_, 155 CalculateQ14Ratio(secondary_decoded_samples_,
156 timestamps_since_last_report_); 156 timestamps_since_last_report_);
157 157
158 // Reset counters. 158 // Reset counters.
159 ResetMcu(); 159 ResetMcu();
160 Reset(); 160 Reset();
161 } 161 }
162 162
(...skipping 13 matching lines...) Expand all
176 // Ratio must be smaller than 1 in Q14. 176 // Ratio must be smaller than 1 in Q14.
177 assert((numerator << 14) / denominator < (1 << 14)); 177 assert((numerator << 14) / denominator < (1 << 14));
178 return static_cast<uint16_t>((numerator << 14) / denominator); 178 return static_cast<uint16_t>((numerator << 14) / denominator);
179 } else { 179 } else {
180 // Will not produce a ratio larger than 1, since this is probably an error. 180 // Will not produce a ratio larger than 1, since this is probably an error.
181 return 1 << 14; 181 return 1 << 14;
182 } 182 }
183 } 183 }
184 184
185 } // namespace webrtc 185 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698