changeset 417:040d86058c4a libavcodec

* align the source initialy address
author kabi
date Thu, 23 May 2002 12:17:08 +0000
parents ca1f2c0e44ef
children b2fb2081dab5
files i386/dsputil_mmx.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/i386/dsputil_mmx.c	Thu May 23 10:10:14 2002 +0000
+++ b/i386/dsputil_mmx.c	Thu May 23 12:17:08 2002 +0000
@@ -1107,18 +1107,20 @@
     volatile int v;
     int i;
     const int linesize = 720;
-    char bu[32768];
+    char empty[32768];
     uint64_t te, ts = rdtsc();
-    char* im = bu;
+    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 += 16; //
+	im += 4; //
 	if (im > bu + 10000)
             im = bu;
     }
     te = rdtsc();
     printf("CPU Ticks: %7d\n", (int)(te - ts));
-    fflush(stdout);
 }
 #endif