Index: trunk/source/App/TAppDecoder/TAppDecCfg.cpp
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 976)
+++ trunk/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1066)
@@ -94,4 +94,9 @@
   ("TarDecLayerIdSetFile,l", cfg_TargetDecLayerIdSetFile, string(""), "targetDecLayerIdSet file name. The file should include white space separated LayerId values to be decoded. Omitting the option or a value of -1 in the file decodes all layers.")
   ("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n")
+#if H_MV
+#if H_MV_HLS10_GEN_FIX
+  ("OutputVpsInfo,v", m_outputVpsInfo, false, "Output information about the layer dependencies and layer sets")
+#endif
+#endif
   ;
   po::setDefaults(opts);
Index: trunk/source/App/TAppDecoder/TAppDecCfg.h
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecCfg.h	(revision 976)
+++ trunk/source/App/TAppDecoder/TAppDecCfg.h	(revision 1066)
@@ -80,4 +80,7 @@
 
 #if H_MV
+#if H_MV_HLS10_GEN_FIX
+  Bool          m_outputVpsInfo;                     ///< Output VPS information 
+#endif
   Void xAppendToFileNameEnd( Char* pchInputFileName, const Char* pchStringToAppend, Char*& rpchOutputFileName); ///< create filenames
 #endif
Index: trunk/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 976)
+++ trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1066)
@@ -239,23 +239,34 @@
           {
             TComVPS* vps = m_vps; 
-          if ( m_targetOptLayerSetIdx == -1 )
+            if ( m_targetOptLayerSetIdx == -1 )
+            {
+              // Not normative! Corresponds to specification by "External Means". (Should be set equal to 0, when no external means available. ) 
+              m_targetOptLayerSetIdx = vps->getVpsNumLayerSetsMinus1(); 
+            }
+
+            for (Int dI = 0; dI < m_numDecoders; dI++ )
+            {
+              m_tDecTop[decIdx]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 
+            }
+
+            if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() )
+            {
+              fprintf(stderr, "\ntarget output layer set index must be in the range of 0 to %d, inclusive \n", vps->getNumOutputLayerSets() - 1 );            
+              exit(EXIT_FAILURE);
+            }
+            m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 
+          }
+#if H_MV_HLS10_GEN_FIX
+          if (m_outputVpsInfo )
           {
-            // Not normative! Corresponds to specification by "External Means". (Should be set equal to 0, when no external means available. ) 
-            m_targetOptLayerSetIdx = vps->getVpsNumLayerSetsMinus1(); 
+#if H_MV_HLS10_AUX
+            m_vps->printScalabilityId();
+#endif
+            m_vps->printLayerDependencies();
+            m_vps->printLayerSets();
+            m_vps->printPTL(); 
           }
-
-          for (Int dI = 0; dI < m_numDecoders; dI++ )
-          {
-            m_tDecTop[decIdx]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 
-          }
-
-          if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() )
-          {
-            fprintf(stderr, "\ntarget output layer set index must be in the range of 0 to %d, inclusive \n", vps->getNumOutputLayerSets() - 1 );            
-            exit(EXIT_FAILURE);
-          }
-          m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 
-        }
-      }
+#endif
+        }
 #if H_3D
         if (nalu.m_nalUnitType == NAL_UNIT_VPS )
@@ -569,6 +580,10 @@
   Int dpbFullness = 0;
 #if H_MV
+#if H_MV_HLS10_ADD_LAYERSETS
+  TComSPS* activeSPS = m_tDecTop[ decIdx ]->getActiveSPS();
+#else
   // preliminary fix
   TComSPS* activeSPS = m_tDecTop[0]->getActiveSPS();
+#endif
 #else
   TComSPS* activeSPS = m_cTDecTop.getActiveSPS();
@@ -1140,5 +1155,9 @@
     Int curLayerId = m_tDecTop[dIdx]->getLayerId();
     Int curLayerIdxInVps = m_vps->getLayerIdInNuh( curLayerId  ); 
+#if H_MV_HLS10_REF_PRED_LAYERS
+    if ( m_vps->getDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) )
+#else
     if ( m_vps->getInDirectDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) )
+#endif
     {
       TComPic* curPic = m_ivPicLists.getPic( curLayerId, pocLastPic ); 
