[FFmpeg-devel] [PATCH 4/4] avcodec/amfenc: GPU driver version check

Araz Iusubov primeadvice at gmail.com
Mon Apr 15 12:04:10 EEST 2024


Implemented gpu driver check.
10-bit patch works incorrectly on driver version lower than 23.30.

---
 libavcodec/amfenc_av1.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/amfenc_av1.c b/libavcodec/amfenc_av1.c
index 634eeea48f..7463251529 100644
--- a/libavcodec/amfenc_av1.c
+++ b/libavcodec/amfenc_av1.c
@@ -215,6 +215,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
                                 : avctx->pix_fmt;
     color_depth = AMF_COLOR_BIT_DEPTH_8;
     if (pix_fmt == AV_PIX_FMT_P010) {
+        AMF_RETURN_IF_FALSE(ctx, ctx->version >= AMF_MAKE_FULL_VERSION(1, 4, 32, 0), AVERROR_UNKNOWN, "HEVC 10-bit encoder is not supported by AMD GPU drivers versions lower than 23.30.\n");
         color_depth = AMF_COLOR_BIT_DEPTH_10;
     }
 
-- 
2.43.0.windows.1



More information about the ffmpeg-devel mailing list