Ignore:
Timestamp:
24 Jun 2013, 21:36:38 (11 years ago)
Author:
tech
Message:

Incorporated further encoder parameters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r492 r493  
    215215#endif
    216216#if H_MV
    217   in>>entry.m_numInterViewRefPics;
    218   for( Int i = 0; i < entry.m_numInterViewRefPics; i++ )
    219   {
    220     in>>entry.m_interViewRefs[i];
    221   }
    222   for( Int i = 0; i < entry.m_numInterViewRefPics; i++ )
     217  in>>entry.m_numActiveRefLayerPics;
     218  for( Int i = 0; i < entry.m_numActiveRefLayerPics; i++ )
     219  {
     220    in>>entry.m_interLayerPredLayerIdc[i];
     221  }
     222  for( Int i = 0; i < entry.m_numActiveRefLayerPics; i++ )
    223223  {
    224224    in>>entry.m_interViewRefPosL[0][i];
    225225  }
    226   for( Int i = 0; i < entry.m_numInterViewRefPics; i++ )
     226  for( Int i = 0; i < entry.m_numActiveRefLayerPics; i++ )
    227227  {
    228228    in>>entry.m_interViewRefPosL[1][i];
    229229  }
     230  in>>entry.m_collocatedRefLayerIdx;
    230231#endif
    231232  return in;
     
    397398  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
    398399  ("DefaultOneTargetOutputLayerFlag", m_defaultOneTargetOutputLayerFlag,  false , "Output highest layer of layer sets by default")     
    399   ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(1,0), "Indices of layer sets used as additional output layer sets") 
     400  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 
    400401  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 
    401402  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
     403 
     404  // Layer dependencies
     405  ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIds of direct reference layers")
     406  ("DependencyTypes_%d",    m_dependencyTypes    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion")
    402407#endif
    403408  ("SourceWidth,-wdt",      m_iSourceWidth,        0, "Source picture width")
     
    13911396  }
    13921397  xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
     1398
     1399  // Layer Dependencies 
     1400  for (Int i = 0; i < m_numberOfLayers; i++ )
     1401  {
     1402    xConfirmPara( (i == 0)  && m_directRefLayers[0].size() != 0, "Layer 0 shall not have reference layers." );
     1403    xConfirmPara( m_directRefLayers[i].size() == m_dependencyTypes[ i ].size() != 0, "Each reference layer shall have a reference type" );
     1404    for (Int j = 0; j < m_directRefLayers[i].size(); j++)
     1405    {
     1406      xConfirmPara( m_directRefLayers[i][j] < 0 || m_directRefLayers[i][j] >= i , "Reference layer id shall be greater than or equal to 0 and less than dependent layer id");
     1407      xConfirmPara( m_dependencyTypes[i][j] < 0 || m_dependencyTypes[i][j] >  2 , "Dependency type shall be greater than or equal to 0 and less than 3");
     1408    }       
     1409  } 
    13931410#endif
    13941411  xConfirmPara( m_iGOPSize < 1 ,                                                            "GOP Size must be greater or equal to 1" );
     
    15441561  for( Int i = 0; i < MAX_GOP; i++ )
    15451562  {
    1546     if( m_GOPListMvc[0][i].m_numInterViewRefPics != 0 )
     1563    if( m_GOPListMvc[0][i].m_numActiveRefLayerPics != 0 )
    15471564    {
    15481565      printf( "\nError: Frame%d inter_layer refs not available in layer 0\n", i );
     
    15601577      for( Int i = 0; i < MAX_GOP+1; i++ )
    15611578      {
    1562         for( Int j = 0; j < m_GOPListMvc[k][i].m_numInterViewRefPics; j++ )
     1579        for( Int j = 0; j < m_GOPListMvc[k][i].m_numActiveRefLayerPics; j++ )
    15631580        {
    1564           Int iAbsViewId = m_GOPListMvc[k][i].m_interViewRefs[j] + k;
    1565           if( iAbsViewId < 0 || iAbsViewId >= k )
     1581          Int ilPredLayerIdc = m_directRefLayers[k][m_GOPListMvc[k][i].m_interLayerPredLayerIdc[j]];
     1582          if( ilPredLayerIdc < 0 || ilPredLayerIdc >= m_directRefLayers[k].size() )
    15661583          {
    1567             printf( "\nError: inter-layer ref pic %d is not available for Frame%d_l%d\n", m_GOPListMvc[k][i].m_interViewRefs[j], i, k );
     1584            printf( "\nError: inter-layer ref idc %d is not available for Frame%d_l%d\n", m_GOPListMvc[k][i].m_interLayerPredLayerIdc[j], i, k );
    15681585            bErrorIvpEnhV = true;
    15691586          }
     
    16151632          }
    16161633
    1617           if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'I' && m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics != 0 )
     1634          if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'I' && m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics != 0 )
    16181635          {
    16191636            printf( "\nError: inter-layer prediction not possible for FrameI_l%d with slice type I, #IL_ref_pics must be 0\n", k );
     
    16211638          }
    16221639
    1623           if( m_GOPListMvc[k][MAX_GOP].m_numRefPicsActive > m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics )
     1640          if( m_GOPListMvc[k][MAX_GOP].m_numRefPicsActive > m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics )
    16241641          {
    1625             m_GOPListMvc[k][MAX_GOP].m_numRefPicsActive = m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics;
     1642            m_GOPListMvc[k][MAX_GOP].m_numRefPicsActive = m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics;
    16261643          }
    16271644
    16281645          if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'P' )
    16291646          {
    1630             if( m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics < 1 )
     1647            if( m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics < 1 )
    16311648            {
    16321649              printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type P\n", k );
     
    16351652            else
    16361653            {
    1637               for( Int j = 0; j < m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics; j++ )
     1654              for( Int j = 0; j < m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics; j++ )
    16381655              {
    16391656                if( m_GOPListMvc[k][MAX_GOP].m_interViewRefPosL[1][j] != -1 )
     
    16461663          }
    16471664
    1648           if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'B' && m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics < 1 )
     1665          if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'B' && m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics < 1 )
    16491666          {
    16501667            printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type B\n", k );
Note: See TracChangeset for help on using the changeset viewer.