From f96510b7376c891b0ac10ca8a304ddb4f0d10e63 Mon Sep 17 00:00:00 2001 From: Vadim Seregin <vseregin@qti.qualcomm.com> Date: Fri, 7 Feb 2020 08:29:42 -0800 Subject: [PATCH] add GDR NUT to CLVSS PU --- source/Lib/CommonLib/Slice.h | 3 +++ source/Lib/DecoderLib/DecLib.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 374d6be31..4d0f4aac3 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -2733,6 +2733,9 @@ public: bool getRapPicFlag() const; bool getIdrPicFlag() const { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } bool isIRAP() const { return (getNalUnitType() >= NAL_UNIT_CODED_SLICE_IDR_W_RADL) && (getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA); } +#if SPS_ID_CHECK + bool isClvssPu( const bool mixedNaluTypesInPicFlag ) const { return m_eNalUnitType >= NAL_UNIT_CODED_SLICE_IDR_W_RADL && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_GDR && !mixedNaluTypesInPicFlag; } +#endif bool isIDRorBLA() const { return (getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL) || (getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP); } void checkCRA(const ReferencePictureList *pRPL0, const ReferencePictureList *pRPL1, int& pocCRA, NalUnitType& associatedIRAPType, PicList& rcListPic); void checkSTSA(PicList& rcListPic); diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 2fc546880..2bbf5b6c3 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -1254,7 +1254,7 @@ void DecLib::xActivateParameterSets( const int layerId ) #if SPS_ID_CHECK static std::unordered_map<int, int> m_clvssSPSid; - if( slice->isIRAP() && m_bFirstSliceInPicture && !pps->getMixedNaluTypesInPicFlag() ) + if( slice->isClvssPu( pps->getMixedNaluTypesInPicFlag() ) && m_bFirstSliceInPicture ) { m_clvssSPSid[layerId] = pps->getSPSId(); } -- GitLab