10 #define JPEG_INTERNALS 20 #ifdef INPUT_SMOOTHING_SUPPORTED 21 #define CONTEXT_ROWS_SUPPORTED 57 #ifdef CONTEXT_ROWS_SUPPORTED 76 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
82 #ifdef CONTEXT_ROWS_SUPPORTED 100 int input_rows,
int output_rows)
104 for (
row = input_rows;
row < output_rows;
row++) {
133 *out_row_group_ctr < out_row_groups_avail) {
136 numrows = cinfo->max_v_samp_factor - prep->
next_buf_row;
148 for (ci = 0; ci < cinfo->num_components; ci++) {
156 (*cinfo->downsample->downsample) (cinfo,
160 (*out_row_group_ctr)++;
166 *out_row_group_ctr < out_row_groups_avail) {
167 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
174 *out_row_group_ctr = out_row_groups_avail;
181 #ifdef CONTEXT_ROWS_SUPPORTED 196 int buf_height = cinfo->max_v_samp_factor * 3;
199 while (*out_row_group_ctr < out_row_groups_avail) {
210 if (prep->
rows_to_go == cinfo->image_height) {
211 for (ci = 0; ci < cinfo->num_components; ci++) {
213 for (
row = 1;
row <= cinfo->max_v_samp_factor;
row++) {
216 1, cinfo->image_width);
229 for (ci = 0; ci < cinfo->num_components; ci++) {
238 (*cinfo->downsample->downsample) (cinfo,
242 (*out_row_group_ctr)++;
263 int rgroup_height = cinfo->max_v_samp_factor;
273 (cinfo->num_components * 5 * rgroup_height) *
276 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
282 true_buffer = (*cinfo->mem->alloc_sarray)
288 MEMCOPY(fake_buffer + rgroup_height, true_buffer,
291 for (i = 0; i < rgroup_height; i++) {
292 fake_buffer[i] = true_buffer[2 * rgroup_height + i];
293 fake_buffer[4 * rgroup_height + i] = true_buffer[i];
295 prep->
color_buf[ci] = fake_buffer + rgroup_height;
296 fake_buffer += 5 * rgroup_height;
315 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
327 if (cinfo->downsample->need_context_rows) {
329 #ifdef CONTEXT_ROWS_SUPPORTED 333 ERREXIT(cinfo, JERR_NOT_COMPILED);
338 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
340 prep->
color_buf[ci] = (*cinfo->mem->alloc_sarray)
JSAMPARRAY color_buf[MAX_COMPONENTS]
struct jpeg_common_struct * j_common_ptr
#define ERREXIT(cinfo, code)
jpeg_component_info * compptr
JDIMENSION width_in_blocks
jcopy_sample_rows(JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)
#define MEMCOPY(dest, src, size)
expand_bottom_edge(JSAMPARRAY image_data, JDIMENSION num_cols, int input_rows, int output_rows)
struct jpeg_c_prep_controller pub
jinit_c_prep_controller(j_compress_ptr cinfo, boolean need_full_buffer)
int JSAMPARRAY int int JDIMENSION num_cols
create_context_buffer(j_compress_ptr cinfo)
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)
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)
GLenum GLenum GLvoid * row
my_prep_controller * my_prep_ptr
start_pass_prep(j_compress_ptr cinfo, J_BUF_MODE pass_mode)
JSAMPARRAY JDIMENSION JDIMENSION in_rows_avail
JSAMPARRAY JDIMENSION * in_row_ctr