Index: branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecCfg.cpp
===================================================================
--- branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 437)
+++ branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 438)
@@ -45,4 +45,5 @@
 #include <cassert>
 #endif
+
 #ifdef WIN32
 #define strdup _strdup
@@ -78,7 +79,9 @@
   ("OutputBitDepth,d", m_outputBitDepthY, 0, "bit depth of YUV output luma component (default: use 0 for native depth)")
   ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)")
+
 #if H_MV
   ("MaxLayerId,-ls", m_maxLayerId, MAX_NUM_LAYER_IDS-1, "Maximum LayerId to be decoded.")
 #endif
+
   ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers")
   ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n"
@@ -105,4 +108,5 @@
   /* convert std::string to c string for compatability */
   m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
+
   m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
 
@@ -187,3 +191,4 @@
 }
 #endif
+
 //! \}
Index: branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 437)
+++ branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 438)
@@ -54,4 +54,5 @@
 
 TAppDecTop::TAppDecTop()
+
 #if !H_MV
 : m_iPOCLastDisplay(-MAX_INT)
@@ -59,4 +60,5 @@
 : m_numDecoders( 0 )
 #endif
+
 {
   ::memset (m_abDecFlag, 0, sizeof (m_abDecFlag));
@@ -77,4 +79,5 @@
     m_pchBitstreamFile = NULL;
   }
+
 #if H_MV
   for (Int decIdx = 0; decIdx < m_numDecoders; decIdx++)
@@ -112,4 +115,5 @@
   poc = -1; 
 #endif
+
   TComList<TComPic*>* pcListPic = NULL;
 
@@ -143,4 +147,5 @@
   Bool firstSlice        = true; 
 #endif
+
  
   while (!!bitstreamFile)
@@ -151,14 +156,8 @@
      * nal unit. */
     streampos location = bitstreamFile.tellg();
-#if H_MV
-#if ENC_DEC_TRACE
-    Int64 symCount = g_nSymbolCounter;
-#endif
-#endif
     AnnexBStats stats = AnnexBStats();
 #if !H_MV
     Bool bPreviousPictureDecoded = false;
 #endif
-
     vector<uint8_t> nalUnit;
     InputNALUnit nalu;
@@ -251,10 +250,4 @@
           bitstreamFile.seekg(location-streamoff(3));
           bytestream.reset();
-#if H_MV
-#if ENC_DEC_TRACE
-          g_nSymbolCounter = symCount;
-#endif
-#endif
-
         }
 #if !H_MV
@@ -283,5 +276,4 @@
     }
 #endif
-
     if( pcListPic )
     {
@@ -294,5 +286,4 @@
         if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; }
         if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; }
-
 #if H_MV
         m_tVideoIOYuvReconFile[decIdxLastPic]->open( m_pchReconFiles[decIdxLastPic], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode
@@ -306,9 +297,9 @@
       if ( bNewPicture && 
 #endif
-           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
+           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR
             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
-            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL
-            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP ) )
+            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLANT
+            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA ) )
       {
 #if H_MV
@@ -602,55 +593,3 @@
 }
 
-#if H_MV
-Int TAppDecTop::xGetDecoderIdx( Int layerId, Bool createFlag /*= false */ )
-{
-  Int decIdx = -1; 
-  if ( m_layerIdToDecIdx[ layerId ] != -1 ) 
-  {      
-    decIdx = m_layerIdToDecIdx[ layerId ]; 
-  }
-  else
-  {      
-    assert ( createFlag ); 
-    assert( m_numDecoders < MAX_NUM_LAYERS ); 
-
-    decIdx = m_numDecoders; 
-
-    // Init decoder
-    m_tDecTop[ decIdx ] =  new TDecTop;
-    m_tDecTop[ decIdx ]->create();
-    m_tDecTop[ decIdx ]->init( );
-    m_tDecTop[ decIdx ]->setLayerId( layerId );
-    m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
-    m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 
-
-    // append pic list of new decoder to PicLists 
-    assert( m_ivPicLists.size() == m_numDecoders );
-    m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
-
-    // create recon file related stuff      
-    Char* pchTempFilename = NULL;
-    if ( m_pchReconFile )
-    {      
-      Char buffer[4];      
-      sprintf(buffer,"_%i", layerId );
-      assert ( m_pchReconFile ); 
-      xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );
-      assert( m_pchReconFiles.size() == m_numDecoders );
-    }
-
-    m_pchReconFiles.push_back( pchTempFilename );   
-
-    m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;
-    m_reconOpen           [ decIdx ] = false;
-
-    // set others 
-    m_pocLastDisplay      [ decIdx ] = -MAX_INT;
-    m_layerIdToDecIdx     [ layerId ] = decIdx; 
-
-    m_numDecoders++; 
-  };
-  return decIdx;
-}
-#endif
 //! \}
Index: branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.h
===================================================================
--- branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.h	(revision 437)
+++ branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.h	(revision 438)
@@ -74,4 +74,5 @@
   // for output control
   Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
+
 #if H_MV
   Int                             m_pocLastDisplay      [ MAX_NUM_LAYERS ]; ///< last POC in display order
@@ -89,4 +90,5 @@
   Void  decode            (); ///< main decoding function
  
+
 protected:
   Void  xCreateDecLib     (); ///< create internal classes
@@ -97,9 +99,59 @@
   Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
   Void  xFlushOutput      ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file
-  Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false );
+  Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false )
+  { 
+    Int decIdx = -1; 
+    if ( m_layerIdToDecIdx[ layerId ] != -1 ) 
+    {      
+      decIdx = m_layerIdToDecIdx[ layerId ]; 
+    }
+    else
+    {      
+      assert ( createFlag ); 
+      assert( m_numDecoders < MAX_NUM_LAYERS ); 
+
+      decIdx = m_numDecoders; 
+      
+      // Init decoder
+      m_tDecTop[ decIdx ] =  new TDecTop;
+      m_tDecTop[ decIdx ]->create();
+      m_tDecTop[ decIdx ]->init( );
+      m_tDecTop[ decIdx ]->setLayerId( layerId );
+      m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
+      m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 
+     
+      // append pic list of new decoder to PicLists 
+      assert( m_ivPicLists.size() == m_numDecoders );
+      m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
+
+      // create recon file related stuff      
+      Char* pchTempFilename = NULL;
+      if ( m_pchReconFile )
+      {      
+        Char buffer[4];      
+        sprintf(buffer,"_%i", layerId );
+        assert ( m_pchReconFile ); 
+        xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );
+        assert( m_pchReconFiles.size() == m_numDecoders );
+      }
+
+      m_pchReconFiles.push_back( pchTempFilename );   
+
+      m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;
+      m_reconOpen           [ decIdx ] = false;
+
+      // set others 
+      m_pocLastDisplay      [ decIdx ] = -MAX_INT;
+      m_layerIdToDecIdx     [ layerId ] = decIdx; 
+
+      m_numDecoders++; 
+    };
+    return decIdx; 
+  }
 #else
   Void  xWriteOutput      ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file
   Void  xFlushOutput      ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file
 #endif
+
   Bool  isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
 };
