EncodeCoeffsIntra_H263

Encodes and puts quantized DCT coefficients for an intra coded block into bitstream.

Syntax

IppStatus ippiEncodeCoeffsIntra_H263_16s1u(Ipp16s* pQCoef, Ipp8u** ppBitStream, int* pBitOffset, int countNonZero, int advIntraFlag, int modQuantFlag, int scan);

Parameters

pQCoef

Pointer to the array of quantized DCT coefficients. pQCoef[0] is the DC coefficient.

ppBitStream

Pointer to pointer to the current byte in the bitstream buffer. **ppBitStream is updated by the function.

pBitOffset

Pointer to the bit position in the byte pointed by **ppBitStream. Valid within the range 0 to 7. *pBitOffset is updated by the function.

countNonZero

Number of non-zero coefficients in the block. Valid within the range 1 to 64.

advIntraFlag

Flag equal to a non-zero value when Advanced Intra Coding mode is in use, equal to 0 otherwise.

modQuantFlag

Flag equal to a non-zero value when Modified Quantization mode is in use, equal to 0 otherwise.

scan

Type of the scan to be performed on the coefficints before encoding, takes one of the following values:

IPPVC_SCAN_ZIGZAG,

indicating the classical zigzag scan,

IPPVC_SCAN_HORIZONTAL,

indicating the alternate-horizontal scan,

IPPVC_SCAN_VERTICAL,

indicating the alternate-vertical scan,

IPPVC_SCAN_NONE,

indicating that no scan is to be performed, that is, the input coefficients are already in the scan order.

See the corresponding enumerator in the introduction to the General Functions.

Description

The function ippiEncodeCoeffsIntra_H263_16s1u is declared in the ippvc.h header file. This function performs VLC encoding of the quantized AC coefficients in a scan order for one intra coded block and puts the codes into the bitstream. Intra AC VLC encoding process is specified in [ITUH263], subclause 5.4.2, and is modified as specified in [ITUH263] Annex T, clause T.4, when Modified Quantization mode is in use. When in Advanced Intra Coding mode, VLC Table I.2 from [ITUH263] Annex I is used for all intra DC and intra AC coefficients, otherwise Table 16 [ITUH263] is used to encode AC coefficients (starting from pQCoef [1]) only. In this case countNonZero is the number of non-zero AC coefficients.

This function is used in the H.263 and MPEG-4 encoders included into Intel IPP Samples. See introduction to H.263.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsBitOffsetErr

Indicates an error condition if *pBitOffset is out of the range [0, 7].

ippStsOutOfRangeErr

Indicates an error condition if countNonZero is out of the range [1, 64].


Submit feedback on this help topic

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