jxlsave: sync quality to distance calculation with libjxl (#3050)

Ensures the quality to distance conversion is continuous at 30.

See:
ea5fa8074d
This commit is contained in:
Kleis Auke Wolthuizen 2022-09-14 14:40:40 +02:00 committed by GitHub
parent 63f1673beb
commit 6bf1422548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,7 +249,7 @@ vips_foreign_save_jxl_build( VipsObject *object )
if( !vips_object_argument_isset( object, "distance" ) )
jxl->distance = jxl->Q >= 30 ?
0.1 + (100 - jxl->Q) * 0.09 :
6.4 + pow(2.5, (30 - jxl->Q) / 5.0f) / 6.25f;
6.24 + pow(2.5, (30 - jxl->Q) / 5.0f) / 6.25f;
/* Distance 0 is lossless. libjxl will fail for lossy distance 0.
*/