Index: branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 41)
+++ branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 42)
@@ -2191,3 +2191,46 @@
 }
 #endif
+
+#if SVC_EXTENSION && AVC_SYNTAX
+Void TComSlice::initBaseLayerRPL( TComSlice *pcSlice )
+{
+// Assumed that RPL of the base layer is same to the EL, otherwise this information should be also dumped and read from the metadata file
+  setPOC( pcSlice->getPOC() );
+  if( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA )
+  {
+    setSliceType( I_SLICE );
+  }
+  else
+  {
+    setSliceType( pcSlice->getSliceType() );
+  }
+
+  if( this->isIntra() )
+  {
+    return;
+  }
+
+  //initialize reference POC of BL
+  for( Int iRefPicList = 0; iRefPicList < 2; iRefPicList++ )
+  {
+    RefPicList eRefPicList = RefPicList( iRefPicList );
+
+    assert( pcSlice->getNumRefIdx( eRefPicList) > 0 );
+    setNumRefIdx( eRefPicList, pcSlice->getNumRefIdx( eRefPicList ) - 1 );
+    assert( getNumRefIdx( eRefPicList) <= MAX_NUM_REF);
+
+    for(Int refIdx = 0; refIdx < getNumRefIdx( eRefPicList ); refIdx++) 
+    {
+      setRefPOC( pcSlice->getRefPic( eRefPicList, refIdx )->getPOC(), eRefPicList, refIdx );
+      setRefPic( pcSlice->getRefPic( eRefPicList, refIdx ), eRefPicList, refIdx );
+      getRefPic( eRefPicList, refIdx )->setLayerId( 0 );
+      getRefPic( eRefPicList, refIdx )->setIsLongTerm( pcSlice->getRefPic( eRefPicList, refIdx )->getIsLongTerm() );
+      getRefPic( eRefPicList, refIdx )->setIsUsedAsLongTerm( pcSlice->getRefPic( eRefPicList, refIdx )->getIsUsedAsLongTerm() );
+
+    }
+  }  
+  return;
+}
+#endif
+
 //! \}
Index: branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 41)
+++ branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 42)
@@ -1454,4 +1454,8 @@
   Void        setFullPelBaseRec   ( TComPicYuv* p) { m_pcFullPelBaseRec = p; }
   TComPicYuv* getFullPelBaseRec   ()  { return  m_pcFullPelBaseRec;  }
+
+#if AVC_SYNTAX
+  Void      initBaseLayerRPL( TComSlice *pcSlice );
+#endif
 #endif
 
Index: branches/SHM-1.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
===================================================================
--- branches/SHM-1.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp	(revision 41)
+++ branches/SHM-1.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp	(revision 42)
@@ -227,6 +227,4 @@
 #endif
 
-
-
   assert ( iEWidth == 2*iBWidth || 2*iEWidth == 3*iBWidth );
   assert ( iEHeight == 2*iBHeight || 2*iEHeight == 3*iBHeight );
Index: branches/SHM-1.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-1.1-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 41)
+++ branches/SHM-1.1-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 42)
@@ -561,5 +561,4 @@
   if (m_bFirstSliceInPicture)
   {
-
 #if AVC_BASE
   if( m_layerId == 1 )
@@ -609,16 +608,4 @@
       }
     }
-#if AVC_SYNTAX
-    if( m_apcSlicePilot->getPOC() == 0 )
-    {
-      // initialize partition order.
-      UInt* piTmp = &g_auiZscanToRaster[0];
-      initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
-      initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
-    }
-    pBLPic->getSlice( 0 )->setPOC( m_apcSlicePilot->getPOC() );
-    pBLPic->getSlice( 0 )->setSliceType( m_apcSlicePilot->getSliceType() );
-    pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
-#endif
   }
 #endif
@@ -758,5 +745,5 @@
   {
     pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic);
-#if !REF_IDX_FRAMEWORK
+#if !REF_IDX_FRAMEWORK || AVC_SYNTAX
     // Set reference list
     pcSlice->setRefPicList( m_cListPic );
@@ -768,4 +755,17 @@
 #if AVC_BASE
       pcSlice->setBaseColPic ( *m_ppcTDecTop[0]->getListPic()->begin() );
+#if AVC_SYNTAX
+      TComPic* pBLPic = pcSlice->getBaseColPic();
+      if( pcSlice->getPOC() == 0 )
+      {
+        // initialize partition order.
+        UInt* piTmp = &g_auiZscanToRaster[0];
+        initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
+        initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
+      }      
+      pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
+      pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
+#endif
+
 #else
       TDecTop *pcTDecTop = (TDecTop *)getLayerDec( m_layerId-1 );
@@ -788,6 +788,8 @@
 
 #if REF_IDX_FRAMEWORK
+#if !AVC_SYNTAX
     // Set reference list
     pcSlice->setRefPicList( m_cListPic );
+#endif
     if(m_layerId > 0)
     {
