diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 8dbe0831c90b5a97c201738754448bf8c05d5cef..5e4e62c280753180a5ed6e339655d9832d0d575e 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -50,6 +50,9 @@ #include <assert.h> #include <cassert> + +#define JVET_P0097_REMOVE_VPS_DEP_NONSCALABLE_LAYER 1 // Removing dependencies on VPS from the decoding process of a non-scalable bitstream + #define JVET_Q0420_PPS_CHROMA_TOOL_FLAG 1 // JVET-Q0420: add pps_chroma_tool_offsets_present_flag in PPS #define JVET_Q0172_CHROMA_FORMAT_BITDEPTH_CONSTRAINT 1 //JVET-Q0172: Disallow differing chroma format and different bit depths for cross-layer prediction. diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index f55adff33e08115916be61498cabf8727a90156c..30aee70633e44dfb2f9fedfd8ddb533a50aebd38 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -1356,6 +1356,19 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl if (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_GDR) CHECK(nalu.m_temporalId != 0, "Current GDR picture has TemporalId not equal to 0"); +#if JVET_P0097_REMOVE_VPS_DEP_NONSCALABLE_LAYER + { + PPS *pps = m_parameterSetManager.getPPS(m_picHeader.getPPSId()); + CHECK(pps == 0, "No PPS present"); + SPS *sps = m_parameterSetManager.getSPS(pps->getSPSId()); + CHECK(sps == 0, "No SPS present"); + if ((sps->getVPSId() == 0) && (m_prevLayerID != MAX_INT)) + { + CHECK(m_prevLayerID != nalu.m_nuhLayerId, "All VCL NAL unit in the CVS shall have the same value of nuh_layer_id when sps_video_parameter_set_id is equal to 0" ); + } + } +#endif + m_HLSReader.setBitstream( &nalu.getBitstream() ); #if JVET_Q0795_CCALF m_apcSlicePilot->m_ccAlfFilterParam = m_cALF.getCcAlfFilterParam();