| Index: third_party/libwebp/utils/huffman_encode.h
|
| diff --git a/third_party/libwebp/utils/huffman_encode.h b/third_party/libwebp/utils/huffman_encode.h
|
| index ee51c68c9ff7c1cee1978103360612f4377d81c3..91aa18f464559f2bdf330bfc502d004800c7e296 100644
|
| --- a/third_party/libwebp/utils/huffman_encode.h
|
| +++ b/third_party/libwebp/utils/huffman_encode.h
|
| @@ -33,14 +33,26 @@ typedef struct {
|
| uint16_t* codes; // Symbol Codes.
|
| } HuffmanTreeCode;
|
|
|
| +// Struct to represent the Huffman tree.
|
| +// TODO(vikasa): Add comment for the fields of the Struct.
|
| +typedef struct {
|
| + uint32_t total_count_;
|
| + int value_;
|
| + int pool_index_left_; // Index for the left sub-tree.
|
| + int pool_index_right_; // Index for the right sub-tree.
|
| +} HuffmanTree;
|
| +
|
| // 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);
|
| +// 'buf_rle' and 'huff_tree' are pre-allocated and the 'tree' is the constructed
|
| +// huffman code tree.
|
| +void VP8LCreateHuffmanTree(uint32_t* const histogram, int tree_depth_limit,
|
| + uint8_t* const buf_rle, HuffmanTree* const huff_tree,
|
| + HuffmanTreeCode* const tree);
|
|
|
| #ifdef __cplusplus
|
| }
|
|
|