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


Ignore:
Timestamp:
13 Nov 2013, 03:10:08 (12 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/TLibCommon
Files:
6 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
Note: See TracChangeset for help on using the changeset viewer.