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

Side by Side Diff: webrtc/modules/audio_coding/codecs/ilbc/abs_quant.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) 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 18 matching lines...) Expand all
29 void WebRtcIlbcfix_AbsQuant( 29 void WebRtcIlbcfix_AbsQuant(
30 IlbcEncoder *iLBCenc_inst, 30 IlbcEncoder *iLBCenc_inst,
31 /* (i) Encoder instance */ 31 /* (i) Encoder instance */
32 iLBC_bits *iLBC_encbits, /* (i/o) Encoded bits (outputs idxForMax 32 iLBC_bits *iLBC_encbits, /* (i/o) Encoded bits (outputs idxForMax
33 and idxVec, uses state_first as 33 and idxVec, uses state_first as
34 input) */ 34 input) */
35 int16_t *in, /* (i) vector to encode */ 35 int16_t *in, /* (i) vector to encode */
36 int16_t *weightDenum /* (i) denominator of synthesis filter */ 36 int16_t *weightDenum /* (i) denominator of synthesis filter */
37 ) { 37 ) {
38 int16_t *syntOut; 38 int16_t *syntOut;
39 int16_t quantLen[2]; 39 size_t quantLen[2];
40 40
41 /* Stack based */ 41 /* Stack based */
42 int16_t syntOutBuf[LPC_FILTERORDER+STATE_SHORT_LEN_30MS]; 42 int16_t syntOutBuf[LPC_FILTERORDER+STATE_SHORT_LEN_30MS];
43 int16_t in_weightedVec[STATE_SHORT_LEN_30MS+LPC_FILTERORDER]; 43 int16_t in_weightedVec[STATE_SHORT_LEN_30MS+LPC_FILTERORDER];
44 int16_t *in_weighted = &in_weightedVec[LPC_FILTERORDER]; 44 int16_t *in_weighted = &in_weightedVec[LPC_FILTERORDER];
45 45
46 /* Initialize the buffers */ 46 /* Initialize the buffers */
47 WebRtcSpl_MemSetW16(syntOutBuf, 0, LPC_FILTERORDER+STATE_SHORT_LEN_30MS); 47 WebRtcSpl_MemSetW16(syntOutBuf, 0, LPC_FILTERORDER+STATE_SHORT_LEN_30MS);
48 syntOut = &syntOutBuf[LPC_FILTERORDER]; 48 syntOut = &syntOutBuf[LPC_FILTERORDER];
49 /* Start with zero state */ 49 /* Start with zero state */
(...skipping 21 matching lines...) Expand all
71 &weightDenum[LPC_FILTERORDER+1], LPC_FILTERORDER+1, quantLen[1]); 71 &weightDenum[LPC_FILTERORDER+1], LPC_FILTERORDER+1, quantLen[1]);
72 72
73 WebRtcIlbcfix_AbsQuantLoop( 73 WebRtcIlbcfix_AbsQuantLoop(
74 syntOut, 74 syntOut,
75 in_weighted, 75 in_weighted,
76 weightDenum, 76 weightDenum,
77 quantLen, 77 quantLen,
78 iLBC_encbits->idxVec); 78 iLBC_encbits->idxVec);
79 79
80 } 80 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/g722/test/testG722.cc ('k') | webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698