#include <avir.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 |
int | LenE |
double | PkOut0 |
double | TrMul0 |
const CImageResizerVars * | Vars |
Image resizer's default 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.
The ditherer should expect the same storage order of the pixels in a scanline as used in the "filtering step" class. So, a separate ditherer class should be defined for each scanline pixel storage style. The default ditherer implements a simple rounding without dithering: it can be used for an efficient dithering method which can be multi-threaded.
fptype | Floating point type to use for storing pixel data. SIMD types can be used. |
void avir::CImageResizerDithererDefINL< fptype >::dither | ( | fptype *const | ResScanline | ) | const |
Function performs rounding and clipping operations.
ResScanline | The buffer containing the final scanline. |
void avir::CImageResizerDithererDefINL< 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. |
|
static |
|
protected |
Scanline's length in pixels.
|
protected |
= LenE * ElCount.
|
protected |
Peak output value allowed.
|
protected |
Bit-depth truncation multiplier.
|
protected |
Image resizing-related variables.