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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 (*iLBCdec_inst).consPLICount += 1; | 64 (*iLBCdec_inst).consPLICount += 1; |
65 | 65 |
66 /* if previous frame not lost, | 66 /* if previous frame not lost, |
67 determine pitch pred. gain */ | 67 determine pitch pred. gain */ |
68 | 68 |
69 if (iLBCdec_inst->prevPLI != 1) { | 69 if (iLBCdec_inst->prevPLI != 1) { |
70 | 70 |
71 /* Maximum 60 samples are correlated, preserve as high accuracy | 71 /* Maximum 60 samples are correlated, preserve as high accuracy |
72 as possible without getting overflow */ | 72 as possible without getting overflow */ |
73 max = WebRtcSpl_MaxAbsValueW16((*iLBCdec_inst).prevResidual, (int16_t)iLBC
dec_inst->blockl); | 73 max = WebRtcSpl_MaxAbsValueW16((*iLBCdec_inst).prevResidual, |
| 74 (int16_t)iLBCdec_inst->blockl); |
74 scale3 = (WebRtcSpl_GetSizeInBits(max)<<1) - 25; | 75 scale3 = (WebRtcSpl_GetSizeInBits(max)<<1) - 25; |
75 if (scale3 < 0) { | 76 if (scale3 < 0) { |
76 scale3 = 0; | 77 scale3 = 0; |
77 } | 78 } |
78 | 79 |
79 /* Store scale for use when interpolating between the | 80 /* Store scale for use when interpolating between the |
80 * concealment and the received packet */ | 81 * concealment and the received packet */ |
81 iLBCdec_inst->prevScale = scale3; | 82 iLBCdec_inst->prevScale = scale3; |
82 | 83 |
83 /* Search around the previous lag +/-3 to find the | 84 /* Search around the previous lag +/-3 to find the |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 iLBCdec_inst->consPLICount = 0; | 295 iLBCdec_inst->consPLICount = 0; |
295 } | 296 } |
296 | 297 |
297 /* update state */ | 298 /* update state */ |
298 iLBCdec_inst->prevPLI = PLI; | 299 iLBCdec_inst->prevPLI = PLI; |
299 WEBRTC_SPL_MEMCPY_W16(iLBCdec_inst->prevLpc, PLClpc, (LPC_FILTERORDER+1)); | 300 WEBRTC_SPL_MEMCPY_W16(iLBCdec_inst->prevLpc, PLClpc, (LPC_FILTERORDER+1)); |
300 WEBRTC_SPL_MEMCPY_W16(iLBCdec_inst->prevResidual, PLCresidual, iLBCdec_inst->b
lockl); | 301 WEBRTC_SPL_MEMCPY_W16(iLBCdec_inst->prevResidual, PLCresidual, iLBCdec_inst->b
lockl); |
301 | 302 |
302 return; | 303 return; |
303 } | 304 } |
OLD | NEW |