Developer Reference

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

CopyWrapBorder

Copies pixels values between two images and adds the border pixels.

Syntax

Case 1: Not-in-place operation
IppStatus ippiCopyWrapBorder_32s_C1R
(
const
Ipp32s*
pSrc
,
int
srcStep
,
IppiSize
srcRoiSize
,
Ipp32s*
pDst
,
int
dstStep
,
IppiSize
dstRoiSize
,
int
topBorderHeight
,
int
leftBorderWidth
);
IppStatus ippiCopyWrapBorder_32f_C1R
(
const
Ipp32f*
pSrc
,
int
srcStep
,
IppiSize
srcRoiSize
,
Ipp32f*
pDst
,
int
dstStep
,
IppiSize
dstRoiSize
,
int
topBorderHeight
,
int
leftBorderWidth
);
Case 2: In-place operation
IppStatus ippiCopyWrapBorder_32s_C1IR
(
const
Ipp32s*
pSrc
,
int
srcDstStep
,
IppiSize
srcRoiSize
,
IppiSize
dstRoiSize
,
int
topBorderHeight
,
int
leftBorderWidth
);
IppStatus ippiCopyWrapBorder_32f_C1IR
(
const
Ipp32f*
pSrc
,
int
srcDstStep
,
IppiSize
srcRoiSize
,
IppiSize
dstRoiSize
,
int
topBorderHeight
,
int
leftBorderWidth
);
Case 3: Not-in-place operation with platform-aware functions
IppStatus ippiCopyWrapBorder_32s_C1R_L(const Ipp32s*
pSrc
, IppSizeL
srcStep
, IppiSizeL
srcRoiSize
, Ipp32s*
pDst
, IppSizeL
dstStep
, IppiSizeL
dstRoiSize
, IppSizeL
topBorderHeight
, IppSizeL
leftBorderWidth
);
IppStatus ippiCopyWrapBorder_32f_C1R_L(const Ipp32f*
pSrc
, IppSizeL
srcStep
, IppiSizeL
srcRoiSize
, Ipp32f*
pDst
, IppSizeL
dstStep
, IppiSizeL
dstRoiSize
, IppSizeL
topBorderHeight
, IppSizeL
leftBorderWidth
);
Case 4: In-place operation with platform-aware functions
IppStatus ippiCopyWrapBorder_32s_C1IR_L(const Ipp32s*
pSrc
, IppSizeL
srcDstStep
, IppiSizeL
srcRoiSize
, IppiSizeL
dstRoiSize
, IppSizeL
topBorderHeight
, IppSizeL
leftBorderWidth
);
IppStatus ippiCopyWrapBorder_32f_C1IR_L(const Ipp32f*
pSrc
, IppSizeL
srcDstStep
, IppiSizeL
srcRoiSize
, IppiSizeL
dstRoiSize
, IppSizeL
topBorderHeight
, IppSizeL
leftBorderWidth
);
Include Files
ippi.h
Flavors with the
_L
suffix:
ippi_l.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.
srcStep
Distance in bytes between starts of consecutive lines in the source image.
pDst
Pointer to the destination image ROI.
dstStep
Distance in bytes between starts of consecutive lines in the destination image.
srcDstStep
Distance in bytes between starts of consecutive lines in the source and destination image for in-place flavor.
srcRoiSize
Size of the source ROI in pixels.
dstRoiSize
Size of the destination ROI in pixels.
topBorderHeight
Height of the top border in pixels.
leftBorderWidth
Width of the left border in pixels.
Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function copies the source image
pSrc
to the destination image
pDst
and fills pixels ("border") outside the copied area in the destination image with the values of the source image pixels according to the scheme illustrated in Figure Creating a Border of Pixels by ippiCopyWrapBorder Function. Squares marked in red correspond to pixels copied from the source image.
Note that the in-place function flavor actually adds border pixels to the source image ROI, thus a destination image ROI is larger than the initial image.
The parameters
topBorderHeight
and
leftBorderWidth
specify the position of the first pixel of the source ROI in the destination image ROI.
Creating a Border of Pixels by ippiCopyWrapBorder Function
The height (width) of the destination ROI cannot be less than the sum of the height (width) of source ROI and the
topBorderHeight
(
leftBorderWidth
) parameter.
Return Values
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 condition if
srcRoiSize
or
dstRoiSize
has a field with a zero or negative value, or
topBorderHeight
or
leftBorderWidth
is less than zero, or
dstRoiSize.width
<
srcRoiSize.width
+
leftBorderWidth
, or
dstRoiSize.height
<
srcRoiSize.height
+
topBorderHeight
.
ippStsStepErr
Indicates an error condition if
srcStep
or
dstStep
has a zero or negative value.
ippStsNotEvenStepErr
Indicates an error condition if one of the step values is not divisible by 4 for floating point images, or by 2 for short integer images.

Example

The code example below shows how to use the
ippiCopyWrapBorder_32s_C1R
function.
Ipp32s src[8*4] = { 5, 4, 3, 4, 5, 8, 8, 8, 3, 2, 1, 2, 3, 8, 8, 8, 3, 2, 1, 2, 3, 8, 8, 8, 5, 4, 3, 4, 5, 8, 8, 8 }; Ipp32s dst[9*8]; IppiSize srcRoi = { 5, 4 }; IppiSize dstRoi = { 9, 8 }; int topborderHeight = 2; int leftborderWidth = 2; ippiCopyWrapBorder_32s_C1R (src, 8*sizeof(Ipp32s), srcRoi, dst, 9*sizeof(Ipp32s), dstRoi, topBorderHeight, leftBorderWidth);
Results source image: 5 4 3 4 5 8 8 8 3 2 1 2 3 8 8 8 3 2 1 2 3 8 8 8 5 4 3 4 5 8 8 8 destination image: 2 3 3 2 1 2 3 3 2 4 5 5 4 3 4 5 5 4 4 5 5 4 3 4 5 5 4 2 3 3 2 1 2 3 3 2 2 3 3 2 1 2 3 3 2 4 5 5 4 3 4 5 5 4 4 5 5 4 3 4 5 5 4 2 3 3 2 1 2 3 3 2

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