Changeset 259 in SHVCSoftware for branches/SHM-2.1-multilayers-dev


Ignore:
Timestamp:
5 Jun 2013, 03:48:35 (11 years ago)
Author:
seregin
Message:

reference layers setting and related

Location:
branches/SHM-2.1-multilayers-dev/source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-multilayers-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r245 r259  
    910910#if VPS_EXTN_DIRECT_REF_LAYERS
    911911  // Direct reference layers
     912  UInt maxDirectRefLayers = 0;
    912913  for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
    913914  {
    914915    vps->setNumDirectRefLayers( layerCtr, m_acTEncTop[layerCtr].getNumDirectRefLayers() );
     916    maxDirectRefLayers = max<UInt>( maxDirectRefLayers, vps->getNumDirectRefLayers( layerCtr ) );
     917
    915918    for(i = 0; i < vps->getNumDirectRefLayers(layerCtr); i++)
    916919    {
     
    930933#endif
    931934#if JCTVC_M0458_INTERLAYER_RPS_SIG       
    932     vps->setMaxOneActiveRefLayerFlag(true);
     935    vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true);
    933936#endif
    934937#else
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon/TComPic.cpp

    r254 r259  
    568568
    569569#if REF_IDX_MFM
    570 Void TComPic::copyUpsampledMvField(TComPic* pcPicBase)
    571 {
    572   UInt refLayerIdc = pcPicBase->getLayerId();
     570Void TComPic::copyUpsampledMvField(UInt refLayerIdc, TComPic* pcPicBase)
     571{
    573572#if AVC_SYNTAX && !ILP_DECODED_PICTURE
    574573  const Window &confBL = pcPicBase->getConformanceWindow();
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon/TComPic.h

    r253 r259  
    124124
    125125#if REF_IDX_MFM
    126   Void          copyUpsampledMvField  ( TComPic* pcPicBase );
     126  Void          copyUpsampledMvField  ( UInt refLayerIdc, TComPic* pcPicBase );
    127127  Void          initUpsampledMvField  ();
    128128#endif
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon/TComSlice.cpp

    r256 r259  
    544544      if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && m_pcSPS->getMFMEnabledFlag())
    545545      {
    546         ilpPic[refLayerIdc]->copyUpsampledMvField( m_pcBaseColPic[refLayerIdc] );
     546        ilpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] );
    547547      }
    548548      else
     
    10941094  m_activeNumILRRefIdx         = pSrc->m_activeNumILRRefIdx;
    10951095  m_interLayerPredEnabledFlag  = pSrc->m_interLayerPredEnabledFlag;
    1096   m_numInterLayerRefPics       = pSrc->m_numInterLayerRefPics;
    10971096  memcpy( m_interLayerPredLayerIdc, pSrc->m_interLayerPredLayerIdc, sizeof( m_interLayerPredLayerIdc ) );
    10981097#elif REF_IDX_FRAMEWORK
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon/TComSlice.h

    r253 r259  
    15321532#if JCTVC_M0458_INTERLAYER_RPS_SIG
    15331533  Bool       m_interLayerPredEnabledFlag;
    1534   Int        m_numInterLayerRefPics;
    15351534#endif
    15361535public:
     
    18031802  Void      setActiveNumILRRefIdx     ( Int i )         { m_activeNumILRRefIdx = i;     } 
    18041803
    1805   Int       getInterLayerPredLayerIdc (UInt Idx )               { return  m_interLayerPredLayerIdc[Idx];}
    1806   Void      setInterLayerPredLayerIdc (UInt val, UInt Idx)      { m_interLayerPredLayerIdc[Idx] = val;  }
     1804  Int       getInterLayerPredLayerIdc (UInt layerIdx)                        { return  m_interLayerPredLayerIdc[layerIdx];}
     1805  Void      setInterLayerPredLayerIdc (UInt refLayerIdc, UInt layerIdx)      { m_interLayerPredLayerIdc[layerIdx] = refLayerIdc;  }
    18071806
    18081807  Void      setInterLayerPredEnabledFlag     ( Bool   val )    { m_interLayerPredEnabledFlag = val; }
    1809   Bool      getInterLayerPredEnabledFlag     ()                { return m_interLayerPredEnabledFlag;}
    1810 
    1811   Void      setNumInterLayerRefPics          ( UInt   val )    { m_numInterLayerRefPics = val; }
    1812   UInt      getNumInterLayerRefPics          ()                { return m_numInterLayerRefPics;} 
     1808  Bool      getInterLayerPredEnabledFlag     ()                { return m_interLayerPredEnabledFlag;}
    18131809#else
    18141810  Void      setNumILRRefIdx     ( Int i )               { m_numILRRefIdx = i;     }
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r249 r259  
    10671067          if( !pcSlice->getVPS()->getMaxOneActiveRefLayerFlag())
    10681068          {
    1069             WRITE_CODE(pcSlice->getNumInterLayerRefPics(), numBits,"num_inter_layer_ref_pics_minus1");
     1069            WRITE_CODE(pcSlice->getActiveNumILRRefIdx() - 1, numBits,"num_inter_layer_ref_pics_minus1");
    10701070          }       
    10711071          for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r253 r259  
    458458    if (rpcBestCU->getLayerId() > 0)
    459459    {
    460       // the right reference layerIdc should be specified, currently it is set to 0
    461       if (rpcBestCU->getSlice()->getBaseColPic(0)->getSlice(0)->getSliceType() == I_SLICE)
     460      TComList<TComPic*> *cListPic = m_ppcTEncTop[rpcBestCU->getLayerId()]->getRefLayerEnc(rpcBestCU->getLayerId()-1)->getListPic();
     461      TComPic* picLowerLayer = pcSlice->getRefPic( *cListPic, pcSlice->getPOC() );
     462      if(picLowerLayer->getSlice(0)->getSliceType() == I_SLICE)
    462463      {
    463464        testInter = false;
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r191 r259  
    491491  {
    492492#if JCTVC_M0458_INTERLAYER_RPS_SIG
    493   // currently only one reference layer is supported in software and no decision logic to select yet.
    494   // hence num of active inter layer references is set to one always
    495493    if( rpcSlice->getNumILRRefIdx() > 0 )
    496494    {
    497       rpcSlice->setActiveNumILRRefIdx(1);
     495      rpcSlice->setActiveNumILRRefIdx( rpcSlice->getNumILRRefIdx() );
     496      for( Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ )
     497      {
     498        rpcSlice->setInterLayerPredLayerIdc(i, i);
     499      }
    498500      rpcSlice->setInterLayerPredEnabledFlag(1);
    499501    }
Note: See TracChangeset for help on using the changeset viewer.