70 #define EIGHT_BIT_SAMPLES
77 #define RIGHT_SHIFT(x, n) ((x) >> (n))
88 Sorry,
this code only copes with 8x8 DCTs.
128 #ifdef EIGHT_BIT_SAMPLES
134 #define ONE ((int32_t) 1)
136 #define CONST_SCALE (ONE << CONST_BITS)
145 #define FIX(x) ((int32_t) ((x) * CONST_SCALE + 0.5))
152 #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
165 #ifdef EIGHT_BIT_SAMPLES
166 #ifdef SHORTxSHORT_32
167 #define MULTIPLY(var,const) (((int16_t) (var)) * ((int16_t) (const)))
169 #ifdef SHORTxLCONST_32
170 #define MULTIPLY(var,const) (((int16_t) (var)) * ((int32_t) (const)))
175 #define MULTIPLY(var,const) ((var) * (const))
183 #define FIX_0_211164243 1730
184 #define FIX_0_275899380 2260
185 #define FIX_0_298631336 2446
186 #define FIX_0_390180644 3196
187 #define FIX_0_509795579 4176
188 #define FIX_0_541196100 4433
189 #define FIX_0_601344887 4926
190 #define FIX_0_765366865 6270
191 #define FIX_0_785694958 6436
192 #define FIX_0_899976223 7373
193 #define FIX_1_061594337 8697
194 #define FIX_1_111140466 9102
195 #define FIX_1_175875602 9633
196 #define FIX_1_306562965 10703
197 #define FIX_1_387039845 11363
198 #define FIX_1_451774981 11893
199 #define FIX_1_501321110 12299
200 #define FIX_1_662939225 13623
201 #define FIX_1_847759065 15137
202 #define FIX_1_961570560 16069
203 #define FIX_2_053119869 16819
204 #define FIX_2_172734803 17799
205 #define FIX_2_562915447 20995
206 #define FIX_3_072711026 25172
214 int32_t tmp0, tmp1, tmp2, tmp3;
215 int32_t tmp10, tmp11, tmp12, tmp13;
217 int32_t d0, d1, d2, d3, d4, d5, d6, d7;
218 register int16_t *dataptr;
227 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
237 register int *idataptr = (
int*)dataptr;
250 if ((d1 | d2 | d3 | d4 | d5 | d6 | d7) == 0) {
254 int16_t dcval = (int16_t) (d0 * (1 <<
PASS1_BITS));
255 register int v = (dcval & 0xffff) | ((dcval * (1 << 16)) & 0xffff0000);
571 tmp0 = tmp1 = tmp2 = tmp3 = 0;
596 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
917 tmp0 = tmp1 = tmp2 = tmp3 = 0;
952 int32_t tmp0, tmp1, tmp2, tmp3;
953 int32_t tmp10, tmp11, tmp12, tmp13;
956 register int16_t *dataptr;
967 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
977 register int *idataptr = (
int*)dataptr;
984 if ((d2 | d4 | d6) == 0) {
989 register int v = (dcval & 0xffff) | ((dcval << 16) & 0xffff0000);
1011 tmp10 = tmp0 + tmp3;
1012 tmp13 = tmp0 - tmp3;
1013 tmp11 = tmp1 + tmp2;
1014 tmp12 = tmp1 - tmp2;
1023 tmp10 = tmp0 + tmp3;
1024 tmp13 = tmp0 - tmp3;
1025 tmp11 = tmp1 + tmp2;
1026 tmp12 = tmp1 - tmp2;
1037 tmp10 = tmp0 + tmp3;
1038 tmp13 = tmp0 - tmp3;
1039 tmp11 = tmp1 + tmp2;
1040 tmp12 = tmp1 - tmp2;
1063 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
1089 tmp10 = tmp0 + tmp3;
1090 tmp13 = tmp0 - tmp3;
1091 tmp11 = tmp1 + tmp2;
1092 tmp12 = tmp1 - tmp2;
1101 tmp10 = tmp0 + tmp3;
1102 tmp13 = tmp0 - tmp3;
1103 tmp11 = tmp1 + tmp2;
1104 tmp12 = tmp1 - tmp2;
1115 tmp10 = tmp0 + tmp3;
1116 tmp13 = tmp0 - tmp3;
1117 tmp11 = tmp1 + tmp2;
1118 tmp12 = tmp1 - tmp2;
1138 int d00, d01, d10, d11;
1153 data[0] = (data[0] + 4)>>3;