Changeset 964 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComSlice.cpp


Ignore:
Timestamp:
5 Jul 2014, 05:16:45 (10 years ago)
Author:
tech
Message:
  • Merged 11.0-dev0@963. (Update to HM 14.0 + MV-HEVC Draft 8 HLS)
  • Added coding results.
  • Changed version number.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r950 r964  
    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);
     
    17121863#endif
    17131864{
     1865#if H_MV_HLS_8_SYN_Q0041_03
     1866  m_vpsBaseLayerInternalFlag = true;
     1867#endif
     1868
    17141869  for( Int i = 0; i < MAX_TLAYER; i++)
    17151870  {
     
    17281883  m_vpsNumProfileTierLevelMinus1 = -1;
    17291884   
    1730   m_numAddOutputLayerSets              = -1;   
    1731   m_defaultTargetOutputLayerIdc     = 0;
     1885#if H_MV_HLS_8_SYN_39_19
     1886  m_numAddLayerSets              = 0;   
     1887  m_numAddOlss                   = 0;
     1888#else
     1889  m_numAddLayerSets              = -1;   
     1890#endif
     1891  m_defaultOutputLayerIdc     = 0;
    17321892 
    17331893  for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++)
    17341894  {
    1735     m_outputLayerSetIdxMinus1[i]  = -1;
     1895    m_layerSetIdxForOlsMinus1[i]  = -1;
    17361896    m_profileLevelTierIdx[i]      = 0;
    17371897    for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++)
     
    17411901    m_altOutputLayerFlag[ i ]       = false;
    17421902  }
     1903
     1904#if H_MV_HLS_8_PMS_Q0195_20
     1905  m_repFormatIdxPresentFlag = false;
     1906#endif
    17431907  m_maxOneActiveRefLayerFlag = false;
    17441908  m_directDepTypeLenMinus2   = 0;         
    17451909 
    17461910
     1911#if H_MV_HLS_8_RPS_Q0100_36
     1912  m_vpsExtensionFlag = true;
     1913#endif
    17471914  m_avcBaseLayerFlag = false;
    17481915  m_vpsNonVuiExtensionLength = 0;
     
    17601927  {
    17611928    m_vpsProfilePresentFlag   [i] = false;
    1762     m_outputLayerSetIdxMinus1       [i] = 0;
     1929    m_layerSetIdxForOlsMinus1       [i] = 0;
    17631930    for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ )
    17641931    {
     
    18642031    assert( getLayerIdInNuh( layer ) > getLayerIdInNuh( layer -1 ) );
    18652032  }
     2033
     2034
     2035#if H_MV_HLS_8_PMS_Q0195_20
     2036  //The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive.
     2037  assert( getVpsNumRepFormatsMinus1() >= 0 );
     2038  assert( getVpsNumRepFormatsMinus1() <= 255 );
     2039#endif
     2040
    18662041  return true;
    18672042}
     
    19072082    }
    19082083  }
     2084
     2085#if H_MV_HLS_8
     2086  for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ )
     2087  {
     2088    m_numRefLayers[i] = 0;
     2089  }
     2090
     2091  for (Int currLayerId = 0; currLayerId <= 62; currLayerId++ )
     2092  {
     2093    for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ )
     2094    {
     2095      m_recursiveRefLayerFlag[currLayerId][i] = 0;
     2096    }
     2097  }
     2098
     2099
     2100  for( Int i = 0; i  <=  getMaxLayersMinus1(); i++ )
     2101  {
     2102    Int iNuhLId = getLayerIdInNuh( i );
     2103    xSetRefLayerFlags( iNuhLId );
     2104    for( Int j = 0; j < 63; j++ )
     2105    {
     2106      m_numRefLayers[ iNuhLId ]  +=  m_recursiveRefLayerFlag[ iNuhLId ][ j ];
     2107    }
     2108  }
     2109
     2110
     2111  for( Int i = 0; i <= getMaxLayersMinus1(); i++ )  // Bug in spec "<" instead of "<="
     2112  {
     2113    Int iNuhLId = getLayerIdInNuh( i );
     2114    Int predIdx = 0;
     2115    for( Int j = iNuhLId + 1; j < 63; j++ )
     2116    {
     2117      if( m_recursiveRefLayerFlag[ j ][ iNuhLId ] )
     2118      {
     2119        m_predictedLayerId[ iNuhLId ][ predIdx++ ] = j;
     2120      }
     2121    }
     2122    m_numPredictedLayers[ iNuhLId ] = predIdx;
     2123  }
     2124 
     2125  Bool countedLayerIdxFlag[ MAX_NUM_LAYERS ];
     2126  for( Int i = 0; i  <=  getMaxLayersMinus1(); i++ )
     2127  {
     2128    countedLayerIdxFlag[ i ] = 0;
     2129  }
     2130 
     2131  for( Int i = 0, k = 0; i  <=  getMaxLayersMinus1(); i++ )
     2132  {
     2133    Int iNuhLId = getLayerIdInNuh( i );
     2134    if( m_numDirectRefLayers[ iNuhLId ]  ==  0 )
     2135    {
     2136      m_treePartitionLayerIdList[ k ][ 0 ] = iNuhLId;
     2137      m_numLayersInTreePartition[ k ]      = 1;
     2138      for( Int j = 0; j < m_numPredictedLayers[ iNuhLId ]; j++ ) 
     2139      {
     2140        if( !countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] )   
     2141        {
     2142          m_treePartitionLayerIdList[ k ][ m_numLayersInTreePartition[ k ] ] = m_predictedLayerId[ iNuhLId ][ j ];
     2143          m_numLayersInTreePartition[ k ]++;
     2144          countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] = 1;
     2145        }
     2146      }
     2147      k++;
     2148    }
     2149    m_numIndependentLayers = k;
     2150  }
     2151#endif
    19092152}
    19102153
     
    19362179    }
    19372180  }
     2181#if !BUG_FIX_TK65
    19382182  assert( foundLayerIdinNuh != -1 );
    1939 
     2183#endif
    19402184  return foundLayerIdinNuh;
    19412185}
     
    20702314Int    TComVPS::getNumOutputLayerSets()
    20712315{
    2072   return getNumAddOutputLayerSets() + getVpsNumLayerSetsMinus1() + 1;
     2316#if H_MV_HLS_8_SYN_39_19
     2317  return getNumAddOlss() + getNumLayerSets();
     2318#else
     2319  return getNumAddLayerSets() + getVpsNumLayerSetsMinus1() + 1;
     2320#endif
    20732321}
    20742322
     
    21262374Void TComVPS::deriveTargetLayerIdList( Int i )
    21272375
    2128   Int lsIdx = getLayerSetIdxForOutputLayerSet( i );     
     2376  Int lsIdx = olsIdxToLsIdx( i );     
    21292377 
    21302378  for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ )
     
    21362384    }
    21372385  } 
     2386#if H_MV_HLS_8_PMS_Q0165_18
     2387  assert( getNumOutputLayersInOutputLayerSet( i ) > 0 );
     2388#endif
    21382389}
    21392390
     
    21412392{
    21422393  Bool outputLayerFlag;
    2143   switch ( getDefaultTargetOutputLayerIdc( ) )
     2394  switch ( getDefaultOutputLayerIdc( ) )
    21442395  {
    21452396  case 0:
     
    21472398    break;
    21482399  case 1:
    2149     outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 ); 
     2400    outputLayerFlag = ( j == m_layerSetLayerIdList[ olsIdxToLsIdx( i ) ].size() - 1 ); 
    21502401    break;
    21512402  case 2:
     
    21692420{
    21702421  Int maxSLMinus1 = 0;
    2171   Int optLsIdx    = getLayerSetIdxForOutputLayerSet( i );
     2422#if H_MV_HLS_8_MIS_Q0102_30
     2423  for( Int k = 0; k < getNumLayersInIdList( i ); k++ )
     2424  {
     2425    Int lId = m_layerSetLayerIdList[i][k];
     2426#else 
     2427  Int optLsIdx    = olsIdxToLsIdx( i );
     2428
    21722429  for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )
    21732430  {
    21742431    Int lId = m_layerSetLayerIdList[optLsIdx][k];
     2432#endif
    21752433    maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) ));
    21762434  }
    21772435  return maxSLMinus1;
    21782436}
    2179 
     2437#if H_MV_HLS_8_RPS_Q0100_36
     2438Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder )
     2439{
     2440  for( Int j = 0; j <= getMaxSubLayersInLayerSetMinus1( 0 ); j++ )
     2441  {
     2442    Int maxDecPicBufferingMinus1 = sps->getMaxDecPicBuffering( j ) - 1;
     2443    Int numReorderPics           = sps->getNumReorderPics    ( j );
     2444    Int maxLatencyIncreasePlus1  = sps->getMaxLatencyIncrease( j );
     2445
     2446    if ( encoder )
     2447    {
     2448      assert( getDpbSize()->getMaxVpsDecPicBufferingMinus1(0, 0, j ) == maxDecPicBufferingMinus1 );
     2449      assert( getDpbSize()->getMaxVpsNumReorderPics       (0,    j ) == numReorderPics           );
     2450      assert( getDpbSize()->getMaxVpsLatencyIncreasePlus1 (0,    j ) == maxLatencyIncreasePlus1  );
     2451    }
     2452    else
     2453    {
     2454      getDpbSize()->setMaxVpsDecPicBufferingMinus1(0, 0, j, maxDecPicBufferingMinus1 );
     2455      getDpbSize()->setMaxVpsNumReorderPics       (0,    j, numReorderPics           );
     2456      getDpbSize()->setMaxVpsLatencyIncreasePlus1 (0,    j, maxLatencyIncreasePlus1  );       
     2457    }     
     2458  }
     2459}
     2460#endif
    21802461#endif // H_MV
    21812462
     
    22492530  ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag));
    22502531#if H_MV
    2251   m_spsExtensionFlag = false;
     2532#if !H_MV_HLS_8_SPS_NODOC_48
     2533  m_spsExtensionPresentFlag = false;
    22522534  for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )
    22532535  {
    22542536    m_spsExtensionTypeFlag[ i ] = false;
    22552537  }
     2538#else
     2539  m_spsRangeExtensionsFlag     = false;
     2540  m_spsMultilayerExtensionFlag = false;
     2541#if H_3D
     2542  m_spsExtension5bits          = 0;
     2543  m_sps3dExtensionFlag         = false;
     2544#else
     2545  m_spsExtension6bits          = 0;
     2546#endif
     2547#endif
     2548
    22562549  m_numScaledRefLayerOffsets = 0;
    22572550
     
    24332726
    24342727#if H_MV
     2728#if H_MV_HLS_8_SPS_NODOC_48
     2729  m_ppsRangeExtensionsFlag     = false;
     2730  m_ppsMultilayerExtensionFlag = false;
     2731#if !H_3D
     2732  m_ppsExtension6bits          = 0;
     2733#else
     2734  m_pps3dExtensionFlag         = false;
     2735  m_ppsExtension5bits          = 0;
     2736#endif
     2737#else
    24352738  for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )
    24362739  {
    24372740    m_ppsExtensionTypeFlag[ i ] = false;
    24382741  }
     2742#endif
    24392743#endif
    24402744}
     
    29623266Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 )
    29633267{
    2964   // Mark as shortterm
     3268  // Mark as short-term
    29653269  for ( Int i = 0; i < refPicSetInterLayer0.size(); i++ )
    29663270  {
     
    29743278
    29753279}
     3280
     3281#if !H_MV_HLS_8_DBP_NODOC_42
    29763282Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc )
    29773283{
     
    30283334  }
    30293335}
    3030 
     3336#endif
    30313337Void TComSlice::printRefPicList()
    30323338
     
    30453351Void TComSlice::markCurrPic( TComPic* currPic )
    30463352{
     3353
     3354#if !H_MV_HLS_8_DBP_NODOC_42
    30473355  if ( !currPic->getSlice(0)->getDiscardableFlag() )
    30483356  {
     3357#endif
    30493358    currPic->getSlice(0)->setReferenced( true ) ;
    30503359    currPic->setIsLongTerm( false );
     3360#if !H_MV_HLS_8_DBP_NODOC_42
    30513361  }
    30523362  else
     
    30543364    currPic->getSlice(0)->setReferenced( false ) ;
    30553365  }
     3366#endif
     3367
     3368#if H_MV_HLS_7_VPS_P0300_27
     3369  currPic->setReconMark( true );
     3370  currPic->setPicOutputFlag( currPic->getSlice(0)->getPicOutputFlag() );
     3371#endif
    30563372}
    30573373
     
    30873403  Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) );
    30883404
     3405#if H_MV_HLS_8_RPS_Q0060_17
     3406  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  && ( getTLayer() == 0  ) &&
     3407    ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );
     3408#else
    30893409  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  &&
    30903410    ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );
     3411#endif
    30913412
    30923413  return refLayerPicFlag;       
     
    39694290    }
    39704291  }
     4292
     4293  // ---------------
     4294  // To be added:
     4295  // 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
     4296  // 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,
     4297  // inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] for at least one value of j in the range of 1 to
     4298  // NumLayersInIdList[ h ] - 1, inclusive, shall be equal to 1.
     4299  // ---------------
     4300
     4301
     4302  // 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,
     4303  // 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
     4304  // NumLayersInIdList[ h ] − 1, inclusive.
     4305
     4306
     4307  if ( getNumBitstreamPartitions( h ) == 1 )
     4308  {
     4309    Bool atLeastOneZero = false;
     4310    for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ )
     4311    {
     4312      atLeastOneZero = atLeastOneZero || !getLayerInBspFlag( h, 0, j );
     4313    }   
     4314    assert( atLeastOneZero );
     4315  }
     4316
     4317 
     4318  // 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 ]
     4319  // shall be equal to 1 for at most one value of i in the range of 0 to num_bitstream_partitions[ h ] − 1, inclusive.
     4320
     4321  for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ )
     4322  {
     4323    Int numLayerInBsp = 0;
     4324    for ( Int i = 0; i <= getNumBitstreamPartitions( h ) - 1; i++ )
     4325    {
     4326      numLayerInBsp += ( getLayerInBspFlag( h, i, j ) ? 1 : 0 ); 
     4327    }   
     4328    assert( numLayerInBsp <= 1 );
     4329  }
     4330
    39714331}
    39724332
Note: See TracChangeset for help on using the changeset viewer.