Index: branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 375)
+++ branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 376)
@@ -1806,94 +1806,105 @@
 
   TimingInfo *timingInfo = vui->getTimingInfo();
-  timingInfo->setTimingInfoPresentFlag( true );
-  switch( frameRate )
-  {
-  case 24:
-    timingInfo->setNumUnitsInTick( 1125000 );    timingInfo->setTimeScale    ( 27000000 );
-    break;
-  case 25:
-    timingInfo->setNumUnitsInTick( 1080000 );    timingInfo->setTimeScale    ( 27000000 );
-    break;
-  case 30:
-    timingInfo->setNumUnitsInTick( 900900 );     timingInfo->setTimeScale    ( 27000000 );
-    break;
-  case 50:
-    timingInfo->setNumUnitsInTick( 540000 );     timingInfo->setTimeScale    ( 27000000 );
-    break;
-  case 60:
-    timingInfo->setNumUnitsInTick( 450450 );     timingInfo->setTimeScale    ( 27000000 );
-    break;
-  default:
-    timingInfo->setNumUnitsInTick( 1001 );       timingInfo->setTimeScale    ( 60000 );
-    break;
-  }
-
-  Bool rateCnt = ( bitRate > 0 );
-  hrd->setNalHrdParametersPresentFlag( rateCnt );
-  hrd->setVclHrdParametersPresentFlag( rateCnt );
-
-  hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) );
-
-  if( hrd->getSubPicCpbParamsPresentFlag() )
-  {
-    hrd->setTickDivisorMinus2( 100 - 2 );                          // 
-    hrd->setDuCpbRemovalDelayLengthMinus1( 7 );                    // 8-bit precision ( plus 1 for last DU in AU )
-    hrd->setSubPicCpbParamsInPicTimingSEIFlag( true );
-    hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 );                 // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay
+#if TIMING_INFO_NONZERO_LAYERID_SPS
+  if( getLayerId() > 0 )
+  {
+    timingInfo->setTimingInfoPresentFlag( false );
   }
   else
   {
-    hrd->setSubPicCpbParamsInPicTimingSEIFlag( false );  
-  }
-
-  hrd->setBitRateScale( 4 );                                       // in units of 2~( 6 + 4 ) = 1,024 bps
-  hrd->setCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
-  hrd->setDuCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
+#endif
+    timingInfo->setTimingInfoPresentFlag( true );
+    switch( frameRate )
+    {
+    case 24:
+      timingInfo->setNumUnitsInTick( 1125000 );    timingInfo->setTimeScale    ( 27000000 );
+      break;
+    case 25:
+      timingInfo->setNumUnitsInTick( 1080000 );    timingInfo->setTimeScale    ( 27000000 );
+      break;
+    case 30:
+      timingInfo->setNumUnitsInTick( 900900 );     timingInfo->setTimeScale    ( 27000000 );
+      break;
+    case 50:
+      timingInfo->setNumUnitsInTick( 540000 );     timingInfo->setTimeScale    ( 27000000 );
+      break;
+    case 60:
+      timingInfo->setNumUnitsInTick( 450450 );     timingInfo->setTimeScale    ( 27000000 );
+      break;
+    default:
+      timingInfo->setNumUnitsInTick( 1001 );       timingInfo->setTimeScale    ( 60000 );
+      break;
+    }
+
+    Bool rateCnt = ( bitRate > 0 );
+    hrd->setNalHrdParametersPresentFlag( rateCnt );
+    hrd->setVclHrdParametersPresentFlag( rateCnt );
+
+    hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) );
+
+    if( hrd->getSubPicCpbParamsPresentFlag() )
+    {
+      hrd->setTickDivisorMinus2( 100 - 2 );                          // 
+      hrd->setDuCpbRemovalDelayLengthMinus1( 7 );                    // 8-bit precision ( plus 1 for last DU in AU )
+      hrd->setSubPicCpbParamsInPicTimingSEIFlag( true );
+      hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 );                 // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay
+    }
+    else
+    {
+      hrd->setSubPicCpbParamsInPicTimingSEIFlag( false );  
+    }
+
+    hrd->setBitRateScale( 4 );                                       // in units of 2~( 6 + 4 ) = 1,024 bps
+    hrd->setCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
+    hrd->setDuCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
   
-  hrd->setInitialCpbRemovalDelayLengthMinus1(15);                  // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit
-  if( randomAccess )
-  {
-    hrd->setCpbRemovalDelayLengthMinus1(5);                        // 32 = 2^5 (plus 1)
-    hrd->setDpbOutputDelayLengthMinus1 (5);                        // 32 + 3 = 2^6
-  }
-  else
-  {
-    hrd->setCpbRemovalDelayLengthMinus1(9);                        // max. 2^10
-    hrd->setDpbOutputDelayLengthMinus1 (9);                        // max. 2^10
-  }
-
-/*
-   Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported.
-*/
-  Int i, j;
-  UInt birateValue, cpbSizeValue;
-  UInt ducpbSizeValue;
-  UInt duBitRateValue = 0;
-
-  for( i = 0; i < MAX_TLAYER; i ++ )
-  {
-    hrd->setFixedPicRateFlag( i, 1 );
-    hrd->setPicDurationInTcMinus1( i, 0 );
-    hrd->setLowDelayHrdFlag( i, 0 );
-    hrd->setCpbCntMinus1( i, 0 );
-
-    birateValue  = bitRate;
-    cpbSizeValue = bitRate;                                     // 1 second
-    ducpbSizeValue = bitRate/numDU;
-    duBitRateValue = bitRate;
-    for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ )
-    {
-      hrd->setBitRateValueMinus1( i, j, 0, ( birateValue  - 1 ) );
-      hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) );
-      hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) );
-      hrd->setCbrFlag( i, j, 0, ( j == 0 ) );
-
-      hrd->setBitRateValueMinus1( i, j, 1, ( birateValue  - 1) );
-      hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) );
-      hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) );
-      hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) );
-      hrd->setCbrFlag( i, j, 1, ( j == 0 ) );
-    }
-  }
+    hrd->setInitialCpbRemovalDelayLengthMinus1(15);                  // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit
+    if( randomAccess )
+    {
+      hrd->setCpbRemovalDelayLengthMinus1(5);                        // 32 = 2^5 (plus 1)
+      hrd->setDpbOutputDelayLengthMinus1 (5);                        // 32 + 3 = 2^6
+    }
+    else
+    {
+      hrd->setCpbRemovalDelayLengthMinus1(9);                        // max. 2^10
+      hrd->setDpbOutputDelayLengthMinus1 (9);                        // max. 2^10
+    }
+
+  /*
+     Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported.
+  */
+    Int i, j;
+    UInt birateValue, cpbSizeValue;
+    UInt ducpbSizeValue;
+    UInt duBitRateValue = 0;
+
+    for( i = 0; i < MAX_TLAYER; i ++ )
+    {
+      hrd->setFixedPicRateFlag( i, 1 );
+      hrd->setPicDurationInTcMinus1( i, 0 );
+      hrd->setLowDelayHrdFlag( i, 0 );
+      hrd->setCpbCntMinus1( i, 0 );
+
+      birateValue  = bitRate;
+      cpbSizeValue = bitRate;                                     // 1 second
+      ducpbSizeValue = bitRate/numDU;
+      duBitRateValue = bitRate;
+      for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ )
+      {
+        hrd->setBitRateValueMinus1( i, j, 0, ( birateValue  - 1 ) );
+        hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) );
+        hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) );
+        hrd->setCbrFlag( i, j, 0, ( j == 0 ) );
+
+        hrd->setBitRateValueMinus1( i, j, 1, ( birateValue  - 1) );
+        hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) );
+        hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) );
+        hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) );
+        hrd->setCbrFlag( i, j, 1, ( j == 0 ) );
+      }
+    }
+#if TIMING_INFO_NONZERO_LAYERID_SPS
+  }
+#endif
 }
 const Int TComSPS::m_winUnitX[]={1,2,2,1};
Index: branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 375)
+++ branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 376)
@@ -45,4 +45,5 @@
 #if SVC_EXTENSION
 #define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
+#define TIMING_INFO_NONZERO_LAYERID_SPS  1      ///< N0085: Semantics of vui_timing_info_present_flag to always set that flag to zero for non-zero layer ID SPS 
 #define RPL_INIT_N0316_N0082             1      ///< N0316, N0082: initial reference picture list construction 
 #define FINAL_RPL_CHANGE_N0082           1      ///< N0082: final ref picture list change (encoder)
Index: branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 375)
+++ branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 376)
@@ -377,4 +377,10 @@
   TimingInfo *timingInfo = pcVUI->getTimingInfo();
   READ_FLAG(       uiCode, "vui_timing_info_present_flag");         timingInfo->setTimingInfoPresentFlag      (uiCode ? true : false);
+#if TIMING_INFO_NONZERO_LAYERID_SPS
+  if( pcSPS->getLayerId() > 0 )
+  {
+    assert( timingInfo->getTimingInfoPresentFlag() == false );
+  }
+#endif
   if(timingInfo->getTimingInfoPresentFlag())
   {
