66 bool init(uint64_t num_leafs_h, uint64_t num_leafs_v);
77 void setvalue(uint64_t leafno, int64_t value);
85 bool compress(
BitIO *bio, uint64_t leafno, int64_t threshold);
94 uint8_t *decompressed);
Tag tree.
Definition: TagTree.h:46
uint64_t nodes_size
Definition: TagTree.h:112
TagTree(uint64_t numleafsh, uint64_t numleafsv)
Create a tag tree.
Definition: TagTree.cpp:27
bool compress(BitIO *bio, uint64_t leafno, int64_t threshold)
Encode the value of a leaf of the tag tree up to a given threshold.
Definition: TagTree.cpp:179
void reset()
Reset a tag tree (set all leaves to 0)
Definition: TagTree.cpp:161
uint64_t numleafsh
Definition: TagTree.h:108
void setvalue(uint64_t leafno, int64_t value)
Set the value of a leaf of a tag tree.
Definition: TagTree.cpp:170
void decompress(BitIO *bio, uint64_t leafno, int64_t threshold, uint8_t *decompressed)
Decompress the value of a leaf of the tag tree up to a given threshold.
Definition: TagTree.cpp:220
~TagTree()
Definition: TagTree.cpp:85
bool init(uint64_t num_leafs_h, uint64_t num_leafs_v)
Reinitialises a tag tree.
Definition: TagTree.cpp:96
void decodeValue(BitIO *bio, uint64_t leafno, int64_t threshold, uint64_t *value)
Decompress the value of a leaf of the tag tree up to a given threshold.
Definition: TagTree.cpp:227
uint64_t numleafsv
Definition: TagTree.h:109
uint64_t numnodes
Definition: TagTree.h:110
TagTreeNode * nodes
Definition: TagTree.h:111
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
const uint32_t tag_tree_uninitialized_node_value
Definition: TagTree.h:26
Tag node.
Definition: TagTree.h:31
TagTreeNode * parent
Definition: TagTree.h:37
int64_t low
Definition: TagTree.h:39
TagTreeNode()
Definition: TagTree.h:33
uint32_t known
Definition: TagTree.h:40
int64_t value
Definition: TagTree.h:38