[MPlayer-dev-eng] [PATCH] vo_svga problems
Matan Ziv-Av
matan at svgalib.org
Mon Jan 20 14:16:44 CET 2003
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. For 8
bpp modes, it is better to use the linear modes (if they are
available), rather than the planar modes. I will fix this in the mode
selection code, but meanwhile it can be forced by forcing mode 50 (for
320x240x256), instead of the default mode 6 for this, or mode 146
(320x200), instead of 5.
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).
The problems left:
No OSD in 8/4 bpp modes - As fas as I can tell, it is the same in other
drivers. Support needs to be added in osd.c
Blurred video (especially mjpeg) - I can't see any difference between
svga, x11 and xv. If someone has this issue, please check if it
is different with the old method drawing, and give me more
details. Preferably something like: "download file http://abc/a.avi, and
look at the right hand of the man in the picture".
--
Matan Ziv-Av. matan at svgalib.org
-------------- next part --------------
--- ../../orig/main/libvo/vo_svga.c Mon Jan 20 13:56:55 2003
+++ ./vo_svga.c Mon Jan 20 14:08:20 2003
@@ -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-dev-eng
mailing list