From 7b240654615a8de9ce724bab3408f464123123fb Mon Sep 17 00:00:00 2001 From: Frank Bossen <fbossen@gmail.com> Date: Fri, 17 Jan 2020 15:28:58 +0100 Subject: [PATCH] remove macro JVET_P0205_VPS_ID_0 --- source/Lib/CommonLib/Slice.cpp | 8 -------- source/Lib/CommonLib/Slice.h | 8 -------- source/Lib/CommonLib/TypeDef.h | 1 - source/Lib/DecoderLib/VLCReader.cpp | 6 ------ source/Lib/EncoderLib/EncGOP.cpp | 4 ---- source/Lib/EncoderLib/VLCWriter.cpp | 2 -- 6 files changed, 29 deletions(-) diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 7c87c3a8e..d27efa018 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -1846,9 +1846,7 @@ SPSRExt::SPSRExt() SPS::SPS() : m_SPSId ( 0) , m_decodingParameterSetId ( 0 ) -#if JVET_P0205_VPS_ID_0 , m_VPSId ( 0 ) -#endif , m_affineAmvrEnabledFlag ( false ) , m_DMVR ( false ) , m_MMVD ( false ) @@ -3214,14 +3212,10 @@ ParameterSetManager::ParameterSetManager() , m_ppsMap(MAX_NUM_PPS) , m_apsMap(MAX_NUM_APS * MAX_NUM_APS_TYPE) , m_dpsMap(MAX_NUM_DPS) -#if JVET_P0205_VPS_ID_0 , m_vpsMap(MAX_NUM_VPS) -#endif , m_activeDPSId(-1) , m_activeSPSId(-1) -#if JVET_P0205_VPS_ID_0 , m_activeVPSId(-1) -#endif { } @@ -3302,7 +3296,6 @@ bool ParameterSetManager::activatePPS(int ppsId, bool isIRAP) } } -#if JVET_P0205_VPS_ID_0 int vpsId = sps->getVPSId(); if(vpsId != 0) { @@ -3330,7 +3323,6 @@ bool ParameterSetManager::activatePPS(int ppsId, bool isIRAP) m_vpsMap.clear(); #endif } -#endif m_spsMap.clear(); m_spsMap.setActive(spsId); diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index f881a09f4..bb2f0a00b 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -1033,9 +1033,7 @@ class SPS private: int m_SPSId; int m_decodingParameterSetId; -#if JVET_P0205_VPS_ID_0 int m_VPSId; -#endif bool m_affineAmvrEnabledFlag; bool m_DMVR; @@ -1211,10 +1209,8 @@ public: void setSPSId(int i) { m_SPSId = i; } void setDecodingParameterSetId(int val) { m_decodingParameterSetId = val; } int getDecodingParameterSetId() const { return m_decodingParameterSetId; } -#if JVET_P0205_VPS_ID_0 int getVPSId() const { return m_VPSId; } void setVPSId(int i) { m_VPSId = i; } -#endif ChromaFormat getChromaFormatIdc () const { return m_chromaFormatIdc; } void setChromaFormatIdc (ChromaFormat i) { m_chromaFormatIdc = i; } @@ -3011,17 +3007,13 @@ protected: ParameterSetMap<PPS> m_ppsMap; ParameterSetMap<APS> m_apsMap; ParameterSetMap<DPS> m_dpsMap; -#if JVET_P0205_VPS_ID_0 ParameterSetMap<VPS> m_vpsMap; -#endif APS* m_apss[ALF_CTB_MAX_NUM_APS]; int m_activeDPSId; // -1 for nothing active int m_activeSPSId; // -1 for nothing active -#if JVET_P0205_VPS_ID_0 int m_activeVPSId; // -1 for nothing active -#endif }; class PreCalcValues diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 6634d602c..ae5050776 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -65,7 +65,6 @@ -#define JVET_P0205_VPS_ID_0 1 // JVET-P0205: VPS ID zero in SPS means no VPS in bitstream #define JVET_P1006_PICTURE_HEADER 1 // JVET-P1006: Add picture header and related syntax changes diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index ccef36feb..c2b5fa665 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1097,9 +1097,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) xTraceSPSHeader (); #endif READ_CODE( 4, uiCode, "sps_decoding_parameter_set_id"); pcSPS->setDecodingParameterSetId( uiCode ); -#if JVET_P0205_VPS_ID_0 READ_CODE( 4, uiCode, "sps_video_parameter_set_id" ); pcSPS->setVPSId( uiCode ); -#endif READ_CODE(3, uiCode, "sps_max_sub_layers_minus1"); pcSPS->setMaxTLayers (uiCode + 1); CHECK(uiCode > 6, "Invalid maximum number of T-layer signalled"); READ_CODE(5, uiCode, "sps_reserved_zero_5bits"); @@ -1752,13 +1750,9 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) #endif uint32_t uiCode; -#if JVET_P0205_VPS_ID_0 READ_CODE(4, uiCode, "vps_video_parameter_set_id"); CHECK( uiCode == 0, "vps_video_parameter_set_id equal to zero is reserved and shall not be used in a bitstream" ); pcVPS->setVPSId(uiCode); -#else - READ_CODE(4, uiCode, "vps_video_parameter_set_id"); pcVPS->setVPSId(uiCode); -#endif READ_CODE(6, uiCode, "vps_max_layers_minus1"); pcVPS->setMaxLayers(uiCode + 1); CHECK(uiCode + 1 > MAX_VPS_LAYERS, "Invalid code"); if (pcVPS->getMaxLayers() - 1 == 0) diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index b22ea5746..ddb95766f 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -380,14 +380,10 @@ int EncGOP::xWriteParameterSets( AccessUnit &accessUnit, Slice *slice, const boo if( bSeqFirst ) { -#if JVET_P0205_VPS_ID_0 if (slice->getSPS()->getVPSId() != 0) { actualTotalBits += xWriteVPS(accessUnit, m_pcEncLib->getVPS()); } -#else - actualTotalBits += xWriteVPS( accessUnit, m_pcEncLib->getVPS() ); -#endif actualTotalBits += xWriteDPS( accessUnit, m_pcEncLib->getDPS() ); if( m_pcEncLib->SPSNeedsWriting( slice->getSPS()->getSPSId() ) ) // Note this assumes that all changes to the SPS are made at the EncLib level prior to picture creation (EncLib::xGetNewPicBuffer). diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index d10b320df..4255929c5 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -734,9 +734,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) xTraceSPSHeader (); #endif WRITE_CODE( pcSPS->getDecodingParameterSetId (), 4, "sps_decoding_parameter_set_id" ); -#if JVET_P0205_VPS_ID_0 WRITE_CODE( pcSPS->getVPSId(), 4, "sps_video_parameter_set_id" ); -#endif CHECK(pcSPS->getMaxTLayers() == 0, "Maximum number of temporal sub-layers is '0'"); WRITE_CODE(pcSPS->getMaxTLayers() - 1, 3, "sps_max_sub_layers_minus1"); -- GitLab