Changeset 507 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
25 Nov 2013, 17:32:16 (11 years ago)
Author:
nokia
Message:

Add scaled reference layer ID (JCTVC-O0098)

Location:
branches/SHM-4.1-dev/source/Lib/TLibCommon
Files:
4 edited

Legend:

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

    r494 r507  
    40284028#endif
    40294029
     4030#if O0098_SCALED_REF_LAYER_ID
     4031  Int leftStartL = getSlice()->getSPS()->getScaledRefLayerWindowForLayer(getSlice()->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset();
     4032  Int topStartL  = getSlice()->getSPS()->getScaledRefLayerWindowForLayer(getSlice()->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset();
     4033#else
    40304034  Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset();
    40314035  Int topStartL  = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset();
     4036#endif
    40324037  Int iBX = ((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16;
    40334038  Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16;
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r504 r507  
    522522      memset( refResamplingLayer, 0, sizeof( refResamplingLayer ) );
    523523#endif
     524#if !RESAMPLING_CONSTRAINT_BUG_FIX
    524525      const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]);
    525526      Int scalingOffset = ((scalEL.getWindowLeftOffset()   == 0 ) &&
     
    528529                           (scalEL.getWindowBottomOffset() == 0 )
    529530                          );
     531#endif
    530532
    531533      for( i=0; i < m_activeNumILRRefIdx; i++ )
    532534      {
    533535        UInt refLayerIdc = m_interLayerPredLayerIdc[i];
     536#if RESAMPLING_CONSTRAINT_BUG_FIX
     537#if O0098_SCALED_REF_LAYER_ID
     538        const Window &scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_pcVPS->getRefLayerId( m_layerId, m_interLayerPredLayerIdc[i] ));
     539#else
     540        const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]);
     541#endif
     542        Int scalingOffset = ((scalEL.getWindowLeftOffset()   == 0 ) &&
     543                             (scalEL.getWindowRightOffset()  == 0 ) &&
     544                             (scalEL.getWindowTopOffset()    == 0 ) &&
     545                             (scalEL.getWindowBottomOffset() == 0 )
     546                            );
     547#endif
    534548        if(!( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || (!scalingOffset)) // ratio 1x
    535549        {
     
    24702484const Int TComSPS::m_winUnitY[]={1,2,1,1};
    24712485
     2486#if O0098_SCALED_REF_LAYER_ID
     2487Window& TComSPS::getScaledRefLayerWindowForLayer(Int layerId)
     2488{
     2489  static Window win;
     2490
     2491  for (Int i = 0; i < m_numScaledRefLayerOffsets; i++)
     2492  {
     2493    if (layerId == m_scaledRefLayerId[i])
     2494    {
     2495      return m_scaledRefLayerWindow[i];
     2496    }
     2497  }
     2498
     2499  win.resetWindow();  // scaled reference layer offsets are inferred to be zero when not present
     2500  return win;
     2501}
     2502#endif
     2503
    24722504TComPPS::TComPPS()
    24732505: m_PPSId                       (0)
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h

    r504 r507  
    12271227#endif
    12281228  UInt        m_numScaledRefLayerOffsets;
     1229#if O0098_SCALED_REF_LAYER_ID
     1230  UInt        m_scaledRefLayerId[MAX_LAYERS];
     1231#endif
    12291232  Window      m_scaledRefLayerWindow[MAX_LAYERS];
    12301233#if REPN_FORMAT_IN_VPS
     
    14121415  UInt     getNumScaledRefLayerOffsets()  { return m_numScaledRefLayerOffsets; }
    14131416  Void     setNumScaledRefLayerOffsets(Int x)  { m_numScaledRefLayerOffsets = x; }
     1417#if O0098_SCALED_REF_LAYER_ID
     1418  UInt     getScaledRefLayerId(Int x)          { return m_scaledRefLayerId[x]; }
     1419  Void     setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; }
     1420  Window&  getScaledRefLayerWindowForLayer( Int layerId );
     1421#endif
    14141422  Window&  getScaledRefLayerWindow( Int x )   { return m_scaledRefLayerWindow[x]; }
    14151423#if REPN_FORMAT_IN_VPS
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h

    r504 r507  
    175175#define O0096_REP_FORMAT_INDEX           1      ///< JCTVC-O0096: identify SPS rep_format() with an index into the lists of formats in VPS extension.
    176176#define O0096_DEFAULT_DEPENDENCY_TYPE    1      ///< JCTVC-O0096: specify default dependency type for all direct reference layers
     177
     178#define RESAMPLING_CONSTRAINT_BUG_FIX    1
     179#define O0098_SCALED_REF_LAYER_ID        1      ///< JCTVC-O0098: signal scaled reference id
    177180
    178181#else
Note: See TracChangeset for help on using the changeset viewer.