﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1647	[misalignment] pruning condition for  AMVP HMVP candidate	hmjang		"in the SPEC subclause 8.5.2.9.

it is describe that HMVP candidate is added in the list only in case of its reference picture is physically same with reference picture pointed by signaled reference index.


When the reference picture corresponding to the reference index of the history-based motion vector predictor candidate HmvpCandList[ i − 1 ] in the RPL LY is the '''same as the reference picture''' corresponding to reference index refIdxLX in the RPL LX, the following applies:
  –The rounding process for motion vectors as specified in clause 8.5.2.14 is invoked with mvX set equal to the LY motion vector of the candidate HmvpCandList[ i − 1 ], rightShift set equal to AmvrShift, and leftShift set equal to AmvrShift as inputs and the rounded LY motion vector of the candidate HmvpCandList[ i − 1 ] as output is assigned to mvpListLX[ numCurrMvpCand++ ].


but VTM only check the difference of POC between current reference picture and reference picture of HMVP candidate. 
{{{
#!div style=""font-size: 80%""
addAMVPHMVPCand() function:
  {{{#!c++
  if (neibRefIdx >= 0 && (CU::isIBC(*pu.cu) || (currRefPOC == slice.getRefPOC(eRefPicListIndex, neibRefIdx))))
  }}}
}}}

therefore, if the HMVP candidate's reference picture has same POC with reference picture but is in different layer, 

SPEC disallow to add it but VTM allow it. "	defect	new	major		VTM				vzakharc yuwenhe jvet@…
