Changeset 1221 in SHVCSoftware for branches/SHM-dev/source/App/TAppDecoder
- Timestamp:
- 9 Jul 2015, 00:02:39 (10 years ago)
- Location:
- branches/SHM-dev/source/App/TAppDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1210 r1221 1284 1284 1285 1285 #if Q0074_COLOUR_REMAPPING_SEI 1286 if (m_colourRemapSEIEnabled)1286 if( m_colourRemapSEIEnabled ) 1287 1287 { 1288 1288 SEIMessages colourRemappingInfo = getSeisByType(pic->getSEIs(), SEI::COLOUR_REMAPPING_INFO ); … … 1344 1344 pic->getPicYuvRec()->setBorderExtension( false ); 1345 1345 1346 #if FIX_ALIGN_BUMPING1347 1346 dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerId]]--; 1348 #else1349 dpbStatus.m_numPicsInSubDpb[layerIdx]--;1350 #endif1351 1347 } 1352 1348 } … … 1360 1356 { 1361 1357 std::vector<Int> listOfPocs; 1362 #if FIX_ALIGN_BUMPING1363 1358 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1364 1359 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1365 #else 1366 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1367 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1368 #endif 1360 1369 1361 DpbStatus dpbStatus; 1370 1362 … … 1384 1376 markAllPicturesAsErased(layerId); 1385 1377 } 1378 1386 1379 Void TAppDecTop::flushAllPictures(Bool outputPictures) 1387 1380 { … … 1392 1385 { 1393 1386 std::vector<Int> listOfPocs; 1394 #if FIX_ALIGN_BUMPING1395 1387 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1396 1388 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1397 #else 1398 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1399 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1400 #endif 1389 1401 1390 DpbStatus dpbStatus; 1402 1391 1403 1392 // Find the status of the DPB 1404 #if SVC_POC1405 1393 xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus, false); 1406 #else1407 xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus);1408 #endif1409 1394 1410 1395 while( dpbStatus.m_numAUsNotDisplayed ) … … 1420 1405 Void TAppDecTop::markAllPicturesAsErased() 1421 1406 { 1422 #if FIX_ALIGN_BUMPING1423 1407 for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++) 1424 #else1425 for(Int i = 0; i < MAX_LAYERS; i++)1426 #endif1427 1408 { 1428 1409 markAllPicturesAsErased(i); … … 1456 1437 1457 1438 Void TAppDecTop::checkOutputBeforeDecoding(Int layerIdx) 1458 { 1459 1439 { 1460 1440 std::vector<Int> listOfPocs; 1461 #if FIX_ALIGN_BUMPING1462 1441 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1463 1442 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1464 #else 1465 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1466 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1467 #endif 1443 1468 1444 DpbStatus dpbStatus; 1469 1445 … … 1482 1458 // Find DPB-information from the VPS 1483 1459 DpbStatus maxDpbLimit; 1484 #if FIX_ALIGN_BUMPING 1485 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 1486 ? dpbStatus.m_layerIdToSubDpbIdMap[0] 1487 : dpbStatus.m_layerIdToSubDpbIdMap[layerIdx]; 1488 #else 1489 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ? 0 : layerIdx; 1490 #endif 1460 1461 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ? dpbStatus.m_layerIdToSubDpbIdMap[0] : dpbStatus.m_layerIdToSubDpbIdMap[layerIdx]; 1462 1491 1463 findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit); 1464 1492 1465 // Assume that listOfPocs is sorted in increasing order - if not have to sort it. 1493 1466 while( ifInvokeBumpingBeforeDecoding(dpbStatus, maxDpbLimit, layerIdx, subDpbIdx) ) … … 1500 1473 { 1501 1474 std::vector<Int> listOfPocs; 1502 #if FIX_ALIGN_BUMPING1503 1475 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1504 1476 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1505 #else 1506 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1507 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1508 #endif 1477 1509 1478 DpbStatus dpbStatus; 1510 1479 … … 1538 1507 std::vector<int>::iterator it; 1539 1508 TComList<TComPic*>::iterator iterPic; 1540 #if FIX_ALIGN_BUMPING 1509 1541 1510 for( Int dpbLayerCtr = 0; dpbLayerCtr < dpbStatus.m_numLayers; dpbLayerCtr++) 1542 1511 { 1543 1512 Int layerId = dpbStatus.m_targetDecLayerIdList[dpbLayerCtr]; 1544 #else 1545 for( Int layerIdx = 0; layerIdx < dpbStatus.m_numLayers; layerIdx++) 1546 { 1547 #endif 1513 1548 1514 // Check if picture with pocValue is present. 1549 1515 it = find( listOfPocsInEachLayer[layerId].begin(), listOfPocsInEachLayer[layerId].end(), pocValue ); … … 1585 1551 listOfPocsInEachLayer[layerId].erase( it ); 1586 1552 listOfPocsPositionInEachLayer[layerId].erase( listOfPocsPositionInEachLayer[layerId].begin() + picPosition ); 1587 #if FIX_ALIGN_BUMPING1588 1553 dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerId]]--; 1589 #endif 1590 } 1591 } 1592 #if !FIX_ALIGN_BUMPING 1593 // Update sub-DPB status 1594 for( Int subDpbIdx = 0; subDpbIdx < dpbStatus.m_numSubDpbs; subDpbIdx++) 1595 { 1596 dpbStatus.m_numPicsInSubDpb[subDpbIdx]--; 1597 } 1598 #endif 1554 } 1555 } 1556 1599 1557 dpbStatus.m_numAUsNotDisplayed--; 1600 1558 … … 1688 1646 // Find the VPS used for the pictures 1689 1647 // ------------------------------------- 1690 #if FIX_ALIGN_BUMPING 1691 for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++) 1692 #else 1693 for(Int i = 0; i < MAX_LAYERS; i++) 1694 #endif 1648 for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ ) 1695 1649 { 1696 1650 if( m_acTDecTop[i].getListPic()->empty() ) … … 1699 1653 continue; 1700 1654 } 1655 1701 1656 std::vector<Int>::const_iterator it; 1702 1657 it = find( listOfPocsInEachLayer[i].begin(), listOfPocsInEachLayer[i].end(), listOfPocs[0] ); 1703 1658 TComList<TComPic*>::iterator iterPic; 1659 1704 1660 if( it != listOfPocsInEachLayer[i].end() ) 1705 1661 { 1706 1662 Int picPosition = (Int)std::distance( listOfPocsInEachLayer[i].begin(), it ); 1707 1663 Int j; 1708 for(j = 0, iterPic = m_acTDecTop[i].getListPic()->begin(); j < listOfPocsPositionInEachLayer[i][picPosition]; j++) // Picture to be output 1664 1665 // Picture to be output 1666 for( j = 0, iterPic = m_acTDecTop[i].getListPic()->begin(); j < listOfPocsPositionInEachLayer[i][picPosition]; j++ ) 1709 1667 { 1710 1668 iterPic++; 1711 1669 } 1670 1712 1671 TComPic *pic = *iterPic; 1713 1672 vps = pic->getSlice(0)->getVPS(); … … 1721 1680 maxDpbLimit.m_numAUsNotDisplayed = vps->getMaxVpsNumReorderPics( targetOutputLsIdx, highestTId ); // m_numAUsNotDisplayed is only variable name - stores reorderpics 1722 1681 maxDpbLimit.m_maxLatencyIncrease = vps->getMaxVpsLatencyIncreasePlus1(targetOutputLsIdx, highestTId ) > 0; 1682 1723 1683 if( maxDpbLimit.m_maxLatencyIncrease ) 1724 1684 { 1725 1685 maxDpbLimit.m_maxLatencyPictures = vps->getMaxVpsNumReorderPics( targetOutputLsIdx, highestTId ) + vps->getMaxVpsLatencyIncreasePlus1(targetOutputLsIdx, highestTId ) - 1; 1726 1686 } 1687 1727 1688 for(Int i = 0; i < vps->getNumLayersInIdList( targetLsIdx ); i++) 1728 1689 { 1729 #if RESOUTION_BASED_DPB1730 maxDpbLimit.m_numPicsInLayer[i] = vps->getMaxVpsLayerDecPicBuffMinus1( targetOutputLsIdx, i, highestTId ) + 1;1731 maxDpbLimit.m_numPicsInSubDpb[vps->getSubDpbAssigned( targetLsIdx, i )] = vps->getMaxVpsDecPicBufferingMinus1( targetOutputLsIdx, vps->getSubDpbAssigned( targetLsIdx, i ), highestTId) + 1;1732 #else1733 1690 maxDpbLimit.m_numPicsInSubDpb[i] = vps->getMaxVpsDecPicBufferingMinus1( targetOutputLsIdx, i, highestTId) + 1; 1734 #endif1735 1691 } 1736 1692 // ------------------------------------- … … 1738 1694 return vps; 1739 1695 } 1696 1740 1697 Void TAppDecTop::emptyUnusedPicturesNotNeededForOutput() 1741 1698 { 1742 #if FIX_ALIGN_BUMPING 1743 for(Int layerIdx = 0; layerIdx < MAX_VPS_LAYER_IDX_PLUS1; layerIdx++) 1744 #else 1745 for(Int layerIdx = 0; layerIdx < MAX_LAYERS; layerIdx++) 1746 #endif 1699 for( Int layerIdx = 0; layerIdx < MAX_VPS_LAYER_IDX_PLUS1; layerIdx++ ) 1747 1700 { 1748 1701 TComList <TComPic*> *pcListPic = m_acTDecTop[layerIdx].getListPic(); … … 1792 1745 TComVPS *vps = NULL; 1793 1746 dpbStatus.init(); 1794 #if FIX_ALIGN_BUMPING 1747 1795 1748 for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ ) 1796 #else1797 for( Int i = 0; i < MAX_LAYERS; i++ )1798 #endif1799 1749 { 1800 1750 if( m_acTDecTop[i].getListPic()->empty() ) … … 1847 1797 std::sort( listOfPocs.begin(), listOfPocs.end() ); // Sort in increasing order of POC 1848 1798 Int targetLsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() ); 1799 1849 1800 // Update status 1850 1801 dpbStatus.m_numAUsNotDisplayed = (Int)listOfPocs.size(); // Number of AUs not displayed 1851 1802 dpbStatus.m_numLayers = vps->getNumLayersInIdList( targetLsIdx ); 1852 #if FIX_ALIGN_BUMPING 1853 for( Int i = 0; i < dpbStatus.m_numLayers; i++)1803 1804 for( Int i = 0; i < dpbStatus.m_numLayers; i++ ) 1854 1805 { 1855 1806 dpbStatus.m_layerIdToSubDpbIdMap[vps->getLayerSetLayerIdList(targetLsIdx, i)] = i; … … 1857 1808 } 1858 1809 dpbStatus.m_numSubDpbs = vps->getNumSubDpbs( targetLsIdx ); 1859 #else 1860 dpbStatus.m_numSubDpbs = vps->getNumSubDpbs( vps->getOutputLayerSetIdx( 1861 this->getCommonDecoderParams()->getTargetOutputLayerSetIdx() ) ); 1862 #endif 1863 1864 #if FIX_ALIGN_BUMPING 1865 for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++) 1866 #else 1867 for(Int i = 0; i < dpbStatus.m_numLayers; i++) 1868 #endif 1810 1811 for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ ) 1869 1812 { 1870 1813 dpbStatus.m_numPicsNotDisplayedInLayer[i] = (Int)listOfPocsInEachLayer[i].size(); … … 1877 1820 { // All pictures in the DPB in that layer are to be output; this means other pictures would also be output 1878 1821 std::vector<Int> listOfPocs; 1879 #if FIX_ALIGN_BUMPING1880 1822 std::vector<Int> listOfPocsInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1881 1823 std::vector<Int> listOfPocsPositionInEachLayer[MAX_VPS_LAYER_IDX_PLUS1]; 1882 #else 1883 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1884 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1885 #endif 1824 1886 1825 DpbStatus dpbStatus; 1887 1826 … … 1898 1837 } 1899 1838 } 1900 #endif 1839 #endif //ALIGNED_BUMPING 1901 1840 1902 1841 #if Q0074_COLOUR_REMAPPING_SEI -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h
r1210 r1221 136 136 Int m_numPicsNotDisplayedInLayer[MAX_LAYERS]; 137 137 Int m_numPicsInSubDpb[MAX_LAYERS]; // Pictures marked as used_for_reference or needed for output in the sub-DPB 138 #if FIX_ALIGN_BUMPING139 138 Int m_layerIdToSubDpbIdMap[MAX_VPS_LAYER_IDX_PLUS1]; 140 139 Int m_targetDecLayerIdList[MAX_LAYERS]; 141 #endif142 140 Bool m_maxLatencyIncrease; 143 141 Int m_maxLatencyPictures; … … 159 157 m_numSubDpbs = -1; 160 158 m_numLayers = -1; 161 #if FIX_ALIGN_BUMPING162 159 ::memset( m_targetDecLayerIdList, 0, sizeof(m_targetDecLayerIdList) ); 163 for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++) 160 161 for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++ ) 164 162 { 165 163 m_layerIdToSubDpbIdMap[i] = -1; 166 164 } 167 #endif168 165 } 169 166 };
Note: See TracChangeset for help on using the changeset viewer.