Home | History | Annotate | Download | only in libspeex

Lines Matching defs:in

6    Redistribution and use in source and binary forms, with or without
13 - Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
24 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
29 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
45 static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t bound, int len)
51 if (in[i]>max_val)
52 max_val = in[i];
53 if (-in[i]>max_val)
54 max_val = -in[i];
64 out[i] = SHL16(in[i], shift);
69 static void renorm_range(spx_word16_t *in, spx_word16_t *out, int shift, int len)
74 out[i] = PSHR16(in[i], shift);
98 void spx_fft(void *table, float *in, float *out)
100 if (in==out)
104 speex_warning("FFT should not be done in-place");
106 out[i] = scale*in[i];
111 out[i] = scale*in[i];
116 void spx_ifft(void *table, float *in, float *out)
118 if (in==out)
120 speex_warning("FFT should not be done in-place");
124 out[i] = in[i];
156 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
159 DftiComputeForward(t->desc, in, out);
162 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
165 DftiComputeBackward(t->desc, in, out);
173 float *in;
183 table->in = 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);
198 fftwf_free(t->in);
204 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
209 float *iptr = t->in;
213 iptr[i]=in[i] * m;
222 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
227 float *iptr = t->in;
230 iptr[0] = in[0];
233 iptr[i+1] = in[i];
273 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
277 shift = maximize_range(in, in, 32000, t->N);
278 kiss_fftr2(t->forward, in, out);
279 renorm_range(in, in, shift, t->N);
285 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
291 kiss_fftr2(t->forward, in, out);
297 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
300 kiss_fftri2(t->backward, in, out);
315 void spx_fft_float(void *table, float *in, float *out)
332 _in[i] = (int)floor(.5+in[i]);
344 out[i] = scale*in[i];
351 void spx_ifft_float(void *table, float *in, float *out)
368 _in[i] = (int)floor(.5+in[i]);
379 out[i] = in[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);