www.pudn.com > g729AnnexA.rar > PRED_LT3.C
/* ITU-T G.729 Software Package Release 2 (November 2006) */
/*
ITU-T G.729A Speech Coder ANSI-C Source Code
Version 1.1 Last modified: September 1996
Copyright (c) 1996,
AT&T, France Telecom, NTT, Universite de Sherbrooke
All rights reserved.
*/
/*-------------------------------------------------------------------*
* Function Pred_lt_3() *
* ~~~~~~~~~~~ *
*-------------------------------------------------------------------*
* Compute the result of long term prediction with fractional *
* interpolation of resolution 1/3. *
* *
* On return exc[0..L_subfr-1] contains the interpolated signal *
* (adaptive codebook excitation) *
*-------------------------------------------------------------------*/
#include "typedef.h"
#include "basic_op.h"
#include "ld8a.h"
#include "tab_ld8a.h"
void Pred_lt_3(
Word16 exc[], /* in/out: excitation buffer */
Word16 T0, /* input : integer pitch lag */
Word16 frac, /* input : fraction of lag */
Word16 L_subfr /* input : subframe size */
)
{
Word16 i, j, k;
Word16 *x0, *x1, *x2, *c1, *c2;
Word32 s;
x0 = &exc[-T0];
frac = negate(frac);
if (frac < 0)
{
frac = add(frac, UP_SAMP);
x0--;
}
for (j=0; j