1
0
Fork 0
forked from len0rd/rockbox

imageviewer: Initial support for JPEG progressive images. Add decoder

Added jpeg decoder jpegp.c using RAINBOW lib. Currently enabled only for pictures not supported by old decoder (as old decoder more optimized for low mem targets)

Someone TODO:
 * Old decoder has optimized downscale logic which new decoder doesn't have (it gives big difference in required memory and time for decoding). This logic should be ported/adapted if possible.

 * Add smooth downscaling.

 * Grayscale support

Change-Id: Ie96bc62848b51cc6a3942f8e069ec6ab02dc1c56
This commit is contained in:
Roman Artiukhin 2024-10-09 19:39:15 +03:00 committed by Solomon Peachy
parent 64ad7354b6
commit b8238f7b20
19 changed files with 599 additions and 22 deletions

View file

@ -170,8 +170,12 @@ static int load_image(char *filename, struct image_info *info,
if (status < 0 || (status & (DQT | SOF0)) != (DQT | SOF0))
{ /* bad format or minimum components not contained */
#ifndef HAVE_LCD_COLOR
rb->splashf(HZ, "unsupported %d", status);
return PLUGIN_ERROR;
#else
return PLUGIN_JPEG_PROGRESSIVE;
#endif
}
if (!(status & DHT)) /* if no Huffman table present: */