EncodeHuffInitAlloc

Allocates memory and initializes the structure for Huffman encoding.

Syntax

IppStatus ippsEncodeHuffInitAlloc_8u(const int freqTable[256], IppHuffState_8u** ppHuffState);

Parameters

freqTable

Table of frequencies of the symbols.

ppHuffState

Double pointer to the Huffman encoding structure.

Description

The function ippsEncodeHuffInitAlloc is declared in the ippdc.h file. This function allocates memory and initializes the structure for Huffman encoding pHuffState. This structure is specifying by the table of symbol's frequencies freqTable. 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.

ippMemAllocErr

Indicates an error if memory allocation fails.

Submit feedback on this help topic

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