Changeset 338 in SHVCSoftware for branches/SHM-3.0-dev
- Timestamp:
- 15 Aug 2013, 21:08:40 (11 years ago)
- Location:
- branches/SHM-3.0-dev/source/Lib/TLibCommon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r335 r338 250 250 Int topStartL = scalEL.getWindowTopOffset(); 251 251 Int bottomEndL = pcUsPic->getHeight() - scalEL.getWindowBottomOffset(); 252 #if BUGFIX_RESAMPLE 253 Int leftOffset = leftStartL > 0 ? leftStartL : 0; 254 #endif 252 255 #endif 253 256 … … 315 318 piSrcY = piTempBufY + (refPos -((NTAPS_US_LUMA>>1) - 1))*strideEL; 316 319 #if SCALED_REF_LAYER_OFFSETS 320 #if BUGFIX_RESAMPLE 321 Pel* piDstY0 = piDstBufY + j * strideEL; 322 piDstY = piDstY0 + leftOffset; 323 piSrcY += leftOffset; 324 325 for( i = min<Int>(rightEndL, pcTempPic->getWidth()) - max<Int>(0, leftStartL); i > 0; i-- ) 326 { 327 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 328 piSrcY++; 329 piDstY++; 330 } 331 332 for( i = rightEndL; i < pcTempPic->getWidth(); i++ ) 333 { 334 *piDstY = piDstY0[rightEndL-1]; 335 piDstY++; 336 } 337 338 piDstY = piDstY0; 339 for( i = 0; i < leftStartL; i++ ) 340 { 341 *piDstY = piDstY0[leftStartL]; 342 piDstY++; 343 } 344 #else 317 345 #if 1 // it should provide identical result 318 346 Pel* piDstY0 = piDstBufY + j * strideEL; … … 354 382 } 355 383 #endif 384 #endif 356 385 #else 357 386 piDstY = piDstBufY + j * strideEL; … … 397 426 Int topStartC = scalEL.getWindowTopOffset() >> 1; 398 427 Int bottomEndC = (pcUsPic->getHeight() >> 1) - (scalEL.getWindowBottomOffset() >> 1); 428 #if BUGFIX_RESAMPLE 429 leftOffset = leftStartC > 0 ? leftStartC : 0; 430 #endif 399 431 #endif 400 432 … … 501 533 piSrcV = piTempBufV + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL; 502 534 #if SCALED_REF_LAYER_OFFSETS 535 #if BUGFIX_RESAMPLE 536 Pel* piDstU0 = piDstBufU + j*strideEL; 537 Pel* piDstV0 = piDstBufV + j*strideEL; 538 piDstU = piDstU0 + leftOffset; 539 piDstV = piDstV0 + leftOffset; 540 piSrcU += leftOffset; 541 piSrcV += leftOffset; 542 543 for( i = min<Int>(rightEndC, pcTempPic->getWidth() >> 1) - max<Int>(0, leftStartC); i > 0; i-- ) 544 { 545 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 546 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 547 piSrcU++; 548 piSrcV++; 549 piDstU++; 550 piDstV++; 551 } 552 553 for( i = rightEndC; i < pcTempPic->getWidth() >> 1; i++ ) 554 { 555 *piDstU = piDstU0[rightEndC-1]; 556 *piDstV = piDstV0[rightEndC-1]; 557 piDstU++; 558 piDstV++; 559 } 560 561 piDstU = piDstU0; 562 piDstV = piDstV0; 563 for( i = 0; i < leftStartC; i++ ) 564 { 565 *piDstU = piDstU0[leftStartC]; 566 *piDstV = piDstV0[leftStartC]; 567 piDstU++; 568 piDstV++; 569 } 570 #else 503 571 #if 1 // it should provide identical result 504 572 Pel* piDstU0 = piDstBufU + j*strideEL; … … 555 623 } 556 624 #endif 625 #endif 557 626 #else 558 627 piDstU = piDstBufU + j*strideEL; -
branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h
r337 r338 84 84 #define N0214_INTERMEDIATE_BUFFER_16BITS 1 ///< JCTVC-N0214 support base layer input more than 8 bits 85 85 #define ARBITRARY_SPATIAL_RATIO 0 ///< JCTVC-N0219, JCTVC-N0273: Support arbitrary spatial ratio 86 86 #define BUGFIX_RESAMPLE 1 ///< JCTVC-N0055: resampling bug fix for positive left scalled offset 87 87 88 88 #define SIMPLIFIED_MV_POS_SCALING 1 ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation … … 111 111 #define JCTVC_M0203_INTERLAYER_PRED_IDC 1 ///< implementation of JCTVC-M0203 Inter-layer Prediction Indication 112 112 #if JCTVC_M0203_INTERLAYER_PRED_IDC 113 #define ILR_RESTR 1 ///< JCTVC-M0209 Inter-layer RPS and RPL113 #define ILR_RESTR 1 ///< JCTVC-M0209 Inter-layer RPS and RPL 114 114 #define N0120_MAX_TID_REF_PRESENT_FLAG 1 ///< JCTVC-N0120 max_tid_ref_pics_plus1_present_flag 115 115 #endif 116 116 #if REF_IDX_MFM 117 #define REMOVE_COL_PICTURE_SIGNALING 1 ///< JCTVC-N0107 remove alternative collocated picture signalling117 #define REMOVE_COL_PICTURE_SIGNALING 1 ///< JCTVC-N0107 remove alternative collocated picture signalling 118 118 #define M0457_COL_PICTURE_SIGNALING 1 119 119 #endif 120 120 121 121 #if !VPS_EXTN_DIRECT_REF_LAYERS || !M0457_PREDICTION_INDICATIONS || !JCTVC_M0458_INTERLAYER_RPS_SIG 122 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107122 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107 123 123 #else 124 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107124 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107 125 125 #endif 126 126 #endif … … 128 128 #define FAST_INTRA_SHVC 1 ///< M0115: reduction number of intra modes in the EL (encoder only) 129 129 #if FAST_INTRA_SHVC 130 #define NB_REMAIN_MODES2 ///< nb of remaining modes (M0115)131 #endif 132 133 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037, rate control for SHVC130 #define NB_REMAIN_MODES 2 ///< nb of remaining modes (M0115) 131 #endif 132 133 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037, rate control for SHVC 134 134 135 135 #else
Note: See TracChangeset for help on using the changeset viewer.