4 ms·
This is of intense interest to me - I had no idea you could do this with an existing jpeg. 20% would be a world-changing difference for an application I am work
by bob1029 5y ago
This is of intense interest to me - I had no idea you could do this with an existing jpeg. 20% would be a world-changing difference for an application I am working on right now, assuming the added encoding/decoding stages do not add substantial latency to the process.
Is there some variant of libjpeg-turbo that works for XL?
- joshcryer 5y agoUnfortunately as far as I can find there is no optimized encoder or decoder for JXL yet. Everything uses the spec encoder, which works fine on modern hardware, but for an example on my 20 year old laptop it takes several seconds to decode an image. Encoding an image with "tortoise" mode takes 10+ minutes. One nice feature though is that JPEG->JPEG XL lossless encoding was a priority, and it's as easy as doing "cjxl my.jpg my.jxl". The result is a lossless encode with EXIF data kept for a full bit perfect JPEG if you do "djxl my.jxl my.jpg." It's also pretty fast even on my old laptop.
- bob1029 5y ago> 10+ minutes Ouch. I'll stick to regular jpeg for now... I can crank out a 1080p encode in under 10 milliseconds using libjpeg-turbo on my target platform.
- rndgermandude 5y agoThe 10+ minutes that OP observed where in tortoise (=9) mode tho. That's the slowest mode, comparable to "placebo" mode in x264, and meant as a "test" mode, not as a daily driver. The libjxl default is "squirrel" (=7), and you can go as low as lightning (=1), so you have a choice to trade compression efficiency for compression speed. Additionally, there are different decoder modes (in the encoder), allowing you to make tradeoffs between efficiency/density vs speed. But yeah, libjxl will remain slower than libjpeg-turbo, especially on encodes.