[FFmpeg-devel] [PATCH V4 2/5] libavutil/hwcontext_vaapi: Add a new nv12 format map to support vulkan frame

Wenbin Chen wenbin.chen at intel.com
Tue Nov 30 08:28:12 EET 2021


Vulkan will map nv12 to R8 and GR88, so add this map to vaapi to support
vulkan frame.

Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
---
 libavutil/hwcontext_vaapi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 75acc851d6..994b744e4d 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -992,6 +992,7 @@ static const struct {
 } vaapi_drm_format_map[] = {
 #ifdef DRM_FORMAT_R8
     DRM_MAP(NV12, 2, DRM_FORMAT_R8,  DRM_FORMAT_RG88),
+    DRM_MAP(NV12, 2, DRM_FORMAT_R8,  DRM_FORMAT_GR88),
 #endif
     DRM_MAP(NV12, 1, DRM_FORMAT_NV12),
 #if defined(VA_FOURCC_P010) && defined(DRM_FORMAT_R16)
-- 
2.25.1



More information about the ffmpeg-devel mailing list