summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia
diff options
context:
space:
mode:
authorLim Siew Hoon <siew.hoon.lim@intel.com>2020-12-24 11:42:04 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2020-12-24 16:02:37 (GMT)
commit5c0965962d07da6bb4eed90cc788958e1cd84696 (patch)
tree9091aeafef0e97954236933aa67f72c073b0abdd /recipes-multimedia
parente8e901aac795f23a985615e03b9194012b164542 (diff)
downloadmeta-intel-5c0965962d07da6bb4eed90cc788958e1cd84696.tar.gz
intel-media-driver: backport fixes
Fixes dmabuf sharing with glimagesink failing with certain color format between msdkvpp and glimagesink from gst-plugins-bad master. Backport patches: * 0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch Submitted patches: * 0002-media-libva-Add-export-AYUV-color-in-vaExportSurface.patch Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-multimedia')
-rw-r--r--recipes-multimedia/libva/files/0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch62
-rw-r--r--recipes-multimedia/libva/files/0002-media-libva-Add-export-AYUV-color-in-vaExportSurface.patch33
-rw-r--r--recipes-multimedia/libva/intel-media-driver_20.3.0.bb2
3 files changed, 97 insertions, 0 deletions
diff --git a/recipes-multimedia/libva/files/0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch b/recipes-multimedia/libva/files/0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch
new file mode 100644
index 0000000..5260dc1
--- /dev/null
+++ b/recipes-multimedia/libva/files/0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch
@@ -0,0 +1,62 @@
1From 8fc1d919fd33db698e5470602942ab6a2d6b7841 Mon Sep 17 00:00:00 2001
2From: Haihao Xiang <haihao.xiang@intel.com>
3Date: Thu, 3 Dec 2020 10:52:15 +0800
4Subject: [PATCH 1/2] media_libva: export packed YUV when
5 VA_EXPORT_SURFACE_COMPOSED_LAYERS is not set
6
7vaExportSurfaceHandle works for packed RGB w/wo
8VA_EXPORT_SURFACE_COMPOSED_LAYERS, it should work for packed YUV too
9w/wo VA_EXPORT_SURFACE_COMPOSED_LAYERS
10
11Example:
12gst-launch-1.0 videotestsrc ! msdkvpp ! \
13'video/x-raw(memory:DMABuf)',format=YUY2 ! glimagesink
14
15The patch was imported from the iHD media-driver git server
16(https://github.com/intel/media-driver.git) as of commit id
1738e5f4ab95a5c4fb3fe55d3d132795ee804d9310.
18
19Upstream-Status: Backport
20
21Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
22---
23 media_driver/linux/common/ddi/media_libva.cpp | 22 +++++++++++++++++--
24 1 file changed, 20 insertions(+), 2 deletions(-)
25
26diff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp
27index 91c3ff14..778b7011 100755
28--- a/media_driver/linux/common/ddi/media_libva.cpp
29+++ b/media_driver/linux/common/ddi/media_libva.cpp
30@@ -6672,9 +6672,27 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane)
31 return DRM_FORMAT_R16;
32
33 case VA_FOURCC_YUY2:
34+ return DRM_FORMAT_YUYV;
35+ case VA_FOURCC_YVYU:
36+ return DRM_FORMAT_YVYU;
37+ case VA_FOURCC_VYUY:
38+ return DRM_FORMAT_VYUY;
39 case VA_FOURCC_UYVY:
40- // These are not representable as separate planes.
41- return 0;
42+ return DRM_FORMAT_UYVY;
43+ case VA_FOURCC_Y210:
44+ return DRM_FORMAT_Y210;
45+ case VA_FOURCC_Y216:
46+ return DRM_FORMAT_Y216;
47+ case VA_FOURCC_Y410:
48+ return DRM_FORMAT_Y410;
49+ case VA_FOURCC_Y416:
50+ return DRM_FORMAT_Y416;
51+#if VA_CHECK_VERSION(1, 9, 0)
52+ case VA_FOURCC_Y212:
53+ return DRM_FORMAT_Y216;
54+ case VA_FOURCC_Y412:
55+ return DRM_FORMAT_Y416;
56+#endif
57
58 case VA_FOURCC_ARGB:
59 return DRM_FORMAT_ARGB8888;
60--
612.17.1
62
diff --git a/recipes-multimedia/libva/files/0002-media-libva-Add-export-AYUV-color-in-vaExportSurface.patch b/recipes-multimedia/libva/files/0002-media-libva-Add-export-AYUV-color-in-vaExportSurface.patch
new file mode 100644
index 0000000..a3fef96
--- /dev/null
+++ b/recipes-multimedia/libva/files/0002-media-libva-Add-export-AYUV-color-in-vaExportSurface.patch
@@ -0,0 +1,33 @@
1From 979e90d7bc9ff6d9064e1f0378015abf40d86af2 Mon Sep 17 00:00:00 2001
2From: Lim Siew Hoon <siew.hoon.lim@intel.com>
3Date: Thu, 24 Dec 2020 18:47:56 +0800
4Subject: [PATCH 2/2] media-libva: Add export AYUV color in
5 vaExportSurfaceHandle when VA_EXPORT_SURFACE_COMPOSED_LAYERS is not set.
6
7Example:
8gst-launch-1.0 videotestsrc ! msdkvpp \
9'video/x-raw(memory:DMABuf)',format=VUYA ! glimagesink
10
11Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1115]
12
13Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
14---
15 media_driver/linux/common/ddi/media_libva.cpp | 2 ++
16 1 file changed, 2 insertions(+)
17
18diff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp
19index 778b7011..0e9f07d3 100755
20--- a/media_driver/linux/common/ddi/media_libva.cpp
21+++ b/media_driver/linux/common/ddi/media_libva.cpp
22@@ -6679,6 +6679,8 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane)
23 return DRM_FORMAT_VYUY;
24 case VA_FOURCC_UYVY:
25 return DRM_FORMAT_UYVY;
26+ case VA_FOURCC_AYUV:
27+ return DRM_FORMAT_AYUV;
28 case VA_FOURCC_Y210:
29 return DRM_FORMAT_Y210;
30 case VA_FOURCC_Y216:
31--
322.17.1
33
diff --git a/recipes-multimedia/libva/intel-media-driver_20.3.0.bb b/recipes-multimedia/libva/intel-media-driver_20.3.0.bb
index a53867b..93ce610 100644
--- a/recipes-multimedia/libva/intel-media-driver_20.3.0.bb
+++ b/recipes-multimedia/libva/intel-media-driver_20.3.0.bb
@@ -20,6 +20,8 @@ DEPENDS += "libva gmmlib"
20 20
21SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;branch=intel-media-20.3 \ 21SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;branch=intel-media-20.3 \
22 file://0001-Encode-Fixed-VP9-444-frame-header.patch \ 22 file://0001-Encode-Fixed-VP9-444-frame-header.patch \
23 file://0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch \
24 file://0002-media-libva-Add-export-AYUV-color-in-vaExportSurface.patch \
23 " 25 "
24 26
25SRCREV = "86ec0b6f61862806d8aed1803537728d1dfadf84" 27SRCREV = "86ec0b6f61862806d8aed1803537728d1dfadf84"