3 * Copyright 2010 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
24 #ifndef INCLUDED_GR_PFB_SYNTHESIS_FILTERBANK_CCF_H
25 #define INCLUDED_GR_PFB_SYNTHESIS_FILTERBANK_CCF_H
27 #include <gr_sync_interpolator.h>
29 class gr_pfb_synthesis_filterbank_ccf;
30 typedef boost::shared_ptr<gr_pfb_synthesis_filterbank_ccf> gr_pfb_synthesis_filterbank_ccf_sptr;
31 gr_pfb_synthesis_filterbank_ccf_sptr gr_make_pfb_synthesis_filterbank_ccf
32 (unsigned int numchans, const std::vector<float> &taps);
35 class gri_fft_complex;
39 * \class gr_pfb_synthesis_filterbank_ccf
41 * \brief Polyphase synthesis filterbank with
42 * gr_complex input, gr_complex output and float taps
47 class gr_pfb_synthesis_filterbank_ccf : public gr_sync_interpolator
51 * Build the polyphase synthesis filterbank.
52 * \param numchans (unsigned integer) Specifies the number of channels <EM>M</EM>
53 * \param taps (vector/list of floats) The prototype filter to populate the filterbank.
55 friend gr_pfb_synthesis_filterbank_ccf_sptr gr_make_pfb_synthesis_filterbank_ccf
56 (unsigned int numchans, const std::vector<float> &taps);
59 unsigned int d_numchans;
60 std::vector<gr_fir_ccf*> d_filters;
61 std::vector< std::vector<float> > d_taps;
62 unsigned int d_taps_per_filter;
63 gri_fft_complex *d_fft;
64 gr_complex **d_buffer;
67 * Build the polyphase synthesis filterbank.
68 * \param numchans (unsigned integer) Specifies the number of channels <EM>M</EM>
69 * \param taps (vector/list of floats) The prototype filter to populate the filterbank.
71 gr_pfb_synthesis_filterbank_ccf (unsigned int numchans,
72 const std::vector<float> &taps);
75 ~gr_pfb_synthesis_filterbank_ccf ();
78 * Resets the filterbank's filter taps with the new prototype filter
79 * \param taps (vector/list of floats) The prototype filter to populate the filterbank.
81 void set_taps (const std::vector<float> &taps);
84 * Print all of the filterbank taps to screen.
88 int work (int noutput_items,
89 gr_vector_const_void_star &input_items,
90 gr_vector_void_star &output_items);