mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
v4l2object: Fix translation of quantization
The V4L2_MAP_QUANTIZATION macro has been fixed to something a lot saner, fix our replica accordingly. The new macro now simply set the quantization to full range is the pixel formats is RGB based, or if the JPEG colorspace is used. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
This commit is contained in:
parent
beb1cef3d4
commit
152df21644
1 changed files with 1 additions and 5 deletions
|
@ -2342,11 +2342,7 @@ gst_v4l2_object_get_colorspace (GstV4l2Object * v4l2object,
|
|||
break;
|
||||
case V4L2_QUANTIZATION_DEFAULT:
|
||||
/* replicated V4L2_MAP_QUANTIZATION_DEFAULT macro behavior */
|
||||
if (is_rgb && colorspace == V4L2_COLORSPACE_BT2020)
|
||||
cinfo->range = GST_VIDEO_COLOR_RANGE_16_235;
|
||||
else if (is_rgb || matrix == V4L2_YCBCR_ENC_XV601
|
||||
|| matrix == V4L2_YCBCR_ENC_XV709
|
||||
|| colorspace == V4L2_COLORSPACE_JPEG)
|
||||
if (is_rgb || colorspace == V4L2_COLORSPACE_JPEG)
|
||||
cinfo->range = GST_VIDEO_COLOR_RANGE_0_255;
|
||||
else
|
||||
cinfo->range = GST_VIDEO_COLOR_RANGE_16_235;
|
||||
|
|
Loading…
Reference in a new issue