Index: branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 576)
+++ branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 577)
@@ -1145,8 +1145,12 @@
   vps->setNumOutputLayerSets(vps->getNumLayerSets());
   vps->setNumProfileTierLevel(vps->getNumLayerSets());
+#if P0295_DEFAULT_OUT_LAYER_IDC
+  vps->setDefaultTargetOutputLayerIdc(1);
+#else
 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
   vps->setDefaultOneTargetOutputLayerIdc(1);
 #else
   vps->setDefaultOneTargetOutputLayerFlag(true);
+#endif
 #endif
   for(i = 1; i < vps->getNumLayerSets(); i++)
Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 576)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 577)
@@ -1967,8 +1967,12 @@
 #endif
 , m_numAddOutputLayerSets     (0)
+#if P0295_DEFAULT_OUT_LAYER_IDC
+, m_defaultTargetOutputLayerIdc     (0)
+#else
 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
 , m_defaultOneTargetOutputLayerIdc     (0)
 #else
 , m_defaultOneTargetOutputLayerFlag    (false)
+#endif
 #endif
 #if VPS_VUI_BITRATE_PICRATE
Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 576)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 577)
@@ -544,8 +544,12 @@
 #endif
   Int        m_numAddOutputLayerSets;
+#if P0295_DEFAULT_OUT_LAYER_IDC
+  UInt       m_defaultTargetOutputLayerIdc;
+#else
 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
   UInt       m_defaultOneTargetOutputLayerIdc;
 #else
   Bool       m_defaultOneTargetOutputLayerFlag;
+#endif
 #endif
   Int        m_profileLevelTierIdx[64];     
@@ -834,4 +838,8 @@
   Void   setNumAddOutputLayerSets(Int x)                         { m_numAddOutputLayerSets = x   ; }
 
+#if P0295_DEFAULT_OUT_LAYER_IDC
+  UInt   getDefaultTargetOutputLayerIdc()                 { return m_defaultTargetOutputLayerIdc;}
+  Void   setDefaultTargetOutputLayerIdc(UInt x)           { m_defaultTargetOutputLayerIdc = x    ;}
+#else
 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
   UInt   getDefaultOneTargetOutputLayerIdc()                 { return m_defaultOneTargetOutputLayerIdc;}
@@ -840,4 +848,5 @@
   Bool   getDefaultOneTargetOutputLayerFlag()                 { return m_defaultOneTargetOutputLayerFlag;}
   Void   setDefaultOneTargetOutputLayerFlag(Bool x)           { m_defaultOneTargetOutputLayerFlag= x    ;}
+#endif
 #endif
   Int    getProfileLevelTierIdx(Int i)                        { return m_profileLevelTierIdx[i]; }
Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 576)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 577)
@@ -64,4 +64,5 @@
 #endif
 
+#define P0295_DEFAULT_OUT_LAYER_IDC      1      ///< JCTVC-P0295: modifify default_one_target_output_layer_idc to default_target_output_layer_idc
 #define O0109_DEFAULT_ONE_OUT_LAYER_IDC  1      ///< JCTVC-O0109: default_one_target_output_layer_flag to default_one_target_output_layer_idc
 #define O0109_MOVE_VPS_VUI_FLAG          1      ///< JCTVC-O0109: move vps_vui_present_flag before vps_vui_offset
Index: branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 576)
+++ branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 577)
@@ -1206,4 +1206,63 @@
   Int numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets();
 #endif
+
+#if P0295_DEFAULT_OUT_LAYER_IDC
+  if( numOutputLayerSets > 1 )
+  {
+    READ_CODE( 2, uiCode, "default_target_output_layer_idc" );   vps->setDefaultTargetOutputLayerIdc( uiCode );
+  }
+  vps->setNumOutputLayerSets( numOutputLayerSets );
+
+  for(i = 1; i < numOutputLayerSets; i++)
+  {
+    if( i > (vps->getNumLayerSets() - 1) )
+    {
+      Int numBits = 1;
+      while ((1 << numBits) < (vps->getNumLayerSets() - 1))
+      {
+        numBits++;
+      }
+      READ_CODE( numBits, uiCode, "output_layer_set_idx_minus1");   vps->setOutputLayerSetIdx( i, uiCode + 1);
+    }
+    else
+    {
+      vps->setOutputLayerSetIdx( i, i );
+    }
+    if ( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 )
+    {
+      Int lsIdx = vps->getOutputLayerSetIdx(i);
+      for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++)
+      {
+        READ_FLAG( uiCode, "output_layer_flag[i][j]"); vps->setOutputLayerFlag(i, j, uiCode);
+      }
+    }
+    else
+    {
+      // i <= (vps->getNumLayerSets() - 1)
+      // Assign OutputLayerFlag depending on default_one_target_output_layer_flag
+      Int lsIdx = i;
+      if( vps->getDefaultTargetOutputLayerIdc() == 1 )
+      {
+        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
+        {
+          vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)) && (vps->getDimensionId(j,1) == 0) );
+        }
+      }
+      else if ( vps->getDefaultTargetOutputLayerIdc() == 0 )
+      {
+        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
+        {
+          vps->setOutputLayerFlag(i, j, 1);
+        }
+      }
+    }
+    Int numBits = 1;
+    while ((1 << numBits) < (vps->getNumProfileTierLevel()))
+    {
+      numBits++;
+    }
+    READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
+  }
+#else
   if( numOutputLayerSets > 1 )
   {
@@ -1287,4 +1346,5 @@
     READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
   }
+#endif
 
 #if O0153_ALT_OUTPUT_LAYER_FLAG
Index: branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 576)
+++ branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 577)
@@ -965,4 +965,7 @@
   if( numOutputLayerSets > 1 )
   {
+#if P0295_DEFAULT_OUT_LAYER_IDC
+    WRITE_CODE( vps->getDefaultTargetOutputLayerIdc(), 2, "default_target_output_layer_idc" );   
+#else
 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     WRITE_CODE( vps->getDefaultOneTargetOutputLayerIdc(), 2, "default_one_target_output_layer_idc" );   
@@ -970,4 +973,5 @@
     WRITE_FLAG( vps->getDefaultOneTargetOutputLayerFlag(), "default_one_target_output_layer_flag" );   
 #endif
+#endif
   }
 
@@ -981,5 +985,10 @@
         numBits++;
       }
-      WRITE_CODE( vps->getOutputLayerSetIdx(i) - 1, numBits, "output_layer_set_idx_minus1");  
+      WRITE_CODE( vps->getOutputLayerSetIdx(i) - 1, numBits, "output_layer_set_idx_minus1"); 
+#if P0295_DEFAULT_OUT_LAYER_IDC
+    }
+    if ( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 ) //Instead of == 2, >= 2 is used to follow the agreement that value 3 should be interpreted as 2
+    {
+#endif
       Int lsIdx = vps->getOutputLayerSetIdx(i);
       for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++)
