21
Chapter 4
Software Description
User’s Manual U17316EE1V0UM00
4.4 Demonstration
Programs
Four rather simple demo programs are supplied on the startWARE-GHS-Ravin-E CD. They are
described in this paragraph.
4.4.1 Animation
Animation is a demo program which displays a rotating image on the screen. This endless movie is sim-
ply made by displaying a sequence of 60 PNG images cyclically, so that the impression of a movie is
generated. The images were produced by POVRay (www.povray.org) and ThumbsPlus
(www.thumbsplus.com) was used to generate a common palette for all of them. A common palette is
required to eliminate the temporal noise, which would otherwise occur due to the asynchronous update
of the palette and the display data.
One of two implementations can be selected at compile time. If REALTIME_DECODE is defined, then
each individual frame is decoded and the result is directly copied to the Ravin-E frame buffer. That
saves RAM space, but the decoding has to be repeated as often as the image is to be displayed.
Decoding a png file is rather time consuming. With this option enabled, the rotation of the image is
rather slow and not at all smooth.
If the option PRE_DECODE is enabled, then all frames are decompressed before the animation starts.
The decompressed data is stored in the heap space, which must therefore be sufficiently large to hold
all decoded files. Each image of this example has a size of 240x240 pixels and the images use a colour
palette, which means that they use 8 bits per pixel. The required heap space for a single frame is thus
57600 bytes which sums up to almost 3.5 MB for all frames. Therefore the total heap space should be
at least 4 MB. Pre-decoding takes a few seconds and when it is done, the animation starts. It merely
copies the individual decompressed frames from the heap to the frame buffer, which is very quick.
Therefore this version needs a delay after each frame is sent to the frame buffer. We have decided for
15 ms, which makes the rotation rather smooth.
The performance and the required CPU time could be further improved by copying the decompressed
individual images into Ravin-E's frame buffer instead of the heap. The total size of the frame buffer on
the startWARE-GHS-Ravin-E board is 64 MB which is plenty of space outside the current display area.
Transfer of the image to the screen location would then be accomplished by a BITBLT command to
Ravin-E. For the CPU that is a simple sequence of a few register write operations and as such it would
virtually cost no CPU time at all.
Summary of Contents for startWARE-GHS-Ravin-E
Page 6: ...6 User s Manual U17316EE1V0UM00 ...
Page 8: ...8 User s Manual U17316EE1V0UM00 ...
Page 10: ...10 User s Manual U17316EE1V0UM00 ...
Page 12: ...12 User s Manual U17316EE1V0UM00 ...
Page 14: ...14 User s Manual U17316EE1V0UM00 MEMO ...
Page 38: ...38 User s Manual U17316EE1V0UM00 MEMO ...
Page 40: ......