Opened 5 years ago

Closed 4 years ago

#561 closed defect (fixed)

RPR - Issues with clipping and padding

Reported by: bheng Owned by:
Priority: minor Milestone: VTM-7.0
Component: VTM Version: VTM-6.1
Keywords: Cc: ksuehring, XiangLi, fbossen, jvet@…

Description

1. Clipping of out of bounds locations.

The RPR code in xPredInterBlkRPR() uses clipping like the following in a few places:

xInt = std::min( std::max( 0, xInt ), ( refPicWidth >> ::getComponentScaleX( compID, chFmt ) ) );

This code clips the center position for interpolation to keep it within the picture boundaries.

Unfortunately, clipping the interpolated center position to the picture boundary, and then performing interpolation around this clipped position, is not the same as clipping out-of-bounds reference samples.

I believe extending the clipping ranges to something like (-4, size+4) might fix the problem.

2.) Insufficient Picture Padding

The standard picture padding (144 luma pixel boundary) is enough to handle out-of-bounds references for standard un-scaled references.

However, as soon as the reference is scaled, fetches can go well beyond this range and crash the decoder.

For example, a reference near the bottom picture border with a 128x128 CU and a scale factor of 2x will go outside the picture buffer and crash the decoder when trying to interpolate (1 x refHeight) samples in the following line of code:

m_if.filterHor( compID, (Pel*)refBuf.buf - ( ( vFilterSize >> 1 ) - 1 ) * refBuf.stride, refBuf.stride, tempBuf, tmpStride, 1, refHeight + vFilterSize - 1 + extSize, xFrac, false, chFmt, clpRng, filterIndex, false, useAltHpelIf );

I believe the picture boundary margin (currently 144) needs to be 2x or 4x the current size for this to work correctly (depending on what the maximum allowed scale factor currently is).

Change history (2)

comment:1 Changed 5 years ago by bheng

Potential fixes for this issue are available in the following merge request:

https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM/merge_requests/997

comment:2 Changed 4 years ago by XiangLi

  • Milestone set to VTM-7.0
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.