Main MRPT website > C++ reference for MRPT 1.9.9
jcmarker.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 typedef enum { /* JPEG marker codes */
15  M_SOF0 = 0xc0,
16  M_SOF1 = 0xc1,
17  M_SOF2 = 0xc2,
18  M_SOF3 = 0xc3,
19 
20  M_SOF5 = 0xc5,
21  M_SOF6 = 0xc6,
22  M_SOF7 = 0xc7,
23 
24  M_JPG = 0xc8,
25  M_SOF9 = 0xc9,
26  M_SOF10 = 0xca,
27  M_SOF11 = 0xcb,
28 
29  M_SOF13 = 0xcd,
30  M_SOF14 = 0xce,
31  M_SOF15 = 0xcf,
32 
33  M_DHT = 0xc4,
34 
35  M_DAC = 0xcc,
36 
37  M_RST0 = 0xd0,
38  M_RST1 = 0xd1,
39  M_RST2 = 0xd2,
40  M_RST3 = 0xd3,
41  M_RST4 = 0xd4,
42  M_RST5 = 0xd5,
43  M_RST6 = 0xd6,
44  M_RST7 = 0xd7,
45 
46  M_SOI = 0xd8,
47  M_EOI = 0xd9,
48  M_SOS = 0xda,
49  M_DQT = 0xdb,
50  M_DNL = 0xdc,
51  M_DRI = 0xdd,
52  M_DHP = 0xde,
53  M_EXP = 0xdf,
54 
55  M_APP0 = 0xe0,
56  M_APP1 = 0xe1,
57  M_APP2 = 0xe2,
58  M_APP3 = 0xe3,
59  M_APP4 = 0xe4,
60  M_APP5 = 0xe5,
61  M_APP6 = 0xe6,
62  M_APP7 = 0xe7,
63  M_APP8 = 0xe8,
64  M_APP9 = 0xe9,
65  M_APP10 = 0xea,
66  M_APP11 = 0xeb,
67  M_APP12 = 0xec,
68  M_APP13 = 0xed,
69  M_APP14 = 0xee,
70  M_APP15 = 0xef,
71 
72  M_JPG0 = 0xf0,
73  M_JPG13 = 0xfd,
74  M_COM = 0xfe,
75 
76  M_TEM = 0x01,
77 
78  M_ERROR = 0x100
79 } JPEG_MARKER;
80 
81 /* Private state */
82 
83 typedef struct
84 {
85  struct jpeg_marker_writer pub; /* public fields */
86 
87  unsigned int
88  last_restart_interval; /* last DRI value emitted; 0 after SOI */
90 
92 
93 /*
94  * Basic output routines.
95  *
96  * Note that we do not support suspension while writing a marker.
97  * Therefore, an application using suspension must ensure that there is
98  * enough buffer space for the initial markers (typ. 600-700 bytes) before
99  * calling jpeg_start_compress, and enough space to write the trailing EOI
100  * (a few bytes) before calling jpeg_finish_compress. Multipass compression
101  * modes are not supported at all with suspension, so those two are the only
102  * points where markers will be written.
103  */
104 
105 LOCAL(void)
107 /* Emit a byte */
108 {
109  struct jpeg_destination_mgr* dest = cinfo->dest;
110 
111  *(dest->next_output_byte)++ = (JOCTET)val;
112  if (--dest->free_in_buffer == 0)
113  {
114  if (!(*dest->empty_output_buffer)(cinfo))
115  ERREXIT(cinfo, JERR_CANT_SUSPEND);
116  }
117 }
118 
119 LOCAL(void)
121 /* Emit a marker code */
122 {
123  emit_byte(cinfo, 0xFF);
124  emit_byte(cinfo, (int)mark);
125 }
126 
127 LOCAL(void)
129 /* Emit a 2-byte integer; these are always MSB first in JPEG files */
130 {
131  emit_byte(cinfo, (value >> 8) & 0xFF);
132  emit_byte(cinfo, value & 0xFF);
133 }
134 
135 /*
136  * Routines to write specific marker types.
137  */
138 
139 LOCAL(int)
141 /* Emit a DQT marker */
142 /* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */
143 {
144  JQUANT_TBL* qtbl = cinfo->quant_tbl_ptrs[index];
145  int prec;
146  int i;
147 
148  if (qtbl == nullptr) ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);
149 
150  prec = 0;
151  for (i = 0; i < DCTSIZE2; i++)
152  {
153  if (qtbl->quantval[i] > 255) prec = 1;
154  }
155 
156  if (!qtbl->sent_table)
157  {
158  emit_marker(cinfo, M_DQT);
159 
160  emit_2bytes(cinfo, prec ? DCTSIZE2 * 2 + 1 + 2 : DCTSIZE2 + 1 + 2);
161 
162  emit_byte(cinfo, index + (prec << 4));
163 
164  for (i = 0; i < DCTSIZE2; i++)
165  {
166  /* The table entries must be emitted in zigzag order. */
167  unsigned int qval = qtbl->quantval[jpeg_natural_order[i]];
168  if (prec) emit_byte(cinfo, (int)(qval >> 8));
169  emit_byte(cinfo, (int)(qval & 0xFF));
170  }
171 
172  qtbl->sent_table = TRUE;
173  }
174 
175  return prec;
176 }
177 
178 LOCAL(void)
179 emit_dht(j_compress_ptr cinfo, int index, boolean is_ac)
180 /* Emit a DHT marker */
181 {
182  JHUFF_TBL* htbl;
183  int length, i;
184 
185  if (is_ac)
186  {
187  htbl = cinfo->ac_huff_tbl_ptrs[index];
188  index += 0x10; /* output index has AC bit set */
189  }
190  else
191  {
192  htbl = cinfo->dc_huff_tbl_ptrs[index];
193  }
194 
195  if (htbl == nullptr) ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index);
196 
197  if (!htbl->sent_table)
198  {
199  emit_marker(cinfo, M_DHT);
200 
201  length = 0;
202  for (i = 1; i <= 16; i++) length += htbl->bits[i];
203 
204  emit_2bytes(cinfo, length + 2 + 1 + 16);
205  emit_byte(cinfo, index);
206 
207  for (i = 1; i <= 16; i++) emit_byte(cinfo, htbl->bits[i]);
208 
209  for (i = 0; i < length; i++) emit_byte(cinfo, htbl->huffval[i]);
210 
211  htbl->sent_table = TRUE;
212  }
213 }
214 
215 LOCAL(void)
217 /* Emit a DAC marker */
218 /* Since the useful info is so small, we want to emit all the tables in */
219 /* one DAC marker. Therefore this routine does its own scan of the table. */
220 {
221 #ifdef C_ARITH_CODING_SUPPORTED
222  char dc_in_use[NUM_ARITH_TBLS];
223  char ac_in_use[NUM_ARITH_TBLS];
224  int length, i;
226 
227  for (i = 0; i < NUM_ARITH_TBLS; i++) dc_in_use[i] = ac_in_use[i] = 0;
228 
229  for (i = 0; i < cinfo->comps_in_scan; i++)
230  {
231  compptr = cinfo->cur_comp_info[i];
232  dc_in_use[compptr->dc_tbl_no] = 1;
233  ac_in_use[compptr->ac_tbl_no] = 1;
234  }
235 
236  length = 0;
237  for (i = 0; i < NUM_ARITH_TBLS; i++) length += dc_in_use[i] + ac_in_use[i];
238 
239  emit_marker(cinfo, M_DAC);
240 
241  emit_2bytes(cinfo, length * 2 + 2);
242 
243  for (i = 0; i < NUM_ARITH_TBLS; i++)
244  {
245  if (dc_in_use[i])
246  {
247  emit_byte(cinfo, i);
248  emit_byte(
249  cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i] << 4));
250  }
251  if (ac_in_use[i])
252  {
253  emit_byte(cinfo, i + 0x10);
254  emit_byte(cinfo, cinfo->arith_ac_K[i]);
255  }
256  }
257 #endif /* C_ARITH_CODING_SUPPORTED */
258 }
259 
260 LOCAL(void)
262 /* Emit a DRI marker */
263 {
264  emit_marker(cinfo, M_DRI);
265 
266  emit_2bytes(cinfo, 4); /* fixed length */
267 
268  emit_2bytes(cinfo, (int)cinfo->restart_interval);
269 }
270 
271 LOCAL(void)
273 /* Emit a SOF marker */
274 {
275  int ci;
277 
278  emit_marker(cinfo, code);
279 
280  emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */
281 
282  /* Make sure image isn't bigger than SOF field can handle */
283  if ((long)cinfo->image_height > 65535L || (long)cinfo->image_width > 65535L)
284  ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int)65535);
285 
286  emit_byte(cinfo, cinfo->data_precision);
287  emit_2bytes(cinfo, (int)cinfo->image_height);
288  emit_2bytes(cinfo, (int)cinfo->image_width);
289 
290  emit_byte(cinfo, cinfo->num_components);
291 
292  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
293  ci++, compptr++)
294  {
295  emit_byte(cinfo, compptr->component_id);
296  emit_byte(
297  cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor);
298  emit_byte(cinfo, compptr->quant_tbl_no);
299  }
300 }
301 
302 LOCAL(void)
304 /* Emit a SOS marker */
305 {
306  int i, td, ta;
308 
309  emit_marker(cinfo, M_SOS);
310 
311  emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */
312 
313  emit_byte(cinfo, cinfo->comps_in_scan);
314 
315  for (i = 0; i < cinfo->comps_in_scan; i++)
316  {
317  compptr = cinfo->cur_comp_info[i];
318  emit_byte(cinfo, compptr->component_id);
319  td = compptr->dc_tbl_no;
320  ta = compptr->ac_tbl_no;
321  if (cinfo->progressive_mode)
322  {
323  /* Progressive mode: only DC or only AC tables are used in one scan;
324  * furthermore, Huffman coding of DC refinement uses no table at
325  * all.
326  * We emit 0 for unused field(s); this is recommended by the P&M
327  * text
328  * but does not seem to be specified in the standard.
329  */
330  if (cinfo->Ss == 0)
331  {
332  ta = 0; /* DC scan */
333  if (cinfo->Ah != 0 && !cinfo->arith_code)
334  td = 0; /* no DC table either */
335  }
336  else
337  {
338  td = 0; /* AC scan */
339  }
340  }
341  emit_byte(cinfo, (td << 4) + ta);
342  }
343 
344  emit_byte(cinfo, cinfo->Ss);
345  emit_byte(cinfo, cinfo->Se);
346  emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al);
347 }
348 
349 LOCAL(void)
351 /* Emit a JFIF-compliant APP0 marker */
352 {
353  /*
354  * Length of APP0 block (2 bytes)
355  * Block ID (4 bytes - ASCII "JFIF")
356  * Zero byte (1 byte to terminate the ID string)
357  * Version Major, Minor (2 bytes - major first)
358  * Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm)
359  * Xdpu (2 bytes - dots per unit horizontal)
360  * Ydpu (2 bytes - dots per unit vertical)
361  * Thumbnail X size (1 byte)
362  * Thumbnail Y size (1 byte)
363  */
364 
365  emit_marker(cinfo, M_APP0);
366 
367  emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */
368 
369  emit_byte(cinfo, 0x4A); /* Identifier: ASCII "JFIF" */
370  emit_byte(cinfo, 0x46);
371  emit_byte(cinfo, 0x49);
372  emit_byte(cinfo, 0x46);
373  emit_byte(cinfo, 0);
374  emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */
375  emit_byte(cinfo, cinfo->JFIF_minor_version);
376  emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */
377  emit_2bytes(cinfo, (int)cinfo->X_density);
378  emit_2bytes(cinfo, (int)cinfo->Y_density);
379  emit_byte(cinfo, 0); /* No thumbnail image */
380  emit_byte(cinfo, 0);
381 }
382 
383 LOCAL(void)
385 /* Emit an Adobe APP14 marker */
386 {
387  /*
388  * Length of APP14 block (2 bytes)
389  * Block ID (5 bytes - ASCII "Adobe")
390  * Version Number (2 bytes - currently 100)
391  * Flags0 (2 bytes - currently 0)
392  * Flags1 (2 bytes - currently 0)
393  * Color transform (1 byte)
394  *
395  * Although Adobe TN 5116 mentions Version = 101, all the Adobe files
396  * now in circulation seem to use Version = 100, so that's what we write.
397  *
398  * We write the color transform byte as 1 if the JPEG color space is
399  * YCbCr, 2 if it's YCCK, 0 otherwise. Adobe's definition has to do with
400  * whether the encoder performed a transformation, which is pretty useless.
401  */
402 
403  emit_marker(cinfo, M_APP14);
404 
405  emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */
406 
407  emit_byte(cinfo, 0x41); /* Identifier: ASCII "Adobe" */
408  emit_byte(cinfo, 0x64);
409  emit_byte(cinfo, 0x6F);
410  emit_byte(cinfo, 0x62);
411  emit_byte(cinfo, 0x65);
412  emit_2bytes(cinfo, 100); /* Version */
413  emit_2bytes(cinfo, 0); /* Flags0 */
414  emit_2bytes(cinfo, 0); /* Flags1 */
415  switch (cinfo->jpeg_color_space)
416  {
417  case JCS_YCbCr:
418  emit_byte(cinfo, 1); /* Color transform = 1 */
419  break;
420  case JCS_YCCK:
421  emit_byte(cinfo, 2); /* Color transform = 2 */
422  break;
423  default:
424  emit_byte(cinfo, 0); /* Color transform = 0 */
425  break;
426  }
427 }
428 
429 /*
430  * These routines allow writing an arbitrary marker with parameters.
431  * The only intended use is to emit COM or APPn markers after calling
432  * write_file_header and before calling write_frame_header.
433  * Other uses are not guaranteed to produce desirable results.
434  * Counting the parameter bytes properly is the caller's responsibility.
435  */
436 
437 METHODDEF(void)
438 write_marker_header(j_compress_ptr cinfo, int marker, unsigned int datalen)
439 /* Emit an arbitrary marker header */
440 {
441  if (datalen > (unsigned int)65533) /* safety check */
442  ERREXIT(cinfo, JERR_BAD_LENGTH);
443 
444  emit_marker(cinfo, (JPEG_MARKER)marker);
445 
446  emit_2bytes(cinfo, (int)(datalen + 2)); /* total length */
447 }
448 
449 METHODDEF(void)
451 /* Emit one byte of marker parameters following write_marker_header */
452 {
453  emit_byte(cinfo, val);
454 }
455 
456 /*
457  * Write datastream header.
458  * This consists of an SOI and optional APPn markers.
459  * We recommend use of the JFIF marker, but not the Adobe marker,
460  * when using YCbCr or grayscale data. The JFIF marker should NOT
461  * be used for any other JPEG colorspace. The Adobe marker is helpful
462  * to distinguish RGB, CMYK, and YCCK colorspaces.
463  * Note that an application can write additional header markers after
464  * jpeg_start_compress returns.
465  */
466 
467 METHODDEF(void)
469 {
470  my_marker_ptr marker = (my_marker_ptr)cinfo->marker;
471 
472  emit_marker(cinfo, M_SOI); /* first the SOI */
473 
474  /* SOI is defined to reset restart interval to 0 */
475  marker->last_restart_interval = 0;
476 
477  if (cinfo->write_JFIF_header) /* next an optional JFIF APP0 */
478  emit_jfif_app0(cinfo);
479  if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */
480  emit_adobe_app14(cinfo);
481 }
482 
483 /*
484  * Write frame header.
485  * This consists of DQT and SOFn markers.
486  * Note that we do not emit the SOF until we have emitted the DQT(s).
487  * This avoids compatibility problems with incorrect implementations that
488  * try to error-check the quant table numbers as soon as they see the SOF.
489  */
490 
491 METHODDEF(void)
493 {
494  int ci, prec;
495  boolean is_baseline;
497 
498  /* Emit DQT for each quantization table.
499  * Note that emit_dqt() suppresses any duplicate tables.
500  */
501  prec = 0;
502  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
503  ci++, compptr++)
504  {
505  prec += emit_dqt(cinfo, compptr->quant_tbl_no);
506  }
507  /* now prec is nonzero iff there are any 16-bit quant tables. */
508 
509  /* Check for a non-baseline specification.
510  * Note we assume that Huffman table numbers won't be changed later.
511  */
512  if (cinfo->arith_code || cinfo->progressive_mode ||
513  cinfo->data_precision != 8)
514  {
515  is_baseline = FALSE;
516  }
517  else
518  {
519  is_baseline = TRUE;
520  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
521  ci++, compptr++)
522  {
523  if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1)
524  is_baseline = FALSE;
525  }
526  if (prec && is_baseline)
527  {
528  is_baseline = FALSE;
529  /* If it's baseline except for quantizer size, warn the user */
530  TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
531  }
532  }
533 
534  /* Emit the proper SOF marker */
535  if (cinfo->arith_code)
536  {
537  emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */
538  }
539  else
540  {
541  if (cinfo->progressive_mode)
542  emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */
543  else if (is_baseline)
544  emit_sof(cinfo, M_SOF0); /* SOF code for baseline implementation */
545  else
546  emit_sof(
547  cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */
548  }
549 }
550 
551 /*
552  * Write scan header.
553  * This consists of DHT or DAC markers, optional DRI, and SOS.
554  * Compressed data will be written following the SOS.
555  */
556 
557 METHODDEF(void)
559 {
560  my_marker_ptr marker = (my_marker_ptr)cinfo->marker;
561  int i;
563 
564  if (cinfo->arith_code)
565  {
566  /* Emit arith conditioning info. We may have some duplication
567  * if the file has multiple scans, but it's so small it's hardly
568  * worth worrying about.
569  */
570  emit_dac(cinfo);
571  }
572  else
573  {
574  /* Emit Huffman tables.
575  * Note that emit_dht() suppresses any duplicate tables.
576  */
577  for (i = 0; i < cinfo->comps_in_scan; i++)
578  {
579  compptr = cinfo->cur_comp_info[i];
580  if (cinfo->progressive_mode)
581  {
582  /* Progressive mode: only DC or only AC tables are used in one
583  * scan */
584  if (cinfo->Ss == 0)
585  {
586  if (cinfo->Ah ==
587  0) /* DC needs no table for refinement scan */
588  emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
589  }
590  else
591  {
592  emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
593  }
594  }
595  else
596  {
597  /* Sequential mode: need both DC and AC tables */
598  emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
599  emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
600  }
601  }
602  }
603 
604  /* Emit DRI if required --- note that DRI value could change for each scan.
605  * We avoid wasting space with unnecessary DRIs, however.
606  */
607  if (cinfo->restart_interval != marker->last_restart_interval)
608  {
609  emit_dri(cinfo);
610  marker->last_restart_interval = cinfo->restart_interval;
611  }
612 
613  emit_sos(cinfo);
614 }
615 
616 /*
617  * Write datastream trailer.
618  */
619 
620 METHODDEF(void)
622 /*
623  * Write an abbreviated table-specification datastream.
624  * This consists of SOI, DQT and DHT tables, and EOI.
625  * Any table that is defined and not marked sent_table = TRUE will be
626  * emitted. Note that all tables will be marked sent_table = TRUE at exit.
627  */
628 
629 METHODDEF(void)
631 {
632  int i;
633 
634  emit_marker(cinfo, M_SOI);
635 
636  for (i = 0; i < NUM_QUANT_TBLS; i++)
637  {
638  if (cinfo->quant_tbl_ptrs[i] != nullptr) (void)emit_dqt(cinfo, i);
639  }
640 
641  if (!cinfo->arith_code)
642  {
643  for (i = 0; i < NUM_HUFF_TBLS; i++)
644  {
645  if (cinfo->dc_huff_tbl_ptrs[i] != nullptr)
646  emit_dht(cinfo, i, FALSE);
647  if (cinfo->ac_huff_tbl_ptrs[i] != nullptr) emit_dht(cinfo, i, TRUE);
648  }
649  }
650 
651  emit_marker(cinfo, M_EOI);
652 }
653 
654 /*
655  * Initialize the marker writer module.
656  */
657 
658 GLOBAL(void)
660 {
661  my_marker_ptr marker;
662 
663  /* Create the subobject */
664  marker = (my_marker_ptr)(*cinfo->mem->alloc_small)(
666  cinfo->marker = (struct jpeg_marker_writer*)marker;
667  /* Initialize method pointers */
668  marker->pub.write_file_header = write_file_header;
669  marker->pub.write_frame_header = write_frame_header;
670  marker->pub.write_scan_header = write_scan_header;
671  marker->pub.write_file_trailer = write_file_trailer;
672  marker->pub.write_tables_only = write_tables_only;
673  marker->pub.write_marker_header = write_marker_header;
674  marker->pub.write_marker_byte = write_marker_byte;
675  /* Initialize private state */
676  marker->last_restart_interval = 0;
677 }
emit_dac(j_compress_ptr)
Definition: jcmarker.cpp:216
UINT16 quantval[DCTSIZE2]
Definition: mrpt_jpeglib.h:81
emit_marker(j_compress_ptr cinfo, JPEG_MARKER mark)
Definition: jcmarker.cpp:120
emit_dht(j_compress_ptr cinfo, int index, boolean is_ac)
Definition: jcmarker.cpp:179
const int jpeg_natural_order[]
Definition: jutils.cpp:48
struct jpeg_common_struct * j_common_ptr
Definition: mrpt_jpeglib.h:258
emit_adobe_app14(j_compress_ptr cinfo)
Definition: jcmarker.cpp:384
boolean sent_table
Definition: mrpt_jpeglib.h:87
#define ERREXIT(cinfo, code)
Definition: jerror.h:451
emit_dri(j_compress_ptr cinfo)
Definition: jcmarker.cpp:261
#define SIZEOF(object)
Definition: jinclude.h:74
#define NUM_ARITH_TBLS
Definition: mrpt_jpeglib.h:40
write_scan_header(j_compress_ptr cinfo)
Definition: jcmarker.cpp:558
write_file_header(j_compress_ptr cinfo)
Definition: jcmarker.cpp:468
unsigned int last_restart_interval
Definition: jcmarker.cpp:88
#define TRACEMS(cinfo, lvl, code)
Definition: jerror.h:494
emit_2bytes(j_compress_ptr cinfo, int value)
Definition: jcmarker.cpp:128
write_marker_header(j_compress_ptr cinfo, int marker, unsigned int datalen)
Definition: jcmarker.cpp:438
emit_dqt(j_compress_ptr cinfo, int index)
Definition: jcmarker.cpp:140
emit_byte(j_compress_ptr cinfo, int val)
Definition: jcmarker.cpp:106
GLuint index
Definition: glext.h:4054
#define FALSE
Definition: jmorecfg.h:216
#define JPOOL_IMAGE
Definition: mrpt_jpeglib.h:750
#define LOCAL(type)
Definition: jmorecfg.h:175
write_tables_only(j_compress_ptr cinfo)
Definition: jcmarker.cpp:630
int val
Definition: mrpt_jpeglib.h:955
write_frame_header(j_compress_ptr cinfo)
Definition: jcmarker.cpp:492
#define DCTSIZE2
Definition: mrpt_jpeglib.h:37
#define NUM_HUFF_TBLS
Definition: mrpt_jpeglib.h:39
#define TRUE
Definition: jmorecfg.h:219
emit_sos(j_compress_ptr cinfo)
Definition: jcmarker.cpp:303
#define ERREXIT1(cinfo, code, p1)
Definition: jerror.h:454
UINT8 bits[17]
Definition: mrpt_jpeglib.h:95
Definition: inftrees.h:28
boolean sent_table
Definition: mrpt_jpeglib.h:103
JPEG_MARKER
Definition: jcmarker.cpp:14
#define GLOBAL(type)
Definition: jmorecfg.h:177
#define METHODDEF(type)
Definition: jmorecfg.h:173
GLuint GLsizei GLsizei * length
Definition: glext.h:4064
#define NUM_QUANT_TBLS
Definition: mrpt_jpeglib.h:38
emit_jfif_app0(j_compress_ptr cinfo)
Definition: jcmarker.cpp:350
write_file_trailer(j_compress_ptr cinfo)
Definition: jcmarker.cpp:621
UINT8 huffval[256]
Definition: mrpt_jpeglib.h:97
write_marker_byte(j_compress_ptr cinfo, int val)
Definition: jcmarker.cpp:450
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
struct jpeg_marker_writer pub
Definition: jcmarker.cpp:85
GLsizei const GLfloat * value
Definition: glext.h:4117
char JOCTET
Definition: jmorecfg.h:106
jinit_marker_writer(j_compress_ptr cinfo)
Definition: jcmarker.cpp:659
emit_sof(j_compress_ptr cinfo, JPEG_MARKER code)
Definition: jcmarker.cpp:272
my_marker_writer * my_marker_ptr
Definition: jcmarker.cpp:91
jpeg_component_info * compptr
Definition: jidctflt.cpp:36



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