Index: branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 961)
+++ branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 962)
@@ -388,9 +388,12 @@
   ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")    
   ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set")  
-  ("DefaultTargetOutputLayerIdc"     , m_defaultTargetOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
+  ("DefaultTargetOutputLayerIdc"     , m_defaultOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
   ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets")  
 
   ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set")  
   ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set")  
+#if H_MV_HLS_7_VPS_P0300_27
+  ("AltOutputLayerFlag",    m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag")
+#endif
   ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
   
@@ -453,5 +456,9 @@
 ("IntraPeriod,-ip",         m_iIntraPeriod,              -1, "Intra period in frames, (-1: only first frame)")
 #endif
+#if ALLOW_RECOVERY_POINT_AS_RAP
+  ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)")
+#else
   ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR)")
+#endif
   ("GOPSize,g",               m_iGOPSize,                   1, "GOP size of temporal structure")
   // motion options
@@ -470,5 +477,4 @@
   ("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( Double )1.0, "Lambda modifier for temporal layer 5")
   ("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( Double )1.0, "Lambda modifier for temporal layer 6")
-  ("LambdaModifier7,-LM7", m_adLambdaModifier[ 7 ], ( Double )1.0, "Lambda modifier for temporal layer 7")
 
   /* Quantization parameters */
@@ -694,4 +700,6 @@
   ("SEIToneMapCameraIsoSpeedIdc",                     m_cameraIsoSpeedIdc,                        0, "Indicates the camera ISO speed for daylight illumination")
   ("SEIToneMapCameraIsoSpeedValue",                   m_cameraIsoSpeedValue,                    400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO")
+  ("SEIToneMapExposureIndexIdc",                      m_exposureIndexIdc,                         0, "Indicates the exposure index setting of the camera")
+  ("SEIToneMapExposureIndexValue",                    m_exposureIndexValue,                     400, "Specifies the exposure index setting of the cameran of Extended_ISO")
   ("SEIToneMapExposureCompensationValueSignFlag",     m_exposureCompensationValueSignFlag,        0, "Specifies the sign of ExposureCompensationValue")
   ("SEIToneMapExposureCompensationValueNumerator",    m_exposureCompensationValueNumerator,       0, "Specifies the numerator of ExposureCompensationValue")
@@ -724,4 +732,5 @@
   ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
   ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
+#if H_MV
   ("SubBitstreamPropSEIEnabled",              m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
   ("SEISubBitstreamNumAdditionalSubStreams",  m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled")
@@ -731,4 +740,5 @@
   ("SEISubBitstreamAvgBitRate",               m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
   ("SEISubBitstreamMaxBitRate",               m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
+#endif
 #if H_3D
   ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
@@ -1047,4 +1057,11 @@
   xResizeVector( m_loopFilterNotAcrossTilesFlag ); 
   xResizeVector( m_wppInUseFlag ); 
+
+#if H_MV_HLS_7_VPS_P0300_27
+  for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++)
+  {    
+    m_altOutputLayerFlag.push_back( false );      
+  }
+#endif
 #else
   m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ];
@@ -1417,7 +1434,7 @@
   }
 
-  xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." );  
-
-  if( m_defaultTargetOutputLayerIdc != 2 )
+  xConfirmPara( m_defaultOutputLayerIdc < 0 || m_defaultOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." );  
+
+  if( m_defaultOutputLayerIdc != 2 )
   {
     Bool anyDefaultOutputFlag = false;   
@@ -1448,4 +1465,7 @@
   }
 
+#if H_MV_HLS_7_VPS_P0300_27
+  xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
+#endif
   xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
 
@@ -1472,5 +1492,13 @@
   xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" );
 #endif
+#if ALLOW_RECOVERY_POINT_AS_RAP
+  xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3,                   "Decoding Refresh Type must be comprised between 0 and 3 included" );
+  if(m_iDecodingRefreshType == 3)
+  {
+    xConfirmPara( !m_recoveryPointSEIEnabled,                                               "When using RecoveryPointSEI messages as RA points, recoveryPointSEI must be enabled" );
+  }
+#else
   xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2,                   "Decoding Refresh Type must be equal to 0, 1 or 2" );
+#endif
 #if H_MV
   for( Int layer = 0; layer < m_numberOfLayers; layer++ )
@@ -2182,4 +2210,5 @@
     xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4");
     xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0");
+    xConfirmPara( m_exposureIndexValue  == 0, "SEIToneMapExposureIndexValue shall not be equal to 0");
     xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100");
     xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue");
Index: branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 961)
+++ branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 962)
@@ -89,10 +89,13 @@
   Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
   std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set 
-  Int                    m_defaultTargetOutputLayerIdc;       ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
+  Int                    m_defaultOutputLayerIdc;       ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
   std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets  
   std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
   std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
   std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
-  
+  #if H_MV_HLS_7_VPS_P0300_27
+  std::vector<Bool>      m_altOutputLayerFlag;                ///< Alt output layer flag
+#endif
+
   // Dependencies
   std::vector< std::vector<Int> > m_directRefLayers;          ///< LayerIds of direct reference layers
@@ -338,4 +341,6 @@
   Int       m_cameraIsoSpeedIdc;
   Int       m_cameraIsoSpeedValue;
+  Int       m_exposureIndexIdc;
+  Int       m_exposureIndexValue;
   Int       m_exposureCompensationValueSignFlag;
   Int       m_exposureCompensationValueNumerator;
Index: branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 961)
+++ branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 962)
@@ -57,4 +57,8 @@
 TAppEncTop::TAppEncTop()
 {
+
+#if H_MV_HLS_8
+  m_vps = new TComVPS; 
+#endif
 #if !H_MV
   m_iFrameRcvd = 0;
@@ -66,4 +70,11 @@
 TAppEncTop::~TAppEncTop()
 {
+#if H_MV_HLS_8
+  if (m_vps)
+  {
+   delete m_vps; 
+  };
+#endif
+
 }
 
@@ -71,5 +82,9 @@
 {
 #if H_MV
+#if H_MV_HLS_8
+  TComVPS& vps = (*m_vps);   
+#else
   TComVPS& vps = m_vps;   
+#endif
 #else
   TComVPS vps;
@@ -409,4 +424,6 @@
   m_cTEncTop.setTMISEICameraIsoSpeedIdc                   ( m_cameraIsoSpeedIdc );
   m_cTEncTop.setTMISEICameraIsoSpeedValue                 ( m_cameraIsoSpeedValue );
+  m_cTEncTop.setTMISEIExposureIndexIdc                    ( m_exposureIndexIdc );
+  m_cTEncTop.setTMISEIExposureIndexValue                  ( m_exposureIndexValue );
   m_cTEncTop.setTMISEIExposureCompensationValueSignFlag   ( m_exposureCompensationValueSignFlag );
   m_cTEncTop.setTMISEIExposureCompensationValueNumerator  ( m_exposureCompensationValueNumerator );
@@ -691,8 +708,15 @@
 {
 #if H_3D
+#if H_MV_HLS_8
+  for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ )
+  {
+    m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 
+      m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
+#else
   for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )
   {
-    m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 
+  m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 
       m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
+#endif
   }
 #endif
@@ -1275,5 +1299,10 @@
 
   Int  defaultDirectDependencyType = -1; 
+#if MV_FIX_DEP_TYPES
+  Bool defaultDirectDependencyFlag = false; 
+#else
   Bool defaultDirectDependencyFlag = true; 
+#endif
+
   for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ )
   {
@@ -1293,4 +1322,7 @@
       {
         defaultDirectDependencyType = curDirectDependencyType; 
+#if MV_FIX_DEP_TYPES
+        defaultDirectDependencyFlag = true; 
+#endif
       }
       
@@ -1482,5 +1514,9 @@
 Void TAppEncTop::xSetRepFormat( TComVPS& vps )
 {
+#if H_MV_HLS_8_PMS_Q0195_20
+  vps.setRepFormatIdxPresentFlag( false ); 
+#else
   vps.setRepFormatIdxPresentFlag( true ); 
+#endif
   vps.setVpsNumRepFormatsMinus1 ( 0    ); 
 
@@ -1499,8 +1535,10 @@
   vps.setRepFormat( 0 , repFormat );
 
+#if !H_MV_HLS_8_PMS_Q0195_20
   for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ )
   {
     vps.setVpsRepFormatIdx( i , 0 ); 
   }
+#endif
 }
 
@@ -1513,14 +1551,30 @@
   assert ( dpbSize != 0 ); 
 
+#if H_MV_HLS_8_HRD_Q0102_08
+  for( Int i = 0; i < vps.getNumOutputLayerSets(); i++ )
+#else
   for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
+#endif
   {  
+#if H_MV_HLS_8_MIS_Q0102_30
+    Int currLsIdx = vps.olsIdxToLsIdx( i ); 
+#endif
     std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 
     Bool subLayerFlagInfoPresentFlag = false; 
 
+#if H_MV_HLS_8_MIS_Q0102_30
+    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
+#else
     for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
+#endif
     {   
       Bool subLayerDpbInfoPresentFlag = false; 
-      assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 
-      for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ )   
+#if H_MV_HLS_8_MIS_Q0102_30 || H_MV_HLS_8_DBP_NODOC_42
+      assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() ); 
+      for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ )   
+#else
+      assert( vps.getNumSubDpbs( vps.olsIdxToLsIdx( i ) ) == targetDecLayerIdList.size() ); 
+      for( Int k = 0; k < vps.getNumSubDpbs( vps.olsIdxToLsIdx( i )); k++ )   
+#endif
       {
         Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
@@ -1587,6 +1641,11 @@
   Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 
   // Additional output layer sets + profileLevelTierIdx
-  vps.setDefaultTargetOutputLayerIdc      ( m_defaultTargetOutputLayerIdc );   
-  vps.setNumAddOutputLayerSets            ( numAddOuputLayerSets          ); 
+  vps.setDefaultOutputLayerIdc      ( m_defaultOutputLayerIdc );   
+#if H_MV_HLS_8_SYN_39_19
+  vps.setNumAddLayerSets            ( 0                             );  
+  vps.setNumAddOlss                 ( numAddOuputLayerSets          ); 
+#else
+  vps.setNumAddLayerSets            ( numAddOuputLayerSets          ); 
+#endif
   vps.initTargetLayerIdLists(); 
 
@@ -1595,9 +1654,9 @@
     Int addOutLsIdx = olsIdx - m_vpsNumLayerSets;     
     
-    vps.setOutputLayerSetIdxMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ?  olsIdx  : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 
-
-    std::vector<Int>& layerIdList    = m_layerIdsInSets[ vps.getLayerSetIdxForOutputLayerSet( olsIdx ) ];
-
-    if (vps.getDefaultTargetOutputLayerIdc() == 2 || addOutLsIdx >= 0 )
+    vps.setLayerSetIdxForOlsMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ?  olsIdx  : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 
+
+    std::vector<Int>& layerIdList    = m_layerIdsInSets[ vps.olsIdxToLsIdx( olsIdx ) ];
+
+    if (vps.getDefaultOutputLayerIdc() == 2 || addOutLsIdx >= 0 )
     { 
       for ( Int i = 0; i < layerIdList.size(); i++)
@@ -1637,8 +1696,22 @@
       vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] ); 
     }
-
+#if H_MV_HLS_7_VPS_P0300_27
+    if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 && 
+        vps.getNumDirectRefLayers( vps.getOlsHighestOutputLayerId( olsIdx ) ) )
+    {   
+      vps.setAltOutputLayerFlag( olsIdx , m_altOutputLayerFlag[ olsIdx ]);
+    }
+    else
+    {
+      vps.setAltOutputLayerFlag( olsIdx , false );
+      if ( m_altOutputLayerFlag[ olsIdx ] )
+      {
+        printf( "\nWarning: Ignoring AltOutputLayerFlag for output layer set %d, since more than one output layer or no dependent layers.\n", olsIdx );            
+      }
+    }
+#else
     vps.setAltOutputLayerFlag( olsIdx , false);     
-  }
-
+#endif
+  }
 }
 
Index: branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncTop.h	(revision 961)
+++ branches/HTM-11.0-dev0/source/App/TAppEncoder/TAppEncTop.h	(revision 962)
@@ -75,5 +75,9 @@
 
   TComPicLists               m_ivPicLists;                  ///< picture buffers of encoder instances
+#if H_MV_HLS_8
+  TComVPS*                   m_vps;                         ///< vps
+#else
   TComVPS                    m_vps;                         ///< vps
+#endif
 #else
   TEncTop                    m_cTEncTop;                    ///< encoder class
