|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
On the way to GIF
posted by Grzegorz Kraszewski on 13th May 2007
One may ask why I'm going to implement this old and obsolete image format in Reggae. While it is indeed old, I'm not consider it obsolete. Look at any WWW forum, there are a lot of emoticons. Yes, all animated ones are GIFs.
GIF is a surprisingly complex image format. Image merging, multiple local palettes, animation with partial updates, different ways of frame content replacement, transparency, progressive display... By implementing GIF format, I have an opportunity to extend Reggae functionality to support all these features in a logical way. GIF is a good test of Reggae framework flexibility and extendability. It passed this test so far, but there are still things to implement.
What is done so far? After testing some approaches, I've decided for 5-stage decoding pipeline. One may say it is too many, but I can increase code reusability this way, as many operations GIF decoding comprises, are common for other image formats. Three classes of five are specific for GIF, two may be reused in other cases.
- gif.demuxer is the first stage. The class contains GIF recognition routine, parses 'screen descriptor' and global palette. This class is finished already.
- gif.decoder detects image start markers, parsers sub-image descriptors, loads local image palettes and gathers LZW compressed pixel stream. This class is currently in the work.
- lzw.decompressor decompresses the LZW stream. It can be used standalone as well, as it can work in GIF and non-GIF (plain LZW) mode. The class is finished.
- videopcm.decoder converts palette based LUT8 format into ARGB32 using the current palette. The class is ready. Of course it can be used for other purposes than GIF decoding.
- gifsynth.decoder synthesises the complete image [frame] from subimages, applying background color, replacement modes etc. This clas is not done yet.
|
|
|
|
|
|