1 |
/***************************************************************************** |
/************************************************************************** |
2 |
* |
* |
3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC - Unit tests and benches |
|
* - Unit tests and benches - |
|
|
* |
|
|
* Copyright(C) 2002 Pascal Massimino <skal@planet-d.net> |
|
4 |
* |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
6 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
14 |
* |
* |
15 |
* You should have received a copy of the GNU General Public License |
* You should have received a copy of the GNU General Public License |
16 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
* |
|
|
* $Id$ |
|
18 |
* |
* |
19 |
****************************************************************************/ |
*************************************************************************/ |
20 |
|
|
21 |
/***************************************************************************** |
/************************************************************************ |
22 |
* |
* |
23 |
* 'Reference' output is at the end of file. |
* 'Reference' output is at the end of file. |
24 |
* Don't take the checksums and crc too seriouly, they aren't |
* Don't take the checksums and crc too seriouly, they aren't |
25 |
* bullet-proof (should plug some .md5 here)... |
* bullet-proof (should plug some .md5 here)... |
26 |
* |
* |
27 |
* compiles with something like: |
* compiles best at xvidcore/src-dir with something like |
28 |
* gcc -o xvid_bench xvid_bench.c -I../src/ -lxvidcore -lm |
* |
29 |
|
* gcc -DARCH_IS_IA32 -DARCH_IS_32BIT -o xvid_bench xvid_bench.c \ |
30 |
|
* ../build/generic/libxvidcore.a -lm |
31 |
|
* |
32 |
|
* History: |
33 |
* |
* |
34 |
****************************************************************************/ |
* 06.06.2002 initial coding -Skal- |
35 |
|
* 27.02.2003 minor changes (compile, sad16v) <gruel@web.de> |
36 |
|
* |
37 |
|
*************************************************************************/ |
38 |
|
|
39 |
#include <stdio.h> |
#include <stdio.h> |
40 |
#include <stdlib.h> |
#include <stdlib.h> |
41 |
#include <string.h> /* for memset */ |
#include <string.h> // for memset |
42 |
#include <assert.h> |
#include <assert.h> |
43 |
|
|
44 |
#ifndef WIN32 |
#ifndef WIN32 |
45 |
#include <sys/time.h> /* for gettimeofday */ |
#include <sys/time.h> // for gettimeofday |
46 |
#else |
#else |
47 |
#include <time.h> |
#include <time.h> |
48 |
#endif |
#endif |
56 |
#include "image/colorspace.h" |
#include "image/colorspace.h" |
57 |
#include "image/interpolate8x8.h" |
#include "image/interpolate8x8.h" |
58 |
#include "utils/mem_transfer.h" |
#include "utils/mem_transfer.h" |
59 |
#include "quant/quant.h" |
#include "quant/quant_h263.h" |
60 |
|
#include "quant/quant_mpeg4.h" |
61 |
#include "motion/sad.h" |
#include "motion/sad.h" |
62 |
#include "utils/emms.h" |
#include "utils/emms.h" |
63 |
#include "utils/timer.h" |
#include "utils/timer.h" |
70 |
#define M_PI 3.14159265358979323846 |
#define M_PI 3.14159265358979323846 |
71 |
#endif |
#endif |
72 |
|
|
73 |
const int speed_ref = 100; /* on slow machines, decrease this value */ |
const int speed_ref = 100; // on slow machines, decrease this value |
74 |
|
|
75 |
/********************************************************************* |
/********************************************************************* |
76 |
* misc |
* misc |
117 |
|
|
118 |
CPU cpu_list[] = |
CPU cpu_list[] = |
119 |
{ { "PLAINC", 0 } |
{ { "PLAINC", 0 } |
|
#ifdef ARCH_IS_IA32 |
|
120 |
, { "MMX ", XVID_CPU_MMX } |
, { "MMX ", XVID_CPU_MMX } |
121 |
, { "MMXEXT", XVID_CPU_MMXEXT | XVID_CPU_MMX } |
, { "MMXEXT", XVID_CPU_MMXEXT | XVID_CPU_MMX } |
122 |
, { "SSE2 ", XVID_CPU_SSE2 | XVID_CPU_MMX } |
, { "SSE2 ", XVID_CPU_SSE2 | XVID_CPU_MMX } |
123 |
, { "3DNOW ", XVID_CPU_3DNOW } |
, { "3DNOW ", XVID_CPU_3DNOW } |
124 |
, { "3DNOWE", XVID_CPU_3DNOWEXT } |
, { "3DNOWE", XVID_CPU_3DNOWEXT } |
125 |
#endif |
, { "IA64 ", XVID_CPU_IA64 } |
|
//, { "IA64 ", XVID_CPU_IA64 } |
|
126 |
//, { "TSC ", XVID_CPU_TSC } |
//, { "TSC ", XVID_CPU_TSC } |
127 |
, { 0, 0 } }; |
, { 0, 0 } } |
128 |
|
|
129 |
CPU cpu_short_list[] = |
, cpu_short_list[] = |
130 |
{ { "PLAINC", 0 } |
{ { "PLAINC", 0 } |
|
#ifdef ARCH_IS_IA32 |
|
131 |
, { "MMX ", XVID_CPU_MMX } |
, { "MMX ", XVID_CPU_MMX } |
132 |
//, { "MMXEXT", XVID_CPU_MMXEXT | XVID_CPU_MMX } |
//, { "MMXEXT", XVID_CPU_MMXEXT | XVID_CPU_MMX } |
133 |
#endif |
, { "IA64 ", XVID_CPU_IA64 } |
134 |
//, { "IA64 ", XVID_CPU_IA64 } |
, { 0, 0 } } |
|
, { 0, 0 } }; |
|
135 |
|
|
136 |
CPU cpu_short_list2[] = |
, cpu_short_list2[] = |
137 |
{ { "PLAINC", 0 } |
{ { "PLAINC", 0 } |
|
#ifdef ARCH_IS_IA32 |
|
138 |
, { "MMX ", XVID_CPU_MMX } |
, { "MMX ", XVID_CPU_MMX } |
139 |
, { "SSE2 ", XVID_CPU_SSE2 | XVID_CPU_MMX } |
, { "SSE2 ", XVID_CPU_SSE2 | XVID_CPU_MMX } |
|
#endif |
|
140 |
, { 0, 0 } }; |
, { 0, 0 } }; |
141 |
|
|
142 |
|
|
143 |
int init_cpu(CPU *cpu) |
int init_cpu(CPU *cpu) |
144 |
{ |
{ |
145 |
xvid_gbl_info_t xinfo; |
int xerr, cpu_type; |
146 |
|
XVID_INIT_PARAM xinit; |
147 |
|
|
148 |
/* Get the available CPU flags */ |
cpu_type = check_cpu_features() & cpu->cpu; |
149 |
memset(&xinfo, 0, sizeof(xinfo)); |
xinit.cpu_flags = cpu_type | XVID_CPU_FORCE; |
150 |
xinfo.version = XVID_VERSION; |
// xinit.cpu_flags = XVID_CPU_MMX | XVID_CPU_FORCE; |
151 |
xvid_global(NULL, XVID_GBL_INFO, &xinfo, NULL); |
xerr = xvid_init(NULL, 0, &xinit, NULL); |
152 |
|
if (cpu->cpu>0 && (cpu_type==0 || xerr!=XVID_ERR_OK)) { |
153 |
/* Are we trying to test a subset of the host CPU features */ |
printf( "%s - skipped...\n", cpu->name ); |
|
if ((xinfo.cpu_flags & cpu->cpu) == cpu->cpu) { |
|
|
int xerr; |
|
|
xvid_gbl_init_t xinit; |
|
|
memset(&xinit, 0, sizeof(xinit)); |
|
|
xinit.cpu_flags = cpu->cpu | XVID_CPU_FORCE; |
|
|
xinit.version = XVID_VERSION; |
|
|
xerr = xvid_global(NULL, XVID_GBL_INIT, &xinit, NULL); |
|
|
if (xerr==XVID_ERR_FAIL) { |
|
|
/* libxvidcore failed to init */ |
|
154 |
return 0; |
return 0; |
155 |
} |
} |
|
} else { |
|
|
/* The host CPU doesn't support some required feature for this test */ |
|
|
return(0); |
|
|
} |
|
156 |
return 1; |
return 1; |
157 |
} |
} |
158 |
|
|
168 |
int tst; |
int tst; |
169 |
CPU *cpu; |
CPU *cpu; |
170 |
int i; |
int i; |
171 |
DECLARE_ALIGNED_MATRIX(iDst0, 8, 8, short, 16); |
short iDst0[8*8], iDst[8*8], fDst[8*8]; |
|
DECLARE_ALIGNED_MATRIX(iDst, 8, 8, short, 16); |
|
|
DECLARE_ALIGNED_MATRIX(fDst, 8, 8, short, 16); |
|
172 |
double overhead; |
double overhead; |
173 |
|
|
174 |
printf( "\n ===== test fdct/idct =====\n" ); |
printf( "\n ===== test fdct/idct =====\n" ); |
219 |
void test_sad() |
void test_sad() |
220 |
{ |
{ |
221 |
const int nb_tests = 2000*speed_ref; |
const int nb_tests = 2000*speed_ref; |
222 |
int tst; |
int tst,dummy[4]; |
223 |
CPU *cpu; |
CPU *cpu; |
224 |
int i; |
int i; |
225 |
uint8_t Cur[16*16], Ref1[16*16], Ref2[16*16]; |
uint8_t Cur[16*16], Ref1[16*16], Ref2[16*16]; |
248 |
|
|
249 |
t = gettime_usec(); |
t = gettime_usec(); |
250 |
emms(); |
emms(); |
251 |
for(tst=0; tst<nb_tests; ++tst) s = sad16(Cur, Ref1, 16, -1); |
for(tst=0; tst<nb_tests; ++tst) s = sad16(Cur, Ref1, 16, 65535); |
252 |
emms(); |
emms(); |
253 |
t = (gettime_usec() - t) / nb_tests; |
t = (gettime_usec() - t) / nb_tests; |
254 |
printf( "%s - sad16 %.3f usec sad=%d\n", cpu->name, t, s ); |
printf( "%s - sad16 %.3f usec sad=%d\n", cpu->name, t, s ); |
256 |
|
|
257 |
t = gettime_usec(); |
t = gettime_usec(); |
258 |
emms(); |
emms(); |
259 |
|
for(tst=0; tst<nb_tests; ++tst) s = sad16v(Cur, Ref1, 16, dummy); |
260 |
|
emms(); |
261 |
|
t = (gettime_usec() - t) / nb_tests; |
262 |
|
printf( "%s - sad16v %.3f usec sad=%d\n", cpu->name, t, s ); |
263 |
|
if (s!=27214) printf( "*** CRC ERROR! ***\n" ); |
264 |
|
|
265 |
|
t = gettime_usec(); |
266 |
|
emms(); |
267 |
for(tst=0; tst<nb_tests; ++tst) s = sad16bi(Cur, Ref1, Ref2, 16); |
for(tst=0; tst<nb_tests; ++tst) s = sad16bi(Cur, Ref1, Ref2, 16); |
268 |
emms(); |
emms(); |
269 |
t = (gettime_usec() - t) / nb_tests; |
t = (gettime_usec() - t) / nb_tests; |
313 |
const int nb_tests = 2000*speed_ref; |
const int nb_tests = 2000*speed_ref; |
314 |
CPU *cpu; |
CPU *cpu; |
315 |
const uint8_t Src0[16*9] = { |
const uint8_t Src0[16*9] = { |
316 |
/* try to have every possible combinaison of rounding... */ |
// try to have every possible combinaison of rounding... |
317 |
0, 0, 1, 0, 2, 0, 3, 0, 4 ,0,0,0, 0,0,0,0 |
0, 0, 1, 0, 2, 0, 3, 0, 4 ,0,0,0, 0,0,0,0 |
318 |
, 0, 1, 1, 1, 2, 1, 3, 1, 3 ,0,0,0, 0,0,0,0 |
, 0, 1, 1, 1, 2, 1, 3, 1, 3 ,0,0,0, 0,0,0,0 |
319 |
, 0, 2, 1, 2, 2, 2, 3, 2, 2 ,0,0,0, 0,0,0,0 |
, 0, 2, 1, 2, 2, 2, 3, 2, 2 ,0,0,0, 0,0,0,0 |
363 |
if (iCrc!=8103) printf( "*** CRC ERROR! ***\n" ); |
if (iCrc!=8103) printf( "*** CRC ERROR! ***\n" ); |
364 |
|
|
365 |
|
|
366 |
/* this is a new function, as of 06.06.2002 */ |
// this is a new function, as of 06.06.2002 |
367 |
#if 0 |
#if 0 |
368 |
TEST_MB2(interpolate8x8_avrg); |
TEST_MB2(interpolate8x8_avrg); |
369 |
printf( "%s - interpolate8x8_c %.3f usec iCrc=%d\n", cpu->name, t, iCrc ); |
printf( "%s - interpolate8x8_c %.3f usec iCrc=%d\n", cpu->name, t, iCrc ); |
451 |
|
|
452 |
printf( "\n === test transfer ===\n" ); |
printf( "\n === test transfer ===\n" ); |
453 |
|
|
454 |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
455 |
{ |
{ |
456 |
double t, overhead; |
double t, overhead; |
457 |
int tst, s; |
int tst, s; |
481 |
s = 0; for(i=0; i<8*32; ++i) { s += (Src8[i]-Ref1[i])&i; } |
s = 0; for(i=0; i<8*32; ++i) { s += (Src8[i]-Ref1[i])&i; } |
482 |
printf( "crc2=%d\n", s); |
printf( "crc2=%d\n", s); |
483 |
if (s!=16256) printf( "*** CRC ERROR! ***\n" ); |
if (s!=16256) printf( "*** CRC ERROR! ***\n" ); |
484 |
|
#if 1 |
485 |
TEST_TRANSFER3(transfer_8to16sub2, Dst16, Src8, Ref1, Ref2); |
TEST_TRANSFER3(transfer_8to16sub2, Dst16, Src8, Ref1, Ref2); |
486 |
printf( "%s - 8to16sub2 %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - 8to16sub2 %.3f usec crc=%d\n", cpu->name, t, s ); |
487 |
if (s!=22368) printf( "*** CRC ERROR! ***\n" ); |
if (s!=20384) printf( "*** CRC ERROR! ***\n" ); |
488 |
|
// for(i=0; i<64; ++i) printf( "[%d]", Dst16[i]); |
489 |
|
// printf("\n"); |
490 |
|
#endif |
491 |
printf( " --- \n" ); |
printf( " --- \n" ); |
492 |
} |
} |
493 |
} |
} |
539 |
|
|
540 |
printf( "\n ===== test quant =====\n" ); |
printf( "\n ===== test quant =====\n" ); |
541 |
|
|
542 |
/* we deliberately enfringe the norm's specified range [-127,127], */ |
// we deliberately enfringe the norm's specified range [-127,127], |
543 |
/* to test the robustness of the iquant module */ |
// to test the robustness of the iquant module |
544 |
for(i=0; i<64; ++i) { |
for(i=0; i<64; ++i) { |
545 |
Src[i] = 1 + (i-32) * (i&6); |
Src[i] = 1 + (i-32) * (i&6); |
546 |
Dst[i] = 0; |
Dst[i] = 0; |
547 |
} |
} |
548 |
|
|
549 |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
550 |
{ |
{ |
551 |
double t, overhead; |
double t, overhead; |
552 |
int tst, q; |
int tst, q; |
565 |
overhead += gettime_usec(); |
overhead += gettime_usec(); |
566 |
|
|
567 |
#if 1 |
#if 1 |
568 |
TEST_QUANT2(quant_mpeg_intra, Dst, Src); |
TEST_QUANT2(quant4_intra, Dst, Src); |
569 |
printf( "%s - quant_mpeg_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - quant4_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
570 |
if (s!=29809) printf( "*** CRC ERROR! ***\n" ); |
if (s!=29809) printf( "*** CRC ERROR! ***\n" ); |
571 |
|
|
572 |
TEST_QUANT(quant_mpeg_inter, Dst, Src); |
TEST_QUANT(quant4_inter, Dst, Src); |
573 |
printf( "%s - quant_mpeg_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - quant4_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
574 |
if (s!=12574) printf( "*** CRC ERROR! ***\n" ); |
if (s!=12574) printf( "*** CRC ERROR! ***\n" ); |
575 |
#endif |
#endif |
576 |
#if 1 |
#if 1 |
577 |
TEST_QUANT2(dequant_mpeg_intra, Dst, Src); |
TEST_QUANT2(dequant4_intra, Dst, Src); |
578 |
printf( "%s - dequant_mpeg_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - dequant4_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
579 |
if (s!=24052) printf( "*** CRC ERROR! ***\n" ); |
if (s!=24052) printf( "*** CRC ERROR! ***\n" ); |
580 |
|
|
581 |
TEST_QUANT(dequant_mpeg_inter, Dst, Src); |
TEST_QUANT(dequant4_inter, Dst, Src); |
582 |
printf( "%s - dequant_mpeg_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - dequant4_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
583 |
if (s!=63847) printf( "*** CRC ERROR! ***\n" ); |
if (s!=63847) printf( "*** CRC ERROR! ***\n" ); |
584 |
#endif |
#endif |
585 |
#if 1 |
#if 1 |
586 |
TEST_QUANT2(quant_h263_intra, Dst, Src); |
TEST_QUANT2(quant_intra, Dst, Src); |
587 |
printf( "%s - quant_h263_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - quant_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
588 |
if (s!=25662) printf( "*** CRC ERROR! ***\n" ); |
if (s!=25662) printf( "*** CRC ERROR! ***\n" ); |
589 |
|
|
590 |
TEST_QUANT(quant_h263_inter, Dst, Src); |
TEST_QUANT(quant_inter, Dst, Src); |
591 |
printf( "%s - quant_h263_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - quant_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
592 |
if (s!=23972) printf( "*** CRC ERROR! ***\n" ); |
if (s!=23972) printf( "*** CRC ERROR! ***\n" ); |
593 |
#endif |
#endif |
594 |
#if 1 |
#if 1 |
595 |
TEST_QUANT2(dequant_h263_intra, Dst, Src); |
TEST_QUANT2(dequant_intra, Dst, Src); |
596 |
printf( "%s - dequant_h263_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - dequant_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
597 |
if (s!=49900) printf( "*** CRC ERROR! ***\n" ); |
if (s!=49900) printf( "*** CRC ERROR! ***\n" ); |
598 |
|
|
599 |
TEST_QUANT(dequant_h263_inter, Dst, Src); |
TEST_QUANT(dequant_inter, Dst, Src); |
600 |
printf( "%s - dequant_h263_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - dequant_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
601 |
if (s!=48899) printf( "*** CRC ERROR! ***\n" ); |
if (s!=48899) printf( "*** CRC ERROR! ***\n" ); |
602 |
#endif |
#endif |
603 |
printf( " --- \n" ); |
printf( " --- \n" ); |
627 |
printf( "\n ===== test cbp =====\n" ); |
printf( "\n ===== test cbp =====\n" ); |
628 |
|
|
629 |
for(i=0; i<6*64; ++i) { |
for(i=0; i<6*64; ++i) { |
630 |
Src1[i] = (i*i*3/8192)&(i/64)&1; /* 'random' */ |
Src1[i] = (i*i*3/8192)&(i/64)&1; // 'random' |
631 |
Src2[i] = (i<3*64); /* half-full */ |
Src2[i] = (i<3*64); // half-full |
632 |
Src3[i] = ((i+32)>3*64); |
Src3[i] = ((i+32)>3*64); |
633 |
Src4[i] = (i==(3*64+2) || i==(5*64+9)); |
Src4[i] = (i==(3*64+2) || i==(5*64+9)); |
634 |
} |
} |
635 |
|
|
636 |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_short_list2; cpu->name!=0; ++cpu) |
637 |
{ |
{ |
638 |
double t; |
double t; |
639 |
int tst, cbp; |
int tst, cbp; |
783 |
} |
} |
784 |
} |
} |
785 |
|
|
786 |
///* ////////////////////////////////////////////////////// */ |
////////////////////////////////////////////////////////// |
787 |
/* Pseudo-random generator specified by IEEE 1180 */ |
/* Pseudo-random generator specified by IEEE 1180 */ |
788 |
|
|
789 |
static long ieee_seed = 1; |
static long ieee_seed = 1; |
870 |
static const double ILimits[5] = { 1., 0.06, 0.02, 0.015, 0.0015 }; |
static const double ILimits[5] = { 1., 0.06, 0.02, 0.015, 0.0015 }; |
871 |
int Loops = 10000; |
int Loops = 10000; |
872 |
int i, m, n; |
int i, m, n; |
873 |
DECLARE_ALIGNED_MATRIX(Blk0, 8, 8, short, 16); /* reference */ |
short Blk0[64]; // reference |
874 |
DECLARE_ALIGNED_MATRIX(Blk, 8, 8, short, 16); |
short Blk[64], iBlk[64]; |
875 |
DECLARE_ALIGNED_MATRIX(iBlk, 8, 8, short, 16); |
short Ref_FDCT[64]; |
876 |
DECLARE_ALIGNED_MATRIX(Ref_FDCT, 8, 8, short, 16); |
short Ref_IDCT[64]; |
|
DECLARE_ALIGNED_MATRIX(Ref_IDCT, 8, 8, short, 16); |
|
877 |
|
|
878 |
STATS_8x8 FStats; /* forward dct stats */ |
STATS_8x8 FStats; // forward dct stats |
879 |
STATS_8x8 IStats; /* inverse dct stats */ |
STATS_8x8 IStats; // inverse dct stats |
880 |
|
|
881 |
CPU *cpu; |
CPU *cpu; |
882 |
|
|
899 |
for(i=0; i<64; ++i) |
for(i=0; i<64; ++i) |
900 |
Blk0[i] = (short)ieee_rand(Min,Max) * Sign; |
Blk0[i] = (short)ieee_rand(Min,Max) * Sign; |
901 |
|
|
902 |
/* hmm, I'm not quite sure this is exactly */ |
// hmm, I'm not quite sure this is exactly |
903 |
/* the tests described in the norm. check... */ |
// the tests described in the norm. check... |
904 |
|
|
905 |
memcpy(Ref_FDCT, Blk0, 64*sizeof(short)); |
memcpy(Ref_FDCT, Blk0, 64*sizeof(short)); |
906 |
ref_fdct(Ref_FDCT); |
ref_fdct(Ref_FDCT); |
927 |
|
|
928 |
printf( "\n -- FDCT report --\n" ); |
printf( "\n -- FDCT report --\n" ); |
929 |
// print_stats(&FStats); |
// print_stats(&FStats); |
930 |
report_stats(&FStats, 0); /* so far I know, IEEE1180 says nothing for fdct */ |
report_stats(&FStats, 0); // so far I know, IEEE1180 says nothing for fdct |
931 |
|
|
932 |
for(i=0; i<64; i++) Blk[i] = 0; |
for(i=0; i<64; i++) Blk[i] = 0; |
933 |
emms(); fdct(Blk); emms(); |
emms(); fdct(Blk); emms(); |
949 |
|
|
950 |
void test_dct_saturation(int Min, int Max) |
void test_dct_saturation(int Min, int Max) |
951 |
{ |
{ |
952 |
/* test behaviour on input range fringe */ |
// test behaviour on input range fringe |
953 |
|
|
954 |
int i, n, p; |
int i, n, p; |
955 |
CPU *cpu; |
CPU *cpu; |
956 |
// const short IDCT_MAX = 2047; /* 12bits input */ |
// const short IDCT_MAX = 2047; // 12bits input |
957 |
// const short IDCT_MIN = -2048; |
// const short IDCT_MIN = -2048; |
958 |
// const short IDCT_OUT = 256; /* 9bits ouput */ |
// const short IDCT_OUT = 256; // 9bits ouput |
959 |
const int Partitions = 4; |
const int Partitions = 4; |
960 |
const int Loops = 10000 / Partitions; |
const int Loops = 10000 / Partitions; |
961 |
|
|
972 |
printf( "\n===== IEEE test for %s Min=%d Max=%d =====\n", |
printf( "\n===== IEEE test for %s Min=%d Max=%d =====\n", |
973 |
cpu->name, Min, Max ); |
cpu->name, Min, Max ); |
974 |
|
|
975 |
/* FDCT tests // */ |
// FDCT tests // |
976 |
|
|
977 |
init_stats(&Stats); |
init_stats(&Stats); |
978 |
|
|
979 |
/* test each computation channels separately */ |
// test each computation channels separately |
980 |
for(i=0; i<64; i++) Blk[i] = Blk0[i] = ((i/8)==(i%8)) ? Max : 0; |
for(i=0; i<64; i++) Blk[i] = Blk0[i] = ((i/8)==(i%8)) ? Max : 0; |
981 |
ref_fdct(Blk0); |
ref_fdct(Blk0); |
982 |
emms(); fdct(Blk); emms(); |
emms(); fdct(Blk); emms(); |
987 |
emms(); fdct(Blk); emms(); |
emms(); fdct(Blk); emms(); |
988 |
store_stats(&Stats, Blk, Blk0); |
store_stats(&Stats, Blk, Blk0); |
989 |
|
|
990 |
/* randomly saturated inputs */ |
// randomly saturated inputs |
991 |
for(p=0; p<Partitions; ++p) |
for(p=0; p<Partitions; ++p) |
992 |
{ |
{ |
993 |
for(n=0; n<Loops; ++n) |
for(n=0; n<Loops; ++n) |
1003 |
report_stats(&Stats, 0); |
report_stats(&Stats, 0); |
1004 |
|
|
1005 |
|
|
1006 |
/* IDCT tests // */ |
// IDCT tests // |
1007 |
#if 0 |
#if 0 |
1008 |
/* no finished yet */ |
// no finished yet |
1009 |
|
|
1010 |
init_stats(&Stats); |
init_stats(&Stats); |
1011 |
|
|
1012 |
/* test each computation channel separately */ |
// test each computation channel separately |
1013 |
for(i=0; i<64; i++) Blk[i] = Blk0[i] = ((i/8)==(i%8)) ? IDCT_MAX : 0; |
for(i=0; i<64; i++) Blk[i] = Blk0[i] = ((i/8)==(i%8)) ? IDCT_MAX : 0; |
1014 |
ref_idct(Blk0); |
ref_idct(Blk0); |
1015 |
emms(); idct(Blk); emms(); |
emms(); idct(Blk); emms(); |
1022 |
for(i=0; i<64; i++) { CLAMP(Blk0[i], IDCT_OUT); CLAMP(Blk[i], IDCT_OUT); } |
for(i=0; i<64; i++) { CLAMP(Blk0[i], IDCT_OUT); CLAMP(Blk[i], IDCT_OUT); } |
1023 |
store_stats(&Stats, Blk, Blk0); |
store_stats(&Stats, Blk, Blk0); |
1024 |
|
|
1025 |
/* randomly saturated inputs */ |
// randomly saturated inputs |
1026 |
for(p=0; p<Partitions; ++p) |
for(p=0; p<Partitions; ++p) |
1027 |
{ |
{ |
1028 |
for(n=0; n<Loops; ++n) |
for(n=0; n<Loops; ++n) |
1052 |
FILE *f = 0; |
FILE *f = 0; |
1053 |
void *dechandle = 0; |
void *dechandle = 0; |
1054 |
int xerr; |
int xerr; |
1055 |
xvid_gbl_init_t xinit; |
XVID_INIT_PARAM xinit; |
1056 |
xvid_dec_create_t xparam; |
XVID_DEC_PARAM xparam; |
1057 |
xvid_dec_frame_t xframe; |
XVID_DEC_FRAME xframe; |
1058 |
double t = 0.; |
double t = 0.; |
1059 |
int nb = 0; |
int nb = 0; |
1060 |
uint8_t *buf = 0; |
uint8_t *buf = 0; |
1062 |
int buf_size, pos; |
int buf_size, pos; |
1063 |
uint32_t chksum = 0; |
uint32_t chksum = 0; |
1064 |
|
|
|
memset(&xinit, 0, sizeof(xinit)); |
|
1065 |
xinit.cpu_flags = XVID_CPU_MMX | XVID_CPU_FORCE; |
xinit.cpu_flags = XVID_CPU_MMX | XVID_CPU_FORCE; |
1066 |
xinit.version = XVID_VERSION; |
xvid_init(NULL, 0, &xinit, NULL); |
1067 |
xvid_global(NULL, 0, &xinit, NULL); |
printf( "API version: %d, core build:%d\n", xinit.api_version, xinit.core_build); |
1068 |
|
|
1069 |
|
|
|
memset(&xparam, 0, sizeof(xparam)); |
|
1070 |
xparam.width = width; |
xparam.width = width; |
1071 |
xparam.height = height; |
xparam.height = height; |
|
xparam.version = XVID_VERSION; |
|
1072 |
xerr = xvid_decore(NULL, XVID_DEC_CREATE, &xparam, NULL); |
xerr = xvid_decore(NULL, XVID_DEC_CREATE, &xparam, NULL); |
1073 |
if (xerr==XVID_ERR_FAIL) { |
if (xerr!=XVID_ERR_OK) { |
1074 |
printf("can't init decoder (err=%d)\n", xerr); |
printf("can't init decoder (err=%d)\n", xerr); |
1075 |
return; |
return; |
1076 |
} |
} |
1091 |
} |
} |
1092 |
else printf( "Input size: %d\n", buf_size); |
else printf( "Input size: %d\n", buf_size); |
1093 |
|
|
1094 |
buf = malloc(buf_size); /* should be enuf' */ |
buf = malloc(buf_size); // should be enuf' |
1095 |
rgb_out = calloc(4, width*height); /* <-room for _RGB24 */ |
rgb_out = calloc(4, width*height); // <-room for _RGB24 |
1096 |
if (buf==0 || rgb_out==0) { |
if (buf==0 || rgb_out==0) { |
1097 |
printf( "malloc failed!\n" ); |
printf( "malloc failed!\n" ); |
1098 |
goto End; |
goto End; |
1107 |
pos = 0; |
pos = 0; |
1108 |
t = -gettime_usec(); |
t = -gettime_usec(); |
1109 |
while(1) { |
while(1) { |
|
memset(&xframe, 0, sizeof(xframe)); |
|
|
xframe.version = XVID_VERSION; |
|
1110 |
xframe.bitstream = buf + pos; |
xframe.bitstream = buf + pos; |
1111 |
xframe.length = buf_size - pos; |
xframe.length = buf_size - pos; |
1112 |
xframe.output.plane[0] = rgb_out; |
xframe.image = rgb_out; |
1113 |
xframe.output.stride[0] = width; |
xframe.stride = width; |
1114 |
xframe.output.csp = XVID_CSP_BGR; |
xframe.colorspace = XVID_CSP_RGB24; |
1115 |
xerr = xvid_decore(dechandle, XVID_DEC_DECODE, &xframe, 0); |
xerr = xvid_decore(dechandle, XVID_DEC_DECODE, &xframe, 0); |
1116 |
nb++; |
nb++; |
1117 |
pos += xframe.length; |
pos += xframe.length; |
1122 |
} |
} |
1123 |
if (pos==buf_size) |
if (pos==buf_size) |
1124 |
break; |
break; |
1125 |
if (xerr==XVID_ERR_FAIL) { |
if (xerr!=XVID_ERR_OK) { |
1126 |
printf("decoding failed for frame #%d (err=%d)!\n", nb, xerr); |
printf("decoding failed for frame #%d (err=%d)!\n", nb, xerr); |
1127 |
break; |
break; |
1128 |
} |
} |
1138 |
if (buf!=0) free(buf); |
if (buf!=0) free(buf); |
1139 |
if (dechandle!=0) { |
if (dechandle!=0) { |
1140 |
xerr= xvid_decore(dechandle, XVID_DEC_DESTROY, NULL, NULL); |
xerr= xvid_decore(dechandle, XVID_DEC_DESTROY, NULL, NULL); |
1141 |
if (xerr==XVID_ERR_FAIL) |
if (xerr!=XVID_ERR_OK) |
1142 |
printf("destroy-decoder failed (err=%d)!\n", xerr); |
printf("destroy-decoder failed (err=%d)!\n", xerr); |
1143 |
} |
} |
1144 |
if (f!=0) fclose(f); |
if (f!=0) fclose(f); |
1154 |
|
|
1155 |
printf( "\n ===== (de)quant4_intra saturation bug? =====\n" ); |
printf( "\n ===== (de)quant4_intra saturation bug? =====\n" ); |
1156 |
|
|
1157 |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
1158 |
{ |
{ |
1159 |
int i; |
int i; |
1160 |
int16_t Src[8*8], Dst[8*8]; |
int16_t Src[8*8], Dst[8*8]; |
1164 |
|
|
1165 |
for(i=0; i<64; ++i) Src[i] = i-32; |
for(i=0; i<64; ++i) Src[i] = i-32; |
1166 |
set_intra_matrix( get_default_intra_matrix() ); |
set_intra_matrix( get_default_intra_matrix() ); |
1167 |
dequant_mpeg_intra(Dst, Src, 31, 5); |
dequant4_intra(Dst, Src, 31, 5); |
1168 |
printf( "dequant_mpeg_intra with CPU=%s: ", cpu->name); |
printf( "dequant4_intra with CPU=%s: ", cpu->name); |
1169 |
printf( " Out[]= " ); |
printf( " Out[]= " ); |
1170 |
for(i=0; i<64; ++i) printf( "[%d]", Dst[i]); |
for(i=0; i<64; ++i) printf( "[%d]", Dst[i]); |
1171 |
printf( "\n" ); |
printf( "\n" ); |
1173 |
|
|
1174 |
printf( "\n ===== (de)quant4_inter saturation bug? =====\n" ); |
printf( "\n ===== (de)quant4_inter saturation bug? =====\n" ); |
1175 |
|
|
1176 |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
1177 |
{ |
{ |
1178 |
int i; |
int i; |
1179 |
int16_t Src[8*8], Dst[8*8]; |
int16_t Src[8*8], Dst[8*8]; |
1183 |
|
|
1184 |
for(i=0; i<64; ++i) Src[i] = i-32; |
for(i=0; i<64; ++i) Src[i] = i-32; |
1185 |
set_inter_matrix( get_default_inter_matrix() ); |
set_inter_matrix( get_default_inter_matrix() ); |
1186 |
dequant_mpeg_inter(Dst, Src, 31); |
dequant4_inter(Dst, Src, 31); |
1187 |
printf( "dequant_mpeg_inter with CPU=%s: ", cpu->name); |
printf( "dequant4_inter with CPU=%s: ", cpu->name); |
1188 |
printf( " Out[]= " ); |
printf( " Out[]= " ); |
1189 |
for(i=0; i<64; ++i) printf( "[%d]", Dst[i]); |
for(i=0; i<64; ++i) printf( "[%d]", Dst[i]); |
1190 |
printf( "\n" ); |
printf( "\n" ); |
1198 |
|
|
1199 |
printf( "\n ===== fdct/idct precision diffs =====\n" ); |
printf( "\n ===== fdct/idct precision diffs =====\n" ); |
1200 |
|
|
1201 |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
1202 |
{ |
{ |
1203 |
int i; |
int i; |
1204 |
|
|
1251 |
|
|
1252 |
for(q=1; q<=max_Q; ++q) { |
for(q=1; q<=max_Q; ++q) { |
1253 |
emms(); |
emms(); |
1254 |
quant_mpeg_inter( Dst, Src, q ); |
quant4_inter( Dst, Src, q ); |
1255 |
emms(); |
emms(); |
1256 |
for(s=0, i=0; i<64; ++i) s+=((uint16_t)Dst[i])^i; |
for(s=0, i=0; i<64; ++i) s+=((uint16_t)Dst[i])^i; |
1257 |
Crcs_Inter[n][q] = s; |
Crcs_Inter[n][q] = s; |
1281 |
|
|
1282 |
for(q=1; q<=max_Q; ++q) { |
for(q=1; q<=max_Q; ++q) { |
1283 |
emms(); |
emms(); |
1284 |
quant_mpeg_intra( Dst, Src, q, q); |
quant4_intra( Dst, Src, q, q); |
1285 |
emms(); |
emms(); |
1286 |
for(s=0, i=0; i<64; ++i) s+=((uint16_t)Dst[i])^i; |
for(s=0, i=0; i<64; ++i) s+=((uint16_t)Dst[i])^i; |
1287 |
Crcs_Intra[n][q] = s; |
Crcs_Intra[n][q] = s; |
1314 |
|
|
1315 |
if (what==7) { |
if (what==7) { |
1316 |
test_IEEE1180_compliance(-256, 255, 1); |
test_IEEE1180_compliance(-256, 255, 1); |
1317 |
|
#if 0 |
1318 |
test_IEEE1180_compliance(-256, 255,-1); |
test_IEEE1180_compliance(-256, 255,-1); |
1319 |
test_IEEE1180_compliance( -5, 5, 1); |
test_IEEE1180_compliance( -5, 5, 1); |
1320 |
test_IEEE1180_compliance( -5, 5,-1); |
test_IEEE1180_compliance( -5, 5,-1); |
1321 |
test_IEEE1180_compliance(-300, 300, 1); |
test_IEEE1180_compliance(-300, 300, 1); |
1322 |
test_IEEE1180_compliance(-300, 300,-1); |
test_IEEE1180_compliance(-300, 300,-1); |
1323 |
|
#endif |
1324 |
} |
} |
1325 |
if (what==8) test_dct_saturation(-256, 255); |
if (what==8) test_dct_saturation(-256, 255); |
1326 |
|
|
1346 |
} |
} |
1347 |
|
|
1348 |
/********************************************************************* |
/********************************************************************* |
1349 |
* 'Reference' output (except for timing) on an Athlon XP 2200+ |
* 'Reference' output (except for timing) on a PIII 1.13Ghz/linux |
1350 |
*********************************************************************/ |
*********************************************************************/ |
1351 |
|
|
1352 |
/* as of 07/01/2002, there's a problem with MMX mpeg4-quantization */ |
/* as of 07/01/2002, there's a problem with mpeg4-quantization */ |
1353 |
/* |
/* |
1354 |
|
|
1355 |
===== test fdct/idct ===== |
===== test fdct/idct ===== |
1356 |
PLAINC - 1.446 usec PSNR=13.291 MSE=3.000 |
PLAINC - 3.312 usec PSNR=13.291 MSE=3.000 |
1357 |
MMX - -0.260 usec PSNR=9.611 MSE=7.000 |
MMX - 0.591 usec PSNR=13.291 MSE=3.000 |
1358 |
MMXEXT - -0.293 usec PSNR=9.611 MSE=7.000 |
MMXEXT - 0.577 usec PSNR=13.291 MSE=3.000 |
1359 |
3DNOW - 1.535 usec PSNR=13.291 MSE=3.000 |
SSE2 - 0.588 usec PSNR=13.291 MSE=3.000 |
1360 |
3DNOWE - 0.376 usec PSNR=13.291 MSE=3.000 |
3DNOW - skipped... |
1361 |
|
3DNOWE - skipped... |
1362 |
|
|
1363 |
=== test block motion === |
=== test block motion === |
1364 |
PLAINC - interp- h-round0 0.126 usec iCrc=8107 |
PLAINC - interp- h-round0 0.911 usec iCrc=8107 |
1365 |
PLAINC - round1 0.136 usec iCrc=8100 |
PLAINC - round1 0.863 usec iCrc=8100 |
1366 |
PLAINC - interp- v-round0 0.121 usec iCrc=8108 |
PLAINC - interp- v-round0 0.860 usec iCrc=8108 |
1367 |
PLAINC - round1 0.127 usec iCrc=8105 |
PLAINC - round1 0.857 usec iCrc=8105 |
1368 |
PLAINC - interp-hv-round0 0.192 usec iCrc=8112 |
PLAINC - interp-hv-round0 2.103 usec iCrc=8112 |
1369 |
PLAINC - round1 0.213 usec iCrc=8103 |
PLAINC - round1 2.050 usec iCrc=8103 |
1370 |
--- |
--- |
1371 |
MMX - interp- h-round0 0.048 usec iCrc=8107 |
MMX - interp- h-round0 0.105 usec iCrc=8107 |
1372 |
MMX - round1 0.048 usec iCrc=8100 |
MMX - round1 0.106 usec iCrc=8100 |
1373 |
MMX - interp- v-round0 0.046 usec iCrc=8108 |
MMX - interp- v-round0 0.106 usec iCrc=8108 |
1374 |
MMX - round1 0.047 usec iCrc=8105 |
MMX - round1 0.106 usec iCrc=8105 |
1375 |
MMX - interp-hv-round0 0.074 usec iCrc=8112 |
MMX - interp-hv-round0 0.145 usec iCrc=8112 |
1376 |
MMX - round1 0.074 usec iCrc=8103 |
MMX - round1 0.145 usec iCrc=8103 |
1377 |
--- |
--- |
1378 |
MMXEXT - interp- h-round0 0.019 usec iCrc=8107 |
MMXEXT - interp- h-round0 0.028 usec iCrc=8107 |
1379 |
MMXEXT - round1 0.025 usec iCrc=8100 |
MMXEXT - round1 0.041 usec iCrc=8100 |
1380 |
MMXEXT - interp- v-round0 0.015 usec iCrc=8108 |
MMXEXT - interp- v-round0 0.027 usec iCrc=8108 |
1381 |
MMXEXT - round1 0.024 usec iCrc=8105 |
MMXEXT - round1 0.041 usec iCrc=8105 |
1382 |
MMXEXT - interp-hv-round0 0.039 usec iCrc=8112 |
MMXEXT - interp-hv-round0 0.066 usec iCrc=8112 |
1383 |
MMXEXT - round1 0.037 usec iCrc=8103 |
MMXEXT - round1 0.065 usec iCrc=8103 |
1384 |
--- |
--- |
1385 |
3DNOW - interp- h-round0 0.019 usec iCrc=8107 |
SSE2 - interp- h-round0 0.109 usec iCrc=8107 |
1386 |
3DNOW - round1 0.023 usec iCrc=8100 |
SSE2 - round1 0.105 usec iCrc=8100 |
1387 |
3DNOW - interp- v-round0 0.015 usec iCrc=8108 |
SSE2 - interp- v-round0 0.106 usec iCrc=8108 |
1388 |
3DNOW - round1 0.024 usec iCrc=8105 |
SSE2 - round1 0.109 usec iCrc=8105 |
1389 |
3DNOW - interp-hv-round0 0.037 usec iCrc=8112 |
SSE2 - interp-hv-round0 0.145 usec iCrc=8112 |
1390 |
3DNOW - round1 0.038 usec iCrc=8103 |
SSE2 - round1 0.145 usec iCrc=8103 |
|
--- |
|
|
3DNOWE - interp- h-round0 0.022 usec iCrc=8107 |
|
|
3DNOWE - round1 0.023 usec iCrc=8100 |
|
|
3DNOWE - interp- v-round0 0.016 usec iCrc=8108 |
|
|
3DNOWE - round1 0.021 usec iCrc=8105 |
|
|
3DNOWE - interp-hv-round0 0.036 usec iCrc=8112 |
|
|
3DNOWE - round1 0.036 usec iCrc=8103 |
|
1391 |
--- |
--- |
1392 |
|
3DNOW - skipped... |
1393 |
|
3DNOWE - skipped... |
1394 |
|
|
1395 |
====== test SAD ====== |
====== test SAD ====== |
1396 |
PLAINC - sad8 0.165 usec sad=3776 |
PLAINC - sad8 0.251 usec sad=3776 |
1397 |
PLAINC - sad16 0.587 usec sad=27214 |
PLAINC - sad16 1.601 usec sad=27214 |
1398 |
PLAINC - sad16bi 1.290 usec sad=26274 |
PLAINC - sad16bi 2.371 usec sad=26274 |
1399 |
PLAINC - dev16 1.535 usec sad=3344 |
PLAINC - dev16 1.564 usec sad=3344 |
1400 |
--- |
--- |
1401 |
MMX - sad8 0.036 usec sad=3776 |
MMX - sad8 0.057 usec sad=3776 |
1402 |
MMX - sad16 0.113 usec sad=27214 |
MMX - sad16 0.182 usec sad=27214 |
1403 |
MMX - sad16bi 0.250 usec sad=26274 |
MMX - sad16bi 2.462 usec sad=26274 |
1404 |
MMX - dev16 0.187 usec sad=3344 |
MMX - dev16 0.311 usec sad=3344 |
1405 |
--- |
--- |
1406 |
MMXEXT - sad8 0.015 usec sad=3776 |
MMXEXT - sad8 0.036 usec sad=3776 |
1407 |
MMXEXT - sad16 0.046 usec sad=27214 |
MMXEXT - sad16 0.109 usec sad=27214 |
1408 |
MMXEXT - sad16bi 0.059 usec sad=26274 |
MMXEXT - sad16bi 0.143 usec sad=26274 |
1409 |
MMXEXT - dev16 0.088 usec sad=3344 |
MMXEXT - dev16 0.192 usec sad=3344 |
1410 |
--- |
--- |
1411 |
3DNOW - sad8 0.165 usec sad=3776 |
SSE2 - sad8 0.057 usec sad=3776 |
1412 |
3DNOW - sad16 0.589 usec sad=27214 |
SSE2 - sad16 0.179 usec sad=27214 |
1413 |
3DNOW - sad16bi 0.119 usec sad=26274 |
SSE2 - sad16bi 2.456 usec sad=26274 |
1414 |
3DNOW - dev16 1.541 usec sad=3344 |
SSE2 - dev16 0.321 usec sad=3344 |
|
--- |
|
|
3DNOWE - sad8 0.018 usec sad=3776 |
|
|
3DNOWE - sad16 0.039 usec sad=27214 |
|
|
3DNOWE - sad16bi 0.051 usec sad=26274 |
|
|
3DNOWE - dev16 0.070 usec sad=3344 |
|
1415 |
--- |
--- |
1416 |
|
3DNOW - skipped... |
1417 |
|
3DNOWE - skipped... |
1418 |
|
|
1419 |
=== test transfer === |
=== test transfer === |
1420 |
PLAINC - 8to16 0.207 usec crc=28288 |
PLAINC - 8to16 0.151 usec crc=28288 |
1421 |
PLAINC - 16to8 0.357 usec crc=28288 |
PLAINC - 16to8 1.113 usec crc=28288 |
1422 |
PLAINC - 8to8 0.154 usec crc=20352 |
PLAINC - 8to8 0.043 usec crc=20352 |
1423 |
PLAINC - 16to8add 0.391 usec crc=25536 |
PLAINC - 16to8add 1.069 usec crc=25536 |
1424 |
PLAINC - 8to16sub 0.562 usec crc1=28064 crc2=16256 |
PLAINC - 8to16sub 0.631 usec crc1=28064 crc2=16256 |
1425 |
PLAINC - 8to16sub2 0.519 usec crc=22368 |
PLAINC - 8to16sub2 0.597 usec crc=20384 |
1426 |
--- |
--- |
1427 |
MMX - 8to16 0.048 usec crc=28288 |
MMX - 8to16 0.032 usec crc=28288 |
1428 |
MMX - 16to8 0.205 usec crc=28288 |
MMX - 16to8 0.024 usec crc=28288 |
1429 |
MMX - 8to8 -0.158 usec crc=20352 |
MMX - 8to8 0.020 usec crc=20352 |
1430 |
MMX - 16to8add 0.015 usec crc=25536 |
MMX - 16to8add 0.043 usec crc=25536 |
1431 |
MMX - 8to16sub 0.203 usec crc1=28064 crc2=16256 |
MMX - 8to16sub 0.066 usec crc1=28064 crc2=16256 |
1432 |
MMX - 8to16sub2 0.087 usec crc=22368 |
MMX - 8to16sub2 0.111 usec crc=20384 |
|
--- |
|
|
MMXEXT - 8to16 0.013 usec crc=28288 |
|
|
MMXEXT - 16to8 0.011 usec crc=28288 |
|
|
MMXEXT - 8to8 -0.023 usec crc=20352 |
|
|
MMXEXT - 16to8add 0.023 usec crc=25536 |
|
|
MMXEXT - 8to16sub 0.072 usec crc1=28064 crc2=16256 |
|
|
MMXEXT - 8to16sub2 0.093 usec crc=22368 |
|
|
--- |
|
|
3DNOW - 8to16 0.192 usec crc=28288 |
|
|
3DNOW - 16to8 0.367 usec crc=28288 |
|
|
3DNOW - 8to8 0.132 usec crc=20352 |
|
|
3DNOW - 16to8add 0.440 usec crc=25536 |
|
|
3DNOW - 8to16sub 0.557 usec crc1=28064 crc2=16256 |
|
|
3DNOW - 8to16sub2 0.691 usec crc=22368 |
|
|
--- |
|
|
3DNOWE - 8to16 0.004 usec crc=28288 |
|
|
3DNOWE - 16to8 0.019 usec crc=28288 |
|
|
3DNOWE - 8to8 -0.294 usec crc=20352 |
|
|
3DNOWE - 16to8add 0.028 usec crc=25536 |
|
|
3DNOWE - 8to16sub 0.065 usec crc1=28064 crc2=16256 |
|
|
3DNOWE - 8to16sub2 0.027 usec crc=22368 |
|
1433 |
--- |
--- |
1434 |
|
|
1435 |
===== test quant ===== |
===== test quant ===== |
1436 |
PLAINC - quant_mpeg_intra 67.757 usec crc=29809 |
PLAINC - quant4_intra 74.248 usec crc=29809 |
1437 |
PLAINC - quant_mpeg_inter 68.482 usec crc=12574 |
PLAINC - quant4_inter 70.850 usec crc=12574 |
1438 |
PLAINC - dequant_mpeg_intra 20.764 usec crc=24052 |
PLAINC - dequant4_intra 40.628 usec crc=24052 |
1439 |
PLAINC - dequant_mpeg_inter 24.413 usec crc=63847 |
PLAINC - dequant4_inter 45.691 usec crc=63847 |
1440 |
PLAINC - quant_h263_intra 16.446 usec crc=25662 |
PLAINC - quant_intra 43.357 usec crc=25662 |
1441 |
PLAINC - quant_h263_inter 14.499 usec crc=23972 |
PLAINC - quant_inter 33.410 usec crc=23972 |
1442 |
PLAINC - dequant_h263_intra 16.419 usec crc=49900 |
PLAINC - dequant_intra 36.384 usec crc=49900 |
1443 |
PLAINC - dequant_h263_inter 18.679 usec crc=48899 |
PLAINC - dequant_inter 48.930 usec crc=48899 |
1444 |
--- |
--- |
1445 |
MMX - quant_mpeg_intra 8.299 usec crc=3459 |
MMX - quant4_intra 7.445 usec crc=3459 |
1446 |
*** CRC ERROR! *** |
*** CRC ERROR! *** |
1447 |
MMX - quant_mpeg_inter 7.078 usec crc=13247 |
MMX - quant4_inter 5.384 usec crc=51072 |
1448 |
*** CRC ERROR! *** |
*** CRC ERROR! *** |
1449 |
MMX - dequant_mpeg_intra 3.455 usec crc=24052 |
MMX - dequant4_intra 5.515 usec crc=24052 |
1450 |
MMX - dequant_mpeg_inter 4.483 usec crc=63847 |
MMX - dequant4_inter 7.745 usec crc=63847 |
1451 |
MMX - quant_h263_intra 2.597 usec crc=25662 |
MMX - quant_intra 4.661 usec crc=25662 |
1452 |
MMX - quant_h263_inter 2.151 usec crc=23972 |
MMX - quant_inter 4.406 usec crc=23972 |
1453 |
MMX - dequant_h263_intra 2.684 usec crc=49900 |
MMX - dequant_intra 4.928 usec crc=49900 |
1454 |
MMX - dequant_h263_inter 2.647 usec crc=48899 |
MMX - dequant_inter 4.532 usec crc=48899 |
|
--- |
|
|
MMXEXT - quant_mpeg_intra 3.878 usec crc=29809 |
|
|
MMXEXT - quant_mpeg_inter 4.112 usec crc=12574 |
|
|
MMXEXT - dequant_mpeg_intra 3.452 usec crc=24052 |
|
|
MMXEXT - dequant_mpeg_inter 4.473 usec crc=63847 |
|
|
MMXEXT - quant_h263_intra 2.608 usec crc=25662 |
|
|
MMXEXT - quant_h263_inter 2.145 usec crc=23972 |
|
|
MMXEXT - dequant_h263_intra 2.478 usec crc=49900 |
|
|
MMXEXT - dequant_h263_inter 2.450 usec crc=48899 |
|
|
--- |
|
|
3DNOW - quant_mpeg_intra 66.051 usec crc=29809 |
|
|
3DNOW - quant_mpeg_inter 73.494 usec crc=12574 |
|
|
3DNOW - dequant_mpeg_intra 20.374 usec crc=24052 |
|
|
3DNOW - dequant_mpeg_inter 23.645 usec crc=63847 |
|
|
3DNOW - quant_h263_intra 16.292 usec crc=25662 |
|
|
3DNOW - quant_h263_inter 14.322 usec crc=23972 |
|
|
3DNOW - dequant_h263_intra 16.613 usec crc=49900 |
|
|
3DNOW - dequant_h263_inter 18.382 usec crc=48899 |
|
|
--- |
|
|
3DNOWE - quant_mpeg_intra 66.140 usec crc=29809 |
|
|
3DNOWE - quant_mpeg_inter 68.454 usec crc=12574 |
|
|
3DNOWE - dequant_mpeg_intra 2.881 usec crc=24052 |
|
|
3DNOWE - dequant_mpeg_inter 4.155 usec crc=63847 |
|
|
3DNOWE - quant_h263_intra 1.451 usec crc=25662 |
|
|
3DNOWE - quant_h263_inter 1.849 usec crc=23972 |
|
|
3DNOWE - dequant_h263_intra 2.101 usec crc=49900 |
|
|
3DNOWE - dequant_h263_inter 2.109 usec crc=48899 |
|
1455 |
--- |
--- |
1456 |
|
|
1457 |
===== test cbp ===== |
===== test cbp ===== |
1458 |
PLAINC - calc_cbp#1 0.090 usec cbp=0x15 |
PLAINC - calc_cbp#1 0.371 usec cbp=0x15 |
1459 |
PLAINC - calc_cbp#2 0.086 usec cbp=0x38 |
PLAINC - calc_cbp#2 0.432 usec cbp=0x38 |
1460 |
PLAINC - calc_cbp#3 0.087 usec cbp=0xf |
PLAINC - calc_cbp#3 0.339 usec cbp=0xf |
1461 |
PLAINC - calc_cbp#4 0.114 usec cbp=0x5 |
PLAINC - calc_cbp#4 0.506 usec cbp=0x5 |
1462 |
--- |
--- |
1463 |
MMX - calc_cbp#1 0.061 usec cbp=0x15 |
MMX - calc_cbp#1 0.136 usec cbp=0x15 |
1464 |
MMX - calc_cbp#2 0.063 usec cbp=0x38 |
MMX - calc_cbp#2 0.134 usec cbp=0x38 |
1465 |
MMX - calc_cbp#3 0.061 usec cbp=0xf |
MMX - calc_cbp#3 0.138 usec cbp=0xf |
1466 |
MMX - calc_cbp#4 0.060 usec cbp=0x5 |
MMX - calc_cbp#4 0.135 usec cbp=0x5 |
1467 |
--- |
--- |
1468 |
MMXEXT - calc_cbp#1 0.062 usec cbp=0x15 |
SSE2 - calc_cbp#1 0.136 usec cbp=0x15 |
1469 |
MMXEXT - calc_cbp#2 0.060 usec cbp=0x38 |
SSE2 - calc_cbp#2 0.133 usec cbp=0x38 |
1470 |
MMXEXT - calc_cbp#3 0.062 usec cbp=0xf |
SSE2 - calc_cbp#3 0.133 usec cbp=0xf |
1471 |
MMXEXT - calc_cbp#4 0.061 usec cbp=0x5 |
SSE2 - calc_cbp#4 0.141 usec cbp=0x5 |
|
--- |
|
|
3DNOW - calc_cbp#1 0.089 usec cbp=0x15 |
|
|
3DNOW - calc_cbp#2 0.087 usec cbp=0x38 |
|
|
3DNOW - calc_cbp#3 0.087 usec cbp=0xf |
|
|
3DNOW - calc_cbp#4 0.116 usec cbp=0x5 |
|
|
--- |
|
|
3DNOWE - calc_cbp#1 0.050 usec cbp=0x15 |
|
|
3DNOWE - calc_cbp#2 0.051 usec cbp=0x38 |
|
|
3DNOWE - calc_cbp#3 0.050 usec cbp=0xf |
|
|
3DNOWE - calc_cbp#4 0.049 usec cbp=0x5 |
|
1472 |
--- |
--- |
1473 |
|
|
1474 |
*/ |
*/ |