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

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 3 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 /* arr_ts - value given by timeGetTime() time of arrival in samples of pa cket from NetEq */ 135 /* arr_ts - value given by timeGetTime() time of arrival in samples of pa cket from NetEq */
136 /* pksize - size of packet in bytes, from NetEq */ 136 /* pksize - size of packet in bytes, from NetEq */
137 /* Index - integer (range 0...23) indicating bottle neck & jitter as est imated by other side */ 137 /* Index - integer (range 0...23) indicating bottle neck & jitter as est imated by other side */
138 /* returns 0 if everything went fine, -1 otherwise */ 138 /* returns 0 if everything went fine, -1 otherwise */
139 int16_t WebRtcIsac_UpdateBandwidthEstimator( 139 int16_t WebRtcIsac_UpdateBandwidthEstimator(
140 BwEstimatorstr* bwest_str, 140 BwEstimatorstr* bwest_str,
141 const uint16_t rtp_number, 141 const uint16_t rtp_number,
142 const int32_t frame_length, 142 const int32_t frame_length,
143 const uint32_t send_ts, 143 const uint32_t send_ts,
144 const uint32_t arr_ts, 144 const uint32_t arr_ts,
145 const int32_t pksize 145 const size_t pksize
146 /*, const uint16_t Index*/) 146 /*, const uint16_t Index*/)
147 { 147 {
148 float weight = 0.0f; 148 float weight = 0.0f;
149 float curr_bw_inv = 0.0f; 149 float curr_bw_inv = 0.0f;
150 float rec_rtp_rate; 150 float rec_rtp_rate;
151 float t_diff_proj; 151 float t_diff_proj;
152 float arr_ts_diff; 152 float arr_ts_diff;
153 float send_ts_diff; 153 float send_ts_diff;
154 float arr_time_noise; 154 float arr_time_noise;
155 float arr_time_noise_abs; 155 float arr_time_noise_abs;
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 s2nr = a_60 + b_60 * bottle_neck * 0.001 + c_60 * bottle_neck * 1022 s2nr = a_60 + b_60 * bottle_neck * 0.001 + c_60 * bottle_neck *
1023 bottle_neck * 0.000001; 1023 bottle_neck * 0.000001;
1024 break; 1024 break;
1025 default: 1025 default:
1026 s2nr = 0; 1026 s2nr = 0;
1027 } 1027 }
1028 1028
1029 return s2nr; 1029 return s2nr;
1030 1030
1031 } 1031 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698