CABACInitAlloc_H264

Allocates and initializes CABAC state and alignes bitstream to byte boundary by writing 1s.

Syntax

IppStatus ippiCABACInitAlloc_H264(IppvcCABACState** ppCabacState, Ipp8u* pBitStream, Ipp32u nBitStreamOffsetBits, Ipp32u nBitStreamSize, Ipp32s SliceQPy, Ipp32s cabacInitIdc);

Parameters

ppCabacState

Pointer to CABAC state allocated by the function. On completing encoding, the CABAC state must be released by a call to ippiCABACFree_H264. In case of an error, the pointer pointed by ppCabacState remains unchanged.

pBitStream

Pointer to bitstream to write to. Must be aligned by 4.

nBitStreamOffsetBits

Number of bits from pBitStream to the first unwritten bit in a bitstream.

nBitStreamSize

Size of the allocated memory for the bitstream in bytes.

SliceQPy

SliceQPy parameter. See equation 7-28 from H.264 standard [ITUH264_07].

This parameter will be clipped to range [1; 51] (see clause 9.3.1.1 of the above standard).

cabacInitIdc

Index (in range [0; 2]) for determining the initialisation table used in the initialisation process for context variables (for inter slices) or -1 (for intra slices). See variable cabac_init_idc from the H.264 standard.

Description

The function ippiCABACInitAlloc_H264 is declared in the ippvc.h file. This function allocates and initializes CABAC state and alignes the bitstream to byte boundary by writing 1s.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the pointers is NULL.

ippStsSizeErr

Indicates no error if nBitStreamSize is 0.

ippStsOutOfRangeErr

Indicates an error when the cabac_init_idc parameter is out of range [-1; 2].

ippStsNoMemErr

Not enough memory to allocate space for CABAC state.

ippStsMisalignedBuf

Indicates no error if pBitStream is not 4-byte aligned.

ippStsH264BufferFullErr

Not enough free space in the bitstream. This error code can be returned if less than 8 free bytes remain in the bitstream.


Submit feedback on this help topic

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