[Mplayer-cvslog] CVS: main/libvo vo_svga.c,1.59,1.60

Arpi of Ize arpi at mplayerhq.hu
Mon Jan 20 22:33:14 CET 2003


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

Modified Files:
	vo_svga.c 
Log Message:
This patch should fix the display problem with 4bpp and 8bpp modes.
The problem was that the new drawing method assumes a linear
framebuffer, which is not available in those modes. This can be worked
around by using the old drawing method, which is what this patch does.
The old method can be forced, by using the "old" driver option.
This patch also enables linear addressing, since it improves write speed
to video memory considerably. The mentioned problem:
"it is not compatable with vga_draw* for some cards"
Is a bug in svgalib, which I think should be fixed in recent svgalib
versions. If someone sees this problem, please report to svgalib
maintainer (that's me).
patch by Matan Ziv-Av. matan at svgalib.org


Index: vo_svga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_svga.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- vo_svga.c	31 Dec 2002 02:37:36 -0000	1.59
+++ vo_svga.c	20 Jan 2003 21:33:11 -0000	1.60
@@ -457,6 +457,9 @@
     return(1); // error
   }
   
+  if(vid_mode<10 || vid_mode==145) {
+  	oldmethod=1;
+  }
   /* set 332 palette for 8 bpp */
   if(bpp==8){
     int i;
@@ -473,12 +476,11 @@
   WIDTH=vga_getxdim();
   HEIGHT=vga_getydim();
   BYTESPERPIXEL=(bpp+4)>>3;
-  if(bpp==1)
-    LINEWIDTH=(WIDTH+7)/8;
-  else
     LINEWIDTH=vga_getmodeinfo(vid_mode)->linewidth;
 
-//  vga_setlinearaddressing(); //it is not compatable with vga_draw* for "some" cards
+  if(oldmethod && (bpp==8 || bpp==4)) LINEWIDTH*=8;
+  
+  if(!oldmethod || (bpp>8))vga_setlinearaddressing();
   if(oldmethod) {
      buffer=malloc(HEIGHT*LINEWIDTH);
      maxframes=0;



More information about the MPlayer-cvslog mailing list