Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp	(revision 1086)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp	(revision 1089)
@@ -64,8 +64,4 @@
 //! \{
 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI);
-#if Q0074_COLOUR_REMAPPING_SEI
-static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* colourRemappingInfoSEI, UInt layerId=0 );
-static std::vector<SEIColourRemappingInfo> storeCriSEI; //Persistent Colour Remapping Information SEI
-#endif
 // ====================================================================================================================
 // Constructor / destructor / initialization / destroy
@@ -258,20 +254,4 @@
     thisLayerBuffer->push_back(*pcPic);
     std::sort( thisLayerBuffer->begin(), thisLayerBuffer->end(), pocCompareFunction );
-  }
-#endif
-#if Q0074_COLOUR_REMAPPING_SEI
-  if (m_colourRemapSEIEnabled)
-  {
-    SEIMessages colourRemappingInfo = getSeisByType(pcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
-    const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
-    if (colourRemappingInfo.size() > 1)
-    {
-      printf ("Warning: Got multiple Colour Remapping Information SEI messages. Using first.");
-    }
-    applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfo
-#if SVC_EXTENSION
-     , pcPic->getLayerId()
-#endif
-     );
   }
 #endif
@@ -354,163 +334,3 @@
 }
 
-#if Q0074_COLOUR_REMAPPING_SEI
-Void xInitColourRemappingLut( const Int bitDepthY, const Int bitDepthC, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI )
-{
-  for ( Int c=0 ; c<3 ; c++ )
-  {  
-    Int bitDepth = c ? bitDepthC : bitDepthY ;
-    preLut[c].resize(1 << bitDepth);
-    postLut[c].resize(1 << pCriSEI->m_colourRemapBitDepth);
-    
-    Int bitDepthDiff = pCriSEI->m_colourRemapBitDepth - bitDepth;
-    Int iShift1 = (bitDepthDiff>0) ? bitDepthDiff : 0; //bit scale from bitdepth to ColourRemapBitdepth (manage only case colourRemapBitDepth>= bitdepth)
-    if( bitDepthDiff<0 )
-      printf ("Warning: CRI SEI - colourRemapBitDepth (%d) <bitDepth (%d) - case not handled\n", pCriSEI->m_colourRemapBitDepth, bitDepth);
-    bitDepthDiff = pCriSEI->m_colourRemapBitDepth - pCriSEI->m_colourRemapInputBitDepth;
-    Int iShift2 = (bitDepthDiff>0) ? bitDepthDiff : 0; //bit scale from ColourRemapInputBitdepth to ColourRemapBitdepth (manage only case colourRemapBitDepth>= colourRemapInputBitDepth)
-    if( bitDepthDiff<0 )
-      printf ("Warning: CRI SEI - colourRemapBitDepth (%d) <colourRemapInputBitDepth (%d) - case not handled\n", pCriSEI->m_colourRemapBitDepth, pCriSEI->m_colourRemapInputBitDepth);
-
-    //Fill preLut
-    for ( Int k=0 ; k<(1<<bitDepth) ; k++ )
-    {
-      Int iSample = k << iShift1 ;
-      for ( Int iPivot=0 ; iPivot<=pCriSEI->m_preLutNumValMinus1[c] ; iPivot++ )
-      {
-        Int iCodedPrev  = pCriSEI->m_preLutCodedValue[c][iPivot]    << iShift2; //Coded in CRInputBitdepth
-        Int iCodedNext  = pCriSEI->m_preLutCodedValue[c][iPivot+1]  << iShift2; //Coded in CRInputBitdepth
-        Int iTargetPrev = pCriSEI->m_preLutTargetValue[c][iPivot];              //Coded in CRBitdepth
-        Int iTargetNext = pCriSEI->m_preLutTargetValue[c][iPivot+1];            //Coded in CRBitdepth
-        if ( iCodedPrev <= iSample && iSample <= iCodedNext )
-        {
-          Float fInterpol = (Float)( (iCodedNext - iSample)*iTargetPrev + (iSample - iCodedPrev)*iTargetNext ) * 1.f / (Float)(iCodedNext - iCodedPrev);
-          preLut[c][k]  = (Int)( 0.5f + fInterpol );
-          iPivot = pCriSEI->m_preLutNumValMinus1[c] + 1;
-        }
-      }
-    }
-    
-    //Fill postLut
-    for ( Int k=0 ; k<(1<<pCriSEI->m_colourRemapBitDepth) ; k++ )
-    {
-      Int iSample = k;
-      for ( Int iPivot=0 ; iPivot<=pCriSEI->m_postLutNumValMinus1[c] ; iPivot++ )
-      {
-        Int iCodedPrev  = pCriSEI->m_postLutCodedValue[c][iPivot];    //Coded in CRBitdepth
-        Int iCodedNext  = pCriSEI->m_postLutCodedValue[c][iPivot+1];  //Coded in CRBitdepth
-        Int iTargetPrev = pCriSEI->m_postLutTargetValue[c][iPivot];   //Coded in CRBitdepth
-        Int iTargetNext = pCriSEI->m_postLutTargetValue[c][iPivot+1]; //Coded in CRBitdepth
-        if ( iCodedPrev <= iSample && iSample <= iCodedNext )
-        {
-          Float fInterpol =  (Float)( (iCodedNext - iSample)*iTargetPrev + (iSample - iCodedPrev)*iTargetNext ) * 1.f / (Float)(iCodedNext - iCodedPrev) ;
-          postLut[c][k]  = (Int)( 0.5f + fInterpol );
-          iPivot = pCriSEI->m_postLutNumValMinus1[c] + 1;
-        }
-      }
-    }
-  }
-}
-
-static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, UInt layerId )
-{  
-  if( !storeCriSEI.size() )
-#if SVC_EXTENSION
-    storeCriSEI.resize(MAX_LAYERS);
-#else
-    storeCriSEI.resize(1);
-#endif
-
-  if ( pCriSEI ) //if a CRI SEI has just been retrieved, keep it in memory (persistence management)
-    storeCriSEI[layerId] = *pCriSEI;
-
-  if( !storeCriSEI[layerId].m_colourRemapCancelFlag )
-  {
-    Int iHeight  = pic.getHeight(COMPONENT_Y);
-    Int iWidth   = pic.getWidth(COMPONENT_Y);
-    Int iStride  = pic.getStride(COMPONENT_Y);
-    Int iCStride = pic.getStride(COMPONENT_Cb);
-
-    Pel *YUVIn[3], *YUVOut[3];
-    YUVIn[0] = pic.getAddr(COMPONENT_Y);
-    YUVIn[1] = pic.getAddr(COMPONENT_Cb);
-    YUVIn[2] = pic.getAddr(COMPONENT_Cr);
-    
-    TComPicYuv picColourRemapped;
-#if SVC_EXTENSION
-    picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
-#else
-    picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
-#endif 
-    YUVOut[0] = picColourRemapped.getAddr(COMPONENT_Y);
-    YUVOut[1] = picColourRemapped.getAddr(COMPONENT_Cb);
-    YUVOut[2] = picColourRemapped.getAddr(COMPONENT_Cr);
-
-#if SVC_EXTENSION
-    Int bitDepthY = g_bitDepthLayer[CHANNEL_TYPE_LUMA][layerId];
-    Int bitDepthC = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][layerId];
-
-    assert( g_bitDepth[CHANNEL_TYPE_LUMA] == bitDepthY );
-    assert( g_bitDepth[CHANNEL_TYPE_CHROMA] == bitDepthC );
-#else
-    Int bitDepthY = g_bitDepth[CHANNEL_TYPE_LUMA];
-    Int bitDepthC = g_bitDepth[CHANNEL_TYPE_CHROMA];
-#endif
-
-    std::vector<Int> preLut[3];
-    std::vector<Int> postLut[3];
-    xInitColourRemappingLut( bitDepthY, bitDepthC, preLut, postLut, &storeCriSEI[layerId] );
-    
-    Int roundingOffset = (storeCriSEI[layerId].m_log2MatrixDenom==0) ? 0 : (1 << (storeCriSEI[layerId].m_log2MatrixDenom - 1));
-
-    for( Int y = 0; y < iHeight ; y++ )
-    {
-      for( Int x = 0; x < iWidth ; x++ )
-      {
-        Int YUVPre[3], YUVMat[3];
-        YUVPre[0] = preLut[0][ YUVIn[0][x]   ];
-        YUVPre[1] = preLut[1][ YUVIn[1][x>>1] ];
-        YUVPre[2] = preLut[2][ YUVIn[2][x>>1] ];
-
-        YUVMat[0] = ( storeCriSEI[layerId].m_colourRemapCoeffs[0][0]*YUVPre[0]
-                    + storeCriSEI[layerId].m_colourRemapCoeffs[0][1]*YUVPre[1] 
-                    + storeCriSEI[layerId].m_colourRemapCoeffs[0][2]*YUVPre[2] 
-                    + roundingOffset ) >> ( storeCriSEI[layerId].m_log2MatrixDenom );
-        YUVMat[0] = Clip3( 0, (1<<storeCriSEI[layerId].m_colourRemapBitDepth)-1, YUVMat[0] );
-        YUVOut[0][x] = postLut[0][ YUVMat[0] ];
-
-        if( (y&1) && (x&1) )
-        {
-          for(Int c=1 ; c<3 ; c++)
-          {
-            YUVMat[c] = ( storeCriSEI[layerId].m_colourRemapCoeffs[c][0]*YUVPre[0] 
-                        + storeCriSEI[layerId].m_colourRemapCoeffs[c][1]*YUVPre[1] 
-                        + storeCriSEI[layerId].m_colourRemapCoeffs[c][2]*YUVPre[2] 
-                        + roundingOffset ) >> ( storeCriSEI[layerId].m_log2MatrixDenom );
-            YUVMat[c] = Clip3( 0, (1<<storeCriSEI[layerId].m_colourRemapBitDepth)-1, YUVMat[c] );
-            YUVOut[c][x>>1] = postLut[c][ YUVMat[c] ];   
-          }
-        }
-      }
-      YUVIn[0]  += iStride;
-      YUVOut[0] += iStride;
-      if( y&1 )
-      {
-        YUVIn[1]  += iCStride;
-        YUVIn[2]  += iCStride;
-        YUVOut[1] += iCStride;
-        YUVOut[2] += iCStride;
-      }
-    }
-
-    //Write remapped picture in decoding order
-    Char  cTemp[255];
-    sprintf(cTemp, "seiColourRemappedPic_L%d_%dx%d_%dbits.yuv", layerId, iWidth, iHeight, storeCriSEI[layerId].m_colourRemapBitDepth );
-    picColourRemapped.dump( cTemp, true, storeCriSEI[layerId].m_colourRemapBitDepth );
-
-    picColourRemapped.destroy();
-
-    storeCriSEI[layerId].m_colourRemapCancelFlag = !storeCriSEI[layerId].m_colourRemapPersistenceFlag; //Handling persistence
-  }
-}
-#endif
 //! \}
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h	(revision 1086)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h	(revision 1089)
@@ -80,7 +80,5 @@
   Double                m_dDecTime;
   Int                   m_decodedPictureHashSEIEnabled;  ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
-#if Q0074_COLOUR_REMAPPING_SEI
-  Bool                  m_colourRemapSEIEnabled;         ///< Enable/disable Colour Remapping Information SEI message acting on decoded pictures
-#endif
+
 #if SVC_EXTENSION
   UInt                  m_layerId;
@@ -114,7 +112,4 @@
 
   Void setDecodedPictureHashSEIEnabled(Int enabled) { m_decodedPictureHashSEIEnabled = enabled; }
-#if Q0074_COLOUR_REMAPPING_SEI
-  Void setColourRemappingInfoSEIEnabled(Int enabled) { m_colourRemapSEIEnabled = enabled; }
-#endif
 #if SVC_EXTENSION
   TDecTop*   getLayerDec(UInt layerId)  { return m_ppcTDecTop[layerId]; }
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1086)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1089)
@@ -203,7 +203,4 @@
 
   Void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); }
-#if Q0074_COLOUR_REMAPPING_SEI
-  void setColourRemappingInfoSEIEnabled(Bool enabled)  { m_cGopDecoder.setColourRemappingInfoSEIEnabled(enabled); }
-#endif
 
   Void  init();
