X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/790ad94f70002941240d4877d1a4b7b1ef4c9aed..4d7e2cdad3ccf26cc5185eb30ef827b1c767e7c4:/src/jpeg/jdmerge.c diff --git a/src/jpeg/jdmerge.c b/src/jpeg/jdmerge.c index 2d29195505..55eab36217 100644 --- a/src/jpeg/jdmerge.c +++ b/src/jpeg/jdmerge.c @@ -52,8 +52,8 @@ typedef struct { /* Private state for YCC->RGB conversion */ int * Cr_r_tab; /* => table for Cr to R conversion */ int * Cb_b_tab; /* => table for Cb to B conversion */ - INT32 * Cr_g_tab; /* => table for Cr to G conversion */ - INT32 * Cb_g_tab; /* => table for Cb to G conversion */ + JPEG_INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + JPEG_INT32 * Cb_g_tab; /* => table for Cb to G conversion */ /* For 2:1 vertical sampling, we produce two output rows at a time. * We need a "spare" row buffer to hold the second output row if the @@ -61,7 +61,7 @@ typedef struct { * to discard the dummy last row if the image height is odd. */ JSAMPROW spare_row; - boolean spare_full; /* T if spare buffer is occupied */ + wxjpeg_boolean spare_full; /* T if spare buffer is occupied */ JDIMENSION out_row_width; /* samples per output row */ JDIMENSION rows_to_go; /* counts rows remaining in image */ @@ -70,8 +70,8 @@ typedef struct { typedef my_upsampler * my_upsample_ptr; #define SCALEBITS 16 /* speediest right-shift on some machines */ -#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) -#define FIX(x) ((INT32) ((x) * (1L<upsample; int i; - INT32 x; + JPEG_INT32 x; SHIFT_TEMPS upsample->Cr_r_tab = (int *) @@ -93,12 +93,12 @@ build_ycc_rgb_table (j_decompress_ptr cinfo) upsample->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - upsample->Cr_g_tab = (INT32 *) + upsample->Cr_g_tab = (JPEG_INT32 *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(INT32)); - upsample->Cb_g_tab = (INT32 *) + (MAXJSAMPLE+1) * SIZEOF(JPEG_INT32)); + upsample->Cb_g_tab = (JPEG_INT32 *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(INT32)); + (MAXJSAMPLE+1) * SIZEOF(JPEG_INT32)); for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ @@ -237,8 +237,8 @@ h2v1_merged_upsample (j_decompress_ptr cinfo, register JSAMPLE * range_limit = cinfo->sample_range_limit; int * Crrtab = upsample->Cr_r_tab; int * Cbbtab = upsample->Cb_b_tab; - INT32 * Crgtab = upsample->Cr_g_tab; - INT32 * Cbgtab = upsample->Cb_g_tab; + JPEG_INT32 * Crgtab = upsample->Cr_g_tab; + JPEG_INT32 * Cbgtab = upsample->Cb_g_tab; SHIFT_TEMPS inptr0 = input_buf[0][in_row_group_ctr]; @@ -298,8 +298,8 @@ h2v2_merged_upsample (j_decompress_ptr cinfo, register JSAMPLE * range_limit = cinfo->sample_range_limit; int * Crrtab = upsample->Cr_r_tab; int * Cbbtab = upsample->Cb_b_tab; - INT32 * Crgtab = upsample->Cr_g_tab; - INT32 * Cbgtab = upsample->Cb_g_tab; + JPEG_INT32 * Crgtab = upsample->Cr_g_tab; + JPEG_INT32 * Cbgtab = upsample->Cb_g_tab; SHIFT_TEMPS inptr00 = input_buf[0][in_row_group_ctr*2];