# US 10,484,702 B2 · Encoding/decoding method and apparatus with vector derivation mode

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

- Number: US 10,484,702 B2
- Document ID: US10484702B2
- Status: Granted
- Kind: B2
- Application number: 15/822,657
- Filed: 2017-11-27
- Published: 2018-03-15
- Granted: 2019-11-19
- Earliest claimed: 2011-03-10
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Sixin Lin; Mingyuan Yang
- Web page: https://patentgrep.com/patent/US10484702B2

## CPC

- H04N 19/513: Processing of motion vectors
- H04N 19/51: Motion estimation or motion compensation
- H04N 19/517: by encoding
- H04N 19/52: by predictive encoding
- H04N 19/523: with sub-pixel accuracy
- H04N 19/56: Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
- H04N 19/567: Motion estimation based on rate distortion criteria
- H04N 19/573: Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An encoding method, a decoding method, an encoding apparatus, a decoding apparatus, for a video image. The encoding method includes: determining an optimal merged neighboring block for a current block based on a motion vector merging technology; determining, based a prediction direction of the optimal merged neighboring block, a motion vector derivation mode that needs to be used by a decoder; correcting a motion vector of the current block based on the motion vector derivation mode; and determining a residual between a predicted value and an original value of the current block based on the corrected motion vector, thereby encoding the current block. According to the technical solutions, a more accurate predicted value is obtained by correcting the motion vector, and a smaller residual is generated.

## Claims

### Claim 1

A method of encoding for a video image, comprising:
determining an optimal merged candidate block for a current block based on a motion vector merging technology, wherein a motion vector of the optimal merged candidate block is closest to and used as a substitute of a motion vector for the current block in the motion vector merging technology;
based on one or a combination of a prediction direction of the optimal merged candidate block and an instruction flag which is carried in an encoded bit stream and is for instructing a decoder to use a motion vector derivation mode or not, determining whether to use the motion vector derivation mode;
determining, based on the prediction direction of the optimal merged candidate block, the motion vector derivation mode that needs to be used by a decoder;
correcting the motion vector of the current block based on the motion vector derivation mode;
determining a residual between a predicted value of the current block and an original value of the current block based on the corrected motion vector, wherein the predicted value of the current block is based on the corrected motion vector; and
encoding the residual and an index value of the optimal merged candidate block into an encoded bit stream transmitted to the decoder.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the correcting a motion vector of the current block comprises:
correcting the motion vector of the current block according to the motion vector and reference frame information of the optimal merged candidate block.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the correcting a motion vector of the current block comprises:
determining an initial reference block in a forward reference frame and an initial reference block in a backward reference frame for the current block based on the motion vector and the reference frame information;
searching sub-pixel neighborhoods of the initial reference blocks for reference blocks having a minimum matching error; and
correcting the motion vector of the current block based on the found reference blocks.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the encoding the residual and an index value of the optimal merged candidate block into an encoded bit stream transmitted to the decoder comprises:
upon determining the residual is smaller than an initial residual that is determined based on the motion vector merging technology, carrying the residual and a first instruction flag for instructing the decoder to use the motion vector derivation mode into the encoded bit stream.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the encoding the residual and an index value of the optimal merged candidate block into an encoded bit stream transmitted to the decoder further comprises:
upon determining the residual is greater than or equal to the initial residual, carrying the initial residual and a second instruction flag for instructing the decoder not to use the motion vector derivation mode into the encoded bit stream.

### Claim 6

A method of decoding for a video image, comprising:
determining an optimal merged candidate block for a current block based on an index value of the optimal merged candidate block in an encoded bit stream which is received from an encoder and obtained by the encoder using a motion vector merging technology, wherein a motion vector of the optimal merged candidate block is closest to and used as a substitute of a motion vector for the current block in the motion vector merging technology;
based on one or a combination of a prediction direction of the optimal merged candidate block and an instruction flag which is carried in the encoded bit stream and is for instructing a decoder to use a motion vector derivation mode or not, determining whether to use the motion vector derivation mode;
determining, based on the prediction direction of the optimal merged candidate block, the motion vector derivation mode that needs to be used;
correcting the motion vector of the current block based on the determined motion vector derivation mode; and
decoding the current block based on the corrected motion vector and a residual carried in the encoded bit stream.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the correcting a motion vector of the current block comprises:
correcting the motion vector of the current block according to the motion vector and reference frame information of the optimal merged candidate block.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the correcting a motion vector of the current block comprises:
determining an initial reference block in a forward reference frame and an initial reference block in a backward reference frame for the current block based on the motion vector and the reference frame information;
searching sub-pixel neighborhoods of the initial reference blocks for reference blocks having a minimum matching error; and
correcting the motion vector of the current block based on the found reference blocks.

### Claim 9

An encoding apparatus for a video image, comprising:
at least one hardware processor;
a memory including instructions to control the at least one hardware processor to:
determine an optimal merged candidate block for a current block based on a motion vector merging technology, wherein a motion vector of the optimal merged candidate block is closest to and used as a substitute of a motion vector for the current block in the motion vector merging technology;
based on one or a combination of a prediction direction of the optimal merged candidate block and an instruction flag which is carried in an encoded bit stream and is for instructing a decoder to use a motion vector derivation mode or not, determining whether to use the motion vector derivation mode;
determine, based on the prediction direction of the optimal merged candidate block, the motion vector derivation mode that needs to be used by a decoder;
correct the motion vector of the current block based on the motion vector derivation mode; determine a residual between a predicted value of the current block and an original value of the current block based on the corrected motion vector, wherein the predicted value of the current block is based on the corrected motion vector; and
encode the residual and an index value of the optimal merged candidate block into an encoded bit stream transmitted to the decoder.

### Claim 10 (depends on 9)

The encoding apparatus according to claim 9, wherein the instruction further control the at least one hardware processor to correct the motion vector of the current block according to the motion vector and reference frame information of the optimal merged candidate block.

### Claim 11 (depends on 10)

The encoding apparatus according to claim 10, wherein the instruction further control the at least one hardware processor to:
determine an initial reference block in a forward reference frame and an initial reference block in a backward reference frame for the current block based on the motion vector and the reference frame information;
search sub-pixel neighborhoods of the initial reference blocks for reference blocks having a minimum matching error; and
correct the motion vector of the current block based on the found reference blocks.

### Claim 12 (depends on 9)

The encoding apparatus according to claim 9, wherein the instruction further control the at least one hardware processor to:
upon determining the residual is smaller than an initial residual that is determined based on the motion vector merging technology, carry the residual and a first instruction flag for instructing the decoder to use the motion vector derivation mode into the encoded bit stream.

### Claim 13 (depends on 12)

The encoding apparatus according to claim 12, wherein the instruction further control the at least one hardware processor to:
upon determining the residual is greater than or equal to the initial residual, carry the initial residual and a second instruction flag for instructing the decoder not to use the motion vector derivation mode into the encoded bit stream.

### Claim 14

A decoding apparatus for a video image, comprising:
at least one hardware processor;
a memory including instructions to control the at least one hardware processor to:
determine an optimal merged candidate block for a current block based on an index value of the optimal merged candidate block in an encoded bit stream which is received from an encoder and obtained by the encoder using a motion vector merging technology, wherein a motion vector of the optimal merged candidate block is closest to and used as a substitute of a motion vector for the current block in the motion vector merging technology;
based on one or a combination of a prediction direction of the optimal merged candidate block and an instruction flag which is carried in the encoded bit stream and is for instructing a decoder to use a motion vector derivation mode or not, determine whether to use the motion vector derivation mode;
determine, based on the prediction direction of the optimal merged candidate block, the motion vector derivation mode that needs to be used;
correct the motion vector of the current block based on the determined motion vector derivation mode; and
decode the current block based on the corrected motion vector and a residual carried in the encoded bit stream.

### Claim 15 (depends on 14)

The decoding apparatus according to claim 14, wherein the instructions further control the at least one hardware processor to correct the motion vector of the current block according to the motion vector and reference frame information of the optimal merged candidate block.

### Claim 16 (depends on 15)

The decoding apparatus according to claim 15, wherein the instructions further control the at least one hardware processor to:
determine an initial reference block in a forward reference frame and an initial reference block in a backward reference frame for the current block based on the motion vector and the reference frame information;
search sub-pixel neighborhoods of the initial reference blocks for reference blocks having a minimum matching error; and
correct the motion vector of the current block based on the found reference blocks.
