# US 2025/0030842 A1 · Coding method and apparatus, decoding method and apparatus, and coding device, decoding device 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 2025/0030842 A1
- Document ID: US20250030842A1
- Status: Published application
- Kind: A1
- Application number: 18/907,838
- Filed: 2024-10-07
- Published: 2025-01-23
- Earliest claimed: 2022-04-12
- Assignees: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Applicants: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Inventors: Junyan HUO; Yanzhuo MA; Fuzheng YANG; Danni WANG; Hongqing DU; Ming LI
- Web page: https://patentgrep.com/patent/US20250030842A1

## 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/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/42: characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation (H04N19/635 takes precedence)
- H04N 19/50: using predictive coding (H04N19/61 takes precedence)
- H04N 19/593: involving spatial prediction techniques
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Disclosed are a coding method, a decoding method, and a decoding device. The decoding method includes: determining a reference sample value of a first color component of the current block; according to the reference sample value of the first color component of the current block, determining a weighting coefficient by means of a neural network model, wherein an input for the neural network model comprises the reference sample value of the first color component of the current block; according to the weighting coefficient and a reference sample value of a second color component of the current block, determining a predicted block of the second color component of the current block; and according to the predicted block, determining a reconstructed value of a sampling point of the second color component of the current block.

## Claims

### Claim 1

A decoding method, comprising:
determining reference sample values of a first colour component of a current block;
determining, according to the reference sample values of the first colour component of the current block, weighting coefficients through a neural network model, wherein an input of the neural network model comprises the reference sample values of the first colour component of the current block;
determining a prediction block of a second colour component of the current block according to the weighting coefficients and reference sample values of the second colour component of the current block; and
determining reconstructed values of second colour component samples of the current block according to the prediction block.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining the reference sample values of the first colour component of the current block comprises:
determining neighbouring reference values of the first colour component of the current block according to first colour component samples in a neighbouring region of the current block; and
determining the reference sample values of the first colour component of the current block according to reconstructed values of the first colour component samples in the current block and the neighbouring reference values of the first colour component of the current block,
wherein the neighbouring region comprises at least one of: an upper neighbouring region, an upper-right neighbouring region, a left neighbouring region and a bottom-left neighbouring region.

### Claim 3 (depends on 2)

The method of claim 2, wherein determining the reference sample values of the first colour component of the current block according to the reconstructed values of the first colour component samples in the current block and the neighbouring reference values of the first colour component of the current block comprises:
determining a reference value of the first colour component of the current block according to the reconstructed values of the first colour component samples in the current block; and
determining the reference sample values of the first colour component of the current block according to the reference value of the first colour component in the current block and the neighbouring reference values of the first colour component of the current block.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
determining that each reference sample value of the first colour component of the current block is an absolute value of a difference between a respective neighbouring reference value of the first colour component of the current block and the reference value of the first colour component in the current block, or
determining that the reference sample values of the first colour component of the current block comprise N matrices, wherein N represents a number of the reference sample values of the second colour component of the current block, a k-th matrix comprises an absolute value of a difference between a k-th value among the neighbouring reference values of the first colour component of the current block and the reference value of the first colour component in the current block, k=0, 1, . . . , N−1.

### Claim 5 (depends on 4)

The method of claim 4, wherein determining, according to the reference sample values of the first colour component of the current block, the weighting coefficients through the neural network model comprises:
determining an output of the neural network model as the weighting coefficients by taking the N matrices as the input of the neural network model,
wherein the method further comprises:
determining values corresponding to the N matrices under a preset mapping relationship; and
determining the reference sample values of the first colour component of the current block according to the values corresponding to the N matrices under the preset mapping relationship.

### Claim 6 (depends on 5)

The method of claim 5, wherein determining, according to the reference sample values of the first colour component of the current block, the weighting coefficients through the neural network model comprises:
determining an output of the neural network model as the weighting coefficients by taking the values corresponding to the N matrices under the preset mapping relationship as the input of the neural network model,
wherein
the preset mapping relationship is a Softmax function,
wherein
the preset mapping relationship is a weighting function having an inverse relationship with the k-th matrix.

### Claim 7 (depends on 2)

The method of claim 2, wherein the determining neighbouring reference values of the first colour component of the current block according to first colour component samples in a neighbouring region of the current block comprises:
determining the neighbouring reference values of the first colour component of the current block by performing a screening process on values of the first colour component samples in the neighbouring region,
wherein the determining the neighbouring reference values of the first colour component of the current block by performing the screening process on the values of the first colour component samples in the neighbouring region comprises:
determining positions of samples to be selected based on positions and/or colour component intensities of the first colour component samples in the neighbouring region; and
determining, according to the positions of the samples to be selected, the neighbouring reference values of the first colour component of the current block from the neighbouring region.

### Claim 8 (depends on 2)

The method of claim 2, wherein the determining neighbouring reference values of the first colour component of the current block according to first colour component samples in a neighbouring region of the current block comprises:
determining the neighbouring reference values of the first colour component of the current block by performing a first filtering process on values of the first colour component samples in the neighbouring region.

### Claim 9 (depends on 3)

The method of claim 3, wherein the determining a reference value of the first colour component of the current block according to the reconstructed values of the first colour component samples in the current block comprises:
determining the reference value of the first colour component in the current block by performing a second filtering process on the reconstructed values of the first colour component samples in the current block.

### Claim 10 (depends on 3)

The method of claim 3, wherein determining, according to the reference sample values of the first colour component of the current block, the weighting coefficients through the neural network model comprises:
determining an output of the neural network model as the weighting coefficients by taking the reference value of the first colour component in the current block and the neighbouring reference values of the first colour component of the current block as the input of the neural network model, or
obtaining first concatenated information by performing a concatenating process on the reference value of the first colour component in the current block and the neighbouring reference values of the first colour component of the current block; and determining an output of the neural network model as the weighting coefficients by taking the first concatenated information as the input of the neural network model, or
determining an output of the neural network model as the weighting coefficients by taking the reference sample values of the first colour component of the current block and the reference sample values of the second colour component of the current block as the input of the neural network model, or
determining the output of the neural network model as the weighting coefficients by taking the reference value of the first colour component in the current block, the neighbouring reference values of the first colour component of the current block and the reference sample values of the second colour component of the current block as the input of the neural network model, or
obtaining second concatenated information by performing a concatenating process on the reference value of the first colour component in the current block and the neighbouring reference values of the first colour component of the current block; and determining the output of the neural network model as the weighting coefficients by taking the second concatenated information and the reference sample values of the second colour component of the current block as the input of the neural network model, or
obtaining third concatenated information by performing a concatenating process on the reference value of the first colour component in the current block, the neighbouring reference values of the first colour component of the current block and the reference sample values of the second colour component of the current block; and
determining the output of the neural network model as the weighting coefficients by taking the third concatenated information as the input of the neural network model.

### Claim 11 (depends on 1)

The method of claim 1, wherein the neural network model is a convolutional neural network model, and the convolutional neural network model comprises at least one basic unit and a target unit, wherein the basic unit comprises at least a first convolutional layer and a first activation function; and the target unit comprises at least a second convolutional layer and a second activation function, or
wherein the neural network model is a fully connected neural network model, and the fully connected neural network model comprises at least one basic unit and a target unit, wherein the basic unit comprises at least a first fully connected layer and a first activation function; and the target unit comprises at least a second fully connected layer and a second activation function.

### Claim 12

An encoding method, comprising:
determining reference sample values of a first colour component of a current block;
determining, according to the reference sample values of the first colour component of the current block, weighting coefficients through a neural network model, wherein an input of the neural network model comprises the reference sample values of the first colour component of the current block;
determining a prediction block of a second colour component of the current block according to the weighting coefficients and reference sample values of the second colour component of the current block; and
determining prediction difference values of second colour component samples of the current block according to the prediction block.

### Claim 13 (depends on 12)

The method of claim 12, wherein determining the reference sample values of the first colour component of the current block comprises:
determining neighbouring reference values of the first colour component of the current block according to first colour component samples in a neighbouring region of the current block; and
determining the reference sample values of the first colour component of the current block according to reconstructed values of the first colour component samples in the current block and the neighbouring reference values of the first colour component of the current block,
wherein the neighbouring region comprises at least one of: an upper neighbouring region, an upper-right neighbouring region, a left neighbouring region and a bottom-left neighbouring region.

### Claim 14 (depends on 13)

The method of claim 13, wherein determining the reference sample values of the first colour component of the current block according to the reconstructed values of the first colour component samples in the current block and the neighbouring reference values of the first colour component of the current block comprises:
determining a reference value of the first colour component of the current block according to the reconstructed values of the first colour component samples in the current block; and
determining the reference sample values of the first colour component of the current block according to the reference value of the first colour component in the current block and the neighbouring reference values of the first colour component of the current block.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
determining that each reference sample value of the first colour component of the current block is an absolute value of a difference between a respective neighbouring reference value of the first colour component of the current block and the reference value of the first colour component in the current block, or
determining that the reference sample values of the first colour component of the current block comprise N matrices, wherein N represents a number of the reference sample values of the second colour component of the current block, a k-th matrix comprises an absolute value of a difference between a k-th value among the neighbouring reference values of the first colour component of the current block and the reference value of the first colour component in the current block, k=0, 1, . . . , N−1.

### Claim 16 (depends on 15)

The method of claim 15, wherein determining, according to the reference sample values of the first colour component of the current block, the weighting coefficients through the neural network model comprises:
determining an output of the neural network model as the weighting coefficients by taking the N matrices as the input of the neural network model.

### Claim 17 (depends on 15)

The method of claim 15, further comprising:
determining values corresponding to the N matrices under a preset mapping relationship; and
determining the reference sample values of the first colour component of the current block according to the values corresponding to the N matrices under the preset mapping relationship,
wherein determining, according to the reference sample values of the first colour component of the current block, the weighting coefficients through the neural network model comprises:
determining an output of the neural network model as the weighting coefficients by taking the values corresponding to the N matrices under the preset mapping relationship as the input of the neural network model.

### Claim 18 (depends on 17)

The method of claim 17, wherein
the preset mapping relationship is a Softmax function, or
the preset mapping relationship is a weighting function having an inverse relationship with the k-th matrix.

### Claim 19 (depends on 13)

The method of claim 13, further comprising:
determining the neighbouring reference values of the first colour component of the current block by performing a screening process on values of the first colour component samples in the neighbouring region,
wherein the determining the neighbouring reference values of the first colour component of the current block by performing the screening process on the values of the first colour component samples in the neighbouring region comprises:
determining positions of samples to be selected based on positions and/or colour component intensities of the first colour component samples in the neighbouring region; and
determining, according to the positions of the samples to be selected, the neighbouring reference values of the first colour component of the current block from the neighbouring region.

### Claim 20

A decoding device, comprising a memory and a processor, wherein
the memory is configured to store computer programs executable on the processor; and
the processor is configured to perform operations of:
determining reference sample values of a first colour component of a current block;
determining, according to the reference sample values of the first colour component of the current block, weighting coefficients through a neural network model, wherein an input of the neural network model comprises the reference sample values of the first colour component of the current block;
determining a prediction block of a second colour component of the current block according to the weighting coefficients and reference sample values of the second colour component of the current block; and
determining reconstructed values of second colour component samples of the current block according to the prediction block.
