# US 2026/0089332 A1 · Encoding method, decoding method, and decoder

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

- Number: US 2026/0089332 A1
- Document ID: US20260089332A1
- Status: Published application
- Kind: A1
- Application number: 19/403,375
- Filed: 2025-11-28
- Published: 2026-03-26
- Earliest claimed: 2020-01-08
- Assignees: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Applicants: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Inventors: Junyan HUO; Shuai WAN; Yanzhuo MA
- Web page: https://patentgrep.com/patent/US20260089332A1

## 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/11: among a plurality of spatial predictive coding modes
- H04N 19/12: Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
- 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/186: the unit being a colour or a chrominance component
- H04N 19/61: in combination with predictive coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An encoding method, a decoding method, and a decoder are provided. The method includes the following. A prediction parameter of a current block is determined, where the prediction parameter includes a prediction mode parameter. Neighbouring sample values of the current block are obtained and matrix-based intra prediction (MIP) input sample values of the current block are determined according to the neighbouring sample values of the current block, when the prediction mode parameter indicates that an MIP mode is used to determine an intra prediction value of a colour component of the current block. An MIP prediction value of the colour component of the current block is determined according to the MIP input sample values, an MIP weighting matrix, a shifting offset parameter, and a shifting number parameter. The intra prediction value of the colour component of the current block is determined by filtering the MIP prediction value.

## Claims

### Claim 1

A decoder, comprising:
at least one processor; and
a memory coupled to the at least one processor and storing at least one computer executable instruction thereon which, when executed by the at least one processor, causes the at least one processor to perform:
parsing a bitstream to obtain a prediction parameter and a low-frequency non-separable transform (LFNST) index of a current block, the prediction parameter comprising a prediction mode parameter;
obtaining neighbouring sample values of the current block and determining matrix-based intra prediction (MIP) input sample values of the current block according to the neighbouring sample values of the current block, when the prediction mode parameter indicates that an MIP mode is used to determine intra prediction values of the current block;
determining MIP prediction values of the current block according to the MIP input sample values, an MIP weighting matrix, and a shifting parameter, the MIP prediction values being prediction values of partial samples of the current block;
determining the intra prediction values of the current block by filtering the MIP prediction values;
determining reconstructed transform coefficients of the current block and determining second transform coefficients by performing an LFNST on at least partial reconstructed transform coefficients of the reconstructed transform coefficients, when the LFNST index indicates that the LFNST is to be performed on the current block;
determining reconstructed residual values of the current block by performing a first transform on the second transform coefficients; and
determining reconstructed values of the current block according to the intra prediction values of the current block and the reconstructed residual values;
wherein the shifting parameter comprises a shifting offset parameter and a shifting number parameter and determining the MIP prediction values of the current block according to the MIP input sample values, the MIP weighting matrix, and the shifting parameter comprises:
determining a product of the shifting offset parameter and a sum of the MIP input sample values, wherein a value of the shifting offset parameter is a fixed constant;
determining a value of a first offset to be a difference between a first constant value and the product;
determining the MIP weighting matrix of the current block according to the prediction parameter;
calculating a first weighted sum of the MIP weighting matrix and the MIP input sample values;
calculating a first sum of the first weighted sum and the first offset;
determining a first right-shift value by binary right-shifting of the first sum, wherein a number of right shifted bits is equal to a value of the shifting number parameter, wherein the value of the shifting number parameter is a fixed constant; and
setting the MIP prediction values of the current block to be a sum of the first right-shift value and a value corresponding to index 0 in first temporal reference values, wherein the first temporal reference values are obtained by downsampling the neighbouring sample values of the current block.

### Claim 2 (depends on 1)

The decoder of claim 1, wherein the prediction parameter further comprises size parameters of the current block, and determining the MIP input sample values of the current block according to the neighbouring sample values of the current block comprises:
determining a block size index value of the current block according to the size parameters of the current block;
when the block size index value of the current block is within a preset range, determining a value corresponding to index 0 in the MIP input sample values to be a difference between a second constant value and a value corresponding to index 0 in the first temporal reference values, wherein the second constant value is determined based on a bit depth of the neighbouring sample values of the current block; and setting a value corresponding to index i in the MIP input sample values to be a difference between a value corresponding to index i in the first temporal reference values and the value corresponding to the index 0 in the first temporal reference values, wherein i is an integer greater than 0; and
setting a value corresponding to index j in the MIP input sample values to be a difference between a value corresponding to index (j+1) in the first temporal reference values and the value corresponding to the index 0 in the first temporal reference values, when the block size index value of the current block is beyond the preset range, wherein j is an integer greater than or equal to 0.

### Claim 3 (depends on 2)

The decoder of claim 2, wherein the second constant value is determined by binary left-shifting of “1”, wherein a number of left shifted bits is equal to the bit depth of the neighbouring sample values of the current block minus one.

### Claim 4 (depends on 1)

The decoder of claim 1, wherein:
the value of the shifting number parameter is a fixed constant independent of a block size index value and an MIP mode index value and the value of the shifting number parameter is equal to 6;
the value of the shifting offset parameter is a fixed constant independent of a block size index value and an MIP mode index value and the value of the shifting offset parameter is equal to 32; and
the first constant value is equal to 32.

### Claim 5 (depends on 1)

The decoder of claim 1, wherein parsing the bitstream to obtain the LFNST index comprises:
determining existence of an LFNST index in the bitstream; and
parsing the bitstream to obtain the LFNST index on condition that the LFNST index exists in the bitstream; and
wherein determining existence of an LFNST index in the bitstream comprises:
determining a minimum value among size parameters of the current block, when the MIP mode is used to determine the intra prediction values of the current block; and
determining that the LFNST index exists in the bitstream based on the minimum value is greater than or equal to a first preset threshold.

### Claim 6 (depends on 1)

The decoder of claim 1, wherein when the LFNST index indicates that the LFNST is to be performed on the current block, determining the reconstructed transform coefficients of the current block comprises:
parsing the bitstream to obtain quantized coefficients of the current block; and
obtaining the reconstructed transform coefficients of the current block by scaling the quantized coefficients.

### Claim 7 (depends on 1)

The decoder of claim 1, wherein:
the LFNST is determined to be performed on the current block when a value of the LFNST index is greater than 0; and
the LFNST is determined not to be performed on the current block when the value of the LFNST index is equal to 0.

### Claim 8

An encoder, comprising:
at least one processor; and
a memory coupled to the at least one processor and storing at least one computer executable instruction thereon which, when executed by the at least one processor, causes the at least one processor to perform:
determining a prediction parameter of a current block, the prediction parameter comprising a prediction mode parameter;
obtaining neighbouring sample values of the current block and determining matrix-based intra prediction (MIP) input sample values of the current block according to the neighbouring sample values of the current block, when the prediction mode parameter indicates that an MIP mode is used to determine intra prediction values of the current block;
determining MIP prediction values of the current block according to the MIP input sample values, an MIP weighting matrix, and a shifting parameter, the MIP prediction values being prediction values of partial samples of the current block;
determining the intra prediction values of the current block by filtering the MIP prediction values;
determining prediction residual values of the current block according to the intra prediction values of the current block;
determining first transform coefficients by performing a first transform on the prediction residual values;
determining low-frequency non-separable transform (LFNST) coefficients by performing LFNST on at least partial transform coefficients of the first transform coefficients, based on a determination that the LFNST is determined to be performed on the at least partial transform coefficients;
determining a value of an LFNST index; and
encoding the LFNST index and the LFNST coefficients and signalling the encoded LFNST index and the encoded LFNST coefficients into a bitstream,
wherein the shifting parameter comprises a shifting offset parameter and a shifting number parameter and determining the MIP prediction values of the current block according to the MIP input sample values, the MIP weighting matrix, and the shifting parameter comprises:
determining a product of the shifting offset parameter and a sum of the MIP input sample values, wherein a value of the shifting offset parameter is a fixed constant;
determining a value of a first offset to be a difference between a first constant value and the product;
determining the MIP weighting matrix of the current block according to the prediction parameter;
calculating a first weighted sum of the MIP weighting matrix and the MIP input sample values;
calculating a first sum of the first weighted sum and the first offset;
determining a first right-shift value by binary right-shifting of the first sum, wherein a number of right shifted bits is equal to a value of the shifting number parameter, wherein the value of the shifting number parameter is a fixed constant; and
setting the MIP prediction values of the current block to be a sum of the first right-shift value and a value corresponding to index 0 in first temporal reference values, wherein the first temporal reference values are obtained by downsampling the neighbouring sample values of the current block.

### Claim 9 (depends on 8)

The encoder of claim 8, wherein the prediction parameter further comprises size parameters of the current block, and determining the MIP input sample values of the current block according to the neighbouring sample values of the current block comprises:
determining a block size index value of the current block according to the size parameters of the current block;
when the block size index value of the current block is within a preset range, determining a value corresponding to index 0 in the MIP input sample values to be a difference between a second constant value and a value corresponding to index 0 in the first temporal reference values, wherein the second constant value is determined based on a bit depth of the neighbouring sample values of the current block; and setting a value corresponding to index i in the MIP input sample values to be a difference between a value corresponding to index i in the first temporal reference values and the value corresponding to the index 0 in the first temporal reference values, wherein i is an integer greater than 0; and
setting a value corresponding to index j in the MIP input sample values to be a difference between a value corresponding to index (j+1) in the first temporal reference values and the value corresponding to the index 0 in the first temporal reference values, when the block size index value of the current block is beyond the preset range, wherein j is an integer greater than or equal to 0.

### Claim 10 (depends on 9)

The encoder of claim 9, wherein the second constant value is determined by binary left-shifting of “1”, wherein a number of left shifted bits is equal to the bit depth of the neighbouring sample values of the current block minus one.

### Claim 11 (depends on 8)

The encoder of claim 8, wherein:
the value of the shifting number parameter is a fixed constant independent of a block size index value and an MIP mode index value and the value of the shifting number parameter is equal to 6;
the value of the shifting offset parameter is a fixed constant independent of a block size index value and an MIP mode index value and the value of the shifting offset parameter is equal to 32; and
the first constant value is equal to 32.

### Claim 12 (depends on 8)

The encoder of claim 8, wherein the at least one processor is further configured to perform:
determining a minimum value among size parameters of the current block, when the MIP mode is used to determine the intra prediction values of the current block; and
determining to perform the LFNST on the at least partial transform coefficients of the first transform coefficients, when the minimum value is greater than or equal to a first preset threshold.

### Claim 13 (depends on 8)

The encoder of claim 8, wherein determining the value of the LFNST index comprises:
setting a value of the LFNST index to be greater than zero, when the LFNST is determined to be performed on the at least partial transform coefficients of the first transform coefficients; and
setting the value of the LFNST index to be zero, when the LFNST is determined not to be performed on the at least partial transform coefficients of the first transform coefficients.

### Claim 14 (depends on 8)

The encoder of claim 8, wherein encoding the LFNST coefficients and signalling the encoded LFNST coefficients comprises:
determining quantized coefficients by quantizing the LFNST coefficients; and
encoding the quantized coefficients and signalling the encoded quantized coefficients into the bitstream.

### Claim 15

A non-transitory computer readable storage medium, storing computer programs and a bitstream, wherein when executed by a processor, the computer programs cause the processor to implement an encoding method to generate the bitstream, and the encoding method comprises:
determining a prediction parameter of a current block, the prediction parameter comprising a prediction mode parameter;
obtaining neighbouring sample values of the current block and determining matrix-based intra prediction (MIP) input sample values of the current block according to the neighbouring sample values of the current block, when the prediction mode parameter indicates that an MIP mode is used to determine intra prediction values of the current block;
determining MIP prediction values of the current block according to the MIP input sample values, an MIP weighting matrix, and a shifting parameter, the MIP prediction values being prediction values of partial samples of the current block;
determining the intra prediction values of the current block by filtering the MIP prediction values;
determining prediction residual values of the current block according to the intra prediction values of the current block;
determining first transform coefficients by performing a first transform on the prediction residual values;
determining low-frequency non-separable transform (LFNST) coefficients by performing LFNST on at least partial transform coefficients of the first transform coefficients, based on a determination that the LFNST is determined to be performed on the at least partial transform coefficients;
determining a value of an LFNST index; and
encoding the LFNST index and the LFNST coefficients and signalling the encoded LFNST index and the encoded LFNST coefficients into the bitstream,
wherein the shifting parameter comprises a shifting offset parameter and a shifting number parameter and determining the MIP prediction values of the current block according to the MIP input sample values, the MIP weighting matrix, and the shifting parameter comprises:
determining a product of the shifting offset parameter and a sum of the MIP input sample values, wherein a value of the shifting offset parameter is a fixed constant;
determining a value of a first offset to be a difference between a first constant value and the product;
determining the MIP weighting matrix of the current block according to the prediction parameter;
calculating a first weighted sum of the MIP weighting matrix and the MIP input sample values;
calculating a first sum of the first weighted sum and the first offset;
determining a first right-shift value by binary right-shifting of the first sum, wherein a number of right shifted bits is equal to a value of the shifting number parameter, wherein the value of the shifting number parameter is a fixed constant; and
setting the MIP prediction values of the current block to be a sum of the first right-shift value and a value corresponding to index 0 in first temporal reference values, wherein the first temporal reference values are obtained by downsampling the neighbouring sample values of the current block.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the prediction parameter further comprises size parameters of the current block, and determining the MIP input sample values of the current block according to the neighbouring sample values of the current block comprises:
determining a block size index value of the current block according to the size parameters of the current block;
when the block size index value of the current block is within a preset range, determining a value corresponding to index 0 in the MIP input sample values to be a difference between a second constant value and a value corresponding to index 0 in the first temporal reference values, wherein the second constant value is determined based on a bit depth of the neighbouring sample values of the current block; and setting a value corresponding to index i in the MIP input sample values to be a difference between a value corresponding to index i in the first temporal reference values and the value corresponding to the index 0 in the first temporal reference values, wherein i is an integer greater than 0; and
setting a value corresponding to index j in the MIP input sample values to be a difference between a value corresponding to index (j+1) in the first temporal reference values and the value corresponding to the index 0 in the first temporal reference values, when the block size index value of the current block is beyond the preset range, wherein j is an integer greater than or equal to 0.

### Claim 17 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein the second constant value is determined by binary left-shifting of “1”, wherein a number of left shifted bits is equal to the bit depth of the neighbouring sample values of the current block minus one.

### Claim 18 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein:
the value of the shifting number parameter is a fixed constant independent of a block size index value and an MIP mode index value and the value of the shifting number parameter is equal to 6;
the value of the shifting offset parameter is a fixed constant independent of a block size index value and an MIP mode index value and the value of the shifting offset parameter is equal to 32; and
the first constant value is equal to 32.

### Claim 19 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the encoding method further comprises:
determining a minimum value among size parameters of the current block, when the MIP mode is used to determine the intra prediction values of the current block; and
determining to perform the LFNST on the at least partial transform coefficients of the first transform coefficients, when the minimum value is greater than or equal to a first preset threshold.

### Claim 20 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein determining the value of the LFNST index comprises:
setting a value of the LFNST index to be greater than zero, when the LFNST is determined to be performed on the at least partial transform coefficients of the first transform coefficients; and
setting the value of the LFNST index to be zero, when the LFNST is determined not to be performed on the at least partial transform coefficients of the first transform coefficients.
