Changeset 856 in SHVCSoftware for branches/SHM-dev/source/App/TAppDecoder


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/App/TAppDecoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp

    r820 r856  
    115115  ("TarDecLayerIdSetFile,l", cfg_TargetDecLayerIdSetFile, string(""), "targetDecLayerIdSet file name. The file should include white space separated LayerId values to be decoded. Omitting the option or a value of -1 in the file decodes all layers.")
    116116  ("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n")
     117#if Q0074_COLOUR_REMAPPING_SEI
     118  ("SEIColourRemappingInfo", m_colourRemapSEIEnabled, false, "Control handling of Colour Remapping Information SEI messages\n"
     119                                              "\t1: apply colour remapping on decoded pictures if available in the bitstream\n"
     120                                              "\t0: ignore SEI message")
     121#endif
    117122  ;
    118123  po::setDefaults(opts);
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h

    r820 r856  
    6969  Int           m_iMaxTemporalLayer;                  ///< maximum temporal layer to be decoded
    7070  Int           m_decodedPictureHashSEIEnabled;       ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
     71#if Q0074_COLOUR_REMAPPING_SEI
     72  Bool          m_colourRemapSEIEnabled;              ///< Enable the Colour Remapping Information SEI message if available (remapping decoded pictures)
     73#endif
    7174
    7275#if SVC_EXTENSION
     
    98101  , m_iMaxTemporalLayer(-1)
    99102  , m_decodedPictureHashSEIEnabled(0)
     103#if Q0074_COLOUR_REMAPPING_SEI
     104  , m_colourRemapSEIEnabled(0)
     105#endif
    100106#if SVC_EXTENSION
    101107  , m_tgtLayerId(0)
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r845 r856  
    568568    m_acTDecTop[layer].init();
    569569    m_acTDecTop[layer].setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
     570#if Q0074_COLOUR_REMAPPING_SEI
     571    m_acTDecTop[layer].setColourRemappingInfoSEIEnabled(m_colourRemapSEIEnabled);
     572#endif
    570573    m_acTDecTop[layer].setNumLayer( m_tgtLayerId + 1 );
    571574#if OUTPUT_LAYER_SET_INDEX
     
    573576#endif
    574577  }
    575 
    576578#else
    577579  m_cTDecTop.init();
    578580  m_cTDecTop.setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
     581#if Q0074_COLOUR_REMAPPING_SEI
     582  m_cTDecTop.setColourRemappingInfoSEIEnabled(m_colourRemapSEIEnabled);
     583#endif
    579584#endif
    580585}
     
    675680          TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec();
    676681          TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec();
    677 #if Q0074_SEI_COLOR_MAPPING
    678           if( m_acTDecTop[layerId].m_ColorMapping->getColorMappingFlag() )
    679           {
    680             pPicCYuvRecTop = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRecTop, 0, layerId );
    681             pPicCYuvRecBot = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRecBot, 1, layerId );
    682           }
    683 #endif
    684682#if REPN_FORMAT_IN_VPS
    685683          UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     
    710708          TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec();
    711709          TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec();
    712 #if Q0074_SEI_COLOR_MAPPING
    713           if ( m_cTDecTop.m_ColorMapping->getColorMappingFlag() )
    714           {
    715             pPicCYuvRecTop = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRecTop, 0 );
    716             pPicCYuvRecBot = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRecBot, 1 );
    717           }
    718 #endif
    719710          m_cTVideoIOYuvReconFile.write( pPicCYuvRecTop, pPicCYuvRecBot,
    720711            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
     
    791782          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    792783          TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();
    793 #if Q0074_SEI_COLOR_MAPPING
    794           if ( m_acTDecTop[layerId].m_ColorMapping->getColorMappingFlag() )
    795           {
    796             pPicCYuvRec = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerId );
    797           }
    798 #endif
    799 
    800784#if REPN_FORMAT_IN_VPS
    801785          UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     
    898882          TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec();
    899883          TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec();
    900 #if Q0074_SEI_COLOR_MAPPING
    901           if( m_acTDecTop[layerId].m_ColorMapping->getColorMappingFlag() )
    902           {
    903             pPicCYuvRecTop = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRecTop, 0, layerId );
    904             pPicCYuvRecBot = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRecBot, 1, layerId );
    905           }
    906 #endif
    907884#if REPN_FORMAT_IN_VPS
    908885          UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     
    933910          TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec();
    934911          TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec();
    935 #if Q0074_SEI_COLOR_MAPPING
    936           if( m_cTDecTop.m_ColorMapping->getColorMappingFlag() )
    937           {
    938             pPicCYuvRecTop = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRecTop, 0 );
    939             pPicCYuvRecBot = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRecBot, 1 );
    940           }
    941 #endif
    942912          m_cTVideoIOYuvReconFile.write( pPicCYuvRecTop, pPicCYuvRecBot,
    943913            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
     
    1017987          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    1018988          TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();
    1019 #if Q0074_SEI_COLOR_MAPPING
    1020           if( m_acTDecTop[layerId].m_ColorMapping->getColorMappingFlag() )
    1021           {
    1022             pPicCYuvRec = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerId );
    1023           }
    1024 #endif
    1025989#if REPN_FORMAT_IN_VPS
    1026990          UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     
    10491013          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    10501014          TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();
    1051 #if Q0074_SEI_COLOR_MAPPING
    1052           if( m_cTDecTop.m_ColorMapping->getColorMappingFlag() )
    1053           {
    1054             pPicCYuvRec = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRec );
    1055           }
    1056 #endif
    10571015          m_cTVideoIOYuvReconFile.write( pPicCYuvRec,
    10581016            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
     
    11371095#endif
    11381096    TComPicYuv* pPicCYuvRec = pic->getPicYuvRec();
    1139 #if Q0074_SEI_COLOR_MAPPING
    1140     pPicCYuvRec = m_acTDecTop[layerIdx].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerIdx );
    1141 #endif
    11421097    m_acTVideoIOYuvReconFile[layerIdx].write( pPicCYuvRec,
    11431098      conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
Note: See TracChangeset for help on using the changeset viewer.