Skip to content

Commit f86ad8b

Browse files
committed
Patch libavif for svt-av1 4.0 compatibility
1 parent 29ff5fc commit f86ad8b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

depends/install_libavif.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ version=1.3.0
77

88
pushd libavif-$version
99

10+
# Apply patch for SVT-AV1 4.0 compatibility
11+
# Pending release of https://github.com/AOMediaCodec/libavif/pull/2971
12+
patch -p1 < ../libavif-svt4.patch
13+
1014
if [ $(uname) == "Darwin" ] && [ -x "$(command -v brew)" ]; then
1115
PREFIX=$(brew --prefix)
1216
else

depends/libavif-svt4.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- a/src/codec_svt.c
2+
+++ b/src/codec_svt.c
3+
@@ -162,7 +162,11 @@ static avifResult svtCodecEncodeImage(avifEncoder * encoder,
4+
#else
5+
svt_config->logical_processors = encoder->maxThreads;
6+
#endif
7+
+#if SVT_AV1_CHECK_VERSION(4, 0, 0)
8+
+ svt_config->aq_mode = 2;
9+
+#else
10+
svt_config->enable_adaptive_quantization = 2;
11+
+#endif
12+
// disable 2-pass
13+
#if SVT_AV1_CHECK_VERSION(0, 9, 0)
14+
svt_config->rc_stats_buffer = (SvtAv1FixedBuf) { NULL, 0 };

0 commit comments

Comments
 (0)