Go to the documentation of this file.
66 bool init(uint64_t num_leafs_h, uint64_t num_leafs_v);
void setvalue(uint64_t leafno, int64_t value)
Set the value of a leaf of a tag tree.
const uint32_t tag_tree_uninitialized_node_value
Definition: TagTree.h:26
int64_t value
Definition: TagTree.h:38
uint64_t nodes_size
Definition: TagTree.h:112
Tag tree.
Definition: TagTree.h:46
TagTreeNode * parent
Definition: TagTree.h:37
uint64_t numleafsh
Definition: TagTree.h:108
uint64_t numleafsv
Definition: TagTree.h:109
Tag node.
Definition: TagTree.h:31
bool init(uint64_t num_leafs_h, uint64_t num_leafs_v)
Reinitialises a tag tree.
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.
int64_t low
Definition: TagTree.h:39
void decompress(BitIO *bio, uint64_t leafno, int64_t threshold, uint8_t *decoded)
Decode the value of a leaf of the tag tree up to a given threshold.
uint32_t known
Definition: TagTree.h:40
uint64_t numnodes
Definition: TagTree.h:110
Copyright (C) 2016-2020 Grok Image Compression Inc.
Definition: BitIO.h:27
void decodeValue(BitIO *bio, uint64_t leafno, int64_t threshold, uint64_t *value)
Decode the value of a leaf of the tag tree up to a given threshold.
TagTreeNode()
Definition: TagTree.h:33
void reset()
Reset a tag tree (set all leaves to 0)
TagTreeNode * nodes
Definition: TagTree.h:111
TagTree(uint64_t numleafsh, uint64_t numleafsv)
Create a tag tree.