mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
v4l2: bypass check some transfer types in colorimetry
v4l2 will report fail for some streams whose colorimetry value such as 2:4:8:3. Can bypass check these transfer types in colorimetry to avoid error. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3440>
This commit is contained in:
parent
65e142c6ed
commit
63ff99ca8e
1 changed files with 12 additions and 0 deletions
|
@ -3494,6 +3494,18 @@ gst_v4l2_video_colorimetry_matches (const GstVideoColorimetry * cinfo,
|
||||||
&& gst_video_colorimetry_is_equal (cinfo, &ci_jpeg))
|
&& gst_video_colorimetry_is_equal (cinfo, &ci_jpeg))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* bypass check the below transfer types, because those types are cast to
|
||||||
|
* V4L2_XFER_FUNC_NONE type when try format or set format and V4L2_XFER_FUNC_NONE
|
||||||
|
* type is cast to GST_VIDEO_TRANSFER_GAMMA10 type in gst_v4l2_object_get_colorspace */
|
||||||
|
if ((info.colorimetry.transfer == GST_VIDEO_TRANSFER_GAMMA18) ||
|
||||||
|
(info.colorimetry.transfer == GST_VIDEO_TRANSFER_GAMMA20) ||
|
||||||
|
(info.colorimetry.transfer == GST_VIDEO_TRANSFER_GAMMA22) ||
|
||||||
|
(info.colorimetry.transfer == GST_VIDEO_TRANSFER_GAMMA28)) {
|
||||||
|
info.colorimetry.transfer = GST_VIDEO_TRANSFER_GAMMA10;
|
||||||
|
if (gst_video_colorimetry_is_equal (&info.colorimetry, cinfo))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue