Changeset 448 in SHVCSoftware
- Timestamp:
- 8 Nov 2013, 06:17:03 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r445 r448 392 392 string* cfg_predLayerIdsPtr [MAX_LAYERS]; 393 393 #endif 394 #if SCALED_REF_LAYER_OFFSETS395 394 string cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 396 395 string cfg_scaledRefLayerTopOffset [MAX_LAYERS]; … … 403 402 string* cfg_scaledRefLayerRightOffsetPtr [MAX_LAYERS]; 404 403 string* cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS]; 405 #endif406 404 #if RC_SHVC_HARMONIZATION 407 405 Bool* cfg_RCEnableRateControl [MAX_LAYERS]; … … 455 453 cfg_predLayerIdsPtr [layer] = &cfg_predLayerIds[layer]; 456 454 #endif 457 #if SCALED_REF_LAYER_OFFSETS458 455 cfg_numScaledRefLayerOffsets [layer] = &m_acLayerCfg[layer].m_numScaledRefLayerOffsets; 459 456 for(Int i = 0; i < MAX_LAYERS; i++) … … 464 461 cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer]; 465 462 } 466 #endif467 463 #if RC_SHVC_HARMONIZATION 468 464 cfg_RCEnableRateControl[layer] = &m_acLayerCfg[layer].m_RCEnableRateControl; … … 487 483 string cfg_tileSets; 488 484 #endif 489 #else 485 #else //SVC_EXTENSION 490 486 string cfg_InputFile; 491 487 string cfg_BitstreamFile; 492 488 string cfg_ReconFile; 493 489 string cfg_dQPFile; 494 #endif 490 #endif //SVC_EXTENSION 495 491 string cfg_ColumnWidth; 496 492 string cfg_RowHeight; … … 546 542 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 547 543 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 548 #if SCALED_REF_LAYER_OFFSETS549 544 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets, 0, MAX_LAYERS, "Number of scaled offset layer sets ") 550 545 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" … … 556 551 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 557 552 " bottom-right luma sample of the EL picture, in units of two luma samples") 558 #endif559 553 #if N0120_MAX_TID_REF_CFG 560 554 ("MaxTidRefPresentFlag", m_maxTidRefPresentFlag, true, "max_tid_ref_present_flag (0: not present, 1: present(default)) " ) … … 572 566 ("IlSampleOnlyPred%d", m_ilSampleOnlyPred, 0, MAX_LAYERS, "Set inter_layer_sample_pred_only_flag for all slices") 573 567 #endif 574 #else 568 #else //SVC_EXTENSION 575 569 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") 576 570 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") … … 593 587 ("ConfBottom", m_confBottom, 0, "Bottom offset for window conformance mode 3") 594 588 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 595 #endif 589 #endif //SVC_EXTENSION 596 590 597 591 //Field coding parameters … … 978 972 m_BLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str()); 979 973 #endif 980 #else 974 #else //SVC_EXTENSION 981 975 m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str()); 982 976 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 983 977 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 984 978 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 985 #endif 979 #endif //SVC_EXTENSION 986 980 987 981 Char* pColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str()); … … 1042 1036 m_pRowHeight = NULL; 1043 1037 } 1044 #if S CALED_REF_LAYER_OFFSETS1038 #if SVC_EXTENSION 1045 1039 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1046 1040 { … … 1112 1106 } 1113 1107 } 1114 #endif1115 1108 #if VPS_EXTN_DIRECT_REF_LAYERS 1116 1109 #if M0457_PREDICTION_INDICATIONS … … 1242 1235 } 1243 1236 #endif 1237 #endif //SVC_EXTENSION 1244 1238 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); 1245 1239 … … 2516 2510 } 2517 2511 2518 #if S CALED_REF_LAYER_OFFSETS2512 #if SVC_EXTENSION 2519 2513 Void TAppEncCfg::cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString) 2520 2514 { … … 2549 2543 } 2550 2544 } 2551 #endif2552 2545 2553 2546 #if FINAL_RPL_CHANGE_N0082 … … 2765 2758 } 2766 2759 #endif 2760 #endif //SVC_EXTENSION 2767 2761 //! \} -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.h
r445 r448 407 407 Char* getBLSyntaxFile() { return m_BLSyntaxFile; } 408 408 #endif 409 #if SCALED_REF_LAYER_OFFSETS410 409 Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString); 411 #endif412 410 #if REPN_FORMAT_IN_VPS 413 411 RepFormatCfg* getRepFormatCfg(Int i) { return &m_repFormatCfg[i]; } -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r445 r448 38 38 m_confLeft = m_confRight = m_confTop = m_confBottom = 0; 39 39 m_aiPad[1] = m_aiPad[0] = 0; 40 #if SCALED_REF_LAYER_OFFSETS41 40 m_numScaledRefLayerOffsets = 0; 42 41 ::memset(m_scaledRefLayerLeftOffset, 0, sizeof(m_scaledRefLayerLeftOffset)); … … 44 43 ::memset(m_scaledRefLayerRightOffset, 0, sizeof(m_scaledRefLayerRightOffset)); 45 44 ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset)); 46 #endif47 45 } 48 46 … … 332 330 } 333 331 334 #endif 332 #endif //SVC_EXTENSION 335 333 336 334 -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r445 r448 43 43 Int m_iIntraPeriod; ///< period of I-slice (random access period) 44 44 Double m_fQP; ///< QP value of key-picture (floating point) 45 #if SVC_EXTENSION 45 46 #if VPS_EXTN_DIRECT_REF_LAYERS 46 47 #if M0457_PREDICTION_INDICATIONS … … 84 85 Int m_maxTidIlRefPicsPlus1; 85 86 #endif 86 #if SVC_EXTENSION87 87 Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). 88 #endif 88 #endif //SVC_EXTENSION 89 89 90 90 Int m_iQP; ///< QP value of key-picture (integer) … … 92 92 Int* m_aidQP; ///< array of slice QP values 93 93 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 94 #if S CALED_REF_LAYER_OFFSETS94 #if SVC_EXTENSION 95 95 Int m_numScaledRefLayerOffsets ; 96 96 Int m_scaledRefLayerLeftOffset [MAX_LAYERS]; … … 98 98 Int m_scaledRefLayerRightOffset [MAX_LAYERS]; 99 99 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 100 #endif101 100 #if FINAL_RPL_CHANGE_N0082 102 101 GOPEntry m_GOPListLayer[MAX_GOP]; ///< for layer … … 105 104 Int m_repFormatIdx; 106 105 #endif 106 #endif //SVC_EXTENSION 107 107 public: 108 108 TAppEncLayerCfg(); … … 139 139 Int getIntQP() {return m_iQP; } 140 140 Int* getdQPs() {return m_aidQP; } 141 #if SVC_EXTENSION 141 142 #if VPS_EXTN_DIRECT_REF_LAYERS 142 143 #if M0457_PREDICTION_INDICATIONS … … 183 184 UInt getMaxCUDepth() {return m_uiMaxCUDepth; } 184 185 #endif 186 #endif //SVC_EXTENSION 185 187 }; // END CLASS DEFINITION TAppEncLayerCfg 186 188 -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
r445 r448 561 561 m_acTEncTop[layer].setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 562 562 m_acTEncTop[layer].setElRapSliceTypeB(layer == 0? 0 : m_elRapSliceBEnabled); 563 #if SCALED_REF_LAYER_OFFSETS564 563 if( layer > 0 ) 565 564 { … … 571 570 } 572 571 } 573 #endif574 572 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 575 573 m_acTEncTop[layer].setAdaptiveResolutionChange( m_adaptiveResolutionChange ); … … 577 575 } 578 576 } 579 #else 577 #else //SVC_EXTENSION 580 578 Void TAppEncTop::xInitLibCfg() 581 579 { … … 851 849 m_cTEncTop.setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 852 850 } 853 #endif 851 #endif //SVC_EXTENSION 854 852 855 853 Void TAppEncTop::xCreateLib() … … 878 876 m_acTEncTop[layer].create(); 879 877 } 880 #else 878 #else //SVC_EXTENSION 881 879 m_cTVideoIOYuvInputFile.open( m_pchInputFile, false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // read mode 882 880 m_cTVideoIOYuvInputFile.skipFrames(m_FrameSkip, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1]); … … 887 885 // Neo Decoder 888 886 m_cTEncTop.create(); 889 #endif 887 #endif //SVC_EXTENSION 890 888 } 891 889 … … 911 909 m_acTEncTop[layer].destroy(); 912 910 } 913 #else 911 #else //SVC_EXTENSION 914 912 m_cTVideoIOYuvInputFile.close(); 915 913 m_cTVideoIOYuvReconFile.close(); … … 917 915 // Neo Decoder 918 916 m_cTEncTop.destroy(); 919 #endif 917 #endif //SVC_EXTENSION 920 918 } 921 919 -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComDataCU.cpp
r445 r448 4008 4008 #endif 4009 4009 4010 #if SCALED_REF_LAYER_OFFSETS4011 4010 Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); 4012 4011 Int topStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 4013 4012 Int iBX = ((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16; 4014 4013 Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; 4015 #else4016 Int iBX = (uiPelX*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16;4017 Int iBY = (uiPelY*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16;4018 #endif4019 4014 4020 4015 #if N0139_POSITION_ROUNDING_OFFSET … … 4026 4021 #endif 4027 4022 4028 #if SCALED_REF_LAYER_OFFSETS4029 4023 if ( iBX >= cBaseColPic->getPicYuvRec()->getWidth() || iBY >= cBaseColPic->getPicYuvRec()->getHeight() || 4030 4024 iBX < 0 || iBY < 0 ) 4031 #else4032 if ( iBX >= cBaseColPic->getPicYuvRec()->getWidth() || iBY >= cBaseColPic->getPicYuvRec()->getHeight())4033 #endif4034 4025 { 4035 4026 return NULL; -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPrediction.cpp
r442 r448 765 765 766 766 #if SVC_UPSAMPLING 767 #if SCALED_REF_LAYER_OFFSETS768 767 Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window) 769 768 { 770 769 m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window); 771 770 } 772 #else773 Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic)774 {775 m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic);776 }777 #endif778 771 #endif 779 772 //! \} -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPrediction.h
r442 r448 120 120 #if SVC_EXTENSION 121 121 #if SVC_UPSAMPLING 122 #if SCALED_REF_LAYER_OFFSETS123 122 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); 124 #else125 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic );126 123 #endif 127 #endif 128 #endif 124 #endif //SVC_EXTENSION 129 125 }; 130 126 -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.cpp
r446 r448 2167 2167 , m_vuiParametersPresentFlag (false) 2168 2168 , m_vuiParameters () 2169 #if SVC_EXTENSION 2169 2170 #if M0463_VUI_EXT_ILP_REF 2170 2171 , m_interViewMvVertConstraintFlag (false) 2171 2172 , m_numIlpRestrictedRefLayers ( 0 ) 2172 2173 #endif 2173 #if SVC_EXTENSION 2174 , m_layerId(0) 2175 #endif 2176 #if SCALED_REF_LAYER_OFFSETS 2177 , m_numScaledRefLayerOffsets (0) 2178 #endif 2174 , m_layerId ( 0 ) 2175 , m_numScaledRefLayerOffsets ( 0 ) 2179 2176 #if REPN_FORMAT_IN_VPS 2180 2177 , m_updateRepFormatFlag (false) 2181 2178 #endif 2179 #endif //SVC_EXTENSION 2182 2180 { 2183 2181 for ( Int i = 0; i < MAX_TLAYER; i++ ) -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.h
r447 r448 1132 1132 TComPTL m_pcPTL; 1133 1133 1134 #if SVC_EXTENSION 1134 1135 #if M0463_VUI_EXT_ILP_REF 1135 1136 Bool m_interViewMvVertConstraintFlag; … … 1140 1141 #endif 1141 1142 1142 #if SVC_EXTENSION1143 1143 UInt m_layerId; 1144 1144 … … 1150 1150 #endif 1151 1151 1152 #endif1153 1152 #if REF_IDX_MFM 1154 1153 #if !M0457_COL_PICTURE_SIGNALING … … 1156 1155 #endif 1157 1156 #endif 1158 #if SCALED_REF_LAYER_OFFSETS1159 1157 UInt m_numScaledRefLayerOffsets; 1160 1158 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1161 #endif1162 1159 #if REPN_FORMAT_IN_VPS 1163 1160 Bool m_updateRepFormatFlag; 1164 1161 #endif 1162 #endif //SVC_EXTENSION 1165 1163 public: 1166 1164 TComSPS(); … … 1323 1321 Void setLayerId(UInt layerId) { m_layerId = layerId; } 1324 1322 UInt getLayerId() { return m_layerId; } 1325 #endif1326 1323 #if REF_IDX_MFM 1327 1324 #if !M0457_COL_PICTURE_SIGNALING … … 1330 1327 #endif 1331 1328 #endif 1332 #if SCALED_REF_LAYER_OFFSETS1333 1329 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1334 1330 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 1335 1331 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 1336 #endif1337 1332 #if REPN_FORMAT_IN_VPS 1338 1333 Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } 1339 1334 Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } 1340 1335 #endif 1336 #endif //SVC_EXTENSION 1341 1337 }; 1342 1338 -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r442 r448 97 97 } 98 98 99 #if SCALED_REF_LAYER_OFFSETS100 99 Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ) 101 #else102 Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic )103 #endif104 100 { 105 101 assert ( NTAPS_US_LUMA == 8 ); … … 109 105 110 106 //========== Y component upsampling =========== 111 #if SCALED_REF_LAYER_OFFSETS112 107 const Window &scalEL = window; 113 108 … … 119 114 Int heightEL = pcUsPic->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 120 115 Int strideEL = pcUsPic->getStride(); 121 #else 122 const Window &confBL = pcBasePic->getConformanceWindow(); 123 const Window &confEL = pcUsPic->getConformanceWindow(); 124 125 Int widthBL = pcBasePic->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset(); 126 Int heightBL = pcBasePic->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset(); 127 Int strideBL = pcBasePic->getStride(); 128 129 Int widthEL = pcUsPic->getWidth () - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset(); 130 Int heightEL = pcUsPic->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 131 Int strideEL = pcUsPic->getStride(); 132 #endif 116 133 117 Pel* piTempBufY = pcTempPic->getLumaAddr(); 134 118 Pel* piSrcBufY = pcBasePic->getLumaAddr(); … … 238 222 widthBL = pcBasePic->getWidth (); 239 223 heightBL = min<Int>( pcBasePic->getHeight(), heightEL ); 240 #if SCALED_REF_LAYER_OFFSETS 224 241 225 Int leftStartL = scalEL.getWindowLeftOffset(); 242 226 Int rightEndL = pcUsPic->getWidth() - scalEL.getWindowRightOffset(); … … 246 230 Int leftOffset = leftStartL > 0 ? leftStartL : 0; 247 231 #endif 248 #endif249 232 250 233 #if N0214_INTERMEDIATE_BUFFER_16BITS … … 255 238 for( i = 0; i < widthEL; i++ ) 256 239 { 257 #if SCALED_REF_LAYER_OFFSETS258 240 Int x = Clip3( leftStartL, rightEndL - 1, i ); 259 241 refPos16 = (((x - leftStartL)*scaleX + addX) >> shiftXM4) - deltaX; 260 #else261 refPos16 = ((i*scaleX + addX) >> shiftXM4) - deltaX;262 #endif263 242 phase = refPos16 & 15; 264 243 refPos = refPos16 >> 4; … … 293 272 Int iOffset = 1 << (nShift - 1); 294 273 295 #if SCALED_REF_LAYER_OFFSETS296 274 for( j = 0; j < pcTempPic->getHeight(); j++ ) 297 #else 298 for( j = 0; j < heightEL; j++ ) 299 #endif 300 { 301 #if SCALED_REF_LAYER_OFFSETS 275 { 302 276 Int y = Clip3(topStartL, bottomEndL - 1, j); 303 277 refPos16 = ((( y - topStartL )*scaleY + addY) >> shiftYM4) - deltaY; 304 #else305 refPos16 = ((j*scaleY + addY) >> shiftYM4) - deltaY;306 #endif307 278 phase = refPos16 & 15; 308 279 refPos = refPos16 >> 4; … … 310 281 311 282 piSrcY = piTempBufY + (refPos -((NTAPS_US_LUMA>>1) - 1))*strideEL; 312 #if SCALED_REF_LAYER_OFFSETS313 283 #if BUGFIX_RESAMPLE 314 284 Pel* piDstY0 = piDstBufY + j * strideEL; … … 376 346 #endif 377 347 #endif 378 #else 379 piDstY = piDstBufY + j * strideEL; 380 381 for( i = 0; i < widthEL; i++ ) 382 { 383 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 384 piSrcY++; 385 piDstY++; 386 } 387 #endif 388 } 389 390 #if SCALED_REF_LAYER_OFFSETS 348 } 349 391 350 widthBL = pcBasePic->getWidth (); 392 351 heightBL = pcBasePic->getHeight(); … … 394 353 widthEL = pcUsPic->getWidth () - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 395 354 heightEL = pcUsPic->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 396 #else397 widthBL = pcBasePic->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();398 heightBL = pcBasePic->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();399 400 widthEL = pcUsPic->getWidth () - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();401 heightEL = pcUsPic->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();402 #endif403 355 404 356 //========== UV component upsampling =========== … … 412 364 strideBL = pcBasePic->getCStride(); 413 365 strideEL = pcUsPic->getCStride(); 414 #if SCALED_REF_LAYER_OFFSETS 366 415 367 Int leftStartC = scalEL.getWindowLeftOffset() >> 1; 416 368 Int rightEndC = (pcUsPic->getWidth() >> 1) - (scalEL.getWindowRightOffset() >> 1); … … 420 372 leftOffset = leftStartC > 0 ? leftStartC : 0; 421 373 #endif 422 #endif423 374 424 375 shiftX = 16; … … 455 406 for( i = 0; i < widthEL; i++ ) 456 407 { 457 #if SCALED_REF_LAYER_OFFSETS458 408 Int x = Clip3(leftStartC, rightEndC - 1, i); 459 409 refPos16 = (((x - leftStartC)*scaleX + addX) >> shiftXM4) - deltaX; 460 #else461 refPos16 = ((i*scaleX + addX) >> shiftXM4) - deltaX;462 #endif463 410 phase = refPos16 & 15; 464 411 refPos = refPos16 >> 4; … … 498 445 #endif 499 446 500 #if SCALED_REF_LAYER_OFFSETS501 447 for( j = 0; j < pcTempPic->getHeight() >> 1; j++ ) 502 #else 503 for( j = 0; j < heightEL; j++ ) 504 #endif 505 { 506 #if SCALED_REF_LAYER_OFFSETS 448 { 507 449 Int y = Clip3(topStartC, bottomEndC - 1, j); 508 450 refPos16 = (((y - topStartC)*scaleY + addY) >> shiftYM4) - deltaY; 509 #else510 refPos16 = ((j*scaleY + addY) >> shiftYM4) - deltaY;511 #endif512 451 phase = refPos16 & 15; 513 452 refPos = refPos16 >> 4; … … 516 455 piSrcU = piTempBufU + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL; 517 456 piSrcV = piTempBufV + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL; 518 #if SCALED_REF_LAYER_OFFSETS 457 519 458 #if BUGFIX_RESAMPLE 520 459 Pel* piDstU0 = piDstBufU + j*strideEL; … … 608 547 #endif 609 548 #endif 610 #else611 piDstU = piDstBufU + j*strideEL;612 piDstV = piDstBufV + j*strideEL;613 614 for( i = 0; i < widthEL; i++ )615 {616 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift));617 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift));618 piSrcU++;619 piSrcV++;620 piDstU++;621 piDstV++;622 }623 #endif624 549 } 625 550 } -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.h
r313 r448 43 43 ~TComUpsampleFilter(void); 44 44 45 #if SCALED_REF_LAYER_OFFSETS46 45 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); 47 #else48 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic );49 #endif50 46 }; 51 47 -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h
r447 r448 60 60 #define M0463_VUI_EXT_ILP_REF 0 ///< JCTVC-M0463: VUI extension inter-layer dependency offset signalling 61 61 #define SPS_EXTENSION 1 ///< Define sps_extension() syntax structure 62 #define SCALED_REF_LAYER_OFFSETS 1 ///< JCTVC-M0309: Signal scaled reference layer offsets in SPS63 62 #define VERT_MV_CONSTRAINT 1 ///< Vertical MV component constraint flag 64 63 #define SCALABILITY_MASK_E0104 1 ///< JCT3V-E0104: scalability mask for depth -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r447 r448 835 835 assert( uiCode == 0 ); 836 836 #endif 837 #if SCALED_REF_LAYER_OFFSETS838 837 if( pcSPS->getLayerId() > 0 ) 839 838 { … … 849 848 } 850 849 } 851 #endif852 850 #if M0463_VUI_EXT_ILP_REF 853 851 //// sps_extension_vui_parameters( ) -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
r446 r448 1159 1159 #endif 1160 1160 1161 #if SCALED_REF_LAYER_OFFSETS1162 1161 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 1163 1162 … … 1167 1166 Int widthEL = pcPic->getPicYuvRec()->getWidth() - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 1168 1167 Int heightEL = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 1169 #else 1170 const Window &confBL = pcSlice->getBaseColPic()->getPicYuvRec()->getConformanceWindow(); 1171 const Window &confEL = pcPic->getPicYuvRec()->getConformanceWindow(); 1172 1173 Int widthBL = pcSlice->getBaseColPic()->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset(); 1174 Int heightBL = pcSlice->getBaseColPic()->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset(); 1175 1176 Int widthEL = pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset(); 1177 Int heightEL = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 1178 #endif 1168 1179 1169 g_mvScalingFactor[refLayerIdc][0] = widthEL == widthBL ? 4096 : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL); 1180 1170 g_mvScalingFactor[refLayerIdc][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL); … … 1186 1176 if( pcPic->isSpatialEnhLayer(refLayerIdc) ) 1187 1177 { 1188 #if SCALED_REF_LAYER_OFFSETS1189 1178 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) ); 1190 #else1191 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() );1192 #endif1193 1179 } 1194 1180 else … … 1268 1254 #endif 1269 1255 #endif 1270 1271 #endif //SVC_EXTENSION 1272 1256 1273 1257 #if N0147_IRAP_ALIGN_FLAG 1274 1258 if( m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag()) … … 1285 1269 } 1286 1270 #endif 1271 #endif //SVC_EXTENSION 1287 1272 1288 1273 // For generalized B -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r447 r448 664 664 WRITE_FLAG( 0, "inter_view_mv_vert_constraint_flag" ); 665 665 #endif 666 #if SCALED_REF_LAYER_OFFSETS667 666 if( pcSPS->getLayerId() > 0 ) 668 667 { … … 677 676 } 678 677 } 679 #endif680 678 #if M0463_VUI_EXT_ILP_REF 681 679 //// sps_extension_vui_parameters( ) -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r446 r448 782 782 #endif 783 783 784 #if SCALED_REF_LAYER_OFFSETS785 784 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc); 786 785 … … 790 789 Int widthEL = pcPic->getPicYuvRec()->getWidth() - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 791 790 Int heightEL = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 792 #else 793 const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getConformanceWindow(); 794 const Window &confEL = pcPic->getPicYuvRec()->getConformanceWindow(); 795 796 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset(); 797 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset(); 798 799 Int widthEL = pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset(); 800 Int heightEL = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 801 #endif 791 802 792 g_mvScalingFactor[refLayerIdc][0] = widthEL == widthBL ? 4096 : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL); 803 793 g_mvScalingFactor[refLayerIdc][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL); … … 809 799 if( pcPic->isSpatialEnhLayer(refLayerIdc)) 810 800 { 811 #if SCALED_REF_LAYER_OFFSETS812 801 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) ); 813 #else814 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() );815 #endif816 802 } 817 803 else -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncTop.cpp
r445 r448 88 88 m_bMFMEnabledFlag = false; 89 89 #endif 90 #if SCALED_REF_LAYER_OFFSETS91 90 m_numScaledRefLayerOffsets = 0; 92 #endif93 #endif94 91 #if POC_RESET_FLAG 95 92 m_pocAdjustmentValue = 0; 96 93 #endif 94 #endif //SVC_EXTENSION 97 95 } 98 96 … … 878 876 #if SVC_EXTENSION 879 877 m_cSPS.setLayerId(m_layerId); 880 #endif881 878 #if REF_IDX_MFM 882 879 #if !M0457_COL_PICTURE_SIGNALING … … 884 881 #endif 885 882 #endif 886 #if SCALED_REF_LAYER_OFFSETS887 883 m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 888 884 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++) … … 890 886 m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i]; 891 887 } 892 #endif 888 #endif //SVC_EXTENSION 893 889 ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL(); 894 890 profileTierLevel.setLevelIdc(m_level); -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncTop.h
r442 r448 140 140 Int m_ilSampleOnlyPred; 141 141 #endif 142 #if SCALED_REF_LAYER_OFFSETS143 142 UInt m_numScaledRefLayerOffsets; 144 143 Window m_scaledRefLayerWindow[MAX_LAYERS]; 145 #endif146 144 #if POC_RESET_FLAG 147 145 Int m_pocAdjustmentValue; 148 146 #endif 149 #endif 147 #endif //SVC_EXTENSION 150 148 protected: 151 149 Void xGetNewPicBuffer ( TComPic*& rpcPic ); ///< get picture buffer which will be processed … … 209 207 Int getNumPicRcvd () { return m_iNumPicRcvd; } 210 208 Void setNumPicRcvd ( Int num ) { m_iNumPicRcvd = num; } 211 #if SCALED_REF_LAYER_OFFSETS212 209 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 213 210 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 214 211 Window& getScaledRefLayerWindow(Int x) { return m_scaledRefLayerWindow[x]; } 215 #endif 216 #endif 212 #endif //SVC_EXTENSION 217 213 218 214 // -------------------------------------------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.