Developer Reference

  • 2021
  • 03/26/2021
  • Public Content
Contents

Transpose

Transposes a source image.

Syntax

Case 1: Not-in-place operation
IppStatus ippiTranspose_<mod>
(
const Ipp<datatype>*
pSrc
,
int
srcStep
,
Ipp<datatype>*
pDst
,
int
dstStep
,
IppiSize
roiSize
);
Supported values for
mod
:
8u_C1R
16u_C1R
16s_C1R
32s_C1R
32f_C1R
8u_C3R
16u_C3R
16s_C3R
32s_C3R
32f_C3R
8u_C4R
16u_C4R
16s_C4R
32s_C4R
32f_C4R
Case 2: In-place operation
IppStatus ippiTranspose_<mod>
(
Ipp<datatype>*
pSrcDst
,
int
srcDstStep
,
IppiSize
roiSize
);
Supported values for
mod
:
8u_C1IR
16u_C1IR
16s_C1IR
32s_C1IR
32f_C1IR
8u_C3IR
16u_C3IR
16s_C3IR
32s_C3IR
32f_C3IR
8u_C4IR
16u_C4IR
16s_C4IR
32s_C4IR
32f_C4IR
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.
srcStep
Distance, in bytes, between the starting points of consecutive lines in the source image.
pDst
Pointer to the destination image ROI.
dstStep
Distance, in bytes, between the starting points of consecutive lines in the destination image.
pSrcDst
Pointer to the source and destination ROI for in-place operation.
srcDstStep
Distance, in bytes, between the starting points of consecutive lines in the source and destination image buffer for the in-place operation.
roiSize
Size of the source ROI in pixels.
Description
This function operates with ROI.
This function transposes the source image
pSrc
(
pSrcDst
for in-place flavors) and stores the result in
pDst
(
pSrcDst
). The destination image is obtained from the source image by transforming the columns to the rows:
pDst
(
x
,
y
) =
pSrc
(
y
,
x
)
The parameter
roiSize
is specified for the source image. The value of the
roiSize.width
parameter for the destination image is equal to
roiSize.height
for the source image, and
roiSize.height
for the destination image is equal to
roiSize.width
for the source image.
For in-place operations,
roiSize.width
must be equal to
roiSize.height
.
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
, with the exception of second mode in Case 4.
ippStsSizeErr
Indicates an error when:
  • roiSize
    has a field with a zero or negative value
  • roiSize.width
    is not equal to
    roiSize.height
    for in-place flavors

Example

The code example below shows how to use the
ippiTranspose_8u_C1R
function.
Ipp8u src[8*4] = {1, 2, 3, 4, 8, 8, 8, 8, 1, 2, 3, 4, 8, 8, 8, 8, 1, 2, 3, 4, 8, 8, 8, 8, 1, 2, 3, 4, 8, 8, 8, 8}; Ipp8u dst[4*4]; IppiSize srcRoi = { 4, 4 }; ippiTranspose_8u_C1R ( src, 8, dst, 4, srcRoi );
Result:
1 2 3 4 8 8 8 8 1 2 3 4 8 8 8 8 src 1 2 3 4 8 8 8 8 1 1 1 1 2 2 2 2 3 3 3 3 dst 4 4 4 4

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.