mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
JPEG decoding requires additional space in the bitmap buffer beyond what is needed for the decoded pixel data. Provide a way to estimate how much overhead is needed. The actual overhead is sizeof(struct jpeg) + decode_buf_size, where the latter depends on the image size and JPEG encoding used. From my testing decode_buf_size is normally pretty small (under 5 KiB) but looking at the code it could be large in some cases, primarily with large images, so 32 KiB seems to be a decent compromise. Someone who knows better about JPEG should pick a better value if that's too big. Using a constant is obviously not the most accurate but it seems to be the simplest option for retrofitting to existing code. Change-Id: I573b0abb8ca2d79e43f185010487f07226edb793 |
||
|---|---|---|
| .. | ||
| 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 | ||