confg.c
上传用户:szhypcb168
上传日期:2007-01-06
资源大小:2187k
文件大小:2k
- /**************************************************************************
- *
- * ROUTINE
- * confg
- *
- * FUNCTION
- * computes initial states (direct form filters)
- *
- * SYNOPSIS
- *
- * subroutine confg(s,l,d1,d2,d3,d4,isw1,isw2,isw3,isw4)
- *
- * formal
- *
- * data I/O
- * name type type function
- * -------------------------------------------------------------------
- * s(l) float i speech or residual segment
- * l int i segment size
- * d1 float i/o memory 1/P(z)
- * d2 float i/o memory 1/A(z)
- * d3 float i/o memory A(z)
- * d4 float i/o memory 1/A(z/gamma)
- * isw1 int i = 1 enable 1/P(z)
- * isw2 int i = 1 enable 1/A(z)
- * isw3 int i = 1 enable A(z)
- * isw4 int i = 1 enable 1/A(z/gamma)
- *
- * external
- * data I/O
- * name type type function
- * -------------------------------------------------------------------
- * idb i
- * no i
- * bb[] i
- * e0[] i/o
- * fc[] i
- * gamma2 i
- *
- ***************************************************************************
- *
- * CALLED BY
- *
- * csub fndpp
- *
- * CALLS
- *
- * bwexp zerofilt polefilt pitchvq
- *
- **************************************************************************/
- #include "ccsub.h"
- extern int idb, no;
- extern float bb[MAXNP+1], e0[MAXLP], fc[MAXNO+1], gamma2;
- confg(s,l,d1,d2,d3,d4,isw1,isw2,isw3,isw4)
- int l, isw1, isw2, isw3, isw4;
- float s[], d1[],d2[],d3[],d4[];
- {
- float fctemp[MAXNO+1];
- int i;
- setr(MAXNO+1, 0.0, fctemp);
- if (isw1 != 0)
- pitchvq(e0, l, d1, idb, bb, "long");
- if (isw2 != 0)
- polefilt(fc, no, d2, e0, l);
- for (i = 0; i < l; i++)
- e0[i] = s[i] - e0[i];
- if (isw3 != 0)
- zerofilt(fc,no,d3,e0,l);
- if (isw4 != 0)
- {
- bwexp(gamma2, fc, fctemp, no);
- polefilt(fctemp, no, d4, e0, l);
- }
- }