Index: /branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h	(revision 743)
+++ /branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h	(revision 744)
@@ -514,4 +514,8 @@
   UInt       m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1];            // Maps layer_id_in_nuh with the layer ID in the VPS
 #endif
+#if BITRATE_PICRATE_SIGNALLING
+  UInt       m_maxSLInLayerSetMinus1[MAX_VPS_LAYER_SETS_PLUS1];
+#endif
+    
 #if ILP_SSH_SIG
   Bool       m_ilpSshSignalingEnabledFlag;
@@ -835,4 +839,8 @@
   Void   setLayerIdInVps(Int id, UInt x)                        { m_layerIdInVps[id] = x;          }
 #endif
+#if BITRATE_PICRATE_SIGNALLING
+    UInt   getMaxSLayersInLayerSetMinus1(Int ls)                { return m_maxSLInLayerSetMinus1[ls];    }
+    Void   setMaxSLayersInLayerSetMinus1(Int ls, Int x)         { m_maxSLInLayerSetMinus1[ls] = x;       }
+#endif
 #if ILP_SSH_SIG
   Bool   getIlpSshSignalingEnabledFlag()                      { return m_ilpSshSignalingEnabledFlag;}
Index: /branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h	(revision 743)
+++ /branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h	(revision 744)
@@ -273,4 +273,5 @@
 #define P0138_USE_ALT_CPB_PARAMS_FLAG    1      ///< JCTVC-P0138: use_alt_cpb_params_flag syntax in buffering period SEI message extension
 #define P0166_MODIFIED_PPS_EXTENSION     1      ///< JCTVC-P0166: add pps_extension_type_flag
+#define BITRATE_PICRATE_SIGNALLING       1      ///< JCTVC-Q0102 Proposal 3 signal bitrate, picrate only up to the maximum temporal sub-layers in the corresponding layer set
 
 #if VIEW_ID_RELATED_SIGNALING
Index: /branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 743)
+++ /branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 744)
@@ -1936,6 +1936,11 @@
   UInt uiCode;
 #if DPB_PARAMS_MAXTLAYERS
+#if BITRATE_PICRATE_SIGNALLING
+    Int * MaxSubLayersInLayerSetMinus1 = new Int[vps->getNumLayerSets()];
+    for(Int i = 0; i < vps->getNumLayerSets(); i++)
+#else
     Int * MaxSubLayersInLayerSetMinus1 = new Int[vps->getNumOutputLayerSets()];
     for(Int i = 1; i < vps->getNumOutputLayerSets(); i++)
+#endif
     {
         UInt maxSLMinus1 = 0;
@@ -1945,4 +1950,7 @@
         Int optLsIdx = i;
 #endif
+#if BITRATE_PICRATE_SIGNALLING
+        optLsIdx = i;
+#endif
         for(Int k = 0; k < vps->getNumLayersInIdList(optLsIdx); k++ ) {
             Int  lId = vps->getLayerSetLayerIdList(optLsIdx, k);
@@ -1950,4 +1958,7 @@
         }
         MaxSubLayersInLayerSetMinus1[ i ] = maxSLMinus1;
+#if BITRATE_PICRATE_SIGNALLING
+        vps->setMaxSLayersInLayerSetMinus1(i,MaxSubLayersInLayerSetMinus1[ i ]);
+#endif
     }
 #endif
@@ -1963,5 +1974,9 @@
     READ_FLAG( uiCode, "sub_layer_flag_info_present_flag[i]");  vps->setSubLayerFlagInfoPresentFlag( i, uiCode ? true : false );
 #if DPB_PARAMS_MAXTLAYERS
+#if BITRATE_PICRATE_SIGNALLING
+    for(Int j = 0; j <= MaxSubLayersInLayerSetMinus1[ vps->getOutputLayerSetIdx( i ) ]; j++)
+#else
     for(Int j = 0; j <= MaxSubLayersInLayerSetMinus1[ i ]; j++)
+#endif
 #else
     for(Int j = 0; j <= vps->getMaxTLayers(); j++)
@@ -2085,5 +2100,9 @@
     for( i = 0; i < vps->getNumLayerSets(); i++ )
     {
+#if BITRATE_PICRATE_SIGNALLING
+      for( j = 0; j <= vps->getMaxSLayersInLayerSetMinus1(i); j++ )
+#else
       for( j = 0; j < vps->getMaxTLayers(); j++ )
+#endif
       {
         if( parseFlag && vps->getBitRatePresentVpsFlag() )
Index: /branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 743)
+++ /branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 744)
@@ -1371,6 +1371,11 @@
 {
 #if DPB_PARAMS_MAXTLAYERS
+#if BITRATE_PICRATE_SIGNALLING
+    Int * MaxSubLayersInLayerSetMinus1 = new Int[vps->getNumLayerSets()];
+    for(Int i = 0; i < vps->getNumLayerSets(); i++)
+#else
     Int * MaxSubLayersInLayerSetMinus1 = new Int[vps->getNumOutputLayerSets()];
     for(Int i = 1; i < vps->getNumOutputLayerSets(); i++)
+#endif
     {
         UInt maxSLMinus1 = 0;
@@ -1380,4 +1385,7 @@
         Int optLsIdx = i;
 #endif
+#if BITRATE_PICRATE_SIGNALLING
+        optLsIdx = i;
+#endif
         for(Int k = 0; k < vps->getNumLayersInIdList(optLsIdx); k++ ) {
             Int  lId = vps->getLayerSetLayerIdList(optLsIdx, k);
@@ -1385,6 +1393,10 @@
         }
         MaxSubLayersInLayerSetMinus1[ i ] = maxSLMinus1;
-    }
-#endif
+#if BITRATE_PICRATE_SIGNALLING
+        vps->setMaxSLayersInLayerSetMinus1(i,MaxSubLayersInLayerSetMinus1[ i ]);
+#endif
+    }
+#endif
+    
     
   for(Int i = 1; i < vps->getNumOutputLayerSets(); i++)
@@ -1395,5 +1407,9 @@
     WRITE_FLAG( vps->getSubLayerFlagInfoPresentFlag( i ), "sub_layer_flag_info_present_flag[i]");
 #if DPB_PARAMS_MAXTLAYERS
+#if BITRATE_PICRATE_SIGNALLING
+    for(Int j = 0; j <= MaxSubLayersInLayerSetMinus1[ vps->getOutputLayerSetIdx( i ) ]; j++)
+#else
     for(Int j = 0; j <= MaxSubLayersInLayerSetMinus1[ i ]; j++)
+#endif
 #else
     for(Int j = 0; j < vps->getMaxTLayers(); j++)
@@ -1463,5 +1479,9 @@
     for( i = 0; i < vps->getNumLayerSets(); i++ )
     {
+#if BITRATE_PICRATE_SIGNALLING
+      for( j = 0; j <= vps->getMaxSLayersInLayerSetMinus1(i); j++ )
+#else
       for( j = 0; j < vps->getMaxTLayers(); j++ )
+#endif
       {
         if( vps->getBitRatePresentVpsFlag() )
