Added HuffmanTreeCode Struct for tree codes.

To represent tree codes (depth and bits array).

Change-Id: I87650886384dd10d95b16ab808dfd3bb573172bc
This commit is contained in:
Vikas Arora
2012-05-14 13:49:45 +05:30
parent 41d8049451
commit 8b85d01c45
3 changed files with 79 additions and 66 deletions

View File

@ -40,9 +40,15 @@ typedef struct {
int VP8LCreateCompressedHuffmanTree(const uint8_t* const depth, int len,
HuffmanTreeToken* tokens, int max_tokens);
// Struct to represent the tree codes (depth and bits array).
typedef struct {
int num_symbols; // Number of symbols.
uint8_t* code_lengths; // Code lengths of the symbols.
uint16_t* codes; // Symbol Codes.
} HuffmanTreeCode;
// Get the actual bit values for a tree of bit depths.
void VP8LConvertBitDepthsToSymbols(const uint8_t* const depth, int len,
uint16_t* const bits);
void VP8LConvertBitDepthsToSymbols(HuffmanTreeCode* const tree);
#if defined(__cplusplus) || defined(c_plusplus)
}