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



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