* jidctint.c
*
* Copyright (C) 1991-1998, Thomas G. Lane.
- * Modification developed 2002-2013 by Guido Vollbeding.
+ * Modification developed 2002-2015 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* The rotator is c(-6).
*/
- z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
- z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
-
- z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */
- tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
- tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
-
z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
z2 <<= CONST_BITS;
tmp0 = z2 + z3;
tmp1 = z2 - z3;
+ z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */
+ tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
+ tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
+
tmp10 = tmp0 + tmp2;
tmp13 = tmp0 - tmp2;
tmp11 = tmp1 + tmp3;
wsptr = workspace;
for (ctr = 0; ctr < DCTSIZE; ctr++) {
outptr = output_buf[ctr] + output_col;
+
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z2 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
+
/* Rows of zeroes can be exploited in the same way as we did with columns.
* However, the column calculation has created many nonzero AC terms, so
* the simplification applies less often (typically 5% to 10% of the time).
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) RIGHT_SHIFT(z2, PASS1_BITS+3)
& RANGE_MASK];
outptr[0] = dcval;
* The rotator is c(-6).
*/
+ z3 = (INT32) wsptr[4];
+
+ tmp0 = (z2 + z3) << CONST_BITS;
+ tmp1 = (z2 - z3) << CONST_BITS;
+
z2 = (INT32) wsptr[2];
z3 = (INT32) wsptr[6];
tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
- /* Add fudge factor here for final descale. */
- z2 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
- z3 = (INT32) wsptr[4];
-
- tmp0 = (z2 + z3) << CONST_BITS;
- tmp1 = (z2 - z3) << CONST_BITS;
-
tmp10 = tmp0 + tmp2;
tmp13 = tmp0 - tmp2;
tmp11 = tmp1 + tmp3;
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp13 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp13 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp13 <<= CONST_BITS;
z1 = (INT32) wsptr[2];
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp0 <<= CONST_BITS;
tmp2 = (INT32) wsptr[4];
tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp12 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp12 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp12 <<= CONST_BITS;
tmp0 = (INT32) wsptr[2];
tmp1 = (INT32) wsptr[4];
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp2 = (INT32) wsptr[2];
tmp10 = (tmp0 + tmp2) << CONST_BITS;
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp0 <<= CONST_BITS;
tmp2 = (INT32) wsptr[2];
tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */
JCOEFPTR coef_block,
JSAMPARRAY output_buf, JDIMENSION output_col)
{
- INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+ DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
ISLOW_MULT_TYPE * quantptr;
JSAMPROW outptr;
JSAMPLE *range_limit = IDCT_range_limit(cinfo);
- SHIFT_TEMPS
+ ISHIFT_TEMPS
/* Pass 1: process columns from input. */
/* Column 0 */
tmp4 = DEQUANTIZE(coef_block[DCTSIZE*0], quantptr[DCTSIZE*0]);
tmp5 = DEQUANTIZE(coef_block[DCTSIZE*1], quantptr[DCTSIZE*1]);
- /* Add fudge factor here for final descale. */
- tmp4 += ONE << 2;
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp4 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2);
tmp0 = tmp4 + tmp5;
tmp2 = tmp4 - tmp5;
/* Row 0 */
outptr = output_buf[0] + output_col;
- outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK];
- outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK];
+ outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK];
+ outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK];
/* Row 1 */
outptr = output_buf[1] + output_col;
- outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp2 + tmp3, 3) & RANGE_MASK];
- outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp2 - tmp3, 3) & RANGE_MASK];
+ outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp2 + tmp3, 3) & RANGE_MASK];
+ outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp2 - tmp3, 3) & RANGE_MASK];
}
JCOEFPTR coef_block,
JSAMPARRAY output_buf, JDIMENSION output_col)
{
- int dcval;
+ DCTELEM dcval;
ISLOW_MULT_TYPE * quantptr;
JSAMPLE *range_limit = IDCT_range_limit(cinfo);
- SHIFT_TEMPS
+ ISHIFT_TEMPS
/* 1x1 is trivial: just take the DC coefficient divided by 8. */
+
quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+
dcval = DEQUANTIZE(coef_block[0], quantptr[0]);
- dcval = (int) DESCALE((INT32) dcval, 3);
+ /* Add range center and fudge factor for descale and range-limit. */
+ dcval += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2);
- output_buf[0][output_col] = range_limit[dcval & RANGE_MASK];
+ output_buf[0][output_col] =
+ range_limit[(int) IRIGHT_SHIFT(dcval, 3) & RANGE_MASK];
}
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp0 <<= CONST_BITS;
z1 = (INT32) wsptr[2];
/* Even part */
- /* Add fudge factor here for final descale. */
- z3 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z3 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
z3 <<= CONST_BITS;
z4 = (INT32) wsptr[4];
z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp10 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp10 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp10 <<= CONST_BITS;
z1 = (INT32) wsptr[2];
/* Even part */
- /* Add fudge factor here for final descale. */
- z3 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z3 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
z3 <<= CONST_BITS;
z4 = (INT32) wsptr[4];
/* Even part */
- /* Add fudge factor here for final descale. */
- z1 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z1 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
z1 <<= CONST_BITS;
z2 = (INT32) wsptr[2];
/* Even part */
- /* Add fudge factor here for final descale. */
- z1 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z1 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
z1 <<= CONST_BITS;
z4 = (INT32) wsptr[4];
z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */
/* Even part */
- /* Add fudge factor here for final descale. */
- z1 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z1 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
z1 <<= CONST_BITS;
z2 = (INT32) wsptr[2];
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp0 <<= CONST_BITS;
z1 = (INT32) wsptr[4];
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp0 <<= CONST_BITS;
z1 = (INT32) wsptr[4];
/* Even part */
- /* Add fudge factor here for final descale. */
- z1 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z1 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
z1 <<= CONST_BITS;
z4 = (INT32) wsptr[4];
z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */
/* Even part */
- /* Add fudge factor here for final descale. */
- z3 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z3 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
z3 <<= CONST_BITS;
z4 = (INT32) wsptr[4];
/* Even part */
- /* Add fudge factor here for final descale. */
- z3 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z3 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
z3 <<= CONST_BITS;
z4 = (INT32) wsptr[4];
z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */
* The rotator is c(-6).
*/
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z2 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
+ z3 = (INT32) wsptr[4];
+
+ tmp0 = (z2 + z3) << CONST_BITS;
+ tmp1 = (z2 - z3) << CONST_BITS;
+
z2 = (INT32) wsptr[2];
z3 = (INT32) wsptr[6];
tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
- /* Add fudge factor here for final descale. */
- z2 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
- z3 = (INT32) wsptr[4];
-
- tmp0 = (z2 + z3) << CONST_BITS;
- tmp1 = (z2 - z3) << CONST_BITS;
-
tmp10 = tmp0 + tmp2;
tmp13 = tmp0 - tmp2;
tmp11 = tmp1 + tmp3;
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp0 <<= CONST_BITS;
tmp2 = (INT32) wsptr[4];
tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = wsptr[0] + (ONE << 2);
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = wsptr[0] + ((((INT32) RANGE_CENTER) << 3) + (ONE << 2));
tmp2 = wsptr[2];
tmp10 = (tmp0 + tmp2) << CONST_BITS;
JCOEFPTR coef_block,
JSAMPARRAY output_buf, JDIMENSION output_col)
{
- INT32 tmp0, tmp1;
+ DCTELEM tmp0, tmp1;
ISLOW_MULT_TYPE * quantptr;
JSAMPROW outptr;
JSAMPLE *range_limit = IDCT_range_limit(cinfo);
- SHIFT_TEMPS
+ ISHIFT_TEMPS
/* Pass 1: empty. */
/* Even part */
tmp0 = DEQUANTIZE(coef_block[0], quantptr[0]);
- /* Add fudge factor here for final descale. */
- tmp0 += ONE << 2;
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2);
/* Odd part */
/* Final output stage */
- outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK];
- outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK];
+ outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK];
+ outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK];
}
* The rotator is c(-6).
*/
+ /* Add range center and fudge factor for final descale and range-limit. */
+ z2 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
+ z3 = (INT32) wsptr[4];
+
+ tmp0 = (z2 + z3) << CONST_BITS;
+ tmp1 = (z2 - z3) << CONST_BITS;
+
z2 = (INT32) wsptr[2];
z3 = (INT32) wsptr[6];
tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
- /* Add fudge factor here for final descale. */
- z2 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
- z3 = (INT32) wsptr[4];
-
- tmp0 = (z2 + z3) << CONST_BITS;
- tmp1 = (z2 - z3) << CONST_BITS;
-
tmp10 = tmp0 + tmp2;
tmp13 = tmp0 - tmp2;
tmp11 = tmp1 + tmp3;
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp23 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp23 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp23 <<= CONST_BITS;
z1 = (INT32) wsptr[2];
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp10 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp10 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp10 <<= CONST_BITS;
tmp12 = (INT32) wsptr[4];
tmp20 = MULTIPLY(tmp12, FIX(0.707106781)); /* c4 */
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp12 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp12 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp12 <<= CONST_BITS;
tmp13 = (INT32) wsptr[2];
tmp14 = (INT32) wsptr[4];
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp2 = (INT32) wsptr[2];
tmp10 = (tmp0 + tmp2) << CONST_BITS;
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 = (INT32) wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) +
+ (ONE << (PASS1_BITS+2)));
tmp0 <<= CONST_BITS;
tmp2 = (INT32) wsptr[2];
tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */
/* Even part */
- /* Add fudge factor here for final descale. */
- tmp10 = wsptr[0] + (ONE << (CONST_BITS+2));
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp10 = wsptr[0] +
+ ((((INT32) RANGE_CENTER) << (CONST_BITS+3)) +
+ (ONE << (CONST_BITS+2)));
/* Odd part */
JCOEFPTR coef_block,
JSAMPARRAY output_buf, JDIMENSION output_col)
{
- INT32 tmp0, tmp1;
+ DCTELEM tmp0, tmp1;
ISLOW_MULT_TYPE * quantptr;
JSAMPLE *range_limit = IDCT_range_limit(cinfo);
- SHIFT_TEMPS
+ ISHIFT_TEMPS
/* Process 1 column from input, store into output array. */
quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
/* Even part */
-
+
tmp0 = DEQUANTIZE(coef_block[DCTSIZE*0], quantptr[DCTSIZE*0]);
- /* Add fudge factor here for final descale. */
- tmp0 += ONE << 2;
+ /* Add range center and fudge factor for final descale and range-limit. */
+ tmp0 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2);
/* Odd part */
/* Final output stage */
- output_buf[0][output_col] = range_limit[(int) RIGHT_SHIFT(tmp0 + tmp1, 3)
- & RANGE_MASK];
- output_buf[1][output_col] = range_limit[(int) RIGHT_SHIFT(tmp0 - tmp1, 3)
- & RANGE_MASK];
+ output_buf[0][output_col] =
+ range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK];
+ output_buf[1][output_col] =
+ range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK];
}
#endif /* IDCT_SCALING_SUPPORTED */