ReconstructChromaInter4x4MB_H264, ReconstructChromaInter4x4_H264High

Reconstruct 4X4 inter chroma macroblock for high profile.

Syntax

IppStatus ippiReconstructChromaInter4x4MB_H264_16s8u_P2R(Ipp16s** ppSrcDstCoeff, Ipp8u* pSrcDstUPlane, Ipp8u* pSrcDstVPlane, Ipp32u srcDstUVStep, Ipp32u cbp4x4, Ipp32s ChromaQPU, Ipp32u ChromaQPV, const Ipp16s* pQuantTableU, const Ipp16s* pQuantTableV, Ipp8u bypassFlag);

IppStatus ippiReconstructChromaInter4x4MB_H264_16s8u_C2R(Ipp16s** ppSrcDstCoeff, Ipp8u* pSrcDstUVPlane, Ipp32u srcDstUVStep, Ipp32u cbp4x4, Ipp32s ChromaQPU, Ipp32u ChromaQPV, const Ipp16s* pQuantTableU, const Ipp16s* pQuantTableV, Ipp8u bypassFlag);

IppStatus ippiReconstructChromaInter4x4_H264High_32s16u_IP2R(const IppiReconstructHighMB_32s16u* pReconstructInfo[2]);

Parameters

ppSrcDstCoeff

Pointer to the order of 4x4 blocks of residual coefficients for this macroblock, which are taken as a result of Huffman decoding (2x2 DC U-block, 2x2 DC V-block, 4x4 AC U-blocks, 4x4 AC V-blocks if the block is not zero-filled) in the same order as is shown in Figure 8‑7 of [ITUH264]. Pointer is updated by the function and points to the blocks for the next macroblock.

pSrcDstUPlane

Pointer to a macroblock that is reconstructed in the current U plane. This macroblock must contain inter prediction samples.

pSrcDstVPlane

Pointer to a macroblock that is reconstructed in the current V plane. This macroblock must contain inter prediction samples.

pSrcDstUVPlane

Pointer to a macroblock that is reconstructed in the current UV plane.

srcDstUVStep

Plane step.

cbp4x4

Coded block pattern. If cbp4x4 & (1<<(IPPVC_CBP_1ST_CHROMA_DC_BITPOS) is not equal to 0, 2x2 DC U-block is not zero-filled and exists in ppSrcDstCoeff. If cbp4x4 & (1<<(IPPVC_CBP_1ST_CHROMA_DC_BITPOS+ 1)) is not equal to 0, 2x2 DC U-block is not zero-filled and exists in ppSrcDstCoeff. If cbp4x4 & (1<<(IPPVC_CBP_1ST_CHROMA_AC_BITPOS+ i)) is not equal to 0, (0 ≤ i < 4), i-th 4x4 AC U-block is not zero-filled and exists in ppSrcDstCoeff. If cbp4x4 & (1<<(IPPVC_CBP_1ST_CHROMA_AC_BITPOS+ i+4)) is not equal to 0, (0 ≤ i < 4), i-th 4x4 AC U-block is not zero-filled and exists in ppSrcDstCoeff.

ChromaQPU

Chroma quantizer for U plane (QPC in [ITUH264]). It must be within the range [0;39].

ChromaQPV

Chroma quantizer for V plane (QPC in [ITUH264]). It must be within the range [0;39].

pQuantTableU

Pointer to the quantization table for U plane (LevelScale(qP%6, i, j ) in [ITUH264]).

pQuantTableV

Pointer to the quantization table for V plane (LevelScale(qP%6, i, j ) in [ITUH264]).

bypassFlag

Flag enabling lossless coding.

pReconstructInfo[2]

Pointer to the IppiReconstructHighMB_32s16u structure. The first pointer pReconstructInfo[0] points to the structure with parameters for restructuring chroma macroblock of plane U, and the second pointer pReconstructInfo[1] points to the structure with parameters for restructuring Chroms macroblock of plane V.

Description

The function ippiReconstructChromaInter4x4MB_H264_16s8u_P2R, ippiReconstructChromaInter4x4MB_H264_16s8u_C2R, and ippiReconstructChromaInter4x4_H264High_32s16u_IP2R are declared in the ippvc.h file.

ippiReconstructChromaInter4x4MB_H264_16s8u_C2R is intended for a chrominance combined plane as in the N12 format (UVUVUVUV...).

These functions reconstruct 4x4 inter chroma macroblock (8x8 U macroblock and 8x8 V macroblock) for high profile:

See Example below for the usage of ippiReconstructChromaInter4x4MB_H264_16s8u_P2R.

Usage of ippiReconstructChromaInter4x4MB_H264

{

    #define          D_CBP_CHROMA_DC 0x00001
    #define          D_CBP_CHROMA_AC 0x1fffe
    #define          D_CBP_CHROMA_AC_420 0x0001e
    #define          D_CBP_1ST_CHROMA_DC_BITPOS 17
    #define          D_CBP_1ST_CHROMA_AC_BITPOS 19

    Ipp8u   planeU[8*8] = 
  {  0x68, 0xaf, 0x16, 0x9a, 0x38, 0x8f, 0x7f, 0x6a,
     0x7e, 0x08, 0x01, 0x8c, 0x76, 0x87, 0xa4, 0xc6,
     0x9d, 0x47, 0x0f, 0xa1, 0x90, 0x0b, 0x36, 0x47,
     0x87, 0x28, 0x0f, 0xb3, 0x24, 0xa4, 0x5c, 0x81,
     0x4b, 0x96, 0x33, 0xa3, 0x9f, 0x25, 0x5c, 0x44,     
     0x61, 0x92, 0x36, 0x9c, 0x07, 0x05, 0x82, 0x9b,
     0xc7, 0xb7, 0x99, 0x48, 0x33, 0x9a, 0x75, 0x03,
     0xb6, 0x53, 0x9d, 0x03, 0x9c, 0x3a, 0x0b, 0x59 };

    Ipp8u   planeV[8*8] = {
     0x94, 0x22, 0x8a, 0xbc, 0xbb, 0x23, 0x60, 0xbb, 
     0xba, 0x73, 0x65, 0x14, 0x9a, 0xc6, 0x34, 0xae,
     0xaf, 0x16, 0x22, 0x9a, 0x38, 0x6c, 0x54, 0x8f,
     0x08, 0x01, 0xb9, 0x8c, 0x76, 0x7b, 0x16, 0x87,
     0x47, 0x0f, 0x9f, 0xa1, 0x90, 0x5f, 0x1d, 0x0b,
     0x28, 0x0f, 0x4a, 0xb3, 0x24, 0x83, 0x14, 0xa4,
     0x96, 0x33, 0x65, 0xa3, 0x9f, 0x3b, 0x08, 0x25,
     0x59, 0x2c, 0xb6, 0x30, 0x24, 0x7b, 0x47, 0x6b };

    Ipp32s  stepUV = 8;
    Ipp16s  quantTableU[16] = {22,12,34,50,34,33,46,21,18,19,34,28,28,31,15,3};
    Ipp16s  quantTableV[16] = {32,50,34, 2,46,21,18, 9,34,28,28,31,15,3,12,44};

    Ipp16s  coef[4+16*4+4+16*4] = {
  0,  0,  0,  0,
  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1, -1,  0,
  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,
  0,  0,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0, -1,  0,  1,
  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 -3, -3, -3, -3,
 -1, -1, -1, -1,  4,  4,  4,  4, -6, -6, -6, -6, -6, -6, -6, -6, 
 -6, -6, -6, -6, -6, -6, -6, -6,-64,-64,-64,-64,  7,  1, -4, -3,
  7,  1, -4, -3,  2, -2, -2,  2, -1,  5, 10, 11, 11, 15, 15,  9,
 -9,-10,-13, 12, -7, -7, -8, 12, -3, -3,  3, 13, -1, -1,  8, 14  };

    Ipp32u  cbpU = 0x00000014, cbpV = 0x00000014;
    Ipp32s  QPU = 17, QPV = 31;
    Ipp8u   bypass_flag = 0;
    IppStatus result;
    Ipp16s* pCoef;
    Ipp32u cbp4x4 = (((cbpU & D_CBP_CHROMA_DC) | ((cbpV & D_CBP_CHROMA_DC) <<
 1)) << D_CBP_1ST_CHROMA_DC_BITPOS) | ((cbpU & D_CBP_CHROMA_AC_420) <<
 (D_CBP_1ST_CHROMA_AC_BITPOS - 1)) | ((cbpV & D_CBP_CHROMA_AC_420) <<
 (D_CBP_1ST_CHROMA_AC_BITPOS + 4 - 1));

    pCoef = coef;

    result = ippiReconstructChromaInter4x4MB_H264_16s8u_P2R( 
                                             &pCoef,
                                             planeU, planeV,
                                             stepUV,
                                             cbp4x4,
                                             QPU,QPV,
                                             quantTableU,quantTableV,
                                             bypass_flag);
  }

These functions are used in the H.264 decoder included into Intel IPP Samples. See introduction to H.264.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified pointers is NULL.

ippStsOutOfRangeErr

ChromaQPU or ChromaQPV is less than 0 or greater than 39.


Submit feedback on this help topic

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