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

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: 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 stats->preemptive_rate = 142 stats->preemptive_rate =
143 CalculateQ14Ratio(preemptive_samples_, timestamps_since_last_report_); 143 CalculateQ14Ratio(preemptive_samples_, timestamps_since_last_report_);
144 144
145 stats->expand_rate = 145 stats->expand_rate =
146 CalculateQ14Ratio(expanded_speech_samples_ + expanded_noise_samples_, 146 CalculateQ14Ratio(expanded_speech_samples_ + expanded_noise_samples_,
147 timestamps_since_last_report_); 147 timestamps_since_last_report_);
148 148
149 stats->speech_expand_rate = 149 stats->speech_expand_rate =
150 CalculateQ14Ratio(expanded_speech_samples_, 150 CalculateQ14Ratio(expanded_speech_samples_,
151 timestamps_since_last_report_); 151 timestamps_since_last_report_);
152 152
153 stats->secondary_decoded_rate = 153 stats->secondary_decoded_rate =
154 CalculateQ14Ratio(secondary_decoded_samples_, 154 CalculateQ14Ratio(secondary_decoded_samples_,
155 timestamps_since_last_report_); 155 timestamps_since_last_report_);
156 156
157 // Reset counters. 157 // Reset counters.
158 ResetMcu(); 158 ResetMcu();
159 Reset(); 159 Reset();
160 } 160 }
161 161
(...skipping 13 matching lines...) Expand all
175 // Ratio must be smaller than 1 in Q14. 175 // Ratio must be smaller than 1 in Q14.
176 assert((numerator << 14) / denominator < (1 << 14)); 176 assert((numerator << 14) / denominator < (1 << 14));
177 return (numerator << 14) / denominator; 177 return (numerator << 14) / denominator;
178 } else { 178 } else {
179 // Will not produce a ratio larger than 1, since this is probably an error. 179 // Will not produce a ratio larger than 1, since this is probably an error.
180 return 1 << 14; 180 return 1 << 14;
181 } 181 }
182 } 182 }
183 183
184 } // namespace webrtc 184 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698