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
176 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
178 rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
188 xbuf += rgroup * (
M + 4);
209 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
211 rgroup = (compptr->v_samp_factor * compptr->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];
249 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
251 rgroup = (compptr->v_samp_factor * compptr->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;
280 iMCUheight = compptr->
v_samp_factor * compptr->DCT_scaled_size;
283 rows_left = (
int) (compptr->downsampled_height % (
JDIMENSION) iMCUheight);
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];
326 #ifdef QUANT_2PASS_SUPPORTED
329 main->
pub.process_data = process_data_crank_post;
333 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
354 if (! (*cinfo->
coef->decompress_data) (cinfo, main->
buffer))
367 (*cinfo->
post->post_process_data) (cinfo, main->
buffer,
369 output_buf, out_row_ctr, out_rows_avail);
393 if (! (*cinfo->
coef->decompress_data) (cinfo,
410 output_buf, out_row_ctr, out_rows_avail);
414 if (*out_row_ctr >= out_rows_avail)
432 output_buf, out_row_ctr, out_rows_avail);
456 #ifdef QUANT_2PASS_SUPPORTED
465 output_buf, out_row_ctr, out_rows_avail);
479 int ci, rgroup, ngroups;
488 if (need_full_buffer)
489 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
503 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
507 main->
buffer[ci] = (*cinfo->mem->alloc_sarray)
struct jpeg_c_main_controller pub
struct jpeg_d_post_controller * post
jpeg_component_info * comp_info
JDIMENSION rowgroups_avail
struct jpeg_d_main_controller * main
struct jpeg_common_struct * j_common_ptr
struct jpeg_d_coef_controller * coef
#define ERREXIT(cinfo, code)
METHODDEF void process_data_context_main(j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
JDIMENSION width_in_blocks
my_main_controller * my_main_ptr
JSAMPARRAY buffer[MAX_COMPONENTS]
#define CTX_PREPARE_FOR_IMCU
#define CTX_POSTPONED_ROW
METHODDEF void process_data_simple_main(j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
GLOBAL void jinit_d_main_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
LOCAL void alloc_funny_pointers(j_decompress_ptr cinfo)
LOCAL void make_funny_pointers(j_decompress_ptr cinfo)
LOCAL void set_bottom_pointers(j_decompress_ptr cinfo)
struct jpeg_upsampler * upsample
LOCAL void set_wraparound_pointers(j_decompress_ptr cinfo)
boolean need_context_rows
METHODDEF void process_data_simple_main JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail))
if(!ValidDisplayID(prefInfo.prefDisplayID)) prefInfo.prefDisplayID
METHODDEF void start_pass_main(j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
JDIMENSION total_iMCU_rows