From 152df2164443b8f682d5481aa63fbf9f663de983 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 29 Jul 2024 11:37:29 -0400 Subject: [PATCH] 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: --- subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index acceb5335d..bf6e366e13 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -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;