My problem is that the "XPutImage" function is rather slow, even if the
GC is set to "GXcopy" which means that the image could be written directly
into the video ram. I use the same format as the server does,
ie 16bpp ZImage, so no transformation has to take place.
After a short look into the X-server sources I would assume that XPutImage
is implemented with XCopyArea and no optimization takes place.
Is there a function that enables faster copying, eg. for video sequences ?
-------------------------------------------------------------------------
... always look on the bright side of life ... (Monty Python)
-------------------------------------------------------------------------
Wolfgang Koehler wo...@first.gmd.de
GMD-FIRST an der TU Berlin German National Research Centre
Tel. (Berlin 030) 6392-1819 for Computer Science
I get about 6 fps @ CIF on a 486-66 with ATI Mach 32 card, 2 MB VRAM using
XShmPutImage() and using Multibuffering Extension under 16bpp TrueColor
mode without having to index the Colormap (I get better output if I am
rendering stuff, with changes only to the rasterized area from the object
rendered even without Multibuffering extensions - but my own doublebuffering,
upto about 9 fps). The only other alternative, probably is to wait for
DBE to be packaged with XFree3.x.y or is it already???
I think the only way you can get better than this is to use svgalib, but
then it circumvents the X11 protocol and is not very good (in terms of
portability to other platforms, I think).
joseph
e-mail: pro...@enel.ucalgary.ca
url: http://www-mddsp.enel.ucalgary.ca/People/provine
--
e-mail: pro...@enel.ucalgary.ca
url: http://www-mddsp.enel.ucalgary.ca/People/provine
The reason it is so slow is that every time an XPutImage takes place
Xlib as to copy the image data over its connection to the X-server.
The solution is easy: use XShmPutImage, XShmCreateImage and XShmAttach
to use shared memory images.
Hint: I know this is possible using XFree86. I've done it. As an example
of the speed you can get: I can get 45 fps at 640x480 at 16bpp on my
p5-133 w/ Matrox Millenium under Accelerated-X. That includes "erasing"
the image each frame. Doing straight blits that goes up to about 60fps.
Peter Mattis