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

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

Issue 1168753002: Match existing type usage better. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 WebRtcIlbcfix_StateConstruct(iLBC_encbits->idxForMax, 60 WebRtcIlbcfix_StateConstruct(iLBC_encbits->idxForMax,
61 iLBC_encbits->idxVec, &syntdenum[(iLBC_encbits->s tartIdx-1)*(LPC_FILTERORDER+1)], 61 iLBC_encbits->idxVec, &syntdenum[(iLBC_encbits->s tartIdx-1)*(LPC_FILTERORDER+1)],
62 &decresidual[start_pos], iLBCdec_inst->state_shor t_len 62 &decresidual[start_pos], iLBCdec_inst->state_shor t_len
63 ); 63 );
64 64
65 if (iLBC_encbits->state_first) { /* put adaptive part in the end */ 65 if (iLBC_encbits->state_first) { /* put adaptive part in the end */
66 66
67 /* setup memory */ 67 /* setup memory */
68 68
69 WebRtcSpl_MemSetW16(mem, 0, (int16_t)(CB_MEML-iLBCdec_inst->state_short_len) ); 69 WebRtcSpl_MemSetW16(mem, 0, CB_MEML - iLBCdec_inst->state_short_len);
70 WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-iLBCdec_inst->state_short_len, decresidual +start_pos, 70 WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-iLBCdec_inst->state_short_len, decresidual +start_pos,
71 iLBCdec_inst->state_short_len); 71 iLBCdec_inst->state_short_len);
72 72
73 /* construct decoded vector */ 73 /* construct decoded vector */
74 74
75 WebRtcIlbcfix_CbConstruct( 75 WebRtcIlbcfix_CbConstruct(
76 &decresidual[start_pos+iLBCdec_inst->state_short_len], 76 &decresidual[start_pos+iLBCdec_inst->state_short_len],
77 iLBC_encbits->cb_index, iLBC_encbits->gain_index, 77 iLBC_encbits->cb_index, iLBC_encbits->gain_index,
78 mem+CB_MEML-ST_MEM_L_TBL, 78 mem+CB_MEML-ST_MEM_L_TBL,
79 ST_MEM_L_TBL, (int16_t)diff 79 ST_MEM_L_TBL, diff);
80 );
81 80
82 } 81 }
83 else {/* put adaptive part in the beginning */ 82 else {/* put adaptive part in the beginning */
84 83
85 /* setup memory */ 84 /* setup memory */
86 85
87 meml_gotten = iLBCdec_inst->state_short_len; 86 meml_gotten = iLBCdec_inst->state_short_len;
88 WebRtcSpl_MemCpyReversedOrder(mem+CB_MEML-1, 87 WebRtcSpl_MemCpyReversedOrder(mem+CB_MEML-1,
89 decresidual+start_pos, meml_gotten); 88 decresidual+start_pos, meml_gotten);
90 WebRtcSpl_MemSetW16(mem, 0, (int16_t)(CB_MEML-meml_gotten)); 89 WebRtcSpl_MemSetW16(mem, 0, CB_MEML - meml_gotten);
91 90
92 /* construct decoded vector */ 91 /* construct decoded vector */
93 92
94 WebRtcIlbcfix_CbConstruct( 93 WebRtcIlbcfix_CbConstruct(
95 reverseDecresidual, 94 reverseDecresidual,
96 iLBC_encbits->cb_index, iLBC_encbits->gain_index, 95 iLBC_encbits->cb_index, iLBC_encbits->gain_index,
97 mem+CB_MEML-ST_MEM_L_TBL, 96 mem+CB_MEML-ST_MEM_L_TBL,
98 ST_MEM_L_TBL, diff 97 ST_MEM_L_TBL, diff
99 ); 98 );
100 99
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 145
147 /* setup memory */ 146 /* setup memory */
148 147
149 meml_gotten = SUBL*(iLBCdec_inst->nsub+1-iLBC_encbits->startIdx); 148 meml_gotten = SUBL*(iLBCdec_inst->nsub+1-iLBC_encbits->startIdx);
150 if( meml_gotten > CB_MEML ) { 149 if( meml_gotten > CB_MEML ) {
151 meml_gotten=CB_MEML; 150 meml_gotten=CB_MEML;
152 } 151 }
153 152
154 WebRtcSpl_MemCpyReversedOrder(mem+CB_MEML-1, 153 WebRtcSpl_MemCpyReversedOrder(mem+CB_MEML-1,
155 decresidual+(iLBC_encbits->startIdx-1)*SUBL, m eml_gotten); 154 decresidual+(iLBC_encbits->startIdx-1)*SUBL, m eml_gotten);
156 WebRtcSpl_MemSetW16(mem, 0, (int16_t)(CB_MEML-meml_gotten)); 155 WebRtcSpl_MemSetW16(mem, 0, CB_MEML - meml_gotten);
157 156
158 /* loop over subframes to decode */ 157 /* loop over subframes to decode */
159 158
160 int16_t Nback = iLBC_encbits->startIdx - 1; 159 int16_t Nback = iLBC_encbits->startIdx - 1;
161 for (subframe=0; subframe<Nback; subframe++) { 160 for (subframe=0; subframe<Nback; subframe++) {
162 161
163 /* construct decoded vector */ 162 /* construct decoded vector */
164 WebRtcIlbcfix_CbConstruct( 163 WebRtcIlbcfix_CbConstruct(
165 &reverseDecresidual[subframe*SUBL], 164 &reverseDecresidual[subframe*SUBL],
166 iLBC_encbits->cb_index+subcount*CB_NSTAGES, 165 iLBC_encbits->cb_index+subcount*CB_NSTAGES,
167 iLBC_encbits->gain_index+subcount*CB_NSTAGES, 166 iLBC_encbits->gain_index+subcount*CB_NSTAGES,
168 mem, MEM_LF_TBL, SUBL 167 mem, MEM_LF_TBL, SUBL
169 ); 168 );
170 169
171 /* update memory */ 170 /* update memory */
172 memmove(mem, mem + SUBL, (CB_MEML - SUBL) * sizeof(*mem)); 171 memmove(mem, mem + SUBL, (CB_MEML - SUBL) * sizeof(*mem));
173 WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-SUBL, 172 WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-SUBL,
174 &reverseDecresidual[subframe*SUBL], SUBL); 173 &reverseDecresidual[subframe*SUBL], SUBL);
175 174
176 subcount++; 175 subcount++;
177 } 176 }
178 177
179 /* get decoded residual from reversed vector */ 178 /* get decoded residual from reversed vector */
180 WebRtcSpl_MemCpyReversedOrder(decresidual+SUBL*Nback-1, 179 WebRtcSpl_MemCpyReversedOrder(decresidual+SUBL*Nback-1,
181 reverseDecresidual, SUBL*Nback); 180 reverseDecresidual, SUBL*Nback);
182 } 181 }
183 } 182 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/decode.c ('k') | webrtc/modules/audio_coding/codecs/ilbc/encode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698