Changeset 882 in 3DVCSoftware for branches/HTM-10.1-dev0/source/App/TAppEncoder
- Timestamp:
- 28 Mar 2014, 01:17:13 (11 years ago)
- 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 388 388 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 389 389 ("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_27391 390 ("DefaultTargetOutputLayerIdc" , m_defaultTargetOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 392 #else393 ("DefaultOneTargetOutputLayerFlag" , m_defaultOneTargetOutputLayerIdc , 0, "Output highest layer of layer sets by default")394 #endif395 391 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 396 392 397 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27398 393 ("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") 399 394 ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 400 #else401 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers")402 #endif403 395 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 404 396 … … 611 603 #if H_MV 612 604 613 // DBP Size614 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE615 ("SubLayerFlagInfoPresentFlag", m_subLayerFlagInfoPresentFlag , false , "SubLayerFlagInfoPresentFlag")616 #endif617 605 // VPS VUI 618 606 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 619 607 ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false , "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder 620 608 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 621 #if H_MV_HLS_7_MISC_P0068_21622 609 ("AllLayersIdrAlignedFlag" , m_allLayersIdrAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 623 #endif624 610 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 625 611 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") … … 735 721 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 736 722 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 737 #if H_MV_HLS_7_SEI_P0204_26738 723 ("SubBitstreamPropSEIEnabled", m_subBistreamPropSEIEnabled, false ,"Enable signaling of sub-bitstream property SEI message") 739 724 ("SEISubBitstreamNumAdditionalSubStreams", m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled") … … 743 728 ("SEISubBitstreamAvgBitRate", m_sbPropAvgBitRate, std::vector< Int >(1,0) ,"Specifies average bit rate of the i-th sub-bitstream") 744 729 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 745 #endif746 730 #if H_3D 747 731 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") … … 1430 1414 } 1431 1415 1432 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271433 1416 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." ); 1434 1417 … … 1461 1444 } 1462 1445 } 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 1466 1447 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" ); 1467 1448 … … 2245 2226 } 2246 2227 } 2247 #endif2248 #if H_MV_HLS_7_SEI_P0204_262249 2228 // Check input parameters for Sub-bitstream property SEI message 2250 2229 if( m_subBistreamPropSEIEnabled ) -
branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.h
r876 r882 89 89 Int m_vpsNumLayerSets; ///< Number of layer sets 90 90 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 91 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_2792 91 Int m_defaultTargetOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 93 #else94 Int m_defaultOneTargetOutputLayerIdc; ///< Output highest layer of layer sets by default when equal to 195 #endif96 92 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 97 93 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_2799 94 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 100 #endif101 95 std::vector<Int> m_profileLevelTierIdx; ///< Indices of of profile level tier 102 96 … … 104 98 std::vector< std::vector<Int> > m_directRefLayers; ///< LayerIds of direct reference layers 105 99 std::vector< std::vector<Int> > m_dependencyTypes; ///< Dependency types of direct reference layers 106 107 // DBP Size108 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE109 Bool m_subLayerFlagInfoPresentFlag;110 #endif111 100 112 101 // VPS VUI … … 114 103 Bool m_crossLayerPicTypeAlignedFlag; 115 104 Bool m_crossLayerIrapAlignedFlag; 116 #if H_MV_HLS_7_MISC_P0068_21117 105 Bool m_allLayersIdrAlignedFlag; 118 #endif119 106 Bool m_bitRatePresentVpsFlag; 120 107 Bool m_picRatePresentVpsFlag; … … 438 425 Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units 439 426 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_26427 #if H_MV 441 428 Bool m_subBistreamPropSEIEnabled; 442 429 Int m_sbPropNumAdditionalSubStreams; -
branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r881 r882 127 127 xSetRepFormat ( vps ); 128 128 xSetLayerSets ( vps ); 129 #if H_MV_HLS_7_FIX_SET_DPB_SIZE130 129 xSetDpbSize ( vps ); 131 #endif132 130 xSetVPSVUI ( vps ); 133 131 #if H_3D … … 427 425 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 428 426 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 429 #if H_MV _HLS_7_SEI_P0204_26427 #if H_MV 430 428 m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled ); 431 429 if( m_subBistreamPropSEIEnabled ) … … 1504 1502 } 1505 1503 1506 #if H_MV_HLS_7_FIX_SET_DPB_SIZE1507 1504 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1508 1505 { … … 1518 1515 Bool subLayerFlagInfoPresentFlag = false; 1519 1516 1520 #if H_MV_HLS_7_HRD_P0156_71521 1517 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1522 #else1523 for( Int j = 0; j <= vps.getMaxTLayers() - 1 ; j++ )1524 #endif1525 1518 { 1526 1519 Bool subLayerDpbInfoPresentFlag = false; 1527 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271528 1520 assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 1529 1521 for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ ) 1530 #else1531 assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );1532 for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )1533 #endif1534 1522 { 1535 1523 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); … … 1574 1562 } 1575 1563 } 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 1632 1565 1633 1566 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1635 1568 // Layer sets 1636 1569 vps.setVpsNumLayerSetsMinus1 ( m_vpsNumLayerSets - 1 ); 1637 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271638 vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );1639 #endif1640 1570 1641 1571 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) … … 1654 1584 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1655 1585 // Additional output layer sets + profileLevelTierIdx 1656 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271657 1586 vps.setDefaultTargetOutputLayerIdc ( m_defaultTargetOutputLayerIdc ); 1658 1587 vps.setNumAddOutputLayerSets ( numAddOuputLayerSets ); 1659 1588 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 1667 1590 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++) 1668 1591 { … … 1714 1637 vps.setAltOutputLayerFlag( olsIdx , false); 1715 1638 } 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 1755 1640 } 1756 1641 … … 1759 1644 vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag ); 1760 1645 1761 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1762 1646 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( ); 1763 1647 assert( pcVPSVUI ); 1764 #endif1765 1648 1766 1649 if ( m_vpsVuiPresentFlag ) 1767 1650 { 1768 #if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1769 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( );1770 1771 assert( pcVPSVUI );1772 #endif1773 1774 1651 // All this stuff could actually be derived by the encoder, 1775 1652 // however preliminary setting it from input parameters … … 1777 1654 pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag ); 1778 1655 pcVPSVUI->setCrossLayerIrapAlignedFlag ( m_crossLayerIrapAlignedFlag ); 1779 #if H_MV_HLS_7_MISC_P0068_211780 1656 pcVPSVUI->setAllLayersIdrAlignedFlag ( m_allLayersIdrAlignedFlag ); 1781 #endif1782 1657 pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag ); 1783 1658 pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag ); … … 1785 1660 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1786 1661 { 1787 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271788 1662 for( Int i = 0; i <= vps.getVpsNumLayerSetsMinus1(); i++ ) 1789 #else1790 for( Int i = 0; i <= vps.getVpsNumberLayerSetsMinus1(); i++ )1791 #endif1792 1663 { 1793 1664 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) … … 1907 1778 pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD 1908 1779 } 1909 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1910 1780 else 1911 1781 { 1912 1782 pcVPSVUI->setCrossLayerIrapAlignedFlag ( false ); 1913 1783 } 1914 #endif1915 1784 } 1916 1785 #endif
Note: See TracChangeset for help on using the changeset viewer.