﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1097	Incorrect long term reference POC calculation in reference decoder	jackh		"I think the reference decoder has an incorrect calculation for long term reference picture POCs in the case where delta_poc_msb_present_flag is equal to zero and the current POC's MSB is non-zero. The incorrect code can be found in TDecCAVLC.cpp, lines 1005 and 1006:


{{{
            rps->setPOC     (j, pocLsbLt);
            rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLsbLt);
}}}


The spec states that when delta_poc_msb_cycle_lt is not present (i.e. delta_poc_msb_present_flag is equal to zero), it is inferred to be zero. The section of code above the incorrect section (which calculates long term reference POCs for the case when delta_poc_msb_present_flag==1) is correct, and says:


{{{
            Int pocLTCurr = rpcSlice->getPOC() - deltaPocMSBCycleLT * maxPicOrderCntLSB 
                                        - iPOClsb + pocLsbLt;
            rps->setPOC     (j, pocLTCurr); 
            rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLTCurr);
}}}


Setting delta_poc_msb_present_flag==0 should have the effect of making deltaPocMSBCycleLT be assumed to be zero, i.e. the correct code at lines 1005 and 1006 would be:


{{{
            Int pocLTCurr = rpcSlice->getPOC() 
                                        - iPOClsb + pocLsbLt;
            rps->setPOC     (j, pocLTCurr); 
            rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLTCurr);
}}}


exactly as above, but with deltaPocMSBCycleLT=0. Substituting this for the current code gives the correct behaviour."	defect	closed	minor	HM-10.1	HM	HM-10.0	invalid		fbossen ksuehring davidf jct-vc@…
