Index: /branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 164)
+++ /branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 165)
@@ -853,7 +853,16 @@
 #endif
   // Target output layer
+#if VPS_PROFILE_OUTPUT_LAYERS
+  vps->setNumOutputLayerSets(2);    // 2 including the default base-layer set.
+  vps->setNumProfileTierLevel(2);   // 1 for the enhancement layer
+  vps->setProfileLevelTierIdx(1, 1);
+  vps->setDefaultOneTargetOutputLayerFlag(true);
+  Int lsIdx = 1;
+  vps->setOutputLayerSetIdx(1, lsIdx); // Because only one layer set
+#else
   vps->setNumOutputLayerSets(1);
   Int lsIdx = 1;
   vps->setOutputLayerSetIdx(0, lsIdx); // Because only one layer set
+#endif
   // Include the highest layer as output layer 
   for(UInt layer=0; layer <= vps->getMaxLayerId() ; layer++)
Index: /branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 164)
+++ /branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 165)
@@ -1491,4 +1491,10 @@
 , m_numOutputLayerSets        (0)  
 #endif
+#if VPS_PROFILE_OUTPUT_LAYERS
+, m_numProfileTierLevel       (0)
+, m_moreOutputLayerSetsThanDefaultFlag (false)
+, m_numAddOutputLayerSets     (0)
+, m_defaultOneTargetOutputLayerFlag    (false)
+#endif
 {
   for( Int i = 0; i < MAX_TLAYER; i++)
@@ -1532,4 +1538,7 @@
   ::memset(m_layerSetLayerIdList,  0, sizeof(m_layerSetLayerIdList));
   ::memset(m_numLayerInIdList,     0, sizeof(m_numLayerInIdList   )); 
+#endif
+#if VPS_PROFILE_OUTPUT_LAYERS
+  ::memset(m_profileLevelTierIdx,  0, sizeof(m_profileLevelTierIdx));
 #endif
 }
Index: /branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 164)
+++ /branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 165)
@@ -550,5 +550,11 @@
   UInt       m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
 #endif
-
+#if VPS_PROFILE_OUTPUT_LAYERS
+  UInt       m_numProfileTierLevel;
+  Bool       m_moreOutputLayerSetsThanDefaultFlag;
+  Int        m_numAddOutputLayerSets;
+  Bool       m_defaultOneTargetOutputLayerFlag;
+  Int        m_profileLevelTierIdx[64];     
+#endif
 public:
   TComVPS();
@@ -682,4 +688,20 @@
   UInt   getRefLayerId(Int layerId, Int refLayerIdx)                            { return m_refLayerId[layerId][refLayerIdx];              }
   Void   setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId)           { m_refLayerId[layerId][refLayerIdx] = refLayerId;        }
+#endif
+#if VPS_PROFILE_OUTPUT_LAYERS
+  UInt   getNumProfileTierLevel()                                { return m_numProfileTierLevel; }
+  Void   setNumProfileTierLevel(Int x)                           { m_numProfileTierLevel = x;    }
+
+  Bool   getMoreOutputLayerSetsThanDefaultFlag()                 { return m_moreOutputLayerSetsThanDefaultFlag;}
+  Void   setMoreOutputLayerSetsThanDefaultFlag(Bool x)           { m_moreOutputLayerSetsThanDefaultFlag = x   ;}
+
+  Int    getNumAddOutputLayerSets()                              { return m_numAddOutputLayerSets; }
+  Void   setNumAddOutputLayerSets(Int x)                         { m_numAddOutputLayerSets = x   ; }
+
+  Bool   getDefaultOneTargetOutputLayerFlag()                 { return m_defaultOneTargetOutputLayerFlag;}
+  Void   setDefaultOneTargetOutputLayerFlag(Bool x)           { m_defaultOneTargetOutputLayerFlag= x    ;}
+
+  Int    getProfileLevelTierIdx(Int i)                        { return m_profileLevelTierIdx[i]; }
+  Void   setProfileLevelTierIdx(Int i, Int x)                 { m_profileLevelTierIdx[i] = x   ; }
 #endif
 };
Index: /branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 164)
+++ /branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 165)
@@ -54,6 +54,7 @@
 #define VPS_EXTN_DIRECT_REF_LAYERS       1      ///< Include indication of direct dependency of layers in VPS extension
 #define VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE   1
-#define VPS_OUTPUT_LAYER_SET_IDX         1      ///< Signal output_layer_set_idx[i] as output_layer_set_idx_minus1[i]
-#define VPS_MOVE_DIR_DEPENDENCY_FLAG     1      ///< Move the syntax element direct_dependency_flag to follow the syntax element dimension_id
+#define VPS_OUTPUT_LAYER_SET_IDX         1      ///< M0268: Signal output_layer_set_idx[i] as output_layer_set_idx_minus1[i]
+#define VPS_MOVE_DIR_DEPENDENCY_FLAG     1      ///< M0268: Move the syntax element direct_dependency_flag to follow the syntax element dimension_id
+#define VPS_PROFILE_OUTPUT_LAYERS        1      ///< M0268: Signal profile information and output layer information as in Sec. 3 of M0268v2
 #endif
 
Index: /branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 164)
+++ /branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 165)
@@ -927,13 +927,25 @@
 #endif
 #endif
+
 #if VPS_EXTN_PROFILE_INFO
   // Profile-tier-level signalling
+#if VPS_PROFILE_OUTPUT_LAYERS
+  READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" );     assert( uiCode == (vps->getNumLayerSets() - 1) );
+  READ_CODE(  6, uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 );
+  vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel());
+  for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
+#else
   vps->getPTLForExtnPtr()->resize(vps->getNumLayerSets());
   for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++)
+#endif
   {
     READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); vps->setProfilePresentFlag(idx, uiCode ? true : false);
     if( !vps->getProfilePresentFlag(idx) )
     {
+#if VPS_PROFILE_OUTPUT_LAYERS
+      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
+#else
       READ_UVLC( uiCode, "vps_profile_layer_set_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
+#endif
       assert( vps->getProfileLayerSetRef(idx) < idx );
       // Copy profile information as indicated 
@@ -944,4 +956,58 @@
 #endif
 
+#if VPS_PROFILE_OUTPUT_LAYERS
+  READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); vps->setMoreOutputLayerSetsThanDefaultFlag( uiCode ? true : false );
+  Int numOutputLayerSets = 0;
+  if(! vps->getMoreOutputLayerSetsThanDefaultFlag() )
+  {
+    numOutputLayerSets = vps->getNumLayerSets();
+  }
+  else
+  {
+    READ_CODE( 10, uiCode, "num_add_output_layer_sets" );          vps->setNumAddOutputLayerSets( uiCode );
+    numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets();
+  }
+  if( numOutputLayerSets > 1 )
+  {
+    READ_FLAG( uiCode, "default_one_target_output_layer_flag" );   vps->setDefaultOneTargetOutputLayerFlag( uiCode ? true : false );
+  }
+  vps->setNumOutputLayerSets( numOutputLayerSets );
+
+  for(i = 1; i < numOutputLayerSets; i++)
+  {
+    if( i > (vps->getNumLayerSets() - 1) )
+    {
+      Int numBits = std::max(1.0, ceil( log((double)vps->getNumLayerSets() - 1) / log(2.0) ));
+      READ_CODE( numBits, uiCode, "output_layer_set_idx_minus1");   vps->setOutputLayerSetIdx( i, uiCode + 1);
+      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->getDefaultOneTargetOutputLayerFlag() )
+      {
+        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
+        {
+          vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)));
+        }
+      }
+      else
+      {
+        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
+        {
+          vps->setOutputLayerFlag(i, j, 1);
+        }
+      }
+    }
+    Int numBits = std::max(1.0, ceil( log((double)vps->getNumProfileTierLevel()) / log(2.0) ));
+    READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
+  }
+#else
 #if VPS_EXTN_OP_LAYER_SETS
   // Target output layer signalling
@@ -962,6 +1028,8 @@
       }
     }
-  }  
-#endif
+  } 
+#endif
+#endif
+
 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG
 #if VPS_EXTN_DIRECT_REF_LAYERS
Index: /branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 164)
+++ /branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 165)
@@ -39,5 +39,5 @@
 #include "TEncCavlc.h"
 #include "SEIwrite.h"
-
+#include <iostream>
 //! \ingroup TLibEncoder
 //! \{
@@ -718,14 +718,53 @@
 #if VPS_EXTN_PROFILE_INFO
   // Profile-tier-level signalling
+#if VPS_PROFILE_OUTPUT_LAYERS
+  WRITE_CODE( vps->getNumLayerSets() - 1   , 10, "vps_number_layer_sets_minus1" );     
+  WRITE_CODE( vps->getNumProfileTierLevel() - 1,  6, "vps_num_profile_tier_level_minus1"); 
+  for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
+#else
   for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++)
+#endif
   {
     WRITE_FLAG( vps->getProfilePresentFlag(idx),       "vps_profile_present_flag[i]" );
     if( !vps->getProfilePresentFlag(idx) )
     {
+#if VPS_PROFILE_OUTPUT_LAYERS
+      WRITE_CODE( vps->getProfileLayerSetRef(idx) - 1, 6, "profile_ref_minus1[i]" );
+#else
       WRITE_UVLC( vps->getProfileLayerSetRef(idx) - 1, "vps_profile_layer_set_ref_minus1[i]" );
+#endif
     }
     codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
   }
 #endif
+
+#if VPS_PROFILE_OUTPUT_LAYERS
+  Int numOutputLayerSets = vps->getNumOutputLayerSets() ;
+  WRITE_FLAG(  (numOutputLayerSets > vps->getNumLayerSets()), "more_output_layer_sets_than_default_flag" ); 
+  if(numOutputLayerSets > vps->getNumLayerSets())
+  {
+    WRITE_CODE( numOutputLayerSets - vps->getNumLayerSets(), 10, "num_add_output_layer_sets" );
+  }
+  if( numOutputLayerSets > 1 )
+  {
+    WRITE_FLAG( vps->getDefaultOneTargetOutputLayerFlag(), "default_one_target_output_layer_flag" );   
+  }
+
+  for(i = 1; i < numOutputLayerSets; i++)
+  {
+    if( i > (vps->getNumLayerSets() - 1) )
+    {
+      Int numBits = std::max(1.0, ceil( log((double)vps->getNumLayerSets() - 1) / log(2.0) ));
+      WRITE_CODE( vps->getOutputLayerSetIdx(i) - 1, numBits, "output_layer_set_idx_minus1");  
+      Int lsIdx = vps->getOutputLayerSetIdx(i);
+      for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++)
+      {
+        WRITE_FLAG( vps->getOutputLayerFlag(i,j), "output_layer_flag[i][j]");
+      }
+    }
+    Int numBits = std::max(1.0, ceil( log((double)vps->getNumProfileTierLevel()) / log(2.0) ));
+    WRITE_CODE( vps->getProfileLevelTierIdx(i), numBits, "profile_level_tier_idx[i]" );     
+  }
+#else
 #if VPS_EXTN_OP_LAYER_SETS
   // Target output layer signalling
@@ -748,4 +787,5 @@
     }
   }
+#endif
 #endif
 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG
