68 #define BITS_IN_JSAMPLE BIT_DEPTH
70 #define RIGHT_SHIFT(x, n) ((x) >> (n))
71 #define MULTIPLY16C16(var,const) ((var)*(const))
72 #define DESCALE(x,n) RIGHT_SHIFT((int)(x) + (1 << ((n) - 1)), n)
80 #error "Sorry, this code only copes with 8x8 DCTs."
122 #if BITS_IN_JSAMPLE == 8
123 #define CONST_BITS 13
125 #define OUT_SHIFT PASS1_BITS
127 #define CONST_BITS 13
129 #define OUT_SHIFT (PASS1_BITS + 1)
140 #define FIX_0_298631336 ((int32_t) 2446)
141 #define FIX_0_390180644 ((int32_t) 3196)
142 #define FIX_0_541196100 ((int32_t) 4433)
143 #define FIX_0_765366865 ((int32_t) 6270)
144 #define FIX_0_899976223 ((int32_t) 7373)
145 #define FIX_1_175875602 ((int32_t) 9633)
146 #define FIX_1_501321110 ((int32_t) 12299)
147 #define FIX_1_847759065 ((int32_t) 15137)
148 #define FIX_1_961570560 ((int32_t) 16069)
149 #define FIX_2_053119869 ((int32_t) 16819)
150 #define FIX_2_562915447 ((int32_t) 20995)
151 #define FIX_3_072711026 ((int32_t) 25172)
153 #define FIX_0_298631336 FIX(0.298631336)
154 #define FIX_0_390180644 FIX(0.390180644)
155 #define FIX_0_541196100 FIX(0.541196100)
156 #define FIX_0_765366865 FIX(0.765366865)
157 #define FIX_0_899976223 FIX(0.899976223)
158 #define FIX_1_175875602 FIX(1.175875602)
159 #define FIX_1_501321110 FIX(1.501321110)
160 #define FIX_1_847759065 FIX(1.847759065)
161 #define FIX_1_961570560 FIX(1.961570560)
162 #define FIX_2_053119869 FIX(2.053119869)
163 #define FIX_2_562915447 FIX(2.562915447)
164 #define FIX_3_072711026 FIX(3.072711026)
175 #if BITS_IN_JSAMPLE == 8 && CONST_BITS<=13 && PASS1_BITS<=2
176 #define MULTIPLY(var,const) MULTIPLY16C16(var,const)
178 #define MULTIPLY(var,const) (int)((var) * (unsigned)(const))
184 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
185 int tmp10, tmp11, tmp12, tmp13;
186 unsigned z1, z2, z3, z4, z5;
195 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
196 tmp0 = dataptr[0] + dataptr[7];
197 tmp7 = dataptr[0] - dataptr[7];
198 tmp1 = dataptr[1] + dataptr[6];
199 tmp6 = dataptr[1] - dataptr[6];
200 tmp2 = dataptr[2] + dataptr[5];
201 tmp5 = dataptr[2] - dataptr[5];
202 tmp3 = dataptr[3] + dataptr[4];
203 tmp4 = dataptr[3] - dataptr[4];
214 dataptr[0] = (int16_t) ((tmp10 + tmp11) * (1 <<
PASS1_BITS));
215 dataptr[4] = (int16_t) ((tmp10 - tmp11) * (1 <<
PASS1_BITS));
262 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
263 int tmp10, tmp11, tmp12, tmp13;
264 unsigned z1, z2, z3, z4, z5;
276 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
344 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
345 int tmp10, tmp11, tmp12, tmp13;
358 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {