AVIR
High-quality pro image resizing library
 All Classes Files Functions Variables Typedefs Macros
Public Types | Static Public Attributes | List of all members
avir::fpclass_def< afptype, afptypeatom, adith > Class Template Reference

#include <avir.h>

Public Types

typedef adith CDitherer
 
typedef
CImageResizerFilterStepINL
< fptype, fptypeatom
CFilterStep
 
typedef afptype fptype
 
typedef afptypeatom fptypeatom
 

Static Public Attributes

static const int elalign = 1
 
static const int fpalign = sizeof( fptype )
 
static const int fppack = sizeof( fptype ) / sizeof( fptypeatom )
 
static const int packmode = 0
 

Detailed Description

template<class afptype, class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
class avir::fpclass_def< afptype, afptypeatom, adith >

Floating-point processing definition and abstraction class.

This class defines several constants and typedefs that point to classes that should be used by the image resizing algorithm. Such "definition class" can be used to define alternative scanline processing algorithms (e.g. SIMD) and image scanline packing styles used during processing. This class also offers an abstraction layer for dithering, rounding and clamping (saturation) operation.

The fpclass_def class can be used to define processing using both SIMD and non-SIMD types, but using algorithms that operate on interleaved pixels, and which are non-SIMD optimized themselves.

Template Parameters
afptypeFloating point type to use for storing intermediate data and variables. For variables that are not used in intensive calculations the "double" type is always used. On the latest Intel processors (like i7-4770K) there is almost no performance difference between "double" and "float". Image quality differences between "double" and "float" are not apparent on 8-bit images. At the same time the "float" uses half amount of working memory the "double" type uses. SIMD types can be used. The functions round() and clamp() in the "avir" or other visible namespace should be available for the specified type. SIMD types allow to perform resizing of images with more than 4 channels, to be exact 4 * SIMD element number (e.g. 16 for float4), without modification of the image resizing algorithm required.
afptypeatomThe atomic type the "afptype" consists of.
adithDitherer class to use during processing.

Member Typedef Documentation

template<class afptype , class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
typedef adith avir::fpclass_def< afptype, afptypeatom, adith >::CDitherer

Ditherer class to use during processing.

template<class afptype , class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
typedef CImageResizerFilterStepINL< fptype, fptypeatom > avir::fpclass_def< afptype, afptypeatom, adith >::CFilterStep

Filtering step class to use during processing.

template<class afptype , class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
typedef afptype avir::fpclass_def< afptype, afptypeatom, adith >::fptype

Floating-point type to use during processing.

template<class afptype , class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
typedef afptypeatom avir::fpclass_def< afptype, afptypeatom, adith >::fptypeatom

Atomic type "fptype" consists of.

Member Data Documentation

template<class afptype , class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
const int avir::fpclass_def< afptype, afptypeatom, adith >::elalign = 1
static

Length alignment of arrays of elements. This applies to filters and intermediate buffers: this constant forces filters and scanlines to have a length which is a multiple of this value, for more efficient SIMD implementation.

template<class afptype , class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
const int avir::fpclass_def< afptype, afptypeatom, adith >::fpalign = sizeof( fptype )
static

Suggested alignment size in bytes. This is not a required alignment, because image resizing algorithm cannot be made to have a strictly aligned data access at all steps (e.g. interpolation cannot perform aligned accesses).

template<class afptype , class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
const int avir::fpclass_def< afptype, afptypeatom, adith >::fppack = sizeof( fptype ) / sizeof( fptypeatom )
static

The number of atomic types stored in a single "fptype" element.

template<class afptype , class afptypeatom = afptype, class adith = CImageResizerDithererDefINL< afptype >>
const int avir::fpclass_def< afptype, afptypeatom, adith >::packmode = 0
static

0 if interleaved packing, 1 if de-interleaved.