summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2017-09-04 10:23:34 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-05 15:01:02 +0100
commit04f49ae8843a36fec37a47a3d16abc3b53b1f376 (patch)
tree1150ed8f2ecf93c5821e1893e4d9e76b24f0307c /meta/recipes-multimedia
parentfc44a75e0d316ad6f189b986959d8590619f9c4e (diff)
downloadpoky-04f49ae8843a36fec37a47a3d16abc3b53b1f376.tar.gz
gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder
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. (From OE-Core rev: b662944b28080dfb68833d4a81655262b04ada67) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch48
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb1
2 files changed, 49 insertions, 0 deletions
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..f78818aa17
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch
@@ -0,0 +1,48 @@
1From 545646cccba243236e10362fe7325f89be57da1f Mon Sep 17 00:00:00 2001
2From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
3Date: Tue, 18 Jul 2017 11:28:37 -0400
4Subject: [PATCH] v4l2: Fix 4K colorimetry
5
6Since 1.6, the transfer function for BT2020 has been changed from BT709
7to BT2020_12. It's the same function, but with more precision. As a side
8effect, the V4L2 colorpsace didn't match GStreamer colorspace. When
9GStreamer ended up making a guess, it would not match anything supported
10by V4L2 anymore. This this by using BT2020_12 for BT2020 colorspace and
11BT2020 transfer function in replacement of BT709 whenever a 4K
12resolution is detected.
13
14Upstream-Status: Backport
15Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
16
17---
18 sys/v4l2/gstv4l2object.c | 7 +++++--
19 1 file changed, 5 insertions(+), 2 deletions(-)
20
21diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
22index 61244455f..aae2c55e7 100644
23--- a/sys/v4l2/gstv4l2object.c
24+++ b/sys/v4l2/gstv4l2object.c
25@@ -1960,7 +1960,7 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
26 case V4L2_COLORSPACE_BT2020:
27 cinfo->range = GST_VIDEO_COLOR_RANGE_16_235;
28 cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT2020;
29- cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
30+ cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12;
31 cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT2020;
32 break;
33 case V4L2_COLORSPACE_SMPTE240M:
34@@ -2062,7 +2062,10 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
35
36 switch (transfer) {
37 case V4L2_XFER_FUNC_709:
38- cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
39+ if (fmt->fmt.pix.height > 2160)
40+ cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12;
41+ else
42+ cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
43 break;
44 case V4L2_XFER_FUNC_SRGB:
45 cinfo->transfer = GST_VIDEO_TRANSFER_SRGB;
46--
472.14.1
48
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 = " \
10 file://avoid-including-sys-poll.h-directly.patch \ 10 file://avoid-including-sys-poll.h-directly.patch \
11 file://ensure-valid-sentinel-for-gst_structure_get.patch \ 11 file://ensure-valid-sentinel-for-gst_structure_get.patch \
12 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ 12 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
13 file://0001-v4l2-Fix-4K-colorimetry.patch \
13" 14"
14SRC_URI[md5sum] = "20254217d9805484532e08ff1c3aa296" 15SRC_URI[md5sum] = "20254217d9805484532e08ff1c3aa296"
15SRC_URI[sha256sum] = "5591ee7208ab30289a30658a82b76bf87169c927572d9b794f3a41ed48e1ee96" 16SRC_URI[sha256sum] = "5591ee7208ab30289a30658a82b76bf87169c927572d9b794f3a41ed48e1ee96"