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



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020