10 #define JPEG_INTERNALS 15 #ifdef UPSAMPLE_MERGING_SUPPORTED 49 #define ONE_HALF ((INT32)1 << (SCALEBITS - 1)) 50 #define FIX(x) ((INT32)((x) * (1L << SCALEBITS) + 0.5)) 65 upsample->
Cr_r_tab = (
int*)(*cinfo->mem->alloc_small)(
67 upsample->
Cb_b_tab = (
int*)(*cinfo->mem->alloc_small)(
144 out_rows_avail -= *out_row_ctr;
145 if (num_rows > out_rows_avail) num_rows = out_rows_avail;
158 (*upsample->upmethod)(cinfo, input_buf, *in_row_group_ctr, work_ptrs);
162 *out_row_ctr += num_rows;
165 if (!upsample->
spare_full) (*in_row_group_ctr)++;
180 (*upsample->upmethod)(
181 cinfo, input_buf, *in_row_group_ctr,
output_buf + *out_row_ctr);
184 (*in_row_group_ctr)++;
206 int y, cred, cgreen, cblue;
219 inptr0 = input_buf[0][in_row_group_ctr];
220 inptr1 = input_buf[1][in_row_group_ctr];
221 inptr2 = input_buf[2][in_row_group_ctr];
224 for (col = cinfo->output_width >> 1; col > 0; col--)
245 if (cinfo->output_width & 1)
269 int y, cred, cgreen, cblue;
272 JSAMPROW inptr00, inptr01, inptr1, inptr2;
282 inptr00 = input_buf[0][in_row_group_ctr * 2];
283 inptr01 = input_buf[0][in_row_group_ctr * 2 + 1];
284 inptr1 = input_buf[1][in_row_group_ctr];
285 inptr2 = input_buf[2][in_row_group_ctr];
289 for (col = cinfo->output_width >> 1; col > 0; col--)
302 outptr0 += RGB_PIXELSIZE;
307 outptr0 += RGB_PIXELSIZE;
312 outptr1 += RGB_PIXELSIZE;
317 outptr1 += RGB_PIXELSIZE;
320 if (cinfo->output_width & 1)
357 upsample->
out_row_width = cinfo->output_width * cinfo->out_color_components;
359 if (cinfo->max_v_samp_factor == 2)
h2v2_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)
build_ycc_rgb_table(j_decompress_ptr cinfo)
jinit_merged_upsampler(j_decompress_ptr cinfo)
struct jpeg_common_struct * j_common_ptr
#define GETJSAMPLE(value)
for(ctr=DCTSIZE;ctr > 0;ctr--)
struct jpeg_upsampler pub
jcopy_sample_rows(JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
start_pass_merged_upsample(j_decompress_ptr cinfo)
#define JMETHOD(type, methodname, arglist)
merged_1v_upsample(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)
merged_2v_upsample(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)
h2v1_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)
#define RIGHT_SHIFT(x, shft)
boolean need_context_rows
my_upsampler * my_upsample_ptr