# US 12,225,186 B2 · Method for constructing merge candidate motion information list, apparatus, and codec

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,225,186 B2
- Document ID: US12225186B2
- Status: Granted
- Kind: B2
- Application number: 17/644,603
- Filed: 2021-12-16
- Published: 2022-04-07
- Granted: 2025-02-11
- Earliest claimed: 2019-06-19
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Xu Chen; Haitao Yang; Lian Zhang
- Web page: https://patentgrep.com/patent/US12225186B2

## CPC

- H04N 19/105: Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
- H04N 19/139: Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/46: Embedding additional information in the video signal during the compression process (H04N19/517, H04N19/68, H04N19/70 take precedence)
- H04N 19/513: Processing of motion vectors
- H04N 19/52: by predictive encoding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

This application discloses an apparatus for constructing a merge candidate motion information list, including: one or more processors; a non-transitory memory storage comprising instructions which when executed by the one or more processors, cause the apparatus to obtain first motion information and add the first motion information to a first candidate motion information set, to obtain a second candidate motion information set; obtain second motion information based on an HMVP candidate motion information list; when the second motion information is different from all motion information in the second candidate motion information set, add the second motion information to the second candidate motion information set, to obtain a merge candidate motion information list, wherein a quantity of pieces of motion information in the merge candidate motion information set is equal to a preset threshold. Implementing this application reduces complexity in constructing the merge candidate motion information list, and improve coding efficiency.

## Claims

### Claim 1

An inter prediction apparatus, comprising:
one or more processors;
a memory storing instructions, which when executed by the one or more processors, cause the inter prediction apparatus to perform operations, the operations comprising:
obtaining a first candidate motion information set, wherein the first candidate motion information set comprises motion information of a spatially neighboring block of a current block and/or motion information of a temporally neighboring block of the current block;
when a quantity of pieces of motion information in the first candidate motion information set is less than a preset threshold, obtaining first motion information;
when the first motion information is different from the motion information in the first candidate motion information set, adding the first motion information to the first candidate motion information set, to obtain a second candidate motion information set;
when a quantity of pieces of motion information in the second candidate motion information set is less than the preset threshold, obtaining a history-based motion vector prediction (HMVP) candidate motion information list, and obtaining second motion information based on motion information in the HMVP candidate motion information list;
when the second motion information is different from the motion information in the second candidate motion information set, adding the second motion information to the second candidate motion information set, to obtain a third candidate motion information set; and
when a quantity of pieces of motion information in the third candidate motion information set is equal to the preset threshold, using the third candidate motion information set as a merge candidate motion information list.

### Claim 2 (depends on 1)

The inter prediction apparatus according to claim 1, wherein the operations further comprise:
when the quantity of pieces of motion information in the second candidate motion information set is equal to the preset threshold, using the second candidate motion information set as the merge candidate motion information list.

### Claim 3 (depends on 1)

The inter prediction apparatus according to claim 1, wherein the operations further comprise:
when the quantity of pieces of motion information in the third candidate motion information set is less than the preset threshold, adding default values to the third candidate motion information set, to obtain the merge candidate motion information list.

### Claim 4 (depends on 1)

The inter prediction apparatus according to claim 1, wherein the operations further comprise:
when the first motion information is same as at least one piece of motion information in the first candidate motion information set, skipping using the first motion information to construct the merge candidate motion information list;
obtaining the HMVP candidate motion information list, and obtaining the second motion information based on the motion information in the HMVP candidate motion information list;
when the second motion information is different from the motion information in the first candidate motion information set, adding the second motion information to the first candidate motion information set, to obtain a fourth candidate motion information set; and
when a quantity of pieces of motion information in the fourth candidate motion information set is equal to the preset threshold, using the fourth candidate motion information set as the merge candidate motion information list.

### Claim 5 (depends on 4)

The inter prediction apparatus according to claim 4, wherein the operations further comprise:
when the quantity of pieces of motion information in the fourth candidate motion information set is less than the preset threshold, adding default values to the fourth candidate motion information set, to obtain the merge candidate motion information list.

### Claim 6 (depends on 4)

The inter prediction apparatus according to claim 4, wherein the operations further comprise:
when the second motion information is same as at least one piece of motion information in the first candidate motion information set, skipping using the second motion information to construct the merge candidate motion information list; and
adding default values to the first candidate motion information set, to obtain the merge candidate motion information list.

### Claim 7 (depends on 1)

The inter prediction apparatus according to claim 1, wherein the operations further comprise:
when the second motion information is same as at least one piece of motion information in the second candidate motion information set, skipping using the second motion information to construct the merge candidate motion information list; and
adding default values to the second candidate motion information set, to obtain the merge candidate motion information list.

### Claim 8 (depends on 1)

The inter prediction apparatus according to claim 1, wherein the first candidate motion information set comprises at least two pieces of motion information, wherein the operations comprise:
selecting two pieces of motion information from the at least two pieces of motion information in the first candidate motion information set that are determined based on a preset combination manner, and obtaining the first motion information based on the two pieces of motion information.

### Claim 9 (depends on 8)

The inter prediction apparatus according to claim 8, wherein the first motion information is a first motion vector, and the two pieces of motion information are two motion vectors; and
wherein the operations comprise using an average value of the two motion vectors as the first motion vector.

### Claim 10 (depends on 1)

The inter prediction apparatus according to claim 1, wherein the operations comprise selecting motion information from the HMVP candidate motion information list as the second motion information.

### Claim 11 (depends on 4)

The inter prediction apparatus according to claim 4, wherein the operations comprise selecting motion information from the HMVP candidate motion information list as the second motion information.

### Claim 12 (depends on 1)

A video encoder, wherein the video encoder is configured to encode an image block, and comprises the inter prediction apparatus according to claim 1, wherein the operations further comprises:
predicting motion information of a current encoding image block based on target candidate motion information that is determined from the merge candidate motion information list;
determining predicted pixel values of the current encoding image block based on the motion information of the current encoding image block;
encoding an index flag of the target candidate motion information into a bitstream, wherein the index flag indicates the target candidate motion information used for the current encoding image block; and
reconstructing the current encoding image block based on the predicted pixel values of the current encoding image block.

### Claim 13 (depends on 1)

A video decoder, wherein the video decoder is configured to decode a bitstream to obtain an image block, and comprises the inter prediction apparatus according to claim 1, wherein the operations further comprises:
decoding the bitstream to obtain an index flag, wherein the index flag is used to indicate target candidate motion information of a current decoding image block;
querying, based on the index flag, the merge candidate motion information list for corresponding target candidate motion information to predict motion information of the current decoding image block;
determining predicted pixel values of the current decoding image block based on the motion information of the current decoding image block; and
reconstructing the current decoding image block based on the predicted pixel values of the current encoding image block.

### Claim 14

A method for constructing a merge candidate motion information list, comprising:
obtaining a first candidate motion information set, wherein the first candidate motion information set comprises motion information of a spatially neighboring block of a current block and/or motion information of a temporally neighboring block of the current block;
when a quantity of pieces of motion information in the first candidate motion information set is less than a preset threshold, obtaining first motion information;
when the first motion information is different from the motion information in the first candidate motion information set, adding the first motion information to the first candidate motion information set, to obtain a second candidate motion information set;
when a quantity of pieces of motion information in the second candidate motion information set is less than the preset threshold, obtaining a history-based motion vector prediction (HMVP) candidate motion information list, and obtaining second motion information based on motion information in the HMVP candidate motion information list;
when the second motion information is different from the motion information in the second candidate motion information set, adding the second motion information to the second candidate motion information set, to obtain a third candidate motion information set; and
when a quantity of pieces of motion information in the third candidate motion information set is equal to the preset threshold, using the third candidate motion information set as the merge candidate motion information list.

### Claim 15

A non-transitory computer-readable storage medium that stores a computer program, which when executed by a processor, causes the processor to perform operations of:
obtaining a first candidate motion information set, wherein the first candidate motion information set comprises motion information of a spatially neighboring block of a current block and/or motion information of a temporally neighboring block of the current block;
when a quantity of pieces of motion information in the first candidate motion information set is less than a preset threshold, obtaining first motion information;
when the first motion information is different from the motion information in the first candidate motion information set, adding the first motion information to the first candidate motion information set, to obtain a second candidate motion information set;
when a quantity of pieces of motion information in the second candidate motion information set is less than the preset threshold, obtaining a history-based motion vector prediction (HMVP) candidate motion information list, and obtaining second motion information based on motion information in the HMVP candidate motion information list;
when the second motion information is different from the motion information in the second candidate motion information set, adding the second motion information to the second candidate motion information set, to obtain a third candidate motion information set; and
when a quantity of pieces of motion information in the third candidate motion information set is equal to the preset threshold, using the third candidate motion information set as a merge candidate motion information list.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the processor to perform operations of:
when the quantity of pieces of motion information in the second candidate motion information set is equal to the preset threshold, using the second candidate motion information set as the merge candidate motion information list.

### Claim 17 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the processor to perform operations of:
when the quantity of pieces of motion information in the third candidate motion information set is less than the preset threshold, adding default values to the third candidate motion information set, to obtain the merge candidate motion information list.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the processor to perform operations of:
when the first motion information is the same as at least one piece of motion information in the first candidate motion information set, skipping using the first motion information to construct the merge candidate motion information list;
obtaining the HMVP candidate motion information list, and obtaining the second motion information based on the motion information in the HMVP candidate motion information list;
when the second motion information is different from the motion information in the first candidate motion information set, adding the second motion information to the first candidate motion information set, to obtain a fourth candidate motion information set; and
when a quantity of pieces of motion information in the fourth candidate motion information set is equal to the preset threshold, using the fourth candidate motion information set as the merge candidate motion information list.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium according to claim 18, wherein the processor to perform operations of:
when the quantity of pieces of motion information in the fourth candidate motion information set is less than the preset threshold, adding default values to the fourth candidate motion information set, to obtain the merge candidate motion information list.

### Claim 20 (depends on 18)

The non-transitory computer-readable storage medium according to claim 18, wherein the processor to perform operations of:
when the second motion information is the same as at least one piece of motion information in the first candidate motion information set, skipping using the second motion information to construct the merge candidate motion information list; and
adding default values to the first candidate motion information set, to obtain the merge candidate motion information list.
