Commit 8fd8e20b authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'fix_1456_DPB_flush' into 'master'

Fix #1456: Incorrect DPB flush when mixed NALU types is enabled

See merge request jvet/VVCSoftware_VTM!2009
parents ae8af8ab 6ba55b0c
......@@ -198,10 +198,17 @@ uint32_t DecApp::decode()
(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL ||
nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP))
{
m_newCLVS[nalu.m_nuhLayerId] = true; // An IDR picture starts a new CLVS
if (!m_cDecLib.getMixedNaluTypesInPicFlag())
{
m_newCLVS[nalu.m_nuhLayerId] = true; // An IDR picture starts a new CLVS
#if !JVET_S0078_NOOUTPUTPRIORPICFLAG
xFlushOutput(pcListPic, nalu.m_nuhLayerId);
xFlushOutput(pcListPic, nalu.m_nuhLayerId);
#endif
}
else
{
m_newCLVS[nalu.m_nuhLayerId] = false;
}
}
else if (m_cDecLib.getFirstSliceInPicture() && nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA && isEosPresentInLastPu)
{
......
......@@ -1491,7 +1491,7 @@ void Slice::applyReferencePictureListBasedMarking( PicList& rcListPic, const Ref
int i, isReference;
checkLeadingPictureRestrictions(rcListPic, pps);
bool isNeedToCheck = (this->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || this->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL) ? false : true;
bool isNeedToCheck = (this->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || this->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL) && !pps.getMixedNaluTypesInPicFlag() ? false : true;
// mark long-term reference pictures in List0
for( i = 0; i < pRPL0->getNumberOfShorttermPictures() + pRPL0->getNumberOfLongtermPictures() + pRPL0->getNumberOfInterLayerPictures(); i++ )
......
......@@ -2022,6 +2022,19 @@ void DecLib::xDecodePicHeader( InputNALUnit& nalu )
m_picHeader.setValid();
}
bool DecLib::getMixedNaluTypesInPicFlag()
{
if (!m_picHeader.isValid())
{
return false;
}
PPS *pps = m_parameterSetManager.getPPS(m_picHeader.getPPSId());
CHECK(pps == 0, "No PPS present");
return pps->getMixedNaluTypesInPicFlag() != 0;
}
bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDisplay )
{
m_apcSlicePilot->setPicHeader( &m_picHeader );
......
......@@ -290,6 +290,8 @@ public:
void setTOlsIdxOpiFlag(bool tOlsIdxOpiSet) { m_tOlsIdxTidOpiSet = tOlsIdxOpiSet; }
const OPI* getOPI() { return m_opi; }
bool getMixedNaluTypesInPicFlag();
protected:
void xUpdateRasInit(Slice* slice);
......
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