Few more HuffmanTreeToken conversions.

Change-Id: I932b5368d279f83c462c7d916978dab3e81d7709
This commit is contained in:
Vikas Arora
2012-05-16 12:14:42 +05:30
parent 89c07c9660
commit 817c9dce61
3 changed files with 26 additions and 34 deletions

View File

@ -26,11 +26,6 @@ typedef struct {
uint8_t extra_bits; // extra bits for escape codes
} HuffmanTreeToken;
// Turn the Huffman tree into a token sequence.
// Returns the number of tokens used.
int VP8LCreateCompressedHuffmanTree(const uint8_t* const depth, int depth_size,
HuffmanTreeToken* tokens, int max_tokens);
// Struct to represent the tree codes (depth and bits array).
typedef struct {
int num_symbols; // Number of symbols.
@ -38,6 +33,11 @@ typedef struct {
uint16_t* codes; // Symbol Codes.
} HuffmanTreeCode;
// Turn the Huffman tree into a token sequence.
// Returns the number of tokens used.
int VP8LCreateCompressedHuffmanTree(const HuffmanTreeCode* const tree,
HuffmanTreeToken* tokens, int max_tokens);
// Create an optimized tree, and tokenize it.
int VP8LCreateHuffmanTree(int* const histogram, int tree_depth_limit,
HuffmanTreeCode* const tree);