Changeset 1085 in SHVCSoftware for branches/SHM-dev/source


Ignore:
Timestamp:
26 Mar 2015, 04:33:14 (10 years ago)
Author:
seregin
Message:

fix for getMaxTidIlRefPicsPlus1 and remove O0225_MAX_TID_FOR_REF_LAYERS

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

Legend:

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

    r1081 r1085  
    14981498    for( i = 0; i < vps->getMaxLayers() - 1; i++ )
    14991499    {
    1500 #if O0225_MAX_TID_FOR_REF_LAYERS
    15011500      for( Int j = i+1; j < vps->getMaxLayers(); j++)
    15021501      {
    15031502        vps->setMaxTidIlRefPicsPlus1(i, j, m_acTEncTop[i].getMaxTidIlRefPicsPlus1());
    15041503      }
    1505 #else
    1506       vps->setMaxTidIlRefPicsPlus1(i, m_acTEncTop[i].getMaxTidIlRefPicsPlus1());
    1507 #endif
    15081504    }
    15091505  }
     
    15121508    for( i = 0; i < vps->getMaxLayers() - 1; i++ )
    15131509    {
    1514 #if O0225_MAX_TID_FOR_REF_LAYERS
    15151510      for( Int j = i+1; j < vps->getMaxLayers(); j++)
    15161511      {
    15171512        vps->setMaxTidIlRefPicsPlus1(i, j, 7);
    15181513      }
    1519 #else
    1520       vps->setMaxTidIlRefPicsPlus1(i, 7);
    1521 #endif
    15221514    }
    15231515  }
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1083 r1085  
    498498    for( i=0; i < m_pcVPS->getNumDirectRefLayers( m_layerId ); i++ )
    499499    {
    500 #if O0225_MAX_TID_FOR_REF_LAYERS
    501       Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[i]->getSlice(0)->getLayerId(),m_layerId);
    502 #else
    503       Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[i]->getSlice(0)->getLayerId());
    504 #endif
     500      Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[i]->getSlice(0)->getLayerIdx(), getLayerIdx());
     501
    505502      if( ((Int)(ilpPic[i]->getSlice(0)->getTLayer())<= maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[i]->getSlice(0)->getRapPicFlag() ) )
    506503      {
     
    654651      {
    655652        Int refLayerIdc = m_interLayerPredLayerIdc[i];
    656 #if O0225_MAX_TID_FOR_REF_LAYERS
    657         Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId);
    658 #else
    659         Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());
    660 #endif
     653        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerIdx(), getLayerIdx());
    661654        if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )
    662655        {
     
    682675      {
    683676        Int refLayerIdc = m_interLayerPredLayerIdc[i];
    684 #if O0225_MAX_TID_FOR_REF_LAYERS
    685         Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId);
    686 #else
    687         Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());
    688 #endif
     677        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerIdx(), getLayerIdx());
    689678        if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )
    690679        {
     
    719708      {
    720709        Int refLayerIdc = m_interLayerPredLayerIdc[i];
    721 #if O0225_MAX_TID_FOR_REF_LAYERS
    722         Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId);
    723 #else
    724         Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());
    725 #endif
     710        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1( ilpPic[refLayerIdc]->getSlice(0)->getLayerIdx(), getLayerIdx() );
    726711        if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )
    727712        {
     
    21272112  for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1 - 1; i++)
    21282113  {
    2129 #if O0225_MAX_TID_FOR_REF_LAYERS
    21302114    for( Int j = 0; j < MAX_VPS_LAYER_IDX_PLUS1; j++)
    21312115    {
    21322116      m_maxTidIlRefPicsPlus1[i][j] = m_uiMaxTLayers + 1;
    21332117    }
    2134 #else
    2135     m_maxTidIlRefPicsPlus1[i] = m_uiMaxTLayers + 1;
    2136 #endif
    21372118  }
    21382119#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     
    43714352#endif
    43724353
    4373 #if O0225_MAX_TID_FOR_REF_LAYERS
    4374       Int maxTidIlRefPicsPlus1 = m_pcVPS->getMaxTidIlRefPicsPlus1( pcIlpPic[refLayerIdc]->getSlice(0)->getLayerId(), m_layerId );
    4375 #else
    4376       Int maxTidIlRefPicsPlus1 = m_pcVPS->getMaxTidIlRefPicsPlus1( pcIlpPic[refLayerIdc]->getSlice(0)->getLayerId() );
    4377 #endif
     4354      Int maxTidIlRefPicsPlus1 = m_pcVPS->getMaxTidIlRefPicsPlus1( pcIlpPic[refLayerIdc]->getSlice(0)->getLayerIdx(), getLayerIdx() );
    43784355      assert( (Int)pcIlpPic[refLayerIdc]->getSlice(0)->getTLayer() < maxTidIlRefPicsPlus1 || ( !maxTidIlRefPicsPlus1 && pcIlpPic[refLayerIdc]->getSlice(0)->getRapPicFlag() ) );
    43794356
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1078 r1085  
    750750  Bool       m_crossLayerAlignedIdrOnlyFlag;
    751751#endif
    752 #if O0225_MAX_TID_FOR_REF_LAYERS
    753752  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_IDX_PLUS1 - 1][MAX_VPS_LAYER_IDX_PLUS1];
    754 #else
    755   UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_IDX_PLUS1 - 1];
    756 #endif
    757753  Bool       m_maxTidRefPresentFlag;
    758754#if VPS_TSLAYERS
     
    11401136  Void   setNumDirectRefLayers(Int layerId, UInt refLayerNum)                   { m_numDirectRefLayers[layerId] = refLayerNum;            }
    11411137
    1142   UInt   getRefLayerId(Int layerId, Int refLayerIdx)                            { return m_refLayerId[layerId][refLayerIdx];              }
    1143   Void   setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId)           { m_refLayerId[layerId][refLayerIdx] = refLayerId;        }
     1138  UInt   getRefLayerId(Int layerId, Int refLayerIdc)                            { return m_refLayerId[layerId][refLayerIdc];              }
     1139  Void   setRefLayerId(Int layerId, Int refLayerIdc, UInt refLayerId)           { m_refLayerId[layerId][refLayerIdc] = refLayerId;        }
    11441140
    11451141  UInt   getDirectDepTypeLen()                                                  { return m_directDepTypeLen;                              }
     
    12131209  Bool   getCrossLayerIrapAlignFlag()                                           { return m_crossLayerIrapAlignFlag;                      }
    12141210  Void   setCrossLayerIrapAlignFlag(Bool x)                                     { m_crossLayerIrapAlignFlag = x;                         }
    1215 #if O0225_MAX_TID_FOR_REF_LAYERS
    1216   UInt   getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId)                     { return m_maxTidIlRefPicsPlus1[layerId][refLayerId];           }
    1217   Void   setMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId, UInt maxSublayer)   { m_maxTidIlRefPicsPlus1[layerId][refLayerId] = maxSublayer;    }
    1218 #else
    1219   UInt   getMaxTidIlRefPicsPlus1(Int layerId)                     { return m_maxTidIlRefPicsPlus1[layerId];                   }
    1220   Void   setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer)   { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer;            }
    1221 #endif
     1211  UInt   getMaxTidIlRefPicsPlus1(Int refLayerIdx, Int layerIdx)                     { return m_maxTidIlRefPicsPlus1[refLayerIdx][layerIdx];           }
     1212  Void   setMaxTidIlRefPicsPlus1(Int refLayerIdx, Int layerIdx, UInt maxSublayer)   { m_maxTidIlRefPicsPlus1[refLayerIdx][layerIdx] = maxSublayer;    }
    12221213  Bool   getMaxTidRefPresentFlag()                                  { return m_maxTidRefPresentFlag ;}
    12231214  Void   setMaxTidRefPresentFlag(Bool x)                            { m_maxTidRefPresentFlag = x;}
     
    27262717  Void      setActiveNumILRRefIdx     ( Int i )         { m_activeNumILRRefIdx = i;     } 
    27272718
    2728   Int       getInterLayerPredLayerIdc (UInt layerIdx)                        { return  m_interLayerPredLayerIdc[layerIdx];}
    2729   Void      setInterLayerPredLayerIdc (UInt refLayerIdc, UInt layerIdx)      { m_interLayerPredLayerIdc[layerIdx] = refLayerIdc;  }
     2719  Int       getInterLayerPredLayerIdc (UInt layerIdc)                        { return  m_interLayerPredLayerIdc[layerIdc];}
     2720  Void      setInterLayerPredLayerIdc (UInt refLayerIdc, UInt layerIdc)      { m_interLayerPredLayerIdc[layerIdc] = refLayerIdc;  }
    27302721
    27312722  Void      setInterLayerPredEnabledFlag     ( Bool   val )    { m_interLayerPredEnabledFlag = val; }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1046 r1085  
    203203#define EARLY_REF_PIC_MARKING            0      ///< Valencia meeting - remove early marking of inter-layer reference pictures
    204204                                                ///< Decoded picture marking of sub-layer non-reference pictures
    205 #define O0225_MAX_TID_FOR_REF_LAYERS     1
    206205#define O0225_TID_BASED_IL_RPS_DERIV     1
    207206#define VPS_TSLAYERS                     1      ///< JCTVC-O0120 signal max temporal sub-layers for each layer
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1079 r1085  
    16101610            {
    16111611#if Q0060_MAX_TID_REF_EQUAL_TO_ZERO
    1612               if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) >  pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&
     1612              if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i), pcSlice->getLayerIdx()) >  pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&
    16131613                (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >=  pcSlice->getTLayer()) )
    16141614#else
    1615               if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) >  pcSlice->getTLayer() &&
     1615              if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i), pcSlice->getLayerIdx()) >  pcSlice->getTLayer() &&
    16161616                (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >=  pcSlice->getTLayer()) )
    16171617#endif
     
    16381638            {
    16391639              READ_CODE( numBits,uiCode,"inter_layer_pred_layer_idc[i]" );
    1640               pcSlice->setInterLayerPredLayerIdc(uiCode,i);
     1640              pcSlice->setInterLayerPredLayerIdc(uiCode, i);
    16411641            }
    16421642          }
     
    16451645        {
    16461646#if O0225_TID_BASED_IL_RPS_DERIV && TSLAYERS_IL_RPS
     1647          Int refLayerId = pcSlice->getVPS()->getRefLayerId(pcSlice->getLayerId(), 0);
     1648          Int refLayerIdx = pcSlice->getVPS()->getLayerIdxInVps(refLayerId);
    16471649#if Q0060_MAX_TID_REF_EQUAL_TO_ZERO
    1648           if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(0,pcSlice->getLayerId()) >  pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&
    1649             (pcSlice->getVPS()->getMaxTSLayersMinus1(0) >=  pcSlice->getTLayer()) )
    1650 #else
    1651           if( (pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(0,pcSlice->getLayerId()) >  pcSlice->getTLayer()) &&
    1652             (pcSlice->getVPS()->getMaxTSLayersMinus1(0) >=  pcSlice->getTLayer()) )
     1650          if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(refLayerIdx, pcSlice->getLayerIdx()) >  pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&
     1651            (pcSlice->getVPS()->getMaxTSLayersMinus1(refLayerIdx) >=  pcSlice->getTLayer()) )
     1652#else
     1653          if( (pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(refLayerIdx,pcSlice->getLayerIdx()) >  pcSlice->getTLayer()) &&
     1654            (pcSlice->getVPS()->getMaxTSLayersMinus1(refLayerIdx) >=  pcSlice->getTLayer()) )
    16531655#endif
    16541656          {
    16551657#endif
    16561658            pcSlice->setActiveNumILRRefIdx(1);
    1657             pcSlice->setInterLayerPredLayerIdc(0,0);
     1659            pcSlice->setInterLayerPredLayerIdc(0, 0);
    16581660#if O0225_TID_BASED_IL_RPS_DERIV && TSLAYERS_IL_RPS
    16591661          }
     
    16731675      {
    16741676#if Q0060_MAX_TID_REF_EQUAL_TO_ZERO
    1675         if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) >  pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&
     1677        if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i), pcSlice->getLayerIdx()) >  pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&
    16761678          (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >=  pcSlice->getTLayer()) )
    16771679#else
    1678         if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) >  pcSlice->getTLayer() &&
     1680        if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i), pcSlice->getLayerIdx()) >  pcSlice->getTLayer() &&
    16791681          (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >=  pcSlice->getTLayer()) )
    16801682#endif
     
    16861688      for( i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
    16871689      {
    1688         pcSlice->setInterLayerPredLayerIdc(refLayerPicIdc[i],i);
    1689       }     
     1690        pcSlice->setInterLayerPredLayerIdc(refLayerPicIdc[i], i);
     1691      }
    16901692#else
    16911693      pcSlice->setActiveNumILRRefIdx(pcSlice->getNumILRRefIdx());
     
    29993001    for(i = 0; i < vps->getMaxLayers() - 1; i++)
    30003002    {
    3001 #if O0225_MAX_TID_FOR_REF_LAYERS
    30023003      for( j = i+1; j < vps->getMaxLayers(); j++)
    30033004      {
     
    30073008        }
    30083009      }
    3009 #else
    3010       READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); vps->setMaxTidIlRefPicsPlus1(i, uiCode);
    3011       assert( uiCode <= vps->getMaxTLayers());
    3012 #endif
    30133010    }
    30143011  }
     
    30173014    for(i = 0; i < vps->getMaxLayers() - 1; i++)
    30183015    {
    3019 #if O0225_MAX_TID_FOR_REF_LAYERS
    30203016      for( j = i+1; j < vps->getMaxLayers(); j++)
    30213017      {
    30223018        vps->setMaxTidIlRefPicsPlus1(i, j, 7);
    30233019      }
    3024 #else
    3025       vps->setMaxTidIlRefPicsPlus1(i, 7);
    3026 #endif
    30273020    }
    30283021  }
     
    36913684  for( i = 0; i < vps->getMaxLayers() - 1; i++ )
    36923685  {
    3693 #if O0225_MAX_TID_FOR_REF_LAYERS
    36943686    for( j = i + 1; j < vps->getMaxLayers(); j++ )
    36953687    {
    36963688      vps->setMaxTidIlRefPicsPlus1(i, j, 7);
    36973689    }
    3698 #else
    3699     vps->setMaxTidIlRefPicsPlus1(i, 7);
    3700 #endif
    37013690  }
    37023691
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1084 r1085  
    28482848
    28492849  Int remainingInterLayerReferencesFlag = 0;
    2850 #if O0225_MAX_TID_FOR_REF_LAYERS
    28512850  for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
    28522851  {
    28532852    Int jLidx = pcSlice->getVPS()->getLayerIdxInVps(targetDecLayerIdList[j]);
    2854     if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(latestDecLayerId,jLidx) - 1 )
    2855     {
    2856 #else
    2857   if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(latestDecLayerId) - 1 )
    2858   {
    2859     for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
    2860     {
    2861 #endif
     2853    if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(latestDecLayerId),jLidx) - 1 )
     2854    {
    28622855      for ( Int k = 0; k < m_ppcTDecTop[targetDecLayerIdList[j]]->getNumDirectRefLayers(); k++ )
    28632856      {
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1073 r1085  
    22512251     for( i = 0; i < vps->getMaxLayers() - 1; i++)
    22522252     {
    2253 #if O0225_MAX_TID_FOR_REF_LAYERS
    22542253       for( j = i+1; j <= vps->getMaxLayers() - 1; j++)
    22552254       {
     
    22592258         }
    22602259       }
    2261 #else
    2262        WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i), 3, "max_tid_il_ref_pics_plus1[i]" );
    2263 #endif
    22642260     }
    22652261   }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1084 r1085  
    13231323
    13241324        // Apply temporal layer restriction to inter-layer prediction
    1325 #if O0225_MAX_TID_FOR_REF_LAYERS
    1326         Int maxTidIlRefPicsPlus1 = m_pcEncTop->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerId(),m_layerId);
    1327 #else
    1328         Int maxTidIlRefPicsPlus1 = m_pcEncTop->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerId());
    1329 #endif
     1325        Int maxTidIlRefPicsPlus1 = m_pcEncTop->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerIdx(), pcSlice->getLayerIdx());
    13301326        if( ((Int)(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getRapPicFlag()) )
    13311327        {
Note: See TracChangeset for help on using the changeset viewer.