Home
last modified time | relevance | path

Searched refs:numcodes (Results 1 – 3 of 3) 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
313 …std::vector<unsigned long> tree1d(numcodes), blcount(maxbitlen + 1, 0), nextcode(maxbitlen + 1, 0); in makeFromLengths()
315 for(unsigned long bits = 0; bits < numcodes; bits++) blcount[bitlen[bits]]++; in makeFromLengths()
321 … for(unsigned long n = 0; n < numcodes; n++) if(bitlen[n] != 0) tree1d[n] = nextcode[bitlen[n]]++; in makeFromLengths()
322 …tree2d.clear(); tree2d.resize(numcodes * 2, 32767); //32767 here means the tree2d isn't filled the… in makeFromLengths()
323 for(unsigned long n = 0; n < numcodes; n++) //the codes in makeFromLengths()
327 if(treepos > numcodes - 2) return 55; in makeFromLengths()
339 tree2d[2 * treepos + bit] = ++nodefilled + numcodes; in makeFromLengths()
343 …else treepos = tree2d[2 * treepos + bit] - numcodes; //subtract numcodes from address to get addre… in makeFromLengths()
349 unsigned long numcodes = (unsigned long)tree2d.size() / 2; in decode() local
[all …]
Dlodepng.cpp492 unsigned numcodes; /*number of symbols in the alphabet = number of codes*/ member
529 tree->tree2d = (unsigned*)lodepng_malloc(tree->numcodes * 2 * sizeof(unsigned)); in HuffmanTree_make2DTree()
542 for(n = 0; n < tree->numcodes * 2; n++) in HuffmanTree_make2DTree()
547 for(n = 0; n < tree->numcodes; n++) /*the codes*/ in HuffmanTree_make2DTree()
552 … if(treepos > tree->numcodes - 2) return 55; /*oversubscribed, see comment in lodepng_error_text*/ in HuffmanTree_make2DTree()
566 tree->tree2d[2 * treepos + bit] = nodefilled + tree->numcodes; in HuffmanTree_make2DTree()
570 else treepos = tree->tree2d[2 * treepos + bit] - tree->numcodes; in HuffmanTree_make2DTree()
574 for(n = 0; n < tree->numcodes * 2; n++) in HuffmanTree_make2DTree()
596 tree->tree1d = (unsigned*)lodepng_malloc(tree->numcodes * sizeof(unsigned)); in HuffmanTree_makeFromLengths2()
606 for(bits = 0; bits < tree->numcodes; bits++) blcount.data[tree->lengths[bits]]++; in HuffmanTree_makeFromLengths2()
[all …]
Dlodepng.h788 size_t numcodes, unsigned maxbitlen);