Opened 5 years ago

Closed 4 years ago

#571 closed defect (fixed)

RPR - Multiplication Overflow

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

Description

The following 32-bit multiplications in xPredInterBlkRPR( ) can overflow the signed 32-bit range before the result is assigned to the 64-bit x0Int/y0Int output.

x0Int = ( ( blk.pos().x << ( 4 + ::getComponentScaleX( compID, chFmt ) ) ) + mv.getHor() )* scalingRatio.first;

y0Int = ( ( blk.pos().y << ( 4 + ::getComponentScaleY( compID, chFmt ) ) ) + mv.getVer() )* scalingRatio.second;

I would recommend type-casting the scaling ratios to (int64_t) first in order to use 64-bit multiplications.

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.