68 #define BITS_IN_JSAMPLE BIT_DEPTH
70 #define RIGHT_SHIFT(x, n) ((x) >> (n))
71 #define MULTIPLY16C16(var,const) ((var)*(const))
73 #if 1 //def USE_ACCURATE_ROUNDING
74 #define DESCALE(x,n) RIGHT_SHIFT((x) + (1 << ((n) - 1)), n)
76 #define DESCALE(x,n) RIGHT_SHIFT(x, n)
85 #error "Sorry, this code only copes with 8x8 DCTs."
127 #if BITS_IN_JSAMPLE == 8
128 #define CONST_BITS 13
130 #define OUT_SHIFT PASS1_BITS
132 #define CONST_BITS 13
134 #define OUT_SHIFT (PASS1_BITS + 1)
145 #define FIX_0_298631336 ((int32_t) 2446)
146 #define FIX_0_390180644 ((int32_t) 3196)
147 #define FIX_0_541196100 ((int32_t) 4433)
148 #define FIX_0_765366865 ((int32_t) 6270)
149 #define FIX_0_899976223 ((int32_t) 7373)
150 #define FIX_1_175875602 ((int32_t) 9633)
151 #define FIX_1_501321110 ((int32_t) 12299)
152 #define FIX_1_847759065 ((int32_t) 15137)
153 #define FIX_1_961570560 ((int32_t) 16069)
154 #define FIX_2_053119869 ((int32_t) 16819)
155 #define FIX_2_562915447 ((int32_t) 20995)
156 #define FIX_3_072711026 ((int32_t) 25172)
158 #define FIX_0_298631336 FIX(0.298631336)
159 #define FIX_0_390180644 FIX(0.390180644)
160 #define FIX_0_541196100 FIX(0.541196100)
161 #define FIX_0_765366865 FIX(0.765366865)
162 #define FIX_0_899976223 FIX(0.899976223)
163 #define FIX_1_175875602 FIX(1.175875602)
164 #define FIX_1_501321110 FIX(1.501321110)
165 #define FIX_1_847759065 FIX(1.847759065)
166 #define FIX_1_961570560 FIX(1.961570560)
167 #define FIX_2_053119869 FIX(2.053119869)
168 #define FIX_2_562915447 FIX(2.562915447)
169 #define FIX_3_072711026 FIX(3.072711026)
180 #if BITS_IN_JSAMPLE == 8 && CONST_BITS<=13 && PASS1_BITS<=2
181 #define MULTIPLY(var,const) MULTIPLY16C16(var,const)
183 #define MULTIPLY(var,const) ((var) * (const))
189 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
190 int tmp10, tmp11, tmp12, tmp13;
191 int z1, z2, z3, z4, z5;
200 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
201 tmp0 = dataptr[0] + dataptr[7];
202 tmp7 = dataptr[0] - dataptr[7];
203 tmp1 = dataptr[1] + dataptr[6];
204 tmp6 = dataptr[1] - dataptr[6];
205 tmp2 = dataptr[2] + dataptr[5];
206 tmp5 = dataptr[2] - dataptr[5];
207 tmp3 = dataptr[3] + dataptr[4];
208 tmp4 = dataptr[3] - dataptr[4];
219 dataptr[0] = (int16_t) ((tmp10 + tmp11) <<
PASS1_BITS);
220 dataptr[4] = (int16_t) ((tmp10 - tmp11) <<
PASS1_BITS);
267 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
268 int tmp10, tmp11, tmp12, tmp13;
269 int z1, z2, z3, z4, z5;
281 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
349 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
350 int tmp10, tmp11, tmp12, tmp13;
363 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {