[Mplayer-cvslog] CVS: main/libvo vo_vesa.c,1.5,1.6

Nick Kurshev nick at mplayer.dev.hu
Sat Oct 20 13:59:01 CEST 2001


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

Modified Files:
	vo_vesa.c 
Log Message:
Fixed zooming bug

Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vo_vesa.c	19 Oct 2001 16:24:37 -0000	1.5
+++ vo_vesa.c	20 Oct 2001 11:58:45 -0000	1.6
@@ -385,7 +385,7 @@
 	}
 	if(verbose)
 	{
-	  printf("vo_vesa: Requested mode: %ux%u@%x bpp=%u\n",width,height,format,bpp);
+	  printf("vo_vesa: Requested mode: %ux%u@%u (%s)\n",width,height,bpp,vo_format_name(format));
 	  printf("vo_vesa: Total modes found: %u\n",num_modes);
 	  mode_ptr = vib.VideoModePtr;
 	  printf("vo_vesa: Mode list:");
@@ -454,20 +454,23 @@
 		  printf("vo_vesa: Can't allocate temporary buffer\n");
 		  return -1;
 		}
-		if( vesa_zoom && format==IMGFMT_YV12 )
+		if( vesa_zoom )
 		{
-		  /* software scale */
-		  image_width = video_mode_info.XResolution;
-		  image_height = video_mode_info.YResolution;
-		  scale_xinc=(width << 16) / image_width - 2;  /* needed for proper rounding */
-		  scale_yinc=(height << 16) / image_height + 2;
-		  SwScale_Init();
-		  if(verbose) printf("vo_vesa: Using SCALE\n");
-		}
-    		else
-		{
-		  printf("vo_vesa: Can't apply zooming to non YV12 formats\n");
-		  return -1;
+		  if( format==IMGFMT_YV12 )
+		  {
+		      /* software scale */
+		      image_width = video_mode_info.XResolution;
+		      image_height = video_mode_info.YResolution;
+		      scale_xinc=(width << 16) / image_width - 2;  /* needed for proper rounding */
+	    	      scale_yinc=(height << 16) / image_height + 2;
+		      SwScale_Init();
+		      if(verbose) printf("vo_vesa: Using SCALE\n");
+		  }      
+    		  else
+		  {
+		      printf("vo_vesa: Can't apply zooming to non YV12 formats\n");
+		      return -1;
+		  }
 		}
 		if((video_mode_info.WinAAttributes & FRAME_MODE) == FRAME_MODE)
 		   win.idx = 0; /* frame A */




More information about the MPlayer-cvslog mailing list