Commit a76da0ca authored by Ian Jamison's avatar Ian Jamison Committed by Nicolas Dufresne

v4l2object: Handle BT2020 for colorspace and transfer

This was not fully handled in switches and
ub gst_v4l2_object_get_colorspace();

https://bugzilla.gnome.org/show_bug.cgi?id=787313
parent 80e84f9e
......@@ -2037,7 +2037,7 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT709;
break;
case V4L2_YCBCR_ENC_BT2020_CONST_LUM:
GST_FIXME ("BT2020 with constant lumma is not defined, assuming BT2020");
GST_FIXME ("BT2020 with constant luma is not defined, assuming BT2020");
/* fallthrough */
case V4L2_YCBCR_ENC_BT2020:
cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT2020;
......@@ -3191,6 +3191,9 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps,
else
colorspace = V4L2_COLORSPACE_SRGB;
break;
case GST_VIDEO_COLOR_PRIMARIES_BT2020:
colorspace = V4L2_COLORSPACE_BT2020;
break;
case GST_VIDEO_COLOR_PRIMARIES_BT470M:
colorspace = V4L2_COLORSPACE_470_SYSTEM_M;
break;
......@@ -3269,6 +3272,7 @@ 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_BT2020_12:
case GST_VIDEO_TRANSFER_BT709:
transfer = V4L2_XFER_FUNC_709;
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment