# US 2022/0046260 A1 · Video decoding method and apparatus, video encoding method and apparatus, 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 2022/0046260 A1
- Document ID: US20220046260A1
- Status: Published application
- Kind: A1
- Application number: 17/506,784
- Filed: 2021-10-21
- Published: 2022-02-10
- Earliest claimed: 2019-12-18
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Hong Bin ZHANG; Xiang LI; Guichun LI; Shan LIU
- Web page: https://patentgrep.com/patent/US20220046260A1

## CPC

- H04N 19/126: Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 19/122: Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
- 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/196: being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters (processing of motion vectors H04N19/513)
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N 19/96: Tree coding, e.g. quad-tree coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Video decoding and encoding methods and apparatuses are provided. The decoding method includes: obtaining a first parameter set corresponding to a to-be-decoded video frame; determining an effective quantization matrix (QM) according to syntax elements included in the first parameter set, the effective QM being a QM actually used for inversely quantizing quantized transform coefficients during decoding of the to-be-decoded video frame; and decoding the effective QM.

## Claims

### Claim 1

A video decoding method, performed by at least one processor, the video decoding method comprising:
obtaining a first parameter set corresponding to a to-be-decoded video frame, the first parameter set comprising related syntax elements used for defining a quantization matrix (QM);
determining an effective QM according to the syntax elements comprised in the first parameter set, the effective QM being a QM actually used for inversely quantizing quantized transform coefficients during decoding of the to-be-decoded video frame; and
decoding the effective QM.

### Claim 2 (depends on 1)

The video decoding method according to claim 1, wherein the determining the effective QM comprises:
determining an effective size range of a QM according to the syntax elements comprised in the first parameter set; and
determining a QM within the effective size range as the effective QM.

### Claim 3 (depends on 2)

The video decoding method according to claim 2, wherein the determining the effective size range of the QM comprises:
determining a minimum luma coding block size, a block size of a luma coding tree, and a maximum luma transform block (TB) size according to the syntax elements comprised in the first parameter set;
determining an effective size range of a luma QM according to the minimum luma coding block size, the block size of the luma coding tree, and the maximum luma TB size, the effective size range of the luma QM comprising a minimum size and a maximum size of the luma QM; and
determining an effective size range of a chroma QM according to the effective size range of the luma QM and a sampling rate of a chroma component relative to a luma component, the effective size range of the chroma QM comprising a minimum size and a maximum size of the chroma QM.

### Claim 4 (depends on 3)

The video decoding method according to claim 3, wherein the determining the effective size range of the luma QM according to the minimum luma coding block size, the block size of the luma coding tree, and the maximum luma TB size comprises:
determining the minimum size of the luma QM according to the minimum luma coding block size; and
determining a larger value of the block size of the luma coding tree and the maximum luma TB size as the maximum size of the luma QM.

### Claim 5 (depends on 2)

The video decoding method according to claim 2, wherein the determining the effective size range of the QM comprises:
determining an effective size range of a luma QM according to the syntax elements comprised in the first parameter set, the effective size range of the luma QM comprising a minimum size and a maximum size of the luma QM; and
determining an effective size range of a chroma QM according to the effective size range of the luma QM and a sampling rate of a chroma component relative to a luma component, the effective size range of the chroma QM comprising a minimum size and a maximum size of the chroma QM.

### Claim 6 (depends on 5)

The video decoding method according to claim 5, wherein the determining the effective size range of the chroma QM comprises:
calculating the minimum size of the chroma QM according to the minimum size of the luma QM and the sampling rate of the chroma component relative to the luma component; and
calculating the maximum size of the chroma QM according to the maximum size of the luma QM and the sampling rate of the chroma component relative to the luma component.

### Claim 7 (depends on 3)

The video decoding method according to claim 3, wherein the determining the QM within the effective size range as the effective QM comprises:
determining a first QM as the effective QM based on the first QM meeting one of a first condition and a second condition,
the first condition being cIdx==0 && (matrixQMSize>=minQMSizeY && matrixQMSize<=maxQMSizeY), and indicating that the first QM is a luma component and is used in a quantization process of a luma TB, the first QM being within the effective size range [MinQMSizeY, MaxQMSizeY] of the luma QM, MinQMSizeY representing the minimum size of the luma QM, and MaxQMSizeY representing the maximum size of the luma QM, and
the second condition being cIdx!=0 && (matrixQMSize>=minQMSizeUV && matrixQMSize<=maxQMSizeUV), and indicating that the first QM is a chroma component and is used in a quantization process of a chroma TB, the first QM being within the effective size range [MinQMSizeUV, MaxQMSizeUV] of the chroma QM, MinQMSizeUV representing the minimum size of the chroma QM, and MaxQMSizeUV representing the maximum size of the chroma QM.

### Claim 8 (depends on 1)

The video decoding method according to claim 1, wherein the determining the effective QM comprises:
reading a value of a flag syntax element corresponding to a first QM from the first parameter set;
determining, based on the value of the flag syntax element corresponding to the first QM being a first value, that the first QM is the effective QM; and
determining, based on the value of the flag syntax element corresponding to the first QM being a second value, that the first QM is not the effective QM.

### Claim 9 (depends on 8)

The video decoding method according to claim 8, wherein a first chroma QM and a second chroma QM having a common prediction mode and a common size share a common flag syntax element.

### Claim 10 (depends on 8)

The video decoding method according to claim 8, wherein the flag syntax element is scaling_matrix_present_flag.

### Claim 11 (depends on 1)

The video decoding method according to claim 1, wherein the first parameter set is an adaptive parameter set (APS).

### Claim 12 (depends on 1)

The video decoding method according to claim 1, wherein for any other QM that is not the effective QM, all elements of the QM are predefined by a default value.

### Claim 13 (depends on 12)

The video decoding method according to claim 12, wherein the default value is 16.

### Claim 14

A video decoding apparatus comprising:
at least one memory configured to store program code; and
at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:
parameter obtaining code configured to cause at least one of the at least one processor to obtain a first parameter set corresponding to a to-be-decoded video frame, the first parameter set comprising related syntax elements used for defining a quantization matrix (QM);
QM determining code configured to cause at least one of the at least one processor to determine an effective QM according to the syntax elements comprised in the first parameter set, the effective QM being a QM actually used for inversely quantizing quantized transform coefficients during decoding of the to-be-decoded video frame; and
QM decoding code configured to cause at least one of the at least one processor to decode the effective QM.

### Claim 15 (depends on 14)

The video decoding apparatus according to claim 14, wherein the QM determining code is further configured to cause at least one of the at least one processor to:
determine an effective size range of a QM according to the syntax elements comprised in the first parameter set; and
determine a QM within the effective size range as the effective QM.

### Claim 16 (depends on 15)

The video decoding apparatus according to claim 15, wherein the QM determining code is further configured to cause at least one of the at least one processor to:
determine a minimum luma coding block size, a block size of a luma coding tree, and a maximum luma transform block (TB) size according to the syntax elements comprised in the first parameter set;
determine an effective size range of a luma QM according to the minimum luma coding block size, the block size of the luma coding tree, and the maximum luma TB size, the effective size range of the luma QM comprising a minimum size and a maximum size of the luma QM; and
determine an effective size range of a chroma QM according to the effective size range of the luma QM and a sampling rate of a chroma component relative to a luma component, the effective size range of the chroma QM comprising a minimum size and a maximum size of the chroma QM.

### Claim 17 (depends on 16)

The video decoding apparatus according to claim 16, wherein the QM determining code is further configured to cause at least one of the at least one processor to:
determine the minimum size of the luma QM according to the minimum luma coding block size; and
determine a larger value of the block size of the luma coding tree and the maximum luma TB size as the maximum size of the luma QM.

### Claim 18 (depends on 15)

The video decoding apparatus according to claim 15, wherein the QM determining code is further configured to cause at least one of the at least one processor to:
determine an effective size range of a luma QM according to the syntax elements comprised in the first parameter set, the effective size range of the luma QM comprising a minimum size and a maximum size of the luma QM; and
determine an effective size range of a chroma QM according to the effective size range of the luma QM and a sampling rate of a chroma component relative to a luma component, the effective size range of the chroma QM comprising a minimum size and a maximum size of the chroma QM.

### Claim 19 (depends on 18)

The video decoding apparatus according to claim 18, wherein the QM determining code is further configured to cause at least one of the at least one processor to:
calculate the minimum size of the chroma QM according to the minimum size of the luma QM and the sampling rate of the chroma component relative to the luma component; and
calculate the maximum size of the chroma QM according to the maximum size of the luma QM and the sampling rate of the chroma component relative to the luma component.

### Claim 20

A non-transitory computer-readable storage medium, storing a computer program, the computer program being executable by at least one processor to cause the at least one processor to perform a video decoding method comprising:
obtaining a first parameter set corresponding to a to-be-decoded video frame, the first parameter set comprising related syntax elements used for defining a quantization matrix (QM);
determining an effective QM according to the syntax elements comprised in the first parameter set, the effective QM being a QM actually used for inversely quantizing quantized transform coefficients during decoding of the to-be-decoded video frame; and
decoding the effective QM.
