diff mbox series

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

Message ID 20240415090410.1138-4-Primeadvice@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/4] avcodec/amfenc: Fixes the color information in the output. | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Araz Iusubov April 15, 2024, 9:04 a.m. UTC
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(+)

Comments

new99y@163.com April 15, 2024, 10:23 a.m. UTC | #1
ffmpeg can't get video rotate info, 5.0 - 6.1.1 version all can't get video rotate info 
                tag = av_dict_get(m_pVideoSt->metadata, "rotate", tag, 0);
if (tag)
{
m_Rotate = atoi(tag->value);
}

   tag is NULL
diff mbox series

Patch

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;
     }