40#ifdef UPSAMPLE_MERGING_SUPPORTED
80#define ONE_HALF ((INT32) 1 << (SCALEBITS-1))
81#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
98 upsample->Cr_r_tab = (
int *) (*cinfo->mem->alloc_small)
100 upsample->Cb_b_tab = (
int *) (*cinfo->mem->alloc_small)
102 upsample->Cr_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
104 upsample->Cb_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
115 upsample->Cr_g_tab[
i] = (-
FIX(0.714136286)) *
x;
132 upsample->Cr_r_tab = (
int *) (*cinfo->mem->alloc_small)
134 upsample->Cb_b_tab = (
int *) (*cinfo->mem->alloc_small)
136 upsample->Cr_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
138 upsample->Cb_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
149 upsample->Cr_g_tab[
i] = (-
FIX(1.428272572)) *
x;
167 upsample->spare_full =
FALSE;
191 if (upsample->spare_full) {
194 1, upsample->out_row_width);
196 upsample->spare_full =
FALSE;
204 out_rows_avail -= *out_row_ctr;
212 work_ptrs[1] = upsample->spare_row;
213 upsample->spare_full =
TRUE;
216 (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs);
223 if (! upsample->spare_full)
224 (*in_row_group_ctr)++;
239 (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr,
243 (*in_row_group_ctr)++;
267 register int y, cred, cgreen, cblue;
274 int * Crrtab = upsample->Cr_r_tab;
275 int * Cbbtab = upsample->Cb_b_tab;
276 INT32 * Crgtab = upsample->Cr_g_tab;
277 INT32 * Cbgtab = upsample->Cb_g_tab;
280 inptr0 = input_buf[0][in_row_group_ctr];
281 inptr1 = input_buf[1][in_row_group_ctr];
282 inptr2 = input_buf[2][in_row_group_ctr];
294 outptr[RGB_RED] = range_limit[
y + cred];
295 outptr[RGB_GREEN] = range_limit[
y + cgreen];
296 outptr[RGB_BLUE] = range_limit[
y + cblue];
297 outptr += RGB_PIXELSIZE;
299 outptr[RGB_RED] = range_limit[
y + cred];
300 outptr[RGB_GREEN] = range_limit[
y + cgreen];
301 outptr[RGB_BLUE] = range_limit[
y + cblue];
302 outptr += RGB_PIXELSIZE;
312 outptr[RGB_RED] = range_limit[
y + cred];
313 outptr[RGB_GREEN] = range_limit[
y + cgreen];
314 outptr[RGB_BLUE] = range_limit[
y + cblue];
329 register int y, cred, cgreen, cblue;
332 JSAMPROW inptr00, inptr01, inptr1, inptr2;
336 int * Crrtab = upsample->Cr_r_tab;
337 int * Cbbtab = upsample->Cb_b_tab;
338 INT32 * Crgtab = upsample->Cr_g_tab;
339 INT32 * Cbgtab = upsample->Cb_g_tab;
342 inptr00 = input_buf[0][in_row_group_ctr*2];
343 inptr01 = input_buf[0][in_row_group_ctr*2 + 1];
344 inptr1 = input_buf[1][in_row_group_ctr];
345 inptr2 = input_buf[2][in_row_group_ctr];
358 outptr0[RGB_RED] = range_limit[
y + cred];
359 outptr0[RGB_GREEN] = range_limit[
y + cgreen];
360 outptr0[RGB_BLUE] = range_limit[
y + cblue];
361 outptr0 += RGB_PIXELSIZE;
363 outptr0[RGB_RED] = range_limit[
y + cred];
364 outptr0[RGB_GREEN] = range_limit[
y + cgreen];
365 outptr0[RGB_BLUE] = range_limit[
y + cblue];
366 outptr0 += RGB_PIXELSIZE;
368 outptr1[RGB_RED] = range_limit[
y + cred];
369 outptr1[RGB_GREEN] = range_limit[
y + cgreen];
370 outptr1[RGB_BLUE] = range_limit[
y + cblue];
371 outptr1 += RGB_PIXELSIZE;
373 outptr1[RGB_RED] = range_limit[
y + cred];
374 outptr1[RGB_GREEN] = range_limit[
y + cgreen];
375 outptr1[RGB_BLUE] = range_limit[
y + cblue];
376 outptr1 += RGB_PIXELSIZE;
386 outptr0[RGB_RED] = range_limit[
y + cred];
387 outptr0[RGB_GREEN] = range_limit[
y + cgreen];
388 outptr0[RGB_BLUE] = range_limit[
y + cblue];
390 outptr1[RGB_RED] = range_limit[
y + cred];
391 outptr1[RGB_GREEN] = range_limit[
y + cgreen];
392 outptr1[RGB_BLUE] = range_limit[
y + cblue];
413 upsample->
pub.start_pass = start_pass_merged_upsample;
414 upsample->
pub.need_context_rows =
FALSE;
419 upsample->
pub.upsample = merged_2v_upsample;
420 upsample->upmethod = h2v2_merged_upsample;
422 upsample->spare_row = (
JSAMPROW) (*cinfo->mem->alloc_large)
426 upsample->
pub.upsample = merged_1v_upsample;
427 upsample->upmethod = h2v1_merged_upsample;
429 upsample->spare_row =
NULL;
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
build_ycc_rgb_table(j_decompress_ptr cinfo)
build_bg_ycc_rgb_table(j_decompress_ptr cinfo)
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
my_upsampler * my_upsample_ptr
#define JMETHOD(type, methodname, arglist)
#define GETJSAMPLE(value)
int JSAMPARRAY int int num_rows
#define RIGHT_SHIFT(x, shft)
struct jpeg_common_struct * j_common_ptr
jcopy_sample_rows(JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)
static HMODULE MODULEINFO DWORD cb
JSAMPLE * sample_range_limit
struct jpeg_upsampler * upsample
J_COLOR_SPACE jpeg_color_space
struct jpeg_upsampler pub