RCTFwd_JPEG2K

Performs forward reversible component transformation.

Syntax

Case 1: Operation on pixel-order data

IppStatus ippiRCTFwd_JPEG2K_32s_C3P3R(const Ipp32s* pSrc, int srcStep, Ipp32s* pDst[3], int dstStep, IppiSize roiSize);

Case 2: In-place operation on planar data

IppStatus ippiRCTFwd_JPEG2K_32s_P3IR(Ipp32s* pSrcDst[3], int srcDstStep, IppiSize roiSize);

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 array of pointers to ROIs in the planes of the destination image.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

pSrcDst

Pointer to the array of pointers to the source and destination image ROIs for the in-place operation.

dstSrcStep

Distance in bytes between starts of consecutive lines in the source and destination image buffer for the in-place operation.

roiSize

Size of the source and destination ROI in pixels.

Description

The function ippiRCTFwd_JPEG2K is declared in the ippj.h file. It operates with ROI (see Regions of Interest in Intel IPP).

This function performs forward reversible component transformation (RCT) of the image buffer pSrc. The RCT is applied to all image component samples I0, I1, I2, corresponding to the first, second, and third components, and produces the transform samples Y0, Y1, Y2 in accordance with the following formulas:

where the notation

designates the floor function, that is, the largest integer not exceeding x.

Example “Using the function ippiRCTFwd_JPEG2K” shows how to use the function ippiRCTFwd_JPEG2K_32s_C3P3R.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or negative value.

ippStsStepErr

Indicates an error condition if any of the specified buffer step values is zero or negative.

Using the function ippiRCTFwd_JPEG2K

void func_RCTFwd_JPEG2K()
{
    Ipp32s pSrc[(3*2)*4] = {1, 5, 2, 5, 1, 2, 
                            3, 1, 2, 6, 2, 1, 
                            1, 3, 5, 3, 3, 1,
                            2, 3, 1, 4, 2, 3};
    int srcStep = (3*2)*sizeof(Ipp32s);
    IppiSize  roiSize = {2, 4};
 
    Ipp32s* pDst[3];
    int dstStep;
 
    pDst[0] = ippiMalloc_32s_C1(roiSize.width, roiSize.height, &dstStep);
    pDst[1] = ippiMalloc_32s_C1(roiSize.width, roiSize.height, &dstStep);
    pDst[2] = ippiMalloc_32s_C1(roiSize.width, roiSize.height, &dstStep);
		
    ippiRCTFwd_JPEG2K_32s_C3P3R(pSrc, srcStep, pDst, dstStep, roiSize);
}
Result:
        pDst[0]             pDst[1]        pDst[2]
         3  2               -3   1          -4  4  
         1  2                1  -1           2  4  
         3  2                2  -2          -2  0  
         2  2               -2   1          -1  2
 

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.