Skip to content
Snippets Groups Projects
DecApp.cpp 35.1 KiB
Newer Older
  • Learn to ignore specific revisions
  •         if (m_seiMessageFileStream.is_open())
            {
              m_cColourRemapping.outputColourRemapPic (pcPic, m_seiMessageFileStream);
            }
    
            // update POC of display order
            m_iPOCLastDisplay = pcPic->getPOC();
    
            // erase non-referenced picture in the reference picture list after display
            if (!pcPic->referenced && pcPic->reconstructed)
            {
              pcPic->reconstructed = false;
            }
            pcPic->neededForOutput = false;
          }
          if(pcPic != NULL)
          {
            pcPic->destroy();
            delete pcPic;
            pcPic = NULL;
    
    Vadim Seregin's avatar
    Vadim Seregin committed
    
      if( layerId != NOT_VALID )
      {
    
        pcListPic->remove_if([](Picture* p) { return p == nullptr; });
    
      pcListPic->clear();
      m_iPOCLastDisplay = -MAX_INT;
    }
    
    /** \param nalu Input nalu to check whether its LayerId is within targetDecLayerIdSet
     */
    bool DecApp::isNaluWithinTargetDecLayerIdSet( InputNALUnit* nalu )
    {
      if ( m_targetDecLayerIdSet.size() == 0 ) // By default, the set is empty, meaning all LayerIds are allowed
      {
        return true;
      }
      for (std::vector<int>::iterator it = m_targetDecLayerIdSet.begin(); it != m_targetDecLayerIdSet.end(); it++)
      {
        if ( nalu->m_nuhLayerId == (*it) )
        {
          return true;
        }
      }
      return false;
    }
    
    
    /** \param nalu Input nalu to check whether its LayerId is within targetOutputLayerIdSet
     */
    bool DecApp::isNaluWithinTargetOutputLayerIdSet(InputNALUnit* nalu)
    {
      if (m_targetOutputLayerIdSet.size() == 0) // By default, the set is empty, meaning all LayerIds are allowed
      {
        return true;
      }
      for (std::vector<int>::iterator it = m_targetOutputLayerIdSet.begin(); it != m_targetOutputLayerIdSet.end(); it++)
      {
        if (nalu->m_nuhLayerId == (*it))
        {
          return true;
        }
      }
      return false;
    }