Home | History | Annotate | Download | only in lodepng

Lines Matching defs:numcodes

312       unsigned long numcodes = (unsigned long)(bitlen.size()), treepos = 0, nodefilled = 0;
313 std::vector<unsigned long> tree1d(numcodes), blcount(maxbitlen + 1, 0), nextcode(maxbitlen + 1, 0);
315 for(unsigned long bits = 0; bits < numcodes; bits++) blcount[bitlen[bits]]++;
321 for(unsigned long n = 0; n < numcodes; n++) if(bitlen[n] != 0) tree1d[n] = nextcode[bitlen[n]]++;
322 tree2d.clear(); tree2d.resize(numcodes * 2, 32767); //32767 here means the tree2d isn't filled there yet
323 for(unsigned long n = 0; n < numcodes; n++) //the codes
327 if(treepos > numcodes - 2) return 55;
338 //addresses are encoded as values > numcodes
339 tree2d[2 * treepos + bit] = ++nodefilled + numcodes;
343 else treepos = tree2d[2 * treepos + bit] - numcodes; //subtract numcodes from address to get address value
349 unsigned long numcodes = (unsigned long)tree2d.size() / 2;
350 if(treepos >= numcodes) return 11; //error: you appeared outside the codetree
352 decoded = (result < numcodes);
353 treepos = decoded ? 0 : result - numcodes;
483 size_t numcodes = 0, numlit = 0, numlen = 0; //for logging
489 numcodes++;