diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 374d6be31194e0e722cf7c020970470e1db8b7be..810e0a32d3b3125c0943f5bafb8cf55269d9118f 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 { return m_eNalUnitType >= NAL_UNIT_CODED_SLICE_IDR_W_RADL && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_GDR && !m_pcPPS->getMixedNaluTypesInPicFlag(); } +#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 2fc546880a9fc272cd9bf47cd92eb6393d54c50b..4a304faa4159e6cd22286afa49cdea50c6efa287 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() && m_bFirstSliceInPicture ) { m_clvssSPSid[layerId] = pps->getSPSId(); }