unsigned char
valued leaves - used for MxPEG
decoding.
More...
#include <mxcpcHuffmanTree.h>
Public Member Functions | |
const Node * | getRoot (void) |
Returns the Huffman tree's root node. | |
void | clear (void) |
Clears the Huffman tree. | |
bool | configureFromTable (const unsigned char *table, int max_path_len=16) |
Reconfigures the Huffman tree as specified in the given table (JPEG Huffman table format). | |
bool | addLeaf (int path_len, unsigned char value) |
Adds a leaf that is reached from the root via a path of length path_len bits. | |
int | countLeaves (void) |
Returns the number of leaves in the tree. | |
Private Member Functions | |
void | deleteSubTree (Node *subtree_root) |
Wastes the specified subtree. | |
bool | addLeaf (Node *subtree_root, int path_len, Node *leaf) |
Adds to the specified subtree a leaf that is reached from the subtree root via a path of length path_len bits. | |
void | groundUnusedPaths (Node *subtree) |
Recursively makes unused child pointers of all inner nodes point to the special ground node, from which tree traversals never recover. | |
int | countLeaves (Node *subtree) |
Private helper method. | |
Private Attributes | |
Node * | RootNode |
Node * | GroundNode |
Classes | |
struct | Node |
unsigned char
valued leaves - used for MxPEG
decoding.
|
Adds to the specified subtree a leaf that is reached from the subtree root via a path of length
Returns |
|
Adds a leaf that is reached from the root via a path of length
Returns |
|
Reconfigures the Huffman tree as specified in the given table (JPEG Huffman table format).
Returns |
|
Wastes the specified subtree. Guards against killing the ground node. Must not be called on the root node. |
|
Recursively makes unused child pointers of all inner nodes point to the special ground node, from which tree traversals never recover. So if invalid bitstreams are encountered the tree traversal will forever be caught in the ground node and the Huffman decoder using the tree will simply cease to produce video tiles - without the need of timeconsuming code to detect such invalid bitstreams. |