Large image/jpg decoding into external RAM

I have large background image that I need to decode. It does not fit into the internal RAM.
The external SDRAM is big enough but I cannot configure the image JPG/image decoder to put it there.

So it seems I need to create my own decoder or manually decode the image to a SDRAM buffer. I think it would be helpful to set memory location of the output image and cache through the API.

In an issue I’ve just wrote about introducing lv_malloc_caps to hook in custom allocators when a memory block with special capabilities is required. E.g. you can say in your lv_malloc_caps implementation that if the requested memory size is > 32kB and has some special caps, you allocate it manually from SRAM.

It’d be easy to implement in LVGL. What do you think?

Actually you can do it now too. In lv_conf.h you can configure a custom malloc, which normally falls back to LVGL’s or system’s malloc but for large sizes you can assign SRAM addresses.