Ignore:
Timestamp:
30 Dec 2014, 18:47:09 (10 years ago)
Author:
seregin
Message:

support profile, tier and level for each layer, patch was provided by Hendry <fhendry@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r924 r941  
    200200#endif
    201201
     202#if MULTIPLE_PTL_SUPPORT
     203  //Populate PTL in VPS
     204  TComVPS *pVPS = m_acTEncTop[0].getVPS();
     205  ProfileTierLevel& profileTierLevel = *(pVPS->getPTL(0)->getGeneralPTL());
     206  for (int ii = 0; ii < m_numPTLInfo; ii++)
     207  {
     208    profileTierLevel = *(pVPS->getPTL(ii)->getGeneralPTL());
     209
     210    profileTierLevel.setLevelIdc(m_levelList[ii]);
     211    profileTierLevel.setTierFlag(m_levelTierList[ii]);
     212    profileTierLevel.setProfileIdc(m_profileList[ii]);
     213    profileTierLevel.setProfileCompatibilityFlag(m_profileList[ii], 1);
     214    profileTierLevel.setProgressiveSourceFlag(m_progressiveSourceFlagList[ii]);
     215    profileTierLevel.setInterlacedSourceFlag(m_interlacedSourceFlagList[ii]);
     216    profileTierLevel.setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[ii]);
     217    profileTierLevel.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[ii]);
     218  }
     219  pVPS->setNumProfileTierLevel(m_numPTLInfo);
     220
     221  std::vector<int> myvector;
     222  vps->getProfileLevelTierIdx()->resize(m_numOutputLayerSets);
     223  for (int ii = 0; ii < m_numOutputLayerSets; ii++)
     224  {
     225    myvector =  m_listOfLayerPTLofOlss[ii];
     226    vps->getProfileLevelTierIdx()->resize(myvector.size());
     227    for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it)
     228    {
     229      pVPS->addProfileLevelTierIdx(ii, it[0]);
     230    }
     231  }
     232
     233  //pVPS->setProfileLevelTierIdx(
     234#endif
     235
    202236  assert( m_numLayers <= MAX_LAYERS );
    203237
     
    228262    m_acTEncTop[layer].setFramesToBeEncoded            ( m_framesToBeEncoded );
    229263
     264#if !MULTIPLE_PTL_SUPPORT
    230265    m_acTEncTop[layer].setProfile(m_profile);
    231266    m_acTEncTop[layer].setLevel(m_levelTier, m_level);
     
    234269    m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlag);
    235270    m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag);
     271#else
     272    m_acTEncTop[layer].setProfile(m_profileList[m_layerPTLIdx[layer]]);
     273    m_acTEncTop[layer].setLevel(m_levelTierList[m_layerPTLIdx[layer]], m_levelList[m_layerPTLIdx[layer]]);
     274    m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlagList[m_layerPTLIdx[layer]]);
     275    m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlagList[m_layerPTLIdx[layer]]);
     276    m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[m_layerPTLIdx[layer]]);
     277    m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[m_layerPTLIdx[layer]]);
     278#endif
    236279
    237280#if REF_IDX_MFM
     
    13851428    vps->setIlpSshSignalingEnabledFlag(false);
    13861429#if VPS_EXTN_PROFILE_INFO
    1387 
     1430#if !MULTIPLE_PTL_SUPPORT
    13881431#if LIST_OF_PTL
    13891432  vps->getPTLForExtnPtr()->resize(1);   // Dummy object - unused.
     
    14141457    *(vps->getPTLForExtn(setId)) = *(m_acTEncTop[setId].getSPS()->getPTL());
    14151458  }
     1459#endif
    14161460#endif
    14171461#endif
     
    15241568#endif
    15251569  // Target output layer
     1570#if !MULTIPLE_PTL_SUPPORT
    15261571#if LIST_OF_PTL
    15271572  vps->setNumProfileTierLevel( vps->getPTLForExtnPtr()->size() ); // +1 for the base VPS PTL()
     
    15291574  vps->setNumOutputLayerSets(vps->getNumLayerSets());
    15301575  vps->setNumProfileTierLevel(vps->getNumLayerSets());
     1576#endif
    15311577#endif
    15321578#if !OUTPUT_LAYER_SETS_CONFIG // Taken care by configuration file parameter
     
    16191665  vps->checkNecessaryLayerFlagCondition();
    16201666#endif
     1667#if !MULTIPLE_PTL_SUPPORT
    16211668#if PER_LAYER_PTL
    16221669  vps->getProfileLevelTierIdx()->resize(vps->getNumOutputLayerSets());
     
    16391686    }
    16401687  }
     1688#endif
    16411689#endif
    16421690#if SUB_LAYERS_IN_LAYER_SET
Note: See TracChangeset for help on using the changeset viewer.