Index: /branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp	(revision 1503)
@@ -77,5 +77,5 @@
 }
 #if SVC_EXTENSION
-Void TComPic::create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual, const UInt layerId )
+Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual, const UInt layerId )
 {
   const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc();
@@ -89,5 +89,5 @@
   m_layerId = layerId;
 
-  m_picSym.create( vps, sps, pps, uiMaxDepth, layerId );
+  m_picSym.create( sps, pps, uiMaxDepth, layerId );
 
   if (!bIsVirtual)
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComPic.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComPic.h	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComPic.h	(revision 1503)
@@ -102,5 +102,5 @@
 
 #if SVC_EXTENSION
-  Void          create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual /*= false*/, const UInt layerId );
+  Void          create( const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual /*= false*/, const UInt layerId );
 #else
   Void          create( const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual /*= false*/ );
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp	(revision 1503)
@@ -47,8 +47,4 @@
 // ====================================================================================================================
 
-#if SVC_EXTENSION
-TComVPS TComPicSym::m_vps;
-#endif
-
 TComPicSym::TComPicSym()
 :m_frameWidthInCtus(0)
@@ -82,7 +78,6 @@
 
 #if SVC_EXTENSION
-Void TComPicSym::create  ( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId )
-{
-  m_vps = vps;
+Void TComPicSym::create  ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId )
+{
 #else
 Void TComPicSym::create  ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth )
@@ -215,7 +210,4 @@
   m_apSlices.back()->setPPS(&m_pps);
   m_apSlices.back()->setSPS(&m_sps);
-#if SVC_EXTENSION
-  m_apSlices.back()->setVPS(&m_vps);
-#endif
   if (m_apSlices.size()>=2)
   {
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h	(revision 1503)
@@ -121,6 +121,4 @@
   
 #if SVC_EXTENSION
-  // SHM: temporal solution to keep VPS with a picture, ideally it should be picture specific, but currently sizeof(TComVPS) = 86929196
-  static TComVPS m_vps;
 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI
   Int*           m_piTileSetIdxMap;     //the map of the tile set index relative to LCU raster scan address
@@ -132,5 +130,5 @@
 public:
 #if SVC_EXTENSION
-  Void               create  ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId );
+  Void               create  ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId );
 #if CGS_3D_ASYMLUT
   TComPPS*           getPPSToUpdate()                                      { return &m_pps; }
@@ -154,9 +152,5 @@
   const TComPPS&     getPPS()                 const                        { return m_pps; }
 
-#if SVC_EXTENSION
-  TComSlice *        swapSliceObject(TComSlice* p, UInt i)                 { p->setVPS(&m_vps); p->setSPS(&m_sps); p->setPPS(&m_pps); TComSlice *pTmp=m_apSlices[i];m_apSlices[i] = p; pTmp->setVPS(0); pTmp->setSPS(0); pTmp->setPPS(0); return pTmp; }
-#else
   TComSlice *        swapSliceObject(TComSlice* p, UInt i)                 { p->setSPS(&m_sps); p->setPPS(&m_pps); TComSlice *pTmp=m_apSlices[i];m_apSlices[i] = p; pTmp->setSPS(0); pTmp->setPPS(0); return pTmp; }
-#endif
   UInt               getNumAllocatedSlice() const                          { return UInt(m_apSlices.size());       }
   Void               allocateNewSlice();
@@ -194,9 +188,9 @@
     m_pbSkippedTileSetFlag[i]  = skipFlag;
   }
-  Int          getTileSetIdxMap( Int i )                             { return *(m_piTileSetIdxMap + i); }
-  UChar        getTileSetType( Int i )                               { return *(m_pucTileSetType + i); }
+  Int          getTileSetIdxMap( Int i )                             { return *(m_piTileSetIdxMap + i);      }
+  UChar        getTileSetType( Int i )                               { return *(m_pucTileSetType + i);       }
   Bool         getSkippedTileSetFlag( Int i )                        { return *(m_pbSkippedTileSetFlag + i); }
 #endif
-  Void         inferSpsForNonHEVCBL()                                { m_sps.inferSPS(0, &m_vps); }
+  Void         inferSpsForNonHEVCBL(TComVPS *vps)                    { m_sps.inferSPS(0, vps);               }
 #endif //SVC_EXTENSION
 
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1503)
@@ -3620,5 +3620,6 @@
     if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
     {
-      repFormat = vps->getVpsRepFormat(layerId);
+      // infered from vps_rep_format_idx[ 0 ]-th rep_format( ) syntax structure in the active VPS
+      repFormat = vps->getVpsRepFormat(0);
     }
   }
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp	(revision 1503)
@@ -430,5 +430,5 @@
     pcTempPic->setHeight(heightBL << 1);
 #endif
-    pcTempPic->extendPicBorder   (); // extend the border.
+    pcTempPic->extendPicBorder(); // extend the border.
 #if SCALABLE_REXT
     pcTempPic->setHeight(heightEL * chromaVerScalingEL);
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1503)
@@ -275,5 +275,5 @@
     }
 
-    rpcPic->create( vps, sps, pps, true, m_layerId);
+    rpcPic->create( sps, pps, true, m_layerId);
 #else //SVC_EXTENSION
     rpcPic->create ( sps, pps, true);
@@ -324,5 +324,5 @@
   }
 
-  rpcPic->create( vps, sps, pps, true, m_layerId);
+  rpcPic->create( sps, pps, true, m_layerId);
 #else  //SVC_EXTENSION
   rpcPic->create ( sps, pps, true);
@@ -520,9 +520,9 @@
         UInt refLayerId = 0;
 
-        pBLPic->create( *vps, *sps, *pps, true, refLayerId);
+        pBLPic->create( *sps, *pps, true, refLayerId);
 
         // it is needed where the VPS is accessed through the slice
         pBLPic->getSlice(0)->setVPS( vps );
-        pBLPic->getPicSym()->inferSpsForNonHEVCBL();
+        pBLPic->getPicSym()->inferSpsForNonHEVCBL(vps);
         pBLPic->getSlice(0)->setSPS( &pBLPic->getPicSym()->getSPS() );
       }
@@ -2273,5 +2273,5 @@
         m_cIlpPic[j] = new  TComPic;
 
-        m_cIlpPic[j]->create(*vps, *sps, *slice->getPPS(), true, m_layerId);
+        m_cIlpPic[j]->create(*sps, *slice->getPPS(), true, m_layerId);
 
         for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCtusInFrame(); i++)
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncPic.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncPic.cpp	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncPic.cpp	(revision 1503)
@@ -127,5 +127,5 @@
 Void TEncPic::create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxAdaptiveQPDepth, Bool bIsVirtual, const UInt layerId )
 {
-  TComPic::create( vps, sps, pps, bIsVirtual, layerId );
+  TComPic::create( sps, pps, bIsVirtual, layerId );
 #else
 Void TEncPic::create( const TComSPS &sps, const TComPPS &pps, UInt uiMaxAdaptiveQPDepth, Bool bIsVirtual )
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1502)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1503)
@@ -794,5 +794,5 @@
       }
 
-      rpcPic->create( m_cVPS, m_cSPS, m_cPPS, false, m_layerId );
+      rpcPic->create( m_cSPS, m_cPPS, false, m_layerId );
 #else  //SVC_EXTENSION
       rpcPic->create( m_cSPS, m_cPPS, false );
@@ -1687,5 +1687,5 @@
       {
         m_cIlpPic[j] = new TComPic;
-        m_cIlpPic[j]->create(m_cVPS, m_cSPS, m_cPPS, true, m_layerId);
+        m_cIlpPic[j]->create(m_cSPS, m_cPPS, true, m_layerId);
         for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCtusInFrame(); i++)
         {
