changeset 418:b2fb2081dab5 libavcodec

* somewhat more advanced test suit for dsp code - for now i386 only cd test ; make dsptest ; ./dsptest
author kabi
date Thu, 23 May 2002 13:34:22 +0000
parents 040d86058c4a
children b71190bacce8
files i386/dsputil_mmx.c
diffstat 1 files changed, 0 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/i386/dsputil_mmx.c	Thu May 23 12:17:08 2002 +0000
+++ b/i386/dsputil_mmx.c	Thu May 23 13:34:22 2002 +0000
@@ -1082,45 +1082,4 @@
     }
 }
 
-#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