After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787160 - Backport patch for 4K colorimetry BT2020_12 selection needs >= 2160 in height check
Backport patch for 4K colorimetry BT2020_12 selection needs >= 2160 in height...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.12.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-01 23:22 UTC by Arkver
Modified: 2017-09-06 15:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix colorimetry transfer lookup for 4K video (989 bytes, patch)
2017-09-05 14:31 UTC, Arkver
committed Details | Review

Description Arkver 2017-09-01 23:22:58 UTC
[PATCH] v4l2: Fix 4K colorimetry
+
+Since 1.6, the transfer function for BT2020 has been changed from BT709
+to BT2020_12. It's the same function, but with more precision. As a side
+effect, the V4L2 colorpsace didn't match GStreamer colorspace. When
+GStreamer ended up making a guess, it would not match anything supported
+by V4L2 anymore. This this by using BT2020_12 for BT2020 colorspace and
+BT2020 transfer function in replacement of BT709 whenever a 4K
+resolution is detected.

+@@ -2062,7 +2062,10 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
+ 
+   switch (transfer) {
+     case V4L2_XFER_FUNC_709:
+-      cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
++      if (fmt->fmt.pix.height > 2160)
++        cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12;
++      else
++        cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
+       break;

This height comparison should be >= 2160.
Comment 1 Arkver 2017-09-05 14:31:16 UTC
Created attachment 359188 [details] [review]
Fix colorimetry transfer lookup for 4K video

Signed-off-by: Ian Jamison <ian.dev@arkver.com>
Comment 2 Nicolas Dufresne (ndufresne) 2017-09-06 15:36:05 UTC
Commited as fc5d9c34a74ee6fc7f533f19e88831e306db698d with small nodification in the
comment. Note that we add some context (in this case we prefix the title with
v4l2object:) and we also don't use Signed-off-By in this project unless there is
multiple authors.
Comment 3 Nicolas Dufresne (ndufresne) 2017-09-06 15:37:27 UTC
Also in 1.12