Changeset 1172 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder
- Timestamp:
- 8 Jul 2015, 01:45:57 (9 years ago)
- Location:
- branches/SHM-dev/source/App/TAppEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1162 r1172 935 935 #endif 936 936 } 937 #if Q0078_ADD_LAYER_SETS 937 938 938 Int* cfg_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 939 939 string cfg_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1]; … … 942 942 string cfg_highestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1]; 943 943 string* cfg_highestLayerIdxPtr[MAX_VPS_LAYER_SETS_PLUS1]; 944 944 945 for (UInt i = 0; i < MAX_VPS_LAYER_SETS_PLUS1; i++) 945 946 { … … 949 950 cfg_numHighestLayerIdx[i] = &m_numHighestLayerIdx[i]; 950 951 } 951 #endif 952 952 953 string* cfg_numOutputLayersInOutputLayerSet = new string; 953 954 string* cfg_listOfOutputLayers = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; … … 1059 1060 1060 1061 ("NumLayers", m_numLayers, 1, "Number of layers to code") 1061 #if Q0078_ADD_LAYER_SETS 1062 1062 1063 ("NumLayerSets", m_numLayerSets, 1, "Number of layer sets") 1063 1064 ("NumLayerInIdList%d", cfg_numLayerInIdList, 0, MAX_VPS_LAYER_IDX_PLUS1, "Number of layers in the set") … … 1066 1067 ("NumHighestLayerIdx%d", cfg_numHighestLayerIdx, 0, MAX_VPS_LAYER_IDX_PLUS1, "Number of highest layer idx") 1067 1068 ("HighestLayerIdx%d", cfg_highestLayerIdxPtr, string(""), MAX_VPS_LAYER_IDX_PLUS1, "Highest layer idx for an additional layer set") 1068 #endif 1069 1069 1070 ("DefaultTargetOutputLayerIdc", m_defaultTargetOutputLayerIdc, 1, "Default target output layers. 0: All layers are output layer, 1: Only highest layer is output layer, 2 or 3: No default output layers") 1070 1071 ("NumOutputLayerSets", m_numOutputLayerSets, 1, "Number of output layer sets excluding the 0-th output layer set") … … 2429 2430 } //for(Int layer = 0; layer < MAX_LAYERS; layer++) 2430 2431 2431 #if Q0078_ADD_LAYER_SETS2432 2432 for (Int layerSet = 1; layerSet < m_numLayerSets; layerSet++) 2433 2433 { … … 2435 2435 assert( scanStringToArray( cfg_layerSetLayerIdList[layerSet], m_numLayerInIdList[layerSet], "NumLayerInIdList", m_layerSetLayerIdList[layerSet] ) ); 2436 2436 } 2437 2437 2438 for (Int addLayerSet = 0; addLayerSet < m_numAddLayerSets; addLayerSet++) 2438 2439 { … … 2440 2441 assert( scanStringToArray( cfg_highestLayerIdx[addLayerSet], m_numHighestLayerIdx[addLayerSet], "HighestLayerIdx", m_highestLayerIdx[addLayerSet] ) ); 2441 2442 } 2442 #endif2443 2443 2444 2444 if( m_defaultTargetOutputLayerIdc != -1 ) … … 2446 2446 assert( m_defaultTargetOutputLayerIdc >= 0 && m_defaultTargetOutputLayerIdc <= 3 ); 2447 2447 } 2448 2448 2449 assert( m_numOutputLayerSets != 0 ); 2449 2450 assert( m_numOutputLayerSets >= m_numLayerSets + m_numAddLayerSets ); // Number of output layer sets must be at least as many as layer sets. -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1162 r1172 73 73 #endif 74 74 Bool m_maxTidRefPresentFlag; 75 #if Q0078_ADD_LAYER_SETS 75 76 76 Int m_numLayerSets; 77 Int m_numAddLayerSets; 77 78 Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 78 79 Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; 79 Int m_numAddLayerSets;80 80 Int m_numHighestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1]; 81 81 Int m_highestLayerIdx[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1]; 82 #endif 82 83 83 Int m_defaultTargetOutputLayerIdc; 84 84 Int m_numOutputLayerSets; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1171 r1172 804 804 #endif 805 805 #endif 806 #if Q0078_ADD_LAYER_SETS807 806 m_acTEncTop[layer].setNumAddLayerSets ( m_numAddLayerSets ); 808 #endif809 807 } 810 808 } … … 1256 1254 vps->setVpsExtensionFlag( m_numLayers > 1 ? true : false ); 1257 1255 1258 #if Q0078_ADD_LAYER_SETS 1259 if (m_numLayerSets > 1) 1256 if( m_numLayerSets > 1 ) 1260 1257 { 1261 1258 vps->setNumLayerSets(m_numLayerSets); … … 1290 1287 { 1291 1288 // Default layer sets 1292 #endif1293 1289 vps->setNumLayerSets(m_numLayers); 1294 1290 for (Int setId = 1; setId < vps->getNumLayerSets(); setId++) … … 1315 1311 } 1316 1312 } 1317 #if Q0078_ADD_LAYER_SETS 1318 } 1319 #endif 1320 #if Q0078_ADD_LAYER_SETS 1313 } 1314 1321 1315 vps->setVpsNumLayerSetsMinus1(vps->getNumLayerSets() - 1); 1322 1316 vps->setNumAddLayerSets(m_numAddLayerSets); 1323 1317 vps->setNumLayerSets(vps->getNumLayerSets() + vps->getNumAddLayerSets()); 1324 if (m_numAddLayerSets > 0) 1318 1319 if( m_numAddLayerSets > 0 ) 1325 1320 { 1326 1321 for (Int setId = 0; setId < m_numAddLayerSets; setId++) … … 1332 1327 } 1333 1328 } 1334 #endif1335 1329 1336 1330 #if AVC_BASE … … 1494 1488 // The Layer ID List variables should be derived here. 1495 1489 vps->deriveLayerIdListVariables(); 1496 #if Q0078_ADD_LAYER_SETS1497 1490 vps->setPredictedLayerIds(); 1498 1491 vps->setTreePartitionLayerIdList(); 1499 1492 vps->deriveLayerIdListVariablesForAddLayerSets(); 1500 #endif1501 1493 1502 1494 vps->setDefaultTargetOutputLayerIdc( m_defaultTargetOutputLayerIdc ); // As per configuration file … … 1538 1530 for( UInt layer = 0; layer < vps->getNumLayersInIdList(lsIdx); layer++ ) 1539 1531 { 1540 #if !Q0078_ADD_LAYER_SETS // the following condition is incorrect and is not needed anyway 1541 if( vps->getLayerIdIncludedFlag(lsIdx, layer) ) 1542 #endif 1543 { 1544 switch(vps->getDefaultTargetOutputLayerIdc()) 1545 { 1546 case 0: vps->setOutputLayerFlag( lsIdx, layer, 1 ); 1547 break; 1548 case 1: vps->setOutputLayerFlag( lsIdx, layer, layer == vps->getNumLayersInIdList(lsIdx) - 1 ); 1549 break; 1550 case 2: 1551 case 3: vps->setOutputLayerFlag( lsIdx, layer, (layer != vps->getNumLayersInIdList(lsIdx) - 1) ? std::find( m_listOfOutputLayers[lsIdx].begin(), m_listOfOutputLayers[lsIdx].end(), m_layerSetLayerIdList[lsIdx][layer]) != m_listOfOutputLayers[lsIdx].end() 1552 : m_listOfOutputLayers[lsIdx][m_listOfOutputLayers[lsIdx].size()-1] == m_layerSetLayerIdList[lsIdx][layer] ); 1553 break; 1554 } 1532 switch( vps->getDefaultTargetOutputLayerIdc() ) 1533 { 1534 case 0: vps->setOutputLayerFlag( lsIdx, layer, 1 ); 1535 break; 1536 case 1: vps->setOutputLayerFlag( lsIdx, layer, layer == vps->getNumLayersInIdList(lsIdx) - 1 ); 1537 break; 1538 case 2: 1539 case 3: vps->setOutputLayerFlag( lsIdx, layer, (layer != vps->getNumLayersInIdList(lsIdx) - 1) ? std::find( m_listOfOutputLayers[lsIdx].begin(), m_listOfOutputLayers[lsIdx].end(), m_layerSetLayerIdList[lsIdx][layer]) != m_listOfOutputLayers[lsIdx].end() 1540 : m_listOfOutputLayers[lsIdx][m_listOfOutputLayers[lsIdx].size()-1] == m_layerSetLayerIdList[lsIdx][layer] ); 1541 break; 1555 1542 } 1556 1543 } … … 1616 1603 vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true); 1617 1604 #if O0062_POC_LSB_NOT_PRESENT_FLAG 1618 for( i = 1; i< vps->getMaxLayers(); i++)1605 for( i = 1; i< vps->getMaxLayers(); i++ ) 1619 1606 { 1620 1607 if( vps->getNumDirectRefLayers( vps->getLayerIdInNuh(i) ) == 0 ) 1621 1608 { 1622 #if Q0078_ADD_LAYER_SETS 1623 vps->setPocLsbNotPresentFlag(i, true); // make independedent layers base-layer compliant 1624 #else 1625 vps->setPocLsbNotPresentFlag(i, false); 1626 #endif 1609 // make independedent layers base-layer compliant 1610 vps->setPocLsbNotPresentFlag(i, true); 1627 1611 } 1628 1612 } … … 1739 1723 { 1740 1724 vps->setVpsVuiBspHrdPresentFlag(true); 1741 #if Q0078_ADD_LAYER_SETS1742 1725 vps->setVpsNumBspHrdParametersMinus1(vps->getVpsNumLayerSetsMinus1() - 1); 1743 #else1744 vps->setVpsNumBspHrdParametersMinus1(vps->getNumLayerSets() - 2);1745 #endif1746 1726 vps->createBspHrdParamBuffer(vps->getVpsNumBspHrdParametersMinus1() + 1); 1747 1727 for ( i = 0; i <= vps->getVpsNumBspHrdParametersMinus1(); i++ ) … … 1776 1756 vps->setBspHrdParameters( i, pcCfgLayer->getFrameRate(), numDU, pcCfgLayer->getTargetBitrate(), ( pcCfgLayer->getIntraPeriod() > 0 ) ); 1777 1757 } 1778 #if Q0078_ADD_LAYER_SETS1779 1758 for (UInt h = 1; h <= vps->getVpsNumLayerSetsMinus1(); h++) 1780 #else1781 for(UInt h = 1; h <= (vps->getNumLayerSets()-1); h++)1782 #endif1783 1759 { 1784 1760 vps->setNumBitstreamPartitions(h, 1);
Note: See TracChangeset for help on using the changeset viewer.