Fixed an old issue where the fixed-point MDCT twiddles were stored as 32-bit values
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Thu, 26 Aug 2010 02:20:35 +0000 (22:20 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Thu, 26 Aug 2010 02:20:35 +0000 (22:20 -0400)
libcelt/kiss_fft.h
libcelt/mdct.c

index a713c4c..84de121 100644 (file)
@@ -55,7 +55,7 @@ extern "C" {
 
 #ifdef DOUBLE_PRECISION
 #  define kiss_fft_scalar celt_int32
-#  define kiss_twiddle_scalar celt_int32
+#  define kiss_twiddle_scalar celt_int16
 #  define KF_SUFFIX _celt_double
 #else
 #  define kiss_fft_scalar celt_int16
index 06c54f2..a10a50b 100644 (file)
@@ -162,7 +162,7 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar
    /* Pre-rotation */
    {
       kiss_fft_scalar * restrict yp = out;
-      const kiss_fft_scalar *t = &l->trig[0];
+      const kiss_twiddle_scalar *t = &l->trig[0];
       for(i=0;i<N4;i++)
       {
          kiss_fft_scalar re, im, yr, yi;
@@ -185,7 +185,7 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar
       const kiss_fft_scalar * restrict fp = f;
       kiss_fft_scalar * restrict yp1 = out;
       kiss_fft_scalar * restrict yp2 = out+N2-1;
-      const kiss_fft_scalar *t = &l->trig[0];
+      const kiss_twiddle_scalar *t = &l->trig[0];
       /* Temp pointers to make it really clear to the compiler what we're doing */
       for(i=0;i<N4;i++)
       {
@@ -231,7 +231,7 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala
       const kiss_fft_scalar * restrict xp1 = in;
       const kiss_fft_scalar * restrict xp2 = in+N2-1;
       kiss_fft_scalar * restrict yp = f2;
-      const kiss_fft_scalar *t = &l->trig[0];
+      const kiss_twiddle_scalar *t = &l->trig[0];
       for(i=0;i<N4;i++) 
       {
          kiss_fft_scalar yr, yi;
@@ -251,7 +251,7 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala
    /* Post-rotate */
    {
       kiss_fft_scalar * restrict fp = f;
-      const kiss_fft_scalar *t = &l->trig[0];
+      const kiss_twiddle_scalar *t = &l->trig[0];
 
       for(i=0;i<N4;i++)
       {