Patch libavif for svt-av1 4.0 compatibility (#9413)

This commit is contained in:
Andrew Murray 2026-01-30 23:25:42 +11:00 committed by GitHub
commit 0e8bb72a66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -7,6 +7,10 @@ version=1.3.0
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

View File

@ -0,0 +1,14 @@
--- 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 };