diff options
Diffstat (limited to 'apps/codecs/libspeex/fftwrap.c')
| -rw-r--r-- | apps/codecs/libspeex/fftwrap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/codecs/libspeex/fftwrap.c b/apps/codecs/libspeex/fftwrap.c index df56580..a108640 100644 --- a/apps/codecs/libspeex/fftwrap.c +++ b/apps/codecs/libspeex/fftwrap.c @@ -41,7 +41,6 @@ #include "misc.h" -#include "math_approx.h" #define MAX_FFT_SIZE 2048 @@ -65,7 +64,7 @@ static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t boun } for (i=0;i<len;i++) { - out[i] = in[i] << shift; + out[i] = SHL16(in[i], shift); } return shift; } @@ -75,7 +74,7 @@ static void renorm_range(spx_word16_t *in, spx_word16_t *out, int shift, int len int i; for (i=0;i<len;i++) { - out[i] = (in[i] + (1<<(shift-1))) >> shift; + out[i] = PSHR16(in[i], shift); } } #endif @@ -104,8 +103,8 @@ void spx_fft(void *table, float *in, float *out) if (in==out) { int i; - speex_warning("FFT should not be done in-place"); float scale = 1./((struct drft_lookup *)table)->n; + speex_warning("FFT should not be done in-place"); for (i=0;i<((struct drft_lookup *)table)->n;i++) out[i] = scale*in[i]; } else { @@ -121,7 +120,6 @@ void spx_ifft(void *table, float *in, float *out) { if (in==out) { - int i; speex_warning("FFT should not be done in-place"); } else { int i; |