This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 6fde766f19851a29da1fb2090c38154199bb00b0 Author: Julius Bairaktaris <[email protected]> AuthorDate: Sun Aug 30 15:53:03 2026 +0200 Commit: ArazIusubov <[email protected]> CommitDate: Wed Sep 16 22:05:28 2026 +0000 avfilter/vf_vqe_amf: only offer the formats the VQ enhancer accepts vqe_amf advertised BGRA, RGBA, RGBAF16 and X2BGR10 alongside NV12 and P010, but AMFVQEnhancer::Init() rejects all four with AMF_INVALID_ARG. Now that the input list is used for negotiation, a packed RGB source reaches the filter and fails at configuration time instead of being converted to a format the component takes. Drop the four from both lists. libavfilter then converts such a source to NV12 in software and the filter works, where before it aborted. A hardware frames context is not covered by format negotiation, so reject an unsupported sw_format explicitly rather than leaving the user with AMF_INVALID_ARG from Init(). The component's own capability query cannot be used to build this list. AMFVQEnhancer enumerates NV12, BGRA, ARGB, RGBA, P010, RGBA_F16 and R10G10B10A2 through GetCaps()/GetInputCaps(), each flagged native and stable across runs, but Init() accepts only NV12 and P010 and rejects the other five. AMFHQScaler and AMFVideoConverter do not have this problem, so the list cannot simply follow the query for every component. Reported as GPUOpen-LibrariesAndSDKs/AMF#610. Tested on Windows 11, RX 9070 XT, driver 32.0.31041.1004. Assisted-by: Claude Opus 5 Signed-off-by: Julius Bairaktaris <[email protected]> --- libavfilter/vf_vqe_amf.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libavfilter/vf_vqe_amf.c b/libavfilter/vf_vqe_amf.c index 901cfbdb5e..d368770c89 100644 --- a/libavfilter/vf_vqe_amf.c +++ b/libavfilter/vf_vqe_amf.c @@ -23,6 +23,7 @@ #include "libavutil/opt.h" +#include "libavutil/pixdesc.h" #include "libavutil/hwcontext.h" #include "libavutil/hwcontext_amf.h" #include "libavutil/hwcontext_amf_internal.h" @@ -67,20 +68,12 @@ static int amf_filter_query_formats(AVFilterContext *avctx) AV_PIX_FMT_DXVA2_VLD, AV_PIX_FMT_NV12, AV_PIX_FMT_P010, - AV_PIX_FMT_BGRA, - AV_PIX_FMT_RGBA, - AV_PIX_FMT_RGBAF16, - AV_PIX_FMT_X2BGR10, AV_PIX_FMT_NONE, }; static const enum AVPixelFormat output_pix_fmts_default[] = { AV_PIX_FMT_AMF_SURFACE, AV_PIX_FMT_NV12, AV_PIX_FMT_P010, - AV_PIX_FMT_BGRA, - AV_PIX_FMT_RGBA, - AV_PIX_FMT_RGBAF16, - AV_PIX_FMT_X2BGR10, AV_PIX_FMT_NONE, }; output_pix_fmts = output_pix_fmts_default; @@ -108,6 +101,12 @@ static int amf_vqe_filter_config_output(AVFilterLink *outlink) if (err < 0) return err; + if (in_format != AV_PIX_FMT_NV12 && in_format != AV_PIX_FMT_P010) { + av_log(avctx, AV_LOG_ERROR, "The VQ enhancer only accepts nv12 and p010, got %s.\n", + av_get_pix_fmt_name(in_format)); + return AVERROR(EINVAL); + } + device_ctx = amf_ctx->amf_device_ctx; res = AMF_IFACE_CALL(device_ctx->factory, CreateComponent, device_ctx->context, AMFVQEnhancer, &amf_ctx->component); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
