Developer Reference

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

AddSquare

Adds squared pixel values of a source image to floating-point pixel values of an accumulator image.

Syntax

Case 1: In-place operation
IppStatus ippiAddSquare_<mod>
(
const Ipp<srcDatatype>*
pSrc
,
int
srcStep
,
Ipp32f*
pSrcDst
,
int
srcDstStep
,
IppiSize
roiSize
);
Supported values for
mod
:
8u32f_C1IR
16u32f_C1IR
32f_C1IR
Case 2: Masked in-place operation
IppStatus ippiAddSquare_<mod>
(
const Ipp<srcDatatype>*
pSrc
,
int
srcStep
,
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
pSrc
Pointer to the source image ROI.
srcStep
Distance in bytes between starts of consecutive lines in the source image.
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 squared pixel values of the source image
pSrc
to floating-point pixel values of the accumulator image
pSrcDst
as follows:
pSrcDst
(x,y) =
pSrcDst
(x,y) +
pSrc
(x,y)
2
Addition of the squared pixel values in case of a masked operation is performed only if the respective mask value is nonzero; otherwise, the accumulator pixel value remains unchanged.
Return Values
ippStsNoErr
Indicates no error. Any other value indicates an error or a warning.
ippStsNullPtrErr
Indicates an error condition if any of the specified pointers is
NULL
.
ippStsSizeErr
Indicates an error when
roiSize.width
or
roiSize.height
is negative.
ippStsStepErr
Indicates an error when
srcStep
,
maskStep
, or
srcDstStep
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