mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
When all three components share 1x2 or 2x1 sampling there is no chroma subsampling, but each interleaved MCU holds two blocks per component. The core loader assumed one chroma block per MCU, so these files (the folder.jpg in the original report) decoded to garbage and have been rejected since chroma sampling is validated. Lay out the MCU generically in fix_headers(): each component's H x V blocks in turn, with a per-block position that places chroma blocks with the same offsets as luma. The MCU size and decode buffer now come from the luma sampling in colour builds too, and the chroma IDCT scale from the luma:chroma sampling ratio, which is unchanged for 1x1 chroma. The unused subsample_x/y fields are removed. All other layouts decode byte-identically to before at every scale. The new layouts decode byte-identically to the same image encoded as 4:4:4. Code size drops by 108 bytes on the e200 and struct jpeg by 20 bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Change-Id: I63a894d6609e56f3553a902afd6278ce70e04637 |
||
|---|---|---|
| .. | ||
| albumart.c | ||
| albumart.h | ||
| bmp.c | ||
| bmp.h | ||
| icons.c | ||
| icons.h | ||
| jpeg_common.h | ||
| jpeg_idct_arm.S | ||
| jpeg_load.c | ||
| jpeg_load.h | ||
| keyboard.c | ||
| pcm_record.c | ||
| pcm_record.h | ||
| peakmeter.c | ||
| peakmeter.h | ||
| recording.c | ||
| recording.h | ||
| resize.c | ||
| resize.h | ||