📄 residu.c
字号:
/*********************************************************************************** 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -