ReconstructDCTBlock_MPEG2

Decodes 8X8 non-intra block using table of Run-Level codes for standard MPEG2, rearranges and performs inverse quantization.

Syntax

IppStatus ippiReconstructDCTBlock_MPEG2_32s(Ipp32u** ppBitStream, int * pOffset, const IppVCHuffmanSpec_32s* pDCTable, const IppVCHuffmanSpec_32s* pACTable, Ipp32s* pScanMatrix, int QP, Ipp16s* pQPMatrix, Ipp16s* pDstBlock, Ipp32s* pDstSize);

Parameters

ppBitStream

Double pointer to the current position in the bit stream.

pOffset

Pointer to the offset between the bit that ppBitStream points to and the start of the code.

pDCTable

Pointer to the table containing codes for DC coefficient, that is, the first of the DCT coefficients.

pACTable

Pointer to the table containing Run-Level codes for all DCT coefficients except the first one.

pScanMatrix

Pointer to the matrix containing indices of elements in scanning sequence.

QP

Quantizer scale factor read from the bit stream.

pQPMatrix

Pointer to the weighting matrix imposed by standard or user-defined; may be NULL.

pDstBlock

Pointer to decoded elements.

pDstSize

Position of the last non-zero block coefficient in scanning sequence.

Description

This function is declared in the ippvc.h header file. The function ippiReconstructDCTBlock_MPEG2_32s decodes an 8x8 block using tables of Run-Level codes, rearranges the block and performs inverse quantization. The function is applied to predicted and bi-predicted blocks and processes all the DCT coefficients in block.

The function uses the tables derived with HuffmanRunLevelTableInitAlloc function.

The function decodes the block of 8x8 DCT coefficients. Simultaneous processing of the coefficients enhances performance. The result is sent to pDstBlock and * pDstSize is the position of the last non-zero coefficient. After decoding, the pointers to code in the bitstream are reset as shown in Figure "Getting One Code From Bitstream".

The pointer pScanMatrix points to one of the pre-defined scanning matrices, depending on the bitstream. Figure "Scanning Matrix and Sequence" illustrates a simple matrix and a sequence. After decoding, data is rearranged from scanning sequence to linear sequence.

Then inverse quantization is performed: each of the DCT coefficients is multiplied by a corresponding value from the weighting matrix pQPMatrix and by the quantizer scale factor, which are read from the bit stream. If pQPMatrix is NULL, the default matrix non_intra_quantizer_matrix is used, which is described in subclause 6.3.11 of [ISO13818-2].

This function is used in the MPEG-2 decoder included into Intel IPP Samples. See introduction to MPEG-1 and MPEG-2.

Scanning Matrix and Sequence



Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one input pointer is NULL.

ippStsH263VLCCodeErr

Indicates an error when decoding in accordance with the H263 standard.


Submit feedback on this help topic

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