< prev index next >

modules/javafx.graphics/src/main/native-iio/libjpeg7/jpegint.h

Print this page

        

@@ -1,10 +1,10 @@
 /*
  * jpegint.h
  *
  * Copyright (C) 1991-1997, Thomas G. Lane.
- * Modified 1997-2009 by Guido Vollbeding.
+ * Modified 1997-2017 by Guido Vollbeding.
  * This file is part of the Independent JPEG Group's software.
  * For conditions of distribution and use, see the accompanying README file.
  *
  * This file provides common declarations for the various JPEG modules.
  * These declarations are considered internal to the JPEG library; most

@@ -209,16 +209,12 @@
 };
 
 /* Entropy decoding */
 struct jpeg_entropy_decoder {
   JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
-  JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
-                                JBLOCKROW *MCU_data));
-
-  /* This is here to share code between baseline and progressive decoders; */
-  /* other modules probably should not use it */
-  boolean insufficient_data;    /* set TRUE after emitting warning */
+  JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKROW *MCU_data));
+  JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
 };
 
 /* Inverse DCT (also performs dequantization) */
 typedef JMETHOD(void, inverse_DCT_method_ptr,
                 (j_decompress_ptr cinfo, jpeg_component_info * compptr,

@@ -262,10 +258,23 @@
   JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
   JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
 };
 
 
+/* Definition of range extension bits for decompression processes.
+ * See the comments with prepare_range_limit_table (in jdmaster.c)
+ * for more info.
+ * The recommended default value for normal applications is 2.
+ * Applications with special requirements may use a different value.
+ * For example, Ghostscript wants to use 3 for proper handling of
+ * wacky images with oversize coefficient values.
+ */
+
+#define RANGE_BITS      2
+#define RANGE_CENTER    (CENTERJSAMPLE << RANGE_BITS)
+
+
 /* Miscellaneous useful macros */
 
 #undef MAX
 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
 #undef MIN

@@ -323,18 +332,45 @@
 #define jinit_2pass_quantizer   jI2Quant
 #define jinit_merged_upsampler  jIMUpsampler
 #define jinit_memory_mgr        jIMemMgr
 #define jdiv_round_up           jDivRound
 #define jround_up               jRound
+#define jzero_far               jZeroFar
 #define jcopy_sample_rows       jCopySamples
 #define jcopy_block_row         jCopyBlocks
-#define jzero_far               jZeroFar
 #define jpeg_zigzag_order       jZIGTable
 #define jpeg_natural_order      jZAGTable
+#define jpeg_natural_order7     jZAG7Table
+#define jpeg_natural_order6     jZAG6Table
+#define jpeg_natural_order5     jZAG5Table
+#define jpeg_natural_order4     jZAG4Table
+#define jpeg_natural_order3     jZAG3Table
+#define jpeg_natural_order2     jZAG2Table
+#define jpeg_aritab             jAriTab
 #endif /* NEED_SHORT_EXTERNAL_NAMES */
 
 
+/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays
+ * and coefficient-block arrays.  This won't work on 80x86 because the arrays
+ * are FAR and we're assuming a small-pointer memory model.  However, some
+ * DOS compilers provide far-pointer versions of memcpy() and memset() even
+ * in the small-model libraries.  These will be used if USE_FMEM is defined.
+ * Otherwise, the routines in jutils.c do it the hard way.
+ */
+
+#ifndef NEED_FAR_POINTERS       /* normal case, same as regular macro */
+#define FMEMZERO(target,size)   MEMZERO(target,size)
+#else                           /* 80x86 case */
+#ifdef USE_FMEM
+#define FMEMZERO(target,size)   _fmemset((void FAR *)(target), 0, (size_t)(size))
+#else
+EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
+#define FMEMZERO(target,size)   jzero_far(target, size)
+#endif
+#endif
+
+
 /* Compression module initialization routines */
 EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
 EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
                                          boolean transcode_only));
 EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,

@@ -376,16 +412,24 @@
 EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
                                     JSAMPARRAY output_array, int dest_row,
                                     int num_rows, JDIMENSION num_cols));
 EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
                                   JDIMENSION num_blocks));
-EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
 /* Constant tables in jutils.c */
 #if 0                           /* This table is not actually needed in v6a */
 extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
 #endif
 extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
+extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */
+extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */
+extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */
+extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */
+extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */
+extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */
+
+/* Arithmetic coding probability estimation tables in jaricom.c */
+extern const INT32 jpeg_aritab[];
 
 /* Suppress undefined-structure complaints if necessary. */
 
 #ifdef INCOMPLETE_TYPES_BROKEN
 #ifndef AM_MEMORY_MANAGER       /* only jmemmgr.c defines these */
< prev index next >