17 #define JPEG_INTERNALS 43 if (cinfo->buffered_image) {
52 if (cinfo->inputctl->has_multiple_scans) {
53 #ifdef D_MULTISCAN_FILES_SUPPORTED 57 if (cinfo->progress != NULL)
58 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
60 retcode = (*cinfo->inputctl->consume_input) (cinfo);
66 if (cinfo->progress != NULL &&
68 if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {
70 cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows;
75 ERREXIT(cinfo, JERR_NOT_COMPILED);
78 cinfo->output_scan_number = cinfo->input_scan_number;
80 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
99 (*cinfo->master->prepare_for_output_pass) (cinfo);
100 cinfo->output_scanline = 0;
104 while (cinfo->master->is_dummy_pass) {
105 #ifdef QUANT_2PASS_SUPPORTED 107 while (cinfo->output_scanline < cinfo->output_height) {
110 if (cinfo->progress != NULL) {
111 cinfo->progress->pass_counter = (long) cinfo->output_scanline;
112 cinfo->progress->pass_limit = (
long) cinfo->output_height;
113 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
116 last_scanline = cinfo->output_scanline;
117 (*cinfo->main->process_data) (cinfo, (
JSAMPARRAY) NULL,
119 if (cinfo->output_scanline == last_scanline)
123 (*cinfo->master->finish_output_pass) (cinfo);
124 (*cinfo->master->prepare_for_output_pass) (cinfo);
125 cinfo->output_scanline = 0;
127 ERREXIT(cinfo, JERR_NOT_COMPILED);
158 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
159 if (cinfo->output_scanline >= cinfo->output_height) {
160 WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
165 if (cinfo->progress != NULL) {
166 cinfo->progress->pass_counter = (long) cinfo->output_scanline;
167 cinfo->progress->pass_limit = (
long) cinfo->output_height;
168 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
174 cinfo->output_scanline += row_ctr;
191 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
192 if (cinfo->output_scanline >= cinfo->output_height) {
193 WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
198 if (cinfo->progress != NULL) {
199 cinfo->progress->pass_counter = (long) cinfo->output_scanline;
200 cinfo->progress->pass_limit = (
long) cinfo->output_height;
201 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
205 lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size;
207 ERREXIT(cinfo, JERR_BUFFER_SIZE);
210 if (! (*cinfo->coef->decompress_data) (cinfo,
data))
214 cinfo->output_scanline += lines_per_iMCU_row;
215 return lines_per_iMCU_row;
221 #ifdef D_MULTISCAN_FILES_SUPPORTED 232 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
236 if (cinfo->inputctl->eoi_reached &&
256 cinfo->global_state ==
DSTATE_RAW_OK) && cinfo->buffered_image) {
259 (*cinfo->master->finish_output_pass) (cinfo);
263 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
266 while (cinfo->input_scan_number <= cinfo->output_scan_number &&
267 ! cinfo->inputctl->eoi_reached) {
JSAMPARRAY JDIMENSION max_lines
#define ERREXIT(cinfo, code)
#define JPEG_ROW_COMPLETED
jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines)
jpeg_finish_output(j_decompress_ptr cinfo)
#define WARNMS(cinfo, code)
jinit_master_decompress(j_decompress_ptr cinfo)
#define ERREXIT1(cinfo, code, p1)
jpeg_read_scanlines(j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines)
output_pass_setup(j_decompress_ptr cinfo)
jpeg_start_output(j_decompress_ptr cinfo, int scan_number)