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

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c

Issue 2986163002: Audit of kConstants missing the const qualifier (Closed)
Patch Set: rebase + constexpr Created 3 years, 4 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 16 matching lines...) Expand all
27 * - streamData : in-/output struct containing bitstream 27 * - streamData : in-/output struct containing bitstream
28 * - data : data vector 28 * - data : data vector
29 * - cdf : array of cdf arrays 29 * - cdf : array of cdf arrays
30 * - lenData : data vector length 30 * - lenData : data vector length
31 * 31 *
32 * Return value : 0 if ok 32 * Return value : 0 if ok
33 * <0 if error detected 33 * <0 if error detected
34 */ 34 */
35 int WebRtcIsacfix_EncHistMulti(Bitstr_enc *streamData, 35 int WebRtcIsacfix_EncHistMulti(Bitstr_enc *streamData,
36 const int16_t *data, 36 const int16_t *data,
37 const uint16_t **cdf, 37 const uint16_t *const *cdf,
38 const int16_t lenData) 38 const int16_t lenData)
39 { 39 {
40 uint32_t W_lower; 40 uint32_t W_lower;
41 uint32_t W_upper; 41 uint32_t W_upper;
42 uint32_t W_upper_LSB; 42 uint32_t W_upper_LSB;
43 uint32_t W_upper_MSB; 43 uint32_t W_upper_MSB;
44 uint16_t *streamPtr; 44 uint16_t *streamPtr;
45 uint16_t negCarry; 45 uint16_t negCarry;
46 uint16_t *maxStreamPtr; 46 uint16_t *maxStreamPtr;
47 uint16_t *streamPtrCarry; 47 uint16_t *streamPtrCarry;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 * - lenData : data vector length 139 * - lenData : data vector length
140 * 140 *
141 * Output: 141 * Output:
142 * - data : data vector 142 * - data : data vector
143 * 143 *
144 * Return value : number of bytes in the stream 144 * Return value : number of bytes in the stream
145 * <0 if error detected 145 * <0 if error detected
146 */ 146 */
147 int16_t WebRtcIsacfix_DecHistBisectMulti(int16_t *data, 147 int16_t WebRtcIsacfix_DecHistBisectMulti(int16_t *data,
148 Bitstr_dec *streamData, 148 Bitstr_dec *streamData,
149 const uint16_t **cdf, 149 const uint16_t *const *cdf,
150 const uint16_t *cdfSize, 150 const uint16_t *cdfSize,
151 const int16_t lenData) 151 const int16_t lenData)
152 { 152 {
153 uint32_t W_lower = 0; 153 uint32_t W_lower = 0;
154 uint32_t W_upper; 154 uint32_t W_upper;
155 uint32_t W_tmp; 155 uint32_t W_tmp;
156 uint32_t W_upper_LSB; 156 uint32_t W_upper_LSB;
157 uint32_t W_upper_MSB; 157 uint32_t W_upper_MSB;
158 uint32_t streamval; 158 uint32_t streamval;
159 const uint16_t *streamPtr; 159 const uint16_t *streamPtr;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 * - lenData : data vector length 274 * - lenData : data vector length
275 * 275 *
276 * Output: 276 * Output:
277 * - data : data vector 277 * - data : data vector
278 * 278 *
279 * Return value : number of bytes in original stream 279 * Return value : number of bytes in original stream
280 * <0 if error detected 280 * <0 if error detected
281 */ 281 */
282 int16_t WebRtcIsacfix_DecHistOneStepMulti(int16_t *data, 282 int16_t WebRtcIsacfix_DecHistOneStepMulti(int16_t *data,
283 Bitstr_dec *streamData, 283 Bitstr_dec *streamData,
284 const uint16_t **cdf, 284 const uint16_t *const *cdf,
285 const uint16_t *initIndex, 285 const uint16_t *initIndex,
286 const int16_t lenData) 286 const int16_t lenData)
287 { 287 {
288 uint32_t W_lower; 288 uint32_t W_lower;
289 uint32_t W_upper; 289 uint32_t W_upper;
290 uint32_t W_tmp; 290 uint32_t W_tmp;
291 uint32_t W_upper_LSB; 291 uint32_t W_upper_LSB;
292 uint32_t W_upper_MSB; 292 uint32_t W_upper_MSB;
293 uint32_t streamval; 293 uint32_t streamval;
294 const uint16_t *streamPtr; 294 const uint16_t *streamPtr;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 streamData->W_upper = W_upper; 392 streamData->W_upper = W_upper;
393 streamData->streamval = streamval; 393 streamData->streamval = streamval;
394 394
395 /* find number of bytes in original stream (determined by current interval wid th) */ 395 /* find number of bytes in original stream (determined by current interval wid th) */
396 if ( W_upper > 0x01FFFFFF ) { 396 if ( W_upper > 0x01FFFFFF ) {
397 return (streamData->stream_index*2 - 3 + !streamData->full); 397 return (streamData->stream_index*2 - 3 + !streamData->full);
398 } else { 398 } else {
399 return (streamData->stream_index*2 - 2 + !streamData->full); 399 return (streamData->stream_index*2 - 2 + !streamData->full);
400 } 400 }
401 } 401 }
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcmediaengine.cc ('k') | webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698