68 #define EIGHT_BIT_SAMPLES
75 #define RIGHT_SHIFT(x, n) ((x) >> (n))
86 Sorry,
this code only copes with 8x8 DCTs.
126 #ifdef EIGHT_BIT_SAMPLES
132 #define ONE ((int32_t) 1)
134 #define CONST_SCALE (ONE << CONST_BITS)
143 #define FIX(x) ((int32_t) ((x) * CONST_SCALE + 0.5))
150 #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
163 #ifdef EIGHT_BIT_SAMPLES
164 #ifdef SHORTxSHORT_32
165 #define MULTIPLY(var,const) (((int16_t) (var)) * ((int16_t) (const)))
167 #ifdef SHORTxLCONST_32
168 #define MULTIPLY(var,const) (((int16_t) (var)) * ((int32_t) (const)))
173 #define MULTIPLY(var,const) ((var) * (const))
181 #define FIX_0_211164243 1730
182 #define FIX_0_275899380 2260
183 #define FIX_0_298631336 2446
184 #define FIX_0_390180644 3196
185 #define FIX_0_509795579 4176
186 #define FIX_0_541196100 4433
187 #define FIX_0_601344887 4926
188 #define FIX_0_765366865 6270
189 #define FIX_0_785694958 6436
190 #define FIX_0_899976223 7373
191 #define FIX_1_061594337 8697
192 #define FIX_1_111140466 9102
193 #define FIX_1_175875602 9633
194 #define FIX_1_306562965 10703
195 #define FIX_1_387039845 11363
196 #define FIX_1_451774981 11893
197 #define FIX_1_501321110 12299
198 #define FIX_1_662939225 13623
199 #define FIX_1_847759065 15137
200 #define FIX_1_961570560 16069
201 #define FIX_2_053119869 16819
202 #define FIX_2_172734803 17799
203 #define FIX_2_562915447 20995
204 #define FIX_3_072711026 25172
212 int32_t tmp0, tmp1, tmp2, tmp3;
213 int32_t tmp10, tmp11, tmp12, tmp13;
215 int32_t d0, d1, d2, d3, d4, d5, d6, d7;
216 register int16_t *dataptr;
225 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
235 register int *idataptr = (
int*)dataptr;
248 if ((d1 | d2 | d3 | d4 | d5 | d6 | d7) == 0) {
252 int16_t dcval = (int16_t) (d0 * (1 <<
PASS1_BITS));
253 register int v = (dcval & 0xffff) | ((dcval * (1 << 16)) & 0xffff0000);
569 tmp0 = tmp1 = tmp2 = tmp3 = 0;
594 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
915 tmp0 = tmp1 = tmp2 = tmp3 = 0;
950 int32_t tmp0, tmp1, tmp2, tmp3;
951 int32_t tmp10, tmp11, tmp12, tmp13;
954 register int16_t *dataptr;
965 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
975 register int *idataptr = (
int*)dataptr;
982 if ((d2 | d4 | d6) == 0) {
987 register int v = (dcval & 0xffff) | ((dcval << 16) & 0xffff0000);
1009 tmp10 = tmp0 + tmp3;
1010 tmp13 = tmp0 - tmp3;
1011 tmp11 = tmp1 + tmp2;
1012 tmp12 = tmp1 - tmp2;
1021 tmp10 = tmp0 + tmp3;
1022 tmp13 = tmp0 - tmp3;
1023 tmp11 = tmp1 + tmp2;
1024 tmp12 = tmp1 - tmp2;
1035 tmp10 = tmp0 + tmp3;
1036 tmp13 = tmp0 - tmp3;
1037 tmp11 = tmp1 + tmp2;
1038 tmp12 = tmp1 - tmp2;
1061 for (rowctr =
DCTSIZE-1; rowctr >= 0; rowctr--) {
1087 tmp10 = tmp0 + tmp3;
1088 tmp13 = tmp0 - tmp3;
1089 tmp11 = tmp1 + tmp2;
1090 tmp12 = tmp1 - tmp2;
1099 tmp10 = tmp0 + tmp3;
1100 tmp13 = tmp0 - tmp3;
1101 tmp11 = tmp1 + tmp2;
1102 tmp12 = tmp1 - tmp2;
1113 tmp10 = tmp0 + tmp3;
1114 tmp13 = tmp0 - tmp3;
1115 tmp11 = tmp1 + tmp2;
1116 tmp12 = tmp1 - tmp2;
1136 int d00, d01, d10, d11;
1151 data[0] = (data[0] + 4)>>3;