Lines Matching defs:code
35 * structure assignment. You'll need to fix this code if you have
158 unsigned int code;
160 /* Note that huffsize[] and huffcode[] are filled in code-length order,
180 /* Figure C.1: make table of Huffman code length for each symbol */
194 /* We also validate that the counts represent a legal Huffman code tree. */
196 code = 0;
201 huffcode[p++] = code;
202 code++;
204 /* code is now 1 more than the last code used for codelength si; but
205 * it must still fit in si bits, since no code is allowed to be all ones.
207 if (((JPEG_INT32) code) >= (((JPEG_INT32) 1) << si))
209 code <<= 1;
218 /* valoffset[l] = huffval[] index of 1st symbol of code length l,
219 * minus the minimum code of length l
223 dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */
234 * with that code.
242 /* l = current code's length, p = its index in huffcode[] & huffval[]. */
243 /* Generate left-justified code followed by all possible bit sequences */
270 * Out-of-line code for bit fetching (shared with jdphuff.c).
343 * Save the marker code for later use.
393 * Out-of-line code for Huffman code decoding.
403 register JPEG_INT32 code;
405 /* HUFF_DECODE has determined that the code is at least min_bits */
409 code = GET_BITS(l);
411 /* Collect the rest of the Huffman code one bit at a time. */
414 while (code > htbl->maxcode[l]) {
415 code <<= 1;
417 code |= GET_BITS(1);
432 return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ];