Ignore:
Timestamp:
8 Jul 2015, 03:34:13 (9 years ago)
Author:
seregin
Message:

macro cleanup: VPS_VUI_BSP_HRD_PARAMS, R0227_VUI_BSP_HRD_FLAG

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1182 r1185  
    15951595  vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch);
    15961596
    1597   for (Int k = 0; k < MAX_VPS_LAYER_SETS_PLUS1; k++)
     1597  for( Int k = 0; k < MAX_VPS_LAYER_SETS_PLUS1; k++ )
    15981598  {
    15991599    vps->setAltOuputLayerFlag( k, m_altOutputLayerFlag );
    16001600  }
    16011601
    1602 #if VPS_VUI_BSP_HRD_PARAMS
     1602  // VPS VUI BSP HRD parameters
    16031603  vps->setVpsVuiBspHrdPresentFlag(false);
    16041604  TEncTop *pcCfg = &m_acTEncTop[0];
     
    16401640
    16411641    // Signalling of additional partitioning schemes
    1642     for(Int h = 1; h < vps->getNumOutputLayerSets(); h++)
     1642    for( Int h = 1; h < vps->getNumOutputLayerSets(); h++ )
    16431643    {
    16441644      Int lsIdx = vps->getOutputLayerSetIdx( h );
     
    16781678    }
    16791679  }
    1680 #else
    1681 
    1682 #if O0164_MULTI_LAYER_HRD
    1683   vps->setVpsVuiBspHrdPresentFlag(false);
    1684   TEncTop *pcCfg = &m_acTEncTop[0];
    1685   if( pcCfg->getBufferingPeriodSEIEnabled() )
    1686   {
    1687     vps->setVpsVuiBspHrdPresentFlag(true);
    1688     vps->setVpsNumBspHrdParametersMinus1(vps->getVpsNumLayerSetsMinus1() - 1);
    1689     vps->createBspHrdParamBuffer(vps->getVpsNumBspHrdParametersMinus1() + 1);
    1690     for ( i = 0; i <= vps->getVpsNumBspHrdParametersMinus1(); i++ )
    1691     {
    1692       vps->setBspCprmsPresentFlag(i, true);
    1693 
    1694       UInt layerId = i + 1;
    1695       TEncTop *pcCfgLayer = &m_acTEncTop[layerId];
    1696 
    1697       Int iPicWidth         = pcCfgLayer->getSourceWidth();
    1698       Int iPicHeight        = pcCfgLayer->getSourceHeight();
    1699 #if LAYER_CTB
    1700       UInt uiWidthInCU       = ( iPicWidth  % m_acLayerCfg[layerId].m_uiMaxCUWidth  ) ? iPicWidth  / m_acLayerCfg[layerId].m_uiMaxCUWidth  + 1 : iPicWidth  / m_acLayerCfg[layerId].m_uiMaxCUWidth;
    1701       UInt uiHeightInCU      = ( iPicHeight % m_acLayerCfg[layerId].m_uiMaxCUHeight ) ? iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight + 1 : iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight;
    1702 #else
    1703       UInt uiWidthInCU       = ( iPicWidth %m_uiMaxCUWidth  ) ? iPicWidth /m_uiMaxCUWidth  + 1 : iPicWidth /m_uiMaxCUWidth;
    1704       UInt uiHeightInCU      = ( iPicHeight%m_uiMaxCUHeight ) ? iPicHeight/m_uiMaxCUHeight + 1 : iPicHeight/m_uiMaxCUHeight;
    1705 #endif
    1706       UInt uiNumCUsInFrame   = uiWidthInCU * uiHeightInCU;
    1707 
    1708 #if LAYER_CTB
    1709       UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_acLayerCfg[layerId].m_uiMaxCUDepth << 1);
    1710 #else
    1711       UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_uiMaxCUDepth << 1);
    1712 #endif
    1713       UInt numDU = ( pcCfgLayer->getSliceMode() == 1 ) ? ( uiNumCUsInFrame / maxCU ) : ( 0 );
    1714       if( uiNumCUsInFrame % maxCU != 0 || numDU == 0 )
    1715       {
    1716         numDU ++;
    1717       }
    1718       vps->getBspHrd(i)->setNumDU( numDU );
    1719       vps->setBspHrdParameters( i, pcCfgLayer->getFrameRate(), numDU, pcCfgLayer->getTargetBitrate(), ( pcCfgLayer->getIntraPeriod() > 0 ) );
    1720     }
    1721     for (UInt h = 1; h <= vps->getVpsNumLayerSetsMinus1(); h++)
    1722     {
    1723       vps->setNumBitstreamPartitions(h, 1);
    1724       for( i = 0; i < vps->getNumBitstreamPartitions(h); i++ )
    1725       {
    1726         for( UInt j = 0; j <= (vps->getMaxLayers()-1); j++ )
    1727         {
    1728           if (vps->getLayerIdIncludedFlag(h, j) && h == j)
    1729           {
    1730             vps->setLayerInBspFlag(h, i, j, true);
    1731           }
    1732         }
    1733       }
    1734       vps->setNumBspSchedCombinations(h, 1);
    1735       for( i = 0; i < vps->getNumBspSchedCombinations(h); i++ )
    1736       {
    1737         for( UInt j = 0; j < vps->getNumBitstreamPartitions(h); j++ )
    1738         {
    1739           vps->setBspCombHrdIdx(h, i, j, 0);
    1740           vps->setBspCombSchedIdx(h, i, j, 0);
    1741         }
    1742       }
    1743     }
    1744   }
    1745 #endif
    1746 #endif
    1747 
    17481680#else //SVC_EXTENSION
    17491681  m_cTEncTop.init(isFieldCoding);
Note: See TracChangeset for help on using the changeset viewer.