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_coding/codecs/isac/fix/source/entropy_coding.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, 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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 0, 21845, 43690, 65535}; 1863 0, 21845, 43690, 65535};
1864 1864
1865 /* pointer to cdf array for frame length indicator */ 1865 /* pointer to cdf array for frame length indicator */
1866 const uint16_t *kFrameLenCdfPtr[1] = {kFrameLenCdf}; 1866 const uint16_t *kFrameLenCdfPtr[1] = {kFrameLenCdf};
1867 1867
1868 /* initial cdf index for decoder of frame length indicator */ 1868 /* initial cdf index for decoder of frame length indicator */
1869 const uint16_t kFrameLenInitIndex[1] = {1}; 1869 const uint16_t kFrameLenInitIndex[1] = {1};
1870 1870
1871 1871
1872 int WebRtcIsacfix_DecodeFrameLen(Bitstr_dec *streamdata, 1872 int WebRtcIsacfix_DecodeFrameLen(Bitstr_dec *streamdata,
1873 int16_t *framesamples) 1873 size_t *framesamples)
1874 { 1874 {
1875 1875
1876 int err; 1876 int err;
1877 int16_t frame_mode; 1877 int16_t frame_mode;
1878 1878
1879 err = 0; 1879 err = 0;
1880 /* entropy decoding of frame length [1:30ms,2:60ms] */ 1880 /* entropy decoding of frame length [1:30ms,2:60ms] */
1881 err = WebRtcIsacfix_DecHistOneStepMulti(&frame_mode, streamdata, kFrameLenCdfP tr, kFrameLenInitIndex, 1); 1881 err = WebRtcIsacfix_DecHistOneStepMulti(&frame_mode, streamdata, kFrameLenCdfP tr, kFrameLenInitIndex, 1);
1882 if (err<0) // error check 1882 if (err<0) // error check
1883 return -ISAC_RANGE_ERROR_DECODE_FRAME_LENGTH; 1883 return -ISAC_RANGE_ERROR_DECODE_FRAME_LENGTH;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 2025
2026 index_gQQ[k] = pos2QQ + WebRtcIsacfix_kQuantMinGain[k]; //ATTN: ok? 2026 index_gQQ[k] = pos2QQ + WebRtcIsacfix_kQuantMinGain[k]; //ATTN: ok?
2027 if (index_gQQ[k] < 0) { 2027 if (index_gQQ[k] < 0) {
2028 index_gQQ[k] = 0; 2028 index_gQQ[k] = 0;
2029 } 2029 }
2030 else if (index_gQQ[k] > WebRtcIsacfix_kMaxIndGain[k]) { 2030 else if (index_gQQ[k] > WebRtcIsacfix_kMaxIndGain[k]) {
2031 index_gQQ[k] = WebRtcIsacfix_kMaxIndGain[k]; 2031 index_gQQ[k] = WebRtcIsacfix_kMaxIndGain[k];
2032 } 2032 }
2033 } 2033 }
2034 } 2034 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698