Commit 6cd6127
authored
fix(JXL): Correctly set Quality for JPEG XL (#4933)
Distance in JPEG XL isn't linear, causing previous quality settings to
scale between lossless and visually lossless, instead of lossless and
the lowest quality.
Quality | libjxl Distance | Old OIIO Distance
|--------|------|------|
| 99 | 0.19 | 0.01 |
| 90 | 1.00 | 0.01 |
| 80 | 1.90 | 0.01 |
| 70 | 2.80 | 0.01 |
| 60 | 3.70 | 0.02 |
| 50 | 4.60 | 0.02 |
| 40 | 5.50 | 0.03 |
| 30 | 6.40 | 0.03 |
| 20 | 8.13 | 0.05 |
| 10 | 13.27 | 0.10 |
| 1 | 24.24 | 1.00 |
| 0 | 25.00 | Error |
Thankfully libjxl has a built in function to convert Quality to
Distance, so I've swapped it in.
Unable to test it myself, but it's a simple fix that I ran by another
libjxl dev too.
---------
Signed-off-by: Jonathan Brown <[email protected]>1 parent dcdb216 commit 6cd6127
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
0 commit comments