AVIR
High-quality pro image resizing library
 
Loading...
Searching...
No Matches
avir::CFltBuffer Class Reference

Buffer class for parametrized low-pass filter. More...

#include <avir.h>

Inheritance diagram for avir::CFltBuffer:
avir::CBuffer< double >

Public Member Functions

bool operator== (const CFltBuffer &b2) const
 Returns true, if both filters have same parameters.
 
- Public Member Functions inherited from avir::CBuffer< double >
 CBuffer (const CBuffer &Source)
 Completely copies the specified buffer.
 
 CBuffer (const int aCapacity, const int aAlignment=0)
 Creates the buffer with the specified capacity.
 
void alloc (const int aCapacity, const int aAlignment=0)
 Allocates memory so that the specified number of elements can be stored in this buffer object.
 
void forceCapacity (const int NewCapacity)
 "Forces" this buffer to have an arbitary capacity.
 
void free ()
 Deallocates any previously allocated buffer.
 
int getCapacity () const
 Returns the capacity of this element buffer.
 
void increaseCapacity (const int NewCapacity, const bool DoDataCopy=true)
 Reallocates this buffer to a larger size.
 
 operator double * () const
 Returns pointer to the first buffer element.
 
CBufferoperator= (const CBuffer &Source)
 Completely copies the specified buffer.
 
void truncateCapacity (const int NewCapacity)
 "Truncates" (reduces) capacity of this buffer, without reallocating it.
 
void updateCapacity (const int ReqCapacity)
 Increases capacity so that the specified number of elements can be stored.
 

Public Attributes

double Alpha
 Peaked Cosine window function Alpha parameter.
 
double DCGain
 DC gain applied to the filter.
 
double Freq
 Low-pass filter's corner frequency.
 
double Len2
 Half-length (non-truncated) of low-pass filters, in samples (taps).
 

Detailed Description

Buffer class for parametrized low-pass filter.

This class extends the CBuffer< double > class by adding several variables that define a symmetric-odd FIR low-pass filter windowed by Peaked Cosine window function. This class can be used to compare filters without comparing their buffer contents.

Member Function Documentation

◆ operator==()

bool avir::CFltBuffer::operator== ( const CFltBuffer & b2) const

Returns true, if both filters have same parameters.

Parameters
b2Filter buffer to compare this object to.