[FFmpeg-devel] [PATCH 2/2] Added support for direct RGB input to AMF encoder
Dmitrii Ovchinnikov
ovchinnikov.dmitrii at gmail.com
Mon Feb 17 15:51:05 EET 2025
---
libavcodec/amfenc.c | 7 +++++++
libavutil/hwcontext_amf.c | 2 ++
2 files changed, 9 insertions(+)
diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c
index 0fa3123cac..63b83a625b 100644
--- a/libavcodec/amfenc.c
+++ b/libavcodec/amfenc.c
@@ -117,6 +117,13 @@ const enum AVPixelFormat ff_amf_pix_fmts[] = {
#endif
AV_PIX_FMT_P010,
AV_PIX_FMT_AMF_SURFACE,
+ AV_PIX_FMT_BGR0,
+ AV_PIX_FMT_RGB0,
+ AV_PIX_FMT_BGRA,
+ AV_PIX_FMT_ARGB,
+ AV_PIX_FMT_RGBA,
+ AV_PIX_FMT_X2BGR10,
+ AV_PIX_FMT_RGBAF16,
AV_PIX_FMT_NONE
};
diff --git a/libavutil/hwcontext_amf.c b/libavutil/hwcontext_amf.c
index 5ba2ec5b07..b751a3c1ad 100644
--- a/libavutil/hwcontext_amf.c
+++ b/libavutil/hwcontext_amf.c
@@ -111,6 +111,8 @@ const FormatMap format_map[] =
{ AV_PIX_FMT_YUV420P, AMF_SURFACE_YUV420P },
{ AV_PIX_FMT_YUYV422, AMF_SURFACE_YUY2 },
{ AV_PIX_FMT_P010, AMF_SURFACE_P010 },
+ { AV_PIX_FMT_X2BGR10, AMF_SURFACE_R10G10B10A2 },
+ { AV_PIX_FMT_RGBAF16, AMF_SURFACE_RGBA_F16},
};
enum AMF_SURFACE_FORMAT av_av_to_amf_format(enum AVPixelFormat fmt)
--
2.47.1.windows.1
More information about the ffmpeg-devel
mailing list