# US 12,120,309 B2 · History-based motion vector prediction

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

- Number: US 12,120,309 B2
- Document ID: US12120309B2
- Status: Granted
- Kind: B2
- Application number: 18/153,489
- Filed: 2023-01-12
- Published: 2023-05-11
- Granted: 2024-10-15
- Earliest claimed: 2018-07-16
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Xiaozhong Xu; Xiang Li; Shan Liu
- Web page: https://patentgrep.com/patent/US12120309B2

## CPC

- H04N 19/139: Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
- H04N 19/52: by predictive encoding
- 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/174: the region being a slice, e.g. a line of blocks or a group of blocks
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/43: Hardware specially adapted for motion estimation or compensation
- H04N 19/436: using parallelised computational arrangements
- H04N 19/573: Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
- H04N 19/58: Motion compensation with long-term prediction, i.e. the reference frame for a current frame not being the temporally closest one (H04N19/23 takes precedence)
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method of video decoding is provided. In the method, a coded video bitstream of a current picture is received. The current picture is divided into a plurality of rows of coding tree units (CTUs). Coding blocks in a first CTU row of the plurality of rows of CTUs are decoded based on motion vector information stored in a history-based motion vector prediction (HMVP) buffer. The motion vector information stored in the HMVP buffer is updated as the coding blocks in the first CTU row are decoded. The HMVP buffer is updated to include the motion vector information of the coding blocks in a first CTU of the first CTU row after the coding block at an end of the first CTU row is decoded.

## Claims

### Claim 1

A method of video decoding for a decoder, the method comprising:
acquiring a current picture from a coded video bitstream, the current picture being segmented into a plurality of units and divided into a plurality of tiles, each unit divided into a plurality of blocks, the plurality of blocks in each unit being arranged as a first grid, and the plurality of units being arranged as a second grid in each tile of the plurality of tiles in the current picture;
decoding, for one of the units in a first tile of the plurality of tiles, a first block from the plurality of blocks using an entry from a first history motion vector (HMVP) buffer associated with the first tile;
updating the first HMVP buffer with a motion vector of the decoded first block;
determining a location of a second block in the first tile of the plurality of tiles, the second block being different from the first block; and
when the second block is located in a first column and a first row of a first unit of a row of the units in the second grid of the first tile, resetting the first HMVP buffer.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
when the second block is located in the first column and the first row of the first unit of the row of the units in the second grid of the first tile, copying contents of a first row buffer to the first HMVP buffer.

### Claim 3 (depends on 2)

The method according to claim 2, further comprising:
when the second block is located in a last column and a last row of the first unit of the row of the units in the second grid of the first tile, copying contents of the first HMVP buffer into the first row buffer.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
decoding, for one of the units in a second tile of the plurality of tiles, a third block from the plurality of blocks using an entry from a second history motion vector (HMVP) buffer associated with the second tile;
updating the second HMVP buffer with a motion vector of the decoded third block;
determining a location of a fourth block in the second tile of the plurality of tiles; and
when the fourth block is located in a first column and a first row of a first unit of a row of the units in the second grid of the second tile, resetting the second HMVP buffer,
wherein decoding of each unit in the first tile is performed in parallel with decoding of each unit in the second tile.

### Claim 5 (depends on 4)

The method according to claim 4, further comprising:
when the fourth block is located in the first column and the first row of the first unit of the row of the units in the second grid of the second tile, copying contents of a second row buffer to the second HMVP buffer.

### Claim 6 (depends on 5)

The method according to claim 5, further comprising:
when the fourth block is located in a last column and a last row of the first unit of the row of the units in the second grid of the second tile, copying contents of the second HMVP buffer into the second row buffer.

### Claim 7 (depends on 4)

The method according to claim 4, wherein the first and second HMVP buffers are first-in-first-out (FIFO) buffers, and wherein the updating the first and second HMVP buffers with the motion vectors includes storing the motion vectors at a last entry of the first and second HMVP buffers and deleting a first entry of the first and second HMVP buffers.

### Claim 8 (depends on 1)

The method according to claim 1, wherein each of the units is a coding tree unit (CTU).

### Claim 9

A method of video encoding for an encoder, the method comprising:
acquiring a current picture, the current picture being segmented into a plurality of units and divided into a plurality of tiles, each unit divided into a plurality of blocks, the plurality of blocks in each unit being arranged as a first grid, and the plurality of units being arranged as a second grid in each tile of the plurality of tiles in the current picture;
encoding, for one of the units in a first tile of the plurality of tiles, a first block from the plurality of blocks in a bitstream using an entry from a first history motion vector (HMVP) buffer associated with the first tile;
updating the first HMVP buffer with a motion vector of the encoded first block;
determining a location of a second block in the first tile of the plurality of tiles, the second block being different from the first block; and
when the second block is located in a first column and a first row of a first unit of a row of the units in the second grid of the first tile, resetting the first HMVP buffer.

### Claim 10 (depends on 9)

The method according to claim 9, further comprising:
when the second block is located in the first column and the first row of the first unit of the row of the units in the second grid of the first tile, copying contents of a first row buffer to the first HMVP buffer.

### Claim 11 (depends on 10)

The method according to claim 10, further comprising:
when the second block is located in a last column and a last row of the first unit of the row of the units in the second grid of the first tile, copying contents of the first HMVP buffer into the first row buffer.

### Claim 12 (depends on 9)

The method of claim 9, further comprising:
encoding, for one of the units in a second tile of the plurality of tiles, a third block from the plurality of blocks using an entry from a second history motion vector (HMVP) buffer associated with the second tile;
updating the second HMVP buffer with a motion vector of the encoded third block;
determining a location of a fourth block in the second tile of the plurality of tiles; and
when the fourth block is located in a first column and a first row of a first unit of a row of the units in the second grid of the second tile, resetting the second HMVP buffer,
wherein encoding of each unit in the first tile is performed in parallel with encoding of each unit in the second tile.

### Claim 13 (depends on 12)

The method according to claim 12, further comprising:
when the fourth block is located in the first column and the first row of the first unit of the row of the units in the second grid of the second tile, copying contents of a second row buffer to the second HMVP buffer.

### Claim 14 (depends on 13)

The method according to claim 13, further comprising:
when the fourth block is located in a last column and a last row of the first unit of the row of the units in the second grid of the second tile, copying contents of the second HMVP buffer into the second row buffer.

### Claim 15 (depends on 12)

The method according to claim 12, wherein the first and second HMVP buffers are first-in-first-out (FIFO) buffers, and wherein the updating the first and second HMVP buffers with the motion vectors includes storing the motion vectors at a last entry of the first and second HMVP buffers and deleting a first entry of the first and second HMVP buffers.

### Claim 16 (depends on 9)

The method according to claim 9, wherein each of the units is a coding tree unit (CTU).

### Claim 17

A method of processing visual media data, the method comprising:
processing a bitstream that includes the visual media data according to a format rule, wherein
the bitstream includes coded information of a current picture, the current picture being segmented into a plurality of units and divided into a plurality of tiles, each unit divided into a plurality of blocks, the plurality of blocks in each unit being arranged as a first grid, and the plurality of units being arranged as a second grid in each tile of the plurality of tiles in the current picture; and
the format rule specifies that:
for one of the units in a first tile of the plurality of tiles, a first block from the plurality of blocks is decoded using an entry from a first history motion vector (HMVP) buffer associated with the first tile;
the first HMVP buffer is updated with a motion vector of the decoded first block;
a location of a second block in the first tile of the plurality of tiles is determined, the second block being different from the first block; and
when the second block is located in a first column and a first row of a first unit of a row of the units in the second grid of the first tile, the first HMVP buffer is reset.

### Claim 18 (depends on 17)

The method according to claim 17, wherein the format rule specifies that:
when the second block is located in the first column and the first row of the first unit of the row of the units in the second grid of the first tile, contents of a first row buffer are copied to the first HMVP buffer.

### Claim 19 (depends on 18)

The method according to claim 18, wherein the format rule specifies that:
when the second block is located in a last column and a last row of the first unit of the row of the units in the second grid of the first tile, contents of the first HMVP buffer are copied into the first row buffer.

### Claim 20 (depends on 17)

The method of claim 17, wherein the format rule specifies that:
for one of the units in a second tile of the plurality of tiles, a third block from the plurality of blocks is decoded using an entry from a second history motion vector (HMVP) buffer associated with the second tile;
the second HMVP buffer is updated with a motion vector of the decoded third block;
a location of a fourth block in the second tile of the plurality of tiles is determined; and
when the fourth block is located in a first column and a first row of a first unit of a row of the units in the second grid of the second tile, the second HMVP buffer is reset,
wherein decoding of each unit in the first tile is performed in parallel with decoding of each unit in the second tile.
