19 #define JPEG_INTERNALS 39 ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
50 void * client_data = cinfo->client_data;
53 cinfo->client_data = client_data;
55 cinfo->is_decompressor =
TRUE;
61 cinfo->progress =
NULL;
65 cinfo->quant_tbl_ptrs[i] =
NULL;
68 cinfo->dc_huff_tbl_ptrs[
i] =
NULL;
69 cinfo->ac_huff_tbl_ptrs[
i] =
NULL;
75 cinfo->marker_list =
NULL;
119 switch (cinfo->num_components) {
126 if (cinfo->saw_JFIF_marker) {
128 }
else if (cinfo->saw_Adobe_marker) {
129 switch (cinfo->Adobe_transform) {
131 cinfo->jpeg_color_space =
JCS_RGB;
137 WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
143 int cid0 = cinfo->comp_info[0].component_id;
144 int cid1 = cinfo->comp_info[1].component_id;
145 int cid2 = cinfo->comp_info[2].component_id;
147 if (cid0 == 1 && cid1 == 2 && cid2 == 3)
149 else if (cid0 == 82 && cid1 == 71 && cid2 == 66)
150 cinfo->jpeg_color_space =
JCS_RGB;
152 TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);
157 cinfo->out_color_space =
JCS_RGB;
161 if (cinfo->saw_Adobe_marker) {
162 switch (cinfo->Adobe_transform) {
170 WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
188 cinfo->scale_num = 1;
189 cinfo->scale_denom = 1;
190 cinfo->output_gamma = 1.0;
191 cinfo->buffered_image =
FALSE;
192 cinfo->raw_data_out =
FALSE;
194 cinfo->do_fancy_upsampling =
TRUE;
195 cinfo->do_block_smoothing =
TRUE;
196 cinfo->quantize_colors =
FALSE;
199 #ifdef QUANT_2PASS_SUPPORTED 200 cinfo->two_pass_quantize =
TRUE;
202 cinfo->two_pass_quantize =
FALSE;
204 cinfo->desired_number_of_colors = 256;
205 cinfo->colormap =
NULL;
207 cinfo->enable_1pass_quant =
FALSE;
208 cinfo->enable_external_quant =
FALSE;
209 cinfo->enable_2pass_quant =
FALSE;
247 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
292 switch (cinfo->global_state) {
295 (*cinfo->inputctl->reset_input_controller) (cinfo);
297 (*cinfo->src->init_source) (cinfo);
301 retcode = (*cinfo->inputctl->consume_input) (cinfo);
320 retcode = (*cinfo->inputctl->consume_input) (cinfo);
323 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
339 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
340 return cinfo->inputctl->eoi_reached;
354 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
355 return cinfo->inputctl->has_multiple_scans;
372 cinfo->global_state ==
DSTATE_RAW_OK) && ! cinfo->buffered_image) {
374 if (cinfo->output_scanline < cinfo->output_height)
375 ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
376 (*cinfo->master->finish_output_pass) (cinfo);
383 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
386 while (! cinfo->inputctl->eoi_reached) {
391 (*cinfo->src->term_source) (cinfo);
jpeg_read_header(j_decompress_ptr cinfo, boolean require_image)
for(n=1;n< outline->n_points;n++)
jpeg_consume_input(j_decompress_ptr cinfo)
jpeg_abort_decompress(j_decompress_ptr cinfo)
#define ERREXIT(cinfo, code)
jpeg_input_complete(j_decompress_ptr cinfo)
jpeg_has_multiple_scans(j_decompress_ptr cinfo)
#define JPEG_HEADER_TABLES_ONLY
jpeg_abort(j_common_ptr cinfo)
jinit_memory_mgr(j_common_ptr cinfo)
#define WARNMS1(cinfo, code, p1)
jpeg_finish_decompress(j_decompress_ptr cinfo)
#define ERREXIT1(cinfo, code, p1)
jpeg_destroy_decompress(j_decompress_ptr cinfo)
#define TRACEMS3(cinfo, lvl, code, p1, p2, p3)
jinit_marker_reader(j_decompress_ptr cinfo)
jpeg_destroy(j_common_ptr cinfo)
#define ERREXIT2(cinfo, code, p1, p2)
default_decompress_parms(j_decompress_ptr cinfo)
jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, size_t structsize)
#define MEMZERO(target, size)