35 #define JPEG_INTERNALS
40 #ifdef DCT_IFAST_SUPPORTED
48 Sorry,
this code only copes with 8x8 DCTs.
76 #if BITS_IN_JSAMPLE == 8
92 #define FIX_1_082392200 ((INT32) 277)
93 #define FIX_1_414213562 ((INT32) 362)
94 #define FIX_1_847759065 ((INT32) 473)
95 #define FIX_2_613125930 ((INT32) 669)
97 #define FIX_1_082392200 FIX(1.082392200)
98 #define FIX_1_414213562 FIX(1.414213562)
99 #define FIX_1_847759065 FIX(1.847759065)
100 #define FIX_2_613125930 FIX(2.613125930)
109 #ifndef USE_ACCURATE_ROUNDING
111 #define DESCALE(x,n) RIGHT_SHIFT(x, n)
119 #define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS))
128 #if BITS_IN_JSAMPLE == 8
129 #define DEQUANTIZE(coef,quantval) (((IFAST_MULT_TYPE) (coef)) * (quantval))
131 #define DEQUANTIZE(coef,quantval) \
132 DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS)
140 #ifdef RIGHT_SHIFT_IS_UNSIGNED
141 #define ISHIFT_TEMPS DCTELEM ishift_temp;
142 #if BITS_IN_JSAMPLE == 8
143 #define DCTELEMBITS 16
145 #define DCTELEMBITS 32
147 #define IRIGHT_SHIFT(x,shft) \
148 ((ishift_temp = (x)) < 0 ? \
149 (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \
150 (ishift_temp >> (shft)))
153 #define IRIGHT_SHIFT(x,shft) ((x) >> (shft))
156 #ifdef USE_ACCURATE_ROUNDING
157 #define IDESCALE(x,n) ((int) IRIGHT_SHIFT((x) + (1 << ((n)-1)), n))
159 #define IDESCALE(x,n) ((int) IRIGHT_SHIFT(x, n))
172 DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
173 DCTELEM tmp10, tmp11, tmp12, tmp13;
174 DCTELEM z5, z10, z11, z12, z13;
235 tmp0 = tmp10 + tmp13;
236 tmp3 = tmp10 - tmp13;
237 tmp1 = tmp11 + tmp12;
238 tmp2 = tmp11 - tmp12;
282 for (ctr = 0; ctr <
DCTSIZE; ctr++) {
292 #ifndef NO_ZERO_ROW_TEST
293 if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 &&
294 wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
322 tmp0 = tmp10 + tmp13;
323 tmp3 = tmp10 - tmp13;
324 tmp1 = tmp11 + tmp12;
325 tmp2 = tmp11 - tmp12;