Changeset 288 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
12 Jun 2013, 03:37:28 (12 years ago)
Author:
qualcomm
Message:

Changes made to signaling of scaled reference layer offsets.

Patch incorporating changes made to signaling of scaled reference layer offsets during SHVC editing. The number of sets of scaled reference layer offsets is signaled. Changes to configuration files also included.

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/SHM-2.1-dev/source/Lib/TLibEncoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r282 r288  
    584584#endif
    585585  {
    586     Window scaledWindow = pcSPS->getScaledRefLayerWindow();
    587     WRITE_SVLC( scaledWindow.getWindowLeftOffset()   >> 1, "scaled_ref_layer_left_offset" );
    588     WRITE_SVLC( scaledWindow.getWindowTopOffset()    >> 1, "scaled_ref_layer_top_offset" );
    589     WRITE_SVLC( scaledWindow.getWindowRightOffset()  >> 1, "scaled_ref_layer_right_offset" );
    590     WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" );
     586    WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets(),      "num_scaled_ref_layer_offsets" );
     587    for(Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets(); i++)
     588    {
     589      Window scaledWindow = pcSPS->getScaledRefLayerWindow(i);
     590      WRITE_SVLC( scaledWindow.getWindowLeftOffset()   >> 1, "scaled_ref_layer_left_offset" );
     591      WRITE_SVLC( scaledWindow.getWindowTopOffset()    >> 1, "scaled_ref_layer_top_offset" );
     592      WRITE_SVLC( scaledWindow.getWindowRightOffset()  >> 1, "scaled_ref_layer_right_offset" );
     593      WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" );
     594    }
    591595  }
    592596#endif
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r282 r288  
    547547#if SIMPLIFIED_MV_POS_SCALING
    548548#if SCALED_REF_LAYER_OFFSETS
    549         const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow();
     549        const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc);
    550550
    551551        Int widthBL   = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth();
     
    575575        {
    576576#if SCALED_REF_LAYER_OFFSETS
    577           m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow() );
     577          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
    578578#else
    579579          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() );
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r282 r288  
    8989  m_bMFMEnabledFlag = false;
    9090#endif
     91#if SCALED_REF_LAYER_OFFSETS
     92  m_numScaledRefLayerOffsets = 0;
     93#endif
    9194}
    9295
     
    509512        for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
    510513        {
    511           const Window scalEL = getSPS()->getScaledRefLayerWindow();
     514          const Window scalEL = getSPS()->getScaledRefLayerWindow(i);
    512515          Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 );
    513516
     
    546549        for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
    547550        {
    548           const Window scalEL = getSPS()->getScaledRefLayerWindow();
     551          const Window scalEL = getSPS()->getScaledRefLayerWindow(i);
    549552          Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 );
    550553
     
    599602#endif
    600603#if SCALED_REF_LAYER_OFFSETS
    601   m_cSPS.getScaledRefLayerWindow() = m_scaledRefLayerWindow;
     604  m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets);
     605  for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++)
     606  {
     607    m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i];
     608  }
    602609#endif
    603610  ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.h

    r250 r288  
    140140#endif
    141141#if SCALED_REF_LAYER_OFFSETS
    142   Window                  m_scaledRefLayerWindow;
     142  UInt                    m_numScaledRefLayerOffsets;
     143  Window                  m_scaledRefLayerWindow[MAX_LAYERS];
    143144#endif
    144145protected:
     
    207208#endif
    208209#if SCALED_REF_LAYER_OFFSETS
    209   Window&  getScaledRefLayerWindow()            { return m_scaledRefLayerWindow; }
     210  Void                    setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; }
     211  UInt                    getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; }
     212  Window&  getScaledRefLayerWindow(Int x)            { return m_scaledRefLayerWindow[x]; }
    210213#endif
    211214
Note: See TracChangeset for help on using the changeset viewer.