diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index de13dc4e1d373be25c5cf26d9525c99304b45fa8..0ef3310865a86ae215863d183910d5eee5250e03 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -118,6 +118,9 @@ void EncApp::xInitLibCfg() m_cEncLib.setMaxChromaFormatConstraintIdc ( m_chromaFormatConstraint ); m_cEncLib.setFrameConstraintFlag ( m_bFrameConstraintFlag ); m_cEncLib.setNoQtbttDualTreeIntraConstraintFlag ( !m_dualTree ); +#if JVET_N0276_CONSTRAINT_FLAGS + m_cEncLib.setNoPartitionConstraintsOverrideConstraintFlag ( !m_SplitConsOverrideEnabledFlag ); +#endif m_cEncLib.setNoSaoConstraintFlag ( !m_bUseSAO ); m_cEncLib.setNoAlfConstraintFlag ( !m_alf ); m_cEncLib.setNoPcmConstraintFlag ( !m_usePCM ); @@ -126,14 +129,31 @@ void EncApp::xInitLibCfg() m_cEncLib.setNoSbtmvpConstraintFlag ( m_SubPuMvpMode ? false : true ); m_cEncLib.setNoAmvrConstraintFlag ( m_bNoAmvrConstraintFlag ); m_cEncLib.setNoBdofConstraintFlag ( !m_BIO ); +#if JVET_N0276_CONSTRAINT_FLAGS + m_cEncLib.setNoDmvrConstraintFlag ( !m_DMVR ); +#endif m_cEncLib.setNoCclmConstraintFlag ( m_LMChroma ? false : true ); m_cEncLib.setNoMtsConstraintFlag ( (m_MTS || m_MTSImplicit) ? false : true ); +#if JVET_N0276_CONSTRAINT_FLAGS + m_cEncLib.setNoSbtConstraintFlag ( !m_SBT ); +#endif m_cEncLib.setNoAffineMotionConstraintFlag ( !m_Affine ); m_cEncLib.setNoGbiConstraintFlag ( !m_GBi ); +#if JVET_N0276_CONSTRAINT_FLAGS + m_cEncLib.setNoIbcConstraintFlag ( m_IBCMode ? false : true ); +#endif m_cEncLib.setNoMhIntraConstraintFlag ( !m_MHIntra ); +#if JVET_N0276_CONSTRAINT_FLAGS + m_cEncLib.setNoFPelMmvdConstraintFlag ( !(m_MMVD && m_allowDisFracMMVD) ); +#endif m_cEncLib.setNoTriangleConstraintFlag ( !m_Triangle ); m_cEncLib.setNoLadfConstraintFlag ( !m_LadfEnabed ); +#if JVET_N0276_CONSTRAINT_FLAGS + m_cEncLib.setNoTransformSkipConstraintFlag ( !m_useTransformSkip ); +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS m_cEncLib.setNoCurrPicRefConstraintFlag ( !m_IBCMode ); +#endif m_cEncLib.setNoQpDeltaConstraintFlag ( m_bNoQpDeltaConstraintFlag ); m_cEncLib.setNoDepQuantConstraintFlag ( !m_depQuantEnabledFlag); m_cEncLib.setNoSignDataHidingConstraintFlag ( !m_signDataHidingEnabledFlag ); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 4e2bd418ca0010ad45e172b2c69884fef27146e1..d2e1baac1dd70fd217d1ce9563c0ab2e9597a34d 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -113,6 +113,9 @@ EncAppCfg::EncAppCfg() , m_maxChromaFormatConstraintIdc(CHROMA_420) , m_bFrameConstraintFlag(false) , m_bNoQtbttDualTreeIntraConstraintFlag(false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noPartitionConstraintsOverrideConstraintFlag(false) +#endif , m_bNoSaoConstraintFlag(false) , m_bNoAlfConstraintFlag(false) , m_bNoPcmConstraintFlag(false) @@ -121,14 +124,31 @@ EncAppCfg::EncAppCfg() , m_bNoSbtmvpConstraintFlag(false) , m_bNoAmvrConstraintFlag(false) , m_bNoBdofConstraintFlag(false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noDmvrConstraintFlag(false) +#endif , m_bNoCclmConstraintFlag(false) , m_bNoMtsConstraintFlag(false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noSbtConstraintFlag(false) +#endif , m_bNoAffineMotionConstraintFlag(false) , m_bNoGbiConstraintFlag(false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noIbcConstraintFlag(false) +#endif , m_bNoMhIntraConstraintFlag(false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noFPelMmvdConstraintFlag(false) +#endif , m_bNoTriangleConstraintFlag(false) , m_bNoLadfConstraintFlag(false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noTransformSkipConstraintFlag(false) +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS , m_bNoCurrPicRefConstraintFlag(false) +#endif , m_bNoQpDeltaConstraintFlag(false) , m_bNoDepQuantConstraintFlag(false) , m_bNoSignDataHidingConstraintFlag(false) diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index b54ca90eb199af94b3c2347d7372d1b475c0478d..ca9e4ebd1be65fec61c3395a6212c200df551aa9 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -122,6 +122,9 @@ protected: uint32_t m_maxChromaFormatConstraintIdc; bool m_bFrameConstraintFlag; bool m_bNoQtbttDualTreeIntraConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noPartitionConstraintsOverrideConstraintFlag; +#endif bool m_bNoSaoConstraintFlag; bool m_bNoAlfConstraintFlag; bool m_bNoPcmConstraintFlag; @@ -130,14 +133,31 @@ protected: bool m_bNoSbtmvpConstraintFlag; bool m_bNoAmvrConstraintFlag; bool m_bNoBdofConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noDmvrConstraintFlag; +#endif bool m_bNoCclmConstraintFlag; bool m_bNoMtsConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noSbtConstraintFlag; +#endif bool m_bNoAffineMotionConstraintFlag; bool m_bNoGbiConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noIbcConstraintFlag; +#endif bool m_bNoMhIntraConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noFPelMmvdConstraintFlag; +#endif bool m_bNoTriangleConstraintFlag; bool m_bNoLadfConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noTransformSkipConstraintFlag; +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS bool m_bNoCurrPicRefConstraintFlag; +#endif bool m_bNoQpDeltaConstraintFlag; bool m_bNoDepQuantConstraintFlag; bool m_bNoSignDataHidingConstraintFlag; diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index a2fc1c1110a2658cf33510d93ddfb435dbce0942..e043b54ecd58773b6d3782937bab6ad337a1993e 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -1777,6 +1777,9 @@ SPS::SPS() , m_maxChromaFormatConstraintIdc(CHROMA_420) , m_bFrameConstraintFlag (false) , m_bNoQtbttDualTreeIntraConstraintFlag(false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noPartitionConstraintsOverrideConstraintFlag(false) +#endif , m_bNoSaoConstraintFlag (false) , m_bNoAlfConstraintFlag (false) , m_bNoPcmConstraintFlag (false) @@ -1785,14 +1788,31 @@ SPS::SPS() , m_bNoSbtmvpConstraintFlag (false) , m_bNoAmvrConstraintFlag (false) , m_bNoBdofConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noDmvrConstraintFlag (false) +#endif , m_bNoCclmConstraintFlag (false) , m_bNoMtsConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noSbtConstraintFlag (false) +#endif , m_bNoAffineMotionConstraintFlag(false) , m_bNoGbiConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noIbcConstraintFlag (false) +#endif , m_bNoMhIntraConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noFPelMmvdConstraintFlag (false) +#endif , m_bNoTriangleConstraintFlag (false) , m_bNoLadfConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS +, m_noTransformSkipConstraintFlag(false) +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS , m_bNoCurrPicRefConstraintFlag(false) +#endif , m_bNoQpDeltaConstraintFlag (false) , m_bNoDepQuantConstraintFlag (false) , m_bNoSignDataHidingConstraintFlag(false) diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 5bee9e4db844b7efbad90ec88720096b28a680c2..dbf268b56f67fac12c370887bc8eb2304e1b6794 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -206,6 +206,9 @@ class ConstraintInfo bool m_lowerBitRateConstraintFlag; bool m_noQtbttDualTreeIntraConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noPartitionConstraintsOverrideConstraintFlag; +#endif bool m_noSaoConstraintFlag; bool m_noAlfConstraintFlag; bool m_noPcmConstraintFlag; @@ -214,14 +217,31 @@ class ConstraintInfo bool m_noSbtmvpConstraintFlag; bool m_noAmvrConstraintFlag; bool m_noBdofConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noDmvrConstraintFlag; +#endif bool m_noCclmConstraintFlag; bool m_noMtsConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noSbtConstraintFlag; +#endif bool m_noAffineMotionConstraintFlag; bool m_noGbiConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noIbcConstraintFlag; +#endif bool m_noMhIntraConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noFPelMmvdConstraintFlag; +#endif bool m_noTriangleConstraintFlag; bool m_noLadfConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noTransformSkipConstraintFlag; +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS bool m_noCurrPicRefConstraintFlag; +#endif bool m_noQpDeltaConstraintFlag; bool m_noDepQuantConstraintFlag; bool m_noSignDataHidingConstraintFlag; @@ -236,6 +256,9 @@ public: , m_maxBitDepthConstraintIdc ( 0) , m_maxChromaFormatConstraintIdc(CHROMA_420) , m_noQtbttDualTreeIntraConstraintFlag(false) +#if JVET_N0276_CONSTRAINT_FLAGS + , m_noPartitionConstraintsOverrideConstraintFlag(false) +#endif , m_noSaoConstraintFlag (false) , m_noAlfConstraintFlag (false) , m_noPcmConstraintFlag (false) @@ -244,14 +267,31 @@ public: , m_noSbtmvpConstraintFlag (false) , m_noAmvrConstraintFlag (false) , m_noBdofConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS + , m_noDmvrConstraintFlag (false) +#endif , m_noCclmConstraintFlag (false) , m_noMtsConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS + , m_noSbtConstraintFlag (false) +#endif , m_noAffineMotionConstraintFlag(false) , m_noGbiConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS + , m_noIbcConstraintFlag (false) +#endif , m_noMhIntraConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS + , m_noFPelMmvdConstraintFlag (false) +#endif , m_noTriangleConstraintFlag (false) , m_noLadfConstraintFlag (false) +#if JVET_N0276_CONSTRAINT_FLAGS + , m_noTransformSkipConstraintFlag(false) +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS , m_noCurrPicRefConstraintFlag(false) +#endif , m_noQpDeltaConstraintFlag (false) , m_noDepQuantConstraintFlag (false) , m_noSignDataHidingConstraintFlag(false) @@ -286,6 +326,10 @@ public: bool getNoQtbttDualTreeIntraConstraintFlag() const { return m_noQtbttDualTreeIntraConstraintFlag; } void setNoQtbttDualTreeIntraConstraintFlag(bool bVal) { m_noQtbttDualTreeIntraConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoPartitionConstraintsOverrideConstraintFlag() const { return m_noPartitionConstraintsOverrideConstraintFlag; } + void setNoPartitionConstraintsOverrideConstraintFlag(bool bVal) { m_noPartitionConstraintsOverrideConstraintFlag = bVal; } +#endif bool getNoSaoConstraintFlag() const { return m_noSaoConstraintFlag; } void setNoSaoConstraintFlag(bool bVal) { m_noSaoConstraintFlag = bVal; } bool getNoAlfConstraintFlag() const { return m_noAlfConstraintFlag; } @@ -302,22 +346,44 @@ public: void setNoAmvrConstraintFlag(bool bVal) { m_noAmvrConstraintFlag = bVal; } bool getNoBdofConstraintFlag() const { return m_noBdofConstraintFlag; } void setNoBdofConstraintFlag(bool bVal) { m_noBdofConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoDmvrConstraintFlag() const { return m_noDmvrConstraintFlag; } + void setNoDmvrConstraintFlag(bool bVal) { m_noDmvrConstraintFlag = bVal; } +#endif bool getNoCclmConstraintFlag() const { return m_noCclmConstraintFlag; } void setNoCclmConstraintFlag(bool bVal) { m_noCclmConstraintFlag = bVal; } bool getNoMtsConstraintFlag() const { return m_noMtsConstraintFlag; } void setNoMtsConstraintFlag(bool bVal) { m_noMtsConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoSbtConstraintFlag() const { return m_noSbtConstraintFlag; } + void setNoSbtConstraintFlag(bool bVal) { m_noSbtConstraintFlag = bVal; } +#endif bool getNoAffineMotionConstraintFlag() const { return m_noAffineMotionConstraintFlag; } void setNoAffineMotionConstraintFlag(bool bVal) { m_noAffineMotionConstraintFlag = bVal; } bool getNoGbiConstraintFlag() const { return m_noGbiConstraintFlag; } void setNoGbiConstraintFlag(bool bVal) { m_noGbiConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoIbcConstraintFlag() const { return m_noIbcConstraintFlag; } + void setNoIbcConstraintFlag(bool bVal) { m_noIbcConstraintFlag = bVal; } +#endif bool getNoMhIntraConstraintFlag() const { return m_noMhIntraConstraintFlag; } void setNoMhIntraConstraintFlag(bool bVal) { m_noMhIntraConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoFPelMmvdConstraintFlag() const { return m_noFPelMmvdConstraintFlag; } + void setNoFPelMmvdConstraintFlag(bool bVal) { m_noFPelMmvdConstraintFlag = bVal; } +#endif bool getNoTriangleConstraintFlag() const { return m_noTriangleConstraintFlag; } void setNoTriangleConstraintFlag(bool bVal) { m_noTriangleConstraintFlag = bVal; } bool getNoLadfConstraintFlag() const { return m_noLadfConstraintFlag; } void setNoLadfConstraintFlag(bool bVal) { m_noLadfConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoTransformSkipConstraintFlag() const { return m_noTransformSkipConstraintFlag; } + void setNoTransformSkipConstraintFlag(bool bVal) { m_noTransformSkipConstraintFlag = bVal; } +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS bool getNoCurrPicRefConstraintFlag() const { return m_noCurrPicRefConstraintFlag; } void setNoCurrPicRefConstraintFlag(bool bVal) { m_noCurrPicRefConstraintFlag = bVal; } +#endif bool getNoQpDeltaConstraintFlag() const { return m_noQpDeltaConstraintFlag; } void setNoQpDeltaConstraintFlag(bool bVal) { m_noQpDeltaConstraintFlag = bVal; } bool getNoDepQuantConstraintFlag() const { return m_noDepQuantConstraintFlag; } @@ -968,6 +1034,9 @@ private: uint32_t m_maxChromaFormatConstraintIdc; bool m_bFrameConstraintFlag; bool m_bNoQtbttDualTreeIntraConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noPartitionConstraintsOverrideConstraintFlag; +#endif bool m_bNoSaoConstraintFlag; bool m_bNoAlfConstraintFlag; bool m_bNoPcmConstraintFlag; @@ -976,14 +1045,31 @@ private: bool m_bNoSbtmvpConstraintFlag; bool m_bNoAmvrConstraintFlag; bool m_bNoBdofConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noDmvrConstraintFlag; +#endif bool m_bNoCclmConstraintFlag; bool m_bNoMtsConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noSbtConstraintFlag; +#endif bool m_bNoAffineMotionConstraintFlag; bool m_bNoGbiConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noIbcConstraintFlag; +#endif bool m_bNoMhIntraConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noFPelMmvdConstraintFlag; +#endif bool m_bNoTriangleConstraintFlag; bool m_bNoLadfConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noTransformSkipConstraintFlag; +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS bool m_bNoCurrPicRefConstraintFlag; +#endif bool m_bNoQpDeltaConstraintFlag; bool m_bNoDepQuantConstraintFlag; bool m_bNoSignDataHidingConstraintFlag; @@ -1141,6 +1227,10 @@ public: void setFrameConstraintFlag(bool bVal) { m_bFrameConstraintFlag = bVal; } bool getNoQtbttDualTreeIntraConstraintFlag() const { return m_bNoQtbttDualTreeIntraConstraintFlag; } void setNoQtbttDualTreeIntraConstraintFlag(bool bVal) { m_bNoQtbttDualTreeIntraConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoPartitionConstraintsOverrideConstraintFlag() const { return m_noPartitionConstraintsOverrideConstraintFlag; } + void setNoPartitionConstraintsOverrideConstraintFlag(bool bVal) { m_noPartitionConstraintsOverrideConstraintFlag = bVal; } +#endif bool getNoSaoConstraintFlag() const { return m_bNoSaoConstraintFlag; } void setNoSaoConstraintFlag(bool bVal) { m_bNoSaoConstraintFlag = bVal; } bool getNoAlfConstraintFlag() const { return m_bNoAlfConstraintFlag; } @@ -1157,22 +1247,44 @@ public: void setNoAmvrConstraintFlag(bool bVal) { m_bNoAmvrConstraintFlag = bVal; } bool getNoBdofConstraintFlag() const { return m_bNoBdofConstraintFlag; } void setNoBdofConstraintFlag(bool bVal) { m_bNoBdofConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoDmvrConstraintFlag() const { return m_noDmvrConstraintFlag; } + void setNoDmvrConstraintFlag(bool bVal) { m_noDmvrConstraintFlag = bVal; } +#endif bool getNoCclmConstraintFlag() const { return m_bNoCclmConstraintFlag; } void setNoCclmConstraintFlag(bool bVal) { m_bNoCclmConstraintFlag = bVal; } bool getNoMtsConstraintFlag() const { return m_bNoMtsConstraintFlag; } void setNoMtsConstraintFlag(bool bVal) { m_bNoMtsConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoSbtConstraintFlag() const { return m_noSbtConstraintFlag; } + void setNoSbtConstraintFlag(bool bVal) { m_noSbtConstraintFlag = bVal; } +#endif bool getNoAffineMotionConstraintFlag() const { return m_bNoAffineMotionConstraintFlag; } void setNoAffineMotionConstraintFlag(bool bVal) { m_bNoAffineMotionConstraintFlag = bVal; } bool getNoGbiConstraintFlag() const { return m_bNoGbiConstraintFlag; } void setNoGbiConstraintFlag(bool bVal) { m_bNoGbiConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoIbcConstraintFlag() const { return m_noIbcConstraintFlag; } + void setNoIbcConstraintFlag(bool bVal) { m_noIbcConstraintFlag = bVal; } +#endif bool getNoMhIntraConstraintFlag() const { return m_bNoMhIntraConstraintFlag; } void setNoMhIntraConstraintFlag(bool bVal) { m_bNoMhIntraConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoFPelMmvdConstraintFlag() const { return m_noFPelMmvdConstraintFlag; } + void setNoFPelMmvdConstraintFlag(bool bVal) { m_noFPelMmvdConstraintFlag = bVal; } +#endif bool getNoTriangleConstraintFlag() const { return m_bNoTriangleConstraintFlag; } void setNoTriangleConstraintFlag(bool bVal) { m_bNoTriangleConstraintFlag = bVal; } bool getNoLadfConstraintFlag() const { return m_bNoLadfConstraintFlag; } void setNoLadfConstraintFlag(bool bVal) { m_bNoLadfConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoTransformSkipConstraintFlag() const { return m_noTransformSkipConstraintFlag; } + void setNoTransformSkipConstraintFlag(bool bVal) { m_noTransformSkipConstraintFlag = bVal; } +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS bool getNoCurrPicRefConstraintFlag() const { return m_bNoCurrPicRefConstraintFlag; } void setNoCurrPicRefConstraintFlag(bool bVal) { m_bNoCurrPicRefConstraintFlag = bVal; } +#endif bool getNoQpDeltaConstraintFlag() const { return m_bNoQpDeltaConstraintFlag; } void setNoQpDeltaConstraintFlag(bool bVal) { m_bNoQpDeltaConstraintFlag = bVal; } bool getNoDepQuantConstraintFlag() const { return m_bNoDepQuantConstraintFlag; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 69c4296ac00609b7c106ff54c20cdb0d4af24dca..fa95f52ee081bb01bbf86c64845272aae1a855cb 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -50,6 +50,8 @@ #include <assert.h> #include <cassert> +#define JVET_N0276_CONSTRAINT_FLAGS 1 // JVET-N0276: On interoperability point signalling + #define JVET_N0063_VUI 1 // JVET-N0063: Video Usability Information #define JVET_N0847_SCALING_LISTS 1 //1: default mode, 2: user defined mode diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 0adc45e6e3aede4b8b352c3686493a41692115de..bf9f0828927165ba5d6510754b4f09d10f2da56a 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -2510,6 +2510,9 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo) READ_CODE(2, symbol, "max_chroma_format_constraint_idc" ); cinfo->setMaxChromaFormatConstraintIdc((ChromaFormat)symbol); READ_FLAG(symbol, "no_qtbtt_dual_tree_intra_constraint_flag" ); cinfo->setNoQtbttDualTreeIntraConstraintFlag(symbol > 0 ? true : false); +#if JVET_N0276_CONSTRAINT_FLAGS + READ_FLAG(symbol, "no_partition_constraints_override_constraint_flag"); cinfo->setNoPartitionConstraintsOverrideConstraintFlag(symbol > 0 ? true : false); +#endif READ_FLAG(symbol, "no_sao_constraint_flag"); cinfo->setNoSaoConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_alf_constraint_flag"); cinfo->setNoAlfConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_pcm_constraint_flag"); cinfo->setNoPcmConstraintFlag(symbol > 0 ? true : false); @@ -2518,14 +2521,31 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo) READ_FLAG(symbol, "no_sbtmvp_constraint_flag"); cinfo->setNoSbtmvpConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_amvr_constraint_flag"); cinfo->setNoAmvrConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_bdof_constraint_flag"); cinfo->setNoBdofConstraintFlag(symbol > 0 ? true : false); +#if JVET_N0276_CONSTRAINT_FLAGS + READ_FLAG(symbol, "no_dmvr_constraint_flag"); cinfo->setNoDmvrConstraintFlag(symbol > 0 ? true : false); +#endif READ_FLAG(symbol, "no_cclm_constraint_flag"); cinfo->setNoCclmConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_mts_constraint_flag"); cinfo->setNoMtsConstraintFlag(symbol > 0 ? true : false); +#if JVET_N0276_CONSTRAINT_FLAGS + READ_FLAG(symbol, "no_sbt_constraint_flag"); cinfo->setNoSbtConstraintFlag(symbol > 0 ? true : false); +#endif READ_FLAG(symbol, "no_affine_motion_constraint_flag"); cinfo->setNoAffineMotionConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_gbi_constraint_flag"); cinfo->setNoGbiConstraintFlag(symbol > 0 ? true : false); +#if JVET_N0276_CONSTRAINT_FLAGS + READ_FLAG(symbol, "no_ibc_constraint_flag"); cinfo->setNoIbcConstraintFlag(symbol > 0 ? true : false); +#endif READ_FLAG(symbol, "no_mh_intra_constraint_flag"); cinfo->setNoMhIntraConstraintFlag(symbol > 0 ? true : false); +#if JVET_N0276_CONSTRAINT_FLAGS + READ_FLAG(symbol, "no_fpel_mmvd_constraint_flag"); cinfo->setNoFPelMmvdConstraintFlag(symbol > 0 ? true : false); +#endif READ_FLAG(symbol, "no_triangle_constraint_flag"); cinfo->setNoTriangleConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_ladf_constraint_flag"); cinfo->setNoLadfConstraintFlag(symbol > 0 ? true : false); +#if JVET_N0276_CONSTRAINT_FLAGS + READ_FLAG(symbol, "no_transform_skip_constraint_flag"); cinfo->setNoTransformSkipConstraintFlag(symbol > 0 ? true : false); +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS READ_FLAG(symbol, "no_curr_pic_ref_constraint_flag"); cinfo->setNoCurrPicRefConstraintFlag(symbol > 0 ? true : false); +#endif READ_FLAG(symbol, "no_qp_delta_constraint_flag"); cinfo->setNoQpDeltaConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_dep_quant_constraint_flag"); cinfo->setNoDepQuantConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "no_sign_data_hiding_constraint_flag"); cinfo->setNoSignDataHidingConstraintFlag(symbol > 0 ? true : false); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 301dc5d5052cb74723d3c675b7d7c2a416ab0ae8..1274fb042ae081b7fd0adfae40ab648f4195cb08 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -164,6 +164,9 @@ protected: uint32_t m_maxChromaFormatConstraintIdc; bool m_bFrameConstraintFlag; bool m_bNoQtbttDualTreeIntraConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noPartitionConstraintsOverrideConstraintFlag; +#endif bool m_bNoSaoConstraintFlag; bool m_bNoAlfConstraintFlag; bool m_bNoPcmConstraintFlag; @@ -172,14 +175,31 @@ protected: bool m_bNoSbtmvpConstraintFlag; bool m_bNoAmvrConstraintFlag; bool m_bNoBdofConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noDmvrConstraintFlag; +#endif bool m_bNoCclmConstraintFlag; bool m_bNoMtsConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noSbtConstraintFlag; +#endif bool m_bNoAffineMotionConstraintFlag; bool m_bNoGbiConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noIbcConstraintFlag; +#endif bool m_bNoMhIntraConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noFPelMmvdConstraintFlag; +#endif bool m_bNoTriangleConstraintFlag; bool m_bNoLadfConstraintFlag; +#if JVET_N0276_CONSTRAINT_FLAGS + bool m_noTransformSkipConstraintFlag; +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS bool m_bNoCurrPicRefConstraintFlag; +#endif bool m_bNoQpDeltaConstraintFlag; bool m_bNoDepQuantConstraintFlag; bool m_bNoSignDataHidingConstraintFlag; @@ -695,6 +715,10 @@ public: void setFrameConstraintFlag(bool bVal) { m_bFrameConstraintFlag = bVal; } bool getNoQtbttDualTreeIntraConstraintFlag() const { return m_bNoQtbttDualTreeIntraConstraintFlag; } void setNoQtbttDualTreeIntraConstraintFlag(bool bVal) { m_bNoQtbttDualTreeIntraConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoPartitionConstraintsOverrideConstraintFlag() const { return m_noPartitionConstraintsOverrideConstraintFlag; } + void setNoPartitionConstraintsOverrideConstraintFlag(bool bVal) { m_noPartitionConstraintsOverrideConstraintFlag = bVal; } +#endif bool getNoSaoConstraintFlag() const { return m_bNoSaoConstraintFlag; } void setNoSaoConstraintFlag(bool bVal) { m_bNoSaoConstraintFlag = bVal; } bool getNoAlfConstraintFlag() const { return m_bNoAlfConstraintFlag; } @@ -711,22 +735,44 @@ public: void setNoAmvrConstraintFlag(bool bVal) { m_bNoAmvrConstraintFlag = bVal; } bool getNoBdofConstraintFlag() const { return m_bNoBdofConstraintFlag; } void setNoBdofConstraintFlag(bool bVal) { m_bNoBdofConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoDmvrConstraintFlag() const { return m_noDmvrConstraintFlag; } + void setNoDmvrConstraintFlag(bool bVal) { m_noDmvrConstraintFlag = bVal; } +#endif bool getNoCclmConstraintFlag() const { return m_bNoCclmConstraintFlag; } void setNoCclmConstraintFlag(bool bVal) { m_bNoCclmConstraintFlag = bVal; } bool getNoMtsConstraintFlag() const { return m_bNoMtsConstraintFlag; } void setNoMtsConstraintFlag(bool bVal) { m_bNoMtsConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoSbtConstraintFlag() const { return m_noSbtConstraintFlag; } + void setNoSbtConstraintFlag(bool bVal) { m_noSbtConstraintFlag = bVal; } +#endif bool getNoAffineMotionConstraintFlag() const { return m_bNoAffineMotionConstraintFlag; } void setNoAffineMotionConstraintFlag(bool bVal) { m_bNoAffineMotionConstraintFlag = bVal; } bool getNoGbiConstraintFlag() const { return m_bNoGbiConstraintFlag; } void setNoGbiConstraintFlag(bool bVal) { m_bNoGbiConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoIbcConstraintFlag() const { return m_noIbcConstraintFlag; } + void setNoIbcConstraintFlag(bool bVal) { m_noIbcConstraintFlag = bVal; } +#endif bool getNoMhIntraConstraintFlag() const { return m_bNoMhIntraConstraintFlag; } void setNoMhIntraConstraintFlag(bool bVal) { m_bNoMhIntraConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoFPelMmvdConstraintFlag() const { return m_noFPelMmvdConstraintFlag; } + void setNoFPelMmvdConstraintFlag(bool bVal) { m_noFPelMmvdConstraintFlag = bVal; } +#endif bool getNoTriangleConstraintFlag() const { return m_bNoTriangleConstraintFlag; } void setNoTriangleConstraintFlag(bool bVal) { m_bNoTriangleConstraintFlag = bVal; } bool getNoLadfConstraintFlag() const { return m_bNoLadfConstraintFlag; } void setNoLadfConstraintFlag(bool bVal) { m_bNoLadfConstraintFlag = bVal; } +#if JVET_N0276_CONSTRAINT_FLAGS + bool getNoTransformSkipConstraintFlag() const { return m_noTransformSkipConstraintFlag; } + void setNoTransformSkipConstraintFlag(bool bVal) { m_noTransformSkipConstraintFlag = bVal; } +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS bool getNoCurrPicRefConstraintFlag() const { return m_bNoCurrPicRefConstraintFlag; } void setNoCurrPicRefConstraintFlag(bool bVal) { m_bNoCurrPicRefConstraintFlag = bVal; } +#endif bool getNoQpDeltaConstraintFlag() const { return m_bNoQpDeltaConstraintFlag; } void setNoQpDeltaConstraintFlag(bool bVal) { m_bNoQpDeltaConstraintFlag = bVal; } bool getNoDepQuantConstraintFlag() const { return m_bNoDepQuantConstraintFlag; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 36b23e4be172a912bb2ff96767fbd5e719811c98..2b1f406550c3f97f4768b34ea26547a06947827e 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -907,6 +907,9 @@ void EncLib::xInitSPS(SPS &sps) sps.setMaxChromaFormatConstraintIdc(m_maxChromaFormatConstraintIdc); sps.setFrameConstraintFlag(m_frameOnlyConstraintFlag); sps.setNoQtbttDualTreeIntraConstraintFlag(m_bNoQtbttDualTreeIntraConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + sps.setNoPartitionConstraintsOverrideConstraintFlag(m_noPartitionConstraintsOverrideConstraintFlag); +#endif sps.setNoSaoConstraintFlag(m_bNoSaoConstraintFlag); sps.setNoAlfConstraintFlag(m_bNoAlfConstraintFlag); sps.setNoPcmConstraintFlag(m_bNoPcmConstraintFlag); @@ -915,14 +918,31 @@ void EncLib::xInitSPS(SPS &sps) sps.setNoSbtmvpConstraintFlag(m_bNoSbtmvpConstraintFlag); sps.setNoAmvrConstraintFlag(m_bNoAmvrConstraintFlag); sps.setNoBdofConstraintFlag(m_bNoBdofConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + sps.setNoDmvrConstraintFlag(m_noDmvrConstraintFlag); +#endif sps.setNoCclmConstraintFlag(m_bNoCclmConstraintFlag); sps.setNoMtsConstraintFlag(m_bNoMtsConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + sps.setNoSbtConstraintFlag(m_noSbtConstraintFlag); +#endif sps.setNoAffineMotionConstraintFlag(m_bNoAffineMotionConstraintFlag); sps.setNoGbiConstraintFlag(m_bNoGbiConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + sps.setNoIbcConstraintFlag(m_noIbcConstraintFlag); +#endif sps.setNoMhIntraConstraintFlag(m_bNoMhIntraConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + sps.setNoFPelMmvdConstraintFlag(m_noFPelMmvdConstraintFlag); +#endif sps.setNoTriangleConstraintFlag(m_bNoTriangleConstraintFlag); sps.setNoLadfConstraintFlag(m_bNoLadfConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + sps.setNoTransformSkipConstraintFlag(m_noTransformSkipConstraintFlag); +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS sps.setNoCurrPicRefConstraintFlag(m_bNoCurrPicRefConstraintFlag); +#endif sps.setNoQpDeltaConstraintFlag(m_bNoQpDeltaConstraintFlag); sps.setNoDepQuantConstraintFlag(m_bNoDepQuantConstraintFlag); sps.setNoSignDataHidingConstraintFlag(m_bNoSignDataHidingConstraintFlag); @@ -963,6 +983,9 @@ void EncLib::xInitSPS(SPS &sps) cinfo->setMaxBitDepthConstraintIdc (m_maxBitDepthConstraintIdc); cinfo->setMaxChromaFormatConstraintIdc((ChromaFormat)m_maxChromaFormatConstraintIdc); cinfo->setNoQtbttDualTreeIntraConstraintFlag(m_bNoQtbttDualTreeIntraConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + cinfo->setNoPartitionConstraintsOverrideConstraintFlag(m_noPartitionConstraintsOverrideConstraintFlag); +#endif cinfo->setNoSaoConstraintFlag(m_bNoSaoConstraintFlag); cinfo->setNoAlfConstraintFlag(m_bNoAlfConstraintFlag); cinfo->setNoPcmConstraintFlag(m_bNoPcmConstraintFlag); @@ -971,14 +994,31 @@ void EncLib::xInitSPS(SPS &sps) cinfo->setNoSbtmvpConstraintFlag(m_bNoSbtmvpConstraintFlag); cinfo->setNoAmvrConstraintFlag(m_bNoAmvrConstraintFlag); cinfo->setNoBdofConstraintFlag(m_bNoBdofConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + cinfo->setNoDmvrConstraintFlag(m_noDmvrConstraintFlag); +#endif cinfo->setNoCclmConstraintFlag(m_bNoCclmConstraintFlag); cinfo->setNoMtsConstraintFlag(m_bNoMtsConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + cinfo->setNoSbtConstraintFlag(m_noSbtConstraintFlag); +#endif cinfo->setNoAffineMotionConstraintFlag(m_bNoAffineMotionConstraintFlag); cinfo->setNoGbiConstraintFlag(m_bNoGbiConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + cinfo->setNoIbcConstraintFlag(m_noIbcConstraintFlag); +#endif cinfo->setNoMhIntraConstraintFlag(m_bNoMhIntraConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + cinfo->setNoFPelMmvdConstraintFlag(m_noFPelMmvdConstraintFlag); +#endif cinfo->setNoTriangleConstraintFlag(m_bNoTriangleConstraintFlag); cinfo->setNoLadfConstraintFlag(m_bNoLadfConstraintFlag); +#if JVET_N0276_CONSTRAINT_FLAGS + cinfo->setNoTransformSkipConstraintFlag(m_noTransformSkipConstraintFlag); +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS cinfo->setNoCurrPicRefConstraintFlag(m_bNoCurrPicRefConstraintFlag); +#endif cinfo->setNoQpDeltaConstraintFlag(m_bNoQpDeltaConstraintFlag); cinfo->setNoDepQuantConstraintFlag(m_bNoDepQuantConstraintFlag); cinfo->setNoSignDataHidingConstraintFlag(m_bNoSignDataHidingConstraintFlag); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 8e108db2184c4ce17301ca83ea5fb17e4829107f..94a3729fa3e929f70f94bd93b39991d8800d2284 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -1767,6 +1767,9 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo ) WRITE_CODE(cinfo->getMaxChromaFormatConstraintIdc(), 2, "max_chroma_format_constraint_idc" ); WRITE_FLAG(cinfo->getNoQtbttDualTreeIntraConstraintFlag() ? 1 : 0, "no_qtbtt_dual_tree_intra_constraint_flag"); +#if JVET_N0276_CONSTRAINT_FLAGS + WRITE_FLAG(cinfo->getNoPartitionConstraintsOverrideConstraintFlag() ? 1 : 0, "no_partition_constraints_override_constraint_flag"); +#endif WRITE_FLAG(cinfo->getNoSaoConstraintFlag() ? 1 : 0, "no_sao_constraint_flag"); WRITE_FLAG(cinfo->getNoAlfConstraintFlag() ? 1 : 0, "no_alf_constraint_flag"); WRITE_FLAG(cinfo->getNoPcmConstraintFlag() ? 1 : 0, "no_pcm_constraint_flag"); @@ -1775,14 +1778,31 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo ) WRITE_FLAG(cinfo->getNoSbtmvpConstraintFlag() ? 1 : 0, "no_sbtmvp_constraint_flag"); WRITE_FLAG(cinfo->getNoAmvrConstraintFlag() ? 1 : 0, "no_amvr_constraint_flag"); WRITE_FLAG(cinfo->getNoBdofConstraintFlag() ? 1 : 0, "no_bdof_constraint_flag"); +#if JVET_N0276_CONSTRAINT_FLAGS + WRITE_FLAG(cinfo->getNoDmvrConstraintFlag() ? 1 : 0, "no_dmvr_constraint_flag"); +#endif WRITE_FLAG(cinfo->getNoCclmConstraintFlag() ? 1 : 0, "no_cclm_constraint_flag"); WRITE_FLAG(cinfo->getNoMtsConstraintFlag() ? 1 : 0, "no_mts_constraint_flag"); +#if JVET_N0276_CONSTRAINT_FLAGS + WRITE_FLAG(cinfo->getNoSbtConstraintFlag() ? 1 : 0, "no_sbt_constraint_flag"); +#endif WRITE_FLAG(cinfo->getNoAffineMotionConstraintFlag() ? 1 : 0, "no_affine_motion_constraint_flag"); WRITE_FLAG(cinfo->getNoGbiConstraintFlag() ? 1 : 0, "no_gbi_constraint_flag"); +#if JVET_N0276_CONSTRAINT_FLAGS + WRITE_FLAG(cinfo->getNoIbcConstraintFlag() ? 1 : 0, "no_ibc_constraint_flag"); +#endif WRITE_FLAG(cinfo->getNoMhIntraConstraintFlag() ? 1 : 0, "no_mh_intra_constraint_flag"); +#if JVET_N0276_CONSTRAINT_FLAGS + WRITE_FLAG(cinfo->getNoFPelMmvdConstraintFlag() ? 1 : 0, "no_fpel_mmvd_constraint_flag"); +#endif WRITE_FLAG(cinfo->getNoTriangleConstraintFlag() ? 1 : 0, "no_triangle_constraint_flag"); WRITE_FLAG(cinfo->getNoLadfConstraintFlag() ? 1 : 0, "no_ladf_constraint_flag"); +#if JVET_N0276_CONSTRAINT_FLAGS + WRITE_FLAG(cinfo->getNoTransformSkipConstraintFlag() ? 1 : 0, "no_transform_skip_constraint_flag"); +#endif +#if !JVET_N0276_CONSTRAINT_FLAGS WRITE_FLAG(cinfo->getNoCurrPicRefConstraintFlag() ? 1 : 0, "no_curr_pic_ref_constraint_flag"); +#endif WRITE_FLAG(cinfo->getNoQpDeltaConstraintFlag() ? 1 : 0, "no_qp_delta_constraint_flag"); WRITE_FLAG(cinfo->getNoDepQuantConstraintFlag() ? 1 : 0, "no_dep_quant_constraint_flag"); WRITE_FLAG(cinfo->getNoSignDataHidingConstraintFlag() ? 1 : 0, "no_sign_data_hiding_constraint_flag");