10 #define JPEG_INTERNALS 130 #define CTX_PREPARE_FOR_IMCU 0 131 #define CTX_PROCESS_IMCU 1 132 #define CTX_POSTPONED_ROW 2 143 #ifdef QUANT_2PASS_SUPPORTED 158 int M = cinfo->min_DCT_scaled_size;
170 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
175 cinfo->min_DCT_scaled_size;
179 xbuf = (
JSAMPARRAY)(*cinfo->mem->alloc_small)(
184 xbuf += rgroup * (M + 4);
200 int M = cinfo->min_DCT_scaled_size;
204 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
209 cinfo->min_DCT_scaled_size;
214 for (i = 0; i < rgroup * (M + 2); i++)
216 xbuf0[i] = xbuf1[i] = buf[i];
219 for (i = 0; i < rgroup * 2; i++)
221 xbuf1[rgroup * (M - 2) + i] = buf[rgroup * M + i];
222 xbuf1[rgroup * M + i] = buf[rgroup * (M - 2) + i];
229 for (i = 0; i < rgroup; i++)
231 xbuf0[i - rgroup] = xbuf0[0];
244 int M = cinfo->min_DCT_scaled_size;
248 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
253 cinfo->min_DCT_scaled_size;
256 for (i = 0; i < rgroup; i++)
258 xbuf0[i - rgroup] = xbuf0[rgroup * (M + 1) + i];
259 xbuf1[i - rgroup] = xbuf1[rgroup * (M + 1) + i];
260 xbuf0[rgroup * (M + 2) + i] = xbuf0[i];
261 xbuf1[rgroup * (M + 2) + i] = xbuf1[i];
274 int ci, i, rgroup, iMCUheight, rows_left;
278 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
283 rgroup = iMCUheight / cinfo->min_DCT_scaled_size;
286 if (rows_left == 0) rows_left = iMCUheight;
300 for (i = 0; i < rgroup * 2; i++)
302 xbuf[rows_left + i] = xbuf[rows_left - 1];
319 if (cinfo->upsample->need_context_rows)
335 #ifdef QUANT_2PASS_SUPPORTED 343 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
364 if (!(*cinfo->coef->decompress_data)(cinfo, main->
buffer))
370 rowgroups_avail = (
JDIMENSION)cinfo->min_DCT_scaled_size;
377 (*cinfo->post->post_process_data)(
379 out_row_ctr, out_rows_avail);
404 if (!(*cinfo->coef->decompress_data)(
421 (*cinfo->post->post_process_data)(
427 if (*out_row_ctr >= out_rows_avail)
445 (*cinfo->post->post_process_data)(
471 #ifdef QUANT_2PASS_SUPPORTED 478 (*cinfo->post->post_process_data)(
493 int ci, rgroup, ngroups;
501 if (need_full_buffer)
502 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
507 if (cinfo->upsample->need_context_rows)
509 if (cinfo->min_DCT_scaled_size <
513 ngroups = cinfo->min_DCT_scaled_size + 2;
517 ngroups = cinfo->min_DCT_scaled_size;
520 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
525 cinfo->min_DCT_scaled_size;
526 main->
buffer[ci] = (*cinfo->mem->alloc_sarray)(
process_data_simple_main(j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
struct jpeg_c_main_controller pub
process_data_crank_post(j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
JDIMENSION rowgroups_avail
struct jpeg_common_struct * j_common_ptr
start_pass_main(j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
process_data_context_main(j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
#define ERREXIT(cinfo, code)
for(ctr=DCTSIZE;ctr > 0;ctr--)
JDIMENSION width_in_blocks
my_main_controller * my_main_ptr
set_bottom_pointers(j_decompress_ptr cinfo)
JSAMPARRAY buffer[MAX_COMPONENTS]
process_data_simple_main JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail))
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
alloc_funny_pointers(j_decompress_ptr cinfo)
jinit_d_main_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
make_funny_pointers(j_decompress_ptr cinfo)
#define CTX_PREPARE_FOR_IMCU
#define CTX_POSTPONED_ROW
set_wraparound_pointers(j_decompress_ptr cinfo)
jpeg_component_info * compptr
JDIMENSION downsampled_height