-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I've been trying to use ravif
as an AVIF encoding backend in https://github.com/Shnatsel/wondermagick
I've observed that the images encoded with ravif
have lower SSIM and/or larger file size than those encoded with `imagemagick. I'm using imagemagick 6.x from Ubuntu 22.04, which uses libaom v3.3.0 for encoding.
I am using quality 50 in both encoders, which seems to produce reasonably close results in terms of SSIM and file size. Occasionally the file does come out smaller than with imagemagick at the cost of SSIM; if I adjust the cavif quality up to match imagemagick's SSIM, the file size increases beyond that of libaom.
Dropping the encoding speed helps decrease the file size, but often it doesn't match the libaom size even with --speed=1 which takes much longer to encode than libaom.
When inspecting the metadata, the most apparent difference between the generated files is that imagemagick produces images with 4:2:0 subsampling while ravif produces 4:4:4 images.
Files produced by imagemagick are also always 8-bit, while cavif will emit 10-bit files for images without an alpha channel. I've only messed around with bit depths a little, but it seems that 10-bit images produce a slightly larger file for an ever so slightly better SSIM.
The same holds for the cavif
CLI tool from git on commit 9733893 which uses rav1e v0.8.1