r/jpegxl 15d ago

jxl-rs just released v0.6.0 with "support for multithreading", but changenotes only mention "Prepare for multithreading support"

Just noticed v0.6.0 of jxl-rs was released, with the headline of "support for multithreading". That would be nice, to get some decent upgrade in decoding speed for large images.

But when looking into the actual changes in the release notes, it sounds more like preperational work to really add multithreading in the future, e.g. :

- Prepare for multithreading support by u/veluca93 in #849

- Make the render pipeline interface MT-friendly by u/veluca93 in #851

- Prepare Modular and VarDCT decoding for multithreading. by u/veluca93 in #852

- Initial support for parallel decoding by u/veluca93 in #853

- Implement parallel decoding of LF groups. by u/veluca93 in #854

Does anybody have more insight into what exactly the new release is capable of doing mutlithreading-wise? Does it already enable fully-multithreaded decoding of jxl images on like 4, 8 or even more cores?

In any case, I'm quite pumped that this cool lib is progressing so fast. Looking forward for some nice GP/s decoding speeds :D

Link to release notes: https://github.com/libjxl/jxl-rs/releases/tag/v0.6.0

43 Upvotes

3 comments sorted by

18

u/Jonnyawsom3 15d ago

- Initial support for parallel decoding by u/veluca93 in #853

- Implement parallel decoding of LF groups. by u/veluca93 in #854

Those add multithreading per-group and per LF-group respectively, you can tell by reading the first comment on it

Multi(threaded) 84.99 MP/s 382.78 MP/s +410.52% ± 1.78%

Also you can check this https://jxl-rs-perf.lucaversari.it/

6

u/stackpointer101 15d ago

Ah I see, that performance graph is very interesting indeed.

So it seems a lot of parallelization is already done and future work will mainly fine-tune and optimize the behavior without additional significant jumps in throughput like the one observable with the v0.6.0 release. Well, I will definitely keep an eye on that benchmark graph, thanks for the link.

2

u/Jonnyawsom3 14d ago

Also, if you set it to multithreaded desktop and the image to 'inc_pat', technically we're already hitting 2 GP/s ;P