jxl-oxide icon indicating copy to clipboard operation
jxl-oxide copied to clipboard

High ram usage with decodint to png high resolution, lossless jpeg recompression

Open Quackdoc opened this issue 2 years ago • 2 comments

Example image: https://files.catbox.moe/2kdb4f.jxl source image: https://dolphin-emu.org/m/user/blog/progress-report/2016-november/windwaker35xnative.jpg

has dimensions of 23164x18480, currently decoding this quickly leads to OOM, this was made with lossless jpeg recompression, I dont have the ram to compress it without using that.

Quackdoc avatar May 16 '23 19:05 Quackdoc

Currently jxl-oxide allocates buffer for the whole image when decoding to image (this means ~5GB of memory for a single three-channel 23164x18480 frame). Maybe we need a streaming decode option...

tirr-c avatar May 17 '23 06:05 tirr-c

A few thoughts on this issue:

  • For some images, it might be inevitable that the memory usage is high; we need to keep full framebuffers if they are used for blending. Optimizing cropped decoding would be helpful in this case (by requesting multiple cropped renders to produce the full image).
  • Improving caches might help reducing memory usage, but I haven't investigated on this.

tirr-c avatar May 24 '23 06:05 tirr-c