Changeset 882 in 3DVCSoftware for branches/HTM-10.1-dev0/source/App/TAppEncoder


Ignore:
Timestamp:
28 Mar 2014, 01:17:13 (11 years ago)
Author:
tech
Message:

Cleanups part 7.

Location:
branches/HTM-10.1-dev0/source/App/TAppEncoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r876 r882  
    388388  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
    389389  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
    390 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    391390  ("DefaultTargetOutputLayerIdc"     , m_defaultTargetOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
    392 #else
    393   ("DefaultOneTargetOutputLayerFlag"  , m_defaultOneTargetOutputLayerIdc  , 0, "Output highest layer of layer sets by default")
    394 #endif
    395391  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 
    396392
    397 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    398393  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 
    399394  ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 
    400 #else
    401   ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 
    402 #endif
    403395  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
    404396 
     
    611603#if H_MV
    612604
    613   // DBP Size
    614 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE
    615   ("SubLayerFlagInfoPresentFlag",  m_subLayerFlagInfoPresentFlag , false                                           , "SubLayerFlagInfoPresentFlag")
    616 #endif
    617605  // VPS VUI
    618606  ("VpsVuiPresentFlag"           , m_vpsVuiPresentFlag           , false                                           , "VpsVuiPresentFlag           ")
    619607  ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false                                           , "CrossLayerPicTypeAlignedFlag")  // Could actually be derived by the encoder
    620608  ("CrossLayerIrapAlignedFlag"   , m_crossLayerIrapAlignedFlag   , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
    621 #if H_MV_HLS_7_MISC_P0068_21
    622609  ("AllLayersIdrAlignedFlag"     , m_allLayersIdrAlignedFlag     , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
    623 #endif
    624610  ("BitRatePresentVpsFlag"       , m_bitRatePresentVpsFlag       , false                                           , "BitRatePresentVpsFlag       ")
    625611  ("PicRatePresentVpsFlag"       , m_picRatePresentVpsFlag       , false                                           , "PicRatePresentVpsFlag       ")
     
    735721  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
    736722  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
    737 #if H_MV_HLS_7_SEI_P0204_26
    738723  ("SubBitstreamPropSEIEnabled",              m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
    739724  ("SEISubBitstreamNumAdditionalSubStreams",  m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled")
     
    743728  ("SEISubBitstreamAvgBitRate",               m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
    744729  ("SEISubBitstreamMaxBitRate",               m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
    745 #endif
    746730#if H_3D
    747731  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
     
    14301414  }
    14311415
    1432 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14331416  xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 
    14341417
     
    14611444    }
    14621445  }
    1463 #else
    1464   xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" );
    1465 #endif
     1446
    14661447  xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
    14671448
     
    22452226  }
    22462227  }
    2247 #endif
    2248 #if H_MV_HLS_7_SEI_P0204_26
    22492228  // Check input parameters for Sub-bitstream property SEI message
    22502229  if( m_subBistreamPropSEIEnabled )
  • branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r876 r882  
    8989  Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
    9090  std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set
    91 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    9291  Int                    m_defaultTargetOutputLayerIdc;       ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
    93 #else
    94   Int                    m_defaultOneTargetOutputLayerIdc;    ///< Output highest layer of layer sets by default when equal to 1
    95 #endif
    9692  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
    9793  std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
    98 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    9994  std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
    100 #endif
    10195  std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
    10296 
     
    10498  std::vector< std::vector<Int> > m_directRefLayers;          ///< LayerIds of direct reference layers
    10599  std::vector< std::vector<Int> > m_dependencyTypes;          ///< Dependency types of direct reference layers
    106 
    107   // DBP Size
    108 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE
    109   Bool m_subLayerFlagInfoPresentFlag;
    110 #endif
    111100
    112101  // VPS VUI
     
    114103  Bool m_crossLayerPicTypeAlignedFlag;
    115104  Bool m_crossLayerIrapAlignedFlag;
    116 #if H_MV_HLS_7_MISC_P0068_21
    117105  Bool m_allLayersIdrAlignedFlag;
    118 #endif
    119106  Bool m_bitRatePresentVpsFlag;
    120107  Bool m_picRatePresentVpsFlag;
     
    438425  Int       m_log2MaxMvLengthHorizontal;                      ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units
    439426  Int       m_log2MaxMvLengthVertical;                        ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
    440 #if H_MV_HLS_7_SEI_P0204_26
     427#if H_MV
    441428  Bool              m_subBistreamPropSEIEnabled;
    442429  Int               m_sbPropNumAdditionalSubStreams;
  • branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r881 r882  
    127127  xSetRepFormat            ( vps );
    128128  xSetLayerSets            ( vps );
    129 #if H_MV_HLS_7_FIX_SET_DPB_SIZE
    130129  xSetDpbSize              ( vps );
    131 #endif
    132130  xSetVPSVUI               ( vps );
    133131#if H_3D
     
    427425  m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
    428426  m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
    429 #if H_MV_HLS_7_SEI_P0204_26
     427#if H_MV
    430428  m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled );
    431429  if( m_subBistreamPropSEIEnabled )
     
    15041502}
    15051503
    1506 #if H_MV_HLS_7_FIX_SET_DPB_SIZE
    15071504Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
    15081505{
     
    15181515    Bool subLayerFlagInfoPresentFlag = false;
    15191516
    1520 #if H_MV_HLS_7_HRD_P0156_7
    15211517    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1522 #else
    1523     for( Int j = 0; j  <=  vps.getMaxTLayers() - 1 ; j++ )
    1524 #endif
    15251518    {   
    15261519      Bool subLayerDpbInfoPresentFlag = false;
    1527 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    15281520      assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() );
    15291521      for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ )   
    1530 #else
    1531       assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );
    1532       for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
    1533 #endif
    15341522      {
    15351523        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
     
    15741562  } 
    15751563}
    1576 #else
    1577 Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
    1578 {
    1579   // These settings need to be verified
    1580 
    1581   TComDpbSize* dpbSize = vps.getDpbSize();
    1582 
    1583   assert ( dpbSize != 0 );
    1584 
    1585   for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
    1586   { 
    1587     std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    1588     dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag );
    1589     if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) )
    1590     {
    1591       for( Int j = 0; j  <=  vps.getMaxTLayers() - 1 ; j++ )
    1592       {   
    1593         Int maxNumReorderPics  = MIN_INT;
    1594         Int maxDecPicBuffering = MIN_INT;
    1595         Int maxLatencyIncrease = MIN_INT;
    1596 
    1597         Int prevMaxNumReorderPics  = MIN_INT;
    1598         Int prevMaxDecPicBuffering = MIN_INT;
    1599         Int prevMaxLatencyIncrease = MIN_INT;
    1600 
    1601         assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );
    1602         for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
    1603         {
    1604           Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
    1605           dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );
    1606         }       
    1607 
    1608         for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ )
    1609         {
    1610           Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] );
    1611           maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] );
    1612         }
    1613         assert( maxNumReorderPics != MIN_INT );
    1614         dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics );
    1615 
    1616         // To Be Done !
    1617         // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode );
    1618 
    1619         if( j > 0 ) 
    1620         {
    1621           dpbSize->setSubLayerDpbInfoPresentFlag( i, j, prevMaxDecPicBuffering == maxDecPicBuffering && prevMaxLatencyIncrease == maxLatencyIncrease && prevMaxNumReorderPics == maxNumReorderPics );
    1622         }       
    1623 
    1624         prevMaxNumReorderPics   = maxNumReorderPics;
    1625         prevMaxDecPicBuffering  = maxDecPicBuffering;
    1626         prevMaxLatencyIncrease  = maxLatencyIncrease;
    1627       } 
    1628     } 
    1629   } 
    1630 }
    1631 #endif
     1564
    16321565
    16331566Void TAppEncTop::xSetLayerSets( TComVPS& vps )
     
    16351568  // Layer sets
    16361569  vps.setVpsNumLayerSetsMinus1   ( m_vpsNumLayerSets - 1 );
    1637 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1638   vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );
    1639 #endif
    16401570   
    16411571  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     
    16541584  Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size();
    16551585  // Additional output layer sets + profileLevelTierIdx
    1656 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    16571586  vps.setDefaultTargetOutputLayerIdc      ( m_defaultTargetOutputLayerIdc );   
    16581587  vps.setNumAddOutputLayerSets            ( numAddOuputLayerSets          );
    16591588  vps.initTargetLayerIdLists();
    1660 #else
    1661   vps.setDefaultOneTargetOutputLayerIdc   ( m_defaultOneTargetOutputLayerIdc );
    1662   vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
    1663   vps.setNumAddOutputLayerSetsMinus1       ( numAddOuputLayerSets - 1        );
    1664 #endif
    1665 
    1666 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1589
    16671590  for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++)
    16681591  {
     
    17141637    vps.setAltOutputLayerFlag( olsIdx , false);     
    17151638  }
    1716 #else
    1717   for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
    1718   {
    1719     if ( lsIdx > 0 )
    1720     {
    1721       vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] );
    1722     } 
    1723 
    1724     vps.setOutputLayerSetIdxMinus1( lsIdx, lsIdx - 1 );
    1725 
    1726     for (Int i = 0; i < m_layerIdsInSets[ lsIdx ].size(); i++ )
    1727     {
    1728       vps.setOutputLayerFlag( lsIdx, i, vps.inferOutputLayerFlag( lsIdx, i ));       
    1729     }
    1730   }
    1731 
    1732   for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ )
    1733   {
    1734     vps.setProfileLevelTierIdx( m_vpsNumLayerSets + addOutLs, m_profileLevelTierIdx[ addOutLs ] );
    1735 
    1736     Int refLayerSetIdx = m_outputLayerSetIdx[ addOutLs ];     
    1737     vps.setOutputLayerSetIdxMinus1( m_vpsNumLayerSets + addOutLs, refLayerSetIdx - 1 );
    1738 
    1739     for (Int i = 0; i < m_layerIdsInSets[ refLayerSetIdx].size(); i++ )
    1740     {
    1741       Bool outputLayerFlag = false;
    1742       for (Int j = 0; j < m_layerIdsInAddOutputLayerSet[ addOutLs ].size(); j++ )
    1743       {
    1744         if (  m_layerIdsInAddOutputLayerSet[addOutLs][ j ] == m_layerIdsInSets[ refLayerSetIdx][ i ] )
    1745         {
    1746           outputLayerFlag = true;
    1747           break;
    1748         }
    1749       }
    1750       vps.setOutputLayerFlag( m_vpsNumLayerSets + addOutLs, i, outputLayerFlag );       
    1751     }
    1752   }
    1753   vps.deriveTargetLayerIdLists();
    1754 #endif
     1639
    17551640}
    17561641
     
    17591644  vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag );
    17601645
    1761 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    17621646  TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
    17631647  assert( pcVPSVUI );
    1764 #endif
    17651648
    17661649  if ( m_vpsVuiPresentFlag )
    17671650  {
    1768 #if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    1769     TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
    1770 
    1771     assert( pcVPSVUI );
    1772 #endif
    1773 
    17741651    // All this stuff could actually be derived by the encoder,
    17751652    // however preliminary setting it from input parameters
     
    17771654    pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag );
    17781655    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( m_crossLayerIrapAlignedFlag    );
    1779 #if H_MV_HLS_7_MISC_P0068_21
    17801656    pcVPSVUI->setAllLayersIdrAlignedFlag     ( m_allLayersIdrAlignedFlag      );
    1781 #endif
    17821657    pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag );
    17831658    pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag );
     
    17851660    if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    17861661    {
    1787 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    17881662      for( Int i = 0; i  <=  vps.getVpsNumLayerSetsMinus1(); i++ )
    1789 #else
    1790       for( Int i = 0; i  <=  vps.getVpsNumberLayerSetsMinus1(); i++ )
    1791 #endif
    17921663      {
    17931664        for( Int j = 0; j  <=  vps.getMaxTLayers(); j++ )
     
    19071778    pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD
    19081779  }
    1909 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    19101780  else
    19111781  {
    19121782    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( false   );
    19131783  }
    1914 #endif
    19151784}
    19161785#endif
Note: See TracChangeset for help on using the changeset viewer.