Ignore:
Timestamp:
4 Sep 2015, 21:28:58 (9 years ago)
Author:
tech
Message:

Clean-ups. HLS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComPic.cpp

    r1313 r1317  
    5454, m_bReconstructed                        (false)
    5555, m_bNeededForOutput                      (false)
    56 #if NH_MV
    57 , m_bPicOutputFlag                        (false)
    58 #endif
    5956, m_uiCurrSliceIdx                        (0)
    6057, m_bCheckLTMSB                           (false)
     
    6259, m_layerId                               (0)
    6360, m_viewId                                (0)
     61, m_bPicOutputFlag                        (false)
    6462#if NH_3D
    6563, m_viewIndex                             (0)
     
    8280  m_eRapRefList       = REF_PIC_LIST_0;
    8381  m_uiRapRefIdx       = 0;
     82#endif
     83#if NH_MV
     84  m_isPocResettingPic = false;   
     85  m_hasGeneratedRefPics = false;
     86  m_isFstPicOfAllLayOfPocResetPer = false;
     87  m_decodingOrder     = 0;
     88  m_noRaslOutputFlag  = false; 
     89  m_noClrasOutputFlag = false;
     90  m_picLatencyCount   = 0;
     91  m_isGenerated       = false;
     92  m_isGeneratedCl833  = false;
     93  m_activatesNewVps   = false;
    8494#endif
    8595}
     
    185195  }
    186196}
     197
    187198
    188199Bool  TComPic::getSAOMergeAvailability(Int currAddr, Int mergeAddr)
     
    231242
    232243#if NH_MV
    233 Void TComPic::print( Bool legend )
    234 {
    235   if ( legend )
    236     std::cout  << std::endl << "LId"        << "\t" << "POC"   << "\t" << "Rec"          << "\t" << "Ref"                       << "\t" << "LT"            <<  "\t" << "OutMark" <<  "\t" << "OutFlag" << std::endl;
    237   else
    238     std::cout  << getLayerId() << "\t" << getPOC()<< "\t" << getReconMark() << "\t" << getSlice(0)->isReferenced() << "\t" << getIsLongTerm() << "\t" << getOutputMark() << "\t" << getSlice(0)->getPicOutputFlag() <<std::endl;
    239 }
    240 
    241 TComPic* TComPicLists::getPic( Int layerIdInNuh, Int poc )
    242 {
    243   TComPic* pcPic = NULL;
    244   for(TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); ( itL != m_lists.end() && pcPic == NULL ); itL++)
    245   {   
    246     for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() && pcPic == NULL ); itP++)
    247     {
    248       TComPic* currPic = (*itP);
    249       if ( ( currPic->getPOC() == poc ) && ( currPic->getLayerId() == layerIdInNuh ) )
    250       {
    251         pcPic = currPic ;     
    252       }
    253     }
    254   }
    255   return pcPic;
     244Bool TComPic::getPocResetPeriodId()
     245{
     246  return getSlice(0)->getPocResetIdc();
     247}
     248
     249Void TComPic::markAsUsedForShortTermReference()
     250{
     251  getSlice(0)->setReferenced( true );
     252  setIsLongTerm( false );
     253}
     254
     255Void TComPic::markAsUsedForLongTermReference()
     256{
     257  getSlice(0)->setReferenced( true );
     258  setIsLongTerm( true );
     259}
     260
     261
     262Void TComPic::markAsUnusedForReference()
     263{
     264  getSlice(0)->setReferenced( false );
     265  setIsLongTerm( false );
     266}
     267
     268
     269Bool TComPic::getMarkedUnUsedForReference()
     270{
     271  return !getSlice(0)->isReferenced( );
     272}
     273
     274
     275Bool TComPic::getMarkedAsShortTerm()
     276{
     277  return ( getSlice(0)->isReferenced( ) && !getIsLongTerm() );
     278}
     279
     280Void TComPic::print( Int outputLevel )
     281{
     282  if ( outputLevel== 0  )
     283  {
     284    std::cout  << std::endl
     285      << "LId"
     286      << "\t" << "POC"
     287      << "\t" << "Rec"
     288      << "\t" << "Ref"
     289      << "\t" << "LT"
     290      << "\t" << "OutMark"
     291      << "\t" << "OutFlag"
     292      << "\t" << "Type"
     293      << "\t" << "PReFlag"
     294      << std::endl;
     295  }
     296  else if( outputLevel == 1  )
     297  {
     298    std::cout  << getLayerId()
     299      << "\t" << getPOC()
     300      << "\t" << getReconMark()
     301      << "\t" << getSlice(0)->isReferenced()
     302      << "\t" << getIsLongTerm()
     303      << "\t" << getOutputMark()
     304      << "\t" << getSlice(0)->getPicOutputFlag()
     305      << "\t" << getSlice(0)->getNalUnitTypeString()
     306      << "\t" << getSlice(0)->getPocResetFlag()
     307      << std::endl;
     308  }
     309  else if ( outputLevel == 2  )
     310  {
     311    std::cout  << std:: setfill(' ')
     312      << " LayerId: "         << std::setw(2) << getLayerId()
     313      << "\t"  << " POC: "             << std::setw(5) << getPOC()
     314      << "\t"  << " Dec. Order: "      << std::setw(5) << getDecodingOrder()
     315      << "\t"  << " Referenced: "      << std::setw(1) << getSlice(0)->isReferenced()
     316      << "\t"  << " Pic type: "        <<                 getSlice(0)->getNalUnitTypeString()
     317      << "\t"  << " Generated: "       << std::setw(1) << getIsGenerated()
     318      << "\t"  << " Gen. Ref. Pics: "  << std::setw(1) << getHasGeneratedRefPics();
     319  }
     320  else if ( outputLevel == 4  )
     321  {
     322    std::cout  << std:: setfill(' ')
     323      << " LayerId: "         << std::setw(2) << getLayerId()
     324      << "\t"  << " POC: "             << std::setw(5) << getPOC()     
     325      << "\t"  << " Referenced: "      << std::setw(1) << getSlice(0)->isReferenced() << std::endl;
     326  }
    256327}
    257328
    258329#if NH_3D
    259 TComPic* TComPicLists::getPic( Int viewIndex, Bool depthFlag, Int poc )
    260 {
    261   return getPic   ( m_vps->getLayerIdInNuh( viewIndex, depthFlag ), poc );
    262 }
    263 #endif
    264 Void TComPicLists::print()
    265 {
    266   Bool first = true;     
    267   for(TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); ( itL != m_lists.end() ); itL++)
    268   {   
    269     for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() ); itP++)
    270     {
    271       if ( first )
    272       {
    273         (*itP)->print( true );       
    274         first = false;
    275       }
    276       (*itP)->print( false );       
    277     }
    278   }
    279 }
    280 
    281 TComPicYuv* TComPicLists::getPicYuv( Int layerIdInNuh, Int poc, Bool reconFlag )
    282 {
    283   TComPic*    pcPic = getPic( layerIdInNuh, poc );
    284   TComPicYuv* pcPicYuv = NULL;
    285 
    286   if (pcPic != NULL)
    287   {
    288     if( reconFlag )
    289     {
    290       if ( pcPic->getReconMark() )
    291       {
    292         pcPicYuv = pcPic->getPicYuvRec();
    293       }
    294     }
    295     else
    296     {
    297       pcPicYuv = pcPic->getPicYuvOrg();
    298     }
    299   };
    300 
    301   return pcPicYuv;
    302 }
    303 
    304 #if NH_3D
    305 TComPicYuv* TComPicLists::getPicYuv( Int viewIndex, Bool depthFlag, Int poc, Bool recon )
    306 
    307   Int layerIdInNuh = m_vps->getLayerIdInNuh( viewIndex, depthFlag );
    308   return getPicYuv( layerIdInNuh, poc, recon );
    309 }
    310 #if NH_3D_ARP
    311 TComList<TComPic*>* TComPicLists::getPicList( Int layerIdInNuh )
    312 {
    313   TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin();
    314   Int iLayer = 0;
    315 
    316   assert( layerIdInNuh < m_lists.size() );
    317 
    318   while( iLayer != layerIdInNuh )
    319   {
    320     itL++;
    321     iLayer++;
    322   }
    323 
    324   return *itL;
    325 }
    326 #endif
    327 #endif
    328 #endif // NH_MV
     330Void TComPic::printMotion()
     331{
     332  TComPicSym* pPicSym = getPicSym();
     333  for ( UInt uiCUAddr = 0; uiCUAddr < pPicSym->getNumberOfCtusInFrame(); uiCUAddr++ )
     334  {
     335    TComDataCU* pCtu = pPicSym->getCtu(uiCUAddr);
     336    std::cout << "CUAddr " << uiCUAddr << std::endl;
     337    pCtu->printMV();
     338    std::cout << std::endl;
     339  }
     340}
    329341
    330342#if NH_3D_NBDV
     
    437449          m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = false;
    438450          Int iColViewIdx    = pcCandColSlice->getViewIndex();
     451#if H_3D_FIX_ARP_CHECK_NOT_IN_DPB
     452          // The picture pcCandColSlice->getRefPic((RefPicList)iColRefDir, iColRefIdx) might not be in DPB anymore
     453          // So don't access it directly.
     454          Int iColRefViewIdx = pcCandColSlice->getVPS()->getViewOrderIdx( pcCandColSlice->getRefLayerId( (RefPicList)iColRefDir, iColRefIdx ) );       
     455#else
    439456          Int iColRefViewIdx = pcCandColSlice->getRefPic((RefPicList)iColRefDir, iColRefIdx)->getViewIndex();
     457#endif
    440458          if(iColViewIdx == iColRefViewIdx)
    441459          {
     
    487505        {
    488506          if(pcCurrSlice->getRefPOC((RefPicList)iCurrRefDir, iCurrRefIdx ) == iTextRefPOC &&
    489              pcCurrSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId)
     507            pcCurrSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId)
    490508          { 
    491             m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx;
     509            m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx;           
    492510          }
    493511        }
     
    504522}
    505523#endif
     524#endif
     525
     526Void TComAu::setPicLatencyCount( Int picLatenyCount )
     527{
     528  for(TComList<TComPic*>::iterator itP= begin();  itP!= end(); itP++)
     529  {     
     530    (*itP)->setPicLatencyCount( picLatenyCount );
     531  }
     532}
     533
     534TComPic* TComAu::getPic( Int nuhLayerId )
     535{
     536  TComPic* pic = NULL;
     537  for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (pic == NULL) ); itP++)
     538  {     
     539    if ( (*itP)->getLayerId() == nuhLayerId )
     540    {
     541      pic = (*itP);
     542    }
     543  }
     544  return pic;
     545}
     546
     547Void TComAu::addPic( TComPic* pic, Bool pocUnkown )
     548{
     549  if ( !empty() )
     550  {
     551    if (!pocUnkown)
     552    {
     553      assert( pic->getPOC()   == ( getPoc() ));
     554    }     
     555    pic->setPicLatencyCount( getPicLatencyCount() );
     556
     557    assert( getPic( pic->getLayerId() ) == NULL );
     558
     559    // Add sorted
     560    TComAu::iterator itP = begin();
     561    Bool inserted = false;
     562    while( !inserted )
     563    {
     564      if ( ( itP == end()) || pic->getLayerId() < (*itP)->getLayerId() )
     565      {
     566        insert(itP, pic );
     567        inserted = true;
     568      }
     569      else
     570      {
     571        ++itP;
     572      }       
     573    }     
     574  }
     575  else
     576  {
     577    pushBack( pic );     
     578  }
     579}
     580
     581Bool TComAu::containsPic( TComPic* pic )
     582{
     583  Bool isInList = false;
     584  for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (!isInList) ); itP++)
     585  {
     586    isInList = isInList || ( pic == (*itP));
     587  }
     588  return isInList;
     589}
     590
     591TComSubDpb::TComSubDpb( Int nuhLayerid )
     592{
     593  m_nuhLayerId = nuhLayerid;
     594}
     595
     596TComPic* TComSubDpb::getPic( Int poc )
     597{
     598  TComPic* pic = NULL;
     599  for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (pic == NULL) ); itP++)
     600  {     
     601    if ( (*itP)->getPOC() == poc )
     602    {
     603      pic = (*itP);
     604    }
     605  }
     606  return pic;
     607}
     608
     609TComPic* TComSubDpb::getPicFromLsb( Int pocLsb, Int maxPicOrderCntLsb )
     610{
     611  TComPic* pic = NULL;
     612  for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (pic == NULL) ); itP++)
     613  {     
     614    if ( ( (*itP)->getPOC() & ( maxPicOrderCntLsb - 1 ) ) == pocLsb )
     615    {
     616      pic = (*itP);
     617    }
     618  }
     619  return pic;
     620}
     621
     622TComPic* TComSubDpb::getShortTermRefPic( Int poc )
     623{
     624  TComPic* pic = NULL;
     625  for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (pic == NULL) ); itP++)
     626  {     
     627    if ( (*itP)->getPOC() == poc && (*itP)->getMarkedAsShortTerm() )
     628    {
     629      pic = (*itP);
     630    }
     631  }
     632  return pic;
     633}
     634
     635TComList<TComPic*> TComSubDpb::getPicsMarkedNeedForOutput()
     636{
     637  TComList<TComPic*> picsMarkedNeedForOutput;
     638
     639  for(TComList<TComPic*>::iterator itP= begin();  itP!= end() ; itP++ )
     640  {     
     641    if ( (*itP)->getOutputMark() )
     642    {
     643      picsMarkedNeedForOutput.push_back( (*itP) );
     644    }
     645  }
     646  return picsMarkedNeedForOutput;
     647}
     648
     649Void TComSubDpb::markAllAsUnusedForReference()
     650{
     651  for(TComList<TComPic*>::iterator itP= begin();  itP!= end() ; itP++ )
     652  {     
     653    (*itP)->markAsUnusedForReference();
     654  }
     655}
     656
     657Void TComSubDpb::addPic( TComPic* pic )
     658{
     659  assert( pic != NULL );
     660  assert( m_nuhLayerId == pic->getLayerId() || m_nuhLayerId == -1);     
     661  if ( !empty() )
     662  {
     663    assert( getPic( pic->getPOC() ) == NULL ); // Don't add twice; assert( pic->getLayerId() == m_nuhLayerId );           
     664
     665    // Add sorted
     666    TComSubDpb::iterator itP = begin();
     667    Bool inserted = false;
     668    while( !inserted )
     669    {
     670      if ( ( itP == end()) || pic->getPOC() < (*itP)->getPOC() )
     671      {
     672        insert(itP, pic );
     673        inserted = true;
     674      }
     675      else
     676      {
     677        ++itP;
     678      }       
     679    }     
     680  }
     681  else
     682  {
     683    pushBack( pic );
     684  }
     685}
     686
     687Void TComSubDpb::removePics( std::vector<TComPic*> picToRemove )
     688{
     689  for (Int i = 0; i < picToRemove.size(); i++ )
     690  {
     691    if( picToRemove[i] != NULL)
     692    {
     693      remove( picToRemove[i] );
     694    }
     695  }
     696}
     697
     698Bool TComSubDpb::areAllPicsMarkedNotNeedForOutput()
     699{
     700  return ( getPicsMarkedNeedForOutput().size() == 0 );
     701}
     702
     703
     704TComPicLists::~TComPicLists()
     705{
     706  emptyAllSubDpbs();
     707  for(TComList<TComSubDpb*>::iterator itL = m_subDpbs.begin(); ( itL != m_subDpbs.end()); itL++)
     708  {     
     709    if ( (*itL) != NULL )
     710    {
     711      delete (*itL);
     712      (*itL) = NULL;
     713    }
     714  }
     715}
     716
     717Void TComPicLists::addNewPic( TComPic* pic )
     718{
     719  getSubDpb ( pic->getLayerId() , true )->addPic( pic );
     720  getAu     ( pic->getPOC()     , true )->addPic( pic , false );
     721  if ( m_printPicOutput )
     722  {
     723    std::cout << "  Add    picture: ";
     724    pic->print( 2 );
     725    std::cout << std::endl;
     726  }
     727}
     728
     729Void TComPicLists::removePic( TComPic* pic )
     730{
     731  if (pic != NULL)
     732  {
     733
     734    TComSubDpb* curSubDpb = getSubDpb( pic->getLayerId(), false );
     735    curSubDpb->remove( pic );
     736
     737    TComAu* curAu = getAu     ( pic->getPOC(), false );       
     738
     739    if (curAu != NULL)
     740    {   
     741      curAu->remove( pic );
     742      // Remove AU when empty.
     743      if (curAu->empty() )
     744      {
     745        m_aus.remove( curAu );
     746        delete curAu;
     747      }
     748    }
     749
     750    if ( m_printPicOutput )
     751    {
     752      std::cout << "  Remove picture: ";
     753      pic->print( 2 );
     754      std::cout << std::endl;
     755    }
     756
     757    pic->destroy();
     758    delete pic;
     759  }
     760}
     761
     762TComPic* TComPicLists::getPic( Int layerIdInNuh, Int poc )
     763{
     764  TComPic* pcPic = NULL;
     765  TComSubDpb* subDpb = getSubDpb( layerIdInNuh, false );
     766  if ( subDpb != NULL )
     767  {
     768    pcPic = subDpb->getPic( poc );
     769  }
     770  return pcPic;
     771}
     772
     773TComPicYuv* TComPicLists::getPicYuv( Int layerIdInNuh, Int poc, Bool reconFlag )
     774{
     775  TComPic*    pcPic = getPic( layerIdInNuh, poc );
     776  TComPicYuv* pcPicYuv = NULL;
     777
     778  if (pcPic != NULL)
     779  {
     780    if( reconFlag )
     781    {
     782      if ( pcPic->getReconMark() )
     783      {
     784        pcPicYuv = pcPic->getPicYuvRec();
     785      }
     786    }
     787    else
     788    {
     789      pcPicYuv = pcPic->getPicYuvOrg();
     790    }
     791  };
     792
     793  return pcPicYuv;
     794}
     795
     796TComSubDpb* TComPicLists::getSubDpb( Int nuhLayerId, Bool create )
     797{
     798  TComSubDpb* subDpb = NULL;
     799  for(TComList<TComSubDpb*>::iterator itL = m_subDpbs.begin(); ( itL != m_subDpbs.end() && subDpb == NULL ); itL++)
     800  {     
     801    if ( (*itL)->getLayerId() == nuhLayerId )
     802    {       
     803      subDpb = (*itL);
     804    }
     805  } 
     806  if ( subDpb == NULL && create )
     807  {
     808    m_subDpbs.push_back( new TComSubDpb(nuhLayerId) );
     809  }
     810  return subDpb;
     811}
     812
     813TComList<TComSubDpb*>* TComPicLists::getSubDpbs()
     814{
     815  return (&m_subDpbs);
     816}
     817
     818TComAu* TComPicLists::addAu( Int poc )
     819{
     820  TComList<TComAu*>::iterator itA = m_aus.begin();
     821
     822  assert( getAu(poc, false) == NULL );
     823  Bool inserted = false;
     824  while( !inserted)
     825  {     
     826    if ( ( itA == m_aus.end()) || poc < (*itA)->getPoc() )
     827    {       
     828      m_aus.insert(itA, new TComAu );       
     829      inserted = true;
     830      --itA;
     831    }
     832    else
     833    {
     834      ++itA;
     835    }
     836  }
     837  return (*itA);
     838}
     839
     840TComAu* TComPicLists::getAu( Int poc, Bool create )
     841{
     842  TComAu* au = NULL;
     843
     844  for( TComList<TComAu*>::iterator itA = m_aus.begin(); ( itA != m_aus.end() && au == NULL ); itA++)
     845  {
     846    if ( (*itA)->getPoc() == poc )
     847    {       
     848      au = (*itA);
     849    }
     850  } 
     851
     852  if ( au == NULL && create )
     853  {
     854    au = addAu( poc );
     855  }
     856  return au;
     857}
     858
     859TComList<TComAu*>* TComPicLists::getAus()
     860{
     861  return (&m_aus);
     862}
     863
     864TComList<TComAu*> TComPicLists::getAusHavingPicsMarkedForOutput()
     865{
     866  TComList<TComAu*> ausHavingPicsForOutput;
     867  for(TComList<TComAu*>::iterator itA= m_aus.begin(); ( itA!=m_aus.end()); itA++)
     868  {
     869    Bool hasPicMarkedAsNeedForOutput = false;
     870    for( TComAu::iterator itP= (*itA)->begin(); (itP!=(*itA)->end() && !hasPicMarkedAsNeedForOutput); itP++  )
     871    {
     872      if( (*itP)->getOutputMark() )
     873      {
     874        hasPicMarkedAsNeedForOutput = true;
     875      }
     876    }
     877    if (hasPicMarkedAsNeedForOutput)
     878    {
     879      ausHavingPicsForOutput.pushBack( (*itA) );
     880    }
     881  }
     882  return ausHavingPicsForOutput;
     883}
     884
     885Void TComPicLists::markSubDpbAsUnusedForReference( Int layerIdInNuh )
     886{
     887  TComSubDpb* subDpb = getSubDpb( layerIdInNuh, false );
     888  markSubDpbAsUnusedForReference( *subDpb );
     889}
     890
     891Void TComPicLists::markSubDpbAsUnusedForReference( TComSubDpb& subDpb )
     892{
     893  for(TComList<TComPic*>::iterator itP=subDpb.begin(); ( itP!=subDpb.end()); itP++)
     894  {
     895    (*itP)->markAsUnusedForReference();
     896  }
     897}
     898
     899Void TComPicLists::markAllSubDpbAsUnusedForReference()
     900{
     901  for(TComList<TComSubDpb*>::iterator itS= m_subDpbs.begin(); ( itS!=m_subDpbs.end()); itS++)
     902  {
     903    markSubDpbAsUnusedForReference( *(*itS) );
     904  }
     905}
     906
     907Void TComPicLists::decrementPocsInSubDpb( Int nuhLayerId, Int deltaPocVal )
     908{
     909  TComSubDpb* subDpb = getSubDpb( nuhLayerId, false );
     910
     911  for(TComSubDpb::iterator itP = subDpb->begin(); itP!=subDpb->end(); itP++)
     912  {
     913    TComPic* pic = (*itP);
     914    for (Int i = 0; i < pic->getNumAllocatedSlice(); i++)
     915    {
     916      TComSlice* slice = pic->getSlice(i);
     917      slice->setPOC( slice->getPOC() - deltaPocVal );
     918    }   
     919  }
     920}
     921Void TComPicLists::emptyAllSubDpbs()
     922{
     923  emptySubDpbs( &m_subDpbs );
     924}
     925
     926Void TComPicLists::emptySubDpbs( TComList<TComSubDpb*>* subDpbs )
     927{
     928  assert( subDpbs != NULL );
     929  for( TComList<TComSubDpb*>::iterator itS = subDpbs->begin(); itS != subDpbs->end(); itS++ )
     930  {
     931    emptySubDpb( (*itS) );
     932  }
     933}
     934
     935Void TComPicLists::emptySubDpb( TComSubDpb* subDpb )
     936{
     937  if(subDpb != NULL)
     938  {
     939    while( !subDpb->empty() )
     940    {
     941      TComPic* curPic = *(subDpb->begin());
     942      removePic( curPic );
     943    }
     944  }
     945}
     946
     947Void TComPicLists::emptySubDpb( Int nuhLayerId )
     948{
     949  emptySubDpb( getSubDpb( nuhLayerId , false) );
     950}
     951
     952Void TComPicLists::emptyNotNeedForOutputAndUnusedForRef()
     953{
     954  for(TComList<TComSubDpb*>::iterator itS= m_subDpbs.begin(); ( itS!=m_subDpbs.end()); itS++)
     955  {
     956    emptySubDpbNotNeedForOutputAndUnusedForRef( *(*itS) );
     957  }
     958}
     959
     960Void TComPicLists::emptySubDpbNotNeedForOutputAndUnusedForRef( Int layerId )
     961{
     962  TComSubDpb* subDpb = getSubDpb( layerId, false );
     963  emptySubDpbNotNeedForOutputAndUnusedForRef( *subDpb );
     964}
     965
     966Void TComPicLists::emptySubDpbNotNeedForOutputAndUnusedForRef( TComSubDpb subDpb )
     967{
     968  for(TComSubDpb::iterator itP= subDpb.begin(); ( itP!=subDpb.end()); itP++)
     969  {
     970    TComPic* pic = (*itP);
     971    if ( !pic->getOutputMark() && pic->getMarkedUnUsedForReference() )
     972    {
     973      removePic( pic );
     974    }
     975  }
     976}
     977
     978Void TComPicLists::print()
     979{
     980  Bool first = true;     
     981  for(TComList<TComSubDpb*>::iterator itL = m_subDpbs.begin(); ( itL != m_subDpbs.end() ); itL++)
     982  {   
     983    for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() ); itP++)
     984    {
     985      if ( first )
     986      {
     987        (*itP)->print( true );       
     988        first = false;
     989      }
     990      (*itP)->print( false );       
     991    }
     992  }
     993}
     994
     995#if NH_3D
     996TComPicYuv* TComPicLists::getPicYuv( Int viewIndex, Bool depthFlag, Int poc, Bool recon )
     997
     998  Int layerIdInNuh = m_vps->getLayerIdInNuh( viewIndex, depthFlag );
     999  return getPicYuv( layerIdInNuh, poc, recon );
     1000}
     1001
     1002TComPic* TComPicLists::getPic( Int viewIndex, Bool depthFlag, Int poc )
     1003{
     1004  return getPic   ( m_vps->getLayerIdInNuh( viewIndex, depthFlag ), poc );
     1005}
     1006
     1007#endif
     1008
     1009#endif
     1010
     1011
    5061012
    5071013
    5081014//! \}
     1015
Note: See TracChangeset for help on using the changeset viewer.