www.pudn.com > AVS_M_ver10.rar > int_lpc.c
/*
***********************************************************************
* COPYRIGHT AND WARRANTY INFORMATION
*
* Copyright 2007 Audio Video Coding Standard, Part ¢ú
*
* This software module was developed by AVS Audio sub-group
*
* DISCLAIMER OF WARRANTY
*
* These software programs are available to the users without any
* license fee or royalty on an "as is" basis. The AVS disclaims
* any and all warranties, whether express, implied, or statutory,
* including any implied warranties of merchantability or of fitness
* for a particular purpose. In no event shall the contributors or
* the AVS be liable for any incidental, punitive, or consequential
* damages of any kind whatsoever arising from the use of this program.
*
* This disclaimer of warranty extends to the user of this program
* and user's customers, employees, agents, transferees, successors,
* and assigns.
*
* The AVS does not represent or warrant that the program furnished
* hereunder are free of infringement of any third-party patents.
* Commercial implementations of AVS, including shareware, may be
* subject to royalty fees to patent holders. Information regarding
* the AVS patent policy is available from the AVS Web site at
* http://www.avs.org.cn
*
* THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE AVS PATENT POLICY.
************************************************************************
*/
/*---------------------------------------------------------------------*
* routine int_lpc() *
* ~~~~~~~~~~~~~~~~~ *
* Find the interpolated LPC parameters in every subframes. *
*---------------------------------------------------------------------*/
#include "../include/amr_plus.h"
void int_lpc_np1(
float isf_old[], /* input : LSFs from past frame */
float isf_new[], /* input : LSFs from present frame */
float a[], /* output: LP coefficients in both subframes */
int nb_subfr, /* input: number of subframe */
int m /* input : order of LP filter */
)
{
float isf[M], inc, fnew, fold, *p_a;
int i, k;
inc = 1.0f / (float)nb_subfr;
p_a = a;
fnew = 0.0f;
for (k=0; k<nb_subfr; k++)
{
fold = 1.0f - fnew;
for (i = 0; i < m; i++) {
isf[i] = isf_old[i]*fold + isf_new[i]*fnew;
}
fnew += inc;
E_LPC_f_isp_a_conversion(isf, p_a, m);
p_a += (m+1);
}
/* estimated coef for next subframe: use isf_new */
E_LPC_f_isp_a_conversion(isf_new, p_a, m);
return;
}