Lines Matching refs:code
37 * structure assignment. You'll need to fix this code if you have
159 unsigned int code;
161 /* Note that huffsize[] and huffcode[] are filled in code-length order,
181 /* Figure C.1: make table of Huffman code length for each symbol */
195 /* We also validate that the counts represent a legal Huffman code tree. */
197 code = 0;
202 huffcode[p++] = code;
203 code++;
205 /* code is now 1 more than the last code used for codelength si; but
206 * it must still fit in si bits, since no code is allowed to be all ones.
208 if (((INT32) code) >= (((INT32) 1) << si))
210 code <<= 1;
219 /* valoffset[l] = huffval[] index of 1st symbol of code length l,
220 * minus the minimum code of length l
224 dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */
235 * with that code.
243 /* l = current code's length, p = its index in huffcode[] & huffval[]. */
244 /* Generate left-justified code followed by all possible bit sequences */
271 * Out-of-line code for bit fetching (shared with jdphuff.c).
344 * Save the marker code for later use.
394 * Out-of-line code for Huffman code decoding.
404 register INT32 code;
406 /* HUFF_DECODE has determined that the code is at least min_bits */
410 code = GET_BITS(l);
412 /* Collect the rest of the Huffman code one bit at a time. */
415 while (code > htbl->maxcode[l]) {
416 code <<= 1;
418 code |= GET_BITS(1);
433 return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ];