Opened 5 years ago

Closed 5 years ago

#151 closed defect (fixed)

Reference wraparound bugs

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

Description

1.) In Picture.cpp, function extendPicBorder().

The padding for reference wraparound doesn’t work correctly if offset is less than xmargin.

for (int x = 0; x < xmargin; x++ )
{

pi[ -xmargin + x ] = pi[ -xmargin + x + xoffset ];

}

The initial pixels will be copying other pixels within the margin border that have not yet been initialized themselves.

2.) In Mv.cpp, function clipMv().

if( sps.getWrapAroundEnabledFlag() )
{

int iHorMax = ( sps.getPicWidthInLumaSamples() + sps.getMaxCUWidth() - size.width + iOffset - ( int ) pos.x - 1 ) << iMvShift;
int iHorMin = ( -( int ) sps.getMaxCUWidth() - iOffset - ( int ) pos.x + 1 ) << iMvShift;


rcMv.setHor( std::min( iHorMax, std::max( iHorMin, rcMv.getHor() ) ) );
rcMv.setVer( std::min( iVerMax, std::max( iVerMin, rcMv.getVer() ) ) );
return;

}

Clipping the motion vectors within an extended padded border does not implement the modulo-operation described in the text.

Specifically, if a motion vector extended outside the size of the padded region defined in the software, such that this clipping above actually took effect, then the result will not be the same as modulo-wrapping the reference pixels. The vectors need to be modulo-unwrapped, not clipped.

Something like the following might work.

int iMvX = rcMv.getHor();
while(iMvX > iHorMax) {

iMvX -= (sps.getWrapAroundOffset() << iMvShift);

}
while(iMvX < iHorMin) {

iMvX += (sps.getWrapAroundOffset() << iMvShift);

}
rcMv.setHor(iMvX);

Change history (2)

comment:1 Changed 5 years ago by phanhart

A merge request (​https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM/merge_requests/189) has been created to fix the reported issues.

comment:2 Changed 5 years ago by fbossen

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