Changeset 894 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder
- Timestamp:
- 26 Sep 2014, 03:22:40 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r884 r894 1734 1734 #endif 1735 1735 1736 #if VPS_VUI_BSP_HRD_PARAMS 1737 vps->setVpsVuiBspHrdPresentFlag(false); 1738 TEncTop *pcCfg = &m_acTEncTop[0]; 1739 if( pcCfg->getBufferingPeriodSEIEnabled() ) 1740 { 1741 vps->setVpsVuiBspHrdPresentFlag(true); 1742 vps->setVpsNumAddHrdParams( vps->getMaxLayers() ); 1743 vps->createBspHrdParamBuffer(vps->getVpsNumAddHrdParams() + 1); 1744 for(Int i = vps->getNumHrdParameters(), j = 0; i < vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams(); i++, j++) 1745 { 1746 vps->setCprmsAddPresentFlag( j, true ); 1747 vps->setNumSubLayerHrdMinus1( j, vps->getMaxTLayers() - 1 ); 1748 1749 UInt layerId = j; 1750 TEncTop *pcCfgLayer = &m_acTEncTop[layerId]; 1751 1752 Int iPicWidth = pcCfgLayer->getSourceWidth(); 1753 Int iPicHeight = pcCfgLayer->getSourceHeight(); 1754 #if LAYER_CTB 1755 UInt uiWidthInCU = ( iPicWidth % m_acLayerCfg[layerId].m_uiMaxCUWidth ) ? iPicWidth / m_acLayerCfg[layerId].m_uiMaxCUWidth + 1 : iPicWidth / m_acLayerCfg[layerId].m_uiMaxCUWidth; 1756 UInt uiHeightInCU = ( iPicHeight % m_acLayerCfg[layerId].m_uiMaxCUHeight ) ? iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight + 1 : iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight; 1757 UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_acLayerCfg[layerId].m_uiMaxCUDepth << 1); 1758 #else 1759 UInt uiWidthInCU = ( iPicWidth %m_uiMaxCUWidth ) ? iPicWidth /m_uiMaxCUWidth + 1 : iPicWidth /m_uiMaxCUWidth; 1760 UInt uiHeightInCU = ( iPicHeight%m_uiMaxCUHeight ) ? iPicHeight/m_uiMaxCUHeight + 1 : iPicHeight/m_uiMaxCUHeight; 1761 UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_uiMaxCUDepth << 1); 1762 #endif 1763 UInt uiNumCUsInFrame = uiWidthInCU * uiHeightInCU; 1764 1765 UInt numDU = ( pcCfgLayer->getSliceMode() == 1 ) ? ( uiNumCUsInFrame / maxCU ) : ( 0 ); 1766 if( uiNumCUsInFrame % maxCU != 0 || numDU == 0 ) 1767 { 1768 numDU ++; 1769 } 1770 vps->getBspHrd(i)->setNumDU( numDU ); 1771 vps->setBspHrdParameters( i, pcCfgLayer->getFrameRate(), numDU, pcCfgLayer->getTargetBitrate(), ( pcCfgLayer->getIntraPeriod() > 0 ) ); 1772 } 1773 1774 // Signalling of additional partitioning schemes 1775 for(Int h = 1; h < vps->getNumOutputLayerSets(); h++) 1776 { 1777 Int lsIdx = vps->getOutputLayerSetIdx( h ); 1778 vps->setNumSignalledPartitioningSchemes(h, 1); // Only the default per-layer partitioning scheme 1779 for(Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h); j++) 1780 { 1781 // ToDo: Add code for additional partitioning schemes here 1782 // ToDo: Initialize num_partitions_in_scheme_minus1 and layer_included_in_partition_flag 1783 } 1784 1785 for(Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h); i++) 1786 { 1787 if( i == 0 ) 1788 { 1789 for(Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1( lsIdx ); t++) 1790 { 1791 vps->setNumBspSchedulesMinus1( h, i, t, 0 ); 1792 for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ ) 1793 { 1794 for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++ ) 1795 { 1796 // Only for the default partition 1797 Int nuhlayerId = vps->getLayerSetLayerIdList( lsIdx, k); 1798 Int layerIdxInVps = vps->getLayerIdInVps( nuhlayerId ); 1799 vps->setBspHrdIdx(h, i, t, j, k, layerIdxInVps + vps->getNumHrdParameters()); 1800 1801 vps->setBspSchedIdx(h, i, t, j, k, 0); 1802 } 1803 } 1804 } 1805 } 1806 else 1807 { 1808 assert(0); // Need to add support for additional partitioning schemes. 1809 } 1810 } 1811 } 1812 } 1813 #else 1814 1736 1815 #if O0164_MULTI_LAYER_HRD 1737 1816 vps->setVpsVuiBspHrdPresentFlag(false); … … 1805 1884 } 1806 1885 } 1886 #endif 1807 1887 #endif 1808 1888
Note: See TracChangeset for help on using the changeset viewer.