[xiph-commits] r12728 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Sun Mar 11 07:18:42 PDT 2007


Author: jm
Date: 2007-03-11 07:18:41 -0700 (Sun, 11 Mar 2007)
New Revision: 12728

Modified:
   trunk/speex/libspeex/kiss_fftr.c
Log:
Un-b0rked the floating-point version.


Modified: trunk/speex/libspeex/kiss_fftr.c
===================================================================
--- trunk/speex/libspeex/kiss_fftr.c	2007-03-11 14:15:01 UTC (rev 12727)
+++ trunk/speex/libspeex/kiss_fftr.c	2007-03-11 14:18:41 UTC (rev 12728)
@@ -242,10 +242,18 @@
       twr = SHR32(SUB32(MULT16_16(f2k.r,st->super_twiddles[k].r),MULT16_16(f2k.i,st->super_twiddles[k].i)), 1);
       twi = SHR32(ADD32(MULT16_16(f2k.i,st->super_twiddles[k].r),MULT16_16(f2k.r,st->super_twiddles[k].i)), 1);
       
+#ifdef FIXED_POINT
       freqdata[2*k-1] = PSHR32(f1kr + twr, 15);
       freqdata[2*k] = PSHR32(f1ki + twi, 15);
       freqdata[2*(ncfft-k)-1] = PSHR32(f1kr - twr, 15);
       freqdata[2*(ncfft-k)] = PSHR32(twi - f1ki, 15);
+#else
+      freqdata[2*k-1] = .5f*(f1kr + twr);
+      freqdata[2*k] = .5f*(f1ki + twi);
+      freqdata[2*(ncfft-k)-1] = .5f*(f1kr - twr);
+      freqdata[2*(ncfft-k)] = .5f*(twi - f1ki);
+      
+#endif
    }
 }
 



More information about the commits mailing list