From 8ab93db932c92b5a0d42753607344cffe3a1138a Mon Sep 17 00:00:00 2001 From: Frankie Dintino Date: Wed, 16 Apr 2025 21:14:08 -0400 Subject: [PATCH] Disable AOM high-bit-depth support --- .github/workflows/wheels-dependencies.sh | 3 +++ winbuild/build_prepare.py | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index d33eaa652..5fa817636 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -120,6 +120,8 @@ function build_libavif { local out_dir=$(fetch_unpack https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$LIBAVIF_VERSION.tar.gz libavif-$LIBAVIF_VERSION.tar.gz) # CONFIG_AV1_DECODER=0 is a flag for libaom (included as a subproject of # libavif) to disable the compilation and inclusion of aom's AV1 decoder. + # CONFIG_AV1_HIGHBITDEPTH=0 is another flag for libaom that disables support + # for encoding high bit depth images. (cd $out_dir \ && CMAKE_POLICY_VERSION_MINIMUM=3.5 cmake \ -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \ @@ -130,6 +132,7 @@ function build_libavif { -DAVIF_LIBYUV=LOCAL \ -DAVIF_CODEC_AOM=LOCAL \ -DCONFIG_AV1_DECODER=0 \ + -DCONFIG_AV1_HIGHBITDEPTH=0 \ -DAVIF_CODEC_AOM_DECODE=OFF \ -DAVIF_CODEC_DAV1D=LOCAL \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=$lto \ diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index c45e2e6db..b725e118d 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -400,6 +400,7 @@ DEPS: dict[str, dict[str, Any]] = { "-DAVIF_LIBYUV=LOCAL", "-DAVIF_CODEC_AOM=LOCAL", "-DCONFIG_AV1_DECODER=0", + "-DCONFIG_AV1_HIGHBITDEPTH=0", "-DAVIF_CODEC_AOM_DECODE=OFF", "-DAVIF_CODEC_DAV1D=LOCAL", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",