Developer Reference

  • 2020
  • 10/21/2020
  • Public Content
Contents

AddProduct

Adds product of pixel values of two source images to floating-point pixel values of an accumulator image.

Syntax

Case 1: In-place operation
IppStatus ippiAddProduct_<mod>
(
const Ipp<srcDatatype>*
pSrc1
,
int
src1Step
,
const Ipp<srcDatatype>*
pSrc2
,
int
src2Step
,
Ipp32f*
pSrcDst
,
int
srcDstStep
,
IppiSize
roiSize
);
Supported values for
mod
:
8u32f_C1IR
16u32f_C1IR
32f_C1IR
Case 2: Masked in-place operation
IppStatus ippiAddProduct_<mod>
(
const Ipp<srcDatatype>*
pSrc1
,
int
src1Step
,
const Ipp<srcDatatype>*
pSrc2
,
int
src2Step
,
const Ipp8u*
pMask
,
int
maskStep
,
Ipp32f*
pSrcDst
,
int
srcDstStep
,
IppiSize
roiSize
);
Supported values for
mod
:
8u32f_C1IMR
16u32f_C1IMR
32f_C1IMR
Include Files
ippcv.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
,
ippi.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
,
ippi.lib
Parameters
pSrc1
,
pSrc2
Pointers to the source images ROI.
src1Step
,
src2Step
Distances in bytes between starts of consecutive lines in the source images.
pMask
Pointer to the mask image.
maskStep
Distance in bytes between starts of consecutive lines in the mask image.
pSrcDst
Pointer to the destination (accumulator) image ROI.
srcDstStep
Distance in bytes between starts of consecutive lines in the accumulator image.
roiSize
Size of the image ROI in pixels.
Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function adds the product of pixel values of two source images
pSrc1
and
pSrc2
to floating-point pixel values of the accumulator image
pSrcDst
as given by:
pSrcDst
(x,y) =
pSrcDst
(x,y) +
pSrc1
(x,y) *
pSrc2
(x,y)
The products of pixel values in case of a masked operation are added only if the respective mask value is nonzero; otherwise, the accumulator pixel value remains unchanged.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when any of the specified pointers is
null
.
ippStsSizeErr
Indicates an error when
roiSize.width
or
roiSize.height
is negative.
ippStsStepErr
Indicates an error if
src1Step
,
src2Step
,
maskStep
, or
srcDdstStep
is less than
roiSize.width * <pixelSize>
.
ippStsNotEvenStepErr
Indicates an error condition if one of step values for floating-point images cannot be divided by 4.

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