diff options
| author | Yew, Chang Ching <chang.ching.yew@intel.com> | 2022-02-11 10:24:43 +0800 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2022-02-11 12:50:06 +0800 |
| commit | 4e6473e8d24970960600725e496e27ae91902e97 (patch) | |
| tree | 715c449b7179e60744a27990bf3bc8f9e2854bea /recipes-multimedia | |
| parent | 840a4824e7f85a7f9fab1bc1fa8814aa6da2bf13 (diff) | |
| download | meta-intel-4e6473e8d24970960600725e496e27ae91902e97.tar.gz | |
onevpl-intel-gpu: upgrade 21.3.4 -> 22.1.0
Backport a patch to fix issues while building with gcc 11.2.
Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-multimedia')
| -rw-r--r-- | recipes-multimedia/onevpl/onevpl-intel-gpu/0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch | 98 | ||||
| -rw-r--r-- | recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Adding-missing-device-ID-4692-for-ADL-S.patch | 33 | ||||
| -rw-r--r-- | recipes-multimedia/onevpl/onevpl-intel-gpu/0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch | 173 | ||||
| -rw-r--r-- | recipes-multimedia/onevpl/onevpl-intel-gpu/0001-jpegd-Enable-JPEG-decode-error-report.patch | 502 | ||||
| -rw-r--r-- | recipes-multimedia/onevpl/onevpl-intel-gpu/fix-gcc11-2-error.patch | 27 | ||||
| -rw-r--r-- | recipes-multimedia/onevpl/onevpl-intel-gpu_22.1.0.bb (renamed from recipes-multimedia/onevpl/onevpl-intel-gpu_21.3.4.bb) | 7 |
6 files changed, 29 insertions, 811 deletions
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch deleted file mode 100644 index 3c41c741..00000000 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch +++ /dev/null | |||
| @@ -1,98 +0,0 @@ | |||
| 1 | From f23ba1b768a4db58ed985a0f066b65d9a65dd61b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
| 3 | Date: Mon, 1 Nov 2021 13:28:06 +0000 | ||
| 4 | Subject: [PATCH 2/2] [AVCd] Add frame info check and update ChromaFormat in | ||
| 5 | FillOutputSurface for VDSFC CSC | ||
| 6 | |||
| 7 | Upstream-Status: Submitted | ||
| 8 | innersource PR #3871 | ||
| 9 | |||
| 10 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
| 11 | --- | ||
| 12 | .../decode/h264/src/mfx_h264_dec_decode.cpp | 48 +++++++++---------- | ||
| 13 | 1 file changed, 24 insertions(+), 24 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/_studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp b/_studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp | ||
| 16 | index 84e57f7f18..8e51ad7852 100644 | ||
| 17 | --- a/_studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp | ||
| 18 | +++ b/_studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp | ||
| 19 | @@ -1140,12 +1140,8 @@ mfxStatus VideoDECODEH264::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 * | ||
| 20 | isVideoProcCscEnabled = true; | ||
| 21 | } | ||
| 22 | #endif | ||
| 23 | - sts = CheckFrameInfoCodecs(&surface_work->Info, MFX_CODEC_AVC); | ||
| 24 | - //Decode CSC support more FourCC format, already checked in Init, skip the check return; | ||
| 25 | - if(!isVideoProcCscEnabled) | ||
| 26 | - { | ||
| 27 | - MFX_CHECK(sts == MFX_ERR_NONE, MFX_ERR_UNSUPPORTED); | ||
| 28 | - } | ||
| 29 | + sts = isVideoProcCscEnabled ? CheckFrameInfoDecVideoProcCsc(&surface_work->Info, MFX_CODEC_AVC) : CheckFrameInfoCodecs(&surface_work->Info, MFX_CODEC_AVC); | ||
| 30 | + MFX_CHECK(sts == MFX_ERR_NONE, MFX_ERR_INVALID_VIDEO_PARAM) | ||
| 31 | |||
| 32 | sts = CheckFrameData(surface_work); | ||
| 33 | MFX_CHECK_STS(sts); | ||
| 34 | @@ -1420,11 +1416,6 @@ void VideoDECODEH264::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
| 35 | } | ||
| 36 | #endif | ||
| 37 | |||
| 38 | - surface_out->Info.CropH = (mfxU16)(pFrame->lumaSize().height - pFrame->m_crop_bottom - pFrame->m_crop_top); | ||
| 39 | - surface_out->Info.CropW = (mfxU16)(pFrame->lumaSize().width - pFrame->m_crop_right - pFrame->m_crop_left); | ||
| 40 | - surface_out->Info.CropX = (mfxU16)(pFrame->m_crop_left); | ||
| 41 | - surface_out->Info.CropY = (mfxU16)(pFrame->m_crop_top); | ||
| 42 | - | ||
| 43 | #ifndef MFX_DEC_VIDEO_POSTPROCESS_DISABLE | ||
| 44 | mfxExtDecVideoProcessing * videoProcessing = (mfxExtDecVideoProcessing *)GetExtendedBuffer(m_vFirstPar.ExtParam, m_vFirstPar.NumExtParam, MFX_EXTBUFF_DEC_VIDEO_PROCESSING); | ||
| 45 | if (videoProcessing) | ||
| 46 | @@ -1433,8 +1424,28 @@ void VideoDECODEH264::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
| 47 | surface_out->Info.CropW = videoProcessing->Out.CropW; | ||
| 48 | surface_out->Info.CropX = videoProcessing->Out.CropX; | ||
| 49 | surface_out->Info.CropY = videoProcessing->Out.CropY; | ||
| 50 | - } | ||
| 51 | + surface_out->Info.ChromaFormat = videoProcessing->Out.ChromaFormat; | ||
| 52 | + } else | ||
| 53 | #endif | ||
| 54 | + { | ||
| 55 | + surface_out->Info.CropH = (mfxU16)(pFrame->lumaSize().height - pFrame->m_crop_bottom - pFrame->m_crop_top); | ||
| 56 | + surface_out->Info.CropW = (mfxU16)(pFrame->lumaSize().width - pFrame->m_crop_right - pFrame->m_crop_left); | ||
| 57 | + surface_out->Info.CropX = (mfxU16)(pFrame->m_crop_left); | ||
| 58 | + surface_out->Info.CropY = (mfxU16)(pFrame->m_crop_top); | ||
| 59 | + | ||
| 60 | + switch(pFrame->m_chroma_format) | ||
| 61 | + { | ||
| 62 | + case 0: | ||
| 63 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV400; | ||
| 64 | + break; | ||
| 65 | + case 2: | ||
| 66 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
| 67 | + break; | ||
| 68 | + default: | ||
| 69 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
| 70 | + break; | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | |||
| 74 | bool isShouldUpdate = !(m_vFirstPar.mfx.FrameInfo.AspectRatioH || m_vFirstPar.mfx.FrameInfo.AspectRatioW); | ||
| 75 | |||
| 76 | @@ -1447,18 +1458,7 @@ void VideoDECODEH264::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
| 77 | surface_out->Info.FrameRateExtN = isShouldUpdate ? m_vPar.mfx.FrameInfo.FrameRateExtN : m_vFirstPar.mfx.FrameInfo.FrameRateExtN; | ||
| 78 | |||
| 79 | surface_out->Info.PicStruct = 0; | ||
| 80 | - switch(pFrame->m_chroma_format) | ||
| 81 | - { | ||
| 82 | - case 0: | ||
| 83 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV400; | ||
| 84 | - break; | ||
| 85 | - case 2: | ||
| 86 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
| 87 | - break; | ||
| 88 | - default: | ||
| 89 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
| 90 | - break; | ||
| 91 | - } | ||
| 92 | + | ||
| 93 | |||
| 94 | switch (pFrame->m_displayPictureStruct) | ||
| 95 | { | ||
| 96 | -- | ||
| 97 | 2.33.1 | ||
| 98 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Adding-missing-device-ID-4692-for-ADL-S.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Adding-missing-device-ID-4692-for-ADL-S.patch deleted file mode 100644 index 9d8577bc..00000000 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Adding-missing-device-ID-4692-for-ADL-S.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | From 1579b536f1a82fb7c80f49fc7b76cda65b8bd18e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Teng, Jin Chung" <jin.chung.teng@intel.com> | ||
| 3 | Date: Thu, 28 Oct 2021 13:49:58 +0800 | ||
| 4 | Subject: [PATCH] Adding missing device ID 4692 for ADL-S | ||
| 5 | |||
| 6 | Upstream-Status: Submitted | ||
| 7 | innersource PR #3717 | ||
| 8 | |||
| 9 | [Internal] | ||
| 10 | Issue:- | ||
| 11 | Test:- | ||
| 12 | OSPR:N/A | ||
| 13 | |||
| 14 | Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com> | ||
| 15 | --- | ||
| 16 | _studio/shared/include/mfxstructures-int.h | 1 + | ||
| 17 | 1 file changed, 1 insertion(+) | ||
| 18 | |||
| 19 | diff --git a/_studio/shared/include/mfxstructures-int.h b/_studio/shared/include/mfxstructures-int.h | ||
| 20 | index c71f126..fa1329d 100755 | ||
| 21 | --- a/_studio/shared/include/mfxstructures-int.h | ||
| 22 | +++ b/_studio/shared/include/mfxstructures-int.h | ||
| 23 | @@ -427,6 +427,7 @@ typedef struct { | ||
| 24 | { 0x4683, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
| 25 | { 0x4690, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
| 26 | { 0x4691, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
| 27 | + { 0x4692, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
| 28 | { 0x4693, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
| 29 | { 0x4698, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
| 30 | { 0x4699, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
| 31 | -- | ||
| 32 | 2.7.4 | ||
| 33 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch deleted file mode 100644 index 69ce1369..00000000 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch +++ /dev/null | |||
| @@ -1,173 +0,0 @@ | |||
| 1 | From 99160958668fd4a170cd749492e37ebdb28dae69 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
| 3 | Date: Thu, 23 Sep 2021 21:34:16 +0000 | ||
| 4 | Subject: [PATCH 1/2] [HEVCd] Add frame info check and update ChromaFormat in | ||
| 5 | FillOutputSurface for VDSFC CSC | ||
| 6 | |||
| 7 | Upstream-Status: Submitted | ||
| 8 | innersource PR #3871 | ||
| 9 | |||
| 10 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
| 11 | --- | ||
| 12 | .../decode/h265/src/mfx_h265_dec_decode.cpp | 64 +++++++++++-------- | ||
| 13 | .../mfx_lib/shared/include/mfx_common_int.h | 1 + | ||
| 14 | _studio/mfx_lib/shared/src/mfx_common_int.cpp | 33 ++++++++++ | ||
| 15 | 3 files changed, 71 insertions(+), 27 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp b/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
| 18 | index fe2bcf2c3f..362ad257d6 100644 | ||
| 19 | --- a/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
| 20 | +++ b/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
| 21 | @@ -963,8 +963,16 @@ mfxStatus VideoDECODEH265::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 * | ||
| 22 | |||
| 23 | if (surface_work) | ||
| 24 | { | ||
| 25 | - sts = CheckFrameInfoCodecs(&surface_work->Info, MFX_CODEC_HEVC); | ||
| 26 | - MFX_CHECK(sts == MFX_ERR_NONE, MFX_ERR_INVALID_VIDEO_PARAM); | ||
| 27 | + bool isVideoProcCscEnabled = false; | ||
| 28 | +#ifndef MFX_DEC_VIDEO_POSTPROCESS_DISABLE | ||
| 29 | + mfxExtDecVideoProcessing* videoProcessing = (mfxExtDecVideoProcessing*)GetExtendedBuffer(m_vInitPar.ExtParam, m_vInitPar.NumExtParam, MFX_EXTBUFF_DEC_VIDEO_PROCESSING); | ||
| 30 | + if (videoProcessing && videoProcessing->Out.FourCC != m_vPar.mfx.FrameInfo.FourCC) | ||
| 31 | + { | ||
| 32 | + isVideoProcCscEnabled = true; | ||
| 33 | + } | ||
| 34 | +#endif | ||
| 35 | + sts = isVideoProcCscEnabled ? CheckFrameInfoDecVideoProcCsc(&surface_work->Info, MFX_CODEC_HEVC) : CheckFrameInfoCodecs(&surface_work->Info, MFX_CODEC_HEVC); | ||
| 36 | + MFX_CHECK(sts == MFX_ERR_NONE, MFX_ERR_INVALID_VIDEO_PARAM) | ||
| 37 | |||
| 38 | sts = CheckFrameData(surface_work); | ||
| 39 | MFX_CHECK_STS(sts); | ||
| 40 | @@ -1172,11 +1180,6 @@ void VideoDECODEH265::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
| 41 | |||
| 42 | surface_out->Info.FrameId.TemporalId = 0; | ||
| 43 | |||
| 44 | - surface_out->Info.CropH = (mfxU16)(pFrame->lumaSize().height - pFrame->m_crop_bottom - pFrame->m_crop_top); | ||
| 45 | - surface_out->Info.CropW = (mfxU16)(pFrame->lumaSize().width - pFrame->m_crop_right - pFrame->m_crop_left); | ||
| 46 | - surface_out->Info.CropX = (mfxU16)(pFrame->m_crop_left); | ||
| 47 | - surface_out->Info.CropY = (mfxU16)(pFrame->m_crop_top); | ||
| 48 | - | ||
| 49 | #ifndef MFX_DEC_VIDEO_POSTPROCESS_DISABLE | ||
| 50 | mfxExtDecVideoProcessing * videoProcessing = (mfxExtDecVideoProcessing *)GetExtendedBuffer(m_vFirstPar.ExtParam, m_vFirstPar.NumExtParam, MFX_EXTBUFF_DEC_VIDEO_PROCESSING); | ||
| 51 | if (videoProcessing) | ||
| 52 | @@ -1185,8 +1188,35 @@ void VideoDECODEH265::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
| 53 | surface_out->Info.CropW = videoProcessing->Out.CropW; | ||
| 54 | surface_out->Info.CropX = videoProcessing->Out.CropX; | ||
| 55 | surface_out->Info.CropY = videoProcessing->Out.CropY; | ||
| 56 | + surface_out->Info.ChromaFormat = videoProcessing->Out.ChromaFormat; | ||
| 57 | } | ||
| 58 | + else | ||
| 59 | #endif | ||
| 60 | + { | ||
| 61 | + surface_out->Info.CropH = (mfxU16)(pFrame->lumaSize().height - pFrame->m_crop_bottom - pFrame->m_crop_top); | ||
| 62 | + surface_out->Info.CropW = (mfxU16)(pFrame->lumaSize().width - pFrame->m_crop_right - pFrame->m_crop_left); | ||
| 63 | + surface_out->Info.CropX = (mfxU16)(pFrame->m_crop_left); | ||
| 64 | + surface_out->Info.CropY = (mfxU16)(pFrame->m_crop_top); | ||
| 65 | + | ||
| 66 | + switch(pFrame->m_chroma_format) | ||
| 67 | + { | ||
| 68 | + case 0: | ||
| 69 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV400; | ||
| 70 | + break; | ||
| 71 | + case 1: | ||
| 72 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
| 73 | + break; | ||
| 74 | + case 2: | ||
| 75 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
| 76 | + break; | ||
| 77 | + case 3: | ||
| 78 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV444; | ||
| 79 | + break; | ||
| 80 | + default: | ||
| 81 | + VM_ASSERT(!"Unknown chroma format"); | ||
| 82 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | |||
| 86 | bool isShouldUpdate = !(m_vFirstPar.mfx.FrameInfo.AspectRatioH || m_vFirstPar.mfx.FrameInfo.AspectRatioW); | ||
| 87 | |||
| 88 | @@ -1198,26 +1228,6 @@ void VideoDECODEH265::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
| 89 | surface_out->Info.FrameRateExtD = isShouldUpdate ? m_vPar.mfx.FrameInfo.FrameRateExtD : m_vFirstPar.mfx.FrameInfo.FrameRateExtD; | ||
| 90 | surface_out->Info.FrameRateExtN = isShouldUpdate ? m_vPar.mfx.FrameInfo.FrameRateExtN : m_vFirstPar.mfx.FrameInfo.FrameRateExtN; | ||
| 91 | |||
| 92 | - surface_out->Info.PicStruct = 0; | ||
| 93 | - switch(pFrame->m_chroma_format) | ||
| 94 | - { | ||
| 95 | - case 0: | ||
| 96 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV400; | ||
| 97 | - break; | ||
| 98 | - case 1: | ||
| 99 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
| 100 | - break; | ||
| 101 | - case 2: | ||
| 102 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
| 103 | - break; | ||
| 104 | - case 3: | ||
| 105 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV444; | ||
| 106 | - break; | ||
| 107 | - default: | ||
| 108 | - VM_ASSERT(!"Unknown chroma format"); | ||
| 109 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
| 110 | - } | ||
| 111 | - | ||
| 112 | surface_out->Info.PicStruct = | ||
| 113 | UMC2MFX_PicStruct(pFrame->m_DisplayPictureStruct_H265, !!m_vPar.mfx.ExtendedPicStruct); | ||
| 114 | |||
| 115 | diff --git a/_studio/mfx_lib/shared/include/mfx_common_int.h b/_studio/mfx_lib/shared/include/mfx_common_int.h | ||
| 116 | index 4f12ddb883..73f4667a18 100644 | ||
| 117 | --- a/_studio/mfx_lib/shared/include/mfx_common_int.h | ||
| 118 | +++ b/_studio/mfx_lib/shared/include/mfx_common_int.h | ||
| 119 | @@ -29,6 +29,7 @@ | ||
| 120 | |||
| 121 | mfxStatus CheckFrameInfoCommon(mfxFrameInfo *info, mfxU32 codecId); | ||
| 122 | mfxStatus CheckFrameInfoEncoders(mfxFrameInfo *info); | ||
| 123 | +mfxStatus CheckFrameInfoDecVideoProcCsc(mfxFrameInfo *info, mfxU32 codecId); | ||
| 124 | mfxStatus CheckFrameInfoCodecs(mfxFrameInfo *info, mfxU32 codecId = MFX_CODEC_AVC); | ||
| 125 | |||
| 126 | mfxStatus CheckVideoParamEncoders(mfxVideoParam *in, eMFXHWType type); | ||
| 127 | diff --git a/_studio/mfx_lib/shared/src/mfx_common_int.cpp b/_studio/mfx_lib/shared/src/mfx_common_int.cpp | ||
| 128 | index 1142457f00..4f2126d944 100644 | ||
| 129 | --- a/_studio/mfx_lib/shared/src/mfx_common_int.cpp | ||
| 130 | +++ b/_studio/mfx_lib/shared/src/mfx_common_int.cpp | ||
| 131 | @@ -163,6 +163,39 @@ mfxStatus CheckFrameInfoEncoders(mfxFrameInfo *info) | ||
| 132 | return MFX_ERR_NONE; | ||
| 133 | } | ||
| 134 | |||
| 135 | +mfxStatus CheckFrameInfoDecVideoProcCsc(mfxFrameInfo *info, mfxU32 codecId) | ||
| 136 | +{ | ||
| 137 | + mfxStatus sts = CheckFrameInfoCommon(info, codecId); | ||
| 138 | + MFX_CHECK_STS(sts); | ||
| 139 | + | ||
| 140 | + switch(info->FourCC) { | ||
| 141 | + case MFX_FOURCC_NV12: | ||
| 142 | + case MFX_FOURCC_P010: | ||
| 143 | + case MFX_FOURCC_P016: | ||
| 144 | + if (info->ChromaFormat == MFX_CHROMAFORMAT_YUV420) | ||
| 145 | + return MFX_ERR_NONE; | ||
| 146 | + MFX_RETURN(MFX_ERR_INVALID_VIDEO_PARAM); | ||
| 147 | + | ||
| 148 | + case MFX_FOURCC_YUY2: | ||
| 149 | + case MFX_FOURCC_Y210: | ||
| 150 | + case MFX_FOURCC_Y216: | ||
| 151 | + if (info->ChromaFormat == MFX_CHROMAFORMAT_YUV422) | ||
| 152 | + return MFX_ERR_NONE; | ||
| 153 | + MFX_RETURN(MFX_ERR_INVALID_VIDEO_PARAM); | ||
| 154 | + | ||
| 155 | + case MFX_FOURCC_AYUV: | ||
| 156 | + case MFX_FOURCC_Y410: | ||
| 157 | + case MFX_FOURCC_Y416: | ||
| 158 | + case MFX_FOURCC_RGB4: | ||
| 159 | + if (info->ChromaFormat == MFX_CHROMAFORMAT_YUV444) | ||
| 160 | + return MFX_ERR_NONE; | ||
| 161 | + MFX_RETURN(MFX_ERR_INVALID_VIDEO_PARAM); | ||
| 162 | + | ||
| 163 | + default: | ||
| 164 | + MFX_RETURN(MFX_ERR_UNSUPPORTED); | ||
| 165 | + } | ||
| 166 | +} | ||
| 167 | + | ||
| 168 | mfxStatus CheckFrameInfoCodecs(mfxFrameInfo *info, mfxU32 codecId) | ||
| 169 | { | ||
| 170 | mfxStatus sts = CheckFrameInfoCommon(info, codecId); | ||
| 171 | -- | ||
| 172 | 2.33.1 | ||
| 173 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-jpegd-Enable-JPEG-decode-error-report.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-jpegd-Enable-JPEG-decode-error-report.patch deleted file mode 100644 index 21482ed7..00000000 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-jpegd-Enable-JPEG-decode-error-report.patch +++ /dev/null | |||
| @@ -1,502 +0,0 @@ | |||
| 1 | From fe25ec3db9a48308bd6d3e9fe800e67335f8a369 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
| 3 | Date: Mon, 4 Oct 2021 13:56:08 +0800 | ||
| 4 | Subject: [PATCH] [jpegd] Enable JPEG decode error report | ||
| 5 | |||
| 6 | Upstream-Status: Submitted | ||
| 7 | innersource PR #3318 | ||
| 8 | |||
| 9 | [Internal] | ||
| 10 | Issue: NA | ||
| 11 | Test: manual. Gst-MSDK with mfxExtDecodeErrorReport | ||
| 12 | OSPR: N/A | ||
| 13 | |||
| 14 | Signed-off-by: Cheah, Vincent Beng Keat vincent.beng.keat.cheah@intel.com> | ||
| 15 | --- | ||
| 16 | .../mjpeg/include/mfx_mjpeg_dec_decode.h | 2 ++ | ||
| 17 | .../decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp | 19 ++++++++++- | ||
| 18 | .../umc/codec/jpeg_dec/include/jpegdec.h | 1 + | ||
| 19 | .../umc/codec/jpeg_dec/include/jpegdec_base.h | 19 +++++++++++ | ||
| 20 | .../jpeg_dec/include/umc_mjpeg_mfx_decode.h | 2 +- | ||
| 21 | .../include/umc_mjpeg_mfx_decode_base.h | 4 +-- | ||
| 22 | .../shared/umc/codec/jpeg_dec/src/jpegdec.cpp | 17 ++++++++-- | ||
| 23 | .../umc/codec/jpeg_dec/src/jpegdec_base.cpp | 29 +++++++++++++++- | ||
| 24 | .../jpeg_dec/src/umc_mjpeg_mfx_decode.cpp | 6 ++-- | ||
| 25 | .../src/umc_mjpeg_mfx_decode_base.cpp | 6 ++-- | ||
| 26 | api/vpl/mfxstructures.h | 33 +++++++++++++++---- | ||
| 27 | 11 files changed, 121 insertions(+), 17 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/_studio/mfx_lib/decode/mjpeg/include/mfx_mjpeg_dec_decode.h b/_studio/mfx_lib/decode/mjpeg/include/mfx_mjpeg_dec_decode.h | ||
| 30 | index c6641d3e71..a2ea6b5cec 100644 | ||
| 31 | --- a/_studio/mfx_lib/decode/mjpeg/include/mfx_mjpeg_dec_decode.h | ||
| 32 | +++ b/_studio/mfx_lib/decode/mjpeg/include/mfx_mjpeg_dec_decode.h | ||
| 33 | @@ -37,6 +37,7 @@ | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #include "mfx_task.h" | ||
| 37 | +#include "umc_media_data.h" | ||
| 38 | |||
| 39 | #include "mfx_vpp_jpeg.h" | ||
| 40 | |||
| 41 | @@ -46,6 +47,7 @@ namespace UMC | ||
| 42 | class JpegFrameConstructor; | ||
| 43 | class MediaDataEx; | ||
| 44 | class FrameData; | ||
| 45 | + class MediaData; | ||
| 46 | }; | ||
| 47 | |||
| 48 | class VideoDECODEMJPEGBase | ||
| 49 | diff --git a/_studio/mfx_lib/decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp b/_studio/mfx_lib/decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp | ||
| 50 | index 3769fe8a72..0775fbb1be 100644 | ||
| 51 | --- a/_studio/mfx_lib/decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp | ||
| 52 | +++ b/_studio/mfx_lib/decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp | ||
| 53 | @@ -456,6 +456,14 @@ mfxStatus VideoDECODEMJPEG::DecodeHeader(VideoCORE *core, mfxBitstream *bs, mfxV | ||
| 54 | UMC::Status umcRes = decoder.Init(&umcVideoParams); | ||
| 55 | MFX_CHECK_INIT(umcRes == UMC::UMC_OK); | ||
| 56 | |||
| 57 | + mfxExtBuffer* extbuf = (bs) ? GetExtendedBuffer(bs->ExtParam, bs->NumExtParam, MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
| 58 | + | ||
| 59 | + if (extbuf) | ||
| 60 | + { | ||
| 61 | + reinterpret_cast<mfxExtDecodeErrorReport *>(extbuf)->ErrorTypes = 0; | ||
| 62 | + in.SetExtBuffer(extbuf); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | umcRes = decoder.DecodeHeader(&in); | ||
| 66 | |||
| 67 | in.Save(bs); | ||
| 68 | @@ -770,6 +778,14 @@ mfxStatus VideoDECODEMJPEG::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 | ||
| 69 | MFXMediaDataAdapter src(bs); | ||
| 70 | UMC::MediaDataEx *pSrcData; | ||
| 71 | |||
| 72 | + mfxExtBuffer* extbuf = (bs) ? GetExtendedBuffer(bs->ExtParam, bs->NumExtParam, MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
| 73 | + | ||
| 74 | + if (extbuf) | ||
| 75 | + { | ||
| 76 | + reinterpret_cast<mfxExtDecodeErrorReport *>(extbuf)->ErrorTypes = 0; | ||
| 77 | + src.SetExtBuffer(extbuf); | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | if (!m_isHeaderFound && bs) | ||
| 81 | { | ||
| 82 | umcRes = pMJPEGVideoDecoder->FindStartOfImage(&src); | ||
| 83 | @@ -785,7 +801,8 @@ mfxStatus VideoDECODEMJPEG::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 | ||
| 84 | |||
| 85 | if (!m_isHeaderParsed && bs) | ||
| 86 | { | ||
| 87 | - umcRes = pMJPEGVideoDecoder->_GetFrameInfo((uint8_t*)src.GetDataPointer(), src.GetDataSize()); | ||
| 88 | + umcRes = pMJPEGVideoDecoder->_GetFrameInfo((uint8_t*)src.GetDataPointer(), src.GetDataSize(), &src); | ||
| 89 | + | ||
| 90 | if (umcRes != UMC::UMC_OK) | ||
| 91 | { | ||
| 92 | if(umcRes != UMC::UMC_ERR_NOT_ENOUGH_DATA) | ||
| 93 | diff --git a/_studio/shared/umc/codec/jpeg_dec/include/jpegdec.h b/_studio/shared/umc/codec/jpeg_dec/include/jpegdec.h | ||
| 94 | index 1e70931284..561e1c2889 100644 | ||
| 95 | --- a/_studio/shared/umc/codec/jpeg_dec/include/jpegdec.h | ||
| 96 | +++ b/_studio/shared/umc/codec/jpeg_dec/include/jpegdec.h | ||
| 97 | @@ -27,6 +27,7 @@ | ||
| 98 | #include "omp.h" | ||
| 99 | #endif | ||
| 100 | #include "jpegdec_base.h" | ||
| 101 | +#include "umc_media_data.h" | ||
| 102 | |||
| 103 | class CBaseStreamInput; | ||
| 104 | |||
| 105 | diff --git a/_studio/shared/umc/codec/jpeg_dec/include/jpegdec_base.h b/_studio/shared/umc/codec/jpeg_dec/include/jpegdec_base.h | ||
| 106 | index 5e9c139c2c..42647f871c 100644 | ||
| 107 | --- a/_studio/shared/umc/codec/jpeg_dec/include/jpegdec_base.h | ||
| 108 | +++ b/_studio/shared/umc/codec/jpeg_dec/include/jpegdec_base.h | ||
| 109 | @@ -29,6 +29,13 @@ | ||
| 110 | #include "colorcomp.h" | ||
| 111 | #include "membuffin.h" | ||
| 112 | #include "bitstreamin.h" | ||
| 113 | +#include "mfxstructures.h" | ||
| 114 | +#include "umc_media_data.h" | ||
| 115 | + | ||
| 116 | +namespace UMC | ||
| 117 | +{ | ||
| 118 | + class MediaData; | ||
| 119 | +}; | ||
| 120 | |||
| 121 | class CJPEGDecoderBase | ||
| 122 | { | ||
| 123 | @@ -146,6 +153,18 @@ public: | ||
| 124 | JERRCODE SkipMarker(void); | ||
| 125 | |||
| 126 | JERRCODE DetectSampling(void); | ||
| 127 | + | ||
| 128 | + void SetDecodeErrorTypes(void); | ||
| 129 | + | ||
| 130 | + void SetDecodeErrorReportParam(UMC::MediaData *in) | ||
| 131 | + { | ||
| 132 | + UMC::MediaData::AuxInfo* aux = (in) ? in->GetAuxInfo(MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
| 133 | + m_pDecodeErrorReport = (aux) ? reinterpret_cast<mfxExtDecodeErrorReport*>(aux->ptr) : NULL; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | +protected: | ||
| 137 | + mfxExtDecodeErrorReport* m_pDecodeErrorReport; | ||
| 138 | + | ||
| 139 | }; | ||
| 140 | |||
| 141 | #endif // MFX_ENABLE_MJPEG_VIDEO_DECODE | ||
| 142 | diff --git a/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode.h b/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode.h | ||
| 143 | index fbe535cd95..2edd4d57a8 100644 | ||
| 144 | --- a/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode.h | ||
| 145 | +++ b/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode.h | ||
| 146 | @@ -94,7 +94,7 @@ public: | ||
| 147 | JCOLOR GetColorType(); | ||
| 148 | |||
| 149 | // All memory sizes should come in size_t type | ||
| 150 | - Status _GetFrameInfo(const uint8_t* pBitStream, size_t nSize); | ||
| 151 | + Status _GetFrameInfo(const uint8_t* pBitStream, size_t nSize, MediaData *in); | ||
| 152 | |||
| 153 | // Allocate the destination frame | ||
| 154 | Status AllocateFrame() override; | ||
| 155 | diff --git a/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode_base.h b/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode_base.h | ||
| 156 | index 9cee49e9c1..90ce5888ea 100644 | ||
| 157 | --- a/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode_base.h | ||
| 158 | +++ b/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode_base.h | ||
| 159 | @@ -63,7 +63,7 @@ public: | ||
| 160 | // Close decoding & free all allocated resources | ||
| 161 | virtual Status Close(void); | ||
| 162 | |||
| 163 | - virtual Status GetFrame(UMC::MediaDataEx *, UMC::FrameData** , const mfxU32 ) { return MFX_ERR_NONE; }; | ||
| 164 | + virtual Status GetFrame(UMC::MediaDataEx *, UMC::FrameData** , const mfxU32) { return MFX_ERR_NONE; }; | ||
| 165 | |||
| 166 | virtual void SetFrameAllocator(FrameAllocator * frameAllocator); | ||
| 167 | |||
| 168 | @@ -79,7 +79,7 @@ public: | ||
| 169 | Status FindStartOfImage(MediaData * in); | ||
| 170 | |||
| 171 | // All memory sizes should come in size_t type | ||
| 172 | - Status _GetFrameInfo(const uint8_t* pBitStream, size_t nSize); | ||
| 173 | + Status _GetFrameInfo(const uint8_t* pBitStream, size_t nSize, MediaData *in); | ||
| 174 | |||
| 175 | Status SetRotation(uint16_t rotation); | ||
| 176 | |||
| 177 | diff --git a/_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp b/_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp | ||
| 178 | index 127133ae4c..54441dc534 100644 | ||
| 179 | --- a/_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp | ||
| 180 | +++ b/_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp | ||
| 181 | @@ -1120,6 +1120,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 182 | jerr = ParseAPP0(); | ||
| 183 | if(JPEG_OK != jerr) | ||
| 184 | { | ||
| 185 | + SetDecodeErrorTypes(); | ||
| 186 | return jerr; | ||
| 187 | } | ||
| 188 | break; | ||
| 189 | @@ -1128,6 +1129,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 190 | jerr = ParseAPP1(); | ||
| 191 | if(JPEG_OK != jerr) | ||
| 192 | { | ||
| 193 | + SetDecodeErrorTypes(); | ||
| 194 | return jerr; | ||
| 195 | } | ||
| 196 | break; | ||
| 197 | @@ -1136,6 +1138,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 198 | jerr = ParseAPP14(); | ||
| 199 | if(JPEG_OK != jerr) | ||
| 200 | { | ||
| 201 | + SetDecodeErrorTypes(); | ||
| 202 | return jerr; | ||
| 203 | } | ||
| 204 | break; | ||
| 205 | @@ -1152,6 +1155,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 206 | jerr = ParseDQT(); | ||
| 207 | if(JPEG_OK != jerr) | ||
| 208 | { | ||
| 209 | + SetDecodeErrorTypes(); | ||
| 210 | return jerr; | ||
| 211 | } | ||
| 212 | break; | ||
| 213 | @@ -1160,6 +1164,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 214 | jerr = ParseSOF0(); | ||
| 215 | if(JPEG_OK != jerr) | ||
| 216 | { | ||
| 217 | + SetDecodeErrorTypes(); | ||
| 218 | return jerr; | ||
| 219 | } | ||
| 220 | break; | ||
| 221 | @@ -1206,6 +1211,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 222 | jerr = ParseDHT(); | ||
| 223 | if(JPEG_OK != jerr) | ||
| 224 | { | ||
| 225 | + SetDecodeErrorTypes(); | ||
| 226 | return jerr; | ||
| 227 | } | ||
| 228 | break; | ||
| 229 | @@ -1214,6 +1220,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 230 | jerr = ParseDRI(); | ||
| 231 | if(JPEG_OK != jerr) | ||
| 232 | { | ||
| 233 | + SetDecodeErrorTypes(); | ||
| 234 | return jerr; | ||
| 235 | } | ||
| 236 | break; | ||
| 237 | @@ -1222,6 +1229,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 238 | jerr = ParseSOS(op); | ||
| 239 | if(JPEG_OK != jerr) | ||
| 240 | { | ||
| 241 | + SetDecodeErrorTypes(); | ||
| 242 | return jerr; | ||
| 243 | } | ||
| 244 | |||
| 245 | @@ -1231,7 +1239,10 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 246 | { | ||
| 247 | jerr = m_BitStreamIn.Seek(-(m_sos_len + 2)); | ||
| 248 | if(JPEG_OK != jerr) | ||
| 249 | + { | ||
| 250 | + SetDecodeErrorTypes(); | ||
| 251 | return jerr; | ||
| 252 | + } | ||
| 253 | } | ||
| 254 | else | ||
| 255 | { | ||
| 256 | @@ -1246,7 +1257,10 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 257 | { | ||
| 258 | jerr = ParseData(); | ||
| 259 | if(JPEG_OK != jerr) | ||
| 260 | + { | ||
| 261 | + SetDecodeErrorTypes(); | ||
| 262 | return jerr; | ||
| 263 | + } | ||
| 264 | |||
| 265 | } | ||
| 266 | break; | ||
| 267 | @@ -1288,10 +1302,10 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
| 268 | default: | ||
| 269 | TRC1("-> Unknown marker ",m_marker); | ||
| 270 | TRC0("..Skipping"); | ||
| 271 | + SetDecodeErrorTypes(); | ||
| 272 | jerr = SkipMarker(); | ||
| 273 | if(JPEG_OK != jerr) | ||
| 274 | return jerr; | ||
| 275 | - | ||
| 276 | break; | ||
| 277 | } | ||
| 278 | } | ||
| 279 | @@ -4575,7 +4589,6 @@ JERRCODE CJPEGDecoder::ReadHeader( | ||
| 280 | JERRCODE CJPEGDecoder::ReadData(void) | ||
| 281 | { | ||
| 282 | return ParseJPEGBitStream(JO_READ_DATA); | ||
| 283 | - | ||
| 284 | } // CJPEGDecoder::ReadData(void) | ||
| 285 | |||
| 286 | JERRCODE CJPEGDecoder::ReadData(uint32_t restartNum, uint32_t restartsToDecode) | ||
| 287 | diff --git a/_studio/shared/umc/codec/jpeg_dec/src/jpegdec_base.cpp b/_studio/shared/umc/codec/jpeg_dec/src/jpegdec_base.cpp | ||
| 288 | index d6244e827b..4409b51cee 100644 | ||
| 289 | --- a/_studio/shared/umc/codec/jpeg_dec/src/jpegdec_base.cpp | ||
| 290 | +++ b/_studio/shared/umc/codec/jpeg_dec/src/jpegdec_base.cpp | ||
| 291 | @@ -282,6 +282,23 @@ JERRCODE CJPEGDecoderBase::DetectSampling(void) | ||
| 292 | return JPEG_OK; | ||
| 293 | } // CJPEGDecoderBase::DetectSampling() | ||
| 294 | |||
| 295 | +void CJPEGDecoderBase::SetDecodeErrorTypes(void) | ||
| 296 | +{ | ||
| 297 | + if (!m_pDecodeErrorReport) | ||
| 298 | + return; | ||
| 299 | + | ||
| 300 | + switch (m_marker) | ||
| 301 | + { | ||
| 302 | + case JM_APP0: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_APP0_MARKER; break; | ||
| 303 | + case JM_APP14: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_APP14_MARKER; break; | ||
| 304 | + case JM_DQT: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_DQT_MARKER; break; | ||
| 305 | + case JM_SOF0: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_SOF0_MARKER; break; | ||
| 306 | + case JM_DHT: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_DHT_MARKER; break; | ||
| 307 | + case JM_DRI: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_DRI_MARKER; break; | ||
| 308 | + case JM_SOS: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_SOS_MARKER; break; | ||
| 309 | + default: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_UNKNOWN_MARKER; break; | ||
| 310 | + }; | ||
| 311 | +} | ||
| 312 | |||
| 313 | JERRCODE CJPEGDecoderBase::NextMarker(JMARKER* marker) | ||
| 314 | { | ||
| 315 | @@ -1265,6 +1282,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 316 | jerr = ParseAPP0(); | ||
| 317 | if(JPEG_OK != jerr) | ||
| 318 | { | ||
| 319 | + SetDecodeErrorTypes(); | ||
| 320 | return jerr; | ||
| 321 | } | ||
| 322 | break; | ||
| 323 | @@ -1273,6 +1291,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 324 | jerr = ParseAPP14(); | ||
| 325 | if(JPEG_OK != jerr) | ||
| 326 | { | ||
| 327 | + SetDecodeErrorTypes(); | ||
| 328 | return jerr; | ||
| 329 | } | ||
| 330 | break; | ||
| 331 | @@ -1281,6 +1300,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 332 | jerr = ParseDQT(); | ||
| 333 | if(JPEG_OK != jerr) | ||
| 334 | { | ||
| 335 | + SetDecodeErrorTypes(); | ||
| 336 | return jerr; | ||
| 337 | } | ||
| 338 | break; | ||
| 339 | @@ -1289,6 +1309,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 340 | jerr = ParseSOF0(); | ||
| 341 | if(JPEG_OK != jerr) | ||
| 342 | { | ||
| 343 | + SetDecodeErrorTypes(); | ||
| 344 | return jerr; | ||
| 345 | } | ||
| 346 | break; | ||
| 347 | @@ -1311,6 +1332,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 348 | jerr = ParseDHT(); | ||
| 349 | if(JPEG_OK != jerr) | ||
| 350 | { | ||
| 351 | + SetDecodeErrorTypes(); | ||
| 352 | return jerr; | ||
| 353 | } | ||
| 354 | break; | ||
| 355 | @@ -1319,6 +1341,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 356 | jerr = ParseDRI(); | ||
| 357 | if(JPEG_OK != jerr) | ||
| 358 | { | ||
| 359 | + SetDecodeErrorTypes(); | ||
| 360 | return jerr; | ||
| 361 | } | ||
| 362 | break; | ||
| 363 | @@ -1327,6 +1350,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 364 | jerr = ParseSOS(op); | ||
| 365 | if(JPEG_OK != jerr) | ||
| 366 | { | ||
| 367 | + SetDecodeErrorTypes(); | ||
| 368 | return jerr; | ||
| 369 | } | ||
| 370 | |||
| 371 | @@ -1336,7 +1360,10 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 372 | { | ||
| 373 | jerr = m_BitStreamIn.Seek(-(m_sos_len + 2)); | ||
| 374 | if(JPEG_OK != jerr) | ||
| 375 | + { | ||
| 376 | + SetDecodeErrorTypes(); | ||
| 377 | return jerr; | ||
| 378 | + } | ||
| 379 | } | ||
| 380 | else | ||
| 381 | { | ||
| 382 | @@ -1355,10 +1382,10 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
| 383 | default: | ||
| 384 | TRC1("-> Unknown marker ",m_marker); | ||
| 385 | TRC0("..Skipping"); | ||
| 386 | + SetDecodeErrorTypes(); | ||
| 387 | jerr = SkipMarker(); | ||
| 388 | if(JPEG_OK != jerr) | ||
| 389 | return jerr; | ||
| 390 | - | ||
| 391 | break; | ||
| 392 | } | ||
| 393 | } | ||
| 394 | diff --git a/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode.cpp b/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode.cpp | ||
| 395 | index 01a513e883..0ffcfaf7ab 100644 | ||
| 396 | --- a/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode.cpp | ||
| 397 | +++ b/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode.cpp | ||
| 398 | @@ -378,7 +378,7 @@ Status MJPEGVideoDecoderMFX::DecodeHeader(MediaData* in) | ||
| 399 | } | ||
| 400 | } | ||
| 401 | |||
| 402 | - Status sts = _GetFrameInfo((uint8_t*)in->GetDataPointer(), in->GetDataSize()); | ||
| 403 | + Status sts = _GetFrameInfo((uint8_t*)in->GetDataPointer(), in->GetDataSize(), in); | ||
| 404 | |||
| 405 | if (sts == UMC_ERR_NOT_ENOUGH_DATA && | ||
| 406 | (!(in->GetFlags() & MediaData::FLAG_VIDEO_DATA_NOT_FULL_FRAME) || | ||
| 407 | @@ -937,7 +937,7 @@ Status MJPEGVideoDecoderMFX::PostProcessing(double pts) | ||
| 408 | return UMC_OK; | ||
| 409 | } | ||
| 410 | |||
| 411 | -Status MJPEGVideoDecoderMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSize) | ||
| 412 | +Status MJPEGVideoDecoderMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSize, MediaData *in) | ||
| 413 | { | ||
| 414 | int32_t nchannels; | ||
| 415 | int32_t precision; | ||
| 416 | @@ -945,6 +945,8 @@ Status MJPEGVideoDecoderMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSi | ||
| 417 | JCOLOR color; | ||
| 418 | JERRCODE jerr; | ||
| 419 | |||
| 420 | + m_dec[0]->SetDecodeErrorReportParam(in); | ||
| 421 | + | ||
| 422 | if (!m_IsInit) | ||
| 423 | return UMC_ERR_NOT_INITIALIZED; | ||
| 424 | |||
| 425 | diff --git a/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode_base.cpp b/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode_base.cpp | ||
| 426 | index 06fd1a681b..3150492ab2 100644 | ||
| 427 | --- a/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode_base.cpp | ||
| 428 | +++ b/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode_base.cpp | ||
| 429 | @@ -322,7 +322,7 @@ Status MJPEGVideoDecoderBaseMFX::DecodeHeader(MediaData* in) | ||
| 430 | } | ||
| 431 | } | ||
| 432 | |||
| 433 | - Status sts = _GetFrameInfo((uint8_t*)in->GetDataPointer(), in->GetDataSize()); | ||
| 434 | + Status sts = _GetFrameInfo((uint8_t*)in->GetDataPointer(), in->GetDataSize(), in); | ||
| 435 | |||
| 436 | if (sts == UMC_ERR_NOT_ENOUGH_DATA && | ||
| 437 | (!(in->GetFlags() & MediaData::FLAG_VIDEO_DATA_NOT_FULL_FRAME) || | ||
| 438 | @@ -345,7 +345,7 @@ Status MJPEGVideoDecoderBaseMFX::SetRotation(uint16_t rotation) | ||
| 439 | return UMC_OK; | ||
| 440 | } | ||
| 441 | |||
| 442 | -Status MJPEGVideoDecoderBaseMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSize) | ||
| 443 | +Status MJPEGVideoDecoderBaseMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSize, MediaData *in) | ||
| 444 | { | ||
| 445 | int32_t nchannels; | ||
| 446 | int32_t precision; | ||
| 447 | @@ -353,6 +353,8 @@ Status MJPEGVideoDecoderBaseMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t | ||
| 448 | JCOLOR color; | ||
| 449 | JERRCODE jerr; | ||
| 450 | |||
| 451 | + m_decBase->SetDecodeErrorReportParam(in); | ||
| 452 | + | ||
| 453 | if (!m_IsInit) | ||
| 454 | return UMC_ERR_NOT_INITIALIZED; | ||
| 455 | |||
| 456 | diff --git a/api/vpl/mfxstructures.h b/api/vpl/mfxstructures.h | ||
| 457 | index 879a431602..1bfdaf68c2 100644 | ||
| 458 | --- a/api/vpl/mfxstructures.h | ||
| 459 | +++ b/api/vpl/mfxstructures.h | ||
| 460 | @@ -3520,12 +3520,33 @@ MFX_PACK_END() | ||
| 461 | |||
| 462 | /*! The ErrorTypes enumerator uses bit-ORed values to itemize bitstream error types. */ | ||
| 463 | enum { | ||
| 464 | - MFX_ERROR_NO = 0, /*!< No error in bitstream. */ | ||
| 465 | - MFX_ERROR_PPS = (1 << 0), /*!< Invalid/corrupted PPS. */ | ||
| 466 | - MFX_ERROR_SPS = (1 << 1), /*!< Invalid/corrupted SPS. */ | ||
| 467 | - MFX_ERROR_SLICEHEADER = (1 << 2), /*!< Invalid/corrupted slice header. */ | ||
| 468 | - MFX_ERROR_SLICEDATA = (1 << 3), /*!< Invalid/corrupted slice data. */ | ||
| 469 | - MFX_ERROR_FRAME_GAP = (1 << 4), /*!< Missed frames. */ | ||
| 470 | + MFX_ERROR_NO = 0, /*!< No error in bitstream. */ | ||
| 471 | + MFX_ERROR_PPS = (1 << 0), /*!< Invalid/corrupted PPS. */ | ||
| 472 | + MFX_ERROR_SPS = (1 << 1), /*!< Invalid/corrupted SPS. */ | ||
| 473 | + MFX_ERROR_SLICEHEADER = (1 << 2), /*!< Invalid/corrupted slice header. */ | ||
| 474 | + MFX_ERROR_SLICEDATA = (1 << 3), /*!< Invalid/corrupted slice data. */ | ||
| 475 | + MFX_ERROR_FRAME_GAP = (1 << 4), /*!< Missed frames. */ | ||
| 476 | + MFX_ERROR_JPEG_APP0_MARKER = (1 << 5), /*!< Invalid/corrupted APP0 marker. */ | ||
| 477 | + MFX_ERROR_JPEG_APP1_MARKER = (1 << 6), /*!< Invalid/corrupted APP1 marker. */ | ||
| 478 | + MFX_ERROR_JPEG_APP2_MARKER = (1 << 7), /*!< Invalid/corrupted APP2 marker. */ | ||
| 479 | + MFX_ERROR_JPEG_APP3_MARKER = (1 << 8), /*!< Invalid/corrupted APP3 marker. */ | ||
| 480 | + MFX_ERROR_JPEG_APP4_MARKER = (1 << 9), /*!< Invalid/corrupted APP4 marker. */ | ||
| 481 | + MFX_ERROR_JPEG_APP5_MARKER = (1 << 10), /*!< Invalid/corrupted APP5 marker. */ | ||
| 482 | + MFX_ERROR_JPEG_APP6_MARKER = (1 << 11), /*!< Invalid/corrupted APP6 marker. */ | ||
| 483 | + MFX_ERROR_JPEG_APP7_MARKER = (1 << 12), /*!< Invalid/corrupted APP7 marker. */ | ||
| 484 | + MFX_ERROR_JPEG_APP8_MARKER = (1 << 13), /*!< Invalid/corrupted APP8 marker. */ | ||
| 485 | + MFX_ERROR_JPEG_APP9_MARKER = (1 << 14), /*!< Invalid/corrupted APP9 marker. */ | ||
| 486 | + MFX_ERROR_JPEG_APP10_MARKER = (1 << 15), /*!< Invalid/corrupted APP10 marker. */ | ||
| 487 | + MFX_ERROR_JPEG_APP11_MARKER = (1 << 16), /*!< Invalid/corrupted APP11 marker. */ | ||
| 488 | + MFX_ERROR_JPEG_APP12_MARKER = (1 << 17), /*!< Invalid/corrupted APP12 marker. */ | ||
| 489 | + MFX_ERROR_JPEG_APP13_MARKER = (1 << 18), /*!< Invalid/corrupted APP13 marker. */ | ||
| 490 | + MFX_ERROR_JPEG_APP14_MARKER = (1 << 19), /*!< Invalid/corrupted APP14 marker. */ | ||
| 491 | + MFX_ERROR_JPEG_DQT_MARKER = (1 << 20), /*!< Invalid/corrupted DQT marker. */ | ||
| 492 | + MFX_ERROR_JPEG_SOF0_MARKER = (1 << 21), /*!< Invalid/corrupted SOF0 marker. */ | ||
| 493 | + MFX_ERROR_JPEG_DHT_MARKER = (1 << 22), /*!< Invalid/corrupted DHT marker. */ | ||
| 494 | + MFX_ERROR_JPEG_DRI_MARKER = (1 << 23), /*!< Invalid/corrupted DRI marker. */ | ||
| 495 | + MFX_ERROR_JPEG_SOS_MARKER = (1 << 24), /*!< Invalid/corrupted SOS marker. */ | ||
| 496 | + MFX_ERROR_JPEG_UNKNOWN_MARKER = (1 << 25), /*!< Unknown Marker. */ | ||
| 497 | }; | ||
| 498 | |||
| 499 | MFX_PACK_BEGIN_USUAL_STRUCT() | ||
| 500 | -- | ||
| 501 | 2.33.0 | ||
| 502 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/fix-gcc11-2-error.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/fix-gcc11-2-error.patch new file mode 100644 index 00000000..9b57f6c9 --- /dev/null +++ b/recipes-multimedia/onevpl/onevpl-intel-gpu/fix-gcc11-2-error.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | From 34a7b0803102c5a6d669efe617ff29623ef12a63 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> | ||
| 3 | Date: Wed, 9 Feb 2022 16:35:46 -0800 | ||
| 4 | Subject: [PATCH] build: fix build with gcc-11 | ||
| 5 | |||
| 6 | Fixes: oneapi-src/oneVPL-intel-gpu#196 | ||
| 7 | |||
| 8 | Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> | ||
| 9 | |||
| 10 | Upstream-Status: Backport | ||
| 11 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
| 12 | --- | ||
| 13 | _studio/shared/mfx_logging/include/mfx_utils_logging.h | 1 + | ||
| 14 | 1 file changed, 1 insertion(+) | ||
| 15 | |||
| 16 | diff --git a/_studio/shared/mfx_logging/include/mfx_utils_logging.h b/_studio/shared/mfx_logging/include/mfx_utils_logging.h | ||
| 17 | index e48928b3f..af6af8d2e 100644 | ||
| 18 | --- a/_studio/shared/mfx_logging/include/mfx_utils_logging.h | ||
| 19 | +++ b/_studio/shared/mfx_logging/include/mfx_utils_logging.h | ||
| 20 | @@ -25,6 +25,7 @@ | ||
| 21 | |||
| 22 | #include <iostream> | ||
| 23 | #include <thread> | ||
| 24 | +#include <memory> | ||
| 25 | #include <mutex> | ||
| 26 | #include <string> | ||
| 27 | #include <map> | ||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu_21.3.4.bb b/recipes-multimedia/onevpl/onevpl-intel-gpu_22.1.0.bb index 1fc4c4b2..b8119d7f 100644 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu_21.3.4.bb +++ b/recipes-multimedia/onevpl/onevpl-intel-gpu_22.1.0.bb | |||
| @@ -17,13 +17,10 @@ COMPATIBLE_HOST:x86-x32 = "null" | |||
| 17 | DEPENDS += "libdrm libva intel-media-driver onevpl pkgconfig-native" | 17 | DEPENDS += "libdrm libva intel-media-driver onevpl pkgconfig-native" |
| 18 | 18 | ||
| 19 | SRC_URI = "git://github.com/oneapi-src/oneVPL-intel-gpu.git;protocol=https;branch=main;lfs=0 \ | 19 | SRC_URI = "git://github.com/oneapi-src/oneVPL-intel-gpu.git;protocol=https;branch=main;lfs=0 \ |
| 20 | file://0001-jpegd-Enable-JPEG-decode-error-report.patch \ | 20 | file://fix-gcc11-2-error.patch \ |
| 21 | file://0001-Adding-missing-device-ID-4692-for-ADL-S.patch \ | ||
| 22 | file://0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch \ | ||
| 23 | file://0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch \ | ||
| 24 | " | 21 | " |
| 25 | 22 | ||
| 26 | SRCREV = "51608c724044802cc060b7969084126a3e90ca4a" | 23 | SRCREV = "6676f7652249bb20ad51d229012f8a6ef26f67b0" |
| 27 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" |
| 28 | 25 | ||
| 29 | inherit cmake | 26 | inherit cmake |
