mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
kmssink: Add support for P010 and P016 formats
Support high bit-depth YUV formats Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1188>
This commit is contained in:
parent
c5abdf8a63
commit
09a8d2db05
3 changed files with 15 additions and 1 deletions
|
@ -151,6 +151,10 @@ extrapolate_stride (const GstVideoFormatInfo * finfo, gint plane, gint stride)
|
|||
case GST_VIDEO_FORMAT_NV16:
|
||||
case GST_VIDEO_FORMAT_NV61:
|
||||
case GST_VIDEO_FORMAT_NV24:
|
||||
case GST_VIDEO_FORMAT_P010_10LE:
|
||||
case GST_VIDEO_FORMAT_P010_10BE:
|
||||
case GST_VIDEO_FORMAT_P016_LE:
|
||||
case GST_VIDEO_FORMAT_P016_BE:
|
||||
estride = (plane == 0 ? 1 : 2) *
|
||||
GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (finfo, plane, stride);
|
||||
break;
|
||||
|
|
|
@ -49,6 +49,8 @@ static const struct
|
|||
DEF_FMT (XBGR8888, RGBx),
|
||||
DEF_FMT (BGR888, RGB),
|
||||
DEF_FMT (RGB888, BGR),
|
||||
DEF_FMT (P010, P010_10LE),
|
||||
DEF_FMT (P016, P016_LE),
|
||||
#else
|
||||
DEF_FMT (ARGB8888, ARGB),
|
||||
DEF_FMT (XRGB8888, xRGB),
|
||||
|
@ -56,6 +58,8 @@ static const struct
|
|||
DEF_FMT (XBGR8888, xBGR),
|
||||
DEF_FMT (RGB888, RGB),
|
||||
DEF_FMT (BGR888, BGR),
|
||||
DEF_FMT (P010, P010_10BE),
|
||||
DEF_FMT (P016, P016_BE),
|
||||
#endif
|
||||
DEF_FMT (UYVY, UYVY),
|
||||
DEF_FMT (YUYV, YUY2),
|
||||
|
@ -111,9 +115,13 @@ gst_drm_bpp_from_drm (guint32 drmfmt)
|
|||
case DRM_FORMAT_NV16:
|
||||
bpp = 8;
|
||||
break;
|
||||
case DRM_FORMAT_P010:
|
||||
bpp = 10;
|
||||
break;
|
||||
case DRM_FORMAT_UYVY:
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_YVYU:
|
||||
case DRM_FORMAT_P016:
|
||||
bpp = 16;
|
||||
break;
|
||||
case DRM_FORMAT_BGR888:
|
||||
|
@ -139,6 +147,8 @@ gst_drm_height_from_drm (guint32 drmfmt, guint32 height)
|
|||
case DRM_FORMAT_YUV422:
|
||||
case DRM_FORMAT_NV12:
|
||||
case DRM_FORMAT_NV21:
|
||||
case DRM_FORMAT_P010:
|
||||
case DRM_FORMAT_P016:
|
||||
ret = height * 3 / 2;
|
||||
break;
|
||||
case DRM_FORMAT_NV16:
|
||||
|
|
|
@ -9,7 +9,7 @@ if host_system != 'linux'
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
libdrm_dep = dependency('libdrm', version : '>= 2.4.55',
|
||||
libdrm_dep = dependency('libdrm', version : '>= 2.4.98',
|
||||
required : get_option('kms'),
|
||||
fallback: ['libdrm', 'ext_libdrm'])
|
||||
if libdrm_dep.found()
|
||||
|
|
Loading…
Reference in a new issue