All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder
@ 2017-09-01 12:45 Nicolas Dechesne
  2017-09-01 13:04 ` ✗ patchtest: failure for " Patchwork
  2017-09-01 23:26 ` [PATCH] " Burton, Ross
  0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Dechesne @ 2017-09-01 12:45 UTC (permalink / raw)
  To: openembedded-core; +Cc: Nicolas Dechesne

Backport a fix already merged upstream in master and 1.12 branch, it fixes 4K video
playback on any platform that uses v4l2 codecs, such as Dragonboard 820c.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
---
 .../0001-v4l2-Fix-4K-colorimetry.patch             | 47 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-plugins-good_1.12.2.bb  |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch
new file mode 100644
index 0000000000..84d22e6b0e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch
@@ -0,0 +1,47 @@
+From 545646cccba243236e10362fe7325f89be57da1f Mon Sep 17 00:00:00 2001
+From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
+Date: Tue, 18 Jul 2017 11:28:37 -0400
+Subject: [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.
+
+Upstream-Status: Backport
+
+---
+ sys/v4l2/gstv4l2object.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
+index 61244455f..aae2c55e7 100644
+--- a/sys/v4l2/gstv4l2object.c
++++ b/sys/v4l2/gstv4l2object.c
+@@ -1960,7 +1960,7 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
+     case V4L2_COLORSPACE_BT2020:
+       cinfo->range = GST_VIDEO_COLOR_RANGE_16_235;
+       cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT2020;
+-      cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
++      cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12;
+       cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT2020;
+       break;
+     case V4L2_COLORSPACE_SMPTE240M:
+@@ -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;
+     case V4L2_XFER_FUNC_SRGB:
+       cinfo->transfer = GST_VIDEO_TRANSFER_SRGB;
+-- 
+2.14.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb
index 3d38f007dc..f9593c99aa 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb
@@ -10,6 +10,7 @@ SRC_URI = " \
     file://avoid-including-sys-poll.h-directly.patch \
     file://ensure-valid-sentinel-for-gst_structure_get.patch \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+    file://0001-v4l2-Fix-4K-colorimetry.patch \
 "
 SRC_URI[md5sum] = "20254217d9805484532e08ff1c3aa296"
 SRC_URI[sha256sum] = "5591ee7208ab30289a30658a82b76bf87169c927572d9b794f3a41ed48e1ee96"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ patchtest: failure for gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder
  2017-09-01 12:45 [PATCH] gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder Nicolas Dechesne
@ 2017-09-01 13:04 ` Patchwork
  2017-09-01 23:26 ` [PATCH] " Burton, Ross
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-09-01 13:04 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: openembedded-core

== Series Details ==

Series: gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder
Revision: 1
URL   : https://patchwork.openembedded.org/series/8639/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fix    Sign off the added patch file (meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder
  2017-09-01 12:45 [PATCH] gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder Nicolas Dechesne
  2017-09-01 13:04 ` ✗ patchtest: failure for " Patchwork
@ 2017-09-01 23:26 ` Burton, Ross
  1 sibling, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2017-09-01 23:26 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

On 1 September 2017 at 13:45, Nicolas Dechesne <nicolas.dechesne@linaro.org>
wrote:

> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-
> plugins-good/0001-v4l2-Fix-4K-colorimetry.patch
> @@ -0,0 +1,47 @@
> +From 545646cccba243236e10362fe7325f89be57da1f Mon Sep 17 00:00:00 2001
> +From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> +Date: Tue, 18 Jul 2017 11:28:37 -0400
> +Subject: [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.
> +
> +Upstream-Status: Backport
>

This needs your s-o-b.

Ross

[-- Attachment #2: Type: text/html, Size: 1440 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-01 23:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-01 12:45 [PATCH] gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder Nicolas Dechesne
2017-09-01 13:04 ` ✗ patchtest: failure for " Patchwork
2017-09-01 23:26 ` [PATCH] " Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.