diff --git a/source/Lib/CommonLib/ParameterSetManager.h b/source/Lib/CommonLib/ParameterSetManager.h index 6b58b2ecfda9bc47295b6193196cc83ea0e3be8b..497f315edc4195f1fb280c5db642cce3a95c4b2b 100644 --- a/source/Lib/CommonLib/ParameterSetManager.h +++ b/source/Lib/CommonLib/ParameterSetManager.h @@ -148,17 +148,18 @@ public: APS* existedAPS = m_paramsetMap[apsId].parameterSet; #if JVET_R0201_PREFIX_SUFFIX_APS_CLEANUP bool sameNalUnitType = aps->getHasPrefixNalUnitType() == existedAPS->getHasPrefixNalUnitType(); + bool samePU = aps->getLayerId() == existedAPS->getLayerId(); if( aps->getAPSType() == LMCS_APS ) { - CHECK( sameNalUnitType && aps->getReshaperAPSInfo() != existedAPS->getReshaperAPSInfo(), "All APS NAL units with a particular value of nal_unit_type, a particular value of aps_adaptation_parameter_set_id, and a particular value of aps_params_type within a PU shall have the same content" ); + CHECK( samePU && sameNalUnitType && aps->getReshaperAPSInfo() != existedAPS->getReshaperAPSInfo(), "All APS NAL units with a particular value of nal_unit_type, a particular value of aps_adaptation_parameter_set_id, and a particular value of aps_params_type within a PU shall have the same content" ); } else if( aps->getAPSType() == ALF_APS ) { - CHECK( sameNalUnitType && aps->getAlfAPSParam() != existedAPS->getAlfAPSParam(), "All APS NAL units with a particular value of nal_unit_type, a particular value of aps_adaptation_parameter_set_id, and a particular value of aps_params_type within a PU shall have the same content" ); + CHECK( samePU && sameNalUnitType && aps->getAlfAPSParam() != existedAPS->getAlfAPSParam(), "All APS NAL units with a particular value of nal_unit_type, a particular value of aps_adaptation_parameter_set_id, and a particular value of aps_params_type within a PU shall have the same content" ); } else if( aps->getAPSType() == SCALING_LIST_APS ) { - CHECK( sameNalUnitType && aps->getScalingList() != existedAPS->getScalingList(), "All APS NAL units with a particular value of nal_unit_type, a particular value of aps_adaptation_parameter_set_id, and a particular value of aps_params_type within a PU shall have the same content" ); + CHECK( samePU && sameNalUnitType && aps->getScalingList() != existedAPS->getScalingList(), "All APS NAL units with a particular value of nal_unit_type, a particular value of aps_adaptation_parameter_set_id, and a particular value of aps_params_type within a PU shall have the same content" ); } #else if( aps->getAPSType() == LMCS_APS )