Searched refs:nextcode (Results 1 – 1 of 1) sorted by relevance
811 unsigned* nextcode; in HuffmanTree_makeFromLengths2() local817 nextcode = (unsigned*)lodepng_malloc((tree->maxbitlen + 1) * sizeof(unsigned)); in HuffmanTree_makeFromLengths2()818 if(!tree->codes || !blcount || !nextcode) error = 83; /*alloc fail*/ in HuffmanTree_makeFromLengths2()821 for(n = 0; n != tree->maxbitlen + 1; n++) blcount[n] = nextcode[n] = 0; in HuffmanTree_makeFromLengths2()826 nextcode[bits] = (nextcode[bits - 1] + blcount[bits - 1]) << 1u; in HuffmanTree_makeFromLengths2()831 tree->codes[n] = nextcode[tree->lengths[n]]++; in HuffmanTree_makeFromLengths2()839 lodepng_free(nextcode); in HuffmanTree_makeFromLengths2()