Commit f808bf86 authored by Hendry's avatar Hendry

JVET-S0202: At least one picture with PictureOutputFlag equal to 1 in the bitstream

parent b0bbd231
Pipeline #5461 passed with stage
in 10 minutes and 32 seconds
......@@ -128,6 +128,10 @@ uint32_t DecApp::decode()
bool isEosPresentInPu = false;
#endif
#if JVET_S0202_AT_LEAST_ONE_OUTPUT_PICTURE
bool outputPicturePresentInBitstream = false;
#endif
while (!!bitstreamFile)
{
InputNALUnit nalu;
......@@ -274,6 +278,20 @@ uint32_t DecApp::decode()
// write reconstruction to file
if( bNewPicture )
{
#if JVET_S0202_AT_LEAST_ONE_OUTPUT_PICTURE
if( !outputPicturePresentInBitstream )
{
PicList::iterator iterPic = pcListPic->begin();
while (!outputPicturePresentInBitstream && iterPic != pcListPic->end())
{
Picture *pcPic = *(iterPic);
if( pcPic->neededForOutput )
{
outputPicturePresentInBitstream = true;
}
}
}
#endif
xWriteOutput( pcListPic, nalu.m_temporalId );
}
if (nalu.m_nalUnitType == NAL_UNIT_EOS)
......@@ -321,6 +339,22 @@ uint32_t DecApp::decode()
m_cDecLib.resetAccessUnitPicInfo();
}
}
#if JVET_S0202_AT_LEAST_ONE_OUTPUT_PICTURE
// May need to check again one more time as in case one the bitstream has only one picture, the first check may miss it
if( !outputPicturePresentInBitstream )
{
PicList::iterator iterPic = pcListPic->begin();
while (!outputPicturePresentInBitstream && iterPic != pcListPic->end())
{
Picture *pcPic = *(iterPic);
if (pcPic->neededForOutput)
{
outputPicturePresentInBitstream = true;
}
}
}
CHECK(!outputPicturePresentInBitstream, "It is required that there shall be at least one picture with PictureOutputFlag equal to 1 in the bitstream")
#endif
xFlushOutput( pcListPic );
......
......@@ -52,6 +52,8 @@
//########### place macros to be removed in next cycle below this line ###############
#define JVET_S0202_AT_LEAST_ONE_OUTPUT_PICTURE 1 // JVET-S0202: Require that the bistream shall contain at least one picture with pic_output_flag equal to 1 that is in an output layer.
#define JVET_S0081_NON_REFERENCED_PIC 1 // JVET-S0081: exclude non-referenced picture to be used as prevTid0 picture
#define JVET_R0433 1 // JVET-R0433: APS signaling and semantics cleanup
......
Markdown is supported
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