summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/onevpl/onevpl/0001-Fix-sample_vpp-sample_encode-alignment-issue.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/onevpl/onevpl/0001-Fix-sample_vpp-sample_encode-alignment-issue.patch')
-rw-r--r--recipes-multimedia/onevpl/onevpl/0001-Fix-sample_vpp-sample_encode-alignment-issue.patch96
1 files changed, 96 insertions, 0 deletions
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 @@
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