这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jonnyawsom3
Copy link
Collaborator

@jonnyawsom3 jonnyawsom3 commented May 5, 2025

Currently only Effort 8 uses LZ77 and Effort 9+ use LZ77-Optimal, causing a large difference between 7 and 8 when -P 0 is used. This has been present since a regression in v0.11.

This PR enables RLE for Efforts 5-7, with Predictor Zero enabling RLE at Effort 1-4, LZ77 for Effort 5-8 and LZ77-Optimal for Effort 9+. ICC compression is also higher for profiles up to 16KiB in size. This results in roughly a 5% encoding speed penalty but up to 25,000x smaller filesize, when using a solid color image with cjxl -d 0 -P 0 -g 3. Test Image

Main

JPEG XL encoder v0.12.0 5e1e5530 [_AVX2_,SSE4,SSE2]
Encoding [Modular, lossless, effort: 7]
Compressed to 12583.2 kB (6.000 bpp).
4096 x 4096,  6.958 MP/s [6.96, 6.96], , 1 reps, 16 threads.

PR

JPEG XL encoder v0.12.0 [_AVX2_,SSE4,SSE2]
Encoding [Modular, lossless, effort: 7]
Compressed to 479 bytes (0.000 bpp).
4096 x 4096,  7.064 MP/s [7.06, 7.06], , 1 reps, 16 threads.

jonnyawsom3 and others added 6 commits May 5, 2025 03:50
Use RLE for Effort 5-7, LZ77 for Effort 8 and LZ77-Optimal for Effort 9+.
Also always use LZ77 with Predictor Zero.
@eustas eustas added this pull request to the merge queue May 5, 2025
Merged via the queue into libjxl:main with commit 5f9ef79 May 5, 2025
96 checks passed
@jonnyawsom3 jonnyawsom3 deleted the LZ77-Tweaks branch May 20, 2025 01:22
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.

4 participants