Changeset 815 in SHVCSoftware for trunk/source/App/TAppDecoder/TAppDecTop.cpp
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-6-dev merged: 715-751,753-814
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-6-dev/source merged: 715-726,728-744,746-751,753-802,804-814
- Property svn:mergeinfo changed
-
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r713 r815 191 191 InputNALUnit nalu; 192 192 byteStreamNALUnit(bytestream, nalUnit, stats); 193 194 193 // call actual decoding function 195 194 Bool bNewPicture = false; … … 215 214 { 216 215 bNewPicture = m_acTDecTop[nalu.m_layerId].decode(nalu, m_iSkipFrame, m_aiPOCLastDisplay[nalu.m_layerId], curLayerId, bNewPOC); 216 #if POC_RESET_IDC_DECODER 217 if ( (bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() == 3) || (m_acTDecTop[nalu.m_layerId].getParseIdc() == 0) ) 218 #else 217 219 if (bNewPicture) 220 #endif 218 221 { 219 222 bitstreamFile.clear(); … … 225 228 bytestream.reset(); 226 229 } 227 } 228 } 229 230 #if POC_RESET_IDC_DECODER 231 else if(m_acTDecTop[nalu.m_layerId].getParseIdc() == 1) 232 { 233 bitstreamFile.clear(); 234 // This is before third parse of the NAL unit, and 235 // location points to correct beginning of the NALU 236 bitstreamFile.seekg(location); 237 bytestream.reset(); 238 } 239 #endif 240 } 241 } 242 243 #if POC_RESET_IDC_DECODER 244 if ((bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() == 3) || (m_acTDecTop[nalu.m_layerId].getParseIdc() == 0) || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 245 #else 230 246 if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 247 #endif 231 248 { 232 249 #if O0194_DIFFERENT_BITDEPTH_EL_BL … … 245 262 } 246 263 264 #if POC_RESET_IDC_DECODER 265 if( bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() == 0 ) 266 { 267 outputAllPictures( nalu.m_layerId, true ); 268 } 269 #endif 270 247 271 if( pcListPic ) 248 272 { … … 269 293 flushAllPictures( nalu.m_layerId, outputPicturesFlag ); 270 294 } 295 296 #if POC_RESET_IDC_DECODER 297 if( bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() != 0 ) 298 // New picture, slice header parsed but picture not decoded 299 #else 271 300 if( bNewPicture ) // New picture, slice header parsed but picture not decoded 301 #endif 272 302 { 273 303 #if NO_OUTPUT_OF_PRIOR_PICS … … 1235 1265 1236 1266 // Find the status of the DPB 1267 #if POC_RESET_IDC_DECODER 1268 xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus, false); 1269 #else 1237 1270 xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus); 1271 #endif 1238 1272 1239 1273 while( dpbStatus.m_numAUsNotDisplayed ) … … 1282 1316 // Find DPB-information from the VPS 1283 1317 DpbStatus maxDpbLimit; 1318 #if RESOLUTION_BASED_DPB 1284 1319 Int targetLsIdx, subDpbIdx; 1285 1320 TComVPS *vps = findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit); 1321 1286 1322 if( getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ) 1287 1323 { … … 1294 1330 subDpbIdx = vps->getSubDpbAssigned( targetLsIdx, layerIdx ); 1295 1331 } 1332 #else 1333 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ? 0 : layerIdx; 1334 findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit); 1335 #endif 1296 1336 // Assume that listOfPocs is sorted in increasing order - if not have to sort it. 1297 1337 while( ifInvokeBumpingBeforeDecoding(dpbStatus, maxDpbLimit, layerIdx, subDpbIdx) ) … … 1437 1477 for(Int i = 0; i < vps->getNumLayersInIdList( targetLsIdx ); i++) 1438 1478 { 1479 #if RESOUTION_BASED_DPB 1439 1480 maxDpbLimit.m_numPicsInLayer[i] = vps->getMaxVpsLayerDecPicBuffMinus1( targetOutputLsIdx, i, highestTId ) + 1; 1440 1481 maxDpbLimit.m_numPicsInSubDpb[vps->getSubDpbAssigned( targetLsIdx, i )] = vps->getMaxVpsDecPicBufferingMinus1( targetOutputLsIdx, vps->getSubDpbAssigned( targetLsIdx, i ), highestTId) + 1; 1482 #else 1483 maxDpbLimit.m_numPicsInSubDpb[i] = vps->getMaxVpsDecPicBufferingMinus1( targetOutputLsIdx, i, highestTId) + 1; 1484 #endif 1441 1485 } 1442 1486 // ------------------------------------- … … 1472 1516 retVal |= ( dpbStatus.m_numPicsInSubDpb[subDpbIdx] >= dpbLimit.m_numPicsInSubDpb[subDpbIdx] ); 1473 1517 1518 #if RESOLUTION_BASED_DPB 1474 1519 // Number of pictures in each layer 1475 1520 retVal |= ( dpbStatus.m_numPicsInLayer[layerIdx] >= dpbLimit.m_numPicsInLayer[layerIdx]); 1521 #endif 1476 1522 1477 1523 return retVal; … … 1492 1538 , std::vector<Int> *listOfPocsPositionInEachLayer 1493 1539 , DpbStatus &dpbStatus 1540 #if POC_RESET_IDC_DECODER 1541 , Bool notOutputCurrAu 1542 #endif 1494 1543 ) 1495 1544 { … … 1516 1565 vps = pic->getSlice(0)->getVPS(); 1517 1566 } 1518 1519 std::vector<Int>::iterator it;1520 if( pic->getOutputMark() ) // && pic->getPOC() > m_aiPOCLastDisplay[i])1521 { 1522 it = find( listOfPocs.begin(), listOfPocs.end(), pic->getPOC() ); // Check if already included1523 if( it == listOfPocs.end() ) // New POC value - i.e. new AU - add to the list1567 #if POC_RESET_IDC_DECODER 1568 if( !(pic->isCurrAu() && notOutputCurrAu ) ) 1569 { 1570 #endif 1571 std::vector<Int>::iterator it; 1572 if( pic->getOutputMark() ) // && pic->getPOC() > m_aiPOCLastDisplay[i]) 1524 1573 { 1525 listOfPocs.push_back( pic->getPOC() ); 1574 it = find( listOfPocs.begin(), listOfPocs.end(), pic->getPOC() ); // Check if already included 1575 if( it == listOfPocs.end() ) // New POC value - i.e. new AU - add to the list 1576 { 1577 listOfPocs.push_back( pic->getPOC() ); 1578 } 1579 listOfPocsInEachLayer [i].push_back( pic->getPOC() ); // POC to be output in each layer 1580 listOfPocsPositionInEachLayer [i].push_back( picPositionInList ); // For ease of access 1526 1581 } 1527 listOfPocsInEachLayer [i].push_back( pic->getPOC() ); // POC to be output in each layer1528 listOfPocsPositionInEachLayer [i].push_back( picPositionInList ); // For ease of access1529 }1530 if( pic->getSlice(0)->isReferenced() || pic->getOutputMark() )1531 { 1532 dpbStatus.m_numPicsInLayer[i]++; // Count pictures that are "used for reference" or "needed for output"1533 } 1582 if( pic->getSlice(0)->isReferenced() || pic->getOutputMark() ) 1583 { 1584 dpbStatus.m_numPicsInLayer[i]++; // Count pictures that are "used for reference" or "needed for output" 1585 } 1586 #if POC_RESET_IDC_DECODER 1587 } 1588 #endif 1534 1589 } 1535 1590 iterPic++; … … 1550 1605 { 1551 1606 dpbStatus.m_numPicsNotDisplayedInLayer[i] = listOfPocsInEachLayer[i].size(); 1607 #if RESOLUTION_BASED_DPB 1552 1608 dpbStatus.m_numPicsInSubDpb[vps->getSubDpbAssigned(targetLsIdx,i)] += dpbStatus.m_numPicsInLayer[i]; 1609 #else 1610 dpbStatus.m_numPicsInSubDpb[i] += dpbStatus.m_numPicsInLayer[i]; 1611 #endif 1553 1612 } 1554 1613 assert( dpbStatus.m_numAUsNotDisplayed != -1 ); 1555 1556 1557 1614 } 1615 1616 #if POC_RESET_IDC_DECODER 1617 Void TAppDecTop::outputAllPictures(Int layerId, Bool notOutputCurrPic) 1618 { 1619 { // All pictures in the DPB in that layer are to be output; this means other pictures would also be output 1620 std::vector<Int> listOfPocs; 1621 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1622 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1623 DpbStatus dpbStatus; 1624 1625 // Find the status of the DPB 1626 xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus, notOutputCurrPic); 1627 1628 if( listOfPocs.size() ) 1629 { 1630 while( listOfPocsInEachLayer[layerId].size() ) // As long as there picture in the layer to be output 1631 { 1632 bumpingProcess( listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus ); 1633 } 1634 } 1635 } 1636 } 1637 #endif 1558 1638 #endif 1559 1639 //! \}
Note: See TracChangeset for help on using the changeset viewer.