[Swfdec] [RFC] ijg libjpeg based jpeg decoder

Riccardo Magliocchetti riccardo.magliocchetti at gmail.com
Mon Aug 4 04:07:55 PDT 2008


Riccardo Magliocchetti wrote:
> Hi,
> 
> attached a shiny new jpeg image decoder based on ijg libjpeg. It works 
> fine here and valgrind is happy with him.
> 
> There are a couple of notes:
> 
> - i don't have numbers but i don't feel is faster than the cog one
> 
> - two test doesn't pass, listing from memory they are:
> -- image-jpeg-alpha.swf: image is not recognized as a jpeg
> -- negative-color-transform.swf: image differ
> Any hint?
> 
> - i think that the size of internal buffer set as 65K is much larger 
> that needed (as seen in gdk pixbuf), something like 8k would be better? 
> Update: libjpeg uses as default 4k so perhaps that's the right number.

This is a refreshed patch with few changes i have here:
- use 4K for buffer size
- fixed negative-color-transform.swf by using the correct alpha channel 
value during rgb -> argb
- image-jpeg-alpha.swf: fails because the alpha channel is ignored by the 
jpeg library.
- use existing macro from rgb -> argb conversion
- SWFDEC_ERROR is used instead of SWFDEC_WARNING for libjpeg errors

Benjamin, i'm posting this as a reference and not for requesting inclusion.

cheers,
riccardo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ijg-libjpeg-based-jpeg-decoding-2.diff
Type: text/x-diff
Size: 7699 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/swfdec/attachments/20080804/a0637be9/attachment-0001.diff 


More information about the Swfdec mailing list