70 throw std::exception();
83 throw std::runtime_error(
"tgt_create numnodes == 0, no tree created");
128 return (std::numeric_limits<T>::max)();
182 while(low < threshold)
184 if(low >=
node->value)
246 *value =
node->value;
Tag tree.
Definition TagTree.h:47
uint64_t nodeCount
Definition TagTree.h:252
bool compress(BitIO *bio, uint64_t leafno, T threshold)
Encode the value of a leaf of the tag tree up to a given threshold.
Definition TagTree.h:164
TagTreeNode< T > * nodes
Definition TagTree.h:253
TagTree(uint32_t leavesWidth, uint32_t leavesHeight)
Create a tag tree.
Definition TagTree.h:55
void reset()
Reset a tag tree (set all leaves to 0)
Definition TagTree.h:133
void setvalue(uint64_t leafno, T value)
Set the value of a leaf of a tag tree.
Definition TagTree.h:148
~TagTree()
Definition TagTree.h:121
void decodeValue(BitIO *bio, uint64_t leafno, T threshold, T *value)
Decompress the value of a leaf of the tag tree up to a given threshold.
Definition TagTree.h:212
uint32_t leavesHeight_
Definition TagTree.h:251
uint32_t leavesWidth_
Definition TagTree.h:250
constexpr T getUninitializedValue(void)
Definition TagTree.h:126
Copyright (C) 2016-2024 Grok Image Compression Inc.
Definition ICacheable.h:20
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
TagTree< uint16_t > TagTreeU16
Definition TagTree.h:257
TagTree< uint8_t > TagTreeU8
Definition TagTree.h:256
void warn(const char *fmt,...) override
Definition Logger.h:44
void error(const char *fmt,...) override
Definition Logger.h:53
static Logger logger_
Definition Logger.h:70
Tag node.
Definition TagTree.h:33
bool known
Definition TagTree.h:39
T low
Definition TagTree.h:38
TagTreeNode * parent
Definition TagTree.h:36
TagTreeNode()
Definition TagTree.h:34
T value
Definition TagTree.h:37