Changeset 798 in SHVCSoftware for branches/SHM-6-dev/source/App
- Timestamp:
- 10 Jun 2014, 01:10:15 (11 years ago)
- Location:
- branches/SHM-6-dev/source/App/TAppDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/App/TAppDecoder/TAppDecTop.cpp
r746 r798 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 … … 1504 1534 , std::vector<Int> *listOfPocsPositionInEachLayer 1505 1535 , DpbStatus &dpbStatus 1536 #if POC_RESET_IDC_DECODER 1537 , Bool notOutputCurrAu 1538 #endif 1506 1539 ) 1507 1540 { … … 1528 1561 vps = pic->getSlice(0)->getVPS(); 1529 1562 } 1530 1531 std::vector<Int>::iterator it;1532 if( pic->getOutputMark() ) // && pic->getPOC() > m_aiPOCLastDisplay[i])1533 { 1534 it = find( listOfPocs.begin(), listOfPocs.end(), pic->getPOC() ); // Check if already included1535 if( it == listOfPocs.end() ) // New POC value - i.e. new AU - add to the list1563 #if POC_RESET_IDC_DECODER 1564 if( !(pic->isCurrAu() && notOutputCurrAu ) ) 1565 { 1566 #endif 1567 std::vector<Int>::iterator it; 1568 if( pic->getOutputMark() ) // && pic->getPOC() > m_aiPOCLastDisplay[i]) 1536 1569 { 1537 listOfPocs.push_back( pic->getPOC() ); 1570 it = find( listOfPocs.begin(), listOfPocs.end(), pic->getPOC() ); // Check if already included 1571 if( it == listOfPocs.end() ) // New POC value - i.e. new AU - add to the list 1572 { 1573 listOfPocs.push_back( pic->getPOC() ); 1574 } 1575 listOfPocsInEachLayer [i].push_back( pic->getPOC() ); // POC to be output in each layer 1576 listOfPocsPositionInEachLayer [i].push_back( picPositionInList ); // For ease of access 1538 1577 } 1539 listOfPocsInEachLayer [i].push_back( pic->getPOC() ); // POC to be output in each layer1540 listOfPocsPositionInEachLayer [i].push_back( picPositionInList ); // For ease of access1541 }1542 if( pic->getSlice(0)->isReferenced() || pic->getOutputMark() )1543 { 1544 dpbStatus.m_numPicsInLayer[i]++; // Count pictures that are "used for reference" or "needed for output"1545 } 1578 if( pic->getSlice(0)->isReferenced() || pic->getOutputMark() ) 1579 { 1580 dpbStatus.m_numPicsInLayer[i]++; // Count pictures that are "used for reference" or "needed for output" 1581 } 1582 #if POC_RESET_IDC_DECODER 1583 } 1584 #endif 1546 1585 } 1547 1586 iterPic++; … … 1569 1608 } 1570 1609 assert( dpbStatus.m_numAUsNotDisplayed != -1 ); 1571 1572 1573 1610 } 1611 1612 #if POC_RESET_IDC_DECODER 1613 Void TAppDecTop::outputAllPictures(Int layerId, Bool notOutputCurrPic) 1614 { 1615 { // All pictures in the DPB in that layer are to be output; this means other pictures would also be output 1616 std::vector<Int> listOfPocs; 1617 std::vector<Int> listOfPocsInEachLayer[MAX_LAYERS]; 1618 std::vector<Int> listOfPocsPositionInEachLayer[MAX_LAYERS]; 1619 DpbStatus dpbStatus; 1620 1621 // Find the status of the DPB 1622 xFindDPBStatus(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus, notOutputCurrPic); 1623 1624 if( listOfPocs.size() ) 1625 { 1626 while( listOfPocsInEachLayer[layerId].size() ) // As long as there picture in the layer to be output 1627 { 1628 bumpingProcess( listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, dpbStatus ); 1629 } 1630 } 1631 } 1632 } 1633 #endif 1574 1634 #endif 1575 1635 //! \} -
branches/SHM-6-dev/source/App/TAppDecoder/TAppDecTop.h
r644 r798 107 107 108 108 Void xOutputAndMarkPic( TComPic *pic, const Char *reconFile, const Int layerID, Int &pocLastDisplay, DpbStatus &dpbStatus); 109 #if POC_RESET_IDC_DECODER 110 Void outputAllPictures(Int layerId, Bool notOutputCurrAu); 111 #endif 109 112 Void xFindDPBStatus( std::vector<Int> &listOfPocs 110 113 , std::vector<Int> *listOfPocsInEachLayer 111 114 , std::vector<Int> *listOfPocsPositionInEachLayer 112 115 , DpbStatus &dpbStatus 116 #if POC_RESET_IDC_DECODER 117 , Bool notOutputCurrAu = true 118 #endif 113 119 ); 114 120
Note: See TracChangeset for help on using the changeset viewer.