Opened 7 weeks ago

#733 new defect

Weighted prediction with negative reference index

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


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 (0)

Note: See TracTickets for help on using tickets.