Changeset 286 in SHVCSoftware for branches/SHM-2.1-dev/source
- Timestamp:
- 11 Jun 2013, 03:09:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r283 r286 271 271 piDstY = piDstBufY + j * strideEL; 272 272 #if SCALED_REF_LAYER_OFFSETS 273 for( i = 0; i < pcTempPic->getWidth(); i++ ) 273 for( i = 0; i < leftStartL; i++ ) 274 { 275 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 276 piDstY++; 277 } 278 279 for( i = leftStartL; i < rightEndL-1; i++ ) 280 { 281 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 282 piSrcY++; 283 piDstY++; 284 } 285 286 for( i = rightEndL-1; i < pcTempPic->getWidth(); i++ ) 287 { 288 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 289 piDstY++; 290 } 274 291 #else 275 292 for( i = 0; i < widthEL; i++ ) 276 #endif277 293 { 278 294 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 279 #if SCALED_REF_LAYER_OFFSETS280 // Only increase the x position of reference upsample picture when within the window281 // "-2" to ensure that pointer doesn't go beyond the boundary rightEndL-1282 if( (i >= leftStartL) && (i <= rightEndL-2) )283 {284 piSrcY++;285 }286 #else287 295 piSrcY++; 288 #endif289 296 piDstY++; 290 297 } 298 #endif 291 299 } 292 300 … … 411 419 412 420 #if SCALED_REF_LAYER_OFFSETS 413 for( i = 0; i < pcTempPic->getWidth() >> 1; i++ ) 414 #else 415 for( i = 0; i < widthEL; i++ ) 416 #endif 421 for( i = 0; i < leftStartC; i++ ) 417 422 { 418 423 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 419 424 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 420 421 #if SCALED_REF_LAYER_OFFSETS 422 // Only increase the x position of reference upsample picture when within the window 423 // "-2" to ensure that pointer doesn't go beyond the boundary rightEndC-1 424 if( (i >= leftStartC) && (i <= rightEndC-2) ) 425 { 426 piSrcU++; 427 piSrcV++; 428 } 429 #else 425 piDstU++; 426 piDstV++; 427 } 428 429 for( i = leftStartC; i < rightEndC-1; i++ ) 430 { 431 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 432 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 430 433 piSrcU++; 431 434 piSrcV++; 432 #endif433 435 piDstU++; 434 436 piDstV++; 435 437 } 438 439 for( i = rightEndC-1; i < pcTempPic->getWidth() >> 1; i++ ) 440 { 441 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 442 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 443 piDstU++; 444 piDstV++; 445 } 446 #else 447 for( i = 0; i < widthEL; i++ ) 448 { 449 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 450 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 451 piSrcU++; 452 piSrcV++; 453 piDstU++; 454 piDstV++; 455 } 456 #endif 436 457 } 437 458
Note: See TracChangeset for help on using the changeset viewer.