diff options
author | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-05-23 13:34:22 +0000 |
---|---|---|
committer | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-05-23 13:34:22 +0000 |
commit | ec9a41f57d3df89859a5eb9addd3f0de167909ba (patch) | |
tree | 6ab19c1f8ad638821d264a279742df7039e572c1 /libavcodec/i386/dsputil_mmx.c | |
parent | 6efad6fd85b2326142939b57f8720341031f656c (diff) | |
download | ffmpeg-ec9a41f57d3df89859a5eb9addd3f0de167909ba.tar.gz |
* somewhat more advanced test suit for dsp code - for now i386 only
cd test ; make dsptest ; ./dsptest
Originally committed as revision 568 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/dsputil_mmx.c')
-rw-r--r-- | libavcodec/i386/dsputil_mmx.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c index 483e19a247..7bcb1e5665 100644 --- a/libavcodec/i386/dsputil_mmx.c +++ b/libavcodec/i386/dsputil_mmx.c @@ -1082,45 +1082,4 @@ void dsputil_set_bit_exact_mmx(void) } } -#else // TESTCPU_MAIN -/* - * for testing speed of various routine - should be probably extended - * for a general purpose regression test later - * - * for now use it this way: - * - * gcc -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -DTESTCPU_MAIN -I../.. -o test dsputil_mmx.c - * - * in libavcodec/i386 directory - then run ./test - */ -static inline long long rdtsc() -{ - long long l; - asm volatile( "rdtsc\n\t" - : "=A" (l) - ); - return l; -} - -int main(int argc, char* argv[]) -{ - volatile int v; - int i; - const int linesize = 720; - char empty[32768]; - uint64_t te, ts = rdtsc(); - char* im, *bu = empty; - op_pixels_func fc = put_pixels_y2_mmx2; - bu += 32; - bu =(char*)(((long)bu) & ~0xf); // 16 bytes alignment - im = bu; - for(i=0; i<1000000; i++){ - fc(im, im + 1000, linesize, 16); - im += 4; // - if (im > bu + 10000) - im = bu; - } - te = rdtsc(); - printf("CPU Ticks: %7d\n", (int)(te - ts)); -} #endif |