DCT8x8InvOrSet

Performs inverse DCT on an 8x8 block.

Syntax

IppStatus ippiDCT8x8InvOrSet_16s8u_P2C2(const Ipp8u* pSrcU, const Ipp16s* pSrcV, Ipp8u* pDst, Ipp32s dstStep, Ipp32u flag);

Parameters

pSrcU

Pointer to the source of U(Cb) DCT coefficients

pSrcV

Pointer to the source of V(Cr) DCT coefficients

pDst

Pointer to the destination NV12 plane

dstStep

Step of the current destination block; specifies width of the plane in bytes

flag

Flag that defines function operation. Bits from 2 to 31 are reserved; considers only two low bits.

(flag&0x03) == 0x00

Do inverse DCT for U and V

(flag&0x03) == 0x01

Do inverse DCT for U and SET for V

(flag&0x03) == 0x02

Do SET for U and inverse DCT for V

(flag&0x03) == 0x03

Do SET for U and V

SET means that the destination block is filled with (pSrc[0][0]/8 value for U or (pSrc[1][0]/8 value for V.

Description

The function ippiDCT8x8InvOrSet_16s8u_P2C2 is declared in the ippvc.h file.

This function performs an inverse discrete cosine transform on an 8x8 block and places the results into the chrominance part of NV12 plane. Otherwise, depending on the flag parameter value, the function fills the chrominance part of NV12 plane with constant values.

NV12 Plane:

YY YY YY YY YY YY YY YY UV UV UV UV - chrominance part of NV12 plane.

The code example below illustrates the usage of ippiDCT8x8InvOrSet_16s8u_P2C2 function.

ippiDCT8x8InvOrSet_16s8u_P2C2 Usage Example 

{
    // pSrcU - the pointer to the source of U(Cb) DCT coefficients.
    // pSrcV - the pointer to the source of V (Cr) DCT coefficients.
    const Ipp16s *pSrcU = ptr_to_source_U_block;
    const Ipp16s *pSrcV = ptr_to_source_V_block;
    // pDst    - the pointer to the destination NV12 plane.
    Ipp8u* pDst = ptr_to_dst_plane;
    // dstStep  - Step of the current destination block, specifying width of the plane in bytes.
    Ipp32s dstStep = pitch_of_dst;
    // flag   - Bits from 2 to 31 are reserved. Take into account only two low bits
    // (flag&0x03) == 0x00 - Do iDCT for U and V buffers
    Ipp32u flag = 0;
    ippiDCT8x8InvOrSet_16s8u_P2C2(pSrcU,pSrcV,
                                  pDst,dstStep,flag );
}

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if any of the pointers is NULL.

ippStsStepErr

Indicates an error condition if the step value is negative.


Submit feedback on this help topic

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