Home
last modified time | relevance | path

Searched refs:treepos (Results 1 – 2 of 2) sorted by relevance

/external/zopfli/src/zopflipng/lodepng/
Dlodepng_util.cpp312 unsigned long numcodes = (unsigned long)(bitlen.size()), treepos = 0, nodefilled = 0; in makeFromLengths() local
327 if(treepos > numcodes - 2) return 55; in makeFromLengths()
328 if(tree2d[2 * treepos + bit] == 32767) //not yet filled in in makeFromLengths()
333 tree2d[2 * treepos + bit] = n; in makeFromLengths()
334 treepos = 0; in makeFromLengths()
339 tree2d[2 * treepos + bit] = ++nodefilled + numcodes; in makeFromLengths()
340 treepos = nodefilled; in makeFromLengths()
343 …else treepos = tree2d[2 * treepos + bit] - numcodes; //subtract numcodes from address to get addre… in makeFromLengths()
347 int decode(bool& decoded, unsigned long& result, size_t& treepos, unsigned long bit) const in decode()
350 if(treepos >= numcodes) return 11; //error: you appeared outside the codetree in decode()
[all …]
Dlodepng.cpp526 unsigned treepos = 0; /*position in the tree (1 of the numcodes columns)*/ in HuffmanTree_make2DTree() local
552 … if(treepos > tree->numcodes - 2) return 55; /*oversubscribed, see comment in lodepng_error_text*/ in HuffmanTree_make2DTree()
553 if(tree->tree2d[2 * treepos + bit] == 32767) /*not yet filled in*/ in HuffmanTree_make2DTree()
557 tree->tree2d[2 * treepos + bit] = n; /*put the current code in it*/ in HuffmanTree_make2DTree()
558 treepos = 0; in HuffmanTree_make2DTree()
566 tree->tree2d[2 * treepos + bit] = nodefilled + tree->numcodes; in HuffmanTree_make2DTree()
567 treepos = nodefilled; in HuffmanTree_make2DTree()
570 else treepos = tree->tree2d[2 * treepos + bit] - tree->numcodes; in HuffmanTree_make2DTree()
905 unsigned treepos = 0, ct; in huffmanDecodeSymbol() local
913 ct = codetree->tree2d[(treepos << 1) + READBIT(*bp, in)]; in huffmanDecodeSymbol()
[all …]