FIX : prevent an empty merge candidate list generation for amvpMerge

Hyeongmun Jang requested to merge hm.jang/ECM:BF_AMVPMERGE into master

For amvpMerge, the merge candidate list could be empty due to the limitation of considering reference index to min(number of L0 reference pictures, number of L1 reference pictures) on the non-CTC configuration.

for example, it can be imagined below:

  • when POC of the current picture is N, reference pictures are constructed to have poc{N+32, N+16, N-16} for L0, poc{N+32} for L1 in reference picture list.
  • amvpMergeModeFlag[0] is true.

this case only the zero motion vector with reference index 0 is considered at the last process in merge candidate list construction. However, reference index 0 indicates the reference picture which is poc N+32. this reference index is not valid pair of amvpMerge. therefore the merge candidate list is made to be empty.

Edited by Hyeongmun Jang

Merge request reports