Message ID | 20240530130826.374-6-ovchinnikov.dmitrii@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,01/10,v3] avutil: add hwcontext_amf. | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | fail | Make failed |
andriy/make_x86 | fail | Make failed |
diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c index 49dd91c4e0..510050e282 100644 --- a/libavcodec/amfenc.c +++ b/libavcodec/amfenc.c @@ -558,6 +558,10 @@ int ff_amf_encode_init(AVCodecContext *avctx) if ((ret = amf_load_library(avctx)) == 0) { if ((ret = amf_init_context(avctx)) == 0) { if ((ret = amf_init_encoder(avctx)) == 0) { + if (avctx->pix_fmt == AV_PIX_FMT_P010) { + AmfContext *ctx = avctx->priv_data; + AMF_RETURN_IF_FALSE(ctx, ctx->version >= AMF_MAKE_FULL_VERSION(1, 4, 32, 0), AVERROR_UNKNOWN, "10-bit encoder is not supported by AMD GPU drivers versions lower than 23.30.\n"); + } return 0; } }