Ignore:
Timestamp:
9 May 2013, 22:48:02 (12 years ago)
Author:
qualcomm
Message:

Scaled reference layer offsets in SPS (MACRO: SCALED_REF_LAYER_OFFSETS)

M0309: Signal scaled reference layer offsets in the SPS and use it for upsampling and MV prediction.

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r174 r175  
    690690#if SVC_UPSAMPLING
    691691      if ( pcPic->isSpatialEnhLayer())
    692       {   
     692      {
     693#if SCALED_REF_LAYER_OFFSETS
     694        m_pcPredSearch->upsampleBasePic( pcPic->getFullPelBaseRec(), pcSlice->getBaseColPic()->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow() );
     695#else
    693696        m_pcPredSearch->upsampleBasePic( pcPic->getFullPelBaseRec(), pcSlice->getBaseColPic()->getPicYuvRec(), pcPic->getPicYuvRec() );
     697#endif
    694698      }
    695699      else
     
    976980    if (m_layerId > 0)
    977981    {
     982#if SCALED_REF_LAYER_OFFSETS
     983      const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow();
     984
     985      Int widthBL   = pcSlice->getBaseColPic()->getPicYuvRec()->getWidth();
     986      Int heightBL  = pcSlice->getBaseColPic()->getPicYuvRec()->getHeight();
     987
     988      Int widthEL   = pcPic->getPicYuvRec()->getWidth()  - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset();
     989      Int heightEL  = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset()  - scalEL.getWindowBottomOffset();
     990#else
    978991      const Window &confBL = pcSlice->getBaseColPic()->getPicYuvRec()->getConformanceWindow();
    979992      const Window &confEL = pcPic->getPicYuvRec()->getConformanceWindow();
     
    984997      Int widthEL   = pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();
    985998      Int heightEL  = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();
    986 
     999#endif
    9871000      g_mvScalingFactor[m_layerId][0] = Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL);
    9881001      g_mvScalingFactor[m_layerId][1] = Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);
Note: See TracChangeset for help on using the changeset viewer.