# US 2021/0281872 A1 · Video decoding method and apparatus and video encoding method and apparatus

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

- Number: US 2021/0281872 A1
- Document ID: US20210281872A1
- Status: Published application
- Kind: A1
- Application number: 17/317,331
- Filed: 2021-05-11
- Published: 2021-09-09
- Earliest claimed: 2017-01-04
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Alexander ALSHIN; Elena Alshina
- Web page: https://patentgrep.com/patent/US20210281872A1

## CPC

- H04N 19/513: Processing of motion vectors
- 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/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- 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: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Provided is a video decoding method including determining a displacement vector per unit time of pixels of a current block in a horizontal direction or a vertical direction, the pixels including a pixel adjacent to an inside of a boundary of the current block, by using values about reference pixels included in a first reference block and a second reference block, without using a stored value about a pixel located outside boundaries of the first reference block and the second reference block; and obtaining a prediction block of the current block by performing block-unit motion compensation and pixel group unit motion compensation on the current block by using a gradient value in the horizontal direction or the vertical direction of a first corresponding reference pixel in the first reference block which corresponds to a current pixel included in a current pixel group in the current block, a gradient value in the horizontal direction or the vertical direction of a second corresponding reference pixel in the second reference block which corresponds to the current pixel, a pixel value of the first corresponding reference pixel, a pixel value of the second corresponding reference pixel, and a displacement vector per unit time of the current pixel in the horizontal direction or the vertical direction. In this regard, the current pixel group may include at least one pixel.

## Claims

### Claim 1

A video decoding apparatus comprising:
at least one processor configured to:
obtain, from a bitstream, information about a first motion vector indicating a first reference block of a current block in a first reference picture and information about a second motion vector indicating a second reference block of the current block in a second reference picture,
determine a displacement vector of a pixel group of the current block, the pixel group comprising a first pixel adjacent to an inside of a boundary of the current block, by using a gradient value of at least one reference pixel in a first extended reference block and at least one reference pixel in a second extended reference block, wherein the first extended reference block is a block which is extended to calculate a gradient value of at least one reference pixel in the first reference block and the second extended reference block is a block which is extended to calculate a gradient value of at least one reference pixel in the second reference block, to perform block-unit motion compensation on the current block by using the first motion vector and the second motion vector and perform pixel group unit motion compensation on the current block by using a gradient value of a first corresponding reference pixel in the first reference block which corresponds to a current pixel comprised in the pixel group of the current block, a gradient value of a second corresponding reference pixel in the second reference block which corresponds to the current pixel, and a displacement vector of the pixel group including the current pixel to obtain a prediction block of the current block, and
reconstruct the current block based on the prediction block,
wherein the pixel group comprises a K×K block, and wherein K is an integer which is greater than 1,
wherein a gradient value of a first reference pixel, which is positioned outside of at least one of the first reference block and the second reference block and is positioned inside of at least one of the first extended reference block and the second extended reference block, is equal to a gradient value of a second reference pixel which is inside of at least one of the first reference block and the second reference block, and
wherein the second reference pixel is a closest pixel to the first reference pixel among reference pixels in at least one of the first reference block and the second reference block.

### Claim 2 (depends on 1)

The video decoding apparatus of claim 1, wherein the gradient value of the first reference pixel and the gradient value of the second reference pixel are calculated by using a pixel value of a reference pixel inside of the first reference block or the second reference block.

### Claim 3 (depends on 1)

The video decoding apparatus of claim 1, wherein when coordinates of an upper left vertex of the first reference block or the second reference block are (1,1), coordinates of the first reference pixel are (0,0), (0,1), or (1,0), and coordinates of the second reference pixel are (1,1).

### Claim 4 (depends on 1)

The video decoding apparatus of claim 1, wherein when coordinates of an upper left vertex of the first reference block or the second reference block are (1,1), coordinates of the first reference pixel are (0,y), where y is an integer which is greater than 1, and coordinates of the second reference pixel are (1,y).

### Claim 5 (depends on 1)

The video decoding apparatus of claim 1, wherein when coordinates of an upper left vertex of the first reference block or the second reference block are (1,1), coordinates of the first reference pixel are (x,0), where x is an integer which is greater than 1, and coordinates of the second reference pixel are (x,1).

### Claim 6 (depends on 1)

The video decoding apparatus of claim 1, wherein when coordinates of an upper right vertex of the first reference block or the second reference block are (nCbW+1, 1), where nCbW is a width of the first reference block or the second reference block, coordinates of the first reference pixel are (nCbW+1,0), (nCbW+1,1) or (nCbW,0) and coordinates of the second reference pixel are (nCbW,1).

### Claim 7 (depends on 1)

The video decoding apparatus of claim 1, wherein when coordinates of an upper right vertex of the first reference block or the second reference block are (nCbW+1, 1), where nCbW is a width of the first reference block or the second reference block, coordinates of the first reference pixel are (nCbW+1,y), where y is an integer which is greater than 1, and coordinates of the second reference pixel are (nCbW,y).

### Claim 8 (depends on 1)

The video decoding apparatus of claim 1, wherein when coordinates of an upper right vertex of the first reference block or the second reference block are (1, nCbH+1), where nCbH is a height of the first reference block or the second reference block, coordinates of the first reference pixel are (1, nCbH+1), (0, nCbH+1) or (0, nCbH) and coordinates of the second reference pixel are (1, nCbH).

### Claim 9 (depends on 1)

The video decoding apparatus of claim 1, wherein when coordinates of a lower left vertex of the first reference block or the second reference block are (1, nCbH+1) where nCbH is a height of the first reference block or the second reference block), coordinates of the first reference pixel are (x, nCbH+1), where x is an integer which is greater than 1, and coordinates of the second reference pixel are (x, nCbH).

### Claim 10 (depends on 1)

The video decoding apparatus of claim 1, wherein when coordinates of a lower right vertex of the first reference block or the second reference block are (nCbW+1, nCbH+1), where nCbW is a width of the first reference block or the second reference block, and nCbH is a height of the first reference block or the second reference block, coordinates of the first reference pixel are (nCbW+1, nCbH+1), (nCbW, nCbH+1) or (nCbW+1, nCbH), and coordinates of the second reference pixel are (nCbW, nCbH).

### Claim 11

A video encoding apparatus comprising:
at least one processor configured to:
obtain a prediction block, a first motion vector, and a second motion vector of a current block by performing motion compensation and pixel group unit motion compensation on the current block, and
generate a bitstream comprising information about the first motion vector and the second motion vector,
wherein a pixel group for the pixel group unit motion compensation comprises a K×K block wherein K is an integer which is greater than 1, and the pixel group comprises a first pixel adjacent to an inside of a boundary of the current block,
wherein the first motion vector is a motion vector indicating, from the current block, a first reference block of a first reference picture which corresponds to the current block in a current picture, and the second motion vector is a motion vector indicating, from the current block, a second reference block of a second reference picture which corresponds to the current block in the current picture,
wherein the prediction block of the current block is obtained by performing block-unit motion compensation on the current block by using the first motion vector and the second motion vector and performing the pixel group unit motion compensation on the current block by using a gradient value of a first corresponding reference pixel in the first reference block which corresponds to a current pixel comprised in the pixel group of the current block, a gradient value of a second corresponding reference pixel in the second reference block which corresponds to the current pixel, and a displacement vector of the pixel group including the current pixel,
wherein the displacement vector of the pixel group of the current block is determined by using a gradient value of at least one reference pixel in a first extended reference block and at least one reference pixel in a second extended reference block, wherein the first extended reference block is a block which is extended to calculate a gradient value of at least one reference pixel in the first reference block and the second extended reference block is a block which is extended to calculate a gradient value of at least one reference pixel in the second reference block,
wherein a gradient value of a first reference pixel, which is positioned outside of at least one of the first reference block and the second reference block and is positioned inside of at least one of the first extended reference block and the second extended reference block, is equal to a gradient value of a second reference pixel which is inside of at least one of the first reference block and the second reference block, and
wherein the second reference pixel is a closest pixel to the first reference pixel among reference pixels in at least one of the first reference block and the second reference block.
