Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SVT-AV1 PSY fork with --tune 4 #2412

Open
gitoss opened this issue Aug 25, 2024 · 5 comments
Open

Use SVT-AV1 PSY fork with --tune 4 #2412

gitoss opened this issue Aug 25, 2024 · 5 comments

Comments

@gitoss
Copy link

gitoss commented Aug 25, 2024

The PSY fork of SVT-AV1 features a new --tune 4 which is designed to improve still picture (i.e. AVIF) encoding:

"--tune 4 - A new Tune called Still Picture has been introduced for AVIF encoding, with promising gains observed over aomenc, aomenc 4:4:4, and mainline SVT-AV1" https://github.com/AOMediaCodec/libavif/releases

It would be nice to have libavif binaries use this fork and tune out of the box (if SVT-AV1 encoder is selected).

There are no indepennded benchmarks / image comparisons though as far as I can tell. gianni-rosato/svt-av1-psy@393cf6d

@y-guyon
Copy link
Collaborator

y-guyon commented Aug 27, 2024

Thank you for the suggestion.

We may want to wait for other benchmarks to confirm the gains and/or for the fork to be merged into the base repository before using it in libavif.

@juliobbv-p
Copy link

juliobbv-p commented Sep 28, 2024

Hi @y-guyon! I wanted to follow up on this issue with some updates to reassess the feature.

Regarding benchmarks, we just released our first results, which can be found on this page. Depending on the image, SVT-AV1-PSY gets between 5-15% gains over aomenc on the CID22 validation set and the gb82 photographic dataset by using the SSIMULACRA2 metric. Subjective evaluations corroborate the gain.

As an example, here's a visual comparison for a typical photo image. The SV1-AV1-PSY encoded image (147 KB) is 90.5% the percent the size of aomenc's (162 KB) for comparable image quality, and overall better consistency. For the record, the aomenc image took 3x as long to encode on my machine.

SVT-AV1-PSY also recently gained the ability to encode images with odd dimensions, and with sizes as small as 4x4 px (from the previous 64x64 px), which are especially useful for images as there's no longer a need to crop or pad them for the encoder to accept them.

I'd encourage you to give SVT-AV1-PSY's tune 4 a try!

@gitoss
Copy link
Author

gitoss commented Oct 30, 2024

I'd encourage you to give SVT-AV1-PSY's tune 4 a try!

Fyi, the devs of the svt-av1 -psy fork have have put up a comparison of their --tune 4 vs. other encoders: https://svt-av1-psy.com/avif/

@vrabaud
Copy link
Collaborator

vrabaud commented Oct 30, 2024

Very nice ! Thanks for the info ! Is there anything we should merge in libavif? I am thinking about gianni-rosato@d53aa45#diff-29748a2db41273018a16b71ccb60bcd7b632b86c78cc69bb88784702122ebdde

@gitoss
Copy link
Author

gitoss commented Oct 30, 2024

Very nice ! Thanks for the info ! Is there anything we should merge in libavif?

I didn't realize there was a commit / fork in the meantime...

Apart from using the -psy fork of svt-av1, the one thing that is important is to set the --tune to 4 by default when using svt as the avif encoder. It seems the -svt devs have this covered in 85512d7

Setting the default output depth to 10 could make sense, too - I dunno how many devices are around that fail to decode 10bpp avif though. a1c2afb

Since there is a fork, I guess/hope that the -svt devs will offer a pull request to the main libavif repo sooner or later - maybe an indication that this would be welcomed could be useful.

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

No branches or pull requests

4 participants