From: Tom Rondeau Date: Sat, 16 Oct 2010 18:36:38 +0000 (-0400) Subject: Cleaning up synthesis filter and using new FIR filter with buffer. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=72c9a5a158b0b18964c8f2f8f914f16060868146;p=debian%2Fgnuradio Cleaning up synthesis filter and using new FIR filter with buffer. --- diff --git a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.cc index 0b31bcf7..9fad1bd0 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.cc @@ -25,8 +25,6 @@ #endif #include -#include -#include #include #include #include @@ -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(d_numchans); d_filters = std::vector(d_numchans); - //d_buffer = new gr_complex*[d_numchans]; - // Create an FIR filter for each channel and zero out the taps std::vector 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; } diff --git a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.h index 27c8c2c5..f5b1cbb9 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.h @@ -32,7 +32,6 @@ typedef boost::shared_ptr gr_pfb_synthesis_filt gr_pfb_synthesis_filterbank_ccf_sptr gr_make_pfb_synthesis_filterbank_ccf (unsigned int numchans, const std::vector &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 > d_taps;