TransformQuantChromaDC_H264

Performs forward transform and quantization for 2X2 DC chroma blocks.

Syntax

IppStatus ippiTransformQuantChromaDC_H264_16s_C1I(Ipp16s* pSrcDst, Ipp16s* pTBlock, Ipp32s QPChroma, Ipp8s* NumLevels, Ipp8u Intra, Ipp8u NeedTransform);

Parameters

pSrcDst

Pointer to a 2x2 chroma DC block - source and destination array of size 4.

pTBlock

Pointer to a 2x2 transformed chroma DC block - source or destination array of size 4.

QPChroma

Quantization parameter for chroma, in range [0, 39].

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.

Intra

Flag equal to 1 in the case of intra macroblock, 0 otherwise.

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.

Description

The function ippiTransformQuantChromaDC_H264_16s_C1I is declared in the ippvc.h file. This function performs forward transform, if necessary, and quantization for a 2x2 DC chroma block as shown in Figure the figure below:

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 2x2 chroma DC block pSrcDst is transformed and is saved in pTBlock. Then quatization process is performed on the transformed chroma 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 QPChroma > 39 or QPChroma < 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.