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

Add scaled reference layer ID (JCTVC-O0098)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r506 r507  
    791791        for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
    792792        {
     793#if O0098_SCALED_REF_LAYER_ID
     794          const Window scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i));
     795#else
    793796          const Window scalEL = getSPS()->getScaledRefLayerWindow(i);
     797#endif
    794798          Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 );
    795799
     
    842846        for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
    843847        {
     848#if O0098_SCALED_REF_LAYER_ID
     849          const Window scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i));
     850#else
    844851          const Window scalEL = getSPS()->getScaledRefLayerWindow(i);
     852#endif
    845853          Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 );
    846854
     
    912920  for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++)
    913921  {
     922#if O0098_SCALED_REF_LAYER_ID
     923    m_cSPS.setScaledRefLayerId(i, m_scaledRefLayerId[i]);
     924#endif
    914925    m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i];
    915926  }
     
    16831694}
    16841695#endif
     1696
     1697#if O0098_SCALED_REF_LAYER_ID
     1698Window& TEncTop::getScaledRefLayerWindowForLayer(Int layerId)
     1699{
     1700  static Window win;
     1701
     1702  for (Int i = 0; i < m_numScaledRefLayerOffsets; i++)
     1703  {
     1704    if (layerId == m_scaledRefLayerId[i])
     1705    {
     1706      return m_scaledRefLayerWindow[i];
     1707    }
     1708  }
     1709
     1710  win.resetWindow();  // scaled reference layer offsets are inferred to be zero when not present
     1711  return win;
     1712}
     1713#endif
     1714
    16851715#endif //SVC_EXTENSION
    16861716//! \}
Note: See TracChangeset for help on using the changeset viewer.