From 832d0fec606aa5320c19162a6f7a0143baf2963f Mon Sep 17 00:00:00 2001 From: Frankie Dintino Date: Fri, 8 Sep 2023 09:31:58 -0400 Subject: [PATCH] chore: Update dependencies, including libavif to 1.0.1 --- ...aom-3.5.0-monochrome-realtime-encode.patch | 43 ------------------- wheelbuild/config.sh | 40 +++++++---------- 2 files changed, 16 insertions(+), 67 deletions(-) delete mode 100644 wheelbuild/aom-3.5.0-monochrome-realtime-encode.patch diff --git a/wheelbuild/aom-3.5.0-monochrome-realtime-encode.patch b/wheelbuild/aom-3.5.0-monochrome-realtime-encode.patch deleted file mode 100644 index 07dcd90..0000000 --- a/wheelbuild/aom-3.5.0-monochrome-realtime-encode.patch +++ /dev/null @@ -1,43 +0,0 @@ -From bf9d1f8d2b649ee8a02e6e8792075330bde185d4 Mon Sep 17 00:00:00 2001 -From: James Zern -Date: Thu, 27 Oct 2022 18:17:47 -0700 -Subject: [PATCH] fix monochrome encoding in realtime mode - -this is non-exhaustive, but covers the file in the issue report and the -newly added MonochromeRealtimeTest. - -Bug: https://github.com/AOMediaCodec/libavif/issues/1190 -Change-Id: I947a5d926daaae9c0a667114996ddd7bf9ff2013 ---- - av1/encoder/nonrd_pickmode.c | 3 ++- - av1/encoder/var_based_part.c | 2 +- - test/monochrome_test.cc | 47 +++++++++++++++++++++++++++++------- - 3 files changed, 41 insertions(+), 11 deletions(-) - -diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c -index 7267f9e39b..009b3c360d 100644 ---- a/av1/encoder/nonrd_pickmode.c -+++ b/av1/encoder/nonrd_pickmode.c -@@ -2777,7 +2777,8 @@ void set_color_sensitivity(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, - x->color_sensitivity[1] = 0; - return; - } -- for (int i = 1; i <= 2; ++i) { -+ const int num_planes = av1_num_planes(&cpi->common); -+ for (int i = 1; i < num_planes; ++i) { - if (x->color_sensitivity[i - 1] == 2 || source_variance < 50) { - struct macroblock_plane *const p = &x->plane[i]; - const BLOCK_SIZE bs = -diff --git a/av1/encoder/var_based_part.c b/av1/encoder/var_based_part.c -index efcb5a71f0..63f807733b 100644 ---- a/av1/encoder/var_based_part.c -+++ b/av1/encoder/var_based_part.c -@@ -1237,7 +1237,7 @@ static void setup_planes(AV1_COMP *cpi, MACROBLOCK *x, unsigned int *y_sad, - set_ref_ptrs(cm, xd, mi->ref_frame[0], mi->ref_frame[1]); - av1_enc_build_inter_predictor(cm, xd, mi_row, mi_col, NULL, - cm->seq_params->sb_size, AOM_PLANE_Y, -- AOM_PLANE_V); -+ num_planes - 1); - } - } - diff --git a/wheelbuild/config.sh b/wheelbuild/config.sh index d4ed5b6..e57745c 100644 --- a/wheelbuild/config.sh +++ b/wheelbuild/config.sh @@ -2,15 +2,14 @@ set -eo pipefail CONFIG_DIR=$(abspath $(dirname "${BASH_SOURCE[0]}")) - ARCHIVE_SDIR=pillow-avif-plugin-depends -LIBAVIF_VERSION=0.11.0 -AOM_VERSION=3.5.0 -DAV1D_VERSION=1.0.0 -SVT_AV1_VERSION=1.3.0 -RAV1E_VERSION=p20230417 -LIBWEBP_SHA=15a91ab179b0b605727d16fb751c12674da9dfec -LIBYUV_SHA=f9fda6e7 +LIBAVIF_VERSION=1.0.1 +AOM_VERSION=3.7.0 +DAV1D_VERSION=1.2.1 +SVT_AV1_VERSION=1.7.0 +RAV1E_VERSION=0.6.6 +LIBWEBP_SHA=e2c85878f6a33f29948b43d3492d9cdaf801aa54 +LIBYUV_SHA=464c51a0 CCACHE_VERSION=4.7.1 SCCACHE_VERSION=0.3.0 export PERLBREWURL=https://raw.githubusercontent.com/gugod/App-perlbrew/release-0.92/perlbrew @@ -205,10 +204,6 @@ function build_aom { extra_cmake_flags+=("-DCMAKE_EXE_LINKER_FLAGS=-Wl,-z,stack-size=2097152") fi - # Fix for https://github.com/AOMediaCodec/libavif/issues/1190 - (cd libaom-$AOM_VERSION \ - && patch -p1 -i $CONFIG_DIR/aom-3.5.0-monochrome-realtime-encode.patch) - mkdir libaom-$AOM_VERSION/build/work (cd libaom-$AOM_VERSION/build/work \ && cmake \ @@ -319,19 +314,19 @@ function build_rav1e { group_start "Build rav1e" if [ -n "$IS_MACOS" ] && [ "$PLAT" == "arm64" ]; then - librav1e_tgz=librav1e-macos-aarch64.tar.gz + librav1e_tgz=librav1e-$RAV1E_VERSION-macos-aarch64.tar.gz elif [ -n "$IS_MACOS" ]; then - librav1e_tgz=librav1e-macos.tar.gz + librav1e_tgz=librav1e-$RAV1E_VERSION-macos.tar.gz elif [ "$PLAT" == "aarch64" ]; then - librav1e_tgz=librav1e-linux-aarch64.tar.gz + librav1e_tgz=librav1e-$RAV1E_VERSION-linux-aarch64.tar.gz elif [ "$PLAT" == "i686" ]; then - librav1e_tgz=librav1e-linux-i686.tar.gz + librav1e_tgz=librav1e-$RAV1E_VERSION-linux-i686.tar.gz else - librav1e_tgz=librav1e-linux-generic.tar.gz + librav1e_tgz=librav1e-$RAV1E_VERSION-linux-generic.tar.gz fi curl -sLo - \ - https://github.com/fdintino/rav1e/releases/download/$RAV1E_VERSION/$librav1e_tgz \ + https://github.com/xiph/rav1e/releases/download/v$RAV1E_VERSION/$librav1e_tgz \ | tar -C $BUILD_PREFIX -zxf - if [ ! -n "$IS_MACOS" ]; then @@ -364,8 +359,9 @@ function build_libsharpyuv { -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_INSTALL_LIBDIR=lib \ "${cmake_flags[@]}" \ - && ninja sharpyuv) + && ninja sharpyuv install) group_end touch libsharpyuv-stamp } @@ -393,7 +389,7 @@ function build_libyuv { -DBUILD_SHARED_LIBS=0 \ -DCMAKE_BUILD_TYPE=Release \ "${cmake_flags[@]}" .. \ - && ninja yuv) + && ninja yuv install) group_end touch libyuv-stamp } @@ -450,12 +446,8 @@ function build_libavif { group_end build_libsharpyuv - mv libwebp-$LIBWEBP_SHA libavif-$LIBAVIF_VERSION/ext/libwebp - LIBAVIF_CMAKE_FLAGS+=(-DAVIF_LOCAL_LIBSHARPYUV=ON) build_libyuv - mv libyuv-$LIBYUV_SHA libavif-$LIBAVIF_VERSION/ext/libyuv - LIBAVIF_CMAKE_FLAGS+=(-DAVIF_LOCAL_LIBYUV=ON) group_start "Build libavif"