Changeset 866 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 13 Aug 2014, 03:52:31 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r865 r866 1481 1481 #endif 1482 1482 #endif 1483 #if !PER_LAYER_PTL 1483 1484 for(i = 1; i < vps->getNumLayerSets(); i++) 1484 1485 { … … 1488 1489 #endif 1489 1490 } 1491 #endif 1490 1492 #endif 1491 1493 #if VPS_DPB_SIZE_TABLE … … 1554 1556 vps->deriveNecessaryLayerFlag(); 1555 1557 vps->checkNecessaryLayerFlagCondition(); 1558 #endif 1559 #if PER_LAYER_PTL 1560 vps->getProfileLevelTierIdx()->resize(vps->getNumOutputLayerSets()); 1561 vps->getProfileLevelTierIdx(0)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? 1 : 0 ); // Default 0-th output layer set 1562 for(i = 1; i < vps->getNumOutputLayerSets(); i++) 1563 { 1564 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx( i ); 1565 Int numLayerInLayerSet = vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); 1566 for(Int j = 0; j < numLayerInLayerSet; j++) 1567 { 1568 Int layerIdxInVps = vps->getLayerIdInVps( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) ); 1569 if( vps->getNecessaryLayerFlag(i, j) ) 1570 { 1571 vps->getProfileLevelTierIdx(i)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? layerIdxInVps + 1 : layerIdxInVps); 1572 } 1573 else 1574 { 1575 vps->getProfileLevelTierIdx(i)->push_back( -1 ); 1576 } 1577 } 1578 } 1556 1579 #endif 1557 1580 // Initialize dpb_size_table() for all ouput layer sets in the VPS extension -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r865 r866 2446 2446 #endif 2447 2447 #endif 2448 #if !PER_LAYER_PTL 2448 2449 ::memset(m_profileLevelTierIdx, 0, sizeof(m_profileLevelTierIdx)); 2450 #endif 2449 2451 m_maxOneActiveRefLayerFlag = true; 2450 2452 #if O0062_POC_LSB_NOT_PRESENT_FLAG … … 3074 3076 assert( layerFoundNecessaryLayerFlag ); 3075 3077 } 3078 } 3079 #endif 3080 #if PER_LAYER_PTL 3081 Int const TComVPS::calculateLenOfSyntaxElement( Int const numVal ) 3082 { 3083 Int numBits = 1; 3084 while((1 << numBits) < numVal) 3085 { 3086 numBits++; 3087 } 3088 return numBits; 3076 3089 } 3077 3090 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r865 r866 585 585 #endif 586 586 #endif 587 #if PER_LAYER_PTL 588 std::vector< std::vector<Int> > m_profileLevelTierIdx; 589 #else 587 590 Int m_profileLevelTierIdx[64]; 591 #endif 588 592 Bool m_maxOneActiveRefLayerFlag; 589 593 #if O0062_POC_LSB_NOT_PRESENT_FLAG … … 984 988 #endif 985 989 #endif 990 #if PER_LAYER_PTL 991 Bool const getNecessaryLayerFlag(Int const i, Int const j) { return m_necessaryLayerFlag[i][j]; } 992 std::vector< std::vector<Int> >* const getProfileLevelTierIdx() { return &m_profileLevelTierIdx; } 993 std::vector<Int>* const getProfileLevelTierIdx(Int const olsIdx) { return &m_profileLevelTierIdx[olsIdx]; } 994 Int getProfileLevelTierIdx(Int const olsIdx, Int const layerIdx) { return m_profileLevelTierIdx[olsIdx][layerIdx]; } 995 Void setProfileLevelTierIdx(Int const olsIdx, Int const layerIdx, Int const ptlIdx) { m_profileLevelTierIdx[olsIdx][layerIdx] = ptlIdx; } 996 Int const calculateLenOfSyntaxElement( Int const numVal ); 997 #else 986 998 Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } 987 999 Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } 1000 #endif 988 1001 Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } 989 1002 Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r865 r866 57 57 #define LIST_OF_PTL 1 ///< JCTVC-R0272: Signalling the PTL for the 0-th OLS 58 58 #define NECESSARY_LAYER_FLAG 1 ////< Derivation of NecessaryLayerFlag 59 #define PER_LAYER_PTL 1 ///< Signal profile-tier-level information for each layer. 59 60 #endif 60 61 #define O0137_MAX_LAYERID 1 ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r865 r866 1374 1374 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 ); 1375 1375 #endif 1376 #if PER_LAYER_PTL 1377 Int const numBitsForPtlIdx = vps->calculateLenOfSyntaxElement( vps->getNumProfileTierLevel() ); 1378 #endif 1376 1379 vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel()); 1377 1380 #if LIST_OF_PTL … … 1472 1475 vps->setOutputLayerFlag(0, 0, true); 1473 1476 vps->deriveNecessaryLayerFlag(0); 1477 #if PER_LAYER_PTL 1478 vps->getProfileLevelTierIdx()->resize(numOutputLayerSets); 1479 vps->getProfileLevelTierIdx(0)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? 1 : 0); 1480 #endif 1474 1481 #endif 1475 1482 for(i = 1; i < numOutputLayerSets; i++) … … 1488 1495 vps->setOutputLayerSetIdx( i, i ); 1489 1496 } 1497 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i); 1490 1498 #if Q0078_ADD_LAYER_SETS 1491 1499 if ( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() >= 2 ) … … 1494 1502 #endif 1495 1503 { 1496 Int lsIdx = vps->getOutputLayerSetIdx(i);1497 1504 #if NUM_OL_FLAGS 1498 for(j = 0; j < vps->getNumLayersInIdList(l sIdx); j++)1505 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++) 1499 1506 #else 1500 1507 for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++) … … 1508 1515 // i <= (vps->getNumLayerSets() - 1) 1509 1516 // Assign OutputLayerFlag depending on default_one_target_output_layer_flag 1510 Int lsIdx = i;1511 1517 if( vps->getDefaultTargetOutputLayerIdc() == 1 ) 1512 1518 { 1513 for(j = 0; j < vps->getNumLayersInIdList(l sIdx); j++)1514 { 1515 vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(l sIdx)-1)) && (vps->getDimensionId(j,1) == 0) );1519 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++) 1520 { 1521 vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet)-1)) && (vps->getDimensionId(j,1) == 0) ); 1516 1522 } 1517 1523 } 1518 1524 else if ( vps->getDefaultTargetOutputLayerIdc() == 0 ) 1519 1525 { 1520 for(j = 0; j < vps->getNumLayersInIdList(l sIdx); j++)1526 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++) 1521 1527 { 1522 1528 vps->setOutputLayerFlag(i, j, 1); … … 1527 1533 vps->deriveNecessaryLayerFlag(i); 1528 1534 #endif 1535 #if PER_LAYER_PTL 1536 vps->getProfileLevelTierIdx(i)->assign(vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet), -1); 1537 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++) 1538 { 1539 if( vps->getNecessaryLayerFlag(i, j) ) 1540 { 1541 READ_CODE( numBitsForPtlIdx, uiCode, "profile_level_tier_idx[i]" ); 1542 vps->setProfileLevelTierIdx(i, j, uiCode ); 1543 } 1544 } 1545 #else 1529 1546 Int numBits = 1; 1530 1547 while ((1 << numBits) < (vps->getNumProfileTierLevel())) … … 1533 1550 } 1534 1551 READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode); 1552 #endif 1535 1553 #if P0300_ALT_OUTPUT_LAYER_FLAG 1536 1554 NumOutputLayersInOutputLayerSet[i] = 0; 1537 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);1538 1555 for (j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++) 1539 1556 { -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r865 r866 1070 1070 #else 1071 1071 WRITE_UVLC( vps->getNumProfileTierLevel() - 1, "vps_num_profile_tier_level_minus1"); 1072 #if PER_LAYER_PTL 1073 Int const numBitsForPtlIdx = vps->calculateLenOfSyntaxElement( vps->getNumProfileTierLevel() ); 1074 #endif 1072 1075 #endif 1073 1076 #if LIST_OF_PTL … … 1153 1156 for(i = 1; i < numOutputLayerSets; i++) 1154 1157 { 1158 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i); 1155 1159 if( i > (vps->getNumLayerSets() - 1) ) 1156 1160 { … … 1170 1174 { 1171 1175 #endif 1172 Int lsIdx = vps->getOutputLayerSetIdx(i);1173 1176 #if NUM_OL_FLAGS 1174 for(j = 0; j < vps->getNumLayersInIdList(l sIdx) ; j++)1177 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++) 1175 1178 #else 1176 1179 for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++) … … 1180 1183 } 1181 1184 } 1185 #if PER_LAYER_PTL 1186 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++) 1187 { 1188 if( vps->getNecessaryLayerFlag(i, j) ) 1189 { 1190 WRITE_CODE( vps->getProfileLevelTierIdx(i, j), numBitsForPtlIdx, "profile_level_tier_idx[i]" ); 1191 } 1192 } 1193 #else 1182 1194 Int numBits = 1; 1183 1195 while ((1 << numBits) < (vps->getNumProfileTierLevel())) … … 1186 1198 } 1187 1199 WRITE_CODE( vps->getProfileLevelTierIdx(i), numBits, "profile_level_tier_idx[i]" ); 1200 #endif 1188 1201 #if P0300_ALT_OUTPUT_LAYER_FLAG 1189 1202 NumOutputLayersInOutputLayerSet[i] = 0; 1190 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);1191 1203 for (j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++) 1192 1204 {
Note: See TracChangeset for help on using the changeset viewer.