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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 WebRtcSpl_MemSetW16(iLBCdec_inst->hpimemy, 0, 4); | 329 WebRtcSpl_MemSetW16(iLBCdec_inst->hpimemy, 0, 4); |
330 WebRtcSpl_MemSetW16(iLBCdec_inst->hpimemx, 0, 2); | 330 WebRtcSpl_MemSetW16(iLBCdec_inst->hpimemx, 0, 2); |
331 | 331 |
332 /* Initialize filter memory by filtering through 2 lags */ | 332 /* Initialize filter memory by filtering through 2 lags */ |
333 WEBRTC_SPL_MEMCPY_W16(&synt[-LPC_FILTERORDER], iLBCdec_inst->syntMem, | 333 WEBRTC_SPL_MEMCPY_W16(&synt[-LPC_FILTERORDER], iLBCdec_inst->syntMem, |
334 LPC_FILTERORDER); | 334 LPC_FILTERORDER); |
335 WebRtcSpl_FilterARFastQ12( | 335 WebRtcSpl_FilterARFastQ12( |
336 enh_bufPtr1, | 336 enh_bufPtr1, |
337 synt, | 337 synt, |
338 &iLBCdec_inst->old_syntdenum[ | 338 &iLBCdec_inst->old_syntdenum[ |
339 (iLBCdec_inst->nsub-1)*(LPC_FILTERORDER+1
)], | 339 (iLBCdec_inst->nsub-1)*(LPC_FILTERORDER+1)], |
340 LPC_FILTERORDER+1, lag); | 340 LPC_FILTERORDER+1, lag); |
341 | 341 |
342 WEBRTC_SPL_MEMCPY_W16(&synt[-LPC_FILTERORDER], &synt[lag-LPC_FILTERORDER], | 342 WEBRTC_SPL_MEMCPY_W16(&synt[-LPC_FILTERORDER], &synt[lag-LPC_FILTERORDER], |
343 LPC_FILTERORDER); | 343 LPC_FILTERORDER); |
344 WebRtcIlbcfix_HpOutput(synt, (int16_t*)WebRtcIlbcfix_kHpOutCoefs, | 344 WebRtcIlbcfix_HpOutput(synt, (int16_t*)WebRtcIlbcfix_kHpOutCoefs, |
345 iLBCdec_inst->hpimemy, iLBCdec_inst->hpimemx, | 345 iLBCdec_inst->hpimemy, iLBCdec_inst->hpimemx, |
346 (int16_t)lag); | 346 (int16_t)lag); |
347 WebRtcSpl_FilterARFastQ12( | 347 WebRtcSpl_FilterARFastQ12( |
348 enh_bufPtr1, synt, | 348 enh_bufPtr1, synt, |
349 &iLBCdec_inst->old_syntdenum[ | 349 &iLBCdec_inst->old_syntdenum[ |
350 (iLBCdec_inst->nsub-1)*(LPC_FILTERORDER+1
)], | 350 (iLBCdec_inst->nsub-1)*(LPC_FILTERORDER+1)], |
351 LPC_FILTERORDER+1, lag); | 351 LPC_FILTERORDER+1, lag); |
352 | 352 |
353 WEBRTC_SPL_MEMCPY_W16(iLBCdec_inst->syntMem, &synt[lag-LPC_FILTERORDER], | 353 WEBRTC_SPL_MEMCPY_W16(iLBCdec_inst->syntMem, &synt[lag-LPC_FILTERORDER], |
354 LPC_FILTERORDER); | 354 LPC_FILTERORDER); |
355 WebRtcIlbcfix_HpOutput(synt, (int16_t*)WebRtcIlbcfix_kHpOutCoefs, | 355 WebRtcIlbcfix_HpOutput(synt, (int16_t*)WebRtcIlbcfix_kHpOutCoefs, |
356 iLBCdec_inst->hpimemy, iLBCdec_inst->hpimemx, | 356 iLBCdec_inst->hpimemy, iLBCdec_inst->hpimemx, |
357 (int16_t)lag); | 357 (int16_t)lag); |
358 } | 358 } |
359 } | 359 } |
360 | 360 |
361 | 361 |
362 /* Perform enhancement block by block */ | 362 /* Perform enhancement block by block */ |
363 | 363 |
364 for (iblock = 0; iblock<new_blocks; iblock++) { | 364 for (iblock = 0; iblock<new_blocks; iblock++) { |
365 WebRtcIlbcfix_Enhancer(out + iblock * ENH_BLOCKL, | 365 WebRtcIlbcfix_Enhancer(out + iblock * ENH_BLOCKL, |
366 enh_buf, | 366 enh_buf, |
367 ENH_BUFL, | 367 ENH_BUFL, |
368 (int16_t)(iblock * ENH_BLOCKL + startPos), | 368 (int16_t)(iblock * ENH_BLOCKL + startPos), |
369 enh_period, | 369 enh_period, |
370 (int16_t*)WebRtcIlbcfix_kEnhPlocs, ENH_NBLOCKS_TOT); | 370 (int16_t*)WebRtcIlbcfix_kEnhPlocs, ENH_NBLOCKS_TOT); |
371 } | 371 } |
372 | 372 |
373 return (lag); | 373 return (lag); |
374 } | 374 } |
OLD | NEW |