Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

RecDecimator.hh

Go to the documentation of this file.
00001 /*
00002 
00003     Recursive decimation class, header
00004     Copyright (C) 2000-2002 Jussi Laako
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 */
00021 
00022 
00023 #include "dsp/DSPConfig.hh"
00024 #include "dsp/DSPOp.hh"
00025 #include "dsp/FFTDecimator.hh"
00026 #include "dsp/FIRDecimator.hh"
00027 #include "dsp/IIRDecimator.hh"
00028 
00029 
00030 #ifndef RECDECIMATOR_HH
00031     #define RECDECIMATOR_HH
00032 
00033     #define RECDEC_MAX_SUB_ROUNDS       32  
00034 
00035 
00042     class clRecDecimator
00043     {
00044             bool bInitialized;
00045             int iType;  
00046             long lFactor;  
00047             long lFilterSize;  
00048             long lSubRounds;  
00049             long lDecSize;  
00050             bool bpHalves[RECDEC_MAX_SUB_ROUNDS];
00051             clDSPAlloc DecBuf;
00052             clFFTDecimator FFTDecBank[RECDEC_MAX_SUB_ROUNDS];
00053             clFIRDecimator FIRDecBank[RECDEC_MAX_SUB_ROUNDS];
00054             clIIRDecimator IIRDecBank[RECDEC_MAX_SUB_ROUNDS];
00055             void InitHalves (double);
00056         public:
00057             enum eFilterType
00058             {
00059                 FILTER_TYPE_FFT = 0,
00060                 FILTER_TYPE_FIR = 1,
00061                 FILTER_TYPE_IIR = 2
00062             };
00063             clRecDecimator ();
00064             ~clRecDecimator ();
00078             bool Initialize (long, long, const float *, float = 0.0f, 
00079                 int = 0);
00081             bool Initialize (long, long, const double *, double = 0.0, 
00082                 int = 0);
00084             bool Initialize (long, long, const float *, float = 0.0f, 
00085                 bool = false);
00087             bool Initialize (long, long, const double *, double = 0.0, 
00088                 bool = false);
00092             void Uninitialize ();
00099             void Put (const float *, long);
00101             void Put (const double *, long);
00112             bool Get (float *, long);
00114             bool Get (double *, long);
00115     };
00116 
00117 #endif

Generated on Tue Mar 2 19:46:45 2004 for libDSP by doxygen 1.3.6