scummvm/scummvm — pull request #374 by sev- (2013-08-08 20:14:34+00:00)
Title: Replace our JPEG decoder with one capable of handling progressive JPEGs

Wintermute currently lacks support for progressive JPEGs. We've been long opponents of adding libjpeg dependency, and I completely agree with that.

Some time ago Scott Thomas started to work on the progressive code as required by GroovieV2 engine as well, but it appeared that the whole beast is quite complex. I studied his code and was going to complete that, but...

There exists one excellent Public Domain minimal JPEG decoder supporting many JPEG variants, including, of course, progressive ones. The code is located at https://code.google.com/p/jpeg-compressor/

This pull request replaces our custom decoder with this one. We would end up with approximately same line count, so there is no code bloat in fact. But this gives us a nice opportunity to borrow a well-tested code, not bringing another dependency and concentrate on the engines code.

Currently it comes down at the cost of disabling some not-finished code in GroovieV2, but I am willing to help with adding the missing feature (which is basically an exposing of YUV surfaces) to this decoder when those ROQ stills get understood.