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

Side by Side Diff: webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.c

Issue 1230693002: Update audio code to use size_t more correctly, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments 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 13 matching lines...) Expand all
24 /*----------------------------------------------------------------* 24 /*----------------------------------------------------------------*
25 * get the pitch-synchronous sample sequence 25 * get the pitch-synchronous sample sequence
26 *---------------------------------------------------------------*/ 26 *---------------------------------------------------------------*/
27 27
28 void WebRtcIlbcfix_GetSyncSeq( 28 void WebRtcIlbcfix_GetSyncSeq(
29 int16_t *idata, /* (i) original data */ 29 int16_t *idata, /* (i) original data */
30 int16_t idatal, /* (i) dimension of data */ 30 int16_t idatal, /* (i) dimension of data */
31 int16_t centerStartPos, /* (i) where current block starts */ 31 int16_t centerStartPos, /* (i) where current block starts */
32 int16_t *period, /* (i) rough-pitch-period array (Q-2) */ 32 int16_t *period, /* (i) rough-pitch-period array (Q-2) */
33 int16_t *plocs, /* (i) where periods of period array are taken (Q-2) */ 33 int16_t *plocs, /* (i) where periods of period array are taken (Q-2) */
34 int16_t periodl, /* (i) dimension period array */ 34 size_t periodl, /* (i) dimension period array */
35 int16_t hl, /* (i) 2*hl+1 is the number of sequences */ 35 int16_t hl, /* (i) 2*hl+1 is the number of sequences */
36 int16_t *surround /* (i/o) The contribution from this sequence 36 int16_t *surround /* (i/o) The contribution from this sequence
37 summed with earlier contributions */ 37 summed with earlier contributions */
38 ){ 38 ){
39 int16_t i,centerEndPos,q; 39 size_t i;
40 int16_t centerEndPos,q;
40 /* Stack based */ 41 /* Stack based */
41 int16_t lagBlock[2*ENH_HL+1]; 42 int16_t lagBlock[2*ENH_HL+1];
42 int16_t blockStartPos[2*ENH_HL+1]; /* Defines the position to search around (Q 2) */ 43 int16_t blockStartPos[2*ENH_HL+1]; /* Defines the position to search around (Q 2) */
43 int16_t plocs2[ENH_PLOCSL]; 44 int16_t plocs2[ENH_PLOCSL];
44 45
45 centerEndPos=centerStartPos+ENH_BLOCKL-1; 46 centerEndPos=centerStartPos+ENH_BLOCKL-1;
46 47
47 /* present (find predicted lag from this position) */ 48 /* present (find predicted lag from this position) */
48 49
49 WebRtcIlbcfix_NearestNeighbor(lagBlock + hl, 50 WebRtcIlbcfix_NearestNeighbor(lagBlock + hl,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 WebRtcIlbcfix_Refiner(blockStartPos+q, idata, idatal, 104 WebRtcIlbcfix_Refiner(blockStartPos+q, idata, idatal,
104 centerStartPos,blockStartPos[q],surround,WebRtcIlbcf ix_kEnhWt[2*hl-q]); 105 centerStartPos,blockStartPos[q],surround,WebRtcIlbcf ix_kEnhWt[2*hl-q]);
105 106
106 } 107 }
107 else { 108 else {
108 /* Don't add anything since this sequence would 109 /* Don't add anything since this sequence would
109 be outside the buffer */ 110 be outside the buffer */
110 } 111 }
111 } 112 }
112 } 113 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/get_sync_seq.h ('k') | webrtc/modules/audio_coding/codecs/ilbc/hp_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698