Changeset 459 in SHVCSoftware


Ignore:
Timestamp:
11 Nov 2013, 22:26:50 (11 years ago)
Author:
qualcomm
Message:

JCTVC-O0216: Encoder constraint for motion field mapping

Location:
branches/SHM-4.0-dev/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPic.cpp

    r442 r459  
    801801#endif
    802802
     803#if MFM_ENCCONSTRAINT
     804Bool TComPic::checkSameRefInfo()
     805{
     806  Bool bSameRefInfo = true;
     807  TComSlice * pSlice0 = getSlice( 0 );
     808  for( UInt uSliceID = getNumAllocatedSlice() - 1 ; bSameRefInfo && uSliceID > 0 ; uSliceID-- )
     809  {
     810    TComSlice * pSliceN = getSlice( uSliceID );
     811    if( pSlice0->getSliceType() != pSliceN->getSliceType() )
     812    {
     813      bSameRefInfo = false;
     814    }
     815    else if( pSlice0->getSliceType() != I_SLICE )
     816    {
     817      Int nListNum = pSlice0->getSliceType() == B_SLICE ? 2 : 1;
     818      for( Int nList = 0 ; nList < nListNum ; nList++ )
     819      {
     820        RefPicList eRefList = ( RefPicList )nList;
     821        if( pSlice0->getNumRefIdx( eRefList ) == pSliceN->getNumRefIdx( eRefList ) )
     822        {
     823          for( Int refIdx = pSlice0->getNumRefIdx( eRefList ) - 1 ; refIdx >= 0 ; refIdx-- )
     824          {
     825            if( pSlice0->getRefPic( eRefList , refIdx ) != pSliceN->getRefPic( eRefList , refIdx ) )
     826            {
     827              bSameRefInfo = false;
     828              break;
     829            }
     830          }
     831        }
     832        else
     833        {
     834          bSameRefInfo = false;
     835          break;
     836        }
     837      }
     838    }
     839  }
     840
     841  return( bSameRefInfo ); 
     842}
     843#endif
    803844
    804845//! \}
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPic.h

    r442 r459  
    129129  Void          initUpsampledMvField  ();
    130130#endif
     131#if MFM_ENCCONSTRAINT
     132  Bool          checkSameRefInfo();
     133#endif
    131134
    132135  Bool          getUsedByCurr()             { return m_bUsedByCurr; }
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h

    r458 r459  
    4545#define RANDOM_ACCESS_SEI_FIX            1
    4646#if SVC_EXTENSION
     47#define MFM_ENCCONSTRAINT                1      ///< JCTVC-O0216: Encoder constraint for motion field mapping
    4748#define VPS_NUH_LAYER_ID                 1      ///< JCTVC-N0085: Assert that the nuh_layer_id of VPS NAL unit should be 0
    4849#define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r452 r459  
    12531253    }
    12541254#endif
     1255#if MFM_ENCCONSTRAINT
     1256    if( pcSlice->getMFMEnabledFlag() )
     1257    {
     1258      Int nRefLayerID = pcSlice->getRefPic( pcSlice->getSliceType() == B_SLICE ? ( RefPicList )( 1 - pcSlice->getColFromL0Flag() ) : REF_PIC_LIST_0 , pcSlice->getColRefIdx() )->getLayerId();
     1259      if( nRefLayerID != pcSlice->getLayerId() )
     1260      {
     1261        TComPic * pColBasePic = pcSlice->getBaseColPic( nRefLayerID );
     1262        assert( pColBasePic->checkSameRefInfo() == true );
     1263      }
     1264    }
     1265#endif
    12551266#endif
    12561267   
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r450 r459  
    11841184        for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++)
    11851185        {
    1186           if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR(m_layerId) )
     1186          if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR(m_layerId)
     1187#if MFM_ENCCONSTRAINT
     1188            && pcSlice->getBaseColPic( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->getLayerId() )->checkSameRefInfo() == true
     1189#endif
     1190            )
    11871191          {
    11881192            ColRefIdx = colIdx;
     
    11971201          for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++)
    11981202          {
    1199             if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR(m_layerId) )
     1203            if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR(m_layerId)
     1204#if MFM_ENCCONSTRAINT
     1205              && pcSlice->getBaseColPic( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->getLayerId() )->checkSameRefInfo() == true
     1206#endif
     1207              )
    12001208            {
    12011209              ColRefIdx = colIdx;
Note: See TracChangeset for help on using the changeset viewer.