summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia
diff options
context:
space:
mode:
authorLim Siew Hoon <siew.hoon.lim@intel.com>2023-08-09 17:07:41 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2023-08-10 09:59:31 +0800
commitc29299d261b0b3a63cb9d8dd7896e413e3b79a6c (patch)
treedf7bbd21ab94e375608012ccdf837d44cbec7076 /recipes-multimedia
parent0a8af9c93c24175b6960cd360d151ea014719ed9 (diff)
downloadmeta-intel-c29299d261b0b3a63cb9d8dd7896e413e3b79a6c.tar.gz
onevpl: upgrade 2023.1.3 -> 2023.3.0
Drops patches already merged: - 0001-Fix-valgrind-leak-reported-on-wayland.patch - 0002-Fix-sample_multi_transcode-segfault-on-wayland.patch - 0003-Fix-X11-rendering-corruption-issue.patch - 0004-Adjust-MPEG-1920x1088-alignment.patch - 0005-Fix-sample_multi_transcode-intermittent-segfault.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/onevpl/files/0001-Fix-valgrind-leak-reported-on-wayland.patch111
-rw-r--r--recipes-multimedia/onevpl/files/0002-Fix-sample_multi_transcode-segfault-on-wayland.patch87
-rw-r--r--recipes-multimedia/onevpl/files/0003-Fix-X11-rendering-corruption-issue.patch30
-rw-r--r--recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch75
-rw-r--r--recipes-multimedia/onevpl/files/0005-Fix-sample_multi_transcode-intermittent-segfault.patch34
-rw-r--r--recipes-multimedia/onevpl/onevpl_2023.3.0.bb (renamed from recipes-multimedia/onevpl/onevpl_2023.1.3.bb)7
6 files changed, 1 insertions, 343 deletions
diff --git a/recipes-multimedia/onevpl/files/0001-Fix-valgrind-leak-reported-on-wayland.patch b/recipes-multimedia/onevpl/files/0001-Fix-valgrind-leak-reported-on-wayland.patch
deleted file mode 100644
index e368bb6e..00000000
--- a/recipes-multimedia/onevpl/files/0001-Fix-valgrind-leak-reported-on-wayland.patch
+++ /dev/null
@@ -1,111 +0,0 @@
1From 19005bb487c31aacecab333d8a40ab6434885911 Mon Sep 17 00:00:00 2001
2From: Vincent Cheah Beng Keat <vincent.beng.keat.cheah@intel.com>
3Date: Fri, 24 Mar 2023 22:59:08 +0800
4Subject: [PATCH 1/5] Fix valgrind leak reported on wayland
5
6Upstream-Status: Backport
7Expect it to be removed once move to v2023.2.0 and above.
8https://github.com/oneapi-src/oneVPL/commit/d276bb08e060956cde678d2c15fc291eec46d1dc
9---
10 .../legacy/sample_common/include/vaapi_utils.h | 2 ++
11 tools/legacy/sample_common/src/vaapi_device.cpp | 1 +
12 tools/legacy/sample_common/src/vaapi_utils.cpp | 3 ++-
13 .../sample_misc/wayland/src/class_wayland.cpp | 17 +++++++++++++++--
14 4 files changed, 20 insertions(+), 3 deletions(-)
15
16diff --git a/tools/legacy/sample_common/include/vaapi_utils.h b/tools/legacy/sample_common/include/vaapi_utils.h
17index 9d80255..2598883 100644
18--- a/tools/legacy/sample_common/include/vaapi_utils.h
19+++ b/tools/legacy/sample_common/include/vaapi_utils.h
20@@ -315,11 +315,13 @@ private:
21
22 public:
23 typedef Wayland* (*WaylandCreate_type)(void);
24+ typedef void (*WaylandDestroy_type)(Wayland*);
25
26 VA_WaylandClientProxy();
27 ~VA_WaylandClientProxy();
28
29 const WaylandCreate_type WaylandCreate;
30+ const WaylandDestroy_type WaylandDestroy;
31 };
32
33 #endif // LIBVA_WAYLAND_SUPPORT
34diff --git a/tools/legacy/sample_common/src/vaapi_device.cpp b/tools/legacy/sample_common/src/vaapi_device.cpp
35index e621251..98c5883 100644
36--- a/tools/legacy/sample_common/src/vaapi_device.cpp
37+++ b/tools/legacy/sample_common/src/vaapi_device.cpp
38@@ -349,6 +349,7 @@ mfxStatus CVAAPIDeviceX11::RenderFrame(mfxFrameSurface1* pSurface,
39
40 CVAAPIDeviceWayland::~CVAAPIDeviceWayland(void) {
41 Close();
42+ m_WaylandClient.WaylandDestroy((MfxLoader::Wayland*)m_Wayland);
43 }
44
45 mfxStatus CVAAPIDeviceWayland::Init(mfxHDL hWindow, mfxU16 nViews, mfxU32 nAdapterNum) {
46diff --git a/tools/legacy/sample_common/src/vaapi_utils.cpp b/tools/legacy/sample_common/src/vaapi_utils.cpp
47index e107624..d7aba0a 100644
48--- a/tools/legacy/sample_common/src/vaapi_utils.cpp
49+++ b/tools/legacy/sample_common/src/vaapi_utils.cpp
50@@ -182,7 +182,8 @@ Xcbpresent_Proxy::~Xcbpresent_Proxy() {}
51
52 VA_WaylandClientProxy::VA_WaylandClientProxy()
53 : lib(WAYLAND_LIB),
54- SIMPLE_LOADER_FUNCTION(WaylandCreate) {}
55+ SIMPLE_LOADER_FUNCTION(WaylandCreate),
56+ SIMPLE_LOADER_FUNCTION(WaylandDestroy) {}
57
58 VA_WaylandClientProxy::~VA_WaylandClientProxy() {}
59
60diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
61index 1a0bffa..8f6edbb 100644
62--- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
63+++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
64@@ -149,11 +149,15 @@ void Wayland::FreeSurface() {
65 if (NULL != m_surface)
66 wl_surface_destroy(m_surface);
67 #if defined(WAYLAND_LINUX_XDG_SHELL_SUPPORT)
68- if (nullptr != m_xdg_toplevel)
69+ if (NULL != m_xdg_toplevel)
70 xdg_toplevel_destroy(m_xdg_toplevel);
71- if (nullptr != m_xdg_surface)
72+ if (NULL != m_xdg_surface)
73 xdg_surface_destroy(m_xdg_surface);
74 #endif
75+#if defined(WAYLAND_LINUX_DMABUF_SUPPORT)
76+ if (NULL != m_dmabuf)
77+ zwp_linux_dmabuf_v1_destroy(m_dmabuf);
78+#endif
79 }
80
81 void Wayland::Sync() {
82@@ -379,10 +383,16 @@ struct wl_buffer* Wayland::CreatePrimeBuffer(uint32_t name,
83 }
84
85 Wayland::~Wayland() {
86+#if defined(WAYLAND_LINUX_XDG_SHELL_SUPPORT)
87+ if (NULL != m_xdg_wm_base)
88+ xdg_wm_base_destroy(m_xdg_wm_base);
89+#endif
90 if (NULL != m_shell)
91 wl_shell_destroy(m_shell);
92 if (NULL != m_shm)
93 wl_shm_destroy(m_shm);
94+ if (NULL != m_drm)
95+ wl_drm_destroy(m_drm);
96 if (NULL != m_bufmgr) {
97 drm_intel_bufmgr_destroy(m_bufmgr);
98 }
99@@ -492,6 +502,9 @@ void Wayland::DestroyBufferList() {
100 msdkFrameSurface* surface = FindUsedSurface(m_buffer->pInSurface);
101 msdk_atomic_dec16(&(surface->render_lock));
102 }
103+ wl_buffer_destroy(m_buffer->buffer);
104+ m_buffer->buffer = NULL;
105+ m_buffer->pInSurface = NULL;
106 m_buffers_list.pop_front();
107 delete m_buffer;
108 }
109--
1102.40.1
111
diff --git a/recipes-multimedia/onevpl/files/0002-Fix-sample_multi_transcode-segfault-on-wayland.patch b/recipes-multimedia/onevpl/files/0002-Fix-sample_multi_transcode-segfault-on-wayland.patch
deleted file mode 100644
index b7762709..00000000
--- a/recipes-multimedia/onevpl/files/0002-Fix-sample_multi_transcode-segfault-on-wayland.patch
+++ /dev/null
@@ -1,87 +0,0 @@
1From 72ef4e2878f8cc2df431411027c92dc41ff26a2b Mon Sep 17 00:00:00 2001
2From: Vincent Cheah Beng Keat <vincent.beng.keat.cheah@intel.com>
3Date: Wed, 15 Mar 2023 22:37:08 +0800
4Subject: [PATCH 2/5] Fix sample_multi_transcode segfault on wayland
5
6HSD ID: 15012772965
7Tested command: ./sample_multi_transcode -par ../../config.par
8
9Upstream-Status: Backport
10Expect it to be removed once move to v2023.2.0 and above.
11https://github.com/oneapi-src/oneVPL/commit/59c850db505d32e6b7e4d68ced8d714afe390a70
12---
13 .../sample_misc/wayland/src/class_wayland.cpp | 27 +++++++++++++++----
14 .../src/pipeline_transcode.cpp | 6 ++++-
15 2 files changed, 27 insertions(+), 6 deletions(-)
16
17diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
18index 8f6edbb..af4d3f3 100644
19--- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
20+++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
21@@ -144,19 +144,36 @@ bool Wayland::CreateSurface() {
22 }
23
24 void Wayland::FreeSurface() {
25- if (NULL != m_shell_surface)
26+ if (NULL != m_shell_surface) {
27 wl_shell_surface_destroy(m_shell_surface);
28- if (NULL != m_surface)
29+ m_shell_surface = NULL;
30+ }
31+ if (NULL != m_surface) {
32+ while (!m_buffers_list.empty()) {
33+ wl_surface_attach(m_surface, NULL, 0, 0);
34+ wl_surface_commit(m_surface);
35+ if (wl_display_dispatch_queue(m_display, m_event_queue) < 1)
36+ break;
37+ }
38+
39 wl_surface_destroy(m_surface);
40+ m_surface = NULL;
41+ }
42 #if defined(WAYLAND_LINUX_XDG_SHELL_SUPPORT)
43- if (NULL != m_xdg_toplevel)
44+ if (NULL != m_xdg_toplevel) {
45 xdg_toplevel_destroy(m_xdg_toplevel);
46- if (NULL != m_xdg_surface)
47+ m_xdg_toplevel = NULL;
48+ }
49+ if (NULL != m_xdg_surface) {
50 xdg_surface_destroy(m_xdg_surface);
51+ m_xdg_surface = NULL;
52+ }
53 #endif
54 #if defined(WAYLAND_LINUX_DMABUF_SUPPORT)
55- if (NULL != m_dmabuf)
56+ if (NULL != m_dmabuf) {
57 zwp_linux_dmabuf_v1_destroy(m_dmabuf);
58+ m_dmabuf = NULL;
59+ }
60 #endif
61 }
62
63diff --git a/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp b/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp
64index 1c39daf..5e69a94 100644
65--- a/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp
66+++ b/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp
67@@ -4675,12 +4675,16 @@ void CTranscodingPipeline::Close() {
68 m_bIsJoinSession = false;
69 }
70
71- //Destroy renderer
72 #if defined(_WIN32) || defined(_WIN64)
73+ //Destroy renderer
74 if (m_hwdev4Rendering) {
75 delete m_hwdev4Rendering;
76 m_hwdev4Rendering = NULL;
77 }
78+#else
79+ if (m_hwdev4Rendering) {
80+ m_hwdev4Rendering->Close();
81+ }
82 #endif
83
84 if (m_b3DLutEnable) {
85--
862.40.1
87
diff --git a/recipes-multimedia/onevpl/files/0003-Fix-X11-rendering-corruption-issue.patch b/recipes-multimedia/onevpl/files/0003-Fix-X11-rendering-corruption-issue.patch
deleted file mode 100644
index 10436c2b..00000000
--- a/recipes-multimedia/onevpl/files/0003-Fix-X11-rendering-corruption-issue.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From 9e13ea07fda1516f3c680929bea880aa4d303721 Mon Sep 17 00:00:00 2001
2From: Lim Siew Hoon <siew.hoon.lim@intel.com>
3Date: Thu, 23 Mar 2023 09:46:04 +0800
4Subject: [PATCH 3/5] Fix X11 rendering corruption issue.
5
6Upstream-Status: Backport
7Expect it to be removed once move to v2023.3.0 and above.
8https://github.com/oneapi-src/oneVPL/commit/f129e3ba2ca276f08003ae314d674fba4b5290cd
9
10Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
11---
12 tools/legacy/sample_common/src/vaapi_device.cpp | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/tools/legacy/sample_common/src/vaapi_device.cpp b/tools/legacy/sample_common/src/vaapi_device.cpp
16index 98c5883..b90443a 100644
17--- a/tools/legacy/sample_common/src/vaapi_device.cpp
18+++ b/tools/legacy/sample_common/src/vaapi_device.cpp
19@@ -271,7 +271,7 @@ mfxStatus CVAAPIDeviceX11::RenderFrame(mfxFrameSurface1* pSurface,
20 width = pSurface->Info.CropX + pSurface->Info.CropW;
21 height = pSurface->Info.CropY + pSurface->Info.CropH;
22
23- stride = width * bpp / 8;
24+ stride = memId->m_image.pitches[0];
25 size = PAGE_ALIGN(stride * height);
26
27 bo = drmintellib.drm_intel_bo_gem_create_from_prime(m_bufmgr,
28--
292.40.1
30
diff --git a/recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch b/recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch
deleted file mode 100644
index 90728cad..00000000
--- a/recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1From e73b46657b286cd015e489e691166cbc79f5e79e Mon Sep 17 00:00:00 2001
2From: Lim Siew Hoon <siew.hoon.lim@intel.com>
3Date: Thu, 20 Apr 2023 10:16:30 +0800
4Subject: [PATCH 4/5] Adjust MPEG 1920x1088 alignment
5
6Driver alignment for Mjpeg decode is 8,
7but vpp need 16 alignment.
8
9[Internal]
10OSPR: Auto
11Commit_Type: BugFix
12Platforms: Gen11+
13OS: Windows and Linux
14Feature impact: Dec_Legacy
15Resolves: N/A
16Related-to: PR#6323
17Klocwork: N/A
18TP_Passed: N/A
19IP Scan: N/A
20Open/Embargo Dependency: N/A
21
22Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com>
23
24Upstream-Status: Backport
25Expect it to be removed once move to v2023.3.0 and above.
26https://github.com/oneapi-src/oneVPL/commit/7fe92332a7c32e85e6bb0a2724d66ce7124006ee
27
28Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
29---
30 tools/legacy/sample_decode/src/pipeline_decode.cpp | 9 +++++++++
31 .../sample_multi_transcode/src/pipeline_transcode.cpp | 8 ++++++++
32 2 files changed, 17 insertions(+)
33
34diff --git a/tools/legacy/sample_decode/src/pipeline_decode.cpp b/tools/legacy/sample_decode/src/pipeline_decode.cpp
35index c0d5c46..47c17f3 100644
36--- a/tools/legacy/sample_decode/src/pipeline_decode.cpp
37+++ b/tools/legacy/sample_decode/src/pipeline_decode.cpp
38@@ -800,6 +800,15 @@ mfxStatus CDecodingPipeline::InitMfxParams(sInputParams* pParams) {
39 m_mfxVideoParams.mfx.FrameInfo.PicStruct = m_mfxBS.PicStruct;
40 }
41
42+ // MJPEG decoder just need 8 alignment for height but VPP need 16 alignment still
43+ if (m_bVppIsUsed && (m_mfxVideoParams.mfx.CodecId == MFX_CODEC_JPEG) &&
44+ (pParams->bUseHWLib)) {
45+ m_mfxVideoParams.mfx.FrameInfo.Height =
46+ (MFX_PICSTRUCT_PROGRESSIVE == m_mfxVideoParams.mfx.FrameInfo.PicStruct)
47+ ? MSDK_ALIGN16(m_mfxVideoParams.mfx.FrameInfo.Height)
48+ : MSDK_ALIGN32(m_mfxVideoParams.mfx.FrameInfo.Height);
49+ }
50+
51 switch (pParams->nRotation) {
52 case 0:
53 m_mfxVideoParams.mfx.Rotation = MFX_ROTATION_0;
54diff --git a/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp b/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp
55index 5e69a94..26b0915 100644
56--- a/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp
57+++ b/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp
58@@ -406,6 +406,14 @@ mfxStatus CTranscodingPipeline::VPPPreInit(sInputParams* pParams) {
59 }
60
61 if (m_bIsVpp) {
62+ // MJPEG decoder just need 8 alignment for height but VPP need 16 alignment still
63+ if ((pParams->DecodeId == MFX_CODEC_JPEG) && (pParams->libType != MFX_IMPL_SOFTWARE)) {
64+ m_mfxDecParams.mfx.FrameInfo.Height =
65+ (m_mfxDecParams.mfx.FrameInfo.PicStruct == MFX_PICSTRUCT_PROGRESSIVE)
66+ ? MSDK_ALIGN16(m_mfxDecParams.mfx.FrameInfo.Height)
67+ : MSDK_ALIGN32(m_mfxDecParams.mfx.FrameInfo.Height);
68+ }
69+
70 sts = InitVppMfxParams(m_mfxVppParams, pParams);
71 MSDK_CHECK_STATUS(sts, "InitVppMfxParams failed");
72
73--
742.40.1
75
diff --git a/recipes-multimedia/onevpl/files/0005-Fix-sample_multi_transcode-intermittent-segfault.patch b/recipes-multimedia/onevpl/files/0005-Fix-sample_multi_transcode-intermittent-segfault.patch
deleted file mode 100644
index 52f8fb7e..00000000
--- a/recipes-multimedia/onevpl/files/0005-Fix-sample_multi_transcode-intermittent-segfault.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 1f03f8e2569e69e558d077643ea628d3ba3cacb7 Mon Sep 17 00:00:00 2001
2From: Vincent Cheah Beng Keat <vincent.beng.keat.cheah@intel.com>
3Date: Thu, 25 May 2023 01:16:18 +0800
4Subject: [PATCH 5/5] Fix sample_multi_transcode intermittent segfault
5
6HSD ID: 15012772965
7Tested command: ./sample_multi_transcode -par config.par
8
9Upstream-Status: Backport
10Expect it to be removed once move to v2023.3.0 and above.
11https://github.com/oneapi-src/oneVPL/commit/c21756e6a235fbde08844cca5e429ca142eef479
12---
13 tools/legacy/sample_misc/wayland/src/class_wayland.cpp | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
17index af4d3f3..e86ceee 100644
18--- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
19+++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
20@@ -152,8 +152,10 @@ void Wayland::FreeSurface() {
21 while (!m_buffers_list.empty()) {
22 wl_surface_attach(m_surface, NULL, 0, 0);
23 wl_surface_commit(m_surface);
24- if (wl_display_dispatch_queue(m_display, m_event_queue) < 1)
25+ if (wl_display_dispatch_queue(m_display, m_event_queue) < 1) {
26+ DestroyBufferList();
27 break;
28+ }
29 }
30
31 wl_surface_destroy(m_surface);
32--
332.40.1
34
diff --git a/recipes-multimedia/onevpl/onevpl_2023.1.3.bb b/recipes-multimedia/onevpl/onevpl_2023.3.0.bb
index 400f7a9a..eb87824b 100644
--- a/recipes-multimedia/onevpl/onevpl_2023.1.3.bb
+++ b/recipes-multimedia/onevpl/onevpl_2023.3.0.bb
@@ -9,14 +9,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c18ea6bb4786a26bf4eee88a7424a408 \
9 file://third-party-programs.txt;md5=f43d223f2b736e89abed9660483d0386" 9 file://third-party-programs.txt;md5=f43d223f2b736e89abed9660483d0386"
10 10
11SRC_URI = "git://github.com/oneapi-src/oneVPL.git;protocol=https;branch=master \ 11SRC_URI = "git://github.com/oneapi-src/oneVPL.git;protocol=https;branch=master \
12 file://0001-Fix-valgrind-leak-reported-on-wayland.patch \
13 file://0002-Fix-sample_multi_transcode-segfault-on-wayland.patch \
14 file://0003-Fix-X11-rendering-corruption-issue.patch \
15 file://0004-Adjust-MPEG-1920x1088-alignment.patch \
16 file://0005-Fix-sample_multi_transcode-intermittent-segfault.patch \
17 file://0006-vpl.pc.in-dont-pass-pcfiledir.patch \ 12 file://0006-vpl.pc.in-dont-pass-pcfiledir.patch \
18 " 13 "
19SRCREV = "4cdf44ccaa605460499c52f39eff5517da2fc3c8" 14SRCREV = "e12ace9761bb52786409e830f619916b86e87fc5"
20S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
21 16
22inherit cmake 17inherit cmake