File 0006-libsvtav1-svt4-aq-compat.patch of Package media-ffmpeg-god-git

From: Misaka Build Factory
Subject: libsvtav1: handle adaptive quantization API change in SVT-AV1 4.x

SVT-AV1 4.x removed EbSvtAv1EncConfiguration.enable_adaptive_quantization
in favor of aq_mode. Keep behavior for manual QP mode by selecting the
correct field at compile time.

--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -238,7 +238,11 @@
     } else if (svt_enc->qp > 0) {
         param->qp                   = svt_enc->qp;
         param->rate_control_mode    = 0;
+#if defined(SVT_AV1_CHECK_VERSION) && SVT_AV1_CHECK_VERSION(4, 0, 0)
+        param->aq_mode              = 0;
+#else
         param->enable_adaptive_quantization = 0;
+#endif
     }
 
     desc = av_pix_fmt_desc_get(avctx->pix_fmt);
openSUSE Build Service is sponsored by