Index: /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 567)
+++ /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 568)
@@ -1327,8 +1327,10 @@
   vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch);
 #endif
+#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
 #if !VPS_EXTN_OFFSET_CALC
 #if VPS_EXTN_OFFSET
   // to be updated according to the current semantics
   vps->setExtensionOffset( 0xffff );
+#endif
 #endif
 #endif
Index: /branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 567)
+++ /branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 568)
@@ -483,6 +483,8 @@
   Int         m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1];
 #endif
+#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
 #if VPS_EXTN_OFFSET
   UInt        m_extensionOffset;
+#endif
 #endif
 #if VPS_RENAME
@@ -980,7 +982,9 @@
   Int     scalTypeToScalIdx( ScalabilityType scalType );
 #endif
+#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
 #if VPS_EXTN_OFFSET
   Int     getExtensionOffset()                 { return m_extensionOffset;   }
   Void    setExtensionOffset( UInt offset )    { m_extensionOffset = offset; }
+#endif
 #endif
 #if O0215_PHASE_ALIGNMENT
Index: /branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 567)
+++ /branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 568)
@@ -126,4 +126,5 @@
 #endif
 
+#define P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED        1   ///< JCTVC-P0125 -- Keep it as a reserved FFFF value --- The following two macros (VPS_EXTN_OFFSET & VPS_EXTN_OFFSET_CALC) will have no effect when this macro is set to 1.
 #define VPS_EXTN_OFFSET                  1      ///< implementation of vps_extension_offset syntax element
 #define VPS_EXTN_OFFSET_CALC             1      ///< Calculation of VPS extension offset
Index: /branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 567)
+++ /branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 568)
@@ -847,6 +847,10 @@
   READ_FLAG(     uiCode,  "vps_temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
   assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
+#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
 #if VPS_EXTN_OFFSET
   READ_CODE( 16, uiCode,  "vps_extension_offset" );               pcVPS->setExtensionOffset( uiCode );
+#else
+  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
+#endif
 #else
   READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
Index: /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 567)
+++ /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 568)
@@ -637,6 +637,8 @@
 Void TEncCavlc::codeVPS( TComVPS* pcVPS )
 {
+#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
 #if VPS_EXTN_OFFSET_CALC
   UInt numBytesInVps = this->m_pcBitIf->getNumberOfWrittenBits();
+#endif
 #endif
 #if !P0307_REMOVE_VPS_VUI_OFFSET
@@ -655,6 +657,10 @@
   WRITE_FLAG( pcVPS->getTemporalNestingFlag(),                "vps_temporal_id_nesting_flag" );
   assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
+#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
 #if VPS_EXTN_OFFSET
   WRITE_CODE( pcVPS->getExtensionOffset(),         16,        "vps_extension_offset" );
+#else
+  WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
+#endif
 #else
   WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
@@ -748,8 +754,10 @@
       WRITE_FLAG(1,                  "vps_extension_alignment_bit_equal_to_one");
     }
+#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
 #if VPS_EXTN_OFFSET_CALC
     Int vpsExntOffsetValueInBits = this->m_pcBitIf->getNumberOfWrittenBits() - numBytesInVps + 16; // 2 bytes for NUH
     assert( vpsExntOffsetValueInBits % 8 == 0 );
     pcVPS->setExtensionOffset( vpsExntOffsetValueInBits >> 3 );
+#endif
 #endif
     codeVPSExtension(pcVPS);
Index: /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 567)
+++ /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 568)
@@ -1697,8 +1697,10 @@
       // The following code also calculates the VPS VUI offset
 #endif
+#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
 #if VPS_EXTN_OFFSET_CALC
       OutputNALUnit tempNalu(NAL_UNIT_VPS, 0, 0        ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0.
       m_pcEntropyCoder->setBitstream(&tempNalu.m_Bitstream);
       m_pcEntropyCoder->encodeVPS(m_pcEncTop->getVPS());  // Use to calculate the VPS extension offset
+#endif
 #endif
       m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
