Lines Matching refs:bits_used
703 unsigned bits_used = 0, adj; in lshpack_enc_huff_encode() local
722 while (bits_used + henc->lens < sizeof(bits) * 8) in lshpack_enc_huff_encode()
726 bits_used += henc->lens; in lshpack_enc_huff_encode()
733 bits <<= sizeof(bits) * 8 - bits_used; in lshpack_enc_huff_encode()
734 bits_used = henc->lens - (sizeof(bits) * 8 - bits_used); in lshpack_enc_huff_encode()
735 bits |= henc->code >> bits_used; in lshpack_enc_huff_encode()
759 if (bits_used + cur_enc_code.bits < sizeof(bits) * 8) in lshpack_enc_huff_encode()
763 bits_used += cur_enc_code.bits; in lshpack_enc_huff_encode()
769 assert(bits_used > 0); in lshpack_enc_huff_encode()
770 if (0 == bits_used || bits_used >= sizeof(bits)*8) abort(); in lshpack_enc_huff_encode()
772 bits <<= sizeof(bits) * 8 - bits_used; in lshpack_enc_huff_encode()
773 bits_used = cur_enc_code.bits - (sizeof(bits) * 8 - bits_used); in lshpack_enc_huff_encode()
774 bits |= cur_enc_code.code >> bits_used; in lshpack_enc_huff_encode()
791 adj = bits_used + (-bits_used & 7); /* Round up to 8 */ in lshpack_enc_huff_encode()
792 if (bits_used && p_dst + (adj >> 3) <= dst_end) in lshpack_enc_huff_encode()
794 bits <<= -bits_used & 7; /* Align to byte boundary */ in lshpack_enc_huff_encode()
795 bits |= ((1 << (-bits_used & 7)) - 1); /* EOF */ in lshpack_enc_huff_encode()