Genesi Home Home Projects Forums
Login
Username:

Password:

Remember Me
 
[Register an Account]

Developer Programs
i.MX6
i.MX515

Efika 5200B

Search Projects

Google

Sponsored By



Efika 5200B Project
Reggae on Efika

in category Multimedia
proposed by Grzegorz Kraszewski on 21st February 2006 (accepted on 20th March 2006)

Blog Entry

  Watching GIF animations
posted by Grzegorz Kraszewski on 26th July 2007

I've succesfully tested a few teens of GIF animations using "properly" hacked RView. This time it uses timer.device to get exactly 100 fps. As I wrote earlier, these 100 fps is an emulation of a constant framerate. A gif.decoder object just repeats frames. This approach is highly ineffective for display (it may be interesting for processing however, for example inserting an anim into a fixed fps movie). Of course gif.decoder can emulate any framerate from 1 fps to 200, including fractional ones. Fractional framerates are passed as numerator and denominator for the best timing accuracy. The decoder just aligns GIF frames in time to the specified time grid. A "real" GIF anim player will use video metaformat with inter-frame delays specified explicitly in the stream, avoiding redundant frame blitting this way.

Anyway Efika can manage even these 100 fps. I have some nice, long animation 152 x 80 in size, the real framerate happen to be constant 12.5 fps. Decoding this animation in realtime and blitting 152 x 80 ARGB32 frame 100 times per second takes 30% of Efika CPU. There are two ways to make it better. The first is metaformat, then frames are blitted at the real 12.5 frames per second. The second problem is transparency. Currently the decoder is "dumb" and tells an application every frame has transparency. In the case RView uses more CPU expensive WritePixelArrayAlpha() call instead of plain WritePixelArray().

So, the plan for a few next days: implement all 4 frame disposal methods (and extend metaformat with SAVE and RESTORE), make the decoder smarter with transparency detection, write a player using metaformat, create standalone metaformat player as a Reggae class.

PowerDeveloper.org: Copyright © 2004-2011, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org. All other names and trademarks used are property of their respective owners. Privacy Policy