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

Diego Biurrun diego at biurrun.de
Thu Dec 19 10:00:10 CET 2002


Felix Buenemann writes:
 > On Wednesday 18 December 2002 16:36, Diego Biurrun wrote:
 > > On Wed, Dec 18, 2002 at 08:34:50AM +0100, Richard Felker CVS wrote:
 > > >> 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... :)
 > >
 > > And suddenly my movies that produced garbled images started working.  Great
 > > work!  However with those movies the OSD is garbled now..  What happened
 > > there?
 > I don't currently have windoze running, but try changing those image_width in 
 > draw_alpha to dstride and see if it helps (I haven't looked deeper into the 
 > code so I could be wrong, but it's worth a try).

The following patch (dumb search and replace within the draw_alpha
function) solves my problems:


--- libvo/vo_directx.c	18 Dec 2002 07:34:32 -0000	1.7
+++ libvo/vo_directx.c	19 Dec 2002 09:34:52 -0000
@@ -118,13 +118,13 @@
     case IMGFMT_I420 :
 	case IMGFMT_IYUV :
 	case IMGFMT_YVU9 :
-    	vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) image) + image_width*y0 + x0,image_width);
+    	vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) image) + dstride*y0 + x0,dstride);
 	break;
 	case IMGFMT_YUY2 :
-	    vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image)+ 2*image_width*y0 + 2*x0 ,2*image_width);
+	    vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image)+ 2*dstride*y0 + 2*x0 ,2*dstride);
     break;
     case IMGFMT_UYVY :
-        vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image) + 2*image_width*y0 + 2*x0 + 1,dstride);
+        vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image) + 2*dstride*y0 + 2*x0 + 1,dstride);
     break;
 	case IMGFMT_RGB15:	
     case IMGFMT_BGR15:
@@ -147,7 +147,7 @@
 
 static void draw_osd(void)
 {
-    vo_draw_text(image_width,image_height,draw_alpha);
+    vo_draw_text(dstride,image_height,draw_alpha);
 }
 
 static uint32_t



More information about the MPlayer-cvslog mailing list