10 #define JPEG_INTERNALS 36 if (cinfo->buffered_image) {
45 if (cinfo->inputctl->has_multiple_scans) {
46 #ifdef D_MULTISCAN_FILES_SUPPORTED 50 if (cinfo->progress != NULL)
51 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
53 retcode = (*cinfo->inputctl->consume_input) (cinfo);
59 if (cinfo->progress != NULL &&
61 if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {
63 cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows;
68 ERREXIT(cinfo, JERR_NOT_COMPILED);
71 cinfo->output_scan_number = cinfo->input_scan_number;
73 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
92 (*cinfo->master->prepare_for_output_pass) (cinfo);
93 cinfo->output_scanline = 0;
97 while (cinfo->master->is_dummy_pass) {
98 #ifdef QUANT_2PASS_SUPPORTED 100 while (cinfo->output_scanline < cinfo->output_height) {
103 if (cinfo->progress != NULL) {
104 cinfo->progress->pass_counter = (long) cinfo->output_scanline;
105 cinfo->progress->pass_limit = (
long) cinfo->output_height;
106 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
109 last_scanline = cinfo->output_scanline;
110 (*cinfo->main->process_data) (cinfo, (
JSAMPARRAY) NULL,
112 if (cinfo->output_scanline == last_scanline)
116 (*cinfo->master->finish_output_pass) (cinfo);
117 (*cinfo->master->prepare_for_output_pass) (cinfo);
118 cinfo->output_scanline = 0;
120 ERREXIT(cinfo, JERR_NOT_COMPILED);
151 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
152 if (cinfo->output_scanline >= cinfo->output_height) {
153 WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
158 if (cinfo->progress != NULL) {
159 cinfo->progress->pass_counter = (long) cinfo->output_scanline;
160 cinfo->progress->pass_limit = (
long) cinfo->output_height;
161 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
167 cinfo->output_scanline += row_ctr;
184 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
185 if (cinfo->output_scanline >= cinfo->output_height) {
186 WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
191 if (cinfo->progress != NULL) {
192 cinfo->progress->pass_counter = (long) cinfo->output_scanline;
193 cinfo->progress->pass_limit = (
long) cinfo->output_height;
194 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
198 lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size;
200 ERREXIT(cinfo, JERR_BUFFER_SIZE);
203 if (! (*cinfo->coef->decompress_data) (cinfo,
data))
207 cinfo->output_scanline += lines_per_iMCU_row;
208 return lines_per_iMCU_row;
214 #ifdef D_MULTISCAN_FILES_SUPPORTED 225 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
229 if (cinfo->inputctl->eoi_reached &&
249 cinfo->global_state ==
DSTATE_RAW_OK) && cinfo->buffered_image) {
252 (*cinfo->master->finish_output_pass) (cinfo);
256 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
259 while (cinfo->input_scan_number <= cinfo->output_scan_number &&
260 ! cinfo->inputctl->eoi_reached) {
#define JPEG_ROW_COMPLETED
LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo))
jpeg_finish_output(j_decompress_ptr cinfo)
jpeg_start_decompress(j_decompress_ptr cinfo)
#define ERREXIT(cinfo, code)
output_pass_setup(j_decompress_ptr cinfo)
jpeg_start_output(j_decompress_ptr cinfo, int scan_number)
jpeg_read_scanlines(j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines)
jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines)
#define WARNMS(cinfo, code)
#define ERREXIT1(cinfo, code, p1)
JSAMPARRAY JDIMENSION max_lines
GLsizei GLsizei GLenum GLenum const GLvoid * data
jinit_master_decompress(j_decompress_ptr cinfo)