latticefilt.c
来自「speech signal process tools」· C语言 代码 · 共 52 行
C
52 行
/*| This material contains proprietary software of Entropic Processing, Inc.| Any reproduction, distribution, or publication without the the prior| written permission of Entropic Processing, Inc. is strictly prohibited.| Any public distribution of copies of this work authorized in writing by| Entropic Processing, Inc. must bear the notice|| "Copyright 1986 Entropic Processing, Inc."|| Written by: S. Shankar Narayan|| Module: latticefilt.c| */#ifdef SCCSstatic char *sccs_id = "@(#)latticefilt.c 1.4 8/20/86 EPI";#endif/* Synthesis filter in ladder form */extern int smooth_int_flag;float lattice_filt (rc, delta_rc, order, lsstate, input)float rc[], delta_rc[], lsstate[], input;int order;{ int i; float output, ki; output = input;/* Vertical code used to make the program run faster */ if (smooth_int_flag) { for (i = order; i > 0; i--) { ki = rc[i - 1]; output += ki * lsstate[i]; lsstate[i + 1] = lsstate[i] - ki * output; rc[i - 1] = ki + delta_rc[i - 1]; } } else { for (i = order; i > 0; i--) { ki = rc[i - 1]; output += ki * lsstate[i]; lsstate[i + 1] = lsstate[i] - ki * output; } } lsstate[1] = output; return (output);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?