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

Side by Side Diff: webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.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
11 /****************************************************************** 11 /******************************************************************
12 12
13 iLBC Speech Coder ANSI-C Source Code 13 iLBC Speech Coder ANSI-C Source Code
14 14
15 WebRtcIlbcfix_AbsQuantLoop.c 15 WebRtcIlbcfix_AbsQuantLoop.c
16 16
17 ******************************************************************/ 17 ******************************************************************/
18 18
19 #include "defines.h" 19 #include "defines.h"
20 #include "constants.h" 20 #include "constants.h"
21 #include "sort_sq.h" 21 #include "sort_sq.h"
22 22
23 void WebRtcIlbcfix_AbsQuantLoop(int16_t *syntOutIN, int16_t *in_weightedIN, 23 void WebRtcIlbcfix_AbsQuantLoop(int16_t *syntOutIN, int16_t *in_weightedIN,
24 int16_t *weightDenumIN, int16_t *quantLenIN, 24 int16_t *weightDenumIN, size_t *quantLenIN,
25 int16_t *idxVecIN ) { 25 int16_t *idxVecIN ) {
26 int k1, k2; 26 size_t k1, k2;
27 int16_t index; 27 int16_t index;
28 int32_t toQW32; 28 int32_t toQW32;
29 int32_t toQ32; 29 int32_t toQ32;
30 int16_t tmp16a; 30 int16_t tmp16a;
31 int16_t xq; 31 int16_t xq;
32 32
33 int16_t *syntOut = syntOutIN; 33 int16_t *syntOut = syntOutIN;
34 int16_t *in_weighted = in_weightedIN; 34 int16_t *in_weighted = in_weightedIN;
35 int16_t *weightDenum = weightDenumIN; 35 int16_t *weightDenum = weightDenumIN;
36 int16_t *quantLen = quantLenIN; 36 size_t *quantLen = quantLenIN;
37 int16_t *idxVec = idxVecIN; 37 int16_t *idxVec = idxVecIN;
38 38
39 for(k1=0;k1<2;k1++) { 39 for(k1=0;k1<2;k1++) {
40 for(k2=0;k2<quantLen[k1];k2++){ 40 for(k2=0;k2<quantLen[k1];k2++){
41 41
42 /* Filter to get the predicted value */ 42 /* Filter to get the predicted value */
43 WebRtcSpl_FilterARFastQ12( 43 WebRtcSpl_FilterARFastQ12(
44 syntOut, syntOut, 44 syntOut, syntOut,
45 weightDenum, LPC_FILTERORDER+1, 1); 45 weightDenum, LPC_FILTERORDER+1, 1);
46 46
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 tmp16a = ((WebRtcIlbcfix_kStateSq3[index] + 2 ) >> 2); 78 tmp16a = ((WebRtcIlbcfix_kStateSq3[index] + 2 ) >> 2);
79 79
80 *syntOut = (int16_t) (tmp16a + (int32_t)(*in_weighted) - toQW32); 80 *syntOut = (int16_t) (tmp16a + (int32_t)(*in_weighted) - toQW32);
81 81
82 syntOut++; in_weighted++; 82 syntOut++; in_weighted++;
83 } 83 }
84 /* Update perceptual weighting filter at subframe border */ 84 /* Update perceptual weighting filter at subframe border */
85 weightDenum += 11; 85 weightDenum += 11;
86 } 86 }
87 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698