10 #define JPEG_INTERNALS 48 ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
52 ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
56 cinfo->max_h_samp_factor = 1;
57 cinfo->max_v_samp_factor = 1;
58 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
62 ERREXIT(cinfo, JERR_BAD_SAMPLING);
63 cinfo->max_h_samp_factor =
MAX(cinfo->max_h_samp_factor,
65 cinfo->max_v_samp_factor =
MAX(cinfo->max_v_samp_factor,
73 cinfo->min_DCT_scaled_size =
DCTSIZE;
76 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
82 (
long) (cinfo->max_h_samp_factor *
DCTSIZE));
85 (
long) (cinfo->max_v_samp_factor *
DCTSIZE));
93 (
long) cinfo->max_h_samp_factor);
96 (
long) cinfo->max_v_samp_factor);
106 (long) (cinfo->max_v_samp_factor*
DCTSIZE));
109 if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode)
110 cinfo->inputctl->has_multiple_scans =
TRUE;
112 cinfo->inputctl->has_multiple_scans =
FALSE;
121 int ci, mcublks, tmp;
124 if (cinfo->comps_in_scan == 1) {
127 compptr = cinfo->cur_comp_info[0];
147 cinfo->blocks_in_MCU = 1;
148 cinfo->MCU_membership[0] = 0;
154 ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
160 (long) (cinfo->max_h_samp_factor*
DCTSIZE));
163 (long) (cinfo->max_v_samp_factor*
DCTSIZE));
165 cinfo->blocks_in_MCU = 0;
167 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
168 compptr = cinfo->cur_comp_info[ci];
184 ERREXIT(cinfo, JERR_BAD_MCU_SIZE);
185 while (mcublks-- > 0) {
186 cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
222 for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
223 compptr = cinfo->cur_comp_info[ci];
230 cinfo->quant_tbl_ptrs[qtblno] == NULL)
231 ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
254 (*cinfo->entropy->start_pass) (cinfo);
255 (*cinfo->coef->start_input_pass) (cinfo);
256 cinfo->inputctl->consume_input = cinfo->coef->consume_data;
292 val = (*cinfo->marker->read_markers) (cinfo);
305 ERREXIT(cinfo, JERR_EOI_EXPECTED);
312 if (cinfo->marker->saw_SOF)
313 ERREXIT(cinfo, JERR_SOF_NO_SOS);
318 if (cinfo->output_scan_number > cinfo->input_scan_number)
319 cinfo->output_scan_number = cinfo->input_scan_number;
345 (*cinfo->marker->reset_marker_reader) (cinfo);
347 cinfo->coef_bits = NULL;
jdiv_round_up(long a, long b)
JDIMENSION downsampled_width
#define MAX_COMPS_IN_SCAN
#define D_MAX_BLOCKS_IN_MCU
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
#define ERREXIT1(cinfo, code, p1)
#define ERREXIT2(cinfo, code, p1, p2)
JDIMENSION downsampled_height