[xiph-commits] r17998 - trunk/chirptest

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon May 23 08:03:34 PDT 2011


Author: xiphmont
Date: 2011-05-23 08:03:34 -0700 (Mon, 23 May 2011)
New Revision: 17998

Modified:
   trunk/chirptest/chirp.c
Log:
One more overflow consistency change


Modified: trunk/chirptest/chirp.c
===================================================================
--- trunk/chirptest/chirp.c	2011-05-23 15:02:01 UTC (rev 17997)
+++ trunk/chirptest/chirp.c	2011-05-23 15:03:34 UTC (rev 17998)
@@ -568,13 +568,6 @@
           tmpf*ttsin_table[i][j];
       }
 
-      ai[i] += tmpa;
-      bi[i] += tmpb;
-      ci[i] += tmpc;
-      di[i] += tmpd;
-      ei[i] += tmpe;
-      fi[i] += tmpf;
-
       /* guard overflow */
       if((ai[i]*ai[i] + bi[i]*bi[i])>1e10 ||
          (ci[i]*ci[i] + di[i]*di[i])>1e10 ||
@@ -583,6 +576,13 @@
         continue;
       }
 
+      ai[i] += tmpa;
+      bi[i] += tmpb;
+      ci[i] += tmpc;
+      di[i] += tmpd;
+      ei[i] += tmpe;
+      fi[i] += tmpf;
+
       /* save new estimate */
       ch[i].A = toA(ai[i],bi[i]);
       ch[i].P = toP(ai[i],bi[i]);



More information about the commits mailing list