[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.33,1.34

Arpi of Ize arpi at mplayer.dev.hu
Wed Oct 17 12:54:48 CEST 2001


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

Modified Files:
	vo_x11.c 
Log Message:
swscale - 16bpp and -fs support

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- vo_x11.c	15 Oct 2001 19:33:26 -0000	1.33
+++ vo_x11.c	17 Oct 2001 10:54:34 -0000	1.34
@@ -172,12 +172,17 @@
  if ( depth != 15 && depth != 16 && depth != 24 && depth != 32 ) depth=24;
  XMatchVisualInfo( mDisplay,mScreen,depth,TrueColor,&vinfo );
 
- if( flags&0x04 && depth>=24 && format==IMGFMT_YV12 ) {
+ if( flags&0x04 && format==IMGFMT_YV12 ) {
      // software scale
-     scale_xinc=(width << 8) / d_width - 1;  // -1 needed for proper rounding
-     scale_yinc=(height << 16) / d_height;
-     image_width=d_width;
-     image_height=d_height;
+     if(fullscreen){
+         image_width=vo_screenwidth;
+         image_height=vo_screenheight;
+     } else {
+         image_width=d_width&(~3);
+         image_height=d_height;
+     }
+     scale_xinc=(width << 8) / image_width - 1;  // -1 needed for proper rounding
+     scale_yinc=(height << 16) / image_height;
      SwScale_Init();
  }
 
@@ -480,7 +485,7 @@
 
 if(scale_xinc){
  SwScale_YV12slice_brg24(src,stride,y,h,
-                         ImageData, image_width*((bpp+7)/8), image_width, ((bpp+7)/8),
+                         ImageData, image_width*((bpp+7)/8), image_width, bpp,
 			 scale_xinc, scale_yinc);
 } else {
  uint8_t *dst=ImageData + ( image_width * y + x ) * ( bpp/8 );




More information about the MPlayer-cvslog mailing list