Changeset 464 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib


Ignore:
Timestamp:
13 Nov 2013, 03:10:08 (11 years ago)
Author:
qualcomm
Message:

JCTVC-O0215: a VPS flag to specify the phase alignment between layers (zero or center phase shift) for up-sampling process, from cjianle@…

Location:
branches/SHM-4.0-dev/source/Lib
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r448 r464  
    765765
    766766#if SVC_UPSAMPLING
     767#if O0215_PHASE_ALIGNMENT
     768Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag )
     769{
     770  m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window, phaseAlignFlag );
     771}
     772#else
    767773Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window)
    768774{
    769775  m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window);
    770776}
     777#endif
    771778#endif
    772779//! \}
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPrediction.h

    r448 r464  
    120120#if SVC_EXTENSION
    121121#if SVC_UPSAMPLING
     122#if O0215_PHASE_ALIGNMENT
     123  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag );
     124#else
    122125  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
     126#endif
    123127#endif
    124128#endif //SVC_EXTENSION
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.h

    r462 r464  
    598598  Int         m_viewIdVal                [MAX_LAYERS];
    599599#endif
     600
     601#if O0215_PHASE_ALIGNMENT
     602  Bool       m_phaseAlignFlag;
     603#endif
    600604#endif //SVC_EXTENSION
    601605public:
     
    850854  Int     getExtensionOffset()                 { return m_extensionOffset;   }
    851855  Void    setExtensionOffset( UInt offset )    { m_extensionOffset = offset; }
     856#endif
     857#if O0215_PHASE_ALIGNMENT
     858  Bool   getPhaseAlignFlag()                             { return m_phaseAlignFlag; }
     859  Void   setPhaseAlignFlag(Bool x)                       { m_phaseAlignFlag = x;    }
    852860#endif
    853861#endif //SVC_EXTENSION
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r449 r464  
    9797}
    9898
     99#if O0215_PHASE_ALIGNMENT
     100Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag )
     101#else
    99102Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window )
     103#endif
    100104{
    101105  assert ( NTAPS_US_LUMA == 8 );
     
    200204    Int   shiftY = 16;
    201205
     206#if O0215_PHASE_ALIGNMENT //for Luma, if Phase 0, then both PhaseX  and PhaseY should be 0. If symmetric: both PhaseX and PhaseY should be 2
     207    Int   phaseX = 2*phaseAlignFlag;
     208    Int   phaseY = 2*phaseAlignFlag; 
     209#else
    202210    Int   phaseX = 0;
    203211    Int   phaseY = 0;
     212#endif
    204213
    205214#if ROUNDING_OFFSET
     
    331340    shiftY = 16;
    332341
     342#if O0215_PHASE_ALIGNMENT 
     343    Int phaseXC = 0;
     344    Int phaseYC = 1;
     345
     346#if ROUNDING_OFFSET
     347    addX       = ( ( (phaseXC+phaseAlignFlag) * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) );
     348    addY       = ( ( (phaseYC+phaseAlignFlag) * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) );
     349#else
     350    addX       = ( ( ( widthBL * (phaseXC+phaseAlignFlag) ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) );
     351    addY       = ( ( ( heightBL * (phaseYC+phaseAlignFlag) ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) );
     352#endif
     353
     354    deltaX     = 4 * (phaseXC+phaseAlignFlag);
     355    deltaY     = 4 * (phaseYC+phaseAlignFlag);
     356#else
    333357    phaseX = 0;
    334358    phaseY = 1;
     
    344368    deltaX     = 4 * phaseX;
    345369    deltaY     = 4 * phaseY;
     370#endif
    346371
    347372    shiftXM4 = shiftX - 4;
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.h

    r448 r464  
    4343  ~TComUpsampleFilter(void);
    4444
     45#if O0215_PHASE_ALIGNMENT
     46  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag );
     47#else
    4548  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
     49#endif
     50
    4651};
    4752
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h

    r463 r464  
    152152#define N0383_IL_CONSTRAINED_TILE_SETS_SEI  1
    153153#define N0065_LAYER_POC_ALIGNMENT        1
     154
     155#define O0215_PHASE_ALIGNMENT            1     // JCTVC_O0215: signal a flag to specify phase alignment case, 0: zero-position-aligned, 1: central-position-aligned,
     156
    154157#else
    155158#define SYNTAX_OUTPUT                    0
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r458 r464  
    12511251  vps->setMaxOneActiveRefLayerFlag(uiCode);
    12521252#endif
     1253#if O0215_PHASE_ALIGNMENT
     1254  READ_FLAG( uiCode, "phase_align_flag"); vps->setPhaseAlignFlag( uiCode == 1 ? true : false );
     1255#endif
    12531256
    12541257#if N0147_IRAP_ALIGN_FLAG
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r462 r464  
    11441144        if( pcPic->isSpatialEnhLayer(refLayerIdc) )
    11451145        {   
     1146#if O0215_PHASE_ALIGNMENT
     1147          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );
     1148#else
    11461149          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
     1150#endif
    11471151        }
    11481152        else
     
    12011205
    12021206      pcSlice->setILRPic( m_cIlpPic );
     1207
    12031208#if REF_IDX_MFM
    12041209#if M0457_COL_PICTURE_SIGNALING
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r461 r464  
    990990  WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag");
    991991#endif
     992#if O0215_PHASE_ALIGNMENT
     993  WRITE_FLAG(vps->getPhaseAlignFlag(), "phase_align_flag" );
     994#endif
    992995#if N0147_IRAP_ALIGN_FLAG
    993996  WRITE_FLAG(vps->getCrossLayerIrapAlignFlag(), "cross_layer_irap_aligned_flag");
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r462 r464  
    796796        if( pcPic->isSpatialEnhLayer(refLayerIdc))
    797797        {
     798#if O0215_PHASE_ALIGNMENT
     799          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );
     800#else
    798801          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
     802#endif
    799803        }
    800804        else
Note: See TracChangeset for help on using the changeset viewer.