Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp	(revision 923)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp	(revision 924)
@@ -46,9 +46,15 @@
 #include "TDecTop.h"
 #endif
-
+#include <algorithm>
 #include <time.h>
 
 extern Bool g_md5_mismatch; ///< top level flag to signal when there is a decode problem
 
+#if CONFORMANCE_BITSTREAM_MODE
+Bool pocCompareFunction( TComPic &pic1, TComPic &pic2 )
+{
+  return (pic1.getPOC() < pic2.getPOC());
+}
+#endif
 //! \ingroup TLibDecoder
 //! \{
@@ -256,4 +262,13 @@
     calcAndPrintHashStatus(*rpcPic->getPicYuvRec(), hash);
   }
+#if CONFORMANCE_BITSTREAM_MODE
+  if( this->getLayerDec(rpcPic->getLayerId())->getConfModeFlag() ) 
+  {
+    // Add this reconstructed picture to the parallel buffer.
+    std::vector<TComPic> *thisLayerBuffer = (this->getLayerDec(rpcPic->getLayerId()))->getConfListPic();
+    thisLayerBuffer->push_back(*rpcPic);
+    std::sort( thisLayerBuffer->begin(), thisLayerBuffer->end(), pocCompareFunction );
+  }
+#endif
 #if Q0074_COLOUR_REMAPPING_SEI
   if (m_colourRemapSEIEnabled)
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 923)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 924)
@@ -123,4 +123,7 @@
   m_pocResettingFlag        = false;
   m_pocDecrementedInDPBFlag = false;
+#endif
+#if CONFORMANCE_BITSTREAM_MODE
+  m_confModeFlag = false;
 #endif
 }
@@ -2974,7 +2977,11 @@
   {
     // Check if the target decoded layer is the highest layer in the list
+#if 0
     assert( params->getTargetOutputLayerSetIdx() < vps->getNumLayerSets() );
+#endif
     Int layerSetIdx = vps->getOutputLayerSetIdx( params->getTargetOutputLayerSetIdx() );  // Index to the layer set
+#if 0
     assert( params->getTargetLayerId() == vps->getNumLayersInIdList( layerSetIdx ) - 1);
+#endif
 
     Bool layerSetMatchFlag = true;
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 923)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 924)
@@ -167,4 +167,8 @@
                                            // When new VPS is activated, this should be re-initialized to -1
 #endif
+#if CONFORMANCE_BITSTREAM_MODE
+  Bool m_confModeFlag;
+  std::vector<TComPic>   m_confListPic;         //  Dynamic buffer for storing pictures for conformance purposes
+#endif
 public:
 #if POC_RESET_RESTRICTIONS
@@ -295,4 +299,8 @@
   Void assignSubDpbs(TComVPS *vps);
 #endif
+#if CONFORMANCE_BITSTREAM_MODE
+  std::vector<TComPic>* getConfListPic() {return &m_confListPic; }
+  // std::string const getDecodedYuvLayerFileName(Int layerId) { return m_decodedYuvLayerFileName[layerId]; }
+#endif
 #endif //SVC_EXTENSION
 
@@ -334,4 +342,9 @@
   Void resetPocRestrictionCheckParameters();
 #endif
+  public:
+#if CONFORMANCE_BITSTREAM_MODE
+  Bool const getConfModeFlag() { return m_confModeFlag; }
+  Void setConfModeFlag(Bool x) { m_confModeFlag = x; }
+#endif
 };// END CLASS DEFINITION TDecTop
 
