Index: branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.cpp	(revision 1101)
+++ branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.cpp	(revision 1103)
@@ -1947,4 +1947,9 @@
     m_layerIdInNuh      [i] = ( i == 0 ) ? 0 : -1; 
     m_numDirectRefLayers[i] = 0; 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+    m_numRefListLayers[i] = 0; 
+#endif
+#endif
     m_vpsRepFormatIdx    [i] = 0; 
     m_pocLsbNotPresentFlag[i] = 0;
@@ -1965,4 +1970,9 @@
       m_dependencyFlag  [i][j]    = false; 
       m_idDirectRefLayer[i][j]    = -1; 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+      m_idRefListLayer[i][j]    = -1; 
+#endif
+#endif
       m_idPredictedLayer[i][j]    = -1; 
       m_idRefLayer      [i][j]    = -1; 
@@ -2103,6 +2113,12 @@
     Int iNuhLId = getLayerIdInNuh( i );
     Int d = 0;
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+    Int l = 0; 
+#endif
+#endif
     Int r = 0;
     Int p = 0;
+
     for( Int j = 0; j  <=  getMaxLayersMinus1(); j++ )
     {
@@ -2112,4 +2128,13 @@
         m_idDirectRefLayer[iNuhLId][d++] = jNuhLid;
       }
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+      if( getDirectDependencyFlag( i , j ) && ( getDepthId( iNuhLId ) == getDepthId( jNuhLid ) ))
+      {
+        m_idRefListLayer [iNuhLId][l++] = jNuhLid;
+      }
+#endif
+#endif
+
       if( getDependencyFlag( i , j ) )
       {
@@ -2122,4 +2147,10 @@
     }
     m_numDirectRefLayers[ iNuhLId ] = d;
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+    m_numRefListLayers[ iNuhLId ] = l; 
+#endif
+#endif
+
     m_numRefLayers      [ iNuhLId ] = r;
     m_numPredictedLayers[ iNuhLId ] = p;
@@ -2566,4 +2597,10 @@
   xPrintArray( "IdRefLayer"      , getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numRefLayers, m_idRefLayer, true );
   xPrintArray( "IdDirectRefLayer", getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numDirectRefLayers, m_idDirectRefLayer, true );
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  xPrintArray( "IdRefListLayer", getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numRefListLayers, m_idRefListLayer, true );
+#endif
+#endif
+
   std::cout << std::endl;
 }
@@ -3584,5 +3621,13 @@
 {
   TComVPS* vps = getVPS(); 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  Int refLayerIdx = vps->getLayerIdInVps( vps->getIdRefListLayer( getLayerId(), i ) ); 
+#else
   Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) ); 
+#endif
+#else
+  Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) ); 
+#endif
 
   Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  && ( getTLayer() == 0  ) &&
@@ -3596,5 +3641,13 @@
   Int refLayerPicIdc = -1; 
   Int curj = 0; 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  for( Int i = 0;  i < getVPS()->getNumRefListLayers( getLayerId()) ; i++ )
+#else
   for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
+#endif
+#else
+  for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
+#endif
   {
     if( getRefLayerPicFlag( i ) )
@@ -3617,5 +3670,13 @@
 {  
   Int numRefLayerPics = 0; 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  for( Int i = 0;  i < getVPS()->getNumRefListLayers( getLayerId()) ; i++ )
+#else
   for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
+#endif
+#else
+  for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
+#endif
   {
     numRefLayerPics += getRefLayerPicFlag( i ); 
@@ -3642,5 +3703,13 @@
     numActiveRefLayerPics = 0; 
   }
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumRefListLayers( getLayerId() ) == 1 )
+#else
   else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
+#endif
+#else
+  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
+#endif  
   {
     numActiveRefLayerPics = 1; 
@@ -3655,5 +3724,13 @@
 Int TComSlice::getRefPicLayerId( Int i )
 {
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  return getVPS()->getIdRefListLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
+#else
   return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
+#endif
+#else
+  return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
+#endif
 }
 
Index: branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.h	(revision 1101)
+++ branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TComSlice.h	(revision 1103)
@@ -886,4 +886,11 @@
   Int         m_numDirectRefLayers       [MAX_NUM_LAYERS];
   Int         m_idDirectRefLayer         [MAX_NUM_LAYERS][MAX_NUM_LAYERS];  
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  Int         m_numRefListLayers         [MAX_NUM_LAYERS];
+  Int         m_idRefListLayer           [MAX_NUM_LAYERS][MAX_NUM_LAYERS];  
+#endif
+#endif
+
 
   Int         m_numRefLayers             [MAX_NUM_LAYER_IDS]; 
@@ -1179,10 +1186,22 @@
   Bool    getDependencyFlag( Int i, Int j )                                { return m_dependencyFlag[i][j]; }
   Int     getNumDirectRefLayers( Int layerIdInNuh )                        { return m_numDirectRefLayers[ layerIdInNuh ];  };                               
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  Int     getNumRefListLayers( Int layerIdInNuh )                         { return m_numRefListLayers[ layerIdInNuh ];  };                               
+#endif
+#endif
+
   Int     getNumRefLayers            ( Int i )        { return m_numRefLayers[i]; } 
   Int     getNumPredictedLayers      ( Int i )        { return m_numPredictedLayers[i]; } 
+
 
   Int     getIdRefLayer              ( Int i, Int j ) { assert( j >= 0 && j < getNumRefLayers      ( i )); return m_idRefLayer      [i][j]; } 
   Int     getIdPredictedLayer        ( Int i, Int j ) { assert( j >= 0 && j < getNumPredictedLayers( i )); return m_idPredictedLayer[i][j]; } 
   Int     getIdDirectRefLayer        ( Int i, Int j ) { assert( j >= 0 && j < getNumDirectRefLayers( i )); return m_idDirectRefLayer[i][j]; } 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  Int     getIdRefListLayer          ( Int i, Int j ) { assert( j >= 0 && j < getNumRefListLayers   ( i )); return m_idRefListLayer[i][j]; } 
+#endif
+#endif
   Int     getNumIndependentLayers    (  )             { return m_numIndependentLayers; } 
   Int     getNumLayersInTreePartition( Int i )        { return m_numLayersInTreePartition[i]; } 
@@ -2747,6 +2766,17 @@
   // Additional variables derived in slice header semantics 
 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  Int  getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2(  getVPS()->getNumRefListLayers( getLayerId() )); }
+  Int  getInterLayerPredLayerIdcLen    ( ) { return gCeilLog2(  getVPS()->getNumRefListLayers( getLayerId() )); }
+#else
   Int  getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerId() )); }
   Int  getInterLayerPredLayerIdcLen    ( ) { return gCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerId() )); }
+#endif
+
+#else
+  Int  getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerId() )); }
+  Int  getInterLayerPredLayerIdcLen    ( ) { return gCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerId() )); }
+#endif
 
   Int  getRefLayerPicFlag( Int i ); 
Index: branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TypeDef.h	(revision 1101)
+++ branches/HTM-12.2-dev2-HHI/source/Lib/TLibCommon/TypeDef.h	(revision 1103)
@@ -293,4 +293,9 @@
 // Fixes
 
+
+#if H_3D
+#define HHI_DEPENDENCY_SIGNALLING_I1_J0107     1
+#endif
+
 ///// ***** SINGLE DEPTH MODE *********
 #if H_3D_SINGLE_DEPTH
Index: branches/HTM-12.2-dev2-HHI/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-12.2-dev2-HHI/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1101)
+++ branches/HTM-12.2-dev2-HHI/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1103)
@@ -2350,8 +2350,24 @@
     Bool interLayerPredLayerIdcPresentFlag = false; 
     Int layerId       = rpcSlice->getLayerId(); 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumRefListLayers( layerId ) > 0 )
+#else
     if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
+#endif
+#else
+    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
+#endif
     {   
       READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 );
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+      if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumRefListLayers( layerId ) > 1 )
+#else
       if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
+#endif
+#else
+      if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
+#endif
       {            
         if( !vps->getMaxOneActiveRefLayerFlag())  
@@ -2359,5 +2375,13 @@
           READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode );
         }
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+        if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumRefListLayers( layerId ) )
+#else
         if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
+#endif
+#else
+        if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
+#endif
         {
           interLayerPredLayerIdcPresentFlag = true; 
@@ -2545,5 +2569,9 @@
     }
 #if H_3D_IC
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
+#else
     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
+#endif
     {
       UInt uiCodeTmp = 0;
Index: branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1101)
+++ branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1103)
@@ -1887,8 +1887,24 @@
     Bool interLayerPredLayerIdcPresentFlag = false; 
     Int layerId = pcSlice->getLayerId(); 
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+    if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumRefListLayers( layerId ) > 0 )
+#else
     if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
+#endif
+#else
+    if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
+#endif
     {   
       WRITE_FLAG( pcSlice->getInterLayerPredEnabledFlag( ) ? 1 : 0 , "inter_layer_pred_enabled_flag" );
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+      if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumRefListLayers( layerId ) > 1 )
+#else
       if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
+#endif
+#else
+      if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
+#endif
       {            
         if( !vps->getMaxOneActiveRefLayerFlag())  
@@ -1896,5 +1912,13 @@
           WRITE_CODE( pcSlice->getNumInterLayerRefPicsMinus1( ), pcSlice->getNumInterLayerRefPicsMinus1Len( ), "num_inter_layer_ref_pics_minus1" );
         }
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+        if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumRefListLayers( layerId ) )
+#else
         if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
+#endif
+#else
+        if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
+#endif
         {        
           interLayerPredLayerIdcPresentFlag = true; 
@@ -2037,5 +2061,9 @@
     }
 #if H_3D_IC
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
+#else
     else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
+#endif
     {
       WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" );
Index: branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1101)
+++ branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1103)
@@ -880,5 +880,13 @@
 
     TComVPS*           vps = pcSlice->getVPS();     
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+    Int numDirectRefLayers = vps    ->getNumRefListLayers( getLayerId() ); 
+#else
     Int numDirectRefLayers = vps    ->getNumDirectRefLayers( getLayerId() ); 
+#endif
+#else
+    Int numDirectRefLayers = vps    ->getNumDirectRefLayers( getLayerId() ); 
+#endif
     GOPEntry gopEntry      = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid );     
     
@@ -893,5 +901,13 @@
           pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 ); 
         }
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+        if ( gopEntry.m_numActiveRefLayerPics != vps->getNumRefListLayers( getLayerId() ) )
+#else
         if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) )
+#endif
+#else
+        if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) )
+#endif
         {        
           interLayerPredLayerIdcPresentFlag = true; 
Index: branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1101)
+++ branches/HTM-12.2-dev2-HHI/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1103)
@@ -896,5 +896,14 @@
 #if H_MV
   m_cPPS.setLayerId( getLayerId() );
+#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
+#if H_3D
+  // Check if this condition is still correct
+  if( getVPS()->getNumRefListLayers( getLayerId() ) > 0 )
+#else
   if( getVPS()->getNumDirectRefLayers( getLayerId() ) > 0 )
+#endif
+#else
+  if( getVPS()->getNumDirectRefLayers( getLayerId() ) > 0 )
+#endif
   {
     m_cPPS.setListsModificationPresentFlag( true );
