Image resizer's error-diffusion dithering class, interleaved mode. More...
#include <avir.h>
Public Member Functions | |
void | dither (fptype *const ResScanline) |
void | init (const int aLen, const CImageResizerVars &aVars, const double aTrMul, const double aPkOut) |
![]() | |
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 bool | isRecursive () |
Protected Attributes | |
fptype * | ResScanlineDith |
Error diffusion buffer pointer which skips the first ElCount elements. | |
CBuffer< fptype > | ResScanlineDith0 |
Error diffusion buffer. | |
![]() | |
int | Len |
Scanline's length in pixels. | |
int | LenE |
= LenE * ElCount. | |
double | PkOut0 |
Peak output value allowed. | |
double | TrMul0 |
Bit-depth truncation multiplier. | |
const CImageResizerVars * | Vars |
Image resizing-related variables. | |
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.
fptype | Floating point type to use for storing pixel data. SIMD types can be used. |
void avir::CImageResizerDithererErrdINL< fptype >::init | ( | const int | aLen, |
const CImageResizerVars & | aVars, | ||
const double | aTrMul, | ||
const double | aPkOut ) |
Function initializes the ditherer object.
aLen | Scanline length in pixels to process. |
aVars | Image resizing-related variables. |
aTrMul | Bit-depth truncation multiplier. 1 - no additional truncation. |
aPkOut | Peak output value allowed. |