rockbox/apps/recorder
Michael Giacomelli 142a6fbb39 jpeg: decode RGB images
Both decoders treated every 3-component image as YCbCr, so RGB JPEGs
(as written by cjpeg -rgb, and by some Adobe software) came out with
wrong colours.

Decide the colour space as libjpeg does: a JFIF marker means YCbCr;
otherwise the transform flag of an Adobe APP14 marker decides (0 is
RGB); otherwise component IDs 'R', 'G', 'B' mean RGB.

Core loader: on colour targets R, G and B are stored in place in the
row buffer and the YUV conversion is skipped. Greyscale builds now
also decode G and B for RGB and combine them into luma per block,
which needs every component to be one block per MCU; other RGB
layouts are rejected there.

Plugin: RGB needs one block per MCU for every component, otherwise it
is rejected (colour targets fall back to jpegp). Colour builds convert
the R, G and B planes to YCbCr in place after decoding, so display and
greyscale view modes are unchanged; greyscale builds combine R, G and
B into luma per block as the core does.

Code size on the e200: core loader +351 bytes, plugin decoder +603
bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: Ib24a0b7690ca4c00b3ac01b2f511309efeac5975
2026-10-02 08:23:46 -04:00
..
albumart.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
albumart.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
bmp.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
bmp.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
icons.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
icons.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
jpeg_common.h jpeg: decode RGB images 2026-10-02 08:23:46 -04:00
jpeg_idct_arm.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
jpeg_load.c jpeg: decode RGB images 2026-10-02 08:23:46 -04:00
jpeg_load.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
keyboard.c keyboard: point-mode virtual keyboard for touchscreens 2026-08-25 09:56:46 -04:00
pcm_record.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pcm_record.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
peakmeter.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
peakmeter.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
recording.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
recording.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
resize.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
resize.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00