Developer Reference for Intel® Integrated Performance Primitives 2018
Scales pixel values of an image and converts them to another bit depth.
Case 1: Not-in-place operation
IppStatus ippiScaleC_<mod>_C1R(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp64f mVal, Ipp64f aVal, Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, IppHintAlgorithm hint);
Supported values for mod:
8u | 8u8s | 8u16u | 8u16s | 8u32s | 8u32f | 8u64f |
8s8u | 8s | 8s16u | 8s16s | 8s32s | 8s32f | 8s64f |
16u8u | 16u8s | 16u | 16u16s | 16u32s | 16u32f | 16u64f |
16s8u | 16s8s | 16s16u | 16s | 16s32s | 16s32f | 16s64f |
32s8u | 32s8s | 32s16u | 32s16s | 32s | 32s32f | 32s64f |
32f8u | 32f8s | 32f16u | 32f16s | 32f32s | 32f | 32f64f |
64f8u | 64f8s | 64f16u | 64f16s | 64f32s | 64f32f | 64f |
where the first value is srcDatatype and the second value is dstDatatype.
Case 2: In-place operation
IppStatus ippiScaleC_<mod>_C1IR(Ipp<datatype>* pSrcDst, int srcDstStep, Ipp64f mVal, Ipp64f aVal, IppiSize roiSize, IppHintAlgorithm alphaType);
Supported values for mod:
8u | 8s | 16u | 16s | 32s | 32f | 64f |
ippi.h
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
pSrc |
Pointer to the source image ROI. |
pSrcDst |
Pointer to the source and destination buffer or an array of pointers to separate source and destination color planes for in-place operation. |
srcDstStep |
Distance, in bytes, between the starting points of consecutive lines in the source and destination image for in-place operation. |
srcStep |
Distance, in bytes, between the starting points of consecutive lines in the source image. |
mVal |
Value of the multiplier used for scaling. |
aVal |
Offset value for scaling. |
pDst |
Pointer to the destination image ROI. |
dstStep |
Distance, in bytes, between the starting bytes of consecutive lines in the destination image. |
roiSize |
Size of the source and destination ROI, in pixels. |
hint |
Option to select the algorithmic implementation of the function. Supported values are ippAlgHintFast (default) and ippAlgHintAccurate. |
This function operates with ROI (see Regions of Interest in Intel IPP).
This function scales pixel values of the source image ROI and converts them to the destination data type according to the following formula:
dst = saturate_to_dstType(src * mVal + aVal)
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error when any of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error when roiSize has a field with a zero or negative value. |
ippStsStepErr |
Indicates an error when the step value is less than, or equal to zero. |