10 #define JPEG_INTERNALS 30 cinfo, JERR_BAD_STRUCT_SIZE,
45 cinfo->client_data = client_data;
47 cinfo->is_decompressor =
TRUE;
53 cinfo->progress =
nullptr;
60 cinfo->dc_huff_tbl_ptrs[
i] =
nullptr;
61 cinfo->ac_huff_tbl_ptrs[
i] =
nullptr;
67 cinfo->marker_list =
nullptr;
108 switch (cinfo->num_components)
116 if (cinfo->saw_JFIF_marker)
120 else if (cinfo->saw_Adobe_marker)
122 switch (cinfo->Adobe_transform)
125 cinfo->jpeg_color_space =
JCS_RGB;
132 cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
133 cinfo->jpeg_color_space =
142 int cid0 = cinfo->comp_info[0].component_id;
143 int cid1 = cinfo->comp_info[1].component_id;
144 int cid2 = cinfo->comp_info[2].component_id;
146 if (cid0 == 1 && cid1 == 2 && cid2 == 3)
147 cinfo->jpeg_color_space =
149 else if (cid0 == 82 && cid1 == 71 && cid2 == 66)
150 cinfo->jpeg_color_space =
JCS_RGB;
153 TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);
158 cinfo->out_color_space =
JCS_RGB;
162 if (cinfo->saw_Adobe_marker)
164 switch (cinfo->Adobe_transform)
174 cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
175 cinfo->jpeg_color_space =
195 cinfo->scale_num = 1;
196 cinfo->scale_denom = 1;
197 cinfo->output_gamma = 1.0;
198 cinfo->buffered_image =
FALSE;
199 cinfo->raw_data_out =
FALSE;
201 cinfo->do_fancy_upsampling =
TRUE;
202 cinfo->do_block_smoothing =
TRUE;
203 cinfo->quantize_colors =
FALSE;
206 #ifdef QUANT_2PASS_SUPPORTED 207 cinfo->two_pass_quantize =
TRUE;
209 cinfo->two_pass_quantize =
FALSE;
211 cinfo->desired_number_of_colors = 256;
212 cinfo->colormap =
nullptr;
214 cinfo->enable_1pass_quant =
FALSE;
215 cinfo->enable_external_quant =
FALSE;
216 cinfo->enable_2pass_quant =
FALSE;
253 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
301 switch (cinfo->global_state)
305 (*cinfo->inputctl->reset_input_controller)(cinfo);
307 (*cinfo->src->init_source)(cinfo);
311 retcode = (*cinfo->inputctl->consume_input)(cinfo);
331 retcode = (*cinfo->inputctl->consume_input)(cinfo);
334 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
349 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
350 return cinfo->inputctl->eoi_reached;
363 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
364 return cinfo->inputctl->has_multiple_scans;
381 !cinfo->buffered_image)
384 if (cinfo->output_scanline < cinfo->output_height)
385 ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
386 (*cinfo->master->finish_output_pass)(cinfo);
397 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
400 while (!cinfo->inputctl->eoi_reached)
406 (*cinfo->src->term_source)(cinfo);
jinit_marker_reader(j_decompress_ptr cinfo)
jpeg_consume_input(j_decompress_ptr cinfo)
jpeg_finish_decompress(j_decompress_ptr cinfo)
jpeg_destroy(j_common_ptr cinfo)
#define ERREXIT(cinfo, code)
for(ctr=DCTSIZE;ctr > 0;ctr--)
jpeg_destroy_decompress(j_decompress_ptr cinfo)
jpeg_abort(j_common_ptr cinfo)
#define JPEG_HEADER_TABLES_ONLY
jinit_memory_mgr(j_common_ptr cinfo)
jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, size_t structsize)
jpeg_read_header(j_decompress_ptr cinfo, boolean require_image)
#define WARNMS1(cinfo, code, p1)
jpeg_abort_decompress(j_decompress_ptr cinfo)
#define ERREXIT1(cinfo, code, p1)
#define TRACEMS3(cinfo, lvl, code, p1, p2, p3)
#define ERREXIT2(cinfo, code, p1, p2)
jpeg_has_multiple_scans(j_decompress_ptr cinfo)
jpeg_input_complete(j_decompress_ptr cinfo)
#define MEMZERO(target, size)
default_decompress_parms(j_decompress_ptr cinfo)