globally renamed INT32 to JPEG_INT32 to solve the [re]definition problems with cygwin/mingw32 headers which sometimes define INT32 and sometimes don't

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-05-26 11:49:37 +00:00
parent efe23391ab
commit 39c2d6bde1
24 changed files with 200 additions and 220 deletions

View File

@@ -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;