Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 575)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 576)
@@ -1963,5 +1963,7 @@
 #endif
 , m_numProfileTierLevel       (0)
+#if !VPS_EXTN_UEV_CODING
 , m_moreOutputLayerSetsThanDefaultFlag (false)
+#endif
 , m_numAddOutputLayerSets     (0)
 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 575)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 576)
@@ -540,5 +540,7 @@
 #endif
   UInt       m_numProfileTierLevel;
+#if !VPS_EXTN_UEV_CODING
   Bool       m_moreOutputLayerSetsThanDefaultFlag;
+#endif
   Int        m_numAddOutputLayerSets;
 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
@@ -824,6 +826,8 @@
   Void   setNumProfileTierLevel(Int x)                           { m_numProfileTierLevel = x;    }
 
+#if !VPS_EXTN_UEV_CODING
   Bool   getMoreOutputLayerSetsThanDefaultFlag()                 { return m_moreOutputLayerSetsThanDefaultFlag;}
   Void   setMoreOutputLayerSetsThanDefaultFlag(Bool x)           { m_moreOutputLayerSetsThanDefaultFlag = x   ;}
+#endif
 
   Int    getNumAddOutputLayerSets()                              { return m_numAddOutputLayerSets; }
Index: branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 575)
+++ branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 576)
@@ -55,5 +55,5 @@
 
 #define DISCARDABLE_PIC_RPS              1      ///< JCTVC-P0130: Inter-layer RPS and temporal RPS should not contain picture with discardable_flag equal to 1
-
+#define VPS_EXTN_UEV_CODING              1      ///< JCTVC-P0306: Code some syntax elements as ue(v), and remove some syntax elements that duplicate behaviour
 #define O0109_O0199_FLAGS_TO_VUI         1      ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui
 #define O0109_VIEW_ID_LEN                1      ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews
Index: branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 575)
+++ branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 576)
@@ -1160,6 +1160,10 @@
 #if VPS_EXTN_PROFILE_INFO
   // Profile-tier-level signalling
+#if !VPS_EXTN_UEV_CODING
   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 );
+#else
+  READ_UVLC(  uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 );
+#endif
   vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel());
   for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
@@ -1186,4 +1190,5 @@
 #endif
 
+#if !VPS_EXTN_UEV_CODING
   READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); vps->setMoreOutputLayerSetsThanDefaultFlag( uiCode ? true : false );
   Int numOutputLayerSets = 0;
@@ -1197,4 +1202,8 @@
     numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets();
   }
+#else
+  READ_UVLC( uiCode, "num_add_output_layer_sets" );          vps->setNumAddOutputLayerSets( uiCode );
+  Int numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets();
+#endif
   if( numOutputLayerSets > 1 )
   {
@@ -1294,5 +1303,9 @@
   {
 #if O0096_REP_FORMAT_INDEX
+#if !VPS_EXTN_UEV_CODING
     READ_CODE( 8, uiCode, "vps_num_rep_formats_minus1" );
+#else
+    READ_UVLC( uiCode, "vps_num_rep_formats_minus1" );
+#endif
 #else
     READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" );
@@ -1321,5 +1334,14 @@
       {
 #if O0096_REP_FORMAT_INDEX
+#if !VPS_EXTN_UEV_CODING
         READ_CODE( 8, uiCode, "vps_rep_format_idx[i]" );
+#else
+        Int numBits = 1;
+        while ((1 << numBits) < (vps->getVpsNumRepFormats()))
+        {
+          numBits++;
+        }
+        READ_CODE( numBits, uiCode, "vps_rep_format_idx[i]" );
+#endif
 #else
         READ_CODE( 4, uiCode, "vps_rep_format_idx[i]" );
Index: branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 575)
+++ branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 576)
@@ -932,6 +932,10 @@
 #if VPS_EXTN_PROFILE_INFO
   // Profile-tier-level signalling
+#if !VPS_EXTN_UEV_CODING
   WRITE_CODE( vps->getNumLayerSets() - 1   , 10, "vps_number_layer_sets_minus1" );     
   WRITE_CODE( vps->getNumProfileTierLevel() - 1,  6, "vps_num_profile_tier_level_minus1"); 
+#else
+  WRITE_UVLC( vps->getNumProfileTierLevel() - 1, "vps_num_profile_tier_level_minus1"); 
+#endif
   for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
   {
@@ -947,4 +951,5 @@
 #endif
 
+#if !VPS_EXTN_UEV_CODING
   Int numOutputLayerSets = vps->getNumOutputLayerSets() ;
   WRITE_FLAG(  (numOutputLayerSets > vps->getNumLayerSets()), "more_output_layer_sets_than_default_flag" ); 
@@ -953,4 +958,9 @@
     WRITE_CODE( numOutputLayerSets - vps->getNumLayerSets(), 10, "num_add_output_layer_sets" );
   }
+#else
+  Int numOutputLayerSets = vps->getNumOutputLayerSets() ;
+  assert( numOutputLayerSets - vps->getNumLayerSets() >= 0 );
+  WRITE_UVLC( numOutputLayerSets - vps->getNumLayerSets(), "num_add_output_layer_sets" );
+#endif
   if( numOutputLayerSets > 1 )
   {
@@ -999,5 +1009,9 @@
   {
 #if O0096_REP_FORMAT_INDEX
+#if !VPS_EXTN_UEV_CODING
     WRITE_CODE( vps->getVpsNumRepFormats() - 1, 8, "vps_num_rep_formats_minus1" );
+#else
+    WRITE_UVLC( vps->getVpsNumRepFormats() - 1, "vps_num_rep_formats_minus1" );
+#endif
 #else
     WRITE_CODE( vps->getVpsNumRepFormats() - 1, 4, "vps_num_rep_formats_minus1" );
@@ -1017,5 +1031,14 @@
       {
 #if O0096_REP_FORMAT_INDEX
+#if !VPS_EXTN_UEV_CODING
         WRITE_CODE( vps->getVpsRepFormatIdx(i), 8, "vps_rep_format_idx[i]" );
+#else
+        Int numBits = 1;
+        while ((1 << numBits) < (vps->getVpsNumRepFormats()))
+        {
+          numBits++;
+        }
+        WRITE_CODE( vps->getVpsRepFormatIdx(i), numBits, "vps_rep_format_idx[i]" );
+#endif
 #else
         WRITE_CODE( vps->getVpsRepFormatIdx(i), 4, "vps_rep_format_idx[i]" );
