Changeset 738 in 3DVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 10 Dec 2013, 13:50:12 (11 years ago)
- Location:
- trunk/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r724 r738 391 391 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 392 392 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 393 #if H_MV_6_PS_0109_25 394 ("DefaultOneTargetOutputLayerFlag" , m_defaultOneTargetOutputLayerIdc , 0, "Output highest layer of layer sets by default") 395 #else 393 396 ("DefaultOneTargetOutputLayerFlag", m_defaultOneTargetOutputLayerFlag, false , "Output highest layer of layer sets by default") 397 #endif 394 398 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 395 399 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") … … 448 452 ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter, 2u, "Depth of TU tree for inter CUs") 449 453 450 // Coding structure paramters 454 // Coding structure parameters 455 #if H_MV_LAYER_WISE_STARTUP 456 ("IntraPeriod,-ip", m_iIntraPeriod,std::vector<Int>(1,-1), "Intra period in frames, (-1: only first frame), per layer") 457 #else 451 458 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)") 459 #endif 452 460 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 453 461 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") … … 624 632 625 633 #if H_MV 634 635 #if H_MV_6_HRD_O0217_13 636 // DBP Size 637 ("SubLayerFlagInfoPresentFlag", m_subLayerFlagInfoPresentFlag , false , "SubLayerFlagInfoPresentFlag") 638 #endif 626 639 // VPS VUI 627 640 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 641 #if H_MV_6_PS_O0223_29 642 ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false , "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder 643 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 644 #endif 628 645 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 629 646 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") … … 634 651 ("ConstantPicRateIdc" , m_constantPicRateIdc , std::vector< Int >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set") 635 652 ("AvgPicRate" , m_avgPicRate , std::vector< Int >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "AvgPicRate per sub layer for the N-th layer set") 653 #if H_MV_6_O0226_37 654 ("TilesNotInUseFlag" , m_tilesNotInUseFlag , true , "TilesNotInUseFlag ") 655 ("TilesInUseFlag" , m_tilesInUseFlag , std::vector< Bool >(1,false) , "TilesInUseFlag ") 656 ("LoopFilterNotAcrossTilesFlag" , m_loopFilterNotAcrossTilesFlag , std::vector< Bool >(1,false) , "LoopFilterNotAcrossTilesFlag ") 657 ("WppNotInUseFlag" , m_wppNotInUseFlag , true , "WppNotInUseFlag ") 658 ("WppInUseFlag" , m_wppInUseFlag , std::vector< Bool >(1,0) , "WppInUseFlag ") 659 #endif 636 660 ("TileBoundariesAlignedFlag" , m_tileBoundariesAlignedFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "TileBoundariesAlignedFlag per direct reference for the N-th layer") 637 661 ("IlpRestrictedRefLayersFlag" , m_ilpRestrictedRefLayersFlag , false , "IlpRestrictedRefLayersFlag") … … 1050 1074 xResizeVector( m_bLoopFilterDisable ); 1051 1075 xResizeVector( m_bUseSAO ); 1052 1076 #if H_MV_LAYER_WISE_STARTUP 1077 xResizeVector( m_iIntraPeriod ); 1078 #endif 1079 #if H_MV_6_O0226_37 1080 xResizeVector( m_tilesInUseFlag ); 1081 xResizeVector( m_loopFilterNotAcrossTilesFlag ); 1082 xResizeVector( m_wppInUseFlag ); 1083 #endif 1053 1084 #else 1054 1085 m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ]; … … 1395 1426 for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ ) 1396 1427 { 1428 #if H_MV_6_LAYER_ID_32 1429 xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than MAX_NUM_LAYER_IDS" ); 1430 #else 1397 1431 xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than 64" ); 1432 #endif 1398 1433 } 1399 1434 } … … 1420 1455 } 1421 1456 } 1457 1458 #if H_MV_6_PS_0109_25 1459 xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" ); 1460 #endif 1422 1461 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" ); 1423 1462 … … 1436 1475 xConfirmPara( m_iGOPSize < 1 , "GOP Size must be greater or equal to 1" ); 1437 1476 xConfirmPara( m_iGOPSize > 1 && m_iGOPSize % 2, "GOP Size must be a multiple of 2, if GOP Size is greater than 1" ); 1477 #if H_MV_LAYER_WISE_STARTUP 1478 for( Int layer = 0; layer < m_numberOfLayers; layer++ ) 1479 { 1480 xConfirmPara( (m_iIntraPeriod[layer] > 0 && m_iIntraPeriod[layer] < m_iGOPSize) || m_iIntraPeriod[layer] == 0, "Intra period must be more than GOP size, or -1 , not 0" ); 1481 } 1482 #else 1438 1483 xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" ); 1484 #endif 1439 1485 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2, "Decoding Refresh Type must be equal to 0, 1 or 2" ); 1440 1486 #if H_MV … … 1462 1508 if (m_iDecodingRefreshType == 2) 1463 1509 { 1510 #if H_MV_LAYER_WISE_STARTUP 1511 for (Int i = 0; i < m_numberOfLayers; i++ ) 1512 { 1513 xConfirmPara( m_iIntraPeriod[i] > 0 && m_iIntraPeriod[i] <= m_iGOPSize , "Intra period must be larger than GOP size for periodic IDR pictures"); 1514 } 1515 #else 1464 1516 xConfirmPara( m_iIntraPeriod > 0 && m_iIntraPeriod <= m_iGOPSize , "Intra period must be larger than GOP size for periodic IDR pictures"); 1517 #endif 1465 1518 } 1466 1519 xConfirmPara( (m_uiMaxCUWidth >> m_uiMaxCUDepth) < 4, "Minimum partition width size should be larger than or equal to 8"); … … 1721 1774 /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure 1722 1775 * This permits the ability to omit a GOP structure specification */ 1776 #if H_MV_LAYER_WISE_STARTUP 1777 if (m_iIntraPeriod[layer] == 1 && m_GOPList[0].m_POC == -1) { 1778 #else 1723 1779 if (m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1) { 1780 #endif 1724 1781 m_GOPList[0] = GOPEntry(); 1725 1782 m_GOPList[0].m_QPFactor = 1; … … 1746 1803 } 1747 1804 Int numOK=0; 1805 #if H_MV_LAYER_WISE_STARTUP 1806 xConfirmPara( m_iIntraPeriod[layer] >=0&&(m_iIntraPeriod[layer]%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" ); 1807 #else 1748 1808 xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" ); 1809 #endif 1749 1810 1750 1811 for(Int i=0; i<m_iGOPSize; i++) … … 1757 1818 1758 1819 #if H_MV 1820 #if H_MV_LAYER_WISE_STARTUP 1821 if ( (m_iIntraPeriod[layer] != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable[layer]) ) 1822 #else 1759 1823 if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable[layer]) ) 1824 #endif 1760 1825 #else 1761 1826 if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable) ) … … 2282 2347 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 2283 2348 printf("Motion search range : %d\n", m_iSearchRange ); 2349 #if H_MV_LAYER_WISE_STARTUP 2350 xPrintParaVector( "Intra period", m_iIntraPeriod ); 2351 #else 2284 2352 printf("Intra period : %d\n", m_iIntraPeriod ); 2353 #endif 2285 2354 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType ); 2286 2355 #if !H_MV -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r724 r738 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_6_PS_0109_25 92 Int m_defaultOneTargetOutputLayerIdc; ///< Output highest layer of layer sets by default when equal to 1 93 #else 91 94 Bool m_defaultOneTargetOutputLayerFlag; ///< Output highest layer of layer sets by default 95 #endif 92 96 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 93 97 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers … … 98 102 std::vector< std::vector<Int> > m_dependencyTypes; ///< Dependency types of direct reference layers 99 103 104 #if H_MV_6_HRD_O0217_13 105 // DBP Size 106 Bool m_subLayerFlagInfoPresentFlag; 107 #endif 108 100 109 // VPS VUI 101 110 Bool m_vpsVuiPresentFlag; 111 #if H_MV_6_PS_O0223_29 112 Bool m_crossLayerPicTypeAlignedFlag; 113 Bool m_crossLayerIrapAlignedFlag; 114 #endif 102 115 Bool m_bitRatePresentVpsFlag; 103 116 Bool m_picRatePresentVpsFlag; … … 108 121 std::vector< std::vector<Int > > m_constantPicRateIdc; 109 122 std::vector< std::vector<Int > > m_avgPicRate; 123 #if H_MV_6_O0226_37 124 Bool m_tilesNotInUseFlag; 125 std::vector< Bool > m_tilesInUseFlag; 126 std::vector< Bool > m_loopFilterNotAcrossTilesFlag; 127 Bool m_wppNotInUseFlag; 128 std::vector< Bool > m_wppInUseFlag; 129 130 #endif 110 131 std::vector< std::vector<Bool > > m_tileBoundariesAlignedFlag; 111 132 Bool m_ilpRestrictedRefLayersFlag; … … 175 196 176 197 // coding structure 198 #if H_MV_LAYER_WISE_STARTUP 199 std::vector<Int> m_iIntraPeriod; ///< period of I-slice (random access period) 200 #else 177 201 Int m_iIntraPeriod; ///< period of I-slice (random access period) 202 #endif 178 203 Int m_iDecodingRefreshType; ///< random access type 179 204 Int m_iGOPSize; ///< GOP size of hierarchical structure -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r735 r738 216 216 217 217 m_cTEncTop.setIvPicLists ( &m_ivPicLists ); 218 #endif// H_MV218 // H_MV 219 219 m_cTEncTop.setVPS(&vps); 220 220 … … 234 234 235 235 //====== Coding Structure ======== 236 #if H_MV_LAYER_WISE_STARTUP 237 m_cTEncTop.setIntraPeriod ( m_iIntraPeriod[ layerIdInVps ] ); 238 #else 236 239 m_cTEncTop.setIntraPeriod ( m_iIntraPeriod ); 240 #endif 237 241 m_cTEncTop.setDecodingRefreshType ( m_iDecodingRefreshType ); 238 242 m_cTEncTop.setGOPSize ( m_iGOPSize ); … … 1332 1336 Int maxViewId = xGetMax( m_viewId ); 1333 1337 1338 #if H_MV_6_PS_O0109_22 1339 Int viewIdLen = gCeilLog2( maxViewId + 1 ); 1340 const Int maxViewIdLen = ( 1 << 4 ) - 1; 1341 assert( viewIdLen <= maxViewIdLen ); 1342 vps.setViewIdLen( viewIdLen ); 1343 #else 1334 1344 Int viewIdLenMinus1 = std::max( gCeilLog2( maxViewId + 1 ) - 1, 0 ) ; 1335 1345 const Int maxViewIdLenMinus1 = ( 1 << 4 ) - 1; 1336 1346 assert( viewIdLenMinus1 <= maxViewIdLenMinus1 ); 1337 1347 vps.setViewIdLenMinus1( viewIdLenMinus1 ); 1348 #endif 1338 1349 for (Int i = 0; i < m_iNumberOfViews; i++) 1339 1350 { … … 1355 1366 } 1356 1367 } 1368 1369 #if H_MV_6_PS_O0096_21 1370 Int defaultDirectDependencyType = -1; 1371 Bool defaultDirectDependencyFlag = true; 1372 #endif 1357 1373 for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ ) 1358 1374 { … … 1363 1379 Int refLayer = m_directRefLayers[depLayer][i]; 1364 1380 vps.setDirectDependencyFlag( depLayer, refLayer, true); 1381 #if H_MV_6_PS_O0096_21 1382 Int curDirectDependencyType = m_dependencyTypes[depLayer][i]; 1383 1384 if ( defaultDirectDependencyType != -1 ) 1385 { 1386 defaultDirectDependencyFlag = defaultDirectDependencyFlag && (curDirectDependencyType == defaultDirectDependencyType ); 1387 } 1388 else 1389 { 1390 defaultDirectDependencyType = curDirectDependencyType; 1391 } 1392 1393 vps.setDirectDependencyType( depLayer, refLayer, curDirectDependencyType); 1394 #else 1365 1395 vps.setDirectDependencyType( depLayer, refLayer,m_dependencyTypes[depLayer][i]); 1366 } 1367 } 1396 #endif 1397 } 1398 } 1399 1400 #if H_MV_6_PS_O0096_21 1401 vps.setDefaultDirectDependencyFlag( defaultDirectDependencyFlag ); 1402 vps.setDefaultDirectDependencyType( defaultDirectDependencyFlag ? defaultDirectDependencyType : -1 ); 1403 #endif 1404 1405 #if H_MV_6_ILDSD_O0120_26 1406 // Max sub layers, + presence flag 1407 Bool subLayersMaxMinus1PresentFlag = false; 1408 Int subLayersMaxMinus1 = -1; 1409 for (Int curLayerIdInVps = 0; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++ ) 1410 { 1411 Int curSubLayersMaxMinus1 = -1; 1412 for( Int i = 0; i < getGOPSize(); i++ ) 1413 { 1414 GOPEntry geCur = m_GOPListMvc[curLayerIdInVps][i]; 1415 curSubLayersMaxMinus1 = std::max( curSubLayersMaxMinus1, geCur.m_temporalId ); 1416 } 1417 1418 vps.setSubLayersVpsMaxMinus1( curLayerIdInVps, curSubLayersMaxMinus1 ); 1419 if ( subLayersMaxMinus1 == -1 ) 1420 { 1421 subLayersMaxMinus1 = curSubLayersMaxMinus1; 1422 } 1423 else 1424 { 1425 subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != subLayersMaxMinus1 ); 1426 } 1427 } 1428 1429 vps.setVpsSubLayersMaxMinus1PresentFlag( subLayersMaxMinus1PresentFlag ); 1430 #endif 1431 1368 1432 1369 1433 // Max temporal id for inter layer reference pictures + presence flag … … 1371 1435 for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++) 1372 1436 { 1437 #if !H_MV_6_ILDDS_O0225_30 1373 1438 Int maxTid = -1; 1439 #endif 1374 1440 for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++) 1375 1441 { 1442 #if H_MV_6_ILDDS_O0225_30 1443 Int maxTid = -1; 1444 #endif 1376 1445 for( Int i = 0; i < getGOPSize(); i++ ) 1377 1446 { … … 1387 1456 } 1388 1457 } 1458 #if H_MV_6_ILDDS_O0225_30 1459 vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 ); 1460 maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 ); 1461 } 1462 #else 1389 1463 } 1390 1464 vps.setMaxTidIlRefPicPlus1( refLayerIdInVps, maxTid + 1 ); 1391 1465 maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 ); 1466 #endif 1392 1467 } 1393 1468 … … 1406 1481 vps.setMaxOneActiveRefLayerFlag( maxOneActiveRefLayerFlag ); 1407 1482 1483 // Poc Lsb Not Present Flag 1484 #if H_MV_6_MISC_O0062_31 1485 for ( Int layerIdInVps = 1; layerIdInVps < m_numberOfLayers; layerIdInVps++) 1486 { 1487 if ( m_directRefLayers[ layerIdInVps ].size() == 0 ) 1488 { 1489 vps.setPocLsbNotPresentFlag( layerIdInVps, true ); 1490 } 1491 } 1492 #endif 1408 1493 1409 1494 // All Ref layers active flag … … 1414 1499 { 1415 1500 GOPEntry ge = m_GOPListMvc[layerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ]; 1501 #if H_MV_6_ILDDS_ILREFPICS_27_34 1502 Int tId = ge.m_temporalId; // Should be equal for all layers. 1503 1504 // check if all reference layers when allRefLayerActiveFlag is equal to 1 are reference layer pictures specified in the gop entry 1505 for (Int k = 0; k < m_directRefLayers[ layerIdInVps].size() && allRefLayersActiveFlag; k++ ) 1506 { 1507 Int refLayerIdInVps = vps.getLayerIdInVps( m_directRefLayers[ layerIdInVps ][ k ] ); 1508 if ( vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId && vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId ) 1509 { 1510 Bool gopEntryFoundFlag = false; 1511 for( Int l = 0; l < ge.m_numActiveRefLayerPics && !gopEntryFoundFlag; l++ ) 1512 { 1513 gopEntryFoundFlag = gopEntryFoundFlag || ( ge.m_interLayerPredLayerIdc[l] == k ); 1514 } 1515 allRefLayersActiveFlag = allRefLayersActiveFlag && gopEntryFoundFlag; 1516 } 1517 } 1518 1519 // check if all inter layer reference pictures specified in the gop entry are valid reference layer pictures when allRefLayerActiveFlag is equal to 1 1520 // (Should actually always be true) 1521 Bool maxTidIlRefAndSubLayerMaxVaildFlag = true; 1522 for( Int l = 0; l < ge.m_numActiveRefLayerPics; l++ ) 1523 { 1524 Bool referenceLayerFoundFlag = false; 1525 for (Int k = 0; k < m_directRefLayers[ layerIdInVps].size(); k++ ) 1526 { 1527 Int refLayerIdInVps = vps.getLayerIdInVps( m_directRefLayers[ layerIdInVps ][ k ] ); 1528 1529 if ( vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId && vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId ) 1530 { 1531 referenceLayerFoundFlag = referenceLayerFoundFlag || ( ge.m_interLayerPredLayerIdc[l] == k ); 1532 } 1533 } 1534 maxTidIlRefAndSubLayerMaxVaildFlag = maxTidIlRefAndSubLayerMaxVaildFlag && referenceLayerFoundFlag; 1535 } 1536 assert ( maxTidIlRefAndSubLayerMaxVaildFlag ); // Something wrong with MaxTidIlRefPicsPlus1 or SubLayersVpsMaxMinus1 1537 #else 1416 1538 allRefLayersActiveFlag = allRefLayersActiveFlag && (ge.m_numActiveRefLayerPics == m_directRefLayers[ layerIdInVps ].size() ); 1539 #endif 1417 1540 } 1418 1541 } … … 1420 1543 vps.setAllRefLayersActiveFlag( allRefLayersActiveFlag ); 1421 1544 1545 #if !H_MV_6_PS_O0223_29 1422 1546 // Currently cross layer irap aligned is always true. 1423 1547 vps.setCrossLayerIrapAlignedFlag( true ); 1548 #endif 1424 1549 vps.setRefLayers(); 1425 1550 }; … … 1491 1616 repFormat->setPicHeightVpsInLumaSamples ( m_iSourceHeight ); 1492 1617 repFormat->setPicWidthVpsInLumaSamples ( m_iSourceWidth ); 1618 #if H_MV_6_PS_REP_FORM_18_19_20 1619 repFormat->setChromaAndBitDepthVpsPresentFlag( true ); 1620 #endif 1493 1621 // ToDo not supported yet. 1494 1622 //repFormat->setSeparateColourPlaneVpsFlag( ); … … 1502 1630 } 1503 1631 } 1632 1633 #if H_MV_6_HRD_O0217_13 1634 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1635 { 1636 // These settings need to be verified 1637 1638 TComDpbSize* dpbSize = vps.getDpbSize(); 1639 1640 assert ( dpbSize != 0 ); 1641 1642 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ ) 1643 { 1644 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1645 dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag ); 1646 1647 if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ) 1648 { 1649 for( Int j = 0; j <= vps.getMaxTLayers() - 1 ; j++ ) 1650 { 1651 Int maxNumReorderPics = MIN_INT; 1652 Int maxDecPicBuffering = MIN_INT; 1653 Int maxLatencyIncrease = MIN_INT; 1654 1655 Int prevMaxNumReorderPics = MIN_INT; 1656 Int prevMaxDecPicBuffering = MIN_INT; 1657 Int prevMaxLatencyIncrease = MIN_INT; 1658 1659 assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() ); 1660 for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1661 { 1662 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); 1663 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1664 } 1665 1666 for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ ) 1667 { 1668 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] ); 1669 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] ); 1670 } 1671 assert( maxNumReorderPics != MIN_INT ); 1672 dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics ); 1673 1674 // To Be Done ! 1675 // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode ); 1676 1677 if( j > 0 ) 1678 { 1679 dpbSize->setSubLayerDpbInfoPresentFlag( i, j, prevMaxDecPicBuffering == maxDecPicBuffering && prevMaxLatencyIncrease == maxLatencyIncrease && prevMaxNumReorderPics == maxNumReorderPics ); 1680 } 1681 1682 prevMaxNumReorderPics = maxNumReorderPics; 1683 prevMaxDecPicBuffering = maxDecPicBuffering; 1684 prevMaxLatencyIncrease = maxLatencyIncrease; 1685 } 1686 } 1687 } 1688 } 1689 #endif 1690 1504 1691 1505 1692 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1520 1707 } 1521 1708 } 1709 #if H_MV_6_HRD_O0217_13 1710 vps.deriveLayerSetLayerIdList(); 1711 #endif 1522 1712 1523 1713 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1524 1714 // Additional output layer sets + profileLevelTierIdx 1715 #if H_MV_6_PS_0109_25 1716 vps.setDefaultOneTargetOutputLayerIdc ( m_defaultOneTargetOutputLayerIdc ); 1717 #else 1525 1718 vps.setDefaultOneTargetOutputLayerFlag ( m_defaultOneTargetOutputLayerFlag ); 1719 #endif 1526 1720 vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets != 0 ); 1527 1721 vps.setNumAddOutputLayerSetsMinus1 ( numAddOuputLayerSets - 1 ); 1528 1722 1723 1724 1725 #if H_MV_6_HRD_O0217_13 1726 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1727 { 1728 if ( lsIdx > 0 ) 1729 { 1730 vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] ); 1731 } 1732 1733 vps.setOutputLayerSetIdxMinus1( lsIdx, lsIdx - 1 ); 1734 1735 for (Int i = 0; i < m_layerIdsInSets[ lsIdx ].size(); i++ ) 1736 { 1737 vps.setOutputLayerFlag( lsIdx, i, vps.inferOutputLayerFlag( lsIdx, i )); 1738 } 1739 } 1740 #else 1529 1741 for (Int lsIdx = 1; lsIdx < m_vpsNumLayerSets; lsIdx++) 1530 1742 { 1531 1743 vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] ); 1532 1744 } 1745 #endif 1533 1746 1534 1747 for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ ) … … 1553 1766 } 1554 1767 } 1768 #if H_MV_6_HRD_O0217_13 1769 vps.deriveTargetLayerIdLists(); 1770 #endif 1555 1771 } 1556 1772 … … 1564 1780 1565 1781 assert( pcVPSVUI ); 1782 1783 1784 // All this stuff could actually be derived by the encoder, 1785 // however preliminary setting it from input parameters 1786 1787 #if H_MV_6_PS_O0223_29 1788 pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag ); 1789 pcVPSVUI->setCrossLayerIrapAlignedFlag ( m_crossLayerIrapAlignedFlag ); 1790 #endif 1566 1791 1567 1792 pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag ); … … 1602 1827 } 1603 1828 1829 #if H_MV_6_O0226_37 1830 pcVPSVUI->setTilesNotInUseFlag( m_tilesNotInUseFlag ); 1831 1832 if( !pcVPSVUI->getTilesNotInUseFlag() ) 1833 { 1834 for( Int i = 0; i <= vps.getMaxLayersMinus1(); i++ ) 1835 { 1836 pcVPSVUI->setTilesInUseFlag( i, m_tilesInUseFlag[ i ] ); 1837 if( pcVPSVUI->getTilesInUseFlag( i ) ) 1838 { 1839 pcVPSVUI->setLoopFilterNotAcrossTilesFlag( i, m_loopFilterNotAcrossTilesFlag[ i ] ); 1840 } 1841 } 1842 1843 for( Int i = 1; i <= vps.getMaxLayersMinus1(); i++ ) 1844 { 1845 for( Int j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ) ; j++ ) 1846 { 1847 Int layerIdx = vps.getLayerIdInVps( vps.getRefLayerId(vps.getLayerIdInNuh( i ) , j )); 1848 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1849 { 1850 pcVPSVUI->setTileBoundariesAlignedFlag( i, j, m_tileBoundariesAlignedFlag[i][j] ); 1851 } 1852 } 1853 } 1854 } 1855 1856 pcVPSVUI->setWppNotInUseFlag( m_wppNotInUseFlag ); 1857 1858 if( !pcVPSVUI->getWppNotInUseFlag( ) ) 1859 { 1860 for( Int i = 1; i <= vps.getMaxLayersMinus1(); i++ ) 1861 { 1862 pcVPSVUI->setWppInUseFlag( i, m_wppInUseFlag[ i ]); 1863 } 1864 } 1865 #else 1604 1866 for( Int i = 1; i <= vps.getMaxLayersMinus1(); i++ ) 1605 1867 { … … 1612 1874 } 1613 1875 } 1876 #endif 1614 1877 1615 1878 pcVPSVUI->setIlpRestrictedRefLayersFlag( m_ilpRestrictedRefLayersFlag ); … … 1642 1905 } 1643 1906 } 1907 #if H_MV_6_PS_O0118_33 1908 pcVPSVUI->setVideoSignalInfoIdxPresentFlag( true ); 1909 pcVPSVUI->setVpsNumVideoSignalInfoMinus1 ( 0 ); 1910 1911 assert ( pcVPSVUI->getVideoSignalInfo( 0 ) == NULL ); 1912 1913 TComVideoSignalInfo* videoSignalInfo = new TComVideoSignalInfo; 1914 1915 videoSignalInfo->setColourPrimariesVps ( m_colourPrimaries ); 1916 videoSignalInfo->setMatrixCoeffsVps ( m_matrixCoefficients ); 1917 videoSignalInfo->setTransferCharacteristicsVps( m_transferCharacteristics ); 1918 videoSignalInfo->setVideoVpsFormat ( m_videoFormat ); 1919 videoSignalInfo->setVideoFullRangeVpsFlag ( m_videoFullRangeFlag ); 1920 1921 pcVPSVUI->setVideoSignalInfo( 0, videoSignalInfo ); 1922 1923 for (Int i = 0; i < m_numberOfLayers; i++) 1924 { 1925 pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 ); 1926 } 1927 #endif 1928 #if H_MV_6_HRD_O0164_15 1929 pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD 1930 #endif 1644 1931 } 1645 1932 } … … 1683 1970 if( vps.getUseDLTFlag( layer ) ) 1684 1971 { 1972 #if H_MV_LAYER_WISE_STARTUP 1973 xAnalyzeInputBaseDepth(layer, max( m_iIntraPeriod[layer], 24), &vps); 1974 #else 1685 1975 xAnalyzeInputBaseDepth(layer, max(m_iIntraPeriod, 24), &vps); 1976 #endif 1686 1977 } 1687 1978 #endif … … 1720 2011 } 1721 2012 #endif 2013 #endif 1722 2014 //! \} -
trunk/source/App/TAppEncoder/TAppEncTop.h
r655 r738 125 125 Void xSetProfileTierLevel ( TComVPS& vps ); 126 126 Void xSetRepFormat ( TComVPS& vps ); 127 #if H_MV_6_HRD_O0217_13 128 Void xSetDpbSize ( TComVPS& vps ); 129 #endif 127 130 Void xSetVPSVUI ( TComVPS& vps ); 128 131 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc );
Note: See TracChangeset for help on using the changeset viewer.