Lines Matching refs:nbits
94 unsigned short nbits; /* # of bits/code */ member
103 #define lzw_nbits base.nbits
177 if ((_sp)->dec_bitsleft < (uint64)nbits) { \
184 (_sp)->dec_bitsleft -= nbits; \
343 if (nextbits < nbits) { \
347 code = (hcode_t)((nextdata >> (nextbits-nbits)) & nbitsmask); \
348 nextbits -= nbits; \
370 long nbits, nextbits, nbitsmask; in LZWDecode() local
431 nbits = sp->lzw_nbits; in LZWDecode()
448 nbits = BITS_MIN; in LZWDecode()
492 if (++nbits > BITS_MAX) /* should not happen */ in LZWDecode()
493 nbits = BITS_MAX; in LZWDecode()
494 nbitsmask = MAXCODE(nbits); in LZWDecode()
557 sp->lzw_nbits = (unsigned short) nbits; in LZWDecode()
587 if (nextbits < nbits) { \
592 nextdata >>= nbits; \
593 nextbits -= nbits; \
605 int code, nbits; in LZWDecodeCompat() local
658 nbits = sp->lzw_nbits; in LZWDecodeCompat()
675 nbits = BITS_MIN; in LZWDecodeCompat()
717 if (++nbits > BITS_MAX) /* should not happen */ in LZWDecodeCompat()
718 nbits = BITS_MAX; in LZWDecodeCompat()
719 nbitsmask = MAXCODE(nbits); in LZWDecodeCompat()
768 sp->lzw_nbits = (unsigned short)nbits; in LZWDecodeCompat()
857 nextdata = (nextdata << nbits) | c; \
858 nextbits += nbits; \
865 outcount += nbits; \
894 int free_ent, maxcode, nbits; in LZWEncode() local
914 nbits = sp->lzw_nbits; in LZWEncode()
992 nbits = BITS_MIN; in LZWEncode()
1000 nbits++; in LZWEncode()
1001 assert(nbits <= BITS_MAX); in LZWEncode()
1002 maxcode = (int) MAXCODE(nbits); in LZWEncode()
1020 nbits = BITS_MIN; in LZWEncode()
1041 sp->lzw_nbits = (unsigned short)nbits; in LZWEncode()
1058 int nbits = sp->lzw_nbits; in LZWPostEncode() local
1077 nbits = BITS_MIN; in LZWPostEncode()
1084 nbits++; in LZWPostEncode()
1085 assert(nbits <= BITS_MAX); in LZWPostEncode()