Changeset 627 in SHVCSoftware for branches/SHM-5.1-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
12 Mar 2014, 22:06:13 (12 years ago)
Author:
qualcomm
Message:

JCTVC-P312: vertical phase adjustment for interlace-to-progressive scalability, from Jianle Chen (cjianle@…)

Location:
branches/SHM-5.1-dev/source/Lib/TLibEncoder
Files:
5 edited

Legend:

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

    r625 r627  
    663663      WRITE_SVLC( scaledWindow.getWindowRightOffset()  >> 1, "scaled_ref_layer_right_offset" );
    664664      WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" );
     665#if P0312_VERT_PHASE_ADJ
     666      WRITE_FLAG( scaledWindow.getVertPhasePositionEnableFlag(), "vert_phase_pos_enable_flag" );
     667#endif
    665668    }
    666669  }
     
    14581461    }
    14591462  }
     1463#endif
     1464
     1465#if P0312_VERT_PHASE_ADJ
     1466    WRITE_FLAG( vps->getVpsVuiVertPhaseInUseFlag(), "vps_vui_vert_phase_in_use_flag" );
    14601467#endif
    14611468
     
    18391846      }
    18401847    }     
     1848#if P0312_VERT_PHASE_ADJ
     1849    for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
     1850    {
     1851      if (pcSlice->getSPS()->getVertPhasePositionEnableFlag(pcSlice->getInterLayerPredLayerIdc(i)))
     1852      {
     1853        WRITE_FLAG( pcSlice->getVertPhasePositionFlag(i), "phase_pos_flag" );
     1854      }
     1855    }
     1856#endif
    18411857#endif //SVC_EXTENSION
    18421858
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncCfg.h

    r595 r627  
    386386
    387387  Window   &getConformanceWindow()                           { return m_conformanceWindow; }
     388#if P0312_VERT_PHASE_ADJ
     389  Void      setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom, false, false); }
     390#else
    388391  Void      setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom); }
     392#endif
    389393
    390394  Void      setFramesToBeEncoded            ( Int   i )      { m_framesToBeEncoded = i; }
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r620 r627  
    771771        }
    772772
     773#if P0312_VERT_PHASE_ADJ
     774#if O0098_SCALED_REF_LAYER_ID
     775        Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc));
     776#else
     777        Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
     778#endif
     779#else
    773780#if O0098_SCALED_REF_LAYER_ID
    774781        const Window &scalEL = m_pcEncTop->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc));
     
    776783        const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc);
    777784#endif
     785#endif
    778786
    779787        Int widthBL   = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth();
     
    797805          Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
    798806#endif*/
     807#if P0312_VERT_PHASE_ADJ
     808          //when PhasePositionEnableFlag is equal to 1, set vertPhasePositionFlag to 0 if BL is top field and 1 if bottom
     809          if (scalEL.getVertPhasePositionEnableFlag())
     810          {
     811            pcSlice->setVertPhasePositionFlag(pcSlice->getPOC()%2, i);
     812            scalEL.setVertPhasePositionFlag (pcSlice->getVertPhasePositionFlag(i));
     813          }
     814#endif
    799815#if O0215_PHASE_ALIGNMENT
    800816#if O0194_JOINT_US_BITSHIFT
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r595 r627  
    902902#endif
    903903    m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i];
     904#if P0312_VERT_PHASE_ADJ
     905    m_cSPS.setVertPhasePositionEnableFlag(i,m_scaledRefLayerWindow[i].getVertPhasePositionEnableFlag());
     906#endif
    904907  }
    905908#endif //SVC_EXTENSION
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncTop.h

    r595 r627  
    139139#endif
    140140  Window                  m_scaledRefLayerWindow[MAX_LAYERS];
     141#if P0312_VERT_PHASE_ADJ
     142  Bool                    m_vertPhasePositionEnableFlag[MAX_LAYERS];
     143#endif
    141144#if POC_RESET_FLAG
    142145  Int                     m_pocAdjustmentValue;
     
    226229#endif
    227230  Window&  getScaledRefLayerWindow(Int x)            { return m_scaledRefLayerWindow[x]; }
     231#if P0312_VERT_PHASE_ADJ
     232  Void                    setVertPhasePositionEnableFlag(Int x, Bool b) { m_vertPhasePositionEnableFlag[x] = b;   }
     233  UInt                    getVertPhasePositionEnableFlag(Int x)          { return m_vertPhasePositionEnableFlag[x]; }
     234#endif
     235
    228236  TComPic** getIlpList() { return m_cIlpPic; }
    229237#if REF_IDX_MFM
Note: See TracChangeset for help on using the changeset viewer.