Index: branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 437)
+++ branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 438)
@@ -79,9 +79,4 @@
   m_aidQP = NULL;
 #endif
-#if J0149_TONE_MAPPING_SEI
-  m_startOfCodedInterval = NULL;
-  m_codedPivotValue = NULL;
-  m_targetPivotValue = NULL;
-#endif
 }
 
@@ -107,26 +102,9 @@
     delete[] m_aidQP;
   }
-#endif
-#if J0149_TONE_MAPPING_SEI
-  if ( m_startOfCodedInterval )
-  {
-    delete[] m_startOfCodedInterval;
-    m_startOfCodedInterval = NULL;
-  }
-   if ( m_codedPivotValue )
-  {
-    delete[] m_codedPivotValue;
-    m_codedPivotValue = NULL;
-  }
-  if ( m_targetPivotValue )
-  {
-    delete[] m_targetPivotValue;
-    m_targetPivotValue = NULL;
-  }
-#endif
-#if !H_MV
   free(m_pchInputFile);
 #endif
+
   free(m_pchBitstreamFile);
+
 #if H_MV
   for(Int i = 0; i< m_pchReconFileList.size(); i++ )
@@ -138,8 +116,10 @@
   free(m_pchReconFile);
 #endif
+
   free(m_pchdQPFile);
   free(m_pColumnWidth);
   free(m_pRowHeight);
   free(m_scalingListFile);
+
 #if H_MV
   for( Int i = 0; i < m_GOPListMvc.size(); i++ )
@@ -320,8 +300,11 @@
   string cfg_InputFile;
 #endif
+
   string cfg_BitstreamFile;
+
 #if !H_MV
   string cfg_ReconFile;
 #endif
+
 #if H_MV
   vector<Int>   cfg_dimensionLength; 
@@ -333,13 +316,9 @@
 #endif 
 #endif
+
   string cfg_dQPFile;
   string cfg_ColumnWidth;
   string cfg_RowHeight;
   string cfg_ScalingListFile;
-#if J0149_TONE_MAPPING_SEI
-  string cfg_startOfCodedInterval;
-  string cfg_codedPivotValue;
-  string cfg_targetPivotValue;
-#endif
 #if SIGNAL_BITRATE_PICRATE_IN_VPS
   string cfg_bitRateInfoPresentFlag;
@@ -356,4 +335,5 @@
   
   // File, I/O and source parameters
+
 #if H_MV
   ("InputFile_%d,i_%d",       m_pchInputFileList,       (char *) 0 , MAX_NUM_LAYER_IDS , "original Yuv input file name %d")
@@ -361,5 +341,7 @@
   ("InputFile,i",           cfg_InputFile,     string(""), "Original YUV input file name")
 #endif
+
   ("BitstreamFile,b",       cfg_BitstreamFile, string(""), "Bitstream output file name")
+
 #if H_MV
   ("ReconFile_%d,o_%d",       m_pchReconFileList,       (char *) 0 , MAX_NUM_LAYER_IDS , "reconstructed Yuv output file name %d")
@@ -367,4 +349,5 @@
   ("ReconFile,o",           cfg_ReconFile,     string(""), "Reconstructed YUV output file name")
 #endif
+
 #if H_MV
   ("NumberOfLayers",        m_numberOfLayers     , 1,                     "Number of layers")
@@ -382,4 +365,5 @@
   ("SplittingFlag",         m_splittingFlag      , false                , "Splitting Flag")    
 #endif
+
   ("SourceWidth,-wdt",      m_iSourceWidth,        0, "Source picture width")
   ("SourceHeight,-hgt",     m_iSourceHeight,       0, "Source picture height")
@@ -403,4 +387,5 @@
 
   // Profile and level
+
   ("Profile", m_profile,   Profile::NONE, "Profile to be used when encoding (Incomplete)")
   ("Level",   m_level,     Level::NONE,   "Level limit to be used, eg 5.1 (Incomplete)")
@@ -432,7 +417,5 @@
   ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR)")
   ("GOPSize,g",               m_iGOPSize,                   1, "GOP size of temporal structure")
-#if !L0034_COMBINED_LIST_CLEANUP
   ("ListCombination,-lc",     m_bUseLComb,               true, "Combined reference list for uni-prediction estimation in B-slices")
-#endif
   // motion options
   ("FastSearch",              m_iFastSearch,                1, "0:Full search  1:Diamond  2:PMVFAST")
@@ -490,7 +473,4 @@
   ("LoopFilterTcOffset_div2",        m_loopFilterTcOffsetDiv2,             0 )
   ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false )
-#if L0386_DB_METRIC
-  ("DeblockingFilterMetric",         m_DeblockingFilterMetric,         false )
-#endif
 
   // Coding tools
@@ -611,36 +591,4 @@
   ("SEIBufferingPeriod",             m_bufferingPeriodSEIEnabled,              0, "Control generation of buffering period SEI messages")
   ("SEIPictureTiming",               m_pictureTimingSEIEnabled,                0, "Control generation of picture timing SEI messages")
-#if J0149_TONE_MAPPING_SEI
-  ("SEIToneMappingInfo",                       m_toneMappingInfoSEIEnabled,    false, "Control generation of Tone Mapping SEI messages")
-  ("SEIToneMapId",                             m_toneMapId,                        0, "Specifies Id of Tone Mapping SEI message for a given session")
-  ("SEIToneMapCancelFlag",                     m_toneMapCancelFlag,            false, "Indicates that Tone Mapping SEI message cancels the persistance or follows")
-  ("SEIToneMapPersistenceFlag",                m_toneMapPersistenceFlag,        true, "Specifies the persistence of the Tone Mapping SEI message")
-  ("SEIToneMapCodedDataBitDepth",              m_toneMapCodedDataBitDepth,         8, "Specifies Coded Data BitDepth of Tone Mapping SEI messages")
-  ("SEIToneMapTargetBitDepth",                 m_toneMapTargetBitDepth,            8, "Specifies Output BitDepth of Tome mapping function")
-  ("SEIToneMapModelId",                        m_toneMapModelId,                   0, "Specifies Model utilized for mapping coded data into target_bit_depth range\n"
-                                                                                      "\t0:  linear mapping with clipping\n"
-                                                                                      "\t1:  sigmoidal mapping\n"
-                                                                                      "\t2:  user-defined table mapping\n"
-                                                                                      "\t3:  piece-wise linear mapping\n"
-                                                                                      "\t4:  luminance dynamic range information ")
-  ("SEIToneMapMinValue",                              m_toneMapMinValue,                          0, "Specifies the minimum value in mode 0")
-  ("SEIToneMapMaxValue",                              m_toneMapMaxValue,                       1023, "Specifies the maxmum value in mode 0")
-  ("SEIToneMapSigmoidMidpoint",                       m_sigmoidMidpoint,                        512, "Specifies the centre point in mode 1")
-  ("SEIToneMapSigmoidWidth",                          m_sigmoidWidth,                           960, "Specifies the distance between 5% and 95% values of the target_bit_depth in mode 1")
-  ("SEIToneMapStartOfCodedInterval",                  cfg_startOfCodedInterval,          string(""), "Array of user-defined mapping table")
-  ("SEIToneMapNumPivots",                             m_numPivots,                                0, "Specifies the number of pivot points in mode 3")
-  ("SEIToneMapCodedPivotValue",                       cfg_codedPivotValue,               string(""), "Array of pivot point")
-  ("SEIToneMapTargetPivotValue",                      cfg_targetPivotValue,              string(""), "Array of pivot point")
-  ("SEIToneMapCameraIsoSpeedIdc",                     m_cameraIsoSpeedIdc,                        0, "Indicates the camera ISO speed for daylight illumination")
-  ("SEIToneMapCameraIsoSpeedValue",                   m_cameraIsoSpeedValue,                    400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO")
-  ("SEIToneMapExposureCompensationValueSignFlag",     m_exposureCompensationValueSignFlag,        0, "Specifies the sign of ExposureCompensationValue")
-  ("SEIToneMapExposureCompensationValueNumerator",    m_exposureCompensationValueNumerator,       0, "Specifies the numerator of ExposureCompensationValue")
-  ("SEIToneMapExposureCompensationValueDenomIdc",     m_exposureCompensationValueDenomIdc,        2, "Specifies the denominator of ExposureCompensationValue")
-  ("SEIToneMapRefScreenLuminanceWhite",               m_refScreenLuminanceWhite,                350, "Specifies reference screen brightness setting in units of candela per square metre")
-  ("SEIToneMapExtendedRangeWhiteLevel",               m_extendedRangeWhiteLevel,                800, "Indicates the luminance dynamic range")
-  ("SEIToneMapNominalBlackLevelLumaCodeValue",        m_nominalBlackLevelLumaCodeValue,          16, "Specifies luma sample value of the nominal black level assigned decoded pictures")
-  ("SEIToneMapNominalWhiteLevelLumaCodeValue",        m_nominalWhiteLevelLumaCodeValue,         235, "Specifies luma sample value of the nominal white level assigned decoded pictures")
-  ("SEIToneMapExtendedWhiteLevelLumaCodeValue",       m_extendedWhiteLevelLumaCodeValue,        300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures")
-#endif
   ("SEIFramePacking",                m_framePackingSEIEnabled,                 0, "Control generation of frame packing SEI messages")
   ("SEIFramePackingType",            m_framePackingSEIType,                    0, "Define frame packing arrangement\n"
@@ -663,10 +611,4 @@
   ("SEIGradualDecodingRefreshInfo",  m_gradualDecodingRefreshInfoEnabled,      0, "Control generation of gradual decoding refresh information SEI message")
   ("SEIDecodingUnitInfo",             m_decodingUnitInfoSEIEnabled,                       0, "Control generation of decoding unit information SEI message.")
-#if L0208_SOP_DESCRIPTION_SEI
-  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
-#endif
-#if K0180_SCALABLE_NESTING_SEI
-  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
-#endif
 #if SIGNAL_BITRATE_PICRATE_IN_VPS
   ("BitRatePicRateMaxTLayers",   m_bitRatePicRateMaxTLayers,           0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file")
@@ -719,4 +661,5 @@
   }
 #endif
+
   po::setDefaults(opts);
   const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv);
@@ -738,11 +681,15 @@
    */
   /* convert std::string to c string for compatability */
+
 #if !H_MV
   m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str());
 #endif
+
   m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
+
 #if !H_MV
   m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
 #endif
+
   m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());
   
@@ -808,4 +755,5 @@
   free ( pRowHeight   ); 
 #endif
+
 #if SIGNAL_BITRATE_PICRATE_IN_VPS
   readBoolString(cfg_bitRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_bitRateInfoPresentFlag, "bit rate info. present flag" );
@@ -966,64 +914,4 @@
   m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;
 
-#if J0149_TONE_MAPPING_SEI
-  if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag )
-  {
-    Char* pcStartOfCodedInterval = cfg_startOfCodedInterval.empty() ? NULL: strdup(cfg_startOfCodedInterval.c_str());
-    Char* pcCodedPivotValue = cfg_codedPivotValue.empty() ? NULL: strdup(cfg_codedPivotValue.c_str());
-    Char* pcTargetPivotValue = cfg_targetPivotValue.empty() ? NULL: strdup(cfg_targetPivotValue.c_str());
-    if( m_toneMapModelId == 2 && pcStartOfCodedInterval )
-    {
-      char *startOfCodedInterval;
-      UInt num = 1u<< m_toneMapTargetBitDepth;
-      m_startOfCodedInterval = new Int[num];
-      ::memset( m_startOfCodedInterval, 0, sizeof(Int)*num );
-      startOfCodedInterval = strtok(pcStartOfCodedInterval, " .");
-      int i = 0;
-      while( startOfCodedInterval && ( i < num ) )
-      {
-        m_startOfCodedInterval[i] = atoi( startOfCodedInterval );
-        startOfCodedInterval = strtok(NULL, " .");
-        i++;
-      }
-    } 
-    else
-    {
-      m_startOfCodedInterval = NULL;
-    }
-    if( ( m_toneMapModelId == 3 ) && ( m_numPivots > 0 ) )
-    {
-      if( pcCodedPivotValue && pcTargetPivotValue )
-      {
-        char *codedPivotValue;
-        char *targetPivotValue;
-        m_codedPivotValue = new Int[m_numPivots];
-        m_targetPivotValue = new Int[m_numPivots];
-        ::memset( m_codedPivotValue, 0, sizeof(Int)*( m_numPivots ) );
-        ::memset( m_targetPivotValue, 0, sizeof(Int)*( m_numPivots ) );
-        codedPivotValue = strtok(pcCodedPivotValue, " .");
-        int i=0;
-        while(codedPivotValue&&i<m_numPivots)
-        {
-          m_codedPivotValue[i] = atoi( codedPivotValue );
-          codedPivotValue = strtok(NULL, " .");
-          i++;
-        }
-        i=0;
-        targetPivotValue = strtok(pcTargetPivotValue, " .");
-        while(targetPivotValue&&i<m_numPivots)
-        {
-          m_targetPivotValue[i]= atoi( targetPivotValue );
-          targetPivotValue = strtok(NULL, " .");
-          i++;
-        }
-      }
-    }
-    else
-    {
-      m_codedPivotValue = NULL;
-      m_targetPivotValue = NULL;
-    }
-  }
-#endif
   // check validity of input parameters
   xCheckParameter();
@@ -1125,4 +1013,5 @@
   xConfirmPara( m_iFrameRate <= 0,                                                          "Frame rate must be more than 1" );
   xConfirmPara( m_framesToBeEncoded <= 0,                                                   "Total Number Of Frames encoded must be more than 0" );
+
 #if H_MV
   xConfirmPara( m_numberOfLayers > MAX_NUM_LAYER_IDS ,                                      "NumberOfLayers must be less than or equal to MAX_NUM_LAYER_IDS");
@@ -1137,5 +1026,5 @@
   xConfirmPara( m_scalabilityMask != 1 , "Scalability Mask must be equal to 1. ");
 #endif
- 
+  
   m_dimIds.push_back( m_viewId ); 
 #if H_3D
@@ -1194,4 +1083,6 @@
 
 #endif
+
+
   xConfirmPara( m_iGOPSize < 1 ,                                                            "GOP Size must be greater or equal to 1" );
   xConfirmPara( m_iGOPSize > 1 &&  m_iGOPSize % 2,                                          "GOP Size must be a multiple of 2, if GOP Size is greater than 1" );
@@ -1457,4 +1348,5 @@
       Int*      m_numReorderPics     = m_numReorderPicsMvc    [layer]; // It is not a member, but this name helps avoiding code duplication !!!
 #endif
+
   /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure
    * This permits the ability to omit a GOP structure specification */
@@ -1717,23 +1609,11 @@
   {
     m_numReorderPics[i] = 0;
-#if L0323_DPB
-    m_maxDecPicBuffering[i] = 1;
-#else
     m_maxDecPicBuffering[i] = 0;
-#endif
   }
   for(Int i=0; i<m_iGOPSize; i++) 
   {
-#if L0323_DPB
-    if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])
-#else
     if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])
-#endif
-    {
-#if L0323_DPB
-      m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1;
-#else
+    {
       m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics;
-#endif
     }
     Int highestDecodingNumberWithLowerPOC = 0; 
@@ -1766,11 +1646,4 @@
       m_numReorderPics[i+1] = m_numReorderPics[i];
     }
-#if L0323_DPB
-    // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive
-    if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1)
-    {
-      m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1;
-    }
-#else
     // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
     if(m_numReorderPics[i] > m_maxDecPicBuffering[i])
@@ -1778,5 +1651,4 @@
       m_maxDecPicBuffering[i] = m_numReorderPics[i];
     }
-#endif
     // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer
     if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i])
@@ -1785,13 +1657,4 @@
     }
   }
-
-
-#if L0323_DPB
-  // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] -  1, inclusive
-  if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1)
-  {
-    m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1;
-  }
-#else
   // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
   if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1])
@@ -1799,5 +1662,4 @@
     m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1];
   }
-#endif
 
   if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag)
@@ -1874,7 +1736,5 @@
     }
   }
-#if !L0034_COMBINED_LIST_CLEANUP
   xConfirmPara( m_bUseLComb==false && m_numReorderPics[MAX_TLAYER-1]!=0, "ListCombination can only be 0 in low delay coding (more precisely when L0 and L1 are identical)" );  // Note however this is not the full necessary condition as ref_pic_list_combination_flag can only be 0 if L0 == L1.
-#endif
   xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" );
   xConfirmPara( m_iWaveFrontSubstreams <= 0, "WaveFrontSubstreams must be positive" );
@@ -1883,17 +1743,4 @@
   xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n");
 
-#if J0149_TONE_MAPPING_SEI
-  if (m_toneMappingInfoSEIEnabled)
-  {
-    xConfirmPara( m_toneMapCodedDataBitDepth < 8 || m_toneMapCodedDataBitDepth > 14 , "SEIToneMapCodedDataBitDepth must be in rage 8 to 14");
-    xConfirmPara( m_toneMapTargetBitDepth < 1 || (m_toneMapTargetBitDepth > 16 && m_toneMapTargetBitDepth < 255) , "SEIToneMapTargetBitDepth must be in rage 1 to 16 or equal to 255");
-    xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4");
-    xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0");
-    xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100");
-    xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue");
-    xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue");
-  }
-#endif
-
 #if RATE_CONTROL_LAMBDA_DOMAIN
   if ( m_RCEnableRateControl )
@@ -1932,4 +1779,5 @@
   }
 #endif
+
 #if H_MV
   }
@@ -1979,5 +1827,7 @@
   printf("Input          File          : %s\n", m_pchInputFile          );
 #endif
+
   printf("Bitstream      File          : %s\n", m_pchBitstreamFile      );
+
 #if H_MV
   for( Int layer = 0; layer < m_numberOfLayers; layer++)
@@ -1988,10 +1838,13 @@
   printf("Reconstruction File          : %s\n", m_pchReconFile          );
 #endif
+
 #if H_MV
  xPrintParaVector( "ViewId", m_viewId ); 
 #endif
+
 #if H_3D
  xPrintParaVector( "DepthFlag", m_depthFlag ); 
 #endif
+
 #if H_MV  
   xPrintParaVector( "QP"               , m_fQP                ); 
@@ -2055,7 +1908,5 @@
   printf("SQP:%d ", m_uiDeltaQpRD         );
   printf("ASR:%d ", m_bUseASR             );
-#if !L0034_COMBINED_LIST_CLEANUP
   printf("LComb:%d ", m_bUseLComb         );
-#endif
   printf("FEN:%d ", m_bUseFastEnc         );
   printf("ECU:%d ", m_bUseEarlyCU         );
Index: branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 437)
+++ branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 438)
@@ -60,5 +60,7 @@
   Char*     m_pchInputFile;                                   ///< source file name
 #endif
+
   Char*     m_pchBitstreamFile;                               ///< output bitstream file
+
 #if H_MV
   std::vector<char*>     m_pchReconFileList;                  ///< output reconstruction file names
@@ -67,4 +69,6 @@
   Char*     m_pchReconFile;                                   ///< output reconstruction file
 #endif
+
+
   // VPS specification
 #if H_MV
@@ -79,4 +83,6 @@
   std::vector<Int>       m_dimensionIdLen;                   ///< Length of scalability dimension s 
 #endif
+
+
   Double    m_adLambdaModifier[ MAX_TLAYER ];                 ///< Lambda modifier array for each temporal layer
   // source specification
@@ -97,4 +103,5 @@
   Level::Tier   m_levelTier;
   Level::Name   m_level;
+
 #if L0046_CONSTRAINT_FLAGS
   Bool m_progressiveSourceFlag;
@@ -117,13 +124,7 @@
   GOPEntry  m_GOPList[MAX_GOP];                               ///< the coding structure entries from the config file
   Int       m_numReorderPics[MAX_TLAYER];                     ///< total number of reorder pictures
-#if L0323_DPB
-  Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of pictures in the decoded picture buffer
-#else
   Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of reference pictures needed for decoding
 #endif
-#endif
-#if !L0034_COMBINED_LIST_CLEANUP
   Bool      m_bUseLComb;                                      ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421)
-#endif
   Bool      m_useTransformSkip;                               ///< flag for enabling intra transform skipping
   Bool      m_useTransformSkipFast;                           ///< flag for enabling fast intra transform skipping
@@ -206,7 +207,4 @@
   Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
   Bool      m_DeblockingFilterControlPresent;                 ///< deblocking filter control present flag in PPS
-#if L0386_DB_METRIC
-  Bool      m_DeblockingFilterMetric;                         ///< blockiness metric in encoder
-#endif
  
   // coding tools (PCM)
@@ -258,31 +256,4 @@
   Int       m_bufferingPeriodSEIEnabled;
   Int       m_pictureTimingSEIEnabled;
-#if J0149_TONE_MAPPING_SEI
-  Bool      m_toneMappingInfoSEIEnabled;
-  Int       m_toneMapId;
-  Bool      m_toneMapCancelFlag;
-  Bool      m_toneMapPersistenceFlag;
-  Int       m_toneMapCodedDataBitDepth;
-  Int       m_toneMapTargetBitDepth;
-  Int       m_toneMapModelId; 
-  Int       m_toneMapMinValue;
-  Int       m_toneMapMaxValue;
-  Int       m_sigmoidMidpoint;
-  Int       m_sigmoidWidth;
-  Int       m_numPivots;
-  Int       m_cameraIsoSpeedIdc;
-  Int       m_cameraIsoSpeedValue;
-  Int       m_exposureCompensationValueSignFlag;
-  Int       m_exposureCompensationValueNumerator;
-  Int       m_exposureCompensationValueDenomIdc;
-  Int       m_refScreenLuminanceWhite;
-  Int       m_extendedRangeWhiteLevel;
-  Int       m_nominalBlackLevelLumaCodeValue;
-  Int       m_nominalWhiteLevelLumaCodeValue;
-  Int       m_extendedWhiteLevelLumaCodeValue;
-  Int*      m_startOfCodedInterval;
-  Int*      m_codedPivotValue;
-  Int*      m_targetPivotValue;
-#endif
   Int       m_framePackingSEIEnabled;
   Int       m_framePackingSEIType;
@@ -294,10 +265,4 @@
   Int       m_gradualDecodingRefreshInfoEnabled;
   Int       m_decodingUnitInfoSEIEnabled;
-#if L0208_SOP_DESCRIPTION_SEI
-  Int       m_SOPDescriptionSEIEnabled;
-#endif
-#if K0180_SCALABLE_NESTING_SEI
-  Int       m_scalableNestingSEIEnabled;
-#endif
   // weighted prediction
   Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
@@ -372,4 +337,5 @@
   Void  xPrintParameter ();                                   ///< print configuration values
   Void  xPrintUsage     ();                                   ///< print usage
+
 #if H_MV
   template <typename T>
@@ -422,7 +388,9 @@
   Int*      m_constantPicRateIdc;                                ///< Indicates constant picture rate idc for various sub-layers
 #endif
+  
 #if H_MV
   Int   getGOPSize() { return m_iGOPSize; }
 #endif
+
 public:
   TAppEncCfg();
Index: branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 437)
+++ branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 438)
@@ -111,4 +111,5 @@
   }
 #endif
+
 #if H_MV
   xSetLayerIds             ( vps );   
@@ -135,8 +136,10 @@
     m_cTEncTop.setIvPicLists  ( &m_ivPicLists ); 
 #endif
+
   m_cTEncTop.setVPS(&vps);
 
   m_cTEncTop.setProfile(m_profile);
   m_cTEncTop.setLevel(m_levelTier, m_level);
+
 #if L0046_CONSTRAINT_FLAGS
   m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag);
@@ -183,7 +186,6 @@
   m_cTEncTop.setQP                           ( m_iQP );
 #endif
-
   m_cTEncTop.setPad                          ( m_aiPad );
-
+    
 #if H_MV
   m_cTEncTop.setMaxTempLayer                 ( m_maxTempLayerMvc[layer] );
@@ -205,7 +207,4 @@
   m_cTEncTop.setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
   m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
-#if L0386_DB_METRIC
-  m_cTEncTop.setDeblockingFilterMetric       ( m_DeblockingFilterMetric );
-#endif
 
   //====== Motion search ========
@@ -227,5 +226,4 @@
   Int lowestQP;
   lowestQP =  - 6*(g_bitDepthY - 8); // XXX: check
-
 #if H_MV
   if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layer] == lowestQP) && (m_useLossless == true))
@@ -245,7 +243,5 @@
   m_cTEncTop.setUseHADME                     ( m_bUseHADME    );
   m_cTEncTop.setUseLossless                  ( m_useLossless );
-#if !L0034_COMBINED_LIST_CLEANUP
   m_cTEncTop.setUseLComb                     ( m_bUseLComb    );
-#endif
 #if H_MV
   m_cTEncTop.setdQPs                         ( m_aidQP[layer]   );
@@ -325,31 +321,4 @@
   m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled );
   m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled );
-#if J0149_TONE_MAPPING_SEI
-  m_cTEncTop.setToneMappingInfoSEIEnabled                 ( m_toneMappingInfoSEIEnabled );
-  m_cTEncTop.setTMISEIToneMapId                           ( m_toneMapId );
-  m_cTEncTop.setTMISEIToneMapCancelFlag                   ( m_toneMapCancelFlag );
-  m_cTEncTop.setTMISEIToneMapPersistenceFlag              ( m_toneMapPersistenceFlag );
-  m_cTEncTop.setTMISEICodedDataBitDepth                   ( m_toneMapCodedDataBitDepth );
-  m_cTEncTop.setTMISEITargetBitDepth                      ( m_toneMapTargetBitDepth );
-  m_cTEncTop.setTMISEIModelID                             ( m_toneMapModelId );
-  m_cTEncTop.setTMISEIMinValue                            ( m_toneMapMinValue );
-  m_cTEncTop.setTMISEIMaxValue                            ( m_toneMapMaxValue );
-  m_cTEncTop.setTMISEISigmoidMidpoint                     ( m_sigmoidMidpoint );
-  m_cTEncTop.setTMISEISigmoidWidth                        ( m_sigmoidWidth );
-  m_cTEncTop.setTMISEIStartOfCodedInterva                 ( m_startOfCodedInterval );
-  m_cTEncTop.setTMISEINumPivots                           ( m_numPivots );
-  m_cTEncTop.setTMISEICodedPivotValue                     ( m_codedPivotValue );
-  m_cTEncTop.setTMISEITargetPivotValue                    ( m_targetPivotValue );
-  m_cTEncTop.setTMISEICameraIsoSpeedIdc                   ( m_cameraIsoSpeedIdc );
-  m_cTEncTop.setTMISEICameraIsoSpeedValue                 ( m_cameraIsoSpeedValue );
-  m_cTEncTop.setTMISEIExposureCompensationValueSignFlag   ( m_exposureCompensationValueSignFlag );
-  m_cTEncTop.setTMISEIExposureCompensationValueNumerator  ( m_exposureCompensationValueNumerator );
-  m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc   ( m_exposureCompensationValueDenomIdc );
-  m_cTEncTop.setTMISEIRefScreenLuminanceWhite             ( m_refScreenLuminanceWhite );
-  m_cTEncTop.setTMISEIExtendedRangeWhiteLevel             ( m_extendedRangeWhiteLevel );
-  m_cTEncTop.setTMISEINominalBlackLevelLumaCodeValue      ( m_nominalBlackLevelLumaCodeValue );
-  m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue      ( m_nominalWhiteLevelLumaCodeValue );
-  m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue     ( m_extendedWhiteLevelLumaCodeValue );
-#endif
   m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled );
   m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType );
@@ -361,10 +330,4 @@
   m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled );
   m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled );
-#if L0208_SOP_DESCRIPTION_SEI
-  m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
-#endif
-#if K0180_SCALABLE_NESTING_SEI
-  m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
-#endif
   m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
   m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
@@ -461,7 +424,9 @@
   }
 #endif
-#if H_MV
-  }
-#endif
+
+#if H_MV
+  }
+#endif
+
 }
 
@@ -718,4 +683,5 @@
 }
 #endif
+
 // ====================================================================================================================
 // Protected member functions
@@ -728,4 +694,5 @@
  .
  */
+
 #if H_MV
 Void TAppEncTop::xGetBuffer( TComPicYuv*& rpcPicYuvRec, UInt layer)
@@ -755,4 +722,5 @@
 
   }
+
 #if H_MV
   m_picYuvRec[layer]->pushBack( rpcPicYuvRec );
@@ -764,4 +732,5 @@
 Void TAppEncTop::xDeleteBuffer( )
 {
+
 #if H_MV
   for(Int layer=0; layer<m_picYuvRec.size(); layer++)
@@ -788,4 +757,5 @@
   }
 #endif  
+
 }
 
@@ -817,4 +787,5 @@
   {
     TComPicYuv*  pcPicYuvRec  = *(iterPicYuvRec++);
+
 #if H_MV
       if (m_pchReconFileList[layerId])
@@ -844,4 +815,5 @@
   }
 #endif
+
 }
 
@@ -860,18 +832,18 @@
     case NAL_UNIT_CODED_SLICE_TRAIL_R:
     case NAL_UNIT_CODED_SLICE_TRAIL_N:
-    case NAL_UNIT_CODED_SLICE_TLA_R:
+    case NAL_UNIT_CODED_SLICE_TLA:
     case NAL_UNIT_CODED_SLICE_TSA_N:
     case NAL_UNIT_CODED_SLICE_STSA_R:
     case NAL_UNIT_CODED_SLICE_STSA_N:
-    case NAL_UNIT_CODED_SLICE_BLA_W_LP:
-    case NAL_UNIT_CODED_SLICE_BLA_W_RADL:
+    case NAL_UNIT_CODED_SLICE_BLA:
+    case NAL_UNIT_CODED_SLICE_BLANT:
     case NAL_UNIT_CODED_SLICE_BLA_N_LP:
-    case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
+    case NAL_UNIT_CODED_SLICE_IDR:
     case NAL_UNIT_CODED_SLICE_IDR_N_LP:
     case NAL_UNIT_CODED_SLICE_CRA:
     case NAL_UNIT_CODED_SLICE_RADL_N:
-    case NAL_UNIT_CODED_SLICE_RADL_R:
+    case NAL_UNIT_CODED_SLICE_DLP:
     case NAL_UNIT_CODED_SLICE_RASL_N:
-    case NAL_UNIT_CODED_SLICE_RASL_R:
+    case NAL_UNIT_CODED_SLICE_TFD:
     case NAL_UNIT_VPS:
     case NAL_UNIT_SPS:
@@ -889,4 +861,5 @@
 void TAppEncTop::printRateSummary()
 {
+
 #if H_MV
   Double time = (Double) m_frameRcvd[0] / m_iFrameRate;
@@ -895,4 +868,5 @@
   Double time = (Double) m_iFrameRcvd / m_iFrameRate;
 #endif
+
   printf("Bytes written to file: %u (%.3f kbps)\n", m_totalBytes, 0.008 * m_totalBytes / time);
 #if VERBOSE_RATE
@@ -963,3 +937,4 @@
 }
 #endif
+
 //! \}
Index: branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.h	(revision 437)
+++ branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.h	(revision 438)
@@ -59,4 +59,5 @@
 private:
   // class interface
+
 #if H_MV
   std::vector<TEncTop*>      m_acTEncTopList ;              ///< encoder class per layer 
@@ -99,4 +100,5 @@
   
   // file I/O
+
 #if H_MV
   Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, std::list<AccessUnit>& accessUnits, UInt layerId); ///< write bitstream to file
@@ -104,4 +106,5 @@
   Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits); ///< write bitstream to file
 #endif
+
   void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats);
   void printRateSummary();
@@ -113,4 +116,5 @@
   Int  xGetMax( std::vector<Int>& vec);
 #endif
+
 public:
   TAppEncTop();
@@ -118,4 +122,5 @@
   
   Void        encode      ();                               ///< main encoding function
+
 #if H_MV
   TEncTop*    getTEncTopLayer(UInt layer) { return  m_acTEncTopList[layer]; }  ///< return pointer to encoder class for specific layer
@@ -126,4 +131,5 @@
   TEncTop&    getTEncTop  ()   { return  m_cTEncTop; }      ///< return encoder class pointer reference
 #endif
+
 };// END CLASS DEFINITION TAppEncTop
 
Index: branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/encmain.cpp
===================================================================
--- branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/encmain.cpp	(revision 437)
+++ branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/encmain.cpp	(revision 438)
@@ -62,4 +62,5 @@
   fprintf( stdout, "HM software: Encoder Version [%s]", NV_VERSION );
 #endif
+
   fprintf( stdout, NVM_ONOS );
   fprintf( stdout, NVM_COMPILEDBY );
