[MPlayer-dev-eng] [PATCH] vo_svga problems - 10l?
ivan at cacad.com
ivan at cacad.com
Wed Jan 22 07:25:14 CET 2003
> Matan Ziv-Av. Said:
>
> 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
I don't understand, why you don't handle that in the svgalib? The
modes that don't support linear framebuffer, should not be able to
enable it, should they?
> 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).
ok, i do.
1. for the rest of developers - linear mode means when all video memory
is one big plane mapped in the ram area some where above 1MB . Bank is
when only small window(64k) from video plane is mapped. there are and
other modes like ModeX that use 4 planes with some wierd ordering. <end>
libsvga 1.4.3 - this is the last stable release, most distributions have
it (mine does), as the 1.9.17 says it's developers only :) So
vga_drawscansegment() uses banks to draw, even if the mode is linear
one. So for this library we should not use vga_setlinearaddressing(),
unless we draw directly into the video ram, but none of both methods do
that. I agree that it works for some cards (e.g. ATI Rage Pro), but not
with mine (S3 Virge Dx).
libsvga 1.9.17 (the latest i've got) yes it is better, the vga_draw*
functions work nice with linear mode but... strange they don't work for
me when banking is used. This way if the vga_setlinear* is ommited i got
update only at one small part of the image (i guess no bank is
switched) My card is S3VirgeDx, really old and well supported (i hope).
I agree that it is good to use linear mode, but i think that regular
users don't use development libraries. BTW, the differense in the new
and old vo_svga drawing method, is that in the old one the image is
stored into vo_svga memory buffer and then drawed on flip-page, so as i
said before both methods use vga_draw*
Probaly workaround is to look for the svgalib version and choose what to
do then, or even better - mplayer to handle writing to video buffer (we
have mmx optimized memcpy_pci)
As a final words, both bpp 1, bpp 4 and bpp 8 used to work for me with
svgalib 1.4.3, so far they work and with svgalib 1.9.17. I have encoured
some problems with double buffering (both svgalib-s), but by defualt it
is off. I belive that it have to do something with vga_setdisplaystart()
- on bpp<=8 it counts for pixels not bytes. In this light the
LINEWIDTH*=8 may be hmm... wrong?
> --
> Matan Ziv-Av. matan at svgalib.org
Best Regards
Ivan Kalvachev
More information about the MPlayer-dev-eng
mailing list