From be969de43983a65b6048e4574c3062b547506b0d Mon Sep 17 00:00:00 2001
From: Frederic Barbier <frederic.barbier@allegrodvt.com>
Date: Thu, 9 May 2019 16:53:04 +0200
Subject: [PATCH] Cleanup trailing whitespaces

---
 source/App/EncoderApp/EncApp.cpp              |  2 +-
 source/App/EncoderApp/EncAppCfg.cpp           |  8 +-
 source/App/EncoderApp/EncAppCfg.h             |  2 +-
 source/App/Parcat/parcat.cpp                  |  2 +-
 source/Lib/CommonLib/AdaptiveLoopFilter.cpp   | 10 +--
 source/Lib/CommonLib/AdaptiveLoopFilter.h     |  2 +-
 source/Lib/CommonLib/Buffer.h                 | 16 ++--
 source/Lib/CommonLib/Common.h                 |  2 +-
 source/Lib/CommonLib/Contexts.cpp             |  2 +-
 source/Lib/CommonLib/DepQuant.cpp             |  2 +-
 source/Lib/CommonLib/IbcHashMap.cpp           | 14 +--
 source/Lib/CommonLib/InterPrediction.cpp      | 14 +--
 source/Lib/CommonLib/IntraPrediction.cpp      | 32 +++----
 source/Lib/CommonLib/IntraPrediction.h        | 22 ++---
 .../Lib/CommonLib/MatrixIntraPrediction.cpp   |  8 +-
 source/Lib/CommonLib/MatrixIntraPrediction.h  |  2 +-
 source/Lib/CommonLib/Mv.h                     |  2 +-
 source/Lib/CommonLib/RdCost.cpp               |  2 +-
 source/Lib/CommonLib/Slice.cpp                |  6 +-
 source/Lib/CommonLib/Slice.h                  | 10 +--
 source/Lib/CommonLib/TrQuant.cpp              |  4 +-
 source/Lib/CommonLib/TypeDef.h                | 10 +--
 source/Lib/CommonLib/UnitTools.cpp            | 14 +--
 source/Lib/CommonLib/UnitTools.h              |  6 +-
 .../Lib/CommonLib/x86/AdaptiveLoopFilterX86.h | 14 +--
 source/Lib/DecoderLib/CABACReader.cpp         | 34 +++----
 source/Lib/DecoderLib/DecLib.cpp              |  4 +-
 source/Lib/DecoderLib/VLCReader.cpp           | 10 +--
 source/Lib/EncoderLib/CABACWriter.cpp         | 22 ++---
 .../Lib/EncoderLib/EncAdaptiveLoopFilter.cpp  | 26 +++---
 source/Lib/EncoderLib/EncCfg.h                |  6 +-
 source/Lib/EncoderLib/EncCu.cpp               | 18 ++--
 source/Lib/EncoderLib/EncGOP.cpp              |  6 +-
 source/Lib/EncoderLib/EncLib.cpp              |  2 +-
 source/Lib/EncoderLib/EncModeCtrl.cpp         |  2 +-
 source/Lib/EncoderLib/EncSlice.cpp            |  2 +-
 source/Lib/EncoderLib/InterSearch.cpp         | 68 +++++++-------
 source/Lib/EncoderLib/IntraSearch.cpp         | 90 +++++++++----------
 source/Lib/EncoderLib/VLCWriter.cpp           |  4 +-
 39 files changed, 251 insertions(+), 251 deletions(-)

diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp
index a66de87e6..ee45301ed 100644
--- a/source/App/EncoderApp/EncApp.cpp
+++ b/source/App/EncoderApp/EncApp.cpp
@@ -290,7 +290,7 @@ void EncApp::xInitLibCfg()
   m_cEncLib.setUseAffineAmvr                                     ( m_AffineAmvr );
   m_cEncLib.setUseAffineAmvrEncOpt                               ( m_AffineAmvrEncOpt );
   m_cEncLib.setDMVR                                              ( m_DMVR );
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   m_cEncLib.setMMVD                                              ( m_MMVD );
 #endif
 #if JVET_N0449_MMVD_SIMP
diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp
index 1999011a0..54c18bc77 100644
--- a/source/App/EncoderApp/EncAppCfg.cpp
+++ b/source/App/EncoderApp/EncAppCfg.cpp
@@ -839,9 +839,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
   ( "FastLFNST",                                      m_useFastLFNST,                                   false, "Fast methods for LFNST" )
 #endif
   ("SubPuMvp",                                       m_SubPuMvpMode,                                       0, "Enable Sub-PU temporal motion vector prediction (0:off, 1:ATMVP, 2:STMVP, 3:ATMVP+STMVP)  [default: off]")
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   ("MMVD",                                           m_MMVD,                                            true, "Enable Merge mode with Motion Vector Difference (0:off, 1:on)  [default: 1]")
-#endif 
+#endif
   ("Affine",                                         m_Affine,                                         false, "Enable affine prediction (0:off, 1:on)  [default: off]")
   ("AffineType",                                     m_AffineType,                                     true,  "Enable affine type prediction (0:off, 1:on)  [default: on]" )
   ("BIO",                                            m_BIO,                                             false, "Enable bi-directional optical flow")
@@ -3166,7 +3166,7 @@ void EncAppCfg::xPrintParameter()
 #if JVET_N0193_LFNST
     msg( VERBOSE, "LFNST:%d ", m_LFNST );
 #endif
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     msg( VERBOSE, "MMVD:%d ", m_MMVD);
 #endif
     msg( VERBOSE, "Affine:%d ", m_Affine );
@@ -3199,7 +3199,7 @@ void EncAppCfg::xPrintParameter()
 #endif
     msg(VERBOSE, "MHIntra:%d ", m_MHIntra);
     msg( VERBOSE, "Triangle:%d ", m_Triangle );
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     m_allowDisFracMMVD = m_MMVD ? m_allowDisFracMMVD : false;
     if ( m_MMVD )
       msg(VERBOSE, "AllowDisFracMMVD:%d ", m_allowDisFracMMVD);
diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h
index ee5da61d3..69a21da61 100644
--- a/source/App/EncoderApp/EncAppCfg.h
+++ b/source/App/EncoderApp/EncAppCfg.h
@@ -274,7 +274,7 @@ protected:
   bool      m_AffineAmvr;
   bool      m_AffineAmvrEncOpt;
   bool      m_DMVR;
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   bool      m_MMVD;
 #endif
 #if JVET_N0449_MMVD_SIMP
diff --git a/source/App/Parcat/parcat.cpp b/source/App/Parcat/parcat.cpp
index d85c356d8..7c9cf61c0 100644
--- a/source/App/Parcat/parcat.cpp
+++ b/source/App/Parcat/parcat.cpp
@@ -264,7 +264,7 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int
     int poc = -1;
     int poc_lsb = -1;
     int new_poc = -1;
-    
+
     if(nalu_type == NAL_UNIT_CODED_SLICE_IDR_W_RADL || nalu_type == NAL_UNIT_CODED_SLICE_IDR_N_LP)
     {
       poc = 0;
diff --git a/source/Lib/CommonLib/AdaptiveLoopFilter.cpp b/source/Lib/CommonLib/AdaptiveLoopFilter.cpp
index 35cabdcb5..6a91be086 100644
--- a/source/Lib/CommonLib/AdaptiveLoopFilter.cpp
+++ b/source/Lib/CommonLib/AdaptiveLoopFilter.cpp
@@ -753,7 +753,7 @@ void AdaptiveLoopFilter::deriveClassification( AlfClassifier** classifier, const
     for( int j = blk.pos().x; j < width; j += m_CLASSIFICATION_BLK_SIZE )
     {
       int nWidth = std::min( j + m_CLASSIFICATION_BLK_SIZE, width ) - j;
-#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION   
+#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION
       m_deriveClassificationBlk(classifier, m_laplacian, srcLuma, Area(j, i, nWidth, nHeight), m_inputBitDepth[CHANNEL_TYPE_LUMA] + 4
         , m_alfVBLumaCTUHeight
         , ((i + nHeight >= m_picHeight) ? m_picHeight : m_alfVBLumaPos)
@@ -761,7 +761,7 @@ void AdaptiveLoopFilter::deriveClassification( AlfClassifier** classifier, const
 #else
       m_deriveClassificationBlk(classifier, m_laplacian, srcLuma, Area(j, i, nWidth, nHeight), m_inputBitDepth[CHANNEL_TYPE_LUMA] + 4);
 #endif
-     
+
     }
   }
 }
@@ -815,7 +815,7 @@ void AdaptiveLoopFilter::resetPCMBlkClassInfo(CodingStructure & cs,  AlfClassifi
   }
 }
 
-#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION  
+#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION
 void AdaptiveLoopFilter::deriveClassificationBlk(AlfClassifier** classifier, int** laplacian[NUM_DIRECTIONS], const CPelBuf& srcLuma, const Area& blk, const int shift,  int vbCTUHeight, int vbPos)
 #else
 void AdaptiveLoopFilter::deriveClassificationBlk(AlfClassifier** classifier, int** laplacian[NUM_DIRECTIONS], const CPelBuf& srcLuma, const Area& blk, const int shift)
@@ -846,7 +846,7 @@ void AdaptiveLoopFilter::deriveClassificationBlk(AlfClassifier** classifier, int
     const Pel *src1 = &src[yoffset];
     const Pel *src2 = &src[yoffset + stride];
     const Pel *src3 = &src[yoffset + stride * 2];
-#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION    
+#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION
     if (((posY - 2 + i) > 0) && ((posY - 2 + i) % vbCTUHeight) == (vbPos - 2))
     {
       src3 = &src[yoffset + stride];
@@ -855,7 +855,7 @@ void AdaptiveLoopFilter::deriveClassificationBlk(AlfClassifier** classifier, int
     {
       src0 = &src[yoffset];
     }
-#endif 
+#endif
     int* pYver = laplacian[VER][i];
     int* pYhor = laplacian[HOR][i];
     int* pYdig0 = laplacian[DIAG0][i];
diff --git a/source/Lib/CommonLib/AdaptiveLoopFilter.h b/source/Lib/CommonLib/AdaptiveLoopFilter.h
index b7cd45018..b41fd6ff9 100644
--- a/source/Lib/CommonLib/AdaptiveLoopFilter.h
+++ b/source/Lib/CommonLib/AdaptiveLoopFilter.h
@@ -98,7 +98,7 @@ public:
   static void deriveClassificationBlk(AlfClassifier** classifier, int** laplacian[NUM_DIRECTIONS], const CPelBuf& srcLuma, const Area& blk, const int shift, int vbCTUHeight, int vbPos);
 #else
   static void deriveClassificationBlk(AlfClassifier** classifier, int** laplacian[NUM_DIRECTIONS], const CPelBuf& srcLuma, const Area& blk, const int shift);
-#endif 
+#endif
   void deriveClassification( AlfClassifier** classifier, const CPelBuf& srcLuma, const Area& blk );
   void resetPCMBlkClassInfo(CodingStructure & cs, AlfClassifier** classifier, const CPelBuf& srcLuma, const Area& blk);
   template<AlfFilterType filtType>
diff --git a/source/Lib/CommonLib/Buffer.h b/source/Lib/CommonLib/Buffer.h
index 43705282c..10a9788b4 100644
--- a/source/Lib/CommonLib/Buffer.h
+++ b/source/Lib/CommonLib/Buffer.h
@@ -365,18 +365,18 @@ void AreaBuf<T>::copyAndNegate( const AreaBuf<const T> &other )
 {
   CHECK( width  != other.width,  "Incompatible size" );
   CHECK( height != other.height, "Incompatible size" );
-  
+
         T* dest =       buf;
   const T* subs = other.buf;
-  
+
 #define SUBS_INC        \
   dest +=       stride; \
   subs += other.stride; \
 
 #define SUBS_OP( ADDR ) dest[ADDR] = -subs[ADDR]
-  
+
   SIZE_AWARE_PER_EL_OP( SUBS_OP, SUBS_INC );
-  
+
 #undef SUBS_OP
 #undef SUBS_INC
 }
@@ -386,18 +386,18 @@ void AreaBuf<T>::subtractAndHalve( const AreaBuf<const T> &other )
 {
   CHECK( width  != other.width,  "Incompatible size" );
   CHECK( height != other.height, "Incompatible size" );
-  
+
         T* dest =       buf;
   const T* subs = other.buf;
-  
+
 #define SUBS_INC        \
   dest +=       stride; \
   subs += other.stride; \
 
 #define SUBS_OP( ADDR ) dest[ADDR] = ( dest[ADDR] - subs[ADDR] ) / 2
-  
+
   SIZE_AWARE_PER_EL_OP( SUBS_OP, SUBS_INC );
-  
+
 #undef SUBS_OP
 #undef SUBS_INC
 }
diff --git a/source/Lib/CommonLib/Common.h b/source/Lib/CommonLib/Common.h
index 0b78a598d..2d40a5364 100644
--- a/source/Lib/CommonLib/Common.h
+++ b/source/Lib/CommonLib/Common.h
@@ -259,7 +259,7 @@ public:
   }
 };
 
-#if JVET_N0217_MATRIX_INTRAPRED  
+#if JVET_N0217_MATRIX_INTRAPRED
 struct AvailableInfo
 {
   int  maxPosTop;
diff --git a/source/Lib/CommonLib/Contexts.cpp b/source/Lib/CommonLib/Contexts.cpp
index ac667db9b..f4cf6cae8 100644
--- a/source/Lib/CommonLib/Contexts.cpp
+++ b/source/Lib/CommonLib/Contexts.cpp
@@ -940,7 +940,7 @@ const unsigned ContextSetCfg::NumberOfContexts = (unsigned)ContextSetCfg::sm_Ini
 // combined sets
 const CtxSet ContextSetCfg::Sao = { ContextSetCfg::SaoMergeFlag, ContextSetCfg::SaoTypeIdx };
 
-#if JVET_N0415_CTB_ALF  
+#if JVET_N0415_CTB_ALF
 const CtxSet ContextSetCfg::Alf = { ContextSetCfg::ctbAlfFlag, ContextSetCfg::AlfUseLatestFilt, ContextSetCfg::AlfUseTemporalFilt };
 #endif
 
diff --git a/source/Lib/CommonLib/DepQuant.cpp b/source/Lib/CommonLib/DepQuant.cpp
index 37b8f9b31..c27d19590 100644
--- a/source/Lib/CommonLib/DepQuant.cpp
+++ b/source/Lib/CommonLib/DepQuant.cpp
@@ -1274,7 +1274,7 @@ namespace DQIntern
         TCoeff sumGt1 = sumAbs1 - sumNum;
         m_sigFracBits = m_sigFracBitsArray[scanInfo.sigCtxOffsetNext + (sumAbs1 < 5 ? sumAbs1 : 5)];
         m_coeffFracBits = m_gtxFracBitsArray[scanInfo.gtxCtxOffsetNext + (sumGt1 < 4 ? sumGt1 : 4)];
- 
+
 #if JVET_N0188_UNIFY_RICEPARA
         TCoeff  sumAbs = m_absLevelsAndCtxInit[8 + scanInfo.nextInsidePos] >> 8;
 #define UPDATE(k) {TCoeff t=levels[scanInfo.nextNbInfoSbb.inPos[k]]; sumAbs+=t; }
diff --git a/source/Lib/CommonLib/IbcHashMap.cpp b/source/Lib/CommonLib/IbcHashMap.cpp
index 7107169a2..376f70a1b 100644
--- a/source/Lib/CommonLib/IbcHashMap.cpp
+++ b/source/Lib/CommonLib/IbcHashMap.cpp
@@ -274,7 +274,7 @@ bool IbcHashMap::ibcHashMatch(const Area& lumaArea, std::vector<Position>& cand,
   // find the block with least candidates
   size_t minSize = MAX_UINT;
   unsigned int targetHashOneBlock = 0;
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   Position targetBlockOffsetInCu(0, 0);
 #endif
   for (SizeType y = 0; y < lumaArea.height && minSize > 1; y += MIN_PU_SIZE)
@@ -286,7 +286,7 @@ bool IbcHashMap::ibcHashMatch(const Area& lumaArea, std::vector<Position>& cand,
       {
         minSize = m_hash2Pos[hash].size();
         targetHashOneBlock = hash;
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
         targetBlockOffsetInCu.repositionTo(Position(x, y));
 #endif
       }
@@ -300,7 +300,7 @@ bool IbcHashMap::ibcHashMatch(const Area& lumaArea, std::vector<Position>& cand,
     // check whether whole block match
     for (std::vector<Position>::iterator refBlockPos = candOneBlock.begin(); refBlockPos != candOneBlock.end(); refBlockPos++)
     {
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
       Position topLeft = refBlockPos->offset(-targetBlockOffsetInCu.x, -targetBlockOffsetInCu.y);
       Position bottomRight = topLeft.offset(lumaArea.width - 1, lumaArea.height - 1);
 #else
@@ -309,7 +309,7 @@ bool IbcHashMap::ibcHashMatch(const Area& lumaArea, std::vector<Position>& cand,
       bool wholeBlockMatch = true;
       if (lumaArea.width > MIN_PU_SIZE || lumaArea.height > MIN_PU_SIZE)
       {
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
         if (!cs.isDecomp(bottomRight, CHANNEL_TYPE_LUMA) || bottomRight.x >= m_picWidth || bottomRight.y >= m_picHeight || topLeft.x < 0 || topLeft.y < 0)
 #else
         if (!cs.isDecomp(bottomRight, cs.chType) || bottomRight.x >= m_picWidth || bottomRight.y >= m_picHeight)
@@ -322,7 +322,7 @@ bool IbcHashMap::ibcHashMatch(const Area& lumaArea, std::vector<Position>& cand,
           for (SizeType x = 0; x < lumaArea.width && wholeBlockMatch; x += MIN_PU_SIZE)
           {
             // whether the reference block and current block has the same hash
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
             wholeBlockMatch &= (m_pos2Hash[lumaArea.pos().y + y][lumaArea.pos().x + x] == m_pos2Hash[topLeft.y + y][topLeft.x + x]);
 #else
             wholeBlockMatch &= (m_pos2Hash[lumaArea.pos().y + y][lumaArea.pos().x + x] == m_pos2Hash[refBlockPos->y + y][refBlockPos->x + x]);
@@ -332,7 +332,7 @@ bool IbcHashMap::ibcHashMatch(const Area& lumaArea, std::vector<Position>& cand,
       }
       else
       {
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
         CHECK(topLeft != *refBlockPos, "4x4 target block should not have offset!");
         if (abs(topLeft.x - lumaArea.x) > searchRange4SmallBlk || abs(topLeft.y - lumaArea.y) > searchRange4SmallBlk || !cs.isDecomp(bottomRight, CHANNEL_TYPE_LUMA))
 #else
@@ -344,7 +344,7 @@ bool IbcHashMap::ibcHashMatch(const Area& lumaArea, std::vector<Position>& cand,
       }
       if (wholeBlockMatch)
       {
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
         cand.push_back(topLeft);
 #else
         cand.push_back(*refBlockPos);
diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp
index f29ac7f6c..e919ed8cd 100644
--- a/source/Lib/CommonLib/InterPrediction.cpp
+++ b/source/Lib/CommonLib/InterPrediction.cpp
@@ -799,7 +799,7 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
 }
 
 #if JVET_N0068_AFFINE_MEM_BW
-bool InterPrediction::isSubblockVectorSpreadOverLimit( int a, int b, int c, int d, int predType ) 
+bool InterPrediction::isSubblockVectorSpreadOverLimit( int a, int b, int c, int d, int predType )
 {
   int s4 = ( 4 << 11 );
   int filterTap = 6;
@@ -1101,7 +1101,7 @@ void InterPrediction::applyBiOptFlow(const PredictionUnit &pu, const CPelUnitBuf
   const int   bitDepth = clipBitDepths.recon[toChannelType(COMPONENT_Y)];
   const int   shiftNum = IF_INTERNAL_PREC + 1 - bitDepth;
   const int   offset = (1 << (shiftNum - 1)) + 2 * IF_INTERNAL_OFFS;
-#if JVET_N0325_BDOF 
+#if JVET_N0325_BDOF
   const int   limit = (1<<(std::max<int>(5, bitDepth - 7)));
 #else
   const int   limit = (bitDepth>12)? 2 : ((int)1 << (4 + IF_INTERNAL_PREC - bitDepth - 5));
@@ -1373,15 +1373,15 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
         }
       }
 
-      if (bioApplied && pu.cu->smvdMode) 
+      if (bioApplied && pu.cu->smvdMode)
 	  {
         bioApplied = false;
       }
-      if (pu.cu->cs->sps->getUseGBi() && bioApplied && pu.cu->GBiIdx != GBI_DEFAULT) 
+      if (pu.cu->cs->sps->getUseGBi() && bioApplied && pu.cu->GBiIdx != GBI_DEFAULT)
 	  {
         bioApplied = false;
       }
-      if (pu.mmvdEncOptMode == 2 && pu.mmvdMergeFlag) 
+      if (pu.mmvdEncOptMode == 2 && pu.mmvdMergeFlag)
 	  {
         bioApplied = false;
       }
@@ -2015,7 +2015,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
         xFinalPaddedMCForDMVR(subPu, srcPred0, srcPred1, m_cYuvRefBuffSubCuDMVRL0, m_cYuvRefBuffSubCuDMVRL1, bioApplied, mergeMv);
 
         subPredBuf.bufs[COMPONENT_Y].buf  = pcYuvDst.bufs[COMPONENT_Y].buf + xStart + yStart * dstStride[COMPONENT_Y];
-#if !JVET_N0671_DMVR 
+#if !JVET_N0671_DMVR
         subPredBuf.bufs[COMPONENT_Cb].buf = pcYuvDst.bufs[COMPONENT_Cb].buf + (xStart >> 1) + ((yStart >> 1) * dstStride[COMPONENT_Cb]);
         subPredBuf.bufs[COMPONENT_Cr].buf = pcYuvDst.bufs[COMPONENT_Cr].buf + (xStart >> 1) + ((yStart >> 1) * dstStride[COMPONENT_Cr]);
 #else
@@ -2026,7 +2026,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
         scaleX =  getComponentScaleX(COMPONENT_Cr, pu.chromaFormat);
         scaleY =  getComponentScaleY(COMPONENT_Cr, pu.chromaFormat);
         subPredBuf.bufs[COMPONENT_Cr].buf = pcYuvDst.bufs[COMPONENT_Cr].buf + (xStart >> scaleX) + ((yStart >> scaleY) * dstStride[COMPONENT_Cr]);
-#endif // !JVET_N0671_DMVR 
+#endif // !JVET_N0671_DMVR
 
         xWeightedAverage(subPu, srcPred0, srcPred1, subPredBuf, subPu.cu->slice->getSPS()->getBitDepths(), subPu.cu->slice->clpRngs(), bioApplied);
         num++;
diff --git a/source/Lib/CommonLib/IntraPrediction.cpp b/source/Lib/CommonLib/IntraPrediction.cpp
index f0b4423b4..d148ef9ad 100644
--- a/source/Lib/CommonLib/IntraPrediction.cpp
+++ b/source/Lib/CommonLib/IntraPrediction.cpp
@@ -571,10 +571,10 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA
     m_ipaParam.applyPDPC            &= m_ipaParam.intraPredAngle == 0 || m_ipaParam.intraPredAngle >= 12; // intra prediction modes: HOR, VER, x, where x>=VDIA-8 or x<=2+8
   }
 
-  // high level conditions and DC intra prediction 
-  if(   sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag() 
+  // high level conditions and DC intra prediction
+  if(   sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag()
 #if JVET_N0671_INTRA_TPM_ALIGNWITH420
-    || !isLuma( chType ) 
+    || !isLuma( chType )
 #else
     || ( !isLuma( chType ) && pu.chromaFormat != CHROMA_444 )
 #endif
@@ -582,7 +582,7 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA
     || m_ipaParam.multiRefIndex
     || DC_IDX == dirMode
     )
-  {   
+  {
     if (useISP)
     {
       m_ipaParam.interpolationFlag = (m_ipaParam.isModeVer ? puSize.width : puSize.height) > 8 ? true : false ;
@@ -594,13 +594,13 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA
     m_ipaParam.refFilterFlag = false;
   }
 #endif
-  else if (dirMode == PLANAR_IDX) // Planar intra prediction 
+  else if (dirMode == PLANAR_IDX) // Planar intra prediction
   {
     m_ipaParam.refFilterFlag = puSize.width * puSize.height > 32 ? true : false;
   }
   else if (!useISP)// HOR, VER and angular modes (MDIS)
   {
-    bool filterFlag = false; 
+    bool filterFlag = false;
 
     if (predMode != dirMode ) // wide-anlge mode
     {
@@ -617,7 +617,7 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA
     // Selelection of either ([1 2 1] / 4 ) refrence filter OR Gaussian 4-tap interpolation filter
     if (filterFlag)
     {
-      const bool isRefFilter       =  isIntegerSlope(absAng); 
+      const bool isRefFilter       =  isIntegerSlope(absAng);
 #if JVET_N0435_WAIP_HARMONIZATION
       m_ipaParam.refFilterFlag = isRefFilter && puSize.width * puSize.height > 32;
 #else
@@ -649,7 +649,7 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch
   const bool bIsModeVer     = m_ipaParam.isModeVer;
   const int  whRatio        = m_ipaParam.whRatio;
   const int  hwRatio        = m_ipaParam.hwRatio;
-  const int  multiRefIdx    = m_ipaParam.multiRefIndex;            
+  const int  multiRefIdx    = m_ipaParam.multiRefIndex;
   const int  intraPredAngle = m_ipaParam.intraPredAngle;
   const int  invAngle       = m_ipaParam.invAngle;
 
@@ -798,7 +798,7 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch
       CHECK(scale < 0 || scale > 31, "PDPC: scale < 0 || scale > 31");
       if (m_ipaParam.applyPDPC)
       {
-        if (m_ipaParam.intraPredAngle == 32) // intra prediction modes: 2 and VDIA 
+        if (m_ipaParam.intraPredAngle == 32) // intra prediction modes: 2 and VDIA
         {
           int wT = 16 >> std::min(31, ((y << 1) >> scale));
 
@@ -1586,7 +1586,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
   }
   //assert 420 chroma subsampling
   CompArea lumaArea = CompArea( COMPONENT_Y, pu.chromaFormat, chromaArea.lumaPos(), recalcSize( pu.chromaFormat, CHANNEL_TYPE_CHROMA, CHANNEL_TYPE_LUMA, chromaArea.size() ) );//needed for correct pos/size (4x4 Tus)
-  
+
 #if JVET_N0671_CCLM
   CHECK(lumaArea.width == chromaArea.width && CHROMA_444 != pu.chromaFormat, "");
   CHECK(lumaArea.height == chromaArea.height && CHROMA_444 != pu.chromaFormat && CHROMA_422 != pu.chromaFormat, "");
@@ -1723,7 +1723,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
       {
         piSrc = pRecSrc0 - iRecStride;
 
-#if JVET_N0671_CCLM 
+#if JVET_N0671_CCLM
         if ((i == 0 && !bLeftAvaillable) || (i == uiCWidth + addedAboveRight - 1 + logSubWidthC))
 #else //!JVET_N0671_CCLM
         if (i == 0 && !bLeftAvaillable)
@@ -1747,7 +1747,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
       else if( pu.cs->sps->getCclmCollocatedChromaFlag() )
       {
         piSrc = pRecSrc0 - iRecStride2;
-        
+
 #if JVET_N0671_CCLM
         if ((i == 0 && !bLeftAvaillable) || (i == uiCWidth + addedAboveRight - 1 + logSubWidthC))
 #else //!JVET_N0671_CCLM
@@ -1778,7 +1778,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
       else
       {
         piSrc = pRecSrc0 - iRecStride2;
-        
+
 #if JVET_N0671_CCLM
         if ((i == 0 && !bLeftAvaillable) || (i == uiCWidth + addedAboveRight - 1 + logSubWidthC))
 #else //!JVET_N0671_CCLM
@@ -1822,7 +1822,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
     {
       addedLeftBelow = avaiLeftBelowUnits*chromaUnitHeight;
     }
-    
+
     for (int j = 0; j < uiCHeight + addedLeftBelow; j++)
     {
       if( pu.cs->sps->getCclmCollocatedChromaFlag() )
@@ -1926,7 +1926,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
       else
       {
 
-#if JVET_N0671_CCLM 
+#if JVET_N0671_CCLM
         if ((i == 0 && !bLeftAvaillable) || (i == uiCWidth - 1 + logSubWidthC))
 #else //JVET_N0671_CCLM
         if ( i == 0 && !bLeftAvaillable )
@@ -2130,7 +2130,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
     }
   }
   cnt = cntL + cntT;
- 
+
   if (cnt == 2)
   {
     selectLumaPix[3] = selectLumaPix[0]; selectChromaPix[3] = selectChromaPix[0];
diff --git a/source/Lib/CommonLib/IntraPrediction.h b/source/Lib/CommonLib/IntraPrediction.h
index 02df59b8a..2bcf51bc5 100644
--- a/source/Lib/CommonLib/IntraPrediction.h
+++ b/source/Lib/CommonLib/IntraPrediction.h
@@ -77,7 +77,7 @@ private:
 
   static const uint8_t m_aucIntraFilter[MAX_NUM_CHANNEL_TYPE][MAX_INTRA_FILTER_DEPTHS];
 
-  struct IntraPredParam //parameters of Intra Prediction 
+  struct IntraPredParam //parameters of Intra Prediction
   {
     bool refFilterFlag;
     bool applyPDPC;
@@ -89,15 +89,15 @@ private:
     int  invAngle;
     bool interpolationFlag;
 
-    IntraPredParam() : 
-      refFilterFlag     ( false                           ), 
-      applyPDPC         ( false                           ), 
-      isModeVer         ( false                           ), 
-      multiRefIndex     ( -1                              ), 
-      whRatio           ( 0                               ), 
-      hwRatio           ( 0                               ), 
+    IntraPredParam() :
+      refFilterFlag     ( false                           ),
+      applyPDPC         ( false                           ),
+      isModeVer         ( false                           ),
+      multiRefIndex     ( -1                              ),
+      whRatio           ( 0                               ),
+      hwRatio           ( 0                               ),
       intraPredAngle    ( std::numeric_limits<int>::max() ),
-      invAngle          ( std::numeric_limits<int>::max() ), 
+      invAngle          ( std::numeric_limits<int>::max() ),
       interpolationFlag ( false                           ) {}
   };
 
@@ -125,7 +125,7 @@ protected:
 #if JVET_N0435_WAIP_HARMONIZATION
   static bool isIntegerSlope(const int absAng) { return (0 == (absAng & 0x1F)); }
 #else
-  static bool isIntegerSlope      ( const int absAng ) { return (0 == (absAng & 0x1F)) && absAng <=32; }  //  integer-slope modes 2, DIA_IDX and VDIA_IDX.  "absAng <=32" restricts wide-angle integer modes 
+  static bool isIntegerSlope      ( const int absAng ) { return (0 == (absAng & 0x1F)) && absAng <=32; }  //  integer-slope modes 2, DIA_IDX and VDIA_IDX.  "absAng <=32" restricts wide-angle integer modes
 #endif
 
 #if JVET_N0413_RDPCM
@@ -163,7 +163,7 @@ public:
   void predIntraChromaLM(const ComponentID compID, PelBuf &piPred, const PredictionUnit &pu, const CompArea& chromaArea, int intraDir);
   void xGetLumaRecPixels(const PredictionUnit &pu, CompArea chromaArea);
   /// set parameters from CU data for accessing intra data
-  void initIntraPatternChType     (const CodingUnit &cu, const CompArea &area, const bool forceRefFilterFlag = false); // use forceRefFilterFlag to get both filtered and unfiltered buffers 
+  void initIntraPatternChType     (const CodingUnit &cu, const CompArea &area, const bool forceRefFilterFlag = false); // use forceRefFilterFlag to get both filtered and unfiltered buffers
 
 #if JVET_N0217_MATRIX_INTRAPRED
   // Matrix-based intra prediction
diff --git a/source/Lib/CommonLib/MatrixIntraPrediction.cpp b/source/Lib/CommonLib/MatrixIntraPrediction.cpp
index dcfaccbad..13e9d57be 100644
--- a/source/Lib/CommonLib/MatrixIntraPrediction.cpp
+++ b/source/Lib/CommonLib/MatrixIntraPrediction.cpp
@@ -43,7 +43,7 @@
 #include "MipData.h"
 
 
-namespace Mip 
+namespace Mip
 {
   PredictorMIP::PredictorMIP():
     m_reducedBoundary          (MIP_MAX_INPUT_SIZE),
@@ -457,8 +457,8 @@ namespace Mip
 
   void PredictorMIP::xComputeMatrixTimesRedBndryPlusBias( int*const result, const int* const input,
                                                           const short*matrix, const short*bias,
-                                                          const bool leaveHorOut, const bool leaveVerOut, 
-                                                          const int shiftMatrix, const int shiftBias, 
+                                                          const bool leaveHorOut, const bool leaveVerOut,
+                                                          const int shiftMatrix, const int shiftBias,
                                                           const bool transpose, const bool needUpsampling )
   {
     const int inputSize = m_reducedBoundarySize.width + m_reducedBoundarySize.height;
@@ -476,7 +476,7 @@ namespace Mip
     const int intermediateHeight = transpose ? m_reducedPredictionSize.width : m_reducedPredictionSize.height;
     const int xStep = leaveHorOut ? 2 : 1;
     const int yStep = leaveVerOut ? intermediateWidth : 0;
-    
+
     int posRes  = 0;
     int posBias = 0;
     for (int y = 0; y < intermediateHeight; y++)
diff --git a/source/Lib/CommonLib/MatrixIntraPrediction.h b/source/Lib/CommonLib/MatrixIntraPrediction.h
index 5b5864cfb..6fc06880e 100644
--- a/source/Lib/CommonLib/MatrixIntraPrediction.h
+++ b/source/Lib/CommonLib/MatrixIntraPrediction.h
@@ -89,7 +89,7 @@ namespace Mip
 
     void xComputeMatrixTimesRedBndryPlusBias( int*const result, const int* const input,
                                               const short*matrix, const short*bias,
-                                              const bool leaveHorOut, const bool leaveVerOut, 
+                                              const bool leaveHorOut, const bool leaveVerOut,
                                               const int shiftMatrix, const int shiftBias,
                                               const bool transpose, const bool needUpsampling );
   };
diff --git a/source/Lib/CommonLib/Mv.h b/source/Lib/CommonLib/Mv.h
index 4358c2827..bf442ffee 100644
--- a/source/Lib/CommonLib/Mv.h
+++ b/source/Lib/CommonLib/Mv.h
@@ -54,7 +54,7 @@ enum MvPrecision
   MV_PRECISION_HALF     = 3,      // 1/2-pel
   MV_PRECISION_QUARTER  = 4,      // 1/4-pel (the precision of regular MV difference signaling), shift 4 bits from 4-pel
   MV_PRECISION_SIXTEENTH = 6,     // 1/16-pel (the precision of internal MV), shift 6 bits from 4-pel
-  MV_PRECISION_INTERNAL = 2 + MV_FRACTIONAL_BITS_INTERNAL,      
+  MV_PRECISION_INTERNAL = 2 + MV_FRACTIONAL_BITS_INTERNAL,
 };
 
 /// basic motion vector class
diff --git a/source/Lib/CommonLib/RdCost.cpp b/source/Lib/CommonLib/RdCost.cpp
index 202f55456..179eca8e0 100644
--- a/source/Lib/CommonLib/RdCost.cpp
+++ b/source/Lib/CommonLib/RdCost.cpp
@@ -3034,7 +3034,7 @@ Distortion RdCost::xGetSSE_WTD( const DistParam &rcDtParam )
 #else
   const size_t  cShift          = (rcDtParam.compID==COMPONENT_Y) ? 0 : 1; // assume 420, could use getComponentScaleX, getComponentScaleY
 #endif
-  
+
   Distortion uiSum   = 0;
   uint32_t uiShift = DISTORTION_PRECISION_ADJUSTMENT(rcDtParam.bitDepth) << 1;
   for( ; iRows != 0; iRows-- )
diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp
index cd1f48bf3..a2915b64b 100644
--- a/source/Lib/CommonLib/Slice.cpp
+++ b/source/Lib/CommonLib/Slice.cpp
@@ -793,7 +793,7 @@ void Slice::copySliceInfo(Slice *pSrc, bool cpyAlmostAll)
 #if JVET_N0054_JOINT_CHROMA
   m_iSliceChromaQpDelta[JOINT_CbCr] = pSrc->m_iSliceChromaQpDelta[JOINT_CbCr];
 #endif
-  
+
   for (i = 0; i < NUM_REF_PIC_LIST_01; i++)
   {
     for (j = 0; j < MAX_NUM_REF; j++)
@@ -1139,7 +1139,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic) const
     {
       if(this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_CRA)
       {
-        if(pcSlice->getPOC() < this->getAssociatedIRAPPOC() && 
+        if(pcSlice->getPOC() < this->getAssociatedIRAPPOC() &&
           (
 #if !JVET_M0101_HLS
             pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP   ||
@@ -1800,7 +1800,7 @@ SPS::SPS()
 #endif
 , m_affineAmvrEnabledFlag     ( false )
 , m_DMVR                      ( false )
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
 , m_MMVD                      ( false )
 #endif
 , m_SBT                       ( false )
diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h
index 26a89bbca..d014bb8ac 100644
--- a/source/Lib/CommonLib/Slice.h
+++ b/source/Lib/CommonLib/Slice.h
@@ -255,7 +255,7 @@ public:
     , m_noDepQuantConstraintFlag (false)
     , m_noSignDataHidingConstraintFlag(false)
   {}
-  
+
   bool          getProgressiveSourceFlag() const { return m_progressiveSourceFlag; }
   void          setProgressiveSourceFlag(bool b) { m_progressiveSourceFlag = b; }
 
@@ -1012,7 +1012,7 @@ private:
 
   bool              m_affineAmvrEnabledFlag;
   bool              m_DMVR;
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   bool              m_MMVD;
 #endif
   bool              m_SBT;
@@ -1313,7 +1313,7 @@ public:
   void                    setFpelMmvdEnabledFlag( bool b )                                                { m_fpelMmvdEnabledFlag = b;    }
   bool                    getUseDMVR()const                                                               { return m_DMVR; }
   void                    setUseDMVR(bool b)                                                              { m_DMVR = b;    }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   bool                    getUseMMVD()const                                                               { return m_MMVD; }
   void                    setUseMMVD(bool b)                                                              { m_MMVD = b;    }
 #endif
@@ -1894,7 +1894,7 @@ private:
   APS*                       m_aps;
   bool                       m_tileGroupAlfEnabledFlag;
 #endif
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   bool                       m_disableSATDForRd;
 #endif
   SliceReshapeInfo           m_sliceReshapeInfo;
@@ -2211,7 +2211,7 @@ public:
   bool                        getTileGroupAlfEnabledFlag() const { return m_tileGroupAlfEnabledFlag; }
   void                        setTileGroupAlfEnabledFlag(bool b) { m_tileGroupAlfEnabledFlag = b; }
 #endif
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   void                        setDisableSATDForRD(bool b) { m_disableSATDForRd = b; }
   bool                        getDisableSATDForRD() { return m_disableSATDForRd; }
 #endif
diff --git a/source/Lib/CommonLib/TrQuant.cpp b/source/Lib/CommonLib/TrQuant.cpp
index fee821d71..c20cfee2b 100644
--- a/source/Lib/CommonLib/TrQuant.cpp
+++ b/source/Lib/CommonLib/TrQuant.cpp
@@ -327,7 +327,7 @@ void TrQuant::xInvLfnst( const TransformUnit &tu, const ComponentID compID )
               {
                 coeffTemp[ 0 ] = lfnstTemp[  0 ];  coeffTemp[ 1 ] = lfnstTemp[  8 ];
                 coeffTemp[ 2 ] = lfnstTemp[ 16 ];  coeffTemp[ 3 ] = lfnstTemp[ 24 ];
-                if( y < 4 ) 
+                if( y < 4 )
                 {
                   coeffTemp[ 4 ] = lfnstTemp[ 32 ];  coeffTemp[ 5 ] = lfnstTemp[ 36 ];
                   coeffTemp[ 6 ] = lfnstTemp[ 40 ];  coeffTemp[ 7 ] = lfnstTemp[ 44 ];
@@ -418,7 +418,7 @@ void TrQuant::xFwdLfnst( const TransformUnit &tu, const ComponentID compID, cons
               {
                 lfnstTemp[  0 ] = coeffTemp[ 0 ];  lfnstTemp[  8 ] = coeffTemp[ 1 ];
                 lfnstTemp[ 16 ] = coeffTemp[ 2 ];  lfnstTemp[ 24 ] = coeffTemp[ 3 ];
-                if( y < 4 ) 
+                if( y < 4 )
                 {
                   lfnstTemp[ 32 ] = coeffTemp[ 4 ];  lfnstTemp[ 36 ] = coeffTemp[ 5 ];
                   lfnstTemp[ 40 ] = coeffTemp[ 6 ];  lfnstTemp[ 44 ] = coeffTemp[ 7 ];
diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h
index 7628bb677..e3f52d7ab 100644
--- a/source/Lib/CommonLib/TypeDef.h
+++ b/source/Lib/CommonLib/TypeDef.h
@@ -54,7 +54,7 @@
 
 #define JVET_N0105_LFNST_CTX_MODELLING                    1 // LFNST index signalled without intra mode dependency and with on ctx-coded bin
 
-#define JVET_N0193_LFNST                                  1 //Low Frequency Non-Separable Transform (LFNST), previously, Reduced Secondary Transform (RST) 
+#define JVET_N0193_LFNST                                  1 //Low Frequency Non-Separable Transform (LFNST), previously, Reduced Secondary Transform (RST)
 
 #define JVET_N0217_MATRIX_INTRAPRED                       1 // matrix-based intra prediction (MIP)
 
@@ -936,16 +936,16 @@ enum NalUnitType
   //KJS: keep RADL/RASL since there is no real decision on these types yet
   NAL_UNIT_CODED_SLICE_RADL,      // 2   should be NAL_UNIT_RESERVED_VCL_2,
   NAL_UNIT_CODED_SLICE_RASL,      // 3   should be NAL_UNIT_RESERVED_VCL_3,
-  
+
   NAL_UNIT_RESERVED_VCL_4,
   NAL_UNIT_RESERVED_VCL_5,
   NAL_UNIT_RESERVED_VCL_6,
   NAL_UNIT_RESERVED_VCL_7,
-  
+
   NAL_UNIT_CODED_SLICE_IDR_W_RADL,  // 8
   NAL_UNIT_CODED_SLICE_IDR_N_LP,    // 9
   NAL_UNIT_CODED_SLICE_CRA,         // 10
-  
+
   NAL_UNIT_RESERVED_IRAP_VCL11,
   NAL_UNIT_RESERVED_IRAP_VCL12,
   NAL_UNIT_RESERVED_IRAP_VCL13,
@@ -968,7 +968,7 @@ enum NalUnitType
   NAL_UNIT_EOB,                     // 22
   NAL_UNIT_PREFIX_SEI,              // 23
   NAL_UNIT_SUFFIX_SEI,              // 24
-  NAL_UNIT_FILLER_DATA,             // 25  keep: may be added with HRD 
+  NAL_UNIT_FILLER_DATA,             // 25  keep: may be added with HRD
 
   NAL_UNIT_RESERVED_NVCL26,
   NAL_UNIT_RESERVED_NVCL27,
diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp
index 49d8d6ed1..9e43d182f 100644
--- a/source/Lib/CommonLib/UnitTools.cpp
+++ b/source/Lib/CommonLib/UnitTools.cpp
@@ -819,7 +819,7 @@ int PU::getMipSizeId(const PredictionUnit &pu)
 {
   if ((pu.lwidth() == 4) && (pu.lheight() == 4))
   {
-    return 0; // MIP with 16x4 matrix 
+    return 0; // MIP with 16x4 matrix
   }
   else if (pu.lwidth() <= 8 && pu.lheight() <= 8)
   {
@@ -3615,7 +3615,7 @@ bool PU::isBipredRestriction(const PredictionUnit &pu)
 #endif
   return false;
 }
-#if JVET_N0481_BCW_CONSTRUCTED_AFFINE 
+#if JVET_N0481_BCW_CONSTRUCTED_AFFINE
 void PU::getAffineControlPointCand(const PredictionUnit &pu, MotionInfo mi[4], int8_t neighGbi[4], bool isAvailable[4], int verIdx[4], int modelIdx, int verNum, AffineMergeCtx& affMrgType)
 #else
 void PU::getAffineControlPointCand( const PredictionUnit &pu, MotionInfo mi[4], bool isAvailable[4], int verIdx[4], int modelIdx, int verNum, AffineMergeCtx& affMrgType )
@@ -4006,7 +4006,7 @@ void PU::getAffineMergeCand( const PredictionUnit &pu, AffineMergeCtx& affMrgCtx
     {
       MotionInfo mi[4];
       bool isAvailable[4] = { false };
-#if JVET_N0481_BCW_CONSTRUCTED_AFFINE 
+#if JVET_N0481_BCW_CONSTRUCTED_AFFINE
       int8_t neighGbi[4] = { GBI_DEFAULT };
 #endif
       // control point: LT B2->B3->A2
@@ -4021,7 +4021,7 @@ void PU::getAffineMergeCand( const PredictionUnit &pu, AffineMergeCtx& affMrgCtx
         {
           isAvailable[0] = true;
           mi[0] = puNeigh->getMotionInfo( pos );
-#if JVET_N0481_BCW_CONSTRUCTED_AFFINE 
+#if JVET_N0481_BCW_CONSTRUCTED_AFFINE
           neighGbi[0] = puNeigh->cu->GBiIdx;
 #endif
           break;
@@ -4041,7 +4041,7 @@ void PU::getAffineMergeCand( const PredictionUnit &pu, AffineMergeCtx& affMrgCtx
         {
           isAvailable[1] = true;
           mi[1] = puNeigh->getMotionInfo( pos );
-#if JVET_N0481_BCW_CONSTRUCTED_AFFINE 
+#if JVET_N0481_BCW_CONSTRUCTED_AFFINE
           neighGbi[1] = puNeigh->cu->GBiIdx;
 #endif
           break;
@@ -4061,7 +4061,7 @@ void PU::getAffineMergeCand( const PredictionUnit &pu, AffineMergeCtx& affMrgCtx
         {
           isAvailable[2] = true;
           mi[2] = puNeigh->getMotionInfo( pos );
-#if JVET_N0481_BCW_CONSTRUCTED_AFFINE 
+#if JVET_N0481_BCW_CONSTRUCTED_AFFINE
           neighGbi[2] = puNeigh->cu->GBiIdx;
 #endif
           break;
@@ -5150,7 +5150,7 @@ void PU::getTriangleMergeCandidates( const PredictionUnit &pu, MergeCtx& triangl
       cnt = (cnt + 1) % numRefIdx;
     }
   }
-#endif 
+#endif
 }
 
 bool PU::isUniqueTriangleCandidates( const PredictionUnit &pu, MergeCtx& triangleMrgCtx )
diff --git a/source/Lib/CommonLib/UnitTools.h b/source/Lib/CommonLib/UnitTools.h
index c23fb786f..ef60c98cc 100644
--- a/source/Lib/CommonLib/UnitTools.h
+++ b/source/Lib/CommonLib/UnitTools.h
@@ -130,7 +130,7 @@ namespace PU
 {
   int  getLMSymbolList(const PredictionUnit &pu, int *pModeList);
   int  getIntraMPMs(const PredictionUnit &pu, unsigned *mpm, const ChannelType &channelType = CHANNEL_TYPE_LUMA);
-#if JVET_N0217_MATRIX_INTRAPRED  
+#if JVET_N0217_MATRIX_INTRAPRED
   bool          isMIP                 (const PredictionUnit &pu, const ChannelType &chType = CHANNEL_TYPE_LUMA);
   int           getMipMPMs            (const PredictionUnit &pu, unsigned *mpm);
   int           getMipSizeId          (const PredictionUnit &pu);
@@ -172,7 +172,7 @@ namespace PU
   bool isBipredRestriction            (const PredictionUnit &pu);
   void spanMotionInfo                 (      PredictionUnit &pu, const MergeCtx &mrgCtx = MergeCtx() );
   void applyImv                       (      PredictionUnit &pu, MergeCtx &mrgCtx, InterPrediction *interPred = NULL );
-#if JVET_N0481_BCW_CONSTRUCTED_AFFINE 
+#if JVET_N0481_BCW_CONSTRUCTED_AFFINE
   void getAffineControlPointCand(const PredictionUnit &pu, MotionInfo mi[4], int8_t neighGbi[4], bool isAvailable[4], int verIdx[4], int modelIdx, int verNum, AffineMergeCtx& affMrgCtx);
 #else
   void getAffineControlPointCand( const PredictionUnit &pu, MotionInfo mi[4], bool isAvailable[4], int verIdx[4], int modelIdx, int verNum, AffineMergeCtx& affMrgCtx );
@@ -260,7 +260,7 @@ template<typename T, size_t N>
 uint32_t updateCandList(T uiMode, double uiCost, static_vector<T, N>& candModeList, static_vector<double, N>& candCostList
 #if !JVET_N0217_MATRIX_INTRAPRED
   , static_vector<int, N>& extendRefList, int extendRef
-#endif  
+#endif
   , size_t uiFastCandNum = N, int* iserttPos = nullptr)
 {
   CHECK( std::min( uiFastCandNum, candModeList.size() ) != std::min( uiFastCandNum, candCostList.size() ), "Sizes do not match!" );
diff --git a/source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h b/source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
index 3c8ada978..d37946079 100644
--- a/source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
+++ b/source/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h
@@ -48,7 +48,7 @@
 #endif
 
 template<X86_VEXT vext>
-#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION  
+#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION
 static void simdDeriveClassificationBlk(AlfClassifier** classifier, int** laplacian[NUM_DIRECTIONS], const CPelBuf& srcLuma, const Area& blk, const int shift, int vbCTUHeight, int vbPos)
 #else
 static void simdDeriveClassificationBlk(AlfClassifier** classifier, int** laplacian[NUM_DIRECTIONS], const CPelBuf& srcLuma, const Area& blk, const int shift)
@@ -688,7 +688,7 @@ static void simdFilter5x5Blk(AlfClassifier** classifier, const PelUnitBuf &recDs
       for( int ii = 0; ii < clsSizeY; ii++ )
       {
 #if JVET_N0180_ALF_LINE_BUFFER_REDUCTION
-        pImg0 = pImgYPad0 + j + ii * srcStride; 
+        pImg0 = pImgYPad0 + j + ii * srcStride;
         pImg1 = pImgYPad1 + j + ii * srcStride;
         pImg2 = pImgYPad2 + j + ii * srcStride;
         pImg3 = pImgYPad3 + j + ii * srcStride;
@@ -698,7 +698,7 @@ static void simdFilter5x5Blk(AlfClassifier** classifier, const PelUnitBuf &recDs
         if ((startHeight + i + ii) % vbCTUHeight < vbPos && ((startHeight + i + ii) % vbCTUHeight >= vbPos - (bChroma ? 2 : 4))) //above
         {
           pImg1 = ((startHeight + i + ii) % vbCTUHeight == vbPos - 1) ? pImg0 : pImg1;
-          pImg3 = ((startHeight + i + ii) % vbCTUHeight >= vbPos - 2) ? pImg1 : pImg3;          
+          pImg3 = ((startHeight + i + ii) % vbCTUHeight >= vbPos - 2) ? pImg1 : pImg3;
 
           pImg2 = ((startHeight + i + ii) % vbCTUHeight == vbPos - 1) ? pImg0 : pImg2;
           pImg4 = ((startHeight + i + ii) % vbCTUHeight >= vbPos - 2) ? pImg2 : pImg4;
@@ -709,7 +709,7 @@ static void simdFilter5x5Blk(AlfClassifier** classifier, const PelUnitBuf &recDs
           pImg4 = ((startHeight + i + ii) % vbCTUHeight <= vbPos + 1) ? pImg2 : pImg4;
 
           pImg1 = ((startHeight + i + ii) % vbCTUHeight == vbPos) ? pImg0 : pImg1;
-          pImg3 = ((startHeight + i + ii) % vbCTUHeight <= vbPos + 1) ? pImg1 : pImg3;         
+          pImg3 = ((startHeight + i + ii) % vbCTUHeight <= vbPos + 1) ? pImg1 : pImg3;
         }
 #endif
         __m128i clipp, clipm;
@@ -1237,7 +1237,7 @@ static void simdFilter7x7Blk( AlfClassifier** classifier, const PelUnitBuf &recD
 #endif
     {
 #if JVET_N0242_NON_LINEAR_ALF
-      for (int k = 0; k < 2; ++k)    
+      for (int k = 0; k < 2; ++k)
       {
         if( !bChroma )
         {
@@ -1370,7 +1370,7 @@ static void simdFilter7x7Blk( AlfClassifier** classifier, const PelUnitBuf &recD
         c2 = _mm_shuffle_epi8( c2, xmm10 );
       }
  #endif
-#if !JVET_N0180_ALF_LINE_BUFFER_REDUCTION 
+#if !JVET_N0180_ALF_LINE_BUFFER_REDUCTION
       pImg0 = pImgYPad0 + j;
       pImg1 = pImgYPad1 + j;
       pImg2 = pImgYPad2 + j;
@@ -1416,7 +1416,7 @@ static void simdFilter7x7Blk( AlfClassifier** classifier, const PelUnitBuf &recD
       for( int ii = 0; ii < clsSizeY; ii++ )
       {
 #if JVET_N0180_ALF_LINE_BUFFER_REDUCTION
-        pImg0 = pImgYPad0 + j + ii * srcStride; 
+        pImg0 = pImgYPad0 + j + ii * srcStride;
         pImg1 = pImgYPad1 + j + ii * srcStride;
         pImg2 = pImgYPad2 + j + ii * srcStride;
         pImg3 = pImgYPad3 + j + ii * srcStride;
diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp
index 778604701..f68fe091c 100644
--- a/source/Lib/DecoderLib/CABACReader.cpp
+++ b/source/Lib/DecoderLib/CABACReader.cpp
@@ -884,9 +884,9 @@ void CABACReader::cu_skip_flag( CodingUnit& cu )
       cu.affine = false;
       cu.triangle = false;
     }
-    else 
+    else
     {
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
       if (cu.cs->slice->getSPS()->getUseMMVD())
       {
 #endif
@@ -905,29 +905,29 @@ void CABACReader::cu_skip_flag( CodingUnit& cu )
           cu.mmvdSkip = mmvdSkip;
           DTRACE(g_trace_ctx, D_SYNTAX, "mmvd_cu_skip_flag() ctx=%d mmvd_skip=%d\n", 0, mmvdSkip ? 1 : 0);
         }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
       }
       else
       {
         cu.mmvdSkip = false;
       }
-#endif  
+#endif
     }
 #else
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     if (cu.cs->slice->getSPS()->getUseMMVD())
     {
 #endif
       unsigned mmvdSkip = m_BinDecoder.decodeBin(Ctx::MmvdFlag(0));
       cu.mmvdSkip = mmvdSkip;
       DTRACE(g_trace_ctx, D_SYNTAX, "mmvd_cu_skip_flag() ctx=%d mmvd_skip=%d\n", 0, mmvdSkip ? 1 : 0);
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     }
     else
     {
       cu.mmvdSkip = false;
     }
-#endif  
+#endif
 #endif
     cu.skip     = true;
     cu.rootCbf  = false;
@@ -1344,7 +1344,7 @@ void CABACReader::intra_luma_pred_modes( CodingUnit &cu )
     {
       uint32_t ipred_idx = 0;
       {
-#if JVET_N0185_UNIFIED_MPM 
+#if JVET_N0185_UNIFIED_MPM
         unsigned ctx = (pu->cu->ispMode == NOT_INTRA_SUBPARTITIONS ? 1 : 0);
         if (pu->multiRefIdx == 0)
           ipred_idx = m_BinDecoder.decodeBin(Ctx::IntraLumaPlanarFlag(ctx));
@@ -1636,7 +1636,7 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx )
         }
 #if JVET_N0324_REGULAR_MRG_FLAG
         else
-        {      
+        {
           pu.cu->triangle = pu.cu->cs->slice->getSPS()->getUseTriangle() && pu.cu->cs->slice->isInterB() && !pu.cu->affine && !pu.mmvdMergeFlag && !pu.cu->mmvdSkip;
         }
 #else
@@ -1828,9 +1828,9 @@ void CABACReader::merge_flag( PredictionUnit& pu )
       pu.cu->affine = false;
       pu.cu->triangle = false;
     }
-    else 
+    else
     {
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
       if (pu.cs->sps->getUseMMVD())
       {
 #endif
@@ -1848,17 +1848,17 @@ void CABACReader::merge_flag( PredictionUnit& pu )
           pu.mmvdMergeFlag = (m_BinDecoder.decodeBin(Ctx::MmvdFlag(0)));
           DTRACE(g_trace_ctx, D_SYNTAX, "mmvd_merge_flag() mmvd_merge=%d pos=(%d,%d) size=%dx%d\n", pu.mmvdMergeFlag ? 1 : 0, pu.lumaPos().x, pu.lumaPos().y, pu.lumaSize().width, pu.lumaSize().height);
         }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
       }
       else
       {
         pu.mmvdMergeFlag = false;
       }
-#endif 
+#endif
     }
   }
 #else
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   if (pu.mergeFlag && pu.cs->sps->getUseMMVD())
 #else
   if (pu.mergeFlag)
@@ -1867,12 +1867,12 @@ void CABACReader::merge_flag( PredictionUnit& pu )
     pu.mmvdMergeFlag = (m_BinDecoder.decodeBin(Ctx::MmvdFlag(0)));
     DTRACE(g_trace_ctx, D_SYNTAX, "mmvd_merge_flag() mmvd_merge=%d pos=(%d,%d) size=%dx%d\n", pu.mmvdMergeFlag ? 1 : 0, pu.lumaPos().x, pu.lumaPos().y, pu.lumaSize().width, pu.lumaSize().height);
   }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   else
   {
     pu.mmvdMergeFlag = false;
   }
-#endif 
+#endif
 #endif
 }
 
@@ -2745,7 +2745,7 @@ void CABACReader::residual_coding( TransformUnit& tu, ComponentID compID )
   if ( compID == COMPONENT_Cr && TU::getCbf( tu, COMPONENT_Cb ) )
   {
     joint_cb_cr( tu );
-    
+
     // No Cr residual in bitstream in joint Cb-Cr residual mode
     if ( tu.jointCbCr )
       return;
diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp
index 0ca444468..69c14d4c0 100644
--- a/source/Lib/DecoderLib/DecLib.cpp
+++ b/source/Lib/DecoderLib/DecLib.cpp
@@ -786,7 +786,7 @@ void DecLib::xActivateParameterSets()
           THROW("APS activation failed!");
         }
       }
-    }    
+    }
 
     //chroma APS
     int apsId = m_apcSlicePilot->getTileGroupApsIdChroma();
@@ -1296,7 +1296,7 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
 #if JVET_N0235_SMVD_SPS
     if (pcSlice->getSPS()->getUseSMVD() && pcSlice->getCheckLDC() == false
 #if !JVET_N0470_SMVD_FIX
-      && pcSlice->getMvdL1ZeroFlag() == false 
+      && pcSlice->getMvdL1ZeroFlag() == false
 #endif
       )
 #else
diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp
index 6398d95a7..195f1eb90 100644
--- a/source/Lib/DecoderLib/VLCReader.cpp
+++ b/source/Lib/DecoderLib/VLCReader.cpp
@@ -436,7 +436,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS )
   CHECK( pcPPS->getQpOffset(JOINT_CbCr) < -12, "Invalid CbCr QP offset" );
   CHECK( pcPPS->getQpOffset(JOINT_CbCr) >  12, "Invalid CbCr QP offset" );
 #endif
-  
+
   CHECK(MAX_NUM_COMPONENT>3, "Invalid maximal number of components");
 
   READ_FLAG( uiCode, "pps_slice_chroma_qp_offsets_present_flag" );
@@ -1148,7 +1148,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
   READ_FLAG( uiCode,  "sps_affine_amvr_enabled_flag" );             pcSPS->setAffineAmvrEnabledFlag ( uiCode != 0 );
 
   READ_FLAG(uiCode, "sps_dmvr_enable_flag");                        pcSPS->setUseDMVR(uiCode != 0);
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   READ_FLAG(uiCode, "sps_mmvd_enable_flag");                        pcSPS->setUseMMVD(uiCode != 0);
 #endif
   // KJS: sps_cclm_enabled_flag
@@ -1181,7 +1181,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
   // KJS: sps_ciip_enabled_flag
   READ_FLAG( uiCode,     "mhintra_flag" );                           pcSPS->setUseMHIntra             ( uiCode != 0 );
 
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   if ( pcSPS->getUseMMVD() )
   {
     READ_FLAG( uiCode,  "sps_fpel_mmvd_enabled_flag" );             pcSPS->setFpelMmvdEnabledFlag ( uiCode != 0 );
@@ -1721,7 +1721,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
         else
         {
           xReadTruncBinCode(uiCode, ALF_CTB_MAX_NUM_APS + 1);
-        }        
+        }
         int numAps = uiCode;
         pcSlice->setTileGroupNumAps(numAps);
         std::vector<int> apsId(numAps, -1);
@@ -2222,7 +2222,7 @@ 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);
-  
+
   READ_FLAG(symbol,  "no_qtbtt_dual_tree_intra_constraint_flag" ); cinfo->setNoQtbttDualTreeIntraConstraintFlag(symbol > 0 ? true : false);
   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);
diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp
index 740b70f5a..e3878da06 100644
--- a/source/Lib/EncoderLib/CABACWriter.cpp
+++ b/source/Lib/EncoderLib/CABACWriter.cpp
@@ -694,9 +694,9 @@ void CABACWriter::cu_skip_flag( const CodingUnit& cu )
       else
       {
         m_BinEncoder.encodeBin(cu.firstPU->regularMergeFlag, Ctx::RegularMergeFlag(0));
-        DTRACE(g_trace_ctx, D_SYNTAX, "regularMergeFlag() ctx=%d regularMergeFlag=%d\n", 0, cu.firstPU->regularMergeFlag?1:0);      
+        DTRACE(g_trace_ctx, D_SYNTAX, "regularMergeFlag() ctx=%d regularMergeFlag=%d\n", 0, cu.firstPU->regularMergeFlag?1:0);
       }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
       if (cu.cs->slice->getSPS()->getUseMMVD())
       {
 #endif
@@ -714,12 +714,12 @@ void CABACWriter::cu_skip_flag( const CodingUnit& cu )
           m_BinEncoder.encodeBin(cu.mmvdSkip, Ctx::MmvdFlag(0));
           DTRACE(g_trace_ctx, D_SYNTAX, "mmvd_cu_skip_flag() ctx=%d mmvd_skip=%d\n", 0, cu.mmvdSkip ? 1 : 0);
         }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
       }
 #endif
     }
 #else
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     if (CU::isInter(cu) && cu.cs->slice->getSPS()->getUseMMVD())
 #else
     if (CU::isInter(cu))
@@ -742,7 +742,7 @@ void CABACWriter::cu_skip_flag( const CodingUnit& cu )
       m_BinEncoder.encodeBin(cu.firstPU->regularMergeFlag, Ctx::RegularMergeFlag(0));
       DTRACE(g_trace_ctx, D_SYNTAX, "regularMergeFlag() ctx=%d regularMergeFlag=%d\n", 0, cu.firstPU->regularMergeFlag?1:0);
     }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     if (cu.cs->slice->getSPS()->getUseMMVD())
     {
 #endif
@@ -760,12 +760,12 @@ void CABACWriter::cu_skip_flag( const CodingUnit& cu )
         m_BinEncoder.encodeBin(cu.mmvdSkip, Ctx::MmvdFlag(0));
         DTRACE(g_trace_ctx, D_SYNTAX, "mmvd_cu_skip_flag() ctx=%d mmvd_skip=%d\n", 0, cu.mmvdSkip ? 1 : 0);
       }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     }
 #endif
   }
 #else
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   if (cu.skip && !cu.cs->slice->getSPS()->getIBCFlag() && cu.cs->slice->getSPS()->getUseMMVD())
 #else
   if (cu.skip && !cu.cs->slice->getSPS()->getIBCFlag())
@@ -1707,7 +1707,7 @@ void CABACWriter::merge_flag( const PredictionUnit& pu )
       m_BinEncoder.encodeBin(pu.regularMergeFlag, Ctx::RegularMergeFlag(1));
       DTRACE(g_trace_ctx, D_SYNTAX, "regularMergeFlag() ctx=%d regularMergeFlag=%d\n", 1, pu.regularMergeFlag?1:0);
     }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     if (pu.cs->sps->getUseMMVD())
     {
 #endif
@@ -1725,12 +1725,12 @@ void CABACWriter::merge_flag( const PredictionUnit& pu )
         m_BinEncoder.encodeBin(pu.mmvdMergeFlag, Ctx::MmvdFlag(0));
         DTRACE(g_trace_ctx, D_SYNTAX, "mmvd_merge_flag() mmvd_merge=%d pos=(%d,%d) size=%dx%d\n", pu.mmvdMergeFlag ? 1 : 0, pu.lumaPos().x, pu.lumaPos().y, pu.lumaSize().width, pu.lumaSize().height);
       }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
     }
 #endif
   }
 #else
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   if (pu.mergeFlag && pu.cs->sps->getUseMMVD())
 #else
   if (pu.mergeFlag)
@@ -2630,7 +2630,7 @@ void CABACWriter::residual_coding( const TransformUnit& tu, ComponentID compID )
   if ( compID == COMPONENT_Cr && TU::getCbf( tu, COMPONENT_Cb ) )
   {
     joint_cb_cr( tu );
-    
+
     // No Cr residual in bitstream in joint Cb-Cr residual mode
     if ( tu.jointCbCr )
       return;
diff --git a/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp b/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
index 7a4035473..9e9acbb57 100644
--- a/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
+++ b/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
@@ -774,7 +774,7 @@ double EncAdaptiveLoopFilter::deriveCtbAlfEnableFlags( CodingStructure& cs, cons
 #if ENABLE_QPA
   CHECK ((chromaWeight > 0.0) && (cs.slice->getSliceCurStartCtuTsAddr() != 0), "incompatible start CTU address, must be 0");
 #endif
-  
+
 #if JVET_N0415_CTB_ALF
   reconstructCoeff(m_alfSliceParamTemp, channel, true, isLuma(channel));
   for (int classIdx = 0; classIdx < (isLuma(channel) ? MAX_NUM_ALF_CLASSES : 1); classIdx++)
@@ -1955,7 +1955,7 @@ double EncAdaptiveLoopFilter::deriveFilterCoeffs( AlfCovariance* cov, AlfCovaria
   double errorMin = 0;
   double errorMinPerClass[MAX_NUM_ALF_CLASSES] = { 0 };
   double errorCurSetPerClass[MAX_NUM_ALF_CLASSES] = { 0 };
-  int    fixedFilterFlagPerClass[MAX_NUM_ALF_CLASSES] = { 0 };  
+  int    fixedFilterFlagPerClass[MAX_NUM_ALF_CLASSES] = { 0 };
 
 #if JVET_N0242_NON_LINEAR_ALF
   if (!alfSliceParam.nonLinearFlag[CHANNEL_TYPE_LUMA])
@@ -2007,7 +2007,7 @@ double EncAdaptiveLoopFilter::deriveFilterCoeffs( AlfCovariance* cov, AlfCovaria
         }
       }
     }
-  }  
+  }
 #endif
 
   for( int filtIdx = 0; filtIdx < numFilters; filtIdx++ )
@@ -2023,7 +2023,7 @@ double EncAdaptiveLoopFilter::deriveFilterCoeffs( AlfCovariance* cov, AlfCovaria
 #if JVET_N0415_CTB_ALF
         //adjust stat
         tmpCovFf = cov[classIdx];
-        if (alfSliceParam.fixedFilterSetIndex > 0 && alfSliceParam.fixedFilterIdx[classIdx] > 0 
+        if (alfSliceParam.fixedFilterSetIndex > 0 && alfSliceParam.fixedFilterIdx[classIdx] > 0
 #if JVET_N0242_NON_LINEAR_ALF
           && alfSliceParam.nonLinearFlag[CHANNEL_TYPE_LUMA] == false
 #endif
@@ -2289,7 +2289,7 @@ const int numCoeff = shape.numCoeff;
 }
 
 #if !JVET_N0242_NON_LINEAR_ALF
-double EncAdaptiveLoopFilter::calcErrorForCoeffs( double **E, double *y, 
+double EncAdaptiveLoopFilter::calcErrorForCoeffs( double **E, double *y,
 #if JVET_N0415_CTB_ALF
   const
 #endif
@@ -2589,7 +2589,7 @@ void EncAdaptiveLoopFilter::deriveStatsForFiltering( PelUnitBuf& orgYuv, PelUnit
 #if JVET_N0242_NON_LINEAR_ALF
           getBlkStats(m_alfCovariance[compIdx][shape][ctuRsAddr], m_filterShapes[chType][shape], compIdx ? nullptr : m_classifier, org, orgStride, rec, recStride, compArea, chType
             , ((compIdx == 0) ? m_alfVBLumaCTUHeight : m_alfVBChmaCTUHeight)
-            , ((yPos + m_maxCUHeight >= m_picHeight) ? m_picHeight : ((compIdx == 0) ? m_alfVBLumaPos : m_alfVBChmaPos))        
+            , ((yPos + m_maxCUHeight >= m_picHeight) ? m_picHeight : ((compIdx == 0) ? m_alfVBLumaPos : m_alfVBChmaPos))
           );
 #else
           getBlkStats(m_alfCovariance[compIdx][shape][ctuRsAddr], m_filterShapes[chType][shape], compIdx ? nullptr : m_classifier, org, orgStride, rec, recStride, compArea
@@ -2619,7 +2619,7 @@ void EncAdaptiveLoopFilter::deriveStatsForFiltering( PelUnitBuf& orgYuv, PelUnit
   }
 }
 
-#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION  
+#if JVET_N0180_ALF_LINE_BUFFER_REDUCTION
 #if JVET_N0242_NON_LINEAR_ALF
 void EncAdaptiveLoopFilter::getBlkStats(AlfCovariance* alfCovariance, const AlfFilterShape& shape, AlfClassifier** classifier, Pel* org, const int orgStride, Pel* rec, const int recStride, const CompArea& area, const ChannelType channel, int vbCTUHeight, int vbPos)
 #else
@@ -2802,12 +2802,12 @@ void EncAdaptiveLoopFilter::calcCovariance(int *ELocal, const Pel *rec, const in
   int clipBotRow = 4;
   if (vbDistance >= -3 && vbDistance < 0)
   {
-    clipBotRow = -vbDistance - 1;  
+    clipBotRow = -vbDistance - 1;
     clipTopRow = -clipBotRow; // symmetric
   }
   else if (vbDistance >= 0 && vbDistance < 3)
   {
-    clipTopRow = -vbDistance;  
+    clipTopRow = -vbDistance;
     clipBotRow = -clipTopRow; // symmetric
   }
 #endif
@@ -2917,7 +2917,7 @@ void EncAdaptiveLoopFilter::calcCovariance(int *ELocal, const Pel *rec, const in
 #else
     for (int i = -halfFilterLength; i < 0; i++)
     {
-      ELocal[filterPattern[k++]] += rec[std::max(i, clipTopRow) * stride] + rec[-std::max(i, -clipBotRow) * stride]; 
+      ELocal[filterPattern[k++]] += rec[std::max(i, clipTopRow) * stride] + rec[-std::max(i, -clipBotRow) * stride];
     }
 #endif
 #else
@@ -2991,7 +2991,7 @@ void EncAdaptiveLoopFilter::calcCovariance(int *ELocal, const Pel *rec, const in
       for (int i = halfFilterLength + j; i >= -halfFilterLength - j; i--, k++)
       {
         for (int b = 0; b < numBins; b++)
-        {          
+        {
           ELocal[filterPattern[k]][b] += clipALF(clip[b], curr, rec0[std::max(i, clipTopRow) * stride], rec1[-std::max(i, -clipBotRow) * stride]);
         }
       }
@@ -3421,7 +3421,7 @@ void  EncAdaptiveLoopFilter::alfEncoderCtb(CodingStructure& cs, AlfSliceParam& a
             {
               errNL[1] = MAX_DOUBLE;
             }
-#if JVET_N0242_NON_LINEAR_ALF           
+#if JVET_N0242_NON_LINEAR_ALF
             m_alfSliceParamTemp.nonLinearFlag[CHANNEL_TYPE_LUMA] = 0;
 #endif
             errNL[0] = getFilterCoeffAndCost(cs, 0, CHANNEL_TYPE_LUMA, true, 0, bitNL[0], true);
@@ -3828,7 +3828,7 @@ void EncAdaptiveLoopFilter::alfReconstructor(CodingStructure& cs, const PelUnitB
 #else
         m_filter7x7Blk(m_classifier, recBuf, recExtBuf, blk, COMPONENT_Y, coeff, m_clpRngs.comp[COMPONENT_Y], cs);
 #endif
-#endif       
+#endif
       }
 
       for (int compIdx = 1; compIdx < MAX_NUM_COMPONENT; compIdx++)
diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h
index 59221a7fe..14f87d08a 100644
--- a/source/Lib/EncoderLib/EncCfg.h
+++ b/source/Lib/EncoderLib/EncCfg.h
@@ -247,7 +247,7 @@ protected:
   bool      m_HashME;
   bool      m_AffineAmvrEncOpt;
   bool      m_DMVR;
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   bool      m_MMVD;
 #endif
 #if JVET_N0449_MMVD_SIMP
@@ -734,7 +734,7 @@ public:
   bool      getLFNST()                                 const { return m_LFNST; }
   void      setUseFastLFNST                 ( bool b )       { m_useFastLFNST = b; }
   bool      getUseFastLFNST()                          const { return m_useFastLFNST; }
-#endif  
+#endif
 
   void      setUseLMChroma                  ( int n )        { m_LMChroma = n; }
   int       getUseLMChroma()                           const { return m_LMChroma; }
@@ -801,7 +801,7 @@ public:
   bool      getUseAffineAmvrEncOpt          ()         const { return m_AffineAmvrEncOpt; }
   void      setDMVR                      ( bool b )       { m_DMVR = b; }
   bool      getDMVR                      ()         const { return m_DMVR; }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   void      setMMVD                         (bool b)         { m_MMVD = b;    }
   bool      getMMVD                         ()         const { return m_MMVD; }
 #endif
diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp
index 247c0b4f7..05a7d018d 100644
--- a/source/Lib/EncoderLib/EncCu.cpp
+++ b/source/Lib/EncoderLib/EncCu.cpp
@@ -2103,7 +2103,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
         {
           uiBitsCand--;
         }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
         if ( pu.cs->sps->getUseMMVD() )
           uiBitsCand++; // for mmvd_flag
 #else
@@ -2302,10 +2302,10 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
         m_CABACEstimator->getCtx() = ctxStart;
 #endif
       }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
       if ( pu.cs->sps->getUseMMVD() )
       {
-#endif 
+#endif
         cu.mmvdSkip = true;
 #if JVET_N0448_N0380
         const int tempNum = (mergeCtx.numValidMergeCand > 1) ? MMVD_ADD_NUM : MMVD_ADD_NUM >> 1;
@@ -2383,7 +2383,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
             swap(singleMergeTempBuffer, acMergeTempBuffer[insertPos]);
           }
         }
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
       }
 #endif
       // Try to limit number of candidates using SATD-costs
@@ -2418,7 +2418,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
 
             m_pcIntraSearch->initIntraPatternChType(*pu.cu, pu.Cr());
             m_pcIntraSearch->predIntraAng(COMPONENT_Cr, pu.cs->getPredBuf(pu).Cr(), pu);
-            m_pcIntraSearch->switchBuffer(pu, COMPONENT_Cr, pu.cs->getPredBuf(pu).Cr(), m_pcIntraSearch->getPredictorPtr2(COMPONENT_Cr, bufIdx));     
+            m_pcIntraSearch->switchBuffer(pu, COMPONENT_Cr, pu.cs->getPredBuf(pu).Cr(), m_pcIntraSearch->getPredictorPtr2(COMPONENT_Cr, bufIdx));
           }
         }
         pu.mhIntraFlag = false;
@@ -2553,7 +2553,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
         {
 #if JVET_N0302_SIMPLFIED_CIIP
           uint32_t bufIdx = 0;
-#else 
+#else
           uint32_t bufIdx = (pu.intraDir[0] > 1) ? (pu.intraDir[0] == HOR_IDX ? 2 : 3) : pu.intraDir[0];
 #endif
           PelBuf tmpBuf = tempCS->getPredBuf(pu).Y();
@@ -2687,7 +2687,7 @@ void EncCu::xCheckRDCostMergeTriangle2Nx2N( CodingStructure *&tempCS, CodingStru
   }
 
   DistParam distParam;
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   const bool useHadamard = !encTestMode.lossless && !tempCS->slice->getDisableSATDForRD();
 #else
   const bool useHadamard = !encTestMode.lossless;
@@ -3392,7 +3392,7 @@ void EncCu::xCheckRDCostIBCModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct
         updateCandList(mergeCand, cost, RdModeList, candCostList
 #if !JVET_N0217_MATRIX_INTRAPRED
           , *nullList, -1
-#endif 
+#endif
          , numMrgSATDCand);
       }
 
@@ -4130,7 +4130,7 @@ Distortion EncCu::getDistortionDb( CodingStructure &cs, CPelBuf org, CPelBuf rec
 #if WCG_EXT
 #if JVET_N0671_RDCOST_FIX
   m_pcRdCost->setChromaFormat(cs.sps->getChromaFormatIdc());
-#endif 
+#endif
   CPelBuf orgLuma = cs.picture->getOrigBuf( cs.area.blocks[COMPONENT_Y] );
   if ( m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled() || (
     m_pcEncCfg->getReshaper() && ( cs.slice->getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getCTUFlag() ) ) )
diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp
index 8f38f6de4..75c65ee8c 100644
--- a/source/Lib/EncoderLib/EncGOP.cpp
+++ b/source/Lib/EncoderLib/EncGOP.cpp
@@ -1937,7 +1937,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
 #if JVET_N0235_SMVD_SPS
     if ( pcSlice->getSPS()->getUseSMVD() && pcSlice->getCheckLDC() == false
 #if !JVET_N0470_SMVD_FIX
-      && pcSlice->getMvdL1ZeroFlag() == false 
+      && pcSlice->getMvdL1ZeroFlag() == false
 #endif
       )
 #else
@@ -2426,7 +2426,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
       }
 
       if( pcSlice->getSPS()->getALFEnabledFlag() )
-      { 
+      {
 #if JVET_N0415_CTB_ALF
         for (int s = 0; s < uiNumSliceSegments; s++)
         {
@@ -2455,7 +2455,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
             pcPic->slices[s]->setTileGroupNumAps(0);
           }
           pcPic->slices[s]->setAPSs(cs.slice->getAPSs());
-          pcPic->slices[s]->setTileGroupApsIdChroma(cs.slice->getTileGroupApsIdChroma());          
+          pcPic->slices[s]->setTileGroupApsIdChroma(cs.slice->getTileGroupApsIdChroma());
         }
 #else
         AlfSliceParam alfSliceParam;
diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp
index 8cf7f14be..4512f3669 100644
--- a/source/Lib/EncoderLib/EncLib.cpp
+++ b/source/Lib/EncoderLib/EncLib.cpp
@@ -1004,7 +1004,7 @@ void EncLib::xInitSPS(SPS &sps)
 
   sps.setUseMHIntra            ( m_MHIntra );
   sps.setUseTriangle           ( m_Triangle );
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   sps.setUseMMVD               ( m_MMVD );
   sps.setFpelMmvdEnabledFlag   (( m_MMVD ) ? m_allowDisFracMMVD : false);
 #else
diff --git a/source/Lib/EncoderLib/EncModeCtrl.cpp b/source/Lib/EncoderLib/EncModeCtrl.cpp
index 41dd02585..6e52d0f7a 100644
--- a/source/Lib/EncoderLib/EncModeCtrl.cpp
+++ b/source/Lib/EncoderLib/EncModeCtrl.cpp
@@ -2089,7 +2089,7 @@ bool EncModeCtrlMTnoRQT::isParallelSplit( const CodingStructure &cs, Partitioner
   const int parlAt  = m_pcEncCfg->getNumSplitThreads() <= 3 ? 1024 : 256;
   if(  cs.slice->isIntra() && numJobs > 2 && ( numPxl == parlAt || !partitioner.canSplit( CU_QUAD_SPLIT, cs ) ) ) return true;
   if( !cs.slice->isIntra() && numJobs > 1 && ( numPxl == parlAt || !partitioner.canSplit( CU_QUAD_SPLIT, cs ) ) ) return true;
-  return false; 
+  return false;
 }
 
 bool EncModeCtrlMTnoRQT::parallelJobSelector( const EncTestMode& encTestmode, const CodingStructure &cs, Partitioner& partitioner ) const
diff --git a/source/Lib/EncoderLib/EncSlice.cpp b/source/Lib/EncoderLib/EncSlice.cpp
index 85891744b..6162902df 100644
--- a/source/Lib/EncoderLib/EncSlice.cpp
+++ b/source/Lib/EncoderLib/EncSlice.cpp
@@ -751,7 +751,7 @@ void EncSlice::initEncSlice(Picture* pcPic, const int pocLast, const int pocCurr
     rpcSlice->setMaxBTSizeIChroma( rpcSlice->getSPS()->getMaxBTSizeIChroma() );
     rpcSlice->setMaxTTSizeIChroma( rpcSlice->getSPS()->getMaxTTSizeIChroma() );
   }
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   rpcSlice->setDisableSATDForRD(false);
 #endif
 }
diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp
index d717f0c09..2aa37ac61 100644
--- a/source/Lib/EncoderLib/InterSearch.cpp
+++ b/source/Lib/EncoderLib/InterSearch.cpp
@@ -755,7 +755,7 @@ Distortion InterSearch::xGetInterPredictionError( PredictionUnit& pu, PelUnitBuf
   DistParam cDistParam;
   cDistParam.applyWeight = false;
 
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   m_pcRdCost->setDistParam(cDistParam, origBuf.Y(), predBuf.Y(), pu.cs->sps->getBitDepth(CHANNEL_TYPE_LUMA), COMPONENT_Y, m_pcEncCfg->getUseHADME() && !pu.cu->transQuantBypass && !pu.cu->slice->getDisableSATDForRD());
 #else
   m_pcRdCost->setDistParam( cDistParam, origBuf.Y(), predBuf.Y(), pu.cs->sps->getBitDepth(CHANNEL_TYPE_LUMA), COMPONENT_Y, m_pcEncCfg->getUseHADME() && !pu.cu->transQuantBypass );
@@ -1724,7 +1724,7 @@ void InterSearch::xxIBCHashSearch(PredictionUnit& pu, Mv* mvPred, int numMvPred,
             int x = (mvPred[n].hor + offset - (mvPred[n].hor >= 0)) >> 2;
             int y = (mvPred[n].ver + offset - (mvPred[n].ver >= 0)) >> 2;
             mvPredQuadPel.set(x, y);
-#else            
+#else
             mvPredQuadPel.set(((mvPred[n].hor + offset) >> 2), ((mvPred[n].ver + offset) >> 2));
 #endif
 
@@ -3397,14 +3397,14 @@ Distortion InterSearch::xGetAffineTemplateCost( PredictionUnit& pu, PelUnitBuf&
   }
 
   // calc distortion
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   enum DFunc distFunc = (pu.cu->transQuantBypass || pu.cs->slice->getDisableSATDForRD()) ? DF_SAD : DF_HAD;
 #endif
   uiCost  = m_pcRdCost->getDistPart( origBuf.Y(), predBuf.Y(), pu.cs->sps->getBitDepth(CHANNEL_TYPE_LUMA), COMPONENT_Y
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
     , distFunc
 #else
-    , DF_HAD 
+    , DF_HAD
 #endif
   );
   uiCost += m_pcRdCost->getCost( m_auiMVPIdxCost[iMVPIdx][iMVPNum] );
@@ -4215,7 +4215,7 @@ void InterSearch::xPatternSearchIntRefine(PredictionUnit& pu, IntTZSearchStruct&
   CHECK( amvpInfo.mvCand[riMVPIdx] != rcMvPred, "xPatternSearchIntRefine(): MvPred issue.");
 
   const SPS &sps = *pu.cs->sps;
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   m_pcRdCost->setDistParam(m_cDistParam, *cStruct.pcPatternKey, cStruct.piRefY, cStruct.iRefStride, m_lumaClpRng.bd, COMPONENT_Y, 0, 1, m_pcEncCfg->getUseHADME() && !pu.cu->transQuantBypass && !pu.cs->slice->getDisableSATDForRD());
 #else
   m_pcRdCost->setDistParam( m_cDistParam, *cStruct.pcPatternKey, cStruct.piRefY, cStruct.iRefStride, m_lumaClpRng.bd, COMPONENT_Y, 0, 1, m_pcEncCfg->getUseHADME() && !pu.cu->transQuantBypass );
@@ -4354,7 +4354,7 @@ void InterSearch::xPatternSearchFracDIF(
     m_pcRdCost->setCostScale(0);
     xExtDIFUpSamplingH(&cPatternRoi);
     rcMvQter = rcMvInt;   rcMvQter <<= 2;    // for mv-cost
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
     ruiCost = xPatternRefinement(cStruct.pcPatternKey, baseRefMv, 1, rcMvQter, !bIsLosslessCoded && !pu.cs->slice->getDisableSATDForRD());
 #else
     ruiCost = xPatternRefinement(cStruct.pcPatternKey, baseRefMv, 1, rcMvQter, !bIsLosslessCoded);
@@ -4365,7 +4365,7 @@ void InterSearch::xPatternSearchFracDIF(
 
   if (cStruct.imvShift || (m_useCompositeRef && cStruct.zeroMV))
   {
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
     m_pcRdCost->setDistParam(m_cDistParam, *cStruct.pcPatternKey, cStruct.piRefY + iOffset, cStruct.iRefStride, m_lumaClpRng.bd, COMPONENT_Y, 0, 1, m_pcEncCfg->getUseHADME() && !bIsLosslessCoded && !pu.cs->slice->getDisableSATDForRD());
 #else
     m_pcRdCost->setDistParam( m_cDistParam, *cStruct.pcPatternKey, cStruct.piRefY + iOffset, cStruct.iRefStride, m_lumaClpRng.bd, COMPONENT_Y, 0, 1, m_pcEncCfg->getUseHADME() && !bIsLosslessCoded );
@@ -4381,7 +4381,7 @@ void InterSearch::xPatternSearchFracDIF(
 
   rcMvHalf = rcMvInt;   rcMvHalf <<= 1;    // for mv-cost
   Mv baseRefMv(0, 0);
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   ruiCost = xPatternRefinement(cStruct.pcPatternKey, baseRefMv, 2, rcMvHalf, (!bIsLosslessCoded && !pu.cs->slice->getDisableSATDForRD()));
 #else
   ruiCost = xPatternRefinement(cStruct.pcPatternKey, baseRefMv, 2, rcMvHalf, !bIsLosslessCoded);
@@ -5442,7 +5442,7 @@ void InterSearch::xAffineMotionEstimation( PredictionUnit& pu,
   double        fWeight       = 1.0;
 
   PelUnitBuf  origBufTmp = m_tmpStorageLCU.getBuf( UnitAreaRelative( *pu.cu, pu ) );
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
   enum DFunc distFunc = (pu.cu->transQuantBypass || pu.cs->slice->getDisableSATDForRD()) ? DF_SAD : DF_HAD;
 #endif
 
@@ -5710,7 +5710,7 @@ void InterSearch::xAffineMotionEstimation( PredictionUnit& pu,
     xPredAffineBlk( COMPONENT_Y, pu, refPic, acMvTemp, predBuf, false, pu.cu->slice->clpRng( COMPONENT_Y ) );
 
     // get error
-#if JVET_N0329_IBC_SEARCH_IMP 
+#if JVET_N0329_IBC_SEARCH_IMP
     Distortion uiCostTemp = m_pcRdCost->getDistPart(predBuf.Y(), pBuf->Y(), pu.cs->sps->getBitDepth(CHANNEL_TYPE_LUMA), COMPONENT_Y, distFunc);
 #else
     Distortion uiCostTemp = m_pcRdCost->getDistPart( predBuf.Y(), pBuf->Y(), pu.cs->sps->getBitDepth(CHANNEL_TYPE_LUMA), COMPONENT_Y, DF_HAD );
@@ -6938,7 +6938,7 @@ void InterSearch::xEstimateInterResidualQT(CodingStructure &cs, Partitioner &par
     {
       const CompArea& cbArea = tu.blocks[COMPONENT_Cb];
       const CompArea& crArea = tu.blocks[COMPONENT_Cr];
-      
+
       bool checkJointCbCr = !tu.noResidual && (TU::getCbf(tu, COMPONENT_Cb) || TU::getCbf(tu, COMPONENT_Cr));
 
       if ( checkJointCbCr )
@@ -6951,63 +6951,63 @@ void InterSearch::xEstimateInterResidualQT(CodingStructure &cs, Partitioner &par
         Distortion currCompDistCb   = 0;
         Distortion currCompDistCr   = 0;
         double     currCompCost     = 0;
-        
+
         tu.jointCbCr = 1;
         tu.getCoeffs(COMPONENT_Cr).fill(0);
-        
+
         const QpParam cQP(tu, COMPONENT_Cb);  // note: uses tu.transformSkip[compID]
-        
+
 #if RDOQ_CHROMA_LAMBDA
         m_pcTrQuant->selectLambda(COMPONENT_Cb);
 #endif
         // Lambda is loosened for the joint mode with respect to single modes as the same residual is used for both chroma blocks
         m_pcTrQuant->setLambda( 0.60 * m_pcTrQuant->getLambda() );
-        
+
         m_CABACEstimator->getCtx() = ctxStart;
         m_CABACEstimator->resetBits();
-        
+
         // Copy the original residual into the residual buffer
         csFull->getResiBuf(cbArea).copyFrom(cs.getOrgResiBuf(cbArea));
         csFull->getResiBuf(crArea).copyFrom(cs.getOrgResiBuf(crArea));
-        
+
         // Create joint residual and store it for Cb component: jointResi = (cbResi - crResi)/2
         PelBuf cbResi = csFull->getResiBuf( cbArea );
         PelBuf crResi = csFull->getResiBuf( crArea );
-        
+
         cbResi.subtractAndHalve( crResi );
-        
+
         bool reshape = slice.getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getCTUFlag() && slice.getReshapeInfo().getSliceReshapeChromaAdj() && tu.blocks[COMPONENT_Cb].width*tu.blocks[COMPONENT_Cb].height > 4 ;
-        
+
         if ( reshape )
         {
           double cRescale = round((double)(1 << CSCALE_FP_PREC) / (double)(tu.getChromaAdj()));
           m_pcTrQuant->setLambda(m_pcTrQuant->getLambda() / (cRescale*cRescale));
-          
+
           cbResi.scaleSignal(tu.getChromaAdj(), 1, tu.cu->cs->slice->clpRng(COMPONENT_Cb));
         }
-        
+
         m_pcTrQuant->transformNxN(tu, COMPONENT_Cb, cQP, currAbsSum, m_CABACEstimator->getCtx());
-        
+
         if (currAbsSum > 0)
         {
           // Set cfb also for Cr
           TU::setCbfAtDepth (tu, COMPONENT_Cr, tu.depth, true);
-          
+
           m_CABACEstimator->cbf_comp( *csFull, true, cbArea, currDepth, false );
           m_CABACEstimator->cbf_comp( *csFull, true, crArea, currDepth, true );
-          
+
           m_CABACEstimator->residual_coding( tu, COMPONENT_Cb );
           m_CABACEstimator->joint_cb_cr    ( tu ); // Could also call residual coding for Cr where this flag is sent
-          
+
           currCompFracBits = m_CABACEstimator->getEstFracBits();
-          
+
           m_pcTrQuant->invTransformNxN(tu, COMPONENT_Cb, cbResi, cQP);
-          
+
           if ( reshape )
             cbResi.scaleSignal(tu.getChromaAdj(), 0, tu.cu->cs->slice->clpRng(COMPONENT_Cb));;
-          
+
           crResi.copyAndNegate( cbResi );
-          
+
           currCompDistCb = m_pcRdCost->getDistPart(csFull->getOrgResiBuf(cbArea), cbResi, channelBitDepth, COMPONENT_Cb, DF_SSE);
           currCompDistCr = m_pcRdCost->getDistPart(csFull->getOrgResiBuf(crArea), crResi, channelBitDepth, COMPONENT_Cr, DF_SSE);
 #if WCG_EXT
@@ -7018,7 +7018,7 @@ void InterSearch::xEstimateInterResidualQT(CodingStructure &cs, Partitioner &par
         }
         else
           currCompCost = MAX_DOUBLE;
-        
+
         // evaluate
         if( currCompCost < minCostCbCr )
         {
@@ -7041,7 +7041,7 @@ void InterSearch::xEstimateInterResidualQT(CodingStructure &cs, Partitioner &par
       }
     }
 #endif // JVET_N0054_JOINT_CHROMA
-    
+
     m_CABACEstimator->getCtx() = ctxStart;
     m_CABACEstimator->resetBits();
     if( !tu.noResidual )
@@ -7751,7 +7751,7 @@ uint64_t InterSearch::xCalcPuMeBits(PredictionUnit& pu)
   assert(pu.mergeFlag);
   assert(!CU::isIBC(*pu.cu));
   m_CABACEstimator->resetBits();
-  m_CABACEstimator->merge_flag(pu); 
+  m_CABACEstimator->merge_flag(pu);
   if (pu.mergeFlag)
   {
     if (CU::isIBC(*pu.cu))
diff --git a/source/Lib/EncoderLib/IntraSearch.cpp b/source/Lib/EncoderLib/IntraSearch.cpp
index db6006489..0df754bbc 100644
--- a/source/Lib/EncoderLib/IntraSearch.cpp
+++ b/source/Lib/EncoderLib/IntraSearch.cpp
@@ -446,7 +446,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
 #else
     const bool mipAllowed = sps.getUseMIP() && isLuma( partitioner.chType ) && pu.lwidth() <= MIP_MAX_WIDTH && pu.lheight() <= MIP_MAX_HEIGHT;
 #endif
-    const bool testMip    = mipAllowed && mipModesAvailable( pu.Y() ) && !(fastMip && (cu.lwidth() > 2 * cu.lheight() || cu.lheight() > 2 * cu.lwidth())); 
+    const bool testMip    = mipAllowed && mipModesAvailable( pu.Y() ) && !(fastMip && (cu.lwidth() > 2 * cu.lheight() || cu.lheight() > 2 * cu.lwidth()));
 
     static_vector<ModeInfo, FAST_UDI_MAX_RDMODE_NUM> uiRdModeList;
 #else
@@ -582,7 +582,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
 #endif
 
             // NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated.
-#if JVET_N0217_MATRIX_INTRAPRED  
+#if JVET_N0217_MATRIX_INTRAPRED
             m_CABACEstimator->getCtx() = SubCtx( Ctx::MipFlag, ctxStartMipFlag );
 #endif
             m_CABACEstimator->getCtx() = SubCtx( Ctx::ISPMode, ctxStartIspMode );
@@ -704,7 +704,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
                 {
                   predIntraAng(COMPONENT_Y, piPred, pu );
                 }
-                
+
 #if JVET_N0363_INTRA_COST_MOD
                 // Use the min between SAD and SATD as the cost criterion
                 // SAD is scaled by 2 to align with the scaling of HAD
@@ -715,7 +715,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
 #endif
 
                 // NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated.
-#if JVET_N0217_MATRIX_INTRAPRED  
+#if JVET_N0217_MATRIX_INTRAPRED
                 m_CABACEstimator->getCtx() = SubCtx( Ctx::MipFlag, ctxStartMipFlag );
 #endif
                 m_CABACEstimator->getCtx() = SubCtx( Ctx::ISPMode, ctxStartIspMode );
@@ -2316,7 +2316,7 @@ uint64_t IntraSearch::xGetIntraFracBitsQTChroma(TransformUnit& currTU, const Com
 #if JVET_N0054_JOINT_CHROMA
   // Include Cbf and jointCbCr flags here as we make decisions across components
   CodingStructure &cs = *currTU.cs;
-  
+
   if ( currTU.jointCbCr )
   {
     if ( TU::getCbf( currTU, COMPONENT_Cb ) )
@@ -2338,7 +2338,7 @@ uint64_t IntraSearch::xGetIntraFracBitsQTChroma(TransformUnit& currTU, const Com
     else
       m_CABACEstimator->cbf_comp( cs, TU::getCbf( currTU, compID ), currTU.blocks[ compID ], currTU.depth, TU::getCbf( currTU, COMPONENT_Cb ) );
   }
-  
+
 #endif
   if( TU::getCbf( currTU, compID ) )
   {
@@ -2389,7 +2389,7 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp
   //===== init availability pattern =====
 #if JVET_N0054_JOINT_CHROMA
   bool jointCbCr = tu.jointCbCr && compID == COMPONENT_Cb;
-  
+
   if ( compID == COMPONENT_Y )
   {
 #endif
@@ -2510,27 +2510,27 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp
   PelBuf          crPred = cs.getPredBuf ( crArea );
   PelBuf          crResi = cs.getResiBuf ( crArea );
   PelBuf          crReco = cs.getRecoBuf ( crArea );
-  
+
   if ( jointCbCr )
   {
     // Get Cr prediction and residual
     crResi.copyFrom( crOrg  );
     crResi.subtract( crPred );
-    
+
     // Create joint residual and store it for Cb component: jointResi = (cbResi - crResi)/2
     piResi.subtractAndHalve( crResi );
-    
+
     // Scale the joint signal
     if ( flag && slice.getReshapeInfo().getSliceReshapeChromaAdj() )
       piResi.scaleSignal(tu.getChromaAdj(), 1, tu.cu->cs->slice->clpRng(compID));
-    
+
     // Lambda is loosened for the joint mode with respect to single modes as the same residual is used for both chroma blocks
     m_pcTrQuant->setLambda( 0.60 * m_pcTrQuant->getLambda() );
   }
   else if ( isChroma(compID) && tu.cu->cs->slice->getSliceQp() > 18 )
     m_pcTrQuant->setLambda( 1.10 * m_pcTrQuant->getLambda() );
 #endif
-  
+
   double diagRatio = 0, horVerRatio = 0;
 
   if( trModes )
@@ -2592,15 +2592,15 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp
       crResi.copyAndNegate( piResi );
     else
       crResi.fill(0);
-    
+
     tu.getCoeffs(COMPONENT_Cr).fill(0);
-    
+
     // Set cbf also for Cr
     TU::setCbfAtDepth (tu, COMPONENT_Cr, tu.depth, uiAbsSum > 0 ? true : false);
-    
+
     // Cr reconstruction and its contribution to the total error
     crReco.reconstruct(crPred, crResi, cs.slice->clpRng( COMPONENT_Cr ));
-    
+
 #if WCG_EXT
     if ( m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled() ||
         (m_pcEncCfg->getReshaper()
@@ -2861,7 +2861,7 @@ void IntraSearch::xRecurIntraCodingLumaQT( CodingStructure &cs, Partitioner &par
 #endif
 
 #if JVET_N0217_MATRIX_INTRAPRED
-      //we compare the best cost for non lwip 
+      //we compare the best cost for non lwip
       const double thresholdSkipMode = 1.0 + (1.4 / sqrt((double)(cu.lwidth() * cu.lheight())));
       if ( cu.mipFlag && tu.mtsIdx && m_bestCostNonMip != MAX_DOUBLE && m_bestCostNonMip * thresholdSkipMode < bestDCT2cost  )
       {
@@ -2920,16 +2920,16 @@ void IntraSearch::xRecurIntraCodingLumaQT( CodingStructure &cs, Partitioner &par
             {
               tu.mtsIdx = ( uiIntraMode < 34 ) ? MTS_DST7_DCT8 : MTS_DCT8_DST7;
             }
-            else if( transformIndex == 2 ) 
+            else if( transformIndex == 2 )
             {
               tu.mtsIdx = ( uiIntraMode < 34 ) ? MTS_DCT8_DST7 : MTS_DST7_DCT8;
             }
-            else 
+            else
             {
               tu.mtsIdx = MTS_DST7_DST7 + transformIndex;
             }
           }
-          else 
+          else
           {
             tu.mtsIdx = MTS_DST7_DST7 + transformIndex;
           }
@@ -3306,7 +3306,7 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
     cs.setDecomp(currArea.Cb(), true); // set in advance (required for Cb2/Cr2 in 4:2:2 video)
 
     const unsigned      numTBlocks  = ::getNumberValidTBlocks( *cs.pcv );
-    
+
 #if JVET_N0054_JOINT_CHROMA
     CompArea&  cbArea         = currTU.blocks[COMPONENT_Cb];
     CompArea&  crArea         = currTU.blocks[COMPONENT_Cr];
@@ -3316,23 +3316,23 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
     Distortion bestDistCr     = 0;
     int        maxModesTested = 0;
     bool       earlyExitISP   = false;
-    
+
     TempCtx ctxStartTU( m_CtxCache );
     TempCtx ctxStart  ( m_CtxCache );
     TempCtx ctxBest   ( m_CtxCache );
-    
+
     ctxStartTU       = m_CABACEstimator->getCtx();
     currTU.jointCbCr = 0;
-    
+
     // Do predictions here to avoid repeating the "default0Save1Load2" stuff
     int  predMode   = PU::getFinalIntraMode( pu, CHANNEL_TYPE_CHROMA );
-    
+
     PelBuf piPredCb = cs.getPredBuf(cbArea);
     PelBuf piPredCr = cs.getPredBuf(crArea);
-    
+
     initIntraPatternChType( *currTU.cu, cbArea);
     initIntraPatternChType( *currTU.cu, crArea);
-    
+
     if( PU::isLMCMode( predMode ) )
     {
       xGetLumaRecPixels( pu, cbArea );
@@ -3369,7 +3369,7 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
 #else
       const bool isOneMode                   = (totalModesToTest == 1);
 #endif
-      
+
       int currModeId = 0;
       int default0Save1Load2 = 0;
 
@@ -3409,7 +3409,7 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
             default0Save1Load2 = 2; //load it on subsequent modes
           }
 #endif
-          
+
           if (!isFirstMode) // if not first mode to be tested
           {
             m_CABACEstimator->getCtx() = ctxStart;
@@ -3443,7 +3443,7 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
 #if JVET_N0054_JOINT_CHROMA
             dSingleCost = singleCostTmp;
             bestModeId  = currModeId;
-            
+
             if ( c == COMPONENT_Cb )
             {
               bestCostCb = singleCostTmp;
@@ -3459,7 +3459,7 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
             singleDistC = singleDistCTmp;
             bestModeId  = currModeId;
 #endif
-            
+
             if( !isLastMode )
             {
 #if KEEP_PRED_AND_RESI_SIGNALS
@@ -3498,7 +3498,7 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
       if ( c == COMPONENT_Cb && bestModeId < totalModesToTest)
       {
         m_CABACEstimator->getCtx() = ctxBest;
-        
+
         currTU.copyComponentFrom(tmpTU, COMPONENT_Cb); // Cbf of Cb is needed to estimate cost for Cr Cbf
       }
 #else
@@ -3528,7 +3528,7 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
       cs.dist += singleDistC;
 #endif // not JVET_N0054_JOINT_CHROMA
     }
-    
+
 #if JVET_N0054_JOINT_CHROMA
     if ( !earlyExitISP )
     {
@@ -3537,21 +3537,21 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
       Distortion bestDistCbCr   = bestDistCb + bestDistCr;
       int        bestJointCbCr  = 0;
       bool       checkJointCbCr = TU::getCbf(tmpTU, COMPONENT_Cb) || TU::getCbf(tmpTU, COMPONENT_Cr);
-      
+
       if ( checkJointCbCr )
       {
         Distortion distTmp = 0;
-        
+
         currTU.jointCbCr               = 1;
         currTU.compAlpha[COMPONENT_Cb] = 0;
-        
+
         m_CABACEstimator->getCtx() = ctxStartTU;
-        
+
         xIntraCodingTUBlock( currTU, COMPONENT_Cb, false, distTmp, 0 );
-        
+
         uint64_t bits  = xGetIntraFracBitsQTChroma( currTU, COMPONENT_Cb );
         double costTmp = m_pcRdCost->calcRdCost( bits, distTmp );
-        
+
         if( costTmp < bestCostCbCr )
         {
           bestCostCbCr  = costTmp;
@@ -3559,7 +3559,7 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
           bestJointCbCr = 1;
         }
       }
-      
+
       // Retrieve the best CU data (unless it was the very last one tested)
       if ( !(maxModesTested == 1 && !checkJointCbCr) && bestJointCbCr == 0 )
       {
@@ -3579,22 +3579,22 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
         }
         cs.getRecoBuf   (cbArea).copyFrom(saveCS.getRecoBuf   (cbArea));
         cs.getRecoBuf   (crArea).copyFrom(saveCS.getRecoBuf   (crArea));
-        
+
         currTU.copyComponentFrom(tmpTU, COMPONENT_Cb);
         currTU.copyComponentFrom(tmpTU, COMPONENT_Cr);
-        
+
         m_CABACEstimator->getCtx() = ctxBest;
       }
-      
+
       // Copy results to the picture structures
       cs.picture->getRecoBuf(cbArea).copyFrom(cs.getRecoBuf(cbArea));
       cs.picture->getRecoBuf(crArea).copyFrom(cs.getRecoBuf(crArea));
       cs.picture->getPredBuf(cbArea).copyFrom(cs.getPredBuf(cbArea));
       cs.picture->getPredBuf(crArea).copyFrom(cs.getPredBuf(crArea));
-      
+
       cbfs.cbf(COMPONENT_Cb) = TU::getCbf(currTU, COMPONENT_Cb);
       cbfs.cbf(COMPONENT_Cr) = TU::getCbf(currTU, COMPONENT_Cr);
-      
+
       currTU.jointCbCr = cbfs.cbf(COMPONENT_Cb) ? bestJointCbCr : 0;
       cs.dist         += bestDistCbCr;
     }
diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp
index efd6dd423..82dd1c93f 100644
--- a/source/Lib/EncoderLib/VLCWriter.cpp
+++ b/source/Lib/EncoderLib/VLCWriter.cpp
@@ -793,7 +793,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
   WRITE_FLAG( pcSPS->getAffineAmvrEnabledFlag() ? 1 : 0,                             "sps_affine_amvr_enabled_flag" );
 
   WRITE_FLAG( pcSPS->getUseDMVR() ? 1 : 0,                                            "sps_dmvr_enable_flag" );
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   WRITE_FLAG(pcSPS->getUseMMVD() ? 1 : 0,                                             "sps_mmvd_enable_flag");
 #endif
   // KJS: sps_cclm_enabled_flag
@@ -827,7 +827,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
   // KJS: sps_ciip_enabled_flag
   WRITE_FLAG( pcSPS->getUseMHIntra() ? 1 : 0,                                                  "mhintra_flag" );
 
-#if JVET_N0127_MMVD_SPS_FLAG 
+#if JVET_N0127_MMVD_SPS_FLAG
   if ( pcSPS->getUseMMVD() )
   {
     WRITE_FLAG( pcSPS->getFpelMmvdEnabledFlag() ? 1 : 0,                            "sps_fpel_mmvd_enabled_flag" );
-- 
GitLab