AVIR
High-quality pro image resizing library
 All Classes Files Functions Variables Typedefs Macros
Public Member Functions | Public Attributes | List of all members
avir::CDSPPeakedCosineLPF Class Reference

#include <avir.h>

Public Member Functions

 CDSPPeakedCosineLPF (const double aLen2, const double aFreq2, const double aAlpha)
 
template<class T >
void generateLPF (T *op, const double DCGain)
 

Public Attributes

int FilterLen
 
int fl2
 

Detailed Description

Low-pass filter windowed by Peaked Cosine window function.

This class implements calculation of linear-phase symmetric-odd FIR low-pass filter windowed by the Peaked Cosine window function, for image processing applications.

Constructor & Destructor Documentation

avir::CDSPPeakedCosineLPF::CDSPPeakedCosineLPF ( const double  aLen2,
const double  aFreq2,
const double  aAlpha 
)

Constructor initalizes *this object.

Parameters
aLen2Half-length (non-truncated) of low-pass filter, in samples (taps).
aFreq2Low-pass filter's corner frequency [0; pi].
aAlphaPeaked Cosine window function Alpha parameter.

Member Function Documentation

template<class T >
void avir::CDSPPeakedCosineLPF::generateLPF ( T *  op,
const double  DCGain 
)

Function generates a linear-phase low-pass filter windowed by Peaked Cosine window function.

Parameters
[out]opOutput buffer, length = FilterLen (fl2 * 2 + 1).
DCGainRequired gain at DC. The resulting filter will be normalized to achieve this DC gain. If non-positive, no automatic normalization will be performed.

Member Data Documentation

int avir::CDSPPeakedCosineLPF::FilterLen

Filter's length in samples (taps).

int avir::CDSPPeakedCosineLPF::fl2

Half filter's length, excluding the peak value. This value can be also used as filter's latency in samples (taps).