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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 (int16_t)(inLen / 2), | 103 (int16_t)(inLen / 2), |
104 (int16_t*)WebRtcIlbcfix_kLpFiltCoefs, /* Coefficients in Q12 */ | 104 (int16_t*)WebRtcIlbcfix_kLpFiltCoefs, /* Coefficients in Q12 */ |
105 FILTERORDER_DS_PLUS1, /* Length of filter (order-1) */ | 105 FILTERORDER_DS_PLUS1, /* Length of filter (order-1) */ |
106 FACTOR_DS, | 106 FACTOR_DS, |
107 DELAY_DS); | 107 DELAY_DS); |
108 | 108 |
109 /* Estimate the pitch in the down sampled domain. */ | 109 /* Estimate the pitch in the down sampled domain. */ |
110 for(iblock = 0; iblock<new_blocks; iblock++){ | 110 for(iblock = 0; iblock<new_blocks; iblock++){ |
111 | 111 |
112 /* references */ | 112 /* references */ |
113 i = 60 + iblock * ENH_BLOCKL_HALF; | 113 target = downsampled + 60 + iblock * ENH_BLOCKL_HALF; |
114 target=downsampled+i; | 114 regressor = target - 10; |
115 regressor=downsampled+i-10; | |
116 | 115 |
117 /* scaling */ | 116 /* scaling */ |
118 max16=WebRtcSpl_MaxAbsValueW16(®ressor[-50], | 117 max16=WebRtcSpl_MaxAbsValueW16(®ressor[-50], |
119 (int16_t)(ENH_BLOCKL_HALF+50-1)); | 118 (int16_t)(ENH_BLOCKL_HALF+50-1)); |
120 shifts = WebRtcSpl_GetSizeInBits((uint32_t)(max16 * max16)) - 25; | 119 shifts = WebRtcSpl_GetSizeInBits((uint32_t)(max16 * max16)) - 25; |
121 shifts = WEBRTC_SPL_MAX(0, shifts); | 120 shifts = WEBRTC_SPL_MAX(0, shifts); |
122 | 121 |
123 /* compute cross correlation */ | 122 /* compute cross correlation */ |
124 WebRtcSpl_CrossCorrelation(corr32, target, regressor, ENH_BLOCKL_HALF, 50, | 123 WebRtcSpl_CrossCorrelation(corr32, target, regressor, ENH_BLOCKL_HALF, 50, |
125 shifts, -1); | 124 shifts, -1); |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 WebRtcIlbcfix_Enhancer(out + iblock * ENH_BLOCKL, | 366 WebRtcIlbcfix_Enhancer(out + iblock * ENH_BLOCKL, |
368 enh_buf, | 367 enh_buf, |
369 ENH_BUFL, | 368 ENH_BUFL, |
370 (int16_t)(iblock * ENH_BLOCKL + startPos), | 369 (int16_t)(iblock * ENH_BLOCKL + startPos), |
371 enh_period, | 370 enh_period, |
372 (int16_t*)WebRtcIlbcfix_kEnhPlocs, ENH_NBLOCKS_TOT); | 371 (int16_t*)WebRtcIlbcfix_kEnhPlocs, ENH_NBLOCKS_TOT); |
373 } | 372 } |
374 | 373 |
375 return (lag); | 374 return (lag); |
376 } | 375 } |
OLD | NEW |