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

Conversation

@jonnyawsom3
Copy link
Collaborator

A minor follow-up to #4225.

Adjusts behaviour when Predictor Zero is used, giving extra speed at low effort settings and removing a redundant faster decoding check. cjxl -d 0 -e 2 -P 0 goes from 22.797 MP/s to 27.256 MP/s with no impact on density.

@jonnyawsom3 jonnyawsom3 requested a review from jonsneyers June 25, 2025 09:09
@jonsneyers
Copy link
Member

I guess this is only because -d 0 -e 2 -P 0 ends up using the ClampedGradient predictor anyway, but adding the -P 0 would make it try to do lz77 which is not very useful?

@jonnyawsom3
Copy link
Collaborator Author

jonnyawsom3 commented Jun 25, 2025

Exactly. File size was actually identical, suggesting it does the LZ77 but then doesn't save it. Likely because efforts 1-3 have some hardcoded parameters.

I also changed it so -P 0 will use RLE for effort 5 too, as RLE 4 to 5 have a large density change (11.5 bpp to 9.3 bpp), but LZ77 5 to 6 had almost none (7.24 bpp to 7.2 bpp). Means the effort levels have better tradeoffs.

@jonnyawsom3
Copy link
Collaborator Author

Needs to be added to the merge queue, if you don't mind

@jonsneyers jonsneyers added this pull request to the merge queue Jun 25, 2025
Merged via the queue into libjxl:main with commit 876aa47 Jun 25, 2025
89 checks passed
@jonnyawsom3 jonnyawsom3 deleted the patch-2 branch June 25, 2025 12:36
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