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

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

Issue 1227163003: 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 11 matching lines...) Expand all
22 #include "entropy_coding.h" 22 #include "entropy_coding.h"
23 #include "pitch_estimator.h" 23 #include "pitch_estimator.h"
24 #include "settings.h" 24 #include "settings.h"
25 #include "structs.h" 25 #include "structs.h"
26 26
27 27
28 28
29 29
30 int WebRtcIsacfix_DecodeImpl(int16_t* signal_out16, 30 int WebRtcIsacfix_DecodeImpl(int16_t* signal_out16,
31 IsacFixDecoderInstance* ISACdec_obj, 31 IsacFixDecoderInstance* ISACdec_obj,
32 int16_t* current_framesamples) 32 size_t* current_framesamples)
33 { 33 {
34 int k; 34 int k;
35 int err; 35 int err;
36 int16_t BWno; 36 int16_t BWno;
37 int len = 0; 37 int len = 0;
38 38
39 int16_t model; 39 int16_t model;
40 40
41 41
42 int16_t Vector_Word16_1[FRAMESAMPLES/2]; 42 int16_t Vector_Word16_1[FRAMESAMPLES/2];
43 int16_t Vector_Word16_2[FRAMESAMPLES/2]; 43 int16_t Vector_Word16_2[FRAMESAMPLES/2];
44 44
45 int32_t Vector_Word32_1[FRAMESAMPLES/2]; 45 int32_t Vector_Word32_1[FRAMESAMPLES/2];
46 int32_t Vector_Word32_2[FRAMESAMPLES/2]; 46 int32_t Vector_Word32_2[FRAMESAMPLES/2];
47 47
48 int16_t lofilt_coefQ15[ORDERLO*SUBFRAMES]; //refl. coeffs 48 int16_t lofilt_coefQ15[ORDERLO*SUBFRAMES]; //refl. coeffs
49 int16_t hifilt_coefQ15[ORDERHI*SUBFRAMES]; //refl. coeffs 49 int16_t hifilt_coefQ15[ORDERHI*SUBFRAMES]; //refl. coeffs
50 int32_t gain_lo_hiQ17[2*SUBFRAMES]; 50 int32_t gain_lo_hiQ17[2*SUBFRAMES];
51 51
52 int16_t PitchLags_Q7[PITCH_SUBFRAMES]; 52 int16_t PitchLags_Q7[PITCH_SUBFRAMES];
53 int16_t PitchGains_Q12[PITCH_SUBFRAMES]; 53 int16_t PitchGains_Q12[PITCH_SUBFRAMES];
54 int16_t AvgPitchGain_Q12; 54 int16_t AvgPitchGain_Q12;
55 55
56 int16_t tmp_1, tmp_2; 56 int16_t tmp_1, tmp_2;
57 int32_t tmp32a; 57 int32_t tmp32a;
58 int16_t gainQ13; 58 int16_t gainQ13;
59 59
60 60
61 int16_t frame_nb; /* counter */ 61 size_t frame_nb; /* counter */
62 int16_t frame_mode; /* 0 for 30ms, 1 for 60ms */ 62 size_t frame_mode; /* 0 for 30ms, 1 for 60ms */
63 static const int16_t kProcessedSamples = 480; /* 480 (for both 30, 60 ms) */ 63 static const size_t kProcessedSamples = 480; /* 480 (for both 30, 60 ms) */
64 64
65 /* PLC */ 65 /* PLC */
66 int16_t overlapWin[ 240 ]; 66 int16_t overlapWin[ 240 ];
67 67
68 (ISACdec_obj->bitstr_obj).W_upper = 0xFFFFFFFF; 68 (ISACdec_obj->bitstr_obj).W_upper = 0xFFFFFFFF;
69 (ISACdec_obj->bitstr_obj).streamval = 0; 69 (ISACdec_obj->bitstr_obj).streamval = 0;
70 (ISACdec_obj->bitstr_obj).stream_index = 0; 70 (ISACdec_obj->bitstr_obj).stream_index = 0;
71 (ISACdec_obj->bitstr_obj).full = 1; 71 (ISACdec_obj->bitstr_obj).full = 1;
72 72
73 73
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 WebRtcIsacfix_FilterAndCombine1(Vector_Word16_1, 214 WebRtcIsacfix_FilterAndCombine1(Vector_Word16_1,
215 Vector_Word16_2, 215 Vector_Word16_2,
216 signal_out16 + frame_nb * kProcessedSamples, 216 signal_out16 + frame_nb * kProcessedSamples,
217 &ISACdec_obj->postfiltbankstr_obj); 217 &ISACdec_obj->postfiltbankstr_obj);
218 218
219 } 219 }
220 return len; 220 return len;
221 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698