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::CImageResizerDithererErrdDIL< fptype, fptypesimd > Class Template Reference

#include <avir_dil.h>

Public Member Functions

void dither (fptype *const ResScanline)
 
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
 
fptype * ResScanlineDith
 
CBuffer< fptype > ResScanlineDith0
 
double TrMul0
 
const CImageResizerVarsVars
 

Detailed Description

template<class fptype, class fptypesimd>
class avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >

Image resizer's error-diffusion dithering class, de-interleaved mode.

This ditherer implements error-diffusion dithering which looks good, and whose results are compressed by PNG well.

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

Member Function Documentation

template<class fptype , class fptypesimd >
void avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >::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.

Member Data Documentation

template<class fptype , class fptypesimd >
int avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >::Len
protected

Scanline's length in pixels.

template<class fptype , class fptypesimd >
int avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >::LenE
protected

= LenE * ElCount.

template<class fptype , class fptypesimd >
double avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >::PkOut0
protected

Peak output value allowed.

template<class fptype , class fptypesimd >
fptype* avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >::ResScanlineDith
protected

Error propagation buffer pointer which skips the first ElCount elements.

template<class fptype , class fptypesimd >
CBuffer< fptype > avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >::ResScanlineDith0
protected

Error propagation buffer for dithering, first pixel unused.

template<class fptype , class fptypesimd >
double avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >::TrMul0
protected

Bit-depth truncation multiplier.

template<class fptype , class fptypesimd >
const CImageResizerVars* avir::CImageResizerDithererErrdDIL< fptype, fptypesimd >::Vars
protected

Image resizing-related variables.