aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYew, Chang Ching <chang.ching.yew@intel.com>2021-06-15 16:15:36 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2021-06-16 11:31:12 +0800
commite54fa9e1403391ce73ca52f702a5945d1ae603ea (patch)
tree6881713fce29f2c7137fa3631100d4d2f87399b1
parent0937728bcd98dd13d2c6829e1cd604ea2e53e5cd (diff)
downloadmeta-intel-master.tar.gz
meta-intel-master.tar.bz2
meta-intel-master.zip
onevpl: Fixes for legacy samplesHEADmaster
Backport patches from master to fix the legacy apps including sample_vpp, sample_encode and sample_decode Added patches: 0001-Fix-NV12-input-format-in-legacy-samples.patch 0001-Fix-sample_encode-i010-input.patch 0001-Fix-sample_vpp-sample_encode-alignment-issue.patch Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-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 00000000..d1f87f30
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl/0001-Fix-NV12-input-format-in-legacy-samples.patch
@@ -0,0 +1,36 @@
+From 4fcf0bf6e745d929cc28ae5d0a37ba730a8ed6fa Mon Sep 17 00:00:00 2001
+From: Natalia Domnina <natalia.domnina@intel.com>
+Date: Wed, 19 May 2021 12:01:43 +0300
+Subject: [PATCH] Fix NV12 input format in legacy samples
+
+Upstream-Status: Backport
+inner-source #4fcf0bf
+
+Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
+---
+ tools/legacy/sample_common/src/sample_utils.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/legacy/sample_common/src/sample_utils.cpp b/tools/legacy/sample_common/src/sample_utils.cpp
+index 2457a74..8c821ca 100644
+--- a/tools/legacy/sample_common/src/sample_utils.cpp
++++ b/tools/legacy/sample_common/src/sample_utils.cpp
+@@ -401,7 +401,6 @@ mfxStatus CSmplYUVReader::LoadNextFrame(mfxFrameSurface1* pSurface) {
+ {
+ case MFX_FOURCC_I420:
+ case MFX_FOURCC_YV12:
+- case MFX_FOURCC_NV12:
+ switch (pInfo.FourCC) {
+ case MFX_FOURCC_NV12:
+
+@@ -503,6 +502,7 @@ mfxStatus CSmplYUVReader::LoadNextFrame(mfxFrameSurface1* pSurface) {
+ }
+ }
+ break;
++ case MFX_FOURCC_NV12:
+ case MFX_FOURCC_P010:
+ case MFX_FOURCC_P210:
+ #if (MFX_VERSION >= 1031)
+--
+2.32.0
+
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 00000000..47890846
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_encode-i010-input.patch
@@ -0,0 +1,62 @@
+From ffd917e7b4dc37ff3863b43cf4821f3454944344 Mon Sep 17 00:00:00 2001
+From: Seunghyuk Park <seunghyuk.h.park@intel.com>
+Date: Mon, 31 May 2021 10:47:41 -0700
+Subject: [PATCH] Fix sample_encode i010 input
+
+Upstream-Status: Backport
+inner-source #ffd917e
+
+Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
+---
+ .../legacy/sample_encode/src/pipeline_encode.cpp | 16 ++++++++++------
+ tools/legacy/sample_encode/src/sample_encode.cpp | 4 ++--
+ 2 files changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/tools/legacy/sample_encode/src/pipeline_encode.cpp b/tools/legacy/sample_encode/src/pipeline_encode.cpp
+index 4aa5aef..9af4901 100644
+--- a/tools/legacy/sample_encode/src/pipeline_encode.cpp
++++ b/tools/legacy/sample_encode/src/pipeline_encode.cpp
+@@ -1716,15 +1716,19 @@ mfxStatus CEncodingPipeline::Init(sInputParams *pParams) {
+
+ m_MVCflags = pParams->MVC_flags;
+
+- // FileReader can convert yv12->nv12 without vpp
+- m_InputFourCC =
+- (pParams->FileInputFourCC == MFX_FOURCC_I420) ? MFX_FOURCC_NV12 : pParams->FileInputFourCC;
++ // FileReader can convert yv12->nv12 without vpp, when hw impl
+ #if (MFX_VERSION >= 2000)
+- if (pParams->bUseHWLib == true)
+- pParams->EncodeFourCC = MFX_FOURCC_NV12;
++ if (pParams->bUseHWLib == false)
++ m_InputFourCC = pParams->FileInputFourCC;
+ else
+- pParams->EncodeFourCC = MFX_FOURCC_I420;
+ #endif
++ {
++ m_InputFourCC = (pParams->FileInputFourCC == MFX_FOURCC_I420) ? MFX_FOURCC_NV12
++ : pParams->FileInputFourCC;
++ pParams->EncodeFourCC =
++ (pParams->EncodeFourCC == MFX_FOURCC_I420) ? MFX_FOURCC_NV12 : pParams->EncodeFourCC;
++ }
++
+ m_nTimeout = pParams->nTimeout;
+
+ m_strDevicePath = pParams->strDevicePath;
+diff --git a/tools/legacy/sample_encode/src/sample_encode.cpp b/tools/legacy/sample_encode/src/sample_encode.cpp
+index 0a22eb2..74607a8 100644
+--- a/tools/legacy/sample_encode/src/sample_encode.cpp
++++ b/tools/legacy/sample_encode/src/sample_encode.cpp
+@@ -592,8 +592,8 @@ mfxStatus ParseInputString(msdk_char* strInput[], mfxU8 nArgNum, sInputParams* p
+ }
+ #if (MFX_VERSION >= 2000)
+ else if (0 == msdk_strcmp(strInput[i], MSDK_STRING("-i420"))) {
+- pParams->FileInputFourCC = MFX_FOURCC_IYUV;
+- pParams->EncodeFourCC = MFX_FOURCC_IYUV;
++ pParams->FileInputFourCC = MFX_FOURCC_I420;
++ pParams->EncodeFourCC = MFX_FOURCC_I420;
+ }
+ else if (0 == msdk_strcmp(strInput[i], MSDK_STRING("-i010"))) {
+ pParams->FileInputFourCC = MFX_FOURCC_I010;
+--
+2.32.0
+
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 00000000..05e707ec
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_vpp-sample_encode-alignment-issue.patch
@@ -0,0 +1,96 @@
+From 1b754c4bf20c33ae0e9a82197be58975da828516 Mon Sep 17 00:00:00 2001
+From: Seunghyuk Park <seunghyuk.h.park@intel.com>
+Date: Tue, 25 May 2021 13:46:00 -0700
+Subject: [PATCH] Fix sample_vpp, sample_encode alignment issue
+
+Upstream-Status: Backport
+inner-source #1b754c4b
+
+Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
+---
+ .../sample_encode/src/pipeline_encode.cpp | 21 +++++++++++++++++++
+ .../sample_vpp/src/sample_vpp_utils.cpp | 9 ++++++++
+ 2 files changed, 30 insertions(+)
+
+diff --git a/tools/legacy/sample_encode/src/pipeline_encode.cpp b/tools/legacy/sample_encode/src/pipeline_encode.cpp
+index 6e5c6fc..f68ed02 100644
+--- a/tools/legacy/sample_encode/src/pipeline_encode.cpp
++++ b/tools/legacy/sample_encode/src/pipeline_encode.cpp
+@@ -594,6 +594,13 @@ mfxStatus CEncodingPipeline::InitMfxEncParams(sInputParams *pInParams) {
+ ? MSDK_ALIGN16(pInParams->nDstHeight)
+ : MSDK_ALIGN32(pInParams->nDstHeight);
+
++#if (MFX_VERSION >= 2000)
++ if (!pInParams->bUseHWLib) {
++ m_mfxEncParams.mfx.FrameInfo.Width = pInParams->nDstWidth;
++ m_mfxEncParams.mfx.FrameInfo.Height = pInParams->nDstHeight;
++ }
++#endif
++
+ m_mfxEncParams.mfx.FrameInfo.CropX = 0;
+ m_mfxEncParams.mfx.FrameInfo.CropY = 0;
+ m_mfxEncParams.mfx.FrameInfo.CropW = pInParams->nDstWidth;
+@@ -855,6 +862,13 @@ mfxStatus CEncodingPipeline::InitMfxVppParams(sInputParams *pInParams) {
+ ? MSDK_ALIGN16(pInParams->nHeight)
+ : MSDK_ALIGN32(pInParams->nHeight);
+
++#if (MFX_VERSION >= 2000)
++ if (!pInParams->bUseHWLib) {
++ m_mfxVppParams.vpp.In.Width = pInParams->nWidth;
++ m_mfxVppParams.vpp.In.Height = pInParams->nHeight;
++ }
++#endif
++
+ // set crops in input mfxFrameInfo for correct work of file reader
+ // VPP itself ignores crops at initialization
+ m_mfxVppParams.vpp.In.CropW = pInParams->nWidth;
+@@ -893,6 +907,13 @@ mfxStatus CEncodingPipeline::InitMfxVppParams(sInputParams *pInParams) {
+ ? MSDK_ALIGN16(pInParams->nDstHeight)
+ : MSDK_ALIGN32(pInParams->nDstHeight);
+
++#if (MFX_VERSION >= 2000)
++ if (!pInParams->bUseHWLib) {
++ m_mfxVppParams.vpp.Out.Width = pInParams->nDstWidth;
++ m_mfxVppParams.vpp.Out.Height = pInParams->nDstHeight;
++ }
++#endif
++
+ // configure and attach external parameters
+ InitVppFilters();
+
+diff --git a/tools/legacy/sample_vpp/src/sample_vpp_utils.cpp b/tools/legacy/sample_vpp/src/sample_vpp_utils.cpp
+index 60b7720..ccb6cff 100644
+--- a/tools/legacy/sample_vpp/src/sample_vpp_utils.cpp
++++ b/tools/legacy/sample_vpp/src/sample_vpp_utils.cpp
+@@ -385,12 +385,20 @@ mfxStatus InitParamsVPP(MfxVideoParamsWrapper* pParams, sInputParams* pInParams,
+ pParams->vpp.In.CropY = pInParams->frameInfoIn[paramID].CropY;
+ pParams->vpp.In.CropW = pInParams->frameInfoIn[paramID].CropW;
+ pParams->vpp.In.CropH = pInParams->frameInfoIn[paramID].CropH;
++
+ pParams->vpp.In.Width = MSDK_ALIGN16(pInParams->frameInfoIn[paramID].nWidth);
+ pParams->vpp.In.Height =
+ (MFX_PICSTRUCT_PROGRESSIVE == pInParams->frameInfoIn[paramID].PicStruct)
+ ? MSDK_ALIGN16(pInParams->frameInfoIn[paramID].nHeight)
+ : MSDK_ALIGN32(pInParams->frameInfoIn[paramID].nHeight);
+
++#if (MFX_VERSION >= 2000)
++ if (MFX_IMPL_SOFTWARE == pInParams->ImpLib) {
++ pParams->vpp.In.Width = pInParams->frameInfoIn[paramID].nWidth;
++ pParams->vpp.In.Height = pInParams->frameInfoIn[paramID].nHeight;
++ }
++#endif
++
+ // width must be a multiple of 16
+ // height must be a multiple of 16 in case of frame picture and
+ // a multiple of 32 in case of field picture
+@@ -441,6 +449,7 @@ mfxStatus InitParamsVPP(MfxVideoParamsWrapper* pParams, sInputParams* pInParams,
+ (MFX_PICSTRUCT_PROGRESSIVE == pInParams->frameInfoOut[paramID].PicStruct)
+ ? MSDK_ALIGN16(pInParams->frameInfoOut[paramID].nHeight)
+ : MSDK_ALIGN32(pInParams->frameInfoOut[paramID].nHeight);
++
+ #if (MFX_VERSION >= 2000)
+ if (MFX_IMPL_SOFTWARE == pInParams->ImpLib) {
+ pParams->vpp.Out.Width = pInParams->frameInfoOut[paramID].nWidth;
+--
+2.32.0
+
diff --git a/recipes-multimedia/onevpl/onevpl_2021.2.2.bb b/recipes-multimedia/onevpl/onevpl_2021.2.2.bb
index 911b5927..6812ccfa 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 \
file://0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch \
file://0001-Remove-duplicate-MFXVideoDECODE_VPP-from-samples.patch \
file://0001-Add-SMT-and-media_sdk_compatibility_headers.patch \
+ file://0001-Fix-NV12-input-format-in-legacy-samples.patch \
+ file://0001-Fix-sample_vpp-sample_encode-alignment-issue.patch \
+ file://0001-Fix-sample_encode-i010-input.patch \
"
SRCREV = "17968d8d2299352f5a9e09388d24e81064c81c87"
S = "${WORKDIR}/git"