summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-multimedia/onevpl/onevpl/0001-Fix-NV12-input-format-in-legacy-samples.patch36
-rw-r--r--recipes-multimedia/onevpl/onevpl/0001-Fix-sample_encode-i010-input.patch62
-rw-r--r--recipes-multimedia/onevpl/onevpl/0001-Fix-sample_vpp-sample_encode-alignment-issue.patch96
-rw-r--r--recipes-multimedia/onevpl/onevpl_2021.2.2.bb3
4 files changed, 197 insertions, 0 deletions
diff --git a/recipes-multimedia/onevpl/onevpl/0001-Fix-NV12-input-format-in-legacy-samples.patch b/recipes-multimedia/onevpl/onevpl/0001-Fix-NV12-input-format-in-legacy-samples.patch
new file mode 100644
index 0000000..d1f87f3
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl/0001-Fix-NV12-input-format-in-legacy-samples.patch
@@ -0,0 +1,36 @@
1From 4fcf0bf6e745d929cc28ae5d0a37ba730a8ed6fa Mon Sep 17 00:00:00 2001
2From: Natalia Domnina <natalia.domnina@intel.com>
3Date: Wed, 19 May 2021 12:01:43 +0300
4Subject: [PATCH] Fix NV12 input format in legacy samples
5
6Upstream-Status: Backport
7inner-source #4fcf0bf
8
9Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
10---
11 tools/legacy/sample_common/src/sample_utils.cpp | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/tools/legacy/sample_common/src/sample_utils.cpp b/tools/legacy/sample_common/src/sample_utils.cpp
15index 2457a74..8c821ca 100644
16--- a/tools/legacy/sample_common/src/sample_utils.cpp
17+++ b/tools/legacy/sample_common/src/sample_utils.cpp
18@@ -401,7 +401,6 @@ mfxStatus CSmplYUVReader::LoadNextFrame(mfxFrameSurface1* pSurface) {
19 {
20 case MFX_FOURCC_I420:
21 case MFX_FOURCC_YV12:
22- case MFX_FOURCC_NV12:
23 switch (pInfo.FourCC) {
24 case MFX_FOURCC_NV12:
25
26@@ -503,6 +502,7 @@ mfxStatus CSmplYUVReader::LoadNextFrame(mfxFrameSurface1* pSurface) {
27 }
28 }
29 break;
30+ case MFX_FOURCC_NV12:
31 case MFX_FOURCC_P010:
32 case MFX_FOURCC_P210:
33 #if (MFX_VERSION >= 1031)
34--
352.32.0
36
diff --git a/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_encode-i010-input.patch b/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_encode-i010-input.patch
new file mode 100644
index 0000000..4789084
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_encode-i010-input.patch
@@ -0,0 +1,62 @@
1From ffd917e7b4dc37ff3863b43cf4821f3454944344 Mon Sep 17 00:00:00 2001
2From: Seunghyuk Park <seunghyuk.h.park@intel.com>
3Date: Mon, 31 May 2021 10:47:41 -0700
4Subject: [PATCH] Fix sample_encode i010 input
5
6Upstream-Status: Backport
7inner-source #ffd917e
8
9Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
10---
11 .../legacy/sample_encode/src/pipeline_encode.cpp | 16 ++++++++++------
12 tools/legacy/sample_encode/src/sample_encode.cpp | 4 ++--
13 2 files changed, 12 insertions(+), 8 deletions(-)
14
15diff --git a/tools/legacy/sample_encode/src/pipeline_encode.cpp b/tools/legacy/sample_encode/src/pipeline_encode.cpp
16index 4aa5aef..9af4901 100644
17--- a/tools/legacy/sample_encode/src/pipeline_encode.cpp
18+++ b/tools/legacy/sample_encode/src/pipeline_encode.cpp
19@@ -1716,15 +1716,19 @@ mfxStatus CEncodingPipeline::Init(sInputParams *pParams) {
20
21 m_MVCflags = pParams->MVC_flags;
22
23- // FileReader can convert yv12->nv12 without vpp
24- m_InputFourCC =
25- (pParams->FileInputFourCC == MFX_FOURCC_I420) ? MFX_FOURCC_NV12 : pParams->FileInputFourCC;
26+ // FileReader can convert yv12->nv12 without vpp, when hw impl
27 #if (MFX_VERSION >= 2000)
28- if (pParams->bUseHWLib == true)
29- pParams->EncodeFourCC = MFX_FOURCC_NV12;
30+ if (pParams->bUseHWLib == false)
31+ m_InputFourCC = pParams->FileInputFourCC;
32 else
33- pParams->EncodeFourCC = MFX_FOURCC_I420;
34 #endif
35+ {
36+ m_InputFourCC = (pParams->FileInputFourCC == MFX_FOURCC_I420) ? MFX_FOURCC_NV12
37+ : pParams->FileInputFourCC;
38+ pParams->EncodeFourCC =
39+ (pParams->EncodeFourCC == MFX_FOURCC_I420) ? MFX_FOURCC_NV12 : pParams->EncodeFourCC;
40+ }
41+
42 m_nTimeout = pParams->nTimeout;
43
44 m_strDevicePath = pParams->strDevicePath;
45diff --git a/tools/legacy/sample_encode/src/sample_encode.cpp b/tools/legacy/sample_encode/src/sample_encode.cpp
46index 0a22eb2..74607a8 100644
47--- a/tools/legacy/sample_encode/src/sample_encode.cpp
48+++ b/tools/legacy/sample_encode/src/sample_encode.cpp
49@@ -592,8 +592,8 @@ mfxStatus ParseInputString(msdk_char* strInput[], mfxU8 nArgNum, sInputParams* p
50 }
51 #if (MFX_VERSION >= 2000)
52 else if (0 == msdk_strcmp(strInput[i], MSDK_STRING("-i420"))) {
53- pParams->FileInputFourCC = MFX_FOURCC_IYUV;
54- pParams->EncodeFourCC = MFX_FOURCC_IYUV;
55+ pParams->FileInputFourCC = MFX_FOURCC_I420;
56+ pParams->EncodeFourCC = MFX_FOURCC_I420;
57 }
58 else if (0 == msdk_strcmp(strInput[i], MSDK_STRING("-i010"))) {
59 pParams->FileInputFourCC = MFX_FOURCC_I010;
60--
612.32.0
62
diff --git a/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_vpp-sample_encode-alignment-issue.patch b/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_vpp-sample_encode-alignment-issue.patch
new file mode 100644
index 0000000..05e707e
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_vpp-sample_encode-alignment-issue.patch
@@ -0,0 +1,96 @@
1From 1b754c4bf20c33ae0e9a82197be58975da828516 Mon Sep 17 00:00:00 2001
2From: Seunghyuk Park <seunghyuk.h.park@intel.com>
3Date: Tue, 25 May 2021 13:46:00 -0700
4Subject: [PATCH] Fix sample_vpp, sample_encode alignment issue
5
6Upstream-Status: Backport
7inner-source #1b754c4b
8
9Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
10---
11 .../sample_encode/src/pipeline_encode.cpp | 21 +++++++++++++++++++
12 .../sample_vpp/src/sample_vpp_utils.cpp | 9 ++++++++
13 2 files changed, 30 insertions(+)
14
15diff --git a/tools/legacy/sample_encode/src/pipeline_encode.cpp b/tools/legacy/sample_encode/src/pipeline_encode.cpp
16index 6e5c6fc..f68ed02 100644
17--- a/tools/legacy/sample_encode/src/pipeline_encode.cpp
18+++ b/tools/legacy/sample_encode/src/pipeline_encode.cpp
19@@ -594,6 +594,13 @@ mfxStatus CEncodingPipeline::InitMfxEncParams(sInputParams *pInParams) {
20 ? MSDK_ALIGN16(pInParams->nDstHeight)
21 : MSDK_ALIGN32(pInParams->nDstHeight);
22
23+#if (MFX_VERSION >= 2000)
24+ if (!pInParams->bUseHWLib) {
25+ m_mfxEncParams.mfx.FrameInfo.Width = pInParams->nDstWidth;
26+ m_mfxEncParams.mfx.FrameInfo.Height = pInParams->nDstHeight;
27+ }
28+#endif
29+
30 m_mfxEncParams.mfx.FrameInfo.CropX = 0;
31 m_mfxEncParams.mfx.FrameInfo.CropY = 0;
32 m_mfxEncParams.mfx.FrameInfo.CropW = pInParams->nDstWidth;
33@@ -855,6 +862,13 @@ mfxStatus CEncodingPipeline::InitMfxVppParams(sInputParams *pInParams) {
34 ? MSDK_ALIGN16(pInParams->nHeight)
35 : MSDK_ALIGN32(pInParams->nHeight);
36
37+#if (MFX_VERSION >= 2000)
38+ if (!pInParams->bUseHWLib) {
39+ m_mfxVppParams.vpp.In.Width = pInParams->nWidth;
40+ m_mfxVppParams.vpp.In.Height = pInParams->nHeight;
41+ }
42+#endif
43+
44 // set crops in input mfxFrameInfo for correct work of file reader
45 // VPP itself ignores crops at initialization
46 m_mfxVppParams.vpp.In.CropW = pInParams->nWidth;
47@@ -893,6 +907,13 @@ mfxStatus CEncodingPipeline::InitMfxVppParams(sInputParams *pInParams) {
48 ? MSDK_ALIGN16(pInParams->nDstHeight)
49 : MSDK_ALIGN32(pInParams->nDstHeight);
50
51+#if (MFX_VERSION >= 2000)
52+ if (!pInParams->bUseHWLib) {
53+ m_mfxVppParams.vpp.Out.Width = pInParams->nDstWidth;
54+ m_mfxVppParams.vpp.Out.Height = pInParams->nDstHeight;
55+ }
56+#endif
57+
58 // configure and attach external parameters
59 InitVppFilters();
60
61diff --git a/tools/legacy/sample_vpp/src/sample_vpp_utils.cpp b/tools/legacy/sample_vpp/src/sample_vpp_utils.cpp
62index 60b7720..ccb6cff 100644
63--- a/tools/legacy/sample_vpp/src/sample_vpp_utils.cpp
64+++ b/tools/legacy/sample_vpp/src/sample_vpp_utils.cpp
65@@ -385,12 +385,20 @@ mfxStatus InitParamsVPP(MfxVideoParamsWrapper* pParams, sInputParams* pInParams,
66 pParams->vpp.In.CropY = pInParams->frameInfoIn[paramID].CropY;
67 pParams->vpp.In.CropW = pInParams->frameInfoIn[paramID].CropW;
68 pParams->vpp.In.CropH = pInParams->frameInfoIn[paramID].CropH;
69+
70 pParams->vpp.In.Width = MSDK_ALIGN16(pInParams->frameInfoIn[paramID].nWidth);
71 pParams->vpp.In.Height =
72 (MFX_PICSTRUCT_PROGRESSIVE == pInParams->frameInfoIn[paramID].PicStruct)
73 ? MSDK_ALIGN16(pInParams->frameInfoIn[paramID].nHeight)
74 : MSDK_ALIGN32(pInParams->frameInfoIn[paramID].nHeight);
75
76+#if (MFX_VERSION >= 2000)
77+ if (MFX_IMPL_SOFTWARE == pInParams->ImpLib) {
78+ pParams->vpp.In.Width = pInParams->frameInfoIn[paramID].nWidth;
79+ pParams->vpp.In.Height = pInParams->frameInfoIn[paramID].nHeight;
80+ }
81+#endif
82+
83 // width must be a multiple of 16
84 // height must be a multiple of 16 in case of frame picture and
85 // a multiple of 32 in case of field picture
86@@ -441,6 +449,7 @@ mfxStatus InitParamsVPP(MfxVideoParamsWrapper* pParams, sInputParams* pInParams,
87 (MFX_PICSTRUCT_PROGRESSIVE == pInParams->frameInfoOut[paramID].PicStruct)
88 ? MSDK_ALIGN16(pInParams->frameInfoOut[paramID].nHeight)
89 : MSDK_ALIGN32(pInParams->frameInfoOut[paramID].nHeight);
90+
91 #if (MFX_VERSION >= 2000)
92 if (MFX_IMPL_SOFTWARE == pInParams->ImpLib) {
93 pParams->vpp.Out.Width = pInParams->frameInfoOut[paramID].nWidth;
94--
952.32.0
96
diff --git a/recipes-multimedia/onevpl/onevpl_2021.2.2.bb b/recipes-multimedia/onevpl/onevpl_2021.2.2.bb
index 911b592..6812ccf 100644
--- a/recipes-multimedia/onevpl/onevpl_2021.2.2.bb
+++ b/recipes-multimedia/onevpl/onevpl_2021.2.2.bb
@@ -15,6 +15,9 @@ SRC_URI = "git://github.com/oneapi-src/oneVPL.git;protocol=https \
15 file://0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch \ 15 file://0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch \
16 file://0001-Remove-duplicate-MFXVideoDECODE_VPP-from-samples.patch \ 16 file://0001-Remove-duplicate-MFXVideoDECODE_VPP-from-samples.patch \
17 file://0001-Add-SMT-and-media_sdk_compatibility_headers.patch \ 17 file://0001-Add-SMT-and-media_sdk_compatibility_headers.patch \
18 file://0001-Fix-NV12-input-format-in-legacy-samples.patch \
19 file://0001-Fix-sample_vpp-sample_encode-alignment-issue.patch \
20 file://0001-Fix-sample_encode-i010-input.patch \
18 " 21 "
19SRCREV = "17968d8d2299352f5a9e09388d24e81064c81c87" 22SRCREV = "17968d8d2299352f5a9e09388d24e81064c81c87"
20S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"