summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Jamison <ian.dev@arkver.com>2017-09-05 15:30:40 +0100
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-09-06 11:33:53 -0400
commit85ec6430d93e53f359c35c58e4e63611d3ab9297 (patch)
treee2e4f527c0e804175f6da5969fcb4a39eac2229c /sys
parentfc5d9c34a74ee6fc7f533f19e88831e306db698d (diff)
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
Diffstat (limited to 'sys')
-rw-r--r--sys/v4l2/gstv4l2object.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 8da5831b7..57d7b3840 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -2032,7 +2032,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;
@@ -3199,6 +3199,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;
@@ -3277,6 +3280,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;