Ticket #1261: Ticket_1261_r0.patch
File Ticket_1261_r0.patch, 3.5 KB (added by rickard, 11 years ago) |
---|
-
source/App/TAppDecoder/TAppDecTop.cpp
274 274 275 275 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 276 276 Int numPicsNotYetDisplayed = 0; 277 277 Int dpbFullness = 0; 278 TComSPS* activeSPS = m_cTDecTop.getActiveSPS(); 279 UInt numReorderPicsHighestTid; 280 UInt maxDecPicBufferingHighestTid; 281 UInt maxNrSublayers = activeSPS->getMaxTLayers(); 282 283 if(m_iMaxTemporalLayer == -1 || m_iMaxTemporalLayer >= maxNrSublayers) 284 { 285 numReorderPicsHighestTid = activeSPS->getNumReorderPics(maxNrSublayers-1); 286 maxDecPicBufferingHighestTid = activeSPS->getMaxDecPicBuffering(maxNrSublayers-1); 287 } 288 else 289 { 290 numReorderPicsHighestTid = activeSPS->getNumReorderPics(m_iMaxTemporalLayer); 291 maxDecPicBufferingHighestTid = activeSPS->getMaxDecPicBuffering(m_iMaxTemporalLayer); 292 } 293 278 294 while (iterPic != pcListPic->end()) 279 295 { 280 296 TComPic* pcPic = *(iterPic); 281 297 if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay) 282 298 { 283 299 numPicsNotYetDisplayed++; 300 dpbFullness++; 284 301 } 302 else if(pcPic->getSlice( 0 )->isReferenced()) 303 { 304 dpbFullness++; 305 } 285 306 iterPic++; 286 307 } 287 308 iterPic = pcListPic->begin(); … … 302 323 iterPic++; 303 324 TComPic* pcPicBottom = *(iterPic); 304 325 305 if ( pcPicTop->getOutputMark() && (numPicsNotYetDisplayed > pcPicTop->getNumReorderPics(tId) && !(pcPicTop->getPOC()%2) && pcPicBottom->getPOC() == pcPicTop->getPOC()+1) 306 && pcPicBottom->getOutputMark() && (numPicsNotYetDisplayed > pcPicBottom->getNumReorderPics(tId) && (pcPicTop->getPOC() == m_iPOCLastDisplay+1 || m_iPOCLastDisplay<0))) 326 if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() && 327 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid) && 328 (!(pcPicTop->getPOC()%2) && pcPicBottom->getPOC() == pcPicTop->getPOC()+1) && 329 (pcPicTop->getPOC() == m_iPOCLastDisplay+1 || m_iPOCLastDisplay < 0)) 307 330 { 308 331 // write to file 309 332 numPicsNotYetDisplayed = numPicsNotYetDisplayed-2; … … 365 388 { 366 389 pcPic = *(iterPic); 367 390 368 if ( pcPic->getOutputMark() && (numPicsNotYetDisplayed > pcPic->getNumReorderPics(tId) && pcPic->getPOC() > m_iPOCLastDisplay)) 391 if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay && 392 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid)) 369 393 { 370 394 // write to file 371 395 numPicsNotYetDisplayed--; 396 if(pcPic->getSlice(0)->isReferenced() == false) 397 { 398 dpbFullness--; 399 } 400 372 401 if ( m_pchReconFile ) 373 402 { 374 403 const Window &conf = pcPic->getConformanceWindow(); -
source/Lib/TLibDecoder/TDecTop.h
119 119 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay); 120 120 Void deletePicBuffer(); 121 121 122 123 TComSPS* getActiveSPS() { return m_parameterSetManagerDecoder.getActiveSPS(); } 124 125 122 126 Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic); 123 127 #if SETTING_NO_OUT_PIC_PRIOR 124 128 Void checkNoOutputPriorPics (TComList<TComPic*>*& rpcListPic);