Main MRPT website > C++ reference for MRPT 1.5.9
mrpt_jpeglib.h
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 #ifndef JPEGLIB_H
11 #define JPEGLIB_H
12 
13 /*
14  * First we include the configuration files that record how this
15  * installation of the JPEG library is set up. mrpt_jconfig.h can be
16  * generated automatically for many systems. jmorecfg.h contains
17  * manual configuration options that most people need not worry about.
18  */
19 
20 #ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */
21 #include "mrpt_jconfig.h" /* widely used configuration options */
22 #endif
23 #include "jmorecfg.h" /* seldom changed options */
24 
25 
26 /* Version ID for the JPEG library.
27  * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
28  */
29 
30 #define JPEG_LIB_VERSION 62 /* Version 6b */
31 
32 
33 /* Various constants determining the sizes of things.
34  * All of these are specified by the JPEG standard, so don't change them
35  * if you want to be compatible.
36  */
37 
38 #define DCTSIZE 8 /* The basic DCT block is 8x8 samples */
39 #define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */
40 #define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */
41 #define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */
42 #define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */
43 #define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */
44 #define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */
45 /* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard;
46  * the PostScript DCT filter can emit files with many more than 10 blocks/MCU.
47  * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU
48  * to handle it. We even let you do this from the mrpt_jconfig.h file. However,
49  * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe
50  * sometimes emits noncompliant files doesn't mean you should too.
51  */
52 #define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */
53 #ifndef D_MAX_BLOCKS_IN_MCU
54 #define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */
55 #endif
56 
57 
58 /* Data structures for images (arrays of samples and of DCT coefficients).
59  * On 80x86 machines, the image arrays are too big for near pointers,
60  * but the pointer arrays can fit in near memory.
61  */
62 
63 typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */
64 typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */
65 typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */
66 
67 typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */
68 typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */
69 typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */
70 typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */
71 
72 typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */
73 
74 
75 /* Types for JPEG compression parameters and working tables. */
76 
77 
78 /* DCT coefficient quantization tables. */
79 
80 typedef struct {
81  /* This array gives the coefficient quantizers in natural array order
82  * (not the zigzag order in which they are stored in a JPEG DQT marker).
83  * CAUTION: IJG versions prior to v6a kept this array in zigzag order.
84  */
85  UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */
86  /* This field is used only during compression. It's initialized FALSE when
87  * the table is created, and set TRUE when it's been output to the file.
88  * You could suppress output of a table by setting this to TRUE.
89  * (See jpeg_suppress_tables for an example.)
90  */
91  boolean sent_table; /* TRUE when table has been output */
92 } JQUANT_TBL;
93 
94 
95 /* Huffman coding tables. */
96 
97 typedef struct {
98  /* These two fields directly represent the contents of a JPEG DHT marker */
99  UINT8 bits[17]; /* bits[k] = # of symbols with codes of */
100  /* length k bits; bits[0] is unused */
101  UINT8 huffval[256]; /* The symbols, in order of incr code length */
102  /* This field is used only during compression. It's initialized FALSE when
103  * the table is created, and set TRUE when it's been output to the file.
104  * You could suppress output of a table by setting this to TRUE.
105  * (See jpeg_suppress_tables for an example.)
106  */
107  boolean sent_table; /* TRUE when table has been output */
108 } JHUFF_TBL;
109 
110 
111 /* Basic info about one component (color channel). */
112 
113 typedef struct {
114  /* These values are fixed over the whole image. */
115  /* For compression, they must be supplied by parameter setup; */
116  /* for decompression, they are read from the SOF marker. */
117  int component_id; /* identifier for this component (0..255) */
118  int component_index; /* its index in SOF or cinfo->comp_info[] */
119  int h_samp_factor; /* horizontal sampling factor (1..4) */
120  int v_samp_factor; /* vertical sampling factor (1..4) */
121  int quant_tbl_no; /* quantization table selector (0..3) */
122  /* These values may vary between scans. */
123  /* For compression, they must be supplied by parameter setup; */
124  /* for decompression, they are read from the SOS marker. */
125  /* The decompressor output side may not use these variables. */
126  int dc_tbl_no; /* DC entropy table selector (0..3) */
127  int ac_tbl_no; /* AC entropy table selector (0..3) */
128 
129  /* Remaining fields should be treated as private by applications. */
130 
131  /* These values are computed during compression or decompression startup: */
132  /* Component's size in DCT blocks.
133  * Any dummy blocks added to complete an MCU are not counted; therefore
134  * these values do not depend on whether a scan is interleaved or not.
135  */
138  /* Size of a DCT block in samples. Always DCTSIZE for compression.
139  * For decompression this is the size of the output from one DCT block,
140  * reflecting any scaling we choose to apply during the IDCT step.
141  * Values of 1,2,4,8 are likely to be supported. Note that different
142  * components may receive different IDCT scalings.
143  */
145  /* The downsampled dimensions are the component's actual, unpadded number
146  * of samples at the main buffer (preprocessing/compression interface), thus
147  * downsampled_width = ceil(image_width * Hi/Hmax)
148  * and similarly for height. For decompression, IDCT scaling is included, so
149  * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
150  */
151  JDIMENSION downsampled_width; /* actual width in samples */
152  JDIMENSION downsampled_height; /* actual height in samples */
153  /* This flag is used only for decompression. In cases where some of the
154  * components will be ignored (eg grayscale output from YCbCr image),
155  * we can skip most computations for the unused components.
156  */
157  boolean component_needed; /* do we need the value of this component? */
158 
159  /* These values are computed before starting a scan of the component. */
160  /* The decompressor output side may not use these variables. */
161  int MCU_width; /* number of blocks per MCU, horizontally */
162  int MCU_height; /* number of blocks per MCU, vertically */
163  int MCU_blocks; /* MCU_width * MCU_height */
164  int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */
165  int last_col_width; /* # of non-dummy blocks across in last MCU */
166  int last_row_height; /* # of non-dummy blocks down in last MCU */
167 
168  /* Saved quantization table for component; NULL if none yet saved.
169  * See jdinput.c comments about the need for this information.
170  * This field is currently used only for decompression.
171  */
173 
174  /* Private per-component storage for DCT or IDCT subsystem. */
175  void * dct_table;
177 
178 
179 /* The script for encoding a multiple-scan file is an array of these: */
180 
181 typedef struct {
182  int comps_in_scan; /* number of components encoded in this scan */
183  int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */
184  int Ss, Se; /* progressive JPEG spectral selection parms */
185  int Ah, Al; /* progressive JPEG successive approx. parms */
187 
188 /* The decompressor can save APPn and COM markers in a list of these: */
189 
191 
193  jpeg_saved_marker_ptr next; /* next in list, or NULL */
194  UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */
195  unsigned int original_length; /* # bytes of data in the file */
196  unsigned int data_length; /* # bytes of data saved at data[] */
197  JOCTET FAR * data; /* the data contained in the marker */
198  /* the marker length word is not counted in data_length or original_length */
199 };
200 
201 /* Known color spaces. */
202 
203 typedef enum {
204  JCS_UNKNOWN, /* error/unspecified */
205  JCS_GRAYSCALE, /* monochrome */
206  JCS_RGB, /* red/green/blue */
207  JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */
208  JCS_CMYK, /* C/M/Y/K */
209  JCS_YCCK /* Y/Cb/Cr/K */
210 } J_COLOR_SPACE;
211 
212 /* DCT/IDCT algorithm options. */
213 
214 typedef enum {
215  JDCT_ISLOW, /* slow but accurate integer algorithm */
216  JDCT_IFAST, /* faster, less accurate integer method */
217  JDCT_FLOAT /* floating-point: accurate, fast on fast HW */
218 } J_DCT_METHOD;
219 
220 #ifndef JDCT_DEFAULT /* may be overridden in mrpt_jconfig.h */
221 #define JDCT_DEFAULT JDCT_ISLOW
222 #endif
223 #ifndef JDCT_FASTEST /* may be overridden in mrpt_jconfig.h */
224 #define JDCT_FASTEST JDCT_IFAST
225 #endif
226 
227 /* Dithering options for decompression. */
228 
229 typedef enum {
230  JDITHER_NONE, /* no dithering */
231  JDITHER_ORDERED, /* simple ordered dither */
232  JDITHER_FS /* Floyd-Steinberg error diffusion dither */
233 } J_DITHER_MODE;
234 
235 
236 /* Common fields between JPEG compression and decompression master structs. */
237 
238 #define jpeg_common_fields \
239  struct jpeg_error_mgr * err; /* Error handler module */\
240  struct jpeg_memory_mgr * mem; /* Memory manager module */\
241  struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
242  void * client_data; /* Available for use by application */\
243  boolean is_decompressor; /* So common code can tell which is which */\
244  int global_state /* For checking call sequence validity */
245 
246 /* Routines that are to be used by both halves of the library are declared
247  * to receive a pointer to this structure. There are no actual instances of
248  * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct.
249  */
251  jpeg_common_fields; /* Fields common to both master struct types */
252  /* Additional fields follow in an actual jpeg_compress_struct or
253  * jpeg_decompress_struct. All three structs must agree on these
254  * initial fields! (This would be a lot cleaner in C++.)
255  */
256 };
257 
261 
262 
263 /* Master record for a compression instance */
264 
266  jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */
267 
268  /* Destination for compressed data */
270 
271  /* Description of source image --- these fields must be filled in by
272  * outer application before starting compression. in_color_space must
273  * be correct before you can even call jpeg_set_defaults().
274  */
275 
276  JDIMENSION image_width; /* input image width */
277  JDIMENSION image_height; /* input image height */
278  int input_components; /* # of color components in input image */
279  J_COLOR_SPACE in_color_space; /* colorspace of input image */
280 
281  double input_gamma; /* image gamma of input image */
282 
283  /* Compression parameters --- these fields must be set before calling
284  * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to
285  * initialize everything to reasonable defaults, then changing anything
286  * the application specifically wants to change. That way you won't get
287  * burnt when new parameters are added. Also note that there are several
288  * helper routines to simplify changing parameters.
289  */
290 
291  int data_precision; /* bits of precision in image data */
292 
293  int num_components; /* # of color components in JPEG image */
294  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
295 
297  /* comp_info[i] describes component that appears i'th in SOF */
298 
300  /* ptrs to coefficient quantization tables, or NULL if not defined */
301 
304  /* ptrs to Huffman coding tables, or NULL if not defined */
305 
306  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
307  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
308  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
309 
310  int num_scans; /* # of entries in scan_info array */
311  const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */
312  /* The default value of scan_info is NULL, which causes a single-scan
313  * sequential JPEG file to be emitted. To create a multi-scan file,
314  * set num_scans and scan_info to point to an array of scan definitions.
315  */
316 
317  boolean raw_data_in; /* TRUE=caller supplies downsampled data */
318  boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
319  boolean optimize_coding; /* TRUE=optimize entropy encoding parms */
320  boolean CCIR601_sampling; /* TRUE=first samples are cosited */
321  int smoothing_factor; /* 1..100, or 0 for no input smoothing */
322  J_DCT_METHOD dct_method; /* DCT algorithm selector */
323 
324  /* The restart interval can be specified in absolute MCUs by setting
325  * restart_interval, or in MCU rows by setting restart_in_rows
326  * (in which case the correct restart_interval will be figured
327  * for each scan).
328  */
329  unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */
330  int restart_in_rows; /* if > 0, MCU rows per restart interval */
331 
332  /* Parameters controlling emission of special markers. */
333 
334  boolean write_JFIF_header; /* should a JFIF marker be written? */
335  UINT8 JFIF_major_version; /* What to write for the JFIF version number */
337  /* These three values are not used by the JPEG code, merely copied */
338  /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */
339  /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */
340  /* ratio is defined by X_density/Y_density even when density_unit=0. */
341  UINT8 density_unit; /* JFIF code for pixel size units */
342  UINT16 X_density; /* Horizontal pixel density */
343  UINT16 Y_density; /* Vertical pixel density */
344  boolean write_Adobe_marker; /* should an Adobe marker be written? */
345 
346  /* State variable: index of next scanline to be written to
347  * jpeg_write_scanlines(). Application may use this to control its
348  * processing loop, e.g., "while (next_scanline < image_height)".
349  */
350 
351  JDIMENSION next_scanline; /* 0 .. image_height-1 */
352 
353  /* Remaining fields are known throughout compressor, but generally
354  * should not be touched by a surrounding application.
355  */
356 
357  /*
358  * These fields are computed during compression startup
359  */
360  boolean progressive_mode; /* TRUE if scan script uses progressive mode */
361  int max_h_samp_factor; /* largest h_samp_factor */
362  int max_v_samp_factor; /* largest v_samp_factor */
363 
364  JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */
365  /* The coefficient controller receives data in units of MCU rows as defined
366  * for fully interleaved scans (whether the JPEG file is interleaved or not).
367  * There are v_samp_factor * DCTSIZE sample rows of each component in an
368  * "iMCU" (interleaved MCU) row.
369  */
370 
371  /*
372  * These fields are valid during any one scan.
373  * They describe the components and MCUs actually appearing in the scan.
374  */
375  int comps_in_scan; /* # of JPEG components in this scan */
377  /* *cur_comp_info[i] describes component that appears i'th in SOS */
378 
379  JDIMENSION MCUs_per_row; /* # of MCUs across the image */
380  JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */
381 
382  int blocks_in_MCU; /* # of DCT blocks per MCU */
384  /* MCU_membership[i] is index in cur_comp_info of component owning */
385  /* i'th block in an MCU */
386 
387  int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
388 
389  /*
390  * Links to compression subobjects (methods and private variables of modules)
391  */
401  jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */
403 };
404 
405 
406 /* Master record for a decompression instance */
407 
409  jpeg_common_fields; /* Fields shared with jpeg_compress_struct */
410 
411  /* Source of compressed data */
413 
414  /* Basic description of image --- filled in by jpeg_read_header(). */
415  /* Application may inspect these values to decide how to process image. */
416 
417  JDIMENSION image_width; /* nominal image width (from SOF marker) */
418  JDIMENSION image_height; /* nominal image height */
419  int num_components; /* # of color components in JPEG image */
420  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
421 
422  /* Decompression processing parameters --- these fields must be set before
423  * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes
424  * them to default values.
425  */
426 
427  J_COLOR_SPACE out_color_space; /* colorspace for output */
428 
429  unsigned int scale_num, scale_denom; /* fraction by which to scale image */
430 
431  double output_gamma; /* image gamma wanted in output */
432 
433  boolean buffered_image; /* TRUE=multiple output passes */
434  boolean raw_data_out; /* TRUE=downsampled data wanted */
435 
436  J_DCT_METHOD dct_method; /* IDCT algorithm selector */
437  boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */
438  boolean do_block_smoothing; /* TRUE=apply interblock smoothing */
439 
440  boolean quantize_colors; /* TRUE=colormapped output wanted */
441  /* the following are ignored if not quantize_colors: */
442  J_DITHER_MODE dither_mode; /* type of color dithering to use */
443  boolean two_pass_quantize; /* TRUE=use two-pass color quantization */
444  int desired_number_of_colors; /* max # colors to use in created colormap */
445  /* these are significant only in buffered-image mode: */
446  boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */
447  boolean enable_external_quant;/* enable future use of external colormap */
448  boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */
449 
450  /* Description of actual output image that will be returned to application.
451  * These fields are computed by jpeg_start_decompress().
452  * You can also use jpeg_calc_output_dimensions() to determine these values
453  * in advance of calling jpeg_start_decompress().
454  */
455 
456  JDIMENSION output_width; /* scaled image width */
457  JDIMENSION output_height; /* scaled image height */
458  int out_color_components; /* # of color components in out_color_space */
459  int output_components; /* # of color components returned */
460  /* output_components is 1 (a colormap index) when quantizing colors;
461  * otherwise it equals out_color_components.
462  */
463  int rec_outbuf_height; /* min recommended height of scanline buffer */
464  /* If the buffer passed to jpeg_read_scanlines() is less than this many rows
465  * high, space and time will be wasted due to unnecessary data copying.
466  * Usually rec_outbuf_height will be 1 or 2, at most 4.
467  */
468 
469  /* When quantizing colors, the output colormap is described by these fields.
470  * The application can supply a colormap by setting colormap non-NULL before
471  * calling jpeg_start_decompress; otherwise a colormap is created during
472  * jpeg_start_decompress or jpeg_start_output.
473  * The map has out_color_components rows and actual_number_of_colors columns.
474  */
475  int actual_number_of_colors; /* number of entries in use */
476  JSAMPARRAY colormap; /* The color map as a 2-D pixel array */
477 
478  /* State variables: these variables indicate the progress of decompression.
479  * The application may examine these but must not modify them.
480  */
481 
482  /* Row index of next scanline to be read from jpeg_read_scanlines().
483  * Application may use this to control its processing loop, e.g.,
484  * "while (output_scanline < output_height)".
485  */
486  JDIMENSION output_scanline; /* 0 .. output_height-1 */
487 
488  /* Current input scan number and number of iMCU rows completed in scan.
489  * These indicate the progress of the decompressor input side.
490  */
491  int input_scan_number; /* Number of SOS markers seen so far */
492  JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */
493 
494  /* The "output scan number" is the notional scan being displayed by the
495  * output side. The decompressor will not allow output scan/row number
496  * to get ahead of input scan/row, but it can fall arbitrarily far behind.
497  */
498  int output_scan_number; /* Nominal scan number being displayed */
499  JDIMENSION output_iMCU_row; /* Number of iMCU rows read */
500 
501  /* Current progression status. coef_bits[c][i] indicates the precision
502  * with which component c's DCT coefficient i (in zigzag order) is known.
503  * It is -1 when no data has yet been received, otherwise it is the point
504  * transform (shift) value for the most recent scan of the coefficient
505  * (thus, 0 at completion of the progression).
506  * This pointer is NULL when reading a non-progressive file.
507  */
508  int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */
509 
510  /* Internal JPEG parameters --- the application usually need not look at
511  * these fields. Note that the decompressor output side may not use
512  * any parameters that can change between scans.
513  */
514 
515  /* Quantization and Huffman tables are carried forward across input
516  * datastreams when processing abbreviated JPEG datastreams.
517  */
518 
520  /* ptrs to coefficient quantization tables, or NULL if not defined */
521 
524  /* ptrs to Huffman coding tables, or NULL if not defined */
525 
526  /* These parameters are never carried across datastreams, since they
527  * are given in SOF/SOS markers or defined to be reset by SOI.
528  */
529 
530  int data_precision; /* bits of precision in image data */
531 
533  /* comp_info[i] describes component that appears i'th in SOF */
534 
535  boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
536  boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
537 
538  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
539  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
540  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
541 
542  unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */
543 
544  /* These fields record data obtained from optional markers recognized by
545  * the JPEG library.
546  */
547  boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */
548  /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
549  UINT8 JFIF_major_version; /* JFIF version number */
551  UINT8 density_unit; /* JFIF code for pixel size units */
552  UINT16 X_density; /* Horizontal pixel density */
553  UINT16 Y_density; /* Vertical pixel density */
554  boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */
555  UINT8 Adobe_transform; /* Color transform code from Adobe marker */
556 
557  boolean CCIR601_sampling; /* TRUE=first samples are cosited */
558 
559  /* Aside from the specific data retained from APPn markers known to the
560  * library, the uninterpreted contents of any or all APPn and COM markers
561  * can be saved in a list for examination by the application.
562  */
563  jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */
564 
565  /* Remaining fields are known throughout decompressor, but generally
566  * should not be touched by a surrounding application.
567  */
568 
569  /*
570  * These fields are computed during decompression startup
571  */
572  int max_h_samp_factor; /* largest h_samp_factor */
573  int max_v_samp_factor; /* largest v_samp_factor */
574 
575  int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */
576 
577  JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */
578  /* The coefficient controller's input and output progress is measured in
579  * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows
580  * in fully interleaved JPEG scans, but are used whether the scan is
581  * interleaved or not. We define an iMCU row as v_samp_factor DCT block
582  * rows of each component. Therefore, the IDCT output contains
583  * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.
584  */
585 
586  JSAMPLE * sample_range_limit; /* table for fast range-limiting */
587 
588  /*
589  * These fields are valid during any one scan.
590  * They describe the components and MCUs actually appearing in the scan.
591  * Note that the decompressor output side must not use these fields.
592  */
593  int comps_in_scan; /* # of JPEG components in this scan */
595  /* *cur_comp_info[i] describes component that appears i'th in SOS */
596 
597  JDIMENSION MCUs_per_row; /* # of MCUs across the image */
598  JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */
599 
600  int blocks_in_MCU; /* # of DCT blocks per MCU */
602  /* MCU_membership[i] is index in cur_comp_info of component owning */
603  /* i'th block in an MCU */
604 
605  int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
606 
607  /* This field is shared between entropy decoder and marker parser.
608  * It is either zero or the code of a JPEG marker that has been
609  * read from the data source, but has not yet been processed.
610  */
612 
613  /*
614  * Links to decompression subobjects (methods, private variables of modules)
615  */
627 };
628 
629 
630 /* "Object" declarations for JPEG modules that may be supplied or called
631  * directly by the surrounding application.
632  * As with all objects in the JPEG library, these structs only define the
633  * publicly visible methods and state variables of a module. Additional
634  * private fields may exist after the public ones.
635  */
636 
637 
638 /* Error handler object */
639 
641  /* Error exit handler: does not return to caller */
642  JMETHOD(void, error_exit, (j_common_ptr cinfo));
643  /* Conditionally emit a trace or warning message */
644  JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));
645  /* Routine that actually outputs a trace or error message */
646  JMETHOD(void, output_message, (j_common_ptr cinfo));
647  /* Format a message string for the most recent JPEG error or message */
648  JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));
649 #define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */
650  /* Reset error state variables at start of a new image */
651  JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
652 
653  /* The message ID code and any parameters are saved here.
654  * A message can have one string parameter or up to 8 int parameters.
655  */
656  int msg_code;
657 #define JMSG_STR_PARM_MAX 80
658  union {
659  int i[8];
661  } msg_parm;
662 
663  /* Standard state variables for error facility */
664 
665  int trace_level; /* max msg_level that will be displayed */
666 
667  /* For recoverable corrupt-data errors, we emit a warning message,
668  * but keep going unless emit_message chooses to abort. emit_message
669  * should count warnings in num_warnings. The surrounding application
670  * can check for bad data by seeing if num_warnings is nonzero at the
671  * end of processing.
672  */
673  long num_warnings; /* number of corrupt-data warnings */
674 
675  /* These fields point to the table(s) of error message strings.
676  * An application can change the table pointer to switch to a different
677  * message list (typically, to change the language in which errors are
678  * reported). Some applications may wish to add additional error codes
679  * that will be handled by the JPEG library error mechanism; the second
680  * table pointer is used for this purpose.
681  *
682  * First table includes all errors generated by JPEG library itself.
683  * Error code 0 is reserved for a "no such error string" message.
684  */
685  const char * const * jpeg_message_table; /* Library errors */
686  int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */
687  /* Second table can be added by application (see cjpeg/djpeg for example).
688  * It contains strings numbered first_addon_message..last_addon_message.
689  */
690  const char * const * addon_message_table; /* Non-library errors */
691  int first_addon_message; /* code for first string in addon table */
692  int last_addon_message; /* code for last string in addon table */
693 };
694 
695 
696 /* Progress monitor object */
697 
699  JMETHOD(void, progress_monitor, (j_common_ptr cinfo));
700 
701  long pass_counter; /* work units completed in this pass */
702  long pass_limit; /* total number of work units in this pass */
703  int completed_passes; /* passes completed so far */
704  int total_passes; /* total number of passes expected */
705 };
706 
707 
708 /* Data destination object for compression */
709 
711  JOCTET * next_output_byte; /* => next byte to write in buffer */
712  size_t free_in_buffer; /* # of byte spaces remaining in buffer */
713 
714  JMETHOD(void, init_destination, (j_compress_ptr cinfo));
715  JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
716  JMETHOD(void, term_destination, (j_compress_ptr cinfo));
717 };
718 
719 
720 /* Data source object for decompression */
721 
723  const JOCTET * next_input_byte; /* => next byte to read from buffer */
724  size_t bytes_in_buffer; /* # of bytes remaining in buffer */
725 
726  JMETHOD(void, init_source, (j_decompress_ptr cinfo));
727  JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
728  JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
729  JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
730  JMETHOD(void, term_source, (j_decompress_ptr cinfo));
731 };
732 
733 
734 /* Memory manager object.
735  * Allocates "small" objects (a few K total), "large" objects (tens of K),
736  * and "really big" objects (virtual arrays with backing store if needed).
737  * The memory manager does not allow individual objects to be freed; rather,
738  * each created object is assigned to a pool, and whole pools can be freed
739  * at once. This is faster and more convenient than remembering exactly what
740  * to free, especially where malloc()/free() are not too speedy.
741  * NB: alloc routines never return NULL. They exit to error_exit if not
742  * successful.
743  */
744 
745 #define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */
746 #define JPOOL_IMAGE 1 /* lasts until done with image/datastream */
747 #define JPOOL_NUMPOOLS 2
748 
751 
752 
754  /* Method pointers */
755  JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
756  size_t sizeofobject));
757  JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,
758  size_t sizeofobject));
759  JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,
760  JDIMENSION samplesperrow,
761  JDIMENSION numrows));
762  JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
763  JDIMENSION blocksperrow,
764  JDIMENSION numrows));
766  int pool_id,
767  boolean pre_zero,
768  JDIMENSION samplesperrow,
769  JDIMENSION numrows,
770  JDIMENSION maxaccess));
772  int pool_id,
773  boolean pre_zero,
774  JDIMENSION blocksperrow,
775  JDIMENSION numrows,
776  JDIMENSION maxaccess));
777  JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));
779  jvirt_sarray_ptr ptr,
780  JDIMENSION start_row,
782  boolean writable));
784  jvirt_barray_ptr ptr,
785  JDIMENSION start_row,
787  boolean writable));
788  JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
789  JMETHOD(void, self_destruct, (j_common_ptr cinfo));
790 
791  /* Limit on memory allocation for this JPEG object. (Note that this is
792  * merely advisory, not a guaranteed maximum; it only affects the space
793  * used for virtual-array buffers.) May be changed by outer application
794  * after creating the JPEG object.
795  */
797 
798  /* Maximum allocation request accepted by alloc_large. */
800 };
801 
802 
803 /* Routine signature for application-supplied marker processing methods.
804  * Need not pass marker code since it is stored in cinfo->unread_marker.
805  */
806 typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
807 
808 
809 /* Declarations for routines called by application.
810  * The JPP macro hides prototype parameters from compilers that can't cope.
811  * Note JPP requires double parentheses.
812  */
813 
814 #ifdef HAVE_PROTOTYPES
815 #define JPP(arglist) arglist
816 #else
817 #define JPP(arglist) ()
818 #endif
819 
820 
821 /* Short forms of external names for systems with brain-damaged linkers.
822  * We shorten external names to be unique in the first six letters, which
823  * is good enough for all known systems.
824  * (If your compiler itself needs names to be unique in less than 15
825  * characters, you are out of luck. Get a better compiler.)
826  */
827 
828 #ifdef NEED_SHORT_EXTERNAL_NAMES
829 #define jpeg_std_error jStdError
830 #define jpeg_CreateCompress jCreaCompress
831 #define jpeg_CreateDecompress jCreaDecompress
832 #define jpeg_destroy_compress jDestCompress
833 #define jpeg_destroy_decompress jDestDecompress
834 #define jpeg_stdio_dest jStdDest
835 #define jpeg_stdio_src jStdSrc
836 #define jpeg_set_defaults jSetDefaults
837 #define jpeg_set_colorspace jSetColorspace
838 #define jpeg_default_colorspace jDefColorspace
839 #define jpeg_set_quality jSetQuality
840 #define jpeg_set_linear_quality jSetLQuality
841 #define jpeg_add_quant_table jAddQuantTable
842 #define jpeg_quality_scaling jQualityScaling
843 #define jpeg_simple_progression jSimProgress
844 #define jpeg_suppress_tables jSuppressTables
845 #define jpeg_alloc_quant_table jAlcQTable
846 #define jpeg_alloc_huff_table jAlcHTable
847 #define jpeg_start_compress jStrtCompress
848 #define jpeg_write_scanlines jWrtScanlines
849 #define jpeg_finish_compress jFinCompress
850 #define jpeg_write_raw_data jWrtRawData
851 #define jpeg_write_marker jWrtMarker
852 #define jpeg_write_m_header jWrtMHeader
853 #define jpeg_write_m_byte jWrtMByte
854 #define jpeg_write_tables jWrtTables
855 #define jpeg_read_header jReadHeader
856 #define jpeg_start_decompress jStrtDecompress
857 #define jpeg_read_scanlines jReadScanlines
858 #define jpeg_finish_decompress jFinDecompress
859 #define jpeg_read_raw_data jReadRawData
860 #define jpeg_has_multiple_scans jHasMultScn
861 #define jpeg_start_output jStrtOutput
862 #define jpeg_finish_output jFinOutput
863 #define jpeg_input_complete jInComplete
864 #define jpeg_new_colormap jNewCMap
865 #define jpeg_consume_input jConsumeInput
866 #define jpeg_calc_output_dimensions jCalcDimensions
867 #define jpeg_save_markers jSaveMarkers
868 #define jpeg_set_marker_processor jSetMarker
869 #define jpeg_read_coefficients jReadCoefs
870 #define jpeg_write_coefficients jWrtCoefs
871 #define jpeg_copy_critical_parameters jCopyCrit
872 #define jpeg_abort_compress jAbrtCompress
873 #define jpeg_abort_decompress jAbrtDecompress
874 #define jpeg_abort jAbort
875 #define jpeg_destroy jDestroy
876 #define jpeg_resync_to_restart jResyncRestart
877 #endif /* NEED_SHORT_EXTERNAL_NAMES */
878 
879 
880 /* Default error-management setup */
882  JPP((struct jpeg_error_mgr * err));
883 
884 /* Initialization of JPEG compression objects.
885  * jpeg_create_compress() and jpeg_create_decompress() are the exported
886  * names that applications should call. These expand to calls on
887  * jpeg_CreateCompress and jpeg_CreateDecompress with additional information
888  * passed for version mismatch checking.
889  * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.
890  */
891 #define jpeg_create_compress(cinfo) \
892  jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \
893  (size_t) sizeof(struct jpeg_compress_struct))
894 #define jpeg_create_decompress(cinfo) \
895  jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
896  (size_t) sizeof(struct jpeg_decompress_struct))
898  int version, size_t structsize));
900  int version, size_t structsize));
901 /* Destruction of JPEG compression objects */
904 
905 /* Standard data source and destination managers: stdio streams. */
906 /* Caller is responsible for opening the file before and closing after. */
909 
910 /* Default parameter setup for compression */
912 /* Compression parameter setup aids */
917  boolean force_baseline));
920  boolean force_baseline));
922  const unsigned int *basic_table,
923  int scale_factor,
924  boolean force_baseline));
928  boolean suppress));
931 
932 /* Main entry points for compression */
934  boolean write_all_tables));
939 
940 /* Replaces jpeg_write_scanlines when writing raw downsampled data. */
944 
945 /* Write a special marker. See libjpeg.doc concerning safe usage. */
947  JPP((j_compress_ptr cinfo, int marker,
948  const JOCTET * dataptr, unsigned int datalen));
949 /* Same, but piecemeal. */
951  JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
953  JPP((j_compress_ptr cinfo, int val));
954 
955 /* Alternate compression function: just write an abbreviated table file */
957 
958 /* Decompression startup: read start of JPEG datastream to see what's there */
960  boolean require_image));
961 /* Return value is one of: */
962 #define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */
963 #define JPEG_HEADER_OK 1 /* Found valid image datastream */
964 #define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */
965 /* If you pass require_image = TRUE (normal case), you need not check for
966  * a TABLES_ONLY return code; an abbreviated file will cause an error exit.
967  * JPEG_SUSPENDED is only possible if you use a data source module that can
968  * give a suspension return (the stdio source module doesn't).
969  */
970 
971 /* Main entry points for decompression */
977 
978 /* Replaces jpeg_read_scanlines when reading raw downsampled data. */
982 
983 /* Additional entry points for buffered-image mode. */
986  int scan_number));
991 /* Return value is one of: */
992 /* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */
993 #define JPEG_REACHED_SOS 1 /* Reached start of new scan */
994 #define JPEG_REACHED_EOI 2 /* Reached end of image */
995 #define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */
996 #define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */
997 
998 /* Precalculate output dimensions for current decompression parameters. */
1000 
1001 /* Control saving of COM and APPn markers into marker_list. */
1004  unsigned int length_limit));
1005 
1006 /* Install a special processing method for COM or APPn markers. */
1009  jpeg_marker_parser_method routine));
1010 
1011 /* Read or write raw DCT coefficients --- useful for lossless transcoding. */
1017 
1018 /* If you choose to abort compression or decompression before completing
1019  * jpeg_finish_(de)compress, then you need to clean up to release memory,
1020  * temporary files, etc. You can just call jpeg_destroy_(de)compress
1021  * if you're done with the JPEG object, but if you want to clean it up and
1022  * reuse it, call this:
1023  */
1026 
1027 /* Generic versions of jpeg_abort and jpeg_destroy that work on either
1028  * flavor of JPEG object. These may be more convenient in some places.
1029  */
1030 EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
1031 EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
1032 
1033 /* Default restart-marker-resync procedure for use by data source modules */
1035  int desired));
1036 
1037 
1038 /* These marker codes are exported since applications and data source modules
1039  * are likely to want to use them.
1040  */
1041 
1042 #define JPEG_RST0 0xD0 /* RST0 marker code */
1043 #define JPEG_EOI 0xD9 /* EOI marker code */
1044 #define JPEG_APP0 0xE0 /* APP0 marker code */
1045 #define JPEG_COM 0xFE /* COM marker code */
1046 
1047 
1048 /* If we have a brain-damaged compiler that emits warnings (or worse, errors)
1049  * for structure definitions that are never filled in, keep it quiet by
1050  * supplying dummy definitions for the various substructures.
1051  */
1052 
1053 #ifdef INCOMPLETE_TYPES_BROKEN
1054 #ifndef JPEG_INTERNALS /* will be defined in jpegint.h */
1055 struct jvirt_sarray_control { long dummy; };
1056 struct jvirt_barray_control { long dummy; };
1057 struct jpeg_comp_master { long dummy; };
1058 struct jpeg_c_main_controller { long dummy; };
1059 struct jpeg_c_prep_controller { long dummy; };
1060 struct jpeg_c_coef_controller { long dummy; };
1061 struct jpeg_marker_writer { long dummy; };
1062 struct jpeg_color_converter { long dummy; };
1063 struct jpeg_downsampler { long dummy; };
1064 struct jpeg_forward_dct { long dummy; };
1065 struct jpeg_entropy_encoder { long dummy; };
1066 struct jpeg_decomp_master { long dummy; };
1067 struct jpeg_d_main_controller { long dummy; };
1068 struct jpeg_d_coef_controller { long dummy; };
1069 struct jpeg_d_post_controller { long dummy; };
1070 struct jpeg_input_controller { long dummy; };
1071 struct jpeg_marker_reader { long dummy; };
1072 struct jpeg_entropy_decoder { long dummy; };
1073 struct jpeg_inverse_dct { long dummy; };
1074 struct jpeg_upsampler { long dummy; };
1075 struct jpeg_color_deconverter { long dummy; };
1076 struct jpeg_color_quantizer { long dummy; };
1077 #endif /* JPEG_INTERNALS */
1078 #endif /* INCOMPLETE_TYPES_BROKEN */
1079 
1080 
1081 /*
1082  * The JPEG library modules define JPEG_INTERNALS before including this file.
1083  * The internal structure declarations are read only when that is true.
1084  * Applications using the library should not include jpegint.h, but may wish
1085  * to include jerror.h.
1086  */
1087 
1088 #ifdef JPEG_INTERNALS
1089 #include "jpegint.h" /* fetch private declarations */
1090 #include "jerror.h" /* fetch error codes too */
1091 #endif
1092 
1093 #endif /* JPEGLIB_H */
struct jpeg_c_prep_controller * prep
Definition: mrpt_jpeglib.h:394
jpeg_set_quality(j_compress_ptr cinfo, int quality, boolean force_baseline)
Definition: jcparam.cpp:129
int which_tbl
Definition: mrpt_jpeglib.h:921
int const JOCTET * dataptr
Definition: mrpt_jpeglib.h:947
realize_virt_arrays(j_common_ptr cinfo)
Definition: jmemmgr.cpp:566
reset_error_mgr(j_common_ptr cinfo)
Definition: jerror.cpp:202
UINT8 arith_ac_K[NUM_ARITH_TBLS]
Definition: mrpt_jpeglib.h:308
init_destination(j_compress_ptr cinfo)
char JSAMPLE
Definition: jmorecfg.h:61
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
Definition: mrpt_jpeglib.h:302
jvirt_barray_ptr * coef_arrays
JDIMENSION downsampled_width
Definition: mrpt_jpeglib.h:151
jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]
Definition: mrpt_jpeglib.h:594
int size_t structsize
Definition: mrpt_jpeglib.h:898
struct jpeg_forward_dct * fdct
Definition: mrpt_jpeglib.h:399
FILE * outfile
Definition: mrpt_jpeglib.h:907
jpeg_set_linear_quality(j_compress_ptr cinfo, int scale_factor, boolean force_baseline)
Definition: jcparam.cpp:61
output_message(j_common_ptr cinfo)
Definition: jerror.cpp:88
struct jpeg_d_post_controller * post
Definition: mrpt_jpeglib.h:619
J_COLOR_SPACE jpeg_color_space
Definition: mrpt_jpeglib.h:294
boolean require_image
Definition: mrpt_jpeglib.h:960
jpeg_consume_input(j_decompress_ptr cinfo)
Definition: jdapimin.cpp:278
jpeg_write_tables(j_compress_ptr cinfo)
Definition: jcapimin.cpp:245
struct jpeg_input_controller * inputctl
Definition: mrpt_jpeglib.h:620
jpeg_write_coefficients(j_compress_ptr cinfo, jvirt_barray_ptr *coef_arrays)
Definition: jctrans.cpp:35
J_DCT_METHOD
Definition: mrpt_jpeglib.h:214
GLuint buffer
Definition: glext.h:3775
jpeg_component_info * comp_info
Definition: mrpt_jpeglib.h:532
jpeg_finish_output(j_decompress_ptr cinfo)
Definition: jdapistd.cpp:246
#define MAX_COMPS_IN_SCAN
Definition: mrpt_jpeglib.h:43
struct jpeg_d_main_controller * main
Definition: mrpt_jpeglib.h:617
int jpeg_marker_parser_method routine
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
Definition: mrpt_jpeglib.h:522
UINT8 arith_dc_U[NUM_ARITH_TBLS]
Definition: mrpt_jpeglib.h:539
jpeg_set_defaults(j_compress_ptr cinfo)
Definition: jcparam.cpp:265
#define D_MAX_BLOCKS_IN_MCU
Definition: mrpt_jpeglib.h:54
int desired
const jpeg_scan_info * scan_info
Definition: mrpt_jpeglib.h:311
struct jpeg_common_struct * j_common_ptr
Definition: mrpt_jpeglib.h:258
struct jpeg_marker_reader * marker
Definition: mrpt_jpeglib.h:621
jpeg_finish_decompress(j_decompress_ptr cinfo)
Definition: jdapimin.cpp:360
JDIMENSION image_height
Definition: mrpt_jpeglib.h:277
EXTERN(struct jpeg_error_mgr *) jpeg_std_error JPP((struct jpeg_error_mgr *err))
struct jpeg_d_coef_controller * coef
Definition: mrpt_jpeglib.h:618
format_message(j_common_ptr cinfo, char *buffer)
Definition: jerror.cpp:147
boolean sent_table
Definition: mrpt_jpeglib.h:91
jpeg_start_decompress(j_decompress_ptr cinfo)
Definition: jdapistd.cpp:31
jpeg_destroy(j_common_ptr cinfo)
Definition: jcomapi.cpp:67
struct jpeg_color_converter * cconvert
Definition: mrpt_jpeglib.h:397
request_virt_barray(j_common_ptr cinfo, int pool_id, boolean pre_zero, JDIMENSION blocksperrow, JDIMENSION numrows, JDIMENSION maxaccess)
Definition: jmemmgr.cpp:536
const char *const * addon_message_table
Definition: mrpt_jpeglib.h:690
JMETHOD(void, error_exit,(j_common_ptr cinfo))
Definition: jpegint.h:174
self_destruct(j_common_ptr cinfo)
Definition: jmemmgr.cpp:985
struct jpeg_compress_struct * j_compress_ptr
Definition: mrpt_jpeglib.h:259
#define NUM_ARITH_TBLS
Definition: mrpt_jpeglib.h:42
JMETHOD(void *, alloc_small,(j_common_ptr cinfo, int pool_id, size_t sizeofobject))
jpeg_suppress_tables(j_compress_ptr cinfo, boolean suppress)
Definition: jcapimin.cpp:110
JSAMPARRAY scanlines
Definition: mrpt_jpeglib.h:936
JSAMPLE FAR * JSAMPROW
Definition: mrpt_jpeglib.h:63
struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr
Definition: mrpt_jpeglib.h:190
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
Definition: mrpt_jpeglib.h:303
JOCTET FAR * data
Definition: mrpt_jpeglib.h:197
short JCOEF
Definition: jmorecfg.h:96
JDIMENSION MCU_rows_in_scan
Definition: mrpt_jpeglib.h:380
struct jpeg_entropy_encoder * entropy
Definition: mrpt_jpeglib.h:400
GLdouble s
Definition: glext.h:3602
init_source(j_decompress_ptr cinfo)
jpeg_CreateCompress(j_compress_ptr cinfo, int version, size_t structsize)
Definition: jcapimin.cpp:21
jpeg_write_scanlines(j_compress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION num_lines)
Definition: jcapistd.cpp:70
JSAMPARRAY JDIMENSION num_lines
Definition: mrpt_jpeglib.h:936
alloc_sarray(j_common_ptr cinfo, int pool_id, JDIMENSION samplesperrow, JDIMENSION numrows)
Definition: jmemmgr.cpp:378
fill_input_buffer(j_decompress_ptr cinfo)
size_t sizeofobject
Definition: jmemsys.h:36
UINT8 arith_dc_L[NUM_ARITH_TBLS]
Definition: mrpt_jpeglib.h:538
J_COLOR_SPACE in_color_space
Definition: mrpt_jpeglib.h:279
JDIMENSION width_in_blocks
Definition: mrpt_jpeglib.h:136
int marker
Definition: mrpt_jpeglib.h:947
J_COLOR_SPACE colorspace
Definition: mrpt_jpeglib.h:914
boolean write_all_tables
Definition: mrpt_jpeglib.h:934
jpeg_saved_marker_ptr marker_list
Definition: mrpt_jpeglib.h:563
JDIMENSION next_scanline
Definition: mrpt_jpeglib.h:351
struct jpeg_decompress_struct * j_decompress_ptr
Definition: mrpt_jpeglib.h:260
access_virt_barray(j_common_ptr cinfo, jvirt_barray_ptr ptr, JDIMENSION start_row, JDIMENSION num_rows, boolean writable)
Definition: jmemmgr.cpp:824
jpeg_write_m_byte(j_compress_ptr cinfo, int val)
Definition: jcapimin.cpp:217
jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired)
Definition: jdmarker.cpp:1187
jpeg_read_coefficients(j_decompress_ptr cinfo)
Definition: jdtrans.cpp:42
J_COLOR_SPACE out_color_space
Definition: mrpt_jpeglib.h:427
jpeg_finish_compress(j_compress_ptr cinfo)
Definition: jcapimin.cpp:138
int MCU_membership[C_MAX_BLOCKS_IN_MCU]
Definition: mrpt_jpeglib.h:383
unsigned int data_length
Definition: mrpt_jpeglib.h:196
jpeg_copy_critical_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo)
Definition: jctrans.cpp:60
int quality
Definition: mrpt_jpeglib.h:916
jpeg_start_output(j_decompress_ptr cinfo, int scan_number)
Definition: jdapistd.cpp:221
struct jvirt_barray_control * jvirt_barray_ptr
Definition: mrpt_jpeglib.h:750
#define JMSG_STR_PARM_MAX
Definition: mrpt_jpeglib.h:657
jpeg_destroy_decompress(j_decompress_ptr cinfo)
Definition: jdapimin.cpp:82
UINT8 arith_ac_K[NUM_ARITH_TBLS]
Definition: mrpt_jpeglib.h:540
jpeg_stdio_src(j_decompress_ptr cinfo, CStream *in)
jpeg_read_scanlines(j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines)
Definition: jdapistd.cpp:145
JBLOCKARRAY * JBLOCKIMAGE
Definition: mrpt_jpeglib.h:70
jpeg_abort(j_common_ptr cinfo)
Definition: jcomapi.cpp:27
JDIMENSION height_in_blocks
Definition: mrpt_jpeglib.h:137
int marker_code
term_source(j_decompress_ptr cinfo)
jpeg_set_colorspace(j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
Definition: jcparam.cpp:388
jpeg_calc_output_dimensions(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:80
short UINT8
Definition: jmorecfg.h:137
struct jpeg_c_coef_controller * coef
Definition: mrpt_jpeglib.h:395
J_DITHER_MODE
Definition: mrpt_jpeglib.h:229
int unsigned int length_limit
jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines)
Definition: jdapistd.cpp:178
JDIMENSION total_iMCU_rows
Definition: mrpt_jpeglib.h:364
int const JOCTET unsigned int datalen
Definition: mrpt_jpeglib.h:947
JSAMPLE * sample_range_limit
Definition: mrpt_jpeglib.h:586
JSAMPROW * JSAMPARRAY
Definition: mrpt_jpeglib.h:64
int const unsigned int * basic_table
Definition: mrpt_jpeglib.h:921
JCOEF FAR * JCOEFPTR
Definition: mrpt_jpeglib.h:72
int val
Definition: mrpt_jpeglib.h:953
access_virt_sarray(j_common_ptr cinfo, jvirt_sarray_ptr ptr, JDIMENSION start_row, JDIMENSION num_rows, boolean writable)
Definition: jmemmgr.cpp:739
unsigned int restart_interval
Definition: mrpt_jpeglib.h:542
struct jpeg_color_quantizer * cquantize
Definition: mrpt_jpeglib.h:626
request_virt_sarray(j_common_ptr cinfo, int pool_id, boolean pre_zero, JDIMENSION samplesperrow, JDIMENSION numrows, JDIMENSION maxaccess)
Definition: jmemmgr.cpp:506
term_destination(j_compress_ptr cinfo)
J_DCT_METHOD dct_method
Definition: mrpt_jpeglib.h:436
jpeg_alloc_huff_table(j_common_ptr cinfo)
Definition: jcomapi.cpp:96
union jpeg_error_mgr::@79 msg_parm
#define DCTSIZE2
Definition: mrpt_jpeglib.h:39
UINT8 arith_dc_U[NUM_ARITH_TBLS]
Definition: mrpt_jpeglib.h:307
struct jpeg_destination_mgr * dest
Definition: mrpt_jpeglib.h:269
int version
Definition: mrpt_jpeglib.h:898
struct jpeg_marker_writer * marker
Definition: mrpt_jpeglib.h:396
error_exit(j_common_ptr cinfo)
Definition: jerror.cpp:59
struct jpeg_downsampler * downsample
Definition: mrpt_jpeglib.h:398
size_t bytes_in_buffer
Definition: mrpt_jpeglib.h:724
jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, size_t structsize)
Definition: jdapimin.cpp:21
#define NUM_HUFF_TBLS
Definition: mrpt_jpeglib.h:41
unsigned int scale_denom
Definition: mrpt_jpeglib.h:429
JMETHOD(void, progress_monitor,(j_common_ptr cinfo))
struct jpeg_decomp_master * master
Definition: mrpt_jpeglib.h:616
jpeg_read_header(j_decompress_ptr cinfo, boolean require_image)
Definition: jdapimin.cpp:232
jpeg_destroy_compress(j_compress_ptr cinfo)
Definition: jcapimin.cpp:79
int JSAMPARRAY int int num_rows
Definition: jpegint.h:370
struct jpeg_c_main_controller * main
Definition: mrpt_jpeglib.h:393
typedef JMETHOD(boolean, jpeg_marker_parser_method,(j_decompress_ptr cinfo))
#define JPP(arglist)
Definition: mrpt_jpeglib.h:815
J_DITHER_MODE dither_mode
Definition: mrpt_jpeglib.h:442
unsigned int restart_interval
Definition: mrpt_jpeglib.h:329
jpeg_abort_decompress(j_decompress_ptr cinfo)
Definition: jdapimin.cpp:94
jpeg_alloc_quant_table(j_common_ptr cinfo)
Definition: jcomapi.cpp:84
unsigned int UINT16
Definition: jmorecfg.h:146
#define C_MAX_BLOCKS_IN_MCU
Definition: mrpt_jpeglib.h:52
boolean suppress
Definition: mrpt_jpeglib.h:928
JQUANT_TBL * quant_table
Definition: mrpt_jpeglib.h:172
JDIMENSION MCUs_per_row
Definition: mrpt_jpeglib.h:379
jpeg_stdio_dest(j_compress_ptr cinfo, CStream *out)
struct jpeg_color_deconverter * cconvert
Definition: mrpt_jpeglib.h:625
jpeg_write_m_header(j_compress_ptr cinfo, int marker, unsigned int datalen)
Definition: jcapimin.cpp:205
JSAMPARRAY JDIMENSION max_lines
Definition: mrpt_jpeglib.h:974
JSAMPARRAY * JSAMPIMAGE
Definition: mrpt_jpeglib.h:65
jpeg_write_marker(j_compress_ptr cinfo, int marker, const JOCTET *dataptr, unsigned int datalen)
Definition: jcapimin.cpp:183
jpeg_save_markers(j_decompress_ptr cinfo, int marker_code, unsigned int length_limit)
Definition: jdmarker.cpp:1295
JDIMENSION MCU_rows_in_scan
Definition: mrpt_jpeglib.h:598
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
Definition: mrpt_jpeglib.h:523
j_compress_ptr dstinfo
boolean sent_table
Definition: mrpt_jpeglib.h:107
int boolean force_baseline
Definition: mrpt_jpeglib.h:916
jpeg_new_colormap(j_decompress_ptr cinfo)
Definition: jdmaster.cpp:511
JBLOCKROW * JBLOCKARRAY
Definition: mrpt_jpeglib.h:69
struct jpeg_source_mgr * src
Definition: mrpt_jpeglib.h:412
int scan_number
Definition: mrpt_jpeglib.h:986
free_pool(j_common_ptr cinfo, int pool_id)
Definition: jmemmgr.cpp:913
JDIMENSION output_scanline
Definition: mrpt_jpeglib.h:486
jpeg_saved_marker_ptr next
Definition: mrpt_jpeglib.h:193
jpeg_simple_progression(j_compress_ptr cinfo)
Definition: jcparam.cpp:534
alloc_small(j_common_ptr cinfo, int pool_id, size_t sizeofobject)
Definition: jmemmgr.cpp:240
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
Definition: mrpt_jpeglib.h:299
const char *const * jpeg_message_table
Definition: mrpt_jpeglib.h:685
#define NUM_QUANT_TBLS
Definition: mrpt_jpeglib.h:40
int scale_factor
Definition: mrpt_jpeglib.h:919
jpeg_std_error(struct jpeg_error_mgr *err)
Definition: jerror.cpp:221
struct jpeg_upsampler * upsample
Definition: mrpt_jpeglib.h:624
J_DCT_METHOD dct_method
Definition: mrpt_jpeglib.h:322
FILE * infile
Definition: mrpt_jpeglib.h:908
jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]
Definition: mrpt_jpeglib.h:376
int MCU_membership[D_MAX_BLOCKS_IN_MCU]
Definition: mrpt_jpeglib.h:601
JMETHOD(void, init_source,(j_decompress_ptr cinfo))
JMETHOD(void, init_destination,(j_compress_ptr cinfo))
JBLOCK FAR * JBLOCKROW
Definition: mrpt_jpeglib.h:68
UINT8 arith_dc_L[NUM_ARITH_TBLS]
Definition: mrpt_jpeglib.h:306
JDIMENSION output_iMCU_row
Definition: mrpt_jpeglib.h:499
J_COLOR_SPACE
Definition: mrpt_jpeglib.h:203
unsigned int JDIMENSION
Definition: jmorecfg.h:168
int(* coef_bits)[DCTSIZE2]
Definition: mrpt_jpeglib.h:508
#define FAR
Definition: zconf.h:261
jpeg_scan_info * script_space
Definition: mrpt_jpeglib.h:401
jpeg_default_colorspace(j_compress_ptr cinfo)
Definition: jcparam.cpp:356
jpeg_set_marker_processor(j_decompress_ptr cinfo, int marker_code, jpeg_marker_parser_method routine)
Definition: jdmarker.cpp:1344
unsigned int scale_num
Definition: mrpt_jpeglib.h:429
char JOCTET
Definition: jmorecfg.h:112
jpeg_write_raw_data(j_compress_ptr cinfo, JSAMPIMAGE data, JDIMENSION num_lines)
Definition: jcapistd.cpp:113
const JOCTET * next_input_byte
Definition: mrpt_jpeglib.h:723
struct jpeg_inverse_dct * idct
Definition: mrpt_jpeglib.h:623
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:3520
alloc_large(j_common_ptr cinfo, int pool_id, size_t sizeofobject)
Definition: jmemmgr.cpp:325
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
Definition: mrpt_jpeglib.h:519
JCOEF JBLOCK[DCTSIZE2]
Definition: mrpt_jpeglib.h:67
jpeg_has_multiple_scans(j_decompress_ptr cinfo)
Definition: jdapimin.cpp:340
jpeg_input_complete(j_decompress_ptr cinfo)
Definition: jdapimin.cpp:325
jpeg_add_quant_table(j_compress_ptr cinfo, int which_tbl, const unsigned int *basic_table, int scale_factor, boolean force_baseline)
Definition: jcparam.cpp:20
jpeg_abort_compress(j_compress_ptr cinfo)
Definition: jcapimin.cpp:91
struct jpeg_entropy_decoder * entropy
Definition: mrpt_jpeglib.h:622
struct jvirt_sarray_control * jvirt_sarray_ptr
Definition: mrpt_jpeglib.h:749
alloc_barray(j_common_ptr cinfo, int pool_id, JDIMENSION blocksperrow, JDIMENSION numrows)
Definition: jmemmgr.cpp:426
JDIMENSION total_iMCU_rows
Definition: mrpt_jpeglib.h:577
unsigned int original_length
Definition: mrpt_jpeglib.h:195
empty_output_buffer(j_compress_ptr cinfo)
jpeg_component_info * comp_info
Definition: mrpt_jpeglib.h:296
struct jpeg_comp_master * master
Definition: mrpt_jpeglib.h:392
J_COLOR_SPACE jpeg_color_space
Definition: mrpt_jpeglib.h:420
JDIMENSION downsampled_height
Definition: mrpt_jpeglib.h:152
skip_input_data(j_decompress_ptr cinfo, long num_bytes)
emit_message(j_common_ptr cinfo, int msg_level)
Definition: jerror.cpp:118
jpeg_quality_scaling(int quality)
Definition: jcparam.cpp:103
JDIMENSION image_width
Definition: mrpt_jpeglib.h:276
jpeg_start_compress(j_compress_ptr cinfo, boolean write_all_tables)
Definition: jcapistd.cpp:31



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