Lines Matching full:frame_size
60 int frame_size;
81 EXPORT SpeexDecorrState *speex_decorrelate_new(int rate, int channels, int frame_size)
87 st->frame_size = frame_size;
89 st->psy = vorbis_psy_init(rate, 2*frame_size);
90 spx_drft_init(&st->lookup, 2*frame_size);
91 st->wola_mem = speex_alloc(frame_size*sizeof(float));
92 st->curve = speex_alloc(frame_size*sizeof(float));
94 st->y = speex_alloc(frame_size*sizeof(float));
96 st->buff = speex_alloc(channels*2*frame_size*sizeof(float));
103 st->vorbis_win = speex_alloc((2*frame_size+20)*sizeof(float));
104 for (i=0;i<2*frame_size;i++)
105 st->vorbis_win[i] = sin(.5*M_PI* sin(M_PI*i/(2*frame_size))*sin(M_PI*i/(2*frame_size)) );
151 int N=2*st->frame_size;
162 buff = st->buff+ch*2*st->frame_size;
168 for (i=0;i<st->frame_size;i++)
169 buff[i] = buff[i+st->frame_size];
170 for (i=0;i<st->frame_size;i++)
171 buff[i+st->frame_size] = in[i*st->channels+ch];
173 x = buff+st->frame_size;
183 for (i=0;i<st->frame_size;i++)
185 st->y[i] = alpha*(x[i-ALLPASS_ORDER+order]-beta*x[i-ALLPASS_ORDER+order-1])*st->vorbis_win[st->frame_size+i+order]
186 + x[i-ALLPASS_ORDER]*st->vorbis_win[st->frame_size+i]
190 st->y[i] *= st->vorbis_win[st->frame_size+i];
212 for (i=0;i<st->frame_size;i++)
228 for (i=0;i<2*st->frame_size;i++)
233 for (i=1;i<st->frame_size;i++)
246 frame[2*st->frame_size-1] = coef*uni_rand(&st->seed)*sqrt(.1+st->curve[st->frame_size-1]);
248 for (i=0;i<2*st->frame_size;i++)
252 for (i=0;i<st->frame_size;i++)
256 st->wola_mem[i] = frame[i+st->frame_size];