Changeset 884 in 3DVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 29 Mar 2014, 18:55:16 (11 years ago)
- Location:
- trunk/source/App/TAppEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r872 r884 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 … … 521 513 #if H_3D_SPIVMP 522 514 ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n") 523 #endif524 #if QC_SPIVMP_MPI_G0119525 515 ("SubPUMPILog2Size", m_iSubPUMPILog2Size, (Int)3, "Sub-PU MPI size index: 2^n") 526 516 #endif … … 613 603 #if H_MV 614 604 615 // DBP Size616 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE617 ("SubLayerFlagInfoPresentFlag", m_subLayerFlagInfoPresentFlag , false , "SubLayerFlagInfoPresentFlag")618 #endif619 605 // VPS VUI 620 606 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 621 607 ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false , "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder 622 608 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 623 #if H_MV_HLS_7_MISC_P0068_21624 609 ("AllLayersIdrAlignedFlag" , m_allLayersIdrAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 625 #endif626 610 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 627 611 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") … … 737 721 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 738 722 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 739 #if H_MV_HLS_7_SEI_P0204_26740 723 ("SubBitstreamPropSEIEnabled", m_subBistreamPropSEIEnabled, false ,"Enable signaling of sub-bitstream property SEI message") 741 724 ("SEISubBitstreamNumAdditionalSubStreams", m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled") … … 745 728 ("SEISubBitstreamAvgBitRate", m_sbPropAvgBitRate, std::vector< Int >(1,0) ,"Specifies average bit rate of the i-th sub-bitstream") 746 729 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 747 #endif748 730 #if H_3D 749 731 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") … … 1432 1414 } 1433 1415 1434 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271435 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." ); 1436 1417 … … 1463 1444 } 1464 1445 } 1465 #else 1466 xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" ); 1467 #endif 1446 1468 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" ); 1469 1448 … … 1552 1531 #endif 1553 1532 #if H_3D_SPIVMP 1554 #if SEC_SPIVMP_MCP_SIZE_G00771555 1533 xConfirmPara( m_iSubPULog2Size < 3, "SubPULog2Size must be 3 or greater."); 1556 #else1557 xConfirmPara( m_iSubPULog2Size < 2, "SubPULog2Size must be 2 or greater.");1558 #endif1559 1534 xConfirmPara( m_iSubPULog2Size > 6, "SubPULog2Size must be 6 or smaller."); 1560 1535 xConfirmPara( (1<<m_iSubPULog2Size) > m_uiMaxCUWidth, "SubPULog2Size must be log2(maxCUSize) or smaller."); 1561 #endif 1562 #if QC_SPIVMP_MPI_G0119 1536 1563 1537 xConfirmPara( m_iSubPUMPILog2Size < 3, "SubPUMPILog2Size must be 3 or greater."); 1564 1538 xConfirmPara( m_iSubPUMPILog2Size > 6, "SubPUMPILog2Size must be 6 or smaller."); … … 2252 2226 } 2253 2227 } 2254 #endif2255 #if H_MV_HLS_7_SEI_P0204_262256 2228 // Check input parameters for Sub-bitstream property SEI message 2257 2229 if( m_subBistreamPropSEIEnabled ) … … 2499 2471 #if H_3D_SPIVMP 2500 2472 printf(" SubPULog2Size:%d " , m_iSubPULog2Size ); 2501 #endif2502 #endif2503 #if QC_SPIVMP_MPI_G01192504 2473 printf(" SubPUMPILog2Size:%d " , m_iSubPUMPILog2Size ); 2474 #endif 2505 2475 #endif 2506 2476 #if H_3D_ARP -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r872 r884 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; … … 141 128 #if H_3D_SPIVMP 142 129 Int m_iSubPULog2Size; 143 #endif144 #endif145 #if QC_SPIVMP_MPI_G0119146 130 Int m_iSubPUMPILog2Size; 131 #endif 147 132 #endif 148 133 #if H_3D_ARP /// < flag and number of weighting factors in ARP … … 440 425 Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units 441 426 Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units 442 #if H_MV _HLS_7_SEI_P0204_26427 #if H_MV 443 428 Bool m_subBistreamPropSEIEnabled; 444 429 Int m_sbPropNumAdditionalSubStreams; -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r872 r884 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 … … 187 185 #if H_3D_SPIVMP 188 186 m_cTEncTop.setSubPULog2Size (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size ); 189 #endif190 #if QC_SPIVMP_MPI_G0119191 187 m_cTEncTop.setSubPUMPILog2Size ( !isDepth ? 0 : m_iSubPUMPILog2Size ); 192 188 #endif … … 429 425 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 430 426 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 431 #if H_MV _HLS_7_SEI_P0204_26427 #if H_MV 432 428 m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled ); 433 429 if( m_subBistreamPropSEIEnabled ) … … 826 822 #endif 827 823 828 #if MTK_DDD_G0063824 #if H_3D_DDD 829 825 m_acTEncTopList[ layer ]->getSliceEncoder()->setDDDPar( m_cCameraData.getCodedScale()[0][ m_acTEncTopList[layer]->getViewIndex() ], 830 826 m_cCameraData.getCodedOffset()[0][ m_acTEncTopList[layer]->getViewIndex() ], … … 1506 1502 } 1507 1503 1508 #if H_MV_HLS_7_FIX_SET_DPB_SIZE1509 1504 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1510 1505 { … … 1520 1515 Bool subLayerFlagInfoPresentFlag = false; 1521 1516 1522 #if H_MV_HLS_7_HRD_P0156_71523 1517 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1524 #else1525 for( Int j = 0; j <= vps.getMaxTLayers() - 1 ; j++ )1526 #endif1527 1518 { 1528 1519 Bool subLayerDpbInfoPresentFlag = false; 1529 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271530 1520 assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 1531 1521 for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ ) 1532 #else1533 assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );1534 for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )1535 #endif1536 1522 { 1537 1523 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); … … 1576 1562 } 1577 1563 } 1578 #else 1579 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1580 { 1581 // These settings need to be verified 1582 1583 TComDpbSize* dpbSize = vps.getDpbSize(); 1584 1585 assert ( dpbSize != 0 ); 1586 1587 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ ) 1588 { 1589 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1590 dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag ); 1591 if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ) 1592 { 1593 for( Int j = 0; j <= vps.getMaxTLayers() - 1 ; j++ ) 1594 { 1595 Int maxNumReorderPics = MIN_INT; 1596 Int maxDecPicBuffering = MIN_INT; 1597 Int maxLatencyIncrease = MIN_INT; 1598 1599 Int prevMaxNumReorderPics = MIN_INT; 1600 Int prevMaxDecPicBuffering = MIN_INT; 1601 Int prevMaxLatencyIncrease = MIN_INT; 1602 1603 assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() ); 1604 for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1605 { 1606 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); 1607 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1608 } 1609 1610 for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ ) 1611 { 1612 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] ); 1613 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] ); 1614 } 1615 assert( maxNumReorderPics != MIN_INT ); 1616 dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics ); 1617 1618 // To Be Done ! 1619 // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode ); 1620 1621 if( j > 0 ) 1622 { 1623 dpbSize->setSubLayerDpbInfoPresentFlag( i, j, prevMaxDecPicBuffering == maxDecPicBuffering && prevMaxLatencyIncrease == maxLatencyIncrease && prevMaxNumReorderPics == maxNumReorderPics ); 1624 } 1625 1626 prevMaxNumReorderPics = maxNumReorderPics; 1627 prevMaxDecPicBuffering = maxDecPicBuffering; 1628 prevMaxLatencyIncrease = maxLatencyIncrease; 1629 } 1630 } 1631 } 1632 } 1633 #endif 1564 1634 1565 1635 1566 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1637 1568 // Layer sets 1638 1569 vps.setVpsNumLayerSetsMinus1 ( m_vpsNumLayerSets - 1 ); 1639 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271640 vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );1641 #endif1642 1570 1643 1571 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) … … 1656 1584 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1657 1585 // Additional output layer sets + profileLevelTierIdx 1658 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271659 1586 vps.setDefaultTargetOutputLayerIdc ( m_defaultTargetOutputLayerIdc ); 1660 1587 vps.setNumAddOutputLayerSets ( numAddOuputLayerSets ); 1661 1588 vps.initTargetLayerIdLists(); 1662 #else 1663 vps.setDefaultOneTargetOutputLayerIdc ( m_defaultOneTargetOutputLayerIdc ); 1664 vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets != 0 ); 1665 vps.setNumAddOutputLayerSetsMinus1 ( numAddOuputLayerSets - 1 ); 1666 #endif 1667 1668 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1589 1669 1590 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++) 1670 1591 { … … 1716 1637 vps.setAltOutputLayerFlag( olsIdx , false); 1717 1638 } 1718 #else 1719 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1720 { 1721 if ( lsIdx > 0 ) 1722 { 1723 vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] ); 1724 } 1725 1726 vps.setOutputLayerSetIdxMinus1( lsIdx, lsIdx - 1 ); 1727 1728 for (Int i = 0; i < m_layerIdsInSets[ lsIdx ].size(); i++ ) 1729 { 1730 vps.setOutputLayerFlag( lsIdx, i, vps.inferOutputLayerFlag( lsIdx, i )); 1731 } 1732 } 1733 1734 for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ ) 1735 { 1736 vps.setProfileLevelTierIdx( m_vpsNumLayerSets + addOutLs, m_profileLevelTierIdx[ addOutLs ] ); 1737 1738 Int refLayerSetIdx = m_outputLayerSetIdx[ addOutLs ]; 1739 vps.setOutputLayerSetIdxMinus1( m_vpsNumLayerSets + addOutLs, refLayerSetIdx - 1 ); 1740 1741 for (Int i = 0; i < m_layerIdsInSets[ refLayerSetIdx].size(); i++ ) 1742 { 1743 Bool outputLayerFlag = false; 1744 for (Int j = 0; j < m_layerIdsInAddOutputLayerSet[ addOutLs ].size(); j++ ) 1745 { 1746 if ( m_layerIdsInAddOutputLayerSet[addOutLs][ j ] == m_layerIdsInSets[ refLayerSetIdx][ i ] ) 1747 { 1748 outputLayerFlag = true; 1749 break; 1750 } 1751 } 1752 vps.setOutputLayerFlag( m_vpsNumLayerSets + addOutLs, i, outputLayerFlag ); 1753 } 1754 } 1755 vps.deriveTargetLayerIdLists(); 1756 #endif 1639 1757 1640 } 1758 1641 … … 1761 1644 vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag ); 1762 1645 1763 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1764 1646 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( ); 1765 1647 assert( pcVPSVUI ); 1766 #endif1767 1648 1768 1649 if ( m_vpsVuiPresentFlag ) 1769 1650 { 1770 #if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1771 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( );1772 1773 assert( pcVPSVUI );1774 #endif1775 1776 1651 // All this stuff could actually be derived by the encoder, 1777 1652 // however preliminary setting it from input parameters … … 1779 1654 pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag ); 1780 1655 pcVPSVUI->setCrossLayerIrapAlignedFlag ( m_crossLayerIrapAlignedFlag ); 1781 #if H_MV_HLS_7_MISC_P0068_211782 1656 pcVPSVUI->setAllLayersIdrAlignedFlag ( m_allLayersIdrAlignedFlag ); 1783 #endif1784 1657 pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag ); 1785 1658 pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag ); … … 1787 1660 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1788 1661 { 1789 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271790 1662 for( Int i = 0; i <= vps.getVpsNumLayerSetsMinus1(); i++ ) 1791 #else1792 for( Int i = 0; i <= vps.getVpsNumberLayerSetsMinus1(); i++ )1793 #endif1794 1663 { 1795 1664 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) … … 1909 1778 pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD 1910 1779 } 1911 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1912 1780 else 1913 1781 { 1914 1782 pcVPSVUI->setCrossLayerIrapAlignedFlag ( false ); 1915 1783 } 1916 #endif1917 1784 } 1918 1785 #endif … … 1970 1837 #endif 1971 1838 } 1972 #if QC_SPIVMP_MPI_G01191839 #if H_3D_SPIVMP 1973 1840 vps.setSubPUMPILog2Size( m_iSubPUMPILog2Size ); 1974 1841 #endif
Note: See TracChangeset for help on using the changeset viewer.