Skip to content

Commit

Permalink
eglimage: Add AV12 DMABuf import support
Browse files Browse the repository at this point in the history
The per plane format mapping for AV12 was missing, which would force
raw upload.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1199>
  • Loading branch information
ndufresne committed Jun 10, 2021
1 parent 0661b15 commit 025a14e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gst-libs/gst/gl/egl/gsteglimage.c
Expand Up @@ -545,6 +545,10 @@ _drm_rgba_fourcc_from_info (const GstVideoInfo * info, int plane,
*out_format = plane == 0 ? GST_GL_R16 : GST_GL_RG16;
return plane == 0 ? DRM_FORMAT_R16 : DRM_FORMAT_RG1616;

case GST_VIDEO_FORMAT_AV12:
*out_format = plane == 1 ? GST_GL_RED : GST_GL_RG;
return plane == 1 ? rg_fourcc : DRM_FORMAT_R8;

default:
GST_ERROR ("Unsupported format for DMABuf.");
return -1;
Expand Down

0 comments on commit 025a14e

Please sign in to comment.