I've always wanted to see just how fast the GBA can decode a full-screen JPEG picture. The JPEG decompression library in Jeff Frohwein's "gfxlib" is based on a decoder originally written for Visual Basic by Dmitry Brant. I used a combination of both versions to write an ASM version. It goes quite fast, but I think it can go faster with some optimizations by those who understand JPEG better.
Currently, my ASM port only supports non-subsampled (1x1) and 2x2 subsampled JPEGs. I don't have any means of saving JPEGs in 2x1, 1x2, etc. formats, and so have left those formats out.
The example binary flips through four JPEGs as fast as possible, including 1x1 and 2x2 JPEGs. The "mandrill.jpg" file is from another JPEG decompression library that takes 1/3 second to decode it. The remaining JPEGs are from a VB6 encoder port of a C-based encoder by Cristian Cuturicu.
As typical, I have heavily commented the source code, in hopes of making it easy to understand and follow, and look forward to hearing about any optimizations, bugfixes, etc. Enjoy!
Currently, my ASM port only supports non-subsampled (1x1) and 2x2 subsampled JPEGs. I don't have any means of saving JPEGs in 2x1, 1x2, etc. formats, and so have left those formats out.
The example binary flips through four JPEGs as fast as possible, including 1x1 and 2x2 JPEGs. The "mandrill.jpg" file is from another JPEG decompression library that takes 1/3 second to decode it. The remaining JPEGs are from a VB6 encoder port of a C-based encoder by Cristian Cuturicu.
As typical, I have heavily commented the source code, in hopes of making it easy to understand and follow, and look forward to hearing about any optimizations, bugfixes, etc. Enjoy!