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

Update libavif (v0.12-main) and AOM (3.6) for improved compression and speed #1334

Merged
merged 4 commits into from
Mar 10, 2023

Conversation

andrerom
Copy link
Contributor

@andrerom andrerom commented Feb 28, 2023

Noticed there are several newer AOM and libavif releases where out that have focused a lot on compression quality and speed. There is no libavif tag yet using AOM 3.6 so used latests commit here.


Quick comparison locally:

Sustainable Development Goal 3 graphic, iprt.uneca.org

  • Default settings (Quality: 30, Effort: 4): dev (3.1) at 22kb vs update_libavif_aom (3.6) 14.8kb, similar perceived compression artifacts on edges of hearth (305% zoom)
  • Higher settings (Quality: 40, Effort: 7): Artifacts goes away on 3.6 build (20.4kb) but not yet on 3.1 build (19kb)
  • Speed: 3.6 build seem maybe 5-10% faster on all mentioned quality/effort levels.

People crossing street in Vienna, unsplash.com
Credit: https://unsplash.com/photos/PMxT0XtQ--A

  • Default settings (Quality: 30, Effort: 4): dev (3.1) at 425kb vs update_libavif_aom (3.6) 438kb, similar perceived smoothing artifacts on skin (when zoomed)
  • Higher settings (Quality: 40, Effort: 7): Smoothing effect goes away on 3.6 build (714kb) but not yet on 3.1 build (644kb)
  • Speed: 3.6 build seem maybe 10-20% faster on all mentioned quality/effort levels.

Result is a bit of a mixed bag considering building this took 3 hours (on M1). Was hoping for both quality, size and speed improvements across the board, but 2 out of 3 in most cases at least.

x86-64 users might see better speed numbers as there are a fair bit of SSE (AOM 3.3) and AVX (AOM 3.5) optimizations recently in AOM (assuming WASM SIMD is used here for AVIF).

@google-cla
Copy link

google-cla bot commented Feb 28, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@andrerom
Copy link
Contributor Author

andrerom commented Mar 2, 2023

Since Google bot does not update it's comment with this: CLA has been signed, either click link above and click "Refresh", or directly the new invocation url.

@jakearchibald
Copy link
Collaborator

Thanks for this! I'll get the AVIF team to take a look, as I'd also like to know if there are new features we could be exposing.

@andrerom
Copy link
Contributor Author

andrerom commented Mar 2, 2023

Great! And yes, might be there are incoming changes in libavif worth waiting for, and/or libavif/AOM features Squoosh could easily take advantage of for more speed/quality/features.

@jakearchibald
Copy link
Collaborator

I'm not so bothered about waiting, more that there may have been features already in this new version that we could expose. I also want them to check our glue code is still the best way to interface with the library. I've seen some colour shifting occasionally that makes me worry that we're doing something incorrect with colour spaces, but I've also seen others say that colour shifting is a general AVIF issue.

Copy link

@FrankGalligan FrankGalligan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. These look good to update too.

@jakearchibald
Copy link
Collaborator

I've updated things for the latest AVIF recommended internally. Let's land this! Thanks for the help @andrerom

@jakearchibald jakearchibald merged commit cd33690 into GoogleChromeLabs:dev Mar 10, 2023
@andrerom andrerom deleted the update_libavif_aom branch March 13, 2023 11:01
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

Successfully merging this pull request may close these issues.

3 participants