Bug 17633 - ijg libjpeg based jpeg decoder patch
Summary: ijg libjpeg based jpeg decoder patch
Status: NEW
Alias: None
Product: swfdec
Classification: Unclassified
Component: library (show other bugs)
Version: git
Hardware: Other All
: medium enhancement
Assignee: swfdec ml
QA Contact: swfdec ml
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-17 09:55 UTC by Riccardo Magliocchetti
Modified: 2008-12-28 08:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
libjpeg based jpeg decoder (8.90 KB, patch)
2008-09-17 09:55 UTC, Riccardo Magliocchetti
Details | Splinter Review
ijg libjepg based jpeg decoding - v9 (9.43 KB, patch)
2008-12-27 03:36 UTC, Riccardo Magliocchetti
Details | Splinter Review
ijg libjepg based jpeg decoding - v10 (10.93 KB, text/plain)
2008-12-28 08:05 UTC, Riccardo Magliocchetti
Details

Description Riccardo Magliocchetti 2008-09-17 09:55:23 UTC
Created attachment 18963 [details] [review]
libjpeg based jpeg decoder

So this new revision have a couple of changes:

- fix a brown paper bag, i was reading the compressed data 1 (!!) byte at time, because the silly of me not only was using sizeof() on a malloc'ed area but i was even dereferencing it. Should now be a lot faster.

- improve the jpeg fscked soi workaround, now it doesn't try to patch the wrong soi, if there is a sane soi after that it justs skips data. Don't think the old was correct because libjpeg refused to decode the picture.

Feel free to use this bug to track regressions with dsjpeg.
Comment 1 Riccardo Magliocchetti 2008-09-17 09:59:02 UTC
(In reply to comment #0)
> - improve the jpeg fscked soi workaround, now it doesn't try to patch the wrong
> soi, if there is a sane soi after that it justs skips data. Don't think the old
> was correct because libjpeg refused to decode the picture.

Just noticed it fixes some testcase like the orisins game but there are stil cases like pitch hitter 2 that are not working. So not ready for inclusion.

Comment 2 Riccardo Magliocchetti 2008-09-21 08:12:08 UTC
Another site with jpeg image corruption:
http://thefiresign.com/firesign_121706.swf

Note to self: I've checked gnash and it works fine for both pinch hitter and the one above, there should be something dumb i'm doing.
Comment 3 Riccardo Magliocchetti 2008-12-27 03:36:38 UTC
Created attachment 21505 [details] [review]
ijg libjepg based jpeg decoding - v9

This is an updated version against origin/master with these changes:

- better bogus jpeg header workaround, now same as gnash 
- handling of cmyk and grayscale color space
- every file that previously failed now works \o/

The patch is till not ready for inclusion because:

- it needs review :)
- swfdec_jpeg_cmyk_to_argb loop does not compile
- more testing to sort out if i can remove ifdeffed out code in swfdec_jpeg_decode_argb, think so
Comment 4 Riccardo Magliocchetti 2008-12-28 08:05:51 UTC
Created attachment 21518 [details]
ijg libjepg based jpeg decoding - v10

Changelog from previous version:

- reworked swfdec_jpeg_x_to_argb functions a bit: cinfo->output_componenents is used to loop over the input image and a check of its expected size is added. Side effect is that swfdec_jpeg_cmyk_to_argb now compiles.
- removed code under #if 0


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.