IP Library › Granted Patent US 12,034,950
Granted Patent B2
US 12,034,950 · App. 17/506,784 · Granted Jul 9, 2024

Video decoding method and apparatus, video encoding method and apparatus, device, and storage medium

Inventors: Hong Bin Zhang (Shanghai, CN); Xiang Li (Saratoga, CA); Guichun Li (San Jose, CA); Shan Liu (San Jose, CA)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
H04N19/44H04N19/122H04N19/159H04N19/196H04N19/70H04N19/96
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,034,950
App. No.
17/506,784
Granted
Jul 9, 2024
Kind
B2
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 (68)

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 a first flag syntax element comprised in the first parameter set, wherein the first flag syntax element is configured to indicate whether a chroma QM needs to be decoded, and wherein the effective QM is a QM actually used for inversely quantizing quantized transform coefficients during decoding of the to-be-decoded video frame; and

decoding the effective QM,

wherein the decoding the effective QM comprises:

determining a value of the first flag syntax element, according to a sampling rate of a chroma component relative to a luma component; and

based on the sampling rate of the chroma component relative to the luma component being 4:0:0, determining that the value of the first flag syntax element is 0, indicating that the chroma QM does not need to be decoded, and inferring that elements of the chroma QM are 16.

2. The video decoding method according to claim 1 , further comprising:

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.

3. 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 the 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.

4. 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.

5. 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 the 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.

6. 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.

7. The video decoding method according to claim 3 , wherein the method further 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.

8. The video decoding method according to claim 1 , wherein the method further 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.

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

wherein a first chroma QM and a second chroma QM having a common prediction mode and a common size share the first flag syntax element, indicating whether the first chroma QM and the second chroma QM need to be decoded.

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

11. 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.

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

13. 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 a first flag syntax element comprised in the first parameter set, wherein the first flag syntax element is configured to indicate whether a chroma QM needs to be decoded, and wherein the effective QM beiftg-is 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,

wherein the QM determining code is further configured to cause at least one of the at least one processor to :

determine a value of the first flag syntax element, according to a sampling rate of a chroma component relative to a luma component; and

based on the sampling rate of the chroma component relative to the luma component being 4:0:0, determine that the value of the first flag syntax element is 0, indicating that the chroma QM does not need to be decoded, and inferring that elements of the chroma QM are 16.

14. The video decoding apparatus according to claim 13 , 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.

15. 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 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 the 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.

16. 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 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.

17. 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 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 the 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.

18. The video decoding apparatus according to claim 17 , 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.

19. 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 a first flag syntax element comprised in the first parameter set, wherein the first flag syntax element is configured to indicate whether a chroma QM needs to be decoded, and wherein the effective QM is a QM actually used for inversely quantizing quantized transform coefficients during decoding of the to-be-decoded video frame; and

decoding the effective QM,

wherein the decoding the effective QM comprises:

determining a value of the first flag syntax element, according to a sampling rate of a chroma component relative to a luma component; and

based on the sampling rate of the chroma component relative to the luma component being 4:0:0, determining that the value of the first flag syntax element is 0, indicating that the chroma QM does not need to be decoded, and inferring that elements of the chroma QM are 16.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 21, 2021
From: ZHANG, HONG BIN; LI, XIANG; LI, GUICHUN; LIU, SHAN
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 057863/0780 →
Priority Claims (1)
CN 201911309768.6 · Dec 18, 2019 · national
Continuity (2)
Continuation PCTCN2020134581 · Dec 8, 2020
Related Publication 20220046260A1 · Feb 10, 2022
Cited By (1)
US 12,501,075