[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.41,1.42 vo_vesa.c,1.50,1.51

Michael Niedermayer michael at mplayer.dev.hu
Thu Nov 29 21:19:19 CET 2001


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

Modified Files:
	vo_x11.c vo_vesa.c 
Log Message:
swscaler cleanup
green line at bottom bugfix
green lines in yuv2yuv scaler bugfix


Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- vo_x11.c	19 Nov 2001 15:51:17 -0000	1.41
+++ vo_x11.c	29 Nov 2001 20:19:17 -0000	1.42
@@ -133,8 +133,9 @@
 static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
 }
 
-static unsigned int scale_xinc=0;
-static unsigned int scale_yinc=0;
+static unsigned int scale_srcW=0;
+static unsigned int scale_srcH=0;
+
 
 static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d_height,uint32_t flags,char *title,uint32_t format )
 {
@@ -179,8 +180,8 @@
          image_width=d_width&(~7);
          image_height=d_height;
      }
-     scale_xinc=(width << 16) / image_width - 2;  // needed for proper rounding
-     scale_yinc=(height << 16) / image_height +2;
+     scale_srcW=width;
+     scale_srcH=height;
      SwScale_Init();
  }
 
@@ -481,11 +482,11 @@
 static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y )
 {
 
-if(scale_xinc){
+if(scale_srcW){
  uint8_t *dst[3] = {ImageData, NULL, NULL};
  SwScale_YV12slice(src,stride,y,h,
-                         dst, image_width*((bpp+7)/8), image_width, ( depth == 24 ) ? bpp : depth,
-			 scale_xinc, scale_yinc);
+                         dst, image_width*((bpp+7)/8), ( depth == 24 ) ? bpp : depth,
+			 scale_srcW, scale_srcH, image_width, image_height);
 } else {
  uint8_t *dst=ImageData + ( image_width * y + x ) * ( bpp/8 );
  yuv2rgb( dst,src[0],src[1],src[2],w,h,image_width*( bpp/8 ),stride[0],stride[1] );

Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- vo_vesa.c	29 Nov 2001 18:00:57 -0000	1.50
+++ vo_vesa.c	29 Nov 2001 20:19:17 -0000	1.51
@@ -76,8 +76,8 @@
 static void (*cpy_blk_fnc)(unsigned long,uint8_t *,unsigned long) = NULL;
 
 static int vesa_zoom=0; /* software scaling */
-static unsigned int scale_xinc=0;
-static unsigned int scale_yinc=0;
+static unsigned int scale_srcW=0;
+static unsigned int scale_srcH=0;
 
 static uint32_t image_bpp,image_width, image_height; /* source image dimension */
 static int32_t x_offset,y_offset; /* to center image on screen */
@@ -253,8 +253,9 @@
 	 if(HAS_DGA()) dst[0] += y_offset*SCREEN_LINE_SIZE(PIXEL_SIZE())+x_offset*PIXEL_SIZE();
 	 dst_stride = PIXEL_SIZE()*(HAS_DGA()?video_mode_info.XResolution:image_width);
 	 SwScale_YV12slice(image,stride,y,h,dst,dst_stride,
-			     image_width, video_mode_info.BitsPerPixel,
-	    		     scale_xinc, scale_yinc);
+			     video_mode_info.BitsPerPixel,
+			     scale_srcW, scale_srcH, image_width, image_height);
+
     }
     else
     {
@@ -722,8 +723,8 @@
 			image_height = video_mode_info.YResolution;
 			vesa_zoom = 1;
 		      }
-		      scale_xinc=(width << 16) / image_width - 2;  /* needed for proper rounding */
-	    	      scale_yinc=(height << 16) / image_height + 2;
+		      scale_srcW=width;
+	    	      scale_srcH=height;
 		      if(!lvo_name) SwScale_Init();
 		      if(verbose) printf("vo_vesa: Using SCALE\n");
 		  }      




More information about the MPlayer-cvslog mailing list