glcolorconvert: fix wrong RGB to YUV matrix with bt709

Converting from RGB to YUV: When comparing the info.colorimetry to
GST_VIDEO_COLORIMETRY_BT709 it does not make sense to look at the input
signal because that is of type of RGB. The plugin needs to look at the
output YUV-type and compare GST_VIDEO_COLORIMETRY_BT709 to that, because
that is the YUV-type the plugin needs to convert input-RGB into.
Converting from YUV to RGB: Comparing to the input is correct, but because
here the color encoding info BT601/BT709 is on input side of the plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6046>
This commit is contained in:
Christian Curtis Veng 2024-01-26 10:56:19 +01:00 committed by GStreamer Marge Bot
parent 728e232add
commit e111dfc39c

View file

@ -2291,7 +2291,7 @@ _RGB_to_YUV (GstGLColorConvert * convert)
break;
}
if (gst_video_colorimetry_matches (&convert->in_info.colorimetry,
if (gst_video_colorimetry_matches (&convert->out_info.colorimetry,
GST_VIDEO_COLORIMETRY_BT709)) {
info->cms_offset = (gfloat *) from_rgb_bt709_offset;
info->cms_coeff1 = (gfloat *) from_rgb_bt709_ycoeff;