Changeset 1057 in SHVCSoftware for branches/SHM-dev/source


Ignore:
Timestamp:
4 Mar 2015, 09:55:40 (10 years ago)
Author:
seregin
Message:

revert back using layerIdx for m_ppcTEncTop, fix RefLayerId settings and related

Location:
branches/SHM-dev/source
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp

    r1044 r1057  
    6969#if SVC_EXTENSION
    7070  string cfg_ReconFile [MAX_LAYERS];
    71   Int nLayerNum;
     71  Int layerNum, targetLayerId;
    7272#if OUTPUT_LAYER_SET_INDEX
    7373  Int olsIdx;
     
    103103#endif
    104104#if FIX_CONF_MODE
    105   ("LayerNum,-ls", nLayerNum, MAX_NUM_LAYER_IDS, "Number of layers to be decoded.")
     105  ("TargetLayerId,-lid", targetLayerId, -1, "Target layer id")
     106  ("LayerNum,-ls", layerNum, MAX_NUM_LAYER_IDS, "Target layer id") // Legacy option
    106107#else
    107108  ("LayerNum,-ls", nLayerNum, 1, "Number of layers to be decoded.")
     
    165166  m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
    166167#if SVC_EXTENSION
    167   m_tgtLayerId = nLayerNum - 1;
    168   assert( m_tgtLayerId >= 0 );
     168  if( targetLayerId < 0 )
     169  {
     170    targetLayerId = layerNum - 1;
     171  }
     172
     173  assert( targetLayerId >= 0 );
    169174#if !FIX_CONF_MODE
    170175  assert( m_tgtLayerId < MAX_LAYERS );  // If this is wrong, it should be caught by asserts in other locations.
    171176#endif
    172177#if O0137_MAX_LAYERID
    173   assert( m_tgtLayerId < MAX_NUM_LAYER_IDS );
     178  assert( targetLayerId < MAX_NUM_LAYER_IDS );
    174179#endif
    175180#if OUTPUT_LAYER_SET_INDEX
     
    207212#endif
    208213  m_commonDecoderParams.setTargetOutputLayerSetIdx( olsIdx );
    209   m_commonDecoderParams.setTargetLayerId( m_tgtLayerId );
     214  m_commonDecoderParams.setTargetLayerId( targetLayerId );
    210215#endif
    211216#if FIX_CONF_MODE
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h

    r1029 r1057  
    7575
    7676#if SVC_EXTENSION
    77   Int           m_tgtLayerId;                        ///< target layer ID
    7877#if AVC_BASE
    7978  Char*         m_pchBLReconFile;                     ///< input BL reconstruction file name
     
    118117#endif
    119118#if SVC_EXTENSION
    120   , m_tgtLayerId(0)
    121119#if AVC_BASE && !REPN_FORMAT_IN_VPS
    122120  , m_iBLSourceWidth(0)
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1052 r1057  
    223223      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu)  ||
    224224#if FIX_CONF_MODE
    225         (nalu.m_layerId > this->getCommonDecoderParams()->getTargetLayerId()) )
     225        (nalu.m_layerId > m_commonDecoderParams.getTargetLayerId()) )
    226226#else
    227227        (nalu.m_layerId > m_tgtLayerId) )
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1045 r1057  
    772772  string* cfg_ReconFile      [MAX_LAYERS];
    773773  Double* cfg_fQP            [MAX_LAYERS];
     774  Int*    cfg_layerId        [MAX_LAYERS];
    774775#if REPN_FORMAT_IN_VPS
    775776  Int*    cfg_repFormatIdx  [MAX_LAYERS];
     
    911912    cfg_repFormatIdx[layer] = &m_acLayerCfg[layer].m_repFormatIdx;
    912913#endif
     914    cfg_layerId[layer]              = &m_acLayerCfg[layer].m_layerId;
    913915    cfg_SourceWidth[layer]          = &m_acLayerCfg[layer].m_iSourceWidth;
    914916    cfg_SourceHeight[layer]         = &m_acLayerCfg[layer].m_iSourceHeight;
     
    11221124  ("RepFormatIdx%d",                                cfg_repFormatIdx,                           -1, MAX_LAYERS, "Index to the representation format structure used from the VPS")
    11231125#endif
     1126  ("LayerId%d",                                     cfg_layerId,                                -1, MAX_LAYERS,  "Layer id")
    11241127#if VPS_EXTN_DIRECT_REF_LAYERS
    11251128  ("NumSamplePredRefLayers%d",                      cfg_numSamplePredRefLayers,                 -1, MAX_LAYERS, "Number of sample prediction reference layers")
     
    11301133  ("PredLayerIds%d",                                cfg_predLayerIdsPtr,                string(""), MAX_LAYERS, "inter-layer prediction layer IDs")
    11311134#endif
    1132   ("NumLayers",                                     m_numLayers,                                             1, "Number of layers to code")
     1135  ("NumLayers",                                     m_numLayers,                                             1, "Number of layers to code") 
    11331136#if Q0078_ADD_LAYER_SETS
    11341137#if OUTPUT_LAYER_SETS_CONFIG
     
    46014604    for(Int i = 0; i < m_acLayerCfg[layerIdx].m_numSamplePredRefLayers; i++)
    46024605    {
    4603       xConfirmPara(m_acLayerCfg[layerIdx].m_samplePredRefLayerIds[i] > layerIdx, "Cannot reference higher layers");
    4604       xConfirmPara(m_acLayerCfg[layerIdx].m_samplePredRefLayerIds[i] == layerIdx, "Cannot reference the current layer itself");
     4606      xConfirmPara(m_acLayerCfg[layerIdx].m_samplePredRefLayerIds[i] > m_acLayerCfg[layerIdx].m_layerId, "Cannot reference higher layers");
     4607      xConfirmPara(m_acLayerCfg[layerIdx].m_samplePredRefLayerIds[i] == m_acLayerCfg[layerIdx].m_layerId, "Cannot reference the current layer itself");
    46054608    }
    46064609  }
     
    46124615    for(Int i = 0; i < m_acLayerCfg[layerIdx].m_numMotionPredRefLayers; i++)
    46134616    {
    4614       xConfirmPara(m_acLayerCfg[layerIdx].m_motionPredRefLayerIds[i] > layerIdx, "Cannot reference higher layers");
    4615       xConfirmPara(m_acLayerCfg[layerIdx].m_motionPredRefLayerIds[i] == layerIdx, "Cannot reference the current layer itself");
     4617      xConfirmPara(m_acLayerCfg[layerIdx].m_motionPredRefLayerIds[i] > m_acLayerCfg[layerIdx].m_layerId, "Cannot reference higher layers");
     4618      xConfirmPara(m_acLayerCfg[layerIdx].m_motionPredRefLayerIds[i] == m_acLayerCfg[layerIdx].m_layerId, "Cannot reference the current layer itself");
    46164619    }
    46174620  }
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1045 r1057  
    6161#if SVC_EXTENSION
    6262  TAppEncLayerCfg m_acLayerCfg [MAX_LAYERS];
     63  Int       m_layerId;
    6364  Int       m_numLayers;                                      ///< number of layers
    6465  Int       m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; ///< scalability_mask
     
    577578#if SVC_EXTENSION
    578579  Int  getNumFrameToBeEncoded()    {return m_framesToBeEncoded; }
    579   Int  getNumLayer()               {return m_numLayers;        }
     580  Int  getNumLayer()               {return m_numLayers;         }
    580581  Int  getGOPSize()                {return m_iGOPSize;          }
    581582#if O0194_DIFFERENT_BITDEPTH_EL_BL
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r1030 r1057  
    3030  string    m_cInputFile;                                     ///< source file name
    3131  string    m_cReconFile;                                     ///< output reconstruction file
    32 
     32  Int       m_layerId;                                        ///< layer Id
    3333  Int       m_iFrameRate;                                     ///< source frame-rates (Hz)
    3434  Int       m_iSourceWidth;                                   ///< source width in pixel
     
    209209  Int     getNumActiveRefLayers()     {return m_numActiveRefLayers;}
    210210  Int*    getPredLayerIds()           {return m_predLayerIds;     }
    211   Int     getPredLayerId(Int i)       {return m_predLayerIds[i];  }
     211  Int     getPredLayerIdx(Int i)      {return m_predLayerIds[i];  }
    212212#endif
    213213#if RC_SHVC_HARMONIZATION
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1045 r1057  
    301301#endif
    302302    // set layer ID
    303     m_acTEncTop[layer].setLayerId ( layer );
    304     m_acTEncTop[layer].setNumLayer ( m_numLayers );
    305     m_acTEncTop[layer].setLayerEnc(m_apcTEncTop);
     303    m_acTEncTop[layer].setLayerId                                         ( m_acLayerCfg[layer].m_layerId == -1 ? layer : m_acLayerCfg[layer].m_layerId );
     304    m_acTEncTop[layer].setNumLayer                                        ( m_numLayers );
     305    m_acTEncTop[layer].setLayerEnc                                        ( m_apcTEncTop );
    306306
    307307    //====== Coding Structure ========
     
    354354    if(layer)
    355355    {
     356      UInt prevLayerIdx = m_acLayerCfg[layer].getPredLayerIdx(m_acLayerCfg[layer].getNumActiveRefLayers() - 1);
     357      UInt prevLayerId  = m_acTEncTop[layer].getRefLayerId(prevLayerIdx);
     358
    356359      for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++)
    357360      {
     
    363366        // Not included in the configuration file; assume that each layer depends on previous layer
    364367        m_acTEncTop[layer].setNumSamplePredRefLayers                      (1);      // One sample pred ref. layer
    365         m_acTEncTop[layer].setSamplePredRefLayerId                        (0, layer - 1);   // Previous layer
    366         m_acTEncTop[layer].setSamplePredEnabledFlag                       (layer - 1, true);
     368        m_acTEncTop[layer].setSamplePredRefLayerId                        (prevLayerIdx, prevLayerId);   // Previous layer
     369        m_acTEncTop[layer].setSamplePredEnabledFlag                       (prevLayerIdx, true);
    367370      }
    368371      else
     
    372375        {
    373376          m_acTEncTop[layer].setSamplePredRefLayerId                      ( i, m_acLayerCfg[layer].getSamplePredRefLayerId(i));
    374           m_acTEncTop[layer].setSamplePredEnabledFlag                     (m_acLayerCfg[layer].getSamplePredRefLayerId(i), true);
    375377        }
    376378      }
     
    379381        // Not included in the configuration file; assume that each layer depends on previous layer
    380382        m_acTEncTop[layer].setNumMotionPredRefLayers                      (1);      // One motion pred ref. layer
    381         m_acTEncTop[layer].setMotionPredRefLayerId                        (0, layer - 1);   // Previous layer
    382         m_acTEncTop[layer].setMotionPredEnabledFlag                       (layer - 1, true);
     383        m_acTEncTop[layer].setMotionPredRefLayerId                        (prevLayerIdx, prevLayerId);   // Previous layer
     384        m_acTEncTop[layer].setMotionPredEnabledFlag                       (prevLayerIdx, true);
    383385      }
    384386      else
     
    388390        {
    389391          m_acTEncTop[layer].setMotionPredRefLayerId                      ( i, m_acLayerCfg[layer].getMotionPredRefLayerId(i));
    390           m_acTEncTop[layer].setMotionPredEnabledFlag                     (m_acLayerCfg[layer].getMotionPredRefLayerId(i), true);
    391392        }
    392393      }
     
    395396      assert( layer < MAX_LAYERS );
    396397
    397       for (Int i = 0; i < layer; i++)
    398       {
    399         if (m_acTEncTop[layer].getSamplePredEnabledFlag(i) || m_acTEncTop[layer].getMotionPredEnabledFlag(i))
     398      for (Int i = 0; i < m_acLayerCfg[layer].m_layerId; i++)
     399      {
     400        Int refLayerId = -1;
     401
     402        for( Int layerIdc = 0; layerIdc < m_acTEncTop[layer].getNumSamplePredRefLayers(); layerIdc++ )
    400403        {
    401           m_acTEncTop[layer].setRefLayerId                                (numDirectRefLayers, i);
     404          if( m_acLayerCfg[layer].getSamplePredRefLayerId(layerIdc) == i )
     405          {
     406            refLayerId = i;
     407            m_acTEncTop[layer].setSamplePredEnabledFlag( numDirectRefLayers, true );
     408            break;
     409          }
     410        }
     411
     412        for( Int layerIdc = 0; layerIdc < m_acTEncTop[layer].getNumMotionPredRefLayers(); layerIdc++ )
     413        {
     414          if( m_acLayerCfg[layer].getMotionPredRefLayerId(layerIdc) == i )
     415          {
     416            refLayerId = i;
     417            m_acTEncTop[layer].setMotionPredEnabledFlag( numDirectRefLayers, true );
     418            break;
     419          }
     420        }
     421
     422        if( refLayerId >= 0 )
     423        {
     424          m_acTEncTop[layer].setRefLayerId                                ( numDirectRefLayers, refLayerId );
    402425          numDirectRefLayers++;
    403426        }
    404427      }
    405       m_acTEncTop[layer].setNumDirectRefLayers                            (numDirectRefLayers);
     428
     429      m_acTEncTop[layer].setNumDirectRefLayers                            ( numDirectRefLayers );
    406430
    407431      if(m_acLayerCfg[layer].getNumActiveRefLayers() == -1)
     
    410434        for( Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++ )
    411435        {
    412           m_acTEncTop[layer].setPredLayerId(i, i);
     436          m_acTEncTop[layer].setPredLayerIdx(i, i);
    413437        }
    414438      }
     
    418442        for(Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++)
    419443        {
    420           m_acTEncTop[layer].setPredLayerId                               ( i, m_acLayerCfg[layer].getPredLayerId(i));
     444          m_acTEncTop[layer].setPredLayerIdx                              ( i, m_acLayerCfg[layer].getPredLayerIdx(i));
    421445        }
    422446      }
     
    12661290  for(i = 1; i < vps->getMaxLayers(); i++)
    12671291  {
    1268     vps->setLayerIdInNuh(i, i);
     1292    vps->setLayerIdInNuh(i, m_acLayerCfg[i].m_layerId);   
    12691293    vps->setLayerIdxInVps(vps->getLayerIdInNuh(i), i);
    12701294    vps->setDimensionId(i, 0, i);
     1295
     1296    if( m_acLayerCfg[i].m_layerId != i )
     1297    {
     1298      vps->setNuhLayerIdPresentFlag(true);
     1299    }
    12711300  }
    12721301
     
    12961325
    12971326#if VPS_EXTN_OP_LAYER_SETS
    1298   vps->setMaxLayerId(m_numLayers - 1);    // Set max-layer ID
     1327  vps->setMaxLayerId( m_acLayerCfg[m_numLayers - 1].m_layerId );    // Set max-layer ID
    12991328
    13001329  vps->setVpsExtensionFlag( m_numLayers > 1 ? true : false );
     
    15291558  Bool isDefaultDirectDependencyTypeSet = false;
    15301559#endif
    1531   for (UInt layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
     1560  for (UInt layerCtr = 1; layerCtr < vps->getMaxLayers(); layerCtr++)
    15321561  {
    15331562    UInt layerId = vps->getLayerIdInNuh(layerCtr);
    15341563    vps->setNumDirectRefLayers(layerId, m_acTEncTop[layerCtr].getNumDirectRefLayers());
    1535     maxDirectRefLayers = max<UInt>(maxDirectRefLayers, vps->getNumDirectRefLayers(layerCtr));
    1536 
    1537     for (i = 0; i < vps->getNumDirectRefLayers(layerCtr); i++)
     1564    maxDirectRefLayers = max<UInt>(maxDirectRefLayers, vps->getNumDirectRefLayers(layerId));
     1565
     1566    for (i = 0; i < vps->getNumDirectRefLayers(layerId); i++)
    15381567    {
    15391568      vps->setRefLayerId(layerId, i, m_acTEncTop[layerCtr].getRefLayerId(i));
     
    15451574      vps->setDirectDependencyFlag(layerCtr, refLayerCtr, false);
    15461575    }
    1547     for (i = 0; i < vps->getNumDirectRefLayers(layerCtr); i++)
     1576    for (i = 0; i < vps->getNumDirectRefLayers(layerId); i++)
    15481577    {
    15491578      vps->setDirectDependencyFlag(layerCtr, vps->getLayerIdxInVps(m_acTEncTop[layerCtr].getRefLayerId(i)), true);
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1038 r1057  
    35993599      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
    36003600      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
    3601       checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_layerId, refPic->getLayerId() );
     3601      checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( getLayerIdx(), refPic->getLayerIdx() );
    36023602    }
    36033603  }
     
    36133613      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
    36143614      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
    3615       checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_layerId, refPic->getLayerId() );
     3615      checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( getLayerIdx(), refPic->getLayerIdx() );
    36163616    }
    36173617  }
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r1029 r1057  
    487487  Void          setLayerId (UInt layerId) { m_layerId = layerId; }
    488488  UInt          getLayerId ()               { return m_layerId; }
     489  UInt          getLayerIdx ()              { return m_pcSlice->getVPS()->getLayerIdxInVps(m_layerId); }
    489490#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    490491  Bool          isInterLayerReference(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1);
  • branches/SHM-dev/source/Lib/TLibCommon/TComPic.h

    r1049 r1057  
    200200  Void          setLayerId (UInt layerId)   { m_layerId = layerId; }
    201201  UInt          getLayerId ()               { return m_layerId; }
     202  UInt          getLayerIdx()               { return getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); }
    202203  Bool          isSpatialEnhLayer(UInt refLayerIdc)             { return m_bSpatialEnhLayer[refLayerIdc]; }
    203204  Void          setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b) { m_bSpatialEnhLayer[refLayerIdc] = b; }
  • branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r1029 r1057  
    599599      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
    600600      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
    601       assert( pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerId(), refPic->getLayerId() ) );
     601      assert( pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), refPic->getLayerIdx() ) );
    602602
    603603#if REF_IDX_ME_ZEROMV
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1046 r1057  
    33633363#if CHANGE_NUMSUBDPB_IDX
    33643364  // For layer set 0
    3365   setNumSubDpbs(0, 1);
     3365  m_numSubDpbs[0] = 1;
    33663366  // For other layer sets
    3367   for( Int i = 1; i < getNumLayerSets(); i++)
    3368   {
    3369     setNumSubDpbs( i, getNumLayersInIdList( i ) );
     3367  for( Int i = 1; i < m_numLayerSets; i++)
     3368  {
     3369    m_numSubDpbs[i] = m_numLayerInIdList[i];
    33703370  }
    33713371#else
     
    37963796  m_numNecessaryLayers.empty();
    37973797  // Assumed that output layer sets and variables RecursiveRefLayer are already derived
    3798   for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++)
     3798  for( Int olsIdx = 0; olsIdx < m_numOutputLayerSets; olsIdx++)
    37993799  {
    38003800    deriveNecessaryLayerFlag(olsIdx);
     
    38033803Void TComVPS::deriveNecessaryLayerFlag(Int const olsIdx)
    38043804{
    3805   Int lsIdx = this->getOutputLayerSetIdx( olsIdx );
    3806   Int numLayersInLs = this->getNumLayersInIdList( lsIdx );
     3805  Int lsIdx = m_outputLayerSetIdx[olsIdx];
     3806  Int numLayersInLs = m_numLayerInIdList[lsIdx];
    38073807  assert( m_necessaryLayerFlag.size() == olsIdx );   // Function should be called in the correct order.
    38083808  m_necessaryLayerFlag.push_back( std::vector<Bool>( numLayersInLs, false ) ); // Initialize to false
    38093809  for( Int lsLayerIdx = 0; lsLayerIdx < numLayersInLs; lsLayerIdx++ )
    38103810  {
    3811     if( this->m_outputLayerFlag[olsIdx][lsLayerIdx] )
     3811    if( m_outputLayerFlag[olsIdx][lsLayerIdx] )
    38123812    {
    38133813      m_necessaryLayerFlag[olsIdx][lsLayerIdx] = true;
    3814       Int currNuhLayerId = this->m_layerSetLayerIdList[lsIdx][lsLayerIdx];
     3814      Int currNuhLayerId = m_layerSetLayerIdList[lsIdx][lsLayerIdx];
    38153815      for( Int rLsLayerIdx = 0; rLsLayerIdx < lsLayerIdx; rLsLayerIdx++ )
    38163816      {
    3817         Int refNuhLayerId = this->m_layerSetLayerIdList[lsIdx][rLsLayerIdx];
    3818         if( this->m_recursiveRefLayerFlag[currNuhLayerId][refNuhLayerId] )
     3817        Int refNuhLayerId = m_layerSetLayerIdList[lsIdx][rLsLayerIdx];
     3818        if( m_recursiveRefLayerFlag[currNuhLayerId][refNuhLayerId] )
    38193819        {
    38203820          m_necessaryLayerFlag[olsIdx][rLsLayerIdx] = true;
     
    38313831  NecessaryLayerFlag[ olsIdx ][ lsLayerIdx ] is equal to 1 for the value of lsLayerIdx
    38323832  for which LayerSetLayerIdList[ OlsIdxToLsIdx[ olsIdx ] ][ lsLayerIdx ] is equal to layer_id_in_nuh[ layerIdx ]. */
    3833   for(Int layerIdx = this->getBaseLayerInternalFlag() ? 0 : 1; layerIdx < this->getMaxLayers(); layerIdx++)
     3833  for(Int layerIdx = m_baseLayerInternalFlag ? 0 : 1; layerIdx < m_uiMaxLayers; layerIdx++)
    38343834  {
    38353835    Bool layerFoundNecessaryLayerFlag = false;
    3836     for(Int olsIdx = 0; olsIdx < this->getNumOutputLayerSets(); olsIdx++)
    3837     {
    3838       Int lsIdx = this->getOutputLayerSetIdx( olsIdx );
    3839       Int currNuhLayerId = this->getLayerIdInNuh( layerIdx );
     3836    for(Int olsIdx = 0; olsIdx < m_numOutputLayerSets; olsIdx++)
     3837    {
     3838      Int lsIdx = m_outputLayerSetIdx[olsIdx];
     3839      Int currNuhLayerId = m_layerIdInNuh[layerIdx];
    38403840      std::vector<Int>::iterator iter = std::find( m_layerSetLayerIdList[lsIdx].begin(), m_layerSetLayerIdList[lsIdx].end(), currNuhLayerId );
    38413841      if( iter != m_layerSetLayerIdList[lsIdx].end() ) // Layer present in layer set
     
    42994299      pcIlpPic[refLayerIdc]->setIsLongTerm(1);
    43004300
    4301       // assign PPS to IRLP to be used for reference location offsets
     4301      // assign PPS to ILRP to be used for reference location offsets
    43024302      pcIlpPic[refLayerIdc]->getSlice(0)->setPPS( m_pcPic->getSlice(0)->getPPS() );
     4303
     4304      // assing VPS to ILRP to be used for deriving layerIdx
     4305      pcIlpPic[refLayerIdc]->getSlice(0)->setVPS( m_pcPic->getSlice(0)->getVPS() );
    43034306
    43044307#if REF_IDX_MFM
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1053 r1057  
    634634#if NECESSARY_LAYER_FLAG
    635635  std::vector< std::vector<Int> >     m_layerSetLayerIdList;
    636   std::vector<Int>                      m_numLayerInIdList;;
     636  std::vector<Int>                    m_numLayerInIdList;
    637637#else
    638638  Int         m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_IDX_PLUS1];
     
    10521052  Void    setHighestLayerIdxPlus1(UInt set, UInt idx, UInt layerIdx)             { m_highestLayerIdxPlus1[set][idx] = layerIdx; }
    10531053  Void    setPredictedLayerIds();
    1054   UInt    getPredictedLayerId(UInt layerIdx, UInt predIdx)                       { return m_predictedLayerId[layerIdx][predIdx]; }
    1055   Void    setPredictedLayerId(UInt layerIdx, UInt predIdx, UInt x)               { m_predictedLayerId[layerIdx][predIdx] = x; }
     1054  UInt    getPredictedLayerId(UInt layerId, UInt predIdx)                        { return m_predictedLayerId[layerId][predIdx]; }
     1055  Void    setPredictedLayerId(UInt layerId, UInt predIdx, UInt x)                { m_predictedLayerId[layerId][predIdx] = x; }
    10561056  UInt    getNumPredictedLayers(UInt layerId)                                    { return m_numPredictedLayers[layerId]; }
    10571057  Void    setNumPredictedLayers(UInt layerId, UInt x)                            { m_numPredictedLayers[layerId] = x; }
     
    10891089  Void   setNuhLayerIdPresentFlag(Bool x)                       { m_nuhLayerIdPresentFlag = x;     }
    10901090
    1091   UInt   getLayerIdInNuh(Int layerIdx)                          { return m_layerIdInNuh[layerIdx]; }
    1092   Void   setLayerIdInNuh(Int layerIdx, UInt x)                  { m_layerIdInNuh[layerIdx] = x;    }
    1093 
    1094   UInt   getDimensionId(Int layerIdx, Int id)                      { return m_dimensionId[layerIdx][id]; }
    1095   Void   setDimensionId(Int layerIdx, Int id, UInt x)              { m_dimensionId[layerIdx][id] = x;    }
     1091  UInt   getLayerIdInNuh(Int layerIdx)                          { return m_layerIdInNuh[layerIdx];    }
     1092  Void   setLayerIdInNuh(Int layerIdx, UInt layerId)            { m_layerIdInNuh[layerIdx] = layerId; }
     1093
     1094  UInt   getDimensionId(Int layerIdx, Int id)                   { return m_dimensionId[layerIdx][id]; }
     1095  Void   setDimensionId(Int layerIdx, Int id, UInt x)           { m_dimensionId[layerIdx][id] = x;    }
    10961096
    10971097  UInt   getNumScalabilityTypes()                               { return m_numScalabilityTypes;    }
    10981098  Void   setNumScalabilityTypes(UInt x)                         { m_numScalabilityTypes = x;       }
    10991099
    1100   UInt   getLayerIdxInVps(Int layerId)                          { return m_layerIdxInVps[layerId]; }
    1101   Void   setLayerIdxInVps(Int layerId, UInt x)                  { m_layerIdxInVps[layerId] = x;    }
     1100  UInt   getLayerIdxInVps(Int layerId)                          { return m_layerIdxInVps[layerId];     }
     1101  Void   setLayerIdxInVps(Int layerId, UInt layerIdx)           { m_layerIdxInVps[layerId] = layerIdx; }
    11021102#endif
    11031103#if BITRATE_PICRATE_SIGNALLING
     
    11341134#if VPS_EXTN_DIRECT_REF_LAYERS
    11351135  // Direct dependency of layers
    1136   Bool   getDirectDependencyFlag(Int currLayerIdc, Int refLayerIdc)               { return m_directDependencyFlag[currLayerIdc][refLayerIdc]; }
    1137   Void   setDirectDependencyFlag(Int currLayerIdc, Int refLayerIdc, Bool x)       { m_directDependencyFlag[currLayerIdc][refLayerIdc] = x;    }
     1136  Bool   getDirectDependencyFlag(Int currLayerIdx, Int refLayerIdx)             { return m_directDependencyFlag[currLayerIdx][refLayerIdx]; }
     1137  Void   setDirectDependencyFlag(Int currLayerIdx, Int refLayerIdx, Bool x)     { m_directDependencyFlag[currLayerIdx][refLayerIdx] = x;    }
    11381138 
    11391139  UInt   getNumDirectRefLayers(Int layerId)                                     { return m_numDirectRefLayers[layerId];                   }
     
    11511151  Void   setDefaultDirectDependecyType(UInt x)                                  { m_defaultDirectDependencyType = x;                      }
    11521152#endif
    1153   UInt   getDirectDependencyType(Int currLayerId, Int refLayerId)               { return m_directDependencyType[currLayerId][refLayerId]; }
    1154   Void   setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x)       { m_directDependencyType[currLayerId][refLayerId] = x;    }
    1155   Bool   isSamplePredictionType(Int currLayerId, Int refLayerId)                { assert(currLayerId != refLayerId); return ( ( m_directDependencyType[currLayerId][refLayerId] + 1 ) & 1 ) ? true : false; }
    1156   Bool   isMotionPredictionType(Int currLayerId, Int refLayerId)                { assert(currLayerId != refLayerId); return ( ( ( m_directDependencyType[currLayerId][refLayerId] + 1 ) & 2 ) >> 1 ) ? true : false; }
     1153  UInt   getDirectDependencyType(Int currLayerIdx, Int refLayerIdx)             { return m_directDependencyType[currLayerIdx][refLayerIdx]; }
     1154  Void   setDirectDependencyType(Int currLayerIdx, Int refLayerIdx, UInt x)     { m_directDependencyType[currLayerIdx][refLayerIdx] = x;    }
     1155  Bool   isSamplePredictionType(Int currLayerIdx, Int refLayerIdx)              { assert(currLayerIdx != refLayerIdx); return ( ( m_directDependencyType[currLayerIdx][refLayerIdx] + 1 ) & 1 ) ? true : false; }
     1156  Bool   isMotionPredictionType(Int currLayerIdx, Int refLayerIdx)              { assert(currLayerIdx != refLayerIdx); return ( ( ( m_directDependencyType[currLayerIdx][refLayerIdx] + 1 ) & 2 ) >> 1 ) ? true : false; }
    11571157#endif
    11581158  UInt   getNumProfileTierLevel()                                { return m_numProfileTierLevel; }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1049 r1057  
    30343034#endif
    30353035#if LIST_OF_PTL
    3036   for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
     3036  for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx < vps->getNumProfileTierLevel(); idx++)
    30373037#else
    30383038  for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1056 r1057  
    22292229      if( refPic->isILR(pcSlice->getLayerId()) )
    22302230      {
    2231         assert( m_ppcTDecTop[m_layerId]->getMotionPredEnabledFlag(pcSlice->getVPS()->getLayerIdxInVps(refPic->getLayerId())) );
     2231        assert( m_ppcTDecTop[m_layerId]->getMotionPredEnabledFlag( refPic->getLayerIdx() ) );
    22322232      }
    22332233    }
     
    30083008    for(Int i = 0; i < vps->getNumOutputLayerSets(); i++)
    30093009    {
    3010       Bool layerSetMatchFlag = true;
     3010      Bool layerSetMatchFlag = false;
    30113011      Int layerSetIdx = vps->getOutputLayerSetIdx( i );
    3012       if( vps->getNumLayersInIdList( layerSetIdx ) == params->getTargetLayerId() + 1 )
    3013       {
    3014         for(Int j = 0; j < vps->getNumLayersInIdList( layerSetIdx ); j++)
    3015         {
    3016           if( vps->getLayerSetLayerIdList( layerSetIdx, j ) != j )
    3017           {
    3018             layerSetMatchFlag = false;
    3019             break;
    3020           }
    3021         }
    3022       }
    3023       else
    3024       {
    3025         layerSetMatchFlag = false;
     3012
     3013      for(Int j = 0; j < vps->getNumLayersInIdList( layerSetIdx ); j++)
     3014      {
     3015        if( vps->getLayerSetLayerIdList( layerSetIdx, j ) == params->getTargetLayerId() )
     3016        {
     3017          layerSetMatchFlag = true;
     3018          break;
     3019        }
    30263020      }
    30273021     
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r1049 r1057  
    273273  Void      setNumSamplePredRefLayers       (Int num)                       { m_numSamplePredRefLayers = num;   }
    274274
    275   Int       getSamplePredRefLayerId         (Int i)                         { return m_samplePredRefLayerId[i];       }
    276   Void      setSamplePredRefLayerId         (Int i, Int refLayerId)         { m_samplePredRefLayerId[i] = refLayerId; }
     275  Int       getSamplePredRefLayerId         (Int layerIdc)                  { return m_samplePredRefLayerId[layerIdc];       }
     276  Void      setSamplePredRefLayerId         (Int layerIdc, Int refLayerId)  { m_samplePredRefLayerId[layerIdc] = refLayerId; }
    277277
    278278  Int       getNumMotionPredRefLayers       ()                              { return m_numMotionPredRefLayers;  }
    279279  Void      setNumMotionPredRefLayers       (Int num)                       { m_numMotionPredRefLayers = num;   }
    280280
    281   Int       getMotionPredRefLayerId         (Int i)                         { return m_motionPredRefLayerId[i];       }
    282   Void      setMotionPredRefLayerId         (Int i, Int refLayerId)         { m_motionPredRefLayerId[i] = refLayerId; }
    283 
    284   Bool      getSamplePredEnabledFlag        (Int i)                         { return m_samplePredEnabledFlag[i];  }
    285   Void      setSamplePredEnabledFlag        (Int i,Bool flag)               { m_samplePredEnabledFlag[i] = flag;  }
    286 
    287   Bool      getMotionPredEnabledFlag        (Int i)                         { return m_motionPredEnabledFlag[i];  }
    288   Void      setMotionPredEnabledFlag        (Int i,Bool flag)               { m_motionPredEnabledFlag[i] = flag;  }
    289 
    290   TDecTop*  getSamplePredRefLayerDec        ( UInt layerId );
    291   TDecTop*  getMotionPredRefLayerDec        ( UInt layerId );
     281  Int       getMotionPredRefLayerId         (Int layerIdc)                  { return m_motionPredRefLayerId[layerIdc];       }
     282  Void      setMotionPredRefLayerId         (Int layerIdc, Int refLayerId)  { m_motionPredRefLayerId[layerIdc] = refLayerId; }
     283
     284  Bool      getSamplePredEnabledFlag        (Int layerIdx)                  { return m_samplePredEnabledFlag[layerIdx];  }
     285  Void      setSamplePredEnabledFlag        (Int layerIdx, Bool flag)       { m_samplePredEnabledFlag[layerIdx] = flag;  }
     286
     287  Bool      getMotionPredEnabledFlag        (Int layerIdx)                  { return m_motionPredEnabledFlag[layerIdx];  }
     288  Void      setMotionPredEnabledFlag        (Int layerIdx, Bool flag)       { m_motionPredEnabledFlag[layerIdx] = flag;  }
    292289
    293290  Void      setRefLayerParams( TComVPS* vps );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1048 r1057  
    21702170    if( !vps->getSplittingFlag() )
    21712171    {
    2172     for(j = 0; j < vps->getNumScalabilityTypes(); j++)
    2173     {
    2174       UInt bits = vps->getDimensionIdLen(j);
    2175       WRITE_CODE( vps->getDimensionId(i, j),   bits,   "dimension_id[i][j]" );
    2176     }
    2177   }
     2172      for(j = 0; j < vps->getNumScalabilityTypes(); j++)
     2173      {
     2174        UInt bits = vps->getDimensionIdLen(j);
     2175        WRITE_CODE( vps->getDimensionId(i, j),   bits,   "dimension_id[i][j]" );
     2176      }
     2177    }
    21782178  }
    21792179#endif
     
    22082208
    22092209#if VPS_EXTN_DIRECT_REF_LAYERS
    2210   for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
     2210  for( Int layerCtr = 1; layerCtr < vps->getMaxLayers(); layerCtr++)
    22112211  {
    22122212    for( Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++)
     
    22822282  assert( vps->getNumProfileTierLevel() == vps->getPTLForExtnPtr()->size());
    22832283#endif
    2284   for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
     2284  for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx < vps->getNumProfileTierLevel(); idx++)
    22852285#else
    22862286  for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1048 r1057  
    391391
    392392  Int       m_numActiveRefLayers;
    393   Int       m_predLayerId[MAX_VPS_LAYER_IDX_PLUS1];
     393  Int       m_predLayerIdx[MAX_VPS_LAYER_IDX_PLUS1];
    394394  Int       m_numSamplePredRefLayers;
    395395  Int       m_samplePredRefLayerId[MAX_VPS_LAYER_IDX_PLUS1];
     
    11191119  Void      setNumActiveRefLayers           (Int num)                       { m_numActiveRefLayers = num;       }
    11201120
    1121   Int       getPredLayerId                  (Int i)                         { return m_predLayerId[i];          }
    1122   Void      setPredLayerId                  (Int i, Int refLayerId)         { m_predLayerId[i] = refLayerId;    }
     1121  Int       getPredLayerIdx                 (Int lyaerIdc)                  { return m_predLayerIdx[lyaerIdc];          }
     1122  Void      setPredLayerIdx                 (Int lyaerIdc, Int refLayerIdx) { m_predLayerIdx[lyaerIdc] = refLayerIdx;   }
    11231123
    11241124  Int       getNumSamplePredRefLayers       ()                              { return m_numSamplePredRefLayers;  }
    11251125  Void      setNumSamplePredRefLayers       (Int num)                       { m_numSamplePredRefLayers = num;   }
    11261126
    1127   Int       getSamplePredRefLayerId         (Int i)                         { return m_samplePredRefLayerId[i];       }
    1128   Void      setSamplePredRefLayerId         (Int i, Int refLayerId)         { m_samplePredRefLayerId[i] = refLayerId; }
     1127  Int       getSamplePredRefLayerId         (Int layerIdc)                  { return m_samplePredRefLayerId[layerIdc];       }
     1128  Void      setSamplePredRefLayerId         (Int layerIdc, Int refLayerId)  { m_samplePredRefLayerId[layerIdc] = refLayerId; }
    11291129
    11301130  Int       getNumMotionPredRefLayers       ()                              { return m_numMotionPredRefLayers;  }
    11311131  Void      setNumMotionPredRefLayers       (Int num)                       { m_numMotionPredRefLayers = num;   }
    11321132
    1133   Int       getMotionPredRefLayerId         (Int i)                         { return m_motionPredRefLayerId[i];       }
    1134   Void      setMotionPredRefLayerId         (Int i, Int refLayerId)         { m_motionPredRefLayerId[i] = refLayerId; }
    1135 
    1136   Bool      getSamplePredEnabledFlag        (Int i)                         { return m_samplePredEnabledFlag[i];  }
    1137   Void      setSamplePredEnabledFlag        (Int i,Bool flag)               { m_samplePredEnabledFlag[i] = flag;  }
    1138 
    1139   Bool      getMotionPredEnabledFlag        (Int i)                         { return m_motionPredEnabledFlag[i];  }
    1140   Void      setMotionPredEnabledFlag        (Int i,Bool flag)               { m_motionPredEnabledFlag[i] = flag;  }
     1133  Int       getMotionPredRefLayerId         (Int layerIdc)                  { return m_motionPredRefLayerId[layerIdc];       }
     1134  Void      setMotionPredRefLayerId         (Int layerIdc, Int refLayerId)  { m_motionPredRefLayerId[layerIdc] = refLayerId; }
     1135
     1136  Bool      getSamplePredEnabledFlag        (Int layerIdx)                  { return m_samplePredEnabledFlag[layerIdx];  }
     1137  Void      setSamplePredEnabledFlag        (Int layerIdx, Bool flag)       { m_samplePredEnabledFlag[layerIdx] = flag;  }
     1138
     1139  Bool      getMotionPredEnabledFlag        (Int layerIdx)                  { return m_motionPredEnabledFlag[layerIdx];  }
     1140  Void      setMotionPredEnabledFlag        (Int layerIdx,Bool flag)        { m_motionPredEnabledFlag[layerIdx] = flag;  }
    11411141#endif
    11421142  Int       getMaxTidIlRefPicsPlus1         ()                              { return m_maxTidIlRefPicsPlus1; }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.h

    r1054 r1057  
    182182
    183183#if SVC_EXTENSION
    184   TEncTop*   getLayerEnc(UInt LayerId)  {return m_ppcTEncTop[LayerId]; }
     184  TEncTop*   getLayerEnc(UInt layerIdx)  {return m_ppcTEncTop[layerIdx]; }
    185185#if ENCODER_FAST_MODE
    186186  Void  xCheckRDCostILRUni  ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt refLayerId);
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1055 r1057  
    192192  if( pcTEncTop->getLayerId() )
    193193  {
    194     UInt prevLayerId = pcTEncTop->getLayerId()-1; // it should be changed
     194    UInt prevLayerIdx = pcTEncTop->getPredLayerIdx( pcTEncTop->getNumActiveRefLayers() - 1);
     195    UInt prevLayerId  = pcTEncTop->getRefLayerId(prevLayerIdx);
    195196
    196197    m_Enc3DAsymLUTPicUpdate.create( m_pcCfg->getCGSMaxOctantDepth() , g_bitDepthLayer[CHANNEL_TYPE_LUMA][prevLayerId] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][prevLayerId] , g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcTEncTop->getLayerId()] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcTEncTop->getLayerId()] , m_pcCfg->getCGSMaxYPartNumLog2() /*, m_pcCfg->getCGSPhaseAlignment()*/ );
     
    11721173        for (UInt i = 0; i < m_pcCfg->getNumLayer(); i++)
    11731174        {
    1174           Int layerId = pcSlice->getVPS()->getLayerIdInNuh(i);
    1175           m_ppcTEncTop[layerId]->setLayerInitializedFlag(false);
    1176           m_ppcTEncTop[layerId]->setFirstPicInLayerDecodedFlag(false);
     1175          m_ppcTEncTop[i]->setLayerInitializedFlag(false);
     1176          m_ppcTEncTop[i]->setFirstPicInLayerDecodedFlag(false);
    11771177        }
    11781178      }
     
    12241224
    12251225        // infer the scaling list from the reference layer
    1226         pcSlice->setScalingList ( m_ppcTEncTop[refLayerId]->getScalingList() );
     1226        pcSlice->setScalingList ( m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(refLayerId)]->getScalingList() );
    12271227      }
    12281228      else
     
    12581258
    12591259        // infer the scaling list from the reference layer
    1260         pcSlice->setScalingList ( m_ppcTEncTop[refLayerId]->getScalingList() );
     1260        pcSlice->setScalingList ( m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(refLayerId)]->getScalingList() );
    12611261      }
    12621262      else
     
    13111311        UInt refLayerId = pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc);
    13121312#if VPS_EXTN_DIRECT_REF_LAYERS
    1313         TComList<TComPic*> *cListPic = m_ppcTEncTop[m_layerId]->getRefLayerEnc(refLayerIdc)->getListPic();
     1313        TComList<TComPic*> *cListPic = m_ppcTEncTop[refLayerIdc]->getRefLayerEnc(refLayerIdc)->getListPic();
    13141314#else
    13151315        TComList<TComPic*> *cListPic = m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)-1]->getListPic();
     
    14151415        {
    14161416          // check for the sample prediction picture type
    1417           if( m_ppcTEncTop[m_layerId]->getSamplePredEnabledFlag(pcSlice->getVPS()->getLayerIdxInVps(refLayerId)))
     1417          if( m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag(pcSlice->getVPS()->getLayerIdxInVps(refLayerId)))
    14181418          {
    14191419#if P0312_VERT_PHASE_ADJ
     
    14941494        if(pcSlice->getVPS()->getCrossLayerIrapAlignFlag())
    14951495        {
    1496           TComList<TComPic*> *cListPic = m_ppcTEncTop[m_layerId]->getRefLayerEnc(0)->getListPic();
     1496          TComList<TComPic*> *cListPic = m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getRefLayerEnc(0)->getListPic();
    14971497          TComPic* picLayer0 = pcSlice->getRefPic(*cListPic, pcSlice->getPOC() );
    14981498          if(picLayer0)
     
    15361536      if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_R &&
    15371537#if SVC_EXTENSION
    1538         ( m_iGopSize != 1 || m_ppcTEncTop[m_layerId]->getIntraPeriod() > 1 ) )
     1538        ( m_iGopSize != 1 || m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getIntraPeriod() > 1 ) )
    15391539#else
    15401540          !(m_iGopSize == 1 && pcSlice->getSliceType() == I_SLICE))
     
    18411841        for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
    18421842        {
    1843           if( m_ppcTEncTop[m_layerId]->getSamplePredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, pcSlice->getInterLayerPredLayerIdc(i) ) ) )
     1843          if( m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag( pcSlice->getInterLayerPredLayerIdc(i) ) )
    18441844          {
    18451845            foundSamplePredPicture = true;
     
    18751875        for( Int i = 0; i < pcSlice->getLayerId(); i++)
    18761876        {
    1877           TComList<TComPic *> *cListPic = m_ppcTEncTop[i]->getListPic();
     1877          TComList<TComPic *> *cListPic = m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(i)]->getListPic();
    18781878          TComPic *lowerLayerPic = pcSlice->getRefPic(*cListPic, pcSlice->getPOC());
    18791879          if( lowerLayerPic && pcSlice->getVPS()->getDirectDependencyFlag(pcSlice->getLayerIdx(), i) )
     
    19691969          // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture,
    19701970          // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture.
    1971           if( refPic->isILR(m_layerId) && m_ppcTEncTop[m_layerId]->getMotionPredEnabledFlag( pcSlice->getVPS()->getLayerIdxInVps(refPic->getLayerId()) )
     1971          if( refPic->isILR(m_layerId) && m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag( refPic->getLayerIdx() )
    19721972#if MFM_ENCCONSTRAINT
    1973             && pcSlice->getBaseColPic( *m_ppcTEncTop[refPic->getLayerId()]->getListPic() )->checkSameRefInfo() == true
     1973            && pcSlice->getBaseColPic( *m_ppcTEncTop[refPic->getLayerIdx()]->getListPic() )->checkSameRefInfo() == true
    19741974#endif
    19751975            )
     
    19911991            // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture,
    19921992            // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture.
    1993             if( refPic->isILR(m_layerId) && m_ppcTEncTop[m_layerId]->getMotionPredEnabledFlag(pcSlice->getVPS()->getLayerIdxInVps( refPic->getLayerId()))
     1993            if( refPic->isILR(m_layerId) && m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag( refPic->getLayerIdx() )
    19941994#if MFM_ENCCONSTRAINT
    1995               && pcSlice->getBaseColPic( *m_ppcTEncTop[refPic->getLayerId()]->getListPic() )->checkSameRefInfo() == true
     1995              && pcSlice->getBaseColPic( *m_ppcTEncTop[refPic->getLayerIdx()]->getListPic() )->checkSameRefInfo() == true
    19961996#endif
    19971997              )
     
    21102110        // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture,
    21112111        // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture.
    2112         if( refPic->isILR(m_layerId) && !m_ppcTEncTop[m_layerId]->getMotionPredEnabledFlag(pcSlice->getVPS()->getLayerIdxInVps(refPic->getLayerId())))
     2112        if( refPic->isILR(m_layerId) && !m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag(refPic->getLayerIdx()) )
    21132113        {
    21142114          pcSlice->setEnableTMVPFlag(false);
     
    21282128          TComPic* refPic = pcSlice->getRefPic(refList, refIdx);
    21292129
    2130           if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[m_layerId]->getSamplePredEnabledFlag( pcSlice->getVPS()->getLayerIdxInVps(refPic->getLayerId())) ) )
     2130          if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag( refPic->getLayerIdx() ) ) )
    21312131          {
    21322132            break;
     
    21522152          TComPic* refPic = pcSlice->getRefPic(refList, refIdx);
    21532153
    2154           if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[m_layerId]->getSamplePredEnabledFlag( pcSlice->getVPS()->getLayerIdxInVps((refPic->getLayerId())))) )
     2154          if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag( refPic->getLayerIdx() ) ) )
    21552155          {
    21562156            break;
     
    46644664        for(Int i = 1; i < slice->getVPS()->getMaxLayers(); i++)
    46654665        {
    4666           UInt layerId = slice->getVPS()->getLayerIdInNuh(i);
    4667           Bool refreshIntervalFlag = ( pocCurr % m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshInterval() == 0 );
    4668           Bool refreshTypeFlag     = ( m_ppcTEncTop[0]->getGOPEncoder()->getIntraRefreshType() == m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshType() );
     4666          Bool refreshIntervalFlag = ( pocCurr % m_ppcTEncTop[i]->getGOPEncoder()->getIntraRefreshInterval() == 0 );
     4667          Bool refreshTypeFlag     = ( m_ppcTEncTop[0]->getGOPEncoder()->getIntraRefreshType() == m_ppcTEncTop[i]->getGOPEncoder()->getIntraRefreshType() );
    46694668          if( !(refreshIntervalFlag && refreshTypeFlag) )
    46704669          {
     
    46824681      for(Int i = 1; i < slice->getVPS()->getMaxLayers() && !needReset; i++)
    46834682      {
    4684         UInt layerId = slice->getVPS()->getLayerIdInNuh(i);
    4685         Bool idrFlag = ( (m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshType() == 2)
    4686                         && ( pocCurr % m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshInterval() == 0 )
     4683        Bool idrFlag = ( (m_ppcTEncTop[i]->getGOPEncoder()->getIntraRefreshType() == 2)
     4684                        && ( pocCurr % m_ppcTEncTop[i]->getGOPEncoder()->getIntraRefreshInterval() == 0 )
    46874685                        );
    46884686        for(Int j = 0; j < slice->getVPS()->getMaxLayers(); j++)
     
    46934691          }
    46944692
    4695           layerId = slice->getVPS()->getLayerIdInNuh(j);
    4696           Bool idrOtherPicFlag = ( (m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshType() == 2)
    4697                                   && ( pocCurr % m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshInterval() == 0 )
     4693          Bool idrOtherPicFlag = ( (m_ppcTEncTop[j]->getGOPEncoder()->getIntraRefreshType() == 2)
     4694                                  && ( pocCurr % m_ppcTEncTop[j]->getGOPEncoder()->getIntraRefreshInterval() == 0 )
    46984695                                  );
    46994696
     
    47394736        for (UInt i = 0; i < MAX_LAYERS; i++)
    47404737        {
    4741           UInt layerId = slice->getVPS()->getLayerIdInNuh(i);
    4742           m_ppcTEncTop[layerId]->setPocDecrementedInDPBFlag(false);
     4738          m_ppcTEncTop[i]->setPocDecrementedInDPBFlag(false);
    47434739        }
    47444740#endif
     
    48284824  for (UInt layerIdx = 0; layerIdx < numAffectedLayers; layerIdx++)
    48294825  {
    4830     if (!m_ppcTEncTop[affectedLayerList[layerIdx]]->getPocDecrementedInDPBFlag())
    4831     {
    4832       m_ppcTEncTop[affectedLayerList[layerIdx]]->setPocDecrementedInDPBFlag(true);
     4826    UInt lIdx = slice->getVPS()->getLayerIdxInVps(affectedLayerList[layerIdx]);
     4827
     4828    if (!m_ppcTEncTop[lIdx]->getPocDecrementedInDPBFlag())
     4829    {
     4830      m_ppcTEncTop[lIdx]->setPocDecrementedInDPBFlag(true);
    48334831
    48344832      // Decrement value of associatedIrapPoc of the TEncGop object
    4835       m_ppcTEncTop[affectedLayerList[layerIdx]]->getGOPEncoder()->m_associatedIRAPPOC -= deltaPocVal;
     4833      m_ppcTEncTop[lIdx]->getGOPEncoder()->m_associatedIRAPPOC -= deltaPocVal;
    48364834
    48374835      // Decrememnt the value of m_pocCRA
    4838       m_ppcTEncTop[affectedLayerList[layerIdx]]->getGOPEncoder()->m_pocCRA -= deltaPocVal;
    4839 
    4840       TComList<TComPic*>::iterator  iterPic = m_ppcTEncTop[affectedLayerList[layerIdx]]->getListPic()->begin();
    4841       while (iterPic != m_ppcTEncTop[affectedLayerList[layerIdx]]->getListPic()->end())
     4836      m_ppcTEncTop[lIdx]->getGOPEncoder()->m_pocCRA -= deltaPocVal;
     4837
     4838      TComList<TComPic*>::iterator  iterPic = m_ppcTEncTop[lIdx]->getListPic()->begin();
     4839      while (iterPic != m_ppcTEncTop[lIdx]->getListPic()->end())
    48424840#else
    48434841  // Decrement value of associatedIrapPoc of the TEncGop object
     
    53425340      {
    53435341        Int iLayerId = slice->getVPS()->getPredictedLayerId(dolLayerId, i);
    5344         m_ppcTEncTop[iLayerId]->setLayerInitializedFlag(false);
    5345         m_ppcTEncTop[iLayerId]->setFirstPicInLayerDecodedFlag(false);
     5342        m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(iLayerId)]->setLayerInitializedFlag(false);
     5343        m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(iLayerId)]->setFirstPicInLayerDecodedFlag(false);
    53465344      }
    53475345
    53485346      // Each picture that is in the DPB and has nuh_layer_id equal to dolLayerId is marked as "unused for reference".
    5349       for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[dolLayerId]->getListPic()->begin(); pic != m_ppcTEncTop[dolLayerId]->getListPic()->end(); pic++)
     5347      for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(dolLayerId)]->getListPic()->begin(); pic != m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(dolLayerId)]->getListPic()->end(); pic++)
    53505348      {
    53515349        if ((*pic)->getSlice(0)->getPOC() != slice->getPOC())
     
    53605358      {
    53615359        UInt predLId = slice->getVPS()->getPredictedLayerId(dolLayerId, i);
    5362         for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[predLId]->getListPic()->begin(); pic != m_ppcTEncTop[predLId]->getListPic()->end(); pic++)
     5360        for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(predLId)]->getListPic()->begin(); pic != m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(predLId)]->getListPic()->end(); pic++)
    53635361        {
    53645362          if ((*pic)->getSlice(0)->getPOC() != slice->getPOC())
     
    53815379      m_noRaslOutputFlag = true;
    53825380    }
    5383     else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag())
     5381    else if (!m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(m_layerId)]->getLayerInitializedFlag())
    53845382    {
    53855383      Bool refLayersInitialized = true;
     
    53875385      {
    53885386        UInt refLayerId = slice->getVPS()->getRefLayerId(m_layerId, j);
    5389         if (!m_ppcTEncTop[refLayerId]->getLayerInitializedFlag())
     5387        if (!m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(refLayerId)]->getLayerInitializedFlag())
    53905388        {
    53915389          refLayersInitialized = false;
     
    54065404    if (m_layerId == 0)
    54075405    {
    5408       m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true);
    5409     }
    5410     else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag() && slice->getVPS()->getNumDirectRefLayers(m_layerId) == 0)
    5411     {
    5412       m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true);
    5413     }
    5414     else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag())
     5406      m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(m_layerId)]->setLayerInitializedFlag(true);
     5407    }
     5408    else if (!m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(m_layerId)]->getLayerInitializedFlag() && slice->getVPS()->getNumDirectRefLayers(m_layerId) == 0)
     5409    {
     5410      m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(m_layerId)]->setLayerInitializedFlag(true);
     5411    }
     5412    else if (!m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(m_layerId)]->getLayerInitializedFlag())
    54155413    {
    54165414      Bool refLayersInitialized = true;
     
    54185416      {
    54195417        UInt refLayerId = slice->getVPS()->getRefLayerId(m_layerId, j);
    5420         if (!m_ppcTEncTop[refLayerId]->getLayerInitializedFlag())
     5418        if (!m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(refLayerId)]->getLayerInitializedFlag())
    54215419        {
    54225420          refLayersInitialized = false;
     
    54255423      if (refLayersInitialized)
    54265424      {
    5427         m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true);
     5425        m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(m_layerId)]->setLayerInitializedFlag(true);
    54285426      }
    54295427    }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1029 r1057  
    32433243       
    32443244        // motion search only for the ILRP with sample prediction type
    3245         if( pcPic->isILR( pcCU->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerId(), pcPic->getLayerId() ) )
     3245        if( pcPic->isILR( pcCU->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcPic->getLayerIdx() ) )
    32463246        {
    32473247          continue;
     
    34813481
    34823482          // motion search only for the ILRP with sample prediction type
    3483           if( pcPic->isILR( pcCU->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerId(), pcPic->getLayerId() ) )
     3483          if( pcPic->isILR( pcCU->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcPic->getLayerIdx() ) )
    34843484          {
    34853485            continue;
     
    60746074
    60756075      // ILRP has to be for the sample prediction type
    6076       if( refPic->isILR(pcCU->getLayerId()) && refPic->getLayerId() == refLayerId && pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerId(), refLayerId ) )
     6076      if( refPic->isILR(pcCU->getLayerId()) && refPic->getLayerId() == refLayerId && pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcCU->getSlice()->getVPS()->getLayerIdxInVps(refLayerId) ) )
    60776077      {
    60786078        iRefIdxTemp = refIdx;
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r1051 r1057  
    139139{
    140140#if JCTVC_M0259_LAMBDAREFINEMENT
    141   if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->getLayerId()]->getNumActiveRefLayers() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) )
    142   {
    143     Int nCurLayerId = slice->getLayerId();
    144     UInt prevLayerId = slice->getVPS()->getLayerIdInNuh(slice->getVPS()->getLayerIdxInVps(nCurLayerId)-1);
    145 
    146     Double gamma = xCalEnhLambdaFactor( m_ppcTEncTop[prevLayerId]->getQP() - m_ppcTEncTop[nCurLayerId]->getQP() ,
    147       1.0 * m_ppcTEncTop[nCurLayerId]->getSourceWidth() * m_ppcTEncTop[nCurLayerId]->getSourceHeight()
    148       / m_ppcTEncTop[prevLayerId]->getSourceWidth() / m_ppcTEncTop[prevLayerId]->getSourceHeight() );
     141  if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->getLayerIdx()]->getNumActiveRefLayers() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) )
     142  {
     143    Int layerIdx = slice->getLayerId();
     144    UInt prevLayerIdx = m_ppcTEncTop[layerIdx]->getPredLayerIdx( m_ppcTEncTop[layerIdx]->getNumActiveRefLayers() - 1);
     145
     146    Double gamma = xCalEnhLambdaFactor( m_ppcTEncTop[prevLayerIdx]->getQP() - m_ppcTEncTop[layerIdx]->getQP() ,
     147      1.0 * m_ppcTEncTop[layerIdx]->getSourceWidth() * m_ppcTEncTop[layerIdx]->getSourceHeight()
     148      / m_ppcTEncTop[prevLayerIdx]->getSourceWidth() / m_ppcTEncTop[prevLayerIdx]->getSourceHeight() );
    149149    dLambda *= gamma;
    150150  }
     
    165165
    166166#if JCTVC_M0259_LAMBDAREFINEMENT
    167     if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->getLayerId()]->getNumActiveRefLayers() && m_pcCfg->getGOPSize() >= 8 && slice->isIntra() == false && depth == 0 )
     167    if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->getLayerIdx()]->getNumActiveRefLayers() && m_pcCfg->getGOPSize() >= 8 && slice->isIntra() == false && depth == 0 )
    168168    {
    169169      dLambdas[0] = dLambda * 1.1;
     
    557557    if( rpcSlice->getNumILRRefIdx() > 0 )
    558558    {
    559       rpcSlice->setActiveNumILRRefIdx( m_ppcTEncTop[layerId]->getNumActiveRefLayers() );
     559      rpcSlice->setActiveNumILRRefIdx( m_ppcTEncTop[rpcSlice->getVPS()->getLayerIdxInVps(layerId)]->getNumActiveRefLayers() );
    560560      for( Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ )
    561561      {
    562         rpcSlice->setInterLayerPredLayerIdc( m_ppcTEncTop[layerId]->getPredLayerId(i), i );
     562        rpcSlice->setInterLayerPredLayerIdc( m_ppcTEncTop[rpcSlice->getVPS()->getLayerIdxInVps(layerId)]->getPredLayerIdx(i), i );
    563563      }
    564564      rpcSlice->setInterLayerPredEnabledFlag(1);
    565565    }
    566     rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag());
     566    rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[rpcSlice->getVPS()->getLayerIdxInVps(layerId)]->getMFMEnabledFlag());
    567567  }
    568568
     
    764764  }
    765765#if O0194_WEIGHTED_PREDICTION_CGS
    766   else if( m_ppcTEncTop[pcSlice->getLayerId()]->getInterLayerWeightedPredFlag() )
     766  else if( m_ppcTEncTop[pcSlice->getLayerIdx()]->getInterLayerWeightedPredFlag() )
    767767  {
    768768    // Calculate for the base layer to be used in EL as Inter layer reference
     
    11371137
    11381138#if SVC_EXTENSION
    1139         m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, m_ppcTEncTop[pcSlice->getLayerId()]->getSAO()->getSaoMaxOffsetQVal(), sliceEnabled, leftMergeAvail, aboveMergeAvail);
     1139        m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, m_ppcTEncTop[pcSlice->getLayerIdx()]->getSAO()->getSaoMaxOffsetQVal(), sliceEnabled, leftMergeAvail, aboveMergeAvail);
    11401140#else
    11411141        m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail);
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1051 r1057  
    15331533TEncTop* TEncTop::getRefLayerEnc( UInt refLayerIdx )
    15341534{
    1535   if( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() <= 0 )
     1535  if( m_ppcTEncTop[m_cVPS.getLayerIdxInVps(m_layerId)]->getNumDirectRefLayers() <= 0 )
    15361536  {
    15371537    return (TEncTop *)getLayerEnc( 0 );
    15381538  }
    15391539
    1540   return (TEncTop *)getLayerEnc( m_cVPS.getRefLayerId( m_layerId, refLayerIdx ) );
     1540  return (TEncTop *)getLayerEnc( m_cVPS.getLayerIdxInVps(m_cVPS.getRefLayerId( m_layerId, refLayerIdx )) );
    15411541}
    15421542#endif
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h

    r1051 r1057  
    117117  static Int              m_iPPSIdCnt;                    ///< next Id number for PPS   
    118118  TEncTop**               m_ppcTEncTop;
    119   TEncTop*                getLayerEnc(UInt layerId)       { return m_ppcTEncTop[layerId]; }
     119  TEncTop*                getLayerEnc(UInt layerIdx)       { return m_ppcTEncTop[layerIdx]; }
    120120  TComPic*                m_cIlpPic[MAX_NUM_REF];                    ///<  Inter layer Prediction picture =  upsampled picture
    121121#if REF_IDX_MFM
     
    235235  Void      setNumRefLayerOffsets(Int x) { m_numRefLayerOffsets = x; }
    236236  UInt      getNumRefLayerOffsets() { return m_numRefLayerOffsets; }
    237   Void      setRefLayerId(Int x, UInt id) { m_refLayerId[x] = id;   }
    238   UInt      getRefLayerId(Int x)          { return m_refLayerId[x]; }
     237  Void      setRefLayerId(Int layerIdx, UInt layerId)     { m_refLayerId[layerIdx] = layerId;  }
     238  UInt      getRefLayerId(Int layerIdx)                   { return m_refLayerId[layerIdx];    }
    239239  Window&   getRefLayerWindowForLayer(Int layerId);
    240240  Window&   getRefLayerWindow(Int x)            { return m_refLayerWindow[x]; }
Note: See TracChangeset for help on using the changeset viewer.