AVIR
High-quality pro image resizing library
 
Loading...
Searching...
No Matches
avir::CImageResizerDithererErrdDIL< fptype, fptypesimd > Class Template Reference

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

#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
 Scanline's length in pixels.
 
int LenE
 = LenE * ElCount.
 
double PkOut0
 Peak output value allowed.
 
fptype * ResScanlineDith
 Error propagation buffer pointer which skips the first ElCount elements.
 
CBuffer< fptype > ResScanlineDith0
 Error propagation buffer for dithering, first pixel unused.
 
double TrMul0
 Bit-depth truncation multiplier.
 
const CImageResizerVarsVars
 Image resizing-related variables.
 

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

◆ init()

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.