diff options
Diffstat (limited to 'recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch')
-rw-r--r-- | recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch b/recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch new file mode 100644 index 00000000..90728cad --- /dev/null +++ b/recipes-multimedia/onevpl/files/0004-Adjust-MPEG-1920x1088-alignment.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From e73b46657b286cd015e489e691166cbc79f5e79e Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Thu, 20 Apr 2023 10:16:30 +0800 | ||
4 | Subject: [PATCH 4/5] Adjust MPEG 1920x1088 alignment | ||
5 | |||
6 | Driver alignment for Mjpeg decode is 8, | ||
7 | but vpp need 16 alignment. | ||
8 | |||
9 | [Internal] | ||
10 | OSPR: Auto | ||
11 | Commit_Type: BugFix | ||
12 | Platforms: Gen11+ | ||
13 | OS: Windows and Linux | ||
14 | Feature impact: Dec_Legacy | ||
15 | Resolves: N/A | ||
16 | Related-to: PR#6323 | ||
17 | Klocwork: N/A | ||
18 | TP_Passed: N/A | ||
19 | IP Scan: N/A | ||
20 | Open/Embargo Dependency: N/A | ||
21 | |||
22 | Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com> | ||
23 | |||
24 | Upstream-Status: Backport | ||
25 | Expect it to be removed once move to v2023.3.0 and above. | ||
26 | https://github.com/oneapi-src/oneVPL/commit/7fe92332a7c32e85e6bb0a2724d66ce7124006ee | ||
27 | |||
28 | Signed-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 | |||
34 | diff --git a/tools/legacy/sample_decode/src/pipeline_decode.cpp b/tools/legacy/sample_decode/src/pipeline_decode.cpp | ||
35 | index 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; | ||
54 | diff --git a/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp b/tools/legacy/sample_multi_transcode/src/pipeline_transcode.cpp | ||
55 | index 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 | -- | ||
74 | 2.40.1 | ||
75 | |||