fixed-point: initial support for using the fixed-point MDCT (rest is still all
[opus.git] / libcelt / kiss_fft.h
index 1b76d4b..fb1c9d0 100644 (file)
@@ -33,11 +33,18 @@ extern "C" {
 
 #ifdef FIXED_POINT
 #include "arch.h"      
-#  define kiss_fft_scalar spx_int16_t
+#ifdef DOUBLE_PRECISION
+#  define kiss_fft_scalar celt_int32_t
+#  define kiss_twiddle_scalar celt_int32_t
+#else
+#  define kiss_fft_scalar celt_int16_t
+#  define kiss_twiddle_scalar celt_int16_t
+#endif
 #else
 # ifndef kiss_fft_scalar
 /*  default is float */
 #   define kiss_fft_scalar float
+#   define kiss_twiddle_scalar float
 # endif
 #endif
 
@@ -46,6 +53,11 @@ typedef struct {
     kiss_fft_scalar i;
 }kiss_fft_cpx;
 
+typedef struct {
+   kiss_twiddle_scalar r;
+   kiss_twiddle_scalar i;
+}kiss_twiddle_cpx;
+
 typedef struct kiss_fft_state* kiss_fft_cfg;
 
 /** 
@@ -73,6 +85,10 @@ typedef struct kiss_fft_state* kiss_fft_cfg;
 
 kiss_fft_cfg kiss_fft_alloc(int nfft,void * mem,size_t * lenmem); 
 
+/** Internal function. Can be useful when you want to do the bit-reversing yourself */
+void ki_work(kiss_fft_cpx * Fout, const kiss_fft_cpx * f, const size_t fstride,
+             int in_stride,int * factors,const kiss_fft_cfg st,int N,int s2,int m2);
+
 /**
  * kiss_fft(cfg,in_out_buf)
  *