[FFmpeg-devel] [PATCH v1 2/2] lavu/hwcontext_vaapi: add vaapi_format_map support for A2R10G10B10/A2B10G10R10

Xinpeng Sun xinpeng.sun at intel.com
Wed Sep 25 05:45:44 EEST 2019


Enalbe the color space convertions p010->a2r10g10b10/a2b10g10r10 in VAAPI.

Signed-off-by: Xinpeng Sun <xinpeng.sun at intel.com>
---
 libavutil/hwcontext_vaapi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index cf117640f2..3aaa5ff0b5 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -133,6 +133,12 @@ static const VAAPIFormatDescriptor vaapi_format_map[] = {
 #endif
     MAP(ARGB, RGB32,   ARGB, 0),
     MAP(XRGB, RGB32,   0RGB, 0),
+#ifdef VA_FOURCC_A2R10G10B10
+    MAP(A2R10G10B10, RGB32_10, A2R10G10B10, 0),
+#endif
+#ifdef VA_FOURCC_A2B10G10R10
+    MAP(A2B10G10R10, RGB32_10, A2B10G10R10, 0),
+#endif
 };
 #undef MAP
 
-- 
2.17.1



More information about the ffmpeg-devel mailing list