24 #ifndef JCONFIG_INCLUDED 31 #ifndef DONT_USE_EXTERN_C 40 #define JPEG_LIB_VERSION 80 41 #define JPEG_LIB_VERSION_MAJOR 8 42 #define JPEG_LIB_VERSION_MINOR 4 52 #define NUM_QUANT_TBLS 4 53 #define NUM_HUFF_TBLS 4 54 #define NUM_ARITH_TBLS 16 55 #define MAX_COMPS_IN_SCAN 4 56 #define MAX_SAMP_FACTOR 4 64 #define C_MAX_BLOCKS_IN_MCU 10 65 #ifndef D_MAX_BLOCKS_IN_MCU 66 #define D_MAX_BLOCKS_IN_MCU 10 169 boolean component_needed;
176 int MCU_sample_width;
205 jpeg_saved_marker_ptr
next;
233 #define JDCT_DEFAULT JDCT_ISLOW 236 #define JDCT_FASTEST JDCT_IFAST 250 #define jpeg_common_fields \ 251 struct jpeg_error_mgr * err; \ 252 struct jpeg_memory_mgr * mem; \ 253 struct jpeg_progress_mgr * progress; \ 254 void * client_data; \ 255 boolean is_decompressor; \ 290 int input_components;
291 J_COLOR_SPACE in_color_space;
317 J_COLOR_SPACE jpeg_color_space;
345 boolean optimize_coding;
346 boolean CCIR601_sampling;
348 int smoothing_factor;
349 J_DCT_METHOD dct_method;
356 unsigned int restart_interval;
361 boolean write_JFIF_header;
362 UINT8 JFIF_major_version;
363 UINT8 JFIF_minor_version;
371 boolean write_Adobe_marker;
387 boolean progressive_mode;
388 int max_h_samp_factor;
389 int max_v_samp_factor;
436 int script_space_size;
454 J_COLOR_SPACE jpeg_color_space;
461 J_COLOR_SPACE out_color_space;
463 unsigned int scale_num, scale_denom;
467 boolean buffered_image;
468 boolean raw_data_out;
470 J_DCT_METHOD dct_method;
471 boolean do_fancy_upsampling;
472 boolean do_block_smoothing;
474 boolean quantize_colors;
476 J_DITHER_MODE dither_mode;
477 boolean two_pass_quantize;
478 int desired_number_of_colors;
480 boolean enable_1pass_quant;
481 boolean enable_external_quant;
482 boolean enable_2pass_quant;
492 int out_color_components;
493 int output_components;
497 int rec_outbuf_height;
509 int actual_number_of_colors;
525 int input_scan_number;
532 int output_scan_number;
570 boolean progressive_mode;
577 unsigned int restart_interval;
582 boolean saw_JFIF_marker;
584 UINT8 JFIF_major_version;
585 UINT8 JFIF_minor_version;
589 boolean saw_Adobe_marker;
590 UINT8 Adobe_transform;
592 boolean CCIR601_sampling;
598 jpeg_saved_marker_ptr marker_list;
607 int max_h_samp_factor;
608 int max_v_samp_factor;
684 JMETHOD(
void, error_exit, (j_common_ptr cinfo));
686 JMETHOD(
void, emit_message, (j_common_ptr cinfo,
int msg_level));
688 JMETHOD(
void, output_message, (j_common_ptr cinfo));
690 JMETHOD(
void, format_message, (j_common_ptr cinfo,
char *
buffer));
691 #define JMSG_LENGTH_MAX 200 693 JMETHOD(
void, reset_error_mgr, (j_common_ptr cinfo));
699 #define JMSG_STR_PARM_MAX 80 727 const char *
const * jpeg_message_table;
728 int last_jpeg_message;
732 const char *
const * addon_message_table;
733 int first_addon_message;
734 int last_addon_message;
741 JMETHOD(
void, progress_monitor, (j_common_ptr cinfo));
745 int completed_passes;
753 JOCTET * next_output_byte;
754 size_t free_in_buffer;
756 JMETHOD(
void, init_destination, (j_compress_ptr cinfo));
757 JMETHOD(
boolean, empty_output_buffer, (j_compress_ptr cinfo));
758 JMETHOD(
void, term_destination, (j_compress_ptr cinfo));
765 const JOCTET * next_input_byte;
766 size_t bytes_in_buffer;
768 JMETHOD(
void, init_source, (j_decompress_ptr cinfo));
769 JMETHOD(
boolean, fill_input_buffer, (j_decompress_ptr cinfo));
770 JMETHOD(
void, skip_input_data, (j_decompress_ptr cinfo,
long num_bytes));
771 JMETHOD(
boolean, resync_to_restart, (j_decompress_ptr cinfo,
int desired));
772 JMETHOD(
void, term_source, (j_decompress_ptr cinfo));
787 #define JPOOL_PERMANENT 0 788 #define JPOOL_IMAGE 1 789 #define JPOOL_NUMPOOLS 2 797 JMETHOD(
void *, alloc_small, (j_common_ptr cinfo,
int pool_id,
799 JMETHOD(
void FAR *, alloc_large, (j_common_ptr cinfo,
int pool_id,
800 size_t sizeofobject));
801 JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo,
int pool_id,
804 JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo,
int pool_id,
807 JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
813 JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
819 JMETHOD(
void, realize_virt_arrays, (j_common_ptr cinfo));
820 JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,
821 jvirt_sarray_ptr
ptr,
825 JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
826 jvirt_barray_ptr ptr,
830 JMETHOD(
void, free_pool, (j_common_ptr cinfo,
int pool_id));
831 JMETHOD(
void, self_destruct, (j_common_ptr cinfo));
838 long max_memory_to_use;
841 long max_alloc_chunk;
848 typedef JMETHOD(
boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
856 #ifdef HAVE_PROTOTYPES 857 #define JPP(arglist) arglist 859 #define JPP(arglist) () 870 #ifdef NEED_SHORT_EXTERNAL_NAMES 871 #define jpeg_std_error jStdError 872 #define jpeg_CreateCompress jCreaCompress 873 #define jpeg_CreateDecompress jCreaDecompress 874 #define jpeg_destroy_compress jDestCompress 875 #define jpeg_destroy_decompress jDestDecompress 876 #define jpeg_stdio_dest jStdDest 877 #define jpeg_stdio_src jStdSrc 878 #define jpeg_mem_dest jMemDest 879 #define jpeg_mem_src jMemSrc 880 #define jpeg_set_defaults jSetDefaults 881 #define jpeg_set_colorspace jSetColorspace 882 #define jpeg_default_colorspace jDefColorspace 883 #define jpeg_set_quality jSetQuality 884 #define jpeg_set_linear_quality jSetLQuality 885 #define jpeg_default_qtables jDefQTables 886 #define jpeg_add_quant_table jAddQuantTable 887 #define jpeg_quality_scaling jQualityScaling 888 #define jpeg_simple_progression jSimProgress 889 #define jpeg_suppress_tables jSuppressTables 890 #define jpeg_alloc_quant_table jAlcQTable 891 #define jpeg_alloc_huff_table jAlcHTable 892 #define jpeg_start_compress jStrtCompress 893 #define jpeg_write_scanlines jWrtScanlines 894 #define jpeg_finish_compress jFinCompress 895 #define jpeg_calc_jpeg_dimensions jCjpegDimensions 896 #define jpeg_write_raw_data jWrtRawData 897 #define jpeg_write_marker jWrtMarker 898 #define jpeg_write_m_header jWrtMHeader 899 #define jpeg_write_m_byte jWrtMByte 900 #define jpeg_write_tables jWrtTables 901 #define jpeg_read_header jReadHeader 902 #define jpeg_start_decompress jStrtDecompress 903 #define jpeg_read_scanlines jReadScanlines 904 #define jpeg_finish_decompress jFinDecompress 905 #define jpeg_read_raw_data jReadRawData 906 #define jpeg_has_multiple_scans jHasMultScn 907 #define jpeg_start_output jStrtOutput 908 #define jpeg_finish_output jFinOutput 909 #define jpeg_input_complete jInComplete 910 #define jpeg_new_colormap jNewCMap 911 #define jpeg_consume_input jConsumeInput 912 #define jpeg_core_output_dimensions jCoreDimensions 913 #define jpeg_calc_output_dimensions jCalcDimensions 914 #define jpeg_save_markers jSaveMarkers 915 #define jpeg_set_marker_processor jSetMarker 916 #define jpeg_read_coefficients jReadCoefs 917 #define jpeg_write_coefficients jWrtCoefs 918 #define jpeg_copy_critical_parameters jCopyCrit 919 #define jpeg_abort_compress jAbrtCompress 920 #define jpeg_abort_decompress jAbrtDecompress 921 #define jpeg_abort jAbort 922 #define jpeg_destroy jDestroy 923 #define jpeg_resync_to_restart jResyncRestart 938 #define jpeg_create_compress(cinfo) \ 939 jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ 940 (size_t) sizeof(struct jpeg_compress_struct)) 941 #define jpeg_create_decompress(cinfo) \ 942 jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ 943 (size_t) sizeof(struct jpeg_decompress_struct)) 944 EXTERN(
void) jpeg_CreateCompress
JPP((j_compress_ptr cinfo,
946 EXTERN(
void) jpeg_CreateDecompress
JPP((j_decompress_ptr cinfo,
949 EXTERN(
void) jpeg_destroy_compress
JPP((j_compress_ptr cinfo));
950 EXTERN(
void) jpeg_destroy_decompress
JPP((j_decompress_ptr cinfo));
958 EXTERN(
void) jpeg_mem_dest
JPP((j_compress_ptr cinfo,
961 EXTERN(
void) jpeg_mem_src
JPP((j_decompress_ptr cinfo,
966 EXTERN(
void) jpeg_set_defaults
JPP((j_compress_ptr cinfo));
968 EXTERN(
void) jpeg_set_colorspace
JPP((j_compress_ptr cinfo,
970 EXTERN(
void) jpeg_default_colorspace
JPP((j_compress_ptr cinfo));
973 EXTERN(
void) jpeg_set_linear_quality
JPP((j_compress_ptr cinfo,
976 EXTERN(
void) jpeg_default_qtables
JPP((j_compress_ptr cinfo,
983 EXTERN(
void) jpeg_simple_progression
JPP((j_compress_ptr cinfo));
984 EXTERN(
void) jpeg_suppress_tables
JPP((j_compress_ptr cinfo,
990 EXTERN(
void) jpeg_start_compress
JPP((j_compress_ptr cinfo,
995 EXTERN(
void) jpeg_finish_compress
JPP((j_compress_ptr cinfo));
998 EXTERN(
void) jpeg_calc_jpeg_dimensions
JPP((j_compress_ptr cinfo));
1006 EXTERN(
void) jpeg_write_marker
1010 EXTERN(
void) jpeg_write_m_header
1012 EXTERN(
void) jpeg_write_m_byte
1016 EXTERN(
void) jpeg_write_tables
JPP((j_compress_ptr cinfo));
1019 EXTERN(
int) jpeg_read_header
JPP((j_decompress_ptr cinfo,
1022 #define JPEG_SUSPENDED 0 1023 #define JPEG_HEADER_OK 1 1024 #define JPEG_HEADER_TABLES_ONLY 2 1032 EXTERN(
boolean) jpeg_start_decompress
JPP((j_decompress_ptr cinfo));
1036 EXTERN(
boolean) jpeg_finish_decompress
JPP((j_decompress_ptr cinfo));
1044 EXTERN(
boolean) jpeg_has_multiple_scans
JPP((j_decompress_ptr cinfo));
1045 EXTERN(
boolean) jpeg_start_output
JPP((j_decompress_ptr cinfo,
1047 EXTERN(
boolean) jpeg_finish_output
JPP((j_decompress_ptr cinfo));
1048 EXTERN(
boolean) jpeg_input_complete
JPP((j_decompress_ptr cinfo));
1049 EXTERN(
void) jpeg_new_colormap
JPP((j_decompress_ptr cinfo));
1050 EXTERN(
int) jpeg_consume_input
JPP((j_decompress_ptr cinfo));
1053 #define JPEG_REACHED_SOS 1 1054 #define JPEG_REACHED_EOI 2 1055 #define JPEG_ROW_COMPLETED 3 1056 #define JPEG_SCAN_COMPLETED 4 1059 EXTERN(
void) jpeg_core_output_dimensions
JPP((j_decompress_ptr cinfo));
1060 EXTERN(
void) jpeg_calc_output_dimensions
JPP((j_decompress_ptr cinfo));
1063 EXTERN(
void) jpeg_save_markers
1068 EXTERN(
void) jpeg_set_marker_processor
1070 jpeg_marker_parser_method
routine));
1073 EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients
JPP((j_decompress_ptr cinfo));
1074 EXTERN(
void) jpeg_write_coefficients
JPP((j_compress_ptr cinfo,
1076 EXTERN(
void) jpeg_copy_critical_parameters
JPP((j_decompress_ptr srcinfo,
1085 EXTERN(
void) jpeg_abort_compress
JPP((j_compress_ptr cinfo));
1086 EXTERN(
void) jpeg_abort_decompress
JPP((j_decompress_ptr cinfo));
1091 EXTERN(
void) jpeg_abort
JPP((j_common_ptr cinfo));
1092 EXTERN(
void) jpeg_destroy
JPP((j_common_ptr cinfo));
1095 EXTERN(
boolean) jpeg_resync_to_restart
JPP((j_decompress_ptr cinfo,
1103 #define JPEG_RST0 0xD0 1104 #define JPEG_EOI 0xD9 1105 #define JPEG_APP0 0xE0 1106 #define JPEG_COM 0xFE 1114 #ifdef INCOMPLETE_TYPES_BROKEN 1115 #ifndef JPEG_INTERNALS 1116 struct jvirt_sarray_control {
long dummy; };
1117 struct jvirt_barray_control {
long dummy; };
1149 #ifdef JPEG_INTERNALS 1155 #ifndef DONT_USE_EXTERN_C
struct jpeg_common_struct * j_common_ptr
unsigned char ** outbuffer
int min_DCT_h_scaled_size
int min_DCT_h_scaled_size
int min_DCT_v_scaled_size
int boolean force_baseline
JSAMPARRAY JDIMENSION num_lines
struct jvirt_sarray_control * jvirt_sarray_ptr
struct jpeg_compress_struct * j_compress_ptr
int const JOCTET unsigned int datalen
int main(int argc, char *argv[])
struct jvirt_barray_control * jvirt_barray_ptr
struct jpeg_decompress_struct * j_decompress_ptr
int min_DCT_v_scaled_size
union tag_comp_info comp_info
unsigned char unsigned long * outsize
HDFFCLIBAPI intf intf intf intf void * buffer
int unsigned int length_limit
#define JMSG_STR_PARM_MAX
#define jpeg_common_fields
int jpeg_marker_parser_method routine
int JSAMPARRAY int int num_rows
int const unsigned int * basic_table
JSAMPARRAY JDIMENSION max_lines
JBLOCKARRAY * JBLOCKIMAGE
unsigned char unsigned long insize
boolean do_fancy_downsampling
const int * natural_order
jpeg_saved_marker_ptr next
EXTERN(struct jpeg_error_mgr *) jpeg_std_error JPP((struct jpeg_error_mgr *err))
const int * natural_order
#define D_MAX_BLOCKS_IN_MCU
jvirt_barray_ptr * coef_arrays
HDFFCLIBAPI intf ptr[][4]
typedef JMETHOD(boolean, jpeg_marker_parser_method,(j_decompress_ptr cinfo))
#define MAX_COMPS_IN_SCAN
int const JOCTET * dataptr
struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr
#define C_MAX_BLOCKS_IN_MCU
unsigned int original_length