Ignore:
Timestamp:
13 Feb 2014, 22:58:51 (10 years ago)
Author:
tech
Message:

Integrated following MV-HEVC HLS 7 items:

H_MV_HLS7_GEN Stub for further integrations (not tested)
H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
Output layer sets, various

(VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt.
(VPS/P0156/Num of output_layer_flag) #10 Proposal 3: The output_layer_flag[ i ][ j ] is signalled for j equal to 0 to NumLayersInIdList[ lsIdx ] inclusive. It was remarked that we might be able to just assume that the top layer is always output; however, this was not entirely clear , so the safe thing to do may be to also send the flag for this layer.
(VPS/P0295/Default output layer sets) #5 Discussion from (P0110). Decision: Three-state approach (text in P0295, decoder shall allow 3 to be present and shall treat 3 the same as the value 2).

H_MV_HLS_7_HRD_P0156_7 (HRD/P0156/MaxSubLayersInLayerSetMinus1) #7 Proposal 1: signal, in the VPS extension, the DPB parameters for an output layer set for sub-DPBs only up to the maximum temporal sub-layers in the corresponding layer set
H_MV_HLS_7_VPS_P0048_14
(VPS/P0048/profile_ref_minus1 rem) #14 Remove profile_ref_minus1 from the VPS extension, from JCTVC-P0048
H_MV_HLS_7_VPS_P0076_15 (VPS/P0076/video signal info move) #15 Move video signal information syntax structure earlier in the VPS VUI.
H_MV_HLS_7_SPS_P0155_16_32
(SPS/P0155/sps_sub_layer_ordering_info) #16, #32 Not signal the sps_max_num_reorder_pics[], sps_max_latency_increase_plus1[], and sps_max_dec_pic_buffering_minus1[] syntax elements in the SPS when nuh_layer_id > 0.
H_MV_HLS_7_GEN_P0166_PPS_EXTENSION (GEN/P0166/pps_extension) #17 Add PPS extension type flags for conditional presence of syntax extensions per extension type, aligned with the SPS extension type flags, from JCTVC-P0166. Further align the SPS extension type flags syntax between RExt and MV-HEVC/SHVC
H_MV_HLS_7_FIX_SET_DPB_SIZE
Fix derivation dpb size parameters
H_MV_HLS_7_RESERVED_FLAGS Added flags

(SPS/P0312/SHVC reserved flag) The flag will be used for the syntax vert_phase_position_enable_flag in SHVC draft
(VPS/O0215/SHVC reserved flag): this flag will be used for the syntax cross_layer_phase_alignment_flag in SHVC draft.
(VPS VUI/O0199,P0312/SHVC reserved flags) the 3 reserved bits will be used for the syntaxes single_layer_for_non_irap_flag, higher_layer_irap_skip_flag and vert_phase_position_not_in_use_flag in SHVC draft.

H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO Discard VPS with nuh_layer_Id > 0
H_MV_HLS_7_MISC_P0130_EOS
(MISC/P0130/EOS NAL layer id) #19 Require that end of bitstream NAL unit shall have nuh_layer_id equal to 0, from JCTVC-P0130. Decoders shall allow an end of bitstream NAL unit with nuh_layer_id > 0 to be present, and shall ignore the NAL unit.
H_MV_HLS_7_MISC_P0182_13 (MISC/P0182/BL PS Compatibility flag) #13 Define the flag (in VPS VUI) with the proposed semantics, without specifying an associated extraction process. Editors to select the position in the VPS VUI.
H_MV_HLS_7_MISC_P0068_21
(MISC/P0068/all irap idr flag) #21 Add flag in VUI to indicate that all IRAP pictures are IDRs and that all layer pictures in an AU are IDR aligned, from JCTVC-P0068 proposal 1.
H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG Fix inference of cross_layer_irap_aligned_flag
H_MV_HLS_7_MISC_P0079_18
(MISC/P0079/NumActiveRefLayerPics) #18 Modification of derivation of variable NumActiveRefLayerPics.

File:
1 edited

Legend:

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

    r852 r854  
    127127  xSetRepFormat            ( vps );
    128128  xSetLayerSets            ( vps );
     129#if H_MV_HLS_7_FIX_SET_DPB_SIZE
     130  xSetDpbSize              ( vps );
     131#endif
    129132  xSetVPSVUI               ( vps );
    130133#if H_3D
     
    14911494}
    14921495
     1496#if H_MV_HLS_7_FIX_SET_DPB_SIZE
     1497Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
     1498{
     1499  // These settings need to be verified
     1500
     1501  TComDpbSize* dpbSize = vps.getDpbSize();
     1502
     1503  assert ( dpbSize != 0 );
     1504
     1505  for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
     1506  { 
     1507    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
     1508    Bool subLayerFlagInfoPresentFlag = false;
     1509
     1510#if H_MV_HLS_7_HRD_P0156_7
     1511    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
     1512#else
     1513    for( Int j = 0; j  <=  vps.getMaxTLayers() - 1 ; j++ )
     1514#endif
     1515    {   
     1516      Bool subLayerDpbInfoPresentFlag = false;
     1517#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1518      assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() );
     1519      for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ )   
     1520#else
     1521      assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );
     1522      for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
     1523#endif
     1524      {
     1525        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
     1526#if H_MV_HLS7_GEN
     1527        // TBD. Some derivation based on output layer set might be added here.
     1528#endif
     1529        dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );
     1530        if ( j > 0 )
     1531        {
     1532          subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) );
     1533        }
     1534      }       
     1535
     1536      Int maxNumReorderPics = MIN_INT;
     1537      for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ )
     1538      {
     1539        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] );
     1540        maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] );
     1541      }
     1542      assert( maxNumReorderPics != MIN_INT );
     1543
     1544      dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics );
     1545      if ( j > 0 )
     1546      {
     1547        subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsNumReorderPics( i, j ) != dpbSize->getMaxVpsNumReorderPics( i, j - 1 ) );
     1548      }
     1549
     1550      // To Be Done !
     1551      // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, xx );
     1552      if ( j > 0 )
     1553      {
     1554        subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ) != dpbSize->getMaxVpsLatencyIncreasePlus1( i, j - 1  ) );
     1555      }
     1556
     1557      if( j > 0 ) 
     1558      {
     1559        dpbSize->setSubLayerDpbInfoPresentFlag( i, j, subLayerDpbInfoPresentFlag );
     1560        subLayerFlagInfoPresentFlag = subLayerFlagInfoPresentFlag || subLayerDpbInfoPresentFlag;
     1561      }       
     1562    } 
     1563    dpbSize->setSubLayerFlagInfoPresentFlag( i, subLayerFlagInfoPresentFlag );
     1564  } 
     1565}
     1566#else
    14931567Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
    14941568{
     
    15031577    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    15041578    dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag );
    1505 
    15061579    if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) )
    15071580    {
     
    15461619  } 
    15471620}
    1548 
     1621#endif
    15491622
    15501623Void TAppEncTop::xSetLayerSets( TComVPS& vps )
     
    15521625  // Layer sets
    15531626  vps.setVpsNumLayerSetsMinus1   ( m_vpsNumLayerSets - 1 );
     1627#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    15541628  vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );
     1629#endif
    15551630   
    15561631  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     
    15691644  Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size();
    15701645  // Additional output layer sets + profileLevelTierIdx
     1646#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1647  vps.setDefaultTargetOutputLayerIdc      ( m_defaultTargetOutputLayerIdc );   
     1648  vps.setNumAddOutputLayerSets            ( numAddOuputLayerSets          );
     1649  vps.initTargetLayerIdLists();
     1650#else
    15711651  vps.setDefaultOneTargetOutputLayerIdc   ( m_defaultOneTargetOutputLayerIdc );
    15721652  vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
    15731653  vps.setNumAddOutputLayerSetsMinus1       ( numAddOuputLayerSets - 1        );
    1574 
    1575 
    1576 
     1654#endif
     1655
     1656#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1657  for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++)
     1658  {
     1659    Int addOutLsIdx = olsIdx - m_vpsNumLayerSets;     
     1660   
     1661    vps.setOutputLayerSetIdxMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ?  olsIdx  : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 );
     1662
     1663    std::vector<Int>& layerIdList    = m_layerIdsInSets[ vps.getLayerSetIdxForOutputLayerSet( olsIdx ) ];
     1664
     1665    if (vps.getDefaultTargetOutputLayerIdc() == 2 || addOutLsIdx >= 0 )
     1666    {
     1667      for ( Int i = 0; i < layerIdList.size(); i++)
     1668      {
     1669        vps.setOutputLayerFlag( olsIdx, i, ( olsIdx == 0 && i == 0 ) ? vps.inferOutputLayerFlag(olsIdx, i ) : false ); // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred for this case !
     1670      }
     1671
     1672      std::vector<Int>& outLayerIdList = ( addOutLsIdx >= 0 ) ? m_layerIdsInAddOutputLayerSet[addOutLsIdx] : m_layerIdsInDefOutputLayerSet[olsIdx];
     1673
     1674      Bool outputLayerInLayerSetFlag = false;
     1675      for (Int j = 0; j < outLayerIdList.size(); j++)
     1676      {   
     1677        for (Int i = 0; i < layerIdList.size(); i++ )
     1678        {
     1679          if ( layerIdList[ i ] == outLayerIdList[ j ] )
     1680          {
     1681            vps.setOutputLayerFlag( olsIdx, i, true );       
     1682            outputLayerInLayerSetFlag = true;
     1683            break;
     1684          }
     1685        }
     1686        assert( outputLayerInLayerSetFlag ); // The output layer is not not in the layer set.
     1687      }
     1688    }
     1689    else
     1690    {
     1691      for ( Int i = 0; i < layerIdList.size(); i++)
     1692      {
     1693        vps.setOutputLayerFlag( olsIdx, i, vps.inferOutputLayerFlag( olsIdx, i ) );       
     1694      }
     1695    }
     1696
     1697    vps.deriveTargetLayerIdList(  olsIdx );
     1698
     1699    if ( olsIdx > 0 )
     1700    {
     1701      vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] );
     1702    }
     1703
     1704    vps.setAltOutputLayerFlag( olsIdx , false);     
     1705  }
     1706#else
    15771707  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
    15781708  {
     
    16121742  }
    16131743  vps.deriveTargetLayerIdLists();
     1744#endif
    16141745}
    16151746
     
    16181749  vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag );
    16191750
     1751#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
     1752  TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
     1753  assert( pcVPSVUI );
     1754#endif
     1755
    16201756  if ( m_vpsVuiPresentFlag )
    16211757  {
     1758#if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    16221759    TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
    16231760
    16241761    assert( pcVPSVUI );
    1625 
     1762#endif
    16261763
    16271764    // All this stuff could actually be derived by the encoder,
     
    16301767    pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag );
    16311768    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( m_crossLayerIrapAlignedFlag    );
    1632 
     1769#if H_MV_HLS_7_MISC_P0068_21
     1770    pcVPSVUI->setAllLayersIdrAlignedFlag     ( m_allLayersIdrAlignedFlag      );
     1771#endif
    16331772    pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag );
    16341773    pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag );
     
    16361775    if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    16371776    {
     1777#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1778      for( Int i = 0; i  <=  vps.getVpsNumLayerSetsMinus1(); i++ )
     1779#else
    16381780      for( Int i = 0; i  <=  vps.getVpsNumberLayerSetsMinus1(); i++ )
     1781#endif
    16391782      {
    16401783        for( Int j = 0; j  <=  vps.getMaxTLayers(); j++ )
     
    17541897    pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD
    17551898  }
     1899#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
     1900  else
     1901  {
     1902    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( false   );
     1903  }
     1904#endif
    17561905}
    17571906#endif
Note: See TracChangeset for help on using the changeset viewer.