Index: /branches/HTM-15.2-dev/cfg/3D-HEVC/baseCfg_2view+depth.cfg
===================================================================
--- /branches/HTM-15.2-dev/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 1379)
+++ /branches/HTM-15.2-dev/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 1380)
@@ -215,5 +215,5 @@
 IvMvScalingFlag                     : 1                # Interview motion vector scaling
 Log2SubPbSizeMinus3                 : 0                # Log2 of sub-PU size minus 3 for IvMvPred (0 ... 3) and smaller than or equal to log2(maxCUSize)-3
-Log2MpiSubPbSizeMinus3              : 3	               # Log2 of sub-PU size for MPI (3...6)
+Log2MpiSubPbSizeMinus3              : 0	               # Log2 of sub-PU size for MPI (3...6)
 DepthBasedBlkPartFlag               : 1                # Depth-based Block Partitioning
 
Index: /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_IBP_3view.cfg
===================================================================
--- /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_IBP_3view.cfg	(revision 1379)
+++ /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_IBP_3view.cfg	(revision 1380)
@@ -15,5 +15,5 @@
 #======== VPS / Output layer sets ================
 DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
-OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
+OutputLayerSetIdx             : 2 2          # Indices of layer sets used to derive additional output layer sets
 LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
 LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
@@ -29,5 +29,5 @@
 ProfileTierLevelIdx_1         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 1 (m) (should be -1, when layer is not necessary)
 ProfileTierLevelIdx_2         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 2 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_3         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_3         : 1 2 -1                     # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
 ProfileTierLevelIdx_4         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
 
Index: /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_IPB_on_IRAP_3view.cfg
===================================================================
--- /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_IPB_on_IRAP_3view.cfg	(revision 1379)
+++ /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_IPB_on_IRAP_3view.cfg	(revision 1380)
@@ -5,10 +5,9 @@
 LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
 LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 1
-LayerIdsInSet_2               : 0 2          # Indices in VPS of layers in layer set 2
-LayerIdsInSet_3               : 0 1 2        # Indices in VPS of layers in layer set 3
+LayerIdsInSet_2               : 0 1 2        # Indices in VPS of layers in layer set 2
 
 #======== VPS / Output layer sets ================
 DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
-OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
+OutputLayerSetIdx             : 2 2          # Indices of layer sets used to derive additional output layer sets
 LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
 LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
@@ -23,8 +22,7 @@
 ProfileTierLevelIdx_0         : 1                          # VpsProfileTierLevel indices of layers in output layer set 0 (m) (should be -1, when layer is not necessary)
 ProfileTierLevelIdx_1         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 1 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_2         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 2 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_3         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_4         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 4 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_5         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 5 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_3         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 2 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_4         : 1 2 -1                     # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_5         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 4 (m) (should be -1, when layer is not necessary)
 
 
Index: /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_PIP_on_IRAP_3view.cfg
===================================================================
--- /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_PIP_on_IRAP_3view.cfg	(revision 1379)
+++ /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/gopCfg_PIP_on_IRAP_3view.cfg	(revision 1380)
@@ -10,5 +10,5 @@
 #======== VPS / Output layer sets ================
 DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
-OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
+OutputLayerSetIdx             : 3 3          # Indices of layer sets used to derive additional output layer sets
 LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
 LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
@@ -25,6 +25,6 @@
 ProfileTierLevelIdx_2         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 2 (m) (should be -1, when layer is not necessary)
 ProfileTierLevelIdx_3         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_4         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 4 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_5         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 5 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_4         : 1 2 -1                     # VpsProfileTierLevel indices of layers in output layer set 4 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_5         : 1 -1 2                     # VpsProfileTierLevel indices of layers in output layer set 5 (m) (should be -1, when layer is not necessary)
 
 
Index: /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/layerwise_startup_IBP_3view.cfg
===================================================================
--- /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/layerwise_startup_IBP_3view.cfg	(revision 1379)
+++ /branches/HTM-15.2-dev/cfg/MV-HEVC/NonCTC/layerwise_startup_IBP_3view.cfg	(revision 1380)
@@ -15,5 +15,5 @@
 #======== VPS / Output layer sets ================
 DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
-OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
+OutputLayerSetIdx             : 2 2          # Indices of layer sets used to derive additional output layer sets
 LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
 LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
@@ -35,5 +35,5 @@
 ProfileTierLevelIdx_1         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 1 (m) (should be -1, when layer is not necessary)
 ProfileTierLevelIdx_2         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 2 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_3         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_3         : 1 2 -1                     # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
 ProfileTierLevelIdx_4         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
 
Index: /branches/HTM-15.2-dev/cfg/MV-HEVC/baseCfg_2view.cfg
===================================================================
--- /branches/HTM-15.2-dev/cfg/MV-HEVC/baseCfg_2view.cfg	(revision 1379)
+++ /branches/HTM-15.2-dev/cfg/MV-HEVC/baseCfg_2view.cfg	(revision 1380)
@@ -31,7 +31,4 @@
 DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
 
-OutputLayerSetIdx             : 1            # Indices of layer sets used to derive additional output layer sets
-LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
-
 #======== VPS / PTLI ================
 Profile                       : main main multiview-main   # Profile indication in VpsProfileTierLevel, per VpsProfileTierLevel syntax structure  (m) 
@@ -42,5 +39,4 @@
 ProfileTierLevelIdx_0         : 1                          # VpsProfileTierLevel indices of layers in output layer set 0 (m) (should be -1, when layer is not necessary)
 ProfileTierLevelIdx_1         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 1 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_2         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 2 (m) (should be -1, when layer is not necessary)
 
 #======== VPS / Dependencies ================
Index: /branches/HTM-15.2-dev/cfg/MV-HEVC/baseCfg_3view.cfg
===================================================================
--- /branches/HTM-15.2-dev/cfg/MV-HEVC/baseCfg_3view.cfg	(revision 1379)
+++ /branches/HTM-15.2-dev/cfg/MV-HEVC/baseCfg_3view.cfg	(revision 1380)
@@ -35,5 +35,5 @@
 DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
 
-OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
+OutputLayerSetIdx             : 3 3          # Indices of layer sets used to derive additional output layer sets
 LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
 LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
@@ -49,6 +49,6 @@
 ProfileTierLevelIdx_2         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 2 (m) (should be -1, when layer is not necessary)
 ProfileTierLevelIdx_3         : 1 2 2                      # VpsProfileTierLevel indices of layers in output layer set 3 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_4         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 4 (m) (should be -1, when layer is not necessary)
-ProfileTierLevelIdx_5         : 1 2                        # VpsProfileTierLevel indices of layers in output layer set 5 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_4         : 1 2 -1                     # VpsProfileTierLevel indices of layers in output layer set 4 (m) (should be -1, when layer is not necessary)
+ProfileTierLevelIdx_5         : 1 -1 2                     # VpsProfileTierLevel indices of layers in output layer set 5 (m) (should be -1, when layer is not necessary)
 
 #======== VPS / Dependencies ================
Index: /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1379)
+++ /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1380)
@@ -806,11 +806,11 @@
 #endif
 #if NH_MV
-  ("NumberOfLayers",        m_numberOfLayers     , 1,                     "Number of layers")
-#if !NH_3D
-  ("ScalabilityMask",       m_scalabilityMask    , 2                    , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary")    
-#else
-  ("ScalabilityMask",       m_scalabilityMask    , 3                    , "Scalability Mask, 1: Texture 3: Texture + Depth ")    
+  ("NumberOfLayers",                 m_numberOfLayers     , 1,                     "Number of layers")
+#if !NH_3D                           
+  ("ScalabilityMask",                m_scalabilityMask    , 2                    , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary")    
+#else                                
+  ("ScalabilityMask",                m_scalabilityMask    , 3                    , "Scalability Mask, 1: Texture 3: Texture + Depth ")    
 #endif  
-  ("DimensionIdLen",        m_dimensionIdLen     , cfg_dimensionLength  , "Number of bits used to store dimensions Id")
+  ("DimensionIdLen",                 m_dimensionIdLen     , cfg_dimensionLength  , "Number of bits used to store dimensions Id")
   ("ViewOrderIndex",                 m_viewOrderIndex              , IntAry1d(1,0),                                 "View Order Index per layer")
   ("ViewId",                         m_viewId                      , IntAry1d(1,0),                                 "View Id per View Order Index")
@@ -821,12 +821,12 @@
   ("TargetEncLayerIdList",           m_targetEncLayerIdList        , IntAry1d(0,0),                                 "LayerIds in Nuh to be encoded")  
   ("LayerIdInNuh",                   m_layerIdInNuh                , IntAry1d(1,0),                                 "LayerId in Nuh")  
-  ("SplittingFlag",         m_splittingFlag       , false                , "Splitting Flag")    
+  ("SplittingFlag",                  m_splittingFlag               , false,                                         "Splitting Flag")    
 
   // Layer Sets + Output Layer Sets + Profile Tier Level
-  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")    
-  ("LayerIdsInSet_%d"              , m_layerIdsInSets              , IntAry1d(1,0) , MAX_VPS_OP_SETS_PLUS1      ,   "LayerIds of Layer set")  
-  ("NumAddLayerSets"     , m_numAddLayerSets     , 0                                              , "NumAddLayerSets     ")
+  ("VpsNumLayerSets"               , m_vpsNumLayerSets             , 1                                          ,   "Number of layer sets")    
+  ("LayerIdsInSet_%d"              , m_layerIdxInVpsInSets         , IntAry1d(1,0) , MAX_VPS_OP_SETS_PLUS1      ,   "Layer indices in VPS of layers in layer set")  
+  ("NumAddLayerSets"               , m_numAddLayerSets             , 0 ,                                             "NumAddLayerSets     ")
   ("HighestLayerIdxPlus1_%d"       , m_highestLayerIdxPlus1        , IntAry1d(0,0) , MAX_VPS_NUM_ADD_LAYER_SETS ,   "HighestLayerIdxPlus1")
-  ("DefaultTargetOutputLayerIdc"     , m_defaultOutputLayerIdc     , 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           , IntAry1d(0,0)                              ,   "Indices of layer sets used as additional output layer sets")
   ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , IntAry1d(0,0) , MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set")  
@@ -2366,9 +2366,9 @@
     if (lsIdx == 0)
     {
-      xConfirmPara( m_layerIdsInSets[lsIdx].size() != 1 || m_layerIdsInSets[lsIdx][0] != 0 , "0-th layer shall only include layer 0. ");
-    }
-    for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ )
-    {
-      xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx][i] >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than 0 and less than MAX_NUM_LAYER_IDS" ); 
+      xConfirmPara( m_layerIdxInVpsInSets[lsIdx].size() != 1 || m_layerIdxInVpsInSets[lsIdx][0] != 0 , "0-th layer shall only include layer 0. ");
+    }
+    for ( Int i = 0; i < m_layerIdxInVpsInSets[lsIdx].size(); i++ )
+    {
+      xConfirmPara( m_layerIdxInVpsInSets[lsIdx][i] < 0 || m_layerIdxInVpsInSets[lsIdx][i] >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than 0 and less than MAX_NUM_LAYER_IDS" ); 
     }
   }
@@ -2403,7 +2403,7 @@
       {
         Bool inLayerSetFlag = false; 
-        for (Int j = 0; j < m_layerIdsInSets[ lsIdx].size(); j++ )
+        for (Int j = 0; j < m_layerIdxInVpsInSets[ lsIdx].size(); j++ )
         {
-          if ( m_layerIdsInSets[ lsIdx ][ j ] == m_layerIdsInDefOutputLayerSet[ lsIdx ][ i ] )
+          if ( m_layerIdxInVpsInSets[ lsIdx ][ j ] == m_layerIdsInDefOutputLayerSet[ lsIdx ][ i ] )
           {
             inLayerSetFlag = true; 
Index: /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1379)
+++ /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1380)
@@ -91,5 +91,5 @@
 // layer sets   
   Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
-  IntAry2d m_layerIdsInSets;           ///< LayerIds in vps of layer set 
+  IntAry2d m_layerIdxInVpsInSets;           ///< LayerIds in vps of layer set 
   Int                    m_numAddLayerSets;                    ///< Number of additional layer sets
   IntAry2d m_highestLayerIdxPlus1;      ///< HighestLayerIdxPlus1 for each additional layer set and each independent layer (value with index 0 will be ignored)
Index: /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1379)
+++ /branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1380)
@@ -188,23 +188,23 @@
   for (Int d = 0; d < 2; d++)
   {  
-    m_sps3dExtension.setIvMvPredFlag          ( d, m_ivMvPredFlag[d]       );
-    m_sps3dExtension.setIvMvScalingFlag       ( d, m_ivMvScalingFlag[d]    );
+    m_sps3dExtension.setIvDiMcEnabledFlag          ( d, m_ivMvPredFlag[d]       );
+    m_sps3dExtension.setIvMvScalEnabledFlag       ( d, m_ivMvScalingFlag[d]    );
     if (d == 0 )
     {    
-      m_sps3dExtension.setLog2SubPbSizeMinus3   ( d, m_log2SubPbSizeMinus3   );
-      m_sps3dExtension.setIvResPredFlag         ( d, m_ivResPredFlag         );
-      m_sps3dExtension.setDepthRefinementFlag   ( d, m_depthRefinementFlag   );
-      m_sps3dExtension.setViewSynthesisPredFlag ( d, m_viewSynthesisPredFlag );
-      m_sps3dExtension.setDepthBasedBlkPartFlag ( d, m_depthBasedBlkPartFlag );
+      m_sps3dExtension.setLog2IvmcSubPbSizeMinus3   ( d, m_log2SubPbSizeMinus3   );
+      m_sps3dExtension.setIvResPredEnabledFlag         ( d, m_ivResPredFlag         );
+      m_sps3dExtension.setDepthRefEnabledFlag   ( d, m_depthRefinementFlag   );
+      m_sps3dExtension.setVspMcEnabledFlag ( d, m_viewSynthesisPredFlag );
+      m_sps3dExtension.setDbbpEnabledFlag ( d, m_depthBasedBlkPartFlag );
     }
     else
     {    
-      m_sps3dExtension.setMpiFlag               ( d, m_mpiFlag               );
-      m_sps3dExtension.setLog2MpiSubPbSizeMinus3( d, m_log2MpiSubPbSizeMinus3);
-      m_sps3dExtension.setIntraContourFlag      ( d, m_intraContourFlag      );
-      m_sps3dExtension.setIntraSdcWedgeFlag     ( d, m_intraSdcFlag || m_intraWedgeFlag     );
-      m_sps3dExtension.setQtPredFlag            ( d, m_qtPredFlag            );
-      m_sps3dExtension.setInterSdcFlag          ( d, m_interSdcFlag          );
-      m_sps3dExtension.setDepthIntraSkipFlag    ( d, m_depthIntraSkipFlag    );  
+      m_sps3dExtension.setTexMcEnabledFlag               ( d, m_mpiFlag               );
+      m_sps3dExtension.setLog2TexmcSubPbSizeMinus3( d, m_log2MpiSubPbSizeMinus3);
+      m_sps3dExtension.setIntraContourEnabledFlag      ( d, m_intraContourFlag      );
+      m_sps3dExtension.setIntraDcOnlyWedgeEnabledFlag     ( d, m_intraSdcFlag || m_intraWedgeFlag     );
+      m_sps3dExtension.setCqtCuPartPredEnabledFlag            ( d, m_qtPredFlag            );
+      m_sps3dExtension.setInterDcOnlyEnabledFlag          ( d, m_interSdcFlag          );
+      m_sps3dExtension.setSkipIntraEnabledFlag    ( d, m_depthIntraSkipFlag    );  
     }
   }
@@ -2071,7 +2071,7 @@
       vps.setLayerIdIncludedFlag( false, lsIdx, layerId ); 
     }
-    for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++)
+    for ( Int i = 0; i < m_layerIdxInVpsInSets[lsIdx].size(); i++)
     {       
-      vps.setLayerIdIncludedFlag( true, lsIdx, vps.getLayerIdInNuh( m_layerIdsInSets[lsIdx][i] ) ); 
+      vps.setLayerIdIncludedFlag( true, lsIdx, vps.getLayerIdInNuh( m_layerIdxInVpsInSets[lsIdx][i] ) ); 
     } 
   }
Index: /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1379)
+++ /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1380)
@@ -5101,5 +5101,9 @@
 
   //// ******* Get disparity from left block ******* /////
+#if NH_3D_FIX_TICKET_91
+    pcTmpCU = getPULeft(uiIdx, uiPartIdxLB);
+#else
   pcTmpCU = getPULeft(uiIdx, uiPartIdxLB, true, false);
+#endif
   bCheckMcpDv = true; 
   if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_LEFT
Index: /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1379)
+++ /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1380)
@@ -1923,5 +1923,7 @@
   for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++)
   {
+#if !NH_3D_FIX_TICKET_107
     m_layerSetIdxForOlsMinus1[i]  = -1; 
+#endif
     for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++)
     {
@@ -4318,19 +4320,19 @@
   const TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension();
 
-  m_ivMvPredFlag           = sps3dExt->getIvMvPredFlag         ( depthFlag ) && nRLLG0                       ;                             
-  m_ivMvScalingFlag        = sps3dExt->getIvMvScalingFlag      ( depthFlag )                                 ;                             
-  m_ivResPredFlag          = sps3dExt->getIvResPredFlag        ( depthFlag ) && nRLLG0                       ;                               
-  m_depthRefinementFlag    = sps3dExt->getDepthRefinementFlag  ( depthFlag )           && getInCompPredFlag() && m_cpAvailableFlag;
-  m_viewSynthesisPredFlag  = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag;
-  m_depthBasedBlkPartFlag  = sps3dExt->getDepthBasedBlkPartFlag( depthFlag )           && getInCompPredFlag();                          
-  m_mpiFlag                = sps3dExt->getMpiFlag              ( depthFlag )           && getInCompPredFlag();
-  m_intraContourFlag       = sps3dExt->getIntraContourFlag     ( depthFlag )           && getInCompPredFlag();
-  m_intraSdcWedgeFlag      = sps3dExt->getIntraSdcWedgeFlag    ( depthFlag )                                 ;                          
-  m_qtPredFlag             = sps3dExt->getQtPredFlag           ( depthFlag )           && getInCompPredFlag();
-  m_interSdcFlag           = sps3dExt->getInterSdcFlag         ( depthFlag )                                 ;  
-  m_depthIntraSkipFlag     = sps3dExt->getDepthIntraSkipFlag   ( depthFlag )                                 ;                          
-
-  m_subPbSize              =  1 << ( sps3dExt->getLog2SubPbSizeMinus3   ( depthFlag ) + 3 );  
-  m_mpiSubPbSize           =  1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 );
+  m_ivMvPredFlag           = sps3dExt->getIvDiMcEnabledFlag          ( depthFlag ) && nRLLG0                       ;                             
+  m_ivMvScalingFlag        = sps3dExt->getIvMvScalEnabledFlag        ( depthFlag )                                 ;                             
+  m_ivResPredFlag          = sps3dExt->getIvResPredEnabledFlag       ( depthFlag ) && nRLLG0                       ;                               
+  m_depthRefinementFlag    = sps3dExt->getDepthRefEnabledFlag        ( depthFlag )           && getInCompPredFlag() && m_cpAvailableFlag;
+  m_viewSynthesisPredFlag  = sps3dExt->getVspMcEnabledFlag           ( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag;
+  m_depthBasedBlkPartFlag  = sps3dExt->getDbbpEnabledFlag            ( depthFlag )           && getInCompPredFlag();                          
+  m_mpiFlag                = sps3dExt->getTexMcEnabledFlag           ( depthFlag )           && getInCompPredFlag();
+  m_intraContourFlag       = sps3dExt->getIntraContourEnabledFlag    ( depthFlag )           && getInCompPredFlag();
+  m_intraSdcWedgeFlag      = sps3dExt->getIntraDcOnlyWedgeEnabledFlag( depthFlag )                                 ;                          
+  m_qtPredFlag             = sps3dExt->getCqtCuPartPredEnabledFlag   ( depthFlag )           && getInCompPredFlag();
+  m_interSdcFlag           = sps3dExt->getInterDcOnlyEnabledFlag     ( depthFlag )                                 ;  
+  m_depthIntraSkipFlag     = sps3dExt->getSkipIntraEnabledFlag       ( depthFlag )                                 ;                          
+
+  m_subPbSize              =  1 << ( sps3dExt->getLog2IvmcSubPbSizeMinus3 ( depthFlag ) + 3 );  
+  m_mpiSubPbSize           =  1 << ( sps3dExt->getLog2TexmcSubPbSizeMinus3( depthFlag ) + 3 );
 
 
@@ -4413,13 +4415,13 @@
     if( !getIsDepth() )
     {
-      m_inCmpPredAvailFlag = sps3dExt->getViewSynthesisPredFlag( getIsDepth() ) || 
-        sps3dExt->getDepthBasedBlkPartFlag( getIsDepth() ) || 
-        sps3dExt->getDepthRefinementFlag  ( getIsDepth() );                            
+      m_inCmpPredAvailFlag = sps3dExt->getVspMcEnabledFlag( getIsDepth() ) || 
+        sps3dExt->getDbbpEnabledFlag( getIsDepth() ) || 
+        sps3dExt->getDepthRefEnabledFlag  ( getIsDepth() );                            
     }
     else
     {
-      m_inCmpPredAvailFlag = sps3dExt->getIntraContourFlag( getIsDepth() ) || 
-        sps3dExt->getQtPredFlag( getIsDepth() ) || 
-        sps3dExt->getMpiFlag( getIsDepth() );                                  
+      m_inCmpPredAvailFlag = sps3dExt->getIntraContourEnabledFlag( getIsDepth() ) || 
+        sps3dExt->getCqtCuPartPredEnabledFlag( getIsDepth() ) || 
+        sps3dExt->getTexMcEnabledFlag( getIsDepth() );                                  
     }
   }
Index: /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1379)
+++ /branches/HTM-15.2-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1380)
@@ -1811,78 +1811,78 @@
     for (Int d = 0; d < 2; d++)
     {
-      m_ivMvPredFlag          [d] = false; 
-      m_ivMvScalingFlag       [d] = false; 
-      m_log2SubPbSizeMinus3   [d] = 3; 
-      m_ivResPredFlag         [d] = false; 
-      m_depthRefinementFlag   [d] = false; 
-      m_viewSynthesisPredFlag [d] = false; 
-      m_depthBasedBlkPartFlag [d] = false; 
-      m_mpiFlag               [d] = false; 
-      m_log2MpiSubPbSizeMinus3[d] = 3; 
-      m_intraContourFlag      [d] = false; 
-      m_intraSdcWedgeFlag     [d] = false; 
-      m_qtPredFlag            [d] = false; 
-      m_interSdcFlag          [d] = false; 
-      m_depthIntraSkipFlag    [d] = false;   
+      m_ivDiMcEnabledFlag          [d] = false; 
+      m_ivMvScalEnabledFlag       [d] = false; 
+      m_log2IvmcSubPbSizeMinus3   [d] = 3; 
+      m_ivResPredEnabledFlag         [d] = false; 
+      m_depthRefEnabledFlag   [d] = false; 
+      m_vspMcEnabledFlag [d] = false; 
+      m_dbbpEnabledFlag [d] = false; 
+      m_texMcEnabledFlag               [d] = false; 
+      m_log2TexmcSubPbSizeMinus3[d] = 3; 
+      m_intraContourEnabledFlag      [d] = false; 
+      m_intraDcOnlyWedgeEnabledFlag     [d] = false; 
+      m_cqtCuPartPredEnabledFlag            [d] = false; 
+      m_interDcOnlyEnabledFlag          [d] = false; 
+      m_skipIntraEnabledFlag    [d] = false;   
     }
   }
 
-  Void          setIvMvPredFlag( Int d, Bool flag )         { m_ivMvPredFlag[d] = flag;             }
-  Bool          getIvMvPredFlag( Int d ) const              { return m_ivMvPredFlag[d];             }
-
-  Void          setIvMvScalingFlag( Int d, Bool flag )      { m_ivMvScalingFlag[d] = flag;          }
-  Bool          getIvMvScalingFlag( Int d ) const           { return m_ivMvScalingFlag[d];          }
-
-  Void          setLog2SubPbSizeMinus3( Int d, Int  val )   { m_log2SubPbSizeMinus3[d] = val;       }
-  Int           getLog2SubPbSizeMinus3( Int d ) const       { return m_log2SubPbSizeMinus3[d];      }
-
-  Void          setIvResPredFlag( Int d, Bool flag )        { m_ivResPredFlag[d] = flag;            }
-  Bool          getIvResPredFlag( Int d ) const             { return m_ivResPredFlag[d];            }
-
-  Void          setDepthRefinementFlag( Int d, Bool flag )  { m_depthRefinementFlag[d] = flag;      }
-  Bool          getDepthRefinementFlag( Int d ) const       { return m_depthRefinementFlag[d];      }
-
-  Void          setViewSynthesisPredFlag( Int d, Bool flag ) { m_viewSynthesisPredFlag[d] = flag;   }
-  Bool          getViewSynthesisPredFlag( Int d ) const     { return m_viewSynthesisPredFlag[d];    }
-
-  Void          setDepthBasedBlkPartFlag( Int d, Bool flag ) { m_depthBasedBlkPartFlag[d] = flag;   }
-  Bool          getDepthBasedBlkPartFlag( Int d ) const     { return m_depthBasedBlkPartFlag[d];    }
-
-  Void          setMpiFlag( Int d, Bool flag )              { m_mpiFlag[d] = flag;                  }
-  Bool          getMpiFlag( Int d ) const                   { return m_mpiFlag[d];                  }
-
-  Void          setLog2MpiSubPbSizeMinus3( Int d, Int  val ) { m_log2MpiSubPbSizeMinus3[d] = val;   }
-  Int           getLog2MpiSubPbSizeMinus3( Int d ) const    { return m_log2MpiSubPbSizeMinus3[d];   }
-
-  Void          setIntraContourFlag( Int d, Bool flag )     { m_intraContourFlag[d] = flag;         }
-  Bool          getIntraContourFlag( Int d ) const          { return m_intraContourFlag[d];         }
-
-  Void          setIntraSdcWedgeFlag( Int d, Bool flag )    { m_intraSdcWedgeFlag[d] = flag;        }
-  Bool          getIntraSdcWedgeFlag( Int d ) const         { return m_intraSdcWedgeFlag[d];        }
-
-  Void          setQtPredFlag( Int d, Bool flag )           { m_qtPredFlag[d] = flag;               }
-  Bool          getQtPredFlag( Int d ) const                { return m_qtPredFlag[d];               }
-
-  Void          setInterSdcFlag( Int d, Bool flag )         { m_interSdcFlag[d] = flag;             }
-  Bool          getInterSdcFlag( Int d ) const              { return m_interSdcFlag[d];             }
-
-  Void          setDepthIntraSkipFlag( Int d, Bool flag )   { m_depthIntraSkipFlag[d] = flag;       }
-  Bool          getDepthIntraSkipFlag( Int d ) const        { return m_depthIntraSkipFlag[d];       }
+  Void          setIvDiMcEnabledFlag( Int d, Bool flag )        { m_ivDiMcEnabledFlag[d] = flag;             }
+  Bool          getIvDiMcEnabledFlag( Int d ) const             { return m_ivDiMcEnabledFlag[d];             }
+
+  Void          setIvMvScalEnabledFlag( Int d, Bool flag )      { m_ivMvScalEnabledFlag[d] = flag;          }
+  Bool          getIvMvScalEnabledFlag( Int d ) const           { return m_ivMvScalEnabledFlag[d];          }
+
+  Void          setLog2IvmcSubPbSizeMinus3( Int d, Int  val )   { m_log2IvmcSubPbSizeMinus3[d] = val;       }
+  Int           getLog2IvmcSubPbSizeMinus3( Int d ) const       { return m_log2IvmcSubPbSizeMinus3[d];      }
+
+  Void          setIvResPredEnabledFlag( Int d, Bool flag )     { m_ivResPredEnabledFlag[d] = flag;            }
+  Bool          getIvResPredEnabledFlag( Int d ) const          { return m_ivResPredEnabledFlag[d];            }
+
+  Void          setDepthRefEnabledFlag( Int d, Bool flag )      { m_depthRefEnabledFlag[d] = flag;      }
+  Bool          getDepthRefEnabledFlag( Int d ) const           { return m_depthRefEnabledFlag[d];      }
+
+  Void          setVspMcEnabledFlag( Int d, Bool flag )         { m_vspMcEnabledFlag[d] = flag;   }
+  Bool          getVspMcEnabledFlag( Int d ) const              { return m_vspMcEnabledFlag[d];    }
+
+  Void          setDbbpEnabledFlag( Int d, Bool flag )          { m_dbbpEnabledFlag[d] = flag;   }
+  Bool          getDbbpEnabledFlag( Int d ) const               { return m_dbbpEnabledFlag[d];    }
+
+  Void          setTexMcEnabledFlag( Int d, Bool flag )         { m_texMcEnabledFlag[d] = flag;                  }
+  Bool          getTexMcEnabledFlag( Int d ) const              { return m_texMcEnabledFlag[d];                  }
+
+  Void          setLog2TexmcSubPbSizeMinus3( Int d, Int  val )  { m_log2TexmcSubPbSizeMinus3[d] = val;   }
+  Int           getLog2TexmcSubPbSizeMinus3( Int d ) const      { return m_log2TexmcSubPbSizeMinus3[d];   }
+
+  Void          setIntraContourEnabledFlag( Int d, Bool flag )  { m_intraContourEnabledFlag[d] = flag;         }
+  Bool          getIntraContourEnabledFlag( Int d ) const       { return m_intraContourEnabledFlag[d];         }
+
+  Void          setIntraDcOnlyWedgeEnabledFlag( Int d, Bool flag ) { m_intraDcOnlyWedgeEnabledFlag[d] = flag;        }
+  Bool          getIntraDcOnlyWedgeEnabledFlag( Int d ) const      { return m_intraDcOnlyWedgeEnabledFlag[d];        }
+
+  Void          setCqtCuPartPredEnabledFlag( Int d, Bool flag )    { m_cqtCuPartPredEnabledFlag[d] = flag;               }
+  Bool          getCqtCuPartPredEnabledFlag( Int d ) const         { return m_cqtCuPartPredEnabledFlag[d];               }
+
+  Void          setInterDcOnlyEnabledFlag( Int d, Bool flag )      { m_interDcOnlyEnabledFlag[d] = flag;             }
+  Bool          getInterDcOnlyEnabledFlag( Int d ) const           { return m_interDcOnlyEnabledFlag[d];             }
+
+  Void          setSkipIntraEnabledFlag( Int d, Bool flag )        { m_skipIntraEnabledFlag[d] = flag;       }
+  Bool          getSkipIntraEnabledFlag( Int d ) const             { return m_skipIntraEnabledFlag[d];       }
 private:
 
-  Bool        m_ivMvPredFlag          [2];
-  Bool        m_ivMvScalingFlag       [2];
-  Int         m_log2SubPbSizeMinus3   [2];
-  Bool        m_ivResPredFlag         [2];
-  Bool        m_depthRefinementFlag   [2];
-  Bool        m_viewSynthesisPredFlag [2];
-  Bool        m_depthBasedBlkPartFlag [2];
-  Bool        m_mpiFlag               [2];
-  Int         m_log2MpiSubPbSizeMinus3[2];
-  Bool        m_intraContourFlag      [2];
-  Bool        m_intraSdcWedgeFlag     [2];
-  Bool        m_qtPredFlag            [2];
-  Bool        m_interSdcFlag          [2];
-  Bool        m_depthIntraSkipFlag    [2];  
+  Bool        m_ivDiMcEnabledFlag          [2];
+  Bool        m_ivMvScalEnabledFlag        [2];
+  Int         m_log2IvmcSubPbSizeMinus3    [2];
+  Bool        m_ivResPredEnabledFlag       [2];
+  Bool        m_depthRefEnabledFlag        [2];
+  Bool        m_vspMcEnabledFlag           [2];
+  Bool        m_dbbpEnabledFlag            [2];
+  Bool        m_texMcEnabledFlag           [2];
+  Int         m_log2TexmcSubPbSizeMinus3   [2];
+  Bool        m_intraContourEnabledFlag    [2];
+  Bool        m_intraDcOnlyWedgeEnabledFlag[2];
+  Bool        m_cqtCuPartPredEnabledFlag   [2];
+  Bool        m_interDcOnlyEnabledFlag     [2];
+  Bool        m_skipIntraEnabledFlag       [2];  
 };
 
Index: /branches/HTM-15.2-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-15.2-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1379)
+++ /branches/HTM-15.2-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1380)
@@ -53,5 +53,5 @@
 */
 #ifndef HEVC_EXT
-#define HEVC_EXT                    2
+#define HEVC_EXT                    1
 #endif
 #if ( HEVC_EXT < 0 )||( HEVC_EXT > 2 )
@@ -64,10 +64,11 @@
 /////////////////////////////////////////////////////////////////////////////////////////
 #if NH_MV
-
-// Things that needs to be fixed in the Specification: 
+// Recent bug fixes
+#define NH_3D_FIX_TICKET_107                     1 // Clean up. 
+#define NH_3D_FIX_TICKET_91                      1 // NBDV availability in case of tiles.
+// Things that needs to be fixed also in the Specification ...
 #define NH_MV_FIX_NO_REF_PICS_CHECK               1 // !!SPEC!!
 #define NH_MV_FIX_INIT_NUM_ACTIVE_REF_LAYER_PICS  1 // Derivation of NumActiveRefLayerPIcs. !!SPEC!!
 #define NH_MV_FIX_NUM_POC_TOTAL_CUR               1 // Derivation of NumPocTotalCur for IDR pictures. !!SPEC!!
-
 // To be done 
 #define NH_MV_HLS_PTL_LIMITS                       0
@@ -278,19 +279,14 @@
                                               // HHI_CAM_PARA_K0052
                                               // H_3D_DIRECT_DEP_TYPE
-
 #endif // NH_3D
-
 #if NH_MV
 ////////////////////////
 /// Consider Removal 
 ////////////////////////
-
 // Rate Control
 #define KWU_FIX_URQ                       0
 #define KWU_RC_VIEWRC_E0227               0  ///< JCT3V-E0227, view-wise target bitrate allocation
 #define KWU_RC_MADPRED_E0227              0  ///< JCT3V-E0227, inter-view MAD prediction
-
 #define NH_MV_HLS_PTL_LIMITS               0
-
 #if NH_3D
 // Unclear Fix
@@ -333,5 +329,4 @@
 #define DBBP_INVALID_SHORT                (-4)
 #endif
-
 /////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////   HM RELATED DEFINES ////////////////////////////////
@@ -488,5 +483,4 @@
 typedef std::vector< std::string > StringAry1d;
 typedef std::vector< StringAry1d > StringAry2d;
-
 typedef std::vector< Int >        IntAry1d;
 typedef std::vector< IntAry1d >   IntAry2d;
@@ -494,5 +488,4 @@
 typedef std::vector< IntAry3d >   IntAry4d;
 typedef std::vector< IntAry4d >   IntAry5d;
-
 typedef std::vector< Bool >        BoolAry1d;
 typedef std::vector< BoolAry1d >   BoolAry2d;
Index: /branches/HTM-15.2-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-15.2-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1379)
+++ /branches/HTM-15.2-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1380)
@@ -1165,14 +1165,14 @@
     if ( pcSPS->getSpsRangeExtensionsFlag() )
     {
-              TComSPSRExt &spsRangeExtension = pcSPS->getSpsRangeExtension();
-              READ_FLAG( uiCode, "transform_skip_rotation_enabled_flag");     spsRangeExtension.setTransformSkipRotationEnabledFlag(uiCode != 0);
-              READ_FLAG( uiCode, "transform_skip_context_enabled_flag");      spsRangeExtension.setTransformSkipContextEnabledFlag (uiCode != 0);
-              READ_FLAG( uiCode, "implicit_rdpcm_enabled_flag");              spsRangeExtension.setRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT, (uiCode != 0));
-              READ_FLAG( uiCode, "explicit_rdpcm_enabled_flag");              spsRangeExtension.setRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT, (uiCode != 0));
-              READ_FLAG( uiCode, "extended_precision_processing_flag");       spsRangeExtension.setExtendedPrecisionProcessingFlag (uiCode != 0);
-              READ_FLAG( uiCode, "intra_smoothing_disabled_flag");            spsRangeExtension.setIntraSmoothingDisabledFlag      (uiCode != 0);
-              READ_FLAG( uiCode, "high_precision_offsets_enabled_flag");      spsRangeExtension.setHighPrecisionOffsetsEnabledFlag (uiCode != 0);
-              READ_FLAG( uiCode, "persistent_rice_adaptation_enabled_flag");  spsRangeExtension.setPersistentRiceAdaptationEnabledFlag (uiCode != 0);
-              READ_FLAG( uiCode, "cabac_bypass_alignment_enabled_flag");      spsRangeExtension.setCabacBypassAlignmentEnabledFlag  (uiCode != 0);
+      TComSPSRExt &spsRangeExtension = pcSPS->getSpsRangeExtension();
+      READ_FLAG( uiCode, "transform_skip_rotation_enabled_flag");     spsRangeExtension.setTransformSkipRotationEnabledFlag(uiCode != 0);
+      READ_FLAG( uiCode, "transform_skip_context_enabled_flag");      spsRangeExtension.setTransformSkipContextEnabledFlag (uiCode != 0);
+      READ_FLAG( uiCode, "implicit_rdpcm_enabled_flag");              spsRangeExtension.setRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT, (uiCode != 0));
+      READ_FLAG( uiCode, "explicit_rdpcm_enabled_flag");              spsRangeExtension.setRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT, (uiCode != 0));
+      READ_FLAG( uiCode, "extended_precision_processing_flag");       spsRangeExtension.setExtendedPrecisionProcessingFlag (uiCode != 0);
+      READ_FLAG( uiCode, "intra_smoothing_disabled_flag");            spsRangeExtension.setIntraSmoothingDisabledFlag      (uiCode != 0);
+      READ_FLAG( uiCode, "high_precision_offsets_enabled_flag");      spsRangeExtension.setHighPrecisionOffsetsEnabledFlag (uiCode != 0);
+      READ_FLAG( uiCode, "persistent_rice_adaptation_enabled_flag");  spsRangeExtension.setPersistentRiceAdaptationEnabledFlag (uiCode != 0);
+      READ_FLAG( uiCode, "cabac_bypass_alignment_enabled_flag");      spsRangeExtension.setCabacBypassAlignmentEnabledFlag  (uiCode != 0);
     }
 
@@ -1277,23 +1277,23 @@
   for( Int d = 0; d  <=  1; d++ )
   {
-    READ_FLAG( uiCode, "iv_mv_pred_flag" ); sps3dExt.setIvMvPredFlag( d, uiCode == 1 );
-    READ_FLAG( uiCode, "iv_mv_scaling_flag" ); sps3dExt.setIvMvScalingFlag( d, uiCode == 1 );
+    READ_FLAG( uiCode, "iv_di_mc_enabled_flag" );              sps3dExt.setIvDiMcEnabledFlag( d, uiCode == 1 );
+    READ_FLAG( uiCode, "iv_mv_scal_enabled_flag" );            sps3dExt.setIvMvScalEnabledFlag( d, uiCode == 1 );
     if( d  ==  0 )
     {
-      READ_UVLC( uiCode, "log2_sub_pb_size_minus3" ); sps3dExt.setLog2SubPbSizeMinus3( d, uiCode );
-      READ_FLAG( uiCode, "iv_res_pred_flag" ); sps3dExt.setIvResPredFlag( d, uiCode == 1 );
-      READ_FLAG( uiCode, "depth_refinement_flag" ); sps3dExt.setDepthRefinementFlag( d, uiCode == 1 );
-      READ_FLAG( uiCode, "view_synthesis_pred_flag" ); sps3dExt.setViewSynthesisPredFlag( d, uiCode == 1 );
-      READ_FLAG( uiCode, "depth_based_blk_part_flag" ); sps3dExt.setDepthBasedBlkPartFlag( d, uiCode == 1 );
+      READ_UVLC( uiCode, "log2_sub_pb_size_minus3" );          sps3dExt.setLog2IvmcSubPbSizeMinus3( d, uiCode );
+      READ_FLAG( uiCode, "iv_res_pred_enabled_flag" );         sps3dExt.setIvResPredEnabledFlag( d, uiCode == 1 );
+      READ_FLAG( uiCode, "depth_ref_enabled_flag" );           sps3dExt.setDepthRefEnabledFlag( d, uiCode == 1 );
+      READ_FLAG( uiCode, "vsp_mc_enabled_flag" );              sps3dExt.setVspMcEnabledFlag( d, uiCode == 1 );
+      READ_FLAG( uiCode, "dbbp_enabled_flag" );                sps3dExt.setDbbpEnabledFlag( d, uiCode == 1 );
     }
     else 
     {
-      READ_FLAG( uiCode, "mpi_flag" ); sps3dExt.setMpiFlag( d, uiCode == 1 );
-      READ_UVLC( uiCode, "log2_mpi_sub_pb_size_minus3" ); sps3dExt.setLog2MpiSubPbSizeMinus3( d, uiCode );
-      READ_FLAG( uiCode, "intra_contour_flag" ); sps3dExt.setIntraContourFlag( d, uiCode == 1 );
-      READ_FLAG( uiCode, "intra_sdc_wedge_flag" ); sps3dExt.setIntraSdcWedgeFlag( d, uiCode == 1 );
-      READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt.setQtPredFlag( d, uiCode == 1 );
-      READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt.setInterSdcFlag( d, uiCode == 1 );
-      READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt.setDepthIntraSkipFlag( d, uiCode == 1 );
+      READ_FLAG( uiCode, "tex_mc_enabled_flag" );              sps3dExt.setTexMcEnabledFlag( d, uiCode == 1 );
+      READ_UVLC( uiCode, "log2_texmc_sub_pb_size_minus3" );    sps3dExt.setLog2TexmcSubPbSizeMinus3( d, uiCode );
+      READ_FLAG( uiCode, "intra_contour_enabled_flag" );       sps3dExt.setIntraContourEnabledFlag( d, uiCode == 1 );
+      READ_FLAG( uiCode, "intra_dc_only_wedge_enabled_flag" ); sps3dExt.setIntraDcOnlyWedgeEnabledFlag( d, uiCode == 1 );
+      READ_FLAG( uiCode, "cqt_cu_part_pred_enabled_flag" );    sps3dExt.setCqtCuPartPredEnabledFlag( d, uiCode == 1 );
+      READ_FLAG( uiCode, "inter_dc_only_enabled_flag" );       sps3dExt.setInterDcOnlyEnabledFlag( d, uiCode == 1 );
+      READ_FLAG( uiCode, "skip_intra_enabled_flag" );          sps3dExt.setSkipIntraEnabledFlag( d, uiCode == 1 );
     }
   }
Index: /branches/HTM-15.2-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-15.2-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1379)
+++ /branches/HTM-15.2-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1380)
@@ -349,27 +349,27 @@
     if ( pcPPS->getPpsRangeExtensionsFlag() )
     { 
-              const TComPPSRExt &ppsRangeExtension = pcPPS->getPpsRangeExtension();
-              if (pcPPS->getUseTransformSkip())
-              {
-                WRITE_UVLC( ppsRangeExtension.getLog2MaxTransformSkipBlockSize()-2,            "log2_max_transform_skip_block_size_minus2");
-              }
-
-              WRITE_FLAG((ppsRangeExtension.getCrossComponentPredictionEnabledFlag() ? 1 : 0), "cross_component_prediction_enabled_flag" );
-
-              WRITE_FLAG(UInt(ppsRangeExtension.getChromaQpOffsetListEnabledFlag()),           "chroma_qp_offset_list_enabled_flag" );
-              if (ppsRangeExtension.getChromaQpOffsetListEnabledFlag())
-              {
-                WRITE_UVLC(ppsRangeExtension.getDiffCuChromaQpOffsetDepth(),                   "diff_cu_chroma_qp_offset_depth");
-                WRITE_UVLC(ppsRangeExtension.getChromaQpOffsetListLen() - 1,                   "chroma_qp_offset_list_len_minus1");
-                /* skip zero index */
-                for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx < ppsRangeExtension.getChromaQpOffsetListLen(); cuChromaQpOffsetIdx++)
-                {
-                  WRITE_SVLC(ppsRangeExtension.getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CbOffset,     "cb_qp_offset_list[i]");
-                  WRITE_SVLC(ppsRangeExtension.getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CrOffset,     "cr_qp_offset_list[i]");
-                }
-              }
-
-              WRITE_UVLC( ppsRangeExtension.getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA),           "log2_sao_offset_scale_luma"   );
-              WRITE_UVLC( ppsRangeExtension.getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA),         "log2_sao_offset_scale_chroma" );
+      const TComPPSRExt &ppsRangeExtension = pcPPS->getPpsRangeExtension();
+      if (pcPPS->getUseTransformSkip())
+      {
+        WRITE_UVLC( ppsRangeExtension.getLog2MaxTransformSkipBlockSize()-2,            "log2_max_transform_skip_block_size_minus2");
+      }
+
+      WRITE_FLAG((ppsRangeExtension.getCrossComponentPredictionEnabledFlag() ? 1 : 0), "cross_component_prediction_enabled_flag" );
+
+      WRITE_FLAG(UInt(ppsRangeExtension.getChromaQpOffsetListEnabledFlag()),           "chroma_qp_offset_list_enabled_flag" );
+      if (ppsRangeExtension.getChromaQpOffsetListEnabledFlag())
+      {
+        WRITE_UVLC(ppsRangeExtension.getDiffCuChromaQpOffsetDepth(),                   "diff_cu_chroma_qp_offset_depth");
+        WRITE_UVLC(ppsRangeExtension.getChromaQpOffsetListLen() - 1,                   "chroma_qp_offset_list_len_minus1");
+        /* skip zero index */
+        for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx < ppsRangeExtension.getChromaQpOffsetListLen(); cuChromaQpOffsetIdx++)
+        {
+          WRITE_SVLC(ppsRangeExtension.getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CbOffset,     "cb_qp_offset_list[i]");
+          WRITE_SVLC(ppsRangeExtension.getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CrOffset,     "cr_qp_offset_list[i]");
+        }
+      }
+
+      WRITE_UVLC( ppsRangeExtension.getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA),           "log2_sao_offset_scale_luma"   );
+      WRITE_UVLC( ppsRangeExtension.getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA),         "log2_sao_offset_scale_chroma" );
     }
 
@@ -990,23 +990,23 @@
   for( Int d = 0; d  <=  1; d++ )
   {
-    WRITE_FLAG( sps3dExt->getIvMvPredFlag( d ) ? 1 : 0 , "iv_mv_pred_flag" );
-    WRITE_FLAG( sps3dExt->getIvMvScalingFlag( d ) ? 1 : 0 , "iv_mv_scaling_flag" );
+    WRITE_FLAG( sps3dExt->getIvDiMcEnabledFlag( d ) ? 1 : 0 , "iv_di_mc_enabled_flag" );
+    WRITE_FLAG( sps3dExt->getIvMvScalEnabledFlag( d ) ? 1 : 0 , "iv_mv_scal_enabled_flag" );
     if( d  ==  0 )
     {
-      WRITE_UVLC( sps3dExt->getLog2SubPbSizeMinus3( d ), "log2_sub_pb_size_minus3" );
-      WRITE_FLAG( sps3dExt->getIvResPredFlag( d ) ? 1 : 0 , "iv_res_pred_flag" );
-      WRITE_FLAG( sps3dExt->getDepthRefinementFlag( d ) ? 1 : 0 , "depth_refinement_flag" );
-      WRITE_FLAG( sps3dExt->getViewSynthesisPredFlag( d ) ? 1 : 0 , "view_synthesis_pred_flag" );
-      WRITE_FLAG( sps3dExt->getDepthBasedBlkPartFlag( d ) ? 1 : 0 , "depth_based_blk_part_flag" );
+      WRITE_UVLC( sps3dExt->getLog2IvmcSubPbSizeMinus3( d ), "log2_sub_pb_size_minus3" );
+      WRITE_FLAG( sps3dExt->getIvResPredEnabledFlag( d ) ? 1 : 0 , "iv_res_pred_enabled_flag" );
+      WRITE_FLAG( sps3dExt->getDepthRefEnabledFlag( d ) ? 1 : 0 , "depth_ref_enabled_flag" );
+      WRITE_FLAG( sps3dExt->getVspMcEnabledFlag( d ) ? 1 : 0 , "vsp_mc_enabled_flag" );
+      WRITE_FLAG( sps3dExt->getDbbpEnabledFlag( d ) ? 1 : 0 , "dbbp_enabled_flag" );
     }
     else 
     {
-      WRITE_FLAG( sps3dExt->getMpiFlag( d ) ? 1 : 0 , "mpi_flag" );
-      WRITE_UVLC( sps3dExt->getLog2MpiSubPbSizeMinus3( d ), "log2_mpi_sub_pb_size_minus3" );
-      WRITE_FLAG( sps3dExt->getIntraContourFlag( d ) ? 1 : 0 , "intra_contour_flag" );
-      WRITE_FLAG( sps3dExt->getIntraSdcWedgeFlag( d ) ? 1 : 0 , "intra_sdc_wedge_flag" );
-      WRITE_FLAG( sps3dExt->getQtPredFlag( d ) ? 1 : 0 , "qt_pred_flag" );
-      WRITE_FLAG( sps3dExt->getInterSdcFlag( d ) ? 1 : 0 , "inter_sdc_flag" );
-      WRITE_FLAG( sps3dExt->getDepthIntraSkipFlag( d ) ? 1 : 0 , "intra_skip_flag" );
+      WRITE_FLAG( sps3dExt->getTexMcEnabledFlag( d ) ? 1 : 0 , "tex_mc_enabled_flag" );
+      WRITE_UVLC( sps3dExt->getLog2TexmcSubPbSizeMinus3( d ), "log2_texmc_sub_pb_size_minus3" );
+      WRITE_FLAG( sps3dExt->getIntraContourEnabledFlag( d ) ? 1 : 0 , "intra_contour_enabled_flag" );
+      WRITE_FLAG( sps3dExt->getIntraDcOnlyWedgeEnabledFlag( d ) ? 1 : 0 , "intra_dc_only_wedge_enabled_flag" );
+      WRITE_FLAG( sps3dExt->getCqtCuPartPredEnabledFlag( d ) ? 1 : 0 , "cqt_cu_part_pred_enabled_flag" );
+      WRITE_FLAG( sps3dExt->getInterDcOnlyEnabledFlag( d ) ? 1 : 0 , "inter_dc_only_enabled_flag" );
+      WRITE_FLAG( sps3dExt->getSkipIntraEnabledFlag( d ) ? 1 : 0 , "skip_intra_enabled_flag" );
     }
   }
