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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 for (i=0;i<HALF_SUBFRAMELEN;i++) | 272 for (i=0;i<HALF_SUBFRAMELEN;i++) |
273 { | 273 { |
274 | 274 |
275 tmp32 = lat_inQ25[i + temp1] << 1; // Q25->Q26 | 275 tmp32 = lat_inQ25[i + temp1] << 1; // Q25->Q26 |
276 tmp32 = WEBRTC_SPL_MUL_16_32_RSFT16(inv_gain16, tmp32); //lat_in[]*inv_gai
n in (Q(18-sh)*Q26)>>16 = Q(28-sh) | 276 tmp32 = WEBRTC_SPL_MUL_16_32_RSFT16(inv_gain16, tmp32); //lat_in[]*inv_gai
n in (Q(18-sh)*Q26)>>16 = Q(28-sh) |
277 tmp32 = WEBRTC_SPL_SHIFT_W32(tmp32, -(28-sh)); // lat_in[]*inv_gain in Q0 | 277 tmp32 = WEBRTC_SPL_SHIFT_W32(tmp32, -(28-sh)); // lat_in[]*inv_gain in Q0 |
278 | 278 |
279 ARfQ0vec[i] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 | 279 ARfQ0vec[i] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 |
280 } | 280 } |
281 | 281 |
282 for (i=orderCoef;i>0;i--) //get the state of f&g for the first input, for al
l orders | 282 // Get the state of f & g for the first input, for all orders. |
| 283 for (i = orderCoef; i > 0; i--) |
283 { | 284 { |
284 tmp32 = (cthQ15[i - 1] * ARfQ0vec[0] - sthQ15[i - 1] * stateGQ0[i - 1] + | 285 tmp32 = (cthQ15[i - 1] * ARfQ0vec[0] - sthQ15[i - 1] * stateGQ0[i - 1] + |
285 16384) >> 15; | 286 16384) >> 15; |
286 tmpAR = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 | 287 tmpAR = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 |
287 | 288 |
288 tmp32 = (sthQ15[i - 1] * ARfQ0vec[0] + cthQ15[i - 1] * stateGQ0[i - 1] + | 289 tmp32 = (sthQ15[i - 1] * ARfQ0vec[0] + cthQ15[i - 1] * stateGQ0[i - 1] + |
289 16384) >> 15; | 290 16384) >> 15; |
290 ARgQ0vec[i] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 | 291 ARgQ0vec[i] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 |
291 ARfQ0vec[0] = tmpAR; | 292 ARfQ0vec[0] = tmpAR; |
292 } | 293 } |
(...skipping 11 matching lines...) Expand all Loading... |
304 /* cannot use memcpy in the following */ | 305 /* cannot use memcpy in the following */ |
305 | 306 |
306 for (i=0;i<ord_1;i++) | 307 for (i=0;i<ord_1;i++) |
307 { | 308 { |
308 stateGQ0[i] = ARgQ0vec[i]; | 309 stateGQ0[i] = ARgQ0vec[i]; |
309 } | 310 } |
310 } | 311 } |
311 | 312 |
312 return; | 313 return; |
313 } | 314 } |
OLD | NEW |