Changeset 134 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
2 May 2013, 02:57:45 (12 years ago)
Author:
seregin
Message:

add reference layer dependency

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r125 r134  
    18351835  {
    18361836    Int refIdxL0 = cMvFieldL0.getRefIdx();
    1837     if(getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->isILR())
     1837    if(getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->isILR(m_layerId))
    18381838    {
    18391839      checkZeroMVILR &= (cMvFieldL0.getHor() == 0 && cMvFieldL0.getVer() == 0);
     
    18431843  {
    18441844    Int refIdxL1  = cMvFieldL1.getRefIdx();
    1845     if(getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->isILR())
     1845    if(getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->isILR(m_layerId))
    18461846    {
    18471847      checkZeroMVILR &= (cMvFieldL1.getHor() == 0 && cMvFieldL1.getVer() == 0);
     
    18591859  Bool checkZeroMVILR = true;
    18601860
    1861   if(getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR())
     1861  if(getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(m_layerId))
    18621862  {
    18631863    AMVPInfo* pcAMVPInfo = getCUMvField(eRefPicList)->getAMVPInfo();
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TComPic.h

    r125 r134  
    124124#endif
    125125#if REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
    126   Bool          isILR( UInt refLayer = 0 )   {return (getIsLongTerm() && m_layerId == refLayer);}
     126  Bool          isILR( UInt currLayerId )   { return ( getIsLongTerm() && m_layerId < currLayerId ); }
    127127#endif
    128128
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r133 r134  
    495495
    496496#if REF_IDX_ME_ZEROMV
    497   assert( ( pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR() && cMv.getHor() == 0 && cMv.getVer() == 0 ) || pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR() == false );
     497  assert( ( pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(pcCU->getLayerId()) && cMv.getHor() == 0 && cMv.getVer() == 0 ) || pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(pcCU->getLayerId()) == false );
    498498#endif
    499499
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h

    r133 r134  
    663663#if VPS_EXTN_DIRECT_REF_LAYERS
    664664  // Direct dependency of layers
    665   Bool   getDirectDependencyFlag(Int i, Int j)                  { return m_directDependencyFlag[i][j]; }
    666   Void   setDirectDependencyFlag(Int i, Int j, Bool x)          { m_directDependencyFlag[i][j] = x;    }
    667  
    668   UInt   getNumDirectRefLayers(Int i)                                { return m_numDirectRefLayers[i];         }
    669   Void   setNumDirectRefLayers(Int i, UInt x)                        { m_numDirectRefLayers[i] = x;            }
    670 
    671   UInt   getRefLayerId(Int i, Int j)                            { return m_refLayerId[i][j];           }
    672   Void   setRefLayerId(Int i, Int j, UInt x)                    { m_refLayerId[i][j] = x;              }
     665  Bool   getDirectDependencyFlag(Int currLayerId, Int refLayerId)               { return m_directDependencyFlag[currLayerId][refLayerId]; }
     666  Void   setDirectDependencyFlag(Int currLayerId, Int refLayerId, Bool x)       { m_directDependencyFlag[currLayerId][refLayerId] = x;    }
     667 
     668  UInt   getNumDirectRefLayers(Int layerId)                                     { return m_numDirectRefLayers[layerId];                   }
     669  Void   setNumDirectRefLayers(Int layerId, UInt refLayerNum)                   { m_numDirectRefLayers[layerId] = refLayerNum;            }
     670
     671  UInt   getRefLayerId(Int layerId, Int refLayerIdx)                            { return m_refLayerId[layerId][refLayerIdx];              }
     672  Void   setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId)           { m_refLayerId[layerId][refLayerIdx] = refLayerId;        }
    673673#endif
    674674};
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h

    r133 r134  
    4444
    4545#if SVC_EXTENSION
     46#define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
     47
    4648#define VPS_RENAME                       1      ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS
    4749#define VPS_EXTNS                        1      ///< Include function structure for VPS extensions
     
    5153#define VPS_EXTN_PROFILE_INFO            1      ///< Include profile information for layer sets in VPS extension
    5254#define VPS_EXTN_DIRECT_REF_LAYERS       1      ///< Include indication of direct dependency of layers in VPS extension
    53 #endif
    54 #define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
     55#define VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE   1
     56#endif
    5557
    5658#define SVC_COL_BLK                      1      ///< get co-located block
     
    159161#if VPS_RENAME
    160162#define MAX_VPS_LAYER_SETS_PLUS1                  1024
    161 #define MAX_VPS_LAYER_ID_PLUS1                    2
     163#define MAX_VPS_LAYER_ID_PLUS1                    MAX_LAYERS
    162164#else
    163165#define MAX_VPS_NUM_HRD_PARAMETERS                1
Note: See TracChangeset for help on using the changeset viewer.