Index: /branches/HTM-DEV-0.3-dev2a/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/App/TAppDecoder/TAppDecTop.cpp	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/App/TAppDecoder/TAppDecTop.cpp	(revision 489)
@@ -654,5 +654,5 @@
 #if H_3D
    m_tDecTop[ decIdx ]->setCamParsCollector( &m_cCamParsCollector );
-#if H_3D_ARP
+#if H_3D_ARP && !H_3D_ARP_FIX
     m_tDecTop[ decIdx ]->setTAppDecTop(this);
 #endif
Index: /branches/HTM-DEV-0.3-dev2a/source/App/TAppDecoder/TAppDecTop.h
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/App/TAppDecoder/TAppDecTop.h	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/App/TAppDecoder/TAppDecTop.h	(revision 489)
@@ -91,5 +91,5 @@
   Void  decode            (); ///< main decoding function
  
-#if H_3D_ARP              
+#if H_3D_ARP && !H_3D_ARP_FIX              
 //GT (IVREFS): This is not needed any more. Reference picture can be obtained from m_ivPicLists. Should be fixed later.
   TDecTop* getTDecTop     ( Int layerId )          { return m_tDecTop[layerId]; }
Index: /branches/HTM-DEV-0.3-dev2a/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/App/TAppEncoder/TAppEncTop.cpp	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/App/TAppEncoder/TAppEncTop.cpp	(revision 489)
@@ -621,5 +621,5 @@
   {
     m_acTEncTopList[layer]->init( );
-#if H_3D_ARP
+#if H_3D_ARP && !H_3D_ARP_FIX
     //GT (IVREFS): This is not needed any more. Reference pictures can be obtained from m_ivPicLists. Should be fixed later. 
     m_acTEncTopList[layer]->setTAppEncTop( this );
Index: /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPic.cpp	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPic.cpp	(revision 489)
@@ -556,4 +556,21 @@
   return getPicYuv( layerIdInNuh, poc, recon );
 }
+#if H_3D_ARP_FIX
+TComList<TComPic*>* TComPicLists::getPicList( Int layerIdInNuh )
+{
+  TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin();
+  Int iLayer = 0;
+
+  assert( layerIdInNuh < m_lists.size() );
+
+  while( iLayer != layerIdInNuh )
+  {
+    itL++;
+    iLayer++;
+  }
+
+  return *itL;
+}
+#endif
 #endif // H_3D
 #endif // H_MV
Index: /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPic.h
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPic.h	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPic.h	(revision 489)
@@ -234,4 +234,7 @@
   Void        push_back( TComList<TComPic*>* list ) { m_lists.push_back( list );   }
   Int         size     ()                           { return (Int) m_lists.size(); } 
+#if H_3D_ARP_FIX
+  TComList<TComPic*>*  getPicList   ( Int layerIdInNuh );
+#endif
   TComPic*    getPic   ( Int layerIdInNuh,              Int poc );    
   TComPicYuv* getPicYuv( Int layerIdInNuh,              Int poc, Bool recon ); 
Index: /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TypeDef.h	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TypeDef.h	(revision 489)
@@ -125,4 +125,5 @@
 #if H_3D_ARP
 #define H_3D_ARP_WFNR                     3
+#define H_3D_ARP_FIX                      1   // Fix of using m_ivPicLists to access the reference pictures of other views
 #endif
 
Index: /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.cpp	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.cpp	(revision 489)
@@ -901,6 +901,10 @@
         if( iViewIdx<getViewIndex() && !bIsDepth )
         {
+#if H_3D_ARP_FIX
+          pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );
+#else
           //GT (IVREFS): m_tAppDecTop is not needed any more. Reference pictures can be obtained from m_ivPicLists. Should be fixed later. 
           pcSlice->setBaseViewRefPicList( m_tAppDecTop->getTDecTop(iLayerId)->getListPic(), iViewIdx );
+#endif
         }
       }
Index: /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.h	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.h	(revision 489)
@@ -227,5 +227,5 @@
 #endif
 
-#if H_3D_ARP 
+#if H_3D_ARP && !H_3D_ARP_FIX
   //GT (IVREFS): This is not needed any more. Reference picture can be obtained from m_ivPicLists. Should be fixed later. 
   TAppDecTop*             m_tAppDecTop;
@@ -273,5 +273,5 @@
   Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
 
-#if H_3D_ARP
+#if H_3D_ARP && !H_3D_ARP_FIX
   //GT (IVREFS): This is not needed any more. Reference picture can be obtained from m_ivPicLists. Should be fixed later. 
   Void                    setTAppDecTop( TAppDecTop* pcTAppDecTop ) { m_tAppDecTop = pcTAppDecTop; }
Index: /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 489)
@@ -683,6 +683,10 @@
         if( iViewIdx<getViewIndex() && !bIsDepth )
         {
+#if H_3D_ARP_FIX
+          pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );
+#else
           //GT (IVREFS): m_tAppEncTop is not needed any more. Reference pictures can be obtained from m_ivPicLists. Should be fixed later. 
           pcSlice->setBaseViewRefPicList( m_pcEncTop->getTAppEncTop()->getTEncTop( iLayerId )->getListPic(), iViewIdx );
+#endif
         }
       }
Index: /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncTop.h
===================================================================
--- /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncTop.h	(revision 488)
+++ /branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncTop.h	(revision 489)
@@ -129,5 +129,5 @@
   TEncRateCtrl            m_cRateCtrl;                    ///< Rate control class
 
-#if H_3D_ARP
+#if H_3D_ARP && !H_3D_ARP_FIX
   TAppEncTop*             m_pcTAppEncTop;
 #endif
@@ -213,5 +213,5 @@
   Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
 #endif
-#if H_3D_ARP
+#if H_3D_ARP && !H_3D_ARP_FIX
   //GT (IVREFS): m_tAppDecTop is not needed any more. Reference pictures can be obtained from m_ivPicLists. Should be fixed later. 
   Void            setTAppEncTop( TAppEncTop* pcTAppEncTop ) { m_pcTAppEncTop = pcTAppEncTop; }
