Home | History | Annotate | Download | only in libspeex

Lines Matching defs:st

35     kiss_fftr_cfg st = NULL;
48 st = (kiss_fftr_cfg) KISS_FFT_MALLOC (memneeded);
51 st = (kiss_fftr_cfg) mem;
54 if (!st)
57 st->substate = (kiss_fft_cfg) (st + 1); /*just beyond kiss_fftr_state struct */
58 st->tmpbuf = (kiss_fft_cpx *) (((char *) st->substate) + subsize);
59 st->super_twiddles = st->tmpbuf + nfft;
60 kiss_fft_alloc(nfft, inverse_fft, st->substate, &subsize);
67 kf_cexp2(st->super_twiddles+i, DIV32(SHL32(phase,16),nfft));
75 kf_cexp(st->super_twiddles+i, phase );
78 return st;
81 void kiss_fftr(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata)
87 if ( st->substate->inverse) {
91 ncfft = st->substate->nfft;
94 kiss_fft( st->substate , (const kiss_fft_cpx*)timedata, st->tmpbuf );
95 /* The real part of the DC element of the frequency spectrum in st->tmpbuf
105 tdc.r = st->tmpbuf[0].r;
106 tdc.i = st->tmpbuf[0].i;
119 fpk = st->tmpbuf[k];
120 fpnk.r = st->tmpbuf[ncfft-k].r;
121 fpnk.i = - st->tmpbuf[ncfft-k].i;
127 C_MUL( tw , f2k , st->super_twiddles[k]);
136 void kiss_fftri(kiss_fftr_cfg st,const kiss_fft_cpx *freqdata, kiss_fft_scalar *timedata)
141 if (st->substate->inverse == 0) {
145 ncfft = st->substate->nfft;
147 st->tmpbuf[0].r = freqdata[0].r + freqdata[ncfft].r;
148 st->tmpbuf[0].i = freqdata[0].r - freqdata[ncfft].r;
149 /*C_FIXDIV(st->tmpbuf[0],2);*/
161 C_MUL (fok, tmp, st->super_twiddles[k]);
162 C_ADD (st->tmpbuf[k], fek, fok);
163 C_SUB (st->tmpbuf[ncfft - k], fek, fok);
165 st->tmpbuf[ncfft - k].i *= _mm_set1_ps(-1.0);
167 st->tmpbuf[ncfft - k].i *= -1;
170 kiss_fft (st->substate, st->tmpbuf, (kiss_fft_cpx *) timedata);
173 void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata)
180 if ( st->substate->inverse) {
184 ncfft = st->substate->nfft;
187 kiss_fft( st->substate , (const kiss_fft_cpx*)timedata, st->tmpbuf );
188 /* The real part of the DC element of the frequency spectrum in st->tmpbuf
198 tdc.r = st->tmpbuf[0].r;
199 tdc.i = st->tmpbuf[0].i;
208 /*fpk = st->tmpbuf[k];
209 fpnk.r = st->tmpbuf[ncfft-k].r;
210 fpnk.i = - st->tmpbuf[ncfft-k].i;
217 C_MUL( tw , f2k , st->super_twiddles[k]);
225 /*f1k.r = PSHR32(ADD32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),1);
226 f1k.i = PSHR32(SUB32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),1);
227 f2k.r = PSHR32(SUB32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),1);
228 f2k.i = SHR32(ADD32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),1);
230 C_MUL( tw , f2k , st->super_twiddles[k]);
237 f2k.r = SHR32(SUB32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),1);
238 f2k.i = PSHR32(ADD32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),1);
240 f1kr = SHL32(ADD32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),13);
241 f1ki = SHL32(SUB32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),13);
243 twr = SHR32(SUB32(MULT16_16(f2k.r,st->super_twiddles[k].r),MULT16_16(f2k.i,st->super_twiddles[k].i)), 1);
244 twi = SHR32(ADD32(MULT16_16(f2k.i,st->super_twiddles[k].r),MULT16_16(f2k.r,st->super_twiddles[k].i)), 1);
261 void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata,kiss_fft_scalar *timedata)
266 if (st->substate->inverse == 0) {
270 ncfft = st->substate->nfft;
272 st->tmpbuf[0].r = freqdata[0] + freqdata[2*ncfft-1];
273 st->tmpbuf[0].i = freqdata[0] - freqdata[2*ncfft-1];
274 /*C_FIXDIV(st->tmpbuf[0],2);*/
287 C_MUL (fok, tmp, st->super_twiddles[k]);
288 C_ADD (st->tmpbuf[k], fek, fok);
289 C_SUB (st->tmpbuf[ncfft - k], fek, fok);
291 st->tmpbuf[ncfft - k].i *= _mm_set1_ps(-1.0);
293 st->tmpbuf[ncfft - k].i *= -1;
296 kiss_fft (st->substate, st->tmpbuf, (kiss_fft_cpx *) timedata);