Skip to content
Snippets Groups Projects
Commit cc8f721a authored by Philip Cowan's avatar Philip Cowan Committed by Karsten Suehring
Browse files

JVET-P0184 : Decoding process for generating unavailable reference pictures

parent a273988f
No related branches found
No related tags found
No related merge requests found
......@@ -309,6 +309,10 @@ public:
int* m_spliceIdx;
int m_ctuNums;
#if JVET_P0184
bool interLayerRefPicFlag;
#endif
#if ENABLE_SPLIT_PARALLELISM
PelStorage m_bufs[PARL_SPLIT_MAX_NUM_JOBS][NUM_PIC_TYPES];
#else
......
......@@ -289,6 +289,8 @@
#define JVET_P0182 1 // JVET-P0182: Check to verify if vps_independent_layer_flag[layer_id] is true, then inter_layer_pics_present_flag must be false
#define JVET_P0184 1 //JVET-P0184: Decoding process for generating unavailable reference pictures
#define HEVC_SEI 0 // SEI messages that are defined in HEVC, but not in VVC
typedef std::pair<int, bool> TrMode;
......
......@@ -837,10 +837,18 @@ void DecLib::xCreateLostPicture(int iLostPoc)
}
#if JVET_N0278_FIXES
void DecLib::xCreateUnavailablePicture( int iUnavailablePoc, bool longTermFlag, const int layerId )
#if JVET_P0184
void DecLib::xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag, const int layerId, const bool interLayerRefPicFlag)
#else
void DecLib::xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag, const int layerId)
#endif
#else
#if JVET_P0184
void DecLib::xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag, const bool interLayerRefPicFlag)
#else
void DecLib::xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag)
#endif
#endif
{
msg(INFO, "\ninserting unavailable poc : %d\n", iUnavailablePoc);
#if JVET_N0278_FIXES
......@@ -861,6 +869,9 @@ void DecLib::xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag)
// for(int ctuRsAddr=0; ctuRsAddr<cFillPic->getNumberOfCtusInFrame(); ctuRsAddr++) { cFillPic->getCtu(ctuRsAddr)->initCtu(cFillPic, ctuRsAddr); }
cFillPic->referenced = true;
#if JVET_P0184
cFillPic->interLayerRefPicFlag = interLayerRefPicFlag;
#endif
cFillPic->longTerm = longTermFlag;
cFillPic->slices[0]->setPOC(iUnavailablePoc);
#if !JVET_P1006_PICTURE_HEADER
......@@ -1599,9 +1610,23 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
if ( ( (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_GDR) || (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) ) && m_apcSlicePilot->getNoIncorrectPicOutputFlag() )
{
#if JVET_N0278_FIXES
xCreateUnavailablePicture( lostPoc - 1, m_apcSlicePilot->getRPL0()->isRefPicLongterm( refPicIndex ), m_apcSlicePilot->getPic()->layerId );
#if JVET_P0184
if (m_apcSlicePilot->getRPL0()->isInterLayerRefPic(refPicIndex) == 0)
{
xCreateUnavailablePicture(lostPoc - 1, m_apcSlicePilot->getRPL0()->isRefPicLongterm(refPicIndex), m_apcSlicePilot->getPic()->layerId, m_apcSlicePilot->getRPL0()->isInterLayerRefPic(refPicIndex));
}
#else
xCreateUnavailablePicture(lostPoc - 1, m_apcSlicePilot->getRPL0()->isRefPicLongterm(refPicIndex), m_apcSlicePilot->getPic()->layerId);
#endif
#else
#if JVET_P0184
if (m_apcSlicePilot->getRPL0()->isInterLayerRefPic(refPicIndex) == 0)
{
xCreateUnavailablePicture(lostPoc - 1, m_apcSlicePilot->getRPL0()->isRefPicLongterm(refPicIndex), m_apcSlicePilot->getRPL0()->isInterLayerRefPic(refPicIndex));
}
#else
xCreateUnavailablePicture(lostPoc - 1, m_apcSlicePilot->getRPL0()->isRefPicLongterm(refPicIndex));
#endif
#endif
}
else
......@@ -1618,9 +1643,23 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
if (((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_GDR) || (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)) && m_apcSlicePilot->getNoIncorrectPicOutputFlag())
{
#if JVET_N0278_FIXES
xCreateUnavailablePicture( lostPoc - 1, m_apcSlicePilot->getRPL1()->isRefPicLongterm( refPicIndex ), m_apcSlicePilot->getPic()->layerId );
#if JVET_P0184
if (m_apcSlicePilot->getRPL1()->isInterLayerRefPic(refPicIndex) == 0)
{
xCreateUnavailablePicture(lostPoc - 1, m_apcSlicePilot->getRPL1()->isRefPicLongterm(refPicIndex), m_apcSlicePilot->getPic()->layerId, m_apcSlicePilot->getRPL1()->isInterLayerRefPic(refPicIndex));
}
#else
xCreateUnavailablePicture(lostPoc - 1, m_apcSlicePilot->getRPL1()->isRefPicLongterm(refPicIndex), m_apcSlicePilot->getPic()->layerId);
#endif
#else
#if JVET_P0184
if (m_apcSlicePilot->getRPL1()->isInterLayerRefPic(refPicIndex) == 0)
{
xCreateUnavailablePicture(lostPoc - 1, m_apcSlicePilot->getRPL1()->isRefPicLongterm(refPicIndex), m_apcSlicePilot->getRPL1()->isInterLayerRefPic(refPicIndex));
}
#else
xCreateUnavailablePicture(lostPoc - 1, m_apcSlicePilot->getRPL1()->isRefPicLongterm(refPicIndex));
#endif
#endif
}
else
......
......@@ -219,12 +219,20 @@ protected:
#if JVET_N0278_FIXES
Picture * xGetNewPicBuffer( const SPS &sps, const PPS &pps, const uint32_t temporalLayer, const int layerId );
void xCreateLostPicture( int iLostPOC, const int layerId );
void xCreateUnavailablePicture( int iUnavailablePoc, bool longTermFlag, const int layerId );
#if JVET_P0184
void xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag, const int layerId, const bool interLayerRefPicFlag);
#else
void xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag, const int layerId);
#endif
void xActivateParameterSets( const int layerId );
#else
Picture * xGetNewPicBuffer(const SPS &sps, const PPS &pps, const uint32_t temporalLayer);
void xCreateLostPicture (int iLostPOC);
#if JVET_P0184
void xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag, const bool interLayerRefPicFlag);
#else
void xCreateUnavailablePicture(int iUnavailablePoc, bool longTermFlag);
#endif
void xActivateParameterSets();
#endif
#if JVET_P1006_PICTURE_HEADER
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment