// Check the conditions to partially output a frame and write the partial frame to the file
if(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.
{
// \TODO you may need to apply Filter for the partial frames before writing them to file
msg(INFO,"[POC %d LId: %d <<Partial Output of Frame>>] \n",m_cDecLib.getCurrPic()->getPOC(),bPartialOutputLayer);
boolxIsNaluWithinTargetDecLayerIdSet(constInputNALUnit*nalu)const;///< check whether given Nalu is within targetDecLayerIdSet
boolxIsNaluWithinTargetOutputLayerIdSet(constInputNALUnit*nalu)const;///< check whether given Nalu is within targetOutputLayerIdSet
boolxIslayerIDWithinTargetOutputLayerIdSet(constintlayerId)const;///< check whether given Nalu layerID is within targetOutputLayerIdSet
public:
DecApp();
...
...
@@ -93,6 +94,7 @@ private:
#else
voidxFlushOutput(PicList*pcListPic,constintlayerId=NOT_VALID);///< flush all remaining decoded pictures to file
#endif
voidxPreWriteOutput(constPicture*pcCurrPic,constintlayerId=NOT_VALID);///< Partially Write a Frame
boolisNewPicture(ifstream*bitstreamFile,classInputByteStream*bytestream);///< check if next NAL unit will be the first NAL unit from a new picture
boolisNewAccessUnit(boolnewPicture,ifstream*bitstreamFile,classInputByteStream*bytestream);///< check if next NAL unit will be the first NAL unit from a new access unit