Lines Matching refs:index
701 unsigned index; in HuffmanTree_makeTable() local
704 index = reverseBits(symbol >> (l - FIRSTBITS), FIRSTBITS); in HuffmanTree_makeTable()
705 maxlens[index] = LODEPNG_MAX(maxlens[index], l); in HuffmanTree_makeTable()
750 unsigned index = reverse | (j << l); in HuffmanTree_makeTable() local
751 …if(tree->table_len[index] != 16) return 55; /*invalid tree: long symbol shares prefix with short s… in HuffmanTree_makeTable()
752 tree->table_len[index] = l; in HuffmanTree_makeTable()
753 tree->table_value[index] = i; in HuffmanTree_makeTable()
758 unsigned index = reverse & mask; in HuffmanTree_makeTable() local
759 unsigned maxlen = tree->table_len[index]; in HuffmanTree_makeTable()
762 unsigned start = tree->table_value[index]; /*starting index in secondary table*/ in HuffmanTree_makeTable()
869 unsigned index; /*index of this leaf node (called "count" in the paper)*/ member
889 static BPMNode* bpmnode_create(BPMLists* lists, int weight, unsigned index, BPMNode* tail) { in bpmnode_create() argument
912 result->index = index; in bpmnode_create()
942 unsigned lastindex = lists->chains1[c]->index; in boundaryPM()
982 leaves[numpresent].index = i; in lodepng_huffman_code_lengths()
997 lengths[leaves[0].index] = 1; in lodepng_huffman_code_lengths()
998 lengths[leaves[0].index == 0 ? 1 : 0] = 1; in lodepng_huffman_code_lengths()
1030 for(i = 0; i != node->index; ++i) ++lengths[leaves[i].index]; in lodepng_huffman_code_lengths()
3095 static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in) { in addColorBits() argument
3098 unsigned p = index & m; in addColorBits()
3101 if(p == 0) out[index * bits / 8u] = in; in addColorBits()
3102 else out[index * bits / 8u] |= in; in addColorBits()
3115 int index; /*the payload. Only has a meaningful value if this is in the last level*/ member
3120 tree->index = -1; in color_tree_init()
3141 return tree ? tree->index : -1; in color_tree_get()
3154 … unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) { in color_tree_add() argument
3165 tree->index = (int)index; in color_tree_add()
3193 int index = color_tree_get(tree, r, g, b, a); in rgba8ToPixel() local
3194 if(index < 0) return 82; /*color not in palette*/ in rgba8ToPixel()
3195 if(mode->bitdepth == 8) out[i] = index; in rgba8ToPixel()
3196 else addColorBits(out, i, mode->bitdepth, (unsigned)index); in rgba8ToPixel()
3293 unsigned index; in getPixelColorRGBA8() local
3294 if(mode->bitdepth == 8) index = in[i]; in getPixelColorRGBA8()
3297 index = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorRGBA8()
3300 *r = mode->palette[index * 4 + 0]; in getPixelColorRGBA8()
3301 *g = mode->palette[index * 4 + 1]; in getPixelColorRGBA8()
3302 *b = mode->palette[index * 4 + 2]; in getPixelColorRGBA8()
3303 *a = mode->palette[index * 4 + 3]; in getPixelColorRGBA8()
3388 unsigned index = in[i]; in getPixelColorsRGBA8() local
3390 lodepng_memcpy(buffer, &mode->palette[index * 4], 4); in getPixelColorsRGBA8()
3395 unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorsRGBA8() local
3397 lodepng_memcpy(buffer, &mode->palette[index * 4], 4); in getPixelColorsRGBA8()
3462 unsigned index = in[i]; in getPixelColorsRGB8() local
3464 lodepng_memcpy(buffer, &mode->palette[index * 4], 3); in getPixelColorsRGB8()
3469 unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorsRGB8() local
3471 lodepng_memcpy(buffer, &mode->palette[index * 4], 3); in getPixelColorsRGB8()