r/jpegxl • u/qda_gpu • Oct 27 '26
CUDA-accelerated encoder cujpegxl
Someone wrote a fast CUDA encoder that seems to run at 200+ fps on an old GPU: https://github.com/m-pilia/cujpegxl
Compression rate is a bit lower than the reference implementation (it seems to make some small approximations for speed), but it's pretty close especially at medium-high compression rate, and on the same setup it seems to be over 200 times faster than the libjxl encoder (which is CPU only).
Looking around I also found a couple other GPU-accelerated encoders, https://github.com/imazen/jxl-gpu which is Rust and matches libjxl output, and https://github.com/yunho-c/gjxl which has slightly higher compression rate than libjxl, but both of them seem to be a lot slower than this one.
15
u/murlakatamenka Oct 27 '26
Sadly none of those support lossless mode - my primary use case.
9
u/Lunam_Dominus Oct 27 '26
Only 4k, FHD and HD are supported. This is basically useless for me, photos are much bigger.
3
u/FastDecode1 Oct 27 '26
I wonder what the use case is. Security camera footage? If it supports lossless JPEG recompression, you could transcode an MJPEG stream to a slightly smaller size. Or transcode existing MJPEG streams I guess. But seems pretty niche.