diff options
| -rw-r--r-- | recipes-multimedia/mediasdk/files/0001-hevcd-Enable-the-SPS-PPS-error-reporting.patch | 139 | ||||
| -rw-r--r-- | recipes-multimedia/mediasdk/files/0002-hevcd-Use-reinterpret_cast-for-style-alignment.patch | 27 | ||||
| -rw-r--r-- | recipes-multimedia/mediasdk/intel-mediasdk_21.1.3.bb (renamed from recipes-multimedia/mediasdk/intel-mediasdk_21.1.1.bb) | 4 |
3 files changed, 1 insertions, 169 deletions
diff --git a/recipes-multimedia/mediasdk/files/0001-hevcd-Enable-the-SPS-PPS-error-reporting.patch b/recipes-multimedia/mediasdk/files/0001-hevcd-Enable-the-SPS-PPS-error-reporting.patch deleted file mode 100644 index f980c4bf..00000000 --- a/recipes-multimedia/mediasdk/files/0001-hevcd-Enable-the-SPS-PPS-error-reporting.patch +++ /dev/null | |||
| @@ -1,139 +0,0 @@ | |||
| 1 | From ee1b87d107833e8803567cac438f55bde72d8e02 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
| 3 | Date: Mon, 30 Mar 2020 13:40:39 +0000 | ||
| 4 | Subject: [PATCH 1/2] [hevcd] Enable the SPS/PPS error reporting | ||
| 5 | |||
| 6 | Issue:N/A | ||
| 7 | Test:sample_decode with mfxExtDecodeErrorReport | ||
| 8 | |||
| 9 | Upstream-Status: Accepted [https://github.com/Intel-Media-SDK/MediaSDK/pull/2383] | ||
| 10 | |||
| 11 | Signed-off-by: Ung, Teng En <teng.en.ung@intel.com> | ||
| 12 | --- | ||
| 13 | .../decode/h265/src/mfx_h265_dec_decode.cpp | 10 ++++++ | ||
| 14 | .../umc/codec/h265_dec/src/umc_h265_mfx_utils.cpp | 7 ++++ | ||
| 15 | .../codec/h265_dec/src/umc_h265_task_supplier.cpp | 41 +++++++++++++++++++++- | ||
| 16 | 3 files changed, 57 insertions(+), 1 deletion(-) | ||
| 17 | |||
| 18 | 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 | ||
| 19 | index 4ae164f..f346e8c 100644 | ||
| 20 | --- a/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
| 21 | +++ b/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
| 22 | @@ -1105,6 +1105,16 @@ mfxStatus VideoDECODEH265::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 * | ||
| 23 | |||
| 24 | MFXMediaDataAdapter src(bs); | ||
| 25 | |||
| 26 | +#if (MFX_VERSION >= 1025) | ||
| 27 | + mfxExtBuffer* extbuf = (bs) ? GetExtendedBuffer(bs->ExtParam, bs->NumExtParam, MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
| 28 | + | ||
| 29 | + if (extbuf) | ||
| 30 | + { | ||
| 31 | + ((mfxExtDecodeErrorReport *)extbuf)->ErrorTypes = 0; | ||
| 32 | + src.SetExtBuffer(extbuf); | ||
| 33 | + } | ||
| 34 | +#endif | ||
| 35 | + | ||
| 36 | for (;;) | ||
| 37 | { | ||
| 38 | if (m_FrameAllocator->FindFreeSurface() == -1) | ||
| 39 | diff --git a/_studio/shared/umc/codec/h265_dec/src/umc_h265_mfx_utils.cpp b/_studio/shared/umc/codec/h265_dec/src/umc_h265_mfx_utils.cpp | ||
| 40 | index 4cc5dd5..db876f4 100644 | ||
| 41 | --- a/_studio/shared/umc/codec/h265_dec/src/umc_h265_mfx_utils.cpp | ||
| 42 | +++ b/_studio/shared/umc/codec/h265_dec/src/umc_h265_mfx_utils.cpp | ||
| 43 | @@ -488,6 +488,13 @@ UMC::Status HeadersAnalyzer::DecodeHeader(UMC::MediaData * data, mfxBitstream *b | ||
| 44 | H265SeqParamSet* first_sps = 0; | ||
| 45 | notifier0<H265SeqParamSet> sps_guard(&H265Slice::DecrementReference); | ||
| 46 | |||
| 47 | +#if (MFX_VERSION >= 1025) | ||
| 48 | + mfxExtBuffer* extbuf = (bs) ? GetExtendedBuffer(bs->ExtParam, bs->NumExtParam, MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
| 49 | + | ||
| 50 | + if (extbuf) | ||
| 51 | + data->SetAuxInfo(extbuf, extbuf->BufferSz, extbuf->BufferId); | ||
| 52 | +#endif | ||
| 53 | + | ||
| 54 | UMC::Status umcRes = UMC::UMC_ERR_NOT_ENOUGH_DATA; | ||
| 55 | for ( ; data->GetDataSize() > 3; ) | ||
| 56 | { | ||
| 57 | diff --git a/_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp b/_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp | ||
| 58 | index 9062568..e220095 100755 | ||
| 59 | --- a/_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp | ||
| 60 | +++ b/_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp | ||
| 61 | @@ -47,6 +47,21 @@ | ||
| 62 | namespace UMC_HEVC_DECODER | ||
| 63 | { | ||
| 64 | |||
| 65 | +#if (MFX_VERSION >= 1025) | ||
| 66 | +inline void SetDecodeErrorTypes(NalUnitType nalUnit, mfxExtDecodeErrorReport *pDecodeErrorReport) | ||
| 67 | +{ | ||
| 68 | + if (!pDecodeErrorReport) | ||
| 69 | + return; | ||
| 70 | + | ||
| 71 | + switch (nalUnit) | ||
| 72 | + { | ||
| 73 | + case NAL_UT_SPS: pDecodeErrorReport->ErrorTypes |= MFX_ERROR_SPS; break; | ||
| 74 | + case NAL_UT_PPS: pDecodeErrorReport->ErrorTypes |= MFX_ERROR_PPS; break; | ||
| 75 | + default: break; | ||
| 76 | + }; | ||
| 77 | +} | ||
| 78 | +#endif | ||
| 79 | + | ||
| 80 | const uint32_t levelIndexArray[] = { | ||
| 81 | H265_LEVEL_1, | ||
| 82 | H265_LEVEL_2, | ||
| 83 | @@ -1662,6 +1677,15 @@ UMC::Status TaskSupplier_H265::ProcessNalUnit(UMC::MediaDataEx *nalUnit) | ||
| 84 | case NAL_UT_SPS: | ||
| 85 | case NAL_UT_PPS: | ||
| 86 | umcRes = DecodeHeaders(nalUnit); | ||
| 87 | + { | ||
| 88 | +#if (MFX_VERSION >= 1025) | ||
| 89 | + UMC::MediaData::AuxInfo* aux = (nalUnit) ? nalUnit->GetAuxInfo(MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
| 90 | + mfxExtDecodeErrorReport* pDecodeErrorReport = (aux) ? reinterpret_cast<mfxExtDecodeErrorReport*>(aux->ptr) : NULL; | ||
| 91 | + if (pDecodeErrorReport && umcRes == UMC::UMC_ERR_INVALID_STREAM) | ||
| 92 | + SetDecodeErrorTypes(unitType, pDecodeErrorReport); | ||
| 93 | +#endif | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | break; | ||
| 97 | |||
| 98 | case NAL_UT_SEI: | ||
| 99 | @@ -1703,6 +1727,11 @@ UMC::Status TaskSupplier_H265::AddOneFrame(UMC::MediaData * pSource) | ||
| 100 | |||
| 101 | UMC::MediaDataEx::_MediaDataEx* pMediaDataEx = nalUnit->GetExData(); | ||
| 102 | |||
| 103 | +#if (MFX_VERSION >= 1025) | ||
| 104 | + UMC::MediaData::AuxInfo* aux = (pSource) ? pSource->GetAuxInfo(MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
| 105 | + mfxExtDecodeErrorReport* pDecodeErrorReport = (aux) ? reinterpret_cast<mfxExtDecodeErrorReport*>(aux->ptr) : NULL; | ||
| 106 | +#endif | ||
| 107 | + | ||
| 108 | for (int32_t i = 0; i < (int32_t)pMediaDataEx->count; i++, pMediaDataEx->index ++) | ||
| 109 | { | ||
| 110 | if (m_checkCRAInsideResetProcess) | ||
| 111 | @@ -1755,7 +1784,13 @@ UMC::Status TaskSupplier_H265::AddOneFrame(UMC::MediaData * pSource) | ||
| 112 | case NAL_UT_VPS: | ||
| 113 | case NAL_UT_SPS: | ||
| 114 | case NAL_UT_PPS: | ||
| 115 | - DecodeHeaders(nalUnit); | ||
| 116 | + { | ||
| 117 | + UMC::Status sts = DecodeHeaders(nalUnit); | ||
| 118 | +#if (MFX_VERSION >= 1025) | ||
| 119 | + if (pDecodeErrorReport && sts == UMC::UMC_ERR_INVALID_STREAM) | ||
| 120 | + SetDecodeErrorTypes((NalUnitType)pMediaDataEx->values[i], pDecodeErrorReport); | ||
| 121 | +#endif | ||
| 122 | + } | ||
| 123 | break; | ||
| 124 | |||
| 125 | default: | ||
| 126 | @@ -1822,6 +1857,10 @@ UMC::Status TaskSupplier_H265::AddOneFrame(UMC::MediaData * pSource) | ||
| 127 | moveToSpsOffset = pSource->GetDataSize() + size + 3; | ||
| 128 | continue; | ||
| 129 | } | ||
| 130 | +#if (MFX_VERSION >= 1025) | ||
| 131 | + if (pDecodeErrorReport && umsRes == UMC::UMC_ERR_INVALID_STREAM) | ||
| 132 | + SetDecodeErrorTypes(nut, pDecodeErrorReport); | ||
| 133 | +#endif | ||
| 134 | |||
| 135 | return umsRes; | ||
| 136 | } | ||
| 137 | -- | ||
| 138 | 2.7.4 | ||
| 139 | |||
diff --git a/recipes-multimedia/mediasdk/files/0002-hevcd-Use-reinterpret_cast-for-style-alignment.patch b/recipes-multimedia/mediasdk/files/0002-hevcd-Use-reinterpret_cast-for-style-alignment.patch deleted file mode 100644 index 00a1ee28..00000000 --- a/recipes-multimedia/mediasdk/files/0002-hevcd-Use-reinterpret_cast-for-style-alignment.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | From d1938a90c7e09f6c901b7ef556bd3e8c33a257aa Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
| 3 | Date: Tue, 19 Jan 2021 15:31:24 +0800 | ||
| 4 | Subject: [PATCH 2/2] [hevcd] Use reinterpret_cast for style alignment. | ||
| 5 | |||
| 6 | Upstream-Status: Accepted [https://github.com/Intel-Media-SDK/MediaSDK/pull/2383] | ||
| 7 | Signed-off-by: Ung, Teng En <teng.en.ung@intel.com> | ||
| 8 | --- | ||
| 9 | _studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | 2 +- | ||
| 10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 11 | |||
| 12 | 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 | ||
| 13 | index f346e8c..3069f04 100644 | ||
| 14 | --- a/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
| 15 | +++ b/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
| 16 | @@ -1110,7 +1110,7 @@ mfxStatus VideoDECODEH265::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 * | ||
| 17 | |||
| 18 | if (extbuf) | ||
| 19 | { | ||
| 20 | - ((mfxExtDecodeErrorReport *)extbuf)->ErrorTypes = 0; | ||
| 21 | + reinterpret_cast<mfxExtDecodeErrorReport *>(extbuf)->ErrorTypes = 0; | ||
| 22 | src.SetExtBuffer(extbuf); | ||
| 23 | } | ||
| 24 | #endif | ||
| 25 | -- | ||
| 26 | 2.7.4 | ||
| 27 | |||
diff --git a/recipes-multimedia/mediasdk/intel-mediasdk_21.1.1.bb b/recipes-multimedia/mediasdk/intel-mediasdk_21.1.3.bb index de5fd61f..851cc07d 100644 --- a/recipes-multimedia/mediasdk/intel-mediasdk_21.1.1.bb +++ b/recipes-multimedia/mediasdk/intel-mediasdk_21.1.3.bb | |||
| @@ -33,11 +33,9 @@ PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland way | |||
| 33 | 33 | ||
| 34 | SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;nobranch=1;lfs=0 \ | 34 | SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;nobranch=1;lfs=0 \ |
| 35 | file://0001-FindITT.cmake-fix-detection-of-header-library.patch \ | 35 | file://0001-FindITT.cmake-fix-detection-of-header-library.patch \ |
| 36 | file://0001-hevcd-Enable-the-SPS-PPS-error-reporting.patch \ | ||
| 37 | file://0002-hevcd-Use-reinterpret_cast-for-style-alignment.patch \ | ||
| 38 | " | 36 | " |
| 39 | 37 | ||
| 40 | SRCREV = "c982e8cccc98c2ad0b3c6043cdbd6aaf7447cf54" | 38 | SRCREV = "03164a0b491651c210abd4549ca5275ac974d105" |
| 41 | S = "${WORKDIR}/git" | 39 | S = "${WORKDIR}/git" |
| 42 | 40 | ||
| 43 | UPSTREAM_CHECK_GITTAGREGEX = "^intel-mediasdk-(?P<pver>(\d+(\.\d+)+))$" | 41 | UPSTREAM_CHECK_GITTAGREGEX = "^intel-mediasdk-(?P<pver>(\d+(\.\d+)+))$" |
