4 * This file was part of the Independent JPEG Group's software:
5 * Copyright (C) 1994-1996, Thomas G. Lane.
6 * libjpeg-turbo Modifications:
7 * Copyright (C) 2020, D. R. Commander.
8 * For conditions of distribution and use, see the accompanying README.ijg
12 #define JPEG_INTERNALS
15 #ifdef UPSAMPLE_MERGING_SUPPORTED
18 /* Private subobject */
21 struct jpeg_upsampler pub; /* public fields */
23 /* Pointer to routine to do actual upsampling/conversion of one row group */
24 void (*upmethod) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
25 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
27 /* Private state for YCC->RGB conversion */
28 int *Cr_r_tab; /* => table for Cr to R conversion */
29 int *Cb_b_tab; /* => table for Cb to B conversion */
30 JLONG *Cr_g_tab; /* => table for Cr to G conversion */
31 JLONG *Cb_g_tab; /* => table for Cb to G conversion */
33 /* For 2:1 vertical sampling, we produce two output rows at a time.
34 * We need a "spare" row buffer to hold the second output row if the
35 * application provides just a one-row buffer; we also use the spare
36 * to discard the dummy last row if the image height is odd.
39 boolean spare_full; /* T if spare buffer is occupied */
41 JDIMENSION out_row_width; /* samples per output row */
42 JDIMENSION rows_to_go; /* counts rows remaining in image */
43 } my_merged_upsampler;
45 typedef my_merged_upsampler *my_merged_upsample_ptr;
47 #endif /* UPSAMPLE_MERGING_SUPPORTED */