Lines Matching full:bits
31 int put_bits; /* # of bits now in it */
212 i = (int) htbl->bits[l];
233 * it must still fit in si bits, since no code is allowed to be all ones.
292 /* Outputting bits to the file */
294 /* Only the right 24 bits of put_buffer are used; the valid bits are
295 * left-justified in this part. At most 16 bits can be passed to emit_bits
296 * in one call, and we never retain more than 7 bits in put_buffer
297 * between calls, so 24 bits are sufficient.
303 /* Emit some bits; return TRUE if successful, FALSE if must suspend */
313 put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */
315 put_bits += size; /* new number of bits in buffer */
317 put_buffer <<= 24 - put_bits; /* align incoming bits */
371 /* Find the number of bits needed for the magnitude of the coefficient */
383 /* Emit the Huffman-coded symbol for the number of bits */
387 /* Emit that number of bits of the value, if positive, */
415 /* Find the number of bits needed for the magnitude of the coefficient */
423 /* Emit Huffman symbol for run length / number of bits */
428 /* Emit that number of bits of the value, if positive, */
585 /* Find the number of bits needed for the magnitude of the coefficient */
597 /* Count the Huffman symbol for the number of bits */
614 /* Find the number of bits needed for the magnitude of the coefficient */
618 /* Find the number of bits needed for the magnitude of the coefficient */
626 /* Count Huffman symbol for run length / number of bits */
681 * one bits (so that padding bits added at the end of a compressed segment
692 * The JPEG standard requires Huffman codes to be no more than 16 bits long.
708 UINT8 bits[MAX_CLEN+1]; /* bits[k] = # of symbols with code length k */
717 MEMZERO(bits, SIZEOF(bits));
786 bits[codesize[i]]++;
790 /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure
796 * skipping the BITS entry for that prefix length, a code word from the next
797 * shortest nonzero BITS entry is converted into a prefix for two code words
802 while (bits[i] > 0) {
804 while (bits[j] == 0)
807 bits[i] -= 2; /* remove two symbols */
808 bits[i-1]++; /* one goes in this length */
809 bits[j+1] += 2; /* two new symbols in this length */
810 bits[j]--; /* symbol of this length is now a prefix */
815 while (bits[i] == 0) /* find largest codelength still in use */
817 bits[i]--;
820 MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits));