Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

buffering: ensure sufficient buffer size loading bitmaps

Commits 5aa0fc3 and 32f1418 (g#4451, g#4452) changed the
amount of space that was allocated for loading bitmaps
used to display album art.

Testing revealed that the size of the JPEG decode buffer
can reach up to (38 * 1024)B in some cases.

When the limit is reached, additional space is required
by the resize_on_load function.

Change-Id: If93b45754a4f5948b6160f659182e4618e01912e

+8 -2
+7 -1
apps/buffering.c
··· 975 975 * TODO: don't add unncessary overhead for .bmp images! */ 976 976 size += JPEG_DECODE_OVERHEAD; 977 977 #endif 978 - } 978 + /* resize_on_load requires space for 1 line + 2 spare lines */ 979 + #ifdef HAVE_LCD_COLOR 980 + size += sizeof(struct uint32_argb) * 3 * aa->dim->width; 981 + #else 982 + size += sizeof(uint32_t) * 3 * aa->dim->width; 979 983 #endif 984 + } 985 + #endif /* HAVE_ALBUMART */ 980 986 981 987 if (size == 0) 982 988 size = filesize(fd);
+1 -1
apps/recorder/jpeg_load.c
··· 2231 2231 const size_t JPEG_DECODE_OVERHEAD = 2232 2232 /* Reserve an arbitrary amount for the decode buffer 2233 2233 * FIXME: Somebody who knows what they're doing should look at this */ 2234 - (32 * 1024) 2234 + (38 * 1024) 2235 2235 #ifndef JPEG_FROM_MEM 2236 2236 /* Unless the struct jpeg is defined statically, we need to allocate 2237 2237 * it in the bitmap buffer as well */