Commit 927af730 authored by Remy Foray's avatar Remy Foray
Browse files

Fix #1465: skip mixed nalu leading pictures when beginning a stream

parent 091d3bb5
......@@ -2282,7 +2282,7 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
// Skip pictures due to random access
if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay, pps->getMixedNaluTypesInPicFlag()))
{
m_prevSliceSkipped = true;
m_skippedPOC = m_apcSlicePilot->getPOC();
......@@ -3055,7 +3055,7 @@ bool DecLib::decode(InputNALUnit& nalu, int& iSkipFrame, int& iPOCLastDisplay, i
* equal to or greater than the random access point POC is attempted. For non IDR/CRA/BLA random
* access point there is no guarantee that the decoder will not crash.
*/
bool DecLib::isRandomAccessSkipPicture( int& iSkipFrame, int& iPOCLastDisplay )
bool DecLib::isRandomAccessSkipPicture( int& iSkipFrame, int& iPOCLastDisplay, bool mixedNaluInPicFlag )
{
if (iSkipFrame)
{
......@@ -3084,7 +3084,9 @@ bool DecLib::isRandomAccessSkipPicture( int& iSkipFrame, int& iPOCLastDisplay )
}
}
// skip the reordered pictures, if necessary
else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL))
else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess &&
(m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL ||
mixedNaluInPicFlag))
{
iPOCLastDisplay++;
return true;
......
......@@ -119,7 +119,7 @@ private:
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
CacheModel m_cacheModel;
#endif
bool isRandomAccessSkipPicture(int& iSkipFrame, int& iPOCLastDisplay);
bool isRandomAccessSkipPicture(int& iSkipFrame, int& iPOCLastDisplay, bool mixedNaluInPicFlag);
Picture* m_pcPic;
uint32_t m_uiSliceSegmentIdx;
uint32_t m_prevLayerID;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment