Here, the uni-prediction motion information is a set of a motion vector and a reference index, while the bi-prediction motion information is formed with two sets of a motion vector and a reference index. The motion information represents either uni-prediction motion information or bi-prediction motion information.
The merging candidate selectors 347 and 447 use the derived merging candidate list mergeCandList as a triangle merging candidate list triangleMergeCandList.
The flowchart of
First, a merging candidate list mergeCandList is used as a triangle merging candidate list triangleMergeCandList (step S3501).
Subsequently, a merging candidate having a motion information list L0 is prioritized, and uni-prediction motion information of a merge triangle partition 0 is derived (step S3502).
Subsequently, a merging candidate having a motion information list L1 is prioritized, and uni-prediction motion information of a merge triangle partition 1 is derived (step S3503).
Note that step S3502 and step S3503 can be derived in random order and can also be processed in parallel.