Squoosh Implementation of AVIF

248 views
Skip to first unread message

Aryan Pingle

unread,
Sep 24, 2023, 1:37:31 AM9/24/23
to AV1 Discussion
Hi everyone, I'm part of the team that works on squoosh.app - an image compression web app that lets you play with several image codecs in-browser. I'm upgrading our AVIF version from v0.11.1 to the latest v1.0.1 and I'd love to get your feedback on it. Are there any new features / API's that we should expose to the user?

Here's the code that's updating our AVIF: https://github.com/GoogleChromeLabs/squoosh/pull/1381

Thanks,
Aryan Pingle

Wan-Teh Chang

unread,
Sep 25, 2023, 8:57:58 PM9/25/23
to av1-d...@aomedia.org, Aryan Pingle
On Sat, Sep 23, 2023 at 10:37 PM Aryan Pingle <realary...@gmail.com> wrote:
>
> Hi everyone, I'm part of the team that works on squoosh.app - an image compression web app that lets you play with several image codecs in-browser. I'm upgrading our AVIF version from v0.11.1 to the latest v1.0.1 and I'd love to get your feedback on it. Are there any new features / API's that we should expose to the user?
>
> Here's the code that's updating our AVIF: https://github.com/GoogleChromeLabs/squoosh/pull/1381

Hi Aryan,

Thank you for reaching out. I will take a look at your pull request tomorrow.

Off the top of my head, I think you can expose the
AVIF_CHROMA_DOWNSAMPLING_SHARP_YUV option for avifImageRGBToYUV().
Also note that the new "quality" encoder setting replaced the
"cq-level" aom-specific option. So cqLevel and cqAlphaLevel should be
changed to quality and alphaQuality, respectively.

Wan-Teh

Aryan Pingle

unread,
Oct 21, 2023, 5:26:26 AM10/21/23
to AV1 Discussion, Wan-Teh Chang, Aryan Pingle
Hi Wan-Teh,

I'm trying to use the AVIF_CHROMA_DOWNSAMPLING_SHARP_YUV downsampling option, but it seems like I might need to compile AVIF with some additional flags for it?
I see that it depends on the libsharpyuv  library, but I can't figure out how to use the correct AVIF_LOCAL_* flag (I think, according to the ext/README.md file).
Any help would be most appreciated!

Thanks,
Aryan Pingle

 

Wan-Teh Chang

unread,
Oct 21, 2023, 9:37:05 AM10/21/23
to Aryan Pingle, AV1 Discussion
Hi Aryan,

Yes, the AVIF_CHROMA_DOWNSAMPLING_SHARP_YUV option requires that
libavif be built with the libsharpyuv library.

libavif/CMakeLists.txt uses libsharpyuv automatically if it is
present. So libsharpyuv needs to be either installed as a system
library or available locally in libavif/ext/libwebp/ (by running the
script libavif/ext/libsharpyuv.cmd and then passing
-DAVIF_LOCAL_LIBSHARPYUV=ON to libavif's cmake command). Please give
this a try.

There is another library that libavif/CMakeLists.txt treats in exactly
this way -- libyuv. If libyuv is installed as a system library or
available locally in libavif/ext/libyuv/ (by running the script
libavif/ext/libyuv.cmd and then passing -DAVIF_LOCAL_LIBYUV=ON to
libavif's cmake command), libavif/CMakeLists.txt will use it
automatically.

Wan-Teh
Reply all
Reply to author
Forward
0 new messages