This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10177 - core jpeg decoder
Attached to Project:
Rockbox
Opened by Andrew Mahone (Unhelpful) - Thursday, 30 April 2009, 04:14 GMT+2
Last edited by Andrew Mahone (Unhelpful) - Saturday, 02 May 2009, 03:38 GMT+2
Opened by Andrew Mahone (Unhelpful) - Thursday, 30 April 2009, 04:14 GMT+2
Last edited by Andrew Mahone (Unhelpful) - Saturday, 02 May 2009, 03:38 GMT+2
|
DetailsCore JPEG decoder for all targets with >1bit LCD. This is a port of the plugin jpeg decoder to work in core, along with some other changes. Data is read from disk as needed, IDCT have been split into separate horizontal and vertical passes, allowing different IDCT scaling on each axis, and 16-wide IDCT output is added, allowing for upscaling by 2x during decode (or upscaling chroma channels during IDCT when decoding at 1x). Output is fed to the scaler, and read_jpeg_file and read_jpeg_fd functions are added with call signatures identical to the similar functions for BMP files. Callers for these functions must pass a buffer in the struct bmp that is large enough for decoded image data, the struct jpeg used by the decoder, decode buffers (variable based on scaling and output width) and scaler buffers (variable based on output width). read_jpeg_file is exported in the plugin API, and a test_core_jpeg plugin is provided which will act as a viewer to decode and display one image (use the select button to exit). I have tested on images with 1x2-, 2x1-, 2x2-, and non-subsampled chroma, as well as Y-only images and ones with varying sizes above or below display size and various reset marker intervals.
The test_core_jpeg plugin will need to be enabled by editing apps/plugins/SOURCES. There seems to be some extra blockiness at the borders of 16-wide IDCT blocks - this should be tracked down before commit, these IDCT routines are possibly not ported correctly from the jpeg-7-pre sources. The compiled object file for the loader is ~22KiB on an ARM color target (Gigabeat S). |
Closed by Andrew Mahone (Unhelpful)
Saturday, 02 May 2009, 03:38 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed as r20836
Saturday, 02 May 2009, 03:38 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed as r20836
Add API entries correctly (at the end of the struct), bump plugin API version, move huffman table setup to after struct jpeg is moved, so that pointers in huffman tables do not need to be updated as a separate step.
Apply the pre-round optimization from the 16-point IDCT to the others, saving a few adds in each routine, for a total of ~70B on ARM.