Changeset 464 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib
- Timestamp:
- 13 Nov 2013, 03:10:08 (11 years ago)
- 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 765 765 766 766 #if SVC_UPSAMPLING 767 #if O0215_PHASE_ALIGNMENT 768 Void 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 767 773 Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window) 768 774 { 769 775 m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window); 770 776 } 777 #endif 771 778 #endif 772 779 //! \} -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPrediction.h
r448 r464 120 120 #if SVC_EXTENSION 121 121 #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 122 125 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); 126 #endif 123 127 #endif 124 128 #endif //SVC_EXTENSION -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.h
r462 r464 598 598 Int m_viewIdVal [MAX_LAYERS]; 599 599 #endif 600 601 #if O0215_PHASE_ALIGNMENT 602 Bool m_phaseAlignFlag; 603 #endif 600 604 #endif //SVC_EXTENSION 601 605 public: … … 850 854 Int getExtensionOffset() { return m_extensionOffset; } 851 855 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; } 852 860 #endif 853 861 #endif //SVC_EXTENSION -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r449 r464 97 97 } 98 98 99 #if O0215_PHASE_ALIGNMENT 100 Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag ) 101 #else 99 102 Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ) 103 #endif 100 104 { 101 105 assert ( NTAPS_US_LUMA == 8 ); … … 200 204 Int shiftY = 16; 201 205 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 202 210 Int phaseX = 0; 203 211 Int phaseY = 0; 212 #endif 204 213 205 214 #if ROUNDING_OFFSET … … 331 340 shiftY = 16; 332 341 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 333 357 phaseX = 0; 334 358 phaseY = 1; … … 344 368 deltaX = 4 * phaseX; 345 369 deltaY = 4 * phaseY; 370 #endif 346 371 347 372 shiftXM4 = shiftX - 4; -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.h
r448 r464 43 43 ~TComUpsampleFilter(void); 44 44 45 #if O0215_PHASE_ALIGNMENT 46 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag ); 47 #else 45 48 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); 49 #endif 50 46 51 }; 47 52 -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h
r463 r464 152 152 #define N0383_IL_CONSTRAINED_TILE_SETS_SEI 1 153 153 #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 154 157 #else 155 158 #define SYNTAX_OUTPUT 0 -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r458 r464 1251 1251 vps->setMaxOneActiveRefLayerFlag(uiCode); 1252 1252 #endif 1253 #if O0215_PHASE_ALIGNMENT 1254 READ_FLAG( uiCode, "phase_align_flag"); vps->setPhaseAlignFlag( uiCode == 1 ? true : false ); 1255 #endif 1253 1256 1254 1257 #if N0147_IRAP_ALIGN_FLAG -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
r462 r464 1144 1144 if( pcPic->isSpatialEnhLayer(refLayerIdc) ) 1145 1145 { 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 1146 1149 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) ); 1150 #endif 1147 1151 } 1148 1152 else … … 1201 1205 1202 1206 pcSlice->setILRPic( m_cIlpPic ); 1207 1203 1208 #if REF_IDX_MFM 1204 1209 #if M0457_COL_PICTURE_SIGNALING -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r461 r464 990 990 WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag"); 991 991 #endif 992 #if O0215_PHASE_ALIGNMENT 993 WRITE_FLAG(vps->getPhaseAlignFlag(), "phase_align_flag" ); 994 #endif 992 995 #if N0147_IRAP_ALIGN_FLAG 993 996 WRITE_FLAG(vps->getCrossLayerIrapAlignFlag(), "cross_layer_irap_aligned_flag"); -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r462 r464 796 796 if( pcPic->isSpatialEnhLayer(refLayerIdc)) 797 797 { 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 798 801 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) ); 802 #endif 799 803 } 800 804 else
Note: See TracChangeset for help on using the changeset viewer.