Changeset 971 in 3DVCSoftware


Ignore:
Timestamp:
5 Jul 2014, 11:31:40 (10 years ago)
Author:
tech
Message:

Cleanup part 5.

Location:
branches/HTM-11.1-dev0/source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-11.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r969 r971  
    5858{
    5959
    60 #if H_MV_HLS_8
     60#if H_MV
    6161  m_vps = new TComVPS;
    62 #endif
    63 #if !H_MV
     62#else !H_MV
    6463  m_iFrameRcvd = 0;
    6564#endif
     
    7069TAppEncTop::~TAppEncTop()
    7170{
    72 #if H_MV_HLS_8
     71#if H_MV
    7372  if (m_vps)
    7473  {
     
    8281{
    8382#if H_MV
    84 #if H_MV_HLS_8
    8583  TComVPS& vps = (*m_vps);   
    86 #else
    87   TComVPS& vps = m_vps;   
    88 #endif
    8984#else
    9085  TComVPS vps;
     
    701696{
    702697#if H_3D
    703 #if H_MV_HLS_8
    704698  for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ )
    705699  {
    706700    m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
    707701      m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
    708 #else
    709   for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )
    710   {
    711   m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
    712       m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
    713 #endif
    714702  }
    715703#endif
     
    15071495Void TAppEncTop::xSetRepFormat( TComVPS& vps )
    15081496{
    1509 #if H_MV_HLS_8_PMS_Q0195_20
    15101497  vps.setRepFormatIdxPresentFlag( false );
    1511 #else
    1512   vps.setRepFormatIdxPresentFlag( true );
    1513 #endif
    15141498  vps.setVpsNumRepFormatsMinus1 ( 0    );
    15151499
     
    15271511  assert( vps.getRepFormat( 0 ) == NULL );
    15281512  vps.setRepFormat( 0 , repFormat );
    1529 
    1530 #if !H_MV_HLS_8_PMS_Q0195_20
    1531   for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ )
    1532   {
    1533     vps.setVpsRepFormatIdx( i , 0 );
    1534   }
    1535 #endif
    15361513}
    15371514
     
    15441521  assert ( dpbSize != 0 );
    15451522
    1546 #if H_MV_HLS_8_HRD_Q0102_08
    15471523  for( Int i = 0; i < vps.getNumOutputLayerSets(); i++ )
    1548 #else
    1549   for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
    1550 #endif
    15511524  { 
    1552 #if H_MV_HLS_8_MIS_Q0102_30
    15531525    Int currLsIdx = vps.olsIdxToLsIdx( i );
    1554 #endif
    15551526    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    15561527    Bool subLayerFlagInfoPresentFlag = false;
    15571528
    1558 #if H_MV_HLS_8_MIS_Q0102_30
    15591529    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
    1560 #else
    1561     for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1562 #endif
    15631530    {   
    15641531      Bool subLayerDpbInfoPresentFlag = false;
    1565 #if H_MV_HLS_8_MIS_Q0102_30 || H_MV_HLS_8_DBP_NODOC_42
    15661532      assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() );
    15671533      for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ )   
    1568 #else
    1569       assert( vps.getNumSubDpbs( vps.olsIdxToLsIdx( i ) ) == targetDecLayerIdList.size() );
    1570       for( Int k = 0; k < vps.getNumSubDpbs( vps.olsIdxToLsIdx( i )); k++ )   
    1571 #endif
    15721534      {
    15731535        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
    1574 #if H_MV_HLS7_GEN
    1575         // TBD. Some derivation based on output layer set might be added here.
    1576 #endif
    15771536        dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );
    15781537        if ( j > 0 )
     
    16351594  // Additional output layer sets + profileLevelTierIdx
    16361595  vps.setDefaultOutputLayerIdc      ( m_defaultOutputLayerIdc );   
    1637 #if H_MV_HLS_8_SYN_39_19
    16381596  vps.setNumAddLayerSets            ( 0                             ); 
    16391597  vps.setNumAddOlss                 ( numAddOuputLayerSets          );
    1640 #else
    1641   vps.setNumAddLayerSets            ( numAddOuputLayerSets          );
    1642 #endif
    16431598  vps.initTargetLayerIdLists();
    16441599
  • branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComSlice.cpp

    r969 r971  
    4848TComSlice::TComSlice()
    4949: m_iPPSId                        ( -1 )
    50 #if H_MV_HLS_8_POC_Q0142_32
     50#if H_MV
    5151, m_slicePicOrderCntLsb           ( 0 )
    5252#endif
     
    18631863#endif
    18641864{
    1865 #if H_MV_HLS_8_SYN_Q0041_03
     1865#if H_MV
    18661866  m_vpsBaseLayerInternalFlag = true;
    18671867#endif
     
    18831883  m_vpsNumProfileTierLevelMinus1 = -1;
    18841884   
    1885 #if H_MV_HLS_8_SYN_39_19
    18861885  m_numAddLayerSets              = 0;   
    18871886  m_numAddOlss                   = 0;
    1888 #else
    1889   m_numAddLayerSets              = -1;   
    1890 #endif
    18911887  m_defaultOutputLayerIdc     = 0;
    18921888 
     
    19021898  }
    19031899
    1904 #if H_MV_HLS_8_PMS_Q0195_20
    19051900  m_repFormatIdxPresentFlag = false;
    1906 #endif
    19071901  m_maxOneActiveRefLayerFlag = false;
    19081902  m_directDepTypeLenMinus2   = 0;         
    19091903 
    19101904
    1911 #if H_MV_HLS_8_RPS_Q0100_36
    19121905  m_vpsExtensionFlag = true;
    1913 #endif
    1914   m_avcBaseLayerFlag = false;
    19151906  m_vpsNonVuiExtensionLength = 0;
    19161907  m_splittingFlag    = false;
     
    20322023  }
    20332024
    2034 
    2035 #if H_MV_HLS_8_PMS_Q0195_20
    20362025  //The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive.
    20372026  assert( getVpsNumRepFormatsMinus1() >= 0 );
    20382027  assert( getVpsNumRepFormatsMinus1() <= 255 );
    2039 #endif
    20402028
    20412029  return true;
     
    20832071  }
    20842072
    2085 #if H_MV_HLS_8
    20862073  for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ )
    20872074  {
     
    20962083    }
    20972084  }
    2098 
    20992085
    21002086  for( Int i = 0; i  <=  getMaxLayersMinus1(); i++ )
     
    21072093    }
    21082094  }
    2109 
    21102095
    21112096  for( Int i = 0; i <= getMaxLayersMinus1(); i++ )  // Bug in spec "<" instead of "<="
     
    21492134    m_numIndependentLayers = k;
    21502135  }
    2151 #endif
    21522136}
    21532137
     
    23142298Int    TComVPS::getNumOutputLayerSets()
    23152299{
    2316 #if H_MV_HLS_8_SYN_39_19
    23172300  return getNumAddOlss() + getNumLayerSets();
    2318 #else
    2319   return getNumAddLayerSets() + getVpsNumLayerSetsMinus1() + 1;
    2320 #endif
    23212301}
    23222302
     
    23842364    }
    23852365  } 
    2386 #if H_MV_HLS_8_PMS_Q0165_18
    23872366  assert( getNumOutputLayersInOutputLayerSet( i ) > 0 );
    2388 #endif
    23892367}
    23902368
     
    24202398{
    24212399  Int maxSLMinus1 = 0;
    2422 #if H_MV_HLS_8_MIS_Q0102_30
    24232400  for( Int k = 0; k < getNumLayersInIdList( i ); k++ )
    24242401  {
    24252402    Int lId = m_layerSetLayerIdList[i][k];
    2426 #else 
    2427   Int optLsIdx    = olsIdxToLsIdx( i );
    2428 
    2429   for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )
    2430   {
    2431     Int lId = m_layerSetLayerIdList[optLsIdx][k];
    2432 #endif
    24332403    maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) ));
    24342404  }
    24352405  return maxSLMinus1;
    24362406}
    2437 #if H_MV_HLS_8_RPS_Q0100_36
     2407
    24382408Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder )
    24392409{
     
    24582428  }
    24592429}
    2460 #endif
     2430
     2431Bool TComVPS::getAltOutputLayerFlagVar( Int i )
     2432{
     2433  // Semantics variable not syntax element !
     2434
     2435  Bool altOptLayerFlag = false;     
     2436  if ( i > 0 && getNumOutputLayersInOutputLayerSet( i ) == 1 &&
     2437    getNumDirectRefLayers( getOlsHighestOutputLayerId( i ) ) > 0 )
     2438  {
     2439    altOptLayerFlag = getAltOutputLayerFlag( i );
     2440  }
     2441  return altOptLayerFlag;
     2442}
     2443
     2444Int TComVPS::getMaxNumPics( Int layerId )
     2445{
     2446  Int maxNumPics = MAX_INT;
     2447  for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++)
     2448  {
     2449    Int lsIdx = olsIdxToLsIdx( olsIdx );
     2450    for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ )
     2451    {
     2452      if( getLayerSetLayerIdList(lsIdx, j ) ==  layerId )
     2453      {
     2454        Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx );
     2455        maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j,  maxSL ) );
     2456      }
     2457    }
     2458  }
     2459  assert( maxNumPics != MAX_INT );
     2460  return maxNumPics;
     2461}
     2462
     2463Void TComVPS::xSetRefLayerFlags( Int currLayerId )
     2464{
     2465  for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ )
     2466  {
     2467    Int refLayerId = m_refLayerId[ currLayerId ][ j ];
     2468    m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1;
     2469    for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ )
     2470    {
     2471      m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ]  ||  m_recursiveRefLayerFlag[ refLayerId ][ k ];
     2472    }
     2473  }
     2474}
     2475
    24612476#endif // H_MV
    24622477
     
    25302545  ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag));
    25312546#if H_MV
    2532 #if !H_MV_HLS_8_SPS_NODOC_48
    2533   m_spsExtensionPresentFlag = false;
    2534   for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )
    2535   {
    2536     m_spsExtensionTypeFlag[ i ] = false;
    2537   }
    2538 #else
    25392547  m_spsRangeExtensionsFlag     = false;
    25402548  m_spsMultilayerExtensionFlag = false;
     
    25442552#else
    25452553  m_spsExtension6bits          = 0;
    2546 #endif
    25472554#endif
    25482555
     
    27262733
    27272734#if H_MV
    2728 #if H_MV_HLS_8_SPS_NODOC_48
    27292735  m_ppsRangeExtensionsFlag     = false;
    27302736  m_ppsMultilayerExtensionFlag = false;
     
    27342740  m_pps3dExtensionFlag         = false;
    27352741  m_ppsExtension5bits          = 0;
    2736 #endif
    2737 #else
    2738   for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )
    2739   {
    2740     m_ppsExtensionTypeFlag[ i ] = false;
    2741   }
    27422742#endif
    27432743#endif
     
    29842984  }
    29852985}
     2986
     2987Void TComSPS::inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder )
     2988{
     2989  const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx ));
     2990
     2991  if (getLayerId() > 0 )
     2992  {
     2993    Int layerIdx = 0;         
     2994    while (layerIdx < (Int) targetDecLayerIdList.size() )
     2995    {
     2996      if ( targetDecLayerIdList[layerIdx] == currLayerId )
     2997      {
     2998        break;
     2999      }
     3000      layerIdx++;
     3001    }
     3002
     3003    assert( layerIdx < (Int) targetDecLayerIdList.size() );
     3004
     3005    for (Int i = 0; i <= getSpsMaxSubLayersMinus1(); i++ )
     3006    {
     3007      Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ;
     3008
     3009      if ( encoder )
     3010      {
     3011        assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 );
     3012      }
     3013      else
     3014      {
     3015        setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 );
     3016      }
     3017    }
     3018  }
     3019}
     3020
     3021Void TComSPS::checkRpsMaxNumPics( TComVPS* vps, Int currLayerId )
     3022{
     3023  // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead
     3024  // of nuh_layer_id of slice (currLayerId), this seems to be a bug.
     3025
     3026  for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ )
     3027  {
     3028    TComReferencePictureSet* rps = getRPSList()->getReferencePictureSet( i );
     3029    if ( !rps->getInterRPSPrediction() )
     3030    {
     3031      rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ),
     3032        getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 
     3033    }
     3034  }
     3035}
     3036
    29863037#endif
    29873038
     
    31333184  printf("}\n");
    31343185}
     3186#if H_MV
     3187Void TComReferencePictureSet::checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 )
     3188{
     3189  assert( getNumberOfPictures() >= 0 );
     3190  if ( nuhLayerId == 0 )
     3191  {
     3192    assert( getNumberOfPictures() <= spsMaxDecPicBufferingMinus1 );
     3193  }
     3194
     3195  if ( vpsExtensionFlag )
     3196  {
     3197    assert( getNumberOfPictures() <= maxNumPics );
     3198  }
     3199}
     3200#endif
    31353201
    31363202TComRPSList::TComRPSList()
     
    32793345}
    32803346
    3281 #if !H_MV_HLS_8_DBP_NODOC_42
    3282 Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc )
    3283 {
    3284   // Fill targetDecLayerIdSet with all layers if empty (at encoder side)
    3285   if (targetDecLayerIdSet.size() == 0 )   
    3286   {
    3287     for ( Int layerIdInVps = 0; layerIdInVps <= vps->getMaxLayersMinus1(); layerIdInVps++ )
    3288     {
    3289       targetDecLayerIdSet.push_back( vps->getLayerIdInNuh( layerIdInVps ) );
    3290     }
    3291   }     
    3292 
    3293   Int numTargetDecLayers = (Int) targetDecLayerIdSet.size();
    3294   Int latestDecIdx;
    3295   for ( latestDecIdx = 0; latestDecIdx < numTargetDecLayers; latestDecIdx++)
    3296   {
    3297     if ( targetDecLayerIdSet[ latestDecIdx ] == curLayerId )
    3298     {
    3299       break;
    3300     }       
    3301   }       
    3302 
    3303   for( Int i = 0; i <= latestDecIdx; i++ )
    3304   {
    3305     if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ i ] ) )
    3306     {
    3307       TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc );
    3308       if ( pcPic )
    3309       {
    3310         if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() )
    3311         {
    3312           Bool remainingInterLayerReferencesFlag = false;
    3313           for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
    3314           {
    3315             TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS();
    3316             if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) )
    3317             {
    3318               for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ )
    3319               {
    3320                 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ],  k  ) )
    3321                 {
    3322                   remainingInterLayerReferencesFlag = true;
    3323                 }
    3324               }
    3325             }
    3326           }
    3327           if( !remainingInterLayerReferencesFlag )
    3328           {
    3329             pcPic->getSlice(0)->setReferenced( false );                   
    3330           }
    3331         }
    3332       }
    3333     }
    3334   }
    3335 }
    3336 #endif
    33373347Void TComSlice::printRefPicList()
    33383348
     
    33513361Void TComSlice::markCurrPic( TComPic* currPic )
    33523362{
    3353 
    3354 #if !H_MV_HLS_8_DBP_NODOC_42
    3355   if ( !currPic->getSlice(0)->getDiscardableFlag() )
    3356   {
    3357 #endif
    3358     currPic->getSlice(0)->setReferenced( true ) ;
    3359     currPic->setIsLongTerm( false );
    3360 #if !H_MV_HLS_8_DBP_NODOC_42
    3361   }
    3362   else
    3363   {
    3364     currPic->getSlice(0)->setReferenced( false ) ;
    3365   }
    3366 #endif
    3367 
    3368 #if H_MV_HLS_7_VPS_P0300_27
     3363  currPic->getSlice(0)->setReferenced( true ) ;
     3364  currPic->setIsLongTerm( false );
     3365
    33693366  currPic->setReconMark( true );
    33703367  currPic->setPicOutputFlag( currPic->getSlice(0)->getPicOutputFlag() );
    3371 #endif
    33723368}
    33733369
     
    34033399  Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) );
    34043400
    3405 #if H_MV_HLS_8_RPS_Q0060_17
    34063401  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  && ( getTLayer() == 0  ) &&
    34073402    ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );
    3408 #else
    3409   Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  &&
    3410     ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );
    3411 #endif
    34123403
    34133404  return refLayerPicFlag;       
     
    37663757
    37673758#if H_3D_DDD
    3768     InitializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i );
     3759    initializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i );
    37693760#endif
    37703761  }
     
    37743765
    37753766#if H_3D_DDD
    3776 Void TComSlice::InitializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx )
     3767Void TComSlice::initializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx )
    37773768{
    37783769    UInt uiViewId     = getViewIndex();
     
    38313822
    38323823    return;
     3824}
     3825
     3826
     3827#endif
     3828
     3829#if H_MV
     3830Void TComSlice::checkCrossLayerBlaFlag()
     3831{
     3832  // cross_layer_bla_flag shall be equal to 0 for pictures with nal_unit_type not equal to IDR_W_RADL or IDR_N_LP or with nuh_layer_id not equal to 0.
     3833  if ( getLayerId() != 0 || getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
     3834  {
     3835    assert( m_crossLayerBlaFlag == 0 );
     3836  }
     3837}
     3838
     3839Bool TComSlice::inferPocMsbValPresentFlag()
     3840{
     3841  Bool pocMsbValPresentFlag;
     3842  if( getSliceSegmentHeaderExtensionLength() == 0 )
     3843  {
     3844    pocMsbValPresentFlag = false;
     3845  }
     3846  else if ( getPocMsbValRequiredFlag() )
     3847  {
     3848    pocMsbValPresentFlag = true;
     3849  }
     3850  else
     3851  {
     3852    pocMsbValPresentFlag = false;
     3853  }
     3854
     3855  return pocMsbValPresentFlag;
     3856}
     3857
     3858
     3859#endif
     3860
     3861#if H_3D_DBBP
     3862Int TComSlice::getDepthFromDV( Int iDV, Int iBaseViewIdx )
     3863{
     3864  return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]);
    38333865}
    38343866#endif
     
    43234355}
    43244356
     4357Void TComVpsVuiBspHrdParameters::checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j )
     4358{
     4359  // bsp_comb_hrd_idx
     4360  assert( getBspCombSchedIdx(h, i, j ) >= 0 );
     4361  assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() );
     4362
     4363  // bsp_comb_sched_idx
     4364  assert( getBspCombSchedIdx(h, i, j ) >= 0 );
     4365
     4366  //* This check needs to activated,  when HighestTid is available here   
     4367  //  assert(  getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) );
     4368}
     4369
    43254370Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr )
    43264371{
  • branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComSlice.h

    r969 r971  
    5454class TComPicLists;
    5555class TComVPS;
    56 #if H_MV_HLS_8_RPS_Q0100_36
    5756class TComSPS;
    58 #endif
    5957#endif
    6058// ====================================================================================================================
     
    130128  Void printDeltaPOC();
    131129
    132 #if H_MV_HLS_8_RPS_Q0100_36
    133   Void checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 )
    134   {
    135     assert( getNumberOfPictures() >= 0 );
    136     if ( nuhLayerId == 0 )
    137     {
    138       assert( getNumberOfPictures() <= spsMaxDecPicBufferingMinus1 );
    139     }
    140 
    141     if ( vpsExtensionFlag )
    142     {
    143       assert( getNumberOfPictures() <= maxNumPics );
    144     }
    145   }
     130#if H_MV
     131  Void checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 );
    146132#endif
    147133};
     
    479465  Void setBspCombHrdIdx( Int h, Int i, Int j, Int  val ) { m_bspCombHrdIdx[h][i][j] = val; }
    480466  Int  getBspCombHrdIdx( Int h, Int i, Int j ) { return m_bspCombHrdIdx[h][i][j]; }
    481 #if H_MV_HLS_8_HRD_Q0101_04
    482467  Int  getBspCombHrdIdxLen() { return gCeilLog2( getVpsNumBspHrdParametersMinus1() + 1);  };
    483   Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ) 
    484   {
    485     // bsp_comb_hrd_idx
    486     assert( getBspCombSchedIdx(h, i, j ) >= 0 );
    487     assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() );
    488 
    489     // bsp_comb_sched_idx
    490     assert( getBspCombSchedIdx(h, i, j ) >= 0 );
    491 
    492     //* This check needs to activated,  when HighestTid is available here   
    493     //  assert(  getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) );
    494   }
    495 #endif
     468
    496469
    497470  Void setBspCombSchedIdx( Int h, Int i, Int j, Int  val ) { m_bspCombSchedIdx[h][i][j] = val; }
    498471  Int  getBspCombSchedIdx( Int h, Int i, Int j ) { return m_bspCombSchedIdx[h][i][j]; }
     472
     473  Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j );
    499474
    500475  Void setHrdParametermeters( Int k, TComHRD* val  ) {  m_hrdParameters[k] = val; };
     
    695670private:
    696671  Int         m_VPSId;
    697 #if H_MV_HLS_8_SYN_Q0041_03
     672#if H_MV
    698673  Bool        m_vpsBaseLayerInternalFlag;
    699674#endif
     
    736711  TimingInfo  m_timingInfo;
    737712#if H_MV
    738   #if H_MV_HLS_8_RPS_Q0100_36
    739713  Bool        m_vpsExtensionFlag;
    740 #endif
     714
    741715  /// VPS EXTENSION SYNTAX ELEMENTS
    742   Bool        m_avcBaseLayerFlag;
    743716  Int         m_vpsNonVuiExtensionLength;
    744717  Bool        m_splittingFlag;
     
    761734
    762735  Int         m_numAddLayerSets;   
    763 #if H_MV_HLS_8_SYN_39_19
    764736  Int         m_highestLayerIdxPlus1     [MAX_VPS_ADD_OUTPUT_LAYER_SETS][MAX_NUM_LAYERS];
    765737  Int         m_numAddOlss;
    766 #endif
     738
    767739  Int         m_defaultOutputLayerIdc;
    768740
     
    802774  Int         m_refLayerId               [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 
    803775
    804 #if H_MV_HLS_8
    805776  Int         m_numRefLayers             [MAX_NUM_LAYER_IDS];
    806777  Int         m_numPredictedLayers       [MAX_NUM_LAYERS];
     
    810781  Int         m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS];
    811782  Bool        m_recursiveRefLayerFlag    [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];
    812 #else
    813 
    814   Int         m_numSamplePredRefLayers   [MAX_NUM_LAYERS];
    815   Bool        m_samplePredEnabledFlag    [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    816   Int         m_samplePredRefLayerId     [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    817 
    818   Int         m_numMotionPredRefLayers   [MAX_NUM_LAYERS];
    819   Bool        m_motionPredEnabledFlag    [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    820   Int         m_motionPredRefLayerId     [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    821 #endif
     783
    822784  Int         m_viewIndex                [MAX_NUM_LAYERS   ];
    823785 
     
    828790
    829791  Int         xGetDimBitOffset( Int j );
    830 
    831 #if H_MV_HLS_8
    832   Void xSetRefLayerFlags( Int currLayerId )
    833   {
    834     for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ )
    835     {
    836       Int refLayerId = m_refLayerId[ currLayerId ][ j ];
    837       m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1;
    838       for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ )
    839       {
    840         m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ]  ||  m_recursiveRefLayerFlag[ refLayerId ][ k ];
    841       }
    842     }
    843   }
    844 #endif
     792  Void        xSetRefLayerFlags( Int currLayerId );
    845793  // VPS EXTENSION 2 SYNTAX ELEMENTS
    846794#if H_3D_ARP
     
    902850  Void    setVPSId       (Int i)              { m_VPSId = i;             }
    903851
    904 #if H_MV_HLS_8_SYN_Q0041_03
    905852  Void    setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; }
    906853  Bool    getVpsBaseLayerInternalFlag(  )          { return m_vpsBaseLayerInternalFlag; }
    907 #endif
    908854
    909855  UInt    getMaxTLayers  ()                   { return m_uiMaxTLayers;   }
     
    957903  TimingInfo* getTimingInfo() { return &m_timingInfo; }
    958904#if H_MV
    959 
    960 #if H_MV_HLS_8_RPS_Q0100_36
    961905  Void    setVpsExtensionFlag( Bool flag )                                 { m_vpsExtensionFlag = flag; }
    962906  Bool    getVpsExtensionFlag(  )                                          { return m_vpsExtensionFlag; }
    963 #endif
    964 #if !H_MV_HLS_8_SYN_Q0041_03
    965   Void    setAvcBaseLayerFlag( Bool val )                                  { m_avcBaseLayerFlag = val;  }
    966   Bool    getAvcBaseLayerFlag()                                            { return m_avcBaseLayerFlag; }
    967 #endif
     907
    968908  Void    setVpsNonVuiExtensionLength( Int  val )                          { m_vpsNonVuiExtensionLength = val; }
    969909  Int     getVpsNonVuiExtensionLength(  )                                  { return m_vpsNonVuiExtensionLength; }
     
    1026966  Int     getNumAddLayerSets( )                                            { return m_numAddLayerSets; }
    1027967 
    1028 #if H_MV_HLS_8_SYN_39_19
    1029968  Void    setHighestLayerIdxPlus1( Int i, Int j, Int  val )                { m_highestLayerIdxPlus1[i][j] = val; }
    1030969  Int     getHighestLayerIdxPlus1( Int i, Int j )                          { return m_highestLayerIdxPlus1[i][j]; }
     
    1032971  Void    setNumAddOlss( Int  val )                                        { m_numAddOlss = val; }
    1033972  Int     getNumAddOlss(  )                                                { return m_numAddOlss; }
    1034 #endif
    1035973
    1036974  Void    setDefaultOutputLayerIdc( Int  val )                             { m_defaultOutputLayerIdc = val; }
     
    1060998  Int     getVpsRepFormatIdx( Int i )                                      { return m_vpsRepFormatIdx[i]; }
    1061999
    1062 #if H_MV_HLS_8_PMS_Q0195_20
    10631000  Int     inferVpsRepFormatIdx( Int i )                                    { return std::min( i, getVpsNumRepFormatsMinus1()  );  }
    1064 #endif
    10651001
    10661002  Void    setRepFormat( Int i, TComRepFormat* val )                        { m_repFormat[i] = val;  }
     
    10771013  Void    setDpbSize( TComDpbSize* val )                                   { assert( m_dpbSize != 0 ); m_dpbSize = val; }
    10781014  TComDpbSize* getDpbSize( )                                               { return m_dpbSize;}
    1079 #if H_MV_HLS_8_RPS_Q0100_36
     1015 
    10801016  Void    inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder );
    1081 #endif
    1082 
    1083 
     1017 
    10841018  Void    setPocLsbNotPresentFlag( Int i, Bool flag )                      { m_pocLsbNotPresentFlag[i] = flag; }
    10851019  Bool    getPocLsbNotPresentFlag( Int i )                                 { return m_pocLsbNotPresentFlag[i]; }
     
    11161050  Int     getRefLayerId        ( Int layerIdInNuh, Int idx );;
    11171051
    1118 #if H_MV_HLS_8
    11191052  Int     getNumRefLayers            ( Int i )        { return m_numRefLayers[i]; }
    11201053  Int     getNumPredictedLayers      ( Int i )        { return m_numPredictedLayers[i]; }
     
    11241057  Int     getTreePartitionLayerIdList( Int i, Int j ) { return m_treePartitionLayerIdList[i][j]; }
    11251058  Bool    getRecursiveRefLayerFlag   ( Int i, Int j ) { return m_recursiveRefLayerFlag[i][j]; }
    1126 
    1127 #endif
    1128 
    1129 #if H_MV_HLS_8_SYN_39_19
    11301059  Int     getNumLayerSets( )                                               { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets();  }; 
    1131 #endif
     1060 
    11321061  Bool    checkVPSExtensionSyntax();
    11331062  Int     scalTypeToScalIdx   ( ScalabilityType scalType );
     
    11371066
    11381067  Int     getNumLayersInIdList ( Int lsIdx );
    1139 #if H_MV_HLS_8_RPS_Q0100_36
    11401068  Int     getLayerSetLayerIdList(Int lsIdx, Int j )                       { return m_layerSetLayerIdList[ lsIdx ][ j ]; };
    1141 #endif
    11421069
    11431070  Int     getNumOutputLayerSets() ;   
    1144 #if !H_MV_HLS_8_DBP_NODOC_42
    1145   Int     getNumSubDpbs( Int i )                                           { return getNumLayersInIdList( i ); }; 
    1146 #endif
     1071
    11471072  Bool    isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh );   
    11481073  Void    deriveLayerSetLayerIdList();
     
    11601085
    11611086  Int     getMaxSubLayersInLayerSetMinus1( Int i );
    1162 
    1163 #if H_MV_HLS_8_SYN_39_19
    11641087  Int     getHighestLayerIdxPlus1Len( Int j )                                   { return gCeilLog2( getNumLayersInTreePartition( j ) + 1 );   };
    1165 #endif
    1166 
    1167  
    1168 #if H_MV_HLS_7_VPS_P0300_27
    1169   Bool     getAltOutputLayerFlagVar( Int i )
    1170   {  // Semantics variable not syntax element !
    1171 
    1172     Bool altOptLayerFlag = false;     
    1173     if ( i > 0 && getNumOutputLayersInOutputLayerSet( i ) == 1 &&
    1174       getNumDirectRefLayers( getOlsHighestOutputLayerId( i ) ) > 0 )
    1175     {
    1176       altOptLayerFlag = getAltOutputLayerFlag( i );
    1177     }
    1178     return altOptLayerFlag;
    1179   };
    1180 #endif
     1088
     1089  Bool     getAltOutputLayerFlagVar( Int i );;
    11811090
    11821091  // inference
     
    11861095  // helpers
    11871096  Bool    getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 );
    1188 #if H_MV_HLS_8_RPS_Q0100_36
    1189   Int     getMaxNumPics( Int layerId )
    1190   {   
    1191     Int maxNumPics = MAX_INT;
    1192     for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++)
    1193     {
    1194       Int lsIdx = olsIdxToLsIdx( olsIdx );
    1195       for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ )
    1196       {
    1197         if( getLayerSetLayerIdList(lsIdx, j ) ==  layerId )
    1198         {
    1199           Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx );
    1200           maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j,  maxSL ) );
    1201         }
    1202       }
    1203     }
    1204     assert( maxNumPics != MAX_INT );
    1205     return maxNumPics;
    1206   }
    1207 #endif
     1097  Int     getMaxNumPics( Int layerId );
    12081098
    12091099  /// VPS EXTENSION 2 SYNTAX ELEMENTS
     
    16301520  // SPS
    16311521  Bool        m_spsExtensionPresentFlag;
    1632 #if H_MV_HLS_8_SPS_NODOC_48
     1522
    16331523  Bool        m_spsRangeExtensionsFlag;
    16341524  Bool        m_spsMultilayerExtensionFlag;
     
    16391529  Int         m_spsExtension6bits;
    16401530#endif
    1641 #else
    1642   Bool        m_spsExtensionTypeFlag     [PS_EX_T_MAX_NUM];
    1643 #endif
     1531
    16441532  Bool        m_spsInferScalingListFlag;
    16451533  Int         m_spsScalingListRefLayerId;
     
    17551643  UInt      getMaxTLayers()                           { return m_uiMaxTLayers; }
    17561644  Void      setMaxTLayers( UInt uiMaxTLayers )        { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; }
    1757 #if H_MV_HLS_8
     1645#if H_MV
    17581646  UInt      getSpsMaxSubLayersMinus1()                { return ( m_uiMaxTLayers - 1); }
    17591647#endif
     
    17891677  TComPTL* getPTL()     { return &m_pcPTL; }
    17901678#if H_MV
    1791 
    1792 #if H_MV_HLS_8_HRD_Q0102_08
    1793   Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder )
    1794   {
    1795     const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx ));
    1796 
    1797     if (getLayerId() > 0 )
    1798     {
    1799       Int layerIdx = 0;         
    1800       while (layerIdx < (Int) targetDecLayerIdList.size() )
    1801       {
    1802         if ( targetDecLayerIdList[layerIdx] == currLayerId )
    1803         {
    1804           break;
    1805         }
    1806         layerIdx++;
    1807       }
    1808 
    1809       assert( layerIdx < (Int) targetDecLayerIdList.size() );
    1810 
    1811       for (Int i = 0; i <= getSpsMaxSubLayersMinus1(); i++ )
    1812       {
    1813         Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ;
    1814 
    1815         if ( encoder )
    1816         {
    1817           assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 );
    1818         }
    1819         else
    1820         {
    1821           setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 );
    1822         }
    1823       }
    1824     }   
    1825   }
    1826 #endif
     1679  Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder );
    18271680
    18281681  Void setSpsExtensionPresentFlag( Bool flag ) { m_spsExtensionPresentFlag = flag; }
    18291682  Bool getSpsExtensionPresentFlag( )           { return m_spsExtensionPresentFlag; }
    18301683
    1831 #if H_MV_HLS_8_SPS_NODOC_48
    18321684  Void setSpsRangeExtensionsFlag( Bool flag )            { m_spsRangeExtensionsFlag = flag; }
    18331685  Bool getSpsRangeExtensionsFlag(  )                     { return m_spsRangeExtensionsFlag; }
     
    18441696  Void setSpsExtension6bits( Int  val )                  { m_spsExtension6bits = val; }
    18451697  Int  getSpsExtension6bits(  )                          { return m_spsExtension6bits; }
    1846 #endif
    1847 #else
    1848   Void setSpsExtensionTypeFlag( Int i, Bool flag )       { m_spsExtensionTypeFlag[i] = flag; }
    1849   Bool getSpsExtensionTypeFlag( Int i )                  { return m_spsExtensionTypeFlag[i]; }
    18501698#endif
    18511699 
     
    18861734  // Inference
    18871735  Void inferRepFormat( TComVPS* vps, Int layerIdCurr );
    1888 
    18891736  Void inferScalingList( TComSPS* spsSrc );
    18901737
    1891 #if H_MV_HLS_8_RPS_Q0100_36
    18921738  // others
    1893   Void checkRpsMaxNumPics( TComVPS* vps, Int currLayerId )
    1894   {
    1895     // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead
    1896     // of nuh_layer_id of slice (currLayerId), this seems to be a bug.
    1897 
    1898     for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ )
    1899     {
    1900       TComReferencePictureSet* rps = getRPSList()->getReferencePictureSet( i );
    1901       if ( !rps->getInterRPSPrediction() )
    1902       {
    1903         rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ),
    1904           getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 
    1905       }
    1906     }
    1907   }
    1908 #endif
     1739  Void checkRpsMaxNumPics( TComVPS* vps, Int currLayerId );
    19091740
    19101741#endif
     
    20191850  Int  m_ppsScalingListRefLayerId;
    20201851
    2021 #if H_MV_HLS_8_SPS_NODOC_48
    20221852  Bool m_ppsRangeExtensionsFlag;
    20231853  Bool m_ppsMultilayerExtensionFlag;
     
    20291859#endif
    20301860
    2031 #else
    2032   Bool m_ppsExtensionTypeFlag[PS_EX_T_MAX_NUM];
    2033 #endif
    20341861  Bool m_pocResetInfoPresentFlag;
    20351862#endif
     
    21752002  Int  getPpsScalingListRefLayerId(  ) { return m_ppsScalingListRefLayerId; }
    21762003
    2177 #if H_MV_HLS_8_SPS_NODOC_48
    21782004  Void setPpsRangeExtensionsFlag( Bool flag ) { m_ppsRangeExtensionsFlag = flag; }
    21792005  Bool getPpsRangeExtensionsFlag(  ) { return m_ppsRangeExtensionsFlag; }
     
    21912017  Void setPpsExtension5bits( Int  val ) { m_ppsExtension5bits = val; }
    21922018  Int  getPpsExtension5bits(  ) { return m_ppsExtension5bits; }
    2193 #endif
    2194 #else
    2195   Void setPpsExtensionTypeFlag( Int i, Bool flag ) { m_ppsExtensionTypeFlag[i] = flag; }
    2196   Bool getPpsExtensionTypeFlag( Int i ) { return m_ppsExtensionTypeFlag[i]; }
    21972019#endif
    21982020
     
    22312053  Int         m_iPPSId;               ///< picture parameter set ID
    22322054  Bool        m_PicOutputFlag;        ///< pic_output_flag
    2233 #if H_MV_HLS_8_POC_Q0142_32
     2055#if H_MV
    22342056  Int         m_slicePicOrderCntLsb;   
    22352057#endif 
     
    24142236  Void      setPicOutputFlag( Bool b )         { m_PicOutputFlag = b;    }
    24152237  Bool      getPicOutputFlag()                 { return m_PicOutputFlag; }
    2416 #if H_MV_HLS_8_POC_Q0142_32
     2238#if H_MV
    24172239  Void      setSlicePicOrderCntLsb( Int i ) { m_slicePicOrderCntLsb = i; };
    24182240  Int       getSlicePicOrderCntLsb(  )      { return m_slicePicOrderCntLsb; };
     
    25672389  static Void markIvRefPicsAsShortTerm    ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 );
    25682390  static Void markCurrPic                 ( TComPic* currPic );
    2569 #if !H_MV_HLS_8_DBP_NODOC_42
    2570   static Void markIvRefPicsAsUnused       ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc  );
    2571 #endif
    25722391  Void        printRefPicList();
    25732392#endif
     
    27052524  Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; }
    27062525  Bool getCrossLayerBlaFlag(  ) { return m_crossLayerBlaFlag; }
    2707   Void checkCrossLayerBlaFlag ( )
    2708   {
    2709     // cross_layer_bla_flag shall be equal to 0 for pictures with nal_unit_type not equal to IDR_W_RADL or IDR_N_LP or with nuh_layer_id not equal to 0.
    2710     if ( getLayerId() != 0 || getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
    2711     {
    2712       assert( m_crossLayerBlaFlag == 0 );
    2713     }
    2714   }
     2526  Void checkCrossLayerBlaFlag ( );
    27152527
    27162528#if !H_MV_HLS7_GEN
     
    27362548  Void setPocResetIdc( Int  val ) { m_pocResetIdc = val; }
    27372549  Int  getPocResetIdc(  ) { return m_pocResetIdc; }
    2738 #if H_MV_HLS_8_POC_Q0142_32
    27392550  Void checkPocResetIdc( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) )  || !(getSlicePicOrderCntLsb() > 0 ) || !( getPocResetIdc() == 2) ); } 
    2740 #endif
     2551
    27412552  Void setPocResetPeriodId( Int  val ) { m_pocResetPeriodId = val; }
    27422553  Int  getPocResetPeriodId(  ) { return m_pocResetPeriodId; }
     
    27472558  Void setPocLsbVal( Int  val ) { m_pocLsbVal = val; }
    27482559  Int  getPocLsbVal(  ) { return m_pocLsbVal; }
    2749 #if H_MV_HLS_8_POC_Q0142_32
    27502560  Void checkPocLsbVal( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) )  || !getFullPocResetFlag() || ( getPocLsbVal() == 0 ) ); } 
    2751 #endif
    27522561
    27532562  Void setPocMsbValPresentFlag( Bool flag ) { m_pocMsbValPresentFlag = flag; }
     
    27922601  TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId );
    27932602
    2794 
    2795 #if H_MV_HLS_8_POC_Q0146_15
    2796 // Inference
    2797   Bool inferPocMsbValPresentFlag()
    2798   {
    2799     Bool pocMsbValPresentFlag;
    2800     if( getSliceSegmentHeaderExtensionLength() == 0 )
    2801     {
    2802       pocMsbValPresentFlag = false;
    2803     }
    2804     else if ( getPocMsbValRequiredFlag() )
    2805     {
    2806       pocMsbValPresentFlag = true;
    2807     }
    2808     else
    2809     {
    2810       pocMsbValPresentFlag = false;
    2811     }
    2812 
    2813     return pocMsbValPresentFlag;
    2814   } 
    2815 #endif
     2603  // Inference
     2604  Bool inferPocMsbValPresentFlag(); 
    28162605#endif
    28172606#if H_3D_DDD
    2818   Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx );
    2819   Int  getDepthFromDV( Int iDV, Int iBaseViewIdx )
    2820   {
    2821       return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]);
    2822   }
     2607  Void initializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx );
     2608  Int  getDepthFromDV( Int iDV, Int iBaseViewIdx );
    28232609#endif
    28242610
  • branches/HTM-11.1-dev0/source/Lib/TLibCommon/TypeDef.h

    r970 r971  
    398398:// #define H_MV_HLS_7_OTHER_P0187_1          0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution
    399399//#define H_MV_HLS_8_MIS_Q0078_24  0 // #24 (MISC   /Q0078/scan and pic type) , Items 3 b,c and 4, clarifying which pictures in an output layer sets are applied the values of general_progressive_source_flag, general_interlaced_source_flag, general_non_packed_constraint_flag and general_frame_only_constraint_flag.
    400 //#define H_MV_HLS_7_HRD_P0138_6            0 // (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections.
     400//#define H_MV_HLS_7_HRD_P0138_6   0 //    (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections.
    401401
    402402#define H_MV_HLS_8_SYN_Q0041_03    1   // #3  Syntax only (HS     /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows
     
    987987#if H_MV
    988988
    989 #if !H_MV_HLS_8_SPS_NODOC_48
    990 enum PpsExtensionTypes
    991 {
    992   PPS_EX_T_MV      = 0,
    993 #if H_3D
    994   PPS_EX_T_3D      = 3,
    995 #endif
    996   PPS_EX_T_ESC     = 7,
    997   PPS_EX_T_MAX_NUM = 8
    998 };
    999 
    1000 //Below for sps, would be good if this could be aligned
    1001 
    1002   enum PsExtensionTypes
    1003   {
    1004     PS_EX_T_MV   = 1,
    1005 #if H_3D
    1006     PS_EX_T_3D   = 3,
    1007 #endif
    1008     PS_EX_T_ESC  = 7,
    1009     PS_EX_T_MAX_NUM = 8
    1010   };
    1011 #endif
    1012989/// scalability types
    1013990  enum ScalabilityType
  • branches/HTM-11.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r969 r971  
    374374
    375375#if H_MV
    376 #if H_MV_HLS_8_SPS_NODOC_48
    377376    READ_FLAG( uiCode, "pps_range_extensions_flag" ); pcPPS->setPpsRangeExtensionsFlag( uiCode == 1 );
    378377    READ_FLAG( uiCode, "pps_multilayer_extension_flag" ); pcPPS->setPpsMultilayerExtensionFlag( uiCode == 1 );
     
    390389    if ( pcPPS->getPpsMultilayerExtensionFlag() )
    391390    {
    392         READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    393 #if H_MV_HLS_8_PPS_NODOC_NN
    394         READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" );
    395 #endif
     391      READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
     392      READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" );
    396393    }
    397394#if !H_3D
     
    406403    {
    407404#endif
    408 #else
    409     for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ )
    410     {
    411       READ_FLAG( uiCode, "pps_extension_type_flag" ); pcPPS->setPpsExtensionTypeFlag( i, uiCode == 1 );
    412 #if H_3D
    413       assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC );
    414 #else
    415       assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC );
    416 #endif
    417     }
    418    
    419 
    420     if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )
    421     {
    422       READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    423     }
    424 
    425 #if H_3D
    426     if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC
    427     {
    428       parsePPSExtension( pcPPS, pcVPS );
    429     }
    430 #endif
    431 
    432     if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_ESC ) )
    433     {
    434 #endif
     405
    435406#endif
    436407
     
    792763  {
    793764#endif
    794   READ_CODE( 3,  uiCode, "sps_max_sub_layers_minus1" );          pcSPS->setMaxTLayers   ( uiCode+1 );
    795   assert(uiCode <= 6);
    796  
    797   READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" );               pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );
    798   if ( pcSPS->getMaxTLayers() == 1 )
    799   {
    800     // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0
    801     assert( uiCode == 1 );
    802   }
    803  
    804   parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
     765    READ_CODE( 3,  uiCode, "sps_max_sub_layers_minus1" );          pcSPS->setMaxTLayers   ( uiCode+1 );
     766    assert(uiCode <= 6);
     767
     768    READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" );               pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );
     769    if ( pcSPS->getMaxTLayers() == 1 )
     770    {
     771      // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0
     772      assert( uiCode == 1 );
     773    }
     774
     775    parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
    805776#if H_MV
    806777  }
     
    820791  {
    821792#endif
    822   READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
    823   assert(uiCode <= 3);
    824   // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream
    825   assert (uiCode == 1);
    826   if( uiCode == 3 )
    827   {
    828     READ_FLAG(     uiCode, "separate_colour_plane_flag");        assert(uiCode == 0);
    829   }
    830 
    831   READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
    832   READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
     793    READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
     794    assert(uiCode <= 3);
     795    // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream
     796    assert (uiCode == 1);
     797    if( uiCode == 3 )
     798    {
     799      READ_FLAG(     uiCode, "separate_colour_plane_flag");        assert(uiCode == 0);
     800    }
     801
     802    READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
     803    READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
    833804#if H_MV
    834805  }
     
    857828  {
    858829#endif
    859   READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
    860   assert(uiCode <= 6);
    861   pcSPS->setBitDepthY( uiCode + 8 );
    862   pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
    863 
    864   READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
    865   assert(uiCode <= 6);
    866   pcSPS->setBitDepthC( uiCode + 8 );
    867   pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
     830    READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
     831    assert(uiCode <= 6);
     832    pcSPS->setBitDepthY( uiCode + 8 );
     833    pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
     834
     835    READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
     836    assert(uiCode <= 6);
     837    pcSPS->setBitDepthC( uiCode + 8 );
     838    pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    868839#if H_MV
    869840  }
     
    877848  { 
    878849#endif
    879   UInt subLayerOrderingInfoPresentFlag;
    880   READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag");
    881  
    882   for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    883   {
    884     READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]");
    885     pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
    886     READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" );
    887     pcSPS->setNumReorderPics(uiCode, i);
    888     READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]");
    889     pcSPS->setMaxLatencyIncrease( uiCode, i );
    890 
    891     if (!subLayerOrderingInfoPresentFlag)
    892     {
    893       for (i++; i <= pcSPS->getMaxTLayers()-1; i++)
    894       {
    895         pcSPS->setMaxDecPicBuffering(pcSPS->getMaxDecPicBuffering(0), i);
    896         pcSPS->setNumReorderPics(pcSPS->getNumReorderPics(0), i);
    897         pcSPS->setMaxLatencyIncrease(pcSPS->getMaxLatencyIncrease(0), i);
    898       }
    899       break;
    900     }
    901   }
     850    UInt subLayerOrderingInfoPresentFlag;
     851    READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag");
     852
     853    for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
     854    {
     855      READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]");
     856      pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
     857      READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" );
     858      pcSPS->setNumReorderPics(uiCode, i);
     859      READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]");
     860      pcSPS->setMaxLatencyIncrease( uiCode, i );
     861
     862      if (!subLayerOrderingInfoPresentFlag)
     863      {
     864        for (i++; i <= pcSPS->getMaxTLayers()-1; i++)
     865        {
     866          pcSPS->setMaxDecPicBuffering(pcSPS->getMaxDecPicBuffering(0), i);
     867          pcSPS->setNumReorderPics(pcSPS->getNumReorderPics(0), i);
     868          pcSPS->setMaxLatencyIncrease(pcSPS->getMaxLatencyIncrease(0), i);
     869        }
     870        break;
     871      }
     872    }
    902873#if H_MV
    903874  }
     
    909880  READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" );
    910881  pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode);
    911  
     882
    912883  if (pcSPS->getPTL()->getGeneralPTL()->getLevelIdc() >= Level::LEVEL5)
    913884  {
    914885    assert(log2MinCUSize + pcSPS->getLog2DiffMaxMinCodingBlockSize() >= 5);
    915886  }
    916  
     887
    917888  Int maxCUDepthDelta = uiCode;
    918889  pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + maxCUDepthDelta) );
     
    945916    {   
    946917#endif
    947     READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" );                 pcSPS->setScalingListPresentFlag ( uiCode );
    948     if(pcSPS->getScalingListPresentFlag ())
    949     {
    950       parseScalingList( pcSPS->getScalingList() );
    951     }
     918      READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" );                 pcSPS->setScalingListPresentFlag ( uiCode );
     919      if(pcSPS->getScalingListPresentFlag ())
     920      {
     921        parseScalingList( pcSPS->getScalingList() );
     922      }
    952923#if H_MV
    953924    }
     
    1014985  {
    1015986#if H_MV
    1016 #if H_MV_HLS_8_SPS_NODOC_48
    1017987    READ_FLAG( uiCode, "sps_range_extensions_flag" ); pcSPS->setSpsRangeExtensionsFlag( uiCode == 1 );
    1018988    READ_FLAG( uiCode, "sps_multilayer_extension_flag" ); pcSPS->setSpsMultilayerExtensionFlag( uiCode == 1 );
     
    10471017  {
    10481018#endif
    1049 #else
    1050     for (Int i = 0; i < PS_EX_T_MAX_NUM; i++)
    1051     {
    1052       READ_FLAG( uiCode, "sps_extension_type_flag" ); pcSPS->setSpsExtensionTypeFlag( i, uiCode );
    1053 #if H_3D
    1054       assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV || i == PS_EX_T_3D || i == PS_EX_T_ESC );
    1055 #else
    1056       assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV || i == PS_EX_T_ESC );
    1057 #endif
    1058     } 
    1059 
    1060     if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_MV ))
    1061     {
    1062       parseSPSExtension( pcSPS );
    1063     }
    1064 
    1065 #if H_3D
    1066     if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_3D ))
    1067     {
    1068       parseSPSExtension2( pcSPS, viewIndex, depthFlag  );
    1069     }
    1070 #endif
    1071 
    1072     if ( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_ESC ))
    1073     {   
    1074 #endif
    1075 #endif
    1076         while ( xMoreRbspData() )
    1077         {
    1078           READ_FLAG( uiCode, "sps_extension_data_flag");
    1079         }
    1080 #if H_MV && !H_MV_HLS_8_SPS_NODOC_48
    1081     }
    1082 #endif
     1019
     1020#endif
     1021    while ( xMoreRbspData() )
     1022    {
     1023      READ_FLAG( uiCode, "sps_extension_data_flag");
     1024    }
    10831025  }
    10841026}
     
    20271969#endif
    20281970
    2029 #if H_MV_HLS_8_HRD_Q0102_08
     1971#if H_MV
    20301972Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx)
    20311973#else
     
    20702012  sps->inferRepFormat  ( vps , rpcSlice->getLayerId() );
    20712013  sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) );   
    2072 #if H_MV_HLS_8_HRD_Q0102_08
    20732014  sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false );
    2074 #endif
    2075 #if H_MV_HLS_8_RPS_Q0100_36
    20762015  vps->inferDbpSizeLayerSetZero( sps, false );
    2077 #endif
    20782016
    20792017  if ( sps->getVuiParametersPresentFlag() )
     
    21922130      READ_CODE(sps->getBitsForPOC(), slicePicOrderCntLsb, "slice_pic_order_cnt_lsb");       
    21932131    }   
    2194 #if H_MV_HLS_8_POC_Q0142_32
    21952132    rpcSlice->setSlicePicOrderCntLsb( slicePicOrderCntLsb );
    2196 #endif
    21972133
    21982134    Bool picOrderCntMSBZeroFlag = false;     
     
    22902226      {       
    22912227        parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets());
    2292 #if H_MV_HLS_8_RPS_Q0100_36
     2228#if H_MV
    22932229        if ( !rps->getInterRPSPrediction( ) )
    22942230        { // check sum of num_positive_pics and num_negative_pics
     
    24032339        rps->setNumberOfPictures(offset);       
    24042340      } 
    2405 #if H_MV_HLS_8_RPS_Q0100_36
     2341#if H_MV
    24062342      if ( !rps->getInterRPSPrediction( ) )
    24072343      { // check sum of NumPositivePics, NumNegativePics, num_long_term_sps and num_long_term_pics
     
    27932729      rpcSlice->setPocResetIdc( 0 );
    27942730    }
    2795 #if H_MV_HLS_8_POC_Q0142_32
    27962731    rpcSlice->checkPocResetIdc();
    2797 #endif
    27982732
    27992733#if H0044_POC_LSB_NOT_PRESENT
     
    28172751      READ_FLAG( uiCode, "full_poc_reset_flag" ); rpcSlice->setFullPocResetFlag( uiCode == 1 );
    28182752      READ_CODE( rpcSlice->getPocLsbValLen() , uiCode, "poc_lsb_val" ); rpcSlice->setPocLsbVal( uiCode );
    2819 #if !H_MV_HLS_8_POC_Q0142_32
    2820 #if H0044_POC_LSB_NOT_PRESENT
    2821       if ( rpcSlice->getVPS()->getPocLsbNotPresentFlag(rpcSlice->getLayerId()) && rpcSlice->getFullPocResetFlag() )
    2822       {
    2823         assert( rpcSlice->getPocLsbVal() == 0 );
    2824       }
    2825 #endif
    2826 #endif
    28272753    }         
    2828 #if H_MV_HLS_8_POC_Q0142_32
    28292754    rpcSlice->checkPocLsbVal();
    2830 #endif
    28312755
    28322756    // Derive the value of PocMs8bValRequiredFlag
     
    28412765    else
    28422766    {
    2843 #if H_MV_HLS_8_POC_Q0146_15
    28442767      rpcSlice->setPocMsbValPresentFlag( rpcSlice->inferPocMsbValPresentFlag( ) );
    2845 #else
    2846       if( rpcSlice->getPocMsbValRequiredFlag() )
    2847       {
    2848         rpcSlice->setPocMsbValPresentFlag( true );
    2849       }
    2850       else
    2851       {
    2852         rpcSlice->setPocMsbValPresentFlag( false );
    2853       }
    2854 #endif
    28552768    }
    28562769
  • branches/HTM-11.1-dev0/source/Lib/TLibDecoder/TDecSbac.h

    r969 r971  
    8787#endif
    8888
    89 #if H_MV_HLS_8_HRD_Q0102_08
     89#if H_MV
    9090  Void  parseSliceHeader          ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/, Int targetOlsIdx ) {}
    91 #else
    92   Void  parseSliceHeader          ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/) {}
    9391#endif
    9492  Void  parseTerminatingBit       ( UInt& ruiBit );
Note: See TracChangeset for help on using the changeset viewer.