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



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018