diff --git a/cfg/lossless/lossless.cfg b/cfg/lossless/lossless.cfg
index 2ab513b33ad737766719b20fe14442b1d902a339..793b2bedbd16f9300826026cd8bb27cf2024e94a 100644
--- a/cfg/lossless/lossless.cfg
+++ b/cfg/lossless/lossless.cfg
@@ -21,5 +21,4 @@ PROF                         : 0
 Log2MaxTbSize                : 5
 InternalBitDepth             : 0
 TSRCdisableLL                : 1
-SliceLosslessArray           : 1
 
diff --git a/cfg/lossless/lossless_mixed.cfg b/cfg/lossless/lossless_mixed.cfg
index c53046585f386a8ab9534772ba473b5e917d63fc..5fbdd0bed8bedf255f7b256e6321abd1e2682d5a 100644
--- a/cfg/lossless/lossless_mixed.cfg
+++ b/cfg/lossless/lossless_mixed.cfg
@@ -30,7 +30,8 @@ SliceLevelDblk               : 1
 SliceLevelAlf                : 1
 SliceLevelSao                : 1
 SignHideFlag                 : 0
-SliceLosslessArray           : 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 
+MixedLossyLossless           : 1
+SliceLosslessArray           : 1 2  # slices with index 1 and 2 are lossless coded 
 
 #============ Tiles / Slices ================
 EnablePicPartitioning         : 1                         # Enable picture partitioning (0: single tile, single slice, 1: multiple tiles/slices can be used)
diff --git a/doc/software-manual.tex b/doc/software-manual.tex
index 400706a62a5387654fdfd0c49150cdfe07a41523..6b97d01062133ffc6fdf346c83b623490ca1a19d 100644
--- a/doc/software-manual.tex
+++ b/doc/software-manual.tex
@@ -2055,10 +2055,16 @@ Allow signalling of entry points for WPP in slice header.
 Note that when a slice contains more than one tile, entry point offsets for tile are always present in the slice header.
 \\
 
-\Option{SliceLosslessArray} &
+\Option{MixedLossyLossless} &
 %\ShortOption{\None} &
 \Default{0} &
-Define pattern of lossless coding in unit of slices, 0 means lossy slice; 1 means lossless slice. Example:  1 1 0 0 means first 2 slices are lossless coded and rest of the slices are lossy coded. Default is all slices are lossy coded.
+Enable or disable mixed lossy/lossless coding. 0 means disable; 1 means enable. Mixed lossy/lossless can only be enable if CostMode is set to lossless.
+\\
+
+\Option{SliceLosslessArray} &
+%\ShortOption{\None} &
+\Default{\None} &
+Slice index array of lossless slices. Example:  1 5 6 means slices with index of 1, 5, and 6 are lossless coded. The rest of the slices are lossy coded. If MixedLossyLossless is disbaled, the values are ignored.
 \\
 
 \end{OptionTableNoShorthand}
diff --git a/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp b/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp
index f7013fd8d3c0761038fcf5f90cd1c2fc62dd8a7f..8f46d322742348941f82192bc3cb73048a625260 100644
--- a/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp
+++ b/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp
@@ -46,7 +46,7 @@
 #include "EncoderLib/AnnexBwrite.h"
 
 BitstreamExtractorApp::BitstreamExtractorApp()
-:m_vpsId(-1)
+:m_vpsId(0)
 #if JVET_Q0394_TIMING_SEI
 , m_removeTimingSEI (false)
 #endif
@@ -369,6 +369,9 @@ uint32_t BitstreamExtractorApp::decode()
   bitstreamFileIn.seekg( 0, std::ios::beg );
 
   int unitCnt = 0;
+#if JVET_Q0404_CBR_SUBPIC
+  bool lastSliceWritten= false;   // stores status of previous slice for associated filler data NAL units
+#endif
 
   VPS *vpsIdZero = new VPS();
   std::vector<uint8_t> empty;
@@ -426,28 +429,27 @@ uint32_t BitstreamExtractorApp::decode()
       if (m_targetOlsIdx >= 0)
       {
         // if there is no VPS nal unit, there shall be one OLS and one layer.
-        if (m_vpsId == -1)
+        if (m_vpsId == 0)
         {
           CHECK(m_targetOlsIdx != 0, "only one OLS and one layer exist, but target olsIdx is not equal to zero");
-          vps = new VPS();
-          vps->setNumLayersInOls(0, 1);
-          vps->setLayerIdInOls(0, 0, nalu.m_nuhLayerId);
         }
-        else
+        // Remove NAL units with nal_unit_type not equal to any of VPS_NUT, DPS_NUT, and EOB_NUT and with nuh_layer_id not included in the list LayerIdInOls[targetOlsIdx].
+        NalUnitType t = nalu.m_nalUnitType;
+        bool isSpecialNalTypes = t == NAL_UNIT_VPS || t == NAL_UNIT_DCI || t == NAL_UNIT_EOB;
+        vps = m_parameterSetManager.getVPS(m_vpsId);
+        if (m_vpsId == 0)
         {
-          // Remove NAL units with nal_unit_type not equal to any of VPS_NUT, DPS_NUT, and EOB_NUT and with nuh_layer_id not included in the list LayerIdInOls[targetOlsIdx].
-          NalUnitType t = nalu.m_nalUnitType;
-          bool isSpecialNalTypes = t == NAL_UNIT_VPS || t == NAL_UNIT_DCI || t == NAL_UNIT_EOB;
-          vps = m_parameterSetManager.getVPS(m_vpsId);
-          uint32_t numOlss = vps->getNumOutputLayerSets();
-          CHECK(m_targetOlsIdx <0  || m_targetOlsIdx >= numOlss, "target Ols shall be in the range of OLSs specified by the VPS");
-          std::vector<int> LayerIdInOls = vps->getLayerIdsInOls(m_targetOlsIdx);
-          bool isIncludedInTargetOls = std::find(LayerIdInOls.begin(), LayerIdInOls.end(), nalu.m_nuhLayerId) != LayerIdInOls.end();
-          writeInpuNalUnitToStream &= (isSpecialNalTypes || isIncludedInTargetOls);
+          // this initialization can be removed once the dummy VPS is properly initialized in the parameter set manager
+          vps->deriveOutputLayerSets();
+        }
+        uint32_t numOlss = vps->getNumOutputLayerSets();
+        CHECK(m_targetOlsIdx <0  || m_targetOlsIdx >= numOlss, "target Ols shall be in the range of OLSs specified by the VPS");
+        std::vector<int> layerIdInOls = vps->getLayerIdsInOls(m_targetOlsIdx);
+        bool isIncludedInTargetOls = std::find(layerIdInOls.begin(), layerIdInOls.end(), nalu.m_nuhLayerId) != layerIdInOls.end();
+        writeInpuNalUnitToStream &= (isSpecialNalTypes || isIncludedInTargetOls);
 #if JVET_Q0394_TIMING_SEI
-          m_removeTimingSEI = !vps->getGeneralHrdParameters()->getGeneralSamePicTimingInAllOlsFlag();
+        m_removeTimingSEI = !vps->getGeneralHrdParameters()->getGeneralSamePicTimingInAllOlsFlag();
 #endif
-        }
       }
       if( nalu.m_nalUnitType == NAL_UNIT_SPS )
       {
@@ -498,6 +500,22 @@ uint32_t BitstreamExtractorApp::decode()
         }
         else
         {
+          if( pps->getNoPicPartitionFlag() )
+          {
+            pps->resetTileSliceInfo();
+            pps->setLog2CtuSize( ceilLog2(sps->getCTUSize()) );
+            pps->setNumExpTileColumns(1);
+            pps->setNumExpTileRows(1);
+            pps->addTileColumnWidth( pps->getPicWidthInCtu( ) );
+            pps->addTileRowHeight( pps->getPicHeightInCtu( ) );
+            pps->initTiles();
+            pps->setRectSliceFlag( 1 );
+            pps->setNumSlicesInPic( 1 );
+            pps->initRectSlices( );
+            pps->setTileIdxDeltaPresentFlag( 0 );
+            pps->setSliceTileIdx( 0, 0 );
+          }
+          pps->initRectSliceMap(sps);
           pps->initSubPic(*sps);
           xPrintSubPicInfo (pps);
           if (m_subPicId >= 0)
@@ -574,12 +592,12 @@ uint32_t BitstreamExtractorApp::decode()
             if (sei->payloadType() == SEI::SCALABLE_NESTING)
             {
               SEIScalableNesting *seiNesting = (SEIScalableNesting *)sei;
-              if (seiNesting->m_nestingOlsFlag == 1)
+              if (seiNesting->m_snOlsFlag == 1)
               {
                 bool targetOlsIdxInNestingAppliedOls = false;
-                for (uint32_t i = 0; i <= seiNesting->m_nestingNumOlssMinus1; i++)
+                for (uint32_t i = 0; i <= seiNesting->m_snNumOlssMinus1; i++)
                 {
-                  if (seiNesting->m_nestingOlsIdx[i] == m_targetOlsIdx)
+                  if (seiNesting->m_snOlsIdx[i] == m_targetOlsIdx)
                   {
                     targetOlsIdxInNestingAppliedOls = true;
                     break;
@@ -612,7 +630,12 @@ uint32_t BitstreamExtractorApp::decode()
           // check for subpicture ID
           writeInpuNalUnitToStream = xCheckSliceSubpicture(nalu, m_subPicId);
         }
-
+#if JVET_Q0404_CBR_SUBPIC
+        if (nalu.m_nalUnitType == NAL_UNIT_FD)
+        {
+          writeInpuNalUnitToStream = lastSliceWritten;
+        }
+#endif
       }
       unitCnt++;
 
@@ -627,9 +650,28 @@ uint32_t BitstreamExtractorApp::decode()
         }
         ch = 1;
         bitstreamFileOut.write( &ch, 1 );
-        // write input NAL unit
-        bitstreamFileOut.write( (const char*)nalu.getBitstream().getFifo().data(), nalu.getBitstream().getFifo().size() );
+
+        // create output NAL unit
+        OutputNALUnit out (nalu.m_nalUnitType, nalu.m_nuhLayerId, nalu.m_temporalId);
+        out.m_Bitstream.getFIFO() = nalu.getBitstream().getFifo();
+        // write with start code emulation prevention
+        writeNaluContent (bitstreamFileOut, out);
       }
+
+#if JVET_Q0404_CBR_SUBPIC
+      // update status of previous slice
+      if (nalu.isSlice())
+      {
+        if (writeInpuNalUnitToStream)
+        {
+          lastSliceWritten = true;
+        }
+        else
+        {
+          lastSliceWritten=false;
+        }
+      }
+#endif
     }
   }
 
diff --git a/source/App/DecoderApp/DecApp.cpp b/source/App/DecoderApp/DecApp.cpp
index d41cff1692f25207d9d1385e392cf39dfb370fe6..d288bb0206af302fdf06b9bf4f865cda125d0710 100644
--- a/source/App/DecoderApp/DecApp.cpp
+++ b/source/App/DecoderApp/DecApp.cpp
@@ -270,6 +270,13 @@ uint32_t DecApp::decode()
         xWriteOutput( pcListPic, nalu.m_temporalId );
       }
     }
+#if JVET_Q0488_SEI_REPETITION_CONSTRAINT
+    if( bNewPicture )
+    {
+      m_cDecLib.checkSeiInPictureUnit();
+      m_cDecLib.resetPictureSeiNalus();
+    }
+#endif
 #if JVET_R0201_PREFIX_SUFFIX_APS_CLEANUP
     if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS)
     {
diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp
index ee51cd13e37407f33cf5908822a7fc3fb38c528d..7f46c77906b59577885d0e0e3f1a0957b7f52048 100644
--- a/source/App/EncoderApp/EncApp.cpp
+++ b/source/App/EncoderApp/EncApp.cpp
@@ -266,7 +266,9 @@ void EncApp::xInitLibCfg()
   m_cEncLib.setNoBcwConstraintFlag                               ( !m_bcw );
   m_cEncLib.setNoIbcConstraintFlag                               ( m_IBCMode ? false : true );
   m_cEncLib.setNoCiipConstraintFlag                           ( !m_ciip );
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   m_cEncLib.setNoFPelMmvdConstraintFlag                          ( !(m_MMVD && m_allowDisFracMMVD) );
+#endif
   m_cEncLib.setNoGeoConstraintFlag                               ( !m_Geo );
   m_cEncLib.setNoLadfConstraintFlag                              ( !m_LadfEnabed );
   m_cEncLib.setNoTransformSkipConstraintFlag                     ( !m_useTransformSkip );
@@ -577,6 +579,7 @@ void EncApp::xInitLibCfg()
   //====== Parallel Merge Estimation ========
   m_cEncLib.setLog2ParallelMergeLevelMinus2(m_log2ParallelMergeLevel - 2);
 #if JVET_R0110_MIXED_LOSSLESS
+  m_cEncLib.setMixedLossyLossless(m_mixedLossyLossless);
   m_cEncLib.setSliceLosslessArray(m_sliceLosslessArray);
 #endif
 
diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp
index 3b5e2bac74675eee35a125a402fa609db7ff98f5..1139f2c1e9f28e61ea84155080ebf359eac3ca16 100644
--- a/source/App/EncoderApp/EncAppCfg.cpp
+++ b/source/App/EncoderApp/EncAppCfg.cpp
@@ -115,7 +115,9 @@ EncAppCfg::EncAppCfg()
 , m_bNoBcwConstraintFlag(false)
 , m_noIbcConstraintFlag(false)
 , m_bNoCiipConstraintFlag(false)
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
 , m_noFPelMmvdConstraintFlag(false)
+#endif
 , m_noGeoConstraintFlag(false)
 , m_bNoLadfConstraintFlag(false)
 , m_noTransformSkipConstraintFlag(false)
@@ -621,7 +623,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
 
   SMultiValueInput<double> cfg_adIntraLambdaModifier         (0, std::numeric_limits<double>::max(), 0, MAX_TLAYER); ///< Lambda modifier for Intra pictures, one for each temporal layer. If size>temporalLayer, then use [temporalLayer], else if size>0, use [size()-1], else use m_adLambdaModifier.
 #if JVET_R0110_MIXED_LOSSLESS
-  SMultiValueInput<uint32_t>  cfgSliceLosslessArray(0, std::numeric_limits<uint32_t>::max(), 0, std::numeric_limits<uint32_t>::max());
+  SMultiValueInput<uint16_t>  cfgSliceLosslessArray          (0, std::numeric_limits<uint16_t>::max(), 0, MAX_SLICES);
 #endif
 #if SHARP_LUMA_DELTA_QP
   const int defaultLumaLevelTodQp_QpChangePoints[]   =  {-3,  -2,  -1,   0,   1,   2,   3,   4,   5,   6};
@@ -1102,7 +1104,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
   ("SAOGreedyEnc",                                    m_saoGreedyMergeEnc,                              false, "SAO greedy merge encoding algorithm")
   ("EnablePicPartitioning",                           m_picPartitionFlag,                               false, "Enable picture partitioning (0: single tile, single slice, 1: multiple tiles/slices can be used)")
 #if JVET_R0110_MIXED_LOSSLESS
-  ("SliceLosslessArray", cfgSliceLosslessArray, cfgSliceLosslessArray, " Lossless slice array Last lossless flag in the  list will be repeated uniformly to cover any remaining slice")
+  ("MixedLossyLossless",                              m_mixedLossyLossless,                                  false, "Enable encoder to encode mixed lossy/lossless coding ")
+  ("SliceLosslessArray",                              cfgSliceLosslessArray, cfgSliceLosslessArray, " Lossless slice array Last lossless flag in the  list will be repeated uniformly to cover any remaining slice")
 #endif 
   ("TileColumnWidthArray",                            cfgTileColumnWidth,                  cfgTileColumnWidth, "Tile column widths in units of CTUs. Last column width in list will be repeated uniformly to cover any remaining picture width")
   ("TileRowHeightArray",                              cfgTileRowHeight,                      cfgTileRowHeight, "Tile row heights in units of CTUs. Last row height in list will be repeated uniformly to cover any remaining picture height")
@@ -1641,30 +1644,29 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
   }
 
 #if JVET_R0110_MIXED_LOSSLESS
-  // store slice lossless array 
-  const int maxSlicesPerPicture = 600; // the maximum number of slices per picture is 600
-  m_sliceLosslessArray.resize(maxSlicesPerPicture);
-  if (cfgSliceLosslessArray.values.size() == 0)
+  if (m_costMode != COST_LOSSLESS_CODING && m_mixedLossyLossless)
   {
-    // Default all slices are lossy
-    for (uint32_t i = 0; i < maxSlicesPerPicture; i++)
-    {
-      m_sliceLosslessArray[i] = 0;
-    }
+    m_mixedLossyLossless = 0;
+    msg(WARNING, "*************************************************************************\n");
+    msg(WARNING, "* Mixed lossy lossles coding cannot enable in lossy costMode *\n");
+    msg(WARNING, "* Forcely disabled  m_mixedLossyLossless *\n");
+    msg(WARNING, "*************************************************************************\n");
   }
-  else
+  if (!m_mixedLossyLossless && cfgSliceLosslessArray.values.size() > 0)
   {
+    msg(WARNING, "*************************************************************************\n");
+    msg(WARNING, "* Mixed lossy lossles coding is not enabled *\n");
+    msg(WARNING, "* ignoring the value of SliceLosslessArray *\n");
+    msg(WARNING, "*************************************************************************\n");
+  }
+
+  if (m_costMode == COST_LOSSLESS_CODING && m_mixedLossyLossless)
+  {
+    m_sliceLosslessArray.resize(cfgSliceLosslessArray.values.size());
     for (uint32_t i = 0; i < cfgSliceLosslessArray.values.size(); i++)
     {
       m_sliceLosslessArray[i] = cfgSliceLosslessArray.values[i];
     }
-    for (uint32_t i = (uint32_t)cfgSliceLosslessArray.values.size(); i < maxSlicesPerPicture; i++)
-    {
-      if (cfgSliceLosslessArray.values.size() > 0)
-        m_sliceLosslessArray[i] = cfgSliceLosslessArray.values[cfgSliceLosslessArray.values.size() - 1];
-      else
-        m_sliceLosslessArray[i] = 0;
-    }
   }
 #endif
 
@@ -2290,12 +2292,33 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
 #endif
 #endif // ENABLE_QPA
 
-#if JVET_R0110_MIXED_LOSSLESS
-  if (m_costMode == COST_LOSSLESS_CODING && m_sliceLosslessArray[0]) // if first slice is lossless 
-#else
+
+
+
   if( m_costMode == COST_LOSSLESS_CODING )
-#endif
   {
+#if JVET_R0110_MIXED_LOSSLESS
+    bool firstSliceLossless = false;
+    if (m_mixedLossyLossless)
+    {
+      if (m_sliceLosslessArray.size() > 0)
+      {
+        for (uint32_t i = 0; i < m_sliceLosslessArray.size(); i++)
+        {
+          if (m_sliceLosslessArray[i] == 0)
+          {
+            firstSliceLossless = true;
+            break;
+          }
+        }
+      }
+    }
+    else
+    {
+      firstSliceLossless = true;
+    }
+    if (firstSliceLossless) // if first slice is lossless 
+#endif
     m_iQP = LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP - ( ( m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8 ) * 6 );
   }
 
diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h
index 0762b6d85bd86daff670ca9dcf6d1ce2328748e0..0e8adcde668d34ba16e47c4653f28a338e1d9bb8 100644
--- a/source/App/EncoderApp/EncAppCfg.h
+++ b/source/App/EncoderApp/EncAppCfg.h
@@ -167,7 +167,9 @@ protected:
   bool      m_bNoBcwConstraintFlag;
   bool      m_noIbcConstraintFlag;
   bool      m_bNoCiipConstraintFlag;
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   bool      m_noFPelMmvdConstraintFlag;
+#endif
   bool      m_noGeoConstraintFlag;
   bool      m_bNoLadfConstraintFlag;
   bool      m_noTransformSkipConstraintFlag;
@@ -455,7 +457,8 @@ protected:
   bool      m_useEarlySkipDetection;                          ///< flag for using Early SKIP Detection
   bool      m_picPartitionFlag;                               ///< enable picture partitioning (0: single tile, single slice, 1: multiple tiles/slices can be used)
 #if JVET_R0110_MIXED_LOSSLESS
-  std::vector<uint32_t> m_sliceLosslessArray;                    ///< Slice lossless array
+  bool      m_mixedLossyLossless;                             ///< enable mixed lossy/lossless coding
+  std::vector<uint16_t> m_sliceLosslessArray;                 ///< Slice lossless array
 #endif
   std::vector<uint32_t> m_tileColumnWidth;                    ///< tile column widths in units of CTUs (last column width will be repeated uniformly to cover any remaining picture width)
   std::vector<uint32_t> m_tileRowHeight;                      ///< tile row heights in units of CTUs (last row height will be repeated uniformly to cover any remaining picture height)
diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp
index 537fa61ec7ed18174428ef6ff823c696b8fd1dc4..0a7e9053034ffe58a037802e621936a6e084a8f8 100644
--- a/source/Lib/CommonLib/InterPrediction.cpp
+++ b/source/Lib/CommonLib/InterPrediction.cpp
@@ -369,7 +369,11 @@ void InterPrediction::xSubPuBio(PredictionUnit& pu, PelUnitBuf& predBuf, const R
       int filtersize = (compID == (COMPONENT_Y)) ? NTAPS_LUMA : NTAPS_CHROMA;
       cMv += Mv(-(((filtersize >> 1) - 1) << mvshiftTemp), -(((filtersize >> 1) - 1) << mvshiftTemp));
       bool wrapRef = false;
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+      if ( pu.cu->slice->getRefPic(refId, pu.refIdx[refId])->isWrapAroundEnabled( pu.cs->pps ) )
+#else
       if (pu.cs->sps->getWrapAroundEnabledFlag())
+#endif
       {
         wrapRef = wrapClipMv(cMv, pu.blocks[0].pos(), pu.blocks[0].size(), pu.cs->sps, pu.cs->pps);
       }
@@ -474,7 +478,11 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
   {
     if( !isIBC && pu.cu->slice->getRefPic( eRefPicList, iRefIdx )->isRefScaled( pu.cs->pps ) == false )
     {
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+      if( !pu.cs->pps->getWrapAroundEnabledFlag() )
+#else
       if( !sps.getWrapAroundEnabledFlag() )
+#endif
       {
         clipMv( mv[0], pu.cu->lumaPos(), pu.cu->lumaSize(), sps, *pu.cs->pps );
       }
@@ -677,7 +685,11 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
 
   bool  wrapRef = false;
   Mv    mv(_mv);
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  if( !isIBC && refPic->isWrapAroundEnabled( pu.cs->pps ) )
+#else
   if( !isIBC && pu.cs->sps->getWrapAroundEnabledFlag() )
+#endif
   {
     wrapRef = wrapClipMv( mv, pu.blocks[0].pos(), pu.blocks[0].size(), pu.cs->sps, pu.cs->pps );
   }
@@ -1067,7 +1079,11 @@ void InterPrediction::xPredAffineBlk(const ComponentID &compID, const Prediction
         iMvScaleTmpVer = tmpMv.getVer();
 
         // clip and scale
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+        if ( refPic->isWrapAroundEnabled( pu.cs->pps ) )
+#else
         if (sps.getWrapAroundEnabledFlag())
+#endif
         {
           m_storedMv[h / AFFINE_MIN_BLOCK_SIZE * MVBUFFER_SIZE + w / AFFINE_MIN_BLOCK_SIZE].set(iMvScaleTmpHor, iMvScaleTmpVer);
           Mv tmpMv(iMvScaleTmpHor, iMvScaleTmpVer);
@@ -1092,7 +1108,11 @@ void InterPrediction::xPredAffineBlk(const ComponentID &compID, const Prediction
         Mv curMv = m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE) * MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE)] +
           m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + iScaleY)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + iScaleX)];
         roundAffineMv(curMv.hor, curMv.ver, 1);
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+        if ( refPic->isWrapAroundEnabled( pu.cs->pps ) )
+#else
         if (sps.getWrapAroundEnabledFlag())
+#endif
         {
           wrapRef = wrapClipMv( curMv, Position( pu.Y().x + ( w << iScaleX ), pu.Y().y + ( h << iScaleY ) ), Size( blockWidth << iScaleX, blockHeight << iScaleY ), &sps, pu.cs->pps );
         }
@@ -1669,7 +1689,11 @@ void InterPrediction::xPrefetch(PredictionUnit& pu, PelUnitBuf &pcPad, RefPicLis
     cMv += Mv(-(((filtersize >> 1) - 1) << mvshiftTempHor),
       -(((filtersize >> 1) - 1) << mvshiftTempVer));
     bool wrapRef = false;
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+    if( refPic->isWrapAroundEnabled( pu.cs->pps ) )
+#else
     if( pu.cs->sps->getWrapAroundEnabledFlag() )
+#endif
     {
       wrapRef = wrapClipMv( cMv, pu.blocks[0].pos(), pu.blocks[0].size(), pu.cs->sps, pu.cs->pps );
     }
@@ -1841,7 +1865,11 @@ void InterPrediction::xFinalPaddedMCForDMVR(PredictionUnit& pu, PelUnitBuf &pcYu
     m_iRefListIdx = refId;
     const Picture* refPic = pu.cu->slice->getRefPic( refId, pu.refIdx[refId] )->unscaledPic;
     Mv cMvClipped = cMv;
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+    if( !pu.cs->pps->getWrapAroundEnabledFlag() )
+#else
     if( !pu.cs->sps->getWrapAroundEnabledFlag() )
+#endif
     {
       clipMv( cMvClipped, pu.lumaPos(), pu.lumaSize(), *pu.cs->sps, *pu.cs->pps );
     }
@@ -1935,7 +1963,11 @@ void InterPrediction::xinitMC(PredictionUnit& pu, const ClpRngs &clpRngs)
   Mv mergeMVL1(pu.mv[REF_PIC_LIST_1]);
 
   /*Clip the starting MVs*/
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  if( !pu.cs->pps->getWrapAroundEnabledFlag() )
+#else
   if( !pu.cs->sps->getWrapAroundEnabledFlag() )
+#endif
   {
     clipMv( mergeMVL0, pu.lumaPos(), pu.lumaSize(), *pu.cs->sps, *pu.cs->pps );
     clipMv( mergeMVL1, pu.lumaPos(), pu.lumaSize(), *pu.cs->sps, *pu.cs->pps );
@@ -2007,7 +2039,11 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
       int filtersize = (compID == (COMPONENT_Y)) ? NTAPS_LUMA : NTAPS_CHROMA;
       cMv += Mv(-(((filtersize >> 1) - 1) << mvshiftTemp), -(((filtersize >> 1) - 1) << mvshiftTemp));
       bool wrapRef = false;
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+      if ( pu.cs->pps->getWrapAroundEnabledFlag() )
+#else
       if (pu.cs->sps->getWrapAroundEnabledFlag())
+#endif
       {
         wrapRef = wrapClipMv(cMv, pu.blocks[0].pos(), pu.blocks[0].size(), pu.cs->sps, pu.cs->pps);
       }
diff --git a/source/Lib/CommonLib/Mv.cpp b/source/Lib/CommonLib/Mv.cpp
index b4d7bef7a1f33ba048792c2e7a374ea553a05740..2bfb1333a93308226397a0a27b5427b3f24651d8 100644
--- a/source/Lib/CommonLib/Mv.cpp
+++ b/source/Lib/CommonLib/Mv.cpp
@@ -53,7 +53,11 @@ void roundAffineMv( int& mvx, int& mvy, int nShift )
 
 void clipMv( Mv& rcMv, const Position& pos, const struct Size& size, const SPS& sps, const PPS& pps )
 {
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  if (pps.getWrapAroundEnabledFlag())
+#else
   if (sps.getWrapAroundEnabledFlag())
+#endif
   {
     wrapClipMv(rcMv, pos, size, &sps, &pps);
     return;
@@ -92,13 +96,21 @@ bool wrapClipMv( Mv& rcMv, const Position& pos, const struct Size& size, const S
 
   if(mvX > iHorMax)
   {
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+    mvX -= ( pps->getWrapAroundOffset() << iMvShift );
+#else
     mvX -= ( sps->getWrapAroundOffset() << iMvShift );
+#endif
     mvX = std::min( iHorMax, std::max( iHorMin, mvX ) );
     wrapRef = false;
   }
   if(mvX < iHorMin)
   {
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+    mvX += ( pps->getWrapAroundOffset() << iMvShift );
+#else
     mvX += ( sps->getWrapAroundOffset() << iMvShift );
+#endif
     mvX = std::min( iHorMax, std::max( iHorMin, mvX ) );
     wrapRef = false;
   }
diff --git a/source/Lib/CommonLib/Picture.cpp b/source/Lib/CommonLib/Picture.cpp
index 5a73072f8e955a38ccc2e94e080b8104d02c4e76..79bf4e9f2f50209da88e5de324d959f67ae6f2d3 100644
--- a/source/Lib/CommonLib/Picture.cpp
+++ b/source/Lib/CommonLib/Picture.cpp
@@ -175,6 +175,10 @@ Picture::Picture()
   cs                   = nullptr;
   m_isSubPicBorderSaved = false;
   m_bIsBorderExtended  = false;
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  m_wrapAroundValid    = false;
+  m_wrapAroundOffset   = 0;
+#endif
   usedByCurr           = false;
   longTerm             = false;
   reconstructed        = false;
@@ -387,6 +391,28 @@ void Picture::allocateNewSlice()
     slice.initSlice();
   }
 }
+#if JVET_R0110_MIXED_LOSSLESS
+void Picture::fillSliceLossyLosslessArray(std::vector<uint16_t> sliceLosslessIndexArray, bool mixedLossyLossless)
+{
+  uint16_t numElementsinsliceLosslessIndexArray = (uint16_t)sliceLosslessIndexArray.size();
+  uint32_t numSlices = this->cs->pps->getNumSlicesInPic();
+  m_lossylosslessSliceArray.assign(numSlices, true); // initialize to all slices are lossless 
+  if (mixedLossyLossless)
+  {
+    m_lossylosslessSliceArray.assign(numSlices, false); // initialize to all slices are lossless 
+    CHECK(numElementsinsliceLosslessIndexArray == 0 , "sliceLosslessArray is empty, must need to configure for mixed lossy/lossless");
+
+    // mixed lossy/lossless slices, set only lossless slices;
+    for (uint16_t i = 0; i < numElementsinsliceLosslessIndexArray; i++)
+    {
+        CHECK(sliceLosslessIndexArray[i] >= numSlices || sliceLosslessIndexArray[i] < 0, "index of lossless slice is out of slice index bound");
+        m_lossylosslessSliceArray[sliceLosslessIndexArray[i]] = true;
+    }
+  } 
+  CHECK(m_lossylosslessSliceArray.size() < numSlices, "sliceLosslessArray size is less than number of slices");
+
+}
+#endif
 
 Slice *Picture::swapSliceObject(Slice * p, uint32_t i)
 {
@@ -941,10 +967,20 @@ void Picture::restoreSubPicBorder(int POC, int subPicX0, int subPicY0, int subPi
   m_bufSubPicRight.destroy();
 }
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+void Picture::extendPicBorder( const PPS *pps )
+#else
 void Picture::extendPicBorder()
+#endif
 {
   if ( m_bIsBorderExtended )
   {
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+    if( isWrapAroundEnabled( pps ) && ( !m_wrapAroundValid || m_wrapAroundOffset != pps->getWrapAroundOffset() ) )
+    {
+      extendWrapBorder( pps );
+    }
+#endif
     return;
   }
 
@@ -985,6 +1021,17 @@ void Picture::extendPicBorder()
     }
 
     // reference picture with horizontal wrapped boundary
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+    if ( isWrapAroundEnabled( pps ) )
+    {
+      extendWrapBorder( pps );
+    }
+    else
+    {
+      m_wrapAroundValid = false;
+      m_wrapAroundOffset = 0;
+    }
+#else
     if (cs->sps->getWrapAroundEnabledFlag())
     {
       p = M_BUFS( 0, PIC_RECON_WRAP ).get( compID );
@@ -1020,11 +1067,58 @@ void Picture::extendPicBorder()
         ::memcpy( pi - (y+1)*p.stride, pi, sizeof(Pel)*(p.width + (xmargin<<1)) );
       }
     }
+#endif
   }
 
   m_bIsBorderExtended = true;
 }
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+void Picture::extendWrapBorder( const PPS *pps )
+{
+  for(int comp=0; comp<getNumberValidComponents( cs->area.chromaFormat ); comp++)
+  {
+    ComponentID compID = ComponentID( comp );
+    PelBuf p = M_BUFS( 0, PIC_RECON_WRAP ).get( compID );
+    p.copyFrom(M_BUFS( 0, PIC_RECONSTRUCTION ).get( compID ));
+    Pel *piTxt = p.bufAt(0,0);
+    int xmargin = margin >> getComponentScaleX( compID, cs->area.chromaFormat );
+    int ymargin = margin >> getComponentScaleY( compID, cs->area.chromaFormat );
+    Pel*  pi = piTxt;
+    int xoffset = pps->getWrapAroundOffset() >> getComponentScaleX( compID, cs->area.chromaFormat );
+    for (int y = 0; y < p.height; y++)
+    {
+      for (int x = 0; x < xmargin; x++ )
+      {
+        if( x < xoffset )
+        {
+          pi[ -x - 1 ] = pi[ -x - 1 + xoffset ];
+          pi[  p.width + x ] = pi[ p.width + x - xoffset ];
+        }
+        else
+        {
+          pi[ -x - 1 ] = pi[ 0 ];
+          pi[  p.width + x ] = pi[ p.width - 1 ];
+        }
+      }
+      pi += p.stride;
+    }
+    pi -= (p.stride + xmargin);
+    for (int y = 0; y < ymargin; y++ )
+    {
+      ::memcpy( pi + (y+1)*p.stride, pi, sizeof(Pel)*(p.width + (xmargin << 1)));
+    }
+    pi -= ((p.height-1) * p.stride);
+    for (int y = 0; y < ymargin; y++ )
+    {
+      ::memcpy( pi - (y+1)*p.stride, pi, sizeof(Pel)*(p.width + (xmargin<<1)) );
+    }
+  }
+  m_wrapAroundValid = true;
+  m_wrapAroundOffset = pps->getWrapAroundOffset();
+}
+
+#endif
 PelBuf Picture::getBuf( const ComponentID compID, const PictureType &type )
 {
   return M_BUFS( ( type == PIC_ORIGINAL || type == PIC_TRUE_ORIGINAL || type == PIC_ORIGINAL_INPUT || type == PIC_TRUE_ORIGINAL_INPUT ) ? 0 : scheduler.getSplitPicId(), type ).getBuf( compID );
diff --git a/source/Lib/CommonLib/Picture.h b/source/Lib/CommonLib/Picture.h
index b705491e9172a33b3182838fdc5967e2622031dd..c7c4b9d4d1ee02c48472dfc82197465a15b5366c 100644
--- a/source/Lib/CommonLib/Picture.h
+++ b/source/Lib/CommonLib/Picture.h
@@ -144,7 +144,12 @@ struct Picture : public UnitArea
          PelUnitBuf getBuf(const UnitArea &unit,     const PictureType &type);
   const CPelUnitBuf getBuf(const UnitArea &unit,     const PictureType &type) const;
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+  void extendPicBorder( const PPS *pps );
+  void extendWrapBorder( const PPS *pps );
+#else
   void extendPicBorder();
+#endif
   void finalInit( const VPS* vps, const SPS& sps, const PPS& pps, PicHeader *picHeader, APS** alfApss, APS* lmcsAps, APS* scalingListAps );
 
   int  getPOC()                               const { return poc; }
@@ -158,6 +163,8 @@ struct Picture : public UnitArea
 #if JVET_R0110_MIXED_LOSSLESS
   void setLossyQPValue(int i)                 { m_lossyQP = i; }
   int getLossyQPValue()                       const { return m_lossyQP; }
+  void      fillSliceLossyLosslessArray(std::vector<uint16_t> sliceLosslessArray, bool mixedLossyLossless);
+  bool      losslessSlice(uint32_t sliceIdx)  const { return m_lossylosslessSliceArray[sliceIdx]; }
 #endif
 
   int           getSpliceIdx(uint32_t idx) const { return m_spliceIdx[idx]; }
@@ -197,6 +204,10 @@ public:
   bool getSubPicSaved()          { return m_isSubPicBorderSaved; }
   void setSubPicSaved(bool bVal) { m_isSubPicBorderSaved = bVal; }
   bool m_bIsBorderExtended;
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  bool m_wrapAroundValid;
+  unsigned m_wrapAroundOffset;
+#endif
   bool referenced;
   bool reconstructed;
   bool neededForOutput;
@@ -218,6 +229,7 @@ public:
   int  m_ctuNums;
 #if JVET_R0110_MIXED_LOSSLESS
   int m_lossyQP;
+  std::vector<bool> m_lossylosslessSliceArray;
 #endif
   bool interLayerRefPicFlag;
 
@@ -253,6 +265,9 @@ public:
                                                                                                getScalingWindow().getWindowRightOffset()  != pps->getScalingWindow().getWindowRightOffset() ||
                                                                                                getScalingWindow().getWindowTopOffset()    != pps->getScalingWindow().getWindowTopOffset()   ||
                                                                                                getScalingWindow().getWindowBottomOffset() != pps->getScalingWindow().getWindowBottomOffset(); }
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  bool               isWrapAroundEnabled( const PPS* pps ) const                     { return  pps->getWrapAroundEnabledFlag() && !isRefScaled( pps ); }
+#endif
 
   void         allocateNewSlice();
   Slice        *swapSliceObject(Slice * p, uint32_t i);
diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h
index 90451739bea8673b2993244fb9e0c0791c6bd19b..fa88f605289daa69a956ee76c70a0c74ecde5819 100644
--- a/source/Lib/CommonLib/SEI.h
+++ b/source/Lib/CommonLib/SEI.h
@@ -498,13 +498,13 @@ public:
     deleteSEIs(m_nestedSEIs);
   }
 
-  bool  m_nestingOlsFlag;
-  uint32_t m_nestingNumOlssMinus1;
-  uint32_t m_nestingOlsIdxDeltaMinus1[MAX_NESTING_NUM_LAYER];
-  uint32_t m_nestingOlsIdx[MAX_NESTING_NUM_LAYER];
-  bool  m_nestingAllLayersFlag;                           //value valid if m_nestingOlsFlag == 0
-  uint32_t  m_nestingNumLayersMinus1;                     //value valid if m_nestingOlsFlag == 0 and m_nestingAllLayersFlag == 0
-  uint8_t m_nestingLayerId[MAX_NESTING_NUM_LAYER];        //value valid if m_nestingOlsFlag == 0 and m_nestingAllLayersFlag == 0. This can e.g. be a static array of 64 uint8_t values
+  bool      m_snOlsFlag;
+  uint32_t  m_snNumOlssMinus1;
+  uint32_t  m_snOlsIdxDeltaMinus1[MAX_NESTING_NUM_LAYER];
+  uint32_t  m_snOlsIdx[MAX_NESTING_NUM_LAYER];
+  bool      m_snAllLayersFlag;                      //value valid if m_nestingOlsFlag == 0
+  uint32_t  m_snNumLayersMinus1;                    //value valid if m_nestingOlsFlag == 0 and m_nestingAllLayersFlag == 0
+  uint8_t   m_snLayerId[MAX_NESTING_NUM_LAYER];     //value valid if m_nestingOlsFlag == 0 and m_nestingAllLayersFlag == 0. This can e.g. be a static array of 64 uint8_t values
 
   SEIMessages m_nestedSEIs;
 };
@@ -634,12 +634,18 @@ public:
   SEISubpicureLevelInfo()
   : m_numRefLevels(0)
   , m_explicitFractionPresentFlag (false)
+#if JVET_Q0404_CBR_SUBPIC
+  , m_cbrConstraintFlag (false)
+#endif
   , m_numSubpics(0)
   {}
   virtual ~SEISubpicureLevelInfo() {}
 
   int       m_numRefLevels;
   bool      m_explicitFractionPresentFlag;
+#if JVET_Q0404_CBR_SUBPIC
+  bool      m_cbrConstraintFlag;
+#endif
   int       m_numSubpics;
   std::vector<Level::Name>      m_refLevelIdc;
   std::vector<std::vector<int>> m_refLevelFraction;
diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp
index 9e4d76c14494f717132ead355348debdd950658e..815fd1efbc77c1788050d648d8fb6064978b1aa3 100644
--- a/source/Lib/CommonLib/Slice.cpp
+++ b/source/Lib/CommonLib/Slice.cpp
@@ -508,7 +508,11 @@ void Slice::constructRefPicList(PicList& rcListPic)
       pcRefPic = xGetLongTermRefPic( rcListPic, ltrpPoc, m_localRPL0.getDeltaPocMSBPresentFlag( ii ), m_pcPic->layerId );
       pcRefPic->longTerm = true;
     }
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+    pcRefPic->extendPicBorder( getPPS() );
+#else
     pcRefPic->extendPicBorder();
+#endif
     m_apcRefPicList[REF_PIC_LIST_0][ii] = pcRefPic;
     m_bIsUsedAsLongTerm[REF_PIC_LIST_0][ii] = pcRefPic->longTerm;
   }
@@ -544,7 +548,11 @@ void Slice::constructRefPicList(PicList& rcListPic)
       pcRefPic = xGetLongTermRefPic( rcListPic, ltrpPoc, m_localRPL1.getDeltaPocMSBPresentFlag( ii ), m_pcPic->layerId );
       pcRefPic->longTerm = true;
     }
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+    pcRefPic->extendPicBorder( getPPS() );
+#else
     pcRefPic->extendPicBorder();
+#endif
     m_apcRefPicList[REF_PIC_LIST_1][ii] = pcRefPic;
     m_bIsUsedAsLongTerm[REF_PIC_LIST_1][ii] = pcRefPic->longTerm;
   }
@@ -1971,6 +1979,7 @@ VPS::VPS()
   {
     m_vpsLayerId[i] = 0;
     m_vpsIndependentLayerFlag[i] = true;
+    m_generalLayerIdx[i] = 0;
     for (int j = 0; j < MAX_VPS_LAYERS; j++)
     {
       m_vpsDirectRefLayerFlag[i][j] = 0;
@@ -2406,6 +2415,9 @@ SPSRExt::SPSRExt()
 SPS::SPS()
 : m_SPSId                     (  0)
 , m_VPSId                     ( 0 )
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+, m_layerId                   ( 0 )
+#endif
 , m_affineAmvrEnabledFlag     ( false )
 , m_DMVR                      ( false )
 , m_MMVD                      ( false )
@@ -2481,7 +2493,9 @@ SPS::SPS()
 , m_vuiParametersPresentFlag  (false)
 , m_vuiParameters             ()
 , m_wrapAroundEnabledFlag     (false)
+#if !JVET_Q0764_WRAP_AROUND_WITH_RPR
 , m_wrapAroundOffset          (  0)
+#endif
 , m_IBCFlag                   (  0)
 , m_PLTMode                   (  0)
 , m_lmcsEnabled               (false)
@@ -2715,6 +2729,15 @@ PPS::PPS()
 , m_mixedNaluTypesInPicFlag          ( false )
 , m_picWidthInLumaSamples(352)
 , m_picHeightInLumaSamples( 288 )
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+, m_wrapAroundEnabledFlag            (false)
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+, m_picWidthMinusWrapAroundOffset    (0)
+#else
+, m_wrapAroundOffsetMinusCtbSize     (0)
+#endif
+, m_wrapAroundOffset                 (0)
+#endif
 , pcv                                (NULL)
 {
   m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CbOffset = 0; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0. This is initialised here and never subsequently changed.
@@ -3958,7 +3981,12 @@ void Slice::scaleRefPicList( Picture *scaledRefPic[ ], PicHeader *picHeader, APS
                                    scaledRefPic[j]->getRecoBuf(), pps->getScalingWindow(),
                                    sps->getChromaFormatIdc(), sps->getBitDepths(), true, downsampling,
                                    sps->getHorCollocatedChromaFlag(), sps->getVerCollocatedChromaFlag() );
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+          scaledRefPic[j]->unscaledPic = m_apcRefPicList[refList][rIdx];
+          scaledRefPic[j]->extendPicBorder( getPPS() );
+#else
           scaledRefPic[j]->extendPicBorder();
+#endif
 
           m_scaledRefPicList[refList][rIdx] = scaledRefPic[j];
         }
@@ -4082,7 +4110,9 @@ bool             operator == (const ConstraintInfo& op1, const ConstraintInfo& o
   if( op1.m_noBcwConstraintFlag                          != op2.m_noBcwConstraintFlag                            ) return false;
   if( op1.m_noIbcConstraintFlag                          != op2.m_noIbcConstraintFlag                            ) return false;
   if( op1.m_noCiipConstraintFlag                         != op2.m_noCiipConstraintFlag                           ) return false;
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   if( op1.m_noFPelMmvdConstraintFlag                     != op2.m_noFPelMmvdConstraintFlag                       ) return false;
+#endif
   if( op1.m_noLadfConstraintFlag                         != op2.m_noLadfConstraintFlag                           ) return false;
   if( op1.m_noTransformSkipConstraintFlag                != op2.m_noTransformSkipConstraintFlag                  ) return false;
   if( op1.m_noBDPCMConstraintFlag                        != op2.m_noBDPCMConstraintFlag                          ) return false;
diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h
index 9f12a3307a9eddae225f2f58000a1ed647adc5dc..3e600d341ed3ff23f44f5a75eeb933f0dce4ee5a 100644
--- a/source/Lib/CommonLib/Slice.h
+++ b/source/Lib/CommonLib/Slice.h
@@ -287,7 +287,9 @@ class ConstraintInfo
   bool              m_noBcwConstraintFlag;
   bool              m_noIbcConstraintFlag;
   bool              m_noCiipConstraintFlag;
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   bool              m_noFPelMmvdConstraintFlag;
+#endif
   bool              m_noGeoConstraintFlag;
   bool              m_noLadfConstraintFlag;
   bool              m_noTransformSkipConstraintFlag;
@@ -360,7 +362,9 @@ public:
     , m_noBcwConstraintFlag      (false)
     , m_noIbcConstraintFlag      (false)
     , m_noCiipConstraintFlag  (false)
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
     , m_noFPelMmvdConstraintFlag (false)
+#endif
     , m_noGeoConstraintFlag      (false)
     , m_noLadfConstraintFlag     (false)
     , m_noTransformSkipConstraintFlag(false)
@@ -489,8 +493,10 @@ public:
   void          setNoIbcConstraintFlag(bool bVal) { m_noIbcConstraintFlag = bVal; }
   bool          getNoCiipConstraintFlag() const { return m_noCiipConstraintFlag; }
   void          setNoCiipConstraintFlag(bool bVal) { m_noCiipConstraintFlag = bVal; }
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   bool          getNoFPelMmvdConstraintFlag() const { return m_noFPelMmvdConstraintFlag; }
   void          setNoFPelMmvdConstraintFlag(bool bVal) { m_noFPelMmvdConstraintFlag = bVal; }
+#endif
   bool          getNoGeoConstraintFlag() const { return m_noGeoConstraintFlag; }
   void          setNoGeoConstraintFlag(bool bVal) { m_noGeoConstraintFlag = bVal; }
   bool          getNoLadfConstraintFlag() const { return m_noLadfConstraintFlag; }
@@ -1285,7 +1291,9 @@ class SPS
 private:
   int               m_SPSId;
   int               m_VPSId;
-
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+  int               m_layerId;
+#endif
   bool              m_affineAmvrEnabledFlag;
   bool              m_DMVR;
   bool              m_MMVD;
@@ -1418,7 +1426,9 @@ private:
   bool              m_alfEnabledFlag;
   bool              m_ccalfEnabledFlag;
   bool              m_wrapAroundEnabledFlag;
+#if !JVET_Q0764_WRAP_AROUND_WITH_RPR
   unsigned          m_wrapAroundOffset;
+#endif
   unsigned          m_IBCFlag;
   bool              m_useColorTrans;
   unsigned          m_PLTMode;
@@ -1474,7 +1484,10 @@ public:
   void                    setSPSId(int i)                                                                 { m_SPSId = i;                                                         }
   int                     getVPSId() const                                                                { return m_VPSId; }
   void                    setVPSId(int i)                                                                 { m_VPSId = i; }
-
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+  void                    setLayerId( int i )                                                             { m_layerId = i;                                                       }
+  int                     getLayerId() const                                                              { return m_layerId;                                                    }
+#endif
   ChromaFormat            getChromaFormatIdc () const                                                     { return m_chromaFormatIdc;                                            }
   void                    setChromaFormatIdc (ChromaFormat i)                                             { m_chromaFormatIdc = i;                                               }
   void                    setSeparateColourPlaneFlag ( bool b )                                           { m_separateColourPlaneFlag = b;                                       }
@@ -1759,8 +1772,10 @@ void                    setCCALFEnabledFlag( bool b )
 
   void                    setWrapAroundEnabledFlag(bool b)                                                { m_wrapAroundEnabledFlag = b;                                         }
   bool                    getWrapAroundEnabledFlag() const                                                { return m_wrapAroundEnabledFlag;                                      }
+#if !JVET_Q0764_WRAP_AROUND_WITH_RPR
   void                    setWrapAroundOffset(unsigned offset)                                            { m_wrapAroundOffset = offset;                                         }
   unsigned                getWrapAroundOffset() const                                                     { return m_wrapAroundOffset;                                           }
+#endif
   void                    setUseLmcs(bool b)                                                              { m_lmcsEnabled = b;                                                   }
   bool                    getUseLmcs() const                                                              { return m_lmcsEnabled;                                                }
   void                    setIBCFlag(unsigned IBCFlag)                                                    { m_IBCFlag = IBCFlag; }
@@ -1947,6 +1962,15 @@ private:
   Window           m_conformanceWindow;
   Window           m_scalingWindow;
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  bool             m_wrapAroundEnabledFlag;               //< reference wrap around enabled or not
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+  unsigned         m_picWidthMinusWrapAroundOffset;          // <pic_width_in_minCbSizeY - wraparound_offset_in_minCbSizeY
+#else
+  unsigned         m_wrapAroundOffsetMinusCtbSize;        //< reference wrap around offset minus ( CtbSizeY / MinCbSizeY ) + 2 in units of MinCbSizeY luma samples
+#endif
+  unsigned         m_wrapAroundOffset;                    //< reference wrap around offset in luma samples
+#endif
 
 public:
   PreCalcValues   *pcv;
@@ -2034,6 +2058,19 @@ public:
   void                   setUseWP( bool b )                                               { m_bUseWeightPred = b;                         }
   void                   setWPBiPred( bool b )                                            { m_useWeightedBiPred = b;                      }
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  void                   setWrapAroundEnabledFlag(bool b)                                 { m_wrapAroundEnabledFlag = b;                  }
+  bool                   getWrapAroundEnabledFlag() const                                 { return m_wrapAroundEnabledFlag;               }  
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+  void                   setPicWidthMinusWrapAroundOffset(unsigned offset)                { m_picWidthMinusWrapAroundOffset = offset;     }
+  unsigned               getPicWidthMinusWrapAroundOffset() const                         { return m_picWidthMinusWrapAroundOffset;       }
+#else
+  void                   setWrapAroundOffsetMinusCtbSize(unsigned offset)                 { m_wrapAroundOffsetMinusCtbSize = offset;      }
+  unsigned               getWrapAroundOffsetMinusCtbSize() const                          { return m_wrapAroundOffsetMinusCtbSize;        }
+#endif
+  void                   setWrapAroundOffset(unsigned offset)                             { m_wrapAroundOffset = offset;                  }
+  unsigned               getWrapAroundOffset() const                                      { return m_wrapAroundOffset;                    }
+#endif
   void                   setOutputFlagPresentFlag( bool b )                               { m_OutputFlagPresentFlag = b;                  }
   bool                   getOutputFlagPresentFlag() const                                 { return m_OutputFlagPresentFlag;               }
   void                   setNumSubPics(uint32_t u )                                       { CHECK( u >= MAX_NUM_SUB_PICS, "Maximum number of subpictures exceeded" );
diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h
index 0000ad3a18e17fd876a6b25db40bef76762e6bf0..97d5b52aad7c715885c27a0e7b4456cebd0dc33f 100644
--- a/source/Lib/CommonLib/TypeDef.h
+++ b/source/Lib/CommonLib/TypeDef.h
@@ -53,6 +53,18 @@
 //########### place macros to be removed in next cycle below this line ###############
 #define JVET_R0078_DISABLE_CHROMA_DBF_OFFSET_SINGALLING   1 // JVET-R0078: disable chroma DBF offset signalling
 
+#define JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING      1 // JVET-R0194: Constraint that if slice at layer A refer to PS at layer B, then all OLS that contains layer A must contain layer B as well.
+
+#define JVET_R0162_WRAPAROUND_OFFSET_SIGNALING            1 // JVET-R0162 proposal 1 : signal "picture width minus wraparound offset" instead of "wraparound offset"
+
+#define JVET_R0188                                        1 // JVET-R0188: Signalling slice_width_in_tiles_minus1[i] and slice_height_in_tiles_minus1[i]
+
+#define JVET_R0203_IRAP_LEADING_CONSTRAINT                1 // JVET-R0203: Constraint that IRAP NAL unit type cannot be mixed with RASL_NUT / RADL_NUT
+
+#define JVET_Q0488_SEI_REPETITION_CONSTRAINT              1 // JVET-Q0488: SEI repetition constraint
+
+#define JVET_Q0764_WRAP_AROUND_WITH_RPR                   1 // JVET-Q0764: Combination of wrap around offset and RPR
+
 #define JVET_R0055_HANDLING_NON_EXISTENT_QM               1 // JVET-R0055: infer chroma scaling lists to be all 16 in 4:0:0 by copy mode flag
 
 #define JVET_R0097_MAX_TRSIZE_CONDITIONALY_SIGNALING      1 // JVET-R0097: Aspect 1, If the luma CTB size is not larger than 32, sps_max_luma_transform_size_64_flag is not signalled and inferred to be 0
@@ -143,19 +155,17 @@
 #define JVET_R0233_CCALF_LINE_BUFFER_REDUCTION            1 // JVET-R0233 method 2: Line buffer reduction for CCALF
 
 #define JVET_Q0471_CHROMA_QT_SPLIT                        0 // JVET-Q0471: Chroma QT split, reverted by JVET-R0131
-#define JVET_R0208_ALF_VB_ROUNDING_FIX                    1 // JVET-R0208: Rounding offset fix for ALF virtual boundary processing
-#define JVET_R0232_CCALF_APS_CONSTRAINT                   1 // JVET-R0232 section 3.2: APS contraint for CCALF
-#define JVET_R0210_NUMTILESINSLICE_SIGNALLING             1 // JVET-R0210 section 3.3: Don't signal NumTilesInSlice syntax element when numTilesInPic - slice_address is 1.
-
 
+#define JVET_R0208_ALF_VB_ROUNDING_FIX                    1 // JVET-R0208: Rounding offset fix for ALF virtual boundary processing
 
+#define JVET_R0232_CCALF_APS_CONSTRAINT                   1 // JVET-R0232 section 3.2: APS contraint for CCALF
 
+#define JVET_R0210_NUMTILESINSLICE_SIGNALLING             1 // JVET-R0210 section 3.3: Don't signal NumTilesInSlice syntax element when numTilesInPic - slice_address is 1.
 
 #define JVET_R0156_ASPECT4_SPS_CLEANUP                    1 // JVET-R0071 #1, R0156 #4, R0284 #1: Condition sps_independent_subpics_flag on "sps_num_subpics_minus1 > 0"
 
 #define JVET_R0156_ASPECT3_SPS_CLEANUP                    1 // Condition sps_sublayer_dpb_params_flag on sps_ptl_dpb_hrd_params_present_flag, in addition to sps_max_sublayer_minus1,	JVET-R0156 proposal 3, JVET-R0170, JVET-R0222 proposal 2
 
-
 #define JVET_R0350_MIP_CHROMA_444_SINGLETREE              1 // JVET-R0350: MIP for chroma in case of 4:4:4 format and single tree
 
 #define JVET_R0347_MTT_SIZE_CONSTRAIN                     1 // JVET-R0347: Set upper limit of minQtSize and maxTtSize to 64, set upper limit of maxBtSize to 64 in chroma-tree
@@ -164,9 +174,25 @@
 
 #define JVET_Q0394_TIMING_SEI                             1 // JVET_Q0394: Picture timing for OLSs
 
+#define JVET_Q0404_CBR_SUBPIC                             1 // JVET_Q0404: Constant bitrate extraction for subpictures
+
 #define JVET_R0100                                        1 // JVET-R0100: Proposal 1 DUI Signalling and inference
 
-#define JVET_R0413_HRD_TIMING_INFORMATION                 1   // JVET-R0413: HRD timing parameters signalling
+#define JVET_R0413_HRD_TIMING_INFORMATION                 1 // JVET-R0413: HRD timing parameters signalling
+
+#define JVET_R0214_MMVD_SYNTAX_MODIFICATION               1 // JVET-R0214: MMVD syntax modifications
+
+#define JVET_R0101_SEI_INFERENCE_RULES                    1 // JVET-R0101: SEI alternative timing information inference rules (including those from JVET-R0413) 
+
+#define JVET_R0108_DCI_SIGNALING                          1 // JVET-R0108 Proposal 1 DCI signaling changes
+
+#define JVET_R0112_SEMANTICS_CLEANUP                      1 // JVET-R0112: Picture header semantics cleanup for gdr_or_irap_flag
+
+#define JVET_R0107_VPS_SIGNALING                          1 // JVET-R017: Proposal 2 VPS signaling change and updated inference rule
+
+#define JVET_R0103_DU_SIGNALLING                          1 // JVET-R0103: Proposal 1 decoding unit signalling change
+
+#define JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING          1   // JVET-R0099: DPB and HRD parameter signalling for OLS
 
 //########### place macros to be be kept below this line ###############
 
diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp
index 405264c6a8df81cb9e6df2e4a272c4becd71bee6..6424b7680b9b5f9732b10333f002bbbf9ce5902e 100644
--- a/source/Lib/DecoderLib/DecLib.cpp
+++ b/source/Lib/DecoderLib/DecLib.cpp
@@ -937,6 +937,115 @@ void DecLib::checkSEIInAccessUnit()
   }
 }
 
+#if JVET_Q0488_SEI_REPETITION_CONSTRAINT
+#define SEI_REPETITION_CONSTRAINT_LIST_SIZE  21
+
+/**
+ - Count the number of identical SEI messages in the current picture
+ */
+void DecLib::checkSeiInPictureUnit()
+{  
+  std::vector<std::tuple<int, uint32_t, uint8_t*>> seiList;
+
+  // payload types subject to constrained SEI repetition
+  int picUnitRepConSeiList[SEI_REPETITION_CONSTRAINT_LIST_SIZE] = { 0, 1, 19, 45, 129, 132, 133, 137, 144, 145, 147, 148, 149, 150, 153, 154, 155, 156, 168, 203, 204};
+  
+  // extract SEI messages from NAL units
+  for (auto &sei : m_pictureSeiNalus)
+  {
+    InputBitstream bs = sei->getBitstream();
+
+    do
+    {  
+      int payloadType = 0;
+      uint32_t val = 0;
+
+      do
+      {
+        bs.readByte(val);
+        payloadType += val;
+      } while (val==0xFF);
+
+      uint32_t payloadSize = 0;
+      do
+      {
+        bs.readByte(val);
+        payloadSize += val;
+      } while (val==0xFF);
+    
+      uint8_t *payload = new uint8_t[payloadSize];
+      for (uint32_t i = 0; i < payloadSize; i++)
+      {
+        bs.readByte(val);
+        payload[i] = (uint8_t)val;
+      }
+      seiList.push_back(std::tuple<int, uint32_t, uint8_t*>(payloadType, payloadSize, payload));
+    }
+    while (bs.getNumBitsLeft() > 8);
+  }
+
+  // count repeated messages in list
+  for (uint32_t i = 0; i < seiList.size(); i++)
+  {
+    int      k, count = 1;      
+    int      payloadType1 = std::get<0>(seiList[i]);
+    uint32_t payloadSize1 = std::get<1>(seiList[i]);
+    uint8_t  *payload1    = std::get<2>(seiList[i]);
+
+    // only consider SEI payload types in the PicUnitRepConSeiList
+    for(k=0; k<SEI_REPETITION_CONSTRAINT_LIST_SIZE; k++)
+    {
+      if(payloadType1 == picUnitRepConSeiList[k])
+      {
+        break;
+      }
+    }
+    if(k >= SEI_REPETITION_CONSTRAINT_LIST_SIZE)
+    {
+      continue;
+    }
+
+    // compare current SEI message with remaining messages in the list
+    for (uint32_t j = i+1; j < seiList.size(); j++)
+    {
+      int      payloadType2 = std::get<0>(seiList[j]);
+      uint32_t payloadSize2 = std::get<1>(seiList[j]);
+      uint8_t  *payload2    = std::get<2>(seiList[j]);
+      
+      // check for identical SEI type, size, and payload
+      if(payloadType1 == payloadType2 && payloadSize1 == payloadSize2)
+      {
+        if(memcmp(payload1, payload2, payloadSize1*sizeof(uint8_t)) == 0)
+        {
+          count++;
+        }
+      }
+    }    
+    CHECK(count > 4, "There shall be less than or equal to 4 identical sei_payload( ) syntax structures within a picture unit.");
+  }
+
+  // free SEI message list memory
+  for (uint32_t i = 0; i < seiList.size(); i++)
+  {
+    uint8_t *payload = std::get<2>(seiList[i]);
+    delete   payload;
+  }
+  seiList.clear();
+}
+
+/**
+ - Reset list of SEI NAL units from the current picture
+ */
+void DecLib::resetPictureSeiNalus()   
+{
+  while (!m_pictureSeiNalus.empty())
+  {
+    delete m_pictureSeiNalus.front();
+    m_pictureSeiNalus.pop_front();
+  }
+}
+
+#endif
 /**
  - Determine if the first VCL NAL unit of a picture is also the first VCL NAL of an Access Unit
  */
@@ -1420,7 +1529,11 @@ void DecLib::xCheckParameterSetConstraints(const int layerId)
 
   if( sps->getCTUSize() + 2 * ( 1 << sps->getLog2MinCodingBlockSize() ) > pps->getPicWidthInLumaSamples() )
   {
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+    CHECK( pps->getWrapAroundEnabledFlag(), "Wraparound shall be disabled when the value of ( CtbSizeY / MinCbSizeY + 1) is greater than or equal to ( pic_width_in_luma_samples / MinCbSizeY - 1 )" );
+#else
     CHECK( sps->getWrapAroundEnabledFlag(), "Wraparound shall be disabled when the value of ( CtbSizeY / MinCbSizeY + 1) is less than or equal to ( pic_width_in_luma_samples / MinCbSizeY - 1 )" );
+#endif
   }
 
   if( vps != nullptr && vps->m_numOutputLayersInOls[vps->m_targetOlsIdx] > 1 )
@@ -1907,6 +2020,54 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
   m_pcPic->layerId    = nalu.m_nuhLayerId;
   m_pcPic->subLayerNonReferencePictureDueToSTSA = false;
 
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+  if( pcSlice->getNalUnitLayerId() != pcSlice->getSPS()->getLayerId() )
+  {
+    CHECK( pcSlice->getSPS()->getLayerId() > pcSlice->getNalUnitLayerId(), "Layer Id of SPS cannot be greater than layer Id of VCL NAL unit the refer to it" );
+    CHECK( pcSlice->getSPS()->getVPSId() == 0, "VPSId of the referred SPS cannot be 0 when layer Id of SPS and layer Id of current slice are different" );
+    for (int i = 0; i < pcSlice->getVPS()->getNumOutputLayerSets(); i++ )
+    {
+      bool isCurrLayerInOls = false;
+      bool isRefLayerInOls = false;
+      int j = pcSlice->getVPS()->getNumLayersInOls(i) - 1;
+      for (; j >= 0; j--)
+      {
+        if( pcSlice->getVPS()->getLayerIdInOls(i, j) == pcSlice->getNalUnitLayerId() )
+        {
+          isCurrLayerInOls = true;
+        }
+        if( pcSlice->getVPS()->getLayerIdInOls(i, j) == pcSlice->getSPS()->getLayerId() )
+        {
+          isRefLayerInOls = true;
+        }
+      }
+      CHECK( isCurrLayerInOls && !isRefLayerInOls, "When VCL NAl unit in layer A refers to SPS in layer B, all OLS that contains layer A shall also contains layer B" );
+    }
+  }
+  if( pcSlice->getNalUnitLayerId() != pcSlice->getPPS()->getLayerId() )
+  {
+    CHECK( pcSlice->getPPS()->getLayerId() > pcSlice->getNalUnitLayerId(), "Layer Id of PPS cannot be greater than layer Id of VCL NAL unit the refer to it" );
+    CHECK( pcSlice->getSPS()->getVPSId() == 0, "VPSId of the referred SPS cannot be 0 when layer Id of PPS and layer Id of current slice are different" );
+    for (int i = 0; i < pcSlice->getVPS()->getNumOutputLayerSets(); i++ )
+    {
+      bool isCurrLayerInOls = false;
+      bool isRefLayerInOls = false;
+      int j = pcSlice->getVPS()->getNumLayersInOls(i) - 1;
+      for (; j >= 0; j--)
+      {
+        if( pcSlice->getVPS()->getLayerIdInOls(i, j) == pcSlice->getNalUnitLayerId() )
+        {
+          isCurrLayerInOls = true;
+        }
+        if( pcSlice->getVPS()->getLayerIdInOls(i, j) == pcSlice->getPPS()->getLayerId() )
+        {
+          isRefLayerInOls = true;
+        }
+      }
+      CHECK( isCurrLayerInOls && !isRefLayerInOls, "When VCL NAl unit in layer A refers to PPS in layer B, all OLS that contains layer A shall also contains layer B" );
+    }
+  }
+#endif
 
   if (m_bFirstSliceInPicture)
   {
@@ -1958,8 +2119,12 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
       {
         for( int refIdx = 0; refIdx < pcSlice->getNumRefIdx( RefPicList( refPicList ) ); refIdx++ )
         {
-          CHECK( currentSubPicIdx >= pcSlice->getRefPic( RefPicList( refPicList ), refIdx )->subPicIDs.size(), "Number of sub-pictures in a reference picture is less then the current slice sub-picture index" );
-          CHECK( pcSlice->getRefPic( RefPicList( refPicList ), refIdx )->subPicIDs[currentSubPicIdx] != pcSlice->getSliceSubPicId(), "A picture with different sub-picture ID of the collocated sub-picture cannot be used as an active reference picture" );
+          Picture* refPic = pcSlice->getRefPic( RefPicList( refPicList ), refIdx );
+          if( refPic->layerId == nalu.m_nuhLayerId )
+          {
+            CHECK( currentSubPicIdx >= refPic->subPicIDs.size(), "Number of sub-pictures in a reference picture is less then the current slice sub-picture index" );
+            CHECK( refPic->subPicIDs[currentSubPicIdx] != pcSlice->getSliceSubPicId(), "A picture with different sub-picture ID of the collocated sub-picture cannot be used as an active reference picture" );
+          }
         }
       }
     }
@@ -2099,6 +2264,30 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
   if (pcSlice->getExplicitScalingListUsed())
   {
     APS* scalingListAPS = pcSlice->getPicHeader()->getScalingListAPS();
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+    if( pcSlice->getNalUnitLayerId() != scalingListAPS->getLayerId() )
+    {
+      CHECK( scalingListAPS->getLayerId() > pcSlice->getNalUnitLayerId(), "Layer Id of APS cannot be greater than layer Id of VCL NAL unit the refer to it" );
+      CHECK( pcSlice->getSPS()->getVPSId() == 0, "VPSId of the referred SPS cannot be 0 when layer Id of APS and layer Id of current slice are different" );
+      for (int i = 0; i < pcSlice->getVPS()->getNumOutputLayerSets(); i++ )
+      {
+        bool isCurrLayerInOls = false;
+        bool isRefLayerInOls = false;
+        for( int j = pcSlice->getVPS()->getNumLayersInOls(i) - 1; j >= 0; j-- )
+        {
+          if( pcSlice->getVPS()->getLayerIdInOls(i, j) == pcSlice->getNalUnitLayerId() )
+          {
+            isCurrLayerInOls = true;
+          }
+          if( pcSlice->getVPS()->getLayerIdInOls(i, j) == scalingListAPS->getLayerId() )
+          {
+            isRefLayerInOls = true;
+          }
+        }
+        CHECK( isCurrLayerInOls && !isRefLayerInOls, "When VCL NAl unit in layer A refers to APS in layer B, all OLS that contains layer A shall also contains layer B" );
+      }
+    }
+#endif
     ScalingList scalingList = scalingListAPS->getScalingList();
     quant->setScalingListDec(scalingList);
     quant->setUseScalingList(true);
@@ -2123,6 +2312,30 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
       {
         CHECK(lmcsAPS->getAPSId() != m_sliceLmcsApsId, "same APS ID shall be used for all slices in one picture");
       }
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+      if( pcSlice->getNalUnitLayerId() != lmcsAPS->getLayerId() )
+      {
+        CHECK( lmcsAPS->getLayerId() > pcSlice->getNalUnitLayerId(), "Layer Id of APS cannot be greater than layer Id of VCL NAL unit the refer to it" );
+        CHECK( pcSlice->getSPS()->getVPSId() == 0, "VPSId of the referred SPS cannot be 0 when layer Id of APS and layer Id of current slice are different" );
+        for (int i = 0; i < pcSlice->getVPS()->getNumOutputLayerSets(); i++ )
+        {
+          bool isCurrLayerInOls = false;
+          bool isRefLayerInOls = false;
+          for( int j = pcSlice->getVPS()->getNumLayersInOls(i) - 1; j >= 0; j-- )
+          {
+            if( pcSlice->getVPS()->getLayerIdInOls(i, j) == pcSlice->getNalUnitLayerId() )
+            {
+              isCurrLayerInOls = true;
+            }
+            if( pcSlice->getVPS()->getLayerIdInOls(i, j) == lmcsAPS->getLayerId() )
+            {
+              isRefLayerInOls = true;
+            }
+          }
+          CHECK( isCurrLayerInOls && !isRefLayerInOls, "When VCL NAl unit in layer A refers to APS in layer B, all OLS that contains layer A shall also contains layer B" );
+        }
+      }
+#endif
       SliceReshapeInfo& sInfo = lmcsAPS->getReshaperAPSInfo();
       SliceReshapeInfo& tInfo = m_cReshaper.getSliceReshaperInfo();
       tInfo.reshaperModelMaxBinIdx = sInfo.reshaperModelMaxBinIdx;
@@ -2234,6 +2447,9 @@ void DecLib::xDecodeSPS( InputNALUnit& nalu )
   CHECK( nalu.m_temporalId, "The value of TemporalId of SPS NAL units shall be equal to 0" );
 
   m_HLSReader.parseSPS( sps );
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+  sps->setLayerId( nalu.m_nuhLayerId );
+#endif
   DTRACE( g_trace_ctx, D_QP_PER_CTU, "CTU Size: %dx%d", sps->getMaxCUWidth(), sps->getMaxCUHeight() );
   m_parameterSetManager.storeSPS( sps, nalu.getBitstream().getFifo() );
 }
@@ -2302,11 +2518,17 @@ bool DecLib::decode(InputNALUnit& nalu, int& iSkipFrame, int& iPOCLastDisplay, i
     case NAL_UNIT_PREFIX_SEI:
       // Buffer up prefix SEI messages until SPS of associated VCL is known.
       m_prefixSEINALUs.push_back(new InputNALUnit(nalu));
+#if JVET_Q0488_SEI_REPETITION_CONSTRAINT
+      m_pictureSeiNalus.push_back(new InputNALUnit(nalu));
+#endif
       return false;
 
     case NAL_UNIT_SUFFIX_SEI:
       if (m_pcPic)
       {
+#if JVET_Q0488_SEI_REPETITION_CONSTRAINT
+        m_pictureSeiNalus.push_back(new InputNALUnit(nalu));
+#endif
         m_accessUnitSeiTids.push_back(nalu.m_temporalId);
         const SPS *sps = m_parameterSetManager.getActiveSPS();
         const VPS *vps = m_parameterSetManager.getVPS(sps->getVPSId());
@@ -2466,6 +2688,36 @@ void DecLib::xCheckMixedNalUnit(Slice* pcSlice, SPS *sps, InputNALUnit &nalu)
   {
     CHECK(pcSlice->getPPS()->getNumSlicesInPic() < 2, "mixed nal unit type picture, but with less than 2 slices");
 
+#if JVET_R0203_IRAP_LEADING_CONSTRAINT
+    CHECK( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_GDR, "picture with mixed NAL unit type cannot have GDR slice");
+
+    //Check that if current slice is IRAP type, the other type of NAL can only be TRAIL_NUT
+    if( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA )
+    {
+      for( int i = 0; i < m_uiSliceSegmentIdx; i++ )
+      {
+        Slice* PreSlice = m_pcPic->slices[i];
+        CHECK( (pcSlice->getNalUnitType() != PreSlice->getNalUnitType()) && (PreSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL), "In a mixed NAL unt type picture, an IRAP slice can be mixed with Trail slice(s) only");
+      }
+    }
+
+    // if this is the last slice of the picture, check whether that there are at least two different NAL unit types in the picture
+    if (pcSlice->getPPS()->getNumSlicesInPic() == (m_uiSliceSegmentIdx + 1))
+    {
+      bool hasDiffTypes = false;
+      for( int i = 1; !hasDiffTypes && i <= m_uiSliceSegmentIdx; i++ )
+      {
+        Slice* slice1 = m_pcPic->slices[i-1];
+        Slice* slice2 = m_pcPic->slices[i];
+        if( slice1->getNalUnitType() != slice2->getNalUnitType())
+        {
+          hasDiffTypes = true;
+        }
+      }
+      CHECK( !hasDiffTypes, "VCL NAL units of the picture shall have two or more different nal_unit_type values");
+    }
+#endif
+
     const unsigned  ctuRsAddr = pcSlice->getCtuAddrInSlice(0);
     const unsigned  ctuXPosInCtus = ctuRsAddr % pcSlice->getPPS()->getPicWidthInCtu();
     const unsigned  ctuYPosInCtus = ctuRsAddr / pcSlice->getPPS()->getPicWidthInCtu();
@@ -2540,6 +2792,7 @@ void DecLib::xCheckMixedNalUnit(Slice* pcSlice, SPS *sps, InputNALUnit &nalu)
         }
       }
     }
+#if !JVET_R0203_IRAP_LEADING_CONSTRAINT
     // if this is the last slice of the picture, check whether the nalu type of the slices meet the nal unit type constraints
     if (pcSlice->getPPS()->getNumSlicesInPic() == (m_uiSliceSegmentIdx + 1))
     {
@@ -2607,6 +2860,7 @@ void DecLib::xCheckMixedNalUnit(Slice* pcSlice, SPS *sps, InputNALUnit &nalu)
         CHECK(!allNalsOK || !foundNalInOtherSet, "disallowed mix of nal unit types");
       }
     }
+#endif
   }
   else // all slices shall have the same nal unit type
   {
diff --git a/source/Lib/DecoderLib/DecLib.h b/source/Lib/DecoderLib/DecLib.h
index 1b18ad0a03dad36adb18db8a57e47c3145932977..f7a1b0cf268c4f6c69563f6a1ff7aee37ae57a9e 100644
--- a/source/Lib/DecoderLib/DecLib.h
+++ b/source/Lib/DecoderLib/DecLib.h
@@ -160,6 +160,9 @@ private:
 #if JVET_R0201_PREFIX_SUFFIX_APS_CLEANUP
   std::vector<NalUnitType> m_pictureUnitNals;
 #endif
+#if JVET_Q0488_SEI_REPETITION_CONSTRAINT
+  std::list<InputNALUnit*> m_pictureSeiNalus; 
+#endif 
 
   VPS*                    m_vps;
   int                     m_maxDecSubPicIdx;
@@ -214,6 +217,10 @@ public:
   void checkTidLayerIdInAccessUnit();
   void resetAccessUnitSeiPayLoadTypes()   { m_accessUnitSeiPayLoadTypes.clear(); }
   void checkSEIInAccessUnit();
+#if JVET_Q0488_SEI_REPETITION_CONSTRAINT
+  void checkSeiInPictureUnit();
+  void resetPictureSeiNalus();
+#endif 
   bool isSliceNaluFirstInAU( bool newPicture, InputNALUnit &nalu );
 
 #if JVET_R0201_PREFIX_SUFFIX_APS_CLEANUP
diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp
index 65056ae9fdf13c03c878e5a5aac42c6e7aeb8090..93846dff5340faba5df904d04e559ef3ee92d478 100644
--- a/source/Lib/DecoderLib/SEIread.cpp
+++ b/source/Lib/DecoderLib/SEIread.cpp
@@ -457,37 +457,37 @@ void SEIReader::xParseSEIDecodedPictureHash(SEIDecodedPictureHash& sei, uint32_t
 }
 
 
-void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, const uint32_t nuh_layer_id, uint32_t payloadSize, const VPS *vps, const SPS *sps, std::ostream *pDecodedMessageOutputStream)
+void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, const uint32_t nuhLayerId, uint32_t payloadSize, const VPS *vps, const SPS *sps, std::ostream *decodedMessageOutputStream)
 {
-  uint32_t uiCode;
+  uint32_t symbol;
   SEIMessages seis;
-  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+  output_sei_message_header(sei, decodedMessageOutputStream, payloadSize);
 
-  sei_read_flag(pDecodedMessageOutputStream, uiCode, "nesting_ols_flag"); sei.m_nestingOlsFlag = uiCode;
-  if (sei.m_nestingOlsFlag)
+  sei_read_flag(decodedMessageOutputStream, symbol, "sn_ols_flag"); sei.m_snOlsFlag = symbol;
+  if (sei.m_snOlsFlag)
   {
-    sei_read_uvlc(pDecodedMessageOutputStream, uiCode, "nesting_num_olss_minus1"); sei.m_nestingNumOlssMinus1 = uiCode;
-    for (uint32_t i = 0; i <= sei.m_nestingNumOlssMinus1; i++)
+    sei_read_uvlc(decodedMessageOutputStream, symbol, "sn_num_olss_minus1"); sei.m_snNumOlssMinus1 = symbol;
+    for (uint32_t i = 0; i <= sei.m_snNumOlssMinus1; i++)
     {
-      sei_read_uvlc(pDecodedMessageOutputStream, uiCode, "nesting_ols_idx_delta_minus1[i]"); sei.m_nestingOlsIdxDeltaMinus1[i] = uiCode;
+      sei_read_uvlc(decodedMessageOutputStream, symbol, "sn_ols_idx_delta_minus1[i]"); sei.m_snOlsIdxDeltaMinus1[i] = symbol;
     }
-    for (uint32_t i = 0; i <= sei.m_nestingNumOlssMinus1; i++)
+    for (uint32_t i = 0; i <= sei.m_snNumOlssMinus1; i++)
     {
       if (i == 0)
       {
-        sei.m_nestingOlsIdx[i] = sei.m_nestingOlsIdxDeltaMinus1[i];
+        sei.m_snOlsIdx[i] = sei.m_snOlsIdxDeltaMinus1[i];
       }
       else
       {
-        sei.m_nestingOlsIdx[i] = sei.m_nestingOlsIdxDeltaMinus1[i] + sei.m_nestingOlsIdxDeltaMinus1[i - 1] + 1;
+        sei.m_snOlsIdx[i] = sei.m_snOlsIdxDeltaMinus1[i] + sei.m_snOlsIdxDeltaMinus1[i - 1] + 1;
       }
     }
     if (vps && vps->getVPSId() != 0)
     {
       uint32_t lowestLayerId = MAX_UINT;
-      for (uint32_t olsIdxForSEI = 0; olsIdxForSEI <= sei.m_nestingNumOlssMinus1; olsIdxForSEI++)
+      for (uint32_t olsIdxForSEI = 0; olsIdxForSEI <= sei.m_snNumOlssMinus1; olsIdxForSEI++)
       {
-        int olsIdx = sei.m_nestingOlsIdx[olsIdxForSEI];
+        int olsIdx = sei.m_snOlsIdx[olsIdxForSEI];
         for (int layerIdx = 0; layerIdx < vps->getNumLayersInOls(olsIdx); layerIdx++)
         {
           if (lowestLayerId > vps->getLayerIdInOls(olsIdx, layerIdx))
@@ -496,18 +496,18 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT
           }
         }
       }
-      CHECK(lowestLayerId!= nuh_layer_id, "nuh_layer_id is not equal to the lowest layer among Olss that the scalable SEI applies");
+      CHECK(lowestLayerId!= nuhLayerId, "nuh_layer_id is not equal to the lowest layer among Olss that the scalable SEI applies");
     }
   }
   else
   {
-    sei_read_flag(pDecodedMessageOutputStream, uiCode, "nesting_all_layers_flag"); sei.m_nestingAllLayersFlag = uiCode;
-    if (!sei.m_nestingAllLayersFlag)
+    sei_read_flag(decodedMessageOutputStream, symbol, "sn_all_layers_flag"); sei.m_snAllLayersFlag = symbol;
+    if (!sei.m_snAllLayersFlag)
     {
-      sei_read_uvlc(pDecodedMessageOutputStream, uiCode, "nesting_num_layers_minus1"); sei.m_nestingNumLayersMinus1 = uiCode;
-      for (uint32_t i = 0; i <= sei.m_nestingNumLayersMinus1; i++)
+      sei_read_uvlc(decodedMessageOutputStream, symbol, "sn_num_layers_minus1"); sei.m_snNumLayersMinus1 = symbol;
+      for (uint32_t i = 0; i <= sei.m_snNumLayersMinus1; i++)
       {
-        sei_read_code(pDecodedMessageOutputStream, 6, uiCode, "nesting_layer_id[i]"); sei.m_nestingLayerId[i] = uiCode;
+        sei_read_code(decodedMessageOutputStream, 6, symbol, "sn_layer_id[i]"); sei.m_snLayerId[i] = symbol;
       }
     }
   }
@@ -515,8 +515,7 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT
   // byte alignment
   while (m_pcBitstream->getNumBitsRead() % 8 != 0)
   {
-    uint32_t code;
-    sei_read_flag(pDecodedMessageOutputStream, code, "nesting_zero_bit");
+    sei_read_flag(decodedMessageOutputStream, symbol, "sn_zero_bit");
   }
 
   bool containBPorPTorDUI     = false;
@@ -537,12 +536,12 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT
   do
   {
     HRD hrd;
-    xReadSEImessage(sei.m_nestedSEIs, nalUnitType, nuh_layer_id, 0, vps, sps, hrd, pDecodedMessageOutputStream);
+    xReadSEImessage(sei.m_nestedSEIs, nalUnitType, nuhLayerId, 0, vps, sps, hrd, decodedMessageOutputStream);
   } while (m_pcBitstream->getNumBitsLeft() > 8);
 
-  if (pDecodedMessageOutputStream)
+  if (decodedMessageOutputStream)
   {
-    (*pDecodedMessageOutputStream) << "End of scalable nesting SEI message\n";
+    (*decodedMessageOutputStream) << "End of scalable nesting SEI message\n";
   }
 }
 
@@ -718,13 +717,25 @@ void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, uint32_t payloadSi
       {
         sei.m_nalCpbAltInitialRemovalDelayDelta.resize(bp.m_bpMaxSubLayers);
         sei.m_nalCpbAltInitialRemovalOffsetDelta.resize(bp.m_bpMaxSubLayers);
+#if JVET_R0101_SEI_INFERENCE_RULES
+        for (int i = 0; i <= bp.m_bpMaxSubLayers - 1; ++i)
+        {
+          sei.m_nalCpbAltInitialRemovalDelayDelta[i].resize(bp.m_bpCpbCnt, 0);
+          sei.m_nalCpbAltInitialRemovalOffsetDelta[i].resize(bp.m_bpCpbCnt, 0);
+        }
+        sei.m_nalCpbDelayOffset.resize(bp.m_bpMaxSubLayers, 0);
+        sei.m_nalDpbDelayOffset.resize(bp.m_bpMaxSubLayers, 0);
+#else
         sei.m_nalCpbDelayOffset.resize(bp.m_bpMaxSubLayers);
         sei.m_nalDpbDelayOffset.resize(bp.m_bpMaxSubLayers);
+#endif
         for (int i = (bp.m_sublayerInitialCpbRemovalDelayPresentFlag ? 0 : bp.m_bpMaxSubLayers - 1);
              i <= bp.m_bpMaxSubLayers - 1; ++i)
         {
+#if !JVET_R0101_SEI_INFERENCE_RULES
           sei.m_nalCpbAltInitialRemovalDelayDelta[i].resize(bp.m_bpCpbCnt);
           sei.m_nalCpbAltInitialRemovalOffsetDelta[i].resize(bp.m_bpCpbCnt);
+#endif
           for (int j = 0; j < bp.m_bpCpbCnt; j++)
           {
             sei_read_code(pDecodedMessageOutputStream, bp.m_initialCpbRemovalDelayLength, symbol,
@@ -745,13 +756,25 @@ void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, uint32_t payloadSi
       {
         sei.m_vclCpbAltInitialRemovalDelayDelta.resize(bp.m_bpMaxSubLayers);
         sei.m_vclCpbAltInitialRemovalOffsetDelta.resize(bp.m_bpMaxSubLayers);
+#if JVET_R0101_SEI_INFERENCE_RULES
+        for (int i = 0; i <= bp.m_bpMaxSubLayers - 1; ++i)
+        {
+          sei.m_vclCpbAltInitialRemovalDelayDelta[i].resize(bp.m_bpCpbCnt, 0);
+          sei.m_vclCpbAltInitialRemovalOffsetDelta[i].resize(bp.m_bpCpbCnt, 0);
+        }
+        sei.m_vclCpbDelayOffset.resize(bp.m_bpMaxSubLayers, 0);
+        sei.m_vclDpbDelayOffset.resize(bp.m_bpMaxSubLayers, 0);
+#else
         sei.m_vclCpbDelayOffset.resize(bp.m_bpMaxSubLayers);
         sei.m_vclDpbDelayOffset.resize(bp.m_bpMaxSubLayers);
+#endif
         for (int i = (bp.m_sublayerInitialCpbRemovalDelayPresentFlag ? 0 : bp.m_bpMaxSubLayers - 1);
              i <= bp.m_bpMaxSubLayers - 1; ++i)
         {
+#if !JVET_R0101_SEI_INFERENCE_RULES
           sei.m_vclCpbAltInitialRemovalDelayDelta[i].resize(bp.m_bpCpbCnt);
           sei.m_vclCpbAltInitialRemovalOffsetDelta[i].resize(bp.m_bpCpbCnt);
+#endif
           for (int j = 0; j < bp.m_bpCpbCnt; j++)
           {
             sei_read_code(pDecodedMessageOutputStream, bp.m_initialCpbRemovalDelayLength, symbol,
@@ -872,35 +895,46 @@ void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, uint32_t payloadSi
     sei.m_numNalusInDuMinus1.resize(sei.m_numDecodingUnitsMinus1 + 1 );
     sei.m_duCpbRemovalDelayMinus1.resize( (sei.m_numDecodingUnitsMinus1 + 1) * bp.m_bpMaxSubLayers );
 
-    sei_read_flag( pDecodedMessageOutputStream, symbol, "du_common_cpb_removal_delay_flag" );
-    sei.m_duCommonCpbRemovalDelayFlag = symbol;
-    if( sei.m_duCommonCpbRemovalDelayFlag )
+#if JVET_R0103_DU_SIGNALLING
+    if (sei.m_numDecodingUnitsMinus1 > 0)
     {
-      for( int i = temporalId; i < bp.m_bpMaxSubLayers - 1; i ++ )
+#endif
+      sei_read_flag( pDecodedMessageOutputStream, symbol, "du_common_cpb_removal_delay_flag" );
+      sei.m_duCommonCpbRemovalDelayFlag = symbol;
+      if( sei.m_duCommonCpbRemovalDelayFlag )
       {
-        if( sei.m_ptSubLayerDelaysPresentFlag[i] )
+        for( int i = temporalId; i < bp.m_bpMaxSubLayers - 1; i ++ )
         {
-          sei_read_code( pDecodedMessageOutputStream, bp.getDuCpbRemovalDelayIncrementLength(), symbol, "du_common_cpb_removal_delay_increment_minus1[i]" );
-          sei.m_duCommonCpbRemovalDelayMinus1[i] = symbol;
+          if( sei.m_ptSubLayerDelaysPresentFlag[i] )
+          {
+            sei_read_code( pDecodedMessageOutputStream, bp.getDuCpbRemovalDelayIncrementLength(), symbol, "du_common_cpb_removal_delay_increment_minus1[i]" );
+            sei.m_duCommonCpbRemovalDelayMinus1[i] = symbol;
+          }
         }
       }
-    }
-    for( int i = 0; i <= sei.m_numDecodingUnitsMinus1; i ++ )
-    {
-      sei_read_uvlc( pDecodedMessageOutputStream, symbol, "num_nalus_in_du_minus1[i]" );
-      sei.m_numNalusInDuMinus1[i] = symbol;
-      if( !sei.m_duCommonCpbRemovalDelayFlag && i < sei.m_numDecodingUnitsMinus1 )
+      for( int i = 0; i <= sei.m_numDecodingUnitsMinus1; i ++ )
       {
-        for( int j = temporalId; j < bp.m_bpMaxSubLayers - 1; j ++ )
+        sei_read_uvlc( pDecodedMessageOutputStream, symbol, "num_nalus_in_du_minus1[i]" );
+        sei.m_numNalusInDuMinus1[i] = symbol;
+        if( !sei.m_duCommonCpbRemovalDelayFlag && i < sei.m_numDecodingUnitsMinus1 )
         {
-          if( sei.m_ptSubLayerDelaysPresentFlag[j] )
+          for( int j = temporalId; j < bp.m_bpMaxSubLayers - 1; j ++ )
           {
-            sei_read_code( pDecodedMessageOutputStream, bp.getDuCpbRemovalDelayIncrementLength(), symbol, "du_cpb_removal_delay_increment_minus1[i][j]" );
-            sei.m_duCpbRemovalDelayMinus1[i * bp.m_bpMaxSubLayers + j] = symbol;
+            if( sei.m_ptSubLayerDelaysPresentFlag[j] )
+            {
+              sei_read_code( pDecodedMessageOutputStream, bp.getDuCpbRemovalDelayIncrementLength(), symbol, "du_cpb_removal_delay_increment_minus1[i][j]" );
+              sei.m_duCpbRemovalDelayMinus1[i * bp.m_bpMaxSubLayers + j] = symbol;
+            }
           }
         }
       }
+#if JVET_R0103_DU_SIGNALLING
+    }
+    else
+    {
+      sei.m_duCommonCpbRemovalDelayFlag = 0;
     }
+#endif
   }
   sei_read_uvlc( pDecodedMessageOutputStream, symbol,    "pt_display_elemental_periods_minus1" );
   sei.m_ptDisplayElementalPeriodsMinus1 = symbol;
@@ -1331,8 +1365,11 @@ void SEIReader::xParseSEISubpictureLevelInfo(SEISubpicureLevelInfo& sei, uint32_
 {
   output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
   uint32_t val;
-  sei_read_code( pDecodedMessageOutputStream,   3,  val,    "num_ref_levels_minus1" );            sei.m_numRefLevels  = val + 1;
-  sei_read_flag( pDecodedMessageOutputStream,       val,    "explicit_fraction_present_flag" );   sei.m_explicitFractionPresentFlag = val;
+  sei_read_code( pDecodedMessageOutputStream,   3,  val,    "sli_num_ref_levels_minus1" );            sei.m_numRefLevels  = val + 1;
+#if JVET_Q0404_CBR_SUBPIC
+  sei_read_flag( pDecodedMessageOutputStream,       val,    "sli_cbr_constraint_flag" );              sei.m_cbrConstraintFlag = val;
+#endif
+  sei_read_flag( pDecodedMessageOutputStream,       val,    "sli_explicit_fraction_present_flag" );   sei.m_explicitFractionPresentFlag = val;
   if (sei.m_explicitFractionPresentFlag)
   {
     sei_read_uvlc(pDecodedMessageOutputStream,      val,    "sli_num_subpics_minus1");             sei.m_numSubpics = val + 1;
@@ -1350,14 +1387,14 @@ void SEIReader::xParseSEISubpictureLevelInfo(SEISubpicureLevelInfo& sei, uint32_
 
   for( int i = 0; i  <  sei.m_numRefLevels; i++ )
   {
-    sei_read_code( pDecodedMessageOutputStream,   8,  val,    "ref_level_idc[i]" );         sei.m_refLevelIdc[i]  = (Level::Name) val;
+    sei_read_code( pDecodedMessageOutputStream,   8,  val,    "sli_ref_level_idc[i]" );         sei.m_refLevelIdc[i]  = (Level::Name) val;
     if( sei.m_explicitFractionPresentFlag )
     {
       sei.m_refLevelFraction[i].resize(sei.m_numSubpics);
 
       for( int j = 0; j  <  sei.m_numSubpics; j++ )
       {
-        sei_read_code( pDecodedMessageOutputStream,   8,  val,    "ref_level_fraction_minus1[i][j]" );  sei.m_refLevelFraction[i][j]= val;
+        sei_read_code( pDecodedMessageOutputStream,   8,  val,    "sli_ref_level_fraction_minus1[i][j]" );  sei.m_refLevelFraction[i][j]= val;
       }
     }
   }
diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h
index 00ca7647ccb440052368539dd9141c6aa24330c0..c02c65b9773ba87c150a6da65fbb403b72a6b410 100644
--- a/source/Lib/DecoderLib/SEIread.h
+++ b/source/Lib/DecoderLib/SEIread.h
@@ -64,7 +64,7 @@ protected:
   void xParseSEIDecodedPictureHash            (SEIDecodedPictureHash& sei,            uint32_t payloadSize,                     std::ostream *pDecodedMessageOutputStream);
   void xParseSEIBufferingPeriod               (SEIBufferingPeriod& sei,               uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream);
   void xParseSEIPictureTiming                 (SEIPictureTiming& sei,                 uint32_t payloadSize, const uint32_t temporalId, const SEIBufferingPeriod& bp, std::ostream *pDecodedMessageOutputStream);
-  void xParseSEIScalableNesting               (SEIScalableNesting& sei, const NalUnitType nalUnitType, const uint32_t nuh_layer_id, uint32_t payloadSize, const VPS *vps, const SPS *sps, std::ostream *pDecodedMessageOutputStream);
+  void xParseSEIScalableNesting               (SEIScalableNesting& sei, const NalUnitType nalUnitType, const uint32_t nuhLayerId, uint32_t payloadSize, const VPS *vps, const SPS *sps, std::ostream *decodedMessageOutputStream);
   void xParseSEIFrameFieldinfo                (SEIFrameFieldInfo& sei, const SEIPictureTiming& pt, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream);
   void xParseSEIDependentRAPIndication        (SEIDependentRAPIndication& sei,        uint32_t payLoadSize,                     std::ostream *pDecodedMessageOutputStream);
   void xParseSEIFramePacking                  (SEIFramePacking& sei,                  uint32_t payloadSize,                     std::ostream *pDecodedMessageOutputStream);
diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp
index ba82c79b9e29a008aabb2b4aa5d8413fb24873ce..d38bc7b5e384add6fd51063909d416a530ade96d 100644
--- a/source/Lib/DecoderLib/VLCReader.cpp
+++ b/source/Lib/DecoderLib/VLCReader.cpp
@@ -586,12 +586,44 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS )
         pcPPS->setSliceTileIdx( i, tileIdx );
 
         // complete tiles within a single slice
+#if JVET_R0188
+        if( ( tileIdx % pcPPS->getNumTileColumns() ) != pcPPS->getNumTileColumns() - 1 )
+        {
+          READ_UVLC( uiCode, "slice_width_in_tiles_minus1[i]" );
+          pcPPS->setSliceWidthInTiles ( i, uiCode + 1 );
+        }
+        else
+        {
+          pcPPS->setSliceWidthInTiles( i, 1 );
+        }
+#else
         uiCode = 0;
         if( pcPPS->getNumTileColumns() > 1 )
         {
           READ_UVLC( uiCode, "slice_width_in_tiles_minus1[i]" );
         }
         pcPPS->setSliceWidthInTiles ( i, uiCode + 1 );
+#endif
+
+#if JVET_R0188
+        if( tileIdx / pcPPS->getNumTileColumns() != pcPPS->getNumTileRows() - 1  &&
+         ( pcPPS->getTileIdxDeltaPresentFlag() || tileIdx % pcPPS->getNumTileColumns() == 0 ) ) 
+        {
+          READ_UVLC( uiCode, "slice_height_in_tiles_minus1[i]" );
+          pcPPS->setSliceHeightInTiles( i, uiCode + 1 );
+        }
+        else
+        {
+          if( ( tileIdx / pcPPS->getNumTileColumns() ) == pcPPS->getNumTileRows() - 1 )
+          {
+            pcPPS->setSliceHeightInTiles( i, 1 );
+          }
+          else
+          {
+            pcPPS->setSliceHeightInTiles( i, pcPPS->getSliceHeightInTiles( i - 1 ) );
+          }
+      }
+#else
         if( pcPPS->getTileIdxDeltaPresentFlag() || ( (tileIdx % pcPPS->getNumTileColumns()) == 0 ) )
         {
           uiCode = 0;
@@ -605,6 +637,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS )
         {
           pcPPS->setSliceHeightInTiles( i, pcPPS->getSliceHeightInTiles(i-1) );
         }
+#endif
 
         // multiple slices within a single tile special case
         if( pcPPS->getSliceWidthInTiles(i) == 1 && pcPPS->getSliceHeightInTiles(i) == 1 )
@@ -915,6 +948,26 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS )
   READ_FLAG(uiCode, "qp_delta_info_in_ph_flag");               pcPPS->setQpDeltaInfoInPhFlag(uiCode ? true : false);
 #endif
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  READ_FLAG(uiCode, "pps_ref_wraparound_enabled_flag");           pcPPS->setWrapAroundEnabledFlag( uiCode ? true : false );
+  if (pcPPS->getWrapAroundEnabledFlag())
+  {
+    READ_UVLC(uiCode, "pps_ref_wraparound_offset");               
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+    pcPPS->setPicWidthMinusWrapAroundOffset(uiCode);
+#else
+    pcPPS->setWrapAroundOffsetMinusCtbSize( uiCode );
+#endif
+  }
+  else
+  {
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+    pcPPS->setPicWidthMinusWrapAroundOffset(0);
+#else
+    pcPPS->setWrapAroundOffsetMinusCtbSize( 0 );
+#endif
+  }
+#endif
 
   READ_FLAG( uiCode, "picture_header_extension_present_flag");
   pcPPS->setPictureHeaderExtensionPresentFlag(uiCode);
@@ -1779,11 +1832,13 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
   }
 
   READ_FLAG(uiCode, "sps_ref_wraparound_enabled_flag");                  pcSPS->setWrapAroundEnabledFlag( uiCode ? true : false );
+#if !JVET_Q0764_WRAP_AROUND_WITH_RPR
 
   if (pcSPS->getWrapAroundEnabledFlag())
   {
     READ_UVLC(uiCode, "sps_ref_wraparound_offset");               pcSPS->setWrapAroundOffset((uiCode + 2 + pcSPS->getCTUSize() / (1 << pcSPS->getLog2MinCodingBlockSize()))*(1 << pcSPS->getLog2MinCodingBlockSize()));
   }
+#endif
 
   READ_FLAG( uiCode, "sps_temporal_mvp_enabled_flag" );                  pcSPS->setSPSTemporalMVPEnabledFlag(uiCode);
 
@@ -1816,6 +1871,16 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
     pcSPS->setDmvrControlPresentFlag( false );
   }
   READ_FLAG(uiCode, "sps_mmvd_enabled_flag");                        pcSPS->setUseMMVD(uiCode != 0);
+#if JVET_R0214_MMVD_SYNTAX_MODIFICATION
+  if (pcSPS->getUseMMVD())
+  {
+    READ_FLAG(uiCode, "sps_mmvd_fullpel_only_flag");                pcSPS->setFpelMmvdEnabledFlag(uiCode != 0);
+  }
+  else
+  {
+    pcSPS->setFpelMmvdEnabledFlag( false );
+  }
+#endif
   READ_FLAG(uiCode, "sps_isp_enabled_flag");                        pcSPS->setUseISP( uiCode != 0 );
   READ_FLAG(uiCode, "sps_mrl_enabled_flag");                        pcSPS->setUseMRL( uiCode != 0 );
   READ_FLAG(uiCode, "sps_mip_enabled_flag");                        pcSPS->setUseMIP( uiCode != 0 );
@@ -1908,12 +1973,12 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
     pcSPS->setMaxNumIBCMergeCand(0);
   // KJS: sps_ciip_enabled_flag
   READ_FLAG( uiCode,     "sps_ciip_enabled_flag" );                           pcSPS->setUseCiip             ( uiCode != 0 );
-
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   if ( pcSPS->getUseMMVD() )
   {
     READ_FLAG( uiCode,  "sps_fpel_mmvd_enabled_flag" );             pcSPS->setFpelMmvdEnabledFlag ( uiCode != 0 );
   }
-
+#endif
   if (pcSPS->getMaxNumMergeCand() >= 2)
   {
     READ_FLAG(uiCode, "sps_gpm_enabled_flag");
@@ -2105,8 +2170,12 @@ void HLSyntaxReader::parseDCI(DCI* dci)
 #endif
   uint32_t  symbol;
 
+#if JVET_R0108_DCI_SIGNALING
+  READ_CODE(4, symbol, "dci_reserved_zero_4bits");
+#else
   READ_CODE(3, symbol, "dci_max_sub_layers_minus1");          dci->setMaxSubLayersMinus1(symbol);
   READ_CODE(1, symbol, "dci_reserved_zero_bit");              CHECK(symbol != 0, "dci_reserved_zero_bit must be equal to zero");
+#endif
 
   uint32_t numPTLs;
   READ_CODE(4, numPTLs, "dci_num_ptls_minus1");
@@ -2236,15 +2305,26 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
     }
     else
       pcVPS->setPtPresentFlag(0, 1);
+#if JVET_R0107_VPS_SIGNALING
+    if (!pcVPS->getAllLayersSameNumSublayersFlag())
+#else
     if(pcVPS->getMaxSubLayers() > 1 && !pcVPS->getAllLayersSameNumSublayersFlag())
+#endif
     {
       READ_CODE(3, uiCode, "ptl_max_temporal_id");
       pcVPS->setPtlMaxTemporalId(i, uiCode);
     }
+#if JVET_R0107_VPS_SIGNALING
+    else
+    {
+      pcVPS->setPtlMaxTemporalId(i, pcVPS->getMaxSubLayers() - 1);
+    }
+#else
     else if(pcVPS->getMaxSubLayers() > 1)
       pcVPS->setPtlMaxTemporalId(i, pcVPS->getMaxSubLayers() - 1);
     else
       pcVPS->setPtlMaxTemporalId(i, 0);
+#endif
   }
   int cnt = 0;
   while (m_pcBitstream->getNumBitsUntilByteAligned())
@@ -2297,7 +2377,7 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
   }
 
 #if JVET_R0191_ASPECT3
-  CHECK( pcVPS->m_numDpbParams > pcVPS->getNumMultiLayeredOlss(),"The value of vps_num_dpb_params_minus1 shall be in the range of 0 to NumMultiLayerOlss ? 1, inclusive");
+  CHECK( pcVPS->m_numDpbParams > pcVPS->getNumMultiLayeredOlss(),"The value of vps_num_dpb_params_minus1 shall be in the range of 0 to NumMultiLayerOlss - 1, inclusive");
   std::vector<bool> isDPBParamReferred(pcVPS->m_numDpbParams, false);
 #endif
 
@@ -2310,6 +2390,17 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
 
   for( int i = 0; i < pcVPS->m_numDpbParams; i++ )
   {
+#if JVET_R0107_VPS_SIGNALING
+    if (!pcVPS->getAllLayersSameNumSublayersFlag())
+    {
+      READ_CODE(3, uiCode, "dpb_max_temporal_id[i]");
+      pcVPS->m_dpbMaxTemporalId.push_back(uiCode);
+    }
+    else
+    {
+      pcVPS->m_dpbMaxTemporalId.push_back(pcVPS->getMaxSubLayers() - 1);
+    }
+#else
     if( pcVPS->getMaxSubLayers() == 1 )
     {
       // When vps_max_sublayers_minus1 is equal to 0, the value of dpb_max_temporal_id[ i ] is inferred to be equal to 0.
@@ -2327,6 +2418,7 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
         READ_CODE( 3, uiCode, "dpb_max_temporal_id[i]" );  pcVPS->m_dpbMaxTemporalId.push_back( uiCode );
       }
     }
+#endif
 
     for( int j = ( pcVPS->m_sublayerDpbParamsPresentFlag ? 0 : pcVPS->m_dpbMaxTemporalId[i] ); j <= pcVPS->m_dpbMaxTemporalId[i]; j++ )
     {
@@ -2349,10 +2441,15 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
   }
 
 
+#if JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING
+  for (int i = 1; i < pcVPS->m_numMultiLayeredOlss; i++)
+  {
+#else
   for( int i = 0; i < pcVPS->getTotalNumOLSs(); i++ )
   {
     if( pcVPS->m_numLayersInOls[i] > 1 )
     {
+#endif
       READ_UVLC( uiCode, "ols_dpb_pic_width[i]" ); pcVPS->setOlsDpbPicWidth( i, uiCode );
       READ_UVLC( uiCode, "ols_dpb_pic_height[i]" ); pcVPS->setOlsDpbPicHeight( i, uiCode );
       if( pcVPS->m_numDpbParams > 1 )
@@ -2360,18 +2457,31 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
         READ_UVLC( uiCode, "ols_dpb_params_idx[i]" ); pcVPS->setOlsDpbParamsIdx( i, uiCode );
       }
 #if JVET_R0191_ASPECT3
+#if JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING
+      else if (pcVPS->m_numDpbParams == 0)
+      {
+        pcVPS->setOlsDpbParamsIdx(i, 0);
+      }
+      else
+      {
+        pcVPS->setOlsDpbParamsIdx(i, i);
+      }
+#else
       else
       {
         pcVPS->setOlsDpbParamsIdx( i, 0 );
       }
+#endif
       isDPBParamReferred[pcVPS->getOlsDpbParamsIdx(i)] = true;
 #endif
+#if !JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING
     }
+#endif
   }
 #if JVET_R0191_ASPECT3
   for( int i = 0; i < pcVPS->m_numDpbParams; i++ )
   {
-    CHECK( !isDPBParamReferred[i],"Each dpb_parameters( ) syntax structure in the VPS shall be referred to by at least one value of vps_ols_dpb_params_idx[i] for i in the range of 0 to NumMultiLayerOlss ? 1, inclusive");
+    CHECK( !isDPBParamReferred[i],"Each dpb_parameters( ) syntax structure in the VPS shall be referred to by at least one value of vps_ols_dpb_params_idx[i] for i in the range of 0 to NumMultiLayerOlss - 1, inclusive");
   }
 #endif
   if (!pcVPS->getEachLayerIsAnOlsFlag())
@@ -2392,7 +2502,7 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
 
     READ_UVLC(uiCode, "num_ols_hrd_params_minus1"); pcVPS->setNumOlsHrdParamsMinus1(uiCode);
 #if JVET_R0191_ASPECT3
-    CHECK( uiCode >= pcVPS->getNumMultiLayeredOlss(),"The value of vps_num_ols_hrd_params_minus1 shall be in the range of 0 to NumMultiLayerOlss ? 1, inclusive");
+    CHECK( uiCode >= pcVPS->getNumMultiLayeredOlss(),"The value of vps_num_ols_hrd_params_minus1 shall be in the range of 0 to NumMultiLayerOlss - 1, inclusive");
     std::vector<bool> isHRDParamReferred( uiCode + 1, false);
 #else
     CHECK(uiCode >= pcVPS->getTotalNumOLSs(),"The value of num_ols_hrd_params_minus1 shall be in the range of 0 to TotalNumOlss - 1, inclusive");
@@ -2401,12 +2511,19 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
     pcVPS->m_olsHrdParams.resize(pcVPS->getNumOlsHrdParamsMinus1(), std::vector<OlsHrdParams>(pcVPS->getMaxSubLayers()));
     for (int i = 0; i <= pcVPS->getNumOlsHrdParamsMinus1(); i++)
     {
+#if JVET_R0107_VPS_SIGNALING
+      if (!pcVPS->getAllLayersSameNumSublayersFlag())
+#else
       if (((pcVPS->getMaxSubLayers() - 1) > 0) && (!pcVPS->getAllLayersSameNumSublayersFlag()))
+#endif
       {
         READ_CODE(3, uiCode, "hrd_max_tid[i]");  pcVPS->setHrdMaxTid(i, uiCode);
       }
       else
       {
+#if JVET_R0107_VPS_SIGNALING
+        pcVPS->setHrdMaxTid(i, pcVPS->getMaxSubLayers() - 1);
+#else
         if (pcVPS->getMaxSubLayers() == 1)
         {
           pcVPS->setHrdMaxTid(i, 0);
@@ -2415,11 +2532,33 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
         {
           pcVPS->setHrdMaxTid(i, pcVPS->getMaxSubLayers()- 1);
         }
+#endif
 
       }
       uint32_t firstSublayer = pcVPS->getVPSSublayerCpbParamsPresentFlag() ? 0 : pcVPS->getHrdMaxTid(i);
       parseOlsHrdParameters(pcVPS->getGeneralHrdParameters(),pcVPS->getOlsHrdParameters(i), firstSublayer, pcVPS->getHrdMaxTid(i));
     }
+#if JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING
+    for (int i = 0; i < pcVPS->m_numMultiLayeredOlss; i++) 
+    {
+      if (((pcVPS->getNumOlsHrdParamsMinus1() + 1) != pcVPS->m_numMultiLayeredOlss) && (pcVPS->getNumOlsHrdParamsMinus1() > 0))
+      {
+        READ_UVLC(uiCode, "ols_hrd_idx[i]"); pcVPS->setOlsHrdIdx(i, uiCode);
+        CHECK(uiCode > pcVPS->getNumOlsHrdParamsMinus1(), "The value of ols_hrd_idx[[ i ] shall be in the range of 0 to num_ols_hrd_params_minus1, inclusive.");
+      }
+      else if (pcVPS->getNumOlsHrdParamsMinus1() == 0)
+      {
+        pcVPS->setOlsHrdIdx(i, 0);
+      }
+      else
+      {
+        pcVPS->setOlsHrdIdx(i, i);
+      }
+#if JVET_R0191_ASPECT3
+      isHRDParamReferred[pcVPS->getOlsHrdIdx(i)] = true;
+#endif
+    }
+#else
     for (int i = 1; i < pcVPS->getTotalNumOLSs(); i++)
     {
       if (((pcVPS->getNumOlsHrdParamsMinus1() + 1) != pcVPS->getTotalNumOLSs()) && (pcVPS->getNumOlsHrdParamsMinus1() > 0))
@@ -2442,10 +2581,11 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
       isHRDParamReferred[pcVPS->getOlsHrdIdx(i)] = true;
 #endif
     }
+#endif
 #if JVET_R0191_ASPECT3
     for( int i = 0; i <= pcVPS->getNumOlsHrdParamsMinus1(); i++ )
     {
-      CHECK( !isHRDParamReferred[i], "Each ols_hrd_parameters( ) syntax structure in the VPS shall be referred to by at least one value of vps_ols_hrd_idx[ i ] for i in the range of 1 to NumMultiLayerOlss ? 1, inclusive");
+      CHECK( !isHRDParamReferred[i], "Each ols_hrd_parameters( ) syntax structure in the VPS shall be referred to by at least one value of vps_ols_hrd_idx[ i ] for i in the range of 1 to NumMultiLayerOlss - 1, inclusive");
     }
 #endif
   }
@@ -2478,6 +2618,12 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
   {
     READ_FLAG(uiCode, "gdr_pic_flag");                     picHeader->setGdrPicFlag(uiCode != 0);
   }
+#if JVET_R0112_SEMANTICS_CLEANUP
+  else
+  {
+    picHeader->setGdrPicFlag(false);
+  }
+#endif
   READ_FLAG(uiCode, "ph_inter_slice_allowed_flag");       picHeader->setPicInterSliceAllowedFlag(uiCode != 0);
   if (picHeader->getPicInterSliceAllowedFlag())
   {
@@ -2714,6 +2860,25 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
 
   pps->initSubPic(*sps);
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  // set wraparound offset from PPS and SPS info
+  int minCbSizeY = (1 << sps->getLog2MinCodingBlockSize());
+  CHECK( !sps->getWrapAroundEnabledFlag() && pps->getWrapAroundEnabledFlag(), "When sps_ref_wraparound_enabled_flag is equal to 0, the value of pps_ref_wraparound_enabled_flag shall be equal to 0.");
+  CHECK( (((sps->getCTUSize() / minCbSizeY) + 1) > ((pps->getPicWidthInLumaSamples() / minCbSizeY) - 1)) && pps->getWrapAroundEnabledFlag(), "When the value of CtbSizeY / MinCbSizeY + 1 is greater than pic_width_in_luma_samples / MinCbSizeY - 1, the value of pps_ref_wraparound_enabled_flag shall be equal to 0.");
+  if( pps->getWrapAroundEnabledFlag() )
+  {
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+    CHECK((pps->getPicWidthMinusWrapAroundOffset() > (pps->getPicWidthInLumaSamples() / minCbSizeY - sps->getCTUSize() / minCbSizeY - 2)), "pps_pic_width_minus_wraparound_ofsfet shall be less than or equal to pps_pic_width_in_luma_samples/MinCbSizeY - CtbSizeY/MinCbSizeY-2");
+    pps->setWrapAroundOffset(minCbSizeY * (pps->getPicWidthInLumaSamples()/minCbSizeY- pps->getPicWidthMinusWrapAroundOffset()));
+#else
+    pps->setWrapAroundOffset( minCbSizeY * (pps->getWrapAroundOffsetMinusCtbSize() + 2 + sps->getCTUSize() / minCbSizeY) );
+#endif
+  }
+  else
+  {
+    pps->setWrapAroundOffset( 0 );
+  }
+#endif
 
   // virtual boundaries
   if( sps->getVirtualBoundariesEnabledFlag() && !sps->getVirtualBoundariesPresentFlag() )
@@ -3382,6 +3547,30 @@ void  HLSyntaxReader::checkAlfNaluTidAndPicTid(Slice* pcSlice, PicHeader* picHea
     {
       aps = parameterSetManager->getAPS(apsId[i], ALF_APS);
       CHECK(aps->getTemporalId() > curPicTid, "The TemporalId of the APS NAL unit having aps_params_type equal to ALF_APS and adaptation_parameter_set_id equal to ph_alf_aps_id_luma[ i ] shall be less than or equal to the TemporalId of the picture associated with the PH.");
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+      if( pcSlice->getNalUnitLayerId() != aps->getLayerId() )
+      {
+        CHECK( aps->getLayerId() > pcSlice->getNalUnitLayerId(), "Layer Id of APS cannot be greater than layer Id of VCL NAL unit the refer to it" );
+        CHECK( pcSlice->getSPS()->getVPSId() == 0, "VPSId of the referred SPS cannot be 0 when layer Id of APS and layer Id of current slice are different" );
+        for (int i = 0; i < pcSlice->getVPS()->getNumOutputLayerSets(); i++ )
+        {
+          bool isCurrLayerInOls = false;
+          bool isRefLayerInOls = false;
+          for( int j = pcSlice->getVPS()->getNumLayersInOls(i) - 1; j >= 0; j-- )
+          {
+            if( pcSlice->getVPS()->getLayerIdInOls(i, j) == pcSlice->getNalUnitLayerId() )
+            {
+              isCurrLayerInOls = true;
+            }
+            if( pcSlice->getVPS()->getLayerIdInOls(i, j) == aps->getLayerId() )
+            {
+              isRefLayerInOls = true;
+            }
+          }
+          CHECK( isCurrLayerInOls && !isRefLayerInOls, "When VCL NAl unit in layer A refers to APS in layer B, all OLS that contains layer A shall also contains layer B" );
+        }
+      }
+#endif
     }
     //chroma
 #if JVET_R0225_SEPERATE_FLAGS_ALF_CHROMA
@@ -3393,6 +3582,30 @@ void  HLSyntaxReader::checkAlfNaluTidAndPicTid(Slice* pcSlice, PicHeader* picHea
       int chromaAlfApsId = picHeader->getAlfApsIdChroma();
       aps = parameterSetManager->getAPS(chromaAlfApsId, ALF_APS);
       CHECK(aps->getTemporalId() > curPicTid, "The TemporalId of the APS NAL unit having aps_params_type equal to ALF_APS and adaptation_parameter_set_id equal to ph_alf_aps_id_chroma shall be less than or equal to the TemporalId of the picture associated with the PH.");
+#if JVET_R0194_CONSTRAINT_PS_SHARING_REFERENCING
+      if( pcSlice->getNalUnitLayerId() != aps->getLayerId() )
+      {
+        CHECK( aps->getLayerId() > pcSlice->getNalUnitLayerId(), "Layer Id of APS cannot be greater than layer Id of VCL NAL unit the refer to it" );
+        CHECK( pcSlice->getSPS()->getVPSId() == 0, "VPSId of the referred SPS cannot be 0 when layer Id of APS and layer Id of current slice are different" );
+        for (int i = 0; i < pcSlice->getVPS()->getNumOutputLayerSets(); i++ )
+        {
+          bool isCurrLayerInOls = false;
+          bool isRefLayerInOls = false;
+          for( int j = pcSlice->getVPS()->getNumLayersInOls(i) - 1; j >= 0; j-- )
+          {
+            if( pcSlice->getVPS()->getLayerIdInOls(i, j) == pcSlice->getNalUnitLayerId() )
+            {
+              isCurrLayerInOls = true;
+            }
+            if( pcSlice->getVPS()->getLayerIdInOls(i, j) == aps->getLayerId() )
+            {
+              isRefLayerInOls = true;
+            }
+          }
+          CHECK( isCurrLayerInOls && !isRefLayerInOls, "When VCL NAl unit in layer A refers to APS in layer B, all OLS that contains layer A shall also contains layer B" );
+        }
+      }
+#endif
     }
   }
 }
@@ -4656,7 +4869,9 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo)
     CHECK(symbol == 0, "When intra_only_constraint_flag is equal to 1, the value of no_ciip_constraint_flag shall be equal to 1");
   }
 #endif
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   READ_FLAG(symbol, "no_fpel_mmvd_constraint_flag");               cinfo->setNoFPelMmvdConstraintFlag(symbol > 0 ? true : false);
+#endif
   READ_FLAG(symbol, "no_gpm_constraint_flag");                     cinfo->setNoGeoConstraintFlag(symbol > 0 ? true : false);
 #if JVET_R0286_GCI_CLEANUP
   if (cinfo->getIntraOnlyConstraintFlag() == 1)
diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h
index 0ec6d88d8c8111eabd34e2f3e27b5c2e8c63c2ac..376971a0ada7c1cf9efa66d086c6f3b7d6c960b9 100644
--- a/source/Lib/EncoderLib/EncCfg.h
+++ b/source/Lib/EncoderLib/EncCfg.h
@@ -211,7 +211,9 @@ protected:
   bool      m_bNoBcwConstraintFlag;
   bool      m_noIbcConstraintFlag;
   bool      m_bNoCiipConstraintFlag;
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   bool      m_noFPelMmvdConstraintFlag;
+#endif
   bool      m_noGeoConstraintFlag;
   bool      m_bNoLadfConstraintFlag;
   bool      m_noTransformSkipConstraintFlag;
@@ -489,7 +491,8 @@ protected:
   bool      m_gopBasedTemporalFilterEnabled;
   bool      m_noPicPartitionFlag;                             ///< no picture partitioning flag (single tile, single slice)
 #if JVET_R0110_MIXED_LOSSLESS
-  std::vector<uint32_t> m_sliceLosslessArray;                    ///< Slice lossless array
+  bool      m_mixedLossyLossless;                             ///< enable mixed lossy/lossless coding
+  std::vector<uint16_t> m_sliceLosslessArray;                      ///< Slice lossless array
 #endif
   std::vector<uint32_t> m_tileColumnWidth;                    ///< tile column widths in units of CTUs (last column width will be repeated uniformly to cover any remaining picture width)
   std::vector<uint32_t> m_tileRowHeight;                      ///< tile row heights in units of CTUs (last row height will be repeated uniformly to cover any remaining picture height)
@@ -844,8 +847,10 @@ public:
   void      setNoIbcConstraintFlag(bool bVal) { m_noIbcConstraintFlag = bVal; }
   bool      getNoCiipConstraintFlag() const { return m_bNoCiipConstraintFlag; }
   void      setNoCiipConstraintFlag(bool bVal) { m_bNoCiipConstraintFlag = bVal; }
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   bool      getNoFPelMmvdConstraintFlag() const { return m_noFPelMmvdConstraintFlag; }
   void      setNoFPelMmvdConstraintFlag(bool bVal) { m_noFPelMmvdConstraintFlag = bVal; }
+#endif
   bool      getNoGeoConstraintFlag() const { return m_noGeoConstraintFlag; }
   void      setNoGeoConstraintFlag(bool bVal) { m_noGeoConstraintFlag = bVal; }
   bool      getNoLadfConstraintFlag() const { return m_bNoLadfConstraintFlag; }
@@ -1410,8 +1415,10 @@ public:
   uint32_t      getDeltaQpRD                    () const { return m_uiDeltaQpRD; }
   bool      getFastDeltaQp                  () const { return m_bFastDeltaQP; }
 #if JVET_R0110_MIXED_LOSSLESS
-  void      setSliceLosslessArray(std::vector<uint32_t> sliceLosslessArray) { m_sliceLosslessArray = sliceLosslessArray; }
-  const     std::vector<uint32_t>*   getSliceLosslessArray() const { return &m_sliceLosslessArray; }
+  void      setMixedLossyLossless(bool b) { m_mixedLossyLossless = b; }
+  bool      getMixedLossyLossless()       { return m_mixedLossyLossless; }
+  void      setSliceLosslessArray(std::vector<uint16_t> sliceLosslessArray) { m_sliceLosslessArray = sliceLosslessArray; }
+  const     std::vector<uint16_t>*   getSliceLosslessArray() const { return &m_sliceLosslessArray; }
 #endif
   //====== Tiles and Slices ========
   void      setNoPicPartitionFlag( bool b )                                { m_noPicPartitionFlag = b;              }
diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp
index 813605db2abcd00823ea1cf9cae4ea9e69bc334e..7910bdf7a1bc89094c1d54257dca1690a8466cdc 100644
--- a/source/Lib/EncoderLib/EncGOP.cpp
+++ b/source/Lib/EncoderLib/EncGOP.cpp
@@ -2667,7 +2667,12 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
     {
       DTRACE_UPDATE( g_trace_ctx, ( std::make_pair( "poc", pocCurr ) ) );
 #if JVET_R0110_MIXED_LOSSLESS
-      const std::vector<uint32_t> sliceLosslessArray = *(m_pcCfg->getSliceLosslessArray());
+      const std::vector<uint16_t> sliceLosslessArray = *(m_pcCfg->getSliceLosslessArray());
+      bool mixedLossyLossless = m_pcCfg->getMixedLossyLossless();
+      if (m_pcCfg->getCostMode() == COST_LOSSLESS_CODING)
+      {
+        pcPic->fillSliceLossyLosslessArray(sliceLosslessArray, mixedLossyLossless);
+      }
 #endif
 
       for(uint32_t sliceIdx = 0; sliceIdx < pcPic->cs->pps->getNumSlicesInPic(); sliceIdx++ )
@@ -2716,7 +2721,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
         bool isLossless = false;
         if (m_pcCfg->getCostMode() == COST_LOSSLESS_CODING)
         {
-          isLossless = (sliceLosslessArray[sliceIdx] != 0);
+          isLossless = pcPic->losslessSlice(sliceIdx);
         }
         m_pcSliceEncoder->setLosslessSlice(pcPic, isLossless);
 #endif
@@ -4734,7 +4739,11 @@ void EncGOP::updateCompositeReference(Slice* pcSlice, PicList& rcListPic, int po
   // Update background reference
   if (pcSlice->isIRAP())//(pocCurr == 0)
   {
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+    curPic->extendPicBorder( pcSlice->getPPS() );
+#else
     curPic->extendPicBorder();
+#endif
     curPic->setBorderExtension(true);
 
     m_picBg->getRecoBuf().copyFrom(curPic->getRecoBuf());
@@ -4773,15 +4782,27 @@ void EncGOP::updateCompositeReference(Slice* pcSlice, PicList& rcListPic, int po
       }
     }
     m_picBg->setBorderExtension(false);
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+    m_picBg->extendPicBorder( pcSlice->getPPS() );
+#else
     m_picBg->extendPicBorder();
+#endif
     m_picBg->setBorderExtension(true);
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+    curPic->extendPicBorder( pcSlice->getPPS() );
+#else
     curPic->extendPicBorder();
+#endif
     curPic->setBorderExtension(true);
     m_picOrig->getOrigBuf().copyFrom(curPic->getOrigBuf());
 
     m_picBg->setBorderExtension(false);
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+    m_picBg->extendPicBorder( pcSlice->getPPS() );
+#else
     m_picBg->extendPicBorder();
+#endif
     m_picBg->setBorderExtension(true);
   }
 }
diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp
index e01d08575c00312612f85fe1dbc3be68dc92179c..3f5e3970d69648e849c751b63a42c8a250ab11b9 100644
--- a/source/Lib/EncoderLib/EncLib.cpp
+++ b/source/Lib/EncoderLib/EncLib.cpp
@@ -311,6 +311,30 @@ void EncLib::init( bool isFieldCoding, AUWriterIf* auWriterIf )
     m_noPicPartitionFlag = true;
 
     xInitPPS( pps, sps0 ); // will allocate memory for and initialize pps.pcv inside
+    
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR  
+    if( pps.getWrapAroundEnabledFlag() )
+    {
+      int minCbSizeY = (1 << sps0.getLog2MinCodingBlockSize());
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+      pps.setPicWidthMinusWrapAroundOffset      ((pps.getPicWidthInLumaSamples()/minCbSizeY) - (m_wrapAroundOffset * pps.getPicWidthInLumaSamples() / pps0.getPicWidthInLumaSamples() / minCbSizeY) );
+      pps.setWrapAroundOffset                   (minCbSizeY * (pps.getPicWidthInLumaSamples() / minCbSizeY - pps.getPicWidthMinusWrapAroundOffset()));
+#else
+      pps.setWrapAroundOffsetMinusCtbSize       ( ((m_wrapAroundOffset * pps.getPicWidthInLumaSamples() / pps0.getPicWidthInLumaSamples()) / minCbSizeY) - 2 - (sps0.getCTUSize() / minCbSizeY) );
+      pps.setWrapAroundOffset                   ( minCbSizeY * (pps.getWrapAroundOffsetMinusCtbSize() + 2 + sps0.getCTUSize() / minCbSizeY) );
+#endif
+
+    }
+    else 
+    {
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+      pps.setPicWidthMinusWrapAroundOffset      (0);
+#else
+      pps.setWrapAroundOffsetMinusCtbSize       ( 0 );
+#endif
+      pps.setWrapAroundOffset                   ( 0 );       
+    }
+#endif
   }
 
 #if ER_CHROMA_QP_WCG_PPS
@@ -971,10 +995,10 @@ void EncLib::xInitVPS( const SPS& sps )
   m_vps->deriveOutputLayerSets();
   m_vps->deriveTargetOutputLayerSet( m_vps->m_targetOlsIdx );
 
-  // number of the DPB parameters is set equal to the number of OLS
-  if( !m_vps->getAllIndependentLayersFlag() )
+  // number of the DPB parameters is set equal to the number of OLS containing multi layers
+  if( !m_vps->getEachLayerIsAnOlsFlag() )
   {
-    m_vps->m_numDpbParams = m_vps->m_totalNumOLSs;
+    m_vps->m_numDpbParams = m_vps->getNumMultiLayeredOlss();
   }
 
   if( m_vps->m_dpbParameters.size() != m_vps->m_numDpbParams )
@@ -987,56 +1011,64 @@ void EncLib::xInitVPS( const SPS& sps )
     m_vps->m_dpbMaxTemporalId.resize( m_vps->m_numDpbParams );
   }
 
-  for( int olsIdx = 0; olsIdx < m_vps->m_numOutputLayersInOls.size(); olsIdx++ )
+  for( int olsIdx = 0, dpbIdx = 0; olsIdx < m_vps->m_numOutputLayersInOls.size(); olsIdx++ )
   {
-    if( std::find( m_vps->m_layerIdInOls[olsIdx].begin(), m_vps->m_layerIdInOls[olsIdx].end(), m_layerId ) != m_vps->m_layerIdInOls[olsIdx].end() )
-    {
-      m_vps->setOlsDpbPicWidth( olsIdx, std::max<int>( sps.getMaxPicWidthInLumaSamples(), m_vps->getOlsDpbPicSize( olsIdx ).width ) );
-      m_vps->setOlsDpbPicHeight( olsIdx, std::max<int>( sps.getMaxPicHeightInLumaSamples(), m_vps->getOlsDpbPicSize( olsIdx ).height ) );
-    }
+    if ( m_vps->getNumLayersInOls(olsIdx) > 1 )
+    { 
+      if( std::find( m_vps->m_layerIdInOls[olsIdx].begin(), m_vps->m_layerIdInOls[olsIdx].end(), m_layerId ) != m_vps->m_layerIdInOls[olsIdx].end() )
+      {
+        m_vps->setOlsDpbPicWidth( olsIdx, std::max<int>( sps.getMaxPicWidthInLumaSamples(), m_vps->getOlsDpbPicSize( olsIdx ).width ) );
+        m_vps->setOlsDpbPicHeight( olsIdx, std::max<int>( sps.getMaxPicHeightInLumaSamples(), m_vps->getOlsDpbPicSize( olsIdx ).height ) );
+      }
 
-    m_vps->setOlsDpbParamsIdx( olsIdx, olsIdx );
+      m_vps->setOlsDpbParamsIdx( olsIdx, dpbIdx );
+      dpbIdx++;
+    }
   }
 
-  for( int i = 0; i < m_vps->m_numDpbParams; i++ )
+  //for( int i = 0; i < m_vps->m_numDpbParams; i++ )
+  for( int i = 0; i < m_vps->m_numOutputLayersInOls.size(); i++ )
   {
-    int olsIdx = i;
+    if ( m_vps->getNumLayersInOls(i) > 1 )
+    { 
+      int dpbIdx = m_vps->getOlsDpbParamsIdx( i );
 
-    if( m_vps->getMaxSubLayers() == 1 )
-    {
-      // When vps_max_sublayers_minus1 is equal to 0, the value of dpb_max_temporal_id[ i ] is inferred to be equal to 0.
-      m_vps->m_dpbMaxTemporalId[i] = 0;
-    }
-    else
-    {
-      if( m_vps->getAllLayersSameNumSublayersFlag() )
+      if( m_vps->getMaxSubLayers() == 1 )
       {
-        // When vps_max_sublayers_minus1 is greater than 0 and vps_all_layers_same_num_sublayers_flag is equal to 1, the value of dpb_max_temporal_id[ i ] is inferred to be equal to vps_max_sublayers_minus1.
-        m_vps->m_dpbMaxTemporalId[i] = m_vps->getMaxSubLayers() - 1;
+        // When vps_max_sublayers_minus1 is equal to 0, the value of dpb_max_temporal_id[ dpbIdx ] is inferred to be equal to 0.
+        m_vps->m_dpbMaxTemporalId[dpbIdx] = 0;
       }
       else
       {
-        m_vps->m_dpbMaxTemporalId[i] = m_maxTempLayer;
+        if( m_vps->getAllLayersSameNumSublayersFlag() )
+        {
+          // When vps_max_sublayers_minus1 is greater than 0 and vps_all_layers_same_num_sublayers_flag is equal to 1, the value of dpb_max_temporal_id[ dpbIdx ] is inferred to be equal to vps_max_sublayers_minus1.
+          m_vps->m_dpbMaxTemporalId[dpbIdx] = m_vps->getMaxSubLayers() - 1;
+        }
+        else
+        {
+          m_vps->m_dpbMaxTemporalId[dpbIdx] = m_maxTempLayer;
+        }
+      }
+    
+      for( int j = ( m_vps->m_sublayerDpbParamsPresentFlag ? 0 : m_vps->m_dpbMaxTemporalId[dpbIdx] ); j <= m_vps->m_dpbMaxTemporalId[dpbIdx]; j++ )
+      {
+        m_vps->m_dpbParameters[dpbIdx].m_maxDecPicBuffering[j] = profileLevelTierFeatures.getMaxDpbSize( m_vps->getOlsDpbPicSize( i ).width * m_vps->getOlsDpbPicSize( i ).height );
+        m_vps->m_dpbParameters[dpbIdx].m_numReorderPics[j] = m_vps->m_dpbParameters[dpbIdx].m_maxDecPicBuffering[j];
+        m_vps->m_dpbParameters[dpbIdx].m_maxLatencyIncreasePlus1[j] = 0;
       }
-    }
 
-    for( int j = ( m_vps->m_sublayerDpbParamsPresentFlag ? 0 : m_vps->m_dpbMaxTemporalId[i] ); j <= m_vps->m_dpbMaxTemporalId[i]; j++ )
-    {
-      m_vps->m_dpbParameters[i].m_maxDecPicBuffering[j] = profileLevelTierFeatures.getMaxDpbSize( m_vps->getOlsDpbPicSize( olsIdx ).width * m_vps->getOlsDpbPicSize( olsIdx ).height );
-      m_vps->m_dpbParameters[i].m_numReorderPics[j] = m_vps->m_dpbParameters[i].m_maxDecPicBuffering[j];
-      m_vps->m_dpbParameters[i].m_maxLatencyIncreasePlus1[j] = 0;
-    }
-
-    for( int j = ( m_vps->m_sublayerDpbParamsPresentFlag ? m_vps->m_dpbMaxTemporalId[i] : 0 ); j < m_vps->m_dpbMaxTemporalId[i]; j++ )
-    {
-      // When max_dec_pic_buffering_minus1[ i ] is not present for i in the range of 0 to maxSubLayersMinus1 - 1, inclusive, due to subLayerInfoFlag being equal to 0, it is inferred to be equal to max_dec_pic_buffering_minus1[ maxSubLayersMinus1 ].
-      m_vps->m_dpbParameters[i].m_maxDecPicBuffering[j] = m_vps->m_dpbParameters[i].m_maxDecPicBuffering[m_vps->m_dpbMaxTemporalId[i]];
+      for( int j = ( m_vps->m_sublayerDpbParamsPresentFlag ? m_vps->m_dpbMaxTemporalId[dpbIdx] : 0 ); j < m_vps->m_dpbMaxTemporalId[dpbIdx]; j++ )
+      {
+        // When max_dec_pic_buffering_minus1[ dpbIdx ] is not present for dpbIdx in the range of 0 to maxSubLayersMinus1 - 1, inclusive, due to subLayerInfoFlag being equal to 0, it is inferred to be equal to max_dec_pic_buffering_minus1[ maxSubLayersMinus1 ].
+        m_vps->m_dpbParameters[dpbIdx].m_maxDecPicBuffering[j] = m_vps->m_dpbParameters[dpbIdx].m_maxDecPicBuffering[m_vps->m_dpbMaxTemporalId[dpbIdx]];
 
-      // When max_num_reorder_pics[ i ] is not present for i in the range of 0 to maxSubLayersMinus1 - 1, inclusive, due to subLayerInfoFlag being equal to 0, it is inferred to be equal to max_num_reorder_pics[ maxSubLayersMinus1 ].
-      m_vps->m_dpbParameters[i].m_numReorderPics[j] = m_vps->m_dpbParameters[i].m_numReorderPics[m_vps->m_dpbMaxTemporalId[i]];
+        // When max_num_reorder_pics[ dpbIdx ] is not present for dpbIdx in the range of 0 to maxSubLayersMinus1 - 1, inclusive, due to subLayerInfoFlag being equal to 0, it is inferred to be equal to max_num_reorder_pics[ maxSubLayersMinus1 ].
+        m_vps->m_dpbParameters[dpbIdx].m_numReorderPics[j] = m_vps->m_dpbParameters[dpbIdx].m_numReorderPics[m_vps->m_dpbMaxTemporalId[dpbIdx]];
 
-      // When max_latency_increase_plus1[ i ] is not present for i in the range of 0 to maxSubLayersMinus1 - 1, inclusive, due to subLayerInfoFlag being equal to 0, it is inferred to be equal to max_latency_increase_plus1[ maxSubLayersMinus1 ].
-      m_vps->m_dpbParameters[i].m_maxLatencyIncreasePlus1[j] = m_vps->m_dpbParameters[i].m_maxLatencyIncreasePlus1[m_vps->m_dpbMaxTemporalId[i]];
+        // When max_latency_increase_plus1[ dpbIdx ] is not present for dpbIdx in the range of 0 to maxSubLayersMinus1 - 1, inclusive, due to subLayerInfoFlag being equal to 0, it is inferred to be equal to max_latency_increase_plus1[ maxSubLayersMinus1 ].
+        m_vps->m_dpbParameters[dpbIdx].m_maxLatencyIncreasePlus1[j] = m_vps->m_dpbParameters[dpbIdx].m_maxLatencyIncreasePlus1[m_vps->m_dpbMaxTemporalId[dpbIdx]];
+      }
     }
   }
 }
@@ -1100,7 +1132,9 @@ void EncLib::xInitSPS( SPS& sps )
   cinfo->setNoBcwConstraintFlag(m_bNoBcwConstraintFlag);
   cinfo->setNoIbcConstraintFlag(m_noIbcConstraintFlag);
   cinfo->setNoCiipConstraintFlag(m_bNoCiipConstraintFlag);
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   cinfo->setNoFPelMmvdConstraintFlag(m_noFPelMmvdConstraintFlag);
+#endif
   cinfo->setNoGeoConstraintFlag(m_noGeoConstraintFlag);
   cinfo->setNoLadfConstraintFlag(m_bNoLadfConstraintFlag);
   cinfo->setNoTransformSkipConstraintFlag(m_noTransformSkipConstraintFlag);
@@ -1212,7 +1246,9 @@ void EncLib::xInitSPS( SPS& sps )
   sps.setPLTMode                            ( m_PLTMode);
   sps.setIBCFlag                            ( m_IBCMode);
   sps.setWrapAroundEnabledFlag                      ( m_wrapAround );
+#if !JVET_Q0764_WRAP_AROUND_WITH_RPR
   sps.setWrapAroundOffset                   ( m_wrapAroundOffset );
+#endif
   // ADD_NEW_TOOL : (encoder lib) set tool enabling flags and associated parameters here
   sps.setUseISP                             ( m_ISP );
   sps.setUseLmcs                            ( m_lmcsEnabled );
@@ -1572,6 +1608,31 @@ void EncLib::xInitPPS(PPS &pps, const SPS &sps)
     pps.setSliceChromaQpFlag(m_chromaCbQpOffsetDualTree != 0 || m_chromaCrQpOffsetDualTree != 0 || m_chromaCbCrQpOffsetDualTree != 0);
   }
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  int minCbSizeY = (1 << sps.getLog2MinCodingBlockSize());
+  pps.setWrapAroundEnabledFlag                ( m_wrapAround );
+  if( m_wrapAround )
+  {
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+    pps.setPicWidthMinusWrapAroundOffset      ((pps.getPicWidthInLumaSamples()/minCbSizeY) - (m_wrapAroundOffset / minCbSizeY));
+    pps.setWrapAroundOffset                   (minCbSizeY *(pps.getPicWidthInLumaSamples() / minCbSizeY- pps.getPicWidthMinusWrapAroundOffset()));
+#else
+    pps.setWrapAroundOffsetMinusCtbSize       ( (m_wrapAroundOffset / minCbSizeY) - 2 - (sps.getCTUSize() / minCbSizeY) );
+    pps.setWrapAroundOffset                   ( minCbSizeY * (pps.getWrapAroundOffsetMinusCtbSize() + 2 + sps.getCTUSize() / minCbSizeY) );
+#endif
+  }
+  else 
+  {
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+    pps.setPicWidthMinusWrapAroundOffset      ( 0 );
+#else
+    pps.setWrapAroundOffsetMinusCtbSize       ( 0 );
+#endif
+    pps.setWrapAroundOffset                   ( 0 );       
+  }
+  CHECK( !sps.getWrapAroundEnabledFlag() && pps.getWrapAroundEnabledFlag(), "When sps_ref_wraparound_enabled_flag is equal to 0, the value of pps_ref_wraparound_enabled_flag shall be equal to 0.");
+  CHECK( (((sps.getCTUSize() / minCbSizeY) + 1) > ((pps.getPicWidthInLumaSamples() / minCbSizeY) - 1)) && pps.getWrapAroundEnabledFlag(), "When the value of CtbSizeY / MinCbSizeY + 1 is greater than pic_width_in_luma_samples / MinCbSizeY - 1, the value of pps_ref_wraparound_enabled_flag shall be equal to 0.");
+#endif
 
   pps.setNoPicPartitionFlag( m_noPicPartitionFlag );
   if( m_noPicPartitionFlag == false )
diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp
index 7940ab788ad7ec8bf086ca90011d0e405d34a468..fa8fc9e99d1efd7b7a833ad4f84530abf2885a1c 100644
--- a/source/Lib/EncoderLib/InterSearch.cpp
+++ b/source/Lib/EncoderLib/InterSearch.cpp
@@ -1881,8 +1881,14 @@ bool InterSearch::xRectHashInterEstimation(PredictionUnit& pu, RefPicList& bestR
           currAMVPInfo4Pel.mvCand[mvpIdxTemp].changePrecision(MV_PRECISION_INTERNAL, MV_PRECISION_QUARTER);
         }
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+        bool wrap = pu.cu->slice->getRefPic(eRefPicList, refIdx)->isWrapAroundEnabled( pu.cs->pps );
+        const Pel* refBufStart = pu.cu->slice->getRefPic(eRefPicList, refIdx)->getRecoBuf(wrap).get(COMPONENT_Y).buf;
+        const int refStride = pu.cu->slice->getRefPic(eRefPicList, refIdx)->getRecoBuf(wrap).get(COMPONENT_Y).stride;
+#else
         const Pel* refBufStart = pu.cu->slice->getRefPic(eRefPicList, refIdx)->getRecoBuf(pu.cs->sps->getWrapAroundEnabledFlag()).get(COMPONENT_Y).buf;
         const int refStride = pu.cu->slice->getRefPic(eRefPicList, refIdx)->getRecoBuf(pu.cs->sps->getWrapAroundEnabledFlag()).get(COMPONENT_Y).stride;
+#endif
         m_cDistParam.cur.stride = refStride;
 
         m_pcRdCost->selectMotionLambda( );
@@ -2079,8 +2085,14 @@ bool InterSearch::xHashInterEstimation(PredictionUnit& pu, RefPicList& bestRefPi
           currAMVPInfo4Pel.mvCand[mvpIdxTemp].changePrecision(MV_PRECISION_INTERNAL, MV_PRECISION_QUARTER);
         }
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+        bool wrap = pu.cu->slice->getRefPic(eRefPicList, refIdx)->isWrapAroundEnabled( pu.cs->pps );
+        const Pel* refBufStart = pu.cu->slice->getRefPic(eRefPicList, refIdx)->getRecoBuf(wrap).get(COMPONENT_Y).buf;
+        const int refStride = pu.cu->slice->getRefPic(eRefPicList, refIdx)->getRecoBuf(wrap).get(COMPONENT_Y).stride;
+#else
         const Pel* refBufStart = pu.cu->slice->getRefPic(eRefPicList, refIdx)->getRecoBuf(pu.cs->sps->getWrapAroundEnabledFlag()).get(COMPONENT_Y).buf;
         const int refStride = pu.cu->slice->getRefPic(eRefPicList, refIdx)->getRecoBuf(pu.cs->sps->getWrapAroundEnabledFlag()).get(COMPONENT_Y).stride;
+#endif
 
         m_cDistParam.cur.stride = refStride;
 
@@ -3328,7 +3340,12 @@ void InterSearch::xMotionEstimation(PredictionUnit& pu, PelUnitBuf& origBuf, Ref
 
   m_lumaClpRng = pu.cs->slice->clpRng( COMPONENT_Y );
 
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  bool wrap =  pu.cu->slice->getRefPic(eRefPicList, iRefIdxPred)->isWrapAroundEnabled( pu.cs->pps );
+  CPelBuf buf = pu.cu->slice->getRefPic(eRefPicList, iRefIdxPred)->getRecoBuf(pu.blocks[COMPONENT_Y], wrap);
+#else
   CPelBuf buf = pu.cu->slice->getRefPic(eRefPicList, iRefIdxPred)->getRecoBuf(pu.blocks[COMPONENT_Y], pu.cs->sps->getWrapAroundEnabledFlag());
+#endif
 
   IntTZSearchStruct cStruct;
   cStruct.pcPatternKey  = pcPatternKey;
@@ -7780,7 +7797,11 @@ void InterSearch::xClipMv( Mv& rcMv, const Position& pos, const struct Size& siz
     verMax = ((curSubPic.getSubPicBottom() + 1) + offset -  (int)pos.y - 1) << mvShift;
     verMin = (-(int)sps.getMaxCUHeight() - offset - ((int)pos.y - curSubPic.getSubPicTop()) + 1) << mvShift;
   }
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  if( pps.getWrapAroundEnabledFlag() )
+#else
   if( sps.getWrapAroundEnabledFlag() )
+#endif
   {
     int horMax = ( pps.getPicWidthInLumaSamples() + sps.getMaxCUWidth() - size.width + offset - (int)pos.x - 1 ) << mvShift;
     int horMin = ( -( int ) sps.getMaxCUWidth()                                      - offset - ( int ) pos.x + 1 ) << mvShift;
diff --git a/source/Lib/EncoderLib/NALwrite.cpp b/source/Lib/EncoderLib/NALwrite.cpp
index 4764029a595e9daa55484faec86163de40b055cd..49cc9aa6d4588e0454071e88a65cb0df21633606 100644
--- a/source/Lib/EncoderLib/NALwrite.cpp
+++ b/source/Lib/EncoderLib/NALwrite.cpp
@@ -60,13 +60,13 @@ OutputBitstream bsNALUHeader;
 
   out.write(reinterpret_cast<const char*>(bsNALUHeader.getByteStream()), bsNALUHeader.getByteStreamLength());
 }
+
 /**
  * write nalu to bytestream out, performing RBSP anti startcode
  * emulation as required.  nalu.m_RBSPayload must be byte aligned.
  */
-void write(ostream& out, OutputNALUnit& nalu)
+void writeNaluContent(ostream& out, OutputNALUnit& nalu)
 {
-  writeNalUnitHeader(out, nalu);
   /* write out rsbp_byte's, inserting any required
    * emulation_prevention_three_byte's */
   /* 7.4.1 ...
@@ -125,4 +125,10 @@ void write(ostream& out, OutputNALUnit& nalu)
   out.write(reinterpret_cast<const char*>(&(*outputBuffer.begin())), outputAmount);
 }
 
+void writeNaluWithHeader(ostream& out, OutputNALUnit& nalu)
+{
+  writeNalUnitHeader(out, nalu);
+  writeNaluContent(out, nalu);
+}
+
 //! \}
diff --git a/source/Lib/EncoderLib/NALwrite.h b/source/Lib/EncoderLib/NALwrite.h
index 34a787d4064aca797b52f4be8289fdaa199a9ab3..d7024292673f9c47c4e429cbc386098d705dc9cc 100644
--- a/source/Lib/EncoderLib/NALwrite.h
+++ b/source/Lib/EncoderLib/NALwrite.h
@@ -75,12 +75,13 @@ struct OutputNALUnit : public NALUnit
   OutputBitstream m_Bitstream;
 };
 
-void write(std::ostream& out, OutputNALUnit& nalu);
+void writeNaluWithHeader(std::ostream& out, OutputNALUnit& nalu);
+void writeNaluContent(std::ostream& out, OutputNALUnit& nalu);
 
 inline NALUnitEBSP::NALUnitEBSP(OutputNALUnit& nalu)
   : NALUnit(nalu)
 {
-  write(m_nalUnitData, nalu);
+  writeNaluWithHeader(m_nalUnitData, nalu);
 }
 
 //! \}
diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp
index cd9d018061664191efbcfa771286445ede4892b9..07013ea25eb21e67b1b3da8e88374ae3056ee07c 100644
--- a/source/Lib/EncoderLib/SEIEncoder.cpp
+++ b/source/Lib/EncoderLib/SEIEncoder.cpp
@@ -393,27 +393,27 @@ void SEIEncoder::initSEIScalableNesting(SEIScalableNesting *scalableNestingSEI,
 {
   CHECK(!(m_isInitialized), "Unspecified error");
   CHECK(!(scalableNestingSEI != NULL), "Unspecified error");
-  scalableNestingSEI->m_nestingOlsFlag = 1;         // by If the nested SEI messages are picture buffering SEI messages, picture timing SEI messages or sub-picture timing SEI messages, nesting_ols_flag shall be equal to 1, by default case
-  scalableNestingSEI->m_nestingNumOlssMinus1 =  1;  // by default the nesting scalable SEI message applies to two OLSs.
-  for (int i = 0; i <= scalableNestingSEI->m_nestingNumOlssMinus1; i++)
+  scalableNestingSEI->m_snOlsFlag = 1;         // by If the nested SEI messages are picture buffering SEI messages, picture timing SEI messages or sub-picture timing SEI messages, nesting_ols_flag shall be equal to 1, by default case
+  scalableNestingSEI->m_snNumOlssMinus1 =  1;  // by default the nesting scalable SEI message applies to two OLSs.
+  for (int i = 0; i <= scalableNestingSEI->m_snNumOlssMinus1; i++)
   {
-    scalableNestingSEI->m_nestingOlsIdxDeltaMinus1[i] = 0; // first ols to which nesting SEI applies is
+    scalableNestingSEI->m_snOlsIdxDeltaMinus1[i] = 0; // first ols to which nesting SEI applies is
   }
-  for (int i = 0; i <= scalableNestingSEI->m_nestingNumOlssMinus1; i++)
+  for (int i = 0; i <= scalableNestingSEI->m_snNumOlssMinus1; i++)
   {
     if (i == 0)
     {
-      scalableNestingSEI->m_nestingOlsIdx[i] = scalableNestingSEI->m_nestingOlsIdxDeltaMinus1[i];
+      scalableNestingSEI->m_snOlsIdx[i] = scalableNestingSEI->m_snOlsIdxDeltaMinus1[i];
     }
     else
     {
-      scalableNestingSEI->m_nestingOlsIdx[i] = scalableNestingSEI->m_nestingOlsIdxDeltaMinus1[i] + scalableNestingSEI->m_nestingOlsIdxDeltaMinus1[i - 1] + 1;
+      scalableNestingSEI->m_snOlsIdx[i] = scalableNestingSEI->m_snOlsIdxDeltaMinus1[i] + scalableNestingSEI->m_snOlsIdxDeltaMinus1[i - 1] + 1;
     }
   }
 
-  scalableNestingSEI->m_nestingAllLayersFlag = 1; // nesting is not applied to all layers
-  scalableNestingSEI->m_nestingNumLayersMinus1 = 2 - 1;  //nesting_num_layers_minus1
-  scalableNestingSEI->m_nestingLayerId[0] = 0;
+  scalableNestingSEI->m_snAllLayersFlag = 1; // nesting is not applied to all layers
+  scalableNestingSEI->m_snNumLayersMinus1 = 2 - 1;  //nesting_num_layers_minus1
+  scalableNestingSEI->m_snLayerId[0] = 0;
 
   scalableNestingSEI->m_nestedSEIs.clear();
   for (SEIMessages::iterator it = nestedSEIs.begin(); it != nestedSEIs.end(); it++)
diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp
index 09ae4a7696d49394101f92ef2f40137abb2a3a9f..2160886524c39252c3198ea84d4bbcc70a67db4e 100644
--- a/source/Lib/EncoderLib/SEIwrite.cpp
+++ b/source/Lib/EncoderLib/SEIwrite.cpp
@@ -435,27 +435,34 @@ void SEIWriter::xWriteSEIPictureTiming(const SEIPictureTiming& sei, const SEIBuf
   if( bp.m_bpDecodingUnitHrdParamsPresentFlag && bp.m_decodingUnitCpbParamsInPicTimingSeiFlag )
   {
     WRITE_UVLC( sei.m_numDecodingUnitsMinus1, "num_decoding_units_minus1" );
-    WRITE_FLAG( sei.m_duCommonCpbRemovalDelayFlag, "du_commmon_cpb_removal_delay_flag" );
-    if( sei.m_duCommonCpbRemovalDelayFlag )
+#if JVET_R0103_DU_SIGNALLING
+    if (sei.m_numDecodingUnitsMinus1 > 0)
     {
-      for( int i = temporalId; i < bp.m_bpMaxSubLayers - 1; i ++ )
+#endif
+      WRITE_FLAG( sei.m_duCommonCpbRemovalDelayFlag, "du_commmon_cpb_removal_delay_flag" );
+      if( sei.m_duCommonCpbRemovalDelayFlag )
       {
-        if( sei.m_ptSubLayerDelaysPresentFlag[i] )
-          WRITE_CODE( sei.m_duCommonCpbRemovalDelayMinus1[i], bp.m_duCpbRemovalDelayIncrementLength, "du_common_cpb_removal_delay_increment_minus1[i]" );
+        for( int i = temporalId; i < bp.m_bpMaxSubLayers - 1; i ++ )
+        {
+          if( sei.m_ptSubLayerDelaysPresentFlag[i] )
+            WRITE_CODE( sei.m_duCommonCpbRemovalDelayMinus1[i], bp.m_duCpbRemovalDelayIncrementLength, "du_common_cpb_removal_delay_increment_minus1[i]" );
+        }
       }
-    }
-    for( int i = 0; i <= sei.m_numDecodingUnitsMinus1; i ++ )
-    {
-      WRITE_UVLC( sei.m_numNalusInDuMinus1[i], "num_nalus_in_du_minus1[i]" );
-      if( !sei.m_duCommonCpbRemovalDelayFlag && i < sei.m_numDecodingUnitsMinus1 )
+      for( int i = 0; i <= sei.m_numDecodingUnitsMinus1; i ++ )
       {
-        for( int j = temporalId; j < bp.m_bpMaxSubLayers - 1; j ++ )
+        WRITE_UVLC( sei.m_numNalusInDuMinus1[i], "num_nalus_in_du_minus1[i]" );
+        if( !sei.m_duCommonCpbRemovalDelayFlag && i < sei.m_numDecodingUnitsMinus1 )
         {
-          if( sei.m_ptSubLayerDelaysPresentFlag[j] )
-            WRITE_CODE( sei.m_duCpbRemovalDelayMinus1[i * bp.m_bpMaxSubLayers + j], bp.m_duCpbRemovalDelayIncrementLength, "du_cpb_removal_delay_increment_minus1[i][j]" );
+          for( int j = temporalId; j < bp.m_bpMaxSubLayers - 1; j ++ )
+          {
+            if( sei.m_ptSubLayerDelaysPresentFlag[j] )
+              WRITE_CODE( sei.m_duCpbRemovalDelayMinus1[i * bp.m_bpMaxSubLayers + j], bp.m_duCpbRemovalDelayIncrementLength, "du_cpb_removal_delay_increment_minus1[i][j]" );
+          }
         }
       }
+#if JVET_R0103_DU_SIGNALLING
     }
+#endif
   }
   WRITE_UVLC( sei.m_ptDisplayElementalPeriodsMinus1,          "pt_display_elemental_periods_minus1" );
 }
@@ -492,24 +499,24 @@ void SEIWriter::xWriteSEIDependentRAPIndication(const SEIDependentRAPIndication&
 
 void SEIWriter::xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableNesting& sei, const SPS *sps)
 {
-  WRITE_FLAG(sei.m_nestingOlsFlag, "nesting_ols_flag");
-  if (sei.m_nestingOlsFlag)
+  WRITE_FLAG(sei.m_snOlsFlag, "sn_ols_flag");
+  if (sei.m_snOlsFlag)
   {
-    WRITE_UVLC(sei.m_nestingNumOlssMinus1, "nesting_num_olss_minus1");
-    for (uint32_t i = 0; i <= sei.m_nestingNumOlssMinus1; i++)
+    WRITE_UVLC(sei.m_snNumOlssMinus1, "sn_num_olss_minus1");
+    for (uint32_t i = 0; i <= sei.m_snNumOlssMinus1; i++)
     {
-      WRITE_UVLC(sei.m_nestingOlsIdxDeltaMinus1[i], "nesting_ols_idx_delta_minus1[i]");
+      WRITE_UVLC(sei.m_snOlsIdxDeltaMinus1[i], "sn_ols_idx_delta_minus1[i]");
     }
   }
   else
   {
-    WRITE_FLAG(sei.m_nestingAllLayersFlag, "nesting_all_layers_flag");
-    if (!sei.m_nestingAllLayersFlag)
+    WRITE_FLAG(sei.m_snAllLayersFlag, "sn_all_layers_flag");
+    if (!sei.m_snAllLayersFlag)
     {
-      WRITE_UVLC(sei.m_nestingNumLayersMinus1, "nesting_num_layers");
-      for (uint32_t i = 0; i <= sei.m_nestingNumLayersMinus1; i++)
+      WRITE_UVLC(sei.m_snNumLayersMinus1, "sn_num_layers");
+      for (uint32_t i = 0; i <= sei.m_snNumLayersMinus1; i++)
       {
-        WRITE_CODE(sei.m_nestingLayerId[i], 6, "nesting_layer_id");
+        WRITE_CODE(sei.m_snLayerId[i], 6, "sn_layer_id");
       }
     }
   }
@@ -517,7 +524,7 @@ void SEIWriter::xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableN
   // byte alignment
   while (m_pcBitIf->getNumberOfWrittenBits() % 8 != 0)
   {
-    WRITE_FLAG(0, "nesting_zero_bit");
+    WRITE_FLAG(0, "sn_zero_bit");
   }
 
   // write nested SEI messages
@@ -730,8 +737,11 @@ void SEIWriter::xWriteSEISubpictureLevelInfo(const SEISubpicureLevelInfo &sei)
   {
     CHECK(sei.m_numRefLevels != (int)sei.m_refLevelFraction.size(), "SEISubpicureLevelInfo: numRefLevels must be equal to the number of fractions");
   }
-  WRITE_CODE( (uint32_t)sei.m_numRefLevels - 1, 3,                            "num_ref_levels_minus1");
-  WRITE_FLAG(           sei.m_explicitFractionPresentFlag,                    "explicit_fraction_present_flag");
+  WRITE_CODE( (uint32_t)sei.m_numRefLevels - 1, 3,                            "sli_num_ref_levels_minus1");
+#if JVET_Q0404_CBR_SUBPIC
+  WRITE_FLAG(           sei.m_cbrConstraintFlag,                              "sli_cbr_constraint_flag");
+#endif
+  WRITE_FLAG(           sei.m_explicitFractionPresentFlag,                    "sli_explicit_fraction_present_flag");
   if (sei.m_explicitFractionPresentFlag)
   {
     WRITE_UVLC(         sei.m_numSubpics -1 ,                                 "sli_num_subpics_minus1");
@@ -743,13 +753,13 @@ void SEIWriter::xWriteSEISubpictureLevelInfo(const SEISubpicureLevelInfo &sei)
 
   for (int i=0; i<sei.m_numRefLevels; i++)
   {
-    WRITE_CODE( (uint32_t)sei.m_refLevelIdc[i], 8,                            "ref_level_idc[i]");
+    WRITE_CODE( (uint32_t)sei.m_refLevelIdc[i], 8,                            "sli_ref_level_idc[i]");
     if (sei.m_explicitFractionPresentFlag)
     {
       CHECK(sei.m_numSubpics != (int)sei.m_refLevelFraction[i].size(),        "SEISubpicureLevelInfo: number of fractions differs from number of subpictures");
       for (int j = 0; j < sei.m_numSubpics; j++)
       {
-        WRITE_CODE( (uint32_t)sei.m_refLevelFraction[i][j], 8,                "ref_level_fraction_minus1[i][j]");
+        WRITE_CODE( (uint32_t)sei.m_refLevelFraction[i][j], 8,                "sli_ref_level_fraction_minus1[i][j]");
       }
     }
   }
diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp
index 3a45096470f0832b91d9728e0c0907aa515a7318..96e0d4a95c2097f78c66362e93889febb14c2ff8 100644
--- a/source/Lib/EncoderLib/VLCWriter.cpp
+++ b/source/Lib/EncoderLib/VLCWriter.cpp
@@ -366,10 +366,25 @@ void HLSWriter::codePPS( const PPS* pcPPS )
       for( int i = 0; i < pcPPS->getNumSlicesInPic()-1; i++ )
       {
         // complete tiles within a single slice
+#if JVET_R0188
+        if( ( pcPPS->getSliceTileIdx( i ) % pcPPS->getNumTileColumns() ) != pcPPS->getNumTileColumns() - 1 )
+        {
+          WRITE_UVLC( pcPPS->getSliceWidthInTiles( i ) - 1, "slice_width_in_tiles_minus1[i]" );
+        }
+#else
         if( pcPPS->getNumTileColumns() > 1 )
         {
-        WRITE_UVLC( pcPPS->getSliceWidthInTiles( i ) - 1,  "slice_width_in_tiles_minus1[i]" );
+          WRITE_UVLC( pcPPS->getSliceWidthInTiles( i ) - 1,  "slice_width_in_tiles_minus1[i]" );
+        }
+#endif
+
+#if JVET_R0188
+        if( pcPPS->getSliceTileIdx( i ) / pcPPS->getNumTileColumns() != pcPPS->getNumTileRows() - 1 &&
+          ( pcPPS->getTileIdxDeltaPresentFlag() || pcPPS->getSliceTileIdx( i ) % pcPPS->getNumTileColumns() == 0 ) )
+        {
+           WRITE_UVLC( pcPPS->getSliceHeightInTiles( i ) - 1, "slice_height_in_tiles_minus1[i]" );
         }
+#else
         if( pcPPS->getTileIdxDeltaPresentFlag() || ( (pcPPS->getSliceTileIdx( i ) % pcPPS->getNumTileColumns()) == 0 ) )
         {
           if( pcPPS->getNumTileRows() > 1 )
@@ -377,6 +392,7 @@ void HLSWriter::codePPS( const PPS* pcPPS )
            WRITE_UVLC( pcPPS->getSliceHeightInTiles( i ) - 1, "slice_height_in_tiles_minus1[i]" );
           }
         }
+#endif
 
         // multiple slices within a single tile special case
         if( pcPPS->getSliceWidthInTiles(i) == 1 && pcPPS->getSliceHeightInTiles(i) == 1 && pcPPS->getTileRowHeight(pcPPS->getSliceTileIdx(i) / pcPPS->getNumTileColumns()) > 1 )
@@ -521,6 +537,17 @@ void HLSWriter::codePPS( const PPS* pcPPS )
   }
   WRITE_FLAG(pcPPS->getQpDeltaInfoInPhFlag() ? 1 : 0, "qp_delta_info_in_ph_flag");
 #endif
+#if JVET_Q0764_WRAP_AROUND_WITH_RPR
+  WRITE_FLAG( pcPPS->getWrapAroundEnabledFlag() ? 1 : 0, "pps_ref_wraparound_enabled_flag" );
+  if( pcPPS->getWrapAroundEnabledFlag() )
+  {
+#if JVET_R0162_WRAPAROUND_OFFSET_SIGNALING
+    WRITE_UVLC(pcPPS->getPicWidthMinusWrapAroundOffset(), "pps_pic_width_minus_wraparound_offset");
+#else
+    WRITE_UVLC( pcPPS->getWrapAroundOffsetMinusCtbSize(), "pps_ref_wraparound_offset");
+#endif
+  }
+#endif
 
   WRITE_FLAG( pcPPS->getPictureHeaderExtensionPresentFlag() ? 1 : 0, "picture_header_extension_present_flag");
   WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_header_extension_present_flag");
@@ -1080,10 +1107,12 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
   }
 
   WRITE_FLAG( pcSPS->getWrapAroundEnabledFlag() ? 1 : 0,                              "sps_ref_wraparound_enabled_flag" );
+#if !JVET_Q0764_WRAP_AROUND_WITH_RPR
   if( pcSPS->getWrapAroundEnabledFlag() )
   {
     WRITE_UVLC((pcSPS->getWrapAroundOffset() / (1 << pcSPS->getLog2MinCodingBlockSize())) - 2 - pcSPS->getCTUSize()/(1<<pcSPS->getLog2MinCodingBlockSize()), "sps_ref_wraparound_offset");
   }
+#endif
 
   WRITE_FLAG( pcSPS->getSPSTemporalMVPEnabledFlag()  ? 1 : 0,                        "sps_temporal_mvp_enabled_flag" );
 
@@ -1106,6 +1135,12 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
     WRITE_FLAG(pcSPS->getDmvrControlPresentFlag() ? 1 : 0,                            "sps_dmvr_pic_present_flag");
   }
   WRITE_FLAG(pcSPS->getUseMMVD() ? 1 : 0,                                             "sps_mmvd_enabled_flag");
+#if JVET_R0214_MMVD_SYNTAX_MODIFICATION
+  if (pcSPS->getUseMMVD())
+  {
+    WRITE_FLAG(pcSPS->getFpelMmvdEnabledFlag() ? 1 : 0,                               "sps_mmvd_fullpel_only_flag");
+  }
+#endif
   WRITE_FLAG( pcSPS->getUseISP() ? 1 : 0,                                             "sps_isp_enabled_flag");
   WRITE_FLAG( pcSPS->getUseMRL() ? 1 : 0,                                             "sps_mrl_enabled_flag");
   WRITE_FLAG( pcSPS->getUseMIP() ? 1 : 0,                                             "sps_mip_enabled_flag");
@@ -1170,12 +1205,12 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
   }
   // KJS: sps_ciip_enabled_flag
   WRITE_FLAG( pcSPS->getUseCiip() ? 1 : 0,                                                  "sps_ciip_enabled_flag" );
-
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   if ( pcSPS->getUseMMVD() )
   {
     WRITE_FLAG( pcSPS->getFpelMmvdEnabledFlag() ? 1 : 0,                            "sps_fpel_mmvd_enabled_flag" );
   }
-
+#endif
   if (pcSPS->getMaxNumMergeCand() >= 2)
   {
     WRITE_FLAG(pcSPS->getUseGeo() ? 1 : 0, "sps_gpm_enabled_flag");
@@ -1338,10 +1373,14 @@ void HLSWriter::codeDCI(const DCI* dci)
 #if ENABLE_TRACING
   xTraceDCIHeader();
 #endif
+#if JVET_R0108_DCI_SIGNALING
+  WRITE_CODE(0, 4, "dci_reserved_zero_4bits");
+#else
   WRITE_CODE(dci->getMaxSubLayersMinus1(), 3, "dci_max_sub_layers_minus1");
   WRITE_CODE(0, 1, "dci_reserved_zero_bit");
+#endif
   uint32_t numPTLs = (uint32_t)dci->getNumPTLs();
-  CHECK(numPTLs < 1, "At least one PTL must be available in DCI");
+  CHECK( (numPTLs < 1) || ( numPTLs > 15), "dci_num_plts_minus1 shall be in the range of 0 - 14");
 
   WRITE_CODE(numPTLs - 1, 4, "dci_num_ptls_minus1");
 
@@ -1416,7 +1455,11 @@ void HLSWriter::codeVPS(const VPS* pcVPS)
   {
     if(i > 0)
       WRITE_FLAG(pcVPS->getPtPresentFlag(i), "pt_present_flag");
+#if JVET_R0107_VPS_SIGNALING
+    if (!pcVPS->getAllLayersSameNumSublayersFlag())
+#else
     if(pcVPS->getMaxSubLayers() > 1 && !pcVPS->getAllLayersSameNumSublayersFlag())
+#endif
       WRITE_CODE(pcVPS->getPtlMaxTemporalId(i) ,3, "ptl_max_temporal_id");
   }
   int cnt = 0;
@@ -1452,6 +1495,16 @@ void HLSWriter::codeVPS(const VPS* pcVPS)
 
   for( int i = 0; i < pcVPS->m_numDpbParams; i++ )
   {
+#if JVET_R0107_VPS_SIGNALING
+    if (!pcVPS->getAllLayersSameNumSublayersFlag())
+    {
+      WRITE_CODE(pcVPS->m_dpbMaxTemporalId[i], 3, "dpb_max_temporal_id[i]");
+    }
+    else
+    {
+      CHECK(pcVPS->m_dpbMaxTemporalId[i] != pcVPS->getMaxSubLayers() - 1, "When vps_all_layers_same_num_sublayers_flag is equal to 1, the value of dpb_max_temporal_id[ i ] is inferred to be equal to vps_max_sublayers_minus1");
+    }
+#else
     if( pcVPS->getMaxSubLayers() == 1 )
     {
       CHECK( pcVPS->m_dpbMaxTemporalId[i] != 0, "When vps_max_sublayers_minus1 is equal to 0, the value of dpb_max_temporal_id[ i ] is inferred to be equal to 0" );
@@ -1467,6 +1520,7 @@ void HLSWriter::codeVPS(const VPS* pcVPS)
         WRITE_CODE( pcVPS->m_dpbMaxTemporalId[i], 3, "dpb_max_temporal_id[i]" );
       }
     }
+#endif
 
     for( int j = ( pcVPS->m_sublayerDpbParamsPresentFlag ? 0 : pcVPS->m_dpbMaxTemporalId[i] ); j <= pcVPS->m_dpbMaxTemporalId[i]; j++ )
     {
@@ -1476,17 +1530,28 @@ void HLSWriter::codeVPS(const VPS* pcVPS)
     }
   }
 
+#if JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING
+  for( int i = 1; i < pcVPS->m_numMultiLayeredOlss; i++) 
+  {
+#else
   for( int i = 0; i < pcVPS->getTotalNumOLSs(); i++ )
   {
     if( pcVPS->m_numLayersInOls[i] > 1 )
     {
+#endif
       WRITE_UVLC( pcVPS->getOlsDpbPicSize( i ).width, "ols_dpb_pic_width[i]" );
       WRITE_UVLC( pcVPS->getOlsDpbPicSize( i ).height, "ols_dpb_pic_height[i]" );
+#if JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING
+      if( (pcVPS->m_numDpbParams > 1) && (pcVPS->m_numDpbParams != pcVPS->m_numMultiLayeredOlss) )
+#else
       if( pcVPS->m_numDpbParams > 1 )
+#endif
       {
         WRITE_UVLC( pcVPS->getOlsDpbParamsIdx( i ), "ols_dpb_params_idx[i]" );
       }
+#if !JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING
     }
+#endif
   }
   if (!pcVPS->getEachLayerIsAnOlsFlag())
   {
@@ -1502,13 +1567,26 @@ void HLSWriter::codeVPS(const VPS* pcVPS)
     WRITE_UVLC(pcVPS->getNumOlsHrdParamsMinus1(), "num_ols_hrd_params_minus1");
     for (int i = 0; i <= pcVPS->getNumOlsHrdParamsMinus1(); i++)
     {
+#if JVET_R0107_VPS_SIGNALING
+      if (!pcVPS->getAllLayersSameNumSublayersFlag())
+#else
       if (((pcVPS->getMaxSubLayers()-1) > 0) && (!pcVPS->getAllLayersSameNumSublayersFlag()))
+#endif
       {
         WRITE_CODE(pcVPS->getHrdMaxTid(i), 3, "hrd_max_tid[i]");
       }
       uint32_t firstSublayer = pcVPS->getVPSSublayerCpbParamsPresentFlag() ? 0 : pcVPS->getHrdMaxTid(i);
       codeOlsHrdParameters(pcVPS->getGeneralHrdParameters(), pcVPS->getOlsHrdParameters(i),firstSublayer, pcVPS->getHrdMaxTid(i));
     }
+#if JVET_R0099_DPB_HRD_PARAMETERS_SIGNALLING
+    if ((pcVPS->getNumOlsHrdParamsMinus1() > 0) && ((pcVPS->getNumOlsHrdParamsMinus1() + 1) != pcVPS->m_numMultiLayeredOlss))
+    {
+      for (int i = 0; i < pcVPS->m_numMultiLayeredOlss; i++)
+      {
+        WRITE_UVLC(pcVPS->getOlsHrdIdx(i), "ols_hrd_idx[i]");
+      }
+    }
+#else
     if (((pcVPS->getNumOlsHrdParamsMinus1() + 1)!= pcVPS->getTotalNumOLSs()) && (pcVPS->getNumOlsHrdParamsMinus1() > 0))
     {
       for (int i=1; i < pcVPS->getTotalNumOLSs();i++)
@@ -1519,6 +1597,7 @@ void HLSWriter::codeVPS(const VPS* pcVPS)
         }
       }
     }
+#endif
   }
 
   WRITE_FLAG(0, "vps_extension_flag");
@@ -2697,7 +2776,9 @@ void  HLSWriter::codeConstraintInfo  ( const ConstraintInfo* cinfo )
   WRITE_FLAG(cinfo->getNoBcwConstraintFlag() ? 1 : 0, "no_bcw_constraint_flag");
   WRITE_FLAG(cinfo->getNoIbcConstraintFlag() ? 1 : 0, "no_ibc_constraint_flag");
   WRITE_FLAG(cinfo->getNoCiipConstraintFlag() ? 1 : 0, "no_ciip_constraint_flag");
+#if !JVET_R0214_MMVD_SYNTAX_MODIFICATION
   WRITE_FLAG(cinfo->getNoFPelMmvdConstraintFlag() ? 1 : 0, "no_fpel_mmvd_constraint_flag");
+#endif
   WRITE_FLAG(cinfo->getNoGeoConstraintFlag() ? 1 : 0, "no_gpm_constraint_flag");
   WRITE_FLAG(cinfo->getNoLadfConstraintFlag() ? 1 : 0, "no_ladf_constraint_flag");
   WRITE_FLAG(cinfo->getNoTransformSkipConstraintFlag() ? 1 : 0, "no_transform_skip_constraint_flag");