This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit de15c3678b28968d34ea461950d9af7018cfe015
Author:     Julius Bairaktaris <[email protected]>
AuthorDate: Fri Jul 31 13:01:57 2026 +0200
Commit:     ArazIusubov <[email protected]>
CommitDate: Wed Sep 16 22:05:28 2026 +0000

    avutil/hwcontext_amf: allow X2BGR10 and RGBAF16 frames contexts
    
    Both formats are already in format_map[] and map to AMF_SURFACE_R10G10B10A2
    and AMF_SURFACE_RGBA_F16, but they were missing from supported_formats[]
    and supported_transfer_formats[]. An AMF frames context could therefore
    not use them as sw_format, and hwupload/hwdownload rejected them, which
    in turn kept the AMF filters from offering the two formats AMF's HQ
    Scaler needs for HDR.
    
    Both are single-plane packed formats, so the existing transfer paths
    handle them unchanged: amf_transfer_data_to/from derive plane count from
    the surface and copy with av_image_copy2().
    
    Verified on Windows 11, RX 9070 XT, driver 32.0.31035.1003:
    
      ffmpeg -init_hw_device amf -f lavfi -i testsrc2=size=640x360 \
        -vf "format=x2bgr10le,hwupload,hwdownload,format=x2bgr10le" -f null -
    
    passes where it previously failed with "Invalid output format x2bgr10le
    for hwframe download", and a rawvideo rgbaf16le round-trip through
    hwupload,hwdownload comes back bit-exact.
    
    Assisted-by: Claude Opus 5
    Signed-off-by: Julius Bairaktaris <[email protected]>
---
 libavutil/hwcontext_amf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/hwcontext_amf.c b/libavutil/hwcontext_amf.c
index 505424af74..d67193a3c5 100644
--- a/libavutil/hwcontext_amf.c
+++ b/libavutil/hwcontext_amf.c
@@ -317,6 +317,8 @@ static const enum AVPixelFormat supported_formats[] = {
     AV_PIX_FMT_RGBA,
     AV_PIX_FMT_BGR0,
     AV_PIX_FMT_P010,
+    AV_PIX_FMT_X2BGR10,
+    AV_PIX_FMT_RGBAF16,
 #if CONFIG_D3D11VA
     AV_PIX_FMT_D3D11,
 #endif
@@ -334,6 +336,8 @@ static const enum AVPixelFormat 
supported_transfer_formats[] = {
     AV_PIX_FMT_BGRA,
     AV_PIX_FMT_RGBA,
     AV_PIX_FMT_P010,
+    AV_PIX_FMT_X2BGR10,
+    AV_PIX_FMT_RGBAF16,
     AV_PIX_FMT_NONE,
 };
 

-- 
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]

Reply via email to