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


Ignore:
Timestamp:
24 Nov 2015, 03:13:36 (9 years ago)
Author:
fujitsu
Message:

Added support of scalable range extension profiles. Also corrected few issues such as the confWindow wrong initialization. Code is controlled by the macro SCALABLE_REXT.

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

Legend:

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

    r1464 r1487  
    681681}
    682682
     683#if SCALABLE_REXT
     684Void TDecCavlc::parseSPS(TComSPS* pcSPS, ParameterSetManager* pcParamSetManager)
     685#else
    683686Void TDecCavlc::parseSPS(TComSPS* pcSPS)
     687#endif
    684688{
    685689#if ENC_DEC_TRACE
     
    689693  UInt  uiCode;
    690694  READ_CODE( 4,  uiCode, "sps_video_parameter_set_id");          pcSPS->setVPSId        ( uiCode );
    691 
     695#if SCALABLE_REXT
     696  const TComVPS* pTmpVPS = pcParamSetManager->getVPS(pcSPS->getVPSId());
     697#endif
    692698#if SVC_EXTENSION
    693699  UInt uiTmp = 0;
     
    742748      pcSPS->setUpdateRepFormatIndex(uiCode);
    743749    }
     750#if SCALABLE_REXT
     751    // If update_rep_format_flag is equal to 0, the variable repFormatIdx is set equal to vps_rep_format_idx[ LayerIdxInVps[ layerIdCurr ] ].
     752    else
     753    {
     754      Int iVPSRepFormatIdx = pTmpVPS->getVpsRepFormatIdx( pTmpVPS->getLayerIdxInVps( pcSPS->getLayerId() ) );
     755      pcSPS->setUpdateRepFormatIndex( iVPSRepFormatIdx );
     756
     757      pcSPS->setChromaFormatIdc(              pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getChromaFormatVpsIdc() );
     758      pcSPS->setPicWidthInLumaSamples(        pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getPicWidthVpsInLumaSamples() );
     759      pcSPS->setPicHeightInLumaSamples(       pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getPicHeightVpsInLumaSamples() );
     760      pcSPS->setBitDepth(CHANNEL_TYPE_LUMA,   pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getBitDepthVpsLuma() );
     761      pcSPS->setBitDepth(CHANNEL_TYPE_CHROMA, pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getBitDepthVpsChroma() );
     762      Window &conf = pcSPS->getConformanceWindow();
     763      conf.setWindowLeftOffset(               pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getConformanceWindowVps().getWindowLeftOffset() );
     764      conf.setWindowRightOffset(              pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getConformanceWindowVps().getWindowRightOffset() );
     765      conf.setWindowTopOffset(                pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getConformanceWindowVps().getWindowTopOffset() );
     766      conf.setWindowBottomOffset(             pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getConformanceWindowVps().getWindowBottomOffset() );
     767    }
     768#endif
    744769  }
    745770  else
     
    21662191
    21672192  if (ptl->getProfileIdc() == Profile::MAINREXT           || ptl->getProfileCompatibilityFlag(Profile::MAINREXT) ||
    2168       ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT || ptl->getProfileCompatibilityFlag(Profile::HIGHTHROUGHPUTREXT))
     2193      ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT || ptl->getProfileCompatibilityFlag(Profile::HIGHTHROUGHPUTREXT
     2194#if SCALABLE_REXT
     2195      || ptl->getProfileIdc() == Profile::SCALABLEREXT
     2196#endif
     2197      ))
    21692198  {
    21702199    UInt maxBitDepth=16;
     
    29793008            ProfileTierLevel* ptl = vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL();
    29803009            numIncludedLayers++;
     3010#if SCALABLE_REXT
     3011            // if scalable profile is Scalable Main 10 or Scalable Rext, dimension_id = 2
     3012            const Profile::Name profileName = ( ptl->getProfileIdc() == Profile::SCALABLEMAIN10 || ptl->getProfileIdc() == Profile::SCALABLEREXT ) ? Profile::SCALABLEMAIN : ptl->getProfileIdc();
     3013#else
    29813014            const Profile::Name profileName = ptl->getProfileIdc() == Profile::SCALABLEMAIN10 ? Profile::SCALABLEMAIN : ptl->getProfileIdc();
     3015#endif
    29823016
    29833017            for( Int p = 0; p < profiles.size(); p++ )
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r1295 r1487  
    7676  Void  parseQtRootCbf      ( UInt uiAbsPartIdx, UInt& uiQtRootCbf );
    7777  Void  parseVPS            ( TComVPS* pcVPS );
     78#if SCALABLE_REXT
     79  Void  parseSPS            ( TComSPS* pcSPS, ParameterSetManager* pcParamSetManager );
     80#else
    7881  Void  parseSPS            ( TComSPS* pcSPS );
     82#endif
    7983#if !SVC_EXTENSION
    8084  Void  parsePPS            ( TComPPS* pcPPS );
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecEntropy.h

    r1295 r1487  
    7070
    7171  virtual Void  parseVPS                  ( TComVPS* pcVPS )     = 0;
     72#if SCALABLE_REXT
     73  virtual Void  parseSPS                  ( TComSPS* pcSPS, ParameterSetManager* pcParamSetManager )     = 0;
     74#else
    7275  virtual Void  parseSPS                  ( TComSPS* pcSPS )     = 0;
     76#endif
    7377#if CGS_3D_ASYMLUT
    7478  virtual Void  parsePPS                  ( TComPPS* pcPPS, TCom3DAsymLUT * pc3DAsymLUT , Int nLayerID )     = 0;
     
    143147
    144148  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
     149#if SCALABLE_REXT
     150  Void    decodeSPS                   ( TComSPS* pcSPS, ParameterSetManager* pcParamSetManager ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, pcParamSetManager); }
     151#else
    145152  Void    decodeSPS                   ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); }
     153#endif
    146154
    147155#if CGS_3D_ASYMLUT
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.h

    r1295 r1487  
    7878  Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
    7979  Void  parseVPS                  ( TComVPS* /*pcVPS*/ ) {}
     80#if SCALABLE_REXT
     81  Void  parseSPS                  (TComSPS*  /*pcSPS*/, ParameterSetManager* /*pcParamSetManager*/ ) {}
     82#else
    8083  Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
     84#endif
    8185#if CGS_3D_ASYMLUT
    8286  Void  parsePPS                  ( TComPPS* /*pcPPS*/, TCom3DAsymLUT * /*pc3DAsymLUT*/, Int /*nLayerID*/ ) {}
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1486 r1487  
    19391939  sps->setLayerId(m_layerId);
    19401940#endif
     1941#if SCALABLE_REXT
     1942  m_cEntropyDecoder.decodeSPS( sps, &m_parameterSetManager );
     1943#else
    19411944  m_cEntropyDecoder.decodeSPS( sps );
     1945#endif
    19421946  m_parameterSetManager.storeSPS(sps, naluData);
    19431947}
Note: See TracChangeset for help on using the changeset viewer.