# US 2024/0205386 A1 · Intra block copy with template matching for video encoding and decoding

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

- Number: US 2024/0205386 A1
- Document ID: US20240205386A1
- Status: Published application
- Kind: A1
- Application number: 18/285,935
- Filed: 2022-03-01
- Published: 2024-06-20
- Earliest claimed: 2021-04-09
- Assignees: InterDigital CE Patent Holdings, SAS
- Applicants: Interdigital Ce Patent Holdings, SAS
- Inventors: Antoine Robert; Karam Naser; Tangi Poirier; Gaelle Martin-Cocher
- Web page: https://patentgrep.com/patent/US20240205386A1

## CPC

- 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/11: among a plurality of spatial predictive coding modes
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/52: by predictive encoding
- H04N 19/61: in combination with predictive coding
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

In a video coding system, it is proposed to improve the intra prediction based on intra-block copy by allowing a decoder-side refinement allowing further refinement of the block vector obtained from IBC using a template matching process. In this template matching, the decoder searches in an iterative process the best match for the current block (L-shaped) template within the reconstructed area, adjacent to the block vector determined using the IBC 10 prediction. This technique allows to obtain a finer precision that what is possible with IBC while minimizing the amount of coding information. In at least one embodiment where a coarse precision is used for IBC, it allows at the same time to benefit from significant coding gain provided by IBC while providing a much finer precision with reduced signaling of the block vector.

## Claims

### Claim at position 1

1-18. (canceled)

### Claim 19

A method comprising:
determining a template based on samples surrounding a block of a picture of a video;
determining an initial location for an initial iteration;
selecting a matching template among a set of template candidates in reconstructed blocks of the picture, wherein the set of template candidates is determined based on a determined location and wherein the matching template is selected based on a similarity measure between samples of the template and samples of the template candidates;
refining the selection by iterating over the selection step while the similarity of a template candidate is better than the similarity of the other template candidates; and
reconstructing the block by copying samples of the selected matching template into the block,
wherein, for the initial iteration over the selection step, the location is determined by the initial location and wherein, for further iterations, the location is determined as a refinement based on the location of the selected matching template of the previous iteration.

### Claim 20 (depends on 19)

The method according to claim 19, wherein the set of template candidates are selected based on a precision.

### Claim 21 (depends on 20)

The method according to claim 20, wherein an initial location of a template for an initial iteration of the selection step is determined using a coarse precision of 8 or 16 pixels.

### Claim 22 (depends on 20)

The method according to claim 20, further comprising, in the condition that the similarity of the template candidate at a current location is better than the similarity of the other template candidates of the set of template candidates, iterating on a further set of template candidates for which the location is determined with a finer precision.

### Claim 23 (depends on 19)

The method according to claim 19, wherein the initial location of a template for the initial iteration of the selection step is determined by techniques of motion coding modes such as merge mode or advanced motion vector prediction and wherein the motion coding modes apply to reconstructed blocks of the picture.

### Claim 24 (depends on 20)

The method according to claim 20, wherein the initial precision for the initial iteration of the selection step is obtained from information in the bitstream.

### Claim 25 (depends on 20)

The method according to claim 20, wherein the set of template candidates is determined by selecting candidates according to a sampling of a search region according to the precision.

### Claim 26 (depends on 20)

The method according to claim 20, wherein the set of template candidates is determined by selecting candidates according to a location and precision in both horizontal and vertical directions.

### Claim 27 (depends on 19)

The method of claim 19, further comprising:
decoding picture data using the reconstructed block.

### Claim 28 (depends on 19)

The method of claim 19, further comprising:
encoding picture data using the reconstructed block.

### Claim 29

An apparatus for video decoding, the apparatus comprising one or more processors configured to:
determine a template based on samples surrounding a block of a picture of a video;
determine an initial location for an initial iteration;
select a matching template among a set of template candidates in reconstructed blocks of the picture, wherein the set of template candidates is determined based on a determined location and wherein the matching template is selected based on a similarity measure between samples of the template and samples of the template candidates;
refine the selection by iterating over the selection step while the similarity of a template candidate is better than the similarity of the other template candidates;
reconstruct the block by copying samples of the selected matching template into the block, wherein, for the initial iteration over the selection step, the location is determined by the initial location and wherein, for further iterations, the location is determined as a refinement based on the location of the selected matching template of the previous iteration; and
decode picture data using the reconstructed block.

### Claim 30 (depends on 29)

The apparatus according to claim 29 wherein the set of template candidates are selected based on a precision.

### Claim 31 (depends on 30)

The apparatus according to claim 30, wherein an initial location of a template for an initial iteration of the selection step is determined using a coarse precision of 8 or 16 pixels.

### Claim 32 (depends on 30)

The apparatus according to claim 30, further comprising, in the condition that the similarity of the template candidate at a current location is better than the similarity of the other template candidates of the set of template candidates, iterating on a further set of template candidates for which the location is determined with a finer precision.

### Claim 33 (depends on 30)

The apparatus according to claim 30, wherein the initial precision for the initial iteration of the selection step is obtained from information in the bitstream.

### Claim 34 (depends on 30)

The apparatus according to claim 30, wherein the set of template candidates is determined by selecting candidates according to a sampling of a search region according to the precision.

### Claim 35 (depends on 30)

The apparatus according to claim 30, wherein the set of template candidates is determined by selecting candidates according to a location and precision in both horizontal and vertical directions.

### Claim 36

An apparatus for video encoding, the apparatus comprising one or more processors configured to:
determine a template based on samples surrounding a block of a picture of a video;
determine an initial location for an initial iteration;
select a matching template among a set of template candidates in reconstructed blocks of the picture, wherein the set of template candidates is determined based on a determined location and wherein the matching template is selected based on a similarity measure between samples of the template and samples of the template candidates;
refine the selection by iterating over the selection step while the similarity of a template candidate is better than the similarity of the other template candidates;
reconstruct the block by copying samples of the selected matching template into the block, wherein, for the initial iteration over the selection step, the location is determined by the initial location and wherein, for further iterations, the location is determined as a refinement based on the location of the selected matching template of the previous iteration; and
encode picture data using the reconstructed block.

### Claim 37 (depends on 19)

Computer program comprising program code instructions for implementing the steps of a method according to claim 19 when executed by a processor.

### Claim 38 (depends on 19)

Non-transitory computer readable medium comprising program code instructions for implementing the steps of a method according to claim 19 when executed by a processor.
