19 #define JPEG_INTERNALS
52 #ifdef QUANT_2PASS_SUPPORTED
87 post->
buffer = (*cinfo->mem->access_virt_sarray)
95 post->
pub.post_process_data = cinfo->
upsample->upsample;
98 #ifdef QUANT_2PASS_SUPPORTED
102 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
103 post->
pub.post_process_data = post_process_prepass;
108 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
109 post->
pub.post_process_data = post_process_2pass;
113 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
137 max_rows = out_rows_avail - *out_row_ctr;
141 (*cinfo->
upsample->upsample) (cinfo,
142 input_buf, in_row_group_ctr, in_row_groups_avail,
143 post->
buffer, &num_rows, max_rows);
145 (*cinfo->
cquantize->color_quantize) (cinfo,
146 post->
buffer, output_buf + *out_row_ctr, (
int) num_rows);
147 *out_row_ctr += num_rows;
151 #ifdef QUANT_2PASS_SUPPORTED
169 post->
buffer = (*cinfo->mem->access_virt_sarray)
176 (*cinfo->
upsample->upsample) (cinfo,
177 input_buf, in_row_group_ctr, in_row_groups_avail,
182 if (post->
next_row > old_next_row) {
183 num_rows = post->
next_row - old_next_row;
184 (*cinfo->
cquantize->color_quantize) (cinfo, post->
buffer + old_next_row,
186 *out_row_ctr += num_rows;
213 post->
buffer = (*cinfo->mem->access_virt_sarray)
220 max_rows = out_rows_avail - *out_row_ctr;
221 if (num_rows > max_rows)
225 if (num_rows > max_rows)
229 (*cinfo->
cquantize->color_quantize) (cinfo,
232 *out_row_ctr += num_rows;
269 if (need_full_buffer) {
272 #ifdef QUANT_2PASS_SUPPORTED
273 post->
whole_image = (*cinfo->mem->request_virt_sarray)
280 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
284 post->
buffer = (*cinfo->mem->alloc_sarray)
struct jpeg_d_post_controller * post
struct jpeg_common_struct * j_common_ptr
METHODDEF void start_pass_dpost(j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
#define ERREXIT(cinfo, code)
METHODDEF void post_process_1pass JPP((j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail))
struct jpeg_d_post_controller pub
GLOBAL void jinit_d_post_controller(j_decompress_ptr cinfo, boolean need_full_buffer)
struct jpeg_color_quantizer * cquantize
METHODDEF void post_process_1pass(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
struct jpeg_upsampler * upsample
jvirt_sarray_ptr whole_image
if(!ValidDisplayID(prefInfo.prefDisplayID)) prefInfo.prefDisplayID
my_post_controller * my_post_ptr
GLOBAL long jround_up(long a, long b)