Home | History | Annotate | Download | only in libspeex

Lines Matching refs:table

86    struct drft_lookup *table;
87 table = speex_alloc(sizeof(struct drft_lookup));
88 spx_drft_init((struct drft_lookup *)table, size);
89 return (void*)table;
92 void spx_fft_destroy(void *table)
94 spx_drft_clear(table);
95 speex_free(table);
98 void spx_fft(void *table, float *in, float *out)
103 float scale = 1./((struct drft_lookup *)table)->n;
105 for (i=0;i<((struct drft_lookup *)table)->n;i++)
109 float scale = 1./((struct drft_lookup *)table)->n;
110 for (i=0;i<((struct drft_lookup *)table)->n;i++)
113 spx_drft_forward((struct drft_lookup *)table, out);
116 void spx_ifft(void *table, float *in, float *out)
123 for (i=0;i<((struct drft_lookup *)table)->n;i++)
126 spx_drft_backward((struct drft_lookup *)table, out);
139 struct mkl_config *table = (struct mkl_config *) speex_alloc(sizeof(struct mkl_config));
140 table->N = size;
141 DftiCreateDescriptor(&table->desc, DFTI_SINGLE, DFTI_REAL, 1, size);
142 DftiSetValue(table->desc, DFTI_PACKED_FORMAT, DFTI_PACK_FORMAT);
143 DftiSetValue(table->desc, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
144 DftiSetValue(table->desc, DFTI_FORWARD_SCALE, 1.0f / size);
145 DftiCommitDescriptor(table->desc);
146 return table;
149 void spx_fft_destroy(void *table)
151 struct mkl_config *t = (struct mkl_config *) table;
153 speex_free(table);
156 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
158 struct mkl_config *t = (struct mkl_config *) table;
162 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
164 struct mkl_config *t = (struct mkl_config *) table;
182 struct fftw_config *table = (struct fftw_config *) speex_alloc(sizeof(struct fftw_config));
183 table->in = fftwf_malloc(sizeof(float) * (size+2));
184 table->out = fftwf_malloc(sizeof(float) * (size+2));
186 table->fft = fftwf_plan_dft_r2c_1d(size, table->in, (fftwf_complex *) table->out, FFTW_PATIENT);
187 table->ifft = fftwf_plan_dft_c2r_1d(size, (fftwf_complex *) table->in, table->out, FFTW_PATIENT);
189 table->N = size;
190 return table;
193 void spx_fft_destroy(void *table)
195 struct fftw_config *t = (struct fftw_config *) table;
200 speex_free(table);
204 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
207 struct fftw_config *t = (struct fftw_config *) table;
222 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
225 struct fftw_config *t = (struct fftw_config *) table;
255 struct kiss_config *table;
256 table = (struct kiss_config*)speex_alloc(sizeof(struct kiss_config));
257 table->forward = kiss_fftr_alloc(size,0,NULL,NULL);
258 table->backward = kiss_fftr_alloc(size,1,NULL,NULL);
259 table->N = size;
260 return table;
263 void spx_fft_destroy(void *table)
265 struct kiss_config *t = (struct kiss_config *)table;
268 speex_free(table);
273 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
276 struct kiss_config *t = (struct kiss_config *)table;
285 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
289 struct kiss_config *t = (struct kiss_config *)table;
297 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
299 struct kiss_config *t = (struct kiss_config *)table;
315 void spx_fft_float(void *table, float *in, float *out)
319 int N = ((struct drft_lookup *)table)->n;
321 int N = ((struct kiss_config *)table)->N;
333 spx_fft(table, _in, _out);
341 spx_drft_init(&t, ((struct kiss_config *)table)->N);
342 scale = 1./((struct kiss_config *)table)->N;
343 for (i=0;i<((struct kiss_config *)table)->N;i++)
351 void spx_ifft_float(void *table, float *in, float *out)
355 int N = ((struct drft_lookup *)table)->n;
357 int N = ((struct kiss_config *)table)->N;
369 spx_ifft(table, _in, _out);
377 spx_drft_init(&t, ((struct kiss_config *)table)->N);
378 for (i=0;i<((struct kiss_config *)table)->N;i++)
388 void spx_fft_float(void *table, float *in, float *out)
390 spx_fft(table, in, out);
392 void spx_ifft_float(void *table, float *in, float *out)
394 spx_ifft(table, in, out);