30#define CSTATE_START 100
31#define CSTATE_SCANNING 101
32#define CSTATE_RAW_OK 102
33#define CSTATE_WRCOEFS 103
34#define DSTATE_START 200
35#define DSTATE_INHEADER 201
36#define DSTATE_READY 202
37#define DSTATE_PRELOAD 203
38#define DSTATE_PRESCAN 204
39#define DSTATE_SCANNING 205
40#define DSTATE_RAW_OK 206
41#define DSTATE_BUFIMAGE 207
42#define DSTATE_BUFPOST 208
43#define DSTATE_RDCOEFS 209
44#define DSTATE_STOPPING 210
49#define DSTATE_SETSRC 211
61 boolean call_pass_startup;
67 JMETHOD(
void, start_pass, (
j_compress_ptr cinfo, J_BUF_MODE pass_mode));
69 JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
70 JDIMENSION in_rows_avail));
75 JMETHOD(
void, start_pass, (
j_compress_ptr cinfo, J_BUF_MODE pass_mode));
78 JDIMENSION *in_row_ctr,
79 JDIMENSION in_rows_avail,
80 JSAMPIMAGE output_buf,
81 JDIMENSION *out_row_group_ctr,
82 JDIMENSION out_row_groups_avail));
87 JMETHOD(
void, start_pass, (
j_compress_ptr cinfo, J_BUF_MODE pass_mode));
89 JSAMPIMAGE input_buf));
96 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
97 JDIMENSION output_row,
int num_rows));
104 JSAMPIMAGE input_buf, JDIMENSION in_row_index,
105 JSAMPIMAGE output_buf,
106 JDIMENSION out_row_group_index));
108 boolean need_context_rows;
112typedef JMETHOD(
void, forward_DCT_ptr,
114 JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
115 JDIMENSION start_col, JDIMENSION num_blocks));
120 forward_DCT_ptr forward_DCT[MAX_COMPONENTS];
125 JMETHOD(
void, start_pass, (
j_compress_ptr cinfo,
boolean gather_statistics));
126 JMETHOD(
boolean, encode_mcu, (
j_compress_ptr cinfo, JBLOCKARRAY MCU_data));
139 JMETHOD(
void, write_marker_header, (
j_compress_ptr cinfo,
int marker,
140 unsigned int datalen));
141 JMETHOD(
void, write_marker_byte, (
j_compress_ptr cinfo,
int val));
153 boolean is_dummy_pass;
164 boolean has_multiple_scans;
172 JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
173 JDIMENSION out_rows_avail));
182 JSAMPIMAGE output_buf));
184 jvirt_barray_ptr *coef_arrays;
191 JSAMPIMAGE input_buf,
192 JDIMENSION *in_row_group_ctr,
193 JDIMENSION in_row_groups_avail,
194 JSAMPARRAY output_buf,
195 JDIMENSION *out_row_ctr,
196 JDIMENSION out_rows_avail));
208 jpeg_marker_parser_method read_restart_marker;
215 int next_restart_num;
216 unsigned int discarded_bytes;
222 JMETHOD(
boolean, decode_mcu, (
j_decompress_ptr cinfo, JBLOCKARRAY MCU_data));
227typedef JMETHOD(
void, inverse_DCT_method_ptr,
230 JSAMPARRAY output_buf, JDIMENSION output_col));
235 inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
242 JSAMPIMAGE input_buf,
243 JDIMENSION *in_row_group_ctr,
244 JDIMENSION in_row_groups_avail,
245 JSAMPARRAY output_buf,
246 JDIMENSION *out_row_ctr,
247 JDIMENSION out_rows_avail));
249 boolean need_context_rows;
256 JSAMPIMAGE input_buf, JDIMENSION input_row,
257 JSAMPARRAY output_buf,
int num_rows));
264 JSAMPARRAY input_buf, JSAMPARRAY output_buf,
281#define RANGE_CENTER (CENTERJSAMPLE << RANGE_BITS)
287#define MAX(a,b) ((a) > (b) ? (a) : (b))
289#define MIN(a,b) ((a) < (b) ? (a) : (b))
302#ifdef RIGHT_SHIFT_IS_UNSIGNED
303#define SHIFT_TEMPS INT32 shift_temp;
304#define RIGHT_SHIFT(x,shft) \
305 ((shift_temp = (x)) < 0 ? \
306 (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
307 (shift_temp >> (shft)))
310#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
318#define DESCALE(x,n) RIGHT_SHIFT((x) + ((INT32) 1 << ((n)-1)), n)
323#ifdef NEED_SHORT_EXTERNAL_NAMES
324#define jinit_compress_master jICompress
325#define jinit_c_master_control jICMaster
326#define jinit_c_main_controller jICMainC
327#define jinit_c_prep_controller jICPrepC
328#define jinit_c_coef_controller jICCoefC
329#define jinit_color_converter jICColor
330#define jinit_downsampler jIDownsampler
331#define jinit_forward_dct jIFDCT
332#define jinit_huff_encoder jIHEncoder
333#define jinit_arith_encoder jIAEncoder
334#define jinit_marker_writer jIMWriter
335#define jinit_master_decompress jIDMaster
336#define jinit_d_main_controller jIDMainC
337#define jinit_d_coef_controller jIDCoefC
338#define jinit_d_post_controller jIDPostC
339#define jinit_input_controller jIInCtlr
340#define jinit_marker_reader jIMReader
341#define jinit_huff_decoder jIHDecoder
342#define jinit_arith_decoder jIADecoder
343#define jinit_inverse_dct jIIDCT
344#define jinit_upsampler jIUpsampler
345#define jinit_color_deconverter jIDColor
346#define jinit_1pass_quantizer jI1Quant
347#define jinit_2pass_quantizer jI2Quant
348#define jinit_merged_upsampler jIMUpsampler
349#define jinit_memory_mgr jIMemMgr
350#define jdiv_round_up jDivRound
351#define jround_up jRound
352#define jzero_far jZeroFar
353#define jcopy_sample_rows jCopySamples
354#define jcopy_block_row jCopyBlocks
355#define jpeg_zigzag_order jZIGTable
356#define jpeg_natural_order jZAGTable
357#define jpeg_natural_order7 jZAG7Table
358#define jpeg_natural_order6 jZAG6Table
359#define jpeg_natural_order5 jZAG5Table
360#define jpeg_natural_order4 jZAG4Table
361#define jpeg_natural_order3 jZAG3Table
362#define jpeg_natural_order2 jZAG2Table
363#define jpeg_aritab jAriTab
375#ifndef NEED_FAR_POINTERS
376#define FMEMZERO(target,size) MEMZERO(target,size)
379#define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size))
381EXTERN(
void) jzero_far JPP((
void FAR * target,
size_t bytestozero));
382#define FMEMZERO(target,size) jzero_far(target, size)
390 boolean transcode_only));
392 boolean need_full_buffer));
394 boolean need_full_buffer));
396 boolean need_full_buffer));
406 boolean need_full_buffer));
408 boolean need_full_buffer));
410 boolean need_full_buffer));
434EXTERN(
long) jdiv_round_up JPP((
long a,
long b));
435EXTERN(
long) jround_up JPP((
long a,
long b));
436EXTERN(
void) jcopy_sample_rows JPP((JSAMPARRAY input_array,
437 JSAMPARRAY output_array,
438 int num_rows, JDIMENSION num_cols));
439EXTERN(
void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
440 JDIMENSION num_blocks));
443extern const int jpeg_zigzag_order[];
445extern const int jpeg_natural_order[];
446extern const int jpeg_natural_order7[];
447extern const int jpeg_natural_order6[];
448extern const int jpeg_natural_order5[];
449extern const int jpeg_natural_order4[];
450extern const int jpeg_natural_order3[];
451extern const int jpeg_natural_order2[];
454extern const INT32 jpeg_aritab[];
458#ifdef INCOMPLETE_TYPES_BROKEN
459#ifndef AM_MEMORY_MANAGER
460struct jvirt_sarray_control {
long dummy; };
461struct jvirt_barray_control {
long dummy; };
Definition: jpegint.h:253
Definition: jpegint.h:261
Definition: jpeglib.h:297
Definition: jpeglib.h:145
Definition: jpeglib.h:312
Definition: jpegint.h:177
Definition: jpegint.h:169
Definition: jpegint.h:188
Definition: jpegint.h:148
Definition: jpeglib.h:480
Definition: jpegint.h:101
Definition: jpegint.h:220
Definition: jpegint.h:124
Definition: jpegint.h:117
Definition: jpegint.h:232
Definition: jpegint.h:200
Definition: jpegint.h:131
Definition: jpegint.h:239