AVIR
High-quality pro image resizing library
 All Classes Files Functions Variables Typedefs Macros
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
avir::CImageResizerDithererDefINL< fptype > Class Template Reference

#include <avir.h>

Inheritance diagram for avir::CImageResizerDithererDefINL< fptype >:
avir::CImageResizerDithererErrdINL< fptype >

Public Member Functions

void dither (fptype *const ResScanline) const
 
void init (const int aLen, const CImageResizerVars &aVars, const double aTrMul, const double aPkOut)
 

Static Public Member Functions

static bool isRecursive ()
 

Protected Attributes

int Len
 
int LenE
 
double PkOut0
 
double TrMul0
 
const CImageResizerVarsVars
 

Detailed Description

template<class fptype>
class avir::CImageResizerDithererDefINL< fptype >

Image resizer's default dithering class.

This class defines an object that performs rounding, clipping and dithering operations over horizontal scanline pixels before scanline is stored in the output buffer.

The ditherer should expect the same storage order of the pixels in a scanline as used in the "filtering step" class. So, a separate ditherer class should be defined for each scanline pixel storage style. The default ditherer implements a simple rounding without dithering: it can be used for an efficient dithering method which can be multi-threaded.

Template Parameters
fptypeFloating point type to use for storing pixel data. SIMD types can be used.

Member Function Documentation

template<class fptype >
void avir::CImageResizerDithererDefINL< fptype >::dither ( fptype *const  ResScanline) const

Function performs rounding and clipping operations.

Parameters
ResScanlineThe buffer containing the final scanline.
template<class fptype >
void avir::CImageResizerDithererDefINL< fptype >::init ( const int  aLen,
const CImageResizerVars aVars,
const double  aTrMul,
const double  aPkOut 
)

Function initializes the ditherer object.

Parameters
aLenScanline length in pixels to process.
aVarsImage resizing-related variables.
aTrMulBit-depth truncation multiplier. 1 - no additional truncation.
aPkOutPeak output value allowed.
template<class fptype >
static bool avir::CImageResizerDithererDefINL< fptype >::isRecursive ( )
static
Returns
"True" if dithering is recursive relative to scanlines meaning multi-threaded execution is not supported by this dithering method.

Member Data Documentation

template<class fptype >
int avir::CImageResizerDithererDefINL< fptype >::Len
protected

Scanline's length in pixels.

template<class fptype >
int avir::CImageResizerDithererDefINL< fptype >::LenE
protected

= LenE * ElCount.

template<class fptype >
double avir::CImageResizerDithererDefINL< fptype >::PkOut0
protected

Peak output value allowed.

template<class fptype >
double avir::CImageResizerDithererDefINL< fptype >::TrMul0
protected

Bit-depth truncation multiplier.

template<class fptype >
const CImageResizerVars* avir::CImageResizerDithererDefINL< fptype >::Vars
protected

Image resizing-related variables.