📄 extendrc.c
字号:
/*| 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: extendrc.c| */#ifdef SCCSstatic char *sccs_id = "@(#)extendrc.c 1.4 8/20/86 EPI";#endifextend_rc (rc, window_size, inp_order, out_order)int inp_order, out_order, window_size;float rc[];{ double r[100], sin (), w; float state[100], nrc[100], drc[100], a[100], num[100]; float fowrd_filter (), gain; int i; for (i = 1; i <= inp_order; i++) { state[i] = 0.0; nrc[i] = -rc[i - 1]; drc[i] = rc[i - 1]; } rctoc (drc, inp_order, a, &gain); rctoc (nrc, inp_order, num, &gain); r[0] = 1.0; num[0] = r[0] / 2.0; for (i = 1; i <= inp_order; i++) num[i] = -0.5 * r[0] * num[i]; for (i = inp_order + 1; i <= out_order; i++) num[i] = 0; for (i = 0; i <= out_order; i++) r[i] = fowrd_filter (a, state, inp_order, num[i]); r[0] = 2.0 * r[0];/* Multiplication of auto-correlation by sin(x)/(x) function */ w = 3.141592654 / window_size; for (i = 1; i <= out_order; i++) r[i] = r[i] * sin (w * i) / (w * i); get_atal (r, out_order, a, rc, &gain); for (i = 1; i <= out_order; i++) rc[i - 1] = rc[i];}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -