From 01cfc99a8f960917433a8a46b41bb4febb5b1993 Mon Sep 17 00:00:00 2001 From: Lim Siew Hoon Date: Tue, 6 Apr 2021 21:20:25 +0800 Subject: intel-mediasdk: upgrade 21.1.1 -> 21.1.3 Drops patches already merged: * 0001-hevcd-Enable-the-SPS-PPS-error-reporting.patch * 0002-hevcd-Use-reinterpret_cast-for-style-alignment.patch Signed-off-by: Lim Siew Hoon Signed-off-by: Anuj Mittal --- ...-hevcd-Enable-the-SPS-PPS-error-reporting.patch | 139 --------------------- ...-Use-reinterpret_cast-for-style-alignment.patch | 27 ---- .../mediasdk/intel-mediasdk_21.1.1.bb | 62 --------- .../mediasdk/intel-mediasdk_21.1.3.bb | 60 +++++++++ 4 files changed, 60 insertions(+), 228 deletions(-) delete mode 100644 recipes-multimedia/mediasdk/files/0001-hevcd-Enable-the-SPS-PPS-error-reporting.patch delete mode 100644 recipes-multimedia/mediasdk/files/0002-hevcd-Use-reinterpret_cast-for-style-alignment.patch delete mode 100644 recipes-multimedia/mediasdk/intel-mediasdk_21.1.1.bb create mode 100644 recipes-multimedia/mediasdk/intel-mediasdk_21.1.3.bb (limited to 'recipes-multimedia') 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 @@ -From ee1b87d107833e8803567cac438f55bde72d8e02 Mon Sep 17 00:00:00 2001 -From: "Ung, Teng En" -Date: Mon, 30 Mar 2020 13:40:39 +0000 -Subject: [PATCH 1/2] [hevcd] Enable the SPS/PPS error reporting - -Issue:N/A -Test:sample_decode with mfxExtDecodeErrorReport - -Upstream-Status: Accepted [https://github.com/Intel-Media-SDK/MediaSDK/pull/2383] - -Signed-off-by: Ung, Teng En ---- - .../decode/h265/src/mfx_h265_dec_decode.cpp | 10 ++++++ - .../umc/codec/h265_dec/src/umc_h265_mfx_utils.cpp | 7 ++++ - .../codec/h265_dec/src/umc_h265_task_supplier.cpp | 41 +++++++++++++++++++++- - 3 files changed, 57 insertions(+), 1 deletion(-) - -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 -index 4ae164f..f346e8c 100644 ---- a/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp -+++ b/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp -@@ -1105,6 +1105,16 @@ mfxStatus VideoDECODEH265::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 * - - MFXMediaDataAdapter src(bs); - -+#if (MFX_VERSION >= 1025) -+ mfxExtBuffer* extbuf = (bs) ? GetExtendedBuffer(bs->ExtParam, bs->NumExtParam, MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; -+ -+ if (extbuf) -+ { -+ ((mfxExtDecodeErrorReport *)extbuf)->ErrorTypes = 0; -+ src.SetExtBuffer(extbuf); -+ } -+#endif -+ - for (;;) - { - if (m_FrameAllocator->FindFreeSurface() == -1) -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 -index 4cc5dd5..db876f4 100644 ---- 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 -@@ -488,6 +488,13 @@ UMC::Status HeadersAnalyzer::DecodeHeader(UMC::MediaData * data, mfxBitstream *b - H265SeqParamSet* first_sps = 0; - notifier0 sps_guard(&H265Slice::DecrementReference); - -+#if (MFX_VERSION >= 1025) -+ mfxExtBuffer* extbuf = (bs) ? GetExtendedBuffer(bs->ExtParam, bs->NumExtParam, MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; -+ -+ if (extbuf) -+ data->SetAuxInfo(extbuf, extbuf->BufferSz, extbuf->BufferId); -+#endif -+ - UMC::Status umcRes = UMC::UMC_ERR_NOT_ENOUGH_DATA; - for ( ; data->GetDataSize() > 3; ) - { -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 -index 9062568..e220095 100755 ---- 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 -@@ -47,6 +47,21 @@ - namespace UMC_HEVC_DECODER - { - -+#if (MFX_VERSION >= 1025) -+inline void SetDecodeErrorTypes(NalUnitType nalUnit, mfxExtDecodeErrorReport *pDecodeErrorReport) -+{ -+ if (!pDecodeErrorReport) -+ return; -+ -+ switch (nalUnit) -+ { -+ case NAL_UT_SPS: pDecodeErrorReport->ErrorTypes |= MFX_ERROR_SPS; break; -+ case NAL_UT_PPS: pDecodeErrorReport->ErrorTypes |= MFX_ERROR_PPS; break; -+ default: break; -+ }; -+} -+#endif -+ - const uint32_t levelIndexArray[] = { - H265_LEVEL_1, - H265_LEVEL_2, -@@ -1662,6 +1677,15 @@ UMC::Status TaskSupplier_H265::ProcessNalUnit(UMC::MediaDataEx *nalUnit) - case NAL_UT_SPS: - case NAL_UT_PPS: - umcRes = DecodeHeaders(nalUnit); -+ { -+#if (MFX_VERSION >= 1025) -+ UMC::MediaData::AuxInfo* aux = (nalUnit) ? nalUnit->GetAuxInfo(MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; -+ mfxExtDecodeErrorReport* pDecodeErrorReport = (aux) ? reinterpret_cast(aux->ptr) : NULL; -+ if (pDecodeErrorReport && umcRes == UMC::UMC_ERR_INVALID_STREAM) -+ SetDecodeErrorTypes(unitType, pDecodeErrorReport); -+#endif -+ } -+ - break; - - case NAL_UT_SEI: -@@ -1703,6 +1727,11 @@ UMC::Status TaskSupplier_H265::AddOneFrame(UMC::MediaData * pSource) - - UMC::MediaDataEx::_MediaDataEx* pMediaDataEx = nalUnit->GetExData(); - -+#if (MFX_VERSION >= 1025) -+ UMC::MediaData::AuxInfo* aux = (pSource) ? pSource->GetAuxInfo(MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; -+ mfxExtDecodeErrorReport* pDecodeErrorReport = (aux) ? reinterpret_cast(aux->ptr) : NULL; -+#endif -+ - for (int32_t i = 0; i < (int32_t)pMediaDataEx->count; i++, pMediaDataEx->index ++) - { - if (m_checkCRAInsideResetProcess) -@@ -1755,7 +1784,13 @@ UMC::Status TaskSupplier_H265::AddOneFrame(UMC::MediaData * pSource) - case NAL_UT_VPS: - case NAL_UT_SPS: - case NAL_UT_PPS: -- DecodeHeaders(nalUnit); -+ { -+ UMC::Status sts = DecodeHeaders(nalUnit); -+#if (MFX_VERSION >= 1025) -+ if (pDecodeErrorReport && sts == UMC::UMC_ERR_INVALID_STREAM) -+ SetDecodeErrorTypes((NalUnitType)pMediaDataEx->values[i], pDecodeErrorReport); -+#endif -+ } - break; - - default: -@@ -1822,6 +1857,10 @@ UMC::Status TaskSupplier_H265::AddOneFrame(UMC::MediaData * pSource) - moveToSpsOffset = pSource->GetDataSize() + size + 3; - continue; - } -+#if (MFX_VERSION >= 1025) -+ if (pDecodeErrorReport && umsRes == UMC::UMC_ERR_INVALID_STREAM) -+ SetDecodeErrorTypes(nut, pDecodeErrorReport); -+#endif - - return umsRes; - } --- -2.7.4 - 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 @@ -From d1938a90c7e09f6c901b7ef556bd3e8c33a257aa Mon Sep 17 00:00:00 2001 -From: "Ung, Teng En" -Date: Tue, 19 Jan 2021 15:31:24 +0800 -Subject: [PATCH 2/2] [hevcd] Use reinterpret_cast for style alignment. - -Upstream-Status: Accepted [https://github.com/Intel-Media-SDK/MediaSDK/pull/2383] -Signed-off-by: Ung, Teng En ---- - _studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -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 -index f346e8c..3069f04 100644 ---- a/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp -+++ b/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp -@@ -1110,7 +1110,7 @@ mfxStatus VideoDECODEH265::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 * - - if (extbuf) - { -- ((mfxExtDecodeErrorReport *)extbuf)->ErrorTypes = 0; -+ reinterpret_cast(extbuf)->ErrorTypes = 0; - src.SetExtBuffer(extbuf); - } - #endif --- -2.7.4 - diff --git a/recipes-multimedia/mediasdk/intel-mediasdk_21.1.1.bb b/recipes-multimedia/mediasdk/intel-mediasdk_21.1.1.bb deleted file mode 100644 index de5fd61f..00000000 --- a/recipes-multimedia/mediasdk/intel-mediasdk_21.1.1.bb +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY = "Intel(R) Media SDK for hardware accelerated media processing" -DESCRIPTION = "Intel(R) Media SDK provides an API to access hardware-accelerated \ -video decode, encode and filtering on IntelĀ® platforms with integrated graphics." - -HOMEPAGE = "https://github.com/Intel-Media-SDK/MediaSDK" -BUGTRACKER = "https://github.com/Intel-Media-SDK/MediaSDK/issues" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3cb331af679cd8f968bf799a9c55b46e" - -CVE_DETAILS = "intel:media_sdk" - -# Only for 64 bit until media-driver issues aren't fixed -COMPATIBLE_HOST = '(x86_64).*-linux' -COMPATIBLE_HOST_x86-x32 = "null" - -inherit features_check -REQUIRED_DISTRO_FEATURES = "opengl" - -DEPENDS += "libdrm libva intel-media-driver" - -PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dri3", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)} \ - samples \ - itt \ - " - -PACKAGECONFIG[dri3] = "-DENABLE_X11_DRI3=ON, -DENABLE_X11_DRI3=OFF" -PACKAGECONFIG[itt] = "-DENABLE_ITT=ON, -DENABLE_ITT=OFF, itt" -PACKAGECONFIG[opencl] = "-DENABLE_OPENCL=ON, -DENABLE_OPENCL=OFF, ocl-icd opencl-clhpp opencl-headers" -PACKAGECONFIG[samples] = "-DBUILD_SAMPLES=ON, -DBUILD_SAMPLES=OFF" -PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland wayland-native" - -SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;nobranch=1;lfs=0 \ - file://0001-FindITT.cmake-fix-detection-of-header-library.patch \ - file://0001-hevcd-Enable-the-SPS-PPS-error-reporting.patch \ - file://0002-hevcd-Use-reinterpret_cast-for-style-alignment.patch \ - " - -SRCREV = "c982e8cccc98c2ad0b3c6043cdbd6aaf7447cf54" -S = "${WORKDIR}/git" - -UPSTREAM_CHECK_GITTAGREGEX = "^intel-mediasdk-(?P(\d+(\.\d+)+))$" - -inherit cmake pkgconfig - -EXTRA_OECMAKE += "-DMFX_INCLUDE=${S}/api/include" - -do_install_append() { - mv ${D}${datadir}/mfx/samples ${D}${libdir}/mfx/samples -} - -PACKAGE_BEFORE_PN = " ${PN}-samples" - -FILES_${PN} += " \ - ${libdir}/mfx \ - ${datadir}/mfx/plugins.cfg \ - " - -FILES_${PN}-samples = "${libdir}/mfx/samples" - -INSANE_SKIP_${PN}-samples += "staticdev" diff --git a/recipes-multimedia/mediasdk/intel-mediasdk_21.1.3.bb b/recipes-multimedia/mediasdk/intel-mediasdk_21.1.3.bb new file mode 100644 index 00000000..851cc07d --- /dev/null +++ b/recipes-multimedia/mediasdk/intel-mediasdk_21.1.3.bb @@ -0,0 +1,60 @@ +SUMMARY = "Intel(R) Media SDK for hardware accelerated media processing" +DESCRIPTION = "Intel(R) Media SDK provides an API to access hardware-accelerated \ +video decode, encode and filtering on IntelĀ® platforms with integrated graphics." + +HOMEPAGE = "https://github.com/Intel-Media-SDK/MediaSDK" +BUGTRACKER = "https://github.com/Intel-Media-SDK/MediaSDK/issues" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3cb331af679cd8f968bf799a9c55b46e" + +CVE_DETAILS = "intel:media_sdk" + +# Only for 64 bit until media-driver issues aren't fixed +COMPATIBLE_HOST = '(x86_64).*-linux' +COMPATIBLE_HOST_x86-x32 = "null" + +inherit features_check +REQUIRED_DISTRO_FEATURES = "opengl" + +DEPENDS += "libdrm libva intel-media-driver" + +PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dri3", "", d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)} \ + samples \ + itt \ + " + +PACKAGECONFIG[dri3] = "-DENABLE_X11_DRI3=ON, -DENABLE_X11_DRI3=OFF" +PACKAGECONFIG[itt] = "-DENABLE_ITT=ON, -DENABLE_ITT=OFF, itt" +PACKAGECONFIG[opencl] = "-DENABLE_OPENCL=ON, -DENABLE_OPENCL=OFF, ocl-icd opencl-clhpp opencl-headers" +PACKAGECONFIG[samples] = "-DBUILD_SAMPLES=ON, -DBUILD_SAMPLES=OFF" +PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland wayland-native" + +SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;nobranch=1;lfs=0 \ + file://0001-FindITT.cmake-fix-detection-of-header-library.patch \ + " + +SRCREV = "03164a0b491651c210abd4549ca5275ac974d105" +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_GITTAGREGEX = "^intel-mediasdk-(?P(\d+(\.\d+)+))$" + +inherit cmake pkgconfig + +EXTRA_OECMAKE += "-DMFX_INCLUDE=${S}/api/include" + +do_install_append() { + mv ${D}${datadir}/mfx/samples ${D}${libdir}/mfx/samples +} + +PACKAGE_BEFORE_PN = " ${PN}-samples" + +FILES_${PN} += " \ + ${libdir}/mfx \ + ${datadir}/mfx/plugins.cfg \ + " + +FILES_${PN}-samples = "${libdir}/mfx/samples" + +INSANE_SKIP_${PN}-samples += "staticdev" -- cgit v1.2.3-54-g00ecf