|
|
发表于 2004-12-11 23:39:18
|
显示全部楼层
[php]
BUFFERING, PIXMAPS and READ_FROM_FILE Options
XAnim by default will read the entire animation into memory. PFX,
Moviesetter, GIF or URT RLE type animations are always uncompressed and
stored in memory as individual images.
For the AVI, QT, IFF, FLI/FLC, JPEG, MPEG and DL animations, only the
compressed delta is stored. These deltas are then uncompressed each
time they need to be displayed. The buffer option(+b) may be used to
potentially speed up playback by uncompressing and storing these images
ahead of time. But more memory is used up in the process.
When an XPutImage is called, the image typically gets copied twice,
once to memory and then from there onto the display. A pixmap is
directly copied onto the display without the first copy. This is why it
is sometimes much faster to use the pixmap option(+p). Each image
isn't converted into a pixmap until the first time it is displayed.
This is why the first loop of an animation using this option is some-
times slower than subsequent loops. While the pixmap option may improve
playback speed, it will slow things down if on-the-fly scaling needs to
be performed. This is because XAnim no longer has direct access to the
image and needs to get a copy of it before it can be scaled.
The read from file option(+f) causes XAnim not to store the compressed
deltas in memory. Instead as each image is to be displayed, XAnim reads
the corresponding compressed delta from the file, expands it and then
displays it. While this can dramatically cut down on memory usage, the
necessary reads from disk(or whatever) can slow down playback speed.
XAnim still needs to allocate one to three image buffers depending on
the type of animation and the scaling options used. This option is only
supported for AVI, QT, FLI/FLC, IFF, JPEG, MPEG and DL animations. The
BODY chunk of IFF animations is not included in this. As a result, an
IFF animation that is made up of several BODY chunks will not currently
benefit from this option.
[/php] |
|