# US 11,122,289 B2 · Method for video coding and an apparatus

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

- Number: US 11,122,289 B2
- Document ID: US11122289B2
- Status: Granted
- Kind: B2
- Application number: 15/997,175
- Filed: 2018-06-04
- Published: 2018-10-04
- Granted: 2021-09-14
- Earliest claimed: 2018-06-04
- Assignees: Nokia Technologies Oy
- Applicants: Nokia Technologies Oy
- Inventors: Mehmet Oguz Bici; Jani Lainema; Kemal Ugur
- Web page: https://patentgrep.com/patent/US11122289B2

## CPC

- H04N 19/521: {for estimating the reliability of the determined motion vectors or motion vector field, e.g. for smoothing the motion vector field or for correcting motion vectors}
- H04N 19/52: by predictive encoding
- H04N 19/56: Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
- H04N 19/593: involving spatial prediction techniques
- H04N 19/61: in combination with predictive coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method and apparatus are provided for encoding and decoding image information. The encoding comprises receiving a block of pixels; creating a set of motion vector prediction candidates for the block of pixels; and examining the set to determine if a motion vector prediction candidate is a temporal motion vector prediction, or a spatial motion vector prediction. If the motion vector prediction candidate is a temporal motion vector prediction, the motion vector prediction candidate is kept in the set. If the motion vector prediction candidate is a spatial motion vector prediction, it is examined whether the set comprises a motion vector prediction candidate corresponding with the spatial motion vector prediction; and if so, the motion vector prediction candidate is removed from the set. Once the set is created, one of the candidates from the set is selected to represent a motion vector prediction for the block of pixels.

## Claims

### Claim 1

A method for encoding an image, the method comprising:
creating, by codec circuitry, a set of motion vector prediction candidates for a block of pixels, said set of motion vector prediction candidates comprising more than one temporal motion vector predictions, said creating the set comprising:
examining a motion vector prediction candidate to distinguish between a temporal motion vector prediction and a spatial motion vector prediction by determining whether the motion vector prediction candidate is a temporal motion vector prediction or is not a temporal motion vector prediction;
if the motion vector prediction candidate is a temporal motion vector prediction, including the motion vector prediction candidate in the set without comparing temporal data of the motion vector prediction candidate with other motion vector prediction candidates in the set and without any duplicate motion vector information for temporal motion vector predictions being removed such that inclusion of the temporal motion vector prediction in the set results in the set of motion vector prediction candidates comprising more than one temporal motion vector predictions; and
if the motion vector prediction candidate is based on only a spatial motion vector prediction, determining whether to include the motion vector prediction candidate in the set or not based on a value of the motion vector prediction candidate and a value of at least one spatial motion vector already included in the set; and
selecting, by the codec circuitry, one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.

### Claim 2 (depends on 1)

The method according to claim 1, wherein said determining comprising at least one of the following:
comparing motion vector information of the motion vector prediction candidate with motion vector information of a spatial motion vector prediction candidate;
comparing a reference index of the motion vector prediction candidate with a reference index of a spatial motion vector prediction candidate, which has been included in the set; and
examining whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
creating an additional motion vector prediction candidate based on one or more previously added motion vector predictors in the set.

### Claim 4 (depends on 1)

The method according to claim 1, wherein each motion vector prediction candidate is associated with an index in the set, and if a motion vector prediction candidate is determined to be removed due to motion vector information corresponding with another motion vector prediction candidate, the method further comprising:
examining the index of the motion vector prediction candidate and the index of the another motion vector prediction candidate, and
removing the motion vector prediction candidate which has greater index.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.

### Claim 6

A method for decoding an encoded image, the method comprising:
creating, by codec circuitry, a set of motion vector prediction candidates for an encoded block of pixels, said set of motion vector prediction candidates comprising more than one temporal motion vector predictions, said creating the set comprising:
examining a motion vector prediction candidate to distinguish between a temporal motion vector prediction and a spatial motion vector prediction by determining whether the motion vector prediction candidate is a temporal motion vector prediction or is not a temporal motion vector prediction;
if the motion vector prediction candidate is a temporal motion vector prediction, including the motion vector prediction in the set without comparing temporal data of the motion vector prediction candidate with other motion vector prediction candidates in the set and without any duplicate motion vector information for temporal motion vector predictions being removed such that inclusion of the temporal motion vector prediction in the set results in the set of motion vector prediction candidates comprising more than one temporal motion vector predictions; and
if the motion vector prediction candidate is based on only a spatial motion vector prediction, determining whether to include the motion vector prediction candidate in the set or not based on a value of the motion vector prediction candidate and a value of at least one spatial motion vector already included in the set; and
selecting, by the codec circuitry, one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.

### Claim 7 (depends on 6)

The method according to claim 6, wherein said determining comprising at least one of the following:
comparing motion vector information of the motion vector prediction candidate with motion vector information of a spatial motion vector prediction candidate;
comparing a reference index of the motion vector prediction candidate with a reference index of a spatial motion vector prediction candidate, which has been included in the set; and
examining whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.

### Claim 8 (depends on 6)

The method according to claim 6, further comprising:
creating an additional motion vector prediction candidate based on one or more previously added motion vector predictors in the set.

### Claim 9 (depends on 6)

The method according to claim 6, wherein each motion vector prediction candidate is associated with an index in the set, and if a motion vector prediction candidate is determined to be removed due to motion vector information corresponding with another motion vector prediction candidate, the method further comprising:
examining the index of the motion vector prediction candidate and the index of the another motion vector prediction candidate, and
removing the motion vector prediction candidate which has greater index.

### Claim 10 (depends on 6)

The method according to claim 6, wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.

### Claim 11

An apparatus embodied by a codec for encoding an image, the apparatus comprising:
a processor and
a memory including computer program code, the memory and the computer program code configured to, with the processor, cause the apparatus to:
create a set of motion vector prediction candidates for a block of pixels, said set of motion vector prediction candidates comprising more than one temporal motion vector predictions, wherein the memory and the computer program code configured to, with the processor, create the set cause the apparatus to:
examine a motion vector prediction candidate to distinguish between a temporal motion vector prediction and a spatial motion vector prediction by determining whether the motion vector prediction candidate is a temporal motion vector prediction or is not a temporal motion vector prediction;
if the motion vector prediction candidate is a temporal motion vector prediction, include the motion vector prediction in the set without comparing temporal data of the motion vector prediction candidate with other motion vector prediction candidates in the set and without any duplicate motion vector information for temporal motion vector predictions being removed such that inclusion of the temporal motion vector prediction in the set results in the set of motion vector prediction candidates comprising more than one temporal motion vector predictions; and
if the motion vector prediction candidate is based on only a spatial motion vector prediction, determine whether to include the motion vector prediction candidate in the set or not based on a value of the motion vector prediction candidate and a value of at least one spatial motion vector already included in the set; and
select one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the temporal motion vector prediction is at least partly based on one or more encoded blocks in a frame different from the frame of the block of pixels and the spatial motion vector prediction is only based on one or more encoded blocks in the same frame as the frame of the block of pixels.

### Claim 13 (depends on 11)

The apparatus according to claim 11, wherein the computer program code to determine whether to include the motion vector prediction candidate in the set or not cause apparatus perform at least one of the following:
to compare motion vector information of the motion vector prediction candidate with motion vector information of a spatial motion vector prediction candidate;
to compare a reference index of the motion vector prediction candidate with a reference index of a spatial motion vector prediction candidate, which has been included in the set; and
to examine whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.

### Claim 14 (depends on 11)

The apparatus according to claim 11 comprising further computer program code configured to, with the processor, cause the apparatus to create an additional motion vector prediction candidate based on one or more previously added motion vector predictors in the set.

### Claim 15 (depends on 11)

The apparatus according to claim 11, wherein each motion vector prediction candidate is associated with an index in the set, and if a motion vector prediction candidate is determined to be removed due to motion vector information corresponding with another motion vector prediction candidate, the apparatus further comprises computer program code configured to, with the processor, cause the apparatus to
examine the index of the motion vector prediction candidate and the index of the another motion vector prediction candidate, and
remove the motion vector prediction candidate which has greater index.

### Claim 16 (depends on 11)

The apparatus according to claim 11, wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.

### Claim 17

An apparatus embodied by a codec for decoding an encoded image, the apparatus comprising:
a processor and
a memory including computer program code, the memory and the computer program code configured to, with the processor, cause the apparatus to:
create a set of motion vector prediction candidates for an encoded block of pixels, said set of motion vector prediction candidates comprising more than one temporal motion vector predictions, wherein the memory and the computer program code configured to, with the processor, create the set cause the apparatus to:
examine a motion vector prediction candidate to distinguish between a temporal motion vector prediction and a spatial motion vector prediction by determining whether the motion vector prediction candidate is a temporal motion vector prediction or is not a temporal motion vector prediction;
if the motion vector prediction candidate is a temporal motion vector prediction, include the motion vector prediction in the set without comparing temporal data of the motion vector prediction candidate with other motion vector prediction candidates in the set and without any duplicate motion vector information for temporal motion vector predictions being removed such that inclusion of the temporal motion vector prediction in the set results in the set of motion vector prediction candidates comprising more than one temporal motion vector predictions; and
if the motion vector prediction candidate is based on only a spatial motion vector prediction, determine whether to include the motion vector prediction candidate in the set or not based on a value of the motion vector prediction candidate and a value of at least one spatial motion vector already included in the set; and
select one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.

### Claim 18 (depends on 17)

The apparatus according to claim 17, wherein the temporal motion vector prediction is at least partly based on one or more encoded blocks in a frame different from the frame of the block of pixels and the spatial motion vector prediction is only based on one or more encoded blocks in the same frame as the frame of the block of pixels.

### Claim 19 (depends on 17)

The apparatus according to claim 17, wherein the computer program code to determine whether to include the motion vector prediction candidate in the set or not cause apparatus perform at least one of the following:
to compare motion vector information of the motion vector prediction candidate with motion vector information of a spatial motion vector prediction candidate;
to compare a reference index of the motion vector prediction candidate with a reference index of a spatial motion vector prediction candidate, which has been included in the set; and
to examine whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.

### Claim 20 (depends on 17)

The apparatus according to claim 17 comprising further computer program code configured to, with the processor, cause the apparatus to create an additional motion vector prediction candidate based on one or more previously added motion vector predictors in the set.

### Claim 21 (depends on 17)

The apparatus according to claim 17, wherein each motion vector prediction candidate is associated with an index in the set, and if a motion vector prediction candidate is determined to be removed due to motion vector information corresponding with another motion vector prediction candidate, the apparatus further comprises computer program code configured to, with the processor, cause the apparatus to
examine the index of the motion vector prediction candidate and the index of the another motion vector prediction candidate, and
remove the motion vector prediction candidate which has greater index.

### Claim 22 (depends on 3)

The apparatus according to claim 3, wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.

### Claim 23

A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor of a codec, cause the processor to perform a method for decoding an encoded image, the method comprising:
creating a set of motion vector prediction candidates for an encoded block of pixels, said set of motion vector prediction candidates comprising more than one temporal motion vector predictions, said creating the set comprising:
examining a motion vector prediction candidate to distinguish between a temporal motion vector prediction and a spatial motion vector prediction by determining whether the motion vector prediction candidate is a temporal motion vector prediction or is not a temporal motion vector prediction;
if the motion vector prediction candidate is a temporal motion vector prediction, including the motion vector prediction in the set without comparing temporal data of the motion vector prediction candidate with other motion vector prediction candidates in the set and without any duplicate motion vector information for temporal motion vector predictions being removed such that inclusion of the temporal motion vector prediction in the set results in the set of motion vector prediction candidates comprising more than one temporal motion vector predictions; and
if the motion vector prediction candidate is based on only a spatial motion vector prediction, determining whether to include the motion vector prediction candidate in the set or not based on a value of the motion vector prediction candidate and a value of at least one spatial motion vector already included in the set; and
selecting one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.

### Claim 24 (depends on 23)

The non-transitory machine-readable medium according to claim 23, wherein said determining comprising at least one of the following:
comparing motion vector information of the motion vector prediction candidate with motion vector information of a spatial motion vector prediction candidate;
comparing a reference index of the motion vector prediction candidate with a reference index of a spatial motion vector prediction candidate, which has been included in the set; and
examining whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.

### Claim 25 (depends on 23)

The non-transitory machine-readable medium according to claim 23, wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.
