Skip to content

Drop deprecated libjxl build flags - #248

Merged
danoli3 merged 1 commit into
danoli3:masterfrom
nyfair:master
Nov 1, 2026
Merged

danoli3 merged 1 commit into
danoli3:masterfrom
nyfair:master

Conversation

@nyfair

@nyfair nyfair commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Jpegli has been removed in libjxl 0.1.2 and appears to be no longer actively maintained.

Also, what do you think about adding the following highway flags to the libjxl build? It only adds a tiny bit to the binary size, but provides SIMD optimizations for these specific CPU targets

-DJPEGXL_ENABLE_HWY_AVX3=ON -DJPEGXL_ENABLE_HWY_AVX3_ZEN4=ON -DJPEGXL_ENABLE_HWY_AVX3_SPR=ON -DJPEGXL_ENABLE_HWY_AVX3_DL=ON

@danoli3

danoli3 commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thanks. Removing the jpegli flags is right: libjxl 0.12 (the description says 0.1.2) moved jpegli to its own repository, and its CMake no longer defines JPEGXL_ENABLE_JPEGLI or JPEGXL_ENABLE_JPEGLI_LIBJPEG, so these were dead arguments.

On the Highway flags, I measured them on current master: x86_64 macOS, Release, shared FreeImage with bundled libjxl 0.12.0.

libFreeImage.dylib libjxl.a
This PR 14,276,328 B 6,540,792 B
+ AVX3, AVX3_ZEN4, AVX3_SPR, AVX3_DL 16,187,720 B (+1.91 MB, +13.4%) 9,178,408 B (+2.64 MB)
  • AVX3_DL is already enabled by default in 0.12 (566 N_AVX3_DL symbols in the baseline), so that flag changes nothing.
  • AVX3, AVX3_SPR and AVX3_ZEN4 are in libjxl's JPEGXL_HWY_TARGETS_OFF_BY_DEFAULT list. Each adds roughly 560 dispatched symbols.

That's almost 2 MB for code that only runs on AVX-512 CPUs, while #200 is working to make the library smaller. So I'd rather not enable them by default. An opt-in CMake option that defaults OFF would be fine if a decode benchmark shows a worthwhile speedup on AVX-512 hardware. I haven't measured speed.

@danoli3
danoli3 merged commit 18faf62 into danoli3:master Nov 1, 2026
84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants