mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +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/7284>
This commit is contained in:
parent
0a2f3fbb9e
commit
8c881e833c
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