LMMS
Loading...
Searching...
No Matches
jdphuff.c
Go to the documentation of this file.
1/*
2 * jdphuff.c
3 *
4 * Copyright (C) 1995-1997, Thomas G. Lane.
5 * This file is part of the Independent JPEG Group's software.
6 * For conditions of distribution and use, see the accompanying README file.
7 *
8 * This file contains Huffman entropy decoding routines for progressive JPEG.
9 *
10 * Much of the complexity here has to do with supporting input suspension.
11 * If the data source module demands suspension, we want to be able to back
12 * up to the start of the current MCU. To do this, we copy state variables
13 * into local working storage, and update them back to the permanent
14 * storage only upon successful completion of an MCU.
15 */
16
17#define JPEG_INTERNALS
18#include "jinclude.h"
19#include "jpeglib.h"
20#include "jdhuff.h" /* Declarations shared with jdhuff.c */
21
22
23#ifdef D_PROGRESSIVE_SUPPORTED
24
25/*
26 * Expanded entropy decoder object for progressive Huffman decoding.
27 *
28 * The savable_state subrecord contains fields that change within an MCU,
29 * but must not be updated permanently until we complete the MCU.
30 */
31
32typedef struct {
33 unsigned int EOBRUN; /* remaining EOBs in EOBRUN */
34 int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
36
37/* This macro is to work around compilers with missing or broken
38 * structure assignment. You'll need to fix this code if you have
39 * such a compiler and you change MAX_COMPS_IN_SCAN.
40 */
41
42#ifndef NO_STRUCT_ASSIGN
43#define ASSIGN_STATE(dest,src) ((dest) = (src))
44#else
45#if MAX_COMPS_IN_SCAN == 4
46#define ASSIGN_STATE(dest,src) \
47 ((dest).EOBRUN = (src).EOBRUN, \
48 (dest).last_dc_val[0] = (src).last_dc_val[0], \
49 (dest).last_dc_val[1] = (src).last_dc_val[1], \
50 (dest).last_dc_val[2] = (src).last_dc_val[2], \
51 (dest).last_dc_val[3] = (src).last_dc_val[3])
52#endif
53#endif
54
55
56typedef struct {
57 struct jpeg_entropy_decoder pub; /* public fields */
58
59 /* These fields are loaded into local variables at start of each MCU.
60 * In case of suspension, we exit WITHOUT updating them.
61 */
62 bitread_perm_state bitstate; /* Bit buffer at start of MCU */
63 savable_state3 saved; /* Other state at start of MCU */
64
65 /* These fields are NOT loaded into local working state. */
66 unsigned int restarts_to_go; /* MCUs left in this restart interval */
67
68 /* Pointers to derived tables (these workspaces have image lifespan) */
70
71 d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */
73
75
76/* Forward declarations */
78 JBLOCKROW *MCU_data));
80 JBLOCKROW *MCU_data));
82 JBLOCKROW *MCU_data));
84 JBLOCKROW *MCU_data));
85
86
87/*
88 * Initialize for a Huffman-compressed scan.
89 */
90
91METHODDEF(void)
92start_pass_phuff_decoder (j_decompress_ptr cinfo)
93{
95 boolean is_DC_band, bad;
96 int ci, coefi, tbl;
97 int *coef_bit_ptr;
99
100 is_DC_band = (cinfo->Ss == 0);
101
102 /* Validate scan parameters */
103 bad = FALSE;
104 if (is_DC_band) {
105 if (cinfo->Se != 0)
106 bad = TRUE;
107 } else {
108 /* need not check Ss/Se < 0 since they came from unsigned bytes */
109 if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2)
110 bad = TRUE;
111 /* AC scans may have only one component */
112 if (cinfo->comps_in_scan != 1)
113 bad = TRUE;
114 }
115 if (cinfo->Ah != 0) {
116 /* Successive approximation refinement scan: must have Al = Ah-1. */
117 if (cinfo->Al != cinfo->Ah-1)
118 bad = TRUE;
119 }
120 if (cinfo->Al > 13) /* need not check for < 0 */
121 bad = TRUE;
122 /* Arguably the maximum Al value should be less than 13 for 8-bit precision,
123 * but the spec doesn't say so, and we try to be liberal about what we
124 * accept. Note: large Al values could result in out-of-range DC
125 * coefficients during early scans, leading to bizarre displays due to
126 * overflows in the IDCT math. But we won't crash.
127 */
128 if (bad)
129 ERREXIT4(cinfo, JERR_BAD_PROGRESSION,
130 cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);
131 /* Update progression status, and verify that scan order is legal.
132 * Note that inter-scan inconsistencies are treated as warnings
133 * not fatal errors ... not clear if this is right way to behave.
134 */
135 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
136 int cindex = cinfo->cur_comp_info[ci]->component_index;
137 coef_bit_ptr = & cinfo->coef_bits[cindex][0];
138 if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */
139 WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0);
140 for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) {
141 int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi];
142 if (cinfo->Ah != expected)
143 WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi);
144 coef_bit_ptr[coefi] = cinfo->Al;
145 }
146 }
147
148 /* Select MCU decoding routine */
149 if (cinfo->Ah == 0) {
150 if (is_DC_band)
151 entropy->pub.decode_mcu = decode_mcu_DC_first;
152 else
153 entropy->pub.decode_mcu = decode_mcu_AC_first;
154 } else {
155 if (is_DC_band)
156 entropy->pub.decode_mcu = decode_mcu_DC_refine;
157 else
158 entropy->pub.decode_mcu = decode_mcu_AC_refine;
159 }
160
161 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
162 compptr = cinfo->cur_comp_info[ci];
163 /* Make sure requested tables are present, and compute derived tables.
164 * We may build same derived table more than once, but it's not expensive.
165 */
166 if (is_DC_band) {
167 if (cinfo->Ah == 0) { /* DC refinement needs no table */
168 tbl = compptr->dc_tbl_no;
169 jpeg_make_d_derived_tbl(cinfo, TRUE, tbl,
170 & entropy->derived_tbls[tbl]);
171 }
172 } else {
173 tbl = compptr->ac_tbl_no;
174 jpeg_make_d_derived_tbl(cinfo, FALSE, tbl,
175 & entropy->derived_tbls[tbl]);
176 /* remember the single active table */
177 entropy->ac_derived_tbl = entropy->derived_tbls[tbl];
178 }
179 /* Initialize DC predictions to 0 */
180 entropy->saved.last_dc_val[ci] = 0;
181 }
182
183 /* Initialize bitread state variables */
184 entropy->bitstate.bits_left = 0;
185 entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
186 entropy->pub.insufficient_data = FALSE;
187
188 /* Initialize private state variables */
189 entropy->saved.EOBRUN = 0;
190
191 /* Initialize restart counter */
192 entropy->restarts_to_go = cinfo->restart_interval;
193}
194
195
196/*
197 * Check for a restart marker & resynchronize decoder.
198 * Returns FALSE if must suspend.
199 */
200
201LOCAL(boolean)
203{
204 phuff_entropy_ptr2 entropy = (phuff_entropy_ptr2) cinfo->entropy;
205 int ci;
206
207 /* Throw away any unused bits remaining in bit buffer; */
208 /* include any full bytes in next_marker's count of discarded bytes */
209 cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
210 entropy->bitstate.bits_left = 0;
211
212 /* Advance past the RSTn marker */
213 if (! (*cinfo->marker->read_restart_marker) (cinfo))
214 return FALSE;
215
216 /* Re-initialize DC predictions to 0 */
217 for (ci = 0; ci < cinfo->comps_in_scan; ci++)
218 entropy->saved.last_dc_val[ci] = 0;
219 /* Re-init EOB run count, too */
220 entropy->saved.EOBRUN = 0;
221
222 /* Reset restart counter */
223 entropy->restarts_to_go = cinfo->restart_interval;
224
225 /* Reset out-of-data flag, unless read_restart_marker left us smack up
226 * against a marker. In that case we will end up treating the next data
227 * segment as empty, and we can avoid producing bogus output pixels by
228 * leaving the flag set.
229 */
230 if (cinfo->unread_marker == 0)
231 entropy->pub.insufficient_data = FALSE;
232
233 return TRUE;
234}
235
236
237/*
238 * Huffman MCU decoding.
239 * Each of these routines decodes and returns one MCU's worth of
240 * Huffman-compressed coefficients.
241 * The coefficients are reordered from zigzag order into natural array order,
242 * but are not dequantized.
243 *
244 * The i'th block of the MCU is stored into the block pointed to by
245 * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER.
246 *
247 * We return FALSE if data source requested suspension. In that case no
248 * changes have been made to permanent state. (Exception: some output
249 * coefficients may already have been assigned. This is harmless for
250 * spectral selection, since we'll just re-assign them on the next call.
251 * Successive approximation AC refinement has to be more careful, however.)
252 */
253
254/*
255 * MCU decoding for DC initial scan (either spectral selection,
256 * or first pass of successive approximation).
257 */
258
259METHODDEF(boolean)
261{
262 phuff_entropy_ptr2 entropy = (phuff_entropy_ptr2) cinfo->entropy;
263 int Al = cinfo->Al;
264 int s, r;
265 int blkn, ci;
266 JBLOCKROW block;
268 savable_state3 state;
269 d_derived_tbl * tbl;
271
272 /* Process restart marker if needed; may have to suspend */
273 if (cinfo->restart_interval) {
274 if (entropy->restarts_to_go == 0)
275 if (! process_restartp(cinfo))
276 return FALSE;
277 }
278
279 /* If we've run out of data, just leave the MCU set to zeroes.
280 * This way, we return uniform gray for the remainder of the segment.
281 */
282 if (! entropy->pub.insufficient_data) {
283
284 /* Load up working state */
285 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
286 ASSIGN_STATE(state, entropy->saved);
287
288 /* Outer loop handles each block in the MCU */
289
290 for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
291 block = MCU_data[blkn];
292 ci = cinfo->MCU_membership[blkn];
293 compptr = cinfo->cur_comp_info[ci];
294 tbl = entropy->derived_tbls[compptr->dc_tbl_no];
295
296 /* Decode a single block's worth of coefficients */
297
298 /* Section F.2.2.1: decode the DC coefficient difference */
299 HUFF_DECODE(s, br_state, tbl, return FALSE, label1);
300 if (s) {
301 CHECK_BIT_BUFFER(br_state, s, return FALSE);
302 r = GET_BITS(s);
303 s = HUFF_EXTEND(r, s);
304 }
305
306 /* Convert DC difference to actual value, update last_dc_val */
307 s += state.last_dc_val[ci];
308 state.last_dc_val[ci] = s;
309 /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */
310 (*block)[0] = (JCOEF) (s << Al);
311 }
312
313 /* Completed MCU, so update state */
314 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
315 ASSIGN_STATE(entropy->saved, state);
316 }
317
318 /* Account for restart interval (no-op if not using restarts) */
319 entropy->restarts_to_go--;
320
321 return TRUE;
322}
323
324
325/*
326 * MCU decoding for AC initial scan (either spectral selection,
327 * or first pass of successive approximation).
328 */
329
330METHODDEF(boolean)
332{
333 phuff_entropy_ptr2 entropy = (phuff_entropy_ptr2) cinfo->entropy;
334 int Se = cinfo->Se;
335 int Al = cinfo->Al;
336 int s, k, r;
337 unsigned int EOBRUN;
338 JBLOCKROW block;
340 d_derived_tbl * tbl;
341
342 /* Process restart marker if needed; may have to suspend */
343 if (cinfo->restart_interval) {
344 if (entropy->restarts_to_go == 0)
345 if (! process_restartp(cinfo))
346 return FALSE;
347 }
348
349 /* If we've run out of data, just leave the MCU set to zeroes.
350 * This way, we return uniform gray for the remainder of the segment.
351 */
352 if (! entropy->pub.insufficient_data) {
353
354 /* Load up working state.
355 * We can avoid loading/saving bitread state if in an EOB run.
356 */
357 EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
358
359 /* There is always only one block per MCU */
360
361 if (EOBRUN > 0) /* if it's a band of zeroes... */
362 EOBRUN--; /* ...process it now (we do nothing) */
363 else {
364 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
365 block = MCU_data[0];
366 tbl = entropy->ac_derived_tbl;
367
368 for (k = cinfo->Ss; k <= Se; k++) {
369 HUFF_DECODE(s, br_state, tbl, return FALSE, label2);
370 r = s >> 4;
371 s &= 15;
372 if (s) {
373 k += r;
374 CHECK_BIT_BUFFER(br_state, s, return FALSE);
375 r = GET_BITS(s);
376 s = HUFF_EXTEND(r, s);
377 /* Scale and output coefficient in natural (dezigzagged) order */
378 (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al);
379 } else {
380 if (r == 15) { /* ZRL */
381 k += 15; /* skip 15 zeroes in band */
382 } else { /* EOBr, run length is 2^r + appended bits */
383 EOBRUN = 1 << r;
384 if (r) { /* EOBr, r > 0 */
385 CHECK_BIT_BUFFER(br_state, r, return FALSE);
386 r = GET_BITS(r);
387 EOBRUN += r;
388 }
389 EOBRUN--; /* this band is processed at this moment */
390 break; /* force end-of-band */
391 }
392 }
393 }
394
395 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
396 }
397
398 /* Completed MCU, so update state */
399 entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
400 }
401
402 /* Account for restart interval (no-op if not using restarts) */
403 entropy->restarts_to_go--;
404
405 return TRUE;
406}
407
408
409/*
410 * MCU decoding for DC successive approximation refinement scan.
411 * Note: we assume such scans can be multi-component, although the spec
412 * is not very clear on the point.
413 */
414
415METHODDEF(boolean)
417{
418 phuff_entropy_ptr2 entropy = (phuff_entropy_ptr2) cinfo->entropy;
419 int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
420 int blkn;
421 JBLOCKROW block;
423
424 /* Process restart marker if needed; may have to suspend */
425 if (cinfo->restart_interval) {
426 if (entropy->restarts_to_go == 0)
427 if (! process_restartp(cinfo))
428 return FALSE;
429 }
430
431 /* Not worth the cycles to check insufficient_data here,
432 * since we will not change the data anyway if we read zeroes.
433 */
434
435 /* Load up working state */
436 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
437
438 /* Outer loop handles each block in the MCU */
439
440 for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
441 block = MCU_data[blkn];
442
443 /* Encoded data is simply the next bit of the two's-complement DC value */
444 CHECK_BIT_BUFFER(br_state, 1, return FALSE);
445 if (GET_BITS(1))
446 (*block)[0] |= p1;
447 /* Note: since we use |=, repeating the assignment later is safe */
448 }
449
450 /* Completed MCU, so update state */
451 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
452
453 /* Account for restart interval (no-op if not using restarts) */
454 entropy->restarts_to_go--;
455
456 return TRUE;
457}
458
459
460/*
461 * MCU decoding for AC successive approximation refinement scan.
462 */
463
464METHODDEF(boolean)
466{
467 phuff_entropy_ptr2 entropy = (phuff_entropy_ptr2) cinfo->entropy;
468 int Se = cinfo->Se;
469 int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
470 int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
471 int s, k, r;
472 unsigned int EOBRUN;
473 JBLOCKROW block;
474 JCOEFPTR thiscoef;
476 d_derived_tbl * tbl;
477 int num_newnz;
478 int newnz_pos[DCTSIZE2];
479
480 /* Process restart marker if needed; may have to suspend */
481 if (cinfo->restart_interval) {
482 if (entropy->restarts_to_go == 0)
483 if (! process_restartp(cinfo))
484 return FALSE;
485 }
486
487 /* If we've run out of data, don't modify the MCU.
488 */
489 if (! entropy->pub.insufficient_data) {
490
491 /* Load up working state */
492 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
493 EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
494
495 /* There is always only one block per MCU */
496 block = MCU_data[0];
497 tbl = entropy->ac_derived_tbl;
498
499 /* If we are forced to suspend, we must undo the assignments to any newly
500 * nonzero coefficients in the block, because otherwise we'd get confused
501 * next time about which coefficients were already nonzero.
502 * But we need not undo addition of bits to already-nonzero coefficients;
503 * instead, we can test the current bit to see if we already did it.
504 */
505 num_newnz = 0;
506
507 /* initialize coefficient loop counter to start of band */
508 k = cinfo->Ss;
509
510 if (EOBRUN == 0) {
511 for (; k <= Se; k++) {
512 HUFF_DECODE(s, br_state, tbl, goto undoit, label3);
513 r = s >> 4;
514 s &= 15;
515 if (s) {
516 if (s != 1) /* size of new coef should always be 1 */
517 WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
518 CHECK_BIT_BUFFER(br_state, 1, goto undoit);
519 if (GET_BITS(1))
520 s = p1; /* newly nonzero coef is positive */
521 else
522 s = m1; /* newly nonzero coef is negative */
523 } else {
524 if (r != 15) {
525 EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */
526 if (r) {
527 CHECK_BIT_BUFFER(br_state, r, goto undoit);
528 r = GET_BITS(r);
529 EOBRUN += r;
530 }
531 break; /* rest of block is handled by EOB logic */
532 }
533 /* note s = 0 for processing ZRL */
534 }
535 /* Advance over already-nonzero coefs and r still-zero coefs,
536 * appending correction bits to the nonzeroes. A correction bit is 1
537 * if the absolute value of the coefficient must be increased.
538 */
539 do {
540 thiscoef = *block + jpeg_natural_order[k];
541 if (*thiscoef != 0) {
542 CHECK_BIT_BUFFER(br_state, 1, goto undoit);
543 if (GET_BITS(1)) {
544 if ((*thiscoef & p1) == 0) { /* do nothing if already set it */
545 if (*thiscoef >= 0)
546 *thiscoef += p1;
547 else
548 *thiscoef += m1;
549 }
550 }
551 } else {
552 if (--r < 0)
553 break; /* reached target zero coefficient */
554 }
555 k++;
556 } while (k <= Se);
557 if (s) {
558 int pos = jpeg_natural_order[k];
559 /* Output newly nonzero coefficient */
560 (*block)[pos] = (JCOEF) s;
561 /* Remember its position in case we have to suspend */
562 newnz_pos[num_newnz++] = pos;
563 }
564 }
565 }
566
567 if (EOBRUN > 0) {
568 /* Scan any remaining coefficient positions after the end-of-band
569 * (the last newly nonzero coefficient, if any). Append a correction
570 * bit to each already-nonzero coefficient. A correction bit is 1
571 * if the absolute value of the coefficient must be increased.
572 */
573 for (; k <= Se; k++) {
574 thiscoef = *block + jpeg_natural_order[k];
575 if (*thiscoef != 0) {
576 CHECK_BIT_BUFFER(br_state, 1, goto undoit);
577 if (GET_BITS(1)) {
578 if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */
579 if (*thiscoef >= 0)
580 *thiscoef += p1;
581 else
582 *thiscoef += m1;
583 }
584 }
585 }
586 }
587 /* Count one block completed in EOB run */
588 EOBRUN--;
589 }
590
591 /* Completed MCU, so update state */
592 BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
593 entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
594 }
595
596 /* Account for restart interval (no-op if not using restarts) */
597 entropy->restarts_to_go--;
598
599 return TRUE;
600
601undoit:
602 /* Re-zero any output coefficients that we made newly nonzero */
603 while (num_newnz > 0)
604 (*block)[newnz_pos[--num_newnz]] = 0;
605
606 return FALSE;
607}
608
609
610/*
611 * Module initialization routine for progressive Huffman entropy decoding.
612 */
613
614GLOBAL(void)
616{
617 phuff_entropy_ptr2 entropy;
618 int *coef_bit_ptr;
619 int ci, i;
620
621 entropy = (phuff_entropy_ptr2)
622 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
624 cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
625 entropy->pub.start_pass = start_pass_phuff_decoder;
626
627 /* Mark derived tables unallocated */
628 for (i = 0; i < NUM_HUFF_TBLS; i++) {
629 entropy->derived_tbls[i] = NULL;
630 }
631
632 /* Create progression status table */
633 cinfo->coef_bits = (int (*)[DCTSIZE2])
634 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
635 cinfo->num_components*DCTSIZE2*SIZEOF(int));
636 coef_bit_ptr = & cinfo->coef_bits[0][0];
637 for (ci = 0; ci < cinfo->num_components; ci++)
638 for (i = 0; i < DCTSIZE2; i++)
639 *coef_bit_ptr++ = -1;
640}
641
642#endif /* D_PROGRESSIVE_SUPPORTED */
#define NULL
Definition CarlaBridgeFormat.cpp:30
register unsigned k
Definition inflate.c:946
register unsigned i
Definition inflate.c:1575
unsigned s
Definition inflate.c:1555
#define ASSIGN_STATE(dest, src)
Definition jchuff.c:41
jpeg_component_info * compptr
Definition jdct.h:105
jpeg_make_d_derived_tbl(j_decompress_ptr cinfo, boolean isDC, int tblno, d_derived_tbl **pdtbl)
Definition jdhuff.c:149
#define GET_BITS(nbits)
Definition jdhuff.h:147
#define BITREAD_STATE_VARS
Definition jdhuff.h:105
#define BITREAD_LOAD_STATE(cinfop, permstate)
Definition jdhuff.h:110
#define CHECK_BIT_BUFFER(state, nbits, action)
Definition jdhuff.h:141
#define BITREAD_SAVE_STATE(cinfop, permstate)
Definition jdhuff.h:117
decode_mcu_DC_refine(j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
Definition jdphuff.c:416
jinit_phuff_decoder(j_decompress_ptr cinfo)
Definition jdphuff.c:615
decode_mcu_AC_refine(j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
Definition jdphuff.c:465
process_restartp(j_decompress_ptr cinfo)
Definition jdphuff.c:202
phuff_entropy_decoder * phuff_entropy_ptr2
Definition jdphuff.c:74
decode_mcu_AC_first(j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
Definition jdphuff.c:331
decode_mcu_DC_first(j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
Definition jdphuff.c:260
#define WARNMS2(cinfo, code, p1, p2)
Definition jerror.h:245
#define ERREXIT4(cinfo, code, p1, p2, p3, p4)
Definition jerror.h:223
#define SIZEOF(object)
Definition jinclude.h:83
#define LOCAL(type)
Definition jmorecfg.h:186
#define METHODDEF(type)
Definition jmorecfg.h:184
const int jpeg_natural_order[]
Definition jutils.c:53
struct jpeg_decompress_struct * j_decompress_ptr
Definition jpeglib.h:263
JBLOCK FAR * JBLOCKROW
Definition jpeglib.h:71
struct jpeg_common_struct * j_common_ptr
Definition jpeglib.h:261
#define JPP(arglist)
Definition jpeglib.h:818
#define NUM_HUFF_TBLS
Definition jpeglib.h:44
JCOEF FAR * JCOEFPTR
Definition jpeglib.h:75
#define JPOOL_IMAGE
Definition jpeglib.h:749
#define MAX_COMPS_IN_SCAN
Definition jpeglib.h:46
#define DCTSIZE2
Definition jpeglib.h:42
Definition jdhuff.h:85
int bits_left
Definition jdhuff.h:87
Definition jdhuff.h:29
Definition jpeglib.h:116
struct jpeg_entropy_decoder * entropy
Definition jpeglib.h:625
Definition jpegint.h:209
boolean insufficient_data
Definition jpegint.h:216
Definition jdphuff.c:56
bitread_perm_state bitstate
Definition jdphuff.c:62
unsigned int restarts_to_go
Definition jdphuff.c:66
d_derived_tbl * ac_derived_tbl
Definition jdphuff.c:71
struct jpeg_entropy_decoder pub
Definition jdphuff.c:57
d_derived_tbl * derived_tbls[NUM_HUFF_TBLS]
Definition jdphuff.c:69
savable_state3 saved
Definition jdphuff.c:63
Definition jdphuff.c:32
int last_dc_val[MAX_COMPS_IN_SCAN]
Definition jdphuff.c:34
unsigned int EOBRUN
Definition jdphuff.c:33
#define GLOBAL(g)
Definition crypt.c:87
for(n=0;n< RAND_HEAD_LEN;n++)
Definition crypt.c:467
int r
Definition crypt.c:458
if(GLOBAL(newzip))
Definition crypt.c:475
typedef int(UZ_EXP MsgFn)()
#define TRUE
Definition unzpriv.h:1295
#define FALSE
Definition unzpriv.h:1298