Skip to content
Snippets Groups Projects
Commit f808bf86 authored by Hendry's avatar Hendry
Browse files

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

parent b0bbd231
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,10 @@ uint32_t DecApp::decode() ...@@ -128,6 +128,10 @@ uint32_t DecApp::decode()
bool isEosPresentInPu = false; bool isEosPresentInPu = false;
#endif #endif
#if JVET_S0202_AT_LEAST_ONE_OUTPUT_PICTURE
bool outputPicturePresentInBitstream = false;
#endif
while (!!bitstreamFile) while (!!bitstreamFile)
{ {
InputNALUnit nalu; InputNALUnit nalu;
...@@ -274,6 +278,20 @@ uint32_t DecApp::decode() ...@@ -274,6 +278,20 @@ uint32_t DecApp::decode()
// write reconstruction to file // write reconstruction to file
if( bNewPicture ) 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 ); xWriteOutput( pcListPic, nalu.m_temporalId );
} }
if (nalu.m_nalUnitType == NAL_UNIT_EOS) if (nalu.m_nalUnitType == NAL_UNIT_EOS)
...@@ -321,6 +339,22 @@ uint32_t DecApp::decode() ...@@ -321,6 +339,22 @@ uint32_t DecApp::decode()
m_cDecLib.resetAccessUnitPicInfo(); 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 ); xFlushOutput( pcListPic );
......
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
//########### place macros to be removed in next cycle below this line ############### //########### 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_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 #define JVET_R0433 1 // JVET-R0433: APS signaling and semantics cleanup
......
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