Main MRPT website > C++ reference for MRPT 1.9.9
jdmaster.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 
14 /* Private state */
15 
16 typedef struct
17 {
18  struct jpeg_decomp_master pub; /* public fields */
19 
20  int pass_number; /* # of passes completed */
21 
22  boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */
23 
24  /* Saved references to initialized quantizer modules,
25  * in case we need to switch modes.
26  */
30 
32 
33 /*
34  * Determine whether merged upsample/color conversion should be used.
35  * CRUCIAL: this must match the actual capabilities of jdmerge.c!
36  */
37 
38 LOCAL(boolean)
40 {
41 #ifdef UPSAMPLE_MERGING_SUPPORTED
42  /* Merging is the equivalent of plain box-filter upsampling */
43  if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling) return FALSE;
44  /* jdmerge.c only supports YCC=>RGB color conversion */
45  if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 ||
46  cinfo->out_color_space != JCS_RGB ||
47  cinfo->out_color_components != RGB_PIXELSIZE)
48  return FALSE;
49  /* and it only handles 2h1v or 2h2v sampling ratios */
50  if (cinfo->comp_info[0].h_samp_factor != 2 ||
51  cinfo->comp_info[1].h_samp_factor != 1 ||
52  cinfo->comp_info[2].h_samp_factor != 1 ||
53  cinfo->comp_info[0].v_samp_factor > 2 ||
54  cinfo->comp_info[1].v_samp_factor != 1 ||
55  cinfo->comp_info[2].v_samp_factor != 1)
56  return FALSE;
57  /* furthermore, it doesn't work if we've scaled the IDCTs differently */
58  if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size ||
59  cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size ||
60  cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size)
61  return FALSE;
62  /* ??? also need to test for upsample-time rescaling, when & if supported */
63  return TRUE; /* by golly, it'll work... */
64 #else
65  return FALSE;
66 #endif
67 }
68 
69 /*
70  * Compute output image dimensions and related values.
71  * NOTE: this is exported for possible use by application.
72  * Hence it mustn't do anything that can't be done twice.
73  * Also note that it may be called before the master module is initialized!
74  */
75 
76 GLOBAL(void)
78 /* Do computations that are needed before master selection phase */
79 {
80 #ifdef IDCT_SCALING_SUPPORTED
81  int ci;
83 #endif
84 
85  /* Prevent application from calling me at wrong times */
86  if (cinfo->global_state != DSTATE_READY)
87  ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
88 
89 #ifdef IDCT_SCALING_SUPPORTED
90 
91  /* Compute actual output image dimensions and DCT scaling choices. */
92  if (cinfo->scale_num * 8 <= cinfo->scale_denom)
93  {
94  /* Provide 1/8 scaling */
95  cinfo->output_width =
96  (JDIMENSION)jdiv_round_up((long)cinfo->image_width, 8L);
97  cinfo->output_height =
98  (JDIMENSION)jdiv_round_up((long)cinfo->image_height, 8L);
99  cinfo->min_DCT_scaled_size = 1;
100  }
101  else if (cinfo->scale_num * 4 <= cinfo->scale_denom)
102  {
103  /* Provide 1/4 scaling */
104  cinfo->output_width =
105  (JDIMENSION)jdiv_round_up((long)cinfo->image_width, 4L);
106  cinfo->output_height =
107  (JDIMENSION)jdiv_round_up((long)cinfo->image_height, 4L);
108  cinfo->min_DCT_scaled_size = 2;
109  }
110  else if (cinfo->scale_num * 2 <= cinfo->scale_denom)
111  {
112  /* Provide 1/2 scaling */
113  cinfo->output_width =
114  (JDIMENSION)jdiv_round_up((long)cinfo->image_width, 2L);
115  cinfo->output_height =
116  (JDIMENSION)jdiv_round_up((long)cinfo->image_height, 2L);
117  cinfo->min_DCT_scaled_size = 4;
118  }
119  else
120  {
121  /* Provide 1/1 scaling */
122  cinfo->output_width = cinfo->image_width;
123  cinfo->output_height = cinfo->image_height;
124  cinfo->min_DCT_scaled_size = DCTSIZE;
125  }
126  /* In selecting the actual DCT scaling for each component, we try to
127  * scale up the chroma components via IDCT scaling rather than upsampling.
128  * This saves time if the upsampler gets to use 1:1 scaling.
129  * Note this code assumes that the supported DCT scalings are powers of 2.
130  */
131  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
132  ci++, compptr++)
133  {
134  int ssize = cinfo->min_DCT_scaled_size;
135  while (ssize < DCTSIZE &&
136  (compptr->h_samp_factor * ssize * 2 <=
137  cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) &&
138  (compptr->v_samp_factor * ssize * 2 <=
139  cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size))
140  {
141  ssize = ssize * 2;
142  }
143  compptr->DCT_scaled_size = ssize;
144  }
145 
146  /* Recompute downsampled dimensions of components;
147  * application needs to know these if using raw downsampled data.
148  */
149  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
150  ci++, compptr++)
151  {
152  /* Size in samples, after IDCT scaling */
154  (long)cinfo->image_width *
156  (long)(cinfo->max_h_samp_factor * DCTSIZE));
158  (long)cinfo->image_height *
160  (long)(cinfo->max_v_samp_factor * DCTSIZE));
161  }
162 
163 #else /* !IDCT_SCALING_SUPPORTED */
164 
165  /* Hardwire it to "no scaling" */
166  cinfo->output_width = cinfo->image_width;
167  cinfo->output_height = cinfo->image_height;
168 /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE,
169  * and has computed unscaled downsampled_width and downsampled_height.
170  */
171 
172 #endif /* IDCT_SCALING_SUPPORTED */
173 
174  /* Report number of components in selected colorspace. */
175  /* Probably this should be in the color conversion module... */
176  switch (cinfo->out_color_space)
177  {
178  case JCS_GRAYSCALE:
179  cinfo->out_color_components = 1;
180  break;
181  case JCS_RGB:
182 #if RGB_PIXELSIZE != 3
183  cinfo->out_color_components = RGB_PIXELSIZE;
184  break;
185 #endif /* else share code with YCbCr */
186  case JCS_YCbCr:
187  cinfo->out_color_components = 3;
188  break;
189  case JCS_CMYK:
190  case JCS_YCCK:
191  cinfo->out_color_components = 4;
192  break;
193  default: /* else must be same colorspace as in file */
194  cinfo->out_color_components = cinfo->num_components;
195  break;
196  }
197  cinfo->output_components =
198  (cinfo->quantize_colors ? 1 : cinfo->out_color_components);
199 
200  /* See if upsampler will want to emit more than one row at a time */
201  if (use_merged_upsample(cinfo))
202  cinfo->rec_outbuf_height = cinfo->max_v_samp_factor;
203  else
204  cinfo->rec_outbuf_height = 1;
205 }
206 
207 /*
208  * Several decompression processes need to range-limit values to the range
209  * 0..MAXJSAMPLE; the input value may fall somewhat outside this range
210  * due to noise introduced by quantization, roundoff error, etc. These
211  * processes are inner loops and need to be as fast as possible. On most
212  * machines, particularly CPUs with pipelines or instruction prefetch,
213  * a (subscript-check-less) C table lookup
214  * x = sample_range_limit[x];
215  * is faster than explicit tests
216  * if (x < 0) x = 0;
217  * else if (x > MAXJSAMPLE) x = MAXJSAMPLE;
218  * These processes all use a common table prepared by the routine below.
219  *
220  * For most steps we can mathematically guarantee that the initial value
221  * of x is within MAXJSAMPLE+1 of the legal range, so a table running from
222  * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient. But for the initial
223  * limiting step (just after the IDCT), a wildly out-of-range value is
224  * possible if the input data is corrupt. To avoid any chance of indexing
225  * off the end of memory and getting a bad-pointer trap, we perform the
226  * post-IDCT limiting thus:
227  * x = range_limit[x & MASK];
228  * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit
229  * samples. Under normal circumstances this is more than enough range and
230  * a correct output will be generated; with bogus input data the mask will
231  * cause wraparound, and we will safely generate a bogus-but-in-range output.
232  * For the post-IDCT step, we want to convert the data from signed to unsigned
233  * representation by adding CENTERJSAMPLE at the same time that we limit it.
234  * So the post-IDCT limiting table ends up looking like this:
235  * CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE,
236  * MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times),
237  * 0 (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times),
238  * 0,1,...,CENTERJSAMPLE-1
239  * Negative inputs select values from the upper half of the table after
240  * masking.
241  *
242  * We can save some space by overlapping the start of the post-IDCT table
243  * with the simpler range limiting table. The post-IDCT table begins at
244  * sample_range_limit + CENTERJSAMPLE.
245  *
246  * Note that the table is allocated in near data space on PCs; it's small
247  * enough and used often enough to justify this.
248  */
249 
250 LOCAL(void)
252 /* Allocate and fill in the sample_range_limit table */
253 {
254  JSAMPLE* table;
255  int i;
256 
257  table = (JSAMPLE*)(*cinfo->mem->alloc_small)(
258  (j_common_ptr)cinfo, JPOOL_IMAGE,
259  (5 * (MAXJSAMPLE + 1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE));
260  table += (MAXJSAMPLE + 1); /* allow negative subscripts of simple table */
261  cinfo->sample_range_limit = table;
262  /* First segment of "simple" table: limit[x] = 0 for x < 0 */
263  MEMZERO(table - (MAXJSAMPLE + 1), (MAXJSAMPLE + 1) * SIZEOF(JSAMPLE));
264  /* Main part of "simple" table: limit[x] = x */
265  for (i = 0; i <= MAXJSAMPLE; i++) table[i] = (JSAMPLE)i;
266  table += CENTERJSAMPLE; /* Point to where post-IDCT table starts */
267  /* End of simple table, rest of first half of post-IDCT table */
268  for (i = CENTERJSAMPLE; i < 2 * (MAXJSAMPLE + 1); i++)
269  table[i] = MAXJSAMPLE;
270  /* Second half of post-IDCT table */
271  MEMZERO(
272  table + (2 * (MAXJSAMPLE + 1)),
273  (2 * (MAXJSAMPLE + 1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE));
274  MEMCOPY(
275  table + (4 * (MAXJSAMPLE + 1) - CENTERJSAMPLE),
276  cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE));
277 }
278 
279 /*
280  * Master selection of decompression modules.
281  * This is done once at jpeg_start_decompress time. We determine
282  * which modules will be used and give them appropriate initialization calls.
283  * We also initialize the decompressor input side to begin consuming data.
284  *
285  * Since jpeg_read_header has finished, we know what is in the SOF
286  * and (first) SOS markers. We also have all the application parameter
287  * settings.
288  */
289 
290 LOCAL(void)
292 {
293  my_master_ptr master = (my_master_ptr)cinfo->master;
294  boolean use_c_buffer;
295  long samplesperrow;
296  JDIMENSION jd_samplesperrow;
297 
298  /* Initialize dimensions and other stuff */
301 
302  /* Width of an output scanline must be representable as JDIMENSION. */
303  samplesperrow =
304  (long)cinfo->output_width * (long)cinfo->out_color_components;
305  jd_samplesperrow = (JDIMENSION)samplesperrow;
306  if ((long)jd_samplesperrow != samplesperrow)
307  ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
308 
309  /* Initialize my private state */
310  master->pass_number = 0;
311  master->using_merged_upsample = use_merged_upsample(cinfo);
312 
313  /* Color quantizer selection */
314  master->quantizer_1pass = nullptr;
315  master->quantizer_2pass = nullptr;
316  /* No mode changes if not using buffered-image mode. */
317  if (!cinfo->quantize_colors || !cinfo->buffered_image)
318  {
319  cinfo->enable_1pass_quant = FALSE;
320  cinfo->enable_external_quant = FALSE;
321  cinfo->enable_2pass_quant = FALSE;
322  }
323  if (cinfo->quantize_colors)
324  {
325  if (cinfo->raw_data_out) ERREXIT(cinfo, JERR_NOTIMPL);
326  /* 2-pass quantizer only works in 3-component color space. */
327  if (cinfo->out_color_components != 3)
328  {
329  cinfo->enable_1pass_quant = TRUE;
330  cinfo->enable_external_quant = FALSE;
331  cinfo->enable_2pass_quant = FALSE;
332  cinfo->colormap = nullptr;
333  }
334  else if (cinfo->colormap != nullptr)
335  {
336  cinfo->enable_external_quant = TRUE;
337  }
338  else if (cinfo->two_pass_quantize)
339  {
340  cinfo->enable_2pass_quant = TRUE;
341  }
342  else
343  {
344  cinfo->enable_1pass_quant = TRUE;
345  }
346 
347  if (cinfo->enable_1pass_quant)
348  {
349 #ifdef QUANT_1PASS_SUPPORTED
350  jinit_1pass_quantizer(cinfo);
351  master->quantizer_1pass = cinfo->cquantize;
352 #else
353  ERREXIT(cinfo, JERR_NOT_COMPILED);
354 #endif
355  }
356 
357  /* We use the 2-pass code to map to external colormaps. */
358  if (cinfo->enable_2pass_quant || cinfo->enable_external_quant)
359  {
360 #ifdef QUANT_2PASS_SUPPORTED
361  jinit_2pass_quantizer(cinfo);
362  master->quantizer_2pass = cinfo->cquantize;
363 #else
364  ERREXIT(cinfo, JERR_NOT_COMPILED);
365 #endif
366  }
367  /* If both quantizers are initialized, the 2-pass one is left active;
368  * this is necessary for starting with quantization to an external map.
369  */
370  }
371 
372  /* Post-processing: in particular, color conversion first */
373  if (!cinfo->raw_data_out)
374  {
375  if (master->using_merged_upsample)
376  {
377 #ifdef UPSAMPLE_MERGING_SUPPORTED
378  jinit_merged_upsampler(cinfo); /* does color conversion too */
379 #else
380  ERREXIT(cinfo, JERR_NOT_COMPILED);
381 #endif
382  }
383  else
384  {
386  jinit_upsampler(cinfo);
387  }
388  jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant);
389  }
390  /* Inverse DCT */
391  jinit_inverse_dct(cinfo);
392  /* Entropy decoding: either Huffman or arithmetic coding. */
393  if (cinfo->arith_code)
394  {
395  ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
396  }
397  else
398  {
399  if (cinfo->progressive_mode)
400  {
401 #ifdef D_PROGRESSIVE_SUPPORTED
402  jinit_phuff_decoder(cinfo);
403 #else
404  ERREXIT(cinfo, JERR_NOT_COMPILED);
405 #endif
406  }
407  else
408  jinit_huff_decoder(cinfo);
409  }
410 
411  /* Initialize principal buffer controllers. */
412  use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image;
413  jinit_d_coef_controller(cinfo, use_c_buffer);
414 
415  if (!cinfo->raw_data_out)
416  jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */);
417 
418  /* We can now tell the memory manager to allocate virtual arrays. */
419  (*cinfo->mem->realize_virt_arrays)((j_common_ptr)cinfo);
420 
421  /* Initialize input side of decompressor to consume first scan. */
422  (*cinfo->inputctl->start_input_pass)(cinfo);
423 
424 #ifdef D_MULTISCAN_FILES_SUPPORTED
425  /* If jpeg_start_decompress will read the whole file, initialize
426  * progress monitoring appropriately. The input step is counted
427  * as one pass.
428  */
429  if (cinfo->progress != nullptr && !cinfo->buffered_image &&
430  cinfo->inputctl->has_multiple_scans)
431  {
432  int nscans;
433  /* Estimate number of scans to set pass_limit. */
434  if (cinfo->progressive_mode)
435  {
436  /* Arbitrarily estimate 2 interleaved DC scans + 3 AC
437  * scans/component. */
438  nscans = 2 + 3 * cinfo->num_components;
439  }
440  else
441  {
442  /* For a nonprogressive multiscan file, estimate 1 scan per
443  * component. */
444  nscans = cinfo->num_components;
445  }
446  cinfo->progress->pass_counter = 0L;
447  cinfo->progress->pass_limit = (long)cinfo->total_iMCU_rows * nscans;
448  cinfo->progress->completed_passes = 0;
449  cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2);
450  /* Count the input pass as done */
451  master->pass_number++;
452  }
453 #endif /* D_MULTISCAN_FILES_SUPPORTED */
454 }
455 
456 /*
457  * Per-pass setup.
458  * This is called at the beginning of each output pass. We determine which
459  * modules will be active during this pass and give them appropriate
460  * start_pass calls. We also set is_dummy_pass to indicate whether this
461  * is a "real" output pass or a dummy pass for color quantization.
462  * (In the latter case, jdapistd.c will crank the pass to completion.)
463  */
464 
465 METHODDEF(void)
467 {
468  my_master_ptr master = (my_master_ptr)cinfo->master;
469 
470  if (master->pub.is_dummy_pass)
471  {
472 #ifdef QUANT_2PASS_SUPPORTED
473  /* Final pass of 2-pass quantization */
474  master->pub.is_dummy_pass = FALSE;
475  (*cinfo->cquantize->start_pass)(cinfo, FALSE);
476  (*cinfo->post->start_pass)(cinfo, JBUF_CRANK_DEST);
477  (*cinfo->main->start_pass)(cinfo, JBUF_CRANK_DEST);
478 #else
479  ERREXIT(cinfo, JERR_NOT_COMPILED);
480 #endif /* QUANT_2PASS_SUPPORTED */
481  }
482  else
483  {
484  if (cinfo->quantize_colors && cinfo->colormap == nullptr)
485  {
486  /* Select new quantization method */
487  if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant)
488  {
489  cinfo->cquantize = master->quantizer_2pass;
490  master->pub.is_dummy_pass = TRUE;
491  }
492  else if (cinfo->enable_1pass_quant)
493  {
494  cinfo->cquantize = master->quantizer_1pass;
495  }
496  else
497  {
498  ERREXIT(cinfo, JERR_MODE_CHANGE);
499  }
500  }
501  (*cinfo->idct->start_pass)(cinfo);
502  (*cinfo->coef->start_output_pass)(cinfo);
503  if (!cinfo->raw_data_out)
504  {
505  if (!master->using_merged_upsample)
506  (*cinfo->cconvert->start_pass)(cinfo);
507  (*cinfo->upsample->start_pass)(cinfo);
508  if (cinfo->quantize_colors)
509  (*cinfo->cquantize->start_pass)(
510  cinfo, master->pub.is_dummy_pass);
511  (*cinfo->post->start_pass)(
512  cinfo, (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS
513  : JBUF_PASS_THRU));
514  (*cinfo->main->start_pass)(cinfo, JBUF_PASS_THRU);
515  }
516  }
517 
518  /* Set up progress monitor's pass info if present */
519  if (cinfo->progress != nullptr)
520  {
521  cinfo->progress->completed_passes = master->pass_number;
522  cinfo->progress->total_passes =
523  master->pass_number + (master->pub.is_dummy_pass ? 2 : 1);
524  /* In buffered-image mode, we assume one more output pass if EOI not
525  * yet reached, but no more passes if EOI has been reached.
526  */
527  if (cinfo->buffered_image && !cinfo->inputctl->eoi_reached)
528  {
529  cinfo->progress->total_passes +=
530  (cinfo->enable_2pass_quant ? 2 : 1);
531  }
532  }
533 }
534 
535 /*
536  * Finish up at end of an output pass.
537  */
538 
539 METHODDEF(void)
541 {
542  my_master_ptr master = (my_master_ptr)cinfo->master;
543 
544  if (cinfo->quantize_colors) (*cinfo->cquantize->finish_pass)(cinfo);
545  master->pass_number++;
546 }
547 
548 #ifdef D_MULTISCAN_FILES_SUPPORTED
549 
550 /*
551  * Switch to a new external colormap between output passes.
552  */
553 
554 GLOBAL(void)
556 {
557  my_master_ptr master = (my_master_ptr)cinfo->master;
558 
559  /* Prevent application from calling me at wrong times */
560  if (cinfo->global_state != DSTATE_BUFIMAGE)
561  ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
562 
563  if (cinfo->quantize_colors && cinfo->enable_external_quant &&
564  cinfo->colormap != nullptr)
565  {
566  /* Select 2-pass quantizer for external colormap use */
567  cinfo->cquantize = master->quantizer_2pass;
568  /* Notify quantizer of colormap change */
569  (*cinfo->cquantize->new_color_map)(cinfo);
570  master->pub.is_dummy_pass = FALSE; /* just in case */
571  }
572  else
573  ERREXIT(cinfo, JERR_MODE_CHANGE);
574 }
575 
576 #endif /* D_MULTISCAN_FILES_SUPPORTED */
577 
578 /*
579  * Initialize master decompression control and select active modules.
580  * This is performed at the start of jpeg_start_decompress.
581  */
582 
583 GLOBAL(void)
585 {
586  my_master_ptr master;
587 
588  master = (my_master_ptr)(*cinfo->mem->alloc_small)(
590  cinfo->master = (struct jpeg_decomp_master*)master;
591  master->pub.prepare_for_output_pass = prepare_for_output_pass;
592  master->pub.finish_output_pass = finish_output_pass;
593 
594  master->pub.is_dummy_pass = FALSE;
595 
596  master_selection(cinfo);
597 }
#define CENTERJSAMPLE
Definition: jmorecfg.h:68
jdiv_round_up(long a, long b)
Definition: jutils.cpp:63
char JSAMPLE
Definition: jmorecfg.h:58
jinit_d_post_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
Definition: jdpostct.cpp:246
jinit_merged_upsampler(j_decompress_ptr cinfo)
Definition: jdmerge.cpp:347
JDIMENSION downsampled_width
Definition: mrpt_jpeglib.h:148
jinit_1pass_quantizer(j_decompress_ptr cinfo)
Definition: jquant1.cpp:855
jinit_inverse_dct(j_decompress_ptr cinfo)
Definition: jddctmgr.cpp:246
#define DCTSIZE
Definition: mrpt_jpeglib.h:36
master_selection(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:291
prepare_range_limit_table(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:251
#define DSTATE_BUFIMAGE
Definition: jpegint.h:33
struct jpeg_common_struct * j_common_ptr
Definition: mrpt_jpeglib.h:258
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:3531
#define ERREXIT(cinfo, code)
Definition: jerror.h:451
#define SIZEOF(object)
Definition: jinclude.h:74
struct jpeg_color_quantizer * quantizer_1pass
Definition: jdmaster.cpp:27
#define MAXJSAMPLE
Definition: jmorecfg.h:67
boolean using_merged_upsample
Definition: jdmaster.cpp:22
struct jpeg_comp_master pub
Definition: jcmaster.cpp:24
jinit_d_coef_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
Definition: jdcoefct.cpp:723
my_decomp_master * my_master_ptr
Definition: jdmaster.cpp:31
jinit_2pass_quantizer(j_decompress_ptr cinfo)
Definition: jquant2.cpp:1328
#define MEMCOPY(dest, src, size)
Definition: jinclude.h:61
jinit_color_deconverter(j_decompress_ptr cinfo)
Definition: jdcolor.cpp:299
jinit_huff_decoder(j_decompress_ptr cinfo)
Definition: jdhuff.cpp:669
jpeg_calc_output_dimensions(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:77
#define FALSE
Definition: jmorecfg.h:216
#define JPOOL_IMAGE
Definition: mrpt_jpeglib.h:750
#define LOCAL(type)
Definition: jmorecfg.h:175
#define DSTATE_READY
Definition: jpegint.h:28
jinit_d_main_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
Definition: jdmainct.cpp:490
jinit_phuff_decoder(j_decompress_ptr cinfo)
Definition: jdphuff.cpp:674
#define TRUE
Definition: jmorecfg.h:219
#define ERREXIT1(cinfo, code, p1)
Definition: jerror.h:454
struct jpeg_color_quantizer * quantizer_2pass
Definition: jdmaster.cpp:28
jpeg_new_colormap(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:555
use_merged_upsample(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:39
#define GLOBAL(type)
Definition: jmorecfg.h:177
#define METHODDEF(type)
Definition: jmorecfg.h:173
finish_output_pass(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:540
prepare_for_output_pass(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:466
unsigned int JDIMENSION
Definition: jmorecfg.h:161
jinit_upsampler(j_decompress_ptr cinfo)
Definition: jdsample.cpp:403
jinit_master_decompress(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:584
#define MEMZERO(target, size)
Definition: jinclude.h:60
jpeg_component_info * compptr
Definition: jidctflt.cpp:36
JDIMENSION downsampled_height
Definition: mrpt_jpeglib.h:149



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019