mirror of
https://github.com/python-pillow/Pillow.git
synced 2026-02-02 21:45:59 +03:00
Patch libavif for svt-av1 4.0 compatibility (#9413)
This commit is contained in:
commit
0e8bb72a66
|
|
@ -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
|
||||
|
|
|
|||
14
depends/libavif-svt4.patch
Normal file
14
depends/libavif-svt4.patch
Normal 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 };
|
||||
Loading…
Reference in New Issue
Block a user