73 #define EIGHT_BIT_SAMPLES
80 #define RIGHT_SHIFT(x, n) ((x) >> (n))
91 Sorry,
this code only copes with 8x8 DCTs.
131 #ifdef EIGHT_BIT_SAMPLES
137 #define ONE ((int32_t) 1)
139 #define CONST_SCALE (ONE << CONST_BITS)
148 #define FIX(x) ((int32_t) ((x) * CONST_SCALE + 0.5))
155 #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
168 #ifdef EIGHT_BIT_SAMPLES
169 #ifdef SHORTxSHORT_32
170 #define MULTIPLY(var,const) (((int16_t) (var)) * ((int16_t) (const)))
172 #ifdef SHORTxLCONST_32
173 #define MULTIPLY(var,const) (((int16_t) (var)) * ((int32_t) (const)))
178 #define MULTIPLY(var,const) ((var) * (const))
186 #define FIX_0_211164243 1730
187 #define FIX_0_275899380 2260
188 #define FIX_0_298631336 2446
189 #define FIX_0_390180644 3196
190 #define FIX_0_509795579 4176
191 #define FIX_0_541196100 4433
192 #define FIX_0_601344887 4926
193 #define FIX_0_765366865 6270
194 #define FIX_0_785694958 6436
195 #define FIX_0_899976223 7373
196 #define FIX_1_061594337 8697
197 #define FIX_1_111140466 9102
198 #define FIX_1_175875602 9633
199 #define FIX_1_306562965 10703
200 #define FIX_1_387039845 11363
201 #define FIX_1_451774981 11893
202 #define FIX_1_501321110 12299
203 #define FIX_1_662939225 13623
204 #define FIX_1_847759065 15137
205 #define FIX_1_961570560 16069
206 #define FIX_2_053119869 16819
207 #define FIX_2_172734803 17799
208 #define FIX_2_562915447 20995
209 #define FIX_3_072711026 25172
217 int32_t tmp0, tmp1, tmp2, tmp3;
218 int32_t tmp10, tmp11, tmp12, tmp13;
220 int32_t d0, d1, d2, d3, d4, d5, d6, d7;
221 register int16_t *dataptr;
230 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
240 register uint8_t *idataptr = (uint8_t*)dataptr;
253 if ((d1 | d2 | d3 | d4 | d5 | d6 | d7) == 0) {
257 int16_t dcval = (int16_t) (d0 * (1 <<
PASS1_BITS));
258 register unsigned v = (dcval & 0xffff) | ((uint32_t)dcval << 16);
574 tmp0 = tmp1 = tmp2 = tmp3 = 0;
599 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
920 tmp0 = tmp1 = tmp2 = tmp3 = 0;
955 int32_t tmp0, tmp1, tmp2, tmp3;
956 int32_t tmp10, tmp11, tmp12, tmp13;
959 register int16_t *dataptr;
970 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
980 register uint8_t *idataptr = (uint8_t*)dataptr;
987 if ((d2 | d4 | d6) == 0) {
991 int16_t dcval = (int16_t) (d0 * (1 <<
PASS1_BITS));
992 register unsigned v = (dcval & 0xffff) | ((uint32_t)dcval << 16);
1014 tmp10 = tmp0 + tmp3;
1015 tmp13 = tmp0 - tmp3;
1016 tmp11 = tmp1 + tmp2;
1017 tmp12 = tmp1 - tmp2;
1026 tmp10 = tmp0 + tmp3;
1027 tmp13 = tmp0 - tmp3;
1028 tmp11 = tmp1 + tmp2;
1029 tmp12 = tmp1 - tmp2;
1040 tmp10 = tmp0 + tmp3;
1041 tmp13 = tmp0 - tmp3;
1042 tmp11 = tmp1 + tmp2;
1043 tmp12 = tmp1 - tmp2;
1046 tmp10 = tmp13 = (d0 + d4) * (1 <<
CONST_BITS);
1047 tmp11 = tmp12 = (d0 - d4) * (1 <<
CONST_BITS);
1066 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
1092 tmp10 = tmp0 + tmp3;
1093 tmp13 = tmp0 - tmp3;
1094 tmp11 = tmp1 + tmp2;
1095 tmp12 = tmp1 - tmp2;
1104 tmp10 = tmp0 + tmp3;
1105 tmp13 = tmp0 - tmp3;
1106 tmp11 = tmp1 + tmp2;
1107 tmp12 = tmp1 - tmp2;
1118 tmp10 = tmp0 + tmp3;
1119 tmp13 = tmp0 - tmp3;
1120 tmp11 = tmp1 + tmp2;
1121 tmp12 = tmp1 - tmp2;
1124 tmp10 = tmp13 = (d0 + d4) * (1 <<
CONST_BITS);
1125 tmp11 = tmp12 = (d0 - d4) * (1 <<
CONST_BITS);
1141 int d00, d01, d10, d11;