Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg	(revision 1104)
@@ -52,11 +52,11 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers 
-
-DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
+DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 1 2         # Indices in VPS of direct reference layers 
+
+DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_2             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_3             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 
 #========== Camera parameters ==========
Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg	(revision 1104)
@@ -62,9 +62,9 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers 
-DirectRefLayers_4             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_5             : 1           # Indices in VPS of direct reference layers 
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
+DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 1 2         # Indices in VPS of direct reference layers 
+DirectRefLayers_4             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_5             : 1 2         # Indices in VPS of direct reference layers 
 
 DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg	(revision 1104)
@@ -62,15 +62,15 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
 DirectRefLayers_2             : 1           # Indices in VPS of direct reference layers 
-DirectRefLayers_3             : 0           # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 0 1         # Indices in VPS of direct reference layers 
 DirectRefLayers_4             : 1           # Indices in VPS of direct reference layers 
-DirectRefLayers_5             : 0           # Indices in VPS of direct reference layers 
-
-DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DirectRefLayers_5             : 0 1         # Indices in VPS of direct reference layers 
+
+DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_3             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 DependencyTypes_4             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_5             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_5             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 
 #========== Camera parameters ==========
Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view+depth.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view+depth.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view+depth.cfg	(revision 1104)
@@ -38,15 +38,15 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers 
-DirectRefLayers_4             : 0 2         # Indices in VPS of direct reference layers 
-DirectRefLayers_5             : 1 3         # Indices in VPS of direct reference layers 
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
+DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 1 2         # Indices in VPS of direct reference layers 
+DirectRefLayers_4             : 0 1 2 3     # Indices in VPS of direct reference layers 
+DirectRefLayers_5             : 1 3 4       # Indices in VPS of direct reference layers 
 
-DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_4             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_5             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_2             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_3             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_4             : 2 2 2 2     # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_5             : 2 2 2       # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 
 
Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/misc/gopCfg_ILP_on_IRAP_3view+depth.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/misc/gopCfg_ILP_on_IRAP_3view+depth.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/misc/gopCfg_ILP_on_IRAP_3view+depth.cfg	(revision 1104)
@@ -30,9 +30,9 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers 
-DirectRefLayers_4             : 0 2         # Indices in VPS of direct reference layers 
-DirectRefLayers_5             : 1 3         # Indices in VPS of direct reference layers 
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
+DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 1 2         # Indices in VPS of direct reference layers 
+DirectRefLayers_4             : 0 1 2 3     # Indices in VPS of direct reference layers 
+DirectRefLayers_5             : 1 3 4       # Indices in VPS of direct reference layers 
 
 DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view+depth.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view+depth.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view+depth.cfg	(revision 1104)
@@ -28,15 +28,15 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
 DirectRefLayers_2             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_3             :             # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 2           # Indices in VPS of direct reference layers 
 DirectRefLayers_4             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_5             :             # Indices in VPS of direct reference layers 
+DirectRefLayers_5             : 4           # Indices in VPS of direct reference layers 
 
-DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 DependencyTypes_2             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_3             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 DependencyTypes_4             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_5             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_5             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 
 
Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/baseCfg_2view+depth.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 1104)
@@ -52,11 +52,11 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers 
-
-DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
+DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 1 2         # Indices in VPS of direct reference layers 
+
+DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_2             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_3             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 
 #========== Camera parameters ==========
Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/baseCfg_3view+depth.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 1104)
@@ -62,15 +62,15 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers 
-DirectRefLayers_4             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_5             : 1           # Indices in VPS of direct reference layers 
-
-DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_4             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_5             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
+DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 1 2         # Indices in VPS of direct reference layers 
+DirectRefLayers_4             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_5             : 1 2         # Indices in VPS of direct reference layers 
+
+DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_2             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_3             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_4             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_5             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 
 #========== Camera parameters ==========
Index: /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/fullCfg.cfg
===================================================================
--- /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/fullCfg.cfg	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/cfg/3D-HEVC/fullCfg.cfg	(revision 1104)
@@ -125,15 +125,15 @@
 
 #======== VPS / Dependencies ================
-DirectRefLayers_1             :             # Indices in VPS of direct reference layers 
-DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers 
-DirectRefLayers_4             : 0           # Indices in VPS of direct reference layers 
-DirectRefLayers_5             : 1           # Indices in VPS of direct reference layers 
-
-DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_4             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
-DependencyTypes_5             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers 
+DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_3             : 1 2         # Indices in VPS of direct reference layers 
+DirectRefLayers_4             : 0 1         # Indices in VPS of direct reference layers 
+DirectRefLayers_5             : 1 2         # Indices in VPS of direct reference layers 
+
+DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_2             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_3             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_4             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
+DependencyTypes_5             : 2 2         # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 
 #========== Camera parameters ==========
Index: /branches/HTM-12.2-dev2-HHI/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-12.2-dev2-HHI/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1104)
@@ -404,5 +404,9 @@
   ("ProfileTierLevelIdx_%d",  m_profileTierLevelIdx, std::vector<Int>(0), MAX_NUM_LAYERS, "Indices to profile level tier for ols")
   // Layer dependencies
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+  ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIdx in VPS of direct reference layers")
+#else
   ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIds of direct reference layers")
+#endif
   ("DependencyTypes_%d",    m_dependencyTypes    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion")
 #endif
Index: /branches/HTM-12.2-dev2-HHI/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-12.2-dev2-HHI/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1104)
@@ -1346,5 +1346,5 @@
       vps.setDirectDependencyType( depLayer, refLayer,    -1 ); 
     }
-    }
+  }
 
   Int  defaultDirectDependencyType = -1; 
@@ -1377,4 +1377,8 @@
   vps.setDefaultDirectDependencyFlag( defaultDirectDependencyFlag );       
   vps.setDefaultDirectDependencyType( defaultDirectDependencyFlag ? defaultDirectDependencyType : -1 );       
+
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+  vps.setRefLayers(); 
+#endif
 
   // Max sub layers, + presence flag
@@ -1395,5 +1399,90 @@
   vps.setVpsSubLayersMaxMinus1PresentFlag( subLayersMaxMinus1PresentFlag ); 
 
-
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+  // Max temporal id for inter layer reference pictures
+  for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++)
+  {
+    Int refLayerIdInNuh = vps.getLayerIdInNuh( refLayerIdInVps );
+    for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++)
+    {
+      Int curLayerIdInNuh = vps.getLayerIdInNuh( curLayerIdInVps );      
+#if H_3D
+      Int maxTid = -1; 
+      if ( vps.getDirectDependencyFlag( curLayerIdInVps, refLayerIdInVps ) )
+      {
+        if ( m_depthFlag[ curLayerIdInVps] == m_depthFlag[ refLayerIdInVps ] )
+        {
+#endif
+          for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
+          {        
+            GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
+            GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
+            for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++)
+            {
+#if H_3D
+              if ( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[ j ] ) == refLayerIdInNuh )
+#else
+              if ( vps.getIdDirectRefLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[ j ] ) == refLayerIdInNuh )
+#endif
+              {
+                Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 );
+                Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
+                maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId ); 
+              }
+            }
+          }              
+#if H_3D
+        }
+        else
+        {        
+          if( m_depthFlag[ curLayerIdInVps ] && ( m_bMPIFlag || m_bLimQtPredFlag || m_useIVP  ) ) 
+          {          
+            Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false ); 
+            if ( nuhLayerIdTex == refLayerIdInNuh )
+            {
+              maxTid = std::max( maxTid, vps.getSubLayersVpsMaxMinus1( refLayerIdInVps) + 1 );
+            }
+          }
+
+          if( !m_depthFlag[ curLayerIdInVps ] && vps.getNumRefListLayers( curLayerIdInNuh) > 0  && ( m_depthRefinementFlag || m_viewSynthesisPredFlag || m_bUseDBBP) ) 
+          {  
+            Int maxPresentTid =-1; 
+            Bool allPresent = true; 
+            for (Int i = 0; i < vps.getNumRefListLayers( curLayerIdInNuh); i++ )
+            {
+              Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer(curLayerIdInNuh, i ) ), true ); 
+              if ( nuhLayerIdDep== refLayerIdInNuh )
+              {
+                maxPresentTid= std::max( maxTid, vps.getSubLayersVpsMaxMinus1( refLayerIdInVps) + 1 );              
+              }
+              else
+              {
+                allPresent = false; 
+              }
+            }
+
+            if ( allPresent )
+            {
+              maxTid= std::max( maxTid, maxPresentTid );              
+            }
+          }        
+        }
+      }
+      vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 );
+#endif
+    }    
+  }
+
+  // Max temporal id for inter layer reference pictures presence flag
+  Bool maxTidRefPresentFlag = false;   
+  for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++)
+  {
+    for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++)
+    {
+        maxTidRefPresentFlag = maxTidRefPresentFlag || ( vps.getMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps ) != 7 );    
+    }
+  }
+  vps.setMaxTidRefPresentFlag( maxTidRefPresentFlag );
+#else
   // Max temporal id for inter layer reference pictures + presence flag
   Bool maxTidRefPresentFlag = false; 
@@ -1402,25 +1491,28 @@
     for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++)
     {
-      Int maxTid = -1; 
-      for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
-      {        
-        GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
-        GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
-        for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++)
+        Int maxTid = -1; 
+        for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
         {        
-          if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps )
+          GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
+          GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
+          for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++)
           {
-            Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 );
-            Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
-            maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId ); 
+            if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps )
+            {
+              Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 );
+              Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
+              maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId ); 
+            }
           }
         }
-      }
-      vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 );
-      maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 );    
+        vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 );
+        maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 );    
     }
   }
 
   vps.setMaxTidRefPresentFlag( maxTidRefPresentFlag );
+#endif  
+
+
   // Max one active ref layer flag
   Bool maxOneActiveRefLayerFlag = true;  
@@ -1432,5 +1524,5 @@
       maxOneActiveRefLayerFlag =  maxOneActiveRefLayerFlag && (ge.m_numActiveRefLayerPics <= 1); 
     }            
-}
+  }
 
   vps.setMaxOneActiveRefLayerFlag( maxOneActiveRefLayerFlag );
@@ -1443,5 +1535,5 @@
       vps.setPocLsbNotPresentFlag( layerIdInVps,  true );  
     }
-  }
+  }  
   
   // All Ref layers active flag
@@ -1449,4 +1541,7 @@
   for ( Int layerIdInVps = 1; layerIdInVps < m_numberOfLayers && allRefLayersActiveFlag; layerIdInVps++)
   {    
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+    Int layerIdInNuh = vps.getLayerIdInNuh( layerIdInVps ); 
+#endif
     for( Int i = 0; i < ( getGOPSize() + 1) && allRefLayersActiveFlag; i++ ) 
     {        
@@ -1455,8 +1550,24 @@
       
       // check if all reference layers when allRefLayerActiveFlag is equal to 1 are reference layer pictures specified in the gop entry
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+      for (Int k = 0; k < vps.getNumRefListLayers( layerIdInNuh ) && allRefLayersActiveFlag; k++ )
+      {
+        Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdRefListLayer( layerIdInNuh , k ) ); 
+#else
+      for (Int k = 0; k < vps.getNumDirectRefLayers( layerIdInNuh ) && allRefLayersActiveFlag; k++ )
+      {
+        Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdDirectRefLayer( layerIdInNuh , k ) ); 
+#endif
+#else
       for (Int k = 0; k < m_directRefLayers[ layerIdInVps].size() && allRefLayersActiveFlag; k++ )
       {
         Int refLayerIdInVps = vps.getLayerIdInVps( m_directRefLayers[ layerIdInVps ][ k ] ); 
+#endif
+#if H_MV_FIX_REF_LAYER_PIC_FLAG
+        if ( vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId  && ( tId == 0 || vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId )  )
+#else
         if ( vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId  && vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId )
+#endif
         {
           Bool gopEntryFoundFlag = false; 
@@ -1475,9 +1586,24 @@
       {   
         Bool referenceLayerFoundFlag = false; 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+        for (Int k = 0; k < vps.getNumRefListLayers( layerIdInNuh ); k++ )
+        {
+          Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdRefListLayer( layerIdInNuh, k) );
+#else
+        for (Int k = 0; k < vps.getNumDirectRefLayers( layerIdInNuh ); k++ )
+        {
+          Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdDirectRefLayer( layerIdInNuh, k) );
+#endif
+#else
         for (Int k = 0; k < m_directRefLayers[ layerIdInVps].size(); k++ )
         {
           Int refLayerIdInVps = vps.getLayerIdInVps( m_directRefLayers[ layerIdInVps ][ k ] ); 
-
+#endif
+#if H_MV_FIX_REF_LAYER_PIC_FLAG
+          if ( vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId  && ( tId == 0 || vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId )  )
+#else
           if ( vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId  && vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId )
+#endif
           {          
             referenceLayerFoundFlag = referenceLayerFoundFlag || ( ge.m_interLayerPredLayerIdc[l] == k ); 
@@ -1491,7 +1617,9 @@
 
   vps.setAllRefLayersActiveFlag( allRefLayersActiveFlag );
-
+#if !HHI_DEPENDENCY_SIGNALLING_I1_J0107
   vps.setRefLayers(); 
+#endif
 }; 
+
 
 GOPEntry* TAppEncTop::xGetGopEntry( Int layerIdInVps, Int poc )
Index: /branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.cpp	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.cpp	(revision 1104)
@@ -3631,7 +3631,11 @@
 #endif
 
+#if H_MV_FIX_REF_LAYER_PIC_FLAG
+  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer()  && ( getTLayer() == 0   ||
+    vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() )); 
+#else
   Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  && ( getTLayer() == 0  ) &&
     ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() ); 
-
+#endif
   return refLayerPicFlag;       
 }    
Index: /branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TypeDef.h	(revision 1103)
+++ /branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TypeDef.h	(revision 1104)
@@ -297,4 +297,6 @@
 #define HHI_DEPENDENCY_SIGNALLING_I1_J0107     1
 #endif
+#define H_MV_FIX_REF_LAYER_PIC_FLAG            1
+
 
 ///// ***** SINGLE DEPTH MODE *********
