Refine NewJxlExportParams
and discuss on Effort
/Tier
#416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently
NewJxlExportParams
returns the following struct:However, using this default
JxlExportParams
, the export time will be multiple times the magnitude of the time usingvips
/cjxl
.From
cjxl --help
:From
libvips
:We can see that default
distance
used bylibvips
is 1.0(rather than zero-value in Go of 0.0), so this PR adds Distance 1.0 toNewJxlExportParams
.And there seems a mismatch that
tier
option is not available incjxl
.The only
tier
I can find inlibjxl
are these:Tests
I have a JPG photo shot by Sony A7M3 with size of 11MB.
Using
vips
took 3.8sUsing
cjxl
0.8.2 took 1.7sUsing
govips
withNewJxlExportParams
took 85.89sUsing
govips
withDistance 1.0
took 8.28sHowever, this is still much slower than
vips
orcjxl
, maybe we should change defaultEffort
orTier
to 4? I have some benchmark here: