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

Side by Side Diff: webrtc/modules/audio_coding/codecs/ilbc/encode.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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 &syntdenum[(iLBCbits_inst->startIdx-1)*(LPC_FIL TERORDER+1)], 186 &syntdenum[(iLBCbits_inst->startIdx-1)*(LPC_FIL TERORDER+1)],
187 &decresidual[start_pos], iLBCenc_inst->state_sh ort_len 187 &decresidual[start_pos], iLBCenc_inst->state_sh ort_len
188 ); 188 );
189 189
190 /* predictive quantization in state */ 190 /* predictive quantization in state */
191 191
192 if (iLBCbits_inst->state_first) { /* put adaptive part in the end */ 192 if (iLBCbits_inst->state_first) { /* put adaptive part in the end */
193 193
194 /* setup memory */ 194 /* setup memory */
195 195
196 WebRtcSpl_MemSetW16(mem, 0, (int16_t)(CB_MEML-iLBCenc_inst->state_short_le n)); 196 WebRtcSpl_MemSetW16(mem, 0, CB_MEML - iLBCenc_inst->state_short_len);
197 WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-iLBCenc_inst->state_short_len, 197 WEBRTC_SPL_MEMCPY_W16(mem+CB_MEML-iLBCenc_inst->state_short_len,
198 decresidual+start_pos, iLBCenc_inst->state_short_len ); 198 decresidual+start_pos, iLBCenc_inst->state_short_len );
199 199
200 /* encode subframes */ 200 /* encode subframes */
201 201
202 WebRtcIlbcfix_CbSearch(iLBCenc_inst, iLBCbits_inst->cb_index, iLBCbits_ins t->gain_index, 202 WebRtcIlbcfix_CbSearch(iLBCenc_inst, iLBCbits_inst->cb_index, iLBCbits_ins t->gain_index,
203 &residual[start_pos+iLBCenc_inst->state_short_len], 203 &residual[start_pos+iLBCenc_inst->state_short_len],
204 mem+CB_MEML-ST_MEM_L_TBL, ST_MEM_L_TBL, diff, 204 mem+CB_MEML-ST_MEM_L_TBL, ST_MEM_L_TBL, diff,
205 &weightdenum[iLBCbits_inst->startIdx*(LPC_FILTERORD ER+1)], 0); 205 &weightdenum[iLBCbits_inst->startIdx*(LPC_FILTERORD ER+1)], 0);
206 206
(...skipping 10 matching lines...) Expand all
217 217
218 /* create reversed vectors for prediction */ 218 /* create reversed vectors for prediction */
219 219
220 WebRtcSpl_MemCpyReversedOrder(&reverseResidual[diff-1], 220 WebRtcSpl_MemCpyReversedOrder(&reverseResidual[diff-1],
221 &residual[(iLBCbits_inst->startIdx+1)*SUBL-S TATE_LEN], diff); 221 &residual[(iLBCbits_inst->startIdx+1)*SUBL-S TATE_LEN], diff);
222 222
223 /* setup memory */ 223 /* setup memory */
224 224
225 meml_gotten = iLBCenc_inst->state_short_len; 225 meml_gotten = iLBCenc_inst->state_short_len;
226 WebRtcSpl_MemCpyReversedOrder(&mem[CB_MEML-1], &decresidual[start_pos], me ml_gotten); 226 WebRtcSpl_MemCpyReversedOrder(&mem[CB_MEML-1], &decresidual[start_pos], me ml_gotten);
227 WebRtcSpl_MemSetW16(mem, 0, (int16_t)(CB_MEML-iLBCenc_inst->state_short_le n)); 227 WebRtcSpl_MemSetW16(mem, 0, CB_MEML - iLBCenc_inst->state_short_len);
228 228
229 /* encode subframes */ 229 /* encode subframes */
230 WebRtcIlbcfix_CbSearch(iLBCenc_inst, iLBCbits_inst->cb_index, iLBCbits_ins t->gain_index, 230 WebRtcIlbcfix_CbSearch(iLBCenc_inst, iLBCbits_inst->cb_index, iLBCbits_ins t->gain_index,
231 reverseResidual, mem+CB_MEML-ST_MEM_L_TBL, ST_MEM_L _TBL, diff, 231 reverseResidual, mem+CB_MEML-ST_MEM_L_TBL, ST_MEM_L _TBL, diff,
232 &weightdenum[(iLBCbits_inst->startIdx-1)*(LPC_FILTE RORDER+1)], 232 &weightdenum[(iLBCbits_inst->startIdx-1)*(LPC_FILTE RORDER+1)],
233 0); 233 0);
234 234
235 /* construct decoded vector */ 235 /* construct decoded vector */
236 236
237 WebRtcIlbcfix_CbConstruct(reverseDecresidual, 237 WebRtcIlbcfix_CbConstruct(reverseDecresidual,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 WebRtcSpl_MemCpyReversedOrder(&reverseResidual[Nback*SUBL-1], residual, Nbac k*SUBL); 390 WebRtcSpl_MemCpyReversedOrder(&reverseResidual[Nback*SUBL-1], residual, Nbac k*SUBL);
391 391
392 /* setup memory */ 392 /* setup memory */
393 393
394 meml_gotten = SUBL*(iLBCenc_inst->nsub+1-iLBCbits_inst->startIdx); 394 meml_gotten = SUBL*(iLBCenc_inst->nsub+1-iLBCbits_inst->startIdx);
395 if( meml_gotten > CB_MEML ) { 395 if( meml_gotten > CB_MEML ) {
396 meml_gotten=CB_MEML; 396 meml_gotten=CB_MEML;
397 } 397 }
398 398
399 WebRtcSpl_MemCpyReversedOrder(&mem[CB_MEML-1], &decresidual[Nback*SUBL], mem l_gotten); 399 WebRtcSpl_MemCpyReversedOrder(&mem[CB_MEML-1], &decresidual[Nback*SUBL], mem l_gotten);
400 WebRtcSpl_MemSetW16(mem, 0, (int16_t)(CB_MEML-meml_gotten)); 400 WebRtcSpl_MemSetW16(mem, 0, CB_MEML - meml_gotten);
401 401
402 #ifdef SPLIT_10MS 402 #ifdef SPLIT_10MS
403 if (iLBCenc_inst->Nback_flag > 0) 403 if (iLBCenc_inst->Nback_flag > 0)
404 { 404 {
405 for (subframe = 0; subframe < WEBRTC_SPL_MAX (2 - Nfor, 0); subframe++) 405 for (subframe = 0; subframe < WEBRTC_SPL_MAX (2 - Nfor, 0); subframe++)
406 { 406 {
407 /* update memory */ 407 /* update memory */
408 WEBRTC_SPL_MEMCPY_W16 (mem, mem + SUBL, (CB_MEML - SUBL)); 408 WEBRTC_SPL_MEMCPY_W16 (mem, mem + SUBL, (CB_MEML - SUBL));
409 WEBRTC_SPL_MEMCPY_W16 (mem + CB_MEML - SUBL, 409 WEBRTC_SPL_MEMCPY_W16 (mem + CB_MEML - SUBL,
410 &reverseDecresidual[subframe * SUBL], SUBL); 410 &reverseDecresidual[subframe * SUBL], SUBL);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } 509 }
510 else 510 else
511 { 511 {
512 iLBCenc_inst->section++; 512 iLBCenc_inst->section++;
513 WEBRTC_SPL_MEMCPY_W16 (weightdenumbuf, weightdenum, 513 WEBRTC_SPL_MEMCPY_W16 (weightdenumbuf, weightdenum,
514 SCRATCH_ENCODE_DATAVEC - SCRATCH_ENCODE_WEIGHTDENUM); 514 SCRATCH_ENCODE_DATAVEC - SCRATCH_ENCODE_WEIGHTDENUM);
515 } 515 }
516 #endif 516 #endif
517 517
518 } 518 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698