ref: 0fa7b89f354773ce830f6bda12c8c27d2ad8b1d9
dir: /amr-wb/weight_a.c/
/*-------------------------------------------------------------------* * WB_VAD.C * *-------------------------------------------------------------------* * Weighting of LPC coefficients. * * ap[i] = a[i] * (gamma ** i) * *-------------------------------------------------------------------*/ #include "typedef.h" #include "acelp.h" #include "basic_op.h" #include "count.h" void Weight_a( Word16 a[], /* (i) Q12 : a[m+1] LPC coefficients */ Word16 ap[], /* (o) Q12 : Spectral expanded LPC coefficients */ Word16 gamma, /* (i) Q15 : Spectral expansion factor. */ Word16 m /* (i) : LPC order. */ ) { Word16 i, fac; ap[0] = a[0]; move16(); fac = gamma; move16(); for (i = 1; i < m; i++) { ap[i] = roundL(L_mult(a[i], fac)); move16(); fac = roundL(L_mult(fac, gamma)); } ap[m] = roundL(L_mult(a[m], fac)); move16(); return; }