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::CImageResizerDithererErrdINL< fptype > Class Template Reference

#include <avir.h>

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

Public Member Functions

void dither (fptype *const ResScanline)
 
void init (const int aLen, const CImageResizerVars &aVars, const double aTrMul, const double aPkOut)
 
- Public Member Functions inherited from avir::CImageResizerDithererDefINL< fptype >
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 ()
 
- Static Public Member Functions inherited from avir::CImageResizerDithererDefINL< fptype >
static bool isRecursive ()
 

Protected Attributes

fptype * ResScanlineDith
 
CBuffer< fptype > ResScanlineDith0
 
- Protected Attributes inherited from avir::CImageResizerDithererDefINL< fptype >
int Len
 
int LenE
 
double PkOut0
 
double TrMul0
 
const CImageResizerVarsVars
 

Detailed Description

template<class fptype>
class avir::CImageResizerDithererErrdINL< fptype >

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

This ditherer implements error-diffusion dithering which looks good, and whose results are compressed by PNG well. This implementation uses weighting coefficients obtained via machine optimization and visual evaluation.

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

Member Function Documentation

template<class fptype >
void avir::CImageResizerDithererErrdINL< 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.

Member Data Documentation

template<class fptype >
fptype* avir::CImageResizerDithererErrdINL< fptype >::ResScanlineDith
protected

Error diffusion buffer pointer which skips the first ElCount elements.

template<class fptype >
CBuffer< fptype > avir::CImageResizerDithererErrdINL< fptype >::ResScanlineDith0
protected

Error diffusion buffer.