TransformQuantLumaDC_H264

Performs forward transform and quantization for 4X4 DC luma blocks.

Syntax

IppStatus ippiTransformQuantLumaDC_H264_16s_C1I(Ipp16s* pSrcDst, Ipp16s* pTBlock, Ipp32s QP, Ipp8s* NumLevels, Ipp8u NeedTransform, const Ipp16s* pScanMatrix, Ipp8u* LastCoeff);

Parameters

pSrcDst

Pointer to a 4x4 luma DC block - source and destination array of size 16.

pTBlock

Pointer to a 4x4 transformed luma DC block - source or destination array of size 16.

QP

Quantization parameter for luma, in range [0, 51].

NumLevels

Pointer to a value that contains:

  • a negative value of a number of non-zero elements in block after quantization (when the first quantized element in block is not equal to zero),

  • a number of non-zero elements in block after quantization (when the first quantized element in block is equal to zero).

This value is calculated by the function.

NeedTransform

Flag; if equal to 1, the function is supposed to do DC coeffs transformation; if equal to 0, the DC coeffs passed to the function are already transformed.

pScanMatrix

Scan matrix for coefficients in block (array of size 16).

LastCoeff

Position of the last (in order of pScanMatrix) non-zero coefficient in block after quantization. This value is calculated by the function.

Description

The function ippiTransformQuantLumaDC_H264_16s_C1I is declared in the ippvc.h file. This function performs forward transform, if necessary, and quantization for a 4x4 DC luma block as shown in Figure "Forward Transform and Quantization for 2x2 Block":

If NeedTransform is equal to 0, transformed DC block coefficients (pTBlock) are used for quantization.

If NeedTransform is equal to 1, at first a 4x4 luma DC block pSrcDst is transformed and is saved in pTBlock. Then quatization process is performed on the transformed luma DC block.

If all coefficients after quantization are not greater than MAX_CAVLC_LEVEL_VALUE, they are saved in pSrcDst. Otherwise, the function returns error.

This function is used in the H.264 encoder 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

Indicates an error if QP > 51 or QP < 0.

ippStsScaleRangeErr

Indicates an error condition if any coefficient after quantization is greater than MAX_CAVLC_LEVEL_VALUE.


Submit feedback on this help topic

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