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

@ -0,0 +1,35 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
*
* $Id$
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include "plugin.h"
#include "mempool.h"
//define from rbunicode.h clashes with jpeg81.h struct
#undef COMP
#undef memset
#define memset(a,b,c) rb->memset((a),(b),(c))
#if defined(DEBUG) || defined(SIMULATOR)
#define printf rb->debugf
#else
#undef printf
#define printf(...)
#endif