diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index b1621268cac1b73badc871d9cb65ae786d7b9392..08acbb2cb031b93e0a7d9f22c23c02232aeecf0b 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -201,6 +201,12 @@ void EncApp::xInitLibCfg() ptls[0].setLevelIdc ( m_level ); ptls[0].setProfileIdc ( m_profile); ptls[0].setTierFlag ( m_levelTier ); +#if JVET_S0138_GCI_PTL + ptls[0].setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlag); + ptls[0].setMultiLayerEnabledFlag ( m_multiLayerEnabledFlag); + CHECK( (m_profile == Profile::MAIN_10 || m_profile == Profile::MAIN_444_10) && m_multiLayerEnabledFlag, "ptl_multilayer_enabled_flag shall be equal to 0 for Main 10 and Main 10 4:4:4 profiles"); + CHECK( !m_multiLayerEnabledFlag && m_maxLayers > 1, "There is only one layer in the CVS when ptl_multilayer_enabled_flag equal to 0"); +#endif ptls[0].setNumSubProfile ( m_numSubProfile ); for (int i = 0; i < m_numSubProfile; i++) { @@ -214,6 +220,10 @@ void EncApp::xInitLibCfg() vps.setVPSExtensionFlag ( false ); m_cEncLib.setProfile ( m_profile); m_cEncLib.setLevel ( m_levelTier, m_level); +#if JVET_S0138_GCI_PTL + m_cEncLib.setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlag); + m_cEncLib.setMultiLayerEnabledFlag ( m_multiLayerEnabledFlag); +#endif m_cEncLib.setNumSubProfile ( m_numSubProfile ); for (int i = 0; i < m_numSubProfile; i++) { @@ -252,12 +262,16 @@ void EncApp::xInitLibCfg() m_cEncLib.setPicHeaderInSliceHeaderConstraintFlag(m_picHeaderInSliceHeaderConstraintFlag); m_cEncLib.setOneSlicePerPicConstraintFlag(m_oneSlicePerPicConstraintFlag); m_cEncLib.setOneSubpicPerPicConstraintFlag(m_oneSubpicPerPicConstraintFlag); +#if !JVET_S0138_GCI_PTL m_cEncLib.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag); +#endif m_cEncLib.setOnePictureOnlyConstraintFlag(m_onePictureOnlyConstraintFlag); m_cEncLib.setIntraOnlyConstraintFlag(m_intraOnlyConstraintFlag); m_cEncLib.setNoIdrConstraintFlag(m_noIdrConstraintFlag); m_cEncLib.setNoGdrConstraintFlag(m_noGdrConstraintFlag); +#if !JVET_S0138_GCI_PTL m_cEncLib.setSingleLayerConstraintFlag(m_singleLayerConstraintFlag); +#endif m_cEncLib.setAllLayersIndependentConstraintFlag(m_allLayersIndependentConstraintFlag); m_cEncLib.setNoQpDeltaConstraintFlag(m_bNoQpDeltaConstraintFlag); @@ -416,14 +430,18 @@ void EncApp::xInitLibCfg() { m_cEncLib.setNonPackedConstraintFlag(false); m_cEncLib.setNonProjectedConstraintFlag(false); +#if !JVET_S0138_GCI_PTL m_cEncLib.setSingleLayerConstraintFlag(false); +#endif m_cEncLib.setAllLayersIndependentConstraintFlag(false); m_cEncLib.setNoResChangeInClvsConstraintFlag(false); m_cEncLib.setOneTilePerPicConstraintFlag(false); m_cEncLib.setPicHeaderInSliceHeaderConstraintFlag(false); m_cEncLib.setOneSlicePerPicConstraintFlag(false); m_cEncLib.setOneSubpicPerPicConstraintFlag(false); +#if !JVET_S0138_GCI_PTL m_cEncLib.setFrameOnlyConstraintFlag(false); +#endif m_cEncLib.setOnePictureOnlyConstraintFlag(false); m_cEncLib.setIntraOnlyConstraintFlag(false); m_cEncLib.setMaxBitDepthConstraintIdc(16); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 1e4dd2c9c0ee26b675b689d2d17b703d155a7d18..ad4cec8b29be7cb1e0dcbdf20b1773cb4b6398bd 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -776,6 +776,10 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("Profile", extendedProfile, ExtendedProfileName::NONE, "Profile name to use for encoding. Use main_10, main_10_still_picture, main_444_10, main_444_10_still_picture, auto, or none") ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1, or none") ("Tier", m_levelTier, Level::MAIN, "Tier to use for interpretation of --Level (main or high only)") +#if JVET_S0138_GCI_PTL + ("FrameOnlyConstraintFlag", m_frameOnlyConstraintFlag, true, "Bitstream contains only frames") + ("MultiLayerEnabledFlag", m_multiLayerEnabledFlag, false, "Bitstream might contain more than one layer") +#endif ("SubProfile", cfg_SubProfile, cfg_SubProfile, "Sub-profile idc") ("EnableDecodingCapabilityInformation", m_DCIEnabled, false, "Enables writing of Decoding Capability Information") ("MaxBitDepthConstraint", m_bitDepthConstraint, 0u, "Bit depth to use for profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") @@ -848,8 +852,10 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #if JVET_S0050_GCI ("VirtualBoundaryConstraintFlag", m_noVirtualBoundaryConstraintFlag, false, "Indicate that virtual boundary is deactivated") #endif +#if !JVET_S0138_GCI_PTL ("SingleLayerConstraintFlag", m_singleLayerConstraintFlag, false, "Indicate that the bitstream contains only one layer") ("FrameOnlyConstraintFlag", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") +#endif #if !JVET_S0266_VUI_length ("NonPackedSourceConstraintFlag", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing") ("NonProjectedConstraintFlag", m_nonProjectedConstraintFlag, false, "Indicate that the bitstream contains projection SEI messages") diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index f8f54ee5d261882533724cc4182f2384f69c6a60..756422469db635f1b493f6c0e5cafab2aa6fc1e6 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -137,7 +137,9 @@ protected: bool m_bIntraOnlyConstraintFlag; uint32_t m_maxBitDepthConstraintIdc; int m_maxChromaFormatConstraintIdc; +#if !JVET_S0138_GCI_PTL bool m_singleLayerConstraintFlag; +#endif bool m_allLayersIndependentConstraintFlag; bool m_noMrlConstraintFlag; bool m_noIspConstraintFlag; @@ -198,6 +200,10 @@ protected: Profile::Name m_profile; Level::Tier m_levelTier; Level::Name m_level; +#if JVET_S0138_GCI_PTL + bool m_frameOnlyConstraintFlag; + bool m_multiLayerEnabledFlag; +#endif std::vector<uint32_t> m_subProfile; uint8_t m_numSubProfile; @@ -212,8 +218,9 @@ protected: bool m_picHeaderInSliceHeaderConstraintFlag; bool m_oneSlicePerPicConstraintFlag; bool m_oneSubpicPerPicConstraintFlag; +#if !JVET_S0138_GCI_PTL bool m_frameOnlyConstraintFlag; - +#endif // coding structure int m_iIntraPeriod; ///< period of I-slice (random access period) int m_iDecodingRefreshType; ///< random access type diff --git a/source/Lib/CommonLib/ParameterSetManager.cpp b/source/Lib/CommonLib/ParameterSetManager.cpp index 48118e39077b4c5be71f1539508cae14b73c952e..38975139132897137ecb5db5b71c53ff095f14a3 100644 --- a/source/Lib/CommonLib/ParameterSetManager.cpp +++ b/source/Lib/CommonLib/ParameterSetManager.cpp @@ -151,6 +151,10 @@ ProfileTierLevel::ProfileTierLevel() , m_numSubProfile(0) , m_subProfileIdc(0) , m_levelIdc (Level::NONE) +#if JVET_S0138_GCI_PTL + , m_frameOnlyConstraintFlag(1) + , m_multiLayerEnabledFlag(0) +#endif { ::memset(m_subLayerLevelPresentFlag, 0, sizeof(m_subLayerLevelPresentFlag )); ::memset(m_subLayerLevelIdc, Level::NONE, sizeof(m_subLayerLevelIdc )); diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index d7a57d2ffcf0ebf00b8c924d76b2f5c3921e6e28..4e92c89050f24f016b82f400e0856a4fef541692 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -4517,14 +4517,17 @@ bool operator == (const ConstraintInfo& op1, const ConstraintInfo& o #if !JVET_S0266_VUI_length if( op1.m_nonPackedConstraintFlag != op2.m_nonPackedConstraintFlag ) return false; #endif +#if !JVET_S0138_GCI_PTL if( op1.m_frameOnlyConstraintFlag != op2.m_frameOnlyConstraintFlag ) return false; +#endif if( op1.m_intraOnlyConstraintFlag != op2.m_intraOnlyConstraintFlag ) return false; if( op1.m_maxBitDepthConstraintIdc != op2.m_maxBitDepthConstraintIdc ) return false; if( op1.m_maxChromaFormatConstraintIdc != op2.m_maxChromaFormatConstraintIdc ) return false; if( op1.m_onePictureOnlyConstraintFlag != op2.m_onePictureOnlyConstraintFlag ) return false; if( op1.m_lowerBitRateConstraintFlag != op2.m_lowerBitRateConstraintFlag ) return false; - +#if !JVET_S0138_GCI_PTL if (op1.m_singleLayerConstraintFlag != op2.m_singleLayerConstraintFlag ) return false; +#endif if (op1.m_allLayersIndependentConstraintFlag != op2.m_allLayersIndependentConstraintFlag ) return false; if (op1.m_noMrlConstraintFlag != op2.m_noMrlConstraintFlag ) return false; if (op1.m_noIspConstraintFlag != op2.m_noIspConstraintFlag ) return false; @@ -4586,6 +4589,10 @@ bool operator == (const ProfileTierLevel& op1, const ProfileTierLeve if (op1.m_profileIdc != op2.m_profileIdc) return false; if (op1.m_numSubProfile != op2.m_numSubProfile) return false; if (op1.m_levelIdc != op2.m_levelIdc) return false; +#if JVET_S0138_GCI_PTL + if (op1.m_frameOnlyConstraintFlag != op2.m_frameOnlyConstraintFlag) return false; + if (op1.m_multiLayerEnabledFlag != op2.m_multiLayerEnabledFlag) return false; +#endif if (op1.m_constraintInfo != op2.m_constraintInfo) return false; if (op1.m_subProfileIdc != op2.m_subProfileIdc) return false; diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index ef6a5d6f9faf720bd0cbf33d1e407683b65fa326..fe6dad15a19c96c893090a227434872317de5a92 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -247,14 +247,17 @@ class ConstraintInfo bool m_picHeaderInSliceHeaderConstraintFlag; bool m_oneSlicePerPicConstraintFlag; bool m_oneSubpicPerPicConstraintFlag; +#if !JVET_S0138_GCI_PTL bool m_frameOnlyConstraintFlag; +#endif bool m_intraOnlyConstraintFlag; uint32_t m_maxBitDepthConstraintIdc; int m_maxChromaFormatConstraintIdc; bool m_onePictureOnlyConstraintFlag; bool m_lowerBitRateConstraintFlag; - +#if !JVET_S0138_GCI_PTL bool m_singleLayerConstraintFlag; +#endif bool m_allLayersIndependentConstraintFlag; bool m_noMrlConstraintFlag; bool m_noIspConstraintFlag; @@ -330,7 +333,9 @@ public: , m_picHeaderInSliceHeaderConstraintFlag(false) , m_oneSlicePerPicConstraintFlag(false) , m_oneSubpicPerPicConstraintFlag(false) +#if !JVET_S0138_GCI_PTL , m_frameOnlyConstraintFlag (false) +#endif , m_intraOnlyConstraintFlag (false) #if JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT , m_maxBitDepthConstraintIdc ( 16) @@ -341,8 +346,9 @@ public: #endif , m_onePictureOnlyConstraintFlag (false) , m_lowerBitRateConstraintFlag (false ) - +#if !JVET_S0138_GCI_PTL , m_singleLayerConstraintFlag(false) +#endif , m_allLayersIndependentConstraintFlag(false) , m_noMrlConstraintFlag(false) , m_noIspConstraintFlag(false) @@ -411,10 +417,10 @@ public: bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; } void setNonPackedConstraintFlag(bool b) { m_nonPackedConstraintFlag = b; } #endif - +#if !JVET_S0138_GCI_PTL bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } void setFrameOnlyConstraintFlag(bool b) { m_frameOnlyConstraintFlag = b; } - +#endif uint32_t getMaxBitDepthConstraintIdc() const { return m_maxBitDepthConstraintIdc; } void setMaxBitDepthConstraintIdc(uint32_t bitDepth) { m_maxBitDepthConstraintIdc = bitDepth; } @@ -449,9 +455,10 @@ public: bool getLowerBitRateConstraintFlag() const { return m_lowerBitRateConstraintFlag; } void setLowerBitRateConstraintFlag(bool b) { m_lowerBitRateConstraintFlag = b; } - +#if !JVET_S0138_GCI_PTL bool getSingleLayerConstraintFlag() const { return m_singleLayerConstraintFlag; } void setSingleLayerConstraintFlag(bool b) { m_singleLayerConstraintFlag = b; } +#endif bool getAllLayersIndependentConstraintFlag() const { return m_allLayersIndependentConstraintFlag; } void setAllLayersIndependentConstraintFlag(bool b) { m_allLayersIndependentConstraintFlag = b; } bool getNoMrlConstraintFlag() const { return m_noMrlConstraintFlag; } @@ -570,7 +577,10 @@ class ProfileTierLevel uint8_t m_numSubProfile; std::vector<uint32_t> m_subProfileIdc; Level::Name m_levelIdc; - +#if JVET_S0138_GCI_PTL + bool m_frameOnlyConstraintFlag; + bool m_multiLayerEnabledFlag; +#endif ConstraintInfo m_constraintInfo; bool m_subLayerLevelPresentFlag[MAX_TLAYER - 1]; Level::Name m_subLayerLevelIdc[MAX_TLAYER]; @@ -593,6 +603,13 @@ public: Level::Name getLevelIdc() const { return m_levelIdc; } void setLevelIdc(Level::Name x) { m_levelIdc = x; } +#if JVET_S0138_GCI_PTL + bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } + void setFrameOnlyConstraintFlag(bool x) { m_frameOnlyConstraintFlag = x; } + + bool getMultiLayerEnabledFlag() const { return m_multiLayerEnabledFlag; } + void setMultiLayerEnabledFlag(bool x) { m_multiLayerEnabledFlag = x; } +#endif ConstraintInfo* getConstraintInfo() { return &m_constraintInfo; } const ConstraintInfo* getConstraintInfo() const { return &m_constraintInfo; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index f9f3f30d079419d4d21f68ad7c4a79dfa3f8cf9b..e3b7b0b68084aebf28b3a65e3c66619b05110695 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -140,6 +140,8 @@ // Constrain the value of one_subpic_per_pic_constraint_flag, one_slice_per_pic_constraint_flag and no_aps_constraint_flag // Remove all constraints that require GCI fields to be equal to a value that imposes a constraint +#define JVET_S0138_GCI_PTL 1 // JVET-S_Notes_d9: move frame_only_constraint_flag and single_layer_constraint_flag into PTL for easy access + #define JVET_S0182_RPL_SIGNALLING 1 // JVET-S0182: modifications to rpl information signalling #define JVET_S0185_PROPOSAl1_PICTURE_TIMING_CLEANUP 1 // JVET-S0185: Proposal 1, put syntax element pt_cpb_removal_delay_minus1[] first, followed by similar information for sub-layers, followed by pt_dpb_output_delay diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 0b2a77e0cfb008e0104628bd8c2062f5e6a6757c..74e3691886f2813052b9db4d9d4ee7f87e308f70 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -2219,6 +2219,9 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } READ_FLAG( uiCode, "field_seq_flag"); pcSPS->setFieldSeqFlag(uiCode); +#if JVET_S0138_GCI_PTL + CHECK( pcSPS->getProfileTierLevel()->getFrameOnlyConstraintFlag() && uiCode, "When ptl_frame_only_constraint_flag equal to 1 , the value of sps_field_seq_flag shall be equal to 0"); +#endif READ_FLAG( uiCode, "vui_parameters_present_flag" ); pcSPS->setVuiParametersPresentFlag(uiCode); @@ -2470,7 +2473,11 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) int cnt = 0; while (m_pcBitstream->getNumBitsUntilByteAligned()) { +#if JVET_S0138_GCI_PTL + READ_FLAG( uiCode, "vps_ptl_reserved_zero_bit"); +#else READ_FLAG( uiCode, "vps_ptl_alignment_zero_bit"); +#endif CHECK(uiCode!=0, "Alignment bit is not '0'"); cnt++; } @@ -4589,7 +4596,9 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo) #if !JVET_S0266_VUI_length READ_FLAG(symbol, "general_non_packed_constraint_flag" ); cinfo->setNonPackedConstraintFlag(symbol ? true : false); #endif +#if !JVET_S0138_GCI_PTL READ_FLAG(symbol, "general_frame_only_constraint_flag" ); cinfo->setFrameOnlyConstraintFlag(symbol ? true : false); +#endif #if !JVET_S0266_VUI_length READ_FLAG(symbol, "general_non_projected_constraint_flag" ); cinfo->setNonProjectedConstraintFlag(symbol ? true : false); #endif @@ -4604,7 +4613,9 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo) READ_CODE(4, symbol, "max_bitdepth_constraint_idc" ); cinfo->setMaxBitDepthConstraintIdc(symbol); READ_CODE(2, symbol, "max_chroma_format_constraint_idc" ); cinfo->setMaxChromaFormatConstraintIdc((ChromaFormat)symbol); #endif +#if !JVET_S0138_GCI_PTL READ_FLAG(symbol, "single_layer_constraint_flag"); cinfo->setSingleLayerConstraintFlag(symbol ? true : false); +#endif READ_FLAG(symbol, "all_layers_independent_constraint_flag"); cinfo->setAllLayersIndependentConstraintFlag(symbol ? true : false); #if !JVET_S0050_GCI if (cinfo->getSingleLayerConstraintFlag()) @@ -4812,6 +4823,12 @@ void HLSyntaxReader::parseProfileTierLevel(ProfileTierLevel *ptl, bool profileTi READ_CODE( 8, symbol, "general_level_idc" ); ptl->setLevelIdc( Level::Name( symbol ) ); +#if JVET_S0138_GCI_PTL + READ_FLAG( symbol, "ptl_frame_only_constraint_flag" ); ptl->setFrameOnlyConstraintFlag(symbol); + READ_FLAG( symbol, "ptl_multilayer_enabled_flag" ); ptl->setMultiLayerEnabledFlag(symbol); + CHECK( (ptl->getProfileIdc() == Profile::MAIN_10 || ptl->getProfileIdc() == Profile::MAIN_444_10) && symbol, "ptl_multilayer_enabled_flag shall be equal to 0 for Main 10 and Main 10 4:4:4 profiles"); +#endif + if(profileTierPresentFlag) { #if JVET_S0179_CONDITIONAL_SIGNAL_GCI @@ -4837,7 +4854,11 @@ void HLSyntaxReader::parseProfileTierLevel(ProfileTierLevel *ptl, bool profileTi while (!isByteAligned()) { +#if JVET_S0138_GCI_PTL + READ_FLAG( symbol, "ptl_reserved_zero_bit" ); CHECK (symbol != 0, "ptl_reserved_zero_bit not equal to zero"); +#else READ_FLAG( symbol, "ptl_alignment_zero_bit" ); CHECK (symbol != 0, "ptl_alignment_zero_bit not equal to zero"); +#endif } #if JVET_S0203 diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 153b6c4e86127444219de2fec8f2d7c736ef5717..7a9240b7bee410078c12b5d655e9f11fc7bac1f2 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -182,8 +182,9 @@ protected: bool m_bIntraOnlyConstraintFlag; uint32_t m_maxBitDepthConstraintIdc; int m_maxChromaFormatConstraintIdc; - +#if !JVET_S0138_GCI_PTL bool m_singleLayerConstraintFlag; +#endif bool m_allLayersIndependentConstraintFlag; bool m_noMrlConstraintFlag; bool m_noIspConstraintFlag; @@ -244,6 +245,10 @@ protected: Profile::Name m_profile; Level::Tier m_levelTier; Level::Name m_level; +#if JVET_S0138_GCI_PTL + bool m_frameOnlyConstraintFlag; + bool m_multiLayerEnabledFlag; +#endif std::vector<uint32_t> m_subProfile; uint8_t m_numSubProfile; bool m_nonPackedConstraintFlag; @@ -253,7 +258,9 @@ protected: bool m_picHeaderInSliceHeaderConstraintFlag; bool m_oneSlicePerPicConstraintFlag; bool m_oneSubpicPerPicConstraintFlag; +#if !JVET_S0138_GCI_PTL bool m_frameOnlyConstraintFlag; +#endif bool m_intraOnlyConstraintFlag; //====== Coding Structure ======== @@ -774,6 +781,12 @@ public: void setProfile(Profile::Name profile) { m_profile = profile; } void setLevel(Level::Tier tier, Level::Name level) { m_levelTier = tier; m_level = level; } +#if JVET_S0138_GCI_PTL + bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } + void setFrameOnlyConstraintFlag(bool b) { m_frameOnlyConstraintFlag = b; } + bool getMultiLayerEnabledFlag() const { return m_multiLayerEnabledFlag; } + void setMultiLayerEnabledFlag(bool b) { m_multiLayerEnabledFlag = b; } +#endif void setNumSubProfile( uint8_t numSubProfile) { m_numSubProfile = numSubProfile; m_subProfile.resize(m_numSubProfile); } void setSubProfile( int i, uint32_t subProfile) { m_subProfile[i] = subProfile; } @@ -790,8 +803,10 @@ public: bool getGciPresentFlag() const { return m_gciPresentFlag; } void setGciPresentFlag(bool b) { m_gciPresentFlag = b; } #endif +#if !JVET_S0138_GCI_PTL bool getSingleLayerConstraintFlag() const { return m_singleLayerConstraintFlag; } void setSingleLayerConstraintFlag(bool bVal) { m_singleLayerConstraintFlag = bVal; } +#endif bool getAllLayersIndependentConstraintFlag() const { return m_allLayersIndependentConstraintFlag; } void setAllLayersIndependentConstraintFlag(bool bVal) { m_allLayersIndependentConstraintFlag = bVal; } bool getNoMrlConstraintFlag() const { return m_noMrlConstraintFlag; } @@ -1877,10 +1892,10 @@ public: bool getOneSubpicPerPicConstraintFlag() const { return m_oneSubpicPerPicConstraintFlag; } void setOneSubpicPerPicConstraintFlag(bool b) { m_oneSubpicPerPicConstraintFlag = b; } - +#if !JVET_S0138_GCI_PTL bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } void setFrameOnlyConstraintFlag(bool b) { m_frameOnlyConstraintFlag = b; } - +#endif void setSummaryOutFilename(const std::string &s) { m_summaryOutFilename = s; } const std::string& getSummaryOutFilename() const { return m_summaryOutFilename; } void setSummaryPicFilenameBase(const std::string &s) { m_summaryPicFilenameBase = s; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 2f1662b125c67d98464c505ab2bf7970296487e1..631765e53dc777bc8831b8f9a36d60f357e6b07a 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -1128,12 +1128,16 @@ void EncLib::xInitSPS( SPS& sps ) cinfo->setPicHeaderInSliceHeaderConstraintFlag(m_picHeaderInSliceHeaderConstraintFlag); cinfo->setOneSlicePerPicConstraintFlag(m_oneSlicePerPicConstraintFlag); cinfo->setOneSubpicPerPicConstraintFlag(m_oneSubpicPerPicConstraintFlag); +#if !JVET_S0138_GCI_PTL cinfo->setFrameOnlyConstraintFlag (m_frameOnlyConstraintFlag); +#endif cinfo->setOnePictureOnlyConstraintFlag(m_onePictureOnlyConstraintFlag); cinfo->setIntraOnlyConstraintFlag (m_intraOnlyConstraintFlag); cinfo->setMaxBitDepthConstraintIdc (m_maxBitDepthConstraintIdc); cinfo->setMaxChromaFormatConstraintIdc((int)m_maxChromaFormatConstraintIdc); +#if !JVET_S0138_GCI_PTL cinfo->setSingleLayerConstraintFlag (m_singleLayerConstraintFlag); +#endif cinfo->setAllLayersIndependentConstraintFlag (m_allLayersIndependentConstraintFlag); cinfo->setNoMrlConstraintFlag (m_noMrlConstraintFlag); cinfo->setNoIspConstraintFlag (m_noIspConstraintFlag); @@ -1187,6 +1191,10 @@ void EncLib::xInitSPS( SPS& sps ) profileTierLevel->setLevelIdc (m_level); profileTierLevel->setTierFlag (m_levelTier); profileTierLevel->setProfileIdc (m_profile); +#if JVET_S0138_GCI_PTL + profileTierLevel->setFrameOnlyConstraintFlag (m_frameOnlyConstraintFlag); + profileTierLevel->setMultiLayerEnabledFlag (m_multiLayerEnabledFlag); +#endif profileTierLevel->setNumSubProfile(m_numSubProfile); for (int k = 0; k < m_numSubProfile; k++) { diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index fa8e8ba0ea0de3de4573df71daac60f5d3a7d563..c3c0c5019b4dbc901a1a053f5ce5d72ea98576d9 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -1542,7 +1542,11 @@ void HLSWriter::codeVPS(const VPS* pcVPS) int cnt = 0; while (m_pcBitIf->getNumBitsUntilByteAligned()) { +#if JVET_S0138_GCI_PTL + WRITE_FLAG( 0, "vps_ptl_reserved_zero_bit"); +#else WRITE_FLAG( 0, "vps_ptl_alignment_zero_bit"); +#endif cnt++; } CHECK(cnt>=8, "More than '8' alignment bytes written"); @@ -2668,7 +2672,9 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo ) #if !JVET_S0266_VUI_length WRITE_FLAG(cinfo->getNonPackedConstraintFlag(), "general_non_packed_constraint_flag" ); #endif +#if !JVET_S0138_GCI_PTL WRITE_FLAG(cinfo->getFrameOnlyConstraintFlag(), "general_frame_only_constraint_flag" ); +#endif #if !JVET_S0266_VUI_length WRITE_FLAG(cinfo->getNonProjectedConstraintFlag(), "general_non_projected_constraint_flag"); #endif @@ -2682,7 +2688,9 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo ) WRITE_CODE(cinfo->getMaxBitDepthConstraintIdc(), 4, "max_bitdepth_constraint_idc" ); WRITE_CODE(cinfo->getMaxChromaFormatConstraintIdc(), 2, "max_chroma_format_constraint_idc" ); #endif +#if !JVET_S0138_GCI_PTL WRITE_FLAG(cinfo->getSingleLayerConstraintFlag(), "single_layer_constraint_flag"); +#endif WRITE_FLAG(cinfo->getAllLayersIndependentConstraintFlag(), "all_layers_independent_constraint_flag"); WRITE_FLAG(cinfo->getNoResChangeInClvsConstraintFlag(), "no_res_change_in_clvs_constraint_flag"); WRITE_FLAG(cinfo->getOneTilePerPicConstraintFlag(), "one_tile_per_pic_constraint_flag"); @@ -2773,6 +2781,11 @@ void HLSWriter::codeProfileTierLevel ( const ProfileTierLevel* ptl, bool pro WRITE_CODE( int( ptl->getLevelIdc() ), 8, "general_level_idc" ); +#if JVET_S0138_GCI_PTL + WRITE_FLAG( ptl->getFrameOnlyConstraintFlag(), "ptl_frame_only_constraint_flag" ); + WRITE_FLAG( ptl->getMultiLayerEnabledFlag(), "ptl_multilayer_enabled_flag" ); +#endif + if(profileTierPresentFlag) { #if JVET_S0179_CONDITIONAL_SIGNAL_GCI @@ -2796,7 +2809,11 @@ void HLSWriter::codeProfileTierLevel ( const ProfileTierLevel* ptl, bool pro while (!isByteAligned()) { +#if JVET_S0138_GCI_PTL + WRITE_FLAG(0, "ptl_reserved_zero_bit"); +#else WRITE_FLAG(0, "ptl_alignment_zero_bit"); +#endif } #if JVET_S0203