Index: /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 882)
+++ /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 883)
@@ -2166,4 +2166,16 @@
 }
 
+Int TComVPS::getMaxSubLayersInLayerSetMinus1( Int i )
+{
+  Int maxSLMinus1 = 0; 
+  Int optLsIdx    = getLayerSetIdxForOutputLayerSet( i );
+  for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )
+  {
+    Int lId = m_layerSetLayerIdList[optLsIdx][k];
+    maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) ));
+  }
+  return maxSLMinus1;
+}
+
 #endif // H_MV
 
@@ -3832,4 +3844,17 @@
 }
 
+Void TComVPSVUI::inferVpsVui( Bool encoderFlag )
+{
+  // inference of syntax elements that differ from default inference (as done in constructor), when VPS VUI is not present
+  if (!encoderFlag )
+  {
+    setCrossLayerIrapAlignedFlag( false ); 
+  }
+  else
+  {
+    assert( !getCrossLayerIrapAlignedFlag() ); 
+  }
+}
+
 Void TComRepFormat::inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag )
 {
@@ -3896,3 +3921,23 @@
   setMatrixCoefficients     ( videoSignalInfo->getMatrixCoeffsVps           () );
 }
-#endif
+
+TComDpbSize::TComDpbSize()
+{
+  for (Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++ )
+  {      
+    m_subLayerFlagInfoPresentFlag[i]  = false;
+
+    for (Int j = 0; j < MAX_TLAYER; j++  )
+    {        
+      m_subLayerDpbInfoPresentFlag [i][j] = ( j == 0) ;
+      m_maxVpsNumReorderPics       [i][j] = 0;
+      m_maxVpsLatencyIncreasePlus1 [i][j] = 0;
+
+      for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ )
+      {
+        m_maxVpsDecPicBufferingMinus1[i][k][j] = 0; 
+      }
+    }
+  }
+}
+#endif
Index: /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 882)
+++ /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 883)
@@ -587,17 +587,5 @@
   Bool getBaseLayerParameterSetCompatibilityFlag( Int i ) { return m_baseLayerParameterSetCompatibilityFlag[i]; } 
 
-  Void inferVpsVui( Bool encoderFlag )
-  {
-    // inference of syntax elements that differ from default inference (as done in constructor), when VPS VUI is not present
-    if (!encoderFlag )
-    {
-      setCrossLayerIrapAlignedFlag( false ); 
-    }
-    else
-    {
-      assert( !getCrossLayerIrapAlignedFlag() ); 
-    }
-
-  }
+  Void inferVpsVui( Bool encoderFlag );
 };
 
@@ -654,23 +642,5 @@
 
 public: 
-  TComDpbSize( )
-  {
-    for (Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++ )
-    {      
-      m_subLayerFlagInfoPresentFlag[i]  = false;
-
-      for (Int j = 0; j < MAX_TLAYER; j++  )
-      {        
-        m_subLayerDpbInfoPresentFlag [i][j] = ( j == 0) ;
-        m_maxVpsNumReorderPics       [i][j] = 0;
-        m_maxVpsLatencyIncreasePlus1 [i][j] = 0;
-
-        for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ )
-        {
-          m_maxVpsDecPicBufferingMinus1[i][k][j] = 0; 
-        }
-      }
-    }  
-  }  
+  TComDpbSize( );  
 
   Void setSubLayerFlagInfoPresentFlag( Int i, Bool flag ) { m_subLayerFlagInfoPresentFlag[i] = flag; } 
@@ -929,4 +899,5 @@
   Void    setScalabilityMaskFlag( Int scalType, Bool val )                     { m_scalabilityMaskFlag[scalType] = val;  }
   Bool    getScalabilityMaskFlag( Int scalType )                               { return m_scalabilityMaskFlag[scalType]; }
+  
   Int     getNumScalabilityTypes( );
 
@@ -950,15 +921,21 @@
   Void    setViewIdVal( Int viewOrderIndex, Int  val )                     { m_viewIdVal[viewOrderIndex] = val; } 
   Int     getViewIdVal( Int viewOrderIndex )                               { return m_viewIdVal[viewOrderIndex]; } 
+  
   Void    setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val;  }
   Bool    getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps )           { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; }
+  
   Void    setVpsSubLayersMaxMinus1PresentFlag( Bool flag )                 { m_vpsSubLayersMaxMinus1PresentFlag = flag; } 
   Bool    getVpsSubLayersMaxMinus1PresentFlag(  )                          { return m_vpsSubLayersMaxMinus1PresentFlag; } 
+  
   Void    setSubLayersVpsMaxMinus1( Int i, Int  val )                      { m_subLayersVpsMaxMinus1[i] = val; } 
   Int     getSubLayersVpsMaxMinus1( Int i )                                { return m_subLayersVpsMaxMinus1[i]; } 
   Void    checkSubLayersVpsMaxMinus1( Int i )                              { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); }
+
   Void    setMaxTidRefPresentFlag( Bool flag )                             { m_maxTidRefPresentFlag = flag; } 
   Bool    getMaxTidRefPresentFlag(  )                                      { return m_maxTidRefPresentFlag; } 
+
   Void    setMaxTidIlRefPicsPlus1( Int i, Int j, Int  val )                { m_maxTidIlRefPicsPlus1[i][j] = val; } 
   Int     getMaxTidIlRefPicsPlus1( Int i, Int j )                          { return m_maxTidIlRefPicsPlus1[i][j]; } 
+ 
   Void    setAllRefLayersActiveFlag( Bool flag )                           { m_allRefLayersActiveFlag = flag; } 
   Bool    getAllRefLayersActiveFlag(  )                                    { return m_allRefLayersActiveFlag; } 
@@ -1001,4 +978,5 @@
   Void    setRepFormat( Int i, TComRepFormat* val )                        { m_repFormat[i] = val;  }
   TComRepFormat* getRepFormat( Int i )                                     { return m_repFormat[i]; }
+  
   Void    setMaxOneActiveRefLayerFlag( Bool flag)                          { m_maxOneActiveRefLayerFlag = flag; } 
   Bool    getMaxOneActiveRefLayerFlag( )                                   { return m_maxOneActiveRefLayerFlag; } 
@@ -1014,4 +992,5 @@
   Void    setPocLsbNotPresentFlag( Int i, Bool flag )                      { m_pocLsbNotPresentFlag[i] = flag; } 
   Bool    getPocLsbNotPresentFlag( Int i )                                 { return m_pocLsbNotPresentFlag[i]; } 
+  
   Void    setDirectDepTypeLenMinus2( Int val)                              { m_directDepTypeLenMinus2 = val; } 
   Int     getDirectDepTypeLenMinus2( )                                     { return m_directDepTypeLenMinus2; } 
@@ -1022,4 +1001,5 @@
   Void    setDefaultDirectDependencyType( Int  val )                       { m_defaultDirectDependencyType = val; } 
   Int     getDefaultDirectDependencyType(  )                               { return m_defaultDirectDependencyType; } 
+  
   Void    setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 
   Int     getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps)   { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } 
@@ -1067,15 +1047,5 @@
   Int     getOlsHighestOutputLayerId( Int i )                              { return getTargetOptLayerIdList( i ).back(); };  
 
-  Int     getMaxSubLayersInLayerSetMinus1( Int i )
-  { 
-    Int maxSLMinus1 = 0; 
-    Int optLsIdx    = getLayerSetIdxForOutputLayerSet( i );
-    for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )
-    {
-      Int lId = m_layerSetLayerIdList[optLsIdx][k];
-      maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) ));
-    }
-    return maxSLMinus1; 
-  }
+  Int     getMaxSubLayersInLayerSetMinus1( Int i );
 
   // inference
