Lines Matching refs:htree_group
226 static void BuildPackedTable(HTreeGroup* const htree_group) { in BuildPackedTable() argument
230 HuffmanCode32* const huff = &htree_group->packed_table[bits]; in BuildPackedTable()
231 HuffmanCode hcode = htree_group->htrees[GREEN][bits]; in BuildPackedTable()
239 bits >>= AccumulateHCode(htree_group->htrees[RED][bits], 16, huff); in BuildPackedTable()
240 bits >>= AccumulateHCode(htree_group->htrees[BLUE][bits], 0, huff); in BuildPackedTable()
241 bits >>= AccumulateHCode(htree_group->htrees[ALPHA][bits], 24, huff); in BuildPackedTable()
418 HTreeGroup* const htree_group = &htree_groups[i]; in ReadHuffmanCodes() local
419 HuffmanCode** const htrees = htree_group->htrees; in ReadHuffmanCodes()
450 htree_group->is_trivial_literal = is_trivial_literal; in ReadHuffmanCodes()
451 htree_group->is_trivial_code = 0; in ReadHuffmanCodes()
456 htree_group->literal_arb = in ReadHuffmanCodes()
459 htree_group->is_trivial_code = 1; in ReadHuffmanCodes()
460 htree_group->literal_arb |= htrees[GREEN][0].value << 8; in ReadHuffmanCodes()
463 htree_group->use_packed_table = !htree_group->is_trivial_code && in ReadHuffmanCodes()
465 if (htree_group->use_packed_table) BuildPackedTable(htree_group); in ReadHuffmanCodes()
925 const HTreeGroup* htree_group = GetHtreeGroupForPos(hdr, col, row); in DecodeAlphaData() local
931 assert(htree_group != NULL); in DecodeAlphaData()
940 htree_group = GetHtreeGroupForPos(hdr, col, row); in DecodeAlphaData()
943 code = ReadSymbol(htree_group->htrees[GREEN], br); in DecodeAlphaData()
959 const int dist_symbol = ReadSymbol(htree_group->htrees[DIST], br); in DecodeAlphaData()
979 htree_group = GetHtreeGroupForPos(hdr, col, row); in DecodeAlphaData()
1028 HTreeGroup* htree_group = GetHtreeGroupForPos(hdr, col, row); in DecodeImageData() local
1039 assert(htree_group != NULL); in DecodeImageData()
1052 if ((col & mask) == 0) htree_group = GetHtreeGroupForPos(hdr, col, row); in DecodeImageData()
1053 if (htree_group->is_trivial_code) { in DecodeImageData()
1054 *src = htree_group->literal_arb; in DecodeImageData()
1058 if (htree_group->use_packed_table) { in DecodeImageData()
1059 code = ReadPackedSymbols(htree_group, br, src); in DecodeImageData()
1062 code = ReadSymbol(htree_group->htrees[GREEN], br); in DecodeImageData()
1066 if (htree_group->is_trivial_literal) { in DecodeImageData()
1067 *src = htree_group->literal_arb | (code << 8); in DecodeImageData()
1070 red = ReadSymbol(htree_group->htrees[RED], br); in DecodeImageData()
1072 blue = ReadSymbol(htree_group->htrees[BLUE], br); in DecodeImageData()
1073 alpha = ReadSymbol(htree_group->htrees[ALPHA], br); in DecodeImageData()
1096 const int dist_symbol = ReadSymbol(htree_group->htrees[DIST], br); in DecodeImageData()
1118 if (col & mask) htree_group = GetHtreeGroupForPos(hdr, col, row); in DecodeImageData()