Commit 6e09f680 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

fixed-point: fix for 32-bit TI FFT

parent 70162a4f
......@@ -41,14 +41,14 @@
#define cpx32_fft(state, X, Y, nx)\
(\
cfft_SCALE(X,nx),\
cbrev(X,X,nx),\
cfft32_SCALE(X,nx),\
cbrev32(X,X,nx),\
)
#define cpx32_ifft(state, X, Y, nx) \
(\
cifft_NOSCALE(X,nx),\
cbrev(X,Y,nx)\
cifft32_NOSCALE(X,nx),\
cbrev32(X,Y,nx)\
)
......@@ -59,8 +59,8 @@
#define cpx32_fft_alloc(length) kiss_fft_alloc(length, 0, 0);
#define cpx32_fft_free(state) kiss_fft_free(state)
#define cpx32_fft(state, X, Y, nx) kiss_fft(state,X, Y)
#define cpx32_ifft(state, X, Y, nx) kiss_ifft(state,X, Y)
#define cpx32_fft(state, X, Y, nx) kiss_fft(state,(const kiss_fft_cpx *)(X), (kiss_fft_cpx *)(Y))
#define cpx32_ifft(state, X, Y, nx) kiss_ifft(state,(const kiss_fft_cpx *)(X), (kiss_fft_cpx *)(Y))
#endif /* !ENABLE_TI_DSPLIB */
......
......@@ -120,7 +120,7 @@ void mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar *ou
}
/* N/4 complex FFT, which should normally down-scale by 4/N (but doesn't now) */
cpx32_fft(l->kfft, (const kiss_fft_cpx *)out, (kiss_fft_cpx *)f, N4);
cpx32_fft(l->kfft, out, f, N4);
/* Post-rotate and apply the scaling if the FFT doesn't to it itself */
for(i=0;i<N4;i++)
......@@ -151,7 +151,7 @@ void mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar *o
}
/* Inverse N/4 complex FFT. This one should *not* downscale even in fixed-point */
cpx32_ifft(l->kfft, (const kiss_fft_cpx *)out, (kiss_fft_cpx *)f, N4);
cpx32_ifft(l->kfft, out, f, N4);
/* Post-rotate */
for(i=0;i<N4;i++)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment