QuantizeResidual4x4Fwd_H264

Performs forward quantization for 4X4 residual blocks.

Syntax

IppStatus ippiQuantizeResidual4x4Fwd_H264_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst, Ipp32u* pNumNonZeros, Ipp32u* pLastNonZero, const Ipp16s* pQuantTable, const Ipp16s* pScanMatrix, Ipp32s QP, Ipp32s roundMode);

IppStatus ippiQuantizeResidual4x4Fwd_H264_16s32s_C1(const Ipp16s* pSrc, Ipp16s* pDst, Ipp32u* pNumNonZeros, Ipp32u* pLastNonZero, const Ipp32s* pQuantTable, const Ipp16s* pScanMatrix, Ipp32s QP, Ipp32s roundMode);

IppStatus ippiQuantizeResidual4x4Fwd_H264_32s_C1(const Ipp32s* pSrc, Ipp32s* pDst, Ipp32u* pNumNonZeros, Ipp32u* pLastNonZero, const Ipp32s* pQuantTable, const Ipp16s* pScanMatrix, Ipp32s QP, Ipp32s roundMode);

Parameters

pSrc

Pointer to a 4x4 residual block - source array of size 16.

pDst

Pointer to a 4x4 residual block - destination array of size 16.

pNumNonZeros

Pointer to a value that contains the number of non-zero elements in the block after quantization. This value is calculated by the function.

pLastNonZero

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

pQuantTable

Pointer to a user's specific quantization table.

pScanMatrix

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

QP

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

roundMode

Rounding mode. 0 means inter frame is processed, otherwise - intra frame is processed.

Description

The functions ippiQuantizeResidual4x4Fwd_H264_16s_C1, ippiQuantizeResidual4x4Fwd_H264_16s32s_C1, and ippiQuantizeResidual4x4Fwd_H264_32s_C1 are declared in the ippvc.h file. These functions perform forward quantization for a 4x4 residual block. A 4x4 residual block (pSrc) is quantized. All values are rounded towards nearest (intra frame) or towards zero (inter frame). Then the number of non-zero elements and index of the last non-zero element are calculated and stored.

If pQuantTable is NULL, the default quantization table is used.

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.


Submit feedback on this help topic

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