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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 /* Run the Zero-Pole filter (Ciurcular convolution) */ | 65 /* Run the Zero-Pole filter (Ciurcular convolution) */ |
66 WebRtcSpl_MemSetW16(residualLongVec, 0, LPC_FILTERORDER); | 66 WebRtcSpl_MemSetW16(residualLongVec, 0, LPC_FILTERORDER); |
67 WebRtcSpl_FilterMAFastQ12( | 67 WebRtcSpl_FilterMAFastQ12( |
68 residualLong, sampleMa, | 68 residualLong, sampleMa, |
69 numerator, LPC_FILTERORDER+1, (int16_t)(iLBCenc_inst->state_short_len + LP
C_FILTERORDER)); | 69 numerator, LPC_FILTERORDER+1, (int16_t)(iLBCenc_inst->state_short_len + LP
C_FILTERORDER)); |
70 WebRtcSpl_MemSetW16(&sampleMa[iLBCenc_inst->state_short_len + LPC_FILTERORDER]
, 0, iLBCenc_inst->state_short_len - LPC_FILTERORDER); | 70 WebRtcSpl_MemSetW16(&sampleMa[iLBCenc_inst->state_short_len + LPC_FILTERORDER]
, 0, iLBCenc_inst->state_short_len - LPC_FILTERORDER); |
71 | 71 |
72 WebRtcSpl_FilterARFastQ12( | 72 WebRtcSpl_FilterARFastQ12( |
73 sampleMa, sampleAr, | 73 sampleMa, sampleAr, |
74 syntDenum, LPC_FILTERORDER+1, (int16_t)(2*iLBCenc_inst->state_short_len)); | 74 syntDenum, LPC_FILTERORDER+1, 2 * iLBCenc_inst->state_short_len); |
75 | 75 |
76 for(k=0;k<iLBCenc_inst->state_short_len;k++){ | 76 for(k=0;k<iLBCenc_inst->state_short_len;k++){ |
77 sampleAr[k] += sampleAr[k+iLBCenc_inst->state_short_len]; | 77 sampleAr[k] += sampleAr[k+iLBCenc_inst->state_short_len]; |
78 } | 78 } |
79 | 79 |
80 /* Find maximum absolute value in the vector */ | 80 /* Find maximum absolute value in the vector */ |
81 maxVal=WebRtcSpl_MaxAbsValueW16(sampleAr, iLBCenc_inst->state_short_len); | 81 maxVal=WebRtcSpl_MaxAbsValueW16(sampleAr, iLBCenc_inst->state_short_len); |
82 | 82 |
83 /* Find the best index */ | 83 /* Find the best index */ |
84 | 84 |
(...skipping 25 matching lines...) Expand all Loading... |
110 | 110 |
111 /* Set up vectors for AbsQuant and rescale it with the scale factor */ | 111 /* Set up vectors for AbsQuant and rescale it with the scale factor */ |
112 WebRtcSpl_ScaleVectorWithSat(sampleAr, sampleAr, scale, | 112 WebRtcSpl_ScaleVectorWithSat(sampleAr, sampleAr, scale, |
113 iLBCenc_inst->state_short_len, (int16_t)(shift-sca
leRes)); | 113 iLBCenc_inst->state_short_len, (int16_t)(shift-sca
leRes)); |
114 | 114 |
115 /* Quantize the values in fout[] */ | 115 /* Quantize the values in fout[] */ |
116 WebRtcIlbcfix_AbsQuant(iLBCenc_inst, iLBC_encbits, sampleAr, weightDenum); | 116 WebRtcIlbcfix_AbsQuant(iLBCenc_inst, iLBC_encbits, sampleAr, weightDenum); |
117 | 117 |
118 return; | 118 return; |
119 } | 119 } |
OLD | NEW |