diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index bbc52352c18..32492d20ff7 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -104,7 +104,7 @@ LIBWEBP_VERSION=1.6.0 BZIP2_VERSION=1.0.8 LIBXCB_VERSION=1.17.0 BROTLI_VERSION=1.2.0 -LIBAVIF_VERSION=1.3.0 +LIBAVIF_VERSION=1.4.0 function build_pkg_config { if [ -e pkg-config-stamp ]; then return; fi diff --git a/Tests/test_file_avif.py b/Tests/test_file_avif.py index ffc4ce0210d..a25f7717797 100644 --- a/Tests/test_file_avif.py +++ b/Tests/test_file_avif.py @@ -145,14 +145,14 @@ def test_write_rgb(self, tmp_path: Path) -> None: # avifdec hopper.avif avif/hopper_avif_write.png assert_image_similar_tofile( - reloaded, "Tests/images/avif/hopper_avif_write.png", 6.02 + reloaded, "Tests/images/avif/hopper_avif_write.png", 6.88 ) # This test asserts that the images are similar. If the average pixel # difference between the two images is less than the epsilon value, # then we're going to accept that it's a reasonable lossy version of # the image. - assert_image_similar(reloaded, im, 8.62) + assert_image_similar(reloaded, im, 9.28) def test_AvifEncoder_with_invalid_args(self) -> None: """ @@ -461,12 +461,9 @@ def test_decoder_codec_cannot_encode(self, tmp_path: Path) -> None: @pytest.mark.parametrize( "advanced", [ - { - "aq-mode": "1", - "enable-chroma-deltaq": "1", - }, - (("aq-mode", "1"), ("enable-chroma-deltaq", "1")), - [("aq-mode", "1"), ("enable-chroma-deltaq", "1")], + {"tune": "psnr"}, + (("tune", "psnr"),), + [("tune", "psnr")], ], ) def test_encoder_advanced_codec_options( diff --git a/depends/install_libavif.sh b/depends/install_libavif.sh index 0089bf2b5fd..5c5c6f3f7c2 100755 --- a/depends/install_libavif.sh +++ b/depends/install_libavif.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eo pipefail -version=1.3.0 +version=1.4.0 if [[ "$GHA_LIBAVIF_CACHE_HIT" == "true" ]]; then @@ -17,10 +17,6 @@ else pushd libavif-$version - # Apply patch for SVT-AV1 4.0 compatibility - # Pending release of https://github.com/AOMediaCodec/libavif/pull/2971 - patch -p1 < ../libavif-svt4.patch - if [ $(uname) == "Darwin" ] && [ -x "$(command -v brew)" ]; then PREFIX=$(brew --prefix) else diff --git a/depends/libavif-svt4.patch b/depends/libavif-svt4.patch deleted file mode 100644 index 7abfc529970..00000000000 --- a/depends/libavif-svt4.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/codec_svt.c -+++ b/src/codec_svt.c -@@ -162,7 +162,11 @@ static avifResult svtCodecEncodeImage(avifEncoder * encoder, - #else - svt_config->logical_processors = encoder->maxThreads; - #endif -+#if SVT_AV1_CHECK_VERSION(4, 0, 0) -+ svt_config->aq_mode = 2; -+#else - svt_config->enable_adaptive_quantization = 2; -+#endif - // disable 2-pass - #if SVT_AV1_CHECK_VERSION(0, 9, 0) - svt_config->rc_stats_buffer = (SvtAv1FixedBuf) { NULL, 0 }; diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 34f3065484c..f240cb02ad8 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -119,7 +119,7 @@ def cmd_msbuild( "HARFBUZZ": "12.3.2", "JPEGTURBO": "3.1.3", "LCMS2": "2.18", - "LIBAVIF": "1.3.0", + "LIBAVIF": "1.4.0", "LIBIMAGEQUANT": "4.4.1", "LIBPNG": "1.6.55", "LIBWEBP": "1.6.0",