33 int j, k, n, memInd, sFilt;
41 base_size=lMem-cbveclen+1;
44 base_size+=cbveclen/2;
49 if (index<lMem-cbveclen+1) {
55 memcpy(cbvec, mem+lMem-k, cbveclen*
sizeof(
float));
57 }
else if (index < base_size) {
59 k=2*(index-(lMem-cbveclen+1))+cbveclen;
66 memcpy(cbvec, mem+lMem-k/2, ilow*
sizeof(
float));
72 for (j=ilow; j<ihigh; j++) {
73 cbvec[j]=((float)1.0-alfa)*mem[lMem-k/2+j]+
85 memcpy(cbvec+ihigh, mem+lMem-k+ihigh,
86 (cbveclen-ihigh)*
sizeof(
float));
96 if (index-base_size<lMem-cbveclen+1) {
105 memset(&tempbuff2[lMem+CB_HALFFILTERLEN], 0,
106 (CB_HALFFILTERLEN+1)*
sizeof(
float));
108 k=index-base_size+cbveclen;
114 memset(pos, 0, cbveclen*
sizeof(
float));
115 for (n=0; n<cbveclen; n++) {
119 (*pos)+=(*pp++)*(*pp1--);
140 CB_HALFFILTERLEN*
sizeof(
float));
141 memcpy(&tempbuff2[CB_HALFFILTERLEN], mem,
143 memset(&tempbuff2[lMem+CB_HALFFILTERLEN], 0,
144 (CB_HALFFILTERLEN+1)*
sizeof(
float));
146 k=2*(index-base_size-
147 (lMem-cbveclen+1))+cbveclen;
153 memset(pos, 0, k*
sizeof(
float));
154 for (i=0; i<k; i++) {
158 (*pos)+=(*pp++)*(*pp1--);
168 memcpy(cbvec, tmpbuf+lMem-k/2,
175 for (j=ilow; j<ihigh; j++) {
176 cbvec[j]=((float)1.0-alfa)*
177 tmpbuf[lMem-k/2+j]+alfa*tmpbuf[lMem-k+j];
188 memcpy(cbvec+ihigh, tmpbuf+lMem-k+ihigh,
189 (cbveclen-ihigh)*
sizeof(
float));
float cbfiltersTbl[CB_FILTERLEN]