Ignore:
Timestamp:
17 Sep 2013, 04:12:09 (11 years ago)
Author:
seregin
Message:

motion resampling constraint with macro MOTION_RESAMPLING_CONSTRAINT (JCTVC-N0108)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r389 r396  
    499499    {
    500500      Int numResampler = 0;
     501#if MOTION_RESAMPLING_CONSTRAINT
     502      Int numMotionResamplers = 0;
     503      Int refResamplingLayer[MAX_LAYERS];
     504      memset( refResamplingLayer, 0, sizeof( refResamplingLayer ) );
     505#endif
    501506      const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]);
    502507      Int scalingOffset = ((scalEL.getWindowLeftOffset()   == 0 ) &&
     
    511516        if(!( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || (!scalingOffset)) // ratio 1x
    512517        {
     518#if MOTION_RESAMPLING_CONSTRAINT
     519          UInt predType = m_pcVPS->getDirectDependencyType( m_layerId, m_pcVPS->getRefLayerId( m_layerId, refLayerIdc ) ) + 1;
     520
     521          if( predType & 0x1 )
     522          {
     523            numResampler++;
     524            refResamplingLayer[i] = refLayerIdc + 1;
     525          }
     526
     527          if( predType & 0x2 )
     528          {
     529            numMotionResamplers++;
     530            refResamplingLayer[i] -= refLayerIdc + 1;
     531          }
     532#else
    513533          numResampler++;
     534#endif
    514535        }
    515536      }
    516 
    517       //Bitstream constraint for SHVC: The picture resampling process as specified in subclause G.8.1.4.1 shall not be invoked more than once for decoding of each particular picture.
     537     
     538      // When both picture sample values and picture motion field resampling processes are invoked for decoding of a particular picture, they shall be applied to the same reference layer picture.
     539      if( m_activeNumILRRefIdx > 1 && numResampler > 0 )
     540      {
     541        for( i=0; i < m_activeNumILRRefIdx; i++ )
     542        {
     543          assert( refResamplingLayer[i] >= 0 && "Motion and sample inter-layer prediction shall be from the same layer" );
     544        }
     545      }
     546
     547      // Bitstream constraint for SHVC: The picture resampling process as specified in subclause G.8.1.4.1 shall not be invoked more than once for decoding of each particular picture.
    518548      assert(numResampler <= 1);
     549#if MOTION_RESAMPLING_CONSTRAINT
     550      assert( numMotionResamplers <= 1  && "Up to 1 motion resampling is allowed" );
     551#endif
    519552    }
    520553#endif
Note: See TracChangeset for help on using the changeset viewer.