summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLim Siew Hoon <siew.hoon.lim@intel.com>2022-10-07 10:05:04 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2022-10-07 10:10:08 +0800
commit0387793c18d122d77ba1f60d2d95b046de87ce95 (patch)
tree8cf6ce1f4574d343397d9f742fcda190761ef3a6
parent8a664853cad253e52b97b4ab768052dfaa1c9a3d (diff)
downloadmeta-intel-0387793c18d122d77ba1f60d2d95b046de87ce95.tar.gz
onevpl-intel-gpu: fixed hevc decoding starvation issue
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Fixed-performance-dependency-on-stream-GOP-pattern-i.patch60
-rw-r--r--recipes-multimedia/onevpl/onevpl-intel-gpu_22.4.4.bb3
2 files changed, 62 insertions, 1 deletions
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Fixed-performance-dependency-on-stream-GOP-pattern-i.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Fixed-performance-dependency-on-stream-GOP-pattern-i.patch
new file mode 100644
index 00000000..4bf05be6
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Fixed-performance-dependency-on-stream-GOP-pattern-i.patch
@@ -0,0 +1,60 @@
1From 83d8c41165fa94ecf8007210e2aa4775bf63973c Mon Sep 17 00:00:00 2001
2From: gfxVPLsdm <gfxvplsdm@intel.com>
3Date: Fri, 26 Aug 2022 10:47:29 +0800
4Subject: [PATCH] Fixed performance dependency on stream GOP pattern in HEVC
5 decoder (#3417)
6
7Upstream-Status: Backport [https://github.com/oneapi-src/oneVPL-intel-gpu/commit/0987b903bada0d4e41d752a423bc4d0d3b1b37bb]
8
9Co-authored-by: Sergey Plotnikov <sergey.plotnikov@intel.com>
10---
11 .../codec/h265_dec/include/umc_h265_task_supplier.h | 1 +
12 .../codec/h265_dec/src/umc_h265_task_supplier.cpp | 13 +++++++++++++
13 2 files changed, 14 insertions(+)
14
15diff --git a/_studio/shared/umc/codec/h265_dec/include/umc_h265_task_supplier.h b/_studio/shared/umc/codec/h265_dec/include/umc_h265_task_supplier.h
16index 824ca949..8bd51d1a 100644
17--- a/_studio/shared/umc/codec/h265_dec/include/umc_h265_task_supplier.h
18+++ b/_studio/shared/umc/codec/h265_dec/include/umc_h265_task_supplier.h
19@@ -260,6 +260,7 @@ public:
20
21 // Update DPB contents marking frames for reuse
22 UMC::Status UpdateRefPicMarking(ViewItem_H265 &view, const H265Slice * pSlice);
23+ void ResetUnusedFrames(ViewItem_H265 &view);
24
25 void Reset();
26
27diff --git a/_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp b/_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp
28index f28b86b2..e1c25085 100755
29--- a/_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp
30+++ b/_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp
31@@ -204,6 +204,18 @@ UMC::Status DecReferencePictureMarking_H265::UpdateRefPicMarking(ViewItem_H265 &
32 return umcRes;
33 }
34
35+void DecReferencePictureMarking_H265::ResetUnusedFrames(ViewItem_H265 &view)
36+{
37+ for (H265DecoderFrame *pTmp = view.pDPB->head(); pTmp; pTmp = pTmp->future())
38+ {
39+ if(!pTmp->isShortTermRef() && !pTmp->isLongTermRef() && pTmp->GetRefCounter() == 0 &&
40+ pTmp->m_wasOutputted && pTmp->m_wasDisplayed && pTmp->m_isDisplayable)
41+ {
42+ pTmp->Reset();
43+ }
44+ }
45+}
46+
47 // Check if bitstream resolution has changed
48 static
49 bool IsNeedSPSInvalidate(const H265SeqParamSet *old_sps, const H265SeqParamSet *new_sps)
50@@ -2585,6 +2597,7 @@ void TaskSupplier_H265::DPBUpdate(const H265Slice * slice)
51 {
52 ViewItem_H265 &view = *GetView();
53 DecReferencePictureMarking_H265::UpdateRefPicMarking(view, slice);
54+ DecReferencePictureMarking_H265::ResetUnusedFrames(view);
55 }
56
57 // Find a decoder frame instance with specified surface ID
58--
592.37.2
60
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu_22.4.4.bb b/recipes-multimedia/onevpl/onevpl-intel-gpu_22.4.4.bb
index a312f27e..291e2404 100644
--- a/recipes-multimedia/onevpl/onevpl-intel-gpu_22.4.4.bb
+++ b/recipes-multimedia/onevpl/onevpl-intel-gpu_22.4.4.bb
@@ -17,7 +17,8 @@ COMPATIBLE_HOST:x86-x32 = "null"
17DEPENDS += "libdrm libva intel-media-driver onevpl pkgconfig-native" 17DEPENDS += "libdrm libva intel-media-driver onevpl pkgconfig-native"
18 18
19SRC_URI = "git://github.com/oneapi-src/oneVPL-intel-gpu.git;protocol=https;branch=main;lfs=0 \ 19SRC_URI = "git://github.com/oneapi-src/oneVPL-intel-gpu.git;protocol=https;branch=main;lfs=0 \
20 " 20 file://0001-Fixed-performance-dependency-on-stream-GOP-pattern-i.patch \
21 "
21 22
22SRCREV = "e0d2754d0250661a63fff2ee2fa8e0e94b0fcfad" 23SRCREV = "e0d2754d0250661a63fff2ee2fa8e0e94b0fcfad"
23S = "${WORKDIR}/git" 24S = "${WORKDIR}/git"