1 |
/************************************************************************** |
/***************************************************************************** |
2 |
* |
* |
3 |
* XVID MPEG-4 VIDEO CODEC - Unit tests and benches |
* XVID MPEG-4 VIDEO CODEC |
4 |
|
* - Unit tests and benches - |
5 |
|
* |
6 |
|
* Copyright(C) 2002 Pascal Massimino <skal@planet-d.net> |
7 |
* |
* |
8 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
9 |
* 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 |
17 |
* |
* |
18 |
* You should have received a copy of the GNU General Public License |
* You should have received a copy of the GNU General Public License |
19 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
20 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
|
* |
22 |
|
* $Id$ |
23 |
* |
* |
24 |
*************************************************************************/ |
****************************************************************************/ |
25 |
|
|
26 |
/************************************************************************ |
/***************************************************************************** |
27 |
* |
* |
28 |
* 'Reference' output is at the end of file. |
* 'Reference' output is at the end of file. |
29 |
* Don't take the checksums and crc too seriouly, they aren't |
* Don't take the checksums and crc too seriouly, they aren't |
32 |
* compiles with something like: |
* compiles with something like: |
33 |
* gcc -o xvid_bench xvid_bench.c -I../src/ -lxvidcore -lm |
* gcc -o xvid_bench xvid_bench.c -I../src/ -lxvidcore -lm |
34 |
* |
* |
35 |
* History: |
****************************************************************************/ |
|
* |
|
|
* 06.06.2002 initial coding -Skal- |
|
|
* |
|
|
*************************************************************************/ |
|
36 |
|
|
37 |
#include <stdio.h> |
#include <stdio.h> |
38 |
#include <stdlib.h> |
#include <stdlib.h> |
39 |
#include <sys/time.h> // for gettimeofday |
#include <string.h> /* for memset */ |
|
#include <string.h> // for memset |
|
40 |
#include <assert.h> |
#include <assert.h> |
41 |
|
|
42 |
|
#ifndef WIN32 |
43 |
|
#include <sys/time.h> /* for gettimeofday */ |
44 |
|
#else |
45 |
|
#include <time.h> |
46 |
|
#endif |
47 |
|
|
48 |
|
|
49 |
#include "xvid.h" |
#include "xvid.h" |
50 |
|
|
51 |
// inner guts |
// inner guts |
54 |
#include "image/colorspace.h" |
#include "image/colorspace.h" |
55 |
#include "image/interpolate8x8.h" |
#include "image/interpolate8x8.h" |
56 |
#include "utils/mem_transfer.h" |
#include "utils/mem_transfer.h" |
57 |
#include "quant/quant_h263.h" |
#include "quant/quant.h" |
|
#include "quant/quant_mpeg4.h" |
|
58 |
#include "motion/sad.h" |
#include "motion/sad.h" |
59 |
#include "utils/emms.h" |
#include "utils/emms.h" |
60 |
#include "utils/timer.h" |
#include "utils/timer.h" |
62 |
#include "bitstream/cbp.h" |
#include "bitstream/cbp.h" |
63 |
|
|
64 |
#include <math.h> |
#include <math.h> |
65 |
const int speed_ref = 100; // on slow machines, decrease this value |
|
66 |
|
#ifndef M_PI |
67 |
|
#define M_PI 3.14159265358979323846 |
68 |
|
#endif |
69 |
|
|
70 |
|
const int speed_ref = 100; /* on slow machines, decrease this value */ |
71 |
|
|
72 |
/********************************************************************* |
/********************************************************************* |
73 |
* misc |
* misc |
76 |
/* returns time in micro-s*/ |
/* returns time in micro-s*/ |
77 |
double gettime_usec() |
double gettime_usec() |
78 |
{ |
{ |
79 |
|
#ifndef WIN32 |
80 |
struct timeval tv; |
struct timeval tv; |
81 |
gettimeofday(&tv, 0); |
gettimeofday(&tv, 0); |
82 |
return tv.tv_sec*1.0e6 + tv.tv_usec; |
return tv.tv_sec*1.0e6 + tv.tv_usec; |
83 |
|
#else |
84 |
|
clock_t clk; |
85 |
|
clk = clock(); |
86 |
|
return clk * 1000000 / CLOCKS_PER_SEC; |
87 |
|
#endif |
88 |
} |
} |
89 |
|
|
90 |
/* returns squared deviates (mean(v*v)-mean(v)^2) of a 8x8 block */ |
/* returns squared deviates (mean(v*v)-mean(v)^2) of a 8x8 block */ |
114 |
|
|
115 |
CPU cpu_list[] = |
CPU cpu_list[] = |
116 |
{ { "PLAINC", 0 } |
{ { "PLAINC", 0 } |
117 |
|
#ifdef ARCH_IS_IA32 |
118 |
, { "MMX ", XVID_CPU_MMX } |
, { "MMX ", XVID_CPU_MMX } |
119 |
, { "MMXEXT", XVID_CPU_MMXEXT | XVID_CPU_MMX } |
, { "MMXEXT", XVID_CPU_MMXEXT | XVID_CPU_MMX } |
120 |
, { "SSE2 ", XVID_CPU_SSE2 | XVID_CPU_MMX } |
, { "SSE2 ", XVID_CPU_SSE2 | XVID_CPU_MMX } |
121 |
, { "3DNOW ", XVID_CPU_3DNOW } |
, { "3DNOW ", XVID_CPU_3DNOW } |
122 |
, { "3DNOWE", XVID_CPU_3DNOWEXT } |
, { "3DNOWE", XVID_CPU_3DNOWEXT } |
123 |
, { "IA64 ", XVID_CPU_IA64 } |
#endif |
124 |
|
//, { "IA64 ", XVID_CPU_IA64 } |
125 |
//, { "TSC ", XVID_CPU_TSC } |
//, { "TSC ", XVID_CPU_TSC } |
126 |
, { 0, 0 } } |
, { 0, 0 } }; |
127 |
|
|
128 |
, cpu_short_list[] = |
CPU cpu_short_list[] = |
129 |
{ { "PLAINC", 0 } |
{ { "PLAINC", 0 } |
130 |
|
#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 |
, { "IA64 ", XVID_CPU_IA64 } |
#endif |
134 |
, { 0, 0 } } |
//, { "IA64 ", XVID_CPU_IA64 } |
135 |
|
, { 0, 0 } }; |
136 |
|
|
137 |
, cpu_short_list2[] = |
CPU cpu_short_list2[] = |
138 |
{ { "PLAINC", 0 } |
{ { "PLAINC", 0 } |
139 |
|
#ifdef ARCH_IS_IA32 |
140 |
, { "MMX ", XVID_CPU_MMX } |
, { "MMX ", XVID_CPU_MMX } |
141 |
, { "SSE2 ", XVID_CPU_SSE2 | XVID_CPU_MMX } |
, { "SSE2 ", XVID_CPU_SSE2 | XVID_CPU_MMX } |
142 |
|
#endif |
143 |
, { 0, 0 } }; |
, { 0, 0 } }; |
144 |
|
|
145 |
|
|
146 |
int init_cpu(CPU *cpu) |
int init_cpu(CPU *cpu) |
147 |
{ |
{ |
148 |
int xerr, cpu_type; |
xvid_gbl_info_t xinfo; |
149 |
XVID_INIT_PARAM xinit; |
|
150 |
|
/* Get the available CPU flags */ |
151 |
|
memset(&xinfo, 0, sizeof(xinfo)); |
152 |
|
xinfo.version = XVID_VERSION; |
153 |
|
xvid_global(NULL, XVID_GBL_INFO, &xinfo, NULL); |
154 |
|
|
155 |
cpu_type = check_cpu_features() & cpu->cpu; |
/* Are we trying to test a subset of the host CPU features */ |
156 |
xinit.cpu_flags = cpu_type | XVID_CPU_FORCE; |
if ((xinfo.cpu_flags & cpu->cpu) == cpu->cpu) { |
157 |
// xinit.cpu_flags = XVID_CPU_MMX | XVID_CPU_FORCE; |
int xerr; |
158 |
xerr = xvid_init(NULL, 0, &xinit, NULL); |
xvid_gbl_init_t xinit; |
159 |
if (cpu->cpu>0 && (cpu_type==0 || xerr!=XVID_ERR_OK)) { |
memset(&xinit, 0, sizeof(xinit)); |
160 |
printf( "%s - skipped...\n", cpu->name ); |
xinit.cpu_flags = cpu->cpu | XVID_CPU_FORCE; |
161 |
|
xinit.version = XVID_VERSION; |
162 |
|
xerr = xvid_global(NULL, XVID_GBL_INIT, &xinit, NULL); |
163 |
|
if (xerr==XVID_ERR_FAIL) { |
164 |
|
/* libxvidcore failed to init */ |
165 |
return 0; |
return 0; |
166 |
} |
} |
167 |
|
} else { |
168 |
|
/* The host CPU doesn't support some required feature for this test */ |
169 |
|
return(0); |
170 |
|
} |
171 |
return 1; |
return 1; |
172 |
} |
} |
173 |
|
|
183 |
int tst; |
int tst; |
184 |
CPU *cpu; |
CPU *cpu; |
185 |
int i; |
int i; |
186 |
short iDst0[8*8], iDst[8*8], fDst[8*8]; |
DECLARE_ALIGNED_MATRIX(iDst0, 8, 8, short, 16); |
187 |
|
DECLARE_ALIGNED_MATRIX(iDst, 8, 8, short, 16); |
188 |
|
DECLARE_ALIGNED_MATRIX(fDst, 8, 8, short, 16); |
189 |
double overhead; |
double overhead; |
190 |
|
|
191 |
printf( "\n ===== test fdct/idct =====\n" ); |
printf( "\n ===== test fdct/idct =====\n" ); |
322 |
const int nb_tests = 2000*speed_ref; |
const int nb_tests = 2000*speed_ref; |
323 |
CPU *cpu; |
CPU *cpu; |
324 |
const uint8_t Src0[16*9] = { |
const uint8_t Src0[16*9] = { |
325 |
// try to have every possible combinaison of rounding... |
/* try to have every possible combinaison of rounding... */ |
326 |
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 |
327 |
, 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 |
328 |
, 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 |
372 |
if (iCrc!=8103) printf( "*** CRC ERROR! ***\n" ); |
if (iCrc!=8103) printf( "*** CRC ERROR! ***\n" ); |
373 |
|
|
374 |
|
|
375 |
// this is a new function, as of 06.06.2002 |
/* this is a new function, as of 06.06.2002 */ |
376 |
#if 0 |
#if 0 |
377 |
TEST_MB2(interpolate8x8_avrg); |
TEST_MB2(interpolate8x8_avrg); |
378 |
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 ); |
460 |
|
|
461 |
printf( "\n === test transfer ===\n" ); |
printf( "\n === test transfer ===\n" ); |
462 |
|
|
463 |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
464 |
{ |
{ |
465 |
double t, overhead; |
double t, overhead; |
466 |
int tst, s; |
int tst, s; |
490 |
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; } |
491 |
printf( "crc2=%d\n", s); |
printf( "crc2=%d\n", s); |
492 |
if (s!=16256) printf( "*** CRC ERROR! ***\n" ); |
if (s!=16256) printf( "*** CRC ERROR! ***\n" ); |
493 |
#if 1 |
|
494 |
TEST_TRANSFER3(transfer_8to16sub2, Dst16, Src8, Ref1, Ref2); |
TEST_TRANSFER3(transfer_8to16sub2, Dst16, Src8, Ref1, Ref2); |
495 |
printf( "%s - 8to16sub2 %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - 8to16sub2 %.3f usec crc=%d\n", cpu->name, t, s ); |
496 |
if (s!=20384) printf( "*** CRC ERROR! ***\n" ); |
if (s!=22368) printf( "*** CRC ERROR! ***\n" ); |
497 |
// for(i=0; i<64; ++i) printf( "[%d]", Dst16[i]); |
|
|
// printf("\n"); |
|
|
#endif |
|
498 |
printf( " --- \n" ); |
printf( " --- \n" ); |
499 |
} |
} |
500 |
} |
} |
546 |
|
|
547 |
printf( "\n ===== test quant =====\n" ); |
printf( "\n ===== test quant =====\n" ); |
548 |
|
|
549 |
// we deliberately enfringe the norm's specified range [-127,127], |
/* we deliberately enfringe the norm's specified range [-127,127], */ |
550 |
// to test the robustness of the iquant module |
/* to test the robustness of the iquant module */ |
551 |
for(i=0; i<64; ++i) { |
for(i=0; i<64; ++i) { |
552 |
Src[i] = 1 + (i-32) * (i&6); |
Src[i] = 1 + (i-32) * (i&6); |
553 |
Dst[i] = 0; |
Dst[i] = 0; |
554 |
} |
} |
555 |
|
|
556 |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
557 |
{ |
{ |
558 |
double t, overhead; |
double t, overhead; |
559 |
int tst, q; |
int tst, q; |
572 |
overhead += gettime_usec(); |
overhead += gettime_usec(); |
573 |
|
|
574 |
#if 1 |
#if 1 |
575 |
TEST_QUANT2(quant4_intra, Dst, Src); |
TEST_QUANT2(quant_mpeg_intra, Dst, Src); |
576 |
printf( "%s - quant4_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - quant_mpeg_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
577 |
if (s!=29809) printf( "*** CRC ERROR! ***\n" ); |
if (s!=29809) printf( "*** CRC ERROR! ***\n" ); |
578 |
|
|
579 |
TEST_QUANT(quant4_inter, Dst, Src); |
TEST_QUANT(quant_mpeg_inter, Dst, Src); |
580 |
printf( "%s - quant4_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - quant_mpeg_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
581 |
if (s!=12574) printf( "*** CRC ERROR! ***\n" ); |
if (s!=12574) printf( "*** CRC ERROR! ***\n" ); |
582 |
#endif |
#endif |
583 |
#if 1 |
#if 1 |
584 |
TEST_QUANT2(dequant4_intra, Dst, Src); |
TEST_QUANT2(dequant_mpeg_intra, Dst, Src); |
585 |
printf( "%s - dequant4_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - dequant_mpeg_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
586 |
if (s!=24052) printf( "*** CRC ERROR! ***\n" ); |
if (s!=24052) printf( "*** CRC ERROR! ***\n" ); |
587 |
|
|
588 |
TEST_QUANT(dequant4_inter, Dst, Src); |
TEST_QUANT(dequant_mpeg_inter, Dst, Src); |
589 |
printf( "%s - dequant4_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - dequant_mpeg_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
590 |
if (s!=63847) printf( "*** CRC ERROR! ***\n" ); |
if (s!=63847) printf( "*** CRC ERROR! ***\n" ); |
591 |
#endif |
#endif |
592 |
#if 1 |
#if 1 |
593 |
TEST_QUANT2(quant_intra, Dst, Src); |
TEST_QUANT2(quant_h263_intra, Dst, Src); |
594 |
printf( "%s - quant_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - quant_h263_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
595 |
if (s!=25662) printf( "*** CRC ERROR! ***\n" ); |
if (s!=25662) printf( "*** CRC ERROR! ***\n" ); |
596 |
|
|
597 |
TEST_QUANT(quant_inter, Dst, Src); |
TEST_QUANT(quant_h263_inter, Dst, Src); |
598 |
printf( "%s - quant_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - quant_h263_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
599 |
if (s!=23972) printf( "*** CRC ERROR! ***\n" ); |
if (s!=23972) printf( "*** CRC ERROR! ***\n" ); |
600 |
#endif |
#endif |
601 |
#if 1 |
#if 1 |
602 |
TEST_QUANT2(dequant_intra, Dst, Src); |
TEST_QUANT2(dequant_h263_intra, Dst, Src); |
603 |
printf( "%s - dequant_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - dequant_h263_intra %.3f usec crc=%d\n", cpu->name, t, s ); |
604 |
if (s!=49900) printf( "*** CRC ERROR! ***\n" ); |
if (s!=49900) printf( "*** CRC ERROR! ***\n" ); |
605 |
|
|
606 |
TEST_QUANT(dequant_inter, Dst, Src); |
TEST_QUANT(dequant_h263_inter, Dst, Src); |
607 |
printf( "%s - dequant_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
printf( "%s - dequant_h263_inter %.3f usec crc=%d\n", cpu->name, t, s ); |
608 |
if (s!=48899) printf( "*** CRC ERROR! ***\n" ); |
if (s!=48899) printf( "*** CRC ERROR! ***\n" ); |
609 |
#endif |
#endif |
610 |
printf( " --- \n" ); |
printf( " --- \n" ); |
634 |
printf( "\n ===== test cbp =====\n" ); |
printf( "\n ===== test cbp =====\n" ); |
635 |
|
|
636 |
for(i=0; i<6*64; ++i) { |
for(i=0; i<6*64; ++i) { |
637 |
Src1[i] = (i*i*3/8192)&(i/64)&1; // 'random' |
Src1[i] = (i*i*3/8192)&(i/64)&1; /* 'random' */ |
638 |
Src2[i] = (i<3*64); // half-full |
Src2[i] = (i<3*64); /* half-full */ |
639 |
Src3[i] = ((i+32)>3*64); |
Src3[i] = ((i+32)>3*64); |
640 |
Src4[i] = (i==(3*64+2) || i==(5*64+9)); |
Src4[i] = (i==(3*64+2) || i==(5*64+9)); |
641 |
} |
} |
642 |
|
|
643 |
for(cpu = cpu_short_list2; cpu->name!=0; ++cpu) |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
644 |
{ |
{ |
645 |
double t; |
double t; |
646 |
int tst, cbp; |
int tst, cbp; |
790 |
} |
} |
791 |
} |
} |
792 |
|
|
793 |
////////////////////////////////////////////////////////// |
///* ////////////////////////////////////////////////////// */ |
794 |
/* Pseudo-random generator specified by IEEE 1180 */ |
/* Pseudo-random generator specified by IEEE 1180 */ |
795 |
|
|
796 |
static long ieee_seed = 1; |
static long ieee_seed = 1; |
877 |
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 }; |
878 |
int Loops = 10000; |
int Loops = 10000; |
879 |
int i, m, n; |
int i, m, n; |
880 |
short Blk0[64]; // reference |
DECLARE_ALIGNED_MATRIX(Blk0, 8, 8, short, 16); /* reference */ |
881 |
short Blk[64], iBlk[64]; |
DECLARE_ALIGNED_MATRIX(Blk, 8, 8, short, 16); |
882 |
short Ref_FDCT[64]; |
DECLARE_ALIGNED_MATRIX(iBlk, 8, 8, short, 16); |
883 |
short Ref_IDCT[64]; |
DECLARE_ALIGNED_MATRIX(Ref_FDCT, 8, 8, short, 16); |
884 |
|
DECLARE_ALIGNED_MATRIX(Ref_IDCT, 8, 8, short, 16); |
885 |
|
|
886 |
STATS_8x8 FStats; // forward dct stats |
STATS_8x8 FStats; /* forward dct stats */ |
887 |
STATS_8x8 IStats; // inverse dct stats |
STATS_8x8 IStats; /* inverse dct stats */ |
888 |
|
|
889 |
CPU *cpu; |
CPU *cpu; |
890 |
|
|
907 |
for(i=0; i<64; ++i) |
for(i=0; i<64; ++i) |
908 |
Blk0[i] = (short)ieee_rand(Min,Max) * Sign; |
Blk0[i] = (short)ieee_rand(Min,Max) * Sign; |
909 |
|
|
910 |
// hmm, I'm not quite sure this is exactly |
/* hmm, I'm not quite sure this is exactly */ |
911 |
// the tests described in the norm. check... |
/* the tests described in the norm. check... */ |
912 |
|
|
913 |
memcpy(Ref_FDCT, Blk0, 64*sizeof(short)); |
memcpy(Ref_FDCT, Blk0, 64*sizeof(short)); |
914 |
ref_fdct(Ref_FDCT); |
ref_fdct(Ref_FDCT); |
935 |
|
|
936 |
printf( "\n -- FDCT report --\n" ); |
printf( "\n -- FDCT report --\n" ); |
937 |
// print_stats(&FStats); |
// print_stats(&FStats); |
938 |
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 */ |
939 |
|
|
940 |
for(i=0; i<64; i++) Blk[i] = 0; |
for(i=0; i<64; i++) Blk[i] = 0; |
941 |
emms(); fdct(Blk); emms(); |
emms(); fdct(Blk); emms(); |
957 |
|
|
958 |
void test_dct_saturation(int Min, int Max) |
void test_dct_saturation(int Min, int Max) |
959 |
{ |
{ |
960 |
// test behaviour on input range fringe |
/* test behaviour on input range fringe */ |
961 |
|
|
962 |
int i, n, p; |
int i, n, p; |
963 |
CPU *cpu; |
CPU *cpu; |
964 |
// const short IDCT_MAX = 2047; // 12bits input |
// const short IDCT_MAX = 2047; /* 12bits input */ |
965 |
// const short IDCT_MIN = -2048; |
// const short IDCT_MIN = -2048; |
966 |
// const short IDCT_OUT = 256; // 9bits ouput |
// const short IDCT_OUT = 256; /* 9bits ouput */ |
967 |
const int Partitions = 4; |
const int Partitions = 4; |
968 |
const int Loops = 10000 / Partitions; |
const int Loops = 10000 / Partitions; |
969 |
|
|
980 |
printf( "\n===== IEEE test for %s Min=%d Max=%d =====\n", |
printf( "\n===== IEEE test for %s Min=%d Max=%d =====\n", |
981 |
cpu->name, Min, Max ); |
cpu->name, Min, Max ); |
982 |
|
|
983 |
// FDCT tests // |
/* FDCT tests // */ |
984 |
|
|
985 |
init_stats(&Stats); |
init_stats(&Stats); |
986 |
|
|
987 |
// test each computation channels separately |
/* test each computation channels separately */ |
988 |
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; |
989 |
ref_fdct(Blk0); |
ref_fdct(Blk0); |
990 |
emms(); fdct(Blk); emms(); |
emms(); fdct(Blk); emms(); |
995 |
emms(); fdct(Blk); emms(); |
emms(); fdct(Blk); emms(); |
996 |
store_stats(&Stats, Blk, Blk0); |
store_stats(&Stats, Blk, Blk0); |
997 |
|
|
998 |
// randomly saturated inputs |
/* randomly saturated inputs */ |
999 |
for(p=0; p<Partitions; ++p) |
for(p=0; p<Partitions; ++p) |
1000 |
{ |
{ |
1001 |
for(n=0; n<Loops; ++n) |
for(n=0; n<Loops; ++n) |
1011 |
report_stats(&Stats, 0); |
report_stats(&Stats, 0); |
1012 |
|
|
1013 |
|
|
1014 |
// IDCT tests // |
/* IDCT tests // */ |
1015 |
#if 0 |
#if 0 |
1016 |
// no finished yet |
/* no finished yet */ |
1017 |
|
|
1018 |
init_stats(&Stats); |
init_stats(&Stats); |
1019 |
|
|
1020 |
// test each computation channel separately |
/* test each computation channel separately */ |
1021 |
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; |
1022 |
ref_idct(Blk0); |
ref_idct(Blk0); |
1023 |
emms(); idct(Blk); emms(); |
emms(); idct(Blk); emms(); |
1030 |
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); } |
1031 |
store_stats(&Stats, Blk, Blk0); |
store_stats(&Stats, Blk, Blk0); |
1032 |
|
|
1033 |
// randomly saturated inputs |
/* randomly saturated inputs */ |
1034 |
for(p=0; p<Partitions; ++p) |
for(p=0; p<Partitions; ++p) |
1035 |
{ |
{ |
1036 |
for(n=0; n<Loops; ++n) |
for(n=0; n<Loops; ++n) |
1060 |
FILE *f = 0; |
FILE *f = 0; |
1061 |
void *dechandle = 0; |
void *dechandle = 0; |
1062 |
int xerr; |
int xerr; |
1063 |
XVID_INIT_PARAM xinit; |
xvid_gbl_init_t xinit; |
1064 |
XVID_DEC_PARAM xparam; |
xvid_dec_create_t xparam; |
1065 |
XVID_DEC_FRAME xframe; |
xvid_dec_frame_t xframe; |
1066 |
double t = 0.; |
double t = 0.; |
1067 |
int nb = 0; |
int nb = 0; |
1068 |
uint8_t *buf = 0; |
uint8_t *buf = 0; |
1070 |
int buf_size, pos; |
int buf_size, pos; |
1071 |
uint32_t chksum = 0; |
uint32_t chksum = 0; |
1072 |
|
|
1073 |
|
memset(&xinit, 0, sizeof(xinit)); |
1074 |
xinit.cpu_flags = XVID_CPU_MMX | XVID_CPU_FORCE; |
xinit.cpu_flags = XVID_CPU_MMX | XVID_CPU_FORCE; |
1075 |
xvid_init(NULL, 0, &xinit, NULL); |
xinit.version = XVID_VERSION; |
1076 |
printf( "API version: %d, core build:%d\n", xinit.api_version, xinit.core_build); |
xvid_global(NULL, 0, &xinit, NULL); |
|
|
|
1077 |
|
|
1078 |
|
memset(&xparam, 0, sizeof(xparam)); |
1079 |
xparam.width = width; |
xparam.width = width; |
1080 |
xparam.height = height; |
xparam.height = height; |
1081 |
|
xparam.version = XVID_VERSION; |
1082 |
xerr = xvid_decore(NULL, XVID_DEC_CREATE, &xparam, NULL); |
xerr = xvid_decore(NULL, XVID_DEC_CREATE, &xparam, NULL); |
1083 |
if (xerr!=XVID_ERR_OK) { |
if (xerr==XVID_ERR_FAIL) { |
1084 |
printf("can't init decoder (err=%d)\n", xerr); |
printf("can't init decoder (err=%d)\n", xerr); |
1085 |
return; |
return; |
1086 |
} |
} |
1101 |
} |
} |
1102 |
else printf( "Input size: %d\n", buf_size); |
else printf( "Input size: %d\n", buf_size); |
1103 |
|
|
1104 |
buf = malloc(buf_size); // should be enuf' |
buf = malloc(buf_size); /* should be enuf' */ |
1105 |
rgb_out = calloc(4, width*height); // <-room for _RGB24 |
rgb_out = calloc(4, width*height); /* <-room for _RGB24 */ |
1106 |
if (buf==0 || rgb_out==0) { |
if (buf==0 || rgb_out==0) { |
1107 |
printf( "malloc failed!\n" ); |
printf( "malloc failed!\n" ); |
1108 |
goto End; |
goto End; |
1117 |
pos = 0; |
pos = 0; |
1118 |
t = -gettime_usec(); |
t = -gettime_usec(); |
1119 |
while(1) { |
while(1) { |
1120 |
|
memset(&xframe, 0, sizeof(xframe)); |
1121 |
|
xframe.version = XVID_VERSION; |
1122 |
xframe.bitstream = buf + pos; |
xframe.bitstream = buf + pos; |
1123 |
xframe.length = buf_size - pos; |
xframe.length = buf_size - pos; |
1124 |
xframe.image = rgb_out; |
xframe.output.plane[0] = rgb_out; |
1125 |
xframe.stride = width; |
xframe.output.stride[0] = width; |
1126 |
xframe.colorspace = XVID_CSP_RGB24; |
xframe.output.csp = XVID_CSP_BGR; |
1127 |
xerr = xvid_decore(dechandle, XVID_DEC_DECODE, &xframe, 0); |
xerr = xvid_decore(dechandle, XVID_DEC_DECODE, &xframe, 0); |
1128 |
nb++; |
nb++; |
1129 |
pos += xframe.length; |
pos += xframe.length; |
1134 |
} |
} |
1135 |
if (pos==buf_size) |
if (pos==buf_size) |
1136 |
break; |
break; |
1137 |
if (xerr!=XVID_ERR_OK) { |
if (xerr==XVID_ERR_FAIL) { |
1138 |
printf("decoding failed for frame #%d (err=%d)!\n", nb, xerr); |
printf("decoding failed for frame #%d (err=%d)!\n", nb, xerr); |
1139 |
break; |
break; |
1140 |
} |
} |
1150 |
if (buf!=0) free(buf); |
if (buf!=0) free(buf); |
1151 |
if (dechandle!=0) { |
if (dechandle!=0) { |
1152 |
xerr= xvid_decore(dechandle, XVID_DEC_DESTROY, NULL, NULL); |
xerr= xvid_decore(dechandle, XVID_DEC_DESTROY, NULL, NULL); |
1153 |
if (xerr!=XVID_ERR_OK) |
if (xerr==XVID_ERR_FAIL) |
1154 |
printf("destroy-decoder failed (err=%d)!\n", xerr); |
printf("destroy-decoder failed (err=%d)!\n", xerr); |
1155 |
} |
} |
1156 |
if (f!=0) fclose(f); |
if (f!=0) fclose(f); |
1166 |
|
|
1167 |
printf( "\n ===== (de)quant4_intra saturation bug? =====\n" ); |
printf( "\n ===== (de)quant4_intra saturation bug? =====\n" ); |
1168 |
|
|
1169 |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
1170 |
{ |
{ |
1171 |
int i; |
int i; |
1172 |
int16_t Src[8*8], Dst[8*8]; |
int16_t Src[8*8], Dst[8*8]; |
1176 |
|
|
1177 |
for(i=0; i<64; ++i) Src[i] = i-32; |
for(i=0; i<64; ++i) Src[i] = i-32; |
1178 |
set_intra_matrix( get_default_intra_matrix() ); |
set_intra_matrix( get_default_intra_matrix() ); |
1179 |
dequant4_intra(Dst, Src, 31, 5); |
dequant_mpeg_intra(Dst, Src, 31, 5); |
1180 |
printf( "dequant4_intra with CPU=%s: ", cpu->name); |
printf( "dequant_mpeg_intra with CPU=%s: ", cpu->name); |
1181 |
printf( " Out[]= " ); |
printf( " Out[]= " ); |
1182 |
for(i=0; i<64; ++i) printf( "[%d]", Dst[i]); |
for(i=0; i<64; ++i) printf( "[%d]", Dst[i]); |
1183 |
printf( "\n" ); |
printf( "\n" ); |
1185 |
|
|
1186 |
printf( "\n ===== (de)quant4_inter saturation bug? =====\n" ); |
printf( "\n ===== (de)quant4_inter saturation bug? =====\n" ); |
1187 |
|
|
1188 |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
1189 |
{ |
{ |
1190 |
int i; |
int i; |
1191 |
int16_t Src[8*8], Dst[8*8]; |
int16_t Src[8*8], Dst[8*8]; |
1195 |
|
|
1196 |
for(i=0; i<64; ++i) Src[i] = i-32; |
for(i=0; i<64; ++i) Src[i] = i-32; |
1197 |
set_inter_matrix( get_default_inter_matrix() ); |
set_inter_matrix( get_default_inter_matrix() ); |
1198 |
dequant4_inter(Dst, Src, 31); |
dequant_mpeg_inter(Dst, Src, 31); |
1199 |
printf( "dequant4_inter with CPU=%s: ", cpu->name); |
printf( "dequant_mpeg_inter with CPU=%s: ", cpu->name); |
1200 |
printf( " Out[]= " ); |
printf( " Out[]= " ); |
1201 |
for(i=0; i<64; ++i) printf( "[%d]", Dst[i]); |
for(i=0; i<64; ++i) printf( "[%d]", Dst[i]); |
1202 |
printf( "\n" ); |
printf( "\n" ); |
1210 |
|
|
1211 |
printf( "\n ===== fdct/idct precision diffs =====\n" ); |
printf( "\n ===== fdct/idct precision diffs =====\n" ); |
1212 |
|
|
1213 |
for(cpu = cpu_short_list; cpu->name!=0; ++cpu) |
for(cpu = cpu_list; cpu->name!=0; ++cpu) |
1214 |
{ |
{ |
1215 |
int i; |
int i; |
1216 |
|
|
1263 |
|
|
1264 |
for(q=1; q<=max_Q; ++q) { |
for(q=1; q<=max_Q; ++q) { |
1265 |
emms(); |
emms(); |
1266 |
quant4_inter( Dst, Src, q ); |
quant_mpeg_inter( Dst, Src, q ); |
1267 |
emms(); |
emms(); |
1268 |
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; |
1269 |
Crcs_Inter[n][q] = s; |
Crcs_Inter[n][q] = s; |
1293 |
|
|
1294 |
for(q=1; q<=max_Q; ++q) { |
for(q=1; q<=max_Q; ++q) { |
1295 |
emms(); |
emms(); |
1296 |
quant4_intra( Dst, Src, q, q); |
quant_mpeg_intra( Dst, Src, q, q); |
1297 |
emms(); |
emms(); |
1298 |
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; |
1299 |
Crcs_Intra[n][q] = s; |
Crcs_Intra[n][q] = s; |
1326 |
|
|
1327 |
if (what==7) { |
if (what==7) { |
1328 |
test_IEEE1180_compliance(-256, 255, 1); |
test_IEEE1180_compliance(-256, 255, 1); |
|
#if 0 |
|
1329 |
test_IEEE1180_compliance(-256, 255,-1); |
test_IEEE1180_compliance(-256, 255,-1); |
1330 |
test_IEEE1180_compliance( -5, 5, 1); |
test_IEEE1180_compliance( -5, 5, 1); |
1331 |
test_IEEE1180_compliance( -5, 5,-1); |
test_IEEE1180_compliance( -5, 5,-1); |
1332 |
test_IEEE1180_compliance(-300, 300, 1); |
test_IEEE1180_compliance(-300, 300, 1); |
1333 |
test_IEEE1180_compliance(-300, 300,-1); |
test_IEEE1180_compliance(-300, 300,-1); |
|
#endif |
|
1334 |
} |
} |
1335 |
if (what==8) test_dct_saturation(-256, 255); |
if (what==8) test_dct_saturation(-256, 255); |
1336 |
|
|
1356 |
} |
} |
1357 |
|
|
1358 |
/********************************************************************* |
/********************************************************************* |
1359 |
* 'Reference' output (except for timing) on a PIII 1.13Ghz/linux |
* 'Reference' output (except for timing) on an Athlon XP 2200+ |
1360 |
*********************************************************************/ |
*********************************************************************/ |
1361 |
|
|
1362 |
/* as of 07/01/2002, there's a problem with mpeg4-quantization */ |
/* as of 07/01/2002, there's a problem with MMX mpeg4-quantization */ |
1363 |
/* |
/* |
1364 |
|
|
1365 |
===== test fdct/idct ===== |
===== test fdct/idct ===== |
1366 |
PLAINC - 3.312 usec PSNR=13.291 MSE=3.000 |
PLAINC - 1.446 usec PSNR=13.291 MSE=3.000 |
1367 |
MMX - 0.591 usec PSNR=13.291 MSE=3.000 |
MMX - -0.260 usec PSNR=9.611 MSE=7.000 |
1368 |
MMXEXT - 0.577 usec PSNR=13.291 MSE=3.000 |
MMXEXT - -0.293 usec PSNR=9.611 MSE=7.000 |
1369 |
SSE2 - 0.588 usec PSNR=13.291 MSE=3.000 |
3DNOW - 1.535 usec PSNR=13.291 MSE=3.000 |
1370 |
3DNOW - skipped... |
3DNOWE - 0.376 usec PSNR=13.291 MSE=3.000 |
|
3DNOWE - skipped... |
|
1371 |
|
|
1372 |
=== test block motion === |
=== test block motion === |
1373 |
PLAINC - interp- h-round0 0.911 usec iCrc=8107 |
PLAINC - interp- h-round0 0.126 usec iCrc=8107 |
1374 |
PLAINC - round1 0.863 usec iCrc=8100 |
PLAINC - round1 0.136 usec iCrc=8100 |
1375 |
PLAINC - interp- v-round0 0.860 usec iCrc=8108 |
PLAINC - interp- v-round0 0.121 usec iCrc=8108 |
1376 |
PLAINC - round1 0.857 usec iCrc=8105 |
PLAINC - round1 0.127 usec iCrc=8105 |
1377 |
PLAINC - interp-hv-round0 2.103 usec iCrc=8112 |
PLAINC - interp-hv-round0 0.192 usec iCrc=8112 |
1378 |
PLAINC - round1 2.050 usec iCrc=8103 |
PLAINC - round1 0.213 usec iCrc=8103 |
1379 |
--- |
--- |
1380 |
MMX - interp- h-round0 0.105 usec iCrc=8107 |
MMX - interp- h-round0 0.048 usec iCrc=8107 |
1381 |
MMX - round1 0.106 usec iCrc=8100 |
MMX - round1 0.048 usec iCrc=8100 |
1382 |
MMX - interp- v-round0 0.106 usec iCrc=8108 |
MMX - interp- v-round0 0.046 usec iCrc=8108 |
1383 |
MMX - round1 0.106 usec iCrc=8105 |
MMX - round1 0.047 usec iCrc=8105 |
1384 |
MMX - interp-hv-round0 0.145 usec iCrc=8112 |
MMX - interp-hv-round0 0.074 usec iCrc=8112 |
1385 |
MMX - round1 0.145 usec iCrc=8103 |
MMX - round1 0.074 usec iCrc=8103 |
1386 |
--- |
--- |
1387 |
MMXEXT - interp- h-round0 0.028 usec iCrc=8107 |
MMXEXT - interp- h-round0 0.019 usec iCrc=8107 |
1388 |
MMXEXT - round1 0.041 usec iCrc=8100 |
MMXEXT - round1 0.025 usec iCrc=8100 |
1389 |
MMXEXT - interp- v-round0 0.027 usec iCrc=8108 |
MMXEXT - interp- v-round0 0.015 usec iCrc=8108 |
1390 |
MMXEXT - round1 0.041 usec iCrc=8105 |
MMXEXT - round1 0.024 usec iCrc=8105 |
1391 |
MMXEXT - interp-hv-round0 0.066 usec iCrc=8112 |
MMXEXT - interp-hv-round0 0.039 usec iCrc=8112 |
1392 |
MMXEXT - round1 0.065 usec iCrc=8103 |
MMXEXT - round1 0.037 usec iCrc=8103 |
1393 |
--- |
--- |
1394 |
SSE2 - interp- h-round0 0.109 usec iCrc=8107 |
3DNOW - interp- h-round0 0.019 usec iCrc=8107 |
1395 |
SSE2 - round1 0.105 usec iCrc=8100 |
3DNOW - round1 0.023 usec iCrc=8100 |
1396 |
SSE2 - interp- v-round0 0.106 usec iCrc=8108 |
3DNOW - interp- v-round0 0.015 usec iCrc=8108 |
1397 |
SSE2 - round1 0.109 usec iCrc=8105 |
3DNOW - round1 0.024 usec iCrc=8105 |
1398 |
SSE2 - interp-hv-round0 0.145 usec iCrc=8112 |
3DNOW - interp-hv-round0 0.037 usec iCrc=8112 |
1399 |
SSE2 - round1 0.145 usec iCrc=8103 |
3DNOW - round1 0.038 usec iCrc=8103 |
1400 |
|
--- |
1401 |
|
3DNOWE - interp- h-round0 0.022 usec iCrc=8107 |
1402 |
|
3DNOWE - round1 0.023 usec iCrc=8100 |
1403 |
|
3DNOWE - interp- v-round0 0.016 usec iCrc=8108 |
1404 |
|
3DNOWE - round1 0.021 usec iCrc=8105 |
1405 |
|
3DNOWE - interp-hv-round0 0.036 usec iCrc=8112 |
1406 |
|
3DNOWE - round1 0.036 usec iCrc=8103 |
1407 |
--- |
--- |
|
3DNOW - skipped... |
|
|
3DNOWE - skipped... |
|
1408 |
|
|
1409 |
====== test SAD ====== |
====== test SAD ====== |
1410 |
PLAINC - sad8 0.251 usec sad=3776 |
PLAINC - sad8 0.165 usec sad=3776 |
1411 |
PLAINC - sad16 1.601 usec sad=27214 |
PLAINC - sad16 0.587 usec sad=27214 |
1412 |
PLAINC - sad16bi 2.371 usec sad=26274 |
PLAINC - sad16bi 1.290 usec sad=26274 |
1413 |
PLAINC - dev16 1.564 usec sad=3344 |
PLAINC - dev16 1.535 usec sad=3344 |
1414 |
--- |
--- |
1415 |
MMX - sad8 0.057 usec sad=3776 |
MMX - sad8 0.036 usec sad=3776 |
1416 |
MMX - sad16 0.182 usec sad=27214 |
MMX - sad16 0.113 usec sad=27214 |
1417 |
MMX - sad16bi 2.462 usec sad=26274 |
MMX - sad16bi 0.250 usec sad=26274 |
1418 |
MMX - dev16 0.311 usec sad=3344 |
MMX - dev16 0.187 usec sad=3344 |
1419 |
--- |
--- |
1420 |
MMXEXT - sad8 0.036 usec sad=3776 |
MMXEXT - sad8 0.015 usec sad=3776 |
1421 |
MMXEXT - sad16 0.109 usec sad=27214 |
MMXEXT - sad16 0.046 usec sad=27214 |
1422 |
MMXEXT - sad16bi 0.143 usec sad=26274 |
MMXEXT - sad16bi 0.059 usec sad=26274 |
1423 |
MMXEXT - dev16 0.192 usec sad=3344 |
MMXEXT - dev16 0.088 usec sad=3344 |
1424 |
--- |
--- |
1425 |
SSE2 - sad8 0.057 usec sad=3776 |
3DNOW - sad8 0.165 usec sad=3776 |
1426 |
SSE2 - sad16 0.179 usec sad=27214 |
3DNOW - sad16 0.589 usec sad=27214 |
1427 |
SSE2 - sad16bi 2.456 usec sad=26274 |
3DNOW - sad16bi 0.119 usec sad=26274 |
1428 |
SSE2 - dev16 0.321 usec sad=3344 |
3DNOW - dev16 1.541 usec sad=3344 |
1429 |
|
--- |
1430 |
|
3DNOWE - sad8 0.018 usec sad=3776 |
1431 |
|
3DNOWE - sad16 0.039 usec sad=27214 |
1432 |
|
3DNOWE - sad16bi 0.051 usec sad=26274 |
1433 |
|
3DNOWE - dev16 0.070 usec sad=3344 |
1434 |
--- |
--- |
|
3DNOW - skipped... |
|
|
3DNOWE - skipped... |
|
1435 |
|
|
1436 |
=== test transfer === |
=== test transfer === |
1437 |
PLAINC - 8to16 0.151 usec crc=28288 |
PLAINC - 8to16 0.207 usec crc=28288 |
1438 |
PLAINC - 16to8 1.113 usec crc=28288 |
PLAINC - 16to8 0.357 usec crc=28288 |
1439 |
PLAINC - 8to8 0.043 usec crc=20352 |
PLAINC - 8to8 0.154 usec crc=20352 |
1440 |
PLAINC - 16to8add 1.069 usec crc=25536 |
PLAINC - 16to8add 0.391 usec crc=25536 |
1441 |
PLAINC - 8to16sub 0.631 usec crc1=28064 crc2=16256 |
PLAINC - 8to16sub 0.562 usec crc1=28064 crc2=16256 |
1442 |
PLAINC - 8to16sub2 0.597 usec crc=20384 |
PLAINC - 8to16sub2 0.519 usec crc=22368 |
1443 |
--- |
--- |
1444 |
MMX - 8to16 0.032 usec crc=28288 |
MMX - 8to16 0.048 usec crc=28288 |
1445 |
MMX - 16to8 0.024 usec crc=28288 |
MMX - 16to8 0.205 usec crc=28288 |
1446 |
MMX - 8to8 0.020 usec crc=20352 |
MMX - 8to8 -0.158 usec crc=20352 |
1447 |
MMX - 16to8add 0.043 usec crc=25536 |
MMX - 16to8add 0.015 usec crc=25536 |
1448 |
MMX - 8to16sub 0.066 usec crc1=28064 crc2=16256 |
MMX - 8to16sub 0.203 usec crc1=28064 crc2=16256 |
1449 |
MMX - 8to16sub2 0.111 usec crc=20384 |
MMX - 8to16sub2 0.087 usec crc=22368 |
1450 |
|
--- |
1451 |
|
MMXEXT - 8to16 0.013 usec crc=28288 |
1452 |
|
MMXEXT - 16to8 0.011 usec crc=28288 |
1453 |
|
MMXEXT - 8to8 -0.023 usec crc=20352 |
1454 |
|
MMXEXT - 16to8add 0.023 usec crc=25536 |
1455 |
|
MMXEXT - 8to16sub 0.072 usec crc1=28064 crc2=16256 |
1456 |
|
MMXEXT - 8to16sub2 0.093 usec crc=22368 |
1457 |
|
--- |
1458 |
|
3DNOW - 8to16 0.192 usec crc=28288 |
1459 |
|
3DNOW - 16to8 0.367 usec crc=28288 |
1460 |
|
3DNOW - 8to8 0.132 usec crc=20352 |
1461 |
|
3DNOW - 16to8add 0.440 usec crc=25536 |
1462 |
|
3DNOW - 8to16sub 0.557 usec crc1=28064 crc2=16256 |
1463 |
|
3DNOW - 8to16sub2 0.691 usec crc=22368 |
1464 |
|
--- |
1465 |
|
3DNOWE - 8to16 0.004 usec crc=28288 |
1466 |
|
3DNOWE - 16to8 0.019 usec crc=28288 |
1467 |
|
3DNOWE - 8to8 -0.294 usec crc=20352 |
1468 |
|
3DNOWE - 16to8add 0.028 usec crc=25536 |
1469 |
|
3DNOWE - 8to16sub 0.065 usec crc1=28064 crc2=16256 |
1470 |
|
3DNOWE - 8to16sub2 0.027 usec crc=22368 |
1471 |
--- |
--- |
1472 |
|
|
1473 |
===== test quant ===== |
===== test quant ===== |
1474 |
PLAINC - quant4_intra 74.248 usec crc=29809 |
PLAINC - quant_mpeg_intra 67.757 usec crc=29809 |
1475 |
PLAINC - quant4_inter 70.850 usec crc=12574 |
PLAINC - quant_mpeg_inter 68.482 usec crc=12574 |
1476 |
PLAINC - dequant4_intra 40.628 usec crc=24052 |
PLAINC - dequant_mpeg_intra 20.764 usec crc=24052 |
1477 |
PLAINC - dequant4_inter 45.691 usec crc=63847 |
PLAINC - dequant_mpeg_inter 24.413 usec crc=63847 |
1478 |
PLAINC - quant_intra 43.357 usec crc=25662 |
PLAINC - quant_h263_intra 16.446 usec crc=25662 |
1479 |
PLAINC - quant_inter 33.410 usec crc=23972 |
PLAINC - quant_h263_inter 14.499 usec crc=23972 |
1480 |
PLAINC - dequant_intra 36.384 usec crc=49900 |
PLAINC - dequant_h263_intra 16.419 usec crc=49900 |
1481 |
PLAINC - dequant_inter 48.930 usec crc=48899 |
PLAINC - dequant_h263_inter 18.679 usec crc=48899 |
1482 |
--- |
--- |
1483 |
MMX - quant4_intra 7.445 usec crc=3459 |
MMX - quant_mpeg_intra 8.299 usec crc=3459 |
1484 |
*** CRC ERROR! *** |
*** CRC ERROR! *** |
1485 |
MMX - quant4_inter 5.384 usec crc=51072 |
MMX - quant_mpeg_inter 7.078 usec crc=13247 |
1486 |
*** CRC ERROR! *** |
*** CRC ERROR! *** |
1487 |
MMX - dequant4_intra 5.515 usec crc=24052 |
MMX - dequant_mpeg_intra 3.455 usec crc=24052 |
1488 |
MMX - dequant4_inter 7.745 usec crc=63847 |
MMX - dequant_mpeg_inter 4.483 usec crc=63847 |
1489 |
MMX - quant_intra 4.661 usec crc=25662 |
MMX - quant_h263_intra 2.597 usec crc=25662 |
1490 |
MMX - quant_inter 4.406 usec crc=23972 |
MMX - quant_h263_inter 2.151 usec crc=23972 |
1491 |
MMX - dequant_intra 4.928 usec crc=49900 |
MMX - dequant_h263_intra 2.684 usec crc=49900 |
1492 |
MMX - dequant_inter 4.532 usec crc=48899 |
MMX - dequant_h263_inter 2.647 usec crc=48899 |
1493 |
|
--- |
1494 |
|
MMXEXT - quant_mpeg_intra 3.878 usec crc=29809 |
1495 |
|
MMXEXT - quant_mpeg_inter 4.112 usec crc=12574 |
1496 |
|
MMXEXT - dequant_mpeg_intra 3.452 usec crc=24052 |
1497 |
|
MMXEXT - dequant_mpeg_inter 4.473 usec crc=63847 |
1498 |
|
MMXEXT - quant_h263_intra 2.608 usec crc=25662 |
1499 |
|
MMXEXT - quant_h263_inter 2.145 usec crc=23972 |
1500 |
|
MMXEXT - dequant_h263_intra 2.478 usec crc=49900 |
1501 |
|
MMXEXT - dequant_h263_inter 2.450 usec crc=48899 |
1502 |
|
--- |
1503 |
|
3DNOW - quant_mpeg_intra 66.051 usec crc=29809 |
1504 |
|
3DNOW - quant_mpeg_inter 73.494 usec crc=12574 |
1505 |
|
3DNOW - dequant_mpeg_intra 20.374 usec crc=24052 |
1506 |
|
3DNOW - dequant_mpeg_inter 23.645 usec crc=63847 |
1507 |
|
3DNOW - quant_h263_intra 16.292 usec crc=25662 |
1508 |
|
3DNOW - quant_h263_inter 14.322 usec crc=23972 |
1509 |
|
3DNOW - dequant_h263_intra 16.613 usec crc=49900 |
1510 |
|
3DNOW - dequant_h263_inter 18.382 usec crc=48899 |
1511 |
|
--- |
1512 |
|
3DNOWE - quant_mpeg_intra 66.140 usec crc=29809 |
1513 |
|
3DNOWE - quant_mpeg_inter 68.454 usec crc=12574 |
1514 |
|
3DNOWE - dequant_mpeg_intra 2.881 usec crc=24052 |
1515 |
|
3DNOWE - dequant_mpeg_inter 4.155 usec crc=63847 |
1516 |
|
3DNOWE - quant_h263_intra 1.451 usec crc=25662 |
1517 |
|
3DNOWE - quant_h263_inter 1.849 usec crc=23972 |
1518 |
|
3DNOWE - dequant_h263_intra 2.101 usec crc=49900 |
1519 |
|
3DNOWE - dequant_h263_inter 2.109 usec crc=48899 |
1520 |
--- |
--- |
1521 |
|
|
1522 |
===== test cbp ===== |
===== test cbp ===== |
1523 |
PLAINC - calc_cbp#1 0.371 usec cbp=0x15 |
PLAINC - calc_cbp#1 0.090 usec cbp=0x15 |
1524 |
PLAINC - calc_cbp#2 0.432 usec cbp=0x38 |
PLAINC - calc_cbp#2 0.086 usec cbp=0x38 |
1525 |
PLAINC - calc_cbp#3 0.339 usec cbp=0xf |
PLAINC - calc_cbp#3 0.087 usec cbp=0xf |
1526 |
PLAINC - calc_cbp#4 0.506 usec cbp=0x5 |
PLAINC - calc_cbp#4 0.114 usec cbp=0x5 |
1527 |
--- |
--- |
1528 |
MMX - calc_cbp#1 0.136 usec cbp=0x15 |
MMX - calc_cbp#1 0.061 usec cbp=0x15 |
1529 |
MMX - calc_cbp#2 0.134 usec cbp=0x38 |
MMX - calc_cbp#2 0.063 usec cbp=0x38 |
1530 |
MMX - calc_cbp#3 0.138 usec cbp=0xf |
MMX - calc_cbp#3 0.061 usec cbp=0xf |
1531 |
MMX - calc_cbp#4 0.135 usec cbp=0x5 |
MMX - calc_cbp#4 0.060 usec cbp=0x5 |
1532 |
--- |
--- |
1533 |
SSE2 - calc_cbp#1 0.136 usec cbp=0x15 |
MMXEXT - calc_cbp#1 0.062 usec cbp=0x15 |
1534 |
SSE2 - calc_cbp#2 0.133 usec cbp=0x38 |
MMXEXT - calc_cbp#2 0.060 usec cbp=0x38 |
1535 |
SSE2 - calc_cbp#3 0.133 usec cbp=0xf |
MMXEXT - calc_cbp#3 0.062 usec cbp=0xf |
1536 |
SSE2 - calc_cbp#4 0.141 usec cbp=0x5 |
MMXEXT - calc_cbp#4 0.061 usec cbp=0x5 |
1537 |
|
--- |
1538 |
|
3DNOW - calc_cbp#1 0.089 usec cbp=0x15 |
1539 |
|
3DNOW - calc_cbp#2 0.087 usec cbp=0x38 |
1540 |
|
3DNOW - calc_cbp#3 0.087 usec cbp=0xf |
1541 |
|
3DNOW - calc_cbp#4 0.116 usec cbp=0x5 |
1542 |
|
--- |
1543 |
|
3DNOWE - calc_cbp#1 0.050 usec cbp=0x15 |
1544 |
|
3DNOWE - calc_cbp#2 0.051 usec cbp=0x38 |
1545 |
|
3DNOWE - calc_cbp#3 0.050 usec cbp=0xf |
1546 |
|
3DNOWE - calc_cbp#4 0.049 usec cbp=0x5 |
1547 |
--- |
--- |
1548 |
|
|
1549 |
*/ |
*/ |