Ignore:
Timestamp:
3 Mar 2015, 23:36:18 (10 years ago)
Author:
seregin
Message:

fix the index for m_ppcTEncTop to be layerId

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1047 r1049  
    483483
    484484#if FIX_NON_OUTPUT_LAYER
    485   if( this->getLayerDec(pcPic->getLayerIdx())->m_isOutputLayerFlag == false )
     485  if( this->getLayerDec(pcPic->getLayerId())->m_isOutputLayerFlag == false )
    486486  {
    487487    pcPic->setOutputMark( false );
     
    10961096      resetPocRestrictionCheckParameters();
    10971097#endif
    1098       markAllPicsAsNoCurrAu();
     1098      markAllPicsAsNoCurrAu(m_apcSlicePilot->getVPS());
    10991099#if P0297_VPS_POC_LSB_ALIGNED_FLAG
    11001100      for (UInt i = 0; i < MAX_LAYERS; i++)
    11011101      {
    1102         m_ppcTDecTop[i]->m_pocDecrementedInDPBFlag = false;
     1102        m_ppcTDecTop[m_apcSlicePilot->getVPS()->getLayerIdInNuh(i)]->m_pocDecrementedInDPBFlag = false;
    11031103      }
    11041104#endif
     
    28572857  }
    28582858 
    2859   return (TDecTop *)getLayerDec( vps->getLayerIdxInVps( vps->getRefLayerId( m_layerId, refLayerIdx ) ) );
     2859  return (TDecTop *)getLayerDec( vps->getRefLayerId( m_layerId, refLayerIdx ) );
    28602860}
    28612861#endif
     
    28642864Void TDecTop::setRefLayerParams( TComVPS* vps )
    28652865{
    2866   for(UInt layer = 0; layer < m_numLayer; layer++)
    2867   {
    2868     TDecTop *decTop = (TDecTop *)getLayerDec(layer);
     2866  for(UInt layerIdx = 0; layerIdx < m_numLayer; layerIdx++)
     2867  {
     2868    TDecTop *decTop = (TDecTop *)getLayerDec(vps->getLayerIdInNuh(layerIdx));
    28692869    decTop->setNumSamplePredRefLayers(0);
    28702870    decTop->setNumMotionPredRefLayers(0);
     
    28772877      decTop->setMotionPredRefLayerId(i, 0);
    28782878    }
    2879     for(Int j = 0; j < layer; j++)
    2880     {
    2881       if (vps->getDirectDependencyFlag(layer, j))
    2882       {
    2883         decTop->setRefLayerId(decTop->getNumDirectRefLayers(), vps->getLayerIdInNuh(layer));
     2879    for(Int j = 0; j < layerIdx; j++)
     2880    {
     2881      if (vps->getDirectDependencyFlag(layerIdx, j))
     2882      {
     2883        decTop->setRefLayerId(decTop->getNumDirectRefLayers(), vps->getLayerIdInNuh(layerIdx));
    28842884        decTop->setNumDirectRefLayers(decTop->getNumDirectRefLayers() + 1);
    28852885
    2886         Int samplePredEnabledFlag = (vps->getDirectDependencyType(layer, j) + 1) & 1;
     2886        Int samplePredEnabledFlag = (vps->getDirectDependencyType(layerIdx, j) + 1) & 1;
    28872887        decTop->setSamplePredEnabledFlag(j, samplePredEnabledFlag == 1 ? true : false);
    28882888        decTop->setNumSamplePredRefLayers(decTop->getNumSamplePredRefLayers() + samplePredEnabledFlag);
    28892889
    2890         Int motionPredEnabledFlag = ((vps->getDirectDependencyType(layer, j) + 1) & 2) >> 1;
     2890        Int motionPredEnabledFlag = ((vps->getDirectDependencyType(layerIdx, j) + 1) & 2) >> 1;
    28912891        decTop->setMotionPredEnabledFlag(j, motionPredEnabledFlag == 1 ? true : false);
    28922892        decTop->setNumMotionPredRefLayers(decTop->getNumMotionPredRefLayers() + motionPredEnabledFlag);
     
    31083108    if( vps->getOutputLayerFlag( targetOlsIdx, i ) )
    31093109    {
    3110       this->getLayerDec( vps->getLayerIdxInVps( vps->getLayerSetLayerIdList( targetLsIdx, i ) ) )->m_isOutputLayerFlag = true;
     3110      this->getLayerDec( vps->getLayerSetLayerIdList( targetLsIdx, i ) )->m_isOutputLayerFlag = true;
    31113111    }
    31123112  }
     
    31303130#endif
    31313131#if POC_RESET_IDC_DECODER
    3132 Void TDecTop::markAllPicsAsNoCurrAu()
     3132Void TDecTop::markAllPicsAsNoCurrAu(TComVPS *vps)
    31333133{
    31343134  for(Int i = 0; i < MAX_LAYERS; i++)
    31353135  {
    3136     TComList<TComPic*>* listPic = this->getLayerDec(i)->getListPic();
     3136    TComList<TComPic*>* listPic = this->getLayerDec(vps->getLayerIdInNuh(i))->getListPic();
    31373137    TComList<TComPic*>::iterator  iterPic = listPic->begin();
    31383138    while ( iterPic != listPic->end() )
Note: See TracChangeset for help on using the changeset viewer.