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