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

Image resizer's default de-interleaved dithering class. More...

#include <avir_dil.h>

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
 Scanline's length in pixels.
 
int LenE
 = LenE * ElCount.
 
double PkOut0
 Peak output value allowed.
 
double TrMul0
 Bit-depth truncation multiplier.
 
const CImageResizerVarsVars
 Image resizing-related variables.
 

Detailed Description

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

Image resizer's default de-interleaved 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.

This ditherer implementation uses de-interleaved SIMD algorithm.

Template Parameters
fptypeFloating point type to use for storing pixel data. SIMD types cannot be used.
fptypesimdThe SIMD type used to store a pack of "fptype" values.

Member Function Documentation

◆ dither()

template<class fptype, class fptypesimd>
void avir::CImageResizerDithererDefDIL< fptype, fptypesimd >::dither ( fptype *const ResScanline) const

Function performs rounding and clipping operations.

Parameters
ResScanlineThe buffer containing the final scanline.

◆ init()

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

◆ isRecursive()

template<class fptype, class fptypesimd>
static bool avir::CImageResizerDithererDefDIL< fptype, fptypesimd >::isRecursive ( )
static
Returns
"True" if dithering is recursive relative to scanlines meaning multi-threaded execution is not supported by this dithering method.