Cleaning up synthesis filter and using new FIR filter with buffer.
authorTom Rondeau <trondeau@vt.edu>
Sat, 16 Oct 2010 18:36:38 +0000 (14:36 -0400)
committerTom Rondeau <trondeau@vt.edu>
Sat, 16 Oct 2010 18:36:38 +0000 (14:36 -0400)
gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.cc
gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.h

index 0b31bcf72e7cba77a6a7614ead65a61dc7889b93..9fad1bd0d831d8243c5b82e09f5fac5ff4e6a3cc 100644 (file)
@@ -25,8 +25,6 @@
 #endif
 
 #include <gr_pfb_synthesis_filterbank_ccf.h>
-#include <gr_fir_ccf.h>
-#include <gr_fir_util.h>
 #include <gri_fft.h>
 #include <gr_io_signature.h>
 #include <cstdio>
@@ -48,18 +46,12 @@ gr_pfb_synthesis_filterbank_ccf::gr_pfb_synthesis_filterbank_ccf
                          numchans),
     d_updated (false), d_numchans(numchans)
 {
-  //d_filters = std::vector<gr_fir_ccf*>(d_numchans);
   d_filters = std::vector<gri_fir_filter_with_buffer_ccf*>(d_numchans);
 
-  //d_buffer = new gr_complex*[d_numchans];
-
   // Create an FIR filter for each channel and zero out the taps
   std::vector<float> vtaps(0, d_numchans);
   for(unsigned int i = 0; i < d_numchans; i++) {
     d_filters[i] = new gri_fir_filter_with_buffer_ccf(vtaps);
-    //d_filters[i] = gr_fir_util::create_gr_fir_ccf(vtaps);
-    //d_buffer[i] = new gr_complex[65535];
-    //memset(d_buffer[i], 0, 65535*sizeof(gr_complex));
   }
 
   // Now, actually set the filters' taps
@@ -167,22 +159,11 @@ gr_pfb_synthesis_filterbank_ccf::work (int noutput_items,
     d_fft->execute();
 
     for(i = 0; i < d_numchans; i++) {
-      //d_buffer[i][n+d_taps_per_filter-1] = d_fft->get_outbuf()[i];
-      //out[d_numchans-i-1] = d_filters[d_numchans-i-1]->filter(&d_buffer[i][n]);
       out[d_numchans-i-1] = d_filters[d_numchans-i-1]->filter(d_fft->get_outbuf()[i]);
     }
+    
     out += d_numchans;
   }
 
-  // Move the last chunk of memory to the front for the next entry
-  // this make sure that the first taps_per_filter values are correct
-
-  /*
-  for(i = 0; i < d_numchans; i++) {
-    memcpy(d_buffer[i], &d_buffer[i][n],
-          (d_taps_per_filter)*sizeof(gr_complex));
-  }
-  */
-
   return noutput_items;
 }
index 27c8c2c5088d63d3e892ff6d2a35a16541bff3ef..f5b1cbb94688be70c9ffe75723b4f440873cac71 100644 (file)
@@ -32,7 +32,6 @@ typedef boost::shared_ptr<gr_pfb_synthesis_filterbank_ccf> gr_pfb_synthesis_filt
 gr_pfb_synthesis_filterbank_ccf_sptr gr_make_pfb_synthesis_filterbank_ccf 
     (unsigned int numchans, const std::vector<float> &taps);
 
-class gr_fir_ccf;
 class gri_fft_complex;
 
 
@@ -62,7 +61,6 @@ class gr_pfb_synthesis_filterbank_ccf : public gr_sync_interpolator
   unsigned int             d_numchans;
   unsigned int             d_taps_per_filter;
   gri_fft_complex         *d_fft;
-  //gr_complex             **d_buffer;
   std::vector< gri_fir_filter_with_buffer_ccf*> d_filters;
   std::vector< std::vector<float> > d_taps;