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;
207 wsptr[DCTSIZE*0] = dcval;
208 wsptr[DCTSIZE*1] = dcval;
209 wsptr[DCTSIZE*2] = dcval;
210 wsptr[DCTSIZE*3] = dcval;
211 wsptr[DCTSIZE*4] = dcval;
212 wsptr[DCTSIZE*5] = dcval;
213 wsptr[DCTSIZE*6] = dcval;
214 wsptr[DCTSIZE*7] = dcval;
225 tmp1 =
DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
226 tmp2 =
DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
227 tmp3 =
DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
235 tmp0 = tmp10 + tmp13;
236 tmp3 = tmp10 - tmp13;
237 tmp1 = tmp11 + tmp12;
238 tmp2 = tmp11 - tmp12;
242 tmp4 =
DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
243 tmp5 =
DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
244 tmp6 =
DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
245 tmp7 =
DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
263 wsptr[DCTSIZE*0] = (
int) (tmp0 + tmp7);
264 wsptr[DCTSIZE*7] = (
int) (tmp0 - tmp7);
265 wsptr[DCTSIZE*1] = (
int) (tmp1 + tmp6);
266 wsptr[DCTSIZE*6] = (
int) (tmp1 - tmp6);
267 wsptr[DCTSIZE*2] = (
int) (tmp2 + tmp5);
268 wsptr[DCTSIZE*5] = (
int) (tmp2 - tmp5);
269 wsptr[DCTSIZE*4] = (
int) (tmp3 + tmp4);
270 wsptr[DCTSIZE*3] = (
int) (tmp3 - tmp4);
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;
for(n=1;n< outline->n_points;n++)
#define IDCT_range_limit(cinfo)
jpeg_component_info JCOEFPTR coef_block
#define MULTIPLY(var, const)
jpeg_component_info * compptr
jpeg_component_info JCOEFPTR JSAMPARRAY JDIMENSION output_col
#define DEQUANTIZE(coef, quantval)
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
jpeg_idct_ifast(j_decompress_ptr cinfo, jpeg_component_info *compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)