summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/libva/files/0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/libva/files/0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch')
-rw-r--r--recipes-multimedia/libva/files/0001-media_libva-export-packed-YUV-when-VA_EXPORT_SURFACE.patch62
1 files changed, 62 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