Coding / decoding method and device, and storage medium
Patent Information
- Application Number
- KR1020267007281
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-06-21
- Filing Date
- 2020-06-19
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2040-06-19
Smart Images

Figure 112026028196783-PAT00019_ABST
Abstract
Description
Technology Field
[0001] The present invention claims priority to a Chinese patent application filed on June 21, 2019, with application number 201910545251.0 and title of the invention “Coding and decoding method, apparatus and storage medium”, all of which are incorporated by reference into the present invention.
[0002] The present invention relates to the field of image processing technology, and in particular to a coding and decoding method, apparatus, and storage medium. Background Technology
[0003] In the current field of image coding and decoding technology, when a coding unit performs coding on an image block, it generally uses a context model to code certain syntax elements, carries these syntax elements in the image block's code stream, and transmits them to a decoding unit. After receiving the image block's code stream, the decoding unit performs interpretation of these syntax elements using the same context model as the coding unit and reconstructs the image based on these syntax elements. These syntax elements may be various instruction information, such as first ISP instruction information or second ISP instruction information; the first ISP instruction information indicates whether the intra-subblock prediction mode is activated, and the second ISP instruction information indicates the subblock partitioning method of the intra-subblock prediction mode.
[0004] However, different syntax elements perform context-based adaptive binary arithmetic coding and decoding by different context models, and the same syntax elements may also perform context-based adaptive binary arithmetic coding and decoding by different context models in different situations; consequently, many context models are required during the coding and decoding process, making the process complex and resulting in significant memory overhead. The problem to be solved
[0005] Embodiments of the present invention provide a coding and decoding method and a storage medium capable of solving the problem of having many context models required for the coding and decoding process and large memory overhead existing in related technologies. The means for solving the above problem are as follows. means of solving the problem
[0006] According to one embodiment, a coding and decoding method is provided, and said method,
[0007] When determining the progress of coding or decoding of the first ISP instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding is performed on the first ISP instruction information by a single context model, wherein the first ISP instruction information indicates whether to activate an intra-subblock prediction mode;
[0008] When determining whether to proceed with coding or decoding of the second ISP instruction information, bypass-based binary arithmetic coding or decoding is performed on the second ISP instruction information, wherein the second ISP instruction information includes the step of indicating a sub-block partitioning method of an intra-sub-block prediction mode.
[0009] According to one embodiment, a coding and decoding method is provided, and said method,
[0010] When determining whether to proceed with coding or decoding of the first ISP instruction information, perform bypass-based binary arithmetic coding or decoding on the first ISP instruction information, wherein the first ISP instruction information indicates whether to activate the intra-subblock prediction mode;
[0011] When determining whether to proceed with coding or decoding of the second ISP instruction information, bypass-based binary arithmetic coding or decoding is performed on the second ISP instruction information, wherein the second ISP instruction information includes the step of indicating a sub-block partitioning method of an intra-sub-block prediction mode.
[0012] According to one embodiment, a coding and decoding method is provided, and said method,
[0013] The current block includes a step in which the width and height sizes are M*N, and when M is less than 64 and N is less than 64, the current block does not support a multi-reference line prediction mode.
[0014] In one possible embodiment of the present invention, when the width and height of the current block are 4*4, the current block includes the step of not supporting a multi-reference line prediction mode.
[0015] According to one embodiment, a coding and decoding method is provided, wherein the current block supports a multi-reference line prediction mode, the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3, the reference line indicator information corresponding to the multi-reference line prediction mode occupies up to 2 bits, and the reference line indicator information indicates the index information of a target reference line used when performing prediction of the current block by the multi-reference line prediction mode, the method,
[0016] A step of performing context-based adaptive binary arithmetic coding or adaptive binary arithmetic decoding for the first bit of the reference line instruction information by a single context model;
[0017] If coding or decoding is to be performed on the second bit of the reference line instruction information, the method includes the step of performing bypass-based binary arithmetic coding or decoding on the second bit of the reference line instruction information.
[0018] According to one embodiment, a coding and decoding method is provided, wherein the current block supports a multi-reference line prediction mode, the number of candidate reference lines corresponding to the multi-reference line prediction mode is 4, the reference line indicator information corresponding to the multi-reference line prediction mode occupies up to 3 bits, and the reference line indicator information indicates the index information of a target reference line used when performing prediction of the current block by the multi-reference line prediction mode, the method,
[0019] A step of performing context-based adaptive binary arithmetic coding or adaptive binary arithmetic decoding for the first bit of the reference line instruction information by a single context model;
[0020] If coding or decoding is to be performed on the second bit of the reference line instruction information, a step of performing bypass-based binary arithmetic coding or decoding on the second bit of the reference line instruction information;
[0021] If coding or decoding is to be performed on the third bit of the reference line instruction information, the method includes the step of performing bypass-based binary arithmetic coding or decoding on the third bit of the reference line instruction information.
[0022] According to one embodiment, a coding and decoding method is provided, wherein a current block supports a multi-reference line prediction mode, and the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3, and a candidate reference line with index information of 0 is a 0th line, and the 0th line is a line adjacent to the current block boundary; a candidate reference line with index information of 1 is a 1st line, and the 1st line is a line next adjacent to the current block boundary; and a candidate reference line with index information of 2 is a 2nd line, and the 2nd line is a line adjacent to the 1st line; wherein the method,
[0023] When performing a prediction for the current block according to the above multi-reference line prediction mode, the method includes the step of performing a prediction for the current block according to the target reference line;
[0024] Here, the target reference line is determined according to reference line indication information;
[0025] If the index information indicated by the above reference line indication information is 0, the above target reference line is the 0th line;
[0026] If the index information indicated by the above reference line indication information is 1, the above target reference line is the first line;
[0027] If the index information indicated by the reference line indication information above is 2, the target reference line above is the second line.
[0028] According to one embodiment, a coding and decoding method is provided, wherein if it is determined that a current block activates a multi-reference line prediction mode, the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3, and a candidate reference line with index information of 0 is a 0th line, and the 0th line is a line adjacent to the current block boundary; a candidate reference line with index information of 1 is a 1st line, and the 1st line is a line next adjacent to the current block boundary; a candidate reference line with index information of 2 is a 2nd line, and the 2nd line is a line adjacent to the 1st line; and a candidate reference line with index information of 3 is a 3rd line, and the 3rd line is a line adjacent to the 2nd line; the method comprises
[0029] When performing a prediction for the current block according to the above multi-reference line prediction mode, the method includes the step of performing a prediction for the current block according to the target reference line;
[0030] Here, the target reference line is determined according to reference line indication information;
[0031] If the index information indicated by the above reference line indication information is 0, the above target reference line is the 0th line;
[0032] If the index information indicated by the above reference line indication information is 1, the above target reference line is the second line;
[0033] If the index information indicated by the reference line indication information above is 2, the target reference line above is the third line.
[0034] According to one embodiment, a decoding method is provided, and if the current block supports a multi-reference line prediction mode, the method is,
[0035] Before proceeding with a prediction for the current block according to the multi-reference line prediction mode, decoding is performed on line count indication information, wherein the line count indication information indicates the number of lines of a candidate reference line corresponding to the multi-reference line prediction mode;
[0036] A step of determining the number of candidate reference lines corresponding to the multi-reference line prediction mode according to the line number indication information;
[0037] A step of determining a target reference line based on the number of candidate reference lines corresponding to the multi-reference line prediction mode and the reference line instruction information, wherein the reference line instruction information indicates the index information of the target reference line used when proceeding with the prediction of the current block by the multi-reference line prediction mode;
[0038] It includes a step of performing a prediction for the current block according to the target reference line.
[0039] In one possible embodiment of the present invention, the line count indication information exists in a sequence parameter set, an image parameter set, a slice level, or a Tile level.
[0040] According to one embodiment, a coding and decoding method is provided, and said method,
[0041] When the current block activates an affine prediction mode or other prediction mode other than an affine prediction mode to perform motion vector difference coding or decoding of the current block, and when the current block supports an AMVR mode, when performing coding or decoding of the first AMVR instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding of the first AMVR instruction information is performed by the first context model, wherein the first AMVR instruction information indicates whether the AMVR mode is activated;
[0042] When the first AMVR instruction information indicates that the current block has activated the AMVR mode, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding is performed on the second AMVR instruction information by the second context model, wherein the second AMVR instruction information indicates index information of the pixel resolution used when performing motion vector difference coding or decoding in AMVR mode, and the first context model and the second context model include different steps.
[0043] According to one embodiment, a coding and decoding method is provided, and said method,
[0044] When the current block activates an affine prediction mode to perform motion vector difference coding or decoding of the current block, and when the current block supports AMVR mode, when performing coding or decoding of the first AMVR instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding of the first AMVR instruction information is performed by means of a first context model, wherein if the first AMVR instruction information indicates that the current block has activated AMVR mode, bypass-based binary arithmetic coding or decoding of the second AMVR instruction information is performed;
[0045] When the current block activates a prediction mode other than an affine prediction mode to perform motion vector difference coding or decoding of the current block, and when the current block supports an AMVR mode, when performing coding or decoding of the first AMVR instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding of the first AMVR instruction information is performed by means of a second context model, wherein if the first AMVR instruction information indicates that the current block has activated the AMVR mode, bypass-based binary arithmetic coding or decoding of the second AMVR instruction information is performed;
[0046] Here, the first context model and the second context model are different, the first AMVR instruction information indicates whether the AMVR mode is activated, and the second AMVR instruction information indicates index information of the pixel resolution used when performing motion vector difference coding or decoding in the AMVR mode.
[0047] According to one embodiment, a coding and decoding method is provided, and said method,
[0048] When the current block activates an affine prediction mode or other prediction mode other than an affine prediction mode to perform motion vector difference coding or decoding of the current block, and when the current block supports an adaptive motion vector resolution AMVR mode, when performing coding or decoding of the first AMVR instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding of the first AMVR instruction information is performed by the first context model, wherein the first AMVR instruction information indicates whether the AMVR mode is activated;
[0049] If the first AMVR instruction information indicates that the current block has activated the AMVR mode, bypass-based binary arithmetic coding or decoding is performed on the second AMVR instruction information, wherein the second AMVR instruction information indicates index information of the pixel resolution used when performing motion vector difference coding or decoding in the AMVR mode.
[0050] According to one embodiment, a decoding method is provided, and said method,
[0051] A step in which, if the current block activates intra-subblock prediction and the target prediction mode of the intra-subblock prediction exists in the list of most probable intra-prediction mode MPMs, and the current block is a luma block, when performing prediction on the current block according to the intra-subblock prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by the first context model, and other bits are obtained by performing bypass-based binary arithmetic decoding;
[0052] Determining the target prediction mode of the intra-subblock prediction activated by the current block from the MPM list according to the prediction mode index information; wherein the prediction mode index information indicates the index information of the target prediction mode in the MPM list;
[0053] A step of performing a prediction for the current block according to the above target prediction mode; or
[0054] If the current block activates general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when performing prediction on the current block according to general intra prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by a second context model, and other bits are obtained by performing bypass-based binary arithmetic decoding, and the second context model and the first context model are the same context model;
[0055] Determining the target prediction mode of the general intra prediction activated by the current block from the MPM list according to the prediction mode index information; wherein the prediction mode index information indicates the index information of the target prediction mode in the MPM list;
[0056] It includes a step of performing a prediction for the current block according to the above target prediction mode.
[0057] According to one embodiment, a decoding method is provided, and said method,
[0058] A step in which, if the current block activates intra-sub block prediction and the target prediction mode of the intra-sub block prediction exists in the MPM list, and the current block is a luma block, when performing prediction on the current block according to the intra-sub block prediction, decoding is performed on the prediction mode index information, wherein all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic decoding;
[0059] Determining the target prediction mode of the intra-subblock prediction activated by the current block from the MPM list according to the prediction mode index information; wherein the prediction mode index information indicates the index information of the target prediction mode in the MPM list;
[0060] A step of performing a prediction for the current block according to the above target prediction mode; or
[0061] A step in which, if the current block enables general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when performing prediction on the current block according to general intra prediction, decoding is performed on the prediction mode index information, wherein all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic decoding;
[0062] Determining the target prediction mode of the general intra prediction currently activated by the block from the MPM list according to the prediction mode index information; wherein the prediction mode index information indicates the index information of the target prediction mode in the MPM list; It includes a step of performing a prediction for the current block according to the above target prediction mode.
[0063] According to one embodiment, a decoding method is provided, and said method,
[0064] A step in which, if the current block enables intra-subblock prediction and the target prediction mode of the intra-subblock prediction exists in the MPM list, and the current block is a luma block, when performing prediction on the current block according to the intra-subblock prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by a single context model, and other bits are obtained by performing bypass-based binary arithmetic decoding;
[0065] According to the prediction mode index information above, a target prediction mode for intra-sub block prediction activated by the current block is determined from the MPM list; wherein the prediction mode index information indicates the index information in the MPM list for the target prediction mode;
[0066] A step of performing a prediction for the current block according to the above target prediction mode; or
[0067] A step in which, if the current block activates general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and if the current block is a luma block, when performing prediction on the current block according to general intra prediction, decoding is performed on the prediction mode index information, wherein all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic decoding;
[0068] According to the prediction mode index information above, the target prediction mode of the general intra prediction activated by the current block from the MPM list is determined; wherein the prediction mode index information indicates the index information of the target prediction mode in the MPM list;
[0069] It includes a step of performing a prediction for the current block according to the above target prediction mode.
[0070] According to one embodiment, a decoding method is provided, and said method,
[0071] If the current block is a luma block, when performing a prediction for the current block according to intra-sub block prediction, decoding is performed on the prediction mode index information, wherein all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic decoding;
[0072] According to the prediction mode index information above, a target prediction mode of intra-sub block prediction activated by the current block is determined from the MPM list; wherein the prediction mode index information indicates the index information of the target prediction mode in the MPM list;
[0073] A step of performing a prediction for the current block according to the above target prediction mode; or
[0074] A step in which, if the current block enables general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and if the current block is a luma block, when performing prediction on the current block according to general intra prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by a single context model, and other bits are obtained by performing bypass-based binary arithmetic decoding;
[0075] According to the prediction mode index information above, the target prediction mode of the general intra prediction activated by the current block from the MPM list is determined; wherein the prediction mode index information indicates the index information of the target prediction mode in the MPM list;
[0076] It includes a step of performing a prediction for the current block according to the above target prediction mode.
[0077] According to one embodiment, a decoding method is provided, and said method,
[0078] A step in which, if the current block activates intra-subblock prediction and the target prediction mode of the intra-subblock prediction exists in the MPM list, and the current block is a luma block, when performing prediction on the current block according to the intra-subblock prediction, decoding is performed on planar instruction information, wherein the planar instruction information indicates whether the target prediction mode of the intra-subblock prediction activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing context-based adaptive binary arithmetic decoding by a first context model;
[0079] If, based on the above planar instruction information, the target prediction mode of the intra-subblock prediction activated by the current block is determined to be a planar prediction mode, a step of performing a prediction for the current block according to the planar prediction mode;
[0080] If, by the above planar instruction information, it is determined that the target prediction mode of the intra-subblock prediction activated by the current block is not a planar prediction mode, the target prediction mode of the intra-subblock prediction activated by the current block is determined from the MPM list according to the prediction mode index information, and the prediction is performed for the current block according to the target prediction mode; or
[0081] If the current block activates general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and if the current block is a luma block, when performing prediction on the current block according to general intra prediction, decoding is performed on planar instruction information, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing context-based adaptive binary arithmetic decoding by a second context model, and the first context model and the second context model are in the same step;
[0082] If, based on the above planar instruction information, the target prediction mode activated by the current block is determined to be a planar prediction mode, a step of performing a prediction for the current block according to the planar prediction mode;
[0083] If, based on the above planar instruction information, it is determined that the target prediction mode activated by the current block is not a planar prediction mode, the method includes the step of determining the target prediction mode activated by the current block from the MPM list according to the prediction mode index information, and performing a prediction for the current block according to the target prediction mode.
[0084] According to one embodiment, a decoding method is provided, and said method,
[0085] A step in which, if the current block activates intra-subblock prediction and the target prediction mode of the intra-subblock prediction exists in the MPM list, and the current block is a luma block, when performing prediction on the current block according to the intra-subblock prediction, decoding is performed on planar instruction information, wherein the planar instruction information indicates whether the target prediction mode of the intra-subblock prediction activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing bypass-based binary arithmetic decoding;
[0086] If, based on the above planar instruction information, the target prediction mode of the intra-subblock prediction activated by the current block is determined to be a planar prediction mode, a step of performing a prediction for the current block according to the planar prediction mode;
[0087] If, by the above planar instruction information, it is determined that the target prediction mode of the intra-subblock prediction activated by the current block is not a planar prediction mode, the target prediction mode of the intra-subblock prediction activated by the current block is determined from the MPM list according to the prediction mode index information, and the prediction is performed for the current block according to the target prediction mode; or
[0088] A step in which, if the current block activates general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, if the current block is a luma block, when performing prediction on the current block according to general intra prediction, decoding is performed on planar instruction information, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing bypass-based binary arithmetic decoding;
[0089] If, based on the above planar instruction information, the target prediction mode activated by the current block is determined to be a planar prediction mode, a step of performing a prediction for the current block according to the planar prediction mode;
[0090] If, based on the planar instruction information, it is determined that the target prediction mode activated by the current block is not a planar prediction mode, the method includes the step of determining the target prediction mode activated by the current block from the MPM list according to the prediction mode index information, and performing a prediction for the current block according to the target prediction mode.
[0091] According to one embodiment, a decoding method is provided, wherein the current block supports a cross-component prediction mode, the current block enables a cross-component prediction mode, and if the current block is a chroma block, the method is
[0092] When performing a prediction for the current block according to a cross-component prediction mode, decoding is performed on the chroma prediction mode index information, wherein the chroma prediction mode index information indicates an index in a candidate prediction mode list corresponding to the target prediction mode of the current block; wherein the first bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by a first context model, and the second bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by a second context model, and the first context model and the second context model are different; and the third and fourth bits of the chroma prediction mode index information are obtained by performing bypass-based binary arithmetic decoding.
[0093] A step of determining the target prediction mode of the current block from the candidate prediction mode list according to the chroma prediction mode index information;
[0094] It includes a step of performing a prediction for the current block according to the above target prediction mode.
[0095] According to one embodiment, a decoding method is provided, wherein the current block supports a cross-component prediction mode, the current block enables a cross-component prediction mode, and if the current block is a chroma block, the method is
[0096] When performing a prediction for the current block according to a cross-component prediction mode, decoding is performed on the chroma prediction mode index information, wherein the chroma prediction mode index information indicates an index in a candidate prediction mode list corresponding to the target prediction mode of the current block; wherein the first bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by a single context model, and the second, third, and fourth bits of the chroma prediction mode index information are obtained by performing bypass-based binary arithmetic decoding;
[0097] A step of determining the target prediction mode of the current block from the candidate prediction mode list according to the chroma prediction mode index information;
[0098] It includes a step of performing a prediction for the current block according to the above target prediction mode.
[0099] According to one embodiment, a coding and decoding method is provided, wherein the current block supports a cross-component prediction mode, the current block enables a cross-component prediction mode, and if the current block is a chroma block, the method is
[0100] When performing a prediction for the current block according to a cross-component prediction mode, decoding is performed on the chroma prediction mode index information, wherein the chroma prediction mode index information indicates an index in a candidate prediction mode list corresponding to the target prediction mode of the current block;
[0101] The method includes the step of determining the target prediction mode of the current block from the list of candidate prediction modes according to the chroma prediction mode index information;
[0102] Here, if the chroma prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode;
[0103] If the above chroma prediction mode index information is 110, the above target prediction mode is a second cross-component prediction mode;
[0104] If the above chroma prediction mode index information is 111, the above target prediction mode is the second cross-component prediction mode;
[0105] If the above chroma prediction mode index information is 11110, the above target prediction mode is a planar prediction mode;
[0106] If the above chroma prediction mode index information is 111110, the above target prediction mode is a vertical prediction mode;
[0107] If the above chroma prediction mode index information is 1111110, the above target prediction mode is a horizontal prediction mode;
[0108] If the above chroma prediction mode index information is 1111111, the above target prediction mode is the DC prediction mode;
[0109] It includes a step of performing a prediction for the current block according to the above target prediction mode.
[0110] According to one embodiment, a decoding method is provided, wherein the current block supports a cross-component prediction mode, the current block enables a cross-component prediction mode, and if the current block is a chroma block, the method is
[0111] When performing a prediction for the current block according to a cross-component prediction mode, decoding is performed on the chroma prediction mode index information, wherein the chroma prediction mode index information indicates an index in a candidate prediction mode list corresponding to the target prediction mode of the current block;
[0112] A step of determining the target prediction mode of the current block from the candidate prediction mode list according to the chroma prediction mode index information;
[0113] Here, if the chroma prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode;
[0114] If the above chroma prediction mode index information is 110, the above target prediction mode is a second cross-component prediction mode;
[0115] If the above chroma prediction mode index information is 111, the above target prediction mode is the second cross-component prediction mode;
[0116] If the above chroma prediction mode index information is 111100, the above target prediction mode is a planar prediction mode;
[0117] If the above chroma prediction mode index information is 111101, the above target prediction mode is a vertical prediction mode;
[0118] If the above chroma prediction mode index information is 111110, the above target prediction mode is a horizontal prediction mode;
[0119] If the above chroma prediction mode index information is 111111, the above target prediction mode is the DC prediction mode;
[0120] It includes a step of performing a prediction for the current block according to the above target prediction mode.
[0121] According to one embodiment, a coding and decoding method is provided, and said method,
[0122] If the luminance and chroma of the current block share a single split tree, and the width and height of the luminance block corresponding to the current block is 64*64 and the size of the chroma block corresponding to the current block is 32*32, the current block includes a step of not supporting a cross-component prediction mode.
[0123] According to one embodiment, a decoding method is provided, and said method,
[0124] If the current block supports an adaptive loop filter ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform context-based adaptive binary arithmetic decoding on the ALF instruction information by a target context model, wherein the ALF instruction information indicates whether the ALF of the current block is enabled, and the target context model is one context model selected from three different context models included in a first set of context models according to whether the ALF of the upper block of the current block is enabled and whether the ALF of the left block of the current block is enabled; or,
[0125] If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a target context model, wherein the target context model is one context model selected from three different context models included in a second context model set according to whether ALF is enabled on the upper block of the current block and whether ALF is enabled on the left block of the current block, and the three context models included in the second context model set and the three context models included in the first context model set include different steps.
[0126] According to one embodiment, a decoding method is provided, and said method,
[0127] If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform context-based adaptive binary arithmetic decoding on ALF instruction information by a target context model, wherein the ALF instruction information indicates whether ALF is enabled for the current block, and the target context model is one context model selected from three different context models included in a first set of context models according to whether ALF is enabled for the upper block of the current block and whether ALF is enabled for the left block of the current block; or,
[0128] If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a target context model, wherein the target context model is one context model selected from three different context models included in a second context model set according to whether ALF is enabled in the upper block of the current block and whether ALF is enabled in the left block of the current block, and the three context models included in the second context model set and the three context models included in the first context model set include the same step.
[0129] According to one embodiment, a decoding method is provided, and said method,
[0130] If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform context-based adaptive binary arithmetic decoding on the ALF instruction information by a first context model, wherein the ALF instruction information indicates whether the current block is ALF enabled; or,
[0131] If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a second context model, wherein the second context model and the first context model include different steps.
[0132] According to one embodiment, a decoding method is provided, and said method,
[0133] If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform context-based adaptive binary arithmetic decoding on ALF instruction information by a target context model, wherein the ALF instruction information indicates whether ALF is enabled for the current block, and the target context model is one context model selected from three different context models included in a first set of context models according to whether ALF is enabled for the upper block of the current block and whether ALF is enabled for the left block of the current block; or,
[0134] If the current block supports ALF and the current block is a CB chroma block, a step of performing context-based adaptive binary arithmetic decoding on ALF instruction information by a first context model before performing filtering processing on the current block according to the ALF mode; or,
[0135] If the current block supports ALF and the current block is a CR chroma block, before performing filtering processing on the current block according to the ALF mode, the method includes the step of performing context-based adaptive binary arithmetic decoding on the ALF instruction information by a second context model, wherein the context model included in the first context model set, the first context model, and the second context model are different context models.
[0136] According to one embodiment, a decoding method is provided, and said method,
[0137] If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform context-based adaptive binary arithmetic decoding on the ALF instruction information by a first context model, wherein the ALF instruction information indicates whether the current block is ALF enabled; or,
[0138] If the current block supports ALF and the current block is a CB chroma block, a step of performing context-based adaptive binary arithmetic decoding on ALF instruction information by a second context model before performing filtering processing on the current block according to the ALF mode; or,
[0139] If the current block supports ALF and the current block is a CR chroma block, before performing filtering processing on the current block according to the ALF mode, the method includes a step of performing context-based adaptive binary arithmetic decoding on the ALF instruction information by a third context model, wherein the first context model, the second context model, and the third context model are different context models.
[0140] According to one embodiment, a decoding method is provided, and said method,
[0141] If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform context-based adaptive binary arithmetic decoding on the ALF instruction information by a first context model, wherein the ALF instruction information indicates whether the current block is ALF enabled; or,
[0142] If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, the method includes a step of performing context-based adaptive binary arithmetic decoding on the ALF instruction information by a second context model, wherein the second context model and the first context model are the same context model.
[0143] According to one embodiment, a decoding method is provided, and said method,
[0144] If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform bypass-based binary arithmetic decoding on the ALF instruction information, wherein the ALF instruction information indicates whether the current block is ALF enabled; or,
[0145] If the current block supports ALF and the current block is a chroma block, the method includes a step of performing bypass-based binary arithmetic decoding on the ALF instruction information before performing filtering processing on the current block according to the ALF mode.
[0146] According to one embodiment, a decoding method is provided, and said method,
[0147] If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform context-based adaptive binary arithmetic decoding on ALF instruction information by a context model, wherein the ALF instruction information indicates whether the current block is ALF enabled; or,
[0148] If the current block supports ALF, the current block enables ALF, and the current block is a chroma block, the method includes a step of performing bypass-based binary arithmetic decoding on the ALF instruction information before performing filtering processing on the current block according to the ALF mode.
[0149] According to one embodiment, a decoding method is provided, and said method,
[0150] If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform bypass-based binary arithmetic decoding on the ALF instruction information, wherein the ALF instruction information indicates whether the current block is ALF enabled; or,
[0151] If the current block supports ALF and the current block is a chroma block, the method includes a step of performing context-based adaptive binary arithmetic decoding on ALF instruction information by a context model before performing filtering processing on the current block according to the ALF mode.
[0152] According to one embodiment, a coding and decoding method is provided, and said method,
[0153] If the width and height of the current block are 32*32, the current block includes a step that does not support a matrix-based intra-prediction mode.
[0154] According to one embodiment, a decoding method is provided, and if the current block supports a matrix-based intra-prediction mode, the method is,
[0155] Before proceeding with prediction for the current block according to a matrix-based intra prediction mode, context-based adaptive binary arithmetic decoding is performed on MIP instruction information by a target context model; wherein the MIP instruction information indicates whether the matrix-based intra prediction mode of the current block is activated, and the target context model is one context model selected from three different context models according to whether the matrix-based intra prediction mode of the upper block of the current block is activated and whether the matrix-based intra prediction mode of the left block of the current block is activated;
[0156] If it is determined that the current block activates a matrix-based intra-prediction mode according to the above MIP instruction information, the method includes the step of performing a prediction for the current block according to the matrix-based intra-prediction mode.
[0157] According to one embodiment, a decoding method is provided, and if the current block supports a matrix-based intra-prediction mode, the method is,
[0158] Before performing a prediction for the current block according to a matrix-based intra prediction mode, context-based adaptive binary arithmetic decoding is performed on MIP instruction information by a target context model; wherein the MIP instruction information indicates whether the matrix-based intra prediction mode of the current block is activated, and the target context model is one context model selected from two different context models depending on whether the current block satisfies a preset size condition.
[0159] If it is determined that the current block activates a matrix-based intra-prediction mode according to the above MIP instruction information, the method includes the step of performing a prediction for the current block according to the matrix-based intra-prediction mode.
[0160] According to one embodiment, a decoding method is provided, and if the current block supports a matrix-based intra-prediction mode, the method is,
[0161] Before proceeding with a prediction for the current block according to a matrix-based intra prediction mode, a context-based adaptive binary arithmetic decoding is performed on the MIP instruction information by the same context model, wherein the MIP instruction information indicates whether the matrix-based intra prediction mode of the current block is activated;
[0162] If it is determined that the current block activates a matrix-based intra-prediction mode according to the above MIP instruction information, the method includes the step of performing a prediction for the current block according to the matrix-based intra-prediction mode.
[0163] According to one embodiment, a decoding method is provided, and if the current block supports a matrix-based intra-prediction mode, the method is,
[0164] Before proceeding with prediction for the current block according to a matrix-based intra prediction mode, a bypass-based binary arithmetic decoding is performed on the MIP instruction information, wherein the MIP instruction information indicates whether the matrix-based intra prediction mode of the current block is activated;
[0165] If it is determined that the current block activates a matrix-based intra-prediction mode according to the above MIP instruction information, the method includes the step of performing a prediction for the current block according to the matrix-based intra-prediction mode.
[0166] According to one embodiment, a decoding method is provided, and said method,
[0167] A step of decoding the first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode;
[0168] Based on the above first BDPCM instruction information, decoding is performed for the current processing unit.
[0169] In one possible embodiment of the present invention, the first BDPCM instruction information exists in a sequence parameter set, an image parameter set, a slice level, or a Tile level.
[0170] According to one embodiment, a coding and decoding method is provided, and said method,
[0171] A step of performing coding or decoding on the second BDPCM instruction information, wherein the second BDPCM instruction information indicates the size range of a processing unit that supports BDPCM mode;
[0172] It includes a step of determining whether the current block can be BDPCM coded or decoded based on the second BDPCM instruction information and the size of the current block.
[0173] In one possible embodiment of the present invention, the second BDPCM instruction information exists in a sequence parameter set, an image parameter set, a slice level, or a Tile level.
[0174] According to one embodiment, a decoding method is provided, and if the current block supports BDPCM mode, the method is,
[0175] A step of performing context-based adaptive binary arithmetic decoding on third BDPCM instruction information by a single context model, wherein the third BDPCM instruction information indicates whether the BDPCM mode of the current block is activated;
[0176] If the third BDPCM instruction information indicates that the current block has activated the BDPCM mode, a bypass-based binary arithmetic decoding is performed on the fourth BDPCM instruction information, wherein the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode;
[0177] It includes a step of performing BDPCM processing on the current block according to the prediction direction indicated by the fourth BDPCM instruction information.
[0178] According to one embodiment, a decoding method is provided, and if the current block supports BDPCM mode, the method is,
[0179] A step of performing bypass-based binary arithmetic decoding on the third BDPCM instruction information, wherein the third BDPCM instruction information indicates whether the BDPCM mode of the current block is activated;
[0180] If the third BDPCM instruction information indicates that the current block has activated the BDPCM mode, a bypass-based binary arithmetic decoding is performed on the fourth BDPCM instruction information, wherein the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode;
[0181] It includes a step of performing BDPCM processing on the current block according to the prediction direction indicated by the fourth BDPCM instruction information.
[0182] According to one embodiment, a coding and decoding method is provided, and said method,
[0183] When the current block activates intra-subblock prediction, and when determining the progress of coding or decoding of CBF instruction information, the target context model performs context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the CBF instruction information, wherein the CBF instruction information indicates whether the transformation block of the current block has a non-zero transformation coefficient, and the target context model is one context model selected from two different context models included in a first context model set according to whether the preceding transformation block of the current block has a non-zero transformation coefficient; or,
[0184] When the current block activates general intra prediction or BDPCM mode, and determines the progress of coding or decoding of CBF instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding of CBF instruction information is performed by the target context model, wherein the target context model is one context model selected from two different context models included in the second context model set according to the partition depth of the transformation block of the current block, and the two context models included in the second context model set and the two context models included in the first context model set include different steps.
[0185] According to one embodiment, a coding and decoding method is provided, and said method,
[0186] When the current block activates intra-subblock prediction, general intra-prediction, or BDPCM mode, and determines the progress of coding or decoding of CBF instruction information, the target context model performs context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the CBF instruction information, wherein the CBF instruction information indicates whether the transformation block of the current block has a non-zero transformation coefficient, and the target context model is one context model selected from two different context models according to the partitioning depth of the transformation block of the current block.
[0187] According to one embodiment, a coding and decoding method is provided, and said method,
[0188] When the current block activates intra-subblock prediction or general intra-prediction, and when determining the progress of coding or decoding of CBF instruction information, the target context model performs context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the CBF instruction information, wherein the CBF instruction information indicates whether the transformation block of the current block has a non-zero transformation coefficient, and the target context model is one context model selected from two different context models included in a first context model set according to the partitioning depth of the transformation block of the current block; or,
[0189] When the current block activates BDPCM mode, if it determines the progress of coding or decoding of CBF instruction information, it performs context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the CBF instruction information by a target context model, wherein the target context model is one of the context models of the first set of context models.
[0190] According to one embodiment, a decoding method is provided, and said method,
[0191] A step of decoding JCCR instruction information, wherein the JCCR instruction information indicates whether the current processing unit supports JCCR mode;
[0192] Based on the above JCCR instruction information, it is determined that the current block supports JCCR mode, and when the current block activates JCCR mode, decoding is performed on the current block according to the correlation between the blue chroma CB component and the red chroma CR component of the current block to obtain the chroma residual coefficient of the current block.
[0193] In one possible embodiment of the present invention, the JCCR instruction information exists in a sequence parameter set, an image parameter set, a slice level, or a Tile level.
[0194] According to one embodiment, a coding and decoding device is provided, and said device
[0195] processor;
[0196] It includes memory where instructions executable by the processor are stored, and
[0197] Here, the processor performs any one of the above coding and decoding methods or the decoding method.
[0198] According to one embodiment, a computer-readable storage medium is provided, said computer-readable storage medium has instructions stored therein, and when said instructions are executed by a processor, any one of the coding and decoding methods or the decoding method is performed.
[0199] According to one embodiment, a computer program product including instructions is provided, and when the product is executed on a computer, the computer performs any one of the above coding and decoding methods or the decoding method. Effects of the invention
[0200] The means for solving the problem provided in the embodiment of the present invention has the following beneficial effects.
[0201] In an embodiment of the present invention, when determining the progress of coding or decoding of the first ISP instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding is performed on the first ISP instruction information by a single context model, and when determining the progress of coding or decoding of the second ISP instruction information, bypass-based binary arithmetic coding or decoding is performed on the second ISP instruction information, thereby reducing the number of context models required in the coding and decoding process, the complexity of the coding and decoding process and memory overhead can be reduced. Brief explanation of the drawing
[0202] To more clearly explain the technical solution means of the embodiments of the present invention, the drawings necessary for describing the embodiments are briefly introduced below. The drawings described below are merely some embodiments of the present invention, and it is obvious that a person skilled in the art can obtain other drawings based on these drawings of the embodiments of the present invention without creative labor.
[0203] Figure 1 is a schematic diagram of the structure of a coding and decoding system provided in an embodiment of the present invention.
[0204] FIG. 2 is a schematic diagram of the coding and decoding flow provided in an embodiment of the present invention.
[0205] FIG. 3 is an illustrative diagram of a direction corresponding to an intra-prediction mode provided in an embodiment of the present invention.
[0206] FIG. 4 is an example of a direction corresponding to an angle mode provided in an embodiment of the present invention.
[0207] FIG. 5 is a schematic diagram of the division of an image block provided in an embodiment of the present invention.
[0208] FIG. 6 is a flowchart of a coding method provided in an embodiment of the present invention.
[0209] FIG. 7 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0210] FIG. 8 is a flowchart of a coding method provided in an embodiment of the present invention.
[0211] FIG. 9 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0212] FIG. 10 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0213] FIG. 11 is a flowchart of a coding method provided in an embodiment of the present invention.
[0214] FIG. 12 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0215] FIG. 13 is a flowchart of a coding method provided in an embodiment of the present invention.
[0216] FIG. 14 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0217] FIG. 15 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0218] FIG. 16 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0219] FIG. 17 is a flowchart of a coding method provided in an embodiment of the present invention.
[0220] FIG. 18 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0221] FIG. 19 is a flowchart of a coding method provided in an embodiment of the present invention.
[0222] FIG. 20 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0223] FIG. 21 is a flowchart of a coding method provided in an embodiment of the present invention.
[0224] FIG. 22 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0225] FIG. 23 is a flowchart of a coding method provided in an embodiment of the present invention.
[0226] FIG. 24 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0227] FIG. 25 is a flowchart of a coding method provided in an embodiment of the present invention.
[0228] FIG. 26 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0229] FIG. 27 is a flowchart of a coding method provided in an embodiment of the present invention.
[0230] FIG. 28 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0231] FIG. 29 is a flowchart of a coding method provided in an embodiment of the present invention.
[0232] FIG. 30 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0233] FIG. 31 is a flowchart of a coding method provided in an embodiment of the present invention.
[0234] FIG. 32 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0235] FIG. 33 is a flowchart of a coding method provided in an embodiment of the present invention.
[0236] FIG. 34 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0237] FIG. 35 is a flowchart of a coding method provided in an embodiment of the present invention.
[0238] FIG. 36 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0239] FIG. 37 is a flowchart of a coding method provided in an embodiment of the present invention.
[0240] FIG. 38 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0241] FIG. 39 is a flowchart of a coding method provided in an embodiment of the present invention.
[0242] FIG. 40 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0243] FIG. 41 is a flowchart of a coding method provided in an embodiment of the present invention.
[0244] FIG. 42 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0245] FIG. 43 is a flowchart of the coding and decoding method provided in the embodiment.
[0246] FIG. 44 is a flowchart of a coding method provided in an embodiment of the present invention.
[0247] FIG. 45 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0248] FIG. 46 is a flowchart of a coding method provided in an embodiment of the present invention.
[0249] FIG. 47 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0250] FIG. 48 is a flowchart of a coding method provided in an embodiment of the present invention.
[0251] FIG. 49 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0252] FIG. 50 is a flowchart of a coding method provided in an embodiment of the present invention.
[0253] FIG. 51 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0254] FIG. 52 is a flowchart of a coding method provided in an embodiment of the present invention.
[0255] FIG. 53 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0256] FIG. 54 is a flowchart of a coding method provided in an embodiment of the present invention.
[0257] FIG. 55 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0258] FIG. 56 is a flowchart of a coding method provided in an embodiment of the present invention.
[0259] FIG. 57 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0260] FIG. 58 is a flowchart of a coding method provided in an embodiment of the present invention.
[0261] FIG. 59 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0262] FIG. 60 is a flowchart of a coding method provided in an embodiment of the present invention.
[0263] FIG. 61 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0264] FIG. 62 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0265] FIG. 63 is a flowchart of a code decoding method provided in an embodiment of the present invention.
[0266] FIG. 64 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0267] FIG. 65 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0268] FIG. 66 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0269] FIG. 67 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0270] FIG. 68 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0271] FIG. 69 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0272] FIG. 70 is a flowchart of a coding and decoding method provided in an embodiment of the present invention.
[0273] FIG. 71 is a flowchart of a coding method provided in an embodiment of the present invention.
[0274] FIG. 72 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0275] FIG. 73 is a flowchart of a coding method provided in an embodiment of the present invention.
[0276] FIG. 74 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0277] FIG. 75 is a flowchart of a coding method provided in an embodiment of the present invention.
[0278] FIG. 76 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0279] FIG. 77 is a flowchart of a coding method provided in an embodiment of the present invention.
[0280] FIG. 78 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0281] FIG. 79 is a flowchart of a coding method provided in an embodiment of the present invention.
[0282] FIG. 80 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0283] FIG. 81 is a flowchart of a coding method provided in an embodiment of the present invention.
[0284] FIG. 82 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0285] FIG. 83 is a flowchart of a coding method provided in an embodiment of the present invention.
[0286] FIG. 84 is a flowchart of a decoding method provided in an embodiment of the present invention.
[0287] FIG. 85 is a flowchart of a coding method provided in an embodiment of the present invention.
[0288] FIG. 86 is a flowchart of a coding method provided in an embodiment of the present invention.
[0289] FIG. 87 is a schematic diagram of the structure of a coding unit provided in an embodiment of the present invention.
[0290] FIG. 88 is a schematic diagram of the structure of a decoding unit provided in an embodiment of the present invention. Specific details for implementing the invention
[0291] In order to make the purpose, technical solution, and advantages of the present invention clearer, embodiments of the present invention will be described in more detail below with reference to the attached drawings.
[0292] Before describing the embodiments of the present invention in detail, the application situations of the embodiments of the present invention are first described.
[0293] FIG. 1 is a schematic diagram of the structure of a coding and decoding system provided in an embodiment of the present invention. As shown in FIG. 1, the coding and decoding system includes a coder (01), a decoder (02), a storage device (03), and a link (04). The coder (01) can communicate with the storage device (03), and the coder (01) can also communicate with the decoder (02) through the link (04). The decoder (02) can also communicate with the storage device (03).
[0294] The coder (01) acquires a data source and performs coding on the data source, and transmits the bitrate after coding to the storage device (03) for storage or transmits it to the decoder (02) via a direct link (04). The decoder (02) acquires the bitrate from the storage device (03) and performs decoding to acquire the data source, or receives the bitrate transmitted by the coder (01) via the link (04) and performs decoding to acquire the data source. Here, the data source may be a captured image or a captured video. Both the coder (01) and the decoder (02) may be separate electronic devices. The storage device (03) may be any one of various distributed or local access type data storage media. For example, it may be a hard disk drive, a Blu-ray disc, a read-only disc, a flash memory, or other digital storage media suitable for storing coded data. The link (04) may include at least one communication medium, and the at least one communication medium may include a wireless and / or wired communication medium such as an RF (Radio Frequency) spectrum or one or more physical transmission lines.
[0295] Referring to FIG. 2, FIG. 2 is a schematic diagram of the flow of coding and decoding illustrated according to an exemplary embodiment. Coding includes several processes of prediction, transformation, quantization, and entropy coding, and decoding includes several processes of decoding, inverse transformation, inverse quantization, and prediction. Currently, coding and decoding are generally performed on current syntax elements using binary arithmetic coding and decoding techniques. Prediction during coding and decoding generally includes intra prediction, multi-reference line prediction, cross-component prediction, and matrix-based intra prediction. In addition, coding and decoding may utilize intra-luminance candidate lists, adaptive loop filters, adaptive motion vector resolution coding and decoding techniques, and BD (Block-based quantized residual domain Differential) PCM (Pulse Code Modulation) coding and decoding techniques. These prediction methods and coding and decoding techniques are briefly introduced below.
[0296] Binary arithmetic coding
[0297] Binary arithmetic coding refers to the process of obtaining a final bitrate by performing arithmetic coding on each bin (bit) of the current syntax elements according to their probabilistic model parameters after binarization. This includes two coding methods: context-based adaptive arithmetic coding and bypass-based binary arithmetic coding.
[0298] CABAC (Context-based Adaptive Binary Arithmetic Coding) is a method obtained by combining adaptive binary arithmetic coding with a single well-designed context model. In coding, the coding of each symbol is related to the result of the previous coding, and a codeword is adaptively assigned to each symbol based on the statistical characteristics of the symbol stream. This is applied particularly to symbols with unequal probabilities of occurrence, allowing for further bitrate compression. The sequence of bits for each syntax element enters the context modeler, and the coder assigns an appropriate probability model to each input bit based on previously coded syntax elements or bits; this process is called context modeling. The bits and the assigned probability models are sent together to the binary arithmetic coder to proceed with coding. The coder must update the context model according to the bit values, and this is adaptive coding.
[0299] Bypass-based Binary Arithmetic Coding is a binary arithmetic coding mode based on equal probability (also known as bypass coding mode). Compared to CABAC, Bypass does not require a probability update process or adaptive updates to the probability state, and proceeds with coding using fixed probabilities where the probabilities of 0 and 1 are each 50%. This coding method is simpler, has lower coding complexity, consumes less memory, and is applied to equal probability symbols.
[0300] Intra prediction
[0301] Intra prediction achieves the purpose of eliminating redundancy in image space regions by utilizing the association of image space regions and predicting the pixels of the current image block using pixels of already coded reconstructed adjacent blocks surrounding the current image block. Various intra prediction modes are defined in intra prediction, and each intra prediction mode corresponds to a single texture orientation (excluding DC mode). For example, if the image texture is arranged horizontally, selecting the horizontal prediction mode allows for better prediction of image information. For instance, in HEVC (High Efficiency Video Coding), the luma component can support five sizes of prediction units (image blocks or sub-blocks), and each size of prediction unit corresponds to 35 intra prediction modes, including planar mode, DC mode, and 33 angle modes, as shown in Table 1. Mode number Intra-prediction mode 0 Intra_planar 1 Intra_DC 2...34 Intra_angular2… Intra_angular34
[0302] The prediction directions corresponding to the various intra prediction modes mentioned above are as shown in FIG. 3. The planar mode is applied to an area where pixel values change slowly, and during implementation, filtering processing can be performed using two linear filters in the horizontal and vertical directions, and the average value of both is taken as the prediction value of the current image block. The DC mode is applied to a large flat area, and the average pixel value of already coded reconstructed adjacent blocks around the current image block is taken as the prediction value of the current image block. As an example, the planar mode and the DC mode may also be referred to as non-angular modes. Referring further to FIG. 3, in the angular mode, mode number 26 and mode number 10 correspond to the intra prediction mode and point to the vertical and horizontal directions, respectively. In one possible embodiment of the present invention, the intra prediction mode corresponding to the mode number adjacent to mode number 26 is collectively referred to as the vertical prediction mode, and the intra prediction mode corresponding to the mode number adjacent to mode number 10 is collectively referred to as the horizontal prediction mode. For example, the vertical prediction mode may include mode numbers 2 through 18, and the horizontal prediction mode may include mode numbers 19 through 34. In addition, the angle mode in the next-generation coding and decoding standard VVC (Versatile Video Coding) is further subdivided as shown in FIG. 4.
[0303] General intra prediction
[0304] The method used for general intra prediction predicts the current block using surrounding pixels, and what was removed is spatial domain redundancy. The target prediction mode used in general intra prediction mode may come from the MPM (Most Probable Mode) list or from a non-MPM list.
[0305] ISP (Intra Sub-block Partitions)
[0306] In ISP technology, the intra-prediction method involves dividing an image block into multiple sub-blocks for prediction, and the division methods supported by image blocks that support ISP technology include horizontal and vertical division. When the current block has ISP mode enabled, if the block size defaults to supporting only one division method, the decoding unit performs division according to the default division direction and carries out processing such as prediction, inverse transformation, and inverse quantization. If the current block size supports two division methods, the division direction must be further interpreted, and the block is divided according to the determined direction, followed by processing such as prediction, inverse transformation, and inverse quantization.
[0307] MRL (Multi-Reference Line Prediction)
[0308] The method used in MRL technology performs prediction based on the reference pixels of the current block, and the reference pixels exist in adjacent rows of the current block. For example, the reference pixels may exist in Reference line 0 (line 0), Reference line 1 (line 1), Reference line 2 (line 2), and Reference line 3 (line 3) as illustrated in FIG. 5. Here, line 0 is a line adjacent to the current block boundary, line 1 is a line adjacent to the current block boundary next, line 2 is a line adjacent to line 1, and line 3 is a line adjacent to line 2. In the current next-generation coding and decoding standard VVC, the reference pixels existing in Reference line 0, Reference line 1, Reference line 3, and Reference line 2 are not used. Here, the line may be a row above the current block or a column to the left of the current block.
[0309] MPM
[0310] In HEV, the number of MPMs is 3, and in current VVC, the number of MPMs is 6. In ISP and MRL modes, the intra prediction mode must come from an MPM, and in general intra prediction, the intra prediction mode may come from an MPM or from a non-MPM.
[0311] CCLM (Cross-Component Linear Model Prediction)
[0312] The method used in CCLM technology is a technique that uses a linear prediction model and obtains chroma component prediction pixel values using linear equations through luminance component reconstruction pixel values, which can eliminate redundancy between image components and further improve coding performance. Currently, there are three cross-component prediction modes, namely MDLM_L mode, MDLM_T mode, and DM mode. MDLM-L is a cross-component prediction mode that obtains linear parameters using only left-side template information, MDLM-T is a cross-component prediction mode that derives linear model parameters using only upper-side template information, and DM is a prediction mode where the chroma used is the same as the luminance.
[0313] Adaptive loop filtering
[0314] The Adaptive Loop Filter (ALF) performs filtering by selecting one filter from fixed filters based on its own gradient direction, and a CTU-level flag indicates whether the block has enabled ALF filtering, allowing for separate control of chroma and luminance.
[0315] AMVR (adaptive motion vector resolution)
[0316] AMVR can use different resolutions when performing motion vector difference coding, and the resolution used can be an integer pixel resolution such as 4 pixels, or a non-integer pixel resolution such as 1 / 16 pixels. The above technique can be used for motion vector data coding in general intra prediction and can also be used for motion vector data coding in affine prediction mode.
[0317] MIP (Matrix Based Intra Prediction)
[0318] Matrix-based intra-prediction technology determines the predicted pixel value of the current block by sending the adjacent pixels of the top and left sides of the current block as reference pixels to a matrix vector multiplier and adding one bias value.
[0319] BDPCM
[0320] BDPCM is similar to vertical and horizontal prediction in that, when predicting pixels in the prediction phase, it directly duplicates the pixel value of the corresponding reference pixel in the vertical direction or duplicates the pixel value of the corresponding reference pixel in the horizontal direction. Subsequently, quantization is performed on the residual values of the predicted pixel and the original pixel, and differential coding is performed on the residuals after quantization.
[0321] For example, if the current block size is M*N, indicates the predicted residual, is the predicted residual It refers to the post-quantization residual obtained by performing quantization on . Subsequently, the post-quantization residual It refers to the post-quantization residual obtained by performing quantization on . Subsequently, the post-quantization residual Performed differential coding on and the differential coding result Gets.
[0322] In vertical RDPCM mode,
[0323] In horizontal RDPCM mode,
[0324] finally Put it into the bitrate.
[0325] The decoding unit obtains residual data after quantization through a reverse accumulation process.
[0326] In the case of vertical prediction,
[0327] In the case of horizontal forecasting, Add to obtain the reconstructed pixel value.
[0329] JCCR (Joint Coding of Chrominance Residuals)
[0330] JCCR is a combined coding method for the CB (blue chroma) component and the CR (red chroma) component. By observing the distribution of chroma residuals, it is easy to discover that CB and CR always show a negative correlation tendency. Therefore, JCCR utilizes this phenomenon to propose a combined coding method for CB and CR, for example, by coding (CB-CR) / 2, that is, coding the average value of the CB and CR components.
[0331] In related technologies, in different prediction modes or coding and decoding technologies, the decoding unit transmits different syntax elements to the coding unit, and there are many context models required for the transmission of syntax elements, resulting in complex coding and decoding processes and high memory overhead. Taking this into account, the present invention provides a coding and decoding method capable of reducing the complexity of the coding and decoding process and memory overhead by reducing the number of required context models. Below, for the aforementioned prediction modes and coding and decoding technologies, the coding and decoding method of an embodiment of the present invention is introduced for each.
[0332] ISP mode
[0333] In ISP mode, the syntax elements to be transmitted between the decoding unit and the coding unit may include first ISP instruction information and second ISP instruction information, the first ISP instruction information indicates whether the intra-subblock prediction mode is enabled, and the second ISP instruction information indicates the subblock partitioning method of the intra-subblock prediction mode. For example, the first instruction information is intra_subpartitions_mode_flag and the second instruction information is intra_subpartitions_split_flag.
[0334] In addition, when determining whether to proceed with coding or decoding of the first ISP instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding for the first ISP instruction information must be performed by one context model; and when determining whether to proceed with coding or decoding of the second ISP instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding for the second ISP instruction information must be performed by another different context model. That is, coding and decoding for the first ISP instruction information and the second ISP instruction information must be performed using two context models, as shown in Table 2 below. Syntax element Bin Idx (bit index) 0 1 2 3 4 5 intra_subpartitions_mode_flag 0 na na na na na intra_subpartitions_split_flag 0 na na na na na
[0335] ISP mode's First embodiment
[0336] FIG. 6 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 6, the method includes the following steps.
[0337] Step 601: When determining whether to proceed with coding the first ISP instruction information, context-based adaptive binary arithmetic coding is performed on the first ISP instruction information by a context model, and the first ISP instruction information indicates whether to activate the intra-subblock prediction mode.
[0338] In one example, if the current block satisfies the condition that it supports sub-block partitioning technology, the current block can use sub-block partitioning technology, and the coding unit determines whether to finally use sub-block partitioning technology through Rate Distortion Optimization (RDO), proceeds with coding of the first ISP instruction information, and indicates whether the intra-sub-block prediction mode of the current block is activated through the first ISP instruction information. Here, the condition that it supports sub-block partitioning technology includes the condition that the current block is a luma block, the condition that the current block does not activate multi-reference line prediction mode, and the condition that the size of the current block meets a predetermined limit condition. Of course, the condition that it supports sub-block partitioning technology is not limited to the above three conditions, but may include other conditions.
[0339] For example, the first ISP instruction is intra_subpartitions_mode_flag, which is a flag indicating whether the intra-subpartitions_mode of the current block is enabled. If intra_subpartitions_mode_flag is 0, it means that the current block is not enabled in intra-subpartitions_mode, and if intra_subpartitions_mode_flag is 1, it means that the current block is enabled in intra-subpartitions_mode.
[0340] Step 602: When determining whether to proceed with coding the second ISP instruction information, perform bypass-based binary arithmetic coding for the second ISP instruction information, and the second ISP instruction information instructs a sub-block partitioning method of the intra-sub-block prediction mode.
[0341] Here, the sub-block partitioning method includes a horizontal partitioning direction and a vertical partitioning direction. If the current block supports two partitioning directions, the partitioning direction used must be determined, and the coding of the second ISP instruction information is continued according to the partitioning direction used. If the current block supports only one partitioning direction, there is no need to continue the coding of the second ISP instruction information.
[0342] Here, the second ISP indication information may be intra_subpartitions_split_flag, which is a flag indicating the sub-block splitting method of the ISP mode of the current block. For example, if intra_subpartitions_split_flag is 0, it indicates that the sub-block splitting method of the ISP mode of the current block is horizontal splitting, and if intra_subpartitions_split_flag is 1, it indicates that the sub-block splitting method of the ISP mode of the current block is vertical splitting.
[0343] In one example, the coding method of the syntax elements in ISP mode is as shown in Table 3 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_subpartitions_mode_flag 0 na na na na na intra_subpartitions_split_flag Bypass na na na na na
[0344] In other words, by modifying the coding method of the second ISP instruction information among the related technologies and replacing the complex CABAC coding method with a bypass coding method, memory overhead is reduced and coding complexity is lowered. Furthermore, in terms of coding performance, performance is maintained with almost no change.
[0345] FIG. 7 is a flowchart of a decoding method provided in an embodiment of the present invention, and the method is applied to a decoding unit and is a decoding method corresponding to the coding method provided in the embodiment of FIG. 6, and as shown in FIG. 7, the method includes the following steps.
[0346] Step 701: When determining whether to proceed with decoding the first ISP instruction information, context-based adaptive binary arithmetic decoding is performed on the first ISP instruction information by a context model, and the first ISP instruction information indicates whether to activate the intra-subblock prediction mode.
[0347] In one example, a code stream of the current block is first received, and if the current block satisfies the interpretation conditions, decoding is performed on the first ISP instruction information in the code stream to determine whether the intra-subblock prediction mode of the current block is activated. Here, the interpretation conditions include the condition that the current block is a luma block, the condition that the current block does not activate the multi-reference line prediction mode, and the condition that the size of the current block meets a predetermined limit condition. Of course, the conditions supporting the subblock partitioning technique are not limited to the above three conditions, but may include other conditions.
[0348] For example, the first ISP indicator is intra_subpartitions_mode_flag. If intra_subpartitions_mode_flag is 0, it means that the current block has not enabled intra-subpartitions prediction mode, and if intra_subpartitions_mode_flag is 1, it means that the current block has enabled intra-subpartitions prediction mode.
[0349] Step 702: When determining whether to proceed with decoding the second ISP instruction information, perform bypass-based binary arithmetic decoding on the second ISP instruction information, and the second ISP instruction information indicates a sub-block partitioning method of the intra-sub-block prediction mode.
[0350] For example, if the first ISP instruction information indicates that the current block has activated the intra-subblock prediction mode and the current block supports two division directions, it is determined that decoding of the second ISP instruction information must be performed. If the first ISP instruction information indicates that the current block has not activated the intra-subblock prediction mode, or if the first ISP instruction information indicates that the current block has activated the intra-subblock prediction mode and the current block supports only one division direction, it is determined that decoding of the second ISP instruction information is not necessary.
[0351] For example, if intra_subpartitions_mode_flag is 1 and the current block supports two split directions, the split direction flag intra_subpartitions_split_flag must be interpreted. If intra_subpartitions_mode_flag is 0, or if intra_subpartitions_mode_flag is 1 but the current block supports only one fixed split direction, there is no need to interpret the flag indicating the split direction.
[0352] Based on the two preceding ISP instruction information, the decoding unit determines whether the current block is in ISP mode and the corresponding splitting direction, performs a prediction on the current block based on the determined splitting direction, obtains a predicted value of the current block, and uses it in the subsequent reconstruction process.
[0353] Second embodiment of ISP mode
[0354] FIG. 8 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 8, the method includes the following steps.
[0355] Step 801: When determining whether to proceed with coding of the first ISP instruction information, bypass-based binary arithmetic coding is performed on the first ISP instruction information, and the first ISP instruction information indicates whether to activate the intra-subblock prediction mode.
[0356] In one example, if the current block satisfies the condition that it supports sub-block partitioning technology, the current block can use sub-block partitioning technology, and the coding unit determines whether to finally use sub-block partitioning technology through RDO, proceeds with coding of the first ISP instruction information, and indicates whether the intra-sub-block prediction mode of the current block is activated through the first ISP instruction information. Here, the condition that it supports sub-block partitioning technology includes the condition that the current block is a luma block, the condition that the current block does not activate multi-reference line prediction mode, and the condition that the size of the current block meets a predetermined limit condition. Of course, the condition that it supports sub-block partitioning technology is not limited to the above three conditions, but may include other conditions.
[0357] For example, the first ISP instruction is intra_subpartitions_mode_flag, which is a flag indicating whether the intra-subpartitions_mode of the current block is enabled. If intra_subpartitions_mode_flag is 0, it means that the current block is not enabled in intra-subpartitions_mode, and if intra_subpartitions_mode_flag is 1, it means that the current block is enabled in intra-subpartitions_mode.
[0358] Step 802: When determining whether to proceed with coding the second ISP instruction information, perform bypass-based binary arithmetic coding for the second ISP instruction information, and the second ISP instruction information indicates a sub-block partitioning method of the intra-sub-block prediction mode.
[0359] Here, the sub-block partitioning method includes a horizontal partitioning direction and a vertical partitioning direction. If the current block supports two partitioning directions, the partitioning direction used must be determined, and the coding of the second ISP instruction information is continued according to the partitioning direction used. If the current block supports only one partitioning direction, there is no need to continue the coding of the second ISP instruction information.
[0360] Here, the second ISP indication information may be intra_subpartitions_split_flag, which is a flag indicating the sub-block splitting method of the ISP mode of the current block. For example, if intra_subpartitions_split_flag is 0, it indicates that the sub-block splitting method of the ISP mode of the current block is horizontal splitting, and if intra_subpartitions_split_flag is 1, it indicates that the sub-block splitting method of the ISP mode of the current block is vertical splitting.
[0361] In one example, the coding method of the syntax elements in ISP mode is as shown in Table 4 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_subpartitions_mode_flag Bypass na na na na na intra_subpartitions_split_flag Bypass na na na na na
[0362] In other words, by modifying the coding methods of both the intra_subpartitions_mode_flag and intra_subpartitions_split_flag flags within the related technologies and replacing the complex CABAC coding method with a bypass coding method, memory overhead is reduced and coding complexity is lowered. Furthermore, in terms of coding performance, performance remains virtually unchanged.
[0363] FIG. 9 is a flowchart of a decoding method provided in an embodiment of the present invention, and the method is applied to a decoding unit and is a decoding method corresponding to the coding method provided in the embodiment of FIG. 8, and as shown in FIG. 9, the method includes the following steps.
[0364] Step 901: When determining whether to proceed with decoding the first ISP instruction information, perform bypass-based binary arithmetic decoding on the first ISP instruction information, and the first ISP instruction information indicates whether to enable the intra-subblock prediction mode.
[0365] In one example, a code stream of the current block is first received, and if the current block satisfies the interpretation conditions, decoding is performed on the first ISP instruction information in the code stream to determine whether the intra-subblock prediction mode of the current block is activated. Here, the interpretation conditions include the condition that the current block is a luma block, the condition that the current block does not activate the multi-reference line prediction mode, and the condition that the size of the current block meets a predetermined limit condition. Of course, the conditions supporting the subblock partitioning technique are not limited to the above three conditions, but may include other conditions.
[0366] For example, the first ISP indicator is intra_subpartitions_mode_flag. If intra_subpartitions_mode_flag is 0, it means that the current block has not enabled intra-subpartitions prediction mode, and if intra_subpartitions_mode_flag is 1, it means that the current block has enabled intra-subpartitions prediction mode.
[0367] Step 902: When determining whether to proceed with decoding the second ISP instruction information, perform bypass-based binary arithmetic decoding on the second ISP instruction information, and the second ISP instruction information indicates a sub-block partitioning method of the intra-sub-block prediction mode.
[0368] For example, if the first ISP instruction information indicates that the current block has activated the intra-subblock prediction mode and the current block supports two division directions, it is determined that decoding of the second ISP instruction information must be performed. If the first ISP instruction information indicates that the current block has not activated the intra-subblock prediction mode, or if the first ISP instruction information indicates that the current block has activated the intra-subblock prediction mode and the current block supports only one division direction, it is determined that decoding of the second ISP instruction information is not necessary.
[0369] For example, if intra_subpartitions_mode_flag is 1 and the current block supports two split directions, the split direction flag intra_subpartitions_split_flag must be interpreted. If intra_subpartitions_mode_flag is 0, or if intra_subpartitions_mode_flag is 1 but the current block supports only one fixed split direction, there is no need to interpret the flag indicating the split direction.
[0370] Based on the two preceding ISP instruction information, the decoding unit determines whether the current block is in ISP mode and the corresponding splitting direction, performs a prediction on the current block based on the determined splitting direction, obtains a predicted value of the current block, and uses it in the subsequent reconstruction process.
[0371] MRL mode
[0372] MRL mode's First embodiment
[0373] FIG. 10 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to a coding unit or a decoding unit, and as shown in FIG. 10, the method includes the following steps.
[0374] Step 1001: If the width and height of the current block are M*N, and M is less than 64 and N is less than 64, the current block does not support multi-reference line prediction mode.
[0375] For example, if the width and height of the current block are 4*4, the current block does not support multi-reference line prediction mode.
[0376] MRL mode's Second embodiment
[0377] In MRL mode, the syntax element to be transmitted between the decoding and coding layers may include reference line indicator information, which indicates the index information of the target reference line used when performing prediction of the current block by the multi-reference line prediction mode. For example, the reference line indicator information is intra_luma_ref_idx.
[0378] In the relevant technology, it is determined that the current block supports a multi-reference line prediction mode, the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3, and the reference line instruction information corresponding to the multi-reference line prediction mode occupies up to 2 bits, and these 2 bits must be coded and decoded using 2 different context models as shown in Tables 5 and 6 below. First bin (bit) second bin (bit) MultiRefline Idx(0), i.e., the first context model MultiRefline Idx(1), i.e., the second context model
[0379] Here, the first bin points to the first bit of the reference line instruction information and must perform coding and decoding by the first context model, the second bin points to the second bit of the reference line instruction information and must perform coding and decoding by the second context model, and the first context model and the second context model are different. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_ref_idx[ ][ ] 0 1 na na na na
[0380] In addition, the correspondence between the index information of the target reference line and the line number of the target reference line is as shown in Table 7. intra_luma_ref_idx[x0][y0] IntraLumaRefline Idx[ x ][ y ]x = x0..x0 + cbWidth 1 y = y0..y0 + cbHeight 1 0 0 1 1 2 3
[0381] Referring to Table 7, if the index information indicated by the reference line instruction is 0, the target reference line is the 0th line; if the index information indicated by the reference line instruction is 1, the target reference line is the 1st line; and if the index information indicated by the reference line instruction is 2, the target reference line is the 3rd line.
[0382] It should be explained that the line according to an embodiment of the present invention may be a row above the current block or a column to the left of the current block.
[0383] FIG. 11 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 10, it is determined that the current block supports a multi-reference line prediction mode, and if the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3 and the reference line indication information corresponding to the multi-reference line prediction mode occupies up to 2 bits, the method includes the following steps.
[0384] Step 1101: Context-based adaptive binary arithmetic coding is performed on the first bit of the reference line instruction information by a single context model.
[0385] In one example, it is determined whether the current block satisfies the conditions for supporting multi-reference line prediction technology, and if the current block satisfies the conditions for supporting multi-reference line prediction technology, it is determined that the current block can proceed with coding using each reference line. The coding unit can determine the final reference pixel source through RDO and code reference line index information into the code stream. Here, the conditions for supporting multi-reference line prediction technology include the condition that the current block is a luma intra block, the condition that the size of the current block meets a predetermined limit condition, and the condition that the current block does not include the first line of the coding tree unit. Of course, the conditions for supporting multi-reference line prediction technology are not limited to the above three conditions but may include additional conditions.
[0386] In one example, if a multi-reference line prediction technique is available, all reference lines are traversed, the final target reference line is determined via RDO, and reference line indicators are coded. Reference line indicators can be coded in the code stream according to specific circumstances. In one example, the reference line indicator may be intra_luma_ref_idx.
[0387] It should be explained that the line according to an embodiment of the present invention may be a row above the current block or a column to the left of the current block.
[0388] Step 1102: If you want to proceed with coding for the second bit of the reference line instruction information, perform bypass-based binary arithmetic coding for the second bit of the reference line instruction information.
[0389] In an embodiment of the present invention, it is determined that the current block supports a multi-reference line prediction mode, and the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3, and the reference line indication information corresponding to the multi-reference line prediction mode occupies up to 2 bits. Since the first bit of these 2 bits can be coded by a single context model and the second bit can be coded through a bypass-based coding mode, the number of context models used is reduced by performing coding for all bits of the reference line indication information using only one context model, thereby reducing the complexity of coding and memory consumption, and significantly improving coding performance.
[0390] For example, the context model used by reference line instruction information is as shown in Tables 8 and 9 below. first bin second bin MultiRefline Idx(0), i.e., the first context model Proceed with coding by bypassing the context model. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_ref_idx[ ][ ] 0 Bypass na na na na
[0391] FIG. 12 is a flowchart of a decoding method provided in an embodiment of the present invention, and the method is applied to a decoding unit, and the method is a decoding method corresponding to the coding method shown in FIG. 11, and as shown in FIG. 12, it is determined that the current block supports a multi-reference line prediction mode, and if the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3 and the reference line indication information corresponding to the multi-reference line prediction mode occupies up to 2 bits, the method includes the following steps.
[0392] Step 1201: Context-based adaptive binary arithmetic decoding is performed on the first bit of the reference line instruction information by a single context model.
[0393] Step 1202: If you want to proceed with decoding for the second bit of the reference line instruction information, perform bypass-based binary arithmetic decoding for the second bit of the reference line instruction information.
[0394] By decoding the reference line instruction information, the target reference line used when predicting the current block in the multi-reference line prediction mode based on the reference line instruction information is determined, and then the prediction for the current block can be performed using the target reference line.
[0395] In one example, the code stream of the current block is first received, and if the current block satisfies the interpretation conditions, decoding is performed on the reference line instruction information to determine the source of the reference pixel of the current block. The interpretation conditions include the condition that the current block is a luma intra-block, the condition that the size of the current block meets a predetermined limit condition, and the condition that the current block is not the first line of the coding tree unit. Of course, the conditions supporting the sub-block partitioning technique are not limited to the above three conditions, but may include other conditions.
[0396] In one example, if the current block can use multi-reference line prediction, intra_luma_ref_idx is interpreted, and the reference pixel of the current block is determined based on the value of intra_luma_ref_idx to obtain the predicted value of the current block and use it in the subsequent reconstruction process.
[0397] Third embodiment of MRL mode
[0398] In the relevant technology, it is determined that the current block supports a multi-reference line prediction mode, and the number of candidate reference lines corresponding to the multi-reference line prediction mode is 4, and the reference line instruction information corresponding to the multi-reference line prediction mode occupies up to 3 bits, then these 3 bits must be coded and decoded using 3 different context models, as shown in Tables 10 and 11 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_ref_idx[ ][ ] 0 1 2 na na na first bin second bin third bin MultiRefline Idx(0), i.e., the first context model MultiRefline Idx(1), i.e., the second context model MultiRefline Idx(2) i.e., the third context model
[0399] Here, the first bin points to the first bit of the reference line instruction information and must perform coding and decoding by the first context model, the second bin points to the second bit of the reference line instruction information and must perform coding and decoding by the second context model, and the third bin points to the third bit of the reference line instruction information and must perform coding and decoding by the third context model, and these three context models are all different.
[0400] In addition, the index information of the target reference line and the line number of the corresponding target reference line are as shown in Table 12. intra_luma_ref_idx[x0][y0] IntraLumaRefline Idx[ x ][ y ]x = x0..x0 + cbWidth 1 y = y0..y0 + cbHeight 1 0 0 1 1 2 2 3 3
[0401] Referring to Table 12, if the index information indicated by the reference line instruction is 0, the target reference line is the 0th line; if the index information indicated by the reference line instruction is 1, the target reference line is the 1st line; if the index information indicated by the reference line instruction is 2, the target reference line is the 2nd line; and if the index information indicated by the reference line instruction is 3, the target reference line is the 3rd line.
[0402] FIG. 13 is a flowchart of a coding method provided in an embodiment of the present invention and applied to a coding unit, wherein, as shown in FIG. 13, it is determined that the current block supports a multi-reference line prediction mode, and the number of candidate reference lines corresponding to the multi-reference line prediction mode is 4, and the reference line indication information corresponding to the multi-reference line prediction mode occupies up to 3 bits, the method includes the following steps.
[0403] Step 1301: Context-based adaptive binary arithmetic coding is performed on the first bit of the reference line instruction information by a single context model.
[0404] In one example, it is determined whether the current block satisfies the conditions for supporting multi-reference line prediction technology, and if the current block satisfies the conditions for supporting multi-reference line prediction technology, it is determined that the current block can proceed with coding using each reference line. The coding unit can determine the final reference pixel source through RDO and code reference line index information into the code stream. Here, the conditions for supporting multi-reference line prediction technology include the condition that the current block is a luma intra block, the condition that the size of the current block meets a predetermined limit condition, and the condition that the current block is not the first line of the coding tree unit. Of course, the conditions for supporting multi-reference line prediction technology are not limited to the above three conditions but may include additional conditions.
[0405] In one example, if a multi-reference line prediction technique is available, all reference lines are traversed, the final target reference line is determined via RDO, and reference line indicator information is coded. Reference line indicator information can be coded in the code stream according to specific circumstances. In one example, the reference line indicator information may be intra_luma_ref_idx.
[0406] Step 1302: If you want to proceed with coding for the second bit of the reference line instruction information, perform bypass-based binary arithmetic coding for the second bit of the reference line instruction information.
[0407] Step 1303: If you want to proceed with coding for the third bit of the reference line instruction information, perform bypass-based binary arithmetic coding for the third bit of the reference line instruction information.
[0408] In an embodiment of the present invention, it is determined that the current block supports a multi-reference line prediction mode, and the number of candidate reference lines corresponding to the multi-reference line prediction mode is 4, and the reference line indication information corresponding to the multi-reference line prediction mode occupies up to 3 bits. Since the first bit of these 3 bits can be coded using a single context model, and the second and third bits can be coded using a bypass-based coding mode, coding for all bits of the reference line indication information is performed using only a single context model, thereby reducing the number of context models used, which reduces the complexity of coding and memory consumption, and significantly improves coding performance.
[0409] For example, the context model used by reference line instruction information is as shown in Tables 13 and 14 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_ref_idx[ ][ ] 0 Bypass Bypass na na na first bin second bin third bin MultiRefline Idx(0), i.e., the first context model Proceed with coding by bypassing the context model. Proceed with coding by bypassing the context model.
[0410] FIG. 14 is a flowchart of a decoding method provided in an embodiment of the present invention, and is applied to a decoding unit and is a decoding method corresponding to the coding method according to the embodiment of FIG. 12, and as shown in FIG. 13, it is determined that the current block supports a multi-reference line prediction mode, and if the number of candidate reference lines corresponding to the multi-reference line prediction mode is 4 and the reference line indication information corresponding to the multi-reference line prediction mode occupies up to 3 bits, the method includes the following steps.
[0411] Step 1401: Context-based adaptive binary arithmetic decoding is performed on the first bit of the reference line instruction information by a single context model.
[0412] Step 1402: If decoding is to be performed on the second bit of the reference line instruction information, bypass-based binary arithmetic decoding is performed on the second bit of the reference line instruction information.
[0413] Step 1403: If you want to proceed with decoding for the third bit of the reference line instruction information, perform bypass-based binary arithmetic decoding for the third bit of the reference line instruction information.
[0414] In one example, the code stream of the current block is first received, and if the current block satisfies the interpretation conditions, decoding is performed on the reference line instruction information to determine the source of the reference pixel of the current block. The interpretation conditions include the condition that the current block is a luma intra-block, the condition that the size of the current block meets a predetermined limit condition, and the condition that the current block is not the first line of the coding tree unit. Of course, the conditions supporting the sub-block partitioning technique are not limited to the above three conditions, but may include other conditions.
[0415] In one example, if the current block can use multi-reference line prediction, intra_luma_ref_idx is interpreted, and the reference pixel of the current block is determined based on the value of intra_luma_ref_idx to obtain the predicted value of the current block and use it in the subsequent reconstruction process.
[0416] Fourth embodiment of MRL mode
[0417] FIG. 15 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to a coding unit or a decoding unit, and as shown in FIG. 15, it is determined that the current block supports a multi-reference line prediction mode, and the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3, wherein the candidate reference line with index information of 0 is the 0th line, the candidate reference line with index information of 1 is the 1st line, and the candidate reference line with index information of 2 is the 2nd line, and the method includes the following steps.
[0418] Step 1501: When making a prediction for the current block according to the multi-reference line prediction mode, the prediction for the current block is made according to the target reference line, and the target reference line is determined according to the reference line instruction information.
[0419] Here, if the index information indicated by the reference line indicator is 0, the target reference line is the 0th line;
[0420] If the index information indicated by the reference line indication information is 1, the target reference line is the first line;
[0421] If the index information indicated by the reference line instruction is 2, the target reference line is the second line.
[0422] For example, the target reference line corresponding to the index information indicated by the reference line instruction information may be as shown in Table 15 below. intra_luma_ref_idx[x0][y0] IntraLumaRefline Idx[ x ][ y ]x = x0..x0 + cbWidth 1 y = y0..y0 + cbHeight 1 0 0 1 1 2 2
[0423] In an embodiment of the present invention, the closest 3rd row and 3rd column can be selected as a candidate for the target reference line. That is, the target reference line may be any one line selected from the candidate reference lines, and the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3, and the 3rd row and 3rd column that is closest to the current block boundary is selected as the candidate reference line.
[0424] Fifth embodiment of MRL mode
[0425] FIG. 16 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to a coding unit or a decoding unit, and as shown in FIG. 16, it is determined that the current block supports a multi-reference line prediction mode, and the number of candidate reference lines corresponding to the multi-reference line prediction mode is 3, wherein the candidate reference line with index information of 0 is the 0th line, the candidate reference line with index information of 1 is the 1st line, and the candidate reference line with index information of 2 is the 2nd line, and the method includes the following steps.
[0426] Step 1601: When making a prediction for the current block according to the multi-reference line prediction mode, the prediction for the current block is made according to the target reference line, and the target reference line is determined according to the reference line instruction information.
[0427] Here, if the index information indicated by the reference line indicator is 0, the target reference line is the 0th line;
[0428] If the index information indicated by the reference line indication information is 1, the target reference line is the second line;
[0429] If the index information indicated by the reference line instruction is 2, the target reference line is the third line.
[0430] For example, the target reference line corresponding to the index information indicated by the reference line instruction information may be as shown in Table 16 below. intra_luma_ref_idx[x0][y0] IntraLumaRefline Idx[ x ][ y ]x = x0..x0 + cbWidth 1 y = y0..y0 + cbHeight 1 0 0 1 2 2 3
[0431] In an embodiment of the present invention, the zero line, the second line, and the third line can be selected as candidates for the target reference line.
[0432] Sixth embodiment of MRL mode
[0433] FIG. 17 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 17, it is determined that the current block supports a multi-reference line prediction mode, and the method includes the following steps.
[0434] Step 1701: Before proceeding with the prediction for the current block according to the multi-reference line prediction mode, code is performed on the line count instruction information according to the number of candidate reference lines corresponding to the multi-reference line prediction mode, and the line count instruction information indicates the number of candidate reference lines corresponding to the multi-reference line prediction mode.
[0435] Step 1702: When predicting the current block by multi-reference line prediction mode, code is performed for reference line instruction information according to the target reference line used, and the reference line instruction information indicates the index information of the target reference line used when predicting the current block by multi-reference line prediction mode.
[0436] Step 1703: Proceed with the prediction for the current block based on the target reference line.
[0437] In an embodiment of the present invention, line count indication information capable of indicating the number of lines of a candidate reference line corresponding to a single multi-reference line prediction mode is added to enable the selection of the number of lines that the multi-reference line prediction mode can reference.
[0438] In one example, line count indication information may exist in a sequence parameter set (SPS), an image parameter set, a slice level, or a tile level. Preferably, the line count indication information exists in the sequence parameter set, that is, a syntax indicating the number of lines of a candidate reference line corresponding to a single multi-reference line prediction mode is added to the SPS level.
[0439] FIG. 18 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, and as shown in FIG. 18, it is determined that the current block supports a multi-reference line prediction mode, and said method includes the following steps.
[0440] Step 1801: Before proceeding with prediction for the current block according to the multi-reference line prediction mode, decoding is performed on the line count instruction information, and the line count instruction information indicates the number of lines of candidate reference lines corresponding to the multi-reference line prediction mode.
[0441] Step 1802: Determine the number of candidate reference lines corresponding to the multi-reference line prediction mode based on the line count indication information.
[0442] Step 1803: Determine the target reference line based on the number of candidate reference lines corresponding to the multi-reference line prediction mode and the reference line instruction information, and the reference line instruction information indicates the index information of the target reference line used when predicting the current block by the multi-reference line prediction mode.
[0443] Step 1804: Proceed with the prediction for the current block based on the target reference line.
[0444] In an embodiment of the present invention, line count indication information capable of indicating the number of lines of a candidate reference line corresponding to a single multi-reference line prediction mode is added so that the multi-reference line prediction mode can select the number of lines.
[0445] In one example, line count indication information may exist in a sequence parameter set (SPS), an image parameter set, a slice level, or a tile level. Preferably, the line count indication information exists in the sequence parameter set, that is, syntax indicating the number of lines of candidate reference lines corresponding to a single multi-reference line prediction mode may be added to the SPS level.
[0446] AMVR mode
[0447] In AMVR mode, the syntax elements to be transmitted between the decoding unit and the coding unit include first AMVR instruction information and second AMVR instruction information, the first AMVR instruction information indicates whether AMVR mode is enabled, and the second AMVR instruction information indicates index information of the pixel resolution used when performing mode vector difference coding or decoding in AMVR mode. In one example, the first AMVR instruction information is amvr_flag and the second AMVR instruction information is amvr_precision_flag.
[0448] In the related technology, regarding the affine prediction mode and the non-affine prediction mode, the non-affine prediction mode refers to a prediction mode other than the affine prediction mode, and the first AMVR instruction information and the second AMVR instruction information must be coded and decoded using a total of four context models, as shown in Tables 17 and 18 below. Syntax element Bin Idx 0 1 2 3 4 5 amvr_flag[ ][ ] inter_affine_flag[ ][ ] ? 0:1) na na na na na amvr_precision_flag[ ][ ] inter_affine_flag[ ][ ] ? 0:1) na na na na na Affine Prediction Mode Non-affine affine prediction mode amvr_flag[ ][ ] ImvFlag(2) i.e., the third context model ImvFlag(0), i.e., the first context model amvr_precision_flag[ ][ ] ImvFlag(3) i.e., the fourth context model ImvFlag(1) i.e., the second context model
[0449] Referring to Tables 17 and 18, when the current block activates the affine prediction mode to proceed with coding or decoding of the first AMVR instruction information, the third context model must perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding for the first AMVR instruction information, and when the second AMVR instruction information indicates that the current block has activated the AMVR mode, the fourth context model must perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding for the second AMVR instruction information. When the current block activates the non-fine prediction mode to proceed with coding or decoding the first AMVR instruction information, the first context model must perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the first AMVR instruction information; and when the second AMVR instruction information indicates that the current block has activated AMVR mode, the second context model must perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the second AMVR instruction information. In other words, since a total of four different context models must be used to perform coding or decoding of AMVR instruction information, memory consumption is high.
[0450] First embodiment of AMVR mode
[0451] FIG. 19 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 19, the method includes the following steps.
[0452] Step 1901: When the current block activates an affine prediction mode or other prediction mode other than an affine prediction mode to perform motion vector difference coding of the current block, if the current block supports AMVR mode, when performing coding of the first AMVR instruction information, context-based adaptive binary arithmetic coding for the first AMVR instruction information is performed by the first context model.
[0453] Step 1902: If the first AMVR instruction information indicates that the current block has activated AMVR mode, context-based adaptive binary arithmetic coding is performed for the second AMVR instruction information by the second context model, and the first context model and the second context model are different.
[0454] In one example, if the current block satisfies the condition that it can use adaptive motion vector resolution, the current block can proceed with coding using multiple motion vector resolutions. For example, the coding unit can determine whether AMVR is enabled and the motion vector resolution used via RDO, and code the corresponding syntax information into the code stream. Here, the condition for using adaptive motion vector resolution includes the condition that the current block is an inter-predict block and the current block motion information includes a non-zero motion vector difference. Of course, the condition for using adaptive motion vector resolution is not limited to the above condition and may include other conditions.
[0455] FIG. 20 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 19, and as shown in FIG. 20, said method includes the following steps.
[0456] Step 2001: When the current block activates an affine prediction mode or other prediction mode other than an affine prediction mode to perform motion vector difference decoding of the current block, if the current block supports AMVR mode, when performing decoding of the first AMVR instruction information, context-based adaptive binary arithmetic decoding of the first AMVR instruction information is performed by the first context model.
[0457] In one example, the decoding unit first receives the code stream of the current block, and if it is determined that the current block satisfies the interpretation condition, it can interpret the first AMVR to determine whether the AMVR of the current block is enabled, that is, whether the adaptive motion vector resolution technique is used. Here, the interpretation condition includes the condition that the current block is an inter-predicted block and that the current block motion information includes a motion vector difference that is not zero. Of course, the condition for using the adaptive motion vector resolution is not limited to the above condition but may include other conditions.
[0458] Step 2002: If the first AMVR instruction information indicates that the current block has activated AMVR mode, context-based adaptive binary arithmetic decoding is performed on the second AMVR instruction information by the second context model, and the first context model and the second context model are different.
[0459] If it is determined that the current block has activated AMVR mode, the second AMVR instruction information must be further interpreted to determine the resolution used. Based on the first and second AMVR instruction information, the decoding unit uniquely determines the motion vector resolution of the motion information of the current block, thereby obtaining the predicted value of the current block and using it in the subsequent reconstruction process.
[0460] For example, in the affine prediction mode and the non-affine prediction mode, the context model used by the first AMVR instruction information and the second AMVR instruction information may be as shown in Table 19 below. Affine Prediction Mode Non-affine affine prediction mode amvr_flag[ ][ ] Sharing a single context model, that is, the first context model amvr_precision_flag[ ][ ] Sharing a single context model, that is, a second context model
[0461] In an embodiment of the present invention, since the AMVR instruction information can share a context model in an Affine prediction mode and a non-affine prediction mode, the number of context models required in AMVR can be reduced to two, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0462] Second embodiment of AMVR mode
[0463] FIG. 21 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 21, the method includes the following steps.
[0464] Step 2101: When the current block activates the affine prediction mode and proceeds with motion vector difference coding of the current block, if the current block supports AMVR mode, when proceeding with coding of the first AMVR instruction information, context-based adaptive binary arithmetic coding is performed on the first AMVR instruction information by the first context model, and if the first AMVR instruction information indicates that the current block has activated AMVR mode, bypass-based binary arithmetic coding is performed on the second AMVR instruction information.
[0465] Step 2102: When the current block activates a prediction mode other than the affine prediction mode and proceeds with motion vector difference coding of the current block, if the current block supports AMVR mode, when proceeding with coding of the first AMVR instruction information, context-based adaptive binary arithmetic coding is performed on the first AMVR instruction information by the second context model, and if the first AMVR instruction information indicates that the current block has activated AMVR mode, bypass-based binary arithmetic coding is performed on the second AMVR instruction information.
[0466] FIG. 22 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit and is a decoding method corresponding to the coding method shown in FIG. 21, and as shown in FIG. 22, said method includes the following steps.
[0467] Step 2201: When the current block activates an affine prediction mode and performs motion vector difference decoding of the current block, if the current block supports AMVR mode, when performing decoding of the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information by the first context model, and if the first AMVR instruction information indicates that the current block has activated AMVR mode, bypass-based binary arithmetic decoding is performed on the second AMVR instruction information.
[0468] Step 2202: When the current block activates a prediction mode other than the affine prediction mode and performs motion vector difference decoding of the current block, if the current block supports AMVR mode, when performing decoding of the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information by the second context model, and if the first AMVR instruction information indicates that the current block has activated AMVR mode, bypass-based binary arithmetic decoding is performed on the second AMVR instruction information.
[0469] For example, in the affine prediction mode and the non-affine prediction mode, the context model used by the first AMVR instruction information and the second AMVR instruction information may be as shown in Table 20 below. In Affine prediction mode In non-affine affine prediction mode amvr_flag[ ][ ] ImvFlag(0), i.e., the first context model ImvFlag(1) i.e., the second context model amvr_precision_flag[ ][ ] Proceed with coding and decoding via Bypass without using the context model Proceed with coding and decoding via Bypass without using the context model
[0470] In an embodiment of the present invention, in both the Affine prediction mode and the non-affine prediction mode, the second AMVR instruction information is modified to perform bypass-based binary arithmetic coding or decoding, thereby reducing the required context models in AMVR to two, which can reduce the complexity of coding and decoding and reduce memory overhead.
[0471] AMVR mode's Third embodiment
[0472] FIG. 23 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 23, the method includes the following steps.
[0473] Step 2301: When the current block activates an affine prediction mode or other prediction mode other than an affine prediction mode to perform motion vector difference coding of the current block, if the current block supports an adaptive motion vector resolution AMVR mode, when performing coding of the first AMVR instruction information, context-based adaptive binary arithmetic coding of the first AMVR instruction information is performed by the first context model.
[0474] Step 2302: If the first AMVR instruction information indicates that the current block has enabled AMVR mode, bypass-based binary arithmetic coding is performed for the second AMVR instruction information.
[0475] FIG. 24 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit and is a decoding method corresponding to the coding method shown in FIG. 23, and as shown in FIG. 24, said method includes the following steps.
[0476] Step 2401: When the current block activates an affine prediction mode or other prediction mode other than an affine prediction mode to perform motion vector difference decoding of the current block, if the current block supports an adaptive motion vector resolution AMVR mode, when performing decoding of the first AMVR instruction information, context-based adaptive binary arithmetic decoding of the first AMVR instruction information is performed by the first context model.
[0477] Step 2402: If the first AMVR instruction information indicates that the current block has enabled AMVR mode, bypass-based binary arithmetic decoding is performed on the second AMVR instruction information.
[0478] For example, in the affine prediction mode and the non-affine prediction mode, the context model used by the first AMVR instruction information and the second AMVR instruction information may be as shown in Table 21 below. In Affine prediction mode In non-affine affine prediction mode amvr_flag[ ][ ] Sharing the context model, that is, the first context model amvr_precision_flag[ ][ ] Proceed with coding and decoding via Bypass without using the context model Proceed with coding and decoding via Bypass without using the context model
[0479] In an embodiment of the present invention, in an Affine prediction mode and a non-affine Affine prediction mode, the first AMVR instruction information shares one context model, and the second AMVR instruction information is modified to perform bypass-based binary arithmetic coding or decoding, thereby reducing the required context model in AMVR to one, which can reduce the complexity of coding and decoding and reduce memory overhead.
[0480] AMVR mode's Fourth embodiment
[0481] Another embodiment further provides a coding method, said method is applied to the coding unit, said method includes the following steps.
[0482] Step 1: When the current block activates the affine prediction mode and proceeds with motion vector difference coding of the current block, if the current block supports AMVR mode, when proceeding with coding of the first AMVR instruction information, context-based adaptive binary arithmetic coding for the first AMVR instruction information is performed by the first context model, and if the first AMVR instruction information indicates that the current block has activated AMVR mode, context-based adaptive binary arithmetic coding for the second AMVR instruction information is performed by the second context model.
[0483] Step 2: When the current block activates a prediction mode other than the affine prediction mode and proceeds with motion vector difference coding of the current block, if the current block supports AMVR mode, when proceeding with coding of the first AMVR instruction information, context-based adaptive binary arithmetic coding for the first AMVR instruction information is performed by the third context model, and if the first AMVR instruction information indicates that the current block has activated AMVR mode, context-based adaptive binary arithmetic coding for the second AMVR instruction information is performed by the second context model.
[0484] Here, the first context model, the second context model, and the third context model are different.
[0485] Another embodiment further provides a decoding method applied to a decoding unit, wherein the method is a decoding method corresponding to the coding method, and the method comprises the following steps.
[0486] Step 1: When the current block activates the affine prediction mode and performs motion vector difference decoding of the current block, if the current block supports AMVR mode, when performing decoding of the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information by the first context model, and if the first AMVR instruction information indicates that the current block has activated AMVR mode, context-based adaptive binary arithmetic decoding is performed on the second AMVR instruction information by the second context model.
[0487] Step 2: When the current block activates a prediction mode other than the affine prediction mode and performs motion vector difference decoding of the current block, if the current block supports AMVR mode, when performing decoding of the first AMVR instruction information, context-based adaptive binary arithmetic decoding of the first AMVR instruction information is performed by the third context model, and if the first AMVR instruction information indicates that the current block has activated AMVR mode, context-based adaptive binary arithmetic decoding of the second AMVR instruction information is performed by the second context model.
[0488] Here, the first context model, the second context model, and the third context model are different.
[0489] For example, in the affine prediction mode and the non-affine prediction mode, the context model used by the first AMVR instruction information and the second AMVR instruction information may be as shown in Table 22 below. In Affine prediction mode In non-affine affine prediction mode amvr_flag[ ][ ] ImvFlag(0), i.e., the first context model ImvFlag(2) i.e., the third context model amvr_precision_flag[ ][ ] ImvFlag(1) i.e., the second context model
[0490] In an embodiment of the present invention, in an Affine prediction mode and a non-affine prediction mode, since the second instruction information can share one context model, the number of context models required in AMVR mode can be reduced to three, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0491] Ruma's MPM
[0492] If the current block is a luma block, prediction mode index information must be transmitted between the coding and decoding units, and the prediction mode index information indicates the index information in the MPM list for the target prediction mode of the current block. The coding and decoding units store the list of the most likely intra prediction mode MPMs, and the general intra prediction mode, intra sub-block prediction mode, and multi-reference line prediction mode can share the said MPM list.
[0493] In the relevant technology, when the reference line of the target prediction mode of the current block is an adjacent line of the current block, context-based adaptive binary arithmetic coding or decoding must be performed on the first bit of the prediction mode index information using two different context models, and specifically, which context model to use is determined by whether the intra-sub-block prediction mode of the current block is activated.
[0494] For example, the context model used by the prediction mode index information is as shown in Table 23 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_mpm_idx[ ][ ] intra_luma_ref_idx!=0 ? na:(intra_subpartitions_mode_flag? 0: 1) Bypass Bypass Bypass Bypass na
[0495] Here, the prediction mode index information is intra_luma_mpm_idx. If intra_luma_ref_idx is 0, the reference line of the current block's target prediction mode is an adjacent line of the current block, meaning the current block has not enabled multi-reference line prediction mode. If intra_luma_ref_idx is not 0, the reference line of the current block's target prediction mode is not an adjacent line of the current block, meaning the current block has enabled multi-reference line prediction mode.
[0496] Referring to Table 22, when intra_luma_ref_idx is 0, the first bit of intra_luma_mpm_idx must select one context model from two different context models to proceed with coding and decoding, depending on whether the intra-sub-block prediction mode of the current block is enabled. In addition, if intra_luma_ref_idx is not 0, it means that the current block has enabled multi-reference line prediction mode, and the target prediction mode of the multi-reference line prediction mode enabled by the current block is also from the MPM list.
[0497] Ruma's MPM's First embodiment
[0498] FIG. 25 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 25, the method includes the following steps.
[0499] Step 2501: If the current block enables intra-sub block prediction, and the target prediction mode of the intra-sub block prediction exists in the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the intra-sub block prediction, the target prediction mode of the intra-sub block prediction enabled by the current block determines the index information in the MPM list.
[0500] Step 2502: The target prediction mode of the intra-sub block prediction activated by the current block is coded according to the index information in the MPM list, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by the first context model, and the other bits are obtained by performing bypass-based binary arithmetic coding.
[0501] Step 2503: If the current block has general intra prediction enabled and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when making a prediction for the current block according to the general intra prediction, if the target prediction mode enabled by the current block is from the MPM list, the target prediction mode enabled by the current block determines the index information from the MPM list.
[0502] Step 2504: The target prediction mode activated by the current block is coded according to the index information in the MPM list, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by the second context model, and the other bits are obtained by performing bypass-based binary arithmetic coding.
[0503] In one example, the current block activates a general intra prediction mode, and an additional flag is needed to indicate whether the target prediction mode of the general prediction activated by the current block is from the MPM list, and if it is determined that the target prediction mode is from the MPM list, then the target prediction mode determines index information from the MPM list, and if the target prediction mode is not from the MPM list, then the target prediction mode does not need to determine index information from the MPM list.
[0504] In one example, the coding unit can construct an MPM list, and the intra-subblock prediction mode, multi-reference line prediction mode, and general intra prediction can share the said MPM list.
[0505] In one example, the coding unit selects the prediction mode finally used via RDO, i.e., the target prediction mode, and if the target prediction mode is an intra-sub-block prediction mode or a multi-reference line prediction mode, the target prediction mode must be one prediction mode selected from the above MPM list, and the prediction mode index information (intra_luma_mpm_idx) must be coded to inform the decoding unit which prediction mode was selected. If the target prediction mode is a general intra prediction, one additional flag is coded to indicate whether the target prediction mode of the general prediction activated by the current block is from the above MPM list, and if it is determined that the target prediction mode is from the above MPM list, then the index information of the target prediction mode from the MPM list is determined, and if the target prediction mode is not from the MPM list, there is no need to determine the index information of the target prediction mode from the MPM list.
[0506] FIG. 26 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 25, and as shown in FIG. 26, said method includes the following steps.
[0507] Step 2601: If the current block enables intra-sub block prediction, the target prediction mode of intra-sub block prediction exists in the MPM list, and the current block is a luma block, when making a prediction for the current block according to intra-sub block prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by the first context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding.
[0508] Step 2602: Based on the prediction mode index information, determine the target prediction mode of the intra-sub block prediction that the current block is activated from the MPM list, and the prediction mode index information indicates the index information of the target prediction mode in the MPM list.
[0509] Step 2603: Proceed with the prediction for the current block according to the target prediction mode.
[0510] Step 2604: When the current block enables general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by the second context model, and other bits are obtained by performing bypass-based binary arithmetic decoding, and the second context model and the first context model are the same context model.
[0511] Step 2605: Based on the prediction mode index information, determine the target prediction mode that the current block is activated from the MPM list, and the prediction mode index information indicates the index information of the target prediction mode in the MPM list.
[0512] Step 2606: Proceed with the prediction for the current block according to the target prediction mode.
[0513] In one example, the decoding unit first receives a code stream and, under the premise that the same MPM list is constructed by general intra prediction, intra sub-block prediction mode, and multi-reference line prediction mode, if the current block activates the intra sub-block prediction mode or multi-reference line prediction mode, the target prediction mode used must be from the said MPM list, and the final target prediction mode can be obtained by interpreting the index value in the list. If the current block activates general intra prediction, one additional flag must be interpreted to determine whether the target prediction mode is from the said MPM list, and if it is from the said MPM list, the index value in the said MPM list is interpreted.
[0514] Based on the value of the above flag, the decoding unit can uniquely determine the prediction mode of the current block, so it obtains the predicted value of the current block and uses it in the subsequent reconstruction process.
[0515] In an embodiment of the present invention, when coding or decoding is performed on the first bit of the prediction mode index information when the reference line of the target prediction mode of the current block is an adjacent line of the current block, instead of selecting a context model from two different context models based on the condition of whether the intra-sub-block prediction mode of the current block is activated, the same context model is used in two different conditions, namely the condition that the current block activates the intra-sub-block prediction mode and the condition that the intra-sub-block prediction mode is not activated, so that context-based adaptive binary arithmetic coding or decoding can be performed on the first bit of the prediction mode index information by reducing the number of required context models to one, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0516] In one example, the context model used for the prediction mode index information is as shown in Table 24 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_mpm_idx[ ][ ] intra_luma_ref_idx!=0 ? na:0) Bypass Bypass Bypass Bypass na
[0517] That is, when intra_luma_ref_idx is 0, context-based adaptive binary arithmetic coding or decoding can be performed on the first bit of intra_luma_mpm_idx by the same context model in both of the two different cases where the current block has enabled intra-subblock prediction mode and where it has not enabled intra-subblock prediction mode.
[0518] Ruma's MPM's Second embodiment
[0519] FIG. 27 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 27, the method includes the following steps.
[0520] Step 2701: If the current block enables intra-subblock prediction, and the target prediction mode of the intra-subblock prediction exists in the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the intra-subblock prediction, the target prediction mode of the intra-subblock prediction enabled by the current block determines the index information in the MPM list.
[0521] Step 2702: The target prediction mode of the intra-sub block prediction activated by the current block is coded according to the index information in the MPM list, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0522] Step 2703: If the current block has general intra prediction enabled and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when making a prediction for the current block according to the general intra prediction, if the target prediction mode enabled by the current block exists in the MPM list, the target prediction mode enabled by the current block determines the index information in the MPM list.
[0523] Step 2704: The target prediction mode activated by the current block is coded according to the index information in the MPM list, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0524] In one example, if the current block activates a general intra prediction block, an additional flag is required to indicate whether the target prediction mode of the general prediction activated by the current block comes from the MPM list; if it is determined that the target prediction mode comes from the MPM list, the target prediction mode determines index information from the MPM list, and if the target prediction mode does not come from the MPM list, the target prediction mode does not need to determine index information from the MPM list.
[0525] FIG. 28 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 27, and as shown in FIG. 28, said method includes the following steps.
[0526] Step 2801: If the current block enables intra-sub block prediction, the target prediction mode of the intra-sub block prediction exists in the MPM list, and the current block is a luma block, when making a prediction for the current block according to the intra-sub block prediction, decoding is performed on the prediction mode index information, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0527] Step 2802: Based on the prediction mode index information, determine the target prediction mode of the intra-sub block prediction that the current block is activated from the MPM list, and the prediction mode index information indicates the index information of the target prediction mode in the MPM list.
[0528] Step 2803: Proceed with the prediction for the current block according to the target prediction mode.
[0529] Step 2804: When the current block enables general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, decoding is performed on the prediction mode index information, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0530] Step 2805: Based on the prediction mode index information, the target prediction mode activated by the current block is determined from the MPM list, and the prediction mode index information indicates the index information in the MPM list of the target prediction mode activated by the current block.
[0531] Step 2806: Proceed with the prediction for the current block according to the target prediction mode.
[0532] In an embodiment of the present invention, when the reference line of the target prediction mode of the current block is an adjacent line of the current block, that is, when intra_luma_ref_idx is 0, coding or decoding is performed on the first bit of the prediction mode index information, the activation status of the intra-sub-block prediction mode of the current block may not be considered. In other words, in both of the two different cases where the current block has activated the intra-sub-block prediction mode and where it has not activated the intra-sub-block prediction mode, bypass-based binary arithmetic coding or decoding can be performed on the first bit of the prediction mode index information. As a result, there is no need to use a context model for the first bit of the prediction mode index information, and by reducing the number of required context models to zero, the complexity of coding and decoding and memory overhead can be reduced.
[0533] In one example, the context model used for the prediction mode index information is as shown in Table 25 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_mpm_idx[ ][ ] intra_luma_ref_idx!=0 ? na:Bypass) Bypass Bypass Bypass Bypass na
[0534] That is, when intra_luma_ref_idx is 0, the first bit of intra_luma_mpm_idx can be bypass-based binary arithmetic coding or decoding for both the case where the current block has intra-subblock prediction mode enabled and the case where it has not.
[0535] Ruma's MPM's Third embodiment
[0536] FIG. 29 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 29, the method includes the following steps.
[0537] Step 2901: If the current block enables intra-subblock prediction, and the target prediction mode of the intra-subblock prediction exists in the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the intra-subblock prediction, the target prediction mode of the intra-subblock prediction enabled by the current block determines the index information in the MPM list.
[0538] Step 2902: The target prediction mode of the intra-sub block prediction activated by the current block is coded according to the index information in the MPM list, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by a single context model, and the other bits are obtained by performing bypass-based binary arithmetic coding.
[0539] Step 2903: If the current block activates general intra prediction and the target prediction mode of the general intra prediction comes from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, if the target prediction mode of the general prediction activated by the current block exists in the MPM list, the target prediction mode of the general prediction activated by the current block determines the index information in the MPM list.
[0540] Step 2904: The target prediction mode currently activated by the block is coded according to the index information in the MPM list, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0541] In one example, if the current block enables general intra prediction, an additional flag is required to indicate whether the target prediction mode of the general prediction enabled by the current block comes from the MPM list; if it is determined that the target prediction mode comes from the MPM list, the target prediction mode determines index information from the MPM list, and if the target prediction mode does not come from the MPM list, the target prediction mode does not need to determine index information from the MPM list.
[0542] FIG. 30 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the decoding method shown in FIG. 29, and as shown in FIG. 30, said method includes the following steps.
[0543] Step 3001: If the current block enables intra-sub block prediction, the target prediction mode of intra-sub block prediction exists in the MPM list, and the current block is a luma block, when making a prediction for the current block according to intra-sub block prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by a single context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding.
[0544] Step 3002: Based on the prediction mode index information, determine the target prediction mode of the intra-sub block prediction that the current block is activated from the MPM list, and the prediction mode index information indicates the index information of the target prediction mode in the MPM list.
[0545] Step 3003: Proceed with the prediction for the current block according to the target prediction mode.
[0546] Step 3004: When the current block enables general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, decoding is performed on the prediction mode index information, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic decoding.
[0547] Step 3005: Based on the prediction mode index information, the target prediction mode activated by the current block is determined from the MPM list, and the prediction mode index information indicates the index information in the MPM list of the target prediction mode activated by the current block.
[0548] Step 3006: Proceed with the prediction for the current block according to the target prediction mode.
[0549] In an embodiment of the present invention, when coding or decoding is performed on the prediction mode index information, if the reference line of the target prediction mode of the current block is an adjacent line of the current block, i.e., when intra_luma_ref_idx is 0, if the current block has activated the intra-sub-block prediction mode, context-based adaptive binary arithmetic coding or decoding is performed on the first bit of the prediction mode index information by a single context model, and if the current block has not activated the intra-sub-block prediction mode, bypass-based binary arithmetic coding or decoding is performed on the first bit of the prediction mode index information. As a result, only one context model is required for the coding and decoding of the prediction mode index information, and by reducing the number of required context models to , the complexity of coding and decoding and memory overhead can be reduced.
[0550] In one example, the context model used for the prediction mode index information is as shown in Table 26 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_mpm_idx[ ][ ] intra_luma_ref_idx!=0 ? na:(intra_subpartitions_mode_flag? 0: Bypass) Bypass Bypass Bypass Bypass na
[0551] That is, if intra_luma_ref_idx is 0 and the current block has enabled ISP mode, coding and decoding are performed on the first bit of intra_luma_mpm_idx using a single context model, and if the current block has not enabled ISP mode, coding and decoding are performed on the first bit of intra_luma_mpm_idx using a bypass.
[0552] Ruma's MPM's Fourth embodiment
[0553] FIG. 31 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 31, the method includes the following steps.
[0554] Step 3101: If the current block enables intra-subblock prediction, and the target prediction mode of the intra-subblock prediction exists in the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the intra-subblock prediction, the target prediction mode of the intra-subblock prediction enabled by the current block determines the index information in the MPM list.
[0555] Step 3102: The target prediction mode of the intra-sub block prediction activated by the current block is coded according to the index information in the MPM list, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0556] Step 3103: If the current block has general intra prediction enabled and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when making a prediction for the current block according to the general intra prediction, if the target prediction mode enabled by the current block exists in the MPM list, the target prediction mode enabled by the current block determines the index information in the MPM list.
[0557] Step 3104: The target prediction mode currently activated by the block is coded according to the index information in the MPM list, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by a context model, and the other bits are obtained by performing bypass-based binary arithmetic coding.
[0558] In one example, if the current block activates a general intra prediction block, an additional flag is required to indicate whether the target prediction mode of the general prediction activated by the current block comes from the MPM list; if it is determined that the target prediction mode comes from the MPM list, the target prediction mode determines index information from the MPM list, and if the target prediction mode does not come from the MPM list, the target prediction mode does not need to determine index information from the MPM list.
[0559] FIG. 32 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 31, and as shown in FIG. 32, said method includes the following steps.
[0560] Step 3201: If the current block enables intra-sub block prediction, the target prediction mode of intra-sub block prediction exists in the MPM list, and the current block is a luma block, when making a prediction for the current block according to intra-sub block prediction, decoding is performed on the prediction mode index information, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic decoding.
[0561] Step 3202: Based on the prediction mode index information, determine the target prediction mode of the intra-sub block prediction that the current block is activated from the MPM list, and the prediction mode index information indicates the index information of the target prediction mode in the MPM list.
[0562] Step 3203: Proceed with the prediction for the current block according to the target prediction mode.
[0563] Step 3204: When the current block enables general intra prediction and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by a context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding.
[0564] Step 3205: Based on the prediction mode index information, the target prediction mode activated by the current block is determined from the MPM list, and the prediction mode index information indicates the index information in the MPM list of the target prediction mode activated by the current block.
[0565] Step 3206: Proceed with the prediction for the current block according to the target prediction mode.
[0566] In an embodiment of the present invention, when the reference line of the target prediction mode of the current block is an adjacent line of the current block, i.e., when intra_luma_ref_idx is 0, coding or decoding is performed on the prediction mode index information. If the current block has activated the intra-sub-block prediction mode, bypass-based binary arithmetic coding or decoding is performed on the first bit of the prediction mode index information. If the current block has not activated the intra-sub-block prediction mode, context-based adaptive binary arithmetic coding or decoding is performed on the first bit of the prediction mode index information by a single context model. Thus, coding and decoding of the prediction mode index information requires only one context model, and by reducing the number of required context models to , the complexity of coding and decoding and memory overhead can be reduced.
[0567] In one example, the context model used for the prediction mode index information is as shown in Table 27 below. Syntax element Bin Idx 0 1 2 3 4 5 intra_luma_mpm_idx[ ][ ] intra_luma_ref_idx!=0 ? na:(intra_subpartitions_mode_flag?Bypass: 0) Bypass Bypass Bypass Bypass na
[0568] That is, if intra_luma_ref_idx is 0, if the current block has not enabled ISP mode, coding and decoding are performed on the first bit of intra_luma_mpm_idx using a single context model, and if the current block has enabled ISP mode, coding and decoding are performed on the first bit of intra_luma_mpm_idx using a bypass.
[0569] Ruma's MPM's Fifth embodiment
[0570] The syntax element transmitted between the coding and decoding sections may further include planar instruction information, which indicates whether the target prediction mode of the current block is a planar prediction mode, and the planar instruction information occupies one bit. For example, the planar instruction information is intra_luma_not_planar _flag.
[0571] In the related technology, the coding and decoding methods of planar instruction information are as shown in Table 28 below. intra_luma_not_planar_flag[ ][ ] intra_subpartitions_mode_flag na na na na na intra_luma_mpm_idx[ ][ ] Bypass Bypass Bypass Bypass na na
[0572] Referring to Table 28 above, the planar instruction information intra_luma_not_planar _flag used context-based adaptive binary arithmetic coding, and the selection of the context depends on whether the intra-subblock prediction mode of the current block is enabled, that is, the coding and decoding of planar instruction information requires two different context models.
[0573] FIG. 33 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 33, the method includes the following steps.
[0574] Step 3301: If the current block activates intra-subblock prediction and the target prediction mode of the intra-subblock prediction exists in the MPM list and the current block is a luma block, when making a prediction for the current block according to the intra-subblock prediction, coding is performed on the planar instruction information depending on whether the target prediction mode of the intra-subblock prediction activated by the current block is a planar prediction mode, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing context-based adaptive binary arithmetic coding by the first context model.
[0575] Step 3302: If the current block activates general intra prediction, and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, when making a prediction for the current block according to the general intra prediction, coding is performed on the planar instruction information depending on whether the target prediction mode of the general intra prediction activated by the current block is a planar prediction mode, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing context-based adaptive binary arithmetic coding by the second context model, and the first context model and the second context model are identical.
[0576] FIG. 34 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 33, and as shown in FIG. 34, said method includes the following steps.
[0577] Step 3401: If the current block activates intra-sub block prediction, and the target prediction mode of the intra-sub block prediction exists in the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the intra-sub block prediction, decoding is performed on the planar instruction information, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing context-based adaptive binary arithmetic decoding by the first context model.
[0578] Step 3402: If the target prediction mode of the intra-subblock prediction activated by the current block is determined to be the planar prediction mode based on the planar instruction information, the prediction for the current block is performed according to the planar prediction mode.
[0579] Step 3403: If, based on the planar instruction information, it is determined that the target prediction mode for the intra-subblock prediction activated by the current block is not the planar prediction mode, the target prediction mode for the intra-subblock prediction activated by the current block is determined from the MPM list based on the prediction mode index information, and the prediction is performed for the current block according to the target prediction mode.
[0580] Step 3404: If the current block activates general intra prediction, and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, then when making a prediction for the current block according to general intra prediction, decoding is performed on the planar instruction information, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing context-based adaptive binary arithmetic decoding by the second context model, and the first context model and the second context model are identical.
[0581] Step 3405: If the target prediction mode activated by the current block is determined to be the planar prediction mode based on the planar instruction information, a prediction is made for the current block according to the planar prediction mode.
[0582] Step 3406: If it is determined by the planar instruction information that the target prediction mode activated by the current block is not a planar prediction mode, the target prediction mode activated by the current block is determined from the MPM list according to the prediction mode index information, and a prediction is performed for the current block according to the target prediction mode.
[0583] In an embodiment of the present invention, when coding and decoding are performed on planar instruction information without considering whether the intra-subblock prediction mode of the current block is activated, context-based adaptive binary arithmetic coding or decoding on the planar instruction information can be performed by the same context model in both cases where the current block has the intra-subblock prediction mode and general intra prediction activated. By doing so, the complexity of coding and decoding and memory overhead are reduced by reducing the number of context models required for planar instruction information to 1.
[0584] In one example, the coding and decoding methods of planar instruction information are as shown in Table 29 below. intra_luma_not_planar_flag[ ][ ] 0 na na na na na intra_luma_mpm_idx[ ][ ] Bypass Bypass Bypass Bypass na na
[0585] Referring to Table 29 above, the planar instruction information intra_luma_not_planar _flag still uses context-based adaptive binary arithmetic coding and decoding methods, but the selection of the context does not depend on whether the intra-subblock prediction mode of the current block is enabled, but rather can proceed with coding and decoding using a single fixed context model in both cases where the current block has the intra-subblock prediction mode and general intra prediction enabled.
[0586] Sixth embodiment of Luma's MPM
[0587] FIG. 35 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 35, the method includes the following steps.
[0588] Step 3501: If the current block activates intra-sub block prediction and the target prediction mode of the intra-sub block prediction exists in the MPM list and the current block is a luma block, when making a prediction for the current block according to the intra-sub block prediction, coding is performed on the planar instruction information depending on whether the target prediction mode of the intra-sub block prediction activated by the current block is a planar prediction mode, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing bypass-based binary arithmetic coding.
[0589] Step 3502: If the current block activates general intra prediction and the target prediction mode of the general intra prediction is from the MPM list and the current block is a luminance block, then when making a prediction for the current block according to the general intra prediction, coding is performed on the planar instruction information depending on whether the target prediction mode of the general intra prediction activated by the current block is a planar prediction mode, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing bypass-based binary arithmetic coding.
[0590] FIG. 36 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 35, and as shown in FIG. 36, said method includes the following steps.
[0591] Step 3601: If the current block enables intra-sub block prediction, and the target prediction mode of the intra-sub block prediction exists in the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the intra-sub block prediction, decoding is performed on the planar instruction information, wherein the planar instruction information indicates whether the target prediction mode enabled by the current block is a planar prediction mode, and the planar instruction information is obtained by performing bypass-based binary arithmetic decoding.
[0592] Step 3602: If the target prediction mode of the intra-subblock prediction activated by the current block is determined to be the planar prediction mode based on the planar instruction information, the prediction for the current block is performed according to the planar prediction mode.
[0593] Step 3603: If, based on the planar instruction information, it is determined that the target prediction mode for the intra-subblock prediction activated by the current block is not the planar prediction mode, the target prediction mode for the intra-subblock prediction activated by the current block is determined from the MPM list based on the prediction mode index information, and the prediction is performed for the current block according to the target prediction mode.
[0594] Step 3604: If the current block activates general intra prediction, and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the general intra prediction, decoding is performed on the planar instruction information, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing bypass-based binary arithmetic decoding.
[0595] Step 3605: If the target prediction mode activated by the current block is determined to be the planar prediction mode based on the planar instruction information, a prediction is made for the current block according to the planar prediction mode.
[0596] Step 3606: If it is determined by the planar instruction information that the target prediction mode activated by the current block is not a planar prediction mode, the target prediction mode activated by the current block is determined from the MPM list according to the prediction mode index information, and a prediction is made for the current block according to the target prediction mode.
[0597] In an embodiment of the present invention, when coding and decoding are performed on planar instruction information without considering whether the intra-subblock prediction mode of the current block is enabled, bypass-based binary arithmetic coding or decoding can be performed on the planar instruction information in both cases where the current block has the intra-subblock prediction mode and general intra prediction enabled. By doing so, the complexity and memory overhead of coding and decoding are reduced by reducing the number of context models required for planar instruction information to zero.
[0598] In one example, the coding and decoding methods for planar instruction information are as shown in Table 30 below. intra_luma_not_planar_flag[ ][ ] intra_subpartitions_mode_flag na na na na na intra_luma_mpm_idx[ ][ ] Bypass Bypass Bypass Bypass na na
[0599] Referring to Table 30 above, the planar instruction information intra_luma_not_planar _flag no longer uses context-based adaptive binary arithmetic coding and decoding methods, and uses bypass-based binary arithmetic coding or decoding methods in both cases where the current block has intra-subblock prediction mode and general intra-prediction enabled.
[0600] It should be explained that the above method may also be applied to situations where only general intra-prediction is considered.
[0601] Example 1
[0602] Another embodiment further provides a coding method, said coding method is applied to a coding unit, said coding method includes the following steps.
[0603] Step 1: If the current block activates general intra prediction and the target prediction mode of the general intra prediction comes from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, if the target prediction mode activated by the current block comes from the MPM list, the target prediction mode activated by the current block determines the index information from the MPM list.
[0604] Step 2: The target prediction mode activated by the current block is coded according to the index information in the MPM list, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by a single context model, and the other bits are obtained by performing bypass-based binary arithmetic coding.
[0605] In one example, when the current block activates a general intra prediction block, an additional flag is required to indicate whether the target prediction mode of the general prediction activated by the current block is from the MPM list, and if it is determined that the target prediction mode is from the MPM list, then the target prediction mode determines index information from the MPM list, and if the target prediction mode is not from the MPM list, then the target prediction mode does not need to determine index information from the MPM list.
[0606] Another embodiment further provides a decoding method, said decoding method is applied to a decoding unit and is a decoding method corresponding to said coding method, said decoding method includes the following steps.
[0607] Step 1: When the current block enables general intra prediction and the target prediction mode of the general intra prediction comes from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, decoding is performed on the prediction mode index information, wherein the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by the second context model, and other bits are obtained by performing bypass-based binary arithmetic decoding, and the second context model and the first context model are the same context model.
[0608] Step 2: Based on the prediction mode index information, determine the target prediction mode that the current block is activated from the MPM list, and the prediction mode index information indicates the index information of the target prediction mode in the MPM list.
[0609] Step 3: Proceed with the prediction for the current block according to the target prediction mode.
[0610] Example 2
[0611] Another embodiment further provides a coding method, said coding method is applied to a coding unit, said coding method includes the following steps.
[0612] Step 1: If the current block activates general intra prediction and the target prediction mode of the general intra prediction comes from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, if the target prediction mode activated by the current block exists in the MPM list, the target prediction mode activated by the current block determines the index information in the MPM list.
[0613] Step 2: Based on the index information in the MPM list, the target prediction mode activated by the current block is coded for the prediction mode index information, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0614] In one example, if the current block activates a general intra prediction block, an additional flag is required to indicate whether the target prediction mode of the general prediction activated by the current block comes from the MPM list; if it is determined that the target prediction mode comes from the MPM list, the target prediction mode determines index information from the MPM list, and if the target prediction mode does not come from the MPM list, the target prediction mode does not need to determine index information from the MPM list.
[0615] Another embodiment further provides a decoding method, said decoding method is applied to a decoding unit and is a decoding method corresponding to said coding method, said decoding method includes the following steps.
[0616] Step 1: When the current block enables general intra prediction and the target prediction mode of the general intra prediction comes from the MPM list, and the current block is a luma block, when making a prediction for the current block according to general intra prediction, decoding is performed on the prediction mode index information, and all bits of the prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0617] Step 2: Based on the prediction mode index information, determine the target prediction mode activated by the current block from the MPM list, and the prediction mode index information indicates the index information in the MPM list of the target prediction mode activated by the current block.
[0618] Step 3: Proceed with the prediction for the current block according to the target prediction mode.
[0619] Example 3
[0620] Another embodiment further provides a coding method, said coding method is applied to a coding unit, said coding method includes the following steps.
[0621] Step 1: If the current block activates general intra prediction, the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luminal block, when making a prediction for the current block according to the general intra prediction, coding is performed on the planar instruction information depending on whether the target prediction mode of the general intra prediction activated by the current block is a planar prediction mode, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing context-based adaptive binary arithmetic coding by the first context model.
[0622] Another embodiment further provides a decoding method, said decoding method is applied to a decoding unit and is a decoding method corresponding to said coding method, said decoding method includes the following steps.
[0623] Step 1: If the current block activates general intra prediction, the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the general intra prediction, decoding is performed on the planar instruction information, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing context-based adaptive binary arithmetic coding by the first context model.
[0624] Step 2: If the target prediction mode activated by the current block is determined to be the planar prediction mode based on the planar instruction information, a prediction is made for the current block according to the planar prediction mode.
[0625] Step 3: If it is determined by the planar instruction information that the target prediction mode activated by the current block is not a planar prediction mode, the target prediction mode activated by the current block is determined from the MPM list according to the prediction mode index information, and a prediction is performed for the current block according to the target prediction mode.
[0626] Example 4
[0627] Another embodiment further provides a coding method, said coding method is applied to a coding unit, said coding method includes the following steps.
[0628] Step 1: When the current block activates general intra prediction and the target prediction mode of the general intra prediction is from the MPM list and the current block is a luminance block, when making a prediction for the current block according to the general intra prediction, coding is performed on the planar instruction information depending on whether the target prediction mode of the general intra prediction activated by the current block is a planar prediction mode, the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing bypass-based binary arithmetic coding.
[0629] Another embodiment further provides a decoding method, said decoding method is applied to a decoding unit and is a decoding method corresponding to said coding method, said decoding method includes the following steps.
[0630] Step 1: If the current block activates general intra prediction, and the target prediction mode of the general intra prediction is from the MPM list, and the current block is a luma block, then when making a prediction for the current block according to the general intra prediction, decoding is performed on the planar instruction information, wherein the planar instruction information indicates whether the target prediction mode activated by the current block is a planar prediction mode, and the planar instruction information is obtained by performing bypass-based binary arithmetic coding.
[0631] Step 2: If the target prediction mode activated by the current block is determined to be the planar prediction mode based on the planar instruction information, a prediction is made for the current block according to the planar prediction mode.
[0632] Step 3: If it is determined by the planar instruction information that the target prediction mode activated by the current block is not a planar prediction mode, the target prediction mode activated by the current block is determined from the MPM list according to the prediction mode index information, and a prediction is performed for the current block according to the target prediction mode.
[0633] Chroma's MPM
[0634] The syntax element transmitted between the coding and decoding sections further includes chroma prediction mode index information, and the chroma prediction mode index information indicates the index information in the candidate prediction mode list corresponding to the target prediction mode of the current block.
[0635] In the related technology, the chroma prediction mode index information and the corresponding prediction mode are as shown in Table 31 below. Value of intra_chroma_pred_mode Bin string 7 (Luma prediction mode and ) 0 4 (Cross-component prediction mode 1) 10 5 (Cross-component prediction mode 2) 1110 6 (Cross-component prediction mode 3) 1111 0 (planar prediction mode) 11000 1 (Vertical prediction mode) 11001 2 (Horizontal prediction mode) 11010 3 (DC Prediction Mode) 11011
[0636] Referring to Table 31 above, if the current block supports cross-component prediction mode and the current block enables cross-component prediction mode, the chroma prediction mode index information occupies up to 4 bits, and if the current block supports cross-component prediction mode and the current block does not enable cross-component prediction mode, the chroma prediction mode index information occupies up to 5 bits.
[0637] In the relevant technology, when the current block supports cross-component prediction mode and the current block enables cross-component prediction mode, the coding and decoding method of the chroma prediction mode index information is as shown in Table 32 below. first bin second bin third bin Fourth bin 4 (Cross-component prediction mode 1) 1 (First Context Model) 0 (second context model) / / 5 (Cross-component prediction mode 2) 1 (First Context Model) 1 (Second Context Model) 1 (Third Context Model) 0 (Third Context Model) 6 (Cross-component prediction mode 3) 1 (First Context Model) 1 (Second Context Model) 1 (Third Context Model) 1 (Third Context Model)
[0638] Referring to Table 32 above, if the current block supports cross-component prediction mode and the current block has cross-component prediction mode enabled, the first bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by the first context model, the second bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by the second context model, and the third and fourth bits of the chroma prediction mode index information are obtained by performing context-based adaptive binary arithmetic decoding by the third context model. Furthermore, these three context models are all distinct. In other words, since the chroma prediction mode index information requires the use of three context models, the memory overhead is significant.
[0639] Chroma's MPM's First embodiment
[0640] FIG. 37 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 37, if the current block supports a cross-component prediction mode, the current block activates a cross-component prediction mode, and the current block is a chroma block, the method includes the following steps.
[0641] Step 3701: When making a prediction for the current block according to the cross-component prediction mode, determine the index information in the list of candidate prediction modes corresponding to the target prediction mode of the current block.
[0642] Here, the coding unit selects a final target prediction mode through the rate-distortion cost, and then notifies the decoding unit which prediction mode was selected through the coding index information.
[0643] Step 3702: Based on the index information in the list of candidate prediction modes corresponding to the target prediction mode of the current block, code is performed on the chroma prediction mode index information.
[0644] Here, the chroma prediction mode index information indicates the index information in the candidate prediction mode list corresponding to the target prediction mode of the current block. The first bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by the first context model, and the second bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by the second context model, and furthermore, the first context model and the second context model are different; and the third and fourth bits of the chroma prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0645] In one example, the coding unit stores a list of chroma prediction mode candidates, and the coding unit selects the target prediction mode to be finally used via RDO, then notifies the decoding unit which prediction mode was selected through the coding index value, i.e., codes the chroma prediction mode index information.
[0646] In one example, the chroma prediction mode includes the same prediction mode as the luma and the cross-component prediction mode. Here, the cross-component prediction mode includes a mode obtained by deriving linear model coefficients through a two-sided template, a mode obtained by deriving linear model coefficients through an upper template, and a mode obtained by deriving linear model coefficients through a left template, and further includes a planar prediction mode, a DC prediction mode, a vertical prediction mode, and a horizontal prediction mode.
[0647] FIG. 38 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit and is a decoding method corresponding to the coding method illustrated in FIG. 37, and as illustrated in FIG. 38, if the current block supports a cross-component prediction mode, the current block activates a cross-component prediction mode, and the current block is a chroma block, said method includes the following steps.
[0648] Step 3801: When making a prediction for the current block according to the cross-component prediction mode, decoding is performed on the chroma prediction mode index information.
[0649] Here, the first bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by the first context model, and the second bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by the second context model, and the first context model and the second context model are different; and the third and fourth bits of the chroma prediction mode index information are obtained by performing bypass-based binary arithmetic decoding.
[0650] Step 3802: Based on the chroma prediction mode index information, determine the target prediction mode of the current block from the list of candidate prediction modes.
[0651] Step 3803: Proceed with the prediction for the current block according to the target prediction mode.
[0652] In one example, the decoding unit receives a code stream and then interprets the syntax related to the chroma prediction mode. Since the coding overhead bits required for each prediction mode differ, the decoding unit uniquely determines the chroma prediction mode of the current block by interpreting the chroma prediction mode index information, thereby obtaining the prediction value of the current block and using it in the subsequent reconstruction process.
[0653] In an embodiment of the present invention, when the current block supports a cross-component prediction mode and the current block enables the cross-component prediction mode, the third and fourth bits of the chroma prediction mode index information can be obtained by performing bypass-based binary arithmetic decoding, thereby reducing the number of context models required for the chroma prediction mode index information to two, reducing the complexity of coding and decoding, and reducing memory overhead.
[0654] In one example, when the current block supports cross-component prediction mode and the current block enables cross-component prediction mode, the coding and decoding methods of the chroma prediction mode index information are as shown in Table 33 and Table 34 below. first bin second bin third bin Fourth bin 4 (Cross-component prediction mode 1) 1 (First Context Model) 0 (second context model) / / 5 (Cross-component prediction mode 2) 1 (First Context Model) 1 (Second Context Model) 1(Bypass) 0(Bypass) 6 (Cross-component prediction mode 3) 1 (First Context Model) 1 (Second Context Model) 1(Bypass) 1(Bypass) Syntax element Bin Idx 0 1 2 3 4 5 intra_chroma_pred_mode[ ][ ] sps_cclm_enabled_flag = = 1 && bin at binIdx equal to 2 = = 1 0 1 bypass bypass na na
[0655] Chroma's MPM's Second embodiment
[0656] FIG. 39 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 39, if the current block supports a cross-component prediction mode, the current block activates a cross-component prediction mode, and the current block is a chroma block, the method includes the following steps.
[0657] Step 3901: When making a prediction for the current block according to the cross-component prediction mode, determine the index information in the list of candidate prediction modes corresponding to the target prediction mode of the current block.
[0658] Here, the coding unit selects a final target prediction mode through the rate-distortion cost, and then notifies the decoding unit which prediction mode was selected through the coding index information.
[0659] Step 3902: Based on the index information in the candidate prediction mode list corresponding to the target prediction mode of the current block, code is performed on the chroma prediction mode index information.
[0660] Here, the chroma prediction mode index information indicates the index information in the list of candidate prediction modes corresponding to the target prediction mode of the current block. The first bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic coding by a single context model, and the second, third, and fourth bits of the chroma prediction mode index information are obtained by performing bypass-based binary arithmetic coding.
[0661] FIG. 40 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit and is a decoding method corresponding to the coding method illustrated in FIG. 39, and as illustrated in FIG. 40, if the current block supports a cross-component prediction mode, the current block activates a cross-component prediction mode, and the current block is a chroma block, said method includes the following steps.
[0662] Step 4001: When making a prediction for the current block according to the cross-component prediction mode, decoding is performed on the chroma prediction mode index information.
[0663] Here, the first bit of the chroma prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding by a single context model, and the second, third, and fourth bits of the chroma prediction mode index information are obtained by performing bypass-based binary arithmetic decoding.
[0664] Step 4002: Based on the chroma prediction mode index information, determine the target prediction mode of the current block from the list of candidate prediction modes.
[0665] Step 4003: Proceed with the prediction for the current block according to the target prediction mode.
[0666] In an embodiment of the present invention, when the current block supports a cross-component prediction mode and the current block enables the cross-component prediction mode, the first bit of the chroma prediction mode index information uses one context model, and the second, third, and fourth bits all use a bypass-based binary arithmetic coding and decoding method, thereby reducing the number of context models required for the chroma prediction mode index information to one, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0667] In one example, when the current block supports cross-component prediction mode and the current block enables cross-component prediction mode, the coding and decoding methods of the chroma prediction mode index information are as shown in Table 35 and Table 36 below. first bin second bin third bin Fourth bin 4 (Cross-component prediction mode) 1 (First Context Model) 0(Bypass) / / 5 (Cross-component prediction mode) 1 (First Context Model) 1(Bypass) 1(Bypass) 0(Bypass) 6 (Cross-component prediction mode) 1 (First Context Model) 1(Bypass) 1(Bypass) 1(Bypass) Syntax element Bin Idx 0 1 2 3 4 5 intra_chroma_pred_mode[ ][ ] sps_cclm_enabled_flag = = 1 && bin at binIdx equal to 2 = = 1 0 bypass bypass bypass na na
[0668] Chroma's MPM's Third embodiment
[0669] FIG. 41 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 41, when the current block supports a cross-component prediction mode and the current block is a chroma block, the method includes the following steps.
[0670] Step 4101: When making a prediction for the current block according to the cross-component prediction mode, determine the index information in the list of candidate prediction modes corresponding to the target prediction mode of the current block.
[0671] Here, the coding unit selects a final target prediction mode through the rate-distortion cost, and then notifies the decoding unit which prediction mode was selected through the coding index information.
[0672] Step 4102: Based on the index information in the candidate prediction mode list corresponding to the target prediction mode of the current block, code is performed on the chroma prediction mode index information.
[0673] Here, the chroma prediction mode index information indicates the index information in the list of candidate prediction modes corresponding to the target prediction mode of the current block.
[0674] In one example, if the chroma prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode;
[0675] If the chroma prediction mode index information is 110, the target prediction mode is the second cross-component prediction mode;
[0676] If the chroma prediction mode index information is 111, the target prediction mode is the second cross-component prediction mode;
[0677] If the chroma prediction mode index information is 11110, the target prediction mode is planar prediction mode;
[0678] If the chroma prediction mode index information is 111110, the target prediction mode is vertical prediction mode;
[0679] If the chroma prediction mode index information is 1111110, the target prediction mode is horizontal prediction mode;
[0680] If the chroma prediction mode index information is 1111111, the target prediction mode is DC prediction mode.
[0681] For example, the chroma prediction mode index information and the corresponding prediction mode are as shown in Table 37 below. Value of intra _ chroma _ pred _mode Bin string 7 (same as Luma prediction mode) 0 4 (Cross-component prediction mode 1) 10 5 (Cross-component prediction mode 2) 110 6 (Cross-component prediction mode 3) 111 0 (planar prediction mode) 111100 1 (Vertical prediction mode) 111101 2 (Horizontal prediction mode) 111110 3 (DC Prediction Mode) 111111
[0682] Referring to Table 37 above, when the current block supports cross-component prediction mode, the current block enables cross-component prediction mode, and the chroma prediction mode index information indicates cross-component prediction mode, the chroma prediction mode index information occupies up to 3 bits, thereby reducing overhead bits and further reducing memory overhead. In addition, when the current block supports cross-component prediction mode, the current block does not enable cross-component prediction mode, and the chroma prediction mode index information indicates general intra prediction, the chroma prediction mode index information occupies up to 6 bits.
[0683] In another embodiment, if the chroma prediction mode index information is 10, the target prediction mode is a first cross-component prediction mode;
[0684] If the chroma prediction mode index information is 110, the target prediction mode is the second cross-component prediction mode;
[0685] If the chroma prediction mode index information is 111, the target prediction mode is the second cross-component prediction mode;
[0686] If the chroma prediction mode index information is 11110, the target prediction mode is planar prediction mode;
[0687] If the chroma prediction mode index information is 111110, the target prediction mode is vertical prediction mode;
[0688] If the chroma prediction mode index information is 1111110, the target prediction mode is horizontal prediction mode;
[0689] If the chroma prediction mode index information is 1111111, the target prediction mode is DC prediction mode.
[0690] Step 4103: Proceed with the prediction for the current block according to the target prediction mode.
[0691] For example, the chroma prediction mode index information and the corresponding prediction mode are as shown in Table 38 below. Value of intra _ chroma _ pred _mode Bin string 7 (same as Luma prediction mode) 0 4 (Cross-component prediction mode 1) 10 5 (Cross-component prediction mode 2) 110 6 (Cross-component prediction mode 3) 111 0 (planar prediction mode) 11110 1 (Vertical prediction mode) 111110 2 (Horizontal prediction mode) 1111110 3 (DC Prediction Mode) 1111111
[0692] Referring to Table 38 above, when the current block supports cross-component prediction mode, the current block enables cross-component prediction mode, and the chroma prediction mode index information indicates cross-component prediction mode, the chroma prediction mode index information occupies up to 3 bits, thereby reducing overhead bits and further reducing memory overhead. In addition, when the current block supports cross-component prediction mode, the current block does not enable cross-component prediction mode, and the chroma prediction mode index information indicates general intra prediction, the chroma prediction mode index information occupies up to 7 bits.
[0693] FIG. 42 is a flowchart of a decoding method provided in an embodiment of the present invention, and the method is applied to a decoding unit, and the method is a decoding method corresponding to the coding method shown in FIG. 41, and as shown in FIG. 42, when the current block supports a cross-component prediction mode and the current block is a chroma block, the method includes the following steps.
[0694] Step 4201: When making a prediction for the current block according to the cross-component prediction mode, decoding is performed on the chroma prediction mode index information.
[0695] Step 4202: Based on the chroma prediction mode index information, determine the target prediction mode of the current block from the list of candidate prediction modes.
[0696] In one example, if the chroma prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode;
[0697] If the chroma prediction mode index information is 110, the target prediction mode is the second cross-component prediction mode;
[0698] If the chroma prediction mode index information is 111, the target prediction mode is the second cross-component prediction mode;
[0699] If the chroma prediction mode index information is 11110, the target prediction mode is planar prediction mode;
[0700] If the chroma prediction mode index information is 111110, the target prediction mode is vertical prediction mode;
[0701] If the chroma prediction mode index information is 1111110, the target prediction mode is horizontal prediction mode;
[0702] If the chroma prediction mode index information is 1111111, the target prediction mode is DC prediction mode.
[0703] In another embodiment, if the chroma prediction mode index information is 10, the target prediction mode is a first cross-component prediction mode;
[0704] If the chroma prediction mode index information is 110, the target prediction mode is the second cross-component prediction mode;
[0705] If the chroma prediction mode index information is 111, the target prediction mode is the second cross-component prediction mode;
[0706] If the chroma prediction mode index information is 11110, the target prediction mode is planar prediction mode;
[0707] If the chroma prediction mode index information is 111110, the target prediction mode is vertical prediction mode;
[0708] If the chroma prediction mode index information is 1111110, the target prediction mode is horizontal prediction mode;
[0709] If the chroma prediction mode index information is 1111111, the target prediction mode is DC prediction mode.
[0710] Predictions are made for the current block based on the target prediction mode.
[0711] Step 4203: Proceed with the prediction for the current block according to the target prediction mode.
[0712] In an embodiment of the present invention, when the current block supports a cross-component prediction mode and the current block enables the cross-component prediction mode, the overhead bits of the chroma prediction mode index information can be reduced, and furthermore, memory overhead can be reduced.
[0713] CCLM mode
[0714] FIG. 43 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to a coding unit or a decoding unit, and as shown in FIG. 43, the method includes the following steps.
[0715] Step 4301: If the luminance and chroma of the current block share a single split tree, and the width and height of the luminance block corresponding to the current block is 64*64 and the size of the chroma block corresponding to the current block is 32*32, then the current block does not support cross-component prediction mode.
[0716] An embodiment of the present invention can reduce the dependency of luminance and chroma in CCLM mode and prevent the chroma block from having to wait for the reconstruction value of a single 64*64 luminance block.
[0717] ALF mode
[0718] The syntax element transmitted between the coding and decoding sections further includes ALF instruction information, which indicates whether ALF is enabled for the current block. For example, the ALF instruction information is alf_ctb_flag.
[0719] In the related technology, the coding and decoding methods of ALF instruction information are as shown in Table 39 below. Syntax element condL condA ctxSetIdx alf_ctb_flag[x0][y0][cIdx] alf_ctb_flag[xNbL][yNbL][cIdx] alf_ctb_flag[xNbA][yNbA][cIdx] cIdx Here, the calculation formula for context model selection: ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx * 3
[0721] Referring to Table 39 and the formula above, the selection of context models for coding and decoding ALF instruction information is determined by three factors, such as whether the upper block of the current block uses ALF, whether the left block of the current block uses ALF, and the index of the current component, and a total of 9 context models are required.
[0722] Specifically, if the current block supports ALF and the current block is a luma block, context-based adaptive binary arithmetic coding or decoding is performed on the ALF instruction information by the target context model, and the target context model is one context model selected from three different context models included in the first set of context models depending on whether the ALF is enabled in the upper block of the current block and whether the ALF is enabled in the left block of the current block.
[0723] If the current block supports ALF and the current block is a CB chroma block, context-based adaptive binary arithmetic coding or decoding is performed on the ALF instruction information by the target context model, and the target context model is one context model selected from three different context models included in the second context model set according to whether ALF is enabled in the upper block of the current block and whether ALF is enabled in the left block of the current block.
[0724] If the current block supports ALF and the current block is a CR chroma block, context-based adaptive binary arithmetic coding or decoding is performed on the ALF instruction information by the target context model, and the target context model is one context model selected from three different context models included in the third context model set, depending on whether ALF is enabled in the upper block of the current block and whether ALF is enabled in the left block of the current block. Here, the nine context models are all different.
[0725] ALF mode's First embodiment
[0726] FIG. 44 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 44, the method includes the following steps.
[0727] Step 4401: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the target context model, wherein the target context model is one context model selected from three different context models included in the first set of context models according to whether the ALF is enabled in the upper block of the current block and whether the ALF is enabled in the left block of the current block.
[0728] In one example, the first context model set includes a first context model, a second context model, and a third context model. If the upper block of the current block enables ALF and the left block of the current block enables ALF, the target context model is the first context model; if the upper block of the current block enables ALF and the left block of the current block does not enable ALF, or if the upper block of the current block does not enable ALF and the left block of the current block enables ALF, the target context model is the second context model; if the upper block of the current block does not enable ALF and the left block of the current block does not enable ALF, the target context model is the third context model.
[0729] Step 4402: If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic coding on the ALF instruction information is performed by a target context model, wherein the target context model is one context model selected from three different context models included in a second context model set according to whether ALF is enabled in the upper block of the current block and whether ALF is enabled in the left block of the current block, and the three context models included in the second context model set and the three context models included in the first context model set are different.
[0730] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0731] In one example, the second set of context models includes the fourth context model, the fifth context model, and the sixth context model. If the upper block of the current block enables ALF and the left block of the current block enables ALF, the target context model is the fourth context model; if the upper block of the current block enables ALF and the left block of the current block does not enable ALF, or if the upper block of the current block does not enable ALF and the left block of the current block enables ALF, the target context model is the fifth context model; if the upper block of the current block does not enable ALF and the left block of the current block does not enable ALF, the target context model is the sixth context model.
[0732] In one example, the coding unit determines whether ALF is enabled for the current block, that is, whether adaptive loop filtering is used, via RDO, and codes ALF instruction information in the bitrate to inform the decoding unit whether ALF is enabled and further inform whether the decoding unit has performed adaptive loop filtering. Additionally, if ALF is enabled, ALF-related syntax elements must be further coded, and the coding unit must likewise perform filtering.
[0733] FIG. 45 is a flowchart of a decoding method provided in an embodiment of the present invention, the method is applied to a decoding unit, the method is a decoding method corresponding to the coding method shown in FIG. 44, and as shown in FIG. 45, the method includes the following steps.
[0734] Step 4501: If the current block supports an adaptive loop filter ALF and the current block is a luma block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a target context model before filtering processing is performed on the current block according to the ALF mode, wherein the target context model is one context model selected from three different context models included in a first set of context models depending on whether the ALF is enabled in the upper block of the current block and whether the ALF is enabled in the left block of the current block.
[0735] Step 4502: If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the target context model, wherein the target context model is one context model selected from three different context models included in the second context model set according to whether ALF is enabled in the upper block of the current block and whether ALF is enabled in the left block of the current block, and the three context models included in the second context model set and the three context models included in the first context model set are different.
[0736] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0737] After the decoding unit receives the code stream, it interprets whether adaptive loop filtering is enabled for the current block by decoding ALF instruction information. If the ALF instruction information indicates that ALF is enabled for the current block, the decoding unit may obtain the reconstructed pixel after filtering by continuing to decode ALF-related syntax elements and performing adaptive loop filtering on the current block.
[0738] In one example, the coding and decoding methods of ALF instruction information are as shown in Table 40 below. Syntax element condL condA ctxSetIdx alf_ctb_flag[x0][y0][cIdx] alf_ctb_flag[xNbL][yNbL][cIdx] alf_ctb_flag[xNbA][yNbA][cIdx] cIdx == 0 ? 0 : 1
[0739] Here, the calculation formula for context model selection is: ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx * 3
[0740] In an embodiment of the present invention, regarding ALF instruction information, since the CB chroma block and the CR chroma block can share three different context models, the number of context models used by the ALF instruction information can be reduced to six, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0741] ALF mode's Second embodiment
[0742] FIG. 46 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 46, the method includes the following steps.
[0743] Step 4601: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the target context model, wherein the target context model is one context model selected from three different context models included in the first set of context models according to whether the ALF is enabled in the upper block of the current block and whether the ALF is enabled in the left block of the current block.
[0744] In one example, the first set of context models includes a first context model, a second context model, and a third context model. If the upper block of the current block enables ALF and the left block of the current block enables ALF, the target context model is the first context model; if the upper block of the current block enables ALF and the left block of the current block does not enable ALF, or if the upper block of the current block does not enable ALF and the left block of the current block enables ALF, the target context model is the second context model; if the upper block of the current block does not enable ALF and the left block of the current block does not enable ALF, the target context model is the third context model.
[0745] Step 4602: If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic coding on the ALF instruction information is performed by a target context model, wherein the target context model is one context model selected from three different context models included in a second context model set according to whether ALF is enabled on the upper block of the current block and whether ALF is enabled on the left block of the current block, and the three context models included in the second context model set and the three context models included in the first context model set are identical.
[0746] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0747] In one example, the second set of context models includes the fourth context model, the fifth context model, and the sixth context model. If the upper block of the current block enables ALF and the left block of the current block enables ALF, the target context model is the fourth context model; if the upper block of the current block enables ALF and the left block of the current block does not enable ALF, or if the upper block of the current block does not enable ALF and the left block of the current block enables ALF, the target context model is the fifth context model; if the upper block of the current block does not enable ALF and the left block of the current block does not enable ALF, the target context model is the sixth context model.
[0748] FIG. 47 is a flowchart of a decoding method provided in an embodiment of the present invention, the method is applied to a decoding unit, the method is a decoding method corresponding to the coding method illustrated in FIG. 46, and as illustrated in FIG. 47, the method includes the following steps.
[0749] Step 4701: If the current block supports an adaptive loop filter ALF and the current block is a luma block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a target context model before filtering processing is performed on the current block according to the ALF mode, wherein the target context model is one context model selected from three different context models included in a first set of context models depending on whether the ALF is enabled in the upper block of the current block and whether the ALF is enabled in the left block of the current block.
[0750] Step 4702: If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the target context model, wherein the target context model is one context model selected from three different context models included in the second context model set according to whether ALF is enabled in the upper block of the current block and whether ALF is enabled in the left block of the current block, and the three context models included in the second context model set and the three context models included in the first context model set are different.
[0751] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0752] In one example, the coding and decoding methods of ALF instruction information are as shown in Table 41 below. Syntax element condL condA ctxSetIdx alf_ctb_flag[x0][y0][cIdx] alf_ctb_flag[xNbL][yNbL][cIdx] alf_ctb_flag[xNbA][yNbA][cIdx] 0
[0753] Here, the calculation formula for context model selection is: ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx * 3
[0754] In an embodiment of the present invention, for ALF instruction information, the luminance block, CB chroma block, and CR chroma block can all share three different context models, so the number of context models used by ALF instruction information is reduced to three, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0755] ALF mode's Third embodiment
[0756] FIG. 48 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 48, the method includes the following steps.
[0757] Step 4801: If the current block supports ALF and the current block is a luma block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the first context model before filtering processing is performed on the current block according to the ALF mode.
[0758] Step 4802: If the current block supports ALF and the current block is a CB chroma block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the second context model before filtering processing is performed on the current block according to the ALF mode.
[0759] Step 4803: If the current block supports ALF and the current block is a CR chroma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by a third context model, and the first context model, the second context model, and the third context model are different context models.
[0760] FIG. 49 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 48, and as shown in FIG. 49, said method includes the following steps.
[0761] Step 4901: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the first context model, and the ALF instruction information indicates whether ALF is enabled for the current block.
[0762] Step 4902: If the current block supports ALF and the current block is a CB chroma block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the second context model before filtering processing is performed on the current block according to the ALF mode.
[0763] Step 4903: If the current block supports ALF and the current block is a CR chroma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a third context model, and the first context model, the second context model, and the third context model are different context models.
[0764] In one example, the coding and decoding methods of ALF instruction information are as shown in Table 42 below. Syntax element condL condA ctxSetIdx alf_ctb_flag[x0][y0][cIdx] 0 0 cIdx
[0765] Here, the calculation formula for context model selection is: ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx
[0766] In an embodiment of the present invention, regarding ALF instruction information, since the lumina block shares one context model, the CB chroma block shares one context model, and the CR chroma block shares one context model, the number of context models used by the ALF instruction information is reduced to three, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0767] ALF mode's Fourth embodiment
[0768] FIG. 50 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 50, the method includes the following steps.
[0769] Step 5001: If the current block supports ALF and the current block is a luma block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the first context model before filtering processing is performed on the current block according to the ALF mode.
[0770] Step 5002: If the current block supports ALF and the current block is a chroma block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the second context model before filtering processing is performed on the current block according to the ALF mode.
[0771] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0772] FIG. 51 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method illustrated in FIG. 50, and as illustrated in FIG. 51, said method includes the following steps.
[0773] Step 5101: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the first context model, and the ALF instruction information indicates whether the current block is ALF enabled.
[0774] Step 5102: If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the second context model, and the first context model and the second context model are different.
[0775] In one example, the coding and decoding methods of ALF instruction information are as shown in Table 43 below. Syntax element condL condA ctxSetIdx alf_ctb_flag[x0][y0][cIdx] 0 0 cIdx == 0 ? 0 : 1
[0776] Here, the calculation formula for context model selection is: ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx
[0777] In an embodiment of the present invention, regarding ALF instruction information, since the lumina block shares one context model and the CB chroma block and CR chroma block share one context model, the number of context models used by the ALF instruction information is reduced to two, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0778] ALF mode's Fifth embodiment
[0779] FIG. 52 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 52, the method includes the following steps.
[0780] Step 5201: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the target context model, wherein the target context model is one context model selected from three different context models included in the first set of context models according to whether the ALF is enabled in the upper block of the current block and whether the ALF is enabled in the left block of the current block.
[0781] In one example, the first context model set includes a first context model, a second context model, and a third context model. If the upper block of the current block enables ALF and the left block of the current block enables ALF, the target context model is the first context model; if the upper block of the current block enables ALF and the left block of the current block does not enable ALF, or if the upper block of the current block does not enable ALF and the left block of the current block enables ALF, the target context model is the second context model; if the upper block of the current block does not enable ALF and the left block of the current block does not enable ALF, the target context model is the third context model.
[0782] Step 5202: If the current block supports ALF and the current block is a CB chroma block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the first context model before filtering processing is performed on the current block according to the ALF mode.
[0783] Step 5203: If the current block supports ALF and the current block is a CR chroma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the second context model, and the context model included in the first context model set, the first context model, and the second context model are different context models.
[0784] FIG. 53 is a flowchart of a decoding method provided in an embodiment of the present invention, the method is applied to a decoding unit, the method is a decoding method corresponding to the coding method illustrated in FIG. 52, and as illustrated in FIG. 53, the method includes the following steps.
[0785] Step 5301: If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a target context model, wherein the target context model is one context model selected from three different context models included in a first set of context models according to whether ALF is enabled in the upper block of the current block and whether ALF is enabled in the left block of the current block.
[0786] In one example, the first context model set includes a first context model, a second context model, and a third context model. If the upper block of the current block enables ALF and the left block of the current block enables ALF, the target context model is the first context model; if the upper block of the current block enables ALF and the left block of the current block does not enable ALF, or if the upper block of the current block does not enable ALF and the left block of the current block enables ALF, the target context model is the second context model; if the upper block of the current block does not enable ALF and the left block of the current block does not enable ALF, the target context model is the third context model.
[0787] Step 5302: If the current block supports ALF and the current block is a CB chroma block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the first context model before filtering processing is performed on the current block according to the ALF mode.
[0788] Step 5303: If the current block supports ALF and the current block is a CR chroma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the second context model, and the context model included in the first context model set, the first context model, and the second context model are different context models.
[0789] In one example, the coding and decoding method of ALF instruction information in a luma block is as shown in Table 44 below. Syntax element condL condA ctxSetIdx alf_ctb_flag[x0][y0][cIdx] alf_ctb_flag[xNbL][yNbL][cIdx] alf_ctb_flag[xNbA][yNbA][cIdx] 0
[0790] Here, the calculation formula for context model selection is: ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx * 3
[0791] In one example, the coding and decoding methods for the chroma block and ALF instruction information are as shown in Table 45 below. Syntax element condL condA ctxSetIdx alf_ctb_flag[x0][y0][cIdx] 0 0 cIdx == 0 ? 0 : 1
[0792] Here, the calculation formula for context model selection is: ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx
[0793] In an embodiment of the present invention, for ALF instruction information, the lumina block must use three different context models, the CB chroma block shares one context module, and the CR chroma block shares one different context model, so the number of context models used by the ALF instruction information is reduced to five, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0794] ALF mode's Sixth embodiment
[0795] FIG. 54 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 54, the method includes the following steps.
[0796] Step 5401: If the current block supports ALF and the current block is a luma block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the first context model before filtering processing is performed on the current block according to the ALF mode.
[0797] Step 5402: If the current block supports ALF and the current block is a chroma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by the second context model, and the second context model and the first context model are the same context model.
[0798] FIG. 55 is a flowchart of a decoding method provided in an embodiment of the present invention, the method is applied to a decoding unit, the method is a decoding method corresponding to the coding method illustrated in FIG. 54, and as illustrated in FIG. 55, the method includes the following steps.
[0799] Step 5501: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the first context model, and the ALF instruction information indicates whether ALF is enabled for the current block.
[0800] Step 5502: If the current block supports ALF and the current block is a chroma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by the second context model, and the second context model and the first context model are the same context model.
[0801] In an embodiment of the present invention, for ALF instruction information, the luminance block, CB chroma block, and CR chroma block share one context model, so by reducing the number of context models used by ALF instruction information to one, the complexity of coding and decoding can be reduced and memory overhead can be reduced.
[0802] ALF mode's Seventh embodiment
[0803] FIG. 56 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 56, the method includes the following steps.
[0804] Step 5601: If the current block supports ALF and the current block is a luma block, before performing filtering processing on the current block according to the ALF mode, perform bypass-based binary arithmetic coding on the ALF instruction information.
[0805] Step 5602: If the current block supports ALF and the current block is a chroma block, before performing filtering processing on the current block according to the ALF mode, perform bypass-based binary arithmetic coding on the ALF instruction information.
[0806] FIG. 57 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method illustrated in FIG. 56, and as illustrated in FIG. 57, said method includes the following steps.
[0807] Step 5701: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, perform bypass-based binary arithmetic decoding on the ALF instruction information, and the ALF instruction information indicates whether ALF is enabled for the current block.
[0808] Step 5702: If the current block supports ALF and the current block is a chroma block, bypass-based binary arithmetic decoding is performed on the ALF instruction information before filtering the current block according to the ALF mode.
[0809] In an embodiment of the present invention, regarding ALF instruction information, when the current block is a luminance block, a CB chroma block, and a CR chroma block, coding or decoding can be performed on the ALF instruction information using a bypass-based binary arithmetic coding and decoding method, thereby reducing the number of context models used by the ALF instruction information to zero, which reduces the complexity of coding and decoding and reduces memory overhead.
[0810] ALF mode's Eighth embodiment
[0811] FIG. 58 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 58, the method includes the following steps.
[0812] Step 5801: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by a context model, and the ALF instruction information indicates whether ALF is enabled for the current block.
[0813] Step 5802: If the current block supports ALF, the current block enables the adaptive loop filter ALF, and the current block is a chroma block, then, before performing filtering processing on the current block according to the ALF mode, perform bypass-based binary arithmetic decoding on the ALF instruction information.
[0814] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0815] FIG. 59 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 58, and as shown in FIG. 59, said method includes the following steps.
[0816] Step 5901: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a context model, and the ALF instruction information indicates whether the current block is ALF enabled.
[0817] Step 5902: If the current block supports ALF, the current block enables the adaptive loop filter ALF, and the current block is a chroma block, then, before performing filtering processing on the current block according to the ALF mode, bypass-based binary arithmetic decoding is performed on the ALF instruction information.
[0818] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0819] In an embodiment of the present invention, for ALF instruction information, the luminance block uses one context model, and the CB chroma block and CR chroma block both perform coding or decoding using a bypass-based binary arithmetic coding and decoding method. By reducing the number of context models used by the ALF instruction information to 1, the complexity of coding and decoding and memory overhead can be reduced.
[0820] ALF mode's Ninth embodiment
[0821] FIG. 60 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 60, the method includes the following steps.
[0822] Step 6001: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, perform bypass-based binary arithmetic coding on the ALF instruction information, and the ALF instruction information indicates whether ALF is enabled for the current block.
[0823] Step 6002: If the current block supports ALF and the current block is a chroma block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information by a context model before filtering processing is performed on the current block according to the ALF mode.
[0824] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0825] FIG. 61 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method illustrated in FIG. 60, and as illustrated in FIG. 61, said method includes the following steps.
[0826] Step 6101: If the current block supports ALF and the current block is a luma block, before proceeding with filtering processing for the current block according to the ALF mode, perform bypass-based binary arithmetic decoding on the ALF instruction information, and the ALF instruction information indicates whether ALF is enabled for the current block.
[0827] Step 6102: If the current block supports ALF and the current block is a chroma block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information by a context model before filtering processing is performed on the current block according to the ALF mode.
[0828] Here, the chroma block includes the CB chroma block and the CR chroma block.
[0829] In an embodiment of the present invention, for ALF instruction information, the lumina block performs coding or decoding using a bypass-based binary arithmetic coding and decoding method, and since the CB chroma block and the CR chroma block share one context model, the number of context models used by the ALF instruction information is reduced to 1, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0830] MIP mode
[0831] In MIP mode, the syntax element transmitted between the coding and decoding layers further includes MIP instruction information, which indicates whether the matrix-based intra-prediction mode of the current block is enabled. For example, the MIP instruction information is Intra_MIP_flag.
[0832] In the relevant technology, if the current block supports a matrix-based intra prediction mode, context-based adaptive binary arithmetic decoding of MIP instructions can be performed by a target context model before proceeding with prediction for the current block according to the matrix-based intra prediction mode. Here, the target context model is one context model selected from four different context models based on whether the matrix-based intra prediction mode of the upper block of the current block is enabled, whether the matrix-based intra prediction mode of the left block of the current block is enabled, and whether the current block satisfies a preset size condition.
[0833] In one example, the preset size condition may be that the width of the current block is greater than twice the height, or that the height of the current block is greater than twice the width. Of course, the preset size condition may be other conditions, and embodiments of the present invention are not limited thereto.
[0834] Specifically, it is assumed that the four distinct context models include a first context model, a second context model, a third context model, and a fourth context model. If the upper block of the current block activates a matrix-based intra-prediction mode, the left block of the current block activates a matrix-based intra-prediction mode, and the current block does not satisfy a preset size condition, the target context model is the first context model; if the upper block of the current block activates a matrix-based intra-prediction mode, the left block of the current block does not activate a matrix-based intra-prediction mode, and the current block does not satisfy a preset size condition, or, if the upper block of the current block does not activate a matrix-based intra-prediction mode, the left block of the current block activates a matrix-based intra-prediction mode, and the current block does not satisfy a preset size condition, the target context model is the second context model; if the upper block of the current block does not activate a matrix-based intra-prediction mode, the left block of the current block does not activate a matrix-based intra-prediction mode, and the current block does not satisfy a preset size condition, the target context model is the third context model; If the current block satisfies the pre-configured size condition, the target context model is the fourth context model.
[0835] As you can see, in MIP mode, MIP instruction information has significant memory overhead because it requires four different context models.
[0836] First embodiment in MIP mode
[0837] FIG. 62 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to a coding unit or a decoding unit, and as shown in FIG. 62, the method includes the following steps.
[0838] Step 6201: If the width and height of the current block are 32*32, the current block does not support matrix-based intra prediction mode.
[0839] Here, the current block is a luminance block or a chroma block. For example, if the current block is a luminance block and the width and height of the current block are 32*32, the current block does not support matrix-based intra prediction mode.
[0840] In another example, if the width and height of the current block are 32*16, the current block does not support matrix-based intra prediction mode. For example, the current block is a luminance block or a chroma block.
[0841] In another example, if the width and height of the current block are 4*4, the current block does not support matrix-based intra prediction mode. For example, the current block is a luminance block or a chroma block.
[0842] In an embodiment of the present invention, if the current block is a large-size block, it can be ensured that the current block does not support a matrix-based intra-prediction mode; that is, since the current block cannot enable a matrix-based intra-prediction mode, computational complexity can be reduced.
[0843] Second embodiment in MIP mode
[0844] FIG. 63 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 63, when the current block supports a matrix-based intra-prediction mode, the method includes the following steps.
[0845] Step 6301: Depending on whether the matrix-based intra-prediction mode of the current block is enabled, context-based adaptive binary arithmetic coding is performed on the MIP instruction information by the target context model, wherein the target context model is one context model selected from three different context models depending on whether the matrix-based intra-prediction mode of the upper block of the current block is enabled and whether the matrix-based intra-prediction mode of the left block of the current block is enabled.
[0846] In one example, it is assumed that the three different context models include a first context model, a second context model, and a third context model. If the upper block of the current block activates the matrix-based intra prediction mode and the left block of the current block activates the matrix-based intra prediction mode, the target context model is the first context model; if the upper block of the current block activates the matrix-based intra prediction mode and the left block of the current block does not activate the matrix-based intra prediction mode, or if the upper block of the current block does not activate the matrix-based intra prediction mode and the left block of the current block activates the matrix-based intra prediction mode, the target context model is the second context model; if the upper block of the current block does not activate the matrix-based intra prediction mode and the left block of the current block does not activate the matrix-based intra prediction mode, the target context model is the third context model.
[0847] In one example, if the coding unit determines that the current block satisfies the matrix-based intra prediction condition, it determines whether to enable the MIP mode of the current block—that is, whether to use the matrix-based intra prediction method—via RDO, and can inform the decoding unit whether to enable the MIP mode by coding MIP instruction information in the code stream.
[0848] In the code stream, code the above MIP instruction information according to the specific situation, and if the current block has enabled MIP mode, additional MIP-related syntax elements must be coded.
[0849] FIG. 64 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, wherein the method is applied to a decoding unit, and the method is a decoding method corresponding to the coding method illustrated in FIG. 63, and as illustrated in FIG. 64, when the current block supports a matrix-based intra-prediction mode, the method includes the following steps.
[0850] Step 6401: Before proceeding with prediction for the current block according to the matrix-based intra prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information by the target context model, wherein the target context model is one context model selected from three different context models depending on whether the matrix-based intra prediction mode of the upper block of the current block is enabled and whether the matrix-based intra prediction mode of the left block of the current block is enabled.
[0851] In one example, it is assumed that the three different context models include a first context model, a second context model, and a third context model. If the upper block of the current block activates the matrix-based intra prediction mode and the left block of the current block activates the matrix-based intra prediction mode, the target context model is the first context model; if the upper block of the current block activates the matrix-based intra prediction mode and the left block of the current block does not activate the matrix-based intra prediction mode, or if the upper block of the current block does not activate the matrix-based intra prediction mode and the left block of the current block activates the matrix-based intra prediction mode, the target context model is the second context model; and if the upper block of the current block does not activate the matrix-based intra prediction mode and the left block of the current block does not activate the matrix-based intra prediction mode, the target context model is the third context model.
[0852] Step 6402: If it is determined that the current block activates the matrix-based intra prediction mode based on the MIP instruction information, a prediction is made for the current block based on the matrix-based intra prediction mode.
[0853] In one example, when the decoding unit receives a code stream and determines that the current block satisfies the interpretation conditions, it can interpret MIP instruction information to determine whether the MIP mode of the current block is enabled. The interpretation conditions include conditions where the current block is a luma block and the current block size satisfies a predetermined condition. Of course, the interpretation conditions are not limited to the above conditions and may include other conditions.
[0854] Through MIP instruction information, the decoding unit determines whether the prediction mode of the current block is a matrix-based intra prediction mode, and if it is a matrix-based intra prediction mode, it can obtain the prediction mode information and further obtain the prediction value by continuing to interpret other syntax related to the mode.
[0855] In an embodiment of the present invention, in MIP mode, without considering the size condition of the current block, one context model is selected from three different context models based only on whether the matrix-based intra prediction mode of the upper block of the current block and the matrix-based intra prediction mode of the left block of the current block are activated, thereby reducing the number of context models required for MIP instruction information to three, which can reduce the complexity of coding and decoding and reduce memory overhead.
[0856] Third embodiment in MIP mode
[0857] FIG. 65 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 65, when the current block supports a matrix-based intra-prediction mode, the method includes the following steps.
[0858] Step 6501: Depending on whether the matrix-based intra-prediction mode of the current block is enabled, context-based adaptive binary arithmetic coding is performed on the MIP instruction information by the target context model, wherein the target context model is one context model selected from two different context models depending on whether the current block satisfies a preset size condition.
[0859] Here, the preset size condition may be that the width of the current block is greater than twice the height, or that the height of the current block is greater than twice the width.
[0860] In one example, it is assumed that the two different context models include a first context model and a second context model. If the size of the current block satisfies the pre-set size condition, the target context model is the first context model, and if the size of the current block does not satisfy the pre-set size condition, the target context model is the second context model.
[0861] FIG. 66 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, wherein the method is applied to a decoding unit, and the method is a decoding method corresponding to the coding method illustrated in FIG. 65, and as illustrated in FIG. 66, if the current block supports a matrix-based intra-prediction mode, the method includes the following steps.
[0862] Step 6601: Before proceeding with prediction for the current block according to the matrix-based intra prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information by the target context model, wherein the target context model is one context model selected from two different context models depending on whether the current block satisfies a preset size condition.
[0863] Here, the preset size condition may be that the width of the current block is greater than twice the height, or that the height of the current block is greater than twice the width.
[0864] In one example, it is assumed that the two different context models include a first context model and a second context model. If the size of the current block satisfies the pre-set size condition, the target context model is the first context model, and if the size of the current block does not satisfy the pre-set size condition, the target context model is the second context model.
[0865] Step 6602: If it is determined that the current block activates the matrix-based intra prediction mode based on the MIP instruction information, a prediction is made for the current block based on the matrix-based intra prediction mode.
[0866] In an embodiment of the present invention, in MIP mode, the selection of a context model for MIP instruction information is made based only on size conditions without considering whether the matrix-based intra-prediction mode of the upper block of the current block is activated and whether the matrix-based intra-prediction mode of the left block of the current block is activated, thereby reducing the number of context models required for MIP instruction information to two, which can reduce the complexity of coding and decoding and reduce memory overhead.
[0867] Fourth embodiment in MIP mode
[0868] FIG. 67 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 67, when the current block supports a matrix-based intra-prediction mode, the method includes the following steps.
[0869] Step 6701: Depending on whether the matrix-based intra-prediction mode of the current block is enabled, context-based adaptive binary arithmetic coding is performed on the MIP instruction information by the same context model.
[0870] FIG. 68 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 67, and as shown in FIG. 68, when the current block supports a matrix-based intra-prediction mode, said method includes the following steps.
[0871] Step 6801: Before proceeding with prediction for the current block according to the matrix-based intra prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information by the same context model.
[0872] Step 6802: If it is determined that the current block activates the matrix-based intra prediction mode based on the MIP instruction information, a prediction is made for the current block based on the matrix-based intra prediction mode.
[0873] In an embodiment of the present invention, in MIP mode, the selection of a context model for MIP instruction information does not consider whether the matrix-based intra-prediction mode of the upper block of the current block is activated and whether the matrix-based intra-prediction mode of the left block of the current block is activated, nor does it consider size conditions. Since context-based adaptive binary arithmetic coding or decoding for MIP instruction information is performed by the same context model under different conditions, the number of context models required for MIP instruction information is reduced to one, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0874] Fifth embodiment in MIP mode
[0875] FIG. 69 is a flowchart of a coding and decoding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 69, when the current block supports a matrix-based intra-prediction mode, the method includes the following steps.
[0876] Step 6901: Depending on whether the matrix-based intra-prediction mode of the current block is enabled, bypass-based binary arithmetic coding is performed on the MIP instruction information.
[0877] FIG. 70 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method illustrated in FIG. 69, and as illustrated in FIG. 70, when the current block supports a matrix-based intra-prediction mode, said method includes the following steps.
[0878] Step 7001: Before proceeding with prediction for the current block according to the matrix-based intra-prediction mode, bypass-based binary arithmetic decoding is performed on the MIP instruction information.
[0879] Step 7002: If it is determined that the current block activates the matrix-based intra prediction mode based on the MIP instruction information, a prediction is made for the current block based on the matrix-based intra prediction mode.
[0880] In an embodiment of the present invention, in MIP mode, bypass-based binary arithmetic coding or decoding is performed on all MIP instruction information under different conditions without considering whether the matrix-based intra-prediction mode of the upper block of the current block is activated and whether the matrix-based intra-prediction mode of the left block of the current block is activated, and without considering size conditions; that is, since context-based adaptive binary arithmetic coding or decoding is not performed, the number of context models required for MIP instruction information is reduced to zero, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0881] BDPCM mode
[0882] In related technologies, BDPCM technology has low flexibility because it lacks SPS level syntax to enable or disable BDPCM mode, and also lacks SPS level syntax to control the switch size of the maximum coding block that enables BDPCM mode.
[0883] First embodiment in BDPCM mode
[0884] FIG. 71 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 71, if the current block supports BDPCM mode, the method includes the following steps.
[0885] Step 7101: Before proceeding with BDPCM coding for the current block, coding is performed on the first BDPCM instruction information, and the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode.
[0886] In one example, the first BDPCM instruction information may exist in a sequence parameter set, an image parameter set, a slice level, or a tile level. Preferably, the first BDPCM instruction information exists in a sequence parameter set, that is, the first BDPCM instruction information is an SPS level syntax.
[0887] In another embodiment, the coding unit may code range indication information, and the range indication information indicates the range of a processing unit that supports BDPCM mode. The range indication information may exist in a sequence parameter set, an image parameter set, a slice level, or a Tile level.
[0888] FIG. 72 is a flowchart of a decoding method provided in an embodiment of the present invention, and the method is applied to a decoding unit, and the method is a decoding method corresponding to the coding method shown in FIG. 71, and as shown in FIG. 72, if the current block supports BDPCM mode, the method includes the following steps.
[0889] Step 7201: Before proceeding with BDPCM decoding for the current block, decoding is performed on the first BDPCM instruction information, and the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode.
[0890] Step 7202: Decoding is performed on the current processing unit according to the first BDPCM instruction information.
[0891] In one example, if the first BDPCM instruction information indicates that the current processing unit supports BDPCM mode, processing is performed on the current processing unit by BDPCM mode.
[0892] In one example, the first BDPCM instruction information may exist in a sequence parameter set, an image parameter set, a slice level, or a tile level. Preferably, the first BDPCM instruction information exists in a sequence parameter set, that is, the first BDPCM instruction information is an SPS level syntax.
[0893] In another embodiment, the decoding unit may perform decoding on range indication information, and the range indication information indicates the range of a processing unit that supports BDPCM mode. The range indication information may exist in a sequence parameter set, an image parameter set, a slice level, or a Tile level.
[0894] In an embodiment of the present invention, the flexibility of the coding and decoding process is improved by adding one syntax to enable or disable the BDPCM mode. Additionally, one more syntax is added to indicate the range of processing units that support the BDPCM mode.
[0895] Second embodiment in BDPCM mode
[0896] FIG. 73 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 73, if the current block supports BDPCM mode, the method includes the following steps.
[0897] Step 7301: Before proceeding with BDPCM processing for the current block, code is performed for the second BDPCM instruction information, and the second BDPCM instruction information indicates the size range of the processing unit that supports BDPCM mode.
[0898] Here, the range of the unit among the current processing units may be at the sequence level, image parameter set, or block level, etc. For example, the current processing unit is the current image block.
[0899] For example, the above size range may be a size range smaller than 32*32.
[0900] In one example, the second BDPCM instruction information indicates the maximum size of a processing unit capable of supporting BDPCM mode, that is, the maximum size of a processing unit capable of using BDPCM mode. For example, the maximum size is 32*32.
[0901] In one example, the second BDPCM instruction information may exist in a sequence parameter set (SPS), an image parameter set, a slice level, or a tile level. Preferably, the second BDPCM instruction information exists in the sequence parameter set, that is, the second BDPCM instruction information is a syntax added to the SPS level.
[0902] FIG. 74 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 73, and as shown in FIG. 74, if the current block supports BDPCM mode, said method includes the following steps.
[0903] Step 7401: Before proceeding with BDPCM processing for the current block, decoding is performed on the second BDPCM instruction information, and the second BDPCM instruction information indicates the size range of the processing unit that supports BDPCM mode.
[0904] Step 7402: Determine whether the current block can proceed with BDPCM processing based on the second BDPCM instruction information and the size of the current block.
[0905] In one example, if the size of the current block is within the size range of a processing unit supporting the BDPCM mode indicated by the second BDPCM instruction information, it is determined that the current block can proceed with BDPCM processing. If the size of the current block is not within the size range of a processing unit supporting the BDPCM mode indicated by the second BDPCM instruction information, it is determined that the current block cannot proceed with BDPCM processing.
[0906] In one example, the second BDPCM instruction information indicates the maximum size of a processing unit capable of supporting BDPCM mode, and if the size of the current block is smaller than or equal to the maximum size indicated by the second BDPCM instruction information, it is determined that the current block can proceed with BDPCM processing. If the size of the current block is larger than the maximum size indicated by the second BDPCM instruction information, it is determined that the current block cannot proceed with BDPCM processing.
[0907] In one example, the second BDPCM instruction information may exist in a sequence parameter set (SPS), an image parameter set, a slice level, or a tile level. Preferably, the second BDPCM instruction information exists in the sequence parameter set, that is, the second BDPCM instruction information is a syntax added to the SPS level.
[0908] In an embodiment of the present invention, the flexibility of the coding and decoding process is improved by controlling the size range in which the BDPCM mode can be used by adding one syntax.
[0909] Third embodiment in BDPCM mode
[0910] In BDPCM mode, the syntax element transmitted between the coding unit and the decoding unit may further include third BDPCM instruction information and fourth BDPCM instruction information. The third BDPCM instruction information indicates whether the BDPCM mode of the current processing unit is enabled, and the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode. For example, the third BDPCM instruction information is Intra_bdpcm_flag, and the fourth BDPCM instruction information is Intra_bdpcm_dir_flag.
[0911] In the relevant technology, when the current block supports BDPCM mode and determines the progress of coding or decoding of the third BDPCM instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding for the third BDPCM instruction information must be performed by one context model; and when determines the progress of coding or decoding of the fourth BDPCM instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding for the fourth BDPCM instruction information must be performed by another different context model. That is, coding and decoding for the third BDPCM instruction information and the fourth BDPCM instruction information must be performed using two context models, as shown in Table 46 below. Syntax element Bin Idx 0 1 2 3 4 5 Intra_bdpcm_flag[ ][ ] 0 na na na na na Intra_bdpcm_dir_flag[ ][ ] 0 na na na na na
[0912] FIG. 75 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 75, if the current block supports BDPCM mode, the method includes the following steps.
[0913] Step 7501: Before proceeding with BDPCM coding for the current block, context-based adaptive binary arithmetic coding is performed on the third BDPCM instruction information by a context model, depending on whether the BDPCM mode of the current block is enabled.
[0914] In one example, if the current block satisfies the condition of differential PCM coding of residuals after block-based quantization, the RDO determines whether to activate the BDPCM mode, i.e., whether to use the differential PCM coding method of residuals after quantization, and the third BDPCM instruction information can be coded in the code stream to indicate whether the current block's BDPCM mode is activated.
[0915] Step 7502: When it is determined that the current block activates BDPCM mode, bypass-based binary arithmetic coding is performed on the fourth BDPCM instruction information according to the index information of the predicted direction of BDPCM mode.
[0916] Here, the prediction direction of the BDPCM mode includes the horizontal prediction direction and the vertical prediction direction.
[0917] In one example, the coding unit determines the prediction direction through RDO, and depending on the selected prediction direction, codes the fourth BDPCM instruction information in the code stream to indicate the prediction direction of the BDPCM mode.
[0918] FIG. 76 is a flowchart of a decoding method provided in an embodiment of the present invention, said method is applied to a decoding unit, said method is a decoding method corresponding to the coding method shown in FIG. 75, and as shown in FIG. 76, if the current block supports BDPCM mode, said method includes the following steps.
[0919] Step 7601: After performing block-based quantization on the current block and before performing differential PCM decoding of the residuals, context-based adaptive binary arithmetic decoding is performed on the third BDPCM instruction information by a context model.
[0920] In one example, the decoding unit can receive the code stream of the current block, and if the current block satisfies the interpretation condition, it interprets the third BDPCM instruction information to determine whether to enable the BDPCM mode of the current block.
[0921] Here, the interpretation condition includes the fact that the current block size satisfies a predetermined size condition. Of course, the above interpretation condition is not limited to the above condition and may include other conditions.
[0922] Step 7602: When the third BDPCM instruction information indicates that the current block has activated BDPCM mode, bypass-based binary arithmetic decoding is performed on the fourth BDPCM instruction information, and the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode.
[0923] If the current block has activated BDPCM mode, the prediction direction must be determined by further interpreting the 4th BDPCM instruction information.
[0924] Step 7603: BDPCM processing is performed on the current block according to the predicted direction indicated by the 4th BDPCM instruction information.
[0925] In one example, the decoding unit can obtain residual data after quantization through a reverse accumulation process, then perform inverse quantization and add the predicted value to obtain the reconstructed pixel value.
[0926] In one example, the coding and decoding methods for the third BDPCM instruction information and the fourth BDPCM instruction information are as shown in Table 47 below. Syntax element Bin Idx 0 1 2 3 4 5 Intra_bdpcm_flag[ ][ ] 0 na na na na na Intra_bdpcm_dir_flag[ ][ ] Bypass na na na na na
[0927] In an embodiment of the present invention, the third BDPCM instruction information uses one context model and the fourth BDPCM instruction information uses a bypass-based binary arithmetic coding and decoding method, so the number of context models required for the third BDPCM instruction information and the fourth BDPCM instruction information is reduced to one, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0928] Fourth embodiment in BDPCM mode
[0929] FIG. 77 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to the coding stage, and as shown in FIG. 77, if the current block supports BDPCM mode, the method includes the following steps.
[0930] Step 7701: Before proceeding with BDPCM coding for the current block, bypass-based binary arithmetic coding is performed on the third BDPCM instruction information depending on whether the BDPCM mode of the current block is enabled.
[0931] In one example, if the current block satisfies the condition of differential PCM coding of residuals after block-based quantization, the current block can select whether to use the differential PCM coding method of residuals after quantization through rate distortion, and can indicate whether the current block's BDPCM mode is enabled by coding third BDPCM instruction information in the code stream.
[0932] Step 7702: When it is determined that the current block activates BDPCM mode, bypass-based binary arithmetic coding is performed on the fourth BDPCM instruction information according to the index information of the predicted direction of BDPCM mode.
[0933] Here, the prediction direction of the BDPCM mode includes the horizontal prediction direction and the vertical prediction direction.
[0934] In one example, the coding unit selects a prediction direction through rate distortion, and can indicate the prediction direction of the BDPCM mode by coding the fourth BDPCM instruction information in the code stream based on the selected prediction direction.
[0935] FIG. 78 is a flowchart of a decoding method provided in an embodiment of the present invention, the method is applied to a decoding unit, the method is a decoding method corresponding to the coding method illustrated in FIG. 77, and as illustrated in FIG. 78, if the current block supports BDPCM mode, the method includes the following steps.
[0936] Step 7801: Before proceeding with BDPCM decoding for the current block, perform bypass-based binary arithmetic decoding for the third BDPCM instruction information.
[0937] In one example, the decoding unit can receive the code stream of the current block, and if the current block satisfies the interpretation condition, it interprets the third BDPCM instruction information to determine whether to enable the BDPCM mode of the current block.
[0938] Here, the interpretation condition includes the fact that the current block size satisfies a predetermined size condition. Of course, the above interpretation condition is not limited to the above condition and may include other conditions.
[0939] Step 7802: When the third BDPCM instruction information indicates that the current block has activated BDPCM mode, bypass-based binary arithmetic decoding is performed on the fourth BDPCM instruction information, and the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode.
[0940] If the current block has activated BDPCM mode, the prediction direction must be determined by further interpreting the 4th BDPCM instruction information.
[0941] Step 7803: BDPCM processing is performed on the current block according to the predicted direction indicated by the 4th BDPCM instruction information.
[0942] In one example, the decoding unit can obtain residual data after quantization through a reverse accumulation process, then perform inverse quantization and add the predicted value to obtain the reconstructed pixel value.
[0943] In one example, the coding and decoding methods for the third BDPCM instruction information and the fourth BDPCM instruction information are as shown in Table 48 below. Syntax element Bin Idx 0 1 2 3 4 5 Intra_bdpcm_flag[ ][ ] Bypass na na na na na Intra_bdpcm_dir_flag[ ][ ] Bypass na na na na na
[0944] In an embodiment of the present invention, since both the third BDPCM instruction information and the fourth BDPCM instruction information use a bypass-based binary arithmetic coding and decoding method, the number of context models required for the third BDPCM instruction information and the fourth BDPCM instruction information is reduced to zero, thereby reducing the complexity of coding and decoding and reducing memory overhead.
[0945] Fifth embodiment in BDPCM mode
[0946] In BDPCM mode, the syntax element transmitted between the coding and decoding units further includes CBF indication information, which indicates whether the transformation block of the current block has non-zero transformation factors. For example, the CBF indication information is the cbf flag, or Tu_cbf_luma.
[0947] In the related technology, before proceeding with prediction for the current block based on intra-subblock prediction, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding can be performed on the CBF instruction information by the target context model. Here, the target context model is one context model selected from five different context models based on conditions such as whether intra-subblock prediction of the current block is enabled, whether the preceding one transformation block of the current block has a non-zero transformation coefficient, the partition depth of the transformation block of the current block, and whether the BDPCM mode of the current block is enabled.
[0948] Specifically, it is assumed that these five different context models include the first context model, the second context model, the third context model, the fourth context model, and the fifth context model. If the current block enables intra-subblock prediction, the target context model is one context model selected from the first context model and the second context model depending on whether the preceding transformation block of the current block has a non-zero transformation coefficient. For example, if the preceding transformation block of the current block has a non-zero transformation coefficient, the target context model is the first context model; and if the preceding transformation block of the current block does not have a non-zero transformation coefficient, the target context model is the second context model. If the current block does not enable intra-subblock prediction, or if the current block enables general intra prediction, the target context model is one context model selected from the third context model and the fourth context model depending on the partitioning depth of the transformation block of the current block. For example, if the partition depth of the current block's transformation block is greater than the preset partition depth, the target context model is the third context model; if the partition depth of the current block's transformation block is less than or equal to the preset partition depth, the target context model is the fourth context model. If the current block enables BDPCM mode, the target context model is the fifth context model.
[0949] In the related technology, since CBF instruction information requires the use of five context models, the complexity of coding and decoding is high and memory overhead is large due to the large number of required context models.
[0950] FIG. 79 is a flowchart of a coding method provided in an embodiment of the present invention, and the method is applied to a coding unit, and as shown in FIG. 79, the method includes the following steps.
[0951] Step 7901: When the current block activates intra-subblock prediction, and the coding of CBF instruction information is determined, context-based adaptive binary arithmetic coding of CBF instruction information is performed by the target context model, wherein the target context model is one context model selected from two different context models included in the first set of context models depending on whether the preceding transformation blo...
Claims
Claim 1 In a decoding method, decoding is performed on a first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode and the first BDPCM instruction information exists in a sequence parameter set; if the identification value of the first BDPCM instruction information is a first value, it is determined that the current processing unit supports BDPCM mode; if the identification value of the first BDPCM instruction information is a second value, it is determined that the current processing unit does not support BDPCM mode; and if the current processing unit supports BDPCM mode, decoding is performed on a second BDPCM instruction information, wherein the second BDPCM instruction information indicates a size range of an image block that supports BDPCM mode and the second BDPCM instruction information exists in the sequence parameter set.The method includes a step of performing decoding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information, wherein the step of performing decoding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information includes a step of determining whether the current processing unit supports decoding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit, wherein the step of determining whether the current processing unit supports decoding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit includes a step of determining that the current processing unit can support BDPCM mode if the identification value of the first BDPCM instruction information is a first value and, according to the size range indicated by the second BDPCM instruction information and the size of the current processing unit, it is determined that the size of the current processing unit is within the size range, and wherein, if the current processing unit can support BDPCM mode, regarding the third BDPCM instruction information A decoding method comprising: a step of performing decoding, wherein the third BDPCM instruction information indicates whether the current processing unit's BDPCM mode is activated; a step of performing decoding for the fourth BDPCM instruction information when the third BDPCM instruction information indicates that the current processing unit activates the BDPCM mode, wherein the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode; and a step of performing BDPCM processing for the current processing unit according to the prediction direction indicated by the fourth BDPCM instruction information, wherein the prediction direction of the BDPCM mode includes a horizontal prediction direction and a vertical prediction direction. Claim 2 A decoding method according to claim 1, wherein the second BDPCM instruction information also indicates the maximum size of a processing unit capable of supporting BDPCM mode. Claim 3 A decoding method according to paragraph 2, characterized in that the maximum size of the processing unit capable of supporting BDPCM mode is 32*32. Claim 4 A decoding method according to claim 1, wherein the method further comprises the step of performing context-based adaptive binary arithmetic decoding on CBF instruction information by a target context model when the current processing unit decides to proceed with decoding of CBF instruction information when the current processing unit activates BDPCM mode, wherein the CBF instruction information indicates whether the conversion block of the current processing unit has a non-zero conversion coefficient, and the target context model is a context model among a first set of context models. Claim 5 A decoding method characterized in that, in any one of claims 1 to 4, the current processing unit is a current image block. Claim 6 In a coding method, the method comprises the steps of: coding for a first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode and the first BDPCM instruction information exists in a sequence parameter set; determining that the current processing unit supports BDPCM mode when the identification value of the first BDPCM instruction information is a first value; determining that the current processing unit does not support BDPCM mode when the identification value of the first BDPCM instruction information is a second value; and determining that the current processing unit supports BDPCM mode and proceeding with coding for a second BDPCM instruction information, wherein the second BDPCM instruction information indicates a size range of an image block that supports BDPCM mode and the second BDPCM instruction information exists in the sequence parameter set.The method includes a step of performing coding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information, wherein the step of performing coding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information includes a step of determining whether the current processing unit supports coding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit, wherein the step of determining whether the current processing unit supports coding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit includes a step of determining that the current processing unit can support BDPCM mode if the identification value of the first BDPCM instruction information is a first value and, according to the size range indicated by the second BDPCM instruction information and the size of the current processing unit, it is determined that the size of the current processing unit is within the size range, and wherein, if the current processing unit can support BDPCM mode, the method performs coding for the third BDPCM instruction information, wherein the third A coding method characterized in that the BDPCM instruction information further includes a step of indicating whether the current processing unit's BDPCM mode is activated; and when the third BDPCM instruction information instructs the current processing unit to activate the BDPCM mode, the method proceeds with coding for the fourth BDPCM instruction information, wherein the fourth BDPCM instruction information further includes a step of indicating index information of the prediction direction of the BDPCM mode, and the prediction direction of the BDPCM mode includes a horizontal prediction direction and a vertical prediction direction. Claim 7 A coding method according to claim 6, wherein the second BDPCM instruction information also indicates the maximum size of a processing unit capable of supporting BDPCM mode. Claim 8 A coding method according to claim 7, characterized in that the maximum size of the processing unit capable of supporting BDPCM mode is 32*32. Claim 9 In claim 6, when the third BDPCM instruction information instructs the current processing unit to activate the BDPCM mode, the method further comprises the step of performing context-based adaptive binary arithmetic coding for the CBF instruction information by a target context model when proceeding with the coding of the CBF instruction information; wherein the CBF instruction information indicates whether the transformation block of the processing unit has a non-zero transformation coefficient, and the target context model is a context model among a set of first context models. Claim 10 A coding method characterized in that, in any one of claims 6 to 9, the current processing unit is a current image block. Claim 11 In a decoding device, the first decoding module performs decoding on the first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode and the first BDPCM instruction information exists in a sequence parameter set; and if the identification value of the first BDPCM instruction information is the first value, it is determined that the current processing unit supports BDPCM mode; The decoding device is configured to determine that the current processing unit does not support BDPCM mode when the identification value of the first BDPCM instruction information is the second value; the decoding device is further configured to perform decoding on the second BDPCM instruction information when the current processing unit supports BDPCM mode, wherein the second BDPCM instruction information indicates the size range of an image block that supports BDPCM mode, and the second BDPCM instruction information exists in a sequence parameter set; the decoding device performs decoding on the current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information, wherein performing decoding on the current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information includes determining whether the current processing unit supports decoding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, and according to the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, the current processing Determining whether the unit supports decoding in BDPCM mode is further configured to include determining that the current processing unit can support BDPCM mode when the identification value of the first BDPCM instruction information is the first value, and the size of the current processing unit is determined to be within the size range indicated by the second BDPCM instruction information and the size of the current processing unit;The decoding device is characterized by: performing decoding on a third BDPCM instruction information when the current processing unit can support a BDPCM mode, wherein the third BDPCM instruction information is further configured to indicate whether the current processing unit activates the BDPCM mode; performing decoding on a fourth BDPCM instruction information when the third BDPCM instruction information indicates that the current processing unit activates the BDPCM mode, wherein the fourth BDPCM instruction information is further configured to indicate index information of the prediction direction of the BDPCM mode; and performing BDPCM processing on the current processing unit according to the prediction direction indicated by the fourth BDPCM instruction information, wherein the prediction direction of the BDPCM mode is further configured to include a horizontal prediction direction and a vertical prediction direction. Claim 12 In a coding device, the coding module performs coding on first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode, and the first BDPCM instruction information exists in a sequence parameter set; and if the identification value of the first BDPCM instruction information is a first value, it is determined that the current processing unit supports BDPCM mode; The coding device is configured to determine that the current processing unit does not support BDPCM mode when the identification value of the first BDPCM instruction information is the second value; the coding device is further configured to perform coding for the second BDPCM instruction information when the current processing unit supports BDPCM mode, wherein the second BDPCM instruction information indicates a size range of the processing unit that supports BDPCM mode, and the second BDPCM instruction information exists in a sequence parameter set; the coding device performs coding for the current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information, wherein performing coding for the current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information includes determining whether the current processing unit supports coding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, and determining whether the current processing unit supports coding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit. The method is further configured to include determining that the current processing unit can support a BDPCM mode when the identification value of the first BDPCM instruction information is the first value, and the size range indicated by the second BDPCM instruction information and the size of the current processing unit are determined to be within the size range.The coding device is characterized in that, if the current processing unit can support a BDPCM mode, it proceeds with coding for a third BDPCM instruction information, wherein the third BDPCM instruction information is further configured to indicate whether the current processing unit activates the BDPCM mode; and if the third BDPCM instruction information indicates that the current processing unit activates the BDPCM mode, the coding device proceeds with coding for a fourth BDPCM instruction information, wherein the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode, and the prediction direction of the BDPCM mode is further configured to include a horizontal prediction direction and a vertical prediction direction. Claim 13 In an electronic device, the processor; and memory for storing instructions executable by the processor are included, wherein the processor is configured to execute the following decoding method, wherein decoding is performed on a first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports a BDPCM mode, and the first BDPCM instruction information exists in a sequence parameter set; wherein if the identification value of the first BDPCM instruction information is a first value, the current processing unit is determined to support a BDPCM mode; and if the identification value of the first BDPCM instruction information is a second value, the current processing unit is determined not to support a BDPCM mode; and wherein if the current processing unit supports a BDPCM mode, decoding is performed on a second BDPCM instruction information, wherein the second BDPCM instruction information indicates a size range of an image block that supports a BDPCM mode, and the second BDPCM instruction information exists in a sequence parameter set.The method includes a step of performing decoding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information, wherein the step of performing decoding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information includes a step of determining whether the current processing unit supports decoding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit, wherein the step of determining whether the current processing unit supports decoding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit includes a step of determining that the current processing unit can support BDPCM mode if the identification value of the first BDPCM instruction information is a first value and, according to the size range indicated by the second BDPCM instruction information and the size of the current processing unit, it is determined that the size of the current processing unit is within the size range, and wherein, if the current processing unit can support BDPCM mode, regarding the third BDPCM instruction information An electronic device characterized by further comprising: a step of performing decoding, wherein the third BDPCM instruction information indicates whether the current processing unit's BDPCM mode is activated; a step of performing decoding for the fourth BDPCM instruction information when the third BDPCM instruction information indicates that the current processing unit activates the BDPCM mode, wherein the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode; and a step of performing BDPCM processing for the current processing unit according to the prediction direction indicated by the fourth BDPCM instruction information, wherein the prediction direction of the BDPCM mode includes a horizontal prediction direction and a vertical prediction direction. Claim 14 In an electronic device, the processor; and memory for storing instructions executable by the processor are included, wherein the processor is configured to execute the following coding method, wherein coding is performed on first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode, and the first BDPCM instruction information exists in a sequence parameter set; wherein if the identification value of the first BDPCM instruction information is a first value, it is determined that the current processing unit supports BDPCM mode; and if the identification value of the first BDPCM instruction information is a second value, it is determined that the current processing unit does not support BDPCM mode; and wherein, if the current processing unit supports BDPCM mode, coding is performed on second BDPCM instruction information, wherein the second BDPCM instruction information indicates a size range of the processing unit supporting BDPCM mode, and the second BDPCM instruction information exists in a sequence parameter set.The method includes a step of performing coding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information, wherein the step of performing coding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information includes a step of determining whether the current processing unit supports coding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit, wherein the step of determining whether the current processing unit supports coding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit includes a step of determining that the current processing unit can support BDPCM mode if the identification value of the first BDPCM instruction information is a first value and, according to the size range indicated by the second BDPCM instruction information and the size of the current processing unit, it is determined that the size of the current processing unit is within the size range, and wherein, if the current processing unit can support BDPCM mode, the method performs coding for the third BDPCM instruction information, wherein the third An electronic device characterized in that the BDPCM instruction information further includes a step of indicating whether the current processing unit's BDPCM mode is activated; and when the third BDPCM instruction information instructs the current processing unit to activate the BDPCM mode, coding is performed for the fourth BDPCM instruction information, wherein the fourth BDPCM instruction information further includes a step of indicating index information of the prediction direction of the BDPCM mode, and the prediction direction of the BDPCM mode includes a horizontal prediction direction and a vertical prediction direction. Claim 15 In a computer-readable storage medium, instructions are stored on the computer-readable storage medium, and when the instructions are executed by a processor, the following decoding method is implemented, and decoding is performed on first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode, and the first BDPCM instruction information exists in a sequence parameter set; and if the identification value of the first BDPCM instruction information is a first value, it is determined that the current processing unit supports BDPCM mode; A step of determining that the current processing unit does not support the BDPCM mode if the identification value of the first BDPCM instruction information is the second value; a step of proceeding with decoding for the second BDPCM instruction information if the current processing unit supports the BDPCM mode, wherein the second BDPCM instruction information indicates the size range of an image block supporting the BDPCM mode, and the second BDPCM instruction information exists in a sequence parameter set; wherein, if the size of the current processing unit is within the size range of an image block supporting the BDPCM mode indicated by the second BDPCM instruction information, it is determined that the current block can perform differential PCM processing (BDPCM processing) of residuals after block-based quantization; and if the size of the current processing unit is not within the size range of an image block supporting the BDPCM mode indicated by the second BDPCM instruction information, it is determined that the current block cannot perform differential PCM processing (BDPCM processing) of residuals after block-based quantization.The method includes a step of performing decoding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information, wherein the step of performing decoding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information includes a step of determining whether the current processing unit supports decoding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit, wherein the step of determining whether the current processing unit supports decoding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit includes a step of determining that the current processing unit can support BDPCM mode if the identification value of the first BDPCM instruction information is a first value and, according to the size range indicated by the second BDPCM instruction information and the size of the current processing unit, it is determined that the size of the current processing unit is within the size range, and wherein, if the current processing unit can support BDPCM mode, regarding the third BDPCM instruction information A computer-readable storage medium characterized by further comprising: a step of performing decoding, wherein the third BDPCM instruction information indicates whether the current processing unit's BDPCM mode is activated; a step of performing decoding for the fourth BDPCM instruction information when the third BDPCM instruction information indicates that the current processing unit activates the BDPCM mode, wherein the fourth BDPCM instruction information indicates index information of the prediction direction of the BDPCM mode; and a step of performing BDPCM processing for the current processing unit according to the prediction direction indicated by the fourth BDPCM instruction information, wherein the prediction direction of the BDPCM mode includes a horizontal prediction direction and a vertical prediction direction. Claim 16 In a computer-readable storage medium, instructions are stored on the computer-readable storage medium, and when the instructions are executed by a processor, the following coding method is implemented, wherein coding is performed on a first BDPCM instruction information, wherein the first BDPCM instruction information indicates whether the current processing unit supports BDPCM mode, and the first BDPCM instruction information exists in a sequence parameter set; wherein if the identification value of the first BDPCM instruction information is a first value, the first BDPCM instruction information indicates that the current processing unit supports BDPCM mode; wherein if the identification value of the first BDPCM instruction information is a second value, the first BDPCM instruction information indicates that the current processing unit does not support BDPCM mode; and wherein, if the current processing unit supports BDPCM mode, coding is performed on a second BDPCM instruction information, wherein the second BDPCM instruction information indicates a size range of the processing unit supporting BDPCM mode, and the second BDPCM instruction information exists in a sequence parameter set.The method includes a step of performing coding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information, wherein the step of performing coding for a current processing unit according to the first BDPCM instruction information and the second BDPCM instruction information includes a step of determining whether the current processing unit supports coding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit, wherein the step of determining whether the current processing unit supports coding in BDPCM mode according to the first BDPCM instruction information, the second BDPCM instruction information and the size of the current processing unit includes a step of determining that the current processing unit can support BDPCM mode if the identification value of the first BDPCM instruction information is a first value and, according to the size range indicated by the second BDPCM instruction information and the size of the current processing unit, it is determined that the size of the current processing unit is within the size range, and wherein, if the current processing unit can support BDPCM mode, the method performs coding for the third BDPCM instruction information, wherein the third A computer-readable storage medium characterized by the following: the BDPCM instruction information further includes a step of indicating whether the current processing unit is activating the BDPCM mode; and when the third BDPCM instruction information instructs the current processing unit to activate the BDPCM mode, coding is performed for the fourth BDPCM instruction information, wherein the fourth BDPCM instruction information further includes a step of indicating index information of the prediction direction of the BDPCM mode, and the prediction direction of the BDPCM mode includes a horizontal prediction direction and a vertical prediction direction.
