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)) 165 (*in_row_group_ctr)++;
185 (*in_row_group_ctr)++;
209 int y, cred, cgreen, cblue;
215 JSAMPLE * range_limit = cinfo->sample_range_limit;
227 for (col = cinfo->output_width >> 1; col > 0; col--) {
236 outptr[RGB_RED] = range_limit[
y + cred];
237 outptr[RGB_GREEN] = range_limit[
y + cgreen];
238 outptr[RGB_BLUE] = range_limit[
y + cblue];
239 outptr += RGB_PIXELSIZE;
241 outptr[RGB_RED] = range_limit[
y + cred];
242 outptr[RGB_GREEN] = range_limit[
y + cgreen];
243 outptr[RGB_BLUE] = range_limit[
y + cblue];
244 outptr += RGB_PIXELSIZE;
247 if (cinfo->output_width & 1) {
254 outptr[RGB_RED] = range_limit[
y + cred];
255 outptr[RGB_GREEN] = range_limit[
y + cgreen];
256 outptr[RGB_BLUE] = range_limit[
y + cblue];
271 int y, cred, cgreen, cblue;
274 JSAMPROW inptr00, inptr01, inptr1, inptr2;
277 JSAMPLE * range_limit = cinfo->sample_range_limit;
291 for (col = cinfo->output_width >> 1; col > 0; col--) {
300 outptr0[RGB_RED] = range_limit[
y + cred];
301 outptr0[RGB_GREEN] = range_limit[
y + cgreen];
302 outptr0[RGB_BLUE] = range_limit[
y + cblue];
303 outptr0 += RGB_PIXELSIZE;
305 outptr0[RGB_RED] = range_limit[
y + cred];
306 outptr0[RGB_GREEN] = range_limit[
y + cgreen];
307 outptr0[RGB_BLUE] = range_limit[
y + cblue];
308 outptr0 += RGB_PIXELSIZE;
310 outptr1[RGB_RED] = range_limit[
y + cred];
311 outptr1[RGB_GREEN] = range_limit[
y + cgreen];
312 outptr1[RGB_BLUE] = range_limit[
y + cblue];
313 outptr1 += RGB_PIXELSIZE;
315 outptr1[RGB_RED] = range_limit[
y + cred];
316 outptr1[RGB_GREEN] = range_limit[
y + cgreen];
317 outptr1[RGB_BLUE] = range_limit[
y + cblue];
318 outptr1 += RGB_PIXELSIZE;
321 if (cinfo->output_width & 1) {
328 outptr0[RGB_RED] = range_limit[
y + cred];
329 outptr0[RGB_GREEN] = range_limit[
y + cgreen];
330 outptr0[RGB_BLUE] = range_limit[
y + cblue];
332 outptr1[RGB_RED] = range_limit[
y + cred];
333 outptr1[RGB_GREEN] = range_limit[
y + cgreen];
334 outptr1[RGB_BLUE] = range_limit[
y + cblue];
359 upsample->
out_row_width = cinfo->output_width * cinfo->out_color_components;
361 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)
JSAMPARRAY JDIMENSION * out_row_ctr
JMETHOD(void, prepare_for_output_pass,(j_decompress_ptr cinfo))
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.
start_pass_merged_upsample(j_decompress_ptr cinfo)
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)
int JSAMPARRAY int int num_rows
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
JSAMPIMAGE JDIMENSION * in_row_group_ctr
JSAMPIMAGE JDIMENSION JDIMENSION in_row_groups_avail
JSAMPARRAY JDIMENSION JDIMENSION out_rows_avail