Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h	(revision 478)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h	(revision 479)
@@ -54,7 +54,4 @@
 class TComPicLists; 
 #endif
-#if H_3D_IV_MERGE
-class TComDepthMapGenerator;
-#endif
 // ====================================================================================================================
 // Constants
@@ -540,4 +537,7 @@
   Int         m_refLayerId               [ MAX_NUM_LAYERS ][MAX_NUM_LAYERS];  
 
+#if H_3D_IV_MERGE
+  Bool        m_ivMvPredFlag             [ MAX_NUM_LAYERS ]; 
+#endif
 #endif
 public:
@@ -673,4 +673,8 @@
   Bool    checkVPSExtensionSyntax(); 
   Int     scalTypeToScalIdx   ( ScalabilityType scalType );
+#if H_3D_IV_MERGE
+  Void    setIvMvPredFlag     ( Int layerIdInVps, Bool val )  { m_ivMvPredFlag[ layerIdInVps ] = val; }
+  Bool    getIvMvPredFlag     ( Int layerIdInVps )            { return m_ivMvPredFlag[ layerIdInVps ]; }; 
+#endif
 #endif
 };
@@ -984,12 +988,4 @@
   Int         m_aaiCodedScale [2][MAX_NUM_LAYERS];
   Int         m_aaiCodedOffset[2][MAX_NUM_LAYERS];
-#if H_3D_IV_MERGE
-  UInt        m_uiMultiviewMvPredMode;
-  UInt        m_uiPredDepthMapGeneration;
-
-  UInt        m_uiViewIndex;
-  Bool        m_bDepth;
-  TComDepthMapGenerator* m_pcDepthMapGenerator;
-#endif
 #endif
 public:
@@ -1135,15 +1131,4 @@
   Int* getInvCodedScale      ()  { return m_aaiCodedScale [1]; }
   Int* getInvCodedOffset     ()  { return m_aaiCodedOffset[1]; }
-#if H_3D_IV_MERGE
-  Void  initCamParaSPSDepth      ( UInt uiViewIndex);
-  UInt  getMultiviewMvPredMode   ()          { return m_uiMultiviewMvPredMode;    }
-  UInt  getPredDepthMapGeneration()          { return m_uiPredDepthMapGeneration; }
-
-  UInt  getViewIndex             ()  { return m_uiViewIndex; }
-  Bool  isDepth               ()  { return m_bDepth; }
-  Void  setDepthMapGenerator( TComDepthMapGenerator* pcDepthMapGenerator )  { m_pcDepthMapGenerator = pcDepthMapGenerator; }
-  TComDepthMapGenerator*  getDepthMapGenerator()                                              { return m_pcDepthMapGenerator; }
-  Void setPredDepthMapGeneration( UInt uiViewIndex, Bool bIsDepth, UInt uiPdmGenMode = 0, UInt uiPdmMvPredMode = 0);
-#endif
 #endif
 };
@@ -1436,7 +1421,4 @@
 #endif
   Bool        m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1];
-#if H_3D_IV_MERGE
-  TComPic*    m_pcTexturePic;
-#endif
   Int         m_iDepth;
   
@@ -1510,5 +1492,8 @@
   Bool       m_isDepth;
   Int        m_aaiCodedScale [2][MAX_NUM_LAYERS];
-  Int        m_aaiCodedOffset[2][MAX_NUM_LAYERS];
+  Int        m_aaiCodedOffset[2][MAX_NUM_LAYERS];  
+#if H_3D_GEN
+  TComPic*   m_ivPicsCurrPoc [2][MAX_NUM_LAYERS];  
+#endif
 #endif
 #endif
@@ -1569,6 +1554,9 @@
   TComPic*  getRefPic           ( RefPicList e, Int iRefIdx)    { return  m_apcRefPicList[e][iRefIdx];  }
   Int       getRefPOC           ( RefPicList e, Int iRefIdx)    { return  m_aiRefPOCList[e][iRefIdx];   }
+#if H_3D_GEN
+  TComPic*  getIvPic            ( Bool depthFlag, Int viewIndex){ return  m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; }
+#endif
 #if H_3D_IV_MERGE
-  TComPic*  getTexturePic       () const                        { return  m_pcTexturePic; }
+  TComPic*  getTexturePic       ()                              { return  m_ivPicsCurrPoc[0][ m_viewIndex ]; }
 #endif
   Int       getDepth            ()                              { return  m_iDepth;                     }
@@ -1622,7 +1610,4 @@
   Void      setRefPic           ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; }
   Void      setRefPOC           ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; }
-#if H_3D_IV_MERGE
-  Void      setTexturePic       ( TComPic *pcTexturePic )       { m_pcTexturePic = pcTexturePic; }
-#endif
   Void      setNumRefIdx        ( RefPicList e, Int i )         { m_aiNumRefIdx[e]    = i;      }
   Void      setPic              ( TComPic* p )                  { m_pcPic             = p;      }
@@ -1789,4 +1774,8 @@
 #endif
 #endif
+#if H_3D_GEN
+  Void    setIvPicLists( TComPicLists* m_ivPicLists );
+#endif
+
 protected:
   TComPic*  xGetRefPic  (TComList<TComPic*>& rcListPic,
@@ -1794,5 +1783,5 @@
 TComPic*  xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb);
 #if H_MV
-  TComPic*  xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId );
+  TComPic*  xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId );  
 #endif
 };// END CLASS DEFINITION TComSlice
