residu.c

来自「Trolltech公司发布的图形界面操作系统。可在qt-embedded-2.3」· C语言 代码 · 共 75 行

C
75
字号
/***********************************************************************************      GSM AMR-NB speech codec   R98   Version 7.6.0   December 12, 2001*                                R99   Version 3.3.0                *                                REL-4 Version 4.1.0                ***********************************************************************************      File             : residu.c*      Purpose          : Computes the LP residual.*      Description      : The LP residual is computed by filtering the input*                       : speech through the LP inverse filter A(z).**********************************************************************************//**********************************************************************************                         MODULE INCLUDE FILE AND VERSION ID*********************************************************************************/#include "residu.h"const char residu_id[] = "@(#)$Id $" residu_h;/**********************************************************************************                         INCLUDE FILES*********************************************************************************/#include "typedef.h"#include "basic_op.h"#include "count.h"#include "cnst.h"/**********************************************************************************                         LOCAL VARIABLES AND TABLES*********************************************************************************//**--------------------------------------** Constants (defined in cnst.h         **--------------------------------------**  M         : LPC order               **--------------------------------------**//**********************************************************************************                         PUBLIC PROGRAM CODE*********************************************************************************/void Residu (    Word16 a[], /* (i)     : prediction coefficients                      */    Word16 x[], /* (i)     : speech signal                                */    Word16 y[], /* (o)     : residual signal                              */    Word16 lg   /* (i)     : size of filtering                            */){    Word16 i, j;    Word32 s;    for (i = 0; i < lg; i++)    {        s = L_mult (x[i], a[0]);        for (j = 1; j <= M; j++)        {            s = L_mac (s, a[j], x[i - j]);        }        s = L_shl (s, 3);        y[i] = round (s);       move16 ();     }    return;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?