From db13f0a8fad98211a9242633d49613f026c0496d Mon Sep 17 00:00:00 2001
From: Karsten Suehring <karsten.suehring@hhi.fraunhofer.de>
Date: Wed, 21 Oct 2020 17:08:25 +0200
Subject: [PATCH] remove macro JVET_R0341_GCI

---
 source/App/EncoderApp/EncApp.cpp    | 4 ----
 source/App/EncoderApp/EncAppCfg.cpp | 2 --
 source/App/EncoderApp/EncAppCfg.h   | 2 --
 source/Lib/CommonLib/Slice.cpp      | 2 --
 source/Lib/CommonLib/Slice.h        | 6 ------
 source/Lib/CommonLib/TypeDef.h      | 1 -
 source/Lib/DecoderLib/DecLib.cpp    | 2 --
 source/Lib/DecoderLib/VLCReader.cpp | 2 --
 source/Lib/EncoderLib/EncCfg.h      | 4 ----
 source/Lib/EncoderLib/EncLib.cpp    | 2 --
 source/Lib/EncoderLib/VLCWriter.cpp | 2 --
 11 files changed, 29 deletions(-)

diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp
index 0f1e804b14..e91717bf13 100644
--- a/source/App/EncoderApp/EncApp.cpp
+++ b/source/App/EncoderApp/EncApp.cpp
@@ -467,10 +467,8 @@ void EncApp::xInitLibCfg()
     m_cEncLib.setNoVirtualBoundaryConstraintFlag(m_noVirtualBoundaryConstraintFlag);
     CHECK(m_noVirtualBoundaryConstraintFlag && m_virtualBoundariesEnabledFlag, "Virtuall boundaries shall be deactivated when m_noVirtualBoundaryConstraintFlag is equal to 1");
 #endif
-#if JVET_R0341_GCI
     m_cEncLib.setNoChromaQpOffsetConstraintFlag(m_noChromaQpOffsetConstraintFlag);
     CHECK(m_noChromaQpOffsetConstraintFlag && m_cuChromaQpOffsetSubdiv, "Chroma Qp offset shall be 0 when m_noChromaQpOffsetConstraintFlag is equal to 1");
-#endif
   }
   else
   {
@@ -549,9 +547,7 @@ void EncApp::xInitLibCfg()
     m_cEncLib.setNoPaletteConstraintFlag(false);
     m_cEncLib.setNoActConstraintFlag(false);
     m_cEncLib.setNoLmcsConstraintFlag(false);
-#if JVET_R0341_GCI
     m_cEncLib.setNoChromaQpOffsetConstraintFlag(false);
-#endif
   }
 
   //====== Coding Structure ========
diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp
index 2b8fa67c8a..862ffc973f 100644
--- a/source/App/EncoderApp/EncAppCfg.cpp
+++ b/source/App/EncoderApp/EncAppCfg.cpp
@@ -886,9 +886,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
 #if JVET_S0050_GCI
   ("NoExplicitScaleListConstraintFlag",               m_noExplicitScaleListConstraintFlag,              false, "Indicate that explicit scaling list is deactivated")
 #endif
-#if JVET_R0341_GCI
   ("NoChromaQpOffsetConstraintFlag",                  m_noChromaQpOffsetConstraintFlag,                 false, "Indicate that chroma qp offset is zero")
-#endif
   ("NoDepQuantConstraintFlag",                        m_noDepQuantConstraintFlag,                      false, "Indicate that DQ is deactivated")
   ("NoSignDataHidingConstraintFlag",                  m_noSignDataHidingConstraintFlag,                false, "Indicate that SDH is deactivated")
 #if JVET_R0227_ASPECT3
diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h
index ab61ce497c..c206fb5b2b 100644
--- a/source/App/EncoderApp/EncAppCfg.h
+++ b/source/App/EncoderApp/EncAppCfg.h
@@ -156,9 +156,7 @@ protected:
   bool      m_noVirtualBoundaryConstraintFlag;
 #endif
   bool      m_noMttConstraintFlag;
-#if JVET_R0341_GCI
   bool      m_noChromaQpOffsetConstraintFlag;
-#endif
   bool      m_noQtbttDualTreeIntraConstraintFlag;
 #if JVET_S0066_GCI
   int       m_maxLog2CtuSizeConstraintIdc;
diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp
index eba11bcf8b..4f6ad26882 100644
--- a/source/Lib/CommonLib/Slice.cpp
+++ b/source/Lib/CommonLib/Slice.cpp
@@ -4635,9 +4635,7 @@ bool             operator == (const ConstraintInfo& op1, const ConstraintInfo& o
   if (op1.m_noExplicitScaleListConstraintFlag            != op2.m_noExplicitScaleListConstraintFlag              ) return false;
   if (op1.m_noVirtualBoundaryConstraintFlag              != op2.m_noVirtualBoundaryConstraintFlag                ) return false;
 #endif
-#if JVET_R0341_GCI
   if (op1.m_noChromaQpOffsetConstraintFlag               != op2.m_noChromaQpOffsetConstraintFlag                 ) return false;
-#endif
 #if JVET_Q0114_ASPECT5_GCI_FLAG
   if (op1.m_noRprConstraintFlag                          != op2.m_noRprConstraintFlag                            ) return false;
   if (op1.m_noResChangeInClvsConstraintFlag              != op2.m_noResChangeInClvsConstraintFlag                ) return false;
diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h
index a908407e78..afae7bd131 100644
--- a/source/Lib/CommonLib/Slice.h
+++ b/source/Lib/CommonLib/Slice.h
@@ -285,9 +285,7 @@ class ConstraintInfo
   bool              m_noVirtualBoundaryConstraintFlag;
 #endif
   bool              m_noMttConstraintFlag;
-#if JVET_R0341_GCI
   bool              m_noChromaQpOffsetConstraintFlag;
-#endif
   bool              m_noQtbttDualTreeIntraConstraintFlag;
 #if JVET_S0066_GCI
   int               m_maxLog2CtuSizeConstraintIdc;
@@ -394,9 +392,7 @@ public:
     , m_noVirtualBoundaryConstraintFlag(false)
 #endif
     , m_noMttConstraintFlag(false)
-#if JVET_R0341_GCI
     , m_noChromaQpOffsetConstraintFlag(false)
-#endif
     , m_noQtbttDualTreeIntraConstraintFlag(false)
 #if JVET_S0066_GCI
     , m_maxLog2CtuSizeConstraintIdc(8)
@@ -546,10 +542,8 @@ public:
 #endif
   bool          getNoMttConstraintFlag() const { return m_noMttConstraintFlag; }
   void          setNoMttConstraintFlag(bool bVal) { m_noMttConstraintFlag = bVal; }
-#if JVET_R0341_GCI
   bool          getNoChromaQpOffsetConstraintFlag() const { return m_noChromaQpOffsetConstraintFlag; }
   void          setNoChromaQpOffsetConstraintFlag(bool b) { m_noChromaQpOffsetConstraintFlag = b; }
-#endif
   bool          getNoQtbttDualTreeIntraConstraintFlag() const { return m_noQtbttDualTreeIntraConstraintFlag; }
   void          setNoQtbttDualTreeIntraConstraintFlag(bool bVal) { m_noQtbttDualTreeIntraConstraintFlag = bVal; }
 #if JVET_S0066_GCI
diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h
index 3130b340ad..e68caf8207 100644
--- a/source/Lib/CommonLib/TypeDef.h
+++ b/source/Lib/CommonLib/TypeDef.h
@@ -54,7 +54,6 @@
 //########### place macros to be removed in next cycle below this line ###############
 
 
-#define JVET_R0341_GCI                                    1 // JVET-R0341: on constraint flag for local chroma QP control
 
 #define JVET_S0208_ASPECT1                                1 // JVET-S0208 aspect 1: Remove the extra_sh_bits_struct( ) and extra_ph_bits_struct( ) structures and put their content directly in the SPS.
 
diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp
index ea1ec85f6f..1630d5cc09 100644
--- a/source/Lib/DecoderLib/DecLib.cpp
+++ b/source/Lib/DecoderLib/DecLib.cpp
@@ -1921,12 +1921,10 @@ void DecLib::xCheckParameterSetConstraints(const int layerId)
     CHECK((sps->getUseWP() || sps->getUseWPBiPred()), "When gci_no_weighted_prediction_constraint_flag is equal to 1, the values of sps_weighted_pred_flag and sps_weighted_bipred_flag shall be equal to 0");
   }
 
-#if JVET_R0341_GCI
   if (sps->getProfileTierLevel()->getConstraintInfo()->getNoChromaQpOffsetConstraintFlag())
   {
     CHECK((pps->getCuChromaQpOffsetListEnabledFlag()), "When gci_no_ChromaQpOffset_constraint_flag is equal to 1, the values of pps_cu_chroma_qp_offset_list_enabled_flag shall be equal to 0");
   }
-#endif
 
 #if JVET_S0066_GCI
   CHECK(sps->getCTUSize() > (1 << sps->getProfileTierLevel()->getConstraintInfo()->getMaxLog2CtuSizeConstraintIdc()), "The CTU size specified by sps_log2_ctu_size_minus5 shall not exceed the constraint specified by gci_three_minus_max_log2_ctu_size_constraint_idc");
diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp
index be18cafb00..6c42aa9757 100644
--- a/source/Lib/DecoderLib/VLCReader.cpp
+++ b/source/Lib/DecoderLib/VLCReader.cpp
@@ -5072,9 +5072,7 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo)
 #if JVET_S0050_GCI
     READ_FLAG(symbol, "no_explicit_scaling_list_constraint_flag");   cinfo->setNoExplicitScaleListConstraintFlag(symbol > 0 ? true : false);
 #endif
-#if JVET_R0341_GCI
     READ_FLAG(symbol, "gci_no_chroma_qp_offset_constraint_flag");    cinfo->setNoChromaQpOffsetConstraintFlag(symbol > 0 ? true : false);
-#endif
     READ_FLAG(symbol, "no_lmcs_constraint_flag");                    cinfo->setNoLmcsConstraintFlag(symbol > 0 ? true : false);
     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);
diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h
index ae1d66fb30..1b5a191393 100644
--- a/source/Lib/EncoderLib/EncCfg.h
+++ b/source/Lib/EncoderLib/EncCfg.h
@@ -201,9 +201,7 @@ protected:
   bool      m_noVirtualBoundaryConstraintFlag;
 #endif
   bool      m_noMttConstraintFlag;
-#if JVET_R0341_GCI
   bool      m_noChromaQpOffsetConstraintFlag;
-#endif
   bool      m_noQtbttDualTreeIntraConstraintFlag;
 #if JVET_S0066_GCI
   int       m_maxLog2CtuSizeConstraintIdc;
@@ -857,10 +855,8 @@ public:
 #endif
   bool          getNoMttConstraintFlag() const { return m_noMttConstraintFlag; }
   void          setNoMttConstraintFlag(bool val) { m_noMttConstraintFlag = val; }
-#if JVET_R0341_GCI
   bool      getNoChromaQpOffsetConstraintFlag() const { return m_noChromaQpOffsetConstraintFlag; }
   void      setNoChromaQpOffsetConstraintFlag(bool bVal) { m_noChromaQpOffsetConstraintFlag = bVal; }
-#endif
   bool      getNoQtbttDualTreeIntraConstraintFlag() const { return m_noQtbttDualTreeIntraConstraintFlag; }
   void      setNoQtbttDualTreeIntraConstraintFlag(bool val) { m_noQtbttDualTreeIntraConstraintFlag = val; }
 #if JVET_S0066_GCI
diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp
index 4830ac4650..4560b9a399 100644
--- a/source/Lib/EncoderLib/EncLib.cpp
+++ b/source/Lib/EncoderLib/EncLib.cpp
@@ -1230,9 +1230,7 @@ void EncLib::xInitSPS( SPS& sps )
   cinfo->setNoVirtualBoundaryConstraintFlag(m_noVirtualBoundaryConstraintFlag);
 #endif
   cinfo->setNoMttConstraintFlag(m_noMttConstraintFlag);
-#if JVET_R0341_GCI
   cinfo->setNoChromaQpOffsetConstraintFlag(m_noChromaQpOffsetConstraintFlag);
-#endif
   cinfo->setNoQtbttDualTreeIntraConstraintFlag(m_noQtbttDualTreeIntraConstraintFlag);
   cinfo->setNoPartitionConstraintsOverrideConstraintFlag(m_noPartitionConstraintsOverrideConstraintFlag);
   cinfo->setNoSaoConstraintFlag(m_noSaoConstraintFlag);
diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp
index 751a306426..4398ce5052 100644
--- a/source/Lib/EncoderLib/VLCWriter.cpp
+++ b/source/Lib/EncoderLib/VLCWriter.cpp
@@ -3013,9 +3013,7 @@ void  HLSWriter::codeConstraintInfo  ( const ConstraintInfo* cinfo )
 #if JVET_S0050_GCI
     WRITE_FLAG(cinfo->getNoExplicitScaleListConstraintFlag() ? 1 : 0, "no_explicit_scaling_list_constraint_flag");
 #endif
-#if JVET_R0341_GCI
     WRITE_FLAG(cinfo->getNoChromaQpOffsetConstraintFlag() ? 1 : 0, "gic_no_chroma_qp_offset_constraint_flag");
-#endif
     WRITE_FLAG(cinfo->getNoLmcsConstraintFlag() ? 1 : 0, "no_lmcs_constraint_flag");
     WRITE_FLAG(cinfo->getNoQpDeltaConstraintFlag() ? 1 : 0, "no_qp_delta_constraint_flag");
     WRITE_FLAG(cinfo->getNoDepQuantConstraintFlag() ? 1 : 0, "no_dep_quant_constraint_flag");
-- 
GitLab