Changeset 856 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
11 Aug 2014, 19:11:02 (10 years ago)
Author:
seregin
Message:

CRI SEI patch provided by Andrivon Pierre <Pierre.Andrivon@…>

Changes:

  • General code cleaning-up and improvement
  • Alignment of code with latest spec (JCTVC-R1013_v3)
  • Tested successfully for macro SVC_EXTENSION=1 and SVC_EXTENSION=0

At the encoder, parameters of the SEI are input through a file.
At the decoder, when present, CRI SEI is applied with the runtime parameter --SEIColourRemappingInfo (same as --SEIDecodedPictureHash)

Location:
branches/SHM-dev/source/Lib/TLibDecoder
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp

    r847 r856  
    9898    break;
    9999#endif
    100 #if Q0074_SEI_COLOR_MAPPING
    101   case SEI::COLOR_MAPPING_INFO:
    102     fprintf( g_hTrace, "===========Color Mapping Info SEI message ===========\n");
     100#if Q0074_COLOUR_REMAPPING_SEI
     101  case SEI::COLOUR_REMAPPING_INFO:
     102    fprintf( g_hTrace, "===========Colour Remapping Information SEI message ===========\n");
    103103    break;
    104104#endif
     
    132132    fprintf( g_hTrace, "=========== Bitstream parition initial arrival time SEI message ===========\n");
    133133    break;
     134#if !REMOVE_BSP_HRD_SEI
    134135  case SEI::BSP_HRD:
    135136    fprintf( g_hTrace, "=========== Bitstream parition HRD parameters SEI message ===========\n");
    136137    break;
     138#endif
    137139#endif
    138140#if Q0078_ADD_LAYER_SETS
     
    304306      break;
    305307#endif
    306 #if Q0074_SEI_COLOR_MAPPING
    307     case SEI::COLOR_MAPPING_INFO:
    308       sei = new SEIColorMappingInfo;
    309       xParseSEIColorMappingInfo((SEIColorMappingInfo&) *sei, payloadSize);
     308#if Q0074_COLOUR_REMAPPING_SEI
     309    case SEI::COLOUR_REMAPPING_INFO:
     310      sei = new SEIColourRemappingInfo;
     311      xParseSEIColourRemappingInfo((SEIColourRemappingInfo&) *sei, payloadSize);
    310312      break;
    311313#endif
     
    923925#endif
    924926
    925 #if Q0074_SEI_COLOR_MAPPING
    926 Void SEIReader::xParseSEIColorMappingInfo(SEIColorMappingInfo& sei, UInt /*payloadSize*/)
     927#if Q0074_COLOUR_REMAPPING_SEI
     928Void SEIReader::xParseSEIColourRemappingInfo(SEIColourRemappingInfo& sei, UInt /*payloadSize*/)
    927929{
    928930  UInt  uiVal;
    929931  Int   iVal;
    930932
    931   READ_UVLC( uiVal, "colour_map_id" );          sei.m_colorMapId = uiVal;
    932   READ_FLAG( uiVal, "colour_map_cancel_flag" ); sei.m_colorMapCancelFlag = uiVal;
    933   if( !sei.m_colorMapCancelFlag )
    934   {
    935     READ_FLAG( uiVal, "colour_map_persistence_flag" );                sei.m_colorMapPersistenceFlag = uiVal;
    936     READ_FLAG( uiVal, "colour_map_video_signal_type_present_flag" );  sei.m_colorMap_video_signal_type_present_flag = uiVal;
    937     if ( sei.m_colorMap_video_signal_type_present_flag ) {
    938       READ_FLAG( uiVal,     "colour_map_video_full_range_flag" );     sei.m_colorMap_video_full_range_flag = uiVal;
    939       READ_CODE( 8, uiVal,  "colour_map_primaries" );                 sei.m_colorMap_primaries = uiVal;
    940       READ_CODE( 8, uiVal,  "colour_map_transfer_characteristics" );  sei.m_colorMap_transfer_characteristics = uiVal;
    941       READ_CODE( 8, uiVal,  "colour_map_matrix_coeffs" );             sei.m_colorMap_matrix_coeffs = uiVal;
    942     }
    943   }
    944 
    945   READ_CODE( 5, uiVal,  "colour_map_coded_data_bit_depth" );  sei.m_colour_map_coded_data_bit_depth = uiVal;
    946   READ_CODE( 5, uiVal,  "colour_map_target_bit_depth" );      sei.m_colour_map_target_bit_depth = uiVal;
    947   READ_UVLC( uiVal, "colour_map_model_id" );                  sei.m_colorMapModelId = uiVal;
    948 
    949   assert( sei.m_colorMapModelId == 0 );
     933  READ_UVLC( uiVal, "colour_remap_id" );          sei.m_colourRemapId = uiVal;
     934  READ_FLAG( uiVal, "colour_remap_cancel_flag" ); sei.m_colourRemapCancelFlag = uiVal;
     935  if( !sei.m_colourRemapCancelFlag )
     936  {
     937    READ_FLAG( uiVal, "colour_remap_persistence_flag" );                sei.m_colourRemapPersistenceFlag = uiVal;
     938    READ_FLAG( uiVal, "colour_remap_video_signal_type_present_flag" );  sei.m_colourRemapVideoSignalTypePresentFlag = uiVal;
     939    if ( sei.m_colourRemapVideoSignalTypePresentFlag )
     940    {
     941      READ_FLAG( uiVal,    "colour_remap_video_full_range_flag" );     sei.m_colourRemapVideoFullRangeFlag = uiVal;
     942      READ_CODE( 8, uiVal, "colour_remap_primaries" );                 sei.m_colourRemapPrimaries = uiVal;
     943      READ_CODE( 8, uiVal, "colour_remap_transfer_characteristics" );  sei.m_colourRemapTransferCharacteristics = uiVal;
     944      READ_CODE( 8, uiVal, "colour_remap_matrix_coeffs" );             sei.m_colourRemapMatrixCoeffs = uiVal;
     945    }
     946    READ_CODE( 8, uiVal, "colour_remap_coded_data_bit_depth" );  sei.m_colourRemapCodedDataBitDepth = uiVal;
     947    READ_CODE( 8, uiVal, "colour_remap_target_bit_depth" );      sei.m_colourRemapTargetBitDepth = uiVal;
    950948 
    951   for( Int i=0 ; i<3 ; i++ )
    952   {
    953     READ_CODE( 8, uiVal, "num_input_pivots_minus1[i]" ); sei.m_num_input_pivots[i] = (uiVal==0) ? 2 : (uiVal + 1) ;
    954     sei.m_coded_input_pivot_value[i]   = new Int[ sei.m_num_input_pivots[i] ];
    955     sei.m_target_input_pivot_value[i]  = new Int[ sei.m_num_input_pivots[i] ];
    956     if( uiVal > 0 )
    957     {
    958       for ( Int j=0 ; j<sei.m_num_input_pivots[i] ; j++ )
    959       {
    960         READ_CODE( (( sei.m_colour_map_coded_data_bit_depth + 7 ) >> 3 ) << 3, uiVal, "coded_input_pivot_value[i][j]" );  sei.m_coded_input_pivot_value[i][j] = uiVal;
    961         READ_CODE( (( sei.m_colour_map_coded_data_bit_depth + 7 ) >> 3 ) << 3, uiVal, "target_input_pivot_value[i][j]" ); sei.m_target_input_pivot_value[i][j] = uiVal;
    962       }
    963     }
    964     else
    965     {
    966       sei.m_coded_input_pivot_value[i][0]  = 0;
    967       sei.m_target_input_pivot_value[i][0] = 0;
    968       sei.m_coded_input_pivot_value[i][1]  = (1 << sei.m_colour_map_coded_data_bit_depth) - 1 ;
    969       sei.m_target_input_pivot_value[i][1] = (1 << sei.m_colour_map_target_bit_depth) - 1 ;
    970     }
    971   }
    972 
    973   READ_FLAG( uiVal,           "matrix_flag" ); sei.m_matrix_flag = uiVal;
    974   if( sei.m_matrix_flag )
    975   {
    976     READ_CODE( 4, uiVal,         "log2_matrix_denom" ); sei.m_log2_matrix_denom = uiVal;
    977     for ( Int i=0 ; i<3 ; i++ )
    978     {
    979       for ( Int j=0 ; j<3 ; j++ )
    980       {
    981         READ_SVLC( iVal,        "matrix_coef[i][j]" ); sei.m_matrix_coef[i][j] = iVal;
    982       }
    983     }
    984   }
    985 
    986   for ( Int i=0 ; i<3 ; i++ )
    987   {
    988     READ_CODE( 8, uiVal, "num_output_pivots_minus1[i]" ); sei.m_num_output_pivots[i] = (uiVal==0) ? 2 : (uiVal + 1) ;
    989     sei.m_coded_output_pivot_value[i]   = new Int[ sei.m_num_output_pivots[i] ];
    990     sei.m_target_output_pivot_value[i]  = new Int[ sei.m_num_output_pivots[i] ];
    991     if( uiVal > 0 )
    992     {
    993       for ( Int j=0 ; j<sei.m_num_output_pivots[i] ; j++ )
    994       {
    995         READ_CODE( (( sei.m_colour_map_coded_data_bit_depth + 7 ) >> 3 ) << 3, uiVal, "coded_output_pivot_value[i][j]" );  sei.m_coded_output_pivot_value[i][j] = uiVal;
    996         READ_CODE( (( sei.m_colour_map_coded_data_bit_depth + 7 ) >> 3 ) << 3, uiVal, "target_output_pivot_value[i][j]" ); sei.m_target_output_pivot_value[i][j] = uiVal;
    997       }
    998     }
    999     else
    1000     {
    1001       sei.m_coded_output_pivot_value[i][0]  = 0;
    1002       sei.m_target_output_pivot_value[i][0] = 0;
    1003       sei.m_coded_output_pivot_value[i][1]  = (1 << sei.m_colour_map_coded_data_bit_depth) - 1 ;
    1004       sei.m_target_output_pivot_value[i][1] = (1 << sei.m_colour_map_target_bit_depth) - 1 ;
     949    for( Int c=0 ; c<3 ; c++ )
     950    {
     951      READ_CODE( 8, uiVal, "pre_lut_num_val_minus1[c]" ); sei.m_preLutNumValMinus1[c] = (uiVal==0) ? 1 : uiVal;
     952      sei.m_preLutCodedValue[c].resize(sei.m_preLutNumValMinus1[c]+1);
     953      sei.m_preLutTargetValue[c].resize(sei.m_preLutNumValMinus1[c]+1);
     954      if( uiVal> 0 )
     955        for ( Int i=0 ; i<=sei.m_preLutNumValMinus1[c] ; i++ )
     956        {
     957          READ_CODE( (( sei.m_colourRemapCodedDataBitDepth   + 7 ) >> 3 ) << 3, uiVal, "pre_lut_coded_value[c][i]" );  sei.m_preLutCodedValue[c][i]  = uiVal;
     958          READ_CODE( (( sei.m_colourRemapTargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "pre_lut_target_value[c][i]" ); sei.m_preLutTargetValue[c][i] = uiVal;
     959        }
     960      else // pre_lut_num_val_minus1[c] == 0
     961      {
     962        sei.m_preLutCodedValue[c][0]  = 0;
     963        sei.m_preLutTargetValue[c][0] = 0;
     964        sei.m_preLutCodedValue[c][1]  = (1 << sei.m_colourRemapCodedDataBitDepth) - 1 ;
     965        sei.m_preLutTargetValue[c][1] = (1 << sei.m_colourRemapTargetBitDepth) - 1 ;
     966      }
     967    }
     968
     969    READ_FLAG( uiVal,      "colour_remap_matrix_present_flag" ); sei.m_colourRemapMatrixPresentFlag = uiVal;
     970    if( sei.m_colourRemapMatrixPresentFlag )
     971    {
     972      READ_CODE( 4, uiVal, "log2_matrix_denom" ); sei.m_log2MatrixDenom = uiVal;
     973      for ( Int c=0 ; c<3 ; c++ )
     974        for ( Int i=0 ; i<3 ; i++ )
     975        {
     976          READ_SVLC( iVal, "colour_remap_coeffs[c][i]" ); sei.m_colourRemapCoeffs[c][i] = iVal;
     977        }
     978    }
     979    else // setting default matrix (I3)
     980    {
     981      sei.m_log2MatrixDenom = 0;
     982      for ( Int c=0 ; c<3 ; c++ )
     983        for ( Int i=0 ; i<3 ; i++ )
     984          sei.m_colourRemapCoeffs[c][i] = (c==i) ? 1 : 0;
     985    }
     986    for( Int c=0 ; c<3 ; c++ )
     987    {
     988      READ_CODE( 8, uiVal, "post_lut_num_val_minus1[c]" ); sei.m_postLutNumValMinus1[c] = (uiVal==0) ? 1 : uiVal;
     989      sei.m_postLutCodedValue[c].resize(sei.m_postLutNumValMinus1[c]+1);
     990      sei.m_postLutTargetValue[c].resize(sei.m_postLutNumValMinus1[c]+1);
     991      if( uiVal > 0 )
     992        for ( Int i=0 ; i<=sei.m_postLutNumValMinus1[c] ; i++ )
     993        {
     994          READ_CODE( (( sei.m_colourRemapTargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_coded_value[c][i]" );  sei.m_postLutCodedValue[c][i] = uiVal;
     995          READ_CODE( (( sei.m_colourRemapTargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_target_value[c][i]" ); sei.m_postLutTargetValue[c][i] = uiVal;
     996        }
     997      else
     998      {
     999        sei.m_postLutCodedValue[c][0]  = 0;
     1000        sei.m_postLutTargetValue[c][0] = 0;
     1001        sei.m_postLutTargetValue[c][1] = (1 << sei.m_colourRemapTargetBitDepth) - 1;
     1002        sei.m_postLutCodedValue[c][1]  = (1 << sei.m_colourRemapTargetBitDepth) - 1;
     1003      }
    10051004    }
    10061005  }
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.h

    r846 r856  
    9393  Void xParseSEIKneeFunctionInfo      (SEIKneeFunctionInfo& sei, UInt payloadSize);
    9494#endif
    95 #if Q0074_SEI_COLOR_MAPPING
    96   Void xParseSEIColorMappingInfo      (SEIColorMappingInfo& sei, UInt payloadSize);
     95#if Q0074_COLOUR_REMAPPING_SEI
     96  Void xParseSEIColourRemappingInfo   (SEIColourRemappingInfo& sei, UInt payloadSize);
    9797#endif
    9898  Void xParseSEISOPDescription        (SEISOPDescription &sei, UInt payloadSize);
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r841 r856  
    5454//! \{
    5555static void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI);
     56#if Q0074_COLOUR_REMAPPING_SEI
     57static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* colourRemappingInfoSEI, UInt layerId=0 );
     58static std::vector<SEIColourRemappingInfo> storeCriSEI; //Persistent Colour Remapping Information SEI
     59#endif
    5660// ====================================================================================================================
    5761// Constructor / destructor / initialization / destroy
     
    252256    calcAndPrintHashStatus(*rpcPic->getPicYuvRec(), hash);
    253257  }
     258#if Q0074_COLOUR_REMAPPING_SEI
     259  if (m_colourRemapSEIEnabled)
     260  {
     261    SEIMessages colourRemappingInfo = getSeisByType(rpcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
     262    const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
     263    if (colourRemappingInfo.size() > 1)
     264    {
     265      printf ("Warning: Got multiple Colour Remapping Information SEI messages. Using first.");
     266    }
     267    applyColourRemapping(*rpcPic->getPicYuvRec(), seiColourRemappingInfo
     268#if SVC_EXTENSION
     269     , rpcPic->getLayerId()
     270#endif
     271     );
     272  }
     273#endif
    254274
    255275#if SETTING_PIC_OUTPUT_MARK
     
    339359  }
    340360}
     361
     362#if Q0074_COLOUR_REMAPPING_SEI
     363Void xInitColourRemappingLut( const Int bitDepthY, const Int bitDepthC, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI )
     364{
     365  for ( Int c=0 ; c<3 ; c++ )
     366  { 
     367    Int bitDepth = c ? bitDepthC : bitDepthY ;
     368    preLut[c].resize(1 << bitDepth);
     369    postLut[c].resize(1 << pCriSEI->m_colourRemapTargetBitDepth);
     370   
     371    Int bitDepthDiff = pCriSEI->m_colourRemapTargetBitDepth - bitDepth;
     372    Int iShift1 = (bitDepthDiff>0) ? bitDepthDiff : 0; //bit scale from bitdepth to TargetBitdepth (manage only case colourRemapTargetBitDepth>= bitdepth)
     373    if( bitDepthDiff<0 )
     374      printf ("Warning: CRI SEI - colourRemapTargetBitDepth (%d) <bitDepth (%d) - case not handled\n", pCriSEI->m_colourRemapTargetBitDepth, bitDepth);
     375    bitDepthDiff = pCriSEI->m_colourRemapTargetBitDepth - pCriSEI->m_colourRemapCodedDataBitDepth;
     376    Int iShift2 = (bitDepthDiff>0) ? bitDepthDiff : 0; //bit scale from codedDataBitdepth to TargetBitdepth (manage only case colourRemapTargetBitDepth>= colourRemapCodedDataBitDepth)
     377    if( bitDepthDiff<0 )
     378      printf ("Warning: CRI SEI - colourRemapTargetBitDepth (%d) <colourRemapCodedDataBitDepth (%d) - case not handled\n", pCriSEI->m_colourRemapTargetBitDepth, pCriSEI->m_colourRemapCodedDataBitDepth);
     379
     380    //Fill preLut
     381    for ( Int k=0 ; k<(1<<bitDepth) ; k++ )
     382    {
     383      Int iSample = k << iShift1 ;
     384      for ( Int iPivot=0 ; iPivot<=pCriSEI->m_preLutNumValMinus1[c] ; iPivot++ )
     385      {
     386        Int iCodedPrev  = pCriSEI->m_preLutCodedValue[c][iPivot]    << iShift2; //Coded in CodedDataBitdepth
     387        Int iCodedNext  = pCriSEI->m_preLutCodedValue[c][iPivot+1]  << iShift2; //Coded in CodedDataBitdepth
     388        Int iTargetPrev = pCriSEI->m_preLutTargetValue[c][iPivot];              //Coded in TargetBitdepth
     389        Int iTargetNext = pCriSEI->m_preLutTargetValue[c][iPivot+1];            //Coded in TargetBitdepth
     390        if ( iCodedPrev <= iSample && iSample <= iCodedNext )
     391        {
     392          Float fInterpol = (Float)( (iCodedNext - iSample)*iTargetPrev + (iSample - iCodedPrev)*iTargetNext ) * 1.f / (Float)(iCodedNext - iCodedPrev);
     393          preLut[c][k]  = (Int)( 0.5f + fInterpol );
     394          iPivot = pCriSEI->m_preLutNumValMinus1[c] + 1;
     395        }
     396      }
     397    }
     398   
     399    //Fill postLut
     400    for ( Int k=0 ; k<(1<<pCriSEI->m_colourRemapTargetBitDepth) ; k++ )
     401    {
     402      Int iSample = k;
     403      for ( Int iPivot=0 ; iPivot<=pCriSEI->m_postLutNumValMinus1[c] ; iPivot++ )
     404      {
     405        Int iCodedPrev  = pCriSEI->m_postLutCodedValue[c][iPivot];    //Coded in TargetBitdepth
     406        Int iCodedNext  = pCriSEI->m_postLutCodedValue[c][iPivot+1];  //Coded in TargetBitdepth
     407        Int iTargetPrev = pCriSEI->m_postLutTargetValue[c][iPivot];   //Coded in TargetBitdepth
     408        Int iTargetNext = pCriSEI->m_postLutTargetValue[c][iPivot+1]; //Coded in TargetBitdepth
     409        if ( iCodedPrev <= iSample && iSample <= iCodedNext )
     410        {
     411          Float fInterpol =  (Float)( (iCodedNext - iSample)*iTargetPrev + (iSample - iCodedPrev)*iTargetNext ) * 1.f / (Float)(iCodedNext - iCodedPrev) ;
     412          postLut[c][k]  = (Int)( 0.5f + fInterpol );
     413          iPivot = pCriSEI->m_postLutNumValMinus1[c] + 1;
     414        }
     415      }
     416    }
     417  }
     418}
     419
     420static void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, UInt layerId )
     421
     422  if( !storeCriSEI.size() )
     423#if SVC_EXTENSION
     424    storeCriSEI.resize(MAX_LAYERS);
     425#else
     426    storeCriSEI.resize(1);
     427#endif
     428
     429  if ( pCriSEI ) //if a CRI SEI has just been retrieved, keep it in memory (persistence management)
     430    storeCriSEI[layerId] = *pCriSEI;
     431
     432  if( !storeCriSEI[layerId].m_colourRemapCancelFlag )
     433  {
     434    Int iHeight  = pic.getHeight();
     435    Int iWidth   = pic.getWidth();
     436    Int iStride  = pic.getStride();
     437    Int iCStride = pic.getCStride();
     438
     439    Pel *YUVIn[3], *YUVOut[3];
     440    YUVIn[0] = pic.getLumaAddr();
     441    YUVIn[1] = pic.getCbAddr();
     442    YUVIn[2] = pic.getCrAddr();
     443   
     444    TComPicYuv picColourRemapped;
     445#if SVC_EXTENSION
     446#if AUXILIARY_PICTURES
     447    picColourRemapped.create( pic.getWidth(), pic.getHeight(), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
     448#else
     449    picColourRemapped.create( pic.getWidth(), pic.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
     450#endif
     451#else
     452    picColourRemapped.create( pic.getWidth(), pic.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     453#endif
     454    YUVOut[0] = picColourRemapped.getLumaAddr();
     455    YUVOut[1] = picColourRemapped.getCbAddr();
     456    YUVOut[2] = picColourRemapped.getCrAddr();
     457
     458#if SVC_EXTENSION
     459    Int bitDepthY = g_bitDepthYLayer[layerId];
     460    Int bitDepthC = g_bitDepthCLayer[layerId];
     461
     462    assert( g_bitDepthY == bitDepthY );
     463    assert( g_bitDepthC == bitDepthC );
     464#else
     465    Int bitDepthY = g_bitDepthY;
     466    Int bitDepthC = g_bitDepthC;
     467#endif
     468
     469    std::vector<Int> preLut[3];
     470    std::vector<Int> postLut[3];
     471    xInitColourRemappingLut( bitDepthY, bitDepthC, preLut, postLut, &storeCriSEI[layerId] );
     472   
     473    Int roundingOffset = (storeCriSEI[layerId].m_log2MatrixDenom==0) ? 0 : (1 << (storeCriSEI[layerId].m_log2MatrixDenom - 1));
     474
     475    for( Int y = 0; y < iHeight ; y++ )
     476    {
     477      for( Int x = 0; x < iWidth ; x++ )
     478      {
     479        Int YUVPre[3], YUVMat[3];
     480        YUVPre[0] = preLut[0][ YUVIn[0][x]   ];
     481        YUVPre[1] = preLut[1][ YUVIn[1][x>>1] ];
     482        YUVPre[2] = preLut[2][ YUVIn[2][x>>1] ];
     483
     484        YUVMat[0] = ( storeCriSEI[layerId].m_colourRemapCoeffs[0][0]*YUVPre[0]
     485                    + storeCriSEI[layerId].m_colourRemapCoeffs[0][1]*YUVPre[1]
     486                    + storeCriSEI[layerId].m_colourRemapCoeffs[0][2]*YUVPre[2]
     487                    + roundingOffset ) >> ( storeCriSEI[layerId].m_log2MatrixDenom );
     488        YUVMat[0] = Clip3( 0, (1<<storeCriSEI[layerId].m_colourRemapTargetBitDepth)-1, YUVMat[0] );
     489        YUVOut[0][x] = postLut[0][ YUVMat[0] ];
     490
     491        if( (y&1) && (x&1) )
     492        {
     493          for(Int c=1 ; c<3 ; c++)
     494          {
     495            YUVMat[c] = ( storeCriSEI[layerId].m_colourRemapCoeffs[c][0]*YUVPre[0]
     496                        + storeCriSEI[layerId].m_colourRemapCoeffs[c][1]*YUVPre[1]
     497                        + storeCriSEI[layerId].m_colourRemapCoeffs[c][2]*YUVPre[2]
     498                        + roundingOffset ) >> ( storeCriSEI[layerId].m_log2MatrixDenom );
     499            YUVMat[c] = Clip3( 0, (1<<storeCriSEI[layerId].m_colourRemapTargetBitDepth)-1, YUVMat[c] );
     500            YUVOut[c][x>>1] = postLut[c][ YUVMat[c] ];   
     501          }
     502        }
     503      }
     504      YUVIn[0]  += iStride;
     505      YUVOut[0] += iStride;
     506      if( y&1 )
     507      {
     508        YUVIn[1]  += iCStride;
     509        YUVIn[2]  += iCStride;
     510        YUVOut[1] += iCStride;
     511        YUVOut[2] += iCStride;
     512      }
     513    }
     514
     515    //Write remapped picture in decoding order
     516    Char  cTemp[255];
     517    sprintf(cTemp, "seiColourRemappedPic_L%d_%dx%d_%dbits.yuv", layerId, iWidth, iHeight, storeCriSEI[layerId].m_colourRemapTargetBitDepth );
     518    picColourRemapped.dump( cTemp, true, storeCriSEI[layerId].m_colourRemapTargetBitDepth );
     519
     520    picColourRemapped.destroy();
     521
     522    storeCriSEI[layerId].m_colourRemapCancelFlag = !storeCriSEI[layerId].m_colourRemapPersistenceFlag; //Handling persistence
     523  }
     524}
     525#endif
    341526//! \}
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h

    r595 r856  
    8282  Double                m_dDecTime;
    8383  Int                   m_decodedPictureHashSEIEnabled;  ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
    84 
     84#if Q0074_COLOUR_REMAPPING_SEI
     85  Bool                  m_colourRemapSEIEnabled;         ///< Enable/disable Colour Remapping Information SEI message acting on decoded pictures
     86#endif
    8587#if SVC_EXTENSION
    8688  UInt                  m_layerId;
     
    114116
    115117  void setDecodedPictureHashSEIEnabled(Int enabled) { m_decodedPictureHashSEIEnabled = enabled; }
     118#if Q0074_COLOUR_REMAPPING_SEI
     119  void setColourRemappingInfoSEIEnabled(Int enabled) { m_colourRemapSEIEnabled = enabled; }
     120#endif
    116121#if SVC_EXTENSION
    117122  TDecTop*   getLayerDec(UInt LayerId)  { return m_ppcTDecTop[LayerId]; }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r854 r856  
    117117#endif
    118118
    119 #if Q0074_SEI_COLOR_MAPPING
    120   m_ColorMapping = new TDecColorMapping();
    121 #endif
    122 
    123119#if POC_RESET_RESTRICTIONS
    124120  resetPocRestrictionCheckParameters();
     
    137133    delete m_pColorMappedPic;
    138134    m_pColorMappedPic = NULL;
    139   }
    140 #endif
    141 #if Q0074_SEI_COLOR_MAPPING
    142   if ( m_ColorMapping )
    143   {
    144     delete m_ColorMapping;
    145     m_ColorMapping = NULL;
    146135  }
    147136#endif
     
    891880  g_uiMaxCUDepth  = sps->getMaxCUDepth();
    892881  g_uiAddCUDepth  = max (0, sps->getLog2MinCodingBlockSize() - (Int)sps->getQuadtreeTULog2MinSize() );
    893 
    894 #if Q0074_SEI_COLOR_MAPPING
    895   for(Int compID=0; compID<3; compID++)
    896   {
    897     m_ColorMapping->setColorMapping( compID ? g_bitDepthC : g_bitDepthY, compID );
    898   }
    899 #endif
    900882
    901883  for (Int i = 0; i < sps->getLog2DiffMaxMinCodingBlockSize(); i++)
     
    23242306      }
    23252307    }
    2326 #if Q0074_SEI_COLOR_MAPPING
    2327     m_ColorMapping->setColorMapping( m_SEIs );
    2328 #endif
    23292308  }
    23302309#else
     
    28572836#endif //SVC_EXTENSION
    28582837
    2859 #if Q0074_SEI_COLOR_MAPPING
    2860 TDecColorMapping::TDecColorMapping()
    2861 {
    2862   m_pcColorMappingPic[0]   = NULL;
    2863   m_pcColorMappingPic[1]   = NULL;
    2864 
    2865   m_colorMapCancelFlag  = true;
    2866 
    2867   for( Int i=0 ; i<3 ; i++ )
    2868   {
    2869     m_lut1d_computed[i]             = false;
    2870     m_lut1d_input[i]                = NULL;
    2871     m_coded_input_pivot_value[i]    = NULL;
    2872     m_target_input_pivot_value[i]   = NULL;
    2873   }
    2874   for( Int i=0 ; i<3 ; i++ )
    2875   {
    2876     m_lut1d_output[i]               = NULL;
    2877     m_coded_output_pivot_value[i]   = NULL;
    2878     m_target_output_pivot_value[i]  = NULL;
    2879   }
    2880 }
    2881 
    2882 TDecColorMapping::~TDecColorMapping()
    2883 {
    2884   if ( m_pcColorMappingPic[0] )  delete m_pcColorMappingPic[0];
    2885   if ( m_pcColorMappingPic[1] )  delete m_pcColorMappingPic[1];
    2886 
    2887   for( Int i=0 ; i<3 ; i++ )
    2888   {
    2889     if ( m_lut1d_input[i] )               delete  m_lut1d_input[i];
    2890     if ( m_coded_input_pivot_value[i] )   delete  m_coded_input_pivot_value[i];
    2891     if ( m_target_input_pivot_value[i] )  delete  m_target_input_pivot_value[i];
    2892   }
    2893   for( Int i=0 ; i<3 ; i++ )
    2894   {
    2895     if ( m_lut1d_output[i] )               delete  m_lut1d_output[i];
    2896     if ( m_coded_output_pivot_value[i] )   delete  m_coded_output_pivot_value[i];
    2897     if ( m_target_output_pivot_value[i] )  delete  m_target_output_pivot_value[i];
    2898   }
    2899 }
    2900 
    2901 Void  TDecColorMapping::setColorMapping( SEIMessages m_SEIs )
    2902 {
    2903   SEIMessages colorMappingInfo = getSeisByType(m_SEIs, SEI::COLOR_MAPPING_INFO) ;
    2904   SEIColorMappingInfo *seiColorMappingInfo = NULL;
    2905   if (colorMappingInfo.size() !=0)
    2906   {
    2907     seiColorMappingInfo = (SEIColorMappingInfo*)(*colorMappingInfo.begin());
    2908 
    2909     m_colorMapId                              = seiColorMappingInfo->m_colorMapId;
    2910     m_colorMapCancelFlag                      = seiColorMappingInfo->m_colorMapCancelFlag;
    2911     if( !m_colorMapCancelFlag )
    2912     {
    2913       m_colorMapPersistenceFlag                 = seiColorMappingInfo->m_colorMapPersistenceFlag;
    2914       m_colorMap_video_signal_type_present_flag = seiColorMappingInfo->m_colorMap_video_signal_type_present_flag;
    2915       m_colorMap_video_full_range_flag          = seiColorMappingInfo->m_colorMap_video_full_range_flag;
    2916       m_colorMap_primaries                      = seiColorMappingInfo->m_colorMap_primaries;
    2917       m_colorMap_transfer_characteristics       = seiColorMappingInfo->m_colorMap_transfer_characteristics;
    2918       m_colorMap_matrix_coeffs                  = seiColorMappingInfo->m_colorMap_matrix_coeffs;
    2919       m_colorMapModelId                         = seiColorMappingInfo->m_colorMapModelId;
    2920 
    2921       m_colour_map_coded_data_bit_depth         = seiColorMappingInfo->m_colour_map_coded_data_bit_depth;
    2922       m_colour_map_target_bit_depth             = seiColorMappingInfo->m_colour_map_target_bit_depth;
    2923 
    2924       for( Int i=0 ; i<3 ; i++ )
    2925       {
    2926         m_num_input_pivots[i]                 = seiColorMappingInfo->m_num_input_pivots[i];
    2927         if ( m_coded_input_pivot_value[i] )   delete  m_coded_input_pivot_value[i];
    2928         if ( m_target_input_pivot_value[i] )  delete  m_target_input_pivot_value[i];
    2929         m_coded_input_pivot_value[i]          = new Int[ m_num_input_pivots[i] ];
    2930         m_target_input_pivot_value[i]         = new Int[ m_num_input_pivots[i] ];
    2931         for( Int j=0 ; j<m_num_input_pivots[i] ; j++ )
    2932         {
    2933           m_coded_input_pivot_value[i][j]     = seiColorMappingInfo->m_coded_input_pivot_value[i][j];
    2934           m_target_input_pivot_value[i][j]    = seiColorMappingInfo->m_target_input_pivot_value[i][j];
    2935         }
    2936       }
    2937 
    2938       m_matrix_flag       = seiColorMappingInfo->m_matrix_flag;
    2939       m_log2_matrix_denom = m_matrix_flag ? (seiColorMappingInfo->m_log2_matrix_denom) : (0) ;
    2940       for( Int i=0 ; i<3 ; i++ )
    2941       {
    2942         for( Int j=0 ; j<3 ; j++ )
    2943         {
    2944           m_matrix_coef[i][j]  = seiColorMappingInfo->m_matrix_coef[i][j];
    2945         }
    2946       }
    2947 
    2948       for( Int i=0 ; i<3 ; i++ )
    2949       {
    2950         m_num_output_pivots[i]                 = seiColorMappingInfo->m_num_output_pivots[i];
    2951         if ( m_coded_output_pivot_value[i] )   delete  m_coded_output_pivot_value[i];
    2952         if ( m_target_output_pivot_value[i] )  delete  m_target_output_pivot_value[i];
    2953         m_coded_output_pivot_value[i]          = new Int[ m_num_output_pivots[i] ];
    2954         m_target_output_pivot_value[i]         = new Int[ m_num_output_pivots[i] ];
    2955         for( Int j=0 ; j<m_num_output_pivots[i] ; j++ )
    2956         {
    2957           m_coded_output_pivot_value[i][j]     = seiColorMappingInfo->m_coded_output_pivot_value[i][j];
    2958           m_target_output_pivot_value[i][j]    = seiColorMappingInfo->m_target_output_pivot_value[i][j];
    2959         }
    2960       }
    2961 
    2962       memset( m_lut1d_computed, 0, sizeof( m_lut1d_computed ) );
    2963     }
    2964   }
    2965 
    2966 }
    2967 
    2968 Void  TDecColorMapping::setColorMapping( Int bitDepth, Int iComp )
    2969 {
    2970   if( !m_colorMapCancelFlag && !m_lut1d_computed[iComp] )
    2971   {
    2972 
    2973     if ( m_lut1d_input[iComp] )   delete m_lut1d_input[iComp];
    2974     if ( m_lut1d_output[iComp] )  delete m_lut1d_output[iComp];
    2975 
    2976     m_lut1d_input[iComp]  = new Int[ 1 << bitDepth ];
    2977     m_lut1d_output[iComp] = new Int[ 1 << bitDepth ];
    2978 
    2979     Int iShift      = (m_colour_map_coded_data_bit_depth >= bitDepth) ? (m_colour_map_coded_data_bit_depth - bitDepth) : (0);
    2980     Int iShiftPivot = (m_colour_map_coded_data_bit_depth >= bitDepth) ? (0) : (bitDepth - m_colour_map_coded_data_bit_depth);
    2981 
    2982     for( Int k=0 ; k<(1<<bitDepth) ; k++ )
    2983     {
    2984       Int iSample = k << iShift ;
    2985       if( m_num_input_pivots[iComp] > 1 )
    2986       {
    2987         for( Int iPivot=0 ; iPivot<m_num_input_pivots[iComp] ; iPivot++ )
    2988         {
    2989           Int iCodedPrev  = m_coded_input_pivot_value[iComp][iPivot]     << iShiftPivot;
    2990           Int iCodedNext  = m_coded_input_pivot_value[iComp][iPivot+1]   << iShiftPivot;
    2991           Int iTargetPrev = m_target_input_pivot_value[iComp][iPivot]    << iShiftPivot;
    2992           Int iTargetNext = m_target_input_pivot_value[iComp][iPivot+1]  << iShiftPivot;
    2993           if ( iCodedPrev <= iSample && iSample < iCodedNext )
    2994           {
    2995             Float fInterpol = (Float)( (iCodedNext - iSample)*iTargetPrev + (iSample - iCodedPrev)*iTargetNext ) / (Float)(iCodedNext - iCodedPrev) ;
    2996             m_lut1d_input[iComp][k]  = (Int)( 0.5 + fInterpol );
    2997             iPivot = m_num_input_pivots[iComp]; // stop
    2998           }
    2999         }
    3000       }
    3001       else
    3002       {
    3003         m_lut1d_input[iComp][k]  = k;
    3004       }
    3005     }
    3006 
    3007     iShift      = ( (m_colour_map_coded_data_bit_depth >= bitDepth) ? (m_colour_map_coded_data_bit_depth - bitDepth) : (0) );
    3008     Int iOffset = iShift ? (1 << (iShift - 1)) : (0) ;
    3009     iShiftPivot = (m_colour_map_target_bit_depth >= bitDepth) ? (0) : (bitDepth - m_colour_map_target_bit_depth) ;
    3010     for( Int k=0 ; k<(1<<bitDepth) ; k++ )
    3011     {
    3012       Int iSample = k << iShift;
    3013       if ( m_num_output_pivots[iComp]>1 )
    3014       {
    3015         for( Int iPivot=0 ; iPivot<m_num_output_pivots[iComp] ; iPivot++ )
    3016         {
    3017           Int iCodedPrev  = m_coded_output_pivot_value[iComp][iPivot]     << iShiftPivot;
    3018           Int iCodedNext  = m_coded_output_pivot_value[iComp][iPivot+1]   << iShiftPivot;
    3019           Int iTargetPrev = m_target_output_pivot_value[iComp][iPivot]    << iShiftPivot;
    3020           Int iTargetNext = m_target_output_pivot_value[iComp][iPivot+1]  << iShiftPivot;
    3021           if ( iCodedPrev <= iSample && iSample < iCodedNext )
    3022           {
    3023             Float fInterpol =  (Float)( (iCodedNext - iSample)*iTargetPrev + (iSample - iCodedPrev)*iTargetNext ) / (Float)(iCodedNext - iCodedPrev) ;
    3024             m_lut1d_output[iComp][k]  = ( (Int)(0.5 + fInterpol) + iOffset ) >> iShift ;
    3025             iPivot = m_num_output_pivots[iComp]; // stop
    3026           }
    3027         }
    3028       }
    3029       else
    3030       {
    3031         m_lut1d_output[iComp][k]  = k;
    3032       }
    3033     }
    3034 
    3035     m_lut1d_computed[iComp] = true;
    3036   }
    3037 
    3038 }
    3039 
    3040 TComPicYuv* TDecColorMapping::getColorMapping( TComPicYuv* pPicYuvRec, Int iTop, Int curlayerId )
    3041 {
    3042   if( !m_colorMapCancelFlag )
    3043   {
    3044     if( !m_pcColorMappingPic[iTop] )
    3045     {
    3046       m_pcColorMappingPic[iTop] = new TComPicYuv;
    3047 #if SVC_EXTENSION
    3048       m_pcColorMappingPic[iTop]->create( pPicYuvRec->getWidth(), pPicYuvRec->getHeight(), pPicYuvRec->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    3049 #else
    3050       m_pcColorMappingPic[iTop]->create( pPicYuvRec->getWidth(), pPicYuvRec->getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    3051 #endif
    3052     }
    3053 
    3054     Int iHeight   = pPicYuvRec->getHeight();
    3055     Int iWidth    = pPicYuvRec->getWidth();
    3056     Int iStride   = pPicYuvRec->getStride();
    3057     Int iCStride  = pPicYuvRec->getCStride();
    3058 
    3059     Pel* Lum0   = pPicYuvRec->getLumaAddr();
    3060     Pel* Cb0    = pPicYuvRec->getCbAddr();
    3061     Pel* Cr0    = pPicYuvRec->getCrAddr();
    3062     Pel* Lum1   = m_pcColorMappingPic[iTop]->getLumaAddr();
    3063     Pel* Cb1    = m_pcColorMappingPic[iTop]->getCbAddr();
    3064     Pel* Cr1    = m_pcColorMappingPic[iTop]->getCrAddr();
    3065 
    3066 #if SVC_EXTENSION
    3067     Int bitDepthY = g_bitDepthYLayer[curlayerId];
    3068     Int bitDepthC = g_bitDepthCLayer[curlayerId];
    3069 
    3070     assert( g_bitDepthY == bitDepthY );
    3071     assert( g_bitDepthC == bitDepthC );
    3072 #else
    3073     Int bitDepthY = g_bitDepthY;
    3074     Int bitDepthC = g_bitDepthC;
    3075 #endif
    3076 
    3077     Int iYShift = (m_colour_map_target_bit_depth >= bitDepthY) ? (m_colour_map_target_bit_depth - bitDepthY) : (0) ;
    3078     Int iCShift = (m_colour_map_target_bit_depth >= bitDepthC) ? (m_colour_map_target_bit_depth - bitDepthC) : (0) ;
    3079     Int offsetY = (1 << (m_log2_matrix_denom+iYShift - 1));
    3080     Int offsetC = (1 << (m_log2_matrix_denom+iCShift - 1));
    3081 
    3082     Int   cShift  = 1 ;
    3083 
    3084     //Pel*  LumPrev0 = Lum0;
    3085     for( Int y = 0; y < iHeight ; y++ )
    3086     {
    3087       Bool  bDoChroma = (y % 2);
    3088       for( Int x = 0; x < iWidth ; x++ )
    3089       {
    3090         Int s1Y = m_lut1d_input[0][ Lum0[x]   ];
    3091         Int s1U = m_lut1d_input[1][ Cb0[x>>1] ];
    3092         Int s1V = m_lut1d_input[2][ Cr0[x>>1] ];
    3093 
    3094         Int s2Y, s2U, s2V;
    3095         if( m_matrix_flag )
    3096         {
    3097           s2Y = ( m_matrix_coef[0][0]*s1Y + m_matrix_coef[0][1]*s1U + m_matrix_coef[0][2]*s1V + offsetY ) >> ( m_log2_matrix_denom + iYShift );
    3098           //s2Y = ClipBD( s2Y , bitDepthY );
    3099           s2Y = ClipY( s2Y );
    3100           Lum1[x]   = m_lut1d_output[0][ s2Y ];
    3101         }
    3102         else
    3103         {
    3104           s1Y       = ( s1Y + offsetY ) >> iYShift ;
    3105           //s1Y = ClipBD( s1Y , bitDepthY );
    3106           s1Y = ClipY( s1Y );
    3107           Lum1[x]   = m_lut1d_output[0][ s1Y ];
    3108         }
    3109 
    3110         if( bDoChroma && (x%2) )
    3111         {
    3112           if( m_matrix_flag )
    3113           {
    3114             //s1Y = ( m_lut1d_input[0][ Lum0[x] ] + m_lut1d_input[0][ Lum0[x+1] ] + m_lut1d_input[0][ LumPrev0[x] ] + m_lut1d_input[0][ LumPrev0[x+1] ] + 2 ) >> 2 ;
    3115             //s1Y = m_lut1d_input[0][ (Lum0[x] + Lum0[x+1] + LumPrev0[x] + LumPrev0[x+1] + 2)>>2 ] ;
    3116             s1Y = m_lut1d_input[0][ Lum0[x] ];
    3117 
    3118             s2U = ( m_matrix_coef[1][0]*s1Y + m_matrix_coef[1][1]*s1U + m_matrix_coef[1][2]*s1V + offsetC ) >> ( m_log2_matrix_denom + iCShift ) ;
    3119             s2V = ( m_matrix_coef[2][0]*s1Y + m_matrix_coef[2][1]*s1U + m_matrix_coef[2][2]*s1V + offsetC ) >> ( m_log2_matrix_denom + iCShift ) ;
    3120             //s2U = ClipBD( s2U , bitDepthC );
    3121             //s2V = ClipBD( s2V , bitDepthC );
    3122             s2U = ClipC( s2U );
    3123             s2V = ClipC( s2V );
    3124             Cb1[x>>cShift] = m_lut1d_output[1][ s2U ];
    3125             Cr1[x>>cShift] = m_lut1d_output[2][ s2V ];
    3126           }
    3127           else
    3128           {
    3129             s1U       = ( s1U + offsetC ) >> iCShift ;
    3130             s1V       = ( s1V + offsetC ) >> iCShift ;
    3131             //s1U = ClipBD( s1U , bitDepthC );
    3132             //s1V = ClipBD( s1V , bitDepthC );
    3133             s1U = ClipC( s1U );
    3134             s1V = ClipC( s1V );
    3135             Cb1[x>>cShift] = m_lut1d_output[1][ s1U ];
    3136             Cr1[x>>cShift] = m_lut1d_output[2][ s1V ];
    3137           }
    3138         }
    3139 
    3140       }
    3141 
    3142       //LumPrev0 = Lum0;
    3143       Lum0  += iStride;
    3144       Lum1  += iStride;
    3145       if( bDoChroma )
    3146       {
    3147         Cb0 += iCStride;
    3148         Cr0 += iCStride;
    3149         Cb1 += iCStride;
    3150         Cr1 += iCStride;
    3151       }
    3152     }
    3153 
    3154     return m_pcColorMappingPic[iTop];
    3155   }
    3156 
    3157   return pPicYuvRec;
    3158 }
    3159 #endif
    31602838
    31612839//! \}
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r854 r856  
    6464// ====================================================================================================================
    6565
    66 #if Q0074_SEI_COLOR_MAPPING
    67 class TDecColorMapping
    68 {
    69   Int   m_colorMapId;
    70   Bool  m_colorMapCancelFlag;
    71   Bool  m_colorMapPersistenceFlag;
    72   Bool  m_colorMap_video_signal_type_present_flag;
    73   Bool  m_colorMap_video_full_range_flag;
    74   Int   m_colorMap_primaries;
    75   Int   m_colorMap_transfer_characteristics;
    76   Int   m_colorMap_matrix_coeffs;
    77   Int   m_colorMapModelId;
    78 
    79   Int   m_colour_map_coded_data_bit_depth;
    80   Int   m_colour_map_target_bit_depth;
    81 
    82   Int   m_num_input_pivots[3];
    83   Int*  m_coded_input_pivot_value[3];
    84   Int*  m_target_input_pivot_value[3];
    85  
    86   Bool  m_matrix_flag;
    87   Int   m_log2_matrix_denom;
    88   Int   m_matrix_coef[3][3];
    89 
    90   Int   m_num_output_pivots[3];
    91   Int*  m_coded_output_pivot_value[3];
    92   Int*  m_target_output_pivot_value[3];
    93 
    94   Bool  m_lut1d_computed[3];
    95   Int*  m_lut1d_input[3];
    96   Int*  m_lut1d_output[3];
    97   TComPicYuv* m_pcColorMappingPic[2];
    98 
    99 public:
    100   TDecColorMapping();
    101   ~TDecColorMapping();
    102 
    103   Bool        getColorMappingFlag()                     { return(!m_colorMapCancelFlag);};
    104 
    105   Void        setColorMapping( SEIMessages m_SEIs );
    106   Void        setColorMapping( Int bitDepthY, Int bitDepthC );
    107   TComPicYuv* getColorMapping( TComPicYuv* pPicYuvRec, Int iTop=0, Int curlayerId=0 );
    108 };// END CLASS DEFINITION TDecColorMapping
    109 #endif
    110 
    11166/// decoder class
    11267class TDecTop
     
    209164#endif
    210165public:
    211 #if Q0074_SEI_COLOR_MAPPING
    212   TDecColorMapping* m_ColorMapping;
    213 #endif
    214 
    215166#if POC_RESET_RESTRICTIONS
    216167  static Bool                    m_checkPocRestrictionsForCurrAu;
     
    236187
    237188  void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); }
     189#if Q0074_COLOUR_REMAPPING_SEI
     190  void setColourRemappingInfoSEIEnabled(Bool enabled)  { m_cGopDecoder.setColourRemappingInfoSEIEnabled(enabled); }
     191#endif
    238192
    239193  Void  init();
Note: See TracChangeset for help on using the changeset viewer.