Lines Matching refs:he
328 static void calculate_codes(HuffEntry *he) in calculate_codes() argument
333 qsort(he, 256, sizeof(*he), ut_huff_cmp_len); in calculate_codes()
336 while (he[last].len == 255 && last) in calculate_codes()
341 he[i].code = code >> (32 - he[i].len); in calculate_codes()
342 code += 0x80000000u >> (he[i].len - 1); in calculate_codes()
345 qsort(he, 256, sizeof(*he), huff_cmp_sym); in calculate_codes()
350 int width, int height, HuffEntry *he) in write_huff_codes() argument
361 put_bits(&pb, he[src[i]].len, he[src[i]].code); in write_huff_codes()
387 HuffEntry he[256]; in encode_plane() local
470 he[i].len = lengths[i]; in encode_plane()
471 he[i].sym = i; in encode_plane()
475 calculate_codes(he); in encode_plane()
488 send - sstart, he); in encode_plane()