Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

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
alpha
. For one-, three-, four-channel image buffers, pixel values in each channel are multiplied by
α
; for RGBA (pixel order and planar) images with (r,g,b,a) pixel values, new pixel values are (r*
α
, g*
α
, b*
α
,
alpha
) after execution of this function. Here
α
is the normalized
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 is
NULL
.
ippStsSizeErr
Indicates an error condition if
roiSize
has a field with zero or negative value.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804