AlphaPremulC
Pre-multiplies pixel values of an image using constant alpha (opacity) values.
Syntax
Case 1: Not-in-place operation
IppStatus ippiAlphaPremulC_<mod>
(
const Ipp<datatype>*
pSrc
,
int
srcStep
,
Ipp<datatype>
alpha
,
Ipp<datatype>*
pDst
,
int
dstStep
,
IppiSize
roiSize
);
Supported values for
mod
:8u_C1R | 16u_C1R |
8u_C3R | 16u_C3R |
8u_C4R | 16u_C4R |
8u_AC4R | 16u_AC4R |
IppStatus ippiAlphaPremulC_<mod>
(
const Ipp<datatype>* const
pSrc
[4]
,
int
srcStep
,
Ipp<datatype>
alpha
,
Ipp<datatype>* const
pDst
[4]
,
int
dstStep
,
IppiSize
roiSize
);
Supported values for
mod
:8u_AP4R | 16u_AP4R |
Case 2: In-place operation
IppStatus ippiAlphaPremulC_<mod>
(
Ipp<datatype>
alpha
,
Ipp<datatype>*
pSrcDst
,
int
srcDstStep
,
IppiSize
roiSize
);
Supported values for
mod
:8u_C1IR | 16u_C1IR |
8u_C3IR | 16u_C3IR |
8u_C4IR | 16u_C4IR |
8u_AC4IR | 16u_AC4IR |
IppStatus ippiAlphaPremulC_<mod>
(
Ipp<datatype>
alpha
,
Ipp<datatype>* const
pSrcDst
[4]
,
int
srcDstStep
,
IppiSize
roiSize
);
Supported values for
mod
:8u_AP4IR | 16u_AP4IR |
Include Files
ippi.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
Parameters
- pSrc
- Pointer to the source image ROI for pixel-order data. An array of pointers to ROI in the separate source color planes in case of planar data.
- srcStep
- Distance in bytes between starts of consecutive lines in the source image.
- pDst
- Pointer to the destination image ROI for pixel-order data. An array of pointers to separate ROI in the destination color planes in case of planar data.
- dstStep
- Distance in bytes between starts of consecutive lines in the destination image.
- pSrcDst
- Pointer to the source and destination image ROI or an array of pointers to ROI in the separate source and destination color planes for the in-place operation.
- srcDstStep
- Distance in bytes between starts of consecutive lines in the source and destination image for the in-place operation.
- roiSize
- Size of the source and destination ROI in pixels.
- alpha
- Global alpha value used for pre-multiplying pixel values.
Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts either a one-, three-, four-channel image or planar RGBA image to the pre-multiplied alpha form, using the global alpha value ; for RGBA (pixel order and planar) images with (r,g,b,a) pixel values, new pixel values are (r*, g*, b*, is the normalized
alpha
. For one-, three-, four-channel image buffers, pixel values in each channel are multiplied by α
α
α
α
alpha
) after execution of this function. Here α
alpha
value in the range 0 to 1.The function
ippiAlphaPremulC
can be used for unsigned pixel data only.Return Values
- ippStsNoErr
- Indicates no error. Any other value indicates an error or a warning.
- ippStsNullPtrErr
- Indicates an error condition if one of the specified pointers isNULL.
- ippStsSizeErr
- Indicates an error condition ifroiSizehas a field with zero or negative value.