Statistics
| Branch: | Revision:

ffmpeg / libavcodec / dct-test.c @ 71160c55

History | View | Annotate | Download (14.2 KB)

1 983e3246 Michael Niedermayer
/**
2
 * @file dct-test.c
3 115329f1 Diego Biurrun
 * DCT test. (c) 2001 Fabrice Bellard.
4 983e3246 Michael Niedermayer
 * Started from sample code by Juan J. Sierralta P.
5
 */
6
7 de6d9b64 Fabrice Bellard
#include <stdlib.h>
8
#include <stdio.h>
9
#include <string.h>
10
#include <sys/time.h>
11
#include <unistd.h>
12
13
#include "dsputil.h"
14
15 9e1586fc Fabrice Bellard
#include "i386/mmx.h"
16 86748dbc Michael Niedermayer
#include "simple_idct.h"
17 65e4c8c9 Michael Niedermayer
#include "faandct.h"
18 9e1586fc Fabrice Bellard
19 e366e679 Fabrice Bellard
#ifndef MAX
20
#define MAX(a, b)  (((a) > (b)) ? (a) : (b))
21
#endif
22
23 434df899 Michael Niedermayer
#undef printf
24
25
void *fast_memcpy(void *a, const void *b, size_t c){return memcpy(a,b,c);};
26
27 9e1586fc Fabrice Bellard
/* reference fdct/idct */
28 de6d9b64 Fabrice Bellard
extern void fdct(DCTELEM *block);
29 9e1586fc Fabrice Bellard
extern void idct(DCTELEM *block);
30 434df899 Michael Niedermayer
extern void ff_idct_xvid_mmx(DCTELEM *block);
31
extern void ff_idct_xvid_mmx2(DCTELEM *block);
32 de6d9b64 Fabrice Bellard
extern void init_fdct();
33
34 9e1586fc Fabrice Bellard
extern void j_rev_dct(DCTELEM *data);
35
extern void ff_mmx_idct(DCTELEM *data);
36
extern void ff_mmxext_idct(DCTELEM *data);
37
38 86748dbc Michael Niedermayer
extern void odivx_idct_c (short *block);
39
40 de6d9b64 Fabrice Bellard
#define AANSCALE_BITS 12
41
static const unsigned short aanscales[64] = {
42
    /* precomputed values scaled up by 14 bits */
43
    16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
44
    22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,
45
    21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,
46
    19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,
47
    16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
48
    12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,
49
    8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,
50
    4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247
51
};
52
53 0c1a9eda Zdenek Kabelac
uint8_t cropTbl[256 + 2 * MAX_NEG_CROP];
54 86748dbc Michael Niedermayer
55 0c1a9eda Zdenek Kabelac
int64_t gettime(void)
56 de6d9b64 Fabrice Bellard
{
57
    struct timeval tv;
58
    gettimeofday(&tv,NULL);
59 0c1a9eda Zdenek Kabelac
    return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
60 de6d9b64 Fabrice Bellard
}
61
62
#define NB_ITS 20000
63
#define NB_ITS_SPEED 50000
64
65 9e1586fc Fabrice Bellard
static short idct_mmx_perm[64];
66
67 86748dbc Michael Niedermayer
static short idct_simple_mmx_perm[64]={
68 115329f1 Diego Biurrun
        0x00, 0x08, 0x04, 0x09, 0x01, 0x0C, 0x05, 0x0D,
69
        0x10, 0x18, 0x14, 0x19, 0x11, 0x1C, 0x15, 0x1D,
70
        0x20, 0x28, 0x24, 0x29, 0x21, 0x2C, 0x25, 0x2D,
71
        0x12, 0x1A, 0x16, 0x1B, 0x13, 0x1E, 0x17, 0x1F,
72
        0x02, 0x0A, 0x06, 0x0B, 0x03, 0x0E, 0x07, 0x0F,
73
        0x30, 0x38, 0x34, 0x39, 0x31, 0x3C, 0x35, 0x3D,
74
        0x22, 0x2A, 0x26, 0x2B, 0x23, 0x2E, 0x27, 0x2F,
75 86748dbc Michael Niedermayer
        0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F,
76
};
77
78 9e1586fc Fabrice Bellard
void idct_mmx_init(void)
79
{
80
    int i;
81
82
    /* the mmx/mmxext idct uses a reordered input, so we patch scan tables */
83
    for (i = 0; i < 64; i++) {
84
        idct_mmx_perm[i] = (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2);
85 86748dbc Michael Niedermayer
//        idct_simple_mmx_perm[i] = simple_block_permute_op(i);
86 9e1586fc Fabrice Bellard
    }
87
}
88
89
static DCTELEM block[64] __attribute__ ((aligned (8)));
90
static DCTELEM block1[64] __attribute__ ((aligned (8)));
91 86748dbc Michael Niedermayer
static DCTELEM block_org[64] __attribute__ ((aligned (8)));
92 9e1586fc Fabrice Bellard
93
void dct_error(const char *name, int is_idct,
94
               void (*fdct_func)(DCTELEM *block),
95 86748dbc Michael Niedermayer
               void (*fdct_ref)(DCTELEM *block), int test)
96 de6d9b64 Fabrice Bellard
{
97
    int it, i, scale;
98
    int err_inf, v;
99 0c1a9eda Zdenek Kabelac
    int64_t err2, ti, ti1, it1;
100
    int64_t sysErr[64], sysErrMax=0;
101 86748dbc Michael Niedermayer
    int maxout=0;
102
    int blockSumErrMax=0, blockSumErr;
103 de6d9b64 Fabrice Bellard
104
    srandom(0);
105
106
    err_inf = 0;
107
    err2 = 0;
108 86748dbc Michael Niedermayer
    for(i=0; i<64; i++) sysErr[i]=0;
109 de6d9b64 Fabrice Bellard
    for(it=0;it<NB_ITS;it++) {
110 86748dbc Michael Niedermayer
        for(i=0;i<64;i++)
111
            block1[i] = 0;
112
        switch(test){
113 115329f1 Diego Biurrun
        case 0:
114 86748dbc Michael Niedermayer
            for(i=0;i<64;i++)
115
                block1[i] = (random() % 512) -256;
116 ad324c93 Michael Niedermayer
            if (is_idct){
117 86748dbc Michael Niedermayer
                fdct(block1);
118 ad324c93 Michael Niedermayer
119
                for(i=0;i<64;i++)
120
                    block1[i]>>=3;
121
            }
122 86748dbc Michael Niedermayer
        break;
123
        case 1:{
124
            int num= (random()%10)+1;
125
            for(i=0;i<num;i++)
126
                block1[random()%64] = (random() % 512) -256;
127
        }break;
128
        case 2:
129
            block1[0]= (random()%4096)-2048;
130
            block1[63]= (block1[0]&1)^1;
131
        break;
132
        }
133 9e1586fc Fabrice Bellard
134 86748dbc Michael Niedermayer
#if 0 // simulate mismatch control
135
{ int sum=0;
136
        for(i=0;i<64;i++)
137
           sum+=block1[i];
138

139 115329f1 Diego Biurrun
        if((sum&1)==0) block1[63]^=1;
140 86748dbc Michael Niedermayer
}
141
#endif
142
143
        for(i=0; i<64; i++)
144
            block_org[i]= block1[i];
145 9e1586fc Fabrice Bellard
146
        if (fdct_func == ff_mmx_idct ||
147 86748dbc Michael Niedermayer
            fdct_func == j_rev_dct || fdct_func == ff_mmxext_idct) {
148
            for(i=0;i<64;i++)
149 9e1586fc Fabrice Bellard
                block[idct_mmx_perm[i]] = block1[i];
150 a46a3ce4 Fabrice Bellard
        } else if(fdct_func == ff_simple_idct_mmx ) {
151 86748dbc Michael Niedermayer
            for(i=0;i<64;i++)
152
                block[idct_simple_mmx_perm[i]] = block1[i];
153
154
        } else {
155
            for(i=0; i<64; i++)
156
                block[i]= block1[i];
157 9e1586fc Fabrice Bellard
        }
158 86748dbc Michael Niedermayer
#if 0 // simulate mismatch control for tested IDCT but not the ref
159
{ int sum=0;
160
        for(i=0;i<64;i++)
161
           sum+=block[i];
162

163 115329f1 Diego Biurrun
        if((sum&1)==0) block[63]^=1;
164 86748dbc Michael Niedermayer
}
165
#endif
166 9e1586fc Fabrice Bellard
167 de6d9b64 Fabrice Bellard
        fdct_func(block);
168 9e1586fc Fabrice Bellard
        emms(); /* for ff_mmx_idct */
169
170 115329f1 Diego Biurrun
        if (fdct_func == fdct_ifast
171
#ifndef FAAN_POSTSCALE
172 b4c3816c Michael Niedermayer
            || fdct_func == ff_faandct
173
#endif
174
            ) {
175 de6d9b64 Fabrice Bellard
            for(i=0; i<64; i++) {
176 ad324c93 Michael Niedermayer
                scale = 8*(1 << (AANSCALE_BITS + 11)) / aanscales[i];
177 86748dbc Michael Niedermayer
                block[i] = (block[i] * scale /*+ (1<<(AANSCALE_BITS-1))*/) >> AANSCALE_BITS;
178
            }
179
        }
180
181 9e1586fc Fabrice Bellard
        fdct_ref(block1);
182 de6d9b64 Fabrice Bellard
183 86748dbc Michael Niedermayer
        blockSumErr=0;
184 de6d9b64 Fabrice Bellard
        for(i=0;i<64;i++) {
185
            v = abs(block[i] - block1[i]);
186
            if (v > err_inf)
187
                err_inf = v;
188
            err2 += v * v;
189 86748dbc Michael Niedermayer
            sysErr[i] += block[i] - block1[i];
190
            blockSumErr += v;
191
            if( abs(block[i])>maxout) maxout=abs(block[i]);
192 de6d9b64 Fabrice Bellard
        }
193 86748dbc Michael Niedermayer
        if(blockSumErrMax < blockSumErr) blockSumErrMax= blockSumErr;
194
#if 0 // print different matrix pairs
195
        if(blockSumErr){
196
            printf("\n");
197
            for(i=0; i<64; i++){
198
                if((i&7)==0) printf("\n");
199
                printf("%4d ", block_org[i]);
200
            }
201
            for(i=0; i<64; i++){
202
                if((i&7)==0) printf("\n");
203
                printf("%4d ", block[i] - block1[i]);
204
            }
205
        }
206
#endif
207
    }
208
    for(i=0; i<64; i++) sysErrMax= MAX(sysErrMax, ABS(sysErr[i]));
209 115329f1 Diego Biurrun
210 86748dbc Michael Niedermayer
#if 1 // dump systematic errors
211
    for(i=0; i<64; i++){
212
        if(i%8==0) printf("\n");
213
        printf("%5d ", (int)sysErr[i]);
214 de6d9b64 Fabrice Bellard
    }
215 86748dbc Michael Niedermayer
    printf("\n");
216
#endif
217 115329f1 Diego Biurrun
218 86748dbc Michael Niedermayer
    printf("%s %s: err_inf=%d err2=%0.8f syserr=%0.8f maxout=%d blockSumErr=%d\n",
219 9e1586fc Fabrice Bellard
           is_idct ? "IDCT" : "DCT",
220 86748dbc Michael Niedermayer
           name, err_inf, (double)err2 / NB_ITS / 64.0, (double)sysErrMax / NB_ITS, maxout, blockSumErrMax);
221
#if 1 //Speed test
222 de6d9b64 Fabrice Bellard
    /* speed test */
223 86748dbc Michael Niedermayer
    for(i=0;i<64;i++)
224
        block1[i] = 0;
225
    switch(test){
226 115329f1 Diego Biurrun
    case 0:
227 86748dbc Michael Niedermayer
        for(i=0;i<64;i++)
228
            block1[i] = (random() % 512) -256;
229 ad324c93 Michael Niedermayer
        if (is_idct){
230 86748dbc Michael Niedermayer
            fdct(block1);
231 ad324c93 Michael Niedermayer
232
            for(i=0;i<64;i++)
233
                block1[i]>>=3;
234
        }
235 86748dbc Michael Niedermayer
    break;
236
    case 1:{
237
    case 2:
238
        block1[0] = (random() % 512) -256;
239
        block1[1] = (random() % 512) -256;
240
        block1[2] = (random() % 512) -256;
241
        block1[3] = (random() % 512) -256;
242
    }break;
243
    }
244 de6d9b64 Fabrice Bellard
245 9e1586fc Fabrice Bellard
    if (fdct_func == ff_mmx_idct ||
246 86748dbc Michael Niedermayer
        fdct_func == j_rev_dct || fdct_func == ff_mmxext_idct) {
247
        for(i=0;i<64;i++)
248 9e1586fc Fabrice Bellard
            block[idct_mmx_perm[i]] = block1[i];
249 a46a3ce4 Fabrice Bellard
    } else if(fdct_func == ff_simple_idct_mmx ) {
250 86748dbc Michael Niedermayer
        for(i=0;i<64;i++)
251
            block[idct_simple_mmx_perm[i]] = block1[i];
252
    } else {
253
        for(i=0; i<64; i++)
254
            block[i]= block1[i];
255 9e1586fc Fabrice Bellard
    }
256
257 de6d9b64 Fabrice Bellard
    ti = gettime();
258
    it1 = 0;
259
    do {
260
        for(it=0;it<NB_ITS_SPEED;it++) {
261 86748dbc Michael Niedermayer
            for(i=0; i<64; i++)
262
                block[i]= block1[i];
263
//            memcpy(block, block1, sizeof(DCTELEM) * 64);
264
// dont memcpy especially not fastmemcpy because it does movntq !!!
265 de6d9b64 Fabrice Bellard
            fdct_func(block);
266
        }
267
        it1 += NB_ITS_SPEED;
268
        ti1 = gettime() - ti;
269
    } while (ti1 < 1000000);
270 9e1586fc Fabrice Bellard
    emms();
271 de6d9b64 Fabrice Bellard
272 86748dbc Michael Niedermayer
    printf("%s %s: %0.1f kdct/s\n",
273 9e1586fc Fabrice Bellard
           is_idct ? "IDCT" : "DCT",
274 de6d9b64 Fabrice Bellard
           name, (double)it1 * 1000.0 / (double)ti1);
275 86748dbc Michael Niedermayer
#endif
276 de6d9b64 Fabrice Bellard
}
277
278 0c1a9eda Zdenek Kabelac
static uint8_t img_dest[64] __attribute__ ((aligned (8)));
279
static uint8_t img_dest1[64] __attribute__ ((aligned (8)));
280 a46a3ce4 Fabrice Bellard
281 0c1a9eda Zdenek Kabelac
void idct248_ref(uint8_t *dest, int linesize, int16_t *block)
282 a46a3ce4 Fabrice Bellard
{
283
    static int init;
284
    static double c8[8][8];
285
    static double c4[4][4];
286
    double block1[64], block2[64], block3[64];
287
    double s, sum, v;
288
    int i, j, k;
289
290
    if (!init) {
291
        init = 1;
292
293
        for(i=0;i<8;i++) {
294
            sum = 0;
295
            for(j=0;j<8;j++) {
296
                s = (i==0) ? sqrt(1.0/8.0) : sqrt(1.0/4.0);
297
                c8[i][j] = s * cos(M_PI * i * (j + 0.5) / 8.0);
298
                sum += c8[i][j] * c8[i][j];
299
            }
300
        }
301 115329f1 Diego Biurrun
302 a46a3ce4 Fabrice Bellard
        for(i=0;i<4;i++) {
303
            sum = 0;
304
            for(j=0;j<4;j++) {
305
                s = (i==0) ? sqrt(1.0/4.0) : sqrt(1.0/2.0);
306
                c4[i][j] = s * cos(M_PI * i * (j + 0.5) / 4.0);
307
                sum += c4[i][j] * c4[i][j];
308
            }
309
        }
310
    }
311
312
    /* butterfly */
313 652f0197 Fabrice Bellard
    s = 0.5 * sqrt(2.0);
314 a46a3ce4 Fabrice Bellard
    for(i=0;i<4;i++) {
315
        for(j=0;j<8;j++) {
316 652f0197 Fabrice Bellard
            block1[8*(2*i)+j] = (block[8*(2*i)+j] + block[8*(2*i+1)+j]) * s;
317
            block1[8*(2*i+1)+j] = (block[8*(2*i)+j] - block[8*(2*i+1)+j]) * s;
318 a46a3ce4 Fabrice Bellard
        }
319
    }
320
321
    /* idct8 on lines */
322
    for(i=0;i<8;i++) {
323
        for(j=0;j<8;j++) {
324
            sum = 0;
325
            for(k=0;k<8;k++)
326
                sum += c8[k][j] * block1[8*i+k];
327
            block2[8*i+j] = sum;
328
        }
329
    }
330
331
    /* idct4 */
332
    for(i=0;i<8;i++) {
333
        for(j=0;j<4;j++) {
334
            /* top */
335
            sum = 0;
336
            for(k=0;k<4;k++)
337
                sum += c4[k][j] * block2[8*(2*k)+i];
338
            block3[8*(2*j)+i] = sum;
339
340
            /* bottom */
341
            sum = 0;
342
            for(k=0;k<4;k++)
343
                sum += c4[k][j] * block2[8*(2*k+1)+i];
344
            block3[8*(2*j+1)+i] = sum;
345
        }
346
    }
347
348
    /* clamp and store the result */
349
    for(i=0;i<8;i++) {
350
        for(j=0;j<8;j++) {
351 652f0197 Fabrice Bellard
            v = block3[8*i+j];
352 a46a3ce4 Fabrice Bellard
            if (v < 0)
353
                v = 0;
354
            else if (v > 255)
355
                v = 255;
356
            dest[i * linesize + j] = (int)rint(v);
357
        }
358
    }
359
}
360
361 115329f1 Diego Biurrun
void idct248_error(const char *name,
362 0c1a9eda Zdenek Kabelac
                    void (*idct248_put)(uint8_t *dest, int line_size, int16_t *block))
363 a46a3ce4 Fabrice Bellard
{
364
    int it, i, it1, ti, ti1, err_max, v;
365
366
    srandom(0);
367 115329f1 Diego Biurrun
368 a46a3ce4 Fabrice Bellard
    /* just one test to see if code is correct (precision is less
369
       important here) */
370
    err_max = 0;
371
    for(it=0;it<NB_ITS;it++) {
372 115329f1 Diego Biurrun
373 652f0197 Fabrice Bellard
        /* XXX: use forward transform to generate values */
374
        for(i=0;i<64;i++)
375
            block1[i] = (random() % 256) - 128;
376
        block1[0] += 1024;
377
378 a46a3ce4 Fabrice Bellard
        for(i=0; i<64; i++)
379
            block[i]= block1[i];
380
        idct248_ref(img_dest1, 8, block);
381 115329f1 Diego Biurrun
382 652f0197 Fabrice Bellard
        for(i=0; i<64; i++)
383
            block[i]= block1[i];
384
        idct248_put(img_dest, 8, block);
385 115329f1 Diego Biurrun
386 652f0197 Fabrice Bellard
        for(i=0;i<64;i++) {
387
            v = abs((int)img_dest[i] - (int)img_dest1[i]);
388
            if (v == 255)
389
                printf("%d %d\n", img_dest[i], img_dest1[i]);
390
            if (v > err_max)
391
                err_max = v;
392
        }
393 a46a3ce4 Fabrice Bellard
#if 0
394
        printf("ref=\n");
395
        for(i=0;i<8;i++) {
396
            int j;
397
            for(j=0;j<8;j++) {
398
                printf(" %3d", img_dest1[i*8+j]);
399
            }
400
            printf("\n");
401
        }
402 115329f1 Diego Biurrun

403 a46a3ce4 Fabrice Bellard
        printf("out=\n");
404
        for(i=0;i<8;i++) {
405
            int j;
406
            for(j=0;j<8;j++) {
407
                printf(" %3d", img_dest[i*8+j]);
408
            }
409
            printf("\n");
410
        }
411
#endif
412
    }
413
    printf("%s %s: err_inf=%d\n",
414
           1 ? "IDCT248" : "DCT248",
415
           name, err_max);
416
417
    ti = gettime();
418
    it1 = 0;
419
    do {
420
        for(it=0;it<NB_ITS_SPEED;it++) {
421
            for(i=0; i<64; i++)
422
                block[i]= block1[i];
423
//            memcpy(block, block1, sizeof(DCTELEM) * 64);
424
// dont memcpy especially not fastmemcpy because it does movntq !!!
425
            idct248_put(img_dest, 8, block);
426
        }
427
        it1 += NB_ITS_SPEED;
428
        ti1 = gettime() - ti;
429
    } while (ti1 < 1000000);
430
    emms();
431
432
    printf("%s %s: %0.1f kdct/s\n",
433
           1 ? "IDCT248" : "DCT248",
434
           name, (double)it1 * 1000.0 / (double)ti1);
435
}
436
437 9e1586fc Fabrice Bellard
void help(void)
438
{
439 86748dbc Michael Niedermayer
    printf("dct-test [-i] [<test-number>]\n"
440
           "test-number 0 -> test with random matrixes\n"
441
           "            1 -> test with random sparse matrixes\n"
442
           "            2 -> do 3. test from mpeg4 std\n"
443 a46a3ce4 Fabrice Bellard
           "-i          test IDCT implementations\n"
444
           "-4          test IDCT248 implementations\n");
445 9e1586fc Fabrice Bellard
    exit(1);
446
}
447
448 de6d9b64 Fabrice Bellard
int main(int argc, char **argv)
449
{
450 a46a3ce4 Fabrice Bellard
    int test_idct = 0, test_248_dct = 0;
451 86748dbc Michael Niedermayer
    int c,i;
452
    int test=1;
453 9e1586fc Fabrice Bellard
454 de6d9b64 Fabrice Bellard
    init_fdct();
455 9e1586fc Fabrice Bellard
    idct_mmx_init();
456 de6d9b64 Fabrice Bellard
457 86748dbc Michael Niedermayer
    for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i;
458
    for(i=0;i<MAX_NEG_CROP;i++) {
459
        cropTbl[i] = 0;
460
        cropTbl[i + MAX_NEG_CROP + 256] = 255;
461
    }
462 115329f1 Diego Biurrun
463 9e1586fc Fabrice Bellard
    for(;;) {
464 a46a3ce4 Fabrice Bellard
        c = getopt(argc, argv, "ih4");
465 9e1586fc Fabrice Bellard
        if (c == -1)
466
            break;
467
        switch(c) {
468
        case 'i':
469
            test_idct = 1;
470
            break;
471 a46a3ce4 Fabrice Bellard
        case '4':
472
            test_248_dct = 1;
473
            break;
474 86748dbc Michael Niedermayer
        default :
475 9e1586fc Fabrice Bellard
        case 'h':
476
            help();
477
            break;
478
        }
479
    }
480 115329f1 Diego Biurrun
481 86748dbc Michael Niedermayer
    if(optind <argc) test= atoi(argv[optind]);
482 115329f1 Diego Biurrun
483 9e1586fc Fabrice Bellard
    printf("ffmpeg DCT/IDCT test\n");
484
485 a46a3ce4 Fabrice Bellard
    if (test_248_dct) {
486
        idct248_error("SIMPLE-C", simple_idct248_put);
487 9e1586fc Fabrice Bellard
    } else {
488 a46a3ce4 Fabrice Bellard
        if (!test_idct) {
489
            dct_error("REF-DBL", 0, fdct, fdct, test); /* only to verify code ! */
490
            dct_error("IJG-AAN-INT", 0, fdct_ifast, fdct, test);
491
            dct_error("IJG-LLM-INT", 0, ff_jpeg_fdct_islow, fdct, test);
492
            dct_error("MMX", 0, ff_fdct_mmx, fdct, test);
493 94789b9e Michael Niedermayer
            dct_error("MMX2", 0, ff_fdct_mmx2, fdct, test);
494 65e4c8c9 Michael Niedermayer
            dct_error("FAAN", 0, ff_faandct, fdct, test);
495 a46a3ce4 Fabrice Bellard
        } else {
496
            dct_error("REF-DBL", 1, idct, idct, test);
497
            dct_error("INT", 1, j_rev_dct, idct, test);
498
            dct_error("LIBMPEG2-MMX", 1, ff_mmx_idct, idct, test);
499
            dct_error("LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, test);
500
            dct_error("SIMPLE-C", 1, simple_idct, idct, test);
501
            dct_error("SIMPLE-MMX", 1, ff_simple_idct_mmx, idct, test);
502 434df899 Michael Niedermayer
            dct_error("XVID-MMX", 1, ff_idct_xvid_mmx, idct, test);
503
            dct_error("XVID-MMX2", 1, ff_idct_xvid_mmx2, idct, test);
504 a46a3ce4 Fabrice Bellard
            //        dct_error("ODIVX-C", 1, odivx_idct_c, idct);
505
            //printf(" test against odivx idct\n");
506
            //        dct_error("REF", 1, idct, odivx_idct_c);
507
            //        dct_error("INT", 1, j_rev_dct, odivx_idct_c);
508
            //        dct_error("MMX", 1, ff_mmx_idct, odivx_idct_c);
509
            //        dct_error("MMXEXT", 1, ff_mmxext_idct, odivx_idct_c);
510
            //        dct_error("SIMPLE-C", 1, simple_idct, odivx_idct_c);
511
            //        dct_error("SIMPLE-MMX", 1, ff_simple_idct_mmx, odivx_idct_c);
512
            //        dct_error("ODIVX-C", 1, odivx_idct_c, odivx_idct_c);
513
        }
514 9e1586fc Fabrice Bellard
    }
515 de6d9b64 Fabrice Bellard
    return 0;
516
}