Changeset 1483 in SHVCSoftware


Ignore:
Timestamp:
22 Oct 2015, 14:50:29 (9 years ago)
Author:
seregin
Message:

remove m_layerId from TComDataCU

Location:
branches/SHM-dev/source/Lib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1465 r1483  
    460460
    461461  memset( m_skipFlag          , false,                      m_uiNumPartition * sizeof( *m_skipFlag ) );
    462 
    463 #if SVC_EXTENSION
    464   m_layerId           = pcPic->getLayerId();
    465 #endif
    466 
    467462  memset( m_pePartSize        , NUMBER_OF_PART_SIZES,       m_uiNumPartition * sizeof( *m_pePartSize ) );
    468463  memset( m_pePredMode        , NUMBER_OF_PREDICTION_MODES, m_uiNumPartition * sizeof( *m_pePredMode ) );
     
    32903285  UInt uiCUAddrBase = 0, uiAbsPartAddrBase = 0;
    32913286  // the right reference layerIdc should be specified, currently it is set to m_layerId-1
    3292   TComDataCU* pcTempCU = getBaseColCU(m_layerId - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, posScalingFactor, false );
     3287  TComDataCU* pcTempCU = getBaseColCU(m_pcPic->getLayerId() - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, posScalingFactor, false );
    32933288
    32943289  if( pcTempCU->getPredictionMode( uiAbsPartAddrBase ) != MODE_INTRA )
     
    33633358    TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_0, refIdxL0);
    33643359
    3365     if(refPic->isILR(m_layerId))
     3360    if(refPic->isILR(m_pcPic->getLayerId()))
    33663361    {
    33673362      checkZeroMVILR &= (cMvFieldL0.getHor() == 0 && cMvFieldL0.getVer() == 0);
     
    33693364      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
    33703365      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
    3371       checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( getLayerIdx(), refPic->getLayerIdx() );
     3366      checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_pcPic->getLayerIdx(), refPic->getLayerIdx() );
    33723367    }
    33733368  }
     
    33773372    TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_1, refIdxL1);
    33783373
    3379     if(refPic->isILR(m_layerId))
     3374    if(refPic->isILR(m_pcPic->getLayerId()))
    33803375    {
    33813376      checkZeroMVILR &= (cMvFieldL1.getHor() == 0 && cMvFieldL1.getVer() == 0);
     
    33833378      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
    33843379      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
    3385       checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( getLayerIdx(), refPic->getLayerIdx() );
     3380      checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_pcPic->getLayerIdx(), refPic->getLayerIdx() );
    33863381    }
    33873382  }
     
    33973392  Bool checkZeroMVILR = true;
    33983393
    3399   if(getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(m_layerId))
     3394  if(getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(m_pcPic->getLayerId()))
    34003395  {
    34013396    AMVPInfo* pcAMVPInfo = getCUMvField(eRefPicList)->getAMVPInfo();
     
    34163411  {
    34173412    Int refIdxL0 = cMvFieldL0.getRefIdx();
    3418     checkILR = getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->isILR(m_layerId);
     3413    checkILR = getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->isILR(m_pcPic->getLayerId());
    34193414  }
    34203415  if(uhInterDir&0x2)  //list1
    34213416  {
    34223417    Int refIdxL1  = cMvFieldL1.getRefIdx();
    3423     checkILR = checkILR || getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->isILR(m_layerId);
     3418    checkILR = checkILR || getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->isILR(m_pcPic->getLayerId());
    34243419  }
    34253420
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r1465 r1483  
    8888
    8989#if SVC_EXTENSION
    90   UInt          m_layerId;                              ///< layer id
    9190#if FAST_INTRA_SHVC
    9291  UChar         m_reducedSetIntraModes[NUM_INTRA_MODE-1];
     
    481480
    482481#if SVC_EXTENSION
    483   Void          setLayerId                    ( UInt layerId )                                             { m_layerId = layerId;        }
    484   UInt          getLayerId                    ( ) const                                                    { return m_layerId;           }
    485   UInt          getLayerIdx                   ( ) const                                                    { return m_pcSlice->getVPS()->getLayerIdxInVps(m_layerId); }
    486482#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    487483  Bool          isInterLayerReference         ( UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1 ) const;
  • branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r1468 r1483  
    580580
    581581#if SVC_EXTENSION
    582   if( pcCU->getLayerId() > 0 )
     582  if( pcCU->getPic()->getLayerId() > 0 )
    583583  {
    584584    TComPic* refPic = pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx);
    585585
    586     if( refPic->isILR(pcCU->getLayerId()) )
     586    if( refPic->isILR(pcCU->getPic()->getLayerId()) )
    587587    {
    588588      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
    589589      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
    590       assert( pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), refPic->getLayerIdx() ) );
     590      assert( pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), refPic->getLayerIdx() ) );
    591591
    592592#if REF_IDX_ME_ZEROMV
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1472 r1483  
    35943594
    35953595      pcIlpPic[refLayerIdc]->getPicYuvRec()->setBorderExtension( false );
    3596       pcIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder();
    3597       for (Int j=0; j<pcIlpPic[refLayerIdc]->getPicSym()->getNumberOfCtusInFrame(); j++)    // set reference CU layerId
    3598       {
    3599         pcIlpPic[refLayerIdc]->getPicSym()->getCtu(j)->setLayerId( pcIlpPic[refLayerIdc]->getLayerId() );
    3600       }
    3601       pcIlpPic[refLayerIdc]->setIsLongTerm(1);
     3596      pcIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder();     
     3597      pcIlpPic[refLayerIdc]->setIsLongTerm(true);
    36023598
    36033599      // assign PPS to ILRP to be used for reference location offsets
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp

    r1368 r1483  
    7171  m_layerId = layerId;
    7272
    73   for ( UInt ui = 0; ui < m_uiMaxDepth-1; ui++ )
    74   {
    75     m_ppcCU     [ui]->setLayerId(layerId);
    76   }
    77  
    7873#if LAYER_CTB
    7974  memcpy(g_auiLayerZscanToRaster[m_layerId], g_auiZscanToRaster, sizeof( g_auiZscanToRaster ) );
     
    171166    setIsChromaQpAdjCoded(true);
    172167  }
    173 
    174 #if SVC_EXTENSION
    175   pCtu->setLayerId(m_layerId);
    176 #endif
    177 
     168 
    178169  // start from the top level CU
    179170  xDecodeCU( pCtu, 0, 0, isLastCtuOfSliceSegment);
     
    311302#if SVC_EXTENSION
    312303  // Check CU skip for higher layer IRAP skip flag
    313   if( pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->getLayerId() > 0 )
     304  if( pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->getPic()->getLayerId() > 0 )
    314305  {
    315306    Bool lowerLayerExist = false;
    316     for(int i=0;i<pcCU->getLayerId();i++)
     307    for( Int i = 0; i < pcCU->getPic()->getLayerId(); i++ )
    317308    {
    318309      if(pcCU->getSlice()->getBaseColPic(pcCU->getSlice()->getInterLayerPredLayerIdc(i)))
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r1406 r1483  
    212212 
    213213#if SVC_EXTENSION
    214   m_ppcTEncTop         = pcEncTop->getLayerEnc();
    215   for(UInt i=0 ; i< m_uhTotalDepth-1 ; i++)
    216   {   
    217     m_ppcBestCU[i]->setLayerId(pcEncTop->getLayerId());
    218     m_ppcTempCU[i]->setLayerId(pcEncTop->getLayerId());
    219   }
     214  m_ppcTEncTop         = pcEncTop->getLayerEnc(); 
    220215#endif
    221216 
     
    465460#if ENCODER_FAST_MODE
    466461    Bool testInter = true;
    467     if( rpcBestCU->getLayerId() > 0 )
     462    if( rpcBestCU->getPic()->getLayerId() > 0 )
    468463    {
    469464      if(pcSlice->getSliceType() == P_SLICE && pcSlice->getNumRefIdx(REF_PIC_LIST_0) == pcSlice->getActiveNumILRRefIdx())
     
    18321827  Bool disableILP = false;
    18331828
    1834   if (rpcCU->getLayerId() == (m_pcEncCfg->getNumLayer() - 1)  && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getCtuRsAddr()) >= 0)
     1829  if (rpcCU->getPic()->getLayerId() == (m_pcEncCfg->getNumLayer() - 1)  && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getCtuRsAddr()) >= 0)
    18351830  {
    18361831    if (rpcCU->getPic()->getPicSym()->getTileSetType(rpcCU->getCtuRsAddr()) == 2)
     
    18681863Void TEncCu::xVerifyTileSetConstraint( TComDataCU*& rpcCU )
    18691864{
    1870   if (rpcCU->getLayerId() == (m_pcEncCfg->getNumLayer() - 1)  && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getCtuRsAddr()) >= 0 &&
    1871       m_disableILP)
     1865  if( rpcCU->getPic()->getLayerId() == (m_pcEncCfg->getNumLayer() - 1)  && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() &&
     1866      rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getCtuRsAddr()) >= 0 && m_disableILP )
    18721867  {
    18731868    UInt numPartitions = rpcCU->getPic()->getNumPartitionsInCtu();
     
    18831878            if (mvField->getRefIdx(i) >= 0)
    18841879            {
    1885               assert(!(rpcCU->getSlice()->getRefPic(RefPicList(refList), mvField->getRefIdx(i))->isILR(rpcCU->getLayerId())));
     1880              assert(!(rpcCU->getSlice()->getRefPic(RefPicList(refList), mvField->getRefIdx(i))->isILR(rpcCU->getPic()->getLayerId())));
    18861881            }
    18871882          }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1469 r1483  
    22652265      pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );
    22662266
    2267       if( m_pcEncCfg->getUseFastIntraScalable() && pcCU->getLayerId() > 0 )
     2267      if( m_pcEncCfg->getUseFastIntraScalable() && pcCU->getPic()->getLayerId() > 0 )
    22682268      {
    22692269        numModesAvailable = pcCU->reduceSetOfIntraModes(uiPartOffset, uiPreds, pcCU->getPic()->getPosScalingFactor(), iMode );
     
    30983098       
    30993099        // motion search only for the ILRP with sample prediction type
    3100         if( pcPic->isILR( pcCU->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcPic->getLayerIdx() ) )
     3100        if( pcPic->isILR( pcCU->getPic()->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), pcPic->getLayerIdx() ) )
    31013101        {
    31023102          continue;
     
    31043104
    31053105#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    3106         if( pcPic->isILR(pcCU->getLayerId()) && m_disableILP )
     3106        if( pcPic->isILR(pcCU->getPic()->getLayerId()) && m_disableILP )
    31073107        {
    31083108          continue;
     
    31103110#endif
    31113111#if ENCODER_FAST_MODE       
    3112         if( pcPic->isILR(pcCU->getLayerId()) && (ePartSize == SIZE_2Nx2N) )
     3112        if( pcPic->isILR(pcCU->getPic()->getLayerId()) && (ePartSize == SIZE_2Nx2N) )
    31133113        {
    31143114          continue;
     
    32023202
    32033203#if SVC_EXTENSION
    3204     if( pcCU->getLayerId() && !doneUniPred )
     3204    if( pcCU->getPic()->getLayerId() && !doneUniPred )
    32053205    {
    32063206      // there is no valid reference pictures for inter prediction
     
    33133313        Bool     testIter = true;
    33143314        TComPic* pcPic    = pcCU->getSlice()->getRefPic( RefPicList(1 - iRefList), iRefIdxBi[1 - iRefList] );
    3315         if(pcPic->isILR(pcCU->getLayerId()) && (ePartSize == SIZE_2Nx2N))
     3315        if(pcPic->isILR(pcCU->getPic()->getLayerId()) && (ePartSize == SIZE_2Nx2N))
    33163316        {
    33173317          testIter = false;  //the fixed part is ILR, skip this iteration       
    33183318        }
    33193319#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    3320         if (pcPic->isILR(pcCU->getLayerId()) && m_disableILP)
     3320        if (pcPic->isILR(pcCU->getPic()->getLayerId()) && m_disableILP)
    33213321        {
    33223322          testIter = false;
     
    33363336
    33373337          // motion search only for the ILRP with sample prediction type
    3338           if( pcPic->isILR( pcCU->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcPic->getLayerIdx() ) )
     3338          if( pcPic->isILR( pcCU->getPic()->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), pcPic->getLayerIdx() ) )
    33393339          {
    33403340            continue;
    33413341          }
    33423342
    3343           if(pcPic->isILR(pcCU->getLayerId()) && (ePartSize == SIZE_2Nx2N))
     3343          if(pcPic->isILR(pcCU->getPic()->getLayerId()) && (ePartSize == SIZE_2Nx2N))
    33443344          {
    33453345            testRefIdx = false;  //the refined part is ILR, skip this reference pic           
    33463346          }
    33473347#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    3348           if (pcPic->isILR(pcCU->getLayerId()) && m_disableILP)
     3348          if (pcPic->isILR(pcCU->getPic()->getLayerId()) && m_disableILP)
    33493349          {
    33503350            testRefIdx = false;
     
    39193919  //  Do integer search
    39203920#if REF_IDX_ME_ZEROMV
    3921   if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getLayerId()))  //ILR reference pic
     3921  if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getPic()->getLayerId()))  //ILR reference pic
    39223922  {
    39233923    rcMv.setZero();  //use Mv(0, 0) for integer ME
     
    39553955
    39563956#if REF_IDX_ME_ZEROMV
    3957   if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getLayerId()))  //ILR reference pic
     3957  if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getPic()->getLayerId()))  //ILR reference pic
    39583958  {
    39593959    xPatternSearchFracDIFMv0( pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost );
     
    60266026
    60276027      // ILRP has to be for the sample prediction type
    6028       if( refPic->isILR(pcCU->getLayerId()) && refPic->getLayerId() == refLayerId && pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcCU->getSlice()->getVPS()->getLayerIdxInVps(refLayerId) ) )
     6028      if( refPic->isILR(pcCU->getPic()->getLayerId()) && refPic->getLayerId() == refLayerId && pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), pcCU->getSlice()->getVPS()->getLayerIdxInVps(refLayerId) ) )
    60296029      {
    60306030        iRefIdxTemp = refIdx;
Note: See TracChangeset for help on using the changeset viewer.