[Mplayer-cvslog] CVS: main/libvo vo_vesa.c,1.35,1.36

Nick Kurshev nick at mplayer.dev.hu
Sun Nov 4 18:22:27 CET 2001


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

Modified Files:
	vo_vesa.c 
Log Message:
Use standard aspect code

Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- vo_vesa.c	4 Nov 2001 17:01:12 -0000	1.35
+++ vo_vesa.c	4 Nov 2001 17:22:22 -0000	1.36
@@ -34,6 +34,7 @@
 #include "sub.h"
 #include "linux/vbelib.h"
 #include "bswap.h"
+#include "aspect.h"
 
 #include "../postproc/swscale.h"
 #include "../postproc/rgb2rgb.h"
@@ -414,23 +415,6 @@
 	return retval;
 }
 
-static void vesa_aspect(uint32_t width,uint32_t height,  
-		    	uint32_t xres,uint32_t yres,
-			uint32_t *image_width,uint32_t *image_height)
-{
-  float aspect_factor;
-  aspect_factor = (float)width / height;
-  *image_width = xres;
-  *image_height = xres /aspect_factor;
-  if(verbose) printf("vo_vesa: aspect factor = %f(%ux%u) *image=%ux%u screen=%ux%u\n",aspect_factor,width,height,*image_width,*image_height,xres,yres);
-  if((*image_height) > yres)
-  {
-    *image_height = yres;
-    *image_width = yres * aspect_factor;
-    if(verbose) printf("vo_vesa: Y > X therefore *image=%ux%u\n",*image_width,*image_height);
-  }
-}
-
 static void paintBkGnd( void )
 {
     int x_res = video_mode_info.XResolution;
@@ -686,9 +670,12 @@
 		  {
 		      /* software scale */
 		      if(vesa_zoom > 1)
-		      vesa_aspect(image_width,image_height,  
-		    		  video_mode_info.XResolution,video_mode_info.YResolution,
-				  &image_width,&image_height);
+		      {
+		        aspect_save_orig(width,height);
+			aspect_save_prescale(d_width,d_height);
+			aspect_save_screenres(video_mode_info.XResolution,video_mode_info.YResolution);
+			aspect(&image_width,&image_height,A_ZOOM);
+		      }
 		      else
 		      if(fs_mode)
 		      {




More information about the MPlayer-cvslog mailing list