[Mplayer-cvslog] CVS: main/libvo vo_directx.c,1.6,1.7

Richard Felker CVS rfelker at mplayerhq.hu
Wed Dec 18 08:34:50 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv21181/libvo

Modified Files:
	vo_directx.c 
Log Message:
1000l! I have no idea how this code worked at all before. I guess no
one tests win32 much anyway... :)


Index: vo_directx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_directx.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vo_directx.c	11 Nov 2002 15:20:25 -0000	1.6
+++ vo_directx.c	18 Dec 2002 07:34:32 -0000	1.7
@@ -996,7 +996,7 @@
 {
 	uint8_t *s;
     uint8_t *d;
-    uint32_t i=0;
+    uint32_t i=0, uvstride=dstride/2;
     
 	// copy Y
     d=image+dstride*y+x;                
@@ -1004,29 +1004,29 @@
     for(i=0;i<h;i++){
         memcpy(d,s,w);                  
         s+=stride[0];                  
-        d+=stride[0];
+        d+=dstride;
     }
     
 	w/=2;h/=2;x/=2;y/=2;
 	
 	// copy U
-    d=image+image_width*image_height + dstride*y/2+x;
+    d=image+dstride*image_height + uvstride*y+x;
     if(swap)s=src[2];
 	else s=src[1];
     for(i=0;i<h;i++){
         memcpy(d,s,w);
         s+=stride[1];
-        d+=stride[1];
+        d+=uvstride;
     }
 	
 	// copy V
-    d=image+image_width*image_height +image_width*image_height/4 + dstride*y/2+x;
+    d=image+dstride*image_height +uvstride*(image_height/2) + uvstride*y+x;
     if(swap)s=src[1];
 	else s=src[2];
     for(i=0;i<h;i++){
         memcpy(d,s,w);
         s+=stride[2];
-        d+=stride[2];
+        d+=uvstride;
     }
     return 0;
 }




More information about the MPlayer-cvslog mailing list