Ignore:
Timestamp:
26 Jun 2013, 15:57:04 (11 years ago)
Author:
tech
Message:

Fixes to RefPicList modification.

File:
1 edited

Legend:

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

    r496 r497  
    517517  TComPic*  rpsCurrList1[MAX_NUM_REF+1];
    518518
    519 #if H_MV
    520  
    521   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + getNumActiveRefLayerPics( );
     519#if H_MV 
     520  Int numPocTotalCurr = ( getInterRefEnabledInRPLFlag() ? ( NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr ) : 0 ) + getNumActiveRefLayerPics( );
    522521  assert( numPocTotalCurr == getNumRpsCurrTempList() );
    523522#else
     
    613612  ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm));
    614613
     614#if H_MV
     615  Int numPocSt = getInterRefEnabledInRPLFlag( ) ?  (NumPocStCurr0 + NumPocStCurr1) : 0;
     616
     617  for (Int li = 0; li < 2; li++)
     618  {
     619    if ( m_eSliceType == P_SLICE && li == 1 )
     620    {
     621      m_aiNumRefIdx[1] = 0;
     622      ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1]));
     623    }
     624    else
     625    {
     626      for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[ li ] - 1 ); rIdx ++)
     627      {
     628        Bool listModified             =                m_RefPicListModification.getRefPicListModificationFlagL( li );
     629        Int orgIdx                    = listModified ? m_RefPicListModification.getRefPicSetIdxL(li, rIdx) : (rIdx % numPocTotalCurr);
     630
     631        m_apcRefPicList    [li][rIdx] = ( li == 0 )  ? rpsCurrList0[ orgIdx  ] : rpsCurrList1[ orgIdx  ];
     632        m_bIsUsedAsLongTerm[li][rIdx] = ( orgIdx >= numPocSt ) ;
     633      }
     634    }
     635  }
     636#else
     637
    615638  for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[0]-1); rIdx ++)
    616639  {
     
    633656    }
    634657  }
     658#endif
    635659}
    636660
     
    669693  }
    670694#if H_MV
    671   numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics();
     695  numRpsCurrTempList = ( getInterRefEnabledInRPLFlag() ? numRpsCurrTempList : 0 ) + getNumActiveRefLayerPics();
    672696#endif
    673697  return numRpsCurrTempList;
Note: See TracChangeset for help on using the changeset viewer.