16 #define JPEG_INTERNALS 137 #define CTX_PREPARE_FOR_IMCU 0 138 #define CTX_PROCESS_IMCU 1 139 #define CTX_POSTPONED_ROW 2 149 #ifdef QUANT_2PASS_SUPPORTED 164 int M = cinfo->min_DCT_scaled_size;
176 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
179 cinfo->min_DCT_scaled_size;
188 xbuf += rgroup * (M + 4);
205 int M = cinfo->min_DCT_scaled_size;
209 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
212 cinfo->min_DCT_scaled_size;
217 for (
i = 0;
i < rgroup * (M + 2);
i++) {
218 xbuf0[
i] = xbuf1[
i] = buf[
i];
221 for (
i = 0;
i < rgroup * 2;
i++) {
222 xbuf1[rgroup*(M-2) +
i] = buf[rgroup*M +
i];
223 xbuf1[rgroup*M +
i] = buf[rgroup*(M-2) +
i];
230 for (
i = 0;
i < rgroup;
i++) {
231 xbuf0[
i - rgroup] = xbuf0[0];
245 int M = cinfo->min_DCT_scaled_size;
249 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
252 cinfo->min_DCT_scaled_size;
255 for (
i = 0;
i < rgroup;
i++) {
256 xbuf0[
i - rgroup] = xbuf0[rgroup*(M+1) +
i];
257 xbuf1[
i - rgroup] = xbuf1[rgroup*(M+1) +
i];
258 xbuf0[rgroup*(M+2) +
i] = xbuf0[
i];
259 xbuf1[rgroup*(M+2) +
i] = xbuf1[
i];
273 int ci,
i, rgroup, iMCUheight, rows_left;
277 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
281 rgroup = iMCUheight / cinfo->min_DCT_scaled_size;
284 if (rows_left == 0) rows_left = iMCUheight;
295 for (
i = 0;
i < rgroup * 2;
i++) {
296 xbuf[rows_left +
i] = xbuf[rows_left-1];
313 if (cinfo->upsample->need_context_rows) {
326 #ifdef QUANT_2PASS_SUPPORTED 333 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
354 if (! (*cinfo->coef->decompress_data) (cinfo, main->
buffer))
360 rowgroups_avail = (
JDIMENSION) cinfo->min_DCT_scaled_size;
367 (*cinfo->post->post_process_data) (cinfo, main->
buffer,
393 if (! (*cinfo->coef->decompress_data) (cinfo,
408 (*cinfo->post->post_process_data) (cinfo, main->
xbuffer[main->
whichptr],
414 if (*out_row_ctr >= out_rows_avail)
430 (*cinfo->post->post_process_data) (cinfo, main->
xbuffer[main->
whichptr],
456 #ifdef QUANT_2PASS_SUPPORTED 463 (*cinfo->post->post_process_data) (cinfo, (
JSAMPIMAGE) NULL,
479 int ci, rgroup, ngroups;
489 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
494 if (cinfo->upsample->need_context_rows) {
495 if (cinfo->min_DCT_scaled_size < 2)
497 alloc_funny_pointers(cinfo);
498 ngroups = cinfo->min_DCT_scaled_size + 2;
500 ngroups = cinfo->min_DCT_scaled_size;
503 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
506 cinfo->min_DCT_scaled_size;
507 main->
buffer[ci] = (*cinfo->mem->alloc_sarray)
jinit_d_main_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
struct jpeg_c_main_controller pub
set_bottom_pointers(j_decompress_ptr cinfo)
JDIMENSION rowgroups_avail
struct jpeg_common_struct * j_common_ptr
#define ERREXIT(cinfo, code)
start_pass_main(j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
jpeg_component_info * compptr
JDIMENSION width_in_blocks
my_main_controller * my_main_ptr
JSAMPARRAY buffer[MAX_COMPONENTS]
#define CTX_PREPARE_FOR_IMCU
#define CTX_POSTPONED_ROW
process_data_simple_main(j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
process_data_context_main(j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
make_funny_pointers(j_decompress_ptr cinfo)
png_infop png_bytep buffer
set_wraparound_pointers(j_decompress_ptr cinfo)
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
process_data_crank_post(j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
JDIMENSION downsampled_height