EncodeGITInit

Initializes the GIT encoding state structure.

Syntax

IppStatus ippsEncodeGITInit_8u (int maxSrcLen, int maxDstLen, IppGITState_8u* pGITState);

Parameters

maxSrcLen

Maximum length of the source buffer.

maxDstLen

Maximum length of the destination buffer.

pGITState

Pointer to the GIT encoding state structure.

Description

The function ippsEncodeGITInit is declared in the ippdc.h file. This function initializes the GIT encoding state structure in the external buffer whose size must be computed previously by the calling the function ippsEncodeGITGetSize. Alternatively this structure can be initialized by the function ippsEncodeGITInitAlloc.

The size of the GIT encoding state structure depends on the values of the maxSrcLen and maxDstLen parameters, which set the upper bound on the sizes of the source and destination buffers. In subsequent functions, do not specify a greater size of the buffers, as the functions will return an error message.

The maxSrcLen parameter sets the size of a block for input data processing. Due to adaptive coding used by the GIT algorithm, the compression ratio is very likely to improve as the block size increases.

Note iconNote

The maxSrcLen and maxDstLen parameters of the ippsEncodeGITInit and ippsEncodeGITGetSize functions must have equal respective values to avoid errors in the ippsEncodeGIT function.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pGITState is NULL.

ippStsSizeErr

Indicates an error if maxSrcLen or maxDstLen is less than or equal to 0.

Submit feedback on this help topic

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