Index: branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 704)
+++ branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 705)
@@ -1223,5 +1223,5 @@
         if( i >= m_acLayerCfg[layer].m_numSamplePredRefLayers )
         {
-          printf( "NumSamplePredRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" );
+          printf( "NumSamplePredRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer );
           exit( EXIT_FAILURE );
         }
@@ -1232,5 +1232,5 @@
       if( i < m_acLayerCfg[layer].m_numSamplePredRefLayers )
       {
-        printf( "NumSamplePredRefLayers: The width of some columns is not defined.\n" );
+        printf( "NumSamplePredRefLayers%d: The width of some columns is not defined.\n", layer );
         exit( EXIT_FAILURE );
       }
@@ -1254,5 +1254,5 @@
         if( i >= m_acLayerCfg[layer].m_numMotionPredRefLayers )
         {
-          printf( "NumMotionPredRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" );
+          printf( "NumMotionPredRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer );
           exit( EXIT_FAILURE );
         }
@@ -1263,5 +1263,5 @@
       if( i < m_acLayerCfg[layer].m_numMotionPredRefLayers )
       {
-        printf( "NumMotionPredRefLayers: The width of some columns is not defined.\n" );
+        printf( "NumMotionPredRefLayers%d: The width of some columns is not defined.\n", layer );
         exit( EXIT_FAILURE );
       }
@@ -1293,5 +1293,5 @@
         if( i >= m_acLayerCfg[layer].m_numActiveRefLayers )
         {
-          printf( "NumActiveRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" );
+          printf( "NumActiveRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer );
           exit( EXIT_FAILURE );
         }
@@ -1302,5 +1302,5 @@
       if( i < m_acLayerCfg[layer].m_numActiveRefLayers )
       {
-        printf( "NumActiveRefLayers: The width of some columns is not defined.\n" );
+        printf( "NumActiveRefLayers%d: The width of some columns is not defined.\n", layer );
         exit( EXIT_FAILURE );
       }
Index: branches/SHM-6-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
===================================================================
--- branches/SHM-6-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 704)
+++ branches/SHM-6-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 705)
@@ -171,5 +171,9 @@
   }
 #endif
+#if REPN_FORMAT_IN_VPS
+  printf("Real     Format               : %dx%d %dHz\n", m_iSourceWidth - ( m_confLeft + m_confRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confTop + m_confBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate );
+#else
   printf("Real     Format               : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate );
+#endif
   printf("Internal Format               : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
 #if O0194_DIFFERENT_BITDEPTH_EL_BL
@@ -229,4 +233,7 @@
         m_aiPad[0] = m_confRight  = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;
         m_iSourceWidth  += m_confRight;
+#if REPN_FORMAT_IN_VPS
+        m_confRight /= TComSPS::getWinUnitX( m_chromaFormatIDC );
+#endif
       }
       if (m_iSourceHeight % minCuSize)
@@ -239,4 +246,7 @@
           m_aiPad[1] = m_confBottom << 1;
         }
+#if REPN_FORMAT_IN_VPS
+        m_confBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );
+#endif
       }
       break;
@@ -249,4 +259,8 @@
       m_confRight  = m_aiPad[0];
       m_confBottom = m_aiPad[1];
+#if REPN_FORMAT_IN_VPS
+      m_confRight /= TComSPS::getWinUnitX( m_chromaFormatIDC );
+      m_confBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );
+#endif
       break;
     }
@@ -331,8 +345,10 @@
   xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling");
 
+#if !REPN_FORMAT_IN_VPS
   xConfirmPara( m_confLeft   % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling");
   xConfirmPara( m_confRight  % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling");
   xConfirmPara( m_confTop    % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling");
   xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling");
+#endif
 
 #if LAYER_CTB  
Index: branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 704)
+++ branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 705)
@@ -1326,5 +1326,5 @@
   if(vps->getMaxLayers() > MAX_REF_LAYERS)
   {
-    for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
+    for(UInt layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
     {
       assert( vps->getNumRefLayers(vps->getLayerIdInNuh(layerCtr)) <= MAX_REF_LAYERS);
