commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r7089 - gnuradio/trunk/gnuradio-core/src/lib/filter


From: nldudok1
Subject: [Commit-gnuradio] r7089 - gnuradio/trunk/gnuradio-core/src/lib/filter
Date: Sun, 9 Dec 2007 10:40:08 -0700 (MST)

Author: nldudok1
Date: 2007-12-09 10:40:08 -0700 (Sun, 09 Dec 2007)
New Revision: 7089

Modified:
   gnuradio/trunk/gnuradio-core/src/lib/filter/gri_iir.h
Log:
bugfix for indexnumbers in IIR filter

Modified: gnuradio/trunk/gnuradio-core/src/lib/filter/gri_iir.h
===================================================================
--- gnuradio/trunk/gnuradio-core/src/lib/filter/gri_iir.h       2007-12-08 
17:41:56 UTC (rev 7088)
+++ gnuradio/trunk/gnuradio-core/src/lib/filter/gri_iir.h       2007-12-09 
17:40:08 UTC (rev 7089)
@@ -143,12 +143,6 @@
   for (i = 1; i < m; i ++)
     acc += (d_fbtaps[i] * d_prev_output[latest_m + i]);
 
-  // store the values twice to avoid having to handle wrap-around in the loop
-  d_prev_output[latest_m] = acc;
-  d_prev_output[latest_m+m] = acc;
-  d_prev_input[latest_n] = input;
-  d_prev_input[latest_n+n] = input;
-
   latest_n--;
   latest_m--;
   if (latest_n < 0)
@@ -156,6 +150,13 @@
   if (latest_m < 0)
     latest_m += m;
 
+  // store the values twice to avoid having to handle wrap-around in the loop
+  d_prev_output[latest_m] = acc;
+  d_prev_output[latest_m+m] = acc;
+  d_prev_input[latest_n] = input;
+  d_prev_input[latest_n+n] = input;
+
+
   d_latest_m = latest_m;
   d_latest_n = latest_n;
   return (o_type) acc;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]