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


Ignore:
Timestamp:
18 Jul 2015, 00:52:46 (9 years ago)
Author:
seregin
Message:

port rev 4323 (g_uiMaxCUWidth, g_uiMaxCUHeight)

Location:
branches/SHM-dev/source/App/TAppDecoder
Files:
2 edited

Legend:

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

    r1287 r1289  
    5656//! \{
    5757
    58 #if Q0074_COLOUR_REMAPPING_SEI
    59 static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* colourRemappingInfoSEI, const BitDepths& bitDpeths, UInt layerId=0 );
    60 static std::vector<SEIColourRemappingInfo> storeCriSEI; //Persistent Colour Remapping Information SEI
    61 static SEIColourRemappingInfo *seiColourRemappingInfoPrevious=NULL ;
    62 #endif
    63 
    6458// ====================================================================================================================
    6559// Constructor / destructor / initialization / destroy
     
    6862#if SVC_EXTENSION
    6963TAppDecTop::TAppDecTop()
     64#if Q0074_COLOUR_REMAPPING_SEI
     65: seiColourRemappingInfoPrevious(NULL)
     66#endif
    7067{
    7168  for(UInt layer=0; layer < MAX_LAYERS; layer++)
     
    7875TAppDecTop::TAppDecTop()
    7976: m_iPOCLastDisplay(-MAX_INT)
     77#if Q0074_COLOUR_REMAPPING_SEI
     78, seiColourRemappingInfoPrevious(NULL)
     79#endif
    8080{
    8181}
     
    939939          SEIMessages colourRemappingInfo = getSeisByType(pcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
    940940          const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
     941          const TComSPS *sps = pcPic->getSlice(0)->getSPS();
     942
    941943          if (colourRemappingInfo.size() > 1)
    942944          {
     
    945947          if (seiColourRemappingInfo)
    946948          {
    947             applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfo);
     949            xApplyColourRemapping(sps, *pcPic->getPicYuvRec(), seiColourRemappingInfo);
    948950          }
    949951          else  // using the last CRI SEI received
     
    951953            const SEIColourRemappingInfo *seiColourRemappingInfoCopy;
    952954            seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious;
    953             applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfoCopy);
     955            xApplyColourRemapping(sps, *pcPic->getPicYuvRec(), seiColourRemappingInfoCopy);
    954956          }
    955957
     
    11641166          SEIMessages colourRemappingInfo = getSeisByType(pcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
    11651167          const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
     1168          const TComSPS *sps = pcPic->getSlice(0)->getSPS();
     1169
    11661170          if (colourRemappingInfo.size() > 1)
    11671171          {
     
    11701174          if (seiColourRemappingInfo)
    11711175          {
    1172             applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfo);
     1176            xApplyColourRemapping( sps, *pcPic->getPicYuvRec(), seiColourRemappingInfo );
    11731177          }
    11741178          else  // using the last CRI SEI received
     
    11761180            const SEIColourRemappingInfo *seiColourRemappingInfoCopy;
    11771181            seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious;
    1178             applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfoCopy);
     1182            xApplyColourRemapping( sps, *pcPic->getPicYuvRec(), seiColourRemappingInfoCopy );
    11791183          }
    11801184
     
    12861290    if( m_colourRemapSEIEnabled )
    12871291    {
     1292      const TComSPS *sps = pic->getSlice(0)->getSPS();
    12881293      SEIMessages colourRemappingInfo = getSeisByType(pic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
    12891294      const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
     1295
    12901296      if (colourRemappingInfo.size() > 1)
    12911297      {
     
    12961302      {
    12971303        //printf ("\n\nColour Remapping is applied to POC : %d and LayerId : %d ",pic->getPOC(), pic->getLayerId());
    1298 #if SVC_EXTENSION
    1299         applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfo, pic->getSlice(0)->getBitDepths(), pic->getLayerId());
    1300 #else
    1301         applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfo, pic->getSlice(0)->getBitDepths());
    1302 #endif
     1304        xApplyColourRemapping( sps, *pic->getPicYuvRec(), seiColourRemappingInfo, pic->getLayerId() );
    13031305      }
    13041306      else  // using the last CRI SEI received
     
    13061308        const SEIColourRemappingInfo *seiColourRemappingInfoCopy;
    13071309        seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious;
    1308 #if SVC_EXTENSION
    1309         applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getSlice(0)->getBitDepths(), pic->getLayerId());
    1310 #else
    1311         applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getSlice(0)->getBitDepths());
    1312 #endif
     1310        xApplyColourRemapping( sps, *pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getLayerId() );
    13131311      }
    13141312
     
    18461844
    18471845#if Q0074_COLOUR_REMAPPING_SEI
    1848 Void xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI )
     1846Void TAppDecTop::xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI )
    18491847{
    18501848  for ( Int c=0 ; c<3 ; c++ )
     
    19031901}
    19041902
    1905 static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, const BitDepths& bitDpeths, UInt layerId )
    1906 
     1903Void TAppDecTop::xApplyColourRemapping( const TComSPS *sps, TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, UInt layerId )
     1904{
     1905  const BitDepths& bitDpeths = sps->getBitDepths();
     1906
    19071907  if( !storeCriSEI.size() )
     1908  {
    19081909#if SVC_EXTENSION
    19091910    storeCriSEI.resize(MAX_LAYERS);
     
    19111912    storeCriSEI.resize(1);
    19121913#endif
     1914  }
    19131915
    19141916  if ( pCriSEI ) //if a CRI SEI has just been retrieved, keep it in memory (persistence management)
     1917  {
    19151918    storeCriSEI[layerId] = *pCriSEI;
     1919  }
    19161920
    19171921  if( !storeCriSEI[layerId].m_colourRemapCancelFlag && pCriSEI)
     
    19281932   
    19291933    TComPicYuv picColourRemapped;
     1934
    19301935#if SVC_EXTENSION
    19311936#if AUXILIARY_PICTURES
    1932     picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
    1933 #else
    1934     picColourRemapped.create( pic.getWidth(), pic.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
    1935 #endif
    1936 #else
    1937     picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     1937    picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL );
     1938#else
     1939    picColourRemapped.create( pic.getWidth(), pic.getHeight(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL );
     1940#endif
     1941#else
     1942    picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true );
    19381943#endif
    19391944    YUVOut[0] = picColourRemapped.getAddr(COMPONENT_Y);
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h

    r1287 r1289  
    7373 
    7474  // for output control 
     75  std::ofstream                   m_seiMessageFileStream;         ///< Used for outputing SEI messages.
     76
    7577#if SVC_EXTENSION
    7678#if CONFORMANCE_BITSTREAM_MODE
    77   TVideoIOYuv                      m_confReconFile[63];        ///< decode YUV files
     79  TVideoIOYuv                     m_confReconFile[63];        ///< decode YUV files
    7880#endif
    7981  Int                             m_aiPOCLastDisplay [MAX_LAYERS]; ///< last POC in display order
     
    8183  Int                             m_iPOCLastDisplay;              ///< last POC in display order
    8284#endif
    83   std::ofstream                   m_seiMessageFileStream;         ///< Used for outputing SEI messages. 
     85#if Q0074_COLOUR_REMAPPING_SEI
     86  std::vector<SEIColourRemappingInfo> storeCriSEI; //Persistent Colour Remapping Information SEI
     87  SEIColourRemappingInfo *seiColourRemappingInfoPrevious;
     88#endif
    8489
    8590public:
     
    98103#if Q0074_COLOUR_REMAPPING_SEI
    99104  Void  xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI );
     105  Void  xApplyColourRemapping( const TComSPS *sps, TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, UInt layerId = 0 );
    100106#endif
    101107#if SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.