ref: 6e09f680f1ba29197fc949ed04832a2d8efc2b39
parent: 70162a4f8287ab588a9df10d88107accd3ead249
author: Jean-Marc Valin <[email protected]>
date: Fri Mar 21 08:47:41 EDT 2008
fixed-point: fix for 32-bit TI FFT
--- a/libcelt/kfft_double.h
+++ b/libcelt/kfft_double.h
@@ -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 */
--- a/libcelt/mdct.c
+++ b/libcelt/mdct.c
@@ -120,7 +120,7 @@
}
/* 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 @@
}
/* 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++)