diff peck_fft.c @ 6:fee54f1878f7

kill FIXED_POINT stuff, simplify
author Peter Meerwald <p.meerwald@bct-electronic.com>
date Fri, 16 Sep 2011 15:18:28 +0200
parents c7237a7544eb
children 707be088ccc3
line wrap: on
line diff
--- a/peck_fft.c	Fri Sep 16 15:08:29 2011 +0200
+++ b/peck_fft.c	Fri Sep 16 15:18:28 2011 +0200
@@ -31,9 +31,6 @@
     peck_fft_cpx t;
     Fout2 = Fout + m;
     do {
-        C_FIXDIV(*Fout, 2); 
-        C_FIXDIV(*Fout2, 2);
-
         C_MUL(t, *Fout2, *tw1);
         tw1 += fstride;
         C_SUB(*Fout2, *Fout, t);
@@ -60,11 +57,6 @@
     tw3 = tw2 = tw1 = st->twiddles;
 
     do {
-        C_FIXDIV(*Fout, 4); 
-        C_FIXDIV(Fout[m], 4); 
-        C_FIXDIV(Fout[m2], 4); 
-        C_FIXDIV(Fout[m3], 4);
-
         C_MUL(scratch[0], Fout[m], *tw1);
         C_MUL(scratch[1], Fout[m2], *tw2);
         C_MUL(scratch[2], Fout[m3], *tw3);
@@ -112,8 +104,6 @@
      tw1 = tw2 = st->twiddles;
 
      do {
-         C_FIXDIV(*Fout,3); C_FIXDIV(Fout[m],3); C_FIXDIV(Fout[m2],3);
-
          C_MUL(scratch[1],Fout[m] , *tw1);
          C_MUL(scratch[2],Fout[m2] , *tw2);
 
@@ -164,18 +154,17 @@
 
     tw=st->twiddles;
     for (u = 0; u < m; ++u) {
-        C_FIXDIV( *Fout0,5); C_FIXDIV( *Fout1,5); C_FIXDIV( *Fout2,5); C_FIXDIV( *Fout3,5); C_FIXDIV( *Fout4,5);
         scratch[0] = *Fout0;
 
-        C_MUL(scratch[1] ,*Fout1, tw[u*fstride]);
-        C_MUL(scratch[2] ,*Fout2, tw[2*u*fstride]);
-        C_MUL(scratch[3] ,*Fout3, tw[3*u*fstride]);
-        C_MUL(scratch[4] ,*Fout4, tw[4*u*fstride]);
+        C_MUL(scratch[1], *Fout1, tw[u*fstride]);
+        C_MUL(scratch[2], *Fout2, tw[2*u*fstride]);
+        C_MUL(scratch[3], *Fout3, tw[3*u*fstride]);
+        C_MUL(scratch[4], *Fout4, tw[4*u*fstride]);
 
-        C_ADD( scratch[7],scratch[1],scratch[4]);
-        C_SUB( scratch[10],scratch[1],scratch[4]);
-        C_ADD( scratch[8],scratch[2],scratch[3]);
-        C_SUB( scratch[9],scratch[2],scratch[3]);
+        C_ADD(scratch[7], scratch[1], scratch[4]);
+        C_SUB(scratch[10], scratch[1], scratch[4]);
+        C_ADD(scratch[8], scratch[2], scratch[3]);
+        C_SUB(scratch[9], scratch[2], scratch[3]);
 
         Fout0->r += scratch[7].r + scratch[8].r;
         Fout0->i += scratch[7].i + scratch[8].i;
@@ -222,7 +211,6 @@
         k=u;
         for (q1 = 0; q1 < p; ++q1) {
             scratch[q1] = Fout[k];
-            C_FIXDIV(scratch[q1], p);
             k += m;
         }
 

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.