# US 12,604,008 B2 · Adaptive clipping in models parameters derivations methods for video compression

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

- Number: US 12,604,008 B2
- Document ID: US12604008B2
- Status: Granted
- Kind: B2
- Application number: 18/923,643
- Filed: 2024-10-22
- Published: 2025-05-22
- Granted: 2026-04-14
- Earliest claimed: 2023-11-22
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Roman Chernyak; Biao Wang; Lien-Fei Chen; Ziyue Xiang; Yonguk Yoon; Motong Xu; Shan Liu
- Web page: https://patentgrep.com/patent/US12604008B2

## CPC

- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- 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/176: the region being a block, e.g. a macroblock
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method includes receiving a bitstream of coded information for pictures. The coded information indicates a prediction of a current block using a model based prediction technique, the model based prediction technique generates a prediction sample of the current block based on a model with one or more reconstructed samples of a reference block being input to the model, the model includes one or more parameters derived based on a current template of the current block and a reference template of the reference block. The method also includes performing at least a clipping operation on at least one of the current template and the reference template to obtain clipped template samples; deriving one or more parameter values of the one or more parameters of the model according to the clipped template samples; and generating at least a prediction sample of the current block by the model.

## Claims

### Claim 1

A method of video decoding, comprising:
receiving a bitstream of coded information for a sequence of pictures, the coded information indicating a prediction of a current block in a current picture using a model based prediction technique, the model based prediction technique generating a prediction sample of the current block based on a model with one or more reconstructed samples of a reference block being input to the model, the model including one or more parameters derived based on a current template of the current block and a reference template of the reference block;
performing at least a clipping operation on at least one of the current template and the reference template to obtain clipped template samples;
deriving one or more parameter values of the one or more parameters of the model according to the clipped template samples; and
generating at least a prediction sample of the current block by the model with the one or more parameters being set to the one or more parameter values.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
performing a clipping operation on reference samples of the reference block to obtain clipped reference samples; and
applying the model on the clipped reference samples to generate prediction samples of the current block.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
performing a clipping operation on the prediction sample of the current block after the prediction sample being generated by the model.

### Claim 4 (depends on 1)

The method of claim 1, wherein the performing at least the clipping operation further comprises:
performing a first clipping operation on the current template to obtain clipped current template samples; and
performing a second clipping operation on the reference template to obtain clipped reference template samples.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
checking whether the current template and the reference template are affected by a mapping function; and
when both of the current template and the reference template are not affected by the mapping function,
performing a first clipping operation on the current template to obtain clipped current template samples, and
performing a second clipping operation on the reference template to obtain clipped reference template samples.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
checking whether the mapping function is enabled;
when the mapping function is enabled, checking whether the current template and the reference template are affected by the mapping function; and
when the current template and the reference template are not affected by the mapping function, performing the first clipping operation and the second clipping operation.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
checking which of the current template and/or the reference template has a different value domain from an original picture of the current picture; and
when a template in the current template and the reference template has a different value domain from the original picture, performing a clipping operation on the template to obtain clipped template samples of the template.

### Claim 8 (depends on 7)

The method of claim 7, wherein the performing the clipping operation on the template further comprises:
applying the clipping operation on the template after an inverse mapping function being applied on the template.

### Claim 9 (depends on 7)

The method of claim 7, wherein the performing the clipping operation on the template further comprises:
applying the clipping operation on the template before an inverse mapping function being applied on the template.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
calculating a clipping range for the clipping operation according to a mapping function associated with the inverse mapping function.

### Claim 11 (depends on 7)

The method of claim 7, wherein the performing the clipping operation on the template further comprises:
applying the clipping operation on the template without applying an inverse mapping function on the template before or after the clipping operation.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
checking which of the current template and/or the reference template has a same value domain as an original picture of the current picture; and
when a template in the current template and the reference template has the same value domain as the original picture, performing a clipping operation on the template to obtain clipped template samples of the template before the deriving the one or more parameter values.

### Claim 13 (depends on 12)

The method of claim 12, further comprising:
applying the clipping operation on the template after a mapping function being applied on the template.

### Claim 14 (depends on 13)

The method of claim 13, further comprising:
calculating a clipping range for the clipping operation according to the mapping function.

### Claim 15 (depends on 1)

The method of claim 1, further comprising:
decoding a signal indicative of a clipping range, the signal being one of a picture level, a subpicture level, a slice level, a tile level and/or a block level.

### Claim 16 (depends on 1)

The method of claim 1, further comprising:
deriving a clipping range of the clipping operation based on an average sample value of the current template and/or the reference template.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
locating the reference template according to a motion vector for an inter frame prediction and/or a block vector for an intra-frame prediction.

### Claim 18

A method of video encoding, comprising:
determining to code a current block in a current picture using a model based prediction technique, the model based prediction technique generating a prediction sample of the current block based on a model with one or more reconstructed samples of a reference block being input to the model, the model including one or more parameters derived based on a current template of the current block and a reference template of the reference block;
performing at least a clipping operation on at least one of the current template and the reference template to obtain clipped template samples;
deriving one or more parameter values of the one or more parameters of the model according to the clipped template samples; and
encoding the current block based on the model with the one or more parameters being set to the one or more parameter values.

### Claim 19 (depends on 18)

The method of claim 18, further comprising at least one of:
performing a clipping operation on reference samples of the reference block to obtain clipped reference samples; and/or
performing a clipping operation on a prediction sample of the current block after the prediction sample being generated by the model.

### Claim 20

A method of processing visual media data, the method comprising:
processing a bitstream of visual media data according to a format rule:
the bitstream includes coded information of a current block in a current picture, the coded information indicating a prediction of a current block in a current picture using a model based prediction technique, the model based prediction technique generating a prediction sample of the current block based on a model with one or more reconstructed samples of a reference block being input to the model, the model including one or more parameters derived based on a current template of the current block and a reference template of the reference block; and
the format rule specifies that:
at least a clipping operation is performed on at least one of the current template and the reference template to obtain clipped template samples;
one or more parameter values of the one or more parameters of the model are derived according to the clipped template samples; and
at least a prediction sample of the current block is generated by the model with the one or more parameters being set to the one or more parameter values.
