# US 2026/0075232 A1 · Encoding/decoding method, code stream, encoder, decoder, and storage medium

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

- Number: US 2026/0075232 A1
- Document ID: US20260075232A1
- Status: Published application
- Kind: A1
- Application number: 19/386,621
- Filed: 2025-11-12
- Published: 2026-03-12
- Earliest claimed: 2023-05-18
- Assignees: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Applicants: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Inventors: Yanzhuo MA; Junyan HUO; Fuzheng YANG; Hongli ZHANG; Ming LI
- Web page: https://patentgrep.com/patent/US20260075232A1

## CPC

- H04N 19/51: Motion estimation or motion compensation
- 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/137: Motion inside a coding unit, e.g. average field, frame or block difference
- 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 19/593: involving spatial prediction techniques
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An encoding/decoding method, a code stream, an encoder, a decoder, and a storage medium are provided. The decoding method includes that: a first template for a current block is determined, and a preset search region is determined according to the first template; a search in the preset search region is performed according to a first parameter for the current block, and a block vector of the current block is determined, the first parameter is used for controlling the searching process; and prediction values of the current block are determined according to the block vector of the current block.

## Claims

### Claim 1

A method for decoding, applied to a decoder, comprising:
determining a first template for a current block, and determining a preset search region based on the first template;
performing a search in the preset search region based on a first parameter for the current block, and determining a block vector for the current block, wherein the first parameter is used for controlling a process of the search; and
determining prediction values for the current block based on the block vector for the current block.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining the first parameter based on a bit depth information of a current picture and a sample parameter for the first template.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
determining the first parameter based on neighbouring reconstructed blocks.

### Claim 4 (depends on 3)

The method of claim 3, wherein determining the first parameter based on the neighbouring reconstructed blocks comprises:
determining a first threshold based on matching cost values corresponding to block vectors for the neighbouring reconstructed blocks and sample parameters of reference templates for the neighbouring reconstructed blocks;
determining a second threshold based on a sample parameter for the first template and a maximum average sample value difference between the current block and the neighbouring reconstructed blocks; and
determining the first parameter based on the first threshold and the second threshold.

### Claim 5 (depends on 4)

The method of claim 4, wherein determining the first parameter based on the first threshold and the second threshold comprises:
if the first threshold is less than or equal to the second threshold, determining the first threshold as the first parameter; and
if the first threshold is greater than the second threshold, determining the second threshold as the first parameter.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
determining the first threshold based on at least one matching cost value for at least one of the neighbouring reconstructed blocks, at least one sample parameter for the at least one of the neighbouring reconstructed blocks, and the sample parameter for the first template;
determining the second threshold based on the sample parameter for the first template and the maximum average sample value difference between the current block and the neighbouring reconstructed blocks; and
determining the first parameter based on the first threshold and the second threshold.

### Claim 7 (depends on 3)

The method of claim 3, wherein the preset search region comprises at least one search region, and the method further comprises:
determining at least one first parameter for the at least one search region.

### Claim 8 (depends on 1)

The method of claim 1, wherein performing the search in the preset search region based on the first parameter for the current block, and determining the block vector for the current block comprises:
sequentially traversing search points in the preset search region based on a preset scanning order, and determining a first matching cost value between a matching template corresponding to each of the search points in the preset search region and the first template based on the preset matching criterion; and
if the first matching cost value and the first parameter meet a search termination condition, terminating the search in the preset search region, and determining a block vector corresponding to the first matching cost value as the block vector for the current block.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
sequentially traversing the search points in the preset search region based on the preset scanning order and a first search step size, and determining the first matching cost value between the matching template corresponding to each of the search points in the preset search region and the first template based on the preset matching criterion; or
sequentially traversing the search points in the preset search region based on the preset scanning order and a second search step size, and determining the first matching cost value between the matching template corresponding to each of the search points in the preset search region and the first template based on the preset matching criterion, wherein the first search step size is greater than the second search step size.

### Claim 10 (depends on 8)

The method of claim 8, further comprising:
performing the search in the preset search region based on the preset scanning order and a first search step size, and determining a second matching cost value between the matching template corresponding to each of the search points in the preset search region and the first template based on the preset matching criterion;
if the second matching cost value and the first parameter meet the search termination condition, terminating the search in the preset search region, and determining a block vector corresponding to the second matching cost value as a reference block vector for the current block;
determining a first search region based on matching reconstructed blocks corresponding to the reference block vector, wherein the first search region is smaller than the preset search region;
performing a search in the first search region based on the preset scanning order and a second search step size, and determining a third matching cost value between a matching template corresponding to each of search points in the first search region and the first template based on the preset matching criterion, wherein the first search step size is greater than the second search step size; and
if the third matching cost value and the first parameter meet the search termination condition, terminating the search in the first search region, and determining a block vector corresponding to the third matching cost value as the block vector for the current block.

### Claim 11 (depends on 1)

The method of claim 1, wherein the preset search region comprises at least one search region, and performing the search in the preset search region based on the first parameter for the current block, and determining the block vector for the current block comprises:
determining a first search order for the at least one search region, based on a positional relationship between the current block and the at least one search region; and
sequentially traversing the at least one search region based on the first search order, performing a search in the at least one search region based on the first parameter, and determining the block vector for the current block.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
decoding a bitstream, and determine the first parameter;
wherein the first parameter is transmitted through any one of following syntax information: sequence parameter set (SPS) layer syntax information, picture parameter set (PPS) layer syntax information, adaptation parameter set (APS) layer syntax information, slice header (SH) layer syntax information, or coding unit (CU) layer syntax information.

### Claim 13 (depends on 1)

The method of claim 1, wherein determining the prediction values for the current block based on the block vector for the current block comprises:
determining reference blocks for the current block based on the block vector for the current block; and
determining the prediction values for the current block based on the reference blocks for the current block.

### Claim 14 (depends on 13)

The method of claim 13, wherein determining the reference blocks for the current block based on the block vector for the current block comprises:
determining initial reconstructed blocks for the current block based on the block vector for the current block; and
refining the initial reconstructed blocks, and determining the reference blocks for the current block.

### Claim 15 (depends on 1)

The method of claim 1, wherein determining the prediction values for the current block based on the block vector for the current block comprises:
determining at least one reference block for the current block based on the block vector for the current block; and
determining the prediction values for the current block based on the at least one reference block, comprising:
determining at least one prediction block based on the at least one reference block; and
performing weighted fusion on the at least one prediction block, and determining the prediction values for the current block.

### Claim 16 (depends on 1)

The method of claim 1, wherein determining the first template for the current block comprises:
determining a template type for the current block, and determining the first template for the current block based on the template type;
wherein determining the template type for the current block comprises:
determining the template type for the current block based on reference samples of the current block; or
determining the template type for the current block based on indication information in a bitstream; or
determining the template type for the current block based on a size of the current block,
wherein the reference samples of the current block comprise at least one of: left neighbouring reference samples of the current block, top neighbouring reference samples of the current block, top-left neighbouring reference samples of the current block, bottom-left neighbouring reference samples of the current block, or top-right neighbouring reference samples of the current block.

### Claim 17

A method for encoding, applied to an encoder, comprising:
determining a first template for a current block, and determining a preset search region based on the first template;
performing a search in the preset search region based on a first parameter for the current block, and determining a block vector for the current block, wherein the first parameter is used for controlling a process of the search; and
determining prediction values for the current block based on the block vector for the current block.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
determining the first parameter based on a bit depth information of a current picture and a sample parameter for the first template.

### Claim 19 (depends on 17)

The method of claim 17, further comprising:
determining the first parameter based on neighbouring reconstructed blocks.

### Claim 20 (depends on 17)

A non-transitory computer-readable storage medium, having stored thereon a computer program and a bitstream, wherein the computer program, when executed by a first processor, enables the first processor to perform the steps of the encoding method of claim 17 to generate the bitstream.
