33 #define JPEG_INTERNALS
38 #ifdef DCT_IFAST_SUPPORTED
46 Sorry,
this code only copes with 8x8 DCTs.
79 #define FIX_0_382683433 ((INT32) 98)
80 #define FIX_0_541196100 ((INT32) 139)
81 #define FIX_0_707106781 ((INT32) 181)
82 #define FIX_1_306562965 ((INT32) 334)
84 #define FIX_0_382683433 FIX(0.382683433)
85 #define FIX_0_541196100 FIX(0.541196100)
86 #define FIX_0_707106781 FIX(0.707106781)
87 #define FIX_1_306562965 FIX(1.306562965)
96 #ifndef USE_ACCURATE_ROUNDING
98 #define DESCALE(x,n) RIGHT_SHIFT(x, n)
106 #define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS))
116 DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
117 DCTELEM tmp10, tmp11, tmp12, tmp13;
118 DCTELEM z1, z2, z3, z4, z5, z11, z13;
126 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
127 tmp0 = dataptr[0] + dataptr[7];
128 tmp7 = dataptr[0] - dataptr[7];
129 tmp1 = dataptr[1] + dataptr[6];
130 tmp6 = dataptr[1] - dataptr[6];
131 tmp2 = dataptr[2] + dataptr[5];
132 tmp5 = dataptr[2] - dataptr[5];
133 tmp3 = dataptr[3] + dataptr[4];
134 tmp4 = dataptr[3] - dataptr[4];
143 dataptr[0] = tmp10 + tmp11;
144 dataptr[4] = tmp10 - tmp11;
146 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781);
147 dataptr[2] = tmp13 + z1;
148 dataptr[6] = tmp13 - z1;
157 z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433);
158 z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5;
159 z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5;
160 z3 = MULTIPLY(tmp11, FIX_0_707106781);
165 dataptr[5] = z13 + z2;
166 dataptr[3] = z13 - z2;
167 dataptr[1] = z11 + z4;
168 dataptr[7] = z11 - z4;
176 for (ctr =
DCTSIZE-1; ctr >= 0; ctr--) {
193 dataptr[
DCTSIZE*0] = tmp10 + tmp11;
194 dataptr[
DCTSIZE*4] = tmp10 - tmp11;
196 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781);
197 dataptr[
DCTSIZE*2] = tmp13 + z1;
198 dataptr[
DCTSIZE*6] = tmp13 - z1;
207 z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433);
208 z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5;
209 z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5;
210 z3 = MULTIPLY(tmp11, FIX_0_707106781);
GLsizei GLsizei GLenum GLenum const GLvoid * data