14 #define JPEG_INTERNALS 25 } my_input_controller;
48 ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (
unsigned int) JPEG_MAX_DIMENSION);
62 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
66 ERREXIT(cinfo, JERR_BAD_SAMPLING);
80 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
125 int ci, mcublks, tmp;
128 if (cinfo->comps_in_scan == 1) {
131 compptr = cinfo->cur_comp_info[0];
151 cinfo->blocks_in_MCU = 1;
152 cinfo->MCU_membership[0] = 0;
158 ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
169 cinfo->blocks_in_MCU = 0;
171 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
172 compptr = cinfo->cur_comp_info[ci];
188 ERREXIT(cinfo, JERR_BAD_MCU_SIZE);
189 while (mcublks-- > 0) {
190 cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
226 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
227 compptr = cinfo->cur_comp_info[ci];
234 cinfo->quant_tbl_ptrs[qtblno] ==
NULL)
235 ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
258 (*cinfo->entropy->start_pass) (cinfo);
259 (*cinfo->coef->start_input_pass) (cinfo);
260 cinfo->inputctl->consume_input = cinfo->coef->consume_data;
293 if (inputctl->pub.eoi_reached)
296 val = (*cinfo->marker->read_markers) (cinfo);
300 if (inputctl->inheaders) {
302 inputctl->inheaders =
FALSE;
308 if (! inputctl->pub.has_multiple_scans)
309 ERREXIT(cinfo, JERR_EOI_EXPECTED);
314 inputctl->pub.eoi_reached =
TRUE;
315 if (inputctl->inheaders) {
316 if (cinfo->marker->saw_SOF)
317 ERREXIT(cinfo, JERR_SOF_NO_SOS);
322 if (cinfo->output_scan_number > cinfo->input_scan_number)
323 cinfo->output_scan_number = cinfo->input_scan_number;
344 inputctl->pub.has_multiple_scans =
FALSE;
345 inputctl->pub.eoi_reached =
FALSE;
346 inputctl->inheaders =
TRUE;
349 (*cinfo->marker->reset_marker_reader) (cinfo);
351 cinfo->coef_bits =
NULL;
368 SIZEOF(my_input_controller));
378 inputctl->pub.has_multiple_scans =
FALSE;
379 inputctl->pub.eoi_reached =
FALSE;
380 inputctl->inheaders =
TRUE;
JDIMENSION downsampled_width
struct jpeg_input_controller * inputctl
jpeg_component_info * comp_info
struct jpeg_common_struct * j_common_ptr
#define ERREXIT(cinfo, code)
jpeg_component_info * compptr
JDIMENSION width_in_blocks
#define MEMCOPY(dest, src, size)
JDIMENSION height_in_blocks
#define JPEG_MAX_DIMENSION
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
jdiv_round_up(long a, long b)
initial_setup(j_compress_ptr cinfo)
#define ERREXIT1(cinfo, code, p1)
if(!abbox) return FT_THROW(Invalid_Argument)
#define D_MAX_BLOCKS_IN_MCU
#define ERREXIT2(cinfo, code, p1, p2)
JDIMENSION total_iMCU_rows
#define MAX_COMPS_IN_SCAN
JDIMENSION downsampled_height