summaryrefslogtreecommitdiff
path: root/firmware/kernel
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-04-01 11:26:22 +0100
committerAidan MacDonald <amachronic@protonmail.com>2022-04-09 15:20:57 +0100
commit5aa0fc3b008e976a0d61a55814666229f2da47c8 (patch)
treecb7702db27a216ddfd897af5d617edd56a97bce3 /firmware/kernel
parent7718b244011661a5273121d1b545a18f1a5cd497 (diff)
downloadrockbox-5aa0fc3b008e976a0d61a55814666229f2da47c8.tar.gz
rockbox-5aa0fc3b008e976a0d61a55814666229f2da47c8.zip
jpeg: provide a rough estimate of decoder memory overhead
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
Diffstat (limited to 'firmware/kernel')
0 files changed, 0 insertions, 0 deletions