mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
v4l2object.c: add support for Apple's full-range bt709 colorspace variant
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2793>
This commit is contained in:
parent
2c1e61ea16
commit
197b72f32a
1 changed files with 14 additions and 0 deletions
|
@ -2443,6 +2443,20 @@ gst_v4l2_object_add_colorspace (GstV4l2Object * v4l2object, GstStructure * s,
|
|||
if (colorspace == req_cspace) {
|
||||
if (gst_v4l2_object_get_colorspace (v4l2object, &fmt, &cinfo))
|
||||
gst_v4l2_object_fill_colorimetry_list (&list, &cinfo);
|
||||
if (colorspace == V4L2_COLORSPACE_REC709) {
|
||||
/* support for full-range variants of colorspaces V4L2_COLORSPACE_REC709
|
||||
* (such as Apple's full-range bt709 variant 1:3:5:1) */
|
||||
struct v4l2_format alt_fmt;
|
||||
memcpy (&alt_fmt, &fmt, sizeof (alt_fmt));
|
||||
|
||||
if (V4L2_TYPE_IS_MULTIPLANAR (v4l2object->type))
|
||||
alt_fmt.fmt.pix_mp.quantization = V4L2_QUANTIZATION_FULL_RANGE;
|
||||
else
|
||||
alt_fmt.fmt.pix.quantization = V4L2_QUANTIZATION_FULL_RANGE;
|
||||
|
||||
if (gst_v4l2_object_get_colorspace (v4l2object, &alt_fmt, &cinfo))
|
||||
gst_v4l2_object_fill_colorimetry_list (&list, &cinfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue