shithub: opus

Download patch

ref: 0ff9be6aec23cb8134de64382b16e361516d808c
parent: bb5288174da23ec5961a6d86725387509ff69079
author: Jean-Marc Valin <[email protected]>
date: Wed Aug 25 18:20:35 EDT 2010

Fixed an old issue where the fixed-point MDCT twiddles were stored as 32-bit values

--- a/libcelt/kiss_fft.h
+++ b/libcelt/kiss_fft.h
@@ -55,7 +55,7 @@
 
 #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
--- a/libcelt/mdct.c
+++ b/libcelt/mdct.c
@@ -162,7 +162,7 @@
    /* 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 @@
       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 @@
       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 @@
    /* 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++)
       {