Skip to content
Snippets Groups Projects
DecApp.cpp 34.7 KiB
Newer Older
  • Learn to ignore specific revisions
  •       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;
    }