From e466ecd7866d6e898ec5b1c4e5f3def3136b53bf Mon Sep 17 00:00:00 2001
From: Karsten Suehring <karsten.suehring@hhi.fraunhofer.de>
Date: Tue, 25 Jan 2022 13:09:59 +0100
Subject: [PATCH] remove macro JVET_X0101_ADD_WRAPAROUND_CONSTRAINT

---
 source/App/EncoderApp/EncAppCfg.cpp | 2 --
 source/Lib/CommonLib/Mv.cpp         | 8 --------
 source/Lib/CommonLib/TypeDef.h      | 1 -
 source/Lib/EncoderLib/EncGOP.cpp    | 8 --------
 source/Lib/EncoderLib/EncLib.cpp    | 2 --
 5 files changed, 21 deletions(-)

diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp
index cd8274ca1..a08827cfa 100644
--- a/source/App/EncoderApp/EncAppCfg.cpp
+++ b/source/App/EncoderApp/EncAppCfg.cpp
@@ -4758,12 +4758,10 @@ void EncAppCfg::xPrintParameter()
   if( m_constrainedRaslEncoding )
   {
     msg(VERBOSE, "\n\nWarning: with SEIConstrainedRASL enabled, LMChroma estimation is skipped in RASL frames" );
-#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT
     if( m_wrapAround )
     {
       msg(VERBOSE,   "\n         and wrap-around motion compensation is disabled in RASL frames" );
     }
-#endif
   }
 
   msg( VERBOSE, "\n\n");
diff --git a/source/Lib/CommonLib/Mv.cpp b/source/Lib/CommonLib/Mv.cpp
index 61ebeff86..61e95aa47 100644
--- a/source/Lib/CommonLib/Mv.cpp
+++ b/source/Lib/CommonLib/Mv.cpp
@@ -55,11 +55,7 @@ void (*clipMv) ( Mv& rcMv, const struct Position& pos, const struct Size& size,
 
 void clipMvInPic ( Mv& rcMv, const struct Position& pos, const struct Size& size, const class SPS& sps, const class PPS& pps )
 {
-#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT
   if (pps.getWrapAroundEnabledFlag())
-#else
-  if (sps.getWrapAroundEnabledFlag())
-#endif
   {
     wrapClipMv(rcMv, pos, size, &sps, &pps);
     return;
@@ -79,11 +75,7 @@ void clipMvInPic ( Mv& rcMv, const struct Position& pos, const struct Size& size
 
 void clipMvInSubpic ( Mv& rcMv, const struct Position& pos, const struct Size& size, const class SPS& sps, const class PPS& pps )
 {
-#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT
   if (pps.getWrapAroundEnabledFlag())
-#else
-  if (sps.getWrapAroundEnabledFlag())
-#endif
   {
     wrapClipMv(rcMv, pos, size, &sps, &pps);
     return;
diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h
index 95ad95c0d..318c906b9 100644
--- a/source/Lib/CommonLib/TypeDef.h
+++ b/source/Lib/CommonLib/TypeDef.h
@@ -60,7 +60,6 @@
 
 
 
-#define JVET_X0101_ADD_WRAPAROUND_CONSTRAINT              1 // JVET-X0101 add WrapAround constraint for Constrained RASL Encoding SEI message
 
 #define JVET_X0048_X0103_FILM_GRAIN                       1 // JVET-X0048-X0103: SMPTE RDD-5 based film grain analysis and synthesis model for film grain characterstics (FGC) SEI
 
diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp
index dd80973a2..04ecaa4b4 100644
--- a/source/Lib/EncoderLib/EncGOP.cpp
+++ b/source/Lib/EncoderLib/EncGOP.cpp
@@ -381,9 +381,7 @@ int EncGOP::xWritePPS( AccessUnit &accessUnit, const PPS *pps, const int layerId
   OutputNALUnit nalu(NAL_UNIT_PPS);
   m_HLSWriter->setBitstream( &nalu.m_Bitstream );
   nalu.m_nuhLayerId = layerId;
-#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT
   nalu.m_temporalId = accessUnit.temporalId;
-#endif
   CHECK( nalu.m_temporalId < accessUnit.temporalId, "TemporalId shall be greater than or equal to the TemporalId of the layer access unit containing the NAL unit" );
   m_HLSWriter->codePPS( pps );
   accessUnit.push_back(new NALUnitEBSP(nalu));
@@ -2331,7 +2329,6 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
                 iNumPicRcvd, iTimeOffset, pcPic, pocCurr, isField );
     picHeader = pcPic->cs->picHeader;
     picHeader->setSPSId( pcPic->cs->pps->getSPSId() );
-#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT
     if( getNalUnitType(pocCurr, m_iLastIDR, isField) == NAL_UNIT_CODED_SLICE_RASL && m_pcCfg->getRprRASLtoolSwitch() && m_pcCfg->getUseWrapAround() )
     {
       picHeader->setPPSId( 4 );
@@ -2341,9 +2338,6 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
     {
       picHeader->setPPSId( pcPic->cs->pps->getPPSId() );
     }
-#else
-    picHeader->setPPSId( pcPic->cs->pps->getPPSId() );
-#endif
     picHeader->setSplitConsOverrideFlag(false);
     // initial two flags to be false
     picHeader->setPicInterSliceAllowedFlag(false);
@@ -3060,9 +3054,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
       pcSlice->setDisableLmChromaCheck( true );
       picHeader->setDmvrDisabledFlag( true );
       xUpdateRPRtmvp( picHeader, pcSlice );
-#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT
       CHECK( pcSlice->getPPS()->getWrapAroundEnabledFlag(), "pps_ref_wraparound_enabled_flag should be 0 with constrained RASL encoding" );
-#endif
     }
     
     double lambda            = 0.0;
diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp
index 613bdeda0..54d1928ae 100644
--- a/source/Lib/EncoderLib/EncLib.cpp
+++ b/source/Lib/EncoderLib/EncLib.cpp
@@ -293,7 +293,6 @@ void EncLib::init(AUWriterIf *auWriterIf)
     xInitPPS(pps2, sps0);
     xInitPPSforLT(pps2);
   }
-#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT
   if( this->m_rprRASLtoolSwitch && m_wrapAround )
   {
     PPS &pps4 = *(m_ppsMap.allocatePS(4));
@@ -304,7 +303,6 @@ void EncLib::init(AUWriterIf *auWriterIf)
     pps4.setPicWidthMinusWrapAroundOffset( 0 );
     pps4.setWrapAroundOffset             ( 0 );
   }
-#endif
   xInitPicHeader(m_picHeader, sps0, pps0);
 
   // initialize processing unit classes
-- 
GitLab