Ignore:
Timestamp:
2 Jul 2014, 18:11:25 (10 years ago)
Author:
tech
Message:

Update to HM-14.0

Integration of:

#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 …: #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
#define H_MV_HLS_8_SYN_39_19 1
#39 Syntax only + (PS/Q0165,Q0078/presence of num_add_output_layer_sets) proposal 2. change condition for presence of num_add_output_layer_sets to avoid sending it when there is only one layer set.
#define H_MV_HLS_8_HRD_Q0101_04 1 #4 (HRD /Q0101/Bitstream part buffer) On Bitstream Partition Buffer. Decision (BF/Cleanup): Adopt (sub-proposals 1–11, refined as described).
#define H_MV_HLS_8_PPS_NODOC_NN 1
#NN (PPS /NODOC/reserved flag): Add a flag in PPS for SHVC color gamut scalability
#define H_MV_HLS_8_MIS_Q0177_47 1 #47 (MISC /Q0177/EOS NAL) proposal 2: clarification of description of end of sequence NAL unit
#define H_MV_HLS_8_HRD_Q0182_05 1
#5 (HRD /Q0182/Bitstream part buffer) Decision (BF/Cleanup/Ed): Adopted (such that we use the main proposal for sub-proposal 1, and alternative 1 for sub-proposal 2). + #define H_MV_HLS_8_HRD_Q0182_06 0 #6 (HRD /Q0182/hrd_parameters) Sub-proposal 2 Alternative 1: Clarify that the VPS hrd_parameters( ) syntax structure that applies to the layer set which is associated with the bitstream partition initial arrival time SEI message is used to determine the lengths of the nal_initial_arrival_delay[ i ] and vcl_initial_arrival_delay[ i ] syntax elements. Decision (BF/Cleanup/Ed): Adopted alternative 1 for sub-proposal 2
#define H_MV_HLS_8_SPS_NODOC_48 1
#48 (SPS /NODOC/PPS extension cleanups) Alignment with RExt
#define H_MV_HLS_8_DBP_NODOC_42 1 #42 (DBP /NODOC/sharing) Remove sub-DPB sharing and processes that mark inter-layer reference pictures as "unused for reference"
#define H_MV_HLS_8_RPS_Q0100_36 1
#36 (RPS /Q0100/constraint to semantics) v3, add constraint to RPS semantics
#define H_MV_HLS_8_POC_Q0142_32 1 #32 (POC /Q0142/poc_lsb_not_present_flag) v2: Add semantic constraints to poc_lsb_not_present_flag.
#define H_MV_HLS_8_HRD_Q0102_08 1
#8 (HRD /Q0102/sps_max_dec_pic_buffering_minus1) Sub-proposal 2: A semantics bug fix is proposed for sps_max_dec_pic_buffering_minus1 as a bug-fix. In discussion, the first option was preferred. Decision (BF/Cleanup/Ed.): Adopt.
#define H_MV_HLS_8_MIS_Q0102_30 1 #30 (MISC /Q0102/loop index) proposal 3, change the max loop index for signaling bit rate and pic rate info to MaxSubLayersInLayerSetMinus1
#define H_MV_HLS_8_GEN_Q0108_13 1
#13 (GEN /Q0108/STSA TemporalId) Agreed to remove restriction from proposal 2, to allow STSA pics of non-base layers to have TemporalId equal to 0.
#define H_MV_HLS_8_PMS_Q0195_21 1 #21 (PS /Q0195/constraint update_ref_format_flag) proposal 2: add a semantic constraint on the value of update_ref_format_flag
#define H_MV_HLS_8_PMS_Q0195_20 1
#20 (PS /Q0195/syntax table rep format) proposal 1: restructure syntax table for sending of rep_format_idx_present_flag and vps_num_ref_formats_minus1
#define H_MV_HLS_8_MIS_Q0177_22 1 #22 (MISC /Q0177/inference sps_temporal_id_nesting_flag) proposal 1: modify inference rule for sps_temporal_id_nesting_flag when it is not present
#define H_MV_HLS_8_PMS_Q0165_18 1
#18 (PS /Q0165/disallow an empty layer set) proposal 1.a), add a constraint to disallow an empty layer set
#define H_MV_HLS_8_RPS_Q0060_17 1 #17 (RPS /Q0060/condition refLayerPicIdc) Proposal 2: Add a condition to the derivation of refLayerPicIdc of (TemporalId == 0)
#define H_MV_HLS_8_POC_Q0146_15 1
#15 (POC /Q0146/inference of poc_msb_val_present_flag) Proposal 1.1: Change inference rule in semantics of poc_msb_val_present_flag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-11.0-dev0/source/Lib/TLibCommon/TComSlice.cpp

    r956 r962  
    1 /* The copyright in this software is being made available under the BSD
     1/* The copyright in this software is being made available under the BSD
    22 * License, included below. This software may be subject to other third party
    33 * and contributor rights, including patent rights, and no such rights are
     
    4545//! \{
    4646
     47
    4748TComSlice::TComSlice()
    4849: m_iPPSId                        ( -1 )
     50#if H_MV_HLS_8_POC_Q0142_32
     51, m_slicePicOrderCntLsb           ( 0 )
     52#endif
    4953, m_iPOC                          ( 0 )
    5054, m_iLastIDR                      ( 0 )
     
    7074, m_pcPic                         ( NULL )
    7175, m_colFromL0Flag                 ( 1 )
     76#if SETTING_NO_OUT_PIC_PRIOR
     77, m_noOutputPriorPicsFlag         ( false )
     78, m_noRaslOutputFlag              ( false )
     79, m_handleCraAsBlaFlag              ( false )
     80#endif
    7281, m_colRefIdx                     ( 0 )
    7382, m_uiTLayer                      ( 0 )
     
    459468  {
    460469    // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr:
    461     // ?If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0.
    462     // ?Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.
     470    // - If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0.
     471    // - Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.
    463472    if (getRapPicFlag())
    464473    {
     
    903912      pocCRA = pocCurr;
    904913    }
     914#if EFFICIENT_FIELD_IRAP
     915    bRefreshPending = true;
     916#endif
    905917  }
    906918  else // CRA or No DR
    907919  {
     920#if EFFICIENT_FIELD_IRAP
     921    if(getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL)
     922    {
     923      if (bRefreshPending==true && pocCurr > m_iLastIDR) // IDR reference marking pending
     924      {
     925        TComList<TComPic*>::iterator        iterPic       = rcListPic.begin();
     926        while (iterPic != rcListPic.end())
     927        {
     928          rpcPic = *(iterPic);
     929          if (rpcPic->getPOC() != pocCurr && rpcPic->getPOC() != m_iLastIDR)
     930          {
     931            rpcPic->getSlice(0)->setReferenced(false);
     932          }
     933          iterPic++;
     934        }
     935        bRefreshPending = false;
     936      }
     937    }
     938    else
     939    {
     940#endif
    908941    if (bRefreshPending==true && pocCurr > pocCRA) // CRA reference marking pending
    909942    {
     
    920953      bRefreshPending = false;
    921954    }
     955#if EFFICIENT_FIELD_IRAP
     956    }
     957#endif
    922958    if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // CRA picture found
    923959    {
     
    11941230    // in decoding order shall precede the IRAP picture in output order.
    11951231    // (Note that any picture following in output order would be present in the DPB)
     1232#if !SETTING_NO_OUT_PIC_PRIOR
    11961233    if(rpcPic->getSlice(0)->getPicOutputFlag() == 1)
     1234#else
     1235    if(rpcPic->getSlice(0)->getPicOutputFlag() == 1 && !this->getNoOutputPriorPicsFlag())
     1236#endif
    11971237    {
    11981238      if(nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP    ||
     
    13701410/** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet.
    13711411*/
     1412#if ALLOW_RECOVERY_POINT_AS_RAP
     1413Int TComSlice::checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess, Bool bUseRecoveryPoint)
     1414#else
    13721415Int TComSlice::checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess)
    1373 {
     1416#endif
     1417{
     1418#if ALLOW_RECOVERY_POINT_AS_RAP
     1419  Int atLeastOneUnabledByRecoveryPoint = 0;
     1420  Int atLeastOneFlushedByPreviousIDR = 0;
     1421#endif
    13741422  TComPic* rpcPic;
    13751423  Int i, isAvailable;
     
    13921440        if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()) == pReferencePictureSet->getPOC(i) && rpcPic->getSlice(0)->isReferenced())
    13931441        {
     1442#if ALLOW_RECOVERY_POINT_AS_RAP
     1443          if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess)
     1444          {
     1445            isAvailable = 0;
     1446          }
     1447          else
     1448          {
    13941449          isAvailable = 1;
     1450        }
     1451#else
     1452          isAvailable = 1;
     1453#endif
    13951454        }
    13961455      }
     
    14021461        if(rpcPic->getIsLongTerm() && curPoc == refPoc && rpcPic->getSlice(0)->isReferenced())
    14031462        {
     1463#if ALLOW_RECOVERY_POINT_AS_RAP
     1464          if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess)
     1465          {
     1466            isAvailable = 0;
     1467          }
     1468          else
     1469          {
    14041470          isAvailable = 1;
     1471        }
     1472#else
     1473          isAvailable = 1;
     1474#endif
    14051475        }
    14061476      }
     
    14251495        if (rpcPic->getSlice(0)->isReferenced() && curPoc == refPoc)
    14261496        {
     1497#if ALLOW_RECOVERY_POINT_AS_RAP
     1498          if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess)
     1499          {
     1500            isAvailable = 0;
     1501          }
     1502          else
     1503          {
    14271504          isAvailable = 1;
    14281505          rpcPic->setIsLongTerm(1);
    14291506          break;
     1507        }
     1508#else
     1509          isAvailable = 1;
     1510          rpcPic->setIsLongTerm(1);
     1511          break;
     1512#endif
    14301513        }
    14311514      }
     
    14551538        }
    14561539      }
     1540#if ALLOW_RECOVERY_POINT_AS_RAP
     1541      else if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess)
     1542      {
     1543        atLeastOneUnabledByRecoveryPoint = 1;
     1544      }
     1545      else if(bUseRecoveryPoint && (this->getAssociatedIRAPType()==NAL_UNIT_CODED_SLICE_IDR_N_LP || this->getAssociatedIRAPType()==NAL_UNIT_CODED_SLICE_IDR_W_RADL))
     1546      {
     1547        atLeastOneFlushedByPreviousIDR = 1;
     1548      }
     1549#endif
    14571550    }
    14581551  } 
     
    14701563      if(!rpcPic->getIsLongTerm() && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i) && rpcPic->getSlice(0)->isReferenced())
    14711564      {
     1565#if ALLOW_RECOVERY_POINT_AS_RAP
     1566        if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess)
     1567        {
     1568          isAvailable = 0;
     1569        }
     1570        else
     1571        {
    14721572        isAvailable = 1;
     1573      }
     1574#else
     1575        isAvailable = 1;
     1576#endif
    14731577      }
    14741578    }
     
    14971601        }
    14981602      }
    1499     }
     1603#if ALLOW_RECOVERY_POINT_AS_RAP
     1604      else if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess)
     1605      {
     1606        atLeastOneUnabledByRecoveryPoint = 1;
     1607    }
     1608      else if(bUseRecoveryPoint && (this->getAssociatedIRAPType()==NAL_UNIT_CODED_SLICE_IDR_N_LP || this->getAssociatedIRAPType()==NAL_UNIT_CODED_SLICE_IDR_W_RADL))
     1609      {
     1610        atLeastOneFlushedByPreviousIDR = 1;
    15001611  }   
     1612#endif
     1613    }
     1614    }
     1615#if ALLOW_RECOVERY_POINT_AS_RAP
     1616  if(atLeastOneUnabledByRecoveryPoint || atLeastOneFlushedByPreviousIDR)
     1617  {
     1618    return -1;
     1619  }   
     1620#endif
    15011621  if(atLeastOneLost)
    15021622  {
     
    15151635/** Function for constructing an explicit Reference Picture Set out of the available pictures in a referenced Reference Picture Set
    15161636*/
     1637#if ALLOW_RECOVERY_POINT_AS_RAP
     1638Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint)
     1639#else
    15171640Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP)
     1641#endif
    15181642{
    15191643  TComPic* rpcPic;
     
    15411665        pcRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i));
    15421666        pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP));
     1667#if ALLOW_RECOVERY_POINT_AS_RAP
     1668        pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) );
     1669#endif
    15431670        if(pcRPS->getDeltaPOC(k) < 0)
    15441671        {
     
    15531680    }
    15541681  }
     1682#if EFFICIENT_FIELD_IRAP
     1683  Bool useNewRPS = false;
     1684  // if current picture is complimentary field associated to IRAP, add the IRAP to its RPS.
     1685  if(m_pcPic->isField())
     1686  {
     1687    TComList<TComPic*>::iterator iterPic = rcListPic.begin();
     1688    while ( iterPic != rcListPic.end())
     1689    {
     1690      rpcPic = *(iterPic++);
     1691      if(rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1)
     1692      {
     1693        pcRPS->setDeltaPOC(k, 1);
     1694        pcRPS->setUsed(k, true);
     1695        nrOfPositivePictures++;
     1696        k ++;
     1697        useNewRPS = true;
     1698      }
     1699    }
     1700  }
     1701#endif
    15551702  pcRPS->setNumberOfNegativePictures(nrOfNegativePictures);
    15561703  pcRPS->setNumberOfPositivePictures(nrOfPositivePictures);
     
    15591706  // inter RPS prediction with.  Here we just use the reference used by pReferencePictureSet.
    15601707  // If pReferencePictureSet is not inter_RPS_predicted, then inter_RPS_prediction is for the current RPS also disabled.
    1561   if (!pReferencePictureSet->getInterRPSPrediction())
     1708  if (!pReferencePictureSet->getInterRPSPrediction()
     1709#if EFFICIENT_FIELD_IRAP
     1710    || useNewRPS
     1711#endif
     1712    )
    15621713  {
    15631714    pcRPS->setInterRPSPrediction(false);
     
    17281879  m_vpsNumProfileTierLevelMinus1 = -1;
    17291880   
    1730   m_numAddOutputLayerSets              = -1;   
    1731   m_defaultTargetOutputLayerIdc     = 0;
     1881  m_numAddLayerSets              = -1;   
     1882  m_defaultOutputLayerIdc     = 0;
    17321883 
    17331884  for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++)
    17341885  {
    1735     m_outputLayerSetIdxMinus1[i]  = -1;
     1886    m_layerSetIdxForOlsMinus1[i]  = -1;
    17361887    m_profileLevelTierIdx[i]      = 0;
    17371888    for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++)
     
    17411892    m_altOutputLayerFlag[ i ]       = false;
    17421893  }
     1894
     1895#if H_MV_HLS_8_PMS_Q0195_20
     1896  m_repFormatIdxPresentFlag = false;
     1897#endif
    17431898  m_maxOneActiveRefLayerFlag = false;
    17441899  m_directDepTypeLenMinus2   = 0;         
    17451900 
    17461901
     1902#if H_MV_HLS_8_RPS_Q0100_36
     1903  m_vpsExtensionFlag = true;
     1904#endif
    17471905  m_avcBaseLayerFlag = false;
    17481906  m_vpsNonVuiExtensionLength = 0;
     
    17601918  {
    17611919    m_vpsProfilePresentFlag   [i] = false;
    1762     m_outputLayerSetIdxMinus1       [i] = 0;
     1920    m_layerSetIdxForOlsMinus1       [i] = 0;
    17631921    for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ )
    17641922    {
     
    18642022    assert( getLayerIdInNuh( layer ) > getLayerIdInNuh( layer -1 ) );
    18652023  }
     2024
     2025
     2026#if H_MV_HLS_8_PMS_Q0195_20
     2027  //The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive.
     2028  assert( getVpsNumRepFormatsMinus1() >= 0 );
     2029  assert( getVpsNumRepFormatsMinus1() <= 255 );
     2030#endif
     2031
    18662032  return true;
    18672033}
     
    19072073    }
    19082074  }
     2075
     2076#if H_MV_HLS_8
     2077  for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ )
     2078  {
     2079    m_numRefLayers[i] = 0;
     2080  }
     2081
     2082  for (Int currLayerId = 0; currLayerId <= 62; currLayerId++ )
     2083  {
     2084    for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ )
     2085    {
     2086      m_recursiveRefLayerFlag[currLayerId][i] = 0;
     2087    }
     2088  }
     2089
     2090
     2091  for( Int i = 0; i  <=  getMaxLayersMinus1(); i++ )
     2092  {
     2093    Int iNuhLId = getLayerIdInNuh( i );
     2094    xSetRefLayerFlags( iNuhLId );
     2095    for( Int j = 0; j < 63; j++ )
     2096    {
     2097      m_numRefLayers[ iNuhLId ]  +=  m_recursiveRefLayerFlag[ iNuhLId ][ j ];
     2098    }
     2099  }
     2100
     2101
     2102  for( Int i = 0; i <= getMaxLayersMinus1(); i++ )  // Bug in spec "<" instead of "<="
     2103  {
     2104    Int iNuhLId = getLayerIdInNuh( i );
     2105    Int predIdx = 0;
     2106    for( Int j = iNuhLId + 1; j < 63; j++ )
     2107    {
     2108      if( m_recursiveRefLayerFlag[ j ][ iNuhLId ] )
     2109      {
     2110        m_predictedLayerId[ iNuhLId ][ predIdx++ ] = j;
     2111      }
     2112    }
     2113    m_numPredictedLayers[ iNuhLId ] = predIdx;
     2114  }
     2115 
     2116  Bool countedLayerIdxFlag[ MAX_NUM_LAYERS ];
     2117  for( Int i = 0; i  <=  getMaxLayersMinus1(); i++ )
     2118  {
     2119    countedLayerIdxFlag[ i ] = 0;
     2120  }
     2121 
     2122  for( Int i = 0, k = 0; i  <=  getMaxLayersMinus1(); i++ )
     2123  {
     2124    Int iNuhLId = getLayerIdInNuh( i );
     2125    if( m_numDirectRefLayers[ iNuhLId ]  ==  0 )
     2126    {
     2127      m_treePartitionLayerIdList[ k ][ 0 ] = iNuhLId;
     2128      m_numLayersInTreePartition[ k ]      = 1;
     2129      for( Int j = 0; j < m_numPredictedLayers[ iNuhLId ]; j++ ) 
     2130      {
     2131        if( !countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] )   
     2132        {
     2133          m_treePartitionLayerIdList[ k ][ m_numLayersInTreePartition[ k ] ] = m_predictedLayerId[ iNuhLId ][ j ];
     2134          m_numLayersInTreePartition[ k ]++;
     2135          countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] = 1;
     2136        }
     2137      }
     2138      k++;
     2139    }
     2140    m_numIndependentLayers = k;
     2141  }
     2142#endif
    19092143}
    19102144
     
    20712305Int    TComVPS::getNumOutputLayerSets()
    20722306{
    2073   return getNumAddOutputLayerSets() + getVpsNumLayerSetsMinus1() + 1;
     2307#if H_MV_HLS_8_SYN_39_19
     2308  return getNumAddOlss() + getNumLayerSets();
     2309#else
     2310  return getNumAddLayerSets() + getVpsNumLayerSetsMinus1() + 1;
     2311#endif
    20742312}
    20752313
     
    21272365Void TComVPS::deriveTargetLayerIdList( Int i )
    21282366
    2129   Int lsIdx = getLayerSetIdxForOutputLayerSet( i );     
     2367  Int lsIdx = olsIdxToLsIdx( i );     
    21302368 
    21312369  for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ )
     
    21372375    }
    21382376  } 
     2377#if H_MV_HLS_8_PMS_Q0165_18
     2378  assert( getNumOutputLayersInOutputLayerSet( i ) > 0 );
     2379#endif
    21392380}
    21402381
     
    21422383{
    21432384  Bool outputLayerFlag;
    2144   switch ( getDefaultTargetOutputLayerIdc( ) )
     2385  switch ( getDefaultOutputLayerIdc( ) )
    21452386  {
    21462387  case 0:
     
    21482389    break;
    21492390  case 1:
    2150     outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 ); 
     2391    outputLayerFlag = ( j == m_layerSetLayerIdList[ olsIdxToLsIdx( i ) ].size() - 1 ); 
    21512392    break;
    21522393  case 2:
     
    21702411{
    21712412  Int maxSLMinus1 = 0;
    2172   Int optLsIdx    = getLayerSetIdxForOutputLayerSet( i );
     2413#if H_MV_HLS_8_MIS_Q0102_30
     2414  for( Int k = 0; k < getNumLayersInIdList( i ); k++ )
     2415  {
     2416    Int lId = m_layerSetLayerIdList[i][k];
     2417#else 
     2418  Int optLsIdx    = olsIdxToLsIdx( i );
     2419
    21732420  for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )
    21742421  {
    21752422    Int lId = m_layerSetLayerIdList[optLsIdx][k];
     2423#endif
    21762424    maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) ));
    21772425  }
    21782426  return maxSLMinus1;
    21792427}
    2180 
     2428#if H_MV_HLS_8_RPS_Q0100_36
     2429Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder )
     2430{
     2431  for( Int j = 0; j <= getMaxSubLayersInLayerSetMinus1( 0 ); j++ )
     2432  {
     2433    Int maxDecPicBufferingMinus1 = sps->getMaxDecPicBuffering( j ) - 1;
     2434    Int numReorderPics           = sps->getNumReorderPics    ( j );
     2435    Int maxLatencyIncreasePlus1  = sps->getMaxLatencyIncrease( j );
     2436
     2437    if ( encoder )
     2438    {
     2439      assert( getDpbSize()->getMaxVpsDecPicBufferingMinus1(0, 0, j ) == maxDecPicBufferingMinus1 );
     2440      assert( getDpbSize()->getMaxVpsNumReorderPics       (0,    j ) == numReorderPics           );
     2441      assert( getDpbSize()->getMaxVpsLatencyIncreasePlus1 (0,    j ) == maxLatencyIncreasePlus1  );
     2442    }
     2443    else
     2444    {
     2445      getDpbSize()->setMaxVpsDecPicBufferingMinus1(0, 0, j, maxDecPicBufferingMinus1 );
     2446      getDpbSize()->setMaxVpsNumReorderPics       (0,    j, numReorderPics           );
     2447      getDpbSize()->setMaxVpsLatencyIncreasePlus1 (0,    j, maxLatencyIncreasePlus1  );       
     2448    }     
     2449  }
     2450}
     2451#endif
    21812452#endif // H_MV
    21822453
     
    22502521  ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag));
    22512522#if H_MV
    2252   m_spsExtensionFlag = false;
     2523#if !H_MV_HLS_8_SPS_NODOC_48
     2524  m_spsExtensionPresentFlag = false;
    22532525  for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )
    22542526  {
    22552527    m_spsExtensionTypeFlag[ i ] = false;
    22562528  }
     2529#else
     2530  m_spsRangeExtensionsFlag     = false;
     2531  m_spsMultilayerExtensionFlag = false;
     2532#if H_3D
     2533  m_spsExtension5bits          = 0;
     2534  m_sps3dExtensionFlag         = false;
     2535#else
     2536  m_spsExtension6bits          = 0;
     2537#endif
     2538#endif
     2539
    22572540  m_numScaledRefLayerOffsets = 0;
    22582541
     
    24342717
    24352718#if H_MV
     2719#if H_MV_HLS_8_SPS_NODOC_48
     2720  m_ppsRangeExtensionsFlag     = false;
     2721  m_ppsMultilayerExtensionFlag = false;
     2722#if !H_3D
     2723  m_ppsExtension6bits          = 0;
     2724#else
     2725  m_pps3dExtensionFlag         = false;
     2726  m_ppsExtension5bits          = 0;
     2727#endif
     2728#else
    24362729  for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )
    24372730  {
    24382731    m_ppsExtensionTypeFlag[ i ] = false;
    24392732  }
     2733#endif
    24402734#endif
    24412735}
     
    29633257Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 )
    29643258{
    2965   // Mark as shortterm
     3259  // Mark as short-term
    29663260  for ( Int i = 0; i < refPicSetInterLayer0.size(); i++ )
    29673261  {
     
    29753269
    29763270}
     3271
     3272#if !H_MV_HLS_8_DBP_NODOC_42
    29773273Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc )
    29783274{
     
    30293325  }
    30303326}
    3031 
     3327#endif
    30323328Void TComSlice::printRefPicList()
    30333329
     
    30463342Void TComSlice::markCurrPic( TComPic* currPic )
    30473343{
     3344
     3345#if !H_MV_HLS_8_DBP_NODOC_42
    30483346  if ( !currPic->getSlice(0)->getDiscardableFlag() )
    30493347  {
     3348#endif
    30503349    currPic->getSlice(0)->setReferenced( true ) ;
    30513350    currPic->setIsLongTerm( false );
     3351#if !H_MV_HLS_8_DBP_NODOC_42
    30523352  }
    30533353  else
     
    30553355    currPic->getSlice(0)->setReferenced( false ) ;
    30563356  }
     3357#endif
     3358
     3359#if H_MV_HLS_7_VPS_P0300_27
     3360  currPic->setReconMark( true );
     3361  currPic->setPicOutputFlag( currPic->getSlice(0)->getPicOutputFlag() );
     3362#endif
    30573363}
    30583364
     
    30883394  Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) );
    30893395
     3396#if H_MV_HLS_8_RPS_Q0060_17
     3397  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  && ( getTLayer() == 0  ) &&
     3398    ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );
     3399#else
    30903400  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  &&
    30913401    ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );
     3402#endif
    30923403
    30933404  return refLayerPicFlag;       
     
    39704281    }
    39714282  }
     4283
     4284  // ---------------
     4285  // To be added:
     4286  // When vps_base_layer_internal_flag is equal to 0 and layer_in_bsp_flag[ h ][ i ][ 0 ] is equal to 1 for any value of h in the
     4287  // range of 1 to vps_num_layer_sets_minus1, inclusive, and any value of i in the range of 0 to num_bitstream_partitions[ h ] - 1,
     4288  // inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] for at least one value of j in the range of 1 to
     4289  // NumLayersInIdList[ h ] - 1, inclusive, shall be equal to 1.
     4290  // ---------------
     4291
     4292
     4293  // When num_bitstream_partitions[ h ] is equal to 1 for any value of h in the range 1 to vps_num_layer_set_minus1, inclusive,
     4294  // the value of layer_in_bsp_flag[ h ][ 0 ][ j ] should be equal to 0 for at least one value of j in the range 0 to
     4295  // NumLayersInIdList[ h ] − 1, inclusive.
     4296
     4297
     4298  if ( getNumBitstreamPartitions( h ) == 1 )
     4299  {
     4300    Bool atLeastOneZero = false;
     4301    for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ )
     4302    {
     4303      atLeastOneZero = atLeastOneZero || !getLayerInBspFlag( h, 0, j );
     4304    }   
     4305    assert( atLeastOneZero );
     4306  }
     4307
     4308 
     4309  // For any value of h in the range 1 to vps_num_layer_set_minus1, inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ]
     4310  // shall be equal to 1 for at most one value of i in the range of 0 to num_bitstream_partitions[ h ] − 1, inclusive.
     4311
     4312  for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ )
     4313  {
     4314    Int numLayerInBsp = 0;
     4315    for ( Int i = 0; i <= getNumBitstreamPartitions( h ) - 1; i++ )
     4316    {
     4317      numLayerInBsp += ( getLayerInBspFlag( h, i, j ) ? 1 : 0 ); 
     4318    }   
     4319    assert( numLayerInBsp <= 1 );
     4320  }
     4321
    39724322}
    39734323
Note: See TracChangeset for help on using the changeset viewer.