| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 int16_t *index, /* (o) Codebook indices */ | 39 int16_t *index, /* (o) Codebook indices */ |
| 40 int16_t *gain_index, /* (o) Gain quantization indices */ | 40 int16_t *gain_index, /* (o) Gain quantization indices */ |
| 41 int16_t *intarget, /* (i) Target vector for encoding */ | 41 int16_t *intarget, /* (i) Target vector for encoding */ |
| 42 int16_t *decResidual,/* (i) Decoded residual for codebook construction */ | 42 int16_t *decResidual,/* (i) Decoded residual for codebook construction */ |
| 43 int16_t lMem, /* (i) Length of buffer */ | 43 int16_t lMem, /* (i) Length of buffer */ |
| 44 int16_t lTarget, /* (i) Length of vector */ | 44 int16_t lTarget, /* (i) Length of vector */ |
| 45 int16_t *weightDenum,/* (i) weighting filter coefficients in Q12 */ | 45 int16_t *weightDenum,/* (i) weighting filter coefficients in Q12 */ |
| 46 int16_t block /* (i) the subblock number */ | 46 int16_t block /* (i) the subblock number */ |
| 47 ) { | 47 ) { |
| 48 int16_t i, j, stage, range; | 48 int16_t i, j, stage, range; |
| 49 int16_t *pp; | 49 int16_t *pp, scale, tmp; |
| 50 int16_t tmp; | |
| 51 int scale; | |
| 52 int16_t bits, temp1, temp2; | 50 int16_t bits, temp1, temp2; |
| 53 int16_t base_size; | 51 int16_t base_size; |
| 54 int32_t codedEner, targetEner; | 52 int32_t codedEner, targetEner; |
| 55 int16_t gains[CB_NSTAGES+1]; | 53 int16_t gains[CB_NSTAGES+1]; |
| 56 int16_t *cb_vecPtr; | 54 int16_t *cb_vecPtr; |
| 57 int16_t indexOffset, sInd, eInd; | 55 int16_t indexOffset, sInd, eInd; |
| 58 int32_t CritMax=0; | 56 int32_t CritMax=0; |
| 59 int16_t shTotMax=WEBRTC_SPL_WORD16_MIN; | 57 int16_t shTotMax=WEBRTC_SPL_WORD16_MIN; |
| 60 int16_t bestIndex=0; | 58 int16_t bestIndex=0; |
| 61 int16_t bestGain=0; | 59 int16_t bestGain=0; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 j=i; | 386 j=i; |
| 389 WebRtcIlbcfix_kGainSq5_ptr = (int16_t*)&WebRtcIlbcfix_kGainSq5[i]; | 387 WebRtcIlbcfix_kGainSq5_ptr = (int16_t*)&WebRtcIlbcfix_kGainSq5[i]; |
| 390 } | 388 } |
| 391 } | 389 } |
| 392 gainPtr++; | 390 gainPtr++; |
| 393 } | 391 } |
| 394 gain_index[0]=j; | 392 gain_index[0]=j; |
| 395 | 393 |
| 396 return; | 394 return; |
| 397 } | 395 } |
| OLD | NEW |