Changeset 484 in SHVCSoftware for branches


Ignore:
Timestamp:
16 Nov 2013, 00:32:03 (11 years ago)
Author:
qualcomm
Message:

Integration of O0225 proposal 2 for all reference layers.

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

Legend:

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

    r483 r484  
    10981098    {
    10991099#if N0120_MAX_TID_REF_CFG
     1100#if O0225_MAX_TID_FOR_REF_LAYERS
     1101      for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++)
     1102      {
     1103        vps->setMaxTidIlRefPicsPlus1(i, j, m_acTEncTop[i].getMaxTidIlRefPicsPlus1());
     1104      }
     1105#else
    11001106      vps->setMaxTidIlRefPicsPlus1(i, m_acTEncTop[i].getMaxTidIlRefPicsPlus1());
     1107#endif
     1108#else
     1109#if O0225_MAX_TID_FOR_REF_LAYERS
     1110      for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++)
     1111      {
     1112        vps->setMaxTidIlRefPicsPlus1(i, j, vps->getMaxTLayers()+1);
     1113      }
    11011114#else
    11021115      vps->setMaxTidIlRefPicsPlus1(i, vps->getMaxTLayers()+1);
    11031116#endif
     1117#endif
    11041118    }
    11051119  }
     
    11081122    for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ )
    11091123    {
     1124#if O0225_MAX_TID_FOR_REF_LAYERS
     1125      for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++)
     1126      {
     1127        vps->setMaxTidIlRefPicsPlus1(i, j, 7);
     1128      }
     1129#else
    11101130      vps->setMaxTidIlRefPicsPlus1(i, 7);
     1131#endif
    11111132    }
    11121133  }
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.cpp

    r479 r484  
    456456    UInt refLayerIdc = m_interLayerPredLayerIdc[i];
    457457    //inter-layer reference picture
    458 
     458#if O0225_MAX_TID_FOR_REF_LAYERS
     459    Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId) : 0;
     460#else
    459461    Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()) : 0;
     462#endif
    460463    if( m_layerId > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=  maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )  )
    461464    {
     
    491494    for( i=0; i < m_pcVPS->getNumDirectRefLayers( m_layerId ); i++ )
    492495    {
     496#if O0225_MAX_TID_FOR_REF_LAYERS
     497      Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[i]->getSlice(0)->getLayerId(),m_layerId);
     498#else
    493499      Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[i]->getSlice(0)->getLayerId());
     500#endif
    494501      if( ((Int)(ilpPic[i]->getSlice(0)->getTLayer())<= maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[i]->getSlice(0)->getRapPicFlag() ) )
    495502      {
     
    634641      {
    635642        Int refLayerIdc = m_interLayerPredLayerIdc[i];
     643#if O0225_MAX_TID_FOR_REF_LAYERS
     644        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId);
     645#else
    636646        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());
     647#endif
    637648        if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )
    638649        {
     
    662673      {
    663674        Int refLayerIdc = m_interLayerPredLayerIdc[i];
     675#if O0225_MAX_TID_FOR_REF_LAYERS
     676        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId);
     677#else
    664678        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());
     679#endif
    665680        if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )
    666681        {
     
    699714      {
    700715        Int refLayerIdc = m_interLayerPredLayerIdc[i];
     716#if O0225_MAX_TID_FOR_REF_LAYERS
     717        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId);
     718#else
    701719        Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());
     720#endif
    702721        if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )
    703722        {
     
    20132032  for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++)
    20142033  {
     2034#if O0225_MAX_TID_FOR_REF_LAYERS
     2035  for( Int j = 0; j < MAX_VPS_LAYER_ID_PLUS1; j++)
     2036  {
     2037    m_maxTidIlRefPicsPlus1[i][j] = m_uiMaxTLayers + 1;
     2038  }
     2039#else
    20152040    m_maxTidIlRefPicsPlus1[i] = m_uiMaxTLayers + 1;
     2041#endif
    20162042  }
    20172043#endif
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.h

    r482 r484  
    573573#endif
    574574#if JCTVC_M0203_INTERLAYER_PRED_IDC
     575#if O0225_MAX_TID_FOR_REF_LAYERS
     576  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1][MAX_VPS_LAYER_ID_PLUS1];
     577#else
    575578  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1];
     579#endif
    576580#endif
    577581#if N0120_MAX_TID_REF_PRESENT_FLAG
     
    792796#endif
    793797#if JCTVC_M0203_INTERLAYER_PRED_IDC
     798#if O0225_MAX_TID_FOR_REF_LAYERS
     799  UInt   getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId)                     { return m_maxTidIlRefPicsPlus1[layerId][refLayerId];           }
     800  Void   setMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId, UInt maxSublayer)   { m_maxTidIlRefPicsPlus1[layerId][refLayerId] = maxSublayer;    }
     801#else
    794802  UInt   getMaxTidIlRefPicsPlus1(Int layerId)                     { return m_maxTidIlRefPicsPlus1[layerId];                   }
    795803  Void   setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer)   { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer;            }
     804#endif
    796805#endif
    797806#if N0120_MAX_TID_REF_PRESENT_FLAG
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h

    r479 r484  
    123123#define N0120_MAX_TID_REF_PRESENT_FLAG   1      ///< JCTVC-N0120: max_tid_ref_pics_plus1_present_flag
    124124#define N0120_MAX_TID_REF_CFG            1      ///< set max_tid_il_ref_pics_plus1 and max_tid_ref_present_flag in the config. file (configuration setting)
     125#define O0225_MAX_TID_FOR_REF_LAYERS     1
    125126#endif
    126127#if REF_IDX_MFM
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r479 r484  
    10981098    for(i = 0; i < vps->getMaxLayers() - 1; i++)
    10991099    {
     1100#if O0225_MAX_TID_FOR_REF_LAYERS
     1101       for( j = i+1; j <= vps->getMaxLayers() - 1; j++)
     1102       {
     1103         if(vps->getDirectDependencyFlag(j, i))
     1104         {
     1105           READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i][j]" ); vps->setMaxTidIlRefPicsPlus1(i, j, uiCode);
     1106           assert( uiCode <= vps->getMaxTLayers());
     1107         }
     1108       }
     1109#else
    11001110      READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); vps->setMaxTidIlRefPicsPlus1(i, uiCode);
    11011111#if N0120_MAX_TID_REF_CFG
     
    11041114      assert( uiCode <= vps->getMaxTLayers()+ 1 );
    11051115#endif
     1116#endif
    11061117    }
    11071118  }
     
    11101121    for(i = 0; i < vps->getMaxLayers() - 1; i++)
    11111122    {
     1123#if O0225_MAX_TID_FOR_REF_LAYERS
     1124       for( j = i+1; j <= vps->getMaxLayers() - 1; j++)
     1125       {
     1126          vps->setMaxTidIlRefPicsPlus1(i, j, 7);
     1127       }
     1128#else
    11121129      vps->setMaxTidIlRefPicsPlus1(i, 7);
     1130#endif
    11131131    }
    11141132  }
     
    11161134  for(i = 0; i < vps->getMaxLayers() - 1; i++)
    11171135  {
     1136#if O0225_MAX_TID_FOR_REF_LAYERS
     1137       for( j = i+1; j <= vps->getMaxLayers() - 1; j++)
     1138       {
     1139         if(vps->getDirectDependencyFlag(j, i))
     1140         {
     1141           READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i][j]" ); vps->setMaxTidIlRefPicsPlus1(i, j, uiCode);
     1142           assert( uiCode <= vps->getMaxTLayers() );
     1143         }
     1144       }
     1145#else
    11181146    READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); vps->setMaxTidIlRefPicsPlus1(i, uiCode);
    11191147    assert( uiCode <= vps->getMaxTLayers() );
     1148#endif   
    11201149  }
    11211150#endif
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r475 r484  
    498498
    499499  Int remainingInterLayerReferencesFlag = 0;
     500#if O0225_MAX_TID_FOR_REF_LAYERS
     501  for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
     502  {
     503    Int jLidx = pcSlice->getVPS()->getLayerIdInVps(targetDecLayerIdList[j]);
     504    if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(latestDecLayerId,jLidx) - 1 )
     505    {
     506#else
    500507  if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(latestDecLayerId) - 1 )
    501508  {
    502509    for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
    503510    {
     511#endif
    504512      for ( Int k = 0; k < m_ppcTDecTop[targetDecLayerIdList[j]]->getNumDirectRefLayers(); k++ )
    505513      {
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r479 r484  
    899899     for( i = 0; i < vps->getMaxLayers() - 1; i++)
    900900     {
     901#if O0225_MAX_TID_FOR_REF_LAYERS
     902       for( j = i+1; j <= vps->getMaxLayers() - 1; j++)
     903       {
     904         if(vps->getDirectDependencyFlag(j, i))
     905         {
     906           WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i,j), 3, "max_tid_il_ref_pics_plus1[i][j]" );
     907         }
     908       }
     909#else
    901910       WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i), 3, "max_tid_il_ref_pics_plus1[i]" );
     911#endif
    902912     }
    903913   }
     
    905915  for( i = 0; i < vps->getMaxLayers() - 1; i++)
    906916  {
     917#if O0225_MAX_TID_FOR_REF_LAYERS
     918       for( j = i+1; j <= vps->getMaxLayers() - 1; j++)
     919       {
     920         if(vps->getDirectDependencyFlag(j, i))
     921         {
     922           WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i,j), 3, "max_tid_il_ref_pics_plus1[i][j]" );
     923         }
     924       }
     925#else
    907926    WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i), 3, "max_tid_il_ref_pics_plus1[i]" );
     927#endif
    908928  }
    909929#endif
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r475 r484  
    769769
    770770        // Apply temporal layer restriction to inter-layer prediction
     771#if O0225_MAX_TID_FOR_REF_LAYERS
     772        Int maxTidIlRefPicsPlus1 = m_pcEncTop->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerId(),m_layerId);
     773#else
    771774        Int maxTidIlRefPicsPlus1 = m_pcEncTop->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerId());
     775#endif
    772776        if( ((Int)(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getRapPicFlag()) )
    773777        {
Note: See TracChangeset for help on using the changeset viewer.