Ignore:
Timestamp:
24 Jun 2013, 11:43:04 (12 years ago)
Author:
tech
Message:
  • Started integrating changes in decoding process
  • Fixed encoder help output
Location:
branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r446 r491  
    32803280
    32813281  // use coldir.
     3282#if H_MV
     3283  TComPic *pColPic; 
     3284  if (getSlice()->getAltCollocatedIndicationFlag() )
     3285  {
     3286    pColPic = getSlice()->getPicFromRefPicSetInterLayer( getSlice()->getActiveMotionPredRefLayerId( getSlice()->getCollocatedRefLayerIdx() ));
     3287  }
     3288  else
     3289  {
     3290    pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 
     3291  } 
     3292#else
    32823293  TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());
     3294#endif
    32833295  TComDataCU *pColCU = pColPic->getCU( uiCUAddr );
    32843296  if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE)
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.cpp

    r490 r491  
    108108, m_enableTMVPFlag                ( true )
    109109#if H_MV
     110, m_refPicSetInterLayer           ( NULL )
    110111, m_layerId                       (0)
    111112, m_viewId                        (0)
     
    468469  UInt NumPocStCurr1 = 0;
    469470  UInt NumPocLtCurr = 0;
    470 #if H_MV
    471   Int numDirectRefLayers  = getVPS()->getNumDirectRefLayers( getLayerIdInVps() );
    472   assert( numDirectRefLayers == refPicSetInterLayer.size() );
    473 #endif
    474471  Int i;
    475472  for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)
     
    519516  TComPic*  rpsCurrList0[MAX_NUM_REF+1];
    520517  TComPic*  rpsCurrList1[MAX_NUM_REF+1];
     518
    521519#if H_MV
    522   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + numDirectRefLayers;
     520 
     521  Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + getNumActiveRefLayerPics( );
    523522  assert( numPocTotalCurr == getNumRpsCurrTempList() );
    524523#else
     
    558557
    559558  Int cIdx = 0;
     559#if H_MV
     560  if ( getInterRefEnabledInRPLFlag() )
     561  { 
     562#endif
    560563  for ( i=0; i<NumPocStCurr0; i++, cIdx++)
    561564  {
     
    571574  }
    572575#if H_MV
    573   for ( i=0; i<numDirectRefLayers;  i++, cIdx++)
    574   {
    575     if( cIdx <= MAX_NUM_REF )
    576     {
    577       rpsCurrList0[cIdx] = refPicSetInterLayer[i];
    578     }
     576  }
     577  for ( i=0; i < getNumActiveRefLayerPics( );  i++, cIdx++)
     578  {
     579    assert( cIdx < MAX_NUM_REF );   
     580    rpsCurrList0[cIdx] = refPicSetInterLayer[i];   
    579581  }
    580582#endif
     
    583585  {
    584586    cIdx = 0;
     587#if H_MV
     588    if ( getInterRefEnabledInRPLFlag() )
     589    { 
     590#endif
    585591    for ( i=0; i<NumPocStCurr1; i++, cIdx++)
    586592    {
     
    596602    }
    597603#if H_MV
    598     for ( i=0; i<numDirectRefLayers;  i++, cIdx++)
    599     {
    600       if( cIdx <= MAX_NUM_REF )
    601       {
    602         rpsCurrList1[cIdx] = refPicSetInterLayer[i];
    603       }
     604    }
     605    for ( i=0; i < getNumActiveRefLayerPics( );  i++, cIdx++)
     606    {
     607      assert( cIdx < MAX_NUM_REF );   
     608      rpsCurrList1[cIdx] = refPicSetInterLayer[i];   
    604609    }
    605610#endif
     
    664669  }
    665670#if H_MV
    666   numRpsCurrTempList = numRpsCurrTempList + getVPS()->getNumDirectRefLayers( getLayerIdInVps() );
     671  numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics();
    667672#endif
    668673  return numRpsCurrTempList;
     
    22732278  refPicSetInterLayer.clear();
    22742279
    2275   for( Int i = 0; i < getVPS()->getNumDirectRefLayers( getLayerIdInVps() ); i++ )
    2276   {
    2277     Int layerIdRef = getVPS()->getRefLayerId( getLayerIdInVps(), i );
     2280  for( Int i = 0; i < getNumActiveRefLayerPics(); i++ )
     2281  {
     2282    Int layerIdRef = getRefPicLayerId( i );
    22782283    TComPic* picRef = ivPicLists->getPic( layerIdRef, getPOC() ) ;
    22792284    assert ( picRef != 0 );
     
    22832288    picRef->getSlice(0)->setReferenced( true );       
    22842289
     2290    // Consider to check here:
     2291    // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer that is a RASL picture. "
    22852292    refPicSetInterLayer.push_back( picRef );
    22862293  }
     
    23612368  while( val > ( 1 << ceilLog2 ) ) ceilLog2++;
    23622369  return ceilLog2;
     2370}
     2371
     2372Void TComSlice::markCurrPic( TComPic* currPic )
     2373{
     2374  if ( currPic->getSlice(0)->getDiscardableFlag() )
     2375  {
     2376    currPic->getSlice(0)->setReferenced( true ) ;
     2377    currPic->setIsLongTerm( false );
     2378  }
     2379  else
     2380  {
     2381    currPic->getSlice(0)->setReferenced( false ) ;
     2382  }
     2383}
     2384
     2385Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer )
     2386{
     2387  m_refPicSetInterLayer = refPicSetInterLayer;
     2388}
     2389
     2390TComPic* TComSlice::getPicFromRefPicSetInterLayer( Int layerId )
     2391{
     2392  assert( m_refPicSetInterLayer != 0 );
     2393  assert( (*m_refPicSetInterLayer).size() == getNumActiveRefLayerPics() );
     2394  TComPic* pcPic = NULL;
     2395  for ( Int i = 0; i < getNumActiveRefLayerPics(); i++ )
     2396  {
     2397    if ((*m_refPicSetInterLayer)[ i ]->getLayerId() == layerId)
     2398    {
     2399      pcPic = (*m_refPicSetInterLayer)[ i ];
     2400    }
     2401  }
     2402  assert(pcPic != NULL);
     2403  return pcPic;
    23632404}
    23642405
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.h

    r490 r491  
    15861586  Bool       m_enableTMVPFlag;
    15871587#if H_MV
     1588  std::vector<TComPic*>* m_refPicSetInterLayer;
    15881589  Int        m_layerId;
    15891590  Int        m_viewId;
     
    17811782  Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer );
    17821783  static Void markIvRefPicsAsShortTerm    ( std::vector<TComPic*> refPicSetInterLayer );
    1783   static Void markIvRefPicsAsUnused       ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc  );
    1784 
    1785 
    1786   Void xPrintRefPicList();
     1784  static Void markCurrPic                 ( TComPic* currPic );;
     1785  static Void markIvRefPicsAsUnused       ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc );
     1786   Void xPrintRefPicList();
    17871787#endif
    17881788  Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic );
     
    19621962  return interRefEnabledInRPLFlag;
    19631963}
    1964 #endif
     1964
     1965Void setRefPicSetInterLayer( std::vector<TComPic*>* m_refPicSetInterLayer );
     1966
     1967TComPic* getPicFromRefPicSetInterLayer( Int layerId );
     1968
     1969#endif
     1970
     1971
    19651972protected:
    19661973  TComPic*  xGetRefPic  (TComList<TComPic*>& rcListPic,
     
    19681975TComPic*  xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb);
    19691976#if H_MV
    1970   TComPic*  xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId );
    19711977  Int       xCeilLog2( Int val );
    19721978#endif
Note: See TracChangeset for help on using the changeset viewer.