Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 847)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 848)
@@ -2115,7 +2115,13 @@
   UInt retVal, layerId = getLayerId();
 #if O0096_REP_FORMAT_INDEX
+#if R0279_REP_FORMAT_INBL
+  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
+  {
+    if( layerId == 0 && vps->getAvcBaseLayerFlag() )
+#else
   if ( layerId == 0 )
   {
     if( vps->getAvcBaseLayerFlag() )
+#endif
     {
       retVal = vps->getVpsRepFormat(layerId)->getPicWidthVpsInLumaSamples();
@@ -2148,7 +2154,13 @@
   UInt retVal, layerId = getLayerId();
 #if O0096_REP_FORMAT_INDEX
-  if( layerId == 0 )
+#if R0279_REP_FORMAT_INBL
+  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
+  {
+    if( layerId == 0 && vps->getAvcBaseLayerFlag() )
+#else
+  if ( layerId == 0 )
   {
     if( vps->getAvcBaseLayerFlag() )
+#endif
     {
       retVal = vps->getVpsRepFormat(layerId)->getPicHeightVpsInLumaSamples();
@@ -2190,7 +2202,13 @@
 #endif
 #if O0096_REP_FORMAT_INDEX
-  if( layerId == 0 )
+#if R0279_REP_FORMAT_INBL
+  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
+  {
+    if( layerId == 0 && vps->getAvcBaseLayerFlag() )
+#else
+  if ( layerId == 0 )
   {
     if( vps->getAvcBaseLayerFlag() )
+#endif
     {
       retVal = vps->getVpsRepFormat(layerId)->getChromaFormatVpsIdc();
@@ -2223,5 +2241,9 @@
   UInt retVal, layerId = getLayerId();
 #if O0096_REP_FORMAT_INDEX
-  if( layerId == 0 )
+#if R0279_REP_FORMAT_INBL
+  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
+#else
+  if ( layerId == 0 )
+#endif
   {
     retVal = sps->getBitDepthY();
@@ -2249,5 +2271,9 @@
   UInt retVal, layerId = getLayerId();
 #if O0096_REP_FORMAT_INDEX
-  if( layerId == 0 )
+#if R0279_REP_FORMAT_INBL
+  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
+#else
+  if ( layerId == 0 )
+#endif
   {
     retVal = sps->getBitDepthC();
@@ -2996,4 +3022,7 @@
 , m_chromaFormatIdc           (CHROMA_420)
 , m_uiMaxTLayers              (  1)
+#if R0279_REP_FORMAT_INBL
+, m_bV1CompatibleSPSFlag      (  0)
+#endif
 // Structure
 , m_picWidthInLumaSamples     (352)
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 847)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 848)
@@ -1456,4 +1456,8 @@
   UInt        m_uiMaxTLayers;           // maximum number of temporal layers
 
+#if R0279_REP_FORMAT_INBL
+  Bool        m_bV1CompatibleSPSFlag;
+#endif
+
   // Structure
   UInt        m_picWidthInLumaSamples;
@@ -1565,5 +1569,10 @@
   static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc];      }
 #endif
-  
+
+#if R0279_REP_FORMAT_INBL //These two functions shall be used / called when the syntax element sps_ext_or_max_sub_layers_minus1 and V1CompatibleSPSFlag are implemented
+  Bool getV1CompatibleSPSFlag()        {return m_bV1CompatibleSPSFlag;}
+  Void setV1CompatibleSPSFlag(Bool x)       { m_bV1CompatibleSPSFlag = x;}
+#endif
+
   // structure
   Void setPicWidthInLumaSamples       ( UInt u ) { m_picWidthInLumaSamples = u;        }
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 847)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 848)
@@ -51,4 +51,5 @@
 #define O0137_MAX_LAYERID                1      ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1
 
+#define R0279_REP_FORMAT_INBL            1      ///< JCTVC-R0279, For any independent non-base layer the used representation format is the one that is signalled in the active SPS for the layer
 #define R0227_VUI_BSP_HRD_FLAG           1      ///< JCTVC-R0227, Conformance checking such that VPS VUI HRD only present if VPS timing info is signalled
 #define R0227_REP_FORMAT_CONSTRAINT      1      ///< JCTVC-R0227, Conformance checking such that representation format of a particular layer shall not be greater than the one defined in VPS for that layer
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 847)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 848)
@@ -2530,4 +2530,13 @@
   TComVPS* vps = NULL;
   vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId());
+#if R0279_REP_FORMAT_INBL
+  if ( vps->getVpsExtensionFlag() == 1 && (rpcSlice->getLayerId() == 0 || sps->getV1CompatibleSPSFlag() == 1) )
+  {
+    assert( sps->getPicWidthInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getPicWidthVpsInLumaSamples() );
+    assert( sps->getPicHeightInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getPicHeightVpsInLumaSamples() );
+    assert( sps->getChromaFormatIdc() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getChromaFormatVpsIdc() );
+    assert( sps->getBitDepthY() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getBitDepthVpsLuma() );
+    assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getBitDepthVpsChroma() );
+#else
   if ( rpcSlice->getLayerId() == 0 && vps->getVpsExtensionFlag() == 1 )
   {
@@ -2537,4 +2546,5 @@
     assert( sps->getBitDepthY() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsLuma() );
     assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsChroma() );
+#endif
   }
   else if ( vps->getVpsExtensionFlag() == 1 )
