From: Hou Qi Date: Fri, 19 Mar 2021 02:52:26 +0000 (+0800) Subject: v4l2object: Add support for hdr10 stream playback X-Git-Tag: 1.19.3~509^2~250 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c6ff9fb58cf58a7cc66cd31771a2e05339cca02;p=platform%2Fupstream%2Fgstreamer.git v4l2object: Add support for hdr10 stream playback Colorimetry of hdr10 video is bt2100-pq with transfer as GST_VIDEO_TRANSFER_SMPTE2084. So map GST_VIDEO_TRANSFER_SMPTE2084 to V4L2_XFER_FUNC_SMPTE2084 to support hdr10 stream playback. Part-of: --- diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index efe01a9..cafdfe2 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -2203,6 +2203,9 @@ gst_v4l2_object_get_colorspace (GstV4l2Object * v4l2object, case V4L2_XFER_FUNC_NONE: cinfo->transfer = GST_VIDEO_TRANSFER_GAMMA10; break; + case V4L2_XFER_FUNC_SMPTE2084: + cinfo->transfer = GST_VIDEO_TRANSFER_SMPTE2084; + break; case V4L2_XFER_FUNC_DEFAULT: /* nothing, just use defaults for colorspace */ break; @@ -3591,6 +3594,9 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps, case GST_VIDEO_TRANSFER_GAMMA10: transfer = V4L2_XFER_FUNC_NONE; break; + case GST_VIDEO_TRANSFER_SMPTE2084: + transfer = V4L2_XFER_FUNC_SMPTE2084; + break; case GST_VIDEO_TRANSFER_BT601: case GST_VIDEO_TRANSFER_BT2020_12: case GST_VIDEO_TRANSFER_BT2020_10: