#include <Filter.hh>
Inheritance diagram for clFilter:
Public Member Functions | |
clFilter () | |
~clFilter () | |
bool | Initialize (long, const float *, float=DSP_FILT_DEF_OVERLAPF, float=DSP_FILT_DEF_BETAF, int=FILTER_SMOOTH_DOLPH_CHEBYSHEV) |
Initialize filter. | |
bool | Initialize (long, const double *, double=DSP_FILT_DEF_OVERLAP, double=DSP_FILT_DEF_BETA, int=FILTER_SMOOTH_DOLPH_CHEBYSHEV) |
bool | InitFloat (long) |
bool | InitDouble (long) |
bool | InitializeLP (float, float, float, float=DSP_FILT_DEF_OVERLAPF) |
Initialize low-pass or high-pass filter. | |
bool | InitializeLP (double, double, double, double=DSP_FILT_DEF_OVERLAP) |
bool | InitializeHP (float, float, float, float=DSP_FILT_DEF_OVERLAPF) |
bool | InitializeHP (double, double, double, double=DSP_FILT_DEF_OVERLAP) |
void | Uninitialize () |
Uninitialize filter. | |
void | SetCoeffs (const float *) |
Set coefficients. | |
void | SetCoeffs (const double *) |
void | SetCoeffs (const stpSCplx, bool=false) |
void | SetCoeffs (const stpDCplx, bool=false) |
void | GetCoeffs (float *) |
Get coefficients. | |
void | GetCoeffs (double *) |
void | GetCoeffs (stpSCplx) |
void | GetCoeffs (stpDCplx) |
long | GetDelay () |
Get filter delay in samples. | |
void | Put (const float *, long) |
Feed data into filter. | |
void | Put (const double *, long) |
void | Put (const float *, long, const stpSCplx) |
Feed data into filter using complex coefficients. | |
void | Put (const double *, long, const stpDCplx) |
bool | Get (float *, long) |
Get data from filter. | |
bool | Get (double *, long) |
void | DesignLP (float *, bool=false) |
Design low-pass filter. | |
void | DesignLP (double *, bool=false) |
void | DesignLP (float *, float, bool=false) |
void | DesignLP (double *, double, bool=false) |
void | DesignHP (float *) |
Design high-pass filter. | |
void | DesignHP (double *) |
void | DesignHP (float *, float) |
void | DesignHP (double *, double) |
void | DesignBP (float *, float *) |
Design band-pass filter. | |
void | DesignBP (double *, double *) |
void | DesignBP (float *, float *, float) |
void | DesignBP (double *, double *, double) |
void | DesignBR (float *, float *) |
Design band-reject filter. | |
void | DesignBR (double *, double *) |
void | DesignBR (float *, float *, float) |
void | DesignBR (double *, double *, double) |
Private Member Functions | |
void | InitCoeffsS () |
Initialize complex coefficients. | |
void | InitCoeffsD () |
void | ReadyFilterS () |
Create complex impulse response from specified frequency response. | |
void | ReadyFilterD () |
float | GetKaiserBeta (float fAlpha) |
Calculate beta value for Kaiser window. | |
double | GetKaiserBeta (double dAlpha) |
Private Attributes | |
bool | bInitialized |
long | lFFTSize |
long | lHalfSize |
long | lOldSize |
long | lNewSize |
long | lSpectPoints |
clDSPAlloc | CoeffWin |
clDSPAlloc | Prev |
clDSPAlloc | Proc |
clDSPAlloc | CCoeffs |
clDSPAlloc | CProc |
clReBuffer | InBuf |
clReBuffer | OutBuf |
Filtering is done in complex-plane.
Definition at line 47 of file Filter.hh.
|
|
|
Definition at line 131 of file Filter.cc. References Uninitialize(). |
|
Initialize complex coefficients.
Definition at line 35 of file Filter.cc. References CCoeffs, _sSCplx::I, lSpectPoints, _sSCplx::R, ReadyFilterS(), and stpSCplx. Referenced by Initialize(). |
|
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 49 of file Filter.cc. References CCoeffs, _sDCplx::I, lSpectPoints, _sDCplx::R, ReadyFilterD(), and stpDCplx. Referenced by Initialize(). |
|
Create complex impulse response from specified frequency response.
This is done by doing Definition at line 63 of file Filter.cc. References CCoeffs, CoeffWin, clDSPOp::FFTi(), clDSPOp::IFFTo(), clDSPOp::Mul(), Proc, and stpSCplx. Referenced by InitCoeffsS(), and SetCoeffs(). |
|
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 76 of file Filter.cc. References CCoeffs, CoeffWin, clDSPOp::FFTi(), clDSPOp::IFFTo(), clDSPOp::Mul(), Proc, and stpDCplx. Referenced by InitCoeffsD(), and SetCoeffs(). |
|
Calculate beta value for Kaiser window.
Definition at line 89 of file Filter.cc. Referenced by InitializeHP(), and InitializeLP(). |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Initialize filter.
Definition at line 137 of file Filter.cc. References CCoeffs, CoeffWin, clDSPOp::Convert(), clDSPOp::Copy(), CProc, clDSPOp::FFTInitialize(), FILTER_SMOOTH_DOLPH_CHEBYSHEV, FILTER_SMOOTH_KAISER, FILTER_SMOOTH_KAISER_BESSEL, FILTER_SMOOTH_NONE, InitCoeffsS(), lHalfSize, lNewSize, lOldSize, lSpectPoints, Prev, Proc, clDSPOp::Set(), SetCoeffs(), clAlloc::Size(), stSCplx, Uninitialize(), clDSPOp::WinDolphChebyshev(), clDSPOp::WinKaiser(), clDSPOp::WinKaiserBessel(), and clDSPOp::Zero(). Referenced by InitDouble(), InitFloat(), clFFTMultiRate::Initialize(), InitializeHP(), and InitializeLP(). |
|
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 196 of file Filter.cc. References CCoeffs, CoeffWin, clDSPOp::Copy(), CProc, clDSPOp::FFTInitialize(), FILTER_SMOOTH_DOLPH_CHEBYSHEV, FILTER_SMOOTH_KAISER, FILTER_SMOOTH_KAISER_BESSEL, FILTER_SMOOTH_NONE, InitCoeffsD(), lHalfSize, lNewSize, lOldSize, lSpectPoints, Prev, Proc, clDSPOp::Set(), SetCoeffs(), clAlloc::Size(), stDCplx, Uninitialize(), clDSPOp::WinDolphChebyshev(), clDSPOp::WinKaiser(), clDSPOp::WinKaiserBessel(), and clDSPOp::Zero(). |
|
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 251 of file Filter.cc. References Initialize(). |
|
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 259 of file Filter.cc. References Initialize(). |
|
Initialize low-pass or high-pass filter.
Definition at line 267 of file Filter.cc. References DesignLP(), FILTER_SMOOTH_KAISER, GetKaiserBeta(), and Initialize(). Referenced by clFFTMultiRate::Initialize(). |
|
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 295 of file Filter.cc. References DesignLP(), FILTER_SMOOTH_KAISER, GetKaiserBeta(), and Initialize(). |
|
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 323 of file Filter.cc. References DesignHP(), FILTER_SMOOTH_KAISER, GetKaiserBeta(), and Initialize(). Referenced by clFFTMultiRate::Initialize(). |
|
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 351 of file Filter.cc. References DesignHP(), FILTER_SMOOTH_KAISER, GetKaiserBeta(), and Initialize(). |
|
Uninitialize filter.
Definition at line 379 of file Filter.cc. References CCoeffs, clReBuffer::Clear(), CoeffWin, CProc, clDSPOp::FFTUninitialize(), clAlloc::Free(), InBuf, OutBuf, Prev, and Proc. Referenced by Initialize(), clFFTMultiRate::Uninitialize(), and ~clFilter(). |
|
Set coefficients. You can feed the filter with desired frequency response. Length of this dataset is specified window size / 2 + 1. Filter is then created from this coefficient vector.
Definition at line 392 of file Filter.cc. References CCoeffs, _sSCplx::I, lSpectPoints, _sSCplx::R, ReadyFilterS(), and stpSCplx. Referenced by DesignBP(), DesignBR(), DesignHP(), DesignLP(), and Initialize(). |
|
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 406 of file Filter.cc. References CCoeffs, _sDCplx::I, lSpectPoints, _sDCplx::R, ReadyFilterD(), and stpDCplx. |
|
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 420 of file Filter.cc. References CCoeffs, clDSPOp::Copy(), lSpectPoints, ReadyFilterS(), and stpSCplx. |
|
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 429 of file Filter.cc. References CCoeffs, clDSPOp::Copy(), lSpectPoints, ReadyFilterD(), and stpDCplx. |
|
Get coefficients. Get filter's frequency response.
Definition at line 438 of file Filter.cc. References CCoeffs, lSpectPoints, _sSCplx::R, and stpSCplx. |
|
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 450 of file Filter.cc. References CCoeffs, lSpectPoints, _sDCplx::R, and stpDCplx. |
|
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 462 of file Filter.cc. References CCoeffs, clDSPOp::Copy(), lSpectPoints, and stpSCplx. |
|
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 470 of file Filter.cc. References CCoeffs, clDSPOp::Copy(), lSpectPoints, and stpDCplx. |
|
Get filter delay in samples. Delay caused by the filter in number of samples.
Definition at line 478 of file Filter.cc. References lOldSize. |
|
Feed data into filter.
Filtering is done by first doing
Definition at line 484 of file Filter.cc. References CCoeffs, clDSPOp::Copy(), CProc, clDSPOp::FFTi(), clReBuffer::Get(), clDSPOp::IFFTo(), InBuf, lNewSize, lOldSize, lSpectPoints, clDSPOp::Mul(), OutBuf, Prev, Proc, clReBuffer::Put(), and stpSCplx. Referenced by clFFTInterpolator::Put(), and clFFTDecimator::Put(). |
|
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 506 of file Filter.cc. References CCoeffs, clDSPOp::Copy(), CProc, clDSPOp::FFTi(), clReBuffer::Get(), clDSPOp::IFFTo(), InBuf, lNewSize, lOldSize, lSpectPoints, clDSPOp::Mul(), OutBuf, Prev, Proc, clReBuffer::Put(), and stpDCplx. |
|
Feed data into filter using complex coefficients.
Definition at line 528 of file Filter.cc. References clDSPOp::Copy(), CProc, clDSPOp::FFTi(), clReBuffer::Get(), clDSPOp::IFFTo(), InBuf, lNewSize, lOldSize, lSpectPoints, clDSPOp::Mul(), OutBuf, Prev, Proc, clReBuffer::Put(), and stpSCplx. |
|
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 550 of file Filter.cc. References clDSPOp::Copy(), CProc, clDSPOp::FFTi(), clReBuffer::Get(), clDSPOp::IFFTo(), InBuf, lNewSize, lOldSize, lSpectPoints, clDSPOp::Mul(), OutBuf, Prev, Proc, clReBuffer::Put(), and stpDCplx. |
|
Get data from filter.
Definition at line 572 of file Filter.cc. References clReBuffer::Get(), and OutBuf. Referenced by clFFTInterpolator::Get(), and clFFTDecimator::Get(). |
|
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 578 of file Filter.cc. References clReBuffer::Get(), and OutBuf. |
|
Design low-pass filter.
Definition at line 584 of file Filter.cc. References lSpectPoints, clDSPOp::Set(), SetCoeffs(), and clDSPOp::Zero(). Referenced by DesignLP(), clFFTMultiRate::Initialize(), and InitializeLP(). |
|
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 600 of file Filter.cc. References lSpectPoints, clDSPOp::Set(), SetCoeffs(), and clDSPOp::Zero(). |
|
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 616 of file Filter.cc. References DesignLP(). |
|
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 628 of file Filter.cc. References DesignLP(). |
|
Design high-pass filter.
Definition at line 640 of file Filter.cc. References lSpectPoints, clDSPOp::Set(), SetCoeffs(), and clDSPOp::Zero(). Referenced by DesignHP(), clFFTMultiRate::Initialize(), and InitializeHP(). |
|
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 655 of file Filter.cc. References lSpectPoints, clDSPOp::Set(), SetCoeffs(), and clDSPOp::Zero(). |
|
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 670 of file Filter.cc. References DesignHP(). |
|
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 682 of file Filter.cc. References DesignHP(). |
|
Design band-pass filter.
Definition at line 694 of file Filter.cc. References lSpectPoints, clDSPOp::Set(), SetCoeffs(), and clDSPOp::Zero(). Referenced by DesignBP(). |
|
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 712 of file Filter.cc. References lSpectPoints, clDSPOp::Set(), SetCoeffs(), and clDSPOp::Zero(). |
|
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 730 of file Filter.cc. References DesignBP(). |
|
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 746 of file Filter.cc. References DesignBP(). |
|
Design band-reject filter.
Definition at line 762 of file Filter.cc. References lSpectPoints, clDSPOp::Set(), SetCoeffs(), and clDSPOp::Zero(). Referenced by DesignBR(). |
|
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 780 of file Filter.cc. References lSpectPoints, clDSPOp::Set(), SetCoeffs(), and clDSPOp::Zero(). |
|
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 798 of file Filter.cc. References DesignBR(). |
|
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 814 of file Filter.cc. References DesignBR(). |
|
|
|
|
|
Definition at line 51 of file Filter.hh. Referenced by Initialize(). |
|
Definition at line 52 of file Filter.hh. Referenced by GetDelay(), Initialize(), and Put(). |
|
Definition at line 53 of file Filter.hh. Referenced by Initialize(), and Put(). |
|
Definition at line 54 of file Filter.hh. Referenced by DesignBP(), DesignBR(), DesignHP(), DesignLP(), GetCoeffs(), InitCoeffsD(), InitCoeffsS(), Initialize(), Put(), and SetCoeffs(). |
|
Definition at line 55 of file Filter.hh. Referenced by Initialize(), ReadyFilterD(), ReadyFilterS(), and Uninitialize(). |
|
Definition at line 56 of file Filter.hh. Referenced by Initialize(), Put(), and Uninitialize(). |
|
Definition at line 57 of file Filter.hh. Referenced by Initialize(), Put(), ReadyFilterD(), ReadyFilterS(), and Uninitialize(). |
|
Definition at line 58 of file Filter.hh. Referenced by GetCoeffs(), InitCoeffsD(), InitCoeffsS(), Initialize(), Put(), ReadyFilterD(), ReadyFilterS(), SetCoeffs(), and Uninitialize(). |
|
Definition at line 59 of file Filter.hh. Referenced by Initialize(), Put(), and Uninitialize(). |
|
Definition at line 60 of file Filter.hh. Referenced by Put(), and Uninitialize(). |
|
Definition at line 61 of file Filter.hh. Referenced by Get(), Put(), and Uninitialize(). |