Changeset 961 in SHVCSoftware
- Timestamp:
- 6 Jan 2015, 04:21:12 (10 years ago)
- Location:
- branches/SHM-upgrade/source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/App/TAppDecoder/TAppDecCfg.cpp
r933 r961 102 102 #endif 103 103 #endif 104 #if FIX_CONF_MODE 105 ("LayerNum,-ls", nLayerNum, MAX_NUM_LAYER_IDS, "Number of layers to be decoded.") 106 #else 104 107 ("LayerNum,-ls", nLayerNum, 1, "Number of layers to be decoded.") 108 #endif 105 109 #if OUTPUT_LAYER_SET_INDEX 106 110 ("OutpuLayerSetIdx,-olsidx", olsIdx, -1, "Index of output layer set to be decoded.") -
branches/SHM-upgrade/source/App/TAppDecoder/TAppDecTop.cpp
r933 r961 214 214 read(nalu, nalUnit); 215 215 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || 216 #if FIX_CONF_MODE 217 (nalu.m_layerId > this->getCommonDecoderParams()->getTargetLayerId()) ) 218 #else 216 219 (nalu.m_layerId > m_tgtLayerId) ) 220 #endif 217 221 { 218 222 bNewPicture = false; … … 1223 1227 dpbStatus.m_numPicsInLayer[layerIdx]--; 1224 1228 #endif 1229 #if FIX_ALIGN_BUMPING 1230 dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerIdx]]--; 1231 #else 1225 1232 dpbStatus.m_numPicsInSubDpb[layerIdx]--; 1233 #endif 1226 1234 } 1227 1235 } … … 1235 1243 { 1236 1244 std::vector<Int> listOfPocs; 1245 #if FIX_ALIGN_BUMPING 1246 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1247 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1248 #else 1237 1249 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1238 1250 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1251 #endif 1239 1252 DpbStatus dpbStatus; 1240 1253 … … 1262 1275 { 1263 1276 std::vector<Int> listOfPocs; 1277 #if FIX_ALIGN_BUMPING 1278 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1279 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1280 #else 1264 1281 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1265 1282 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1283 #endif 1266 1284 DpbStatus dpbStatus; 1267 1285 … … 1285 1303 Void TAppDecTop::markAllPicturesAsErased() 1286 1304 { 1305 #if FIX_ALIGN_BUMPING 1306 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 1307 #else 1287 1308 for(Int i = 0; i < MAX_LAYERS; i++) 1309 #endif 1288 1310 { 1289 1311 markAllPicturesAsErased(i); … … 1324 1346 1325 1347 std::vector<Int> listOfPocs; 1348 #if FIX_ALIGN_BUMPING 1349 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1350 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1351 #else 1326 1352 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1327 1353 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1354 #endif 1328 1355 DpbStatus dpbStatus; 1329 1356 … … 1357 1384 } 1358 1385 #else 1386 #if FIX_ALIGN_BUMPING 1387 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 1388 ? dpbStatus.m_layerIdToSubDpbIdMap[0] 1389 : dpbStatus.m_layerIdToSubDpbIdMap[layerIdx]; 1390 #else 1359 1391 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ? 0 : layerIdx; 1392 #endif 1360 1393 findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit); 1361 1394 #endif … … 1370 1403 { 1371 1404 std::vector<Int> listOfPocs; 1405 #if FIX_ALIGN_BUMPING 1406 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1407 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1408 #else 1372 1409 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1373 1410 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1411 #endif 1374 1412 DpbStatus dpbStatus; 1375 1413 … … 1403 1441 std::vector<int>::iterator it; 1404 1442 TComList<TComPic*>::iterator iterPic; 1443 #if FIX_ALIGN_BUMPING 1444 for( Int dpbLayerCtr = 0; dpbLayerCtr < dpbStatus.m_numLayers; dpbLayerCtr++) 1445 { 1446 Int layerIdx = dpbStatus.m_targetDecLayerIdList[dpbLayerCtr]; 1447 #else 1405 1448 for( Int layerIdx = 0; layerIdx < dpbStatus.m_numLayers; layerIdx++) 1406 1449 { 1450 #endif 1407 1451 // Check if picture with pocValue is present. 1408 1452 it = find( listOfPocsInEachLayer[layerIdx].begin(), listOfPocsInEachLayer[layerIdx].end(), pocValue ); … … 1487 1531 listOfPocsInEachLayer[layerIdx].erase( it ); 1488 1532 listOfPocsPositionInEachLayer[layerIdx].erase( listOfPocsPositionInEachLayer[layerIdx].begin() + picPosition ); 1489 } 1490 } 1533 #if FIX_ALIGN_BUMPING 1534 dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerIdx]]--; 1535 #endif 1536 } 1537 } 1538 #if !FIX_ALIGN_BUMPING 1491 1539 // Update sub-DPB status 1492 1540 for( Int subDpbIdx = 0; subDpbIdx < dpbStatus.m_numSubDpbs; subDpbIdx++) … … 1494 1542 dpbStatus.m_numPicsInSubDpb[subDpbIdx]--; 1495 1543 } 1544 #endif 1496 1545 dpbStatus.m_numAUsNotDisplayed--; 1497 1546 … … 1536 1585 // Find the VPS used for the pictures 1537 1586 // ------------------------------------- 1587 #if FIX_ALIGN_BUMPING 1588 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 1589 #else 1538 1590 for(Int i = 0; i < MAX_LAYERS; i++) 1591 #endif 1539 1592 { 1540 1593 if( m_acTDecTop[i].getListPic()->empty() ) … … 1584 1637 Void TAppDecTop::emptyUnusedPicturesNotNeededForOutput() 1585 1638 { 1639 #if FIX_ALIGN_BUMPING 1640 for(Int layerIdx = 0; layerIdx < MAX_VPS_LAYER_ID_PLUS1; layerIdx++) 1641 #else 1586 1642 for(Int layerIdx = 0; layerIdx < MAX_LAYERS; layerIdx++) 1643 #endif 1587 1644 { 1588 1645 TComList <TComPic*> *pcListPic = m_acTDecTop[layerIdx].getListPic(); … … 1639 1696 TComVPS *vps = NULL; 1640 1697 dpbStatus.init(); 1698 #if FIX_ALIGN_BUMPING 1699 for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++ ) 1700 #else 1641 1701 for( Int i = 0; i < MAX_LAYERS; i++ ) 1702 #endif 1642 1703 { 1643 1704 if( m_acTDecTop[i].getListPic()->empty() ) … … 1697 1758 dpbStatus.m_numAUsNotDisplayed = listOfPocs.size(); // Number of AUs not displayed 1698 1759 dpbStatus.m_numLayers = vps->getNumLayersInIdList( targetLsIdx ); 1760 #if FIX_ALIGN_BUMPING 1761 for(Int i = 0; i < dpbStatus.m_numLayers; i++) 1762 { 1763 dpbStatus.m_layerIdToSubDpbIdMap[vps->getLayerSetLayerIdList(targetLsIdx, i)] = i; 1764 dpbStatus.m_targetDecLayerIdList[i] = vps->getLayerSetLayerIdList(targetLsIdx, i); // Layer Id stored in a particular sub-DPB 1765 } 1766 dpbStatus.m_numSubDpbs = vps->getNumSubDpbs( targetLsIdx ); 1767 #else 1699 1768 dpbStatus.m_numSubDpbs = vps->getNumSubDpbs( vps->getOutputLayerSetIdx( 1700 1769 this->getCommonDecoderParams()->getTargetOutputLayerSetIdx() ) ); 1701 1770 #endif 1771 1772 #if FIX_ALIGN_BUMPING 1773 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 1774 #else 1702 1775 for(Int i = 0; i < dpbStatus.m_numLayers; i++) 1776 #endif 1703 1777 { 1704 1778 dpbStatus.m_numPicsNotDisplayedInLayer[i] = listOfPocsInEachLayer[i].size(); … … 1716 1790 { // All pictures in the DPB in that layer are to be output; this means other pictures would also be output 1717 1791 std::vector<Int> listOfPocs; 1792 #if FIX_ALIGN_BUMPING 1793 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1794 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_ID_PLUS1]; 1795 #else 1718 1796 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1719 1797 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1798 #endif 1720 1799 DpbStatus dpbStatus; 1721 1800 -
branches/SHM-upgrade/source/App/TAppDecoder/TAppDecTop.h
r928 r961 143 143 #endif 144 144 Int m_numPicsInSubDpb[MAX_LAYERS]; // Pictures marked as used_for_reference or needed for output in the sub-DPB 145 #if FIX_ALIGN_BUMPING 146 Int m_layerIdToSubDpbIdMap[MAX_VPS_LAYER_ID_PLUS1]; 147 Int m_targetDecLayerIdList[MAX_LAYERS]; 148 #endif 145 149 Bool m_maxLatencyIncrease; 146 150 Int m_maxLatencyPictures; … … 165 169 m_numSubDpbs = -1; 166 170 m_numLayers = -1; 171 #if FIX_ALIGN_BUMPING 172 ::memset( m_targetDecLayerIdList, 0, sizeof(m_targetDecLayerIdList) ); 173 for(Int i = 0; i < MAX_LAYERS; i++) 174 { 175 m_layerIdToSubDpbIdMap[i] = -1; 176 } 177 #endif 167 178 } 168 179 }; -
branches/SHM-upgrade/source/Lib/TLibCommon/CommonDef.h
r916 r961 311 311 Int m_targetLayerId; 312 312 Int m_targetOutputLayerSetIdx; 313 std::vector<Int> *m_targetDecLayerIdSet; 313 std::vector<Int> *m_targetDecLayerIdSet; 314 314 Bool m_valueCheckedFlag; 315 315 Int m_highestTId; 316 316 public: 317 CommonDecoderParams(): 317 CommonDecoderParams(): 318 #if FIX_CONF_MODE 319 m_targetLayerId(MAX_VPS_LAYER_ID_PLUS1) 320 #else 318 321 m_targetLayerId(0) 322 #endif 319 323 , m_targetOutputLayerSetIdx(-1) 320 324 , m_targetDecLayerIdSet(NULL) -
branches/SHM-upgrade/source/Lib/TLibCommon/TypeDef.h
r959 r961 47 47 #define O0215_PHASE_ALIGNMENT_REMOVAL 1 48 48 #define CONFORMANCE_BITSTREAM_MODE 1 ///< In order to generate the metadata related to conformance bitstreams 49 #define FIX_CONF_MODE 1 49 50 #define SIGNALLING_BITRATE_PICRATE_FIX 1 ///< Fix for signalling of bitrate and picture rate info in VPS VUI to be more aligned to JCTVC-R1008 50 51 #define INFERENCE_POC_MSB_VAL_PRESENT 1 ///< JCTVC-Q0146 -- poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0 … … 98 99 ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS 99 100 #define ALIGNED_BUMPING 1 ///< JCTVC-P0192: Align bumping of pictures in an AU 101 #define FIX_ALIGN_BUMPING 1 100 102 #define O0109_O0199_FLAGS_TO_VUI 1 ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui 101 103 #define O0109_VIEW_ID_LEN 1 ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews -
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.cpp
r947 r961 3001 3001 3002 3002 } 3003 #if FIX_CONF_MODE 3004 // Set correct value of targetLayerId 3005 Int targetOlsIdx = params->getTargetOutputLayerSetIdx(); 3006 Int targetLsIdx = vps->getOutputLayerSetIdx( targetOlsIdx ); 3007 params->setTargetLayerId( vps->getLayerSetLayerIdList( targetLsIdx, vps->getNumLayersInIdList(targetLsIdx)-1 ) ); 3008 #endif 3003 3009 } 3004 3010 #endif
Note: See TracChangeset for help on using the changeset viewer.