1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
https://github.com/AOMediaCodec/libavif/commit/74a21444397e323a088fa1f274c9fc942ee7a870.patch
https://bugs.gentoo.org/834262
From: Jamaika1 <lukaszcz18@wp.pl>
Date: Wed, 26 Jan 2022 18:24:31 +0100
Subject: [PATCH] Change function in SVT-AV1 0.9.0 (#807)
--- a/src/codec_svt.c
+++ b/src/codec_svt.c
@@ -92,7 +92,9 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
}
svt_config->encoder_color_format = color_format;
svt_config->encoder_bit_depth = (uint8_t)image->depth;
+#if !SVT_AV1_CHECK_VERSION(0, 9, 0)
svt_config->is_16bit_pipeline = image->depth > 8;
+#endif
// Follow comment in svt header: set if input is HDR10 BT2020 using SMPTE ST2084.
svt_config->high_dynamic_range_input = (image->depth == 10 && image->colorPrimaries == AVIF_COLOR_PRIMARIES_BT2020 &&
@@ -104,8 +106,12 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
svt_config->logical_processors = encoder->maxThreads;
svt_config->enable_adaptive_quantization = AVIF_FALSE;
// disable 2-pass
+#if SVT_AV1_CHECK_VERSION(0, 9, 0)
+ svt_config->rc_stats_buffer = (SvtAv1FixedBuf) { NULL, 0 };
+#else
svt_config->rc_firstpass_stats_out = AVIF_FALSE;
svt_config->rc_twopass_stats_in = (SvtAv1FixedBuf) { NULL, 0 };
+#endif
if (alpha) {
svt_config->min_qp_allowed = AVIF_CLAMP(encoder->minQuantizerAlpha, 0, 63);
|