17 #define JPEG_INTERNALS
27 #ifdef INPUT_SMOOTHING_SUPPORTED
28 #define CONTEXT_ROWS_SUPPORTED
64 #ifdef CONTEXT_ROWS_SUPPORTED
83 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
89 #ifdef CONTEXT_ROWS_SUPPORTED
107 int input_rows,
int output_rows)
111 for (row = input_rows; row < output_rows; row++) {
139 while (*in_row_ctr < in_rows_avail &&
140 *out_row_group_ctr < out_row_groups_avail) {
142 inrows = in_rows_avail - *in_row_ctr;
145 (*cinfo->
cconvert->color_convert) (cinfo, input_buf + *in_row_ctr,
149 *in_row_ctr += numrows;
165 output_buf, *out_row_group_ctr);
167 (*out_row_group_ctr)++;
173 *out_row_group_ctr < out_row_groups_avail) {
174 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
177 compptr->width_in_blocks *
DCTSIZE,
178 (
int) (*out_row_group_ctr * compptr->v_samp_factor),
179 (
int) (out_row_groups_avail * compptr->v_samp_factor));
181 *out_row_group_ctr = out_row_groups_avail;
188 #ifdef CONTEXT_ROWS_SUPPORTED
207 while (*out_row_group_ctr < out_row_groups_avail) {
208 if (*in_row_ctr < in_rows_avail) {
210 inrows = in_rows_avail - *in_row_ctr;
213 (*cinfo->
cconvert->color_convert) (cinfo, input_buf + *in_row_ctr,
228 *in_row_ctr += numrows;
250 output_buf, *out_row_group_ctr);
251 (*out_row_group_ctr)++;
264 *out_row_group_ctr < out_row_groups_avail) {
265 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
268 compptr->width_in_blocks *
DCTSIZE,
269 (
int) (*out_row_group_ctr * compptr->v_samp_factor),
270 (
int) (out_row_groups_avail * compptr->v_samp_factor));
272 *out_row_group_ctr = out_row_groups_avail;
300 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
306 true_buffer = (*cinfo->mem->alloc_sarray)
312 MEMCOPY(fake_buffer + rgroup_height, true_buffer,
315 for (
i = 0;
i < rgroup_height;
i++) {
316 fake_buffer[
i] = true_buffer[2 * rgroup_height +
i];
317 fake_buffer[4 * rgroup_height +
i] = true_buffer[
i];
319 prep->
color_buf[ci] = fake_buffer + rgroup_height;
320 fake_buffer += 5 * rgroup_height;
338 if (need_full_buffer)
339 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
353 #ifdef CONTEXT_ROWS_SUPPORTED
357 ERREXIT(cinfo, JERR_NOT_COMPILED);
362 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
364 prep->
color_buf[ci] = (*cinfo->mem->alloc_sarray)
struct jpeg_c_prep_controller * prep
GLOBAL void jcopy_sample_rows(JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)
JSAMPARRAY color_buf[MAX_COMPONENTS]
struct jpeg_common_struct * j_common_ptr
struct jpeg_color_converter * cconvert
#define ERREXIT(cinfo, code)
JDIMENSION width_in_blocks
my_prep_controller * my_prep_ptr
#define MEMCOPY(dest, src, size)
GLOBAL void jinit_c_prep_controller(j_compress_ptr cinfo, boolean need_full_buffer)
struct jpeg_c_prep_controller pub
METHODDEF void start_pass_prep(j_compress_ptr cinfo, J_BUF_MODE pass_mode)
METHODDEF void pre_process_data(j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail, JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, JDIMENSION out_row_groups_avail)
struct jpeg_downsampler * downsample
#define MIN(X, Y)
standard MIN macro
LOCAL void expand_bottom_edge(JSAMPARRAY image_data, JDIMENSION num_cols, int input_rows, int output_rows)
GLenum GLenum GLvoid * row
METHODDEF void pre_process_context(j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail, JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, JDIMENSION out_row_groups_avail)
LOCAL void create_context_buffer(j_compress_ptr cinfo)
if(!ValidDisplayID(prefInfo.prefDisplayID)) prefInfo.prefDisplayID
jpeg_component_info * comp_info
boolean need_context_rows