Ticket #1121: PossibleFixFor1121.patch

File PossibleFixFor1121.patch, 2.0 KB (added by rickard, 8 years ago)

Possible fix

  • TAppDecTop.cpp

     
    193193      // write reconstruction to file
    194194      if(bNewPicture)
    195195      {
    196         xWriteOutput( pcListPic, nalu.m_temporalId );
     196        xWriteOutput( pcListPic );
    197197      }
    198198    }
    199199  }
     
    237237/** \param pcListPic list of pictures to be written to file
    238238    \todo            DYN_REF_FREE should be revised
    239239 */
    240 Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, UInt tId )
     240Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic)
    241241{
    242242  TComList<TComPic*>::iterator iterPic   = pcListPic->begin();
    243243  Int not_displayed = 0;
     
    256256  while (iterPic != pcListPic->end())
    257257  {
    258258    TComPic* pcPic = *(iterPic);
    259    
    260     if ( pcPic->getOutputMark() && (not_displayed >  pcPic->getNumReorderPics(tId) && pcPic->getPOC() > m_iPOCLastDisplay))
     259    UInt highestTid = (m_iMaxTemporalLayer >= 0) ? min((UInt)m_iMaxTemporalLayer, pcPic->getSlice(0)->getSPS()->getMaxTLayers() - 1) :
     260        pcPic->getSlice(0)->getSPS()->getMaxTLayers() - 1;
     261    if ( pcPic->getOutputMark() && (not_displayed >  pcPic->getNumReorderPics(highestTid) && pcPic->getPOC() > m_iPOCLastDisplay))
    261262    {
    262263      // write to file
    263264       not_displayed--;
  • TAppDecTop.h

     
    8080  Void  xDestroyDecLib    (); ///< destroy internal classes
    8181  Void  xInitDecLib       (); ///< initialize decoder class
    8282 
    83   Void  xWriteOutput      ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file
     83  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic); ///< write YUV to file
    8484  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file
    8585  Bool  isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
    8686};