# US 12,003,761 B2 · Method and apparatus for decoding video, and method and apparatus for encoding video

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

- Number: US 12,003,761 B2
- Document ID: US12003761B2
- Status: Granted
- Kind: B2
- Application number: 17/479,674
- Filed: 2021-09-20
- Published: 2022-03-10
- Granted: 2024-06-04
- Earliest claimed: 2015-11-11
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Alexander Alshin; Elena Alshina
- Web page: https://patentgrep.com/patent/US12003761B2

## CPC

- H04N 19/577: Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
- 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/136: Incoming video signal characteristics or properties
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/182: the unit being a pixel
- H04N 19/523: with sub-pixel accuracy
- H04N 19/537: Motion estimation other than block-based
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A video decoding and video encoding method of performing inter prediction in a bi-directional motion prediction mode, in which a prediction pixel value of a current block may be generated by not only using a pixel value of a first reference block of a first reference picture and a pixel value of a second reference block of a second reference picture, but also using a first gradient value of the first reference block and a second gradient value of the second reference block, in a bi-directional motion prediction mode. Accordingly, encoding and decoding efficiency may be increased since a prediction block similar to an original block may be generated.

## Claims

### Claim 1

A video decoding method comprising:
obtaining, from a bitstream, information about a first motion vector of a current block and information about a second motion vector of the current block;
obtaining a pixel value of a first pixel using first neighboring pixels determined based on the first motion vector in a first reference picture;
obtaining a pixel value of a second pixel using second neighboring pixels determined based on the second motion vector in a second reference picture;
obtaining a first gradient value of the first pixel using third neighboring pixels of the first pixel;
obtaining a second gradient value of the second pixel using fourth neighboring pixels of the second pixel;
determining a first displacement vector in a horizontal direction and a second displacement vector in a vertical direction; and
obtaining a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the first gradient value, the second gradient value, the first displacement vector and the second displacement vector,
wherein when a first intermediate value used for determining at least one of the first displacement vector and the second displacement vector is greater than a predetermined value, the at least one of the first displacement vector and the second displacement vector is determined by performing a clipping operation based on a first threshold value and a second threshold value to a second intermediate value which is derived from the first intermediate value, and
wherein when the first intermediate value is smaller than or equal to the predetermined value, the at least one of the first displacement vector and the second displacement vector is determined as 0 without the clipping operation.

### Claim 2

A video encoding method comprising:
obtaining a pixel value of a first pixel using first neighboring pixels determined based on a first motion vector of a current block in a first reference picture;
obtaining a pixel value of a second pixel using second neighboring pixels determined based on a second motion vector of the current block in a second reference picture;
obtaining a first gradient value of the first pixel by using third neighboring pixels of the first pixel;
obtaining a second gradient value of the second pixel by using fourth neighboring pixels of the second pixel;
determining a first displacement vector in a horizontal direction and a second displacement vector in a vertical direction;
obtaining a prediction pixel value of the current block by using the pixel value of the first pixel, the pixel value of the second pixel, the first gradient value, the second gradient value, the first displacement vector and the second displacement vector; and
generating a bitstream comprising information about the first motion vector and information about the second motion vector,
wherein when a first intermediate value used for determining at least one of the first displacement vector and the second displacement vector is greater than a predetermined value, the at least one of the first displacement vector and the second displacement vector is determined by performing a clipping operation based on a first threshold value and a second threshold value to a second intermediate value which is derived from the first intermediate value, and
wherein when the first intermediate value is smaller than or equal to the predetermined value, the at least one of the first displacement vector and the second displacement vector is determined as 0 without the clipping operation.

### Claim 3

A non-transitory computer-readable medium for recording a program for generating a bitstream, the bitstream comprising:
information about a first motion vector of a current block; and
information about a second motion vector of the current block,
wherein a pixel value of a first pixel is obtained using first neighboring pixels determined based on the first motion vector in a first reference picture, and a pixel value of a second pixel is obtained using second neighboring pixels determined based on the second motion vector in a second reference picture,
wherein a first gradient value of the first pixel is obtained by using third neighboring pixels of the first pixel, and a second gradient value of the second pixel is obtained by using fourth neighboring pixels of the second pixel,
wherein a first displacement vector in a horizontal direction and a second displacement vector in a vertical direction are determined,
wherein a prediction pixel value of the current block is obtained by using the pixel value of the first pixel, the pixel value of the second pixel, the first gradient value, the second gradient value, the first displacement vector and the second displacement vector,
wherein when a first intermediate value used for determining at least one of the first displacement vector and the second displacement vector is greater than a predetermined value, the at least one of the first displacement vector and the second displacement vector is determined by performing a clipping operation based on a first threshold value and a second threshold value to a second intermediate value which is derived from the first intermediate value, and
wherein when the first intermediate value is smaller than or equal to the predetermined value, the at least one of the first displacement vector and the second displacement vector is determined as 0 without the clipping operation.
