10 #define JPEG_INTERNALS 30 ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
41 void * client_data = cinfo->client_data;
44 cinfo->client_data = client_data;
46 cinfo->is_decompressor =
TRUE;
52 cinfo->progress = NULL;
56 cinfo->quant_tbl_ptrs[
i] = NULL;
59 cinfo->dc_huff_tbl_ptrs[
i] = NULL;
60 cinfo->ac_huff_tbl_ptrs[
i] = NULL;
66 cinfo->marker_list = NULL;
110 switch (cinfo->num_components) {
117 if (cinfo->saw_JFIF_marker) {
119 }
else if (cinfo->saw_Adobe_marker) {
120 switch (cinfo->Adobe_transform) {
122 cinfo->jpeg_color_space =
JCS_RGB;
128 WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
134 int cid0 = cinfo->comp_info[0].component_id;
135 int cid1 = cinfo->comp_info[1].component_id;
136 int cid2 = cinfo->comp_info[2].component_id;
138 if (cid0 == 1 && cid1 == 2 && cid2 == 3)
140 else if (cid0 == 82 && cid1 == 71 && cid2 == 66)
141 cinfo->jpeg_color_space =
JCS_RGB;
143 TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);
148 cinfo->out_color_space =
JCS_RGB;
152 if (cinfo->saw_Adobe_marker) {
153 switch (cinfo->Adobe_transform) {
161 WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
179 cinfo->scale_num = 1;
180 cinfo->scale_denom = 1;
181 cinfo->output_gamma = 1.0;
182 cinfo->buffered_image =
FALSE;
183 cinfo->raw_data_out =
FALSE;
185 cinfo->do_fancy_upsampling =
TRUE;
186 cinfo->do_block_smoothing =
TRUE;
187 cinfo->quantize_colors =
FALSE;
190 #ifdef QUANT_2PASS_SUPPORTED 191 cinfo->two_pass_quantize =
TRUE;
193 cinfo->two_pass_quantize =
FALSE;
195 cinfo->desired_number_of_colors = 256;
196 cinfo->colormap = NULL;
198 cinfo->enable_1pass_quant =
FALSE;
199 cinfo->enable_external_quant =
FALSE;
200 cinfo->enable_2pass_quant =
FALSE;
238 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
283 switch (cinfo->global_state) {
286 (*cinfo->inputctl->reset_input_controller) (cinfo);
288 (*cinfo->src->init_source) (cinfo);
292 retcode = (*cinfo->inputctl->consume_input) (cinfo);
311 retcode = (*cinfo->inputctl->consume_input) (cinfo);
314 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
330 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
331 return cinfo->inputctl->eoi_reached;
345 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
346 return cinfo->inputctl->has_multiple_scans;
363 cinfo->global_state ==
DSTATE_RAW_OK) && ! cinfo->buffered_image) {
365 if (cinfo->output_scanline < cinfo->output_height)
366 ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
367 (*cinfo->master->finish_output_pass) (cinfo);
374 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
377 while (! cinfo->inputctl->eoi_reached) {
382 (*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)
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)