Index: /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 384)
+++ /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 385)
@@ -1615,4 +1615,8 @@
 , m_defaultOneTargetOutputLayerFlag    (false)
 #endif
+#if VPS_VUI_BITRATE_PICRATE
+, m_bitRatePresentVpsFlag     (false)
+, m_picRatePresentVpsFlag     (false)
+#endif
 {
   for( Int i = 0; i < MAX_TLAYER; i++)
@@ -1680,4 +1684,12 @@
    ::memset(m_ctuBasedOffsetEnabledFlag,     0, sizeof(m_ctuBasedOffsetEnabledFlag));
    ::memset(m_minHorizontalCtuOffsetPlus1,   0, sizeof(m_minHorizontalCtuOffsetPlus1));
+#endif
+#if VPS_VUI_BITRATE_PICRATE  
+  ::memset(m_bitRatePresentFlag, 0, sizeof(m_bitRatePresentFlag));
+  ::memset(m_picRatePresentFlag, 0, sizeof(m_picRatePresentFlag));
+  ::memset(m_avgBitRate        , 0, sizeof(m_avgBitRate)        );
+  ::memset(m_maxBitRate        , 0, sizeof(m_maxBitRate)        );
+  ::memset(m_constPicRateIdc   , 0, sizeof(m_constPicRateIdc)   );
+  ::memset(m_avgPicRate        , 0, sizeof(m_avgPicRate)        );
 #endif
 }
Index: /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 384)
+++ /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 385)
@@ -509,4 +509,14 @@
   Int         m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
 #endif 
+#if VPS_VUI_BITRATE_PICRATE
+  Bool        m_bitRatePresentVpsFlag;
+  Bool        m_picRatePresentVpsFlag;
+  Bool        m_bitRatePresentFlag  [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER];
+  Bool        m_picRatePresentFlag  [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER];
+  Int         m_avgBitRate          [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER];
+  Int         m_maxBitRate          [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER];
+  Int         m_constPicRateIdc     [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER];
+  Int         m_avgPicRate          [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER];
+#endif
 public:
   TComVPS();
@@ -697,5 +707,25 @@
   Void setMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId, Int val )   { m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId] = val;}  
 #endif
-
+#if VPS_VUI_BITRATE_PICRATE
+  Bool getBitRatePresentVpsFlag()       { return m_bitRatePresentVpsFlag; }
+  Void setBitRatePresentVpsFlag(Bool x) { m_bitRatePresentVpsFlag = x;    }
+  Bool getPicRatePresentVpsFlag()       { return m_picRatePresentVpsFlag; }
+  Void setPicRatePresentVpsFlag(Bool x) { m_picRatePresentVpsFlag = x;    }
+
+  Bool getBitRatePresentFlag(Int i, Int j)          { return m_bitRatePresentFlag[i][j]; }
+  Void setBitRatePresentFlag(Int i, Int j, Bool x)  { m_bitRatePresentFlag[i][j] = x;    }
+  Bool getPicRatePresentFlag(Int i, Int j)          { return m_picRatePresentFlag[i][j]; }
+  Void setPicRatePresentFlag(Int i, Int j, Bool x)  { m_picRatePresentFlag[i][j] = x;    }
+  
+  Int  getAvgBitRate(Int i, Int j)          { return m_avgBitRate[i][j]; }
+  Void setAvgBitRate(Int i, Int j, Int x)   { m_avgBitRate[i][j] = x;    }
+  Int  getMaxBitRate(Int i, Int j)          { return m_maxBitRate[i][j]; }
+  Void setMaxBitRate(Int i, Int j, Int x)   { m_maxBitRate[i][j] = x;    }
+  
+  Int  getConstPicRateIdc(Int i, Int j)          { return m_constPicRateIdc[i][j]; }
+  Void setConstPicRateIdc(Int i, Int j, Int x)   { m_constPicRateIdc[i][j] = x;    }
+  Int  getAvgPicRate(Int i, Int j)          { return m_avgPicRate[i][j]; }
+  Void setAvgPicRate(Int i, Int j, Int x)   { m_avgPicRate[i][j] = x;    }
+#endif
 };
 
Index: /branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 384)
+++ /branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 385)
@@ -83,4 +83,5 @@
 #define N0160_TILE_BOUNDARY_ALIGNED_FLAG 1     ///< VPS VUI flag to indicate tile boundary alignment
 #define N0160_VUI_EXT_ILP_REF            1     ///< VUI extension inter-layer dependency offset signalling
+#define VPS_VUI_BITRATE_PICRATE          1     ///< N0085 - Signal bit rate and picture in VPS VUI
 #endif //VPS_VUI
 
Index: /branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 384)
+++ /branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 385)
@@ -1169,4 +1169,54 @@
   UInt i,j;
   UInt uiCode;
+#if VPS_VUI_BITRATE_PICRATE
+  READ_FLAG( uiCode,        "bit_rate_present_vps_flag" );  vps->setBitRatePresentVpsFlag( uiCode ? true : false );
+  READ_FLAG( uiCode,        "pic_rate_present_vps_flag" );  vps->setPicRatePresentVpsFlag( uiCode ? true : false );
+
+  Bool parseFlag = vps->getBitRatePresentVpsFlag() || vps->getPicRatePresentVpsFlag();
+  {
+    for( i = 0; i < vps->getNumLayerSets(); i++ )
+    {
+      for( j = 0; j < vps->getMaxTLayers(); j++ )
+      {
+        if( parseFlag && vps->getBitRatePresentVpsFlag() )
+        {
+          READ_FLAG( uiCode,        "bit_rate_present_vps_flag[i][j]" );  vps->setBitRatePresentFlag( i, j, uiCode ? true : false );
+        }
+        else
+        {
+          vps->setBitRatePresentFlag( i, j, false );
+        }
+        if( parseFlag && vps->getPicRatePresentVpsFlag() )
+        {
+          READ_FLAG( uiCode,        "pic_rate_present_vps_flag[i][j]" );  vps->setPicRatePresentFlag( i, j, uiCode ? true : false );
+        }
+        else
+        {
+          vps->setPicRatePresentFlag( i, j, false );
+        }
+        if( parseFlag && vps->getBitRatePresentFlag(i, j) )
+        {
+          READ_CODE( 16, uiCode,    "avg_bit_rate[i][j]" ); vps->setAvgBitRate( i, j, uiCode );
+          READ_CODE( 16, uiCode,    "max_bit_rate[i][j]" ); vps->setMaxBitRate( i, j, uiCode );
+        }
+        else
+        {
+          vps->setAvgBitRate( i, j, 0 );
+          vps->setMaxBitRate( i, j, 0 );
+        }
+        if( parseFlag && vps->getPicRatePresentFlag(i, j) )
+        {
+          READ_CODE( 2 , uiCode,    "constant_pic_rate_idc[i][j]" ); vps->setConstPicRateIdc( i, j, uiCode );
+          READ_CODE( 16, uiCode,    "avg_pic_rate[i][j]"          ); vps->setAvgPicRate( i, j, uiCode );
+        }
+        else
+        {
+          vps->setConstPicRateIdc( i, j, 0 );
+          vps->setAvgPicRate     ( i, j, 0 );
+        }
+      }
+    }
+  }
+#endif
 #if N0160_TILE_BOUNDARY_ALIGNED_FLAG
   for(i = 1; i < vps->getMaxLayers(); i++)
Index: /branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 384)
+++ /branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 385)
@@ -914,4 +914,36 @@
 {
   Int i,j;
+#if VPS_VUI_BITRATE_PICRATE
+  WRITE_FLAG( vps->getBitRatePresentVpsFlag(),        "bit_rate_present_vps_flag" );
+  WRITE_FLAG( vps->getPicRatePresentVpsFlag(),        "pic_rate_present_vps_flag" );
+
+  if( vps->getBitRatePresentVpsFlag() || vps->getPicRatePresentVpsFlag() )
+  {
+    for( i = 0; i < vps->getNumLayerSets(); i++ )
+    {
+      for( j = 0; j < vps->getMaxTLayers(); j++ )
+      {
+        if( vps->getBitRatePresentVpsFlag() )
+        {
+          WRITE_FLAG( vps->getBitRatePresentFlag( i, j),        "bit_rate_present_vps_flag[i][j]" );
+        }
+        if( vps->getPicRatePresentVpsFlag() )
+        {
+          WRITE_FLAG( vps->getPicRatePresentFlag( i, j),        "pic_rate_present_vps_flag[i][j]" );
+        }
+        if( vps->getBitRatePresentFlag(i, j) )
+        {
+          WRITE_CODE( vps->getAvgBitRate( i, j ), 16, "avg_bit_rate[i][j]" );
+          WRITE_CODE( vps->getAvgBitRate( i, j ), 16, "max_bit_rate[i][j]" );
+        }
+        if( vps->getPicRatePresentFlag(i, j) )
+        {
+          WRITE_CODE( vps->getConstPicRateIdc( i, j), 2 , "constant_pic_rate_idc[i][j]" ); 
+          WRITE_CODE( vps->getConstPicRateIdc( i, j), 16, "avg_pic_rate[i][j]"          ); 
+        }
+      }
+    }
+  }
+#endif
 #if N0160_TILE_BOUNDARY_ALIGNED_FLAG
   for(i = 1; i < vps->getMaxLayers(); i++)
