Commit fcfd405f authored by Yonatan Shiferaw's avatar Yonatan Shiferaw
Browse files

Merge branch 'partialOutputFlag' into 'master'

--partialOutput flag is added to the decoder options to enable partial output of sub-pictures

See merge request future-video-codec/vtm-partial-output!1
parents 16702e98 0c33ca3b
......@@ -181,7 +181,8 @@ uint32_t DecApp::decode()
bool bNewAccessUnit = bNewPicture && m_cDecLib.isNewAccessUnit( bNewPicture, &bitstreamFile, &bytestream );
// Check the conditions to partially output a frame and write the partial frame to the file
if (bPartialOutput
if (m_partialOutput // Partially output only if the m_partialOutput flag is enabled
&& bPartialOutput
&& !((bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) && !m_cDecLib.getFirstSliceInSequence(nalu.m_nuhLayerId) && !bPicSkipped) // We don't need to partially output a slice if a the whole frame is going to be written
&& ((m_iPOCLastDisplay + 1 == m_cDecLib.getCurrPic()->getPOC()) || m_iPOCLastDisplay == -MAX_INT)) // Make sure that the frame that is being partially written is the frame being expected in the output sequence.
{
......@@ -275,8 +276,8 @@ uint32_t DecApp::decode()
int skipFrameCounter = m_iSkipFrame;
m_cDecLib.decode(nalu, m_iSkipFrame, m_iPOCLastDisplay, m_targetOlsIdx);
//Partially output the picture when a sub-picture is finalized
if ( nalu.isSlice() )
//Partially output the picture when a sub-picture is finalized, if m_partialOutput flag is enabled
if ( m_partialOutput && nalu.isSlice() )
{
bPartialOutput = m_cDecLib.isLastSliceInSubpic();
bPartialOutputLayer = nalu.m_nuhLayerId;
......
......@@ -120,7 +120,8 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] )
#endif
("MCTSCheck", m_mctsCheck, false, "If enabled, the decoder checks for violations of mc_exact_sample_value_match_flag in Temporal MCTS ")
("targetSubPicIdx", m_targetSubPicIdx, 0, "Specify which subpicture shall be written to output, using subpic index, 0: disabled, subpicIdx=m_targetSubPicIdx-1 \n" )
( "UpscaledOutput", m_upscaledOutput, 0, "Upscaled output for RPR" )
( "UpscaledOutput", m_upscaledOutput, 0, "Upscaled output for RPR\n" )
( "partialOutput", m_partialOutput, false, "If enabled, the decoder will try to partially output sub-pictures\n")
;
po::setDefaults(opts);
......
......@@ -88,6 +88,7 @@ protected:
int m_upscaledOutput; ////< Output upscaled (2), decoded but in full resolution buffer (1) or decoded cropped (0, default) picture for RPR.
int m_targetSubPicIdx; ///< Specify which subpicture shall be write to output, using subpicture index
bool m_partialOutput; ///< If true, the decoder will try to partially output sub-pictures
public:
DecAppCfg();
virtual ~DecAppCfg();
......
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