EncodeHuffInit

Initializes the Huffman encoding structure.

Syntax

IppStatus ippsEncodeHuffInit_8u (const int freqTable[256], IppHuffState_8u* pHuffState);

Parameters

freqTable

Table of frequencies of the symbols.

pHuffState

Pointer to the Huffman encoding structure.

Description

The function ippsEncodeHuffInit is declared in the ippdc.h file. This function initializes in the external buffer the structure pHuffState that is required for Huffman encoding. This structure is specifying by the table of symbol's frequencies freqTable. The size of the external buffer must be computed previously by calling the function ippsHuffGetSize. Alternatively, the Huffman encoder structure can be initialized by the function ippsEncodeHuffInitAlloc.

The Huffman encoding structure is used by the functions ippsEncodeHuffOne and ippsEncodeHuff.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pHuffState pointer is NULL.

ippStsFreqTableErr

Indicates an error if freqTable is invalid.

ippStsMaxLenHuffCodeErr

Indicates an error if the length of the Huffman code is more than expected one.

Submit feedback on this help topic

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