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
-
afptype | Floating 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. |
afptypeatom | The atomic type the "afptype" consists of. |
adith | Ditherer class to use during processing. |