Opened 5 years ago

Closed 4 years ago

#733 closed defect (fixed)

Weighted prediction with negative reference index

Reported by: Vadim Owned by:
Priority: minor Milestone: VTM-10.0
Component: VTM Version:
Keywords: weighted prediction Cc: ksuehring, XiangLi, fbossen, jvet@…

Description

Weighted prediction table is accessed by using a reference index, but the reference index can be negative, it is not checked and such table is used later.

In one example in motionCompensation function (there maybe other similar places),

int refIdx1 = pu.refIdx[REF_PIC_LIST_1]; //refIdx1=-1
pu.cs->slice->getWpScaling(REF_PIC_LIST_1, refIdx1, wp1); //wp1=m_weightPredTable[REF_PIC_LIST_1][-1]

const bool biocheck0 = !((wp0[COMPONENT_Y].bPresentFlag || wp1[COMPONENT_Y].bPresentFlag) && slice.getSliceType() == B_SLICE);

A possible fix could be to return null for the weighted prediction table when the reference index is negative and add a check for the null pointer.

Change history (2)

comment:2 Changed 4 years ago by XiangLi

  • Milestone set to VTM-10.0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed as suggested.

Note: See TracTickets for help on using tickets.