# US 2025/0097418 A1 · Filtering method, filtering model training method, and related apparatus

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

- Number: US 2025/0097418 A1
- Document ID: US20250097418A1
- Status: Published application
- Kind: A1
- Application number: 18/962,804
- Filed: 2024-11-27
- Published: 2025-03-20
- Earliest claimed: 2022-05-31
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Shen WANG; Huanbang CHEN; Haitao YANG; Li SONG
- Web page: https://patentgrep.com/patent/US20250097418A1

## CPC

- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- H04N 19/124: Quantisation
- H04N 19/147: according to rate distortion criteria (rate-distortion as a criterion for motion estimation H04N19/567)
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/82: involving filtering within a prediction loop
- H04N 19/86: involving reduction of coding artifacts, e.g. of blockiness
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

This application discloses a filtering method, a filtering model training method, and a related apparatus, and belongs to the field of coding technologies. The method includes: determining K groups of filtering models based on a quantization parameter of a target image, determining a reconstructed block corresponding to a current coding block in the target image, determining a target filtering model from the K groups of filtering models, and filtering the reconstructed block based on the target filtering model. A same group of filtering models is applicable to coding blocks with same coding quality, different groups of filtering models are applicable to coding blocks with different coding quality, and different filtering models in a same group of filtering models are applicable to coding blocks with different content.

## Claims

### Claim 1

A filtering method for an encoder, comprising:
determining K groups of filtering models based on a quantization parameter of a target image, wherein each group of the K groups of filtering models comprises M filtering models, a same group of filtering models corresponds to a same quantization parameter, different groups of filtering models correspond to different quantization parameters, and K and M are integers greater than 1;
determining a reconstructed block corresponding to a current coding block in the target image;
determining a target filtering model from the K groups of filtering models; and
filtering the reconstructed block based on the target filtering model;
wherein the target filtering model is a filtering model corresponding to a smallest encoding distortion existing after the reconstructed block is filtered, and the reconstructed block is filtered based on the target filtering model being less than an encoding distortion of the reconstructed block.

### Claim 2 (depends on 1)

The filtering method according to claim 1, wherein determining the target filtering model from the K groups of filtering models comprises:
determining filtering indication information corresponding to the reconstructed block based on the current coding block, the reconstructed block, and the K groups of filtering models, wherein the filtering indication information indicates whether the reconstructed block needs to be filtered; and
when the filtering indication information indicates that the reconstructed block needs to be filtered, determining the target filtering model from the K groups of filtering models.

### Claim 3 (depends on 2)

The filtering method according to claim 2, wherein determining the filtering indication information corresponding to the reconstructed block comprises:
inputting the reconstructed block into each group of the K groups of filtering models, to obtain K*M filter blocks;
determining a rate-distortion cost corresponding to the reconstructed block and a rate-distortion cost corresponding to each filter block of the K*M filter blocks based on the current coding block, the reconstructed block, and the K*M filter blocks; and
in response to determining that the rate-distortion cost corresponding to the reconstructed block is not less than the rate-distortion cost corresponding to each filter block, determining that the filtering indication information is first indication information indicating that the reconstructed block needs to be filtered; or
in response to determining that the rate-distortion cost corresponding to the reconstructed block is less than the rate-distortion cost corresponding to each filter block, determining that the filtering indication information is second indication information indicating that the reconstructed block does not need to be filtered.

### Claim 4 (depends on 2)

The filtering method according to claim 2, wherein the method further comprises:
when the filtering indication information indicates that the reconstructed block does not need to be filtered, skipping filtering the reconstructed block.

### Claim 5 (depends on 2)

The filtering method according to claim 2, wherein after determining the filtering indication information corresponding to the reconstructed block, the method further comprises:
encoding the filtering indication information into a bitstream.

### Claim 6 (depends on 1)

The filtering method according to claim 1, wherein after determining the target filtering model from the K groups of filtering models, the method further comprises:
encoding a target index into a bitstream, wherein the target index indicates the target filtering model.

### Claim 7 (depends on 1)

The filtering method according to claim 1, wherein after determining the K groups of filtering models, the method further comprises:
encoding quantization parameters corresponding to the K groups of filtering models into a bitstream.

### Claim 8

A filtering method for a decoder, comprising:
determining K groups of filtering models, wherein each group of the K groups of filtering models comprises M filtering models, a same group of filtering models corresponds to a same quantization parameter, different groups of filtering models correspond to different quantization parameters, and K and M are integers greater than 1;
determining a reconstructed block based on a bitstream;
determining a target filtering model from the K groups of filtering models; and
filtering the reconstructed block based on the target filtering model.

### Claim 9 (depends on 8)

The filtering method according to claim 8, wherein determining the K groups of filtering models comprises:
determining the K groups of filtering models based on a quantization parameter of a target image to which the reconstructed block belongs.

### Claim 10 (depends on 8)

The filtering method according to claim 8, wherein determining the K groups of filtering models comprises:
parsing out, from the bitstream, quantization parameters corresponding to the K groups of filtering models; and
determining the K groups of filtering models based on the quantization parameters corresponding to the K groups of filtering models.

### Claim 11 (depends on 8)

The filtering method according to claim 8, wherein determining the target filtering model from the K groups of filtering models comprises:
determining filtering indication information of the reconstructed block, wherein the filtering indication information indicates whether the reconstructed block needs to be filtered; and
when the filtering indication information indicates that the reconstructed block needs to be filtered, determining the target filtering model from the K groups of filtering models.

### Claim 12 (depends on 11)

The filtering method according to claim 11, wherein determining the filtering indication information of the reconstructed block comprises:
parsing out the filtering indication information from the bitstream.

### Claim 13 (depends on 8)

The filtering method according to claim 8, wherein determining the target filtering model from the K groups of filtering models comprises:
parsing out a target index from the bitstream, wherein the target index indicates the target filtering model; and
determining the target filtering model based on the target index.

### Claim 14

A filtering apparatus for a decoder, comprising:
one or more processors; and
a memory coupled to the one or more processors to store instructions, which when executed by the one or more processors, cause the filtering apparatus to:
determine K groups of filtering models, wherein each group of the K groups of filtering models comprises M filtering models, a same group of filtering models corresponds to a same quantization parameter, different groups of filtering models correspond to different quantization parameters, and K and M are integers greater than 1;
determine a reconstructed block based on a bitstream;
determine a target filtering model from the K groups of filtering models; and
filter the reconstructed block based on the target filtering model.

### Claim 15 (depends on 14)

The filtering apparatus according to claim 14, wherein the filtering apparatus to determine the K groups of filtering models comprises the filtering apparatus to:
determine the K groups of filtering models based on a quantization parameter of a target image to which the reconstructed block belongs.

### Claim 16 (depends on 14)

The filtering apparatus according to claim 14, wherein the filtering apparatus to determine the K groups of filtering models comprises the filtering apparatus to:
parse out, from the bitstream, quantization parameters corresponding to the K groups of filtering models; and
determine the K groups of filtering models based on the quantization parameters corresponding to the K groups of filtering models.

### Claim 17 (depends on 14)

The filtering apparatus according to claim 14, wherein the filtering apparatus to determine the target filtering model from the K groups of filtering models comprises the filtering apparatus to:
determine filtering indication information of the reconstructed block, wherein the filtering indication information indicates whether the reconstructed block needs to be filtered; and
when the filtering indication information indicates that the reconstructed block needs to be filtered, determine the target filtering model from the K groups of filtering models.

### Claim 18 (depends on 17)

The filtering apparatus according to claim 17, wherein the filtering apparatus to determine the filtering indication information of the reconstructed block comprises the filtering apparatus to:
parse out the filtering indication information from the bitstream.

### Claim 19 (depends on 14)

The filtering apparatus according to claim 14, wherein the filtering apparatus to determine the target filtering model from the K groups of filtering models comprises the filtering apparatus to:
parse out a target index from the bitstream, wherein the target index indicates the target filtering model; and
determine the target filtering model based on the target index.
