Main MRPT website > C++ reference for MRPT 1.5.6
jcmaster.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 enum {
18  main_pass, /* input data, also do first output step */
19  huff_opt_pass, /* Huffman code optimization pass */
20  output_pass /* data output pass */
21 } c_pass_type;
22 
23 typedef struct {
24  struct jpeg_comp_master pub; /* public fields */
25 
26  c_pass_type pass_type; /* the type of the current pass */
27 
28  int pass_number; /* # of passes completed */
29  int total_passes; /* total # of passes needed */
30 
31  int scan_number; /* current index in scan_info[] */
33 
35 
36 
37 /*
38  * Support routines that do various essential calculations.
39  */
40 
41 LOCAL(void)
43 /* Do computations that are needed before master selection phase */
44 {
45  int ci;
47  long samplesperrow;
48  JDIMENSION jd_samplesperrow;
49 
50  /* Sanity check on image dimensions */
51  if (cinfo->image_height <= 0 || cinfo->image_width <= 0
52  || cinfo->num_components <= 0 || cinfo->input_components <= 0)
53  ERREXIT(cinfo, JERR_EMPTY_IMAGE);
54 
55  /* Make sure image isn't bigger than I can handle */
56  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||
57  (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)
58  ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);
59 
60  /* Width of an input scanline must be representable as JDIMENSION. */
61  samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components;
62  jd_samplesperrow = (JDIMENSION) samplesperrow;
63  if ((long) jd_samplesperrow != samplesperrow)
64  ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
65 
66  /* For now, precision must match compiled-in value... */
67  if (cinfo->data_precision != BITS_IN_JSAMPLE)
68  ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
69 
70  /* Check that number of components won't exceed internal array sizes */
71  if (cinfo->num_components > MAX_COMPONENTS)
72  ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
74 
75  /* Compute maximum sampling factors; check factor validity */
76  cinfo->max_h_samp_factor = 1;
77  cinfo->max_v_samp_factor = 1;
78  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
79  ci++, compptr++) {
82  ERREXIT(cinfo, JERR_BAD_SAMPLING);
83  cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,
85  cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,
87  }
88 
89  /* Compute dimensions of components */
90  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
91  ci++, compptr++) {
92  /* Fill in the correct component_index value; don't rely on application */
94  /* For compression, we never do DCT scaling. */
96  /* Size in DCT blocks */
98  jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
99  (long) (cinfo->max_h_samp_factor * DCTSIZE));
101  jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
102  (long) (cinfo->max_v_samp_factor * DCTSIZE));
103  /* Size in samples */
105  jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
106  (long) cinfo->max_h_samp_factor);
108  jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
109  (long) cinfo->max_v_samp_factor);
110  /* Mark component needed (this flag isn't actually used for compression) */
112  }
113 
114  /* Compute number of fully interleaved MCU rows (number of times that
115  * main controller will call coefficient controller).
116  */
117  cinfo->total_iMCU_rows = (JDIMENSION)
118  jdiv_round_up((long) cinfo->image_height,
119  (long) (cinfo->max_v_samp_factor*DCTSIZE));
120 }
121 
122 
123 #ifdef C_MULTISCAN_FILES_SUPPORTED
124 
125 LOCAL(void)
127 /* Verify that the scan script in cinfo->scan_info[] is valid; also
128  * determine whether it uses progressive JPEG, and set cinfo->progressive_mode.
129  */
130 {
131  const jpeg_scan_info * scanptr;
132  int scanno, ncomps, ci, coefi, thisi;
133  int Ss, Se, Ah, Al;
134  boolean component_sent[MAX_COMPONENTS];
135 #ifdef C_PROGRESSIVE_SUPPORTED
136  int * last_bitpos_ptr;
137  int last_bitpos[MAX_COMPONENTS][DCTSIZE2];
138  /* -1 until that coefficient has been seen; then last Al for it */
139 #endif
140 
141  if (cinfo->num_scans <= 0)
142  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0);
143 
144  /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1;
145  * for progressive JPEG, no scan can have this.
146  */
147  scanptr = cinfo->scan_info;
148  if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) {
149 #ifdef C_PROGRESSIVE_SUPPORTED
150  cinfo->progressive_mode = TRUE;
151  last_bitpos_ptr = & last_bitpos[0][0];
152  for (ci = 0; ci < cinfo->num_components; ci++)
153  for (coefi = 0; coefi < DCTSIZE2; coefi++)
154  *last_bitpos_ptr++ = -1;
155 #else
156  ERREXIT(cinfo, JERR_NOT_COMPILED);
157 #endif
158  } else {
159  cinfo->progressive_mode = FALSE;
160  for (ci = 0; ci < cinfo->num_components; ci++)
161  component_sent[ci] = FALSE;
162  }
163 
164  for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) {
165  /* Validate component indexes */
166  ncomps = scanptr->comps_in_scan;
167  if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN)
168  ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN);
169  for (ci = 0; ci < ncomps; ci++) {
170  thisi = scanptr->component_index[ci];
171  if (thisi < 0 || thisi >= cinfo->num_components)
172  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
173  /* Components must appear in SOF order within each scan */
174  if (ci > 0 && thisi <= scanptr->component_index[ci-1])
175  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
176  }
177  /* Validate progression parameters */
178  Ss = scanptr->Ss;
179  Se = scanptr->Se;
180  Ah = scanptr->Ah;
181  Al = scanptr->Al;
182  if (cinfo->progressive_mode) {
183 #ifdef C_PROGRESSIVE_SUPPORTED
184  /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that
185  * seems wrong: the upper bound ought to depend on data precision.
186  * Perhaps they really meant 0..N+1 for N-bit precision.
187  * Here we allow 0..10 for 8-bit data; Al larger than 10 results in
188  * out-of-range reconstructed DC values during the first DC scan,
189  * which might cause problems for some decoders.
190  */
191 #if BITS_IN_JSAMPLE == 8
192 #define MAX_AH_AL 10
193 #else
194 #define MAX_AH_AL 13
195 #endif
196  if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 ||
197  Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL)
198  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
199  if (Ss == 0) {
200  if (Se != 0) /* DC and AC together not OK */
201  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
202  } else {
203  if (ncomps != 1) /* AC scans must be for only one component */
204  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
205  }
206  for (ci = 0; ci < ncomps; ci++) {
207  last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0];
208  if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */
209  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
210  for (coefi = Ss; coefi <= Se; coefi++) {
211  if (last_bitpos_ptr[coefi] < 0) {
212  /* first scan of this coefficient */
213  if (Ah != 0)
214  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
215  } else {
216  /* not first scan */
217  if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1)
218  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
219  }
220  last_bitpos_ptr[coefi] = Al;
221  }
222  }
223 #endif
224  } else {
225  /* For sequential JPEG, all progression parameters must be these: */
226  if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)
227  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
228  /* Make sure components are not sent twice */
229  for (ci = 0; ci < ncomps; ci++) {
230  thisi = scanptr->component_index[ci];
231  if (component_sent[thisi])
232  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
233  component_sent[thisi] = TRUE;
234  }
235  }
236  }
237 
238  /* Now verify that everything got sent. */
239  if (cinfo->progressive_mode) {
240 #ifdef C_PROGRESSIVE_SUPPORTED
241  /* For progressive mode, we only check that at least some DC data
242  * got sent for each component; the spec does not require that all bits
243  * of all coefficients be transmitted. Would it be wiser to enforce
244  * transmission of all coefficient bits??
245  */
246  for (ci = 0; ci < cinfo->num_components; ci++) {
247  if (last_bitpos[ci][0] < 0)
248  ERREXIT(cinfo, JERR_MISSING_DATA);
249  }
250 #endif
251  } else {
252  for (ci = 0; ci < cinfo->num_components; ci++) {
253  if (! component_sent[ci])
254  ERREXIT(cinfo, JERR_MISSING_DATA);
255  }
256  }
257 }
258 
259 #endif /* C_MULTISCAN_FILES_SUPPORTED */
260 
261 
262 LOCAL(void)
264 /* Set up the scan parameters for the current scan */
265 {
266  int ci;
267 
268 #ifdef C_MULTISCAN_FILES_SUPPORTED
269  if (cinfo->scan_info != NULL) {
270  /* Prepare for current scan --- the script is already validated */
271  my_master_ptr master = (my_master_ptr) cinfo->master;
272  const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number;
273 
274  cinfo->comps_in_scan = scanptr->comps_in_scan;
275  for (ci = 0; ci < scanptr->comps_in_scan; ci++) {
276  cinfo->cur_comp_info[ci] =
277  &cinfo->comp_info[scanptr->component_index[ci]];
278  }
279  cinfo->Ss = scanptr->Ss;
280  cinfo->Se = scanptr->Se;
281  cinfo->Ah = scanptr->Ah;
282  cinfo->Al = scanptr->Al;
283  }
284  else
285 #endif
286  {
287  /* Prepare for single sequential-JPEG scan containing all components */
288  if (cinfo->num_components > MAX_COMPS_IN_SCAN)
289  ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
291  cinfo->comps_in_scan = cinfo->num_components;
292  for (ci = 0; ci < cinfo->num_components; ci++) {
293  cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci];
294  }
295  cinfo->Ss = 0;
296  cinfo->Se = DCTSIZE2-1;
297  cinfo->Ah = 0;
298  cinfo->Al = 0;
299  }
300 }
301 
302 
303 LOCAL(void)
305 /* Do computations that are needed before processing a JPEG scan */
306 /* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */
307 {
308  int ci, mcublks, tmp;
310 
311  if (cinfo->comps_in_scan == 1) {
312 
313  /* Noninterleaved (single-component) scan */
314  compptr = cinfo->cur_comp_info[0];
315 
316  /* Overall image size in MCUs */
317  cinfo->MCUs_per_row = compptr->width_in_blocks;
318  cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
319 
320  /* For noninterleaved scan, always one block per MCU */
321  compptr->MCU_width = 1;
322  compptr->MCU_height = 1;
323  compptr->MCU_blocks = 1;
325  compptr->last_col_width = 1;
326  /* For noninterleaved scans, it is convenient to define last_row_height
327  * as the number of block rows present in the last iMCU row.
328  */
329  tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
330  if (tmp == 0) tmp = compptr->v_samp_factor;
331  compptr->last_row_height = tmp;
332 
333  /* Prepare array describing MCU composition */
334  cinfo->blocks_in_MCU = 1;
335  cinfo->MCU_membership[0] = 0;
336 
337  } else {
338 
339  /* Interleaved (multi-component) scan */
340  if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
341  ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
343 
344  /* Overall image size in MCUs */
345  cinfo->MCUs_per_row = (JDIMENSION)
346  jdiv_round_up((long) cinfo->image_width,
347  (long) (cinfo->max_h_samp_factor*DCTSIZE));
348  cinfo->MCU_rows_in_scan = (JDIMENSION)
349  jdiv_round_up((long) cinfo->image_height,
350  (long) (cinfo->max_v_samp_factor*DCTSIZE));
351 
352  cinfo->blocks_in_MCU = 0;
353 
354  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
355  compptr = cinfo->cur_comp_info[ci];
356  /* Sampling factors give # of blocks of component in each MCU */
361  /* Figure number of non-dummy blocks in last MCU column & row */
362  tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);
363  if (tmp == 0) tmp = compptr->MCU_width;
364  compptr->last_col_width = tmp;
365  tmp = (int) (compptr->height_in_blocks % compptr->MCU_height);
366  if (tmp == 0) tmp = compptr->MCU_height;
367  compptr->last_row_height = tmp;
368  /* Prepare array describing MCU composition */
369  mcublks = compptr->MCU_blocks;
370  if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU)
371  ERREXIT(cinfo, JERR_BAD_MCU_SIZE);
372  while (mcublks-- > 0) {
373  cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
374  }
375  }
376 
377  }
378 
379  /* Convert restart specified in rows to actual MCU count. */
380  /* Note that count must fit in 16 bits, so we provide limiting. */
381  if (cinfo->restart_in_rows > 0) {
382  long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row;
383  cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L);
384  }
385 }
386 
387 
388 /*
389  * Per-pass setup.
390  * This is called at the beginning of each pass. We determine which modules
391  * will be active during this pass and give them appropriate start_pass calls.
392  * We also set is_last_pass to indicate whether any more passes will be
393  * required.
394  */
395 
396 METHODDEF(void)
398 {
399  my_master_ptr master = (my_master_ptr) cinfo->master;
400 
401  switch (master->pass_type) {
402  case main_pass:
403  /* Initial pass: will collect input data, and do either Huffman
404  * optimization or data output for the first scan.
405  */
406  select_scan_parameters(cinfo);
407  per_scan_setup(cinfo);
408  if (! cinfo->raw_data_in) {
409  (*cinfo->cconvert->start_pass) (cinfo);
410  (*cinfo->downsample->start_pass) (cinfo);
411  (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU);
412  }
413  (*cinfo->fdct->start_pass) (cinfo);
414  (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding);
415  (*cinfo->coef->start_pass) (cinfo,
416  (master->total_passes > 1 ?
418  (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU);
419  if (cinfo->optimize_coding) {
420  /* No immediate data output; postpone writing frame/scan headers */
421  master->pub.call_pass_startup = FALSE;
422  } else {
423  /* Will write frame/scan headers at first jpeg_write_scanlines call */
424  master->pub.call_pass_startup = TRUE;
425  }
426  break;
427 #ifdef ENTROPY_OPT_SUPPORTED
428  case huff_opt_pass:
429  /* Do Huffman optimization for a scan after the first one. */
430  select_scan_parameters(cinfo);
431  per_scan_setup(cinfo);
432  if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) {
433  (*cinfo->entropy->start_pass) (cinfo, TRUE);
434  (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);
435  master->pub.call_pass_startup = FALSE;
436  break;
437  }
438  /* Special case: Huffman DC refinement scans need no Huffman table
439  * and therefore we can skip the optimization pass for them.
440  */
441  master->pass_type = output_pass;
442  master->pass_number++;
443  /*FALLTHROUGH*/
444 #endif
445  case output_pass:
446  /* Do a data-output pass. */
447  /* We need not repeat per-scan setup if prior optimization pass did it. */
448  if (! cinfo->optimize_coding) {
449  select_scan_parameters(cinfo);
450  per_scan_setup(cinfo);
451  }
452  (*cinfo->entropy->start_pass) (cinfo, FALSE);
453  (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);
454  /* We emit frame/scan headers now */
455  if (master->scan_number == 0)
456  (*cinfo->marker->write_frame_header) (cinfo);
457  (*cinfo->marker->write_scan_header) (cinfo);
458  master->pub.call_pass_startup = FALSE;
459  break;
460  default:
461  ERREXIT(cinfo, JERR_NOT_COMPILED);
462  }
463 
464  master->pub.is_last_pass = (master->pass_number == master->total_passes-1);
465 
466  /* Set up progress monitor's pass info if present */
467  if (cinfo->progress != NULL) {
468  cinfo->progress->completed_passes = master->pass_number;
469  cinfo->progress->total_passes = master->total_passes;
470  }
471 }
472 
473 
474 /*
475  * Special start-of-pass hook.
476  * This is called by jpeg_write_scanlines if call_pass_startup is TRUE.
477  * In single-pass processing, we need this hook because we don't want to
478  * write frame/scan headers during jpeg_start_compress; we want to let the
479  * application write COM markers etc. between jpeg_start_compress and the
480  * jpeg_write_scanlines loop.
481  * In multi-pass processing, this routine is not used.
482  */
483 
484 METHODDEF(void)
486 {
487  cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */
488 
489  (*cinfo->marker->write_frame_header) (cinfo);
490  (*cinfo->marker->write_scan_header) (cinfo);
491 }
492 
493 
494 /*
495  * Finish up at end of pass.
496  */
497 
498 METHODDEF(void)
500 {
501  my_master_ptr master = (my_master_ptr) cinfo->master;
502 
503  /* The entropy coder always needs an end-of-pass call,
504  * either to analyze statistics or to flush its output buffer.
505  */
506  (*cinfo->entropy->finish_pass) (cinfo);
507 
508  /* Update state for next pass */
509  switch (master->pass_type) {
510  case main_pass:
511  /* next pass is either output of scan 0 (after optimization)
512  * or output of scan 1 (if no optimization).
513  */
514  master->pass_type = output_pass;
515  if (! cinfo->optimize_coding)
516  master->scan_number++;
517  break;
518  case huff_opt_pass:
519  /* next pass is always output of current scan */
520  master->pass_type = output_pass;
521  break;
522  case output_pass:
523  /* next pass is either optimization or output of next scan */
524  if (cinfo->optimize_coding)
525  master->pass_type = huff_opt_pass;
526  master->scan_number++;
527  break;
528  }
529 
530  master->pass_number++;
531 }
532 
533 
534 /*
535  * Initialize master compression control.
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_comp_master *) master;
547  master->pub.prepare_for_pass = prepare_for_pass;
548  master->pub.pass_startup = pass_startup;
549  master->pub.finish_pass = finish_pass_master;
550  master->pub.is_last_pass = FALSE;
551 
552  /* Validate parameters, determine derived values */
553  initial_setup(cinfo);
554 
555  if (cinfo->scan_info != NULL) {
556 #ifdef C_MULTISCAN_FILES_SUPPORTED
557  validate_script(cinfo);
558 #else
559  ERREXIT(cinfo, JERR_NOT_COMPILED);
560 #endif
561  } else {
562  cinfo->progressive_mode = FALSE;
563  cinfo->num_scans = 1;
564  }
565 
566  if (cinfo->progressive_mode) /* TEMPORARY HACK ??? */
567  cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */
568 
569  /* Initialize my private state */
570  if (transcode_only) {
571  /* no main pass in transcoding */
572  if (cinfo->optimize_coding)
573  master->pass_type = huff_opt_pass;
574  else
575  master->pass_type = output_pass;
576  } else {
577  /* for normal compression, first pass is always this type: */
578  master->pass_type = main_pass;
579  }
580  master->scan_number = 0;
581  master->pass_number = 0;
582  if (cinfo->optimize_coding)
583  master->total_passes = cinfo->num_scans * 2;
584  else
585  master->total_passes = cinfo->num_scans;
586 }
jdiv_round_up(long a, long b)
Definition: jutils.cpp:68
#define BITS_IN_JSAMPLE
Definition: jmorecfg.h:20
JDIMENSION downsampled_width
Definition: mrpt_jpeglib.h:151
#define MAX_COMPS_IN_SCAN
Definition: mrpt_jpeglib.h:43
#define DCTSIZE
Definition: mrpt_jpeglib.h:38
prepare_for_pass(j_compress_ptr cinfo)
Definition: jcmaster.cpp:397
struct jpeg_common_struct * j_common_ptr
Definition: mrpt_jpeglib.h:258
pass_startup(j_compress_ptr cinfo)
Definition: jcmaster.cpp:485
#define MAX_COMPONENTS
Definition: jmorecfg.h:32
#define MIN(a, b)
Definition: jpegint.h:266
#define ERREXIT(cinfo, code)
Definition: jerror.h:199
#define SIZEOF(object)
Definition: jinclude.h:73
c_pass_type pass_type
Definition: jcmaster.cpp:26
boolean call_pass_startup
Definition: jpegint.h:48
jpeg_component_info * compptr
Definition: jdct.h:97
int component_index[MAX_COMPS_IN_SCAN]
Definition: mrpt_jpeglib.h:183
JDIMENSION width_in_blocks
Definition: mrpt_jpeglib.h:136
c_pass_type
Definition: jcmaster.cpp:17
struct jpeg_comp_master pub
Definition: jcmaster.cpp:24
boolean is_last_pass
Definition: jpegint.h:49
#define MAX_AH_AL
validate_script(j_compress_ptr cinfo)
Definition: jcmaster.cpp:126
JDIMENSION height_in_blocks
Definition: mrpt_jpeglib.h:137
#define JPEG_MAX_DIMENSION
Definition: jmorecfg.h:170
select_scan_parameters(j_compress_ptr cinfo)
Definition: jcmaster.cpp:263
#define FALSE
Definition: jmorecfg.h:227
#define MAX(a, b)
Definition: jpegint.h:264
#define JPOOL_IMAGE
Definition: mrpt_jpeglib.h:746
#define LOCAL(type)
Definition: jmorecfg.h:183
#define DCTSIZE2
Definition: mrpt_jpeglib.h:39
#define TRUE
Definition: jmorecfg.h:230
#define C_MAX_BLOCKS_IN_MCU
Definition: mrpt_jpeglib.h:52
per_scan_setup(j_compress_ptr cinfo)
Definition: jcmaster.cpp:304
#define ERREXIT1(cinfo, code, p1)
Definition: jerror.h:202
#define GLOBAL(type)
Definition: jmorecfg.h:185
#define METHODDEF(type)
Definition: jmorecfg.h:181
finish_pass_master(j_compress_ptr cinfo)
Definition: jcmaster.cpp:499
#define MAX_SAMP_FACTOR
Definition: mrpt_jpeglib.h:44
jinit_c_master_control(j_compress_ptr cinfo, boolean transcode_only)
Definition: jcmaster.cpp:539
unsigned int JDIMENSION
Definition: jmorecfg.h:168
my_comp_master * my_master_ptr
Definition: jcmaster.cpp:34
#define ERREXIT2(cinfo, code, p1, p2)
Definition: jerror.h:206
initial_setup(j_compress_ptr cinfo)
Definition: jcmaster.cpp:42
JDIMENSION downsampled_height
Definition: mrpt_jpeglib.h:152
boolean transcode_only
Definition: jpegint.h:333



Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019