jxl-oxide v0.5.1
Version 0.5.0 and 0.5.1 of jxl-oxide (and version 0.3.0 of jxl-oxide-cli
) contains new decoding interface, a decent amount of performance boost, and various bugfixes.
Decoding interface changes
Push-based input API
Previously, the decoder got its data in pull-based way: something that implements std::io::Read
is given, the decoder reads ("pulls") bytes from it, try to decode those, and repeat. Now the internal API has been rewritten to push-based, meaning that byte slices are pushed into the decoder explicitly by users. The main reason of this rewrite is to optimize some internal routines of bitstream reader, but it has some (nice) side effects:
- It's easier to suspend decoding somewhere in a bitstream.
- The new API can accept async byte streams easily.
jxl-oxide provides convenience methods that deal with std::io::Read
types.
Thread-safe renderer
Renderer is now thread-safe! Frames can be simultaneously rendered in multiple threads as long as they are already decoded (frames are decoded when its bytes are pushed to the decoder).
Performance boost
Multithreaded rendering
The renderer itself has also introduced parallelism in various places, including multithreaded filters and group1 decoding. jxl-oxide uses Rayon for thread pool implementation. If you don't need multithreading support, rayon
feature can be turned off at compile time to completely disable multithreaded rendering (it will stay thread-safe though).
More SIMD routines
- SIMD version of edge-preserving filter is added.
- NEON specific SIMD routines are added for aarch64 (but not armv7), both autovectorized and handwritten.
CLI utilities
-
jxl-info
introduces new flags,--all-frames
and--with-offset
. -
jxl-dec
introduces new flag-j
(--num-threads
) which controls the number of threads in thread pool. -
jxl-dec
allows partial image files, and it will try decoding as much as possible. With some shell scripting, one can make an interesting progressive decoding animation:starrail-d1-e7-pdc.mp4
Other changes
- Optimize for special modular images by @tirr-c in #82
- jxl-color: Fast color transforms by @tirr-c in #93
- Rewrite bitstream reader, enable partial decoding by @tirr-c in #96
- Fuzzing via honggfuzz by @Nereuxofficial in #101
- Rewrite Modular buffer management by @tirr-c in #108
- Add license symlinks to individual crates by @kalev in #111
New Contributors
- @Nereuxofficial made their first contribution in #101
- @kalev made their first contribution in #111
Full Changelog: 0.4.0...0.5.1
-
A group is a tile in JPEG XL frame that serves as a unit of decoding. ↩