Index: /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 1170)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 1171)
@@ -598,4 +598,8 @@
   Int i;
 
+#if HHI_RES_PRED_K0052
+  m_pocsInCurrRPSs.clear();
+#endif
+
   for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)
   {
@@ -608,4 +612,7 @@
       NumPocStCurr0++;
       pcRefPic->setCheckLTMSBPresent(false);  
+#if HHI_RES_PRED_K0052
+      m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 
+#endif
     }
   }
@@ -621,4 +628,7 @@
       NumPocStCurr1++;
       pcRefPic->setCheckLTMSBPresent(false);  
+#if HHI_RES_PRED_K0052
+      m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 
+#endif
     }
   }
@@ -633,4 +643,7 @@
       RefPicSetLtCurr[NumPocLtCurr] = pcRefPic;
       NumPocLtCurr++;
+#if HHI_RES_PRED_K0052
+      m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 
+#endif
     }
     if(pcRefPic==NULL) 
@@ -642,4 +655,7 @@
 
   Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 
+#if HHI_RES_PRED_K0052
+  assert( numPocInterCurr == (Int) m_pocsInCurrRPSs.size() ); 
+#endif
   numPocTotalCurr = numPocInterCurr + getNumActiveRefLayerPics( );
   assert( numPocTotalCurr == getNumRpsCurrTempList() );
@@ -3782,7 +3798,24 @@
       {
         Int layerIdInNuh = getRefPicLayerId( i );
+#if HHI_RES_PRED_K0052
+        TComPic* picV = getIvPic( getIsDepth(), getVPS()->getViewIndex( layerIdInNuh ) );
+        assert( picV != NULL ); 
+        std::vector<Int> pocsInCurrRPSsPicV = picV->getSlice(0)->getPocsInCurrRPSs(); 
+        Bool refRpRefAvailFlag = false; 
+        for (Int idx = 0; idx < pocsInCurrRPSsPicV.size(); idx++)
+        {
+          if ( pocsInCurrRPSsPicV[idx] == prevPOC )
+          {
+            refRpRefAvailFlag = true; 
+            break; 
+          }
+        }
+
+        if (getFirstTRefIdx(eRefPicList) >= 0 && refRpRefAvailFlag )
+#else
         Int viewIdx = getVPS()->getViewId( layerIdInNuh );
         TComPic*pcPicPrev = ivPicLists->getPic(viewIdx, 0, prevPOC);
         if (getFirstTRefIdx(eRefPicList) >= 0 && pcPicPrev && pcPicPrev->getSlice( 0 )->isReferenced())
+#endif
         {
           m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = true;
Index: /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 1170)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 1171)
@@ -2433,4 +2433,7 @@
   UInt                 m_nARPStepNum; 
   Int         m_aiFirstTRefIdx    [2]; 
+#if HHI_RES_PRED_K0052
+  std::vector<Int> m_pocsInCurrRPSs; 
+#endif
 #endif
 #if H_3D_IC
@@ -2781,4 +2784,7 @@
   Void      setFirstTRefIdx        ( RefPicList e, Int i )         { m_aiFirstTRefIdx[e]    = i;      }
   Bool      getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; }
+#if HHI_RES_PRED_K0052
+  std::vector<Int> getPocsInCurrRPSs()                             { return m_pocsInCurrRPSs; }; 
+#endif
 #endif
   Void      setIsDepth            ( Bool isDepth )   { m_isDepth = isDepth; }
Index: /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 1170)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 1171)
@@ -333,4 +333,5 @@
 #define HHI_VIEW_ID_LIST_I5_J0107              0
 #define HHI_INTER_COMP_PRED_K0052              1
+#define HHI_RES_PRED_K0052                     1
 #define H_3D_ANNEX_SELECTION_FIX               1
 
Index: /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1170)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1171)
@@ -1094,4 +1094,8 @@
 #endif
 #endif
+#if HHI_RES_PRED_K0052
+  pcSlice->setIvPicLists( m_ivPicLists );         
+#endif
+
   if (bNextSlice)
   {
@@ -1129,5 +1133,7 @@
 
 #if H_3D
+#if !HHI_RES_PRED_K0052
     pcSlice->setIvPicLists( m_ivPicLists );         
+#endif
 
 #if HHI_INTER_COMP_PRED_K0052
