Commit graph

12 commits

Author SHA1 Message Date
Andrew Mahone
c8b67c3ca0 Flag EOF and empty buffer conditions as UNLIKELY in JPEG decoder.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20907 a1c6a512-1295-4272-9138-f99709370657
2009-05-11 00:16:57 +00:00
Andrew Mahone
b5c356be85 Fix a bug reading JPEG when the output data is smaller than sizeof(struct jpeg), and add more optional debugging output in the decoder.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20906 a1c6a512-1295-4272-9138-f99709370657
2009-05-11 00:16:48 +00:00
Andrew Mahone
74e4d17910 Don't build 16-point IDCT on greyscale targets, since it's only used for chroma components.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20887 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 10:32:13 +00:00
Andrew Mahone
e3b1d78dfc Fix test for direct JPEG output, bump plugin API as r20884 changed struct custom_format.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20885 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 10:10:26 +00:00
Andrew Mahone
91efc16256 Split 8-bit-to-native conversion in bmp.c into a function, add support for plugging unscaled output in BMP and JPEG loaders, use output_row_8_native in JPEG decoder when possible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20884 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 07:31:27 +00:00
Andrew Mahone
7b81cd0caf Convert Huffman decode from inline function to macro, for small code size saving on ARM and on Coldfire color, only finish DC decode on greyscale targets if decoding luma channel.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20874 a1c6a512-1295-4272-9138-f99709370657
2009-05-08 07:21:35 +00:00
Andrew Mahone
0af7494b37 Small size improvement for JPEG on ARM/Coldfire.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20873 a1c6a512-1295-4272-9138-f99709370657
2009-05-08 04:19:10 +00:00
Andrew Mahone
a75c72c169 Plugin JPEG decoder for data in memory, along with test_mem_jpeg.c and bench_mem_jpeg.c plugins to test and benchmark it, and a line-length clean up in jpeg_load.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20871 a1c6a512-1295-4272-9138-f99709370657
2009-05-08 03:46:48 +00:00
Andrew Mahone
d2c1298e19 Never use upscaling IDCT for luma (to reduce blockiness), plus some small size optimizations by not calculating or storing scale factors or k_need/zero_need for chroma on greyscale.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20866 a1c6a512-1295-4272-9138-f99709370657
2009-05-07 08:32:17 +00:00
Andrew Mahone
eef7945a97 Move YUV->RGB in JPEG load from before scaler to after scaler. Required change to struct custom_format, so sorted the plugin API as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20856 a1c6a512-1295-4272-9138-f99709370657
2009-05-06 04:53:56 +00:00
Bertrik Sikken
ad031e903c Make local function static in jpeg_load.c, add missing header file in read_image.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20848 a1c6a512-1295-4272-9138-f99709370657
2009-05-03 07:02:09 +00:00
Andrew Mahone
60d4209383 Add core JPEG reader, adapted from the JPEG plugin's decoder, with some changes to prevent include conflicts between the two decoders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20836 a1c6a512-1295-4272-9138-f99709370657
2009-05-01 23:24:23 +00:00