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

clRecDecimator Class Reference

Recursive decimation filter class implementation. More...

#include <RecDecimator.hh>

Collaboration diagram for clRecDecimator:

Collaboration graph
[legend]
List of all members.

Public Types

enum  eFilterType { FILTER_TYPE_FFT = 0, FILTER_TYPE_FIR = 1, FILTER_TYPE_IIR = 2 }

Public Member Functions

 clRecDecimator ()
 ~clRecDecimator ()
bool Initialize (long, long, const float *, float=0.0f, int=0)
 Initialize decimator, decimation factor must be powers of two.

bool Initialize (long, long, const double *, double=0.0, int=0)
bool Initialize (long, long, const float *, float=0.0f, bool=false)
bool Initialize (long, long, const double *, double=0.0, bool=false)
void Uninitialize ()
 Uninitialize decimator.

void Put (const float *, long)
 Feed data into decimator.

void Put (const double *, long)
bool Get (float *, long)
 Get data from decimator.

bool Get (double *, long)

Private Member Functions

void InitHalves (double)

Private Attributes

bool bInitialized
int iType
 Type of filter; 0 = FFT, 1 = FIR, 2 = IIR.

long lFactor
 Decimation factor.

long lFilterSize
 Size of input buffer.

long lSubRounds
 Number of recursive rounds.

long lDecSize
 Size of recursion buffer.

bool bpHalves [RECDEC_MAX_SUB_ROUNDS]
clDSPAlloc DecBuf
clFFTDecimator FFTDecBank [RECDEC_MAX_SUB_ROUNDS]
clFIRDecimator FIRDecBank [RECDEC_MAX_SUB_ROUNDS]
clIIRDecimator IIRDecBank [RECDEC_MAX_SUB_ROUNDS]

Detailed Description

Recursive decimation filter class implementation.

Data is filtered using specified filter and decimated in recursive manner in rounds of factor 2.

Definition at line 42 of file RecDecimator.hh.


Member Enumeration Documentation

enum clRecDecimator::eFilterType
 

Enumeration values:
FILTER_TYPE_FFT 
FILTER_TYPE_FIR 
FILTER_TYPE_IIR 

Definition at line 57 of file RecDecimator.hh.


Constructor & Destructor Documentation

clRecDecimator::clRecDecimator  ) 
 

Definition at line 59 of file RecDecimator.cc.

References FILTER_TYPE_FFT, iType, and lSubRounds.

clRecDecimator::~clRecDecimator  ) 
 

Definition at line 67 of file RecDecimator.cc.

References Uninitialize().


Member Function Documentation

void clRecDecimator::InitHalves double   )  [private]
 

Definition at line 34 of file RecDecimator.cc.

References bpHalves, and lSubRounds.

Referenced by Initialize().

bool clRecDecimator::Initialize long  ,
long  ,
const float *  ,
float  = 0.0f,
int  = 0
 

Initialize decimator, decimation factor must be powers of two.

You can re-initialize decimator without uninitializing first.

The NULL pointer is used select correct overloaded function matching input datatype.

Parameters:
DecFact Decimation factor
FiltSize Filter size (for FFT)
NullPtr NULL pointer
BandCenter Normalized center frequency of filter band
FilterType Filter type; 0 = FFT, 1 = FIR, 2 = IIR

Definition at line 73 of file RecDecimator.cc.

References bpHalves, DSP_FILT_DEF_OVERLAPF, FFTDecBank, FILTER_TYPE_FFT, FILTER_TYPE_FIR, FILTER_TYPE_IIR, FIRDecBank, IIRDecBank, InitHalves(), clIIRMultiRate::Initialize(), clFIRMultiRate::Initialize(), clFFTMultiRate::Initialize(), iType, lDecSize, lSubRounds, RECDEC_MAX_SUB_ROUNDS, clAlloc::Size(), and Uninitialize().

Referenced by Initialize().

bool clRecDecimator::Initialize long  ,
long  ,
const double *  ,
double  = 0.0,
int  = 0
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 110 of file RecDecimator.cc.

References bpHalves, DSP_FILT_DEF_OVERLAP, FFTDecBank, FILTER_TYPE_FFT, FILTER_TYPE_FIR, FILTER_TYPE_IIR, FIRDecBank, IIRDecBank, InitHalves(), clIIRMultiRate::Initialize(), clFIRMultiRate::Initialize(), clFFTMultiRate::Initialize(), iType, lDecSize, lSubRounds, RECDEC_MAX_SUB_ROUNDS, clAlloc::Size(), and Uninitialize().

bool clRecDecimator::Initialize long  ,
long  ,
const float *  ,
float  = 0.0f,
bool  = false
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 147 of file RecDecimator.cc.

References FILTER_TYPE_FFT, FILTER_TYPE_FIR, and Initialize().

bool clRecDecimator::Initialize long  ,
long  ,
const double *  ,
double  = 0.0,
bool  = false
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 159 of file RecDecimator.cc.

References FILTER_TYPE_FFT, FILTER_TYPE_FIR, and Initialize().

void clRecDecimator::Uninitialize  ) 
 

Uninitialize decimator.

Definition at line 171 of file RecDecimator.cc.

References FFTDecBank, FILTER_TYPE_FFT, FILTER_TYPE_FIR, FILTER_TYPE_IIR, FIRDecBank, clAlloc::Free(), IIRDecBank, iType, lSubRounds, clIIRDecimator::Uninitialize(), clFIRDecimator::Uninitialize(), and clFFTDecimator::Uninitialize().

Referenced by Initialize(), and ~clRecDecimator().

void clRecDecimator::Put const float *  ,
long 
 

Feed data into decimator.

Parameters:
SrcData Source data
SrcCount Source data count

Definition at line 195 of file RecDecimator.cc.

References FFTDecBank, FILTER_TYPE_FFT, FILTER_TYPE_FIR, FILTER_TYPE_IIR, FIRDecBank, clIIRDecimator::Get(), clFIRDecimator::Get(), clFFTDecimator::Get(), IIRDecBank, iType, lDecSize, lSubRounds, clIIRDecimator::Put(), clFIRDecimator::Put(), and clFFTDecimator::Put().

void clRecDecimator::Put const double *  ,
long 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 234 of file RecDecimator.cc.

References FFTDecBank, FILTER_TYPE_FFT, FILTER_TYPE_FIR, FILTER_TYPE_IIR, FIRDecBank, clIIRDecimator::Get(), clFIRDecimator::Get(), clFFTDecimator::Get(), IIRDecBank, iType, lDecSize, lSubRounds, clIIRDecimator::Put(), clFIRDecimator::Put(), and clFFTDecimator::Put().

bool clRecDecimator::Get float *  ,
long 
 

Get data from decimator.

Returns false if there's not enough data feeded into the decimator.

Parameters:
DestData Destination buffer
DestCount Number of samples
Returns:
Data was available?

Definition at line 273 of file RecDecimator.cc.

References FFTDecBank, FILTER_TYPE_FFT, FILTER_TYPE_FIR, FILTER_TYPE_IIR, FIRDecBank, clIIRDecimator::Get(), clFIRDecimator::Get(), clFFTDecimator::Get(), IIRDecBank, iType, and lSubRounds.

bool clRecDecimator::Get double *  ,
long 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 288 of file RecDecimator.cc.

References FFTDecBank, FILTER_TYPE_FFT, FILTER_TYPE_FIR, FILTER_TYPE_IIR, FIRDecBank, clIIRDecimator::Get(), clFIRDecimator::Get(), clFFTDecimator::Get(), IIRDecBank, iType, and lSubRounds.


Member Data Documentation

bool clRecDecimator::bInitialized [private]
 

Definition at line 44 of file RecDecimator.hh.

int clRecDecimator::iType [private]
 

Type of filter; 0 = FFT, 1 = FIR, 2 = IIR.

Definition at line 45 of file RecDecimator.hh.

Referenced by clRecDecimator(), Get(), Initialize(), Put(), and Uninitialize().

long clRecDecimator::lFactor [private]
 

Decimation factor.

Definition at line 46 of file RecDecimator.hh.

long clRecDecimator::lFilterSize [private]
 

Size of input buffer.

Definition at line 47 of file RecDecimator.hh.

long clRecDecimator::lSubRounds [private]
 

Number of recursive rounds.

Definition at line 48 of file RecDecimator.hh.

Referenced by clRecDecimator(), Get(), InitHalves(), Initialize(), Put(), and Uninitialize().

long clRecDecimator::lDecSize [private]
 

Size of recursion buffer.

Definition at line 49 of file RecDecimator.hh.

Referenced by Initialize(), and Put().

bool clRecDecimator::bpHalves[RECDEC_MAX_SUB_ROUNDS] [private]
 

Definition at line 50 of file RecDecimator.hh.

Referenced by InitHalves(), and Initialize().

clDSPAlloc clRecDecimator::DecBuf [private]
 

Definition at line 51 of file RecDecimator.hh.

clFFTDecimator clRecDecimator::FFTDecBank[RECDEC_MAX_SUB_ROUNDS] [private]
 

Definition at line 52 of file RecDecimator.hh.

Referenced by Get(), Initialize(), Put(), and Uninitialize().

clFIRDecimator clRecDecimator::FIRDecBank[RECDEC_MAX_SUB_ROUNDS] [private]
 

Definition at line 53 of file RecDecimator.hh.

Referenced by Get(), Initialize(), Put(), and Uninitialize().

clIIRDecimator clRecDecimator::IIRDecBank[RECDEC_MAX_SUB_ROUNDS] [private]
 

Definition at line 54 of file RecDecimator.hh.

Referenced by Get(), Initialize(), Put(), and Uninitialize().


The documentation for this class was generated from the following files:
Generated on Tue Mar 2 19:47:13 2004 for libDSP by doxygen 1.3.6