Changeset 964 in 3DVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 5 Jul 2014, 05:16:45 (10 years ago)
- Location:
- trunk/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r950 r964 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 ("DefaultTargetOutputLayerIdc" , m_default TargetOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")390 ("DefaultTargetOutputLayerIdc" , m_defaultOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 391 391 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 392 392 393 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") 394 394 ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 395 #if H_MV_HLS_7_VPS_P0300_27 396 ("AltOutputLayerFlag", m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag") 397 #endif 395 398 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 396 399 … … 453 456 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)") 454 457 #endif 458 #if ALLOW_RECOVERY_POINT_AS_RAP 459 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)") 460 #else 455 461 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 462 #endif 456 463 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 457 464 // motion options … … 470 477 ("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( Double )1.0, "Lambda modifier for temporal layer 5") 471 478 ("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( Double )1.0, "Lambda modifier for temporal layer 6") 472 ("LambdaModifier7,-LM7", m_adLambdaModifier[ 7 ], ( Double )1.0, "Lambda modifier for temporal layer 7")473 479 474 480 /* Quantization parameters */ … … 694 700 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination") 695 701 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO") 702 ("SEIToneMapExposureIndexIdc", m_exposureIndexIdc, 0, "Indicates the exposure index setting of the camera") 703 ("SEIToneMapExposureIndexValue", m_exposureIndexValue, 400, "Specifies the exposure index setting of the cameran of Extended_ISO") 696 704 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue") 697 705 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue") … … 724 732 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 725 733 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 734 #if H_MV 726 735 ("SubBitstreamPropSEIEnabled", m_subBistreamPropSEIEnabled, false ,"Enable signaling of sub-bitstream property SEI message") 727 736 ("SEISubBitstreamNumAdditionalSubStreams", m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled") … … 731 740 ("SEISubBitstreamAvgBitRate", m_sbPropAvgBitRate, std::vector< Int >(1,0) ,"Specifies average bit rate of the i-th sub-bitstream") 732 741 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 742 #endif 733 743 #if H_3D 734 744 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") … … 1047 1057 xResizeVector( m_loopFilterNotAcrossTilesFlag ); 1048 1058 xResizeVector( m_wppInUseFlag ); 1059 1060 #if H_MV_HLS_7_VPS_P0300_27 1061 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++) 1062 { 1063 m_altOutputLayerFlag.push_back( false ); 1064 } 1065 #endif 1049 1066 #else 1050 1067 m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ]; … … 1417 1434 } 1418 1435 1419 xConfirmPara( m_default TargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." );1420 1421 if( m_default TargetOutputLayerIdc != 2 )1436 xConfirmPara( m_defaultOutputLayerIdc < 0 || m_defaultOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 1437 1438 if( m_defaultOutputLayerIdc != 2 ) 1422 1439 { 1423 1440 Bool anyDefaultOutputFlag = false; … … 1448 1465 } 1449 1466 1467 #if H_MV_HLS_7_VPS_P0300_27 1468 xConfirmPara( m_altOutputLayerFlag.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 #endif 1450 1470 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" ); 1451 1471 … … 1472 1492 xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" ); 1473 1493 #endif 1494 #if ALLOW_RECOVERY_POINT_AS_RAP 1495 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3, "Decoding Refresh Type must be comprised between 0 and 3 included" ); 1496 if(m_iDecodingRefreshType == 3) 1497 { 1498 xConfirmPara( !m_recoveryPointSEIEnabled, "When using RecoveryPointSEI messages as RA points, recoveryPointSEI must be enabled" ); 1499 } 1500 #else 1474 1501 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2, "Decoding Refresh Type must be equal to 0, 1 or 2" ); 1502 #endif 1475 1503 #if H_MV 1476 1504 for( Int layer = 0; layer < m_numberOfLayers; layer++ ) … … 1591 1619 xConfirmPara( m_pchCameraParameterFile == 0 , "CameraParameterFile must be given"); 1592 1620 xConfirmPara( m_pchBaseViewCameraNumbers == 0 , "BaseViewCameraNumbers must be given" ); 1621 #if BUG_FIX_TK65 1622 xConfirmPara( ( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size() ) && ( m_numberOfLayers != m_cCameraData.getBaseViewNumbers().size() ), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 1623 #else 1593 1624 xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 1625 #endif 1594 1626 xConfirmPara ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5, "CodedCamParsPrecision must be in range of 0..5" ); 1595 1627 #if H_3D_VSO … … 2178 2210 xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4"); 2179 2211 xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0"); 2212 xConfirmPara( m_exposureIndexValue == 0, "SEIToneMapExposureIndexValue shall not be equal to 0"); 2180 2213 xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100"); 2181 2214 xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue"); -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r950 r964 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 Int m_default TargetOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet91 Int m_defaultOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 92 92 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 93 93 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers 94 94 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 95 95 std::vector<Int> m_profileLevelTierIdx; ///< Indices of of profile level tier 96 96 #if H_MV_HLS_7_VPS_P0300_27 97 std::vector<Bool> m_altOutputLayerFlag; ///< Alt output layer flag 98 #endif 99 97 100 // Dependencies 98 101 std::vector< std::vector<Int> > m_directRefLayers; ///< LayerIds of direct reference layers … … 338 341 Int m_cameraIsoSpeedIdc; 339 342 Int m_cameraIsoSpeedValue; 343 Int m_exposureIndexIdc; 344 Int m_exposureIndexValue; 340 345 Int m_exposureCompensationValueSignFlag; 341 346 Int m_exposureCompensationValueNumerator; -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r950 r964 57 57 TAppEncTop::TAppEncTop() 58 58 { 59 60 #if H_MV_HLS_8 61 m_vps = new TComVPS; 62 #endif 59 63 #if !H_MV 60 64 m_iFrameRcvd = 0; … … 66 70 TAppEncTop::~TAppEncTop() 67 71 { 72 #if H_MV_HLS_8 73 if (m_vps) 74 { 75 delete m_vps; 76 }; 77 #endif 78 68 79 } 69 80 … … 71 82 { 72 83 #if H_MV 84 #if H_MV_HLS_8 85 TComVPS& vps = (*m_vps); 86 #else 73 87 TComVPS& vps = m_vps; 88 #endif 74 89 #else 75 90 TComVPS vps; … … 409 424 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 410 425 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 426 m_cTEncTop.setTMISEIExposureIndexIdc ( m_exposureIndexIdc ); 427 m_cTEncTop.setTMISEIExposureIndexValue ( m_exposureIndexValue ); 411 428 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 412 429 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); … … 691 708 { 692 709 #if H_3D 710 #if H_MV_HLS_8 711 for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ ) 712 { 713 m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 714 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() ); 715 #else 693 716 for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ ) 694 717 { 695 718 m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 696 719 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() ); 720 #endif 697 721 } 698 722 #endif … … 1275 1299 1276 1300 Int defaultDirectDependencyType = -1; 1301 #if MV_FIX_DEP_TYPES 1302 Bool defaultDirectDependencyFlag = false; 1303 #else 1277 1304 Bool defaultDirectDependencyFlag = true; 1305 #endif 1306 1278 1307 for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ ) 1279 1308 { … … 1293 1322 { 1294 1323 defaultDirectDependencyType = curDirectDependencyType; 1324 #if MV_FIX_DEP_TYPES 1325 defaultDirectDependencyFlag = true; 1326 #endif 1295 1327 } 1296 1328 … … 1482 1514 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) 1483 1515 { 1516 #if H_MV_HLS_8_PMS_Q0195_20 1517 vps.setRepFormatIdxPresentFlag( false ); 1518 #else 1484 1519 vps.setRepFormatIdxPresentFlag( true ); 1520 #endif 1485 1521 vps.setVpsNumRepFormatsMinus1 ( 0 ); 1486 1522 … … 1499 1535 vps.setRepFormat( 0 , repFormat ); 1500 1536 1537 #if !H_MV_HLS_8_PMS_Q0195_20 1501 1538 for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ ) 1502 1539 { 1503 1540 vps.setVpsRepFormatIdx( i , 0 ); 1504 1541 } 1542 #endif 1505 1543 } 1506 1544 … … 1513 1551 assert ( dpbSize != 0 ); 1514 1552 1553 #if H_MV_HLS_8_HRD_Q0102_08 1554 for( Int i = 0; i < vps.getNumOutputLayerSets(); i++ ) 1555 #else 1515 1556 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ ) 1557 #endif 1516 1558 { 1559 #if H_MV_HLS_8_MIS_Q0102_30 1560 Int currLsIdx = vps.olsIdxToLsIdx( i ); 1561 #endif 1517 1562 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1518 1563 Bool subLayerFlagInfoPresentFlag = false; 1519 1564 1565 #if H_MV_HLS_8_MIS_Q0102_30 1566 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1567 #else 1520 1568 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1569 #endif 1521 1570 { 1522 1571 Bool subLayerDpbInfoPresentFlag = false; 1523 assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 1524 for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ ) 1572 #if H_MV_HLS_8_MIS_Q0102_30 || H_MV_HLS_8_DBP_NODOC_42 1573 assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() ); 1574 for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ ) 1575 #else 1576 assert( vps.getNumSubDpbs( vps.olsIdxToLsIdx( i ) ) == targetDecLayerIdList.size() ); 1577 for( Int k = 0; k < vps.getNumSubDpbs( vps.olsIdxToLsIdx( i )); k++ ) 1578 #endif 1525 1579 { 1526 1580 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); … … 1587 1641 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1588 1642 // Additional output layer sets + profileLevelTierIdx 1589 vps.setDefaultTargetOutputLayerIdc ( m_defaultTargetOutputLayerIdc ); 1590 vps.setNumAddOutputLayerSets ( numAddOuputLayerSets ); 1643 vps.setDefaultOutputLayerIdc ( m_defaultOutputLayerIdc ); 1644 #if H_MV_HLS_8_SYN_39_19 1645 vps.setNumAddLayerSets ( 0 ); 1646 vps.setNumAddOlss ( numAddOuputLayerSets ); 1647 #else 1648 vps.setNumAddLayerSets ( numAddOuputLayerSets ); 1649 #endif 1591 1650 vps.initTargetLayerIdLists(); 1592 1651 … … 1595 1654 Int addOutLsIdx = olsIdx - m_vpsNumLayerSets; 1596 1655 1597 vps.set OutputLayerSetIdxMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 );1598 1599 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps. getLayerSetIdxForOutputLayerSet( olsIdx ) ];1600 1601 if (vps.getDefault TargetOutputLayerIdc() == 2 || addOutLsIdx >= 0 )1656 vps.setLayerSetIdxForOlsMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 1657 1658 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps.olsIdxToLsIdx( olsIdx ) ]; 1659 1660 if (vps.getDefaultOutputLayerIdc() == 2 || addOutLsIdx >= 0 ) 1602 1661 { 1603 1662 for ( Int i = 0; i < layerIdList.size(); i++) … … 1637 1696 vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] ); 1638 1697 } 1639 1698 #if H_MV_HLS_7_VPS_P0300_27 1699 if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 && 1700 vps.getNumDirectRefLayers( vps.getOlsHighestOutputLayerId( olsIdx ) ) ) 1701 { 1702 vps.setAltOutputLayerFlag( olsIdx , m_altOutputLayerFlag[ olsIdx ]); 1703 } 1704 else 1705 { 1706 vps.setAltOutputLayerFlag( olsIdx , false ); 1707 if ( m_altOutputLayerFlag[ olsIdx ] ) 1708 { 1709 printf( "\nWarning: Ignoring AltOutputLayerFlag for output layer set %d, since more than one output layer or no dependent layers.\n", olsIdx ); 1710 } 1711 } 1712 #else 1640 1713 vps.setAltOutputLayerFlag( olsIdx , false); 1641 } 1642 1714 #endif 1715 } 1643 1716 } 1644 1717 -
trunk/source/App/TAppEncoder/TAppEncTop.h
r872 r964 75 75 76 76 TComPicLists m_ivPicLists; ///< picture buffers of encoder instances 77 #if H_MV_HLS_8 78 TComVPS* m_vps; ///< vps 79 #else 77 80 TComVPS m_vps; ///< vps 81 #endif 78 82 #else 79 83 TEncTop m_cTEncTop; ///< encoder class
Note: See TracChangeset for help on using the changeset viewer.