75 #define RIGHT_SHIFT(x, n) ((x) >> (n))
82 Sorry,
this code only copes with 8x8 DCTs.
115 #define FIX_0_382683433 ((int32_t) 98)
116 #define FIX_0_541196100 ((int32_t) 139)
117 #define FIX_0_707106781 ((int32_t) 181)
118 #define FIX_1_306562965 ((int32_t) 334)
120 #define FIX_0_382683433 FIX(0.382683433)
121 #define FIX_0_541196100 FIX(0.541196100)
122 #define FIX_0_707106781 FIX(0.707106781)
123 #define FIX_1_306562965 FIX(1.306562965)
132 #ifndef USE_ACCURATE_ROUNDING
134 #define DESCALE(x,n) RIGHT_SHIFT(x, n)
142 #define MULTIPLY(var,const) ((int16_t) DESCALE((var) * (const), CONST_BITS))
145 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
146 int tmp10, tmp11, tmp12, tmp13;
147 int z1, z2, z3, z4, z5, z11, z13;
154 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
155 tmp0 = dataptr[0] + dataptr[7];
156 tmp7 = dataptr[0] - dataptr[7];
157 tmp1 = dataptr[1] + dataptr[6];
158 tmp6 = dataptr[1] - dataptr[6];
159 tmp2 = dataptr[2] + dataptr[5];
160 tmp5 = dataptr[2] - dataptr[5];
161 tmp3 = dataptr[3] + dataptr[4];
162 tmp4 = dataptr[3] - dataptr[4];
171 dataptr[0] = tmp10 + tmp11;
172 dataptr[4] = tmp10 - tmp11;
175 dataptr[2] = tmp13 + z1;
176 dataptr[6] = tmp13 - z1;
193 dataptr[5] = z13 + z2;
194 dataptr[3] = z13 - z2;
195 dataptr[1] = z11 + z4;
196 dataptr[7] = z11 - z4;
209 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
210 int tmp10, tmp11, tmp12, tmp13;
211 int z1, z2, z3, z4, z5, z11, z13;
220 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
237 dataptr[
DCTSIZE*0] = tmp10 + tmp11;
238 dataptr[
DCTSIZE*4] = tmp10 - tmp11;
241 dataptr[
DCTSIZE*2] = tmp13 + z1;
242 dataptr[
DCTSIZE*6] = tmp13 - z1;
275 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
276 int tmp10, tmp11, tmp12, tmp13;
286 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
303 dataptr[
DCTSIZE*0] = tmp10 + tmp11;
304 dataptr[
DCTSIZE*4] = tmp10 - tmp11;
307 dataptr[
DCTSIZE*2] = tmp13 + z1;
308 dataptr[
DCTSIZE*6] = tmp13 - z1;
315 dataptr[
DCTSIZE*1] = tmp10 + tmp11;
316 dataptr[
DCTSIZE*5] = tmp10 - tmp11;
319 dataptr[
DCTSIZE*3] = tmp13 + z1;
320 dataptr[
DCTSIZE*7] = tmp13 - z1;
330 #undef FIX_0_541196100
331 #undef FIX_1_306562965