X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e19291405ff3995a32c965da9694f2f20aa02468..ad653fa23069c5d9378247084f03c9a718c3ad62:/src/jpeg/jidctint.c diff --git a/src/jpeg/jidctint.c b/src/jpeg/jidctint.c index a72b3207ca..2783c23027 100644 --- a/src/jpeg/jidctint.c +++ b/src/jpeg/jidctint.c @@ -90,18 +90,18 @@ */ #if CONST_BITS == 13 -#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ -#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ -#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ -#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ -#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ -#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ -#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ -#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ -#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ -#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ -#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ -#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ +#define FIX_0_298631336 ((JPEG_INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((JPEG_INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((JPEG_INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((JPEG_INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((JPEG_INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((JPEG_INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((JPEG_INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((JPEG_INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((JPEG_INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((JPEG_INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((JPEG_INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((JPEG_INT32) 25172) /* FIX(3.072711026) */ #else #define FIX_0_298631336 FIX(0.298631336) #define FIX_0_390180644 FIX(0.390180644) @@ -149,9 +149,9 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col) { - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3, z4, z5; + JPEG_INT32 tmp0, tmp1, tmp2, tmp3; + JPEG_INT32 tmp10, tmp11, tmp12, tmp13; + JPEG_INT32 z1, z2, z3, z4, z5; JCOEFPTR inptr; ISLOW_MULT_TYPE * quantptr; int * wsptr; @@ -288,7 +288,7 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { /* AC terms all zero */ - JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) + JSAMPLE dcval = range_limit[(int) DESCALE((JPEG_INT32) wsptr[0], PASS1_BITS+3) & RANGE_MASK]; outptr[0] = dcval; @@ -308,15 +308,15 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, /* Even part: reverse the even part of the forward DCT. */ /* The rotator is sqrt(2)*c(-6). */ - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[6]; + z2 = (JPEG_INT32) wsptr[2]; + z3 = (JPEG_INT32) wsptr[6]; z1 = MULTIPLY(z2 + z3, FIX_0_541196100); tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); - tmp0 = ((INT32) wsptr[0] + (INT32) wsptr[4]) << CONST_BITS; - tmp1 = ((INT32) wsptr[0] - (INT32) wsptr[4]) << CONST_BITS; + tmp0 = ((JPEG_INT32) wsptr[0] + (JPEG_INT32) wsptr[4]) << CONST_BITS; + tmp1 = ((JPEG_INT32) wsptr[0] - (JPEG_INT32) wsptr[4]) << CONST_BITS; tmp10 = tmp0 + tmp3; tmp13 = tmp0 - tmp3; @@ -327,10 +327,10 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. */ - tmp0 = (INT32) wsptr[7]; - tmp1 = (INT32) wsptr[5]; - tmp2 = (INT32) wsptr[3]; - tmp3 = (INT32) wsptr[1]; + tmp0 = (JPEG_INT32) wsptr[7]; + tmp1 = (JPEG_INT32) wsptr[5]; + tmp2 = (JPEG_INT32) wsptr[3]; + tmp3 = (JPEG_INT32) wsptr[1]; z1 = tmp0 + tmp3; z2 = tmp1 + tmp2;