@@ -409,18 +409,23 @@ class PlaneOfBlocks
409409
410410 MV_FORCEINLINE const uint8_t * GetRefBlockU (WorkingArea& workarea, int nVx, int nVy)
411411 {
412+ int nVx1 = (nLogxRatioUV == 1 ) ? nVx + 1 : nVx;
413+ int nVy1 = (nLogxRatioUV == 1 ) ? nVy + 1 : nVy;
412414 return
413- (nPel == 2 ) ? pRefFrame->GetPlane (UPLANE )->GetAbsolutePointerPel <1 >((workarea.x [1 ] << 1 ) + (nVx >> nLogxRatioUV), (workarea.y [1 ] << 1 ) + (nVy >> nLogyRatioUV)) :
414- (nPel == 1 ) ? pRefFrame->GetPlane (UPLANE )->GetAbsolutePointerPel <0 >((workarea.x [1 ]) + (nVx >> nLogxRatioUV), (workarea.y [1 ]) + (nVy >> nLogyRatioUV)) :
415- pRefFrame->GetPlane (UPLANE )->GetAbsolutePointerPel <2 >((workarea.x [1 ] << 2 ) + (nVx >> nLogxRatioUV), (workarea.y [1 ] << 2 ) + (nVy >> nLogyRatioUV));
415+ (nPel == 2 ) ? pRefFrame->GetPlane (UPLANE )->GetAbsolutePointerPel <1 >((workarea.x [1 ] << 1 ) + (nVx1 >> nLogxRatioUV), (workarea.y [1 ] << 1 ) + (nVy1 >> nLogyRatioUV)) :
416+ (nPel == 1 ) ? pRefFrame->GetPlane (UPLANE )->GetAbsolutePointerPel <0 >((workarea.x [1 ]) + (nVx1 >> nLogxRatioUV), (workarea.y [1 ]) + (nVy1 >> nLogyRatioUV)) :
417+ pRefFrame->GetPlane (UPLANE )->GetAbsolutePointerPel <2 >((workarea.x [1 ] << 2 ) + (nVx1 >> nLogxRatioUV), (workarea.y [1 ] << 2 ) + (nVy1 >> nLogyRatioUV));
418+
416419 }
417420
418421 MV_FORCEINLINE const uint8_t * GetRefBlockV (WorkingArea& workarea, int nVx, int nVy)
419422 {
423+ int nVx1 = (nLogxRatioUV == 1 ) ? nVx + 1 : nVx;
424+ int nVy1 = (nLogxRatioUV == 1 ) ? nVy + 1 : nVy;
420425 return
421- (nPel == 2 ) ? pRefFrame->GetPlane (VPLANE )->GetAbsolutePointerPel <1 >((workarea.x [2 ] << 1 ) + (nVx >> nLogxRatioUV), (workarea.y [2 ] << 1 ) + (nVy >> nLogyRatioUV)) :
422- (nPel == 1 ) ? pRefFrame->GetPlane (VPLANE )->GetAbsolutePointerPel <0 >((workarea.x [2 ]) + (nVx >> nLogxRatioUV), (workarea.y [2 ]) + (nVy >> nLogyRatioUV)) :
423- pRefFrame->GetPlane (VPLANE )->GetAbsolutePointerPel <2 >((workarea.x [2 ] << 2 ) + (nVx >> nLogxRatioUV), (workarea.y [2 ] << 2 ) + (nVy >> nLogyRatioUV));
426+ (nPel == 2 ) ? pRefFrame->GetPlane (VPLANE )->GetAbsolutePointerPel <1 >((workarea.x [2 ] << 1 ) + (nVx1 >> nLogxRatioUV), (workarea.y [2 ] << 1 ) + (nVy1 >> nLogyRatioUV)) :
427+ (nPel == 1 ) ? pRefFrame->GetPlane (VPLANE )->GetAbsolutePointerPel <0 >((workarea.x [2 ]) + (nVx1 >> nLogxRatioUV), (workarea.y [2 ]) + (nVy1 >> nLogyRatioUV)) :
428+ pRefFrame->GetPlane (VPLANE )->GetAbsolutePointerPel <2 >((workarea.x [2 ] << 2 ) + (nVx1 >> nLogxRatioUV), (workarea.y [2 ] << 2 ) + (nVy1 >> nLogyRatioUV));
424429 }
425430
426431 MV_FORCEINLINE const uint8_t * GetSrcBlock (int nX, int nY)
0 commit comments