Encoding and decoding methods, apparatus, and storage media
By employing bypass-based and context-based adaptive binary arithmetic encoding/decoding strategies for specific syntax elements, the complexity and memory overhead in image encoding/decoding are reduced, enhancing efficiency and reducing the number of context models needed.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2026-02-26
- Publication Date
- 2026-05-01
AI Technical Summary
The existing image encoding and decoding technologies require numerous context models, leading to high complexity and large memory overhead due to context-based adaptive binary arithmetic encoding and decoding processes for different syntax elements, which need to be optimized.
Implementing bypass-based binary arithmetic encoding or decoding for certain syntax elements and context-based adaptive binary arithmetic encoding or decoding for others, using a single context model for specific conditions, to reduce the number of context models required.
This approach reduces memory overhead and complexity by optimizing the encoding and decoding processes, while maintaining effective image reconstruction.
Smart Images

Figure 2026074306000001_ABST
Abstract
Description
Technical Field
[0001] The present invention claims the priority of the Chinese patent application with application number 201910545251.0 and invention title "Method, apparatus, and storage medium for encoding and decoding" filed on June 21, 2019, and all its contents are incorporated herein by reference.
[0002] The present invention relates to the field of image processing technology, and particularly to a method, apparatus, and storage medium for encoding and decoding.
Background Art
[0003] Currently, in the field of image encoding and decoding technology, when the encoding side encodes an image block, usually, some syntax elements are encoded using a context model, and these syntax elements need to be transmitted to the decoding side in the encoding stream of the image block. After the decoding side receives the encoding stream of the image block, these syntax elements need to be analyzed according to the same context model as the encoding side, and an image needs to be reconstructed 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 is used to indicate whether to activate the intra-sub-block prediction mode, and the second ISP instruction information is used to indicate the sub-block division method of the intra-sub-block prediction mode.
[0004] However, for different syntax elements, it may be necessary to perform context-based adaptive binary arithmetic encoding and decoding based on different context models, and for the same syntax element, in different situations, it may also be necessary to perform context-based adaptive binary arithmetic encoding and decoding based on different context models. In this way, in the encoding and decoding process, more context models need to be used, the complexity of the encoding and decoding process is high, and the memory overhead is large.
Summary of the Invention
[0005] Embodiments of the present invention provide an encoding / decoding method and storage medium to solve the problem of large memory overhead associated with the numerous context models required in the encoding / decoding process in related technologies. The proposed technology is as follows.
[0006] In one aspect, when it is determined to encode or decode the first ISP instruction information, context-based adaptive binary arithmetic encoding or context-based adaptive binary arithmetic decoding is performed on the first ISP instruction information based on a context model, and the first ISP instruction information is used to indicate whether to activate the intra subblock prediction mode.
[0007] The process includes, when it is determined to encode or decode a second ISP instruction information, performing bypass-based binary arithmetic encoding or decoding on the second ISP instruction information, wherein the second ISP instruction information is used to specify a subblock partitioning scheme for an intra-subblock prediction mode, Regarding encoding and decoding methods.
[0008] In one aspect, when it is determined to encode or decode the first ISP instruction information, the first ISP instruction information is subjected to bypass-based binary arithmetic encoding or decoding, and the first ISP instruction information is used to indicate whether or not to activate the intra subblock prediction mode. When it is determined to encode or decode a second ISP instruction information, the second ISP instruction information is subjected to bypass-based binary arithmetic encoding or decoding, the second ISP instruction information is used to indicate the subblock partitioning type of the intra subblock prediction mode, including: Regarding encoding and decoding methods.
[0009] On one side, 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-row prediction mode. Regarding encoding and decoding methods.
[0010] In one feasible embodiment of the present invention, if the width and height of the current block are 4*4, the current block does not support multi-row prediction mode.
[0011] In one aspect, if the current block supports a multi-row prediction mode, and the number of candidate reference rows corresponding to the multi-row prediction mode is 3, and the reference row indication information corresponding to the multi-row prediction mode occupies a maximum of 2 bits, and the reference row indication information is used to indicate the index information of the target reference row used when making a prediction of the current block based on the multi-row prediction mode, Based on a single context model, context-based adaptive binary arithmetic coding or adaptive binary arithmetic decoding is performed on the first bit of the reference row instruction information, This includes performing bypass-based binary arithmetic encoding or decoding on the second bit of the reference line instruction information when it is necessary to encode or decode the second bit of the reference line instruction information. Regarding encoding and decoding methods.
[0012] In one aspect, if the current block supports a multi-row prediction mode, the number of candidate reference rows corresponding to the multi-row prediction mode is 3, the reference row indication information corresponding to the multi-row prediction mode occupies a maximum of 3 bits, and the reference row indication information is used to indicate the index information of the target reference row used when making a prediction of the current block based on the multi-row prediction mode, Based on a single context model, context-based adaptive binary arithmetic coding or adaptive binary arithmetic decoding is performed on the first bit of the reference row instruction information, When it is necessary to encode or decode the second bit of the reference line instruction information, the second bit of the reference line instruction information is subjected to bypass-based binary arithmetic encoding or decoding. This includes performing bypass-based binary arithmetic encoding or decoding on the third bit of the reference line instruction information when it is necessary to encode or decode the third bit of the reference line instruction information. Regarding encoding and decoding methods.
[0013] In one aspect, the current block supports a multi-row prediction mode, and the number of candidate reference rows corresponding to the multi-row prediction mode is 3, where the candidate reference row with index information 0 is row 0, and row 0 is the row adjacent to the boundary of the current block; the candidate reference row with index information 1 is row 1, and row 1 is the next row adjacent to the boundary of the current block; the candidate reference row with index information 2 is row 2, and row 2 is the row adjacent to row 1, When predicting the current block based on the multi-row prediction mode, this includes predicting the current block based on the target reference row, Here, the target reference row is determined based on the reference row instruction information, If the index information indicated by the aforementioned reference row instruction information is 0, the target reference row is row 0. If the index information indicated by the aforementioned reference row instruction information is 1, the target reference row is the first row. If the index information indicated by the aforementioned reference row instruction information is 2, then the target reference row is the 2nd row. Regarding encoding and decoding methods.
[0014] In one aspect, it is determined that the current block activates multi-row prediction mode, and the number of candidate reference rows corresponding to the multi-row prediction mode is 3, where the candidate reference row with index information 0 is row 0, and row 0 is the row adjacent to the boundary of the current block, the candidate reference row with index information 1 is row 1, and row 1 is the next row adjacent to the boundary of the current block, the candidate reference row with index information 2 is row 2, and row 2 is the row adjacent to row 1, the candidate reference row with index information 3 is row 3, and row 3 is the row adjacent to row 2, When predicting the current block based on the multi-row prediction mode, this includes predicting the current block based on the target reference row, Here, the target reference row is determined based on the reference row instruction information, If the index information indicated by the aforementioned reference row instruction information is 0, the target reference row is row 0. If the index information indicated by the aforementioned reference row instruction information is 1, the target reference row is the second row. If the index information indicated by the aforementioned reference row instruction information is 2, then the target reference row is the 3rd row. Regarding encoding and decoding methods.
[0015] In one respect, if the current block supports multi-row prediction mode, Before predicting the current block based on the multi-row prediction mode, the row number indication information is decoded, and the row number indication information is used to indicate the number of candidate reference rows corresponding to the multi-row prediction mode. Based on the aforementioned row number indication information, the number of candidate reference rows corresponding to the multi-row prediction mode is determined, The target reference row is determined based on the number of candidate reference rows corresponding to the multi-row prediction mode and the reference row instruction information, and the reference row instruction information is used to indicate the index information of the target reference row used when making the prediction of the current block based on the multi-row prediction mode, Predicting the current block based on the target reference line; including a method of decoding.
[0016] In one possible implementation of the present invention, the line number indication information exists in a sequence parameter set, an image parameter set, a slice level, or a Tile level.
[0017] When the current block activates the affine prediction mode or another prediction mode other than the affine prediction mode, when encoding or decoding the motion vector difference of the current block, if the current block supports the adaptive motion vector accuracy AMVR mode, when encoding or decoding the first AMVR indication information, based on the first context model, perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the first AMVR indication information, and the first AMVR indication information is used to indicate whether to activate the AMVR mode; When the first AMVR indication information indicates that the current block activates the AMVR mode, based on the second context model, perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the second AMVR indication information, and the second AMVR indication information is used to indicate the pixel accuracy index information used when encoding or decoding the motion vector difference in the AMVR mode, and the first context model and the second context model are different, including a method of encoding and decoding.
[0018] On one side, when the current block activates the affine prediction mode, when encoding or decoding the motion vector difference of the current block, if the current block supports the AMVR mode, when encoding or decoding the first AMVR indication information, based on the first context model, perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the first AMVR indication information, and when the first AMVR indication information indicates that the current block activates the AMVR mode, perform bypass-based binary arithmetic coding or decoding on the second AMVR indication information; When the current block activates another prediction mode other than the affine prediction mode, when encoding or decoding the motion vector difference of the current block, if the current block supports the AMVR mode, when encoding or decoding the first AMVR indication information, based on the second context model, perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the first AMVR indication information, and when the first AMVR indication information indicates that the current block activates the AMVR mode, perform bypass-based binary arithmetic coding or decoding on the second AMVR indication information; including Here, the first context model and the second context model are different. The first AMVR indication information is used to indicate whether to activate the AMVR mode, and the second AMVR indication information is used to indicate the pixel accuracy index information used when encoding or decoding the motion vector difference in the AMVR mode. It relates to an encoding / decoding method characterized by the above.
[0019] In one aspect, if the current block activates an affine prediction mode or another prediction mode other than the affine prediction mode, when encoding or decoding the motion vector difference of the current block, if the current block supports the adaptive motion vector accuracy AMVR mode, when encoding or decoding the first AMVR instruction information, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information based on the first context model, and the first AMVR instruction information is used to indicate whether or not to activate the AMVR mode. The first AMVR instruction information is used to perform bypass-based binary arithmetic coding or decoding on a second AMVR instruction information when the current block is instructed to activate AMVR mode, and the second AMVR instruction information is used to instruct pixel-precision index information used when coding or decoding motion vector differences in AMVR mode, Regarding encoding and decoding methods.
[0020] In one aspect, if the current block triggers intra-subblock prediction, the target prediction mode of the intra-subblock prediction is present in the most likely intra-prediction mode MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, decoding is performed on the prediction mode index information, where the first bit of the prediction mode index information is obtained by context-based adaptive binary arithmetic decoding based on a first context model, and the other bits are obtained by bypass-based binary arithmetic decoding. Based on the prediction mode index information, the target prediction mode of the intra-subblock prediction initiated by the current block is determined from the MPM list, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list. Predicting the current block based on the aforementioned target prediction mode, or When the current block triggers conventional intra-prediction, the target prediction mode of the conventional intra-prediction is from the MPM list, and the current block is a luminance block, when predicting the current block based on the conventional intra-prediction, decoding is performed on the prediction mode index information, where the first bit of the prediction mode index information is obtained by context-based adaptive binary arithmetic decoding based on a second context model, and the other bits are obtained by bypass-based binary arithmetic decoding, and the second and first context models are the same context model. Based on the prediction mode index information, the target prediction mode of the conventional intra prediction initiated by the current block is determined from the MPM list, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list. Predicting the current block based on the aforementioned target prediction mode, This concerns decryption methods, including [specific details].
[0021] In one aspect, when the current block initiates intra-subblock prediction, if the target prediction mode for the intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, decoding is performed on the prediction mode index information, where all bits of the prediction mode index information are obtained by performing binary arithmetic decoding based on bypass. Based on the prediction mode index information, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list, and the prediction mode index information is used to indicate the index information for the target prediction mode in the MPM list. Predicting the current block based on the aforementioned target prediction mode, or When the current block initiates conventional intra-prediction, if the target prediction mode of the conventional intra-prediction is from the MPM list, and the current block is a luminance block, then when predicting the current block based on the conventional intra-prediction, decoding is performed on the prediction mode index information, where all bits of the prediction mode index information are obtained by performing binary arithmetic decoding based on bypass. Based on the prediction mode index information, the target prediction mode of the conventional intra-prediction initiated by the current block is determined from the MPM list, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list. Predicting the current block based on the aforementioned target prediction mode, This concerns decryption methods, including [specific details].
[0022] In one aspect, when the current block initiates intra-subblock prediction, if the target prediction mode for the intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, decoding is performed on the prediction mode index information, where the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on one context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding. Based on the prediction mode index information, the target prediction mode of the intra-subblock prediction initiated by the current block is determined from the MPM list, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list. Predicting the current block based on the aforementioned target prediction mode, or When the current block triggers conventional intra-prediction, the target prediction mode of the conventional intra-prediction is from the MPM list, and the current block is a luminance block, when predicting the current block based on the conventional intra-prediction, decoding is performed on the prediction mode index information, where all bits of the prediction mode index information are obtained by performing binary arithmetic decoding based on bypass, Based on the prediction mode index information, the target prediction mode of the conventional intra prediction initiated by the current block is determined from the MPM list, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list. This includes predicting the current block based on the target prediction mode, Regarding the decryption method.
[0023] In one aspect, when the current block is a luminance block, when predicting the current block based on intra-subblock prediction, decoding is performed on the prediction mode index information, and all bits of the prediction mode index information are obtained by performing binary arithmetic decoding based on bypass. Based on the prediction mode index information, the target prediction mode of the intra-subblock prediction initiated by the current block is determined from the MPM list, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list. Predicting the current block based on the aforementioned target prediction mode, or When the current block triggers conventional intra-prediction, the target prediction mode of the conventional intra-prediction is from the MPM list, and the current block is a luminance block, when predicting the current block based on conventional intra-prediction, decoding is performed on the prediction mode index information, where the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on one context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding. Based on the prediction mode index information, the target prediction mode of the conventional intra prediction initiated by the current block is determined from the MPM list, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list. This includes predicting the current block based on the target prediction mode, Regarding the decryption method.
[0024] In one aspect, when the current block initiates intra-subblock prediction, if the target prediction mode for the intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, decoding is performed on the planar indication information, where the planar indication information is used to indicate whether the target prediction mode for the intra-subblock prediction initiated by the current block is a planar prediction mode, and the planar indication information is obtained by performing context-based adaptive binary arithmetic decoding based on a first context model. Based on the planar instruction information, when it is determined that the target prediction mode of the intra-subblock prediction activated by the current block is the planar prediction mode, the current block is predicted based on the planar prediction mode. Based on the planar instruction information, when it is determined that the target prediction mode for the intra-subblock prediction initiated by the current block is not the planar prediction mode, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list based on the prediction mode index information, and the current block is predicted based on the target prediction mode. or When the current block initiates conventional intra-prediction, if the target prediction mode of the conventional intra-prediction is from the MPM list and the current block is a luminance block, then when predicting the current block based on conventional intra-prediction, decoding is performed on the planar indication information, where the planar indication information is used to indicate whether the target prediction mode initiated by the current block is a planar prediction mode, and the planar indication information is obtained by performing context-based adaptive binary arithmetic decoding based on a second context model, and the first and second context models are the same. Based on the planar instruction information, when it is determined that the target prediction mode activated by the current block is a planar prediction mode, the current block is predicted based on the planar prediction mode. Based on the planar instruction information, when it is determined 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 based on the prediction mode index information, and the current block is predicted based on the target prediction mode. Regarding the decryption method.
[0025] In one aspect, when the current block initiates intra-subblock prediction, if the target prediction mode for the intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, decoding is performed on the planar indication information, where the planar indication information is used to indicate whether the target prediction mode for the intra-subblock prediction initiated by the current block is a planar prediction mode, and the planar indication information is obtained by performing binary arithmetic decoding based on bypass. Based on the planar instruction information, when it is determined that the target prediction mode of the intra-subblock prediction activated by the current block is the planar prediction mode, the current block is predicted based on the planar prediction mode. Based on the planar instruction information, when it is determined that the target prediction mode for the intra-subblock prediction initiated by the current block is not the planar prediction mode, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list based on the prediction mode index information, and the current block is predicted based on the target prediction mode. or When the current block activates conventional intra-prediction, and the target prediction mode of the conventional intra-prediction is from the MPM list, and the current block is a luminance block, when predicting the current block based on conventional intra-prediction, decoding is performed on the planar indication information, where the planar indication information is used to indicate whether the target prediction mode activated by the current block is a planar prediction mode, and the planar indication information is obtained by performing binary arithmetic decoding based on bypass. Based on the planar instruction information, when it is determined that the target prediction mode activated by the current block is a planar prediction mode, the current block is predicted based on the planar prediction mode. Based on the planar instruction information, when it is determined 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 based on the prediction mode index information, and the current block is predicted based on the target prediction mode. The present invention relates to a decoding method characterized by the following:
[0026] In one aspect, the current block supports cross-component prediction mode, the current block activates cross-component prediction mode, and the current block is a chromaticity block, When predicting the current block based on the cross-component prediction mode, decoding is performed on the chromaticity prediction mode index information, which is used to indicate the index of the target prediction mode of the current block in the corresponding candidate prediction mode list, wherein the first bit of the chromaticity prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on a first context model, the second bit of the chromaticity prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on a second context model, the first and second context models are different, and the third and fourth bits of the chromaticity prediction mode index information are obtained by performing bypass-based binary arithmetic decoding. Based on the aforementioned chromaticity prediction mode index information, the target prediction mode for the current block is determined from the candidate prediction mode list, Predicting the current block based on the aforementioned target prediction mode, including, Regarding the decryption method.
[0027] In one aspect, the current block supports cross-component prediction mode, the current block activates cross-component prediction mode, and the current block is a chromaticity block, When predicting the current block based on the cross-component prediction mode, decoding is performed on the chromaticity prediction mode index information, which is used to indicate the index of the target prediction mode of the current block in the corresponding candidate prediction mode list, wherein the first bit of the chromaticity prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on one context model, and the second, third, and fourth bits of the chromaticity prediction mode index information are obtained by performing bypass-based binary arithmetic decoding. Based on the aforementioned chromaticity prediction mode index information, the target prediction mode for the current block is determined from the candidate prediction mode list, Predicting the current block based on the aforementioned target prediction mode, including, Regarding the decryption method.
[0028] In one aspect, the current block supports cross-component prediction mode, the current block activates cross-component prediction mode, and the current block is a chromaticity block, When predicting the current block based on the cross-component prediction mode, decoding is performed on the chromaticity prediction mode index information, and the chromaticity prediction mode index information is used to indicate the index of the target prediction mode for the current block in the corresponding candidate prediction mode list. Based on the chromaticity prediction mode index information, the target prediction mode for the current block is determined from the candidate prediction mode list. Here, if the chromaticity prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode. When the chromaticity prediction mode index information is 110, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 111, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 11110, the target prediction mode is the planar prediction mode. When the chromaticity prediction mode index information is 111110, the target prediction mode is the vertical prediction mode. When the chromaticity prediction mode index information is 1111110, the target prediction mode is the horizontal prediction mode. When the chromaticity prediction mode index information is 1111111, the target prediction mode is DC prediction mode, Predicting the current block based on the aforementioned target prediction mode, including, Regarding encoding and decoding methods.
[0029] In one aspect, the current block supports cross-component prediction mode, the current block activates cross-component prediction mode, and the current block is a chromaticity block, When predicting the current block based on the cross-component prediction mode, decoding is performed on the chromaticity prediction mode index information, and the chromaticity prediction mode index information is used to indicate the index of the target prediction mode for the current block in the corresponding candidate prediction mode list. Based on the chromaticity prediction mode index information, the target prediction mode for the current block is determined from the candidate prediction mode list. Here, if the chromaticity prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode. When the chromaticity prediction mode index information is 110, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 111, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 111100, the target prediction mode is the planar prediction mode. When the chromaticity prediction mode index information is 111101, the target prediction mode is the vertical prediction mode. When the chromaticity prediction mode index information is 111110, the target prediction mode is the horizontal prediction mode. When the chromaticity prediction mode index information is 111111, the target prediction mode is DC prediction mode, This includes predicting the current block based on the target prediction mode, Regarding the decryption method.
[0030] In one aspect, when the luminance and chromaticity of the current block share a single subdivision tree, and the width and height of the luminance block corresponding to the current block is 64*64 and the size of the chromaticity block corresponding to the current block is 32*32, the current block does not support cross-component prediction mode. Regarding encoding and decoding methods.
[0031] In one aspect, if the current block supports an adaptive loop filter ALF and the current block is a luminance block, before performing filtering on the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the target context model, where the ALF instruction information is used to indicate whether the current block activates ALF, and 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 block above the current block activates ALF and whether the block to the left of the current block activates ALF. or If the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the target context model before filtering the current block based on the ALF mode, wherein the target context model is one context model selected from three different context models included in a second set of context models, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF, and the three context models included in the second set of context models and the three context models included in the first set of context models are different. Regarding the decryption method.
[0032] In one aspect, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the target context model before filtering the current block based on the ALF mode, where the ALF instruction information is used to indicate whether the current block activates ALF, and 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 block above the current block activates ALF and whether the block to the left of the current block activates ALF. or If the current block supports ALF and the current block is a chromaticity block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the target context model, wherein the target context model is one context model selected from three different context models included in a second set of context models, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF, and the three context models included in the second set of context models and the three context models included in the first set of context models are the same. Regarding the decryption method.
[0033] In one aspect, if the current block supports ALF and the current block is a luminance block, before performing filtering on the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a first context model, and the ALF instruction information is used to indicate whether the current block activates ALF. or If the current block supports ALF and the current block is a chromaticity block, then, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a second context model, wherein the second context model and the first context model are different. Regarding the decryption method.
[0034] In one aspect, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the target context model before filtering the current block based on the ALF mode, where the ALF instruction information is used to indicate whether the current block activates ALF, and 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 block above the current block activates ALF and whether the block to the left of the current block activates ALF. or If the current block supports ALF and the current block is a CB chromaticity block, before performing filtering on the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the first context model. or If the current block supports ALF and the current block is a CR chromaticity block, before performing filtering on the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a second context model, wherein the context models included in the first context model set, the first context model and the second context model are different context models. Regarding the decryption method.
[0035] In one aspect, if the current block supports ALF and the current block is a luminance block, before performing filtering on the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a first context model, and the ALF instruction information is used to indicate whether the current block activates ALF. or If the current block supports ALF and the current block is a CB chromaticity block, before performing filtering on the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a second context model. or If the current block supports ALF and the current block is a CR chromaticity block, then, before performing filtering on the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a third context model, wherein the first, second, and third context models are different context models. The present invention relates to a decoding method characterized by the following:
[0036] In one aspect, if the current block supports ALF and the current block is a luminance block, before performing filtering on the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a first context model, and the ALF instruction information is used to indicate whether the current block activates ALF. or If the current block supports ALF and the current block is a chromaticity block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a second context model, wherein the second context model and the first context model are the same context model, Regarding the decryption method.
[0037] In one aspect, if the current block supports ALF and the current block is a luminance block, before performing filtering on the current block based on the ALF mode, the ALF instruction information is subjected to bypass-based binary arithmetic decoding, and the ALF instruction information is used to indicate whether the current block activates ALF. or If the current block supports ALF and the current block is a chromaticity block, the process includes performing bypass-based binary arithmetic decoding on the ALF indicator information before performing filtering on the current block based on the ALF mode. Regarding the decryption method.
[0038] In one aspect, if the current block supports ALF and the current block is a luminance block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a context model, and the ALF instruction information is used to indicate whether the current block activates ALF. or If the current block supports ALF, the current block activates ALF, and the current block is a chromaticity block, the process includes performing bypass-based binary arithmetic decoding on the ALF instruction information before performing filtering on the current block based on the ALF mode. Regarding the decryption method.
[0039] In one aspect, if the current block supports ALF and the current block is a luminance block, before performing filtering on the current block based on the ALF mode, the ALF instruction information is subjected to bypass-based binary arithmetic decoding, and the ALF instruction information is used to indicate whether the current block activates ALF. or If the current block supports ALF and the current block is a chromaticity block, the process includes performing context-based adaptive binary arithmetic decoding on the ALF instruction information based on a context model before performing filtering on the current block based on the ALF mode. Regarding the decryption method.
[0040] On one side, if the width and height of the current block are 32*32, the current block does not support an intra-prediction mode based on a matrix, Regarding encoding and decoding methods.
[0041] In one respect, if the current block supports a matrix-based intra-prediction mode, Before predicting the current block based on the matrix-based intra-prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information based on the target context model, where the MIP instruction information is used to indicate whether the current block activates the matrix-based intra-prediction mode, and the target context model is one context model selected from three different context models depending on whether the block above the current block activates the matrix-based intra-prediction mode and whether the block to the left of the current block activates the matrix-based intra-prediction mode. If, based on the MIP instruction information, it is determined that the current block will activate a matrix-based intra-prediction mode, the matrix-based intra-prediction mode includes predicting the current block, Regarding the decryption method.
[0042] In one respect, if the current block supports a matrix-based intra-prediction mode, Before predicting the current block based on the matrix-based intra-prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information based on the target context model, where the MIP instruction information is used to indicate whether the current block activates the matrix-based intra-prediction mode, 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. If, based on the MIP instruction information, it is determined that the current block will activate a matrix-based intra-prediction mode, the matrix-based intra-prediction mode includes predicting the current block, Regarding the decryption method.
[0043] In one respect, if the current block supports a matrix-based intra-prediction mode, Before predicting the current block based on the matrix-based intra-prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information based on the same context model, and the MIP instruction information is used to indicate whether the current block activates the matrix-based intra-prediction mode. If, based on the MIP instruction information, it is determined that the current block will activate a matrix-based intra-prediction mode, the matrix-based intra-prediction mode includes predicting the current block, Regarding the decryption method.
[0044] In one respect, if the current block supports a matrix-based intra-prediction mode, Before predicting the current block based on the matrix-based intra-prediction mode, bypass-based binary arithmetic decoding is performed on the MIP instruction information, and the MIP instruction information is used to indicate whether the current block activates the matrix-based intra-prediction mode. If, based on the MIP instruction information, it is determined that the current block will activate a matrix-based intra-prediction mode, the matrix-based intra-prediction mode includes predicting the current block, Regarding the decryption method.
[0045] In one aspect, decoding is performed on the first BDPCM instruction information, and the first BDPCM instruction information is used to indicate whether the current processing unit supports the BDPCM mode. This includes performing decoding on the current processing unit based on the first BDPCM instruction information, Regarding the decryption method.
[0046] In one feasible embodiment of the present invention, the first BDPCM instruction information is located at the sequence parameter set, image parameter set, slice level, or tile level.
[0047] In one aspect, encoding or decoding is performed on the second BDPCM instruction information, and the second BDPCM instruction information is used to indicate the size range of the processing unit that supports the BDPCM mode. The process includes determining, based on the second BDPCM instruction information and the size of the current block, whether the current block enables BDPCM encoding or decoding. Regarding encoding and decoding methods.
[0048] In one feasible embodiment of the present invention, the second BDPCM instruction information is located at the sequence parameter set, image parameter set, slice level, or tile level.
[0049] In one respect, if the current block supports BDPCM mode, Based on one context model, context-based adaptive binary arithmetic decoding is performed on a third BDPCM instruction information, and the third BDPCM instruction information is used to indicate whether the current block activates BDPCM mode. When the third BDPCM instruction information instructs the current block to activate BDPCM mode, the fourth BDPCM instruction information is subjected to bypass-based binary arithmetic decoding, and the fourth BDPCM instruction information is used to instruct the index information of the predicted direction of BDPCM mode. This includes performing BDPCM processing on the current block according to the predicted direction indicated by the fourth BDPCM instruction information, Regarding the decryption method.
[0050] In one respect, if the current block supports BDPCM mode, Bypass-based binary arithmetic decoding is performed on the third BDPCM instruction information, and the third BDPCM instruction information is used to indicate whether the current block activates BDPCM mode. When the third BDPCM instruction information instructs the current block to activate BDPCM mode, the fourth BDPCM instruction information is subjected to bypass-based binary arithmetic decoding, and the fourth BDPCM instruction information is used to instruct the index information of the predicted direction of BDPCM mode. This includes performing BDPCM processing on the current block according to the predicted direction indicated by the fourth BDPCM instruction information, Regarding the decryption method.
[0051] In one aspect, when it is determined that the current block triggers intrasubblock prediction, and that CBF instruction information should be encoded or decoded, context-based adaptive binary arithmetic encoding or context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, where the CBF instruction information is used to indicate whether the transformation block of the current block has non-zero transformation coefficients, and the target context model is one context model selected from two different context models included in a first set of context models, depending on whether the transformation block preceding the current block has non-zero transformation coefficients. or When it is determined that the current block will initiate conventional intra-prediction or BDPCM mode, and that encoding or decoding of CBF instruction information will be performed, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, wherein the target context model is one context model selected from two different context models included in a second context model set, depending on the partitioning depth of the transformed 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 are different. Regarding encoding and decoding methods.
[0052] In one aspect, when it is determined that the current block will initiate intra-subblock prediction, or conventional intra-prediction, or BDPCM mode, and that CBF instruction information will be encoded or decoded, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, wherein the CBF instruction information is used to indicate whether the transformed block of the current block has non-zero transformation coefficients, and the target context model is one context model selected from two different context models depending on the partitioning depth of the transformed block of the current block. Regarding encoding and decoding methods.
[0053] In one aspect, when it is determined that the current block triggers an intra-subblock prediction or a conventional intra-prediction, and that CBF instruction information should be encoded or decoded, context-based adaptive binary arithmetic encoding or context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, where the CBF instruction information is used to indicate whether the transformation block of the current block has non-zero transformation coefficients, and the target context model is one context model selected from two different context models included in a first set of context models, depending on the partitioning depth of the transformation block of the current block. or When the current block activates BDPCM mode, and it is determined that encoding or decoding of CBF instruction information is to be performed, context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, wherein the target context model is one of the context models in the first set of context models. Regarding encoding and decoding methods.
[0054] In one aspect, the JCCR instruction information is decoded, and the JCCR instruction information is used to indicate whether the current processing unit supports the JCCR mode. Based on the JCCR instruction information, it is determined that the current block supports JCCR mode, and if the current block activates JCCR mode, the chromaticity residual coefficient of the current block is obtained by decoding the current block according to the correlation between the blue chromaticity CB component and the red chromaticity CR component of the current block. Regarding the decryption method.
[0055] In one feasible embodiment of the present invention, the JCCR instruction information exists at the sequence parameter set, image parameter set, slice level, or tile level.
[0056] In one aspect, the processor and Includes memory for storing processor-executable instructions, Here, the processor is configured to perform any of the encoding / decoding methods or decoding methods described above. The present invention relates to an encoding and decoding device characterized by the following:
[0057] In one aspect, the present invention relates to a computer-readable storage medium in which a command is stored, and which, when the command is executed by a processor, realizes the encoding / decoding method or decoding method described in any of the above.
[0058] In one aspect, the present invention relates to a computer program product that includes a command, characterized in that, when operating on a computer, causes the computer to execute the encoding / decoding method or decoding method described in any of the above.
[0059] The beneficial effects of the technical proposal according to the embodiment of the present invention are as follows:
[0060] In embodiments of the present invention, when it is determined to encode or decode the first ISP instruction information, context-based adaptive binary arithmetic encoding or context-based adaptive binary arithmetic decoding is performed on the first ISP instruction information based on one context model, and when it is determined to encode or decode the second ISP instruction information, bypass-based binary arithmetic encoding or decoding is performed on the second ISP instruction information. This reduces the number of context models required for the encoding and decoding process, mitigates the complexity of the encoding and decoding process, and reduces memory overhead.
[0061] To more clearly explain the technical concepts in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. The drawings in the following description represent only a few embodiments of the present invention, and it will be obvious to those skilled in the art that other drawings can be obtained based on these drawings without any creative work. [Brief explanation of the drawing]
[0062] [Figure 1] This is a schematic diagram of the structure of an encoding / decoding system according to an embodiment of the present invention. [Figure 2] This is a flowchart of the encoding and decoding process according to an embodiment of the present invention. [Figure 3] This figure shows an exemplary direction corresponding to the intra-prediction mode according to an embodiment of the present invention. [Figure 4] This figure shows exemplary directions corresponding to the angular mode according to an embodiment of the present invention. [Figure 5] This is a schematic diagram showing the division of an image block according to an embodiment of the present invention. [Figure 6] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 7] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 8] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 9]This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 10] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 11] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 12] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 13] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 14] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 15] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 16] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 17] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 18] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 19] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 20] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 21] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 22] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 23] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 24] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 25] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 26] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 27]This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 28] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 29] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 30] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 31] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 32] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 33] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 34] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 35] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 36] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 37] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 38] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 39] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 40] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 41] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 42] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 43] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 44] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 45]This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 46] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 47] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 48] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 49] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 50] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 51] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 52] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 53] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 54] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 55] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 56] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 57] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 58] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 59] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 60] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 61] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 62] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 63]This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 64] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 65] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 66] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 67] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 68] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 69] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 70] This is a flowchart of the encoding and decoding method according to an embodiment of the present invention. [Figure 71] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 72] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 73] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 74] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 75] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 76] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 77] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 78] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 79] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 80] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 81] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 82] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 83] This is a flowchart of the encoding method according to an embodiment of the present invention. [Figure 84] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 85] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 86] This is a flowchart of the decoding method according to an embodiment of the present invention. [Figure 87] This is a schematic diagram of the encoding side structure according to an embodiment of the present invention. [Figure 88] This is a schematic diagram of the decoding side structure according to an embodiment of the present invention. [Modes for carrying out the invention]
[0063] To further clarify the object, technical concept, and advantages of the present invention, embodiments of the present invention will be described in more detail below with reference to the drawings.
[0064] Before describing embodiments of the present invention in detail, we will first describe application scenarios related to embodiments of the present invention.
[0065] Figure 1 is a schematic diagram of the structure of an encoding / decoding system according to an embodiment of the present invention. As shown in Figure 1, the encoding / decoding system includes an encoder 01, a decoder 02, a storage device 03, and a link 04. The encoder 01 can communicate with the storage device 03, and the encoder 01 can also communicate with the decoder 02 via the link 04. The decoder 02 can also communicate with the storage device 03.
[0066] Encoder 01 is used to acquire a data source, encode the data source, transfer the encoded code stream to storage device 03 for storage, or transfer it directly to decoder 02 via link 04. Decoder 02 can obtain the data source by acquiring and decoding the code stream from storage device 03, or by receiving the code stream transferred by encoder 01 via link 04 and then decoding it. Here, the data source may be a captured image or a captured video. Encoder 01 and decoder 02 can both be used as electronic devices on their own. Storage device 03 may include any of several types of distributed or locally accessed data storage media. Examples include hard disk drives, Blu-ray discs, read-only disks, flash memory, or other suitable digital storage media for storing encoded data. Link 04 may include at least one communication medium, which may include wireless and / or wired communication media such as an RF (Radio Frequency) spectrum or one or more physical transmission lines.
[0067] Referring to Figure 2, which is a flowchart of encoding and decoding according to an exemplary embodiment, encoding includes several processes such as prediction, transformation, quantization, and entropy coding, and decoding includes several processes such as decoding, inverse transformation, inverse quantization, and prediction. Currently, binary arithmetic encoding and decoding techniques are typically used to encode and decode current syntactic elements. Prediction in encoding and decoding generally includes intra prediction, multi-line prediction, cross-component prediction, and matrix-based intra prediction. Furthermore, encoding and decoding can also utilize intra-luminance candidate lists, adaptive loop filters, adaptive motion vector precision encoding and decoding techniques, and BD (Block-based quantized residual Differential) PCM (Pulse Code Modulation) encoding and decoding techniques. Next, these prediction methods and encoding / decoding techniques will be briefly described.
[0068] "Binary arithmetic coding"
[0069] Binary arithmetic coding refers to obtaining the final code stream by performing arithmetic coding on each bin (bit) after the current syntactic element has been binarized, based on its probabilistic model parameters. It includes two coding schemes: context-based adaptive arithmetic coding and bypass-based binary arithmetic coding.
[0070] CABAC (Context-based Adaptive Binary Arithmetic Coding) is a method that combines adaptive binary arithmetic coding with a well-designed context model. In coding, the coding of each symbol is always related to previously coded results, and a codeword is adaptively assigned to each symbol according to the statistical properties of the symbol stream, particularly applicable to symbols with unequal probability of occurrence, which can further compress the coding rate. Each bit of the syntactic element is sequentially input to the context modeler, and the encoder assigns an appropriate probabilistic model to each input bit based on previously coded syntactic elements or bits; this process is called context modeling. The bits and their assigned probabilistic models are sent to the binary arithmetic encoder for coding. The encoder updates the context model according to the bit values, which is the adaptation of the coding.
[0071] Bypass-based binary arithmetic coding is an equal-probability binary arithmetic coding mode (also called bypass coding mode) that, compared to CABAC, lacks a probabilistic updating process and does not require adaptive updating of the probabilistic state. It encodes with fixed probabilities of 50% for 0 and 1, and this coding method is simpler, has lower coding complexity, consumes less memory, and is suitable for equal-probability symbols.
[0072] "Intra-prediction"
[0073] Intra-prediction refers to the process of eliminating redundancy in image space by using correlations in image space to predict the pixels of the current image block using pixels from neighboring blocks that have been encoded and reconstructed around the current image block. Multiple intra-prediction modes are defined, and each intra-prediction mode corresponds to one texture direction (except for DC mode). For example, if the texture of an image is arranged horizontally, selecting the horizontal prediction mode allows for better prediction of image information. Exemplaryly, in HEVC (High Efficiency Video Coding), the luminance component can support prediction units (image blocks or subblocks) of five different sizes, and each size of prediction unit corresponds to 35 intra-prediction modes, including Planar mode, DC mode, and 33 angular modes, as shown in Table 1. [Table 1]
[0074] The prediction directions corresponding to the multiple types of intra-prediction modes are shown in Figure 3. The Planar mode is applied to regions where pixel values change gradually, and in the embodiment, filtering is performed using two linear filters, horizontal and vertical, and the average of the two can be used as the predicted value of the current image block. The DC mode is applied to large flat regions, and the average pixel value of adjacent blocks encoded and reconstructed around the current image block can be used as the predicted value of the current image block. For example, the Planar mode and DC mode are also called non-angle modes. Referring again to Figure 3, in the angle mode, the intra-prediction modes corresponding to mode number 26 and mode number 10 represent the vertical and horizontal directions, respectively. In one feasible embodiment of the present invention, the intra-prediction modes corresponding to mode numbers adjacent to mode number 26 can be collectively called the vertical prediction mode, and the intra-prediction modes corresponding to mode numbers adjacent to mode number 10 can be collectively called the horizontal prediction mode. Exemplaryly, the vertical prediction mode includes mode numbers 2 to 18, and the horizontal prediction mode includes mode numbers 19 to 34. Furthermore, in VVC (Versatile Video Coding), the next-generation encoding and decoding standard, the angular mode is divided into finer segments, as shown in Figure 4.
[0075] "Traditional intranet prediction"
[0076] Conventional intra-prediction methods predict the current block using surrounding pixels and remove spatial redundancy. In conventional intra-prediction modes, the adopted target prediction mode may be from the MPM (Most probable mode) list or from a non-MPM list.
[0077] "ISP (Intra Sub-block-Partitions)"
[0078] In ISP technology, the method used for intra-prediction divides an image block into multiple sub-blocks for prediction. Supported division schemes for image blocks that support ISP technology include horizontal and vertical division. For the decoding side, if the current block activates ISP mode, and the current block size supports only one division scheme by default, the current block is divided in the default division direction, and then prediction, inverse transformation, and inverse quantization are performed. If the current block size supports two division schemes, the division direction is further analyzed, the current block is divided in the determined division direction, and then prediction, inverse transformation, and inverse quantization are performed.
[0079] "MRL (Multi-Reference Line, multi-line prediction)"
[0080] In the method employed by MRL technology, predictions are made based on the reference pixels of the current block, and the reference pixels may be from adjacent rows of the current block. For example, the reference pixels may be from Reference line 0 (row 0), Reference line 1 (row 1), Reference line 2 (row 2), and Reference line 3 (row 3) as shown in Figure 5. Here, row 0 is the row adjacent to the boundary of the current block, row 1 is the next row adjacent to the boundary of the current block, row 2 is the row adjacent to row 1, and row 3 is the row adjacent to row 2. Currently, in VVC, the next-generation encoding and decoding standard, the reference pixels are from Reference line 0, Reference line 1, and Reference line 3, and Reference line 2 is not used. Here, the line may be the upper row of the current block or the left column of the current block.
[0081] "MPM"
[0082] In HEVC, the number of MPMs is 3, while in the current VVC, the number of MPMs is 6. In ISP and MRL modes, the intra-prediction mode must come from an MPM, while in conventional intra-prediction, the intra-prediction mode can come from either an MPM or a non-MPM.
[0083] "CCLM (Cross-Component Linear Model Prediction)"
[0084] The method employed in CCLM technology uses a linear prediction model to reconstruct pixel values from luminance components and obtains predicted pixel values for chromaticity components by utilizing linear equations. This eliminates redundancy between image components and further improves coding performance. Currently, there are three cross-component prediction modes: MDLM_L mode, MDLM_T mode, and DM mode. MDLM_L mode is a cross-component prediction mode that obtains linear parameters using only left template information. MDLM_T mode is a cross-component prediction mode that derives linear model parameters using only upper template information. DM mode uses a prediction mode for chromaticity similar to that used for luminance.
[0085] Adaptive loop filtering
[0086] Regarding the Adaptive Loop Filter (ALF), it is possible to select one type of filter from a fixed set of filters based on the gradient direction of the block, and a CTU level flag can indicate whether the block is enabling ALF filtering. Chromaticity and luminance can be controlled separately.
[0087] AMVR (Adaptive Motion Vector Resolution)
[0088] AMVR is used to demonstrate that different accuracies can be employed when performing motion vector differential coding, and the adopted accuracy may be an integer pixel accuracy such as 4-pixel accuracy, or a non-integer pixel accuracy such as 1 / 16-pixel accuracy. This technique can be applied to motion vector data coding in conventional intra-prediction and also to motion vector data coding in affine prediction mode.
[0089] "MIP (Matrix-Based Intra Prediction)"
[0090] Matrix-based intra-prediction technology refers to determining the predicted pixel value of the current block by using the adjacent pixels above and to the left of the current block as reference pixels, sending them to a matrix vector multiplier, and adding a bias.
[0091] "BDPCM"
[0092] BDPCM refers to the process of directly copying the pixel value of the corresponding reference pixel vertically or horizontally when predicting a pixel in the prediction step, and is similar to vertical and horizontal prediction. Next, the residual values between the predicted pixel and the original pixel are quantized, and the quantized residuals are differential encoded.
[0093] For example, if the current block size is M*N,
number
number
number
[0094] In vertical RDPCM mode,
number
[0095] In horizontal RDPCM mode,
number
[0096] Ultimately
number
[0097] For the decoding side, the inverse accumulation process is used to obtain the residual data after quantization.
[0098] In the case of vertical forecasting,
number
[0099] In the case of horizontal forecasting,
number
[0100] Next, the residuals after quantization are dequantized and added to the predicted values to obtain the reconstructed pixel values.
[0101] "JCCR (Joint Coding of Chrominance Residuals)"
[0102] JCCR is a method that jointly encodes the CB (blue chromaticity) component and the CR (red chromaticity) component. By observing the distribution of chromaticity residuals, it is easy to confirm that CB and CR always tend to show a negative correlation. Therefore, JCCR proposes a method that jointly encodes CB and CR by utilizing this phenomenon, for example, by encoding (CB-CR) / 2, i.e., the average value of the CB component and the CR component.
[0103] In related technologies, different prediction modes or encoding / decoding techniques require the decoding side to transmit different syntactic elements to the encoding side. Furthermore, a large number of context models are needed to transmit these syntactic elements, resulting in a high complexity of the encoding / decoding process and significant memory overhead. In view of these circumstances, the present invention provides an encoding / decoding method that can reduce the number of required context models, thereby mitigating the complexity of the encoding / decoding process and reducing memory overhead.
[0104] "ISP mode"
[0105] In ISP mode, syntactic elements that require transmission between the decoder and the encoder may include a first ISP instruction and a second ISP instruction, the first of which is used to indicate whether to activate intra-subblock prediction mode, and the second of which is used to indicate the subblock splitting scheme for intra-subblock prediction mode. Exemplaryly, the first instruction is intra_subpartitions_mode_flag and the second instruction is intra_subpartitions_split_flag.
[0106] When it is determined that the first ISP instruction information will be encoded or decoded, it is necessary to perform context-based adaptive binary arithmetic encoding or context-based adaptive binary arithmetic decoding on the first ISP instruction information based on one context model. When it is determined that the second ISP instruction information will be encoded or decoded, it is necessary to perform context-based adaptive binary arithmetic encoding or context-based adaptive binary arithmetic decoding on the second ISP instruction information based on another different context model. In other words, as shown in Table 2 below, it is necessary to encode and decode the first and second ISP instruction information using two context models. [Table 2]
[0107] "First Embodiment of ISP Mode"
[0108] Figure 6 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 6, includes the following steps.
[0109] In step 601, when it is determined to encode the first ISP instruction information, context-based adaptive binary arithmetic encoding is performed on the first ISP instruction information based on a context model, and the first ISP instruction information is used to indicate whether to activate the intra subblock prediction mode.
[0110] For example, if the current block satisfies the conditions for supporting subblock division technology, the current block can attempt to use subblock division technology, and the encoding side can ultimately decide whether to use subblock division technology by RDO (Rate Distortion Optimization) and encode the first ISP instruction information, which indicates whether the current block will activate intra-subblock prediction mode. Here, the conditions for supporting subblock division technology include that the current block is a luminance block, that the current block does not activate multi-line prediction mode, and that the size of the current block satisfies certain constraints. Of course, the conditions for supporting subblock division technology are not limited to the three conditions above, but may include other conditions as well.
[0111] For example, the first ISP instruction is intra_subpartitions_mode_flag, which is a flag indicating whether the current block will activate intra-subblock prediction mode. If intra_subpartitions_mode_flag is 0, it indicates that the current block will not activate intra-subblock prediction mode, and if intra_subpartitions_mode_flag is 1, it indicates that the current block will activate intra-subblock prediction mode.
[0112] In step 602, when it is determined to encode the second ISP instruction information, the second ISP instruction information is subjected to bypass-based binary arithmetic encoding, and the second ISP instruction information is used to specify the subblock partitioning scheme for the intra subblock prediction mode.
[0113] Here, the subblock division scheme includes both horizontal and vertical division directions. If the current block supports two division directions, it is necessary to determine the division direction that will ultimately be used and to continue encoding the second ISP instruction information based on the division direction used. If the current block supports only one division direction, it is not necessary to continue encoding the second ISP instruction information.
[0114] Here, the second ISP instruction information may be intra_subpartitions_split_flag, which is a flag indicating the subblock splitting method of the current block's ISP mode. For example, if intra_subpartitions_split_flag is 0, it indicates that the subblock splitting method of the current block's ISP mode is horizontal splitting, and if intra_subpartitions_split_flag is 1, it indicates that the subblock splitting method of the current block's ISP mode is vertical splitting.
[0115] As an example, the encoding method for syntactic elements in ISP mode is shown in Table 3. [Table 3]
[0116] In other words, by modifying the encoding scheme for the second ISP instruction information in the related technology and replacing the complex CABAC encoding scheme with a bypass encoding scheme, memory overhead can be reduced, the complexity of the encoding can be decreased, and the performance remains essentially unchanged.
[0117] Figure 7 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and corresponds to the encoding method according to the embodiment in Figure 6, and as shown in Figure 7, the method includes the following steps.
[0118] In step 701, when it is determined to decode the first ISP instruction information, context-based adaptive binary arithmetic decoding is performed on the first ISP instruction information based on a context model, and the first ISP instruction information is used to indicate whether to activate the intra subblock prediction mode.
[0119] As an example, if the encoded stream of the current block can be received in advance and the current block satisfies the analysis conditions, the system analyzes whether the current block activates intra-subblock prediction mode by decoding the first ISP instruction information in the encoded stream. Here, the analysis conditions include that the current block is a luminance block, that the current block does not activate multi-line prediction mode, and that the size of the current block satisfies certain constraints. Of course, these analysis conditions are not limited to the three conditions above and may include other conditions.
[0120] For example, the first ISP instruction is intra_subpartitions_mode_flag. If intra_subpartitions_mode_flag is 0, it indicates that the current block will not activate intra-subblock prediction mode, and if intra_subpartitions_mode_flag is 1, it indicates that the current block will activate intra-subblock prediction mode.
[0121] In step 702, when it is determined to decode the second ISP instruction information, a bypass-based binary arithmetic decoding is performed on the second ISP instruction information, and the second ISP instruction information is used to specify the subblock partitioning scheme for the intra subblock prediction mode.
[0122] For example, it was determined that decoding of the second ISP instruction is necessary if the first ISP instruction indicates that the current block should activate intra-subblock prediction mode and that the current block supports two division directions. It was determined that decoding of the second ISP instruction is not necessary if the first ISP instruction indicates that the current block should not activate intra-subblock prediction mode, or if the first ISP instruction indicates that the current block should activate intra-subblock prediction mode and that the current block supports only one division direction.
[0123] For example, if intra_subpartitions_mode_flag is 1 and the current block supports two splitting directions, then the splitting direction flag, intra_subpartitions_split_flag, needs to be further parsed. If intra_subpartitions_mode_flag is 0, or if intra_subpartitions_mode_flag is 1 but the current block supports only one specific splitting direction, then there is no need to parse the flag representing the splitting direction.
[0124] Based on the two ISP instruction pieces described above, the decryption side can determine whether the current block activates ISP mode and the corresponding partitioning direction. By predicting the current block based on the determined partitioning direction, it can obtain a predicted value for the current block to be used in the subsequent reconstruction process.
[0125] "Second embodiment of ISP mode"
[0126] Figure 8 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 8, includes the following steps.
[0127] In step 801, when it is determined to encode the first ISP instruction information, the first ISP instruction information is subjected to bypass-based binary arithmetic encoding, and the first ISP instruction information is used to indicate whether to activate the intra subblock prediction mode.
[0128] For example, if the current block satisfies the conditions for supporting subblock partitioning, the current block may attempt to use subblock partitioning, the encoding side may ultimately decide by RDO whether to use subblock partitioning, and may encode first ISP instruction information, which indicates whether the current block activates intra-subblock prediction mode. Here, the conditions for supporting subblock partitioning include that the current block is a luminance block, that the current block does not activate multi-row prediction mode, and that the size of the current block satisfies certain constraints. Of course, the conditions for supporting subblock partitioning are not limited to the three conditions above, but may include other conditions as well.
[0129] For example, the first ISP instruction is intra_subpartitions_mode_flag, which is a flag indicating whether the current block will activate intra-subblock prediction mode. If intra_subpartitions_mode_flag is 0, it indicates that the current block will not activate intra-subblock prediction mode, and if intra_subpartitions_mode_flag is 1, it indicates that the current block will activate intra-subblock prediction mode.
[0130] In step 802, when it is determined to encode the second ISP instruction information, the second ISP instruction information is subjected to bypass-based binary arithmetic encoding, and the second ISP instruction information is used to specify the subblock partitioning scheme for the intra subblock prediction mode.
[0131] Here, the subblock division scheme includes both horizontal and vertical division directions. If the current block supports two division directions, it is necessary to determine the division direction that will ultimately be used and to continue encoding the second ISP instruction information based on the division direction used. If the current block supports only one division direction, it is not necessary to continue encoding the second ISP instruction information.
[0132] Here, the second ISP instruction information may be intra_subpartitions_split_flag, which is a flag indicating the subblock splitting method of the current block's ISP mode. For example, if intra_subpartitions_split_flag is 0, it indicates that the subblock splitting method of the current block's ISP mode is horizontal splitting, and if intra_subpartitions_split_flag is 1, it indicates that the subblock splitting method of the current block's ISP mode is vertical splitting.
[0133] As an example, the encoding scheme for syntactic elements in ISP mode is shown in Table 4. [Table 4]
[0134] In other words, by modifying the encoding scheme for the intra_subpartitions_mode_flag and intra_subpartitions_split_flag flags in related technologies, and replacing the original complex CABAC encoding scheme with a bypass encoding scheme, memory overhead can be further reduced, the complexity of the encoding can be lessened, and the performance remains essentially unchanged.
[0135] Figure 9 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and corresponds to the encoding method according to the embodiment in Figure 8, and as shown in Figure 9, the method includes the following steps.
[0136] In step 901, when it is determined to decode the first ISP instruction information, a bypass-based binary arithmetic decoding is performed on the first ISP instruction information, and the first ISP instruction information is used to indicate whether to activate the intra subblock prediction mode.
[0137] As an example, if the encoded stream of the current block can be received in advance and the current block satisfies the analysis conditions, the system analyzes whether the current block activates intra-subblock prediction mode by decoding the first ISP instruction information in the encoded stream. Here, the analysis conditions include that the current block is a luminance block, that the current block does not activate multi-line prediction mode, and that the size of the current block satisfies certain constraints. Of course, these analysis conditions are not limited to the three conditions above and may include other conditions.
[0138] For example, the first ISP instruction is intra_subpartitions_mode_flag. If intra_subpartitions_mode_flag is 0, it indicates that the current block will not activate intra-subblock prediction mode, and if intra_subpartitions_mode_flag is 1, it indicates that the current block will activate intra-subblock prediction mode.
[0139] In step 902, when it is determined to decode the second ISP instruction information, a bypass-based binary arithmetic decoding is performed on the second ISP instruction information, and the second ISP instruction information is used to specify the subblock partitioning scheme for the intra subblock prediction mode.
[0140] For example, it was determined that decoding of the second ISP instruction is necessary if the first ISP instruction indicates that the current block should activate intra-subblock prediction mode and that the current block supports two division directions. It was determined that decoding of the second ISP instruction is not necessary if the first ISP instruction indicates that the current block should not activate intra-subblock prediction mode, or if the first ISP instruction indicates that the current block should activate intra-subblock prediction mode and that the current block supports only one division direction.
[0141] For example, if intra_subpartitions_mode_flag is 1 and the current block supports two splitting directions, then the splitting direction flag, intra_subpartitions_split_flag, needs to be further parsed. If intra_subpartitions_mode_flag is 0, or if intra_subpartitions_mode_flag is 1 but the current block supports only one specific splitting direction, then there is no need to parse the flag representing the splitting direction.
[0142] Based on the two ISP instruction pieces described above, the decryption side can determine whether the current block activates ISP mode and the corresponding partitioning direction. By predicting the current block based on the determined partitioning direction, it can obtain a predicted value for the current block to be used in the subsequent reconstruction process.
[0143] "MRL mode"
[0144] "First Embodiment of MRL Mode"
[0145] Figure 10 is a flowchart of an encoding / decoding method according to an embodiment of the present invention, which can be applied to either the encoding or decoding side, and as shown in Figure 10, the method includes the following steps.
[0146] In 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, then the current block does not support multi-row prediction mode.
[0147] For example, if the width and height of the current block are M*N, the current block does not support multi-row prediction mode.
[0148] "Second Embodiment of MRL Mode"
[0149] In MRL mode, syntactic elements that need to be transmitted between the decoder and the encoder may include reference row indicator information, which is used to indicate the index information of the target reference row used when making predictions for the current block based on multi-row prediction mode. Exemplary, the reference row indicator information is intra_luma_ref_idx.
[0150] In related technologies, if the current block is confirmed to support multi-row prediction mode, and the number of candidate reference rows corresponding to multi-row prediction mode is 3, and the reference row indication information corresponding to multi-row prediction mode occupies a maximum of 2 bits, then these 2 bits need to be encoded and decoded using two different context models, as shown in Tables 5 and 6 below. [Table 5]
[0151] Here, the first bin refers to the first bit of the reference line information and needs to be encoded and decoded based on the first context model, the second bin refers to the second bit of the reference line information and needs to be encoded and decoded based on the second context model, and the first and second context models are different. [Table 6]
[0152] Then, the correspondence between the index information of the target reference line and the line number of the target reference line is shown in Table 7.
Table 7
[0153] As can be seen from Table 7, when the index information indicated by the reference line instruction information is 0, the target reference line is the 0th line; when the index information indicated by the reference line instruction information is 1, the target reference line is the 1st line; when the index information indicated by the reference line instruction information is 2, the target reference line is the 3rd line.
[0154] Note that the line in the embodiment of the present invention may be the line above the current block or the column on the left side of the current block.
[0155] FIG. 11 is a flowchart of a coding method according to an embodiment of the present invention. The method is applied to the coding side. As shown in FIG. 10, when it is determined that the current block supports the multi-line prediction mode, and the number of candidate reference lines corresponding to the multi-line prediction mode is 3, and the reference line instruction information corresponding to the multi-line prediction mode occupies a maximum of 2 bits, the method includes the following steps.
[0156] In step 1101, based on one context model, context-based adaptive binary arithmetic coding is performed on the first bit of the reference line instruction information.
[0157] As an example, it can be determined whether the current block satisfies the conditions for supporting multi-row prediction, and if it does, it can be determined that the current block can be attempted to be encoded using each reference row. The encoding side can determine the final reference pixel source using RDO and encode the reference row index information into the encoding stream. Here, the conditions for supporting multi-row prediction include that the current block is a luminance intrablock, that the size of the current block satisfies certain constraints, and that the current block does not contain the first row of the encoding tree unit. Of course, the conditions for supporting multi-row prediction are not limited to the three conditions above and may include other conditions.
[0158] For example, if multi-row prediction technology can be used, all reference rows are iterated through, the final target reference row is determined by RDO, and the reference row indication information is encoded. In the encoded stream, the reference row indication information can be encoded according to the specific situation. For example, the reference row indication information may be intra_luma_ref_idx.
[0159] In the embodiment of the present invention, the row may be the row above the current block, or the column to the left of the current block.
[0160] In step 1102, when it is necessary to encode the second bit of the reference line indicator information, binary arithmetic encoding based on bypass is performed on the second bit of the reference line indicator information.
[0161] In an embodiment of the present invention, if the current block is determined to support multi-row prediction mode, and the number of candidate reference rows corresponding to multi-row prediction mode is 3, and the reference row indication information corresponding to multi-row prediction mode occupies a maximum of 2 bits, then the first bit of these 2 bits can be encoded using one context model, and the second bit can be encoded based on a bypass encoding mode. In this way, encoding of all bits of the reference row indication information is possible using only one context model, reducing the number of context models used, further reducing the complexity and memory consumption of encoding, and without significantly changing the encoding performance.
[0162] For example, the context models used by reference line information are shown in Tables 8 and 9 below. [Table 8] [Table 9]
[0163] Figure 12 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 11, and as shown in Figure 12, when it is determined that the current block supports multi-row prediction mode, and the number of candidate reference rows corresponding to multi-row prediction mode is 3, and the reference row indication information corresponding to multi-row prediction mode occupies a maximum of 2 bits, the method includes the following steps.
[0164] In step 1201, context-based adaptive binary arithmetic decoding is performed on the first bit of the reference row indication information based on a single context model.
[0165] In step 1202, when decoding is required for the second bit of the reference row indicator information, binary arithmetic decoding based on bypass is performed on the second bit of the reference row indicator information.
[0166] By decoding the reference line indication information, based on the reference line indication information, the target reference line used when predicting the current block based on the multiple-line prediction mode can be determined. Next, the current block is predicted using the target reference line.
[0167] As an example, the encoding stream of the current block can be received first. When the current block meets the analysis conditions, by decoding the reference line indication information, the reference pixel source of the current block can be determined. The analysis conditions include that the current block is a luminance intra block, the size of the current block meets certain limiting conditions, and the current block is not the first line of the coding tree unit. Of course, the analysis conditions are not limited to the above three conditions and may include other conditions.
[0168] As an example, when the current block can use multiple-line prediction, based on the value of intra_luma_ref_idx, by determining the reference pixels of the current block, in order to obtain the predicted value of the current block used in the subsequent reconstruction process, it is necessary to analyze intra_luma_ref_idx.
[0169] "The Third Embodiment of the MRL Mode"
[0170] In the related art, when it is determined that the current block supports the multiple-line prediction mode, and the number of candidate reference lines corresponding to the multiple-line prediction mode is four, and the reference line indication information corresponding to the multiple-line prediction mode occupies a maximum of 3 bits, for these 3 bits, as shown in Table 10 and Table 11 below, it is necessary to encode and decode using three different context models. [[ID=2l]] [Table 10] <0OO0970>[Table 11]
[0171] Here, the first bin refers to the first bit of the reference line information and needs to be encoded and decoded based on the first context model; the second bin refers to the second bit of the reference line information and needs to be encoded and decoded based on the second context model; and the third bin refers to the third bit of the reference line information and needs to be encoded and decoded based on the third context model. These three context models are different.
[0172] Table 12 shows the index information of the target reference row and the corresponding row number of the target reference row. [Table 12]
[0173] As can be seen from Table 12, when the index information indicated by the reference row instruction is 0, the target reference row is row 0; when the index information indicated by the reference row instruction is 1, the target reference row is row 1; when the index information indicated by the reference row instruction is 2, the target reference row is row 2; and when the index information indicated by the reference row instruction is 3, the target reference row is row 3.
[0174] Figure 13 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side, and as shown in Figure 13, when it is determined that the current block supports multi-line prediction mode, and the number of candidate reference lines corresponding to multi-line prediction mode is 4, and the reference line indication information corresponding to multi-line prediction mode occupies a maximum of 3 bits, the method includes the following steps.
[0175] In step 1301, context-based adaptive binary arithmetic coding is performed on the first bit of the reference row indication information based on a context model.
[0176] As an example, it can be determined whether the current block satisfies the conditions for supporting multi-row prediction, and if it does, it can be determined that the current block can be attempted to be encoded using each reference row. The encoding side can determine the final reference pixel source using RDO and encode the reference row index information into the encoding stream. Here, the conditions for supporting multi-row prediction include that the current block is a luminance intrablock, that the size of the current block satisfies certain constraints, and that the current block is not the first row of the encoding tree unit. Of course, the conditions for supporting multi-row prediction are not limited to the three conditions above and may include other conditions.
[0177] For example, if multi-row prediction technology can be used, all reference rows are iterated through, the final target reference row is determined by RDO, and the reference row indication information is encoded. In the encoded stream, the reference row indication information can be encoded according to the specific situation. For example, the reference row indication information may be intra_luma_ref_idx.
[0178] In step 1302, when it is necessary to encode the second bit of the reference line indicator information, binary arithmetic encoding based on bypass is performed on the second bit of the reference line indicator information.
[0179] In step 1303, when it is necessary to encode the third bit of the reference line indicator information, binary arithmetic encoding based on bypass is performed on the third bit of the reference line indicator information.
[0180] In an embodiment of the present invention, if the current block is determined to support multi-row prediction mode, and the number of candidate reference rows corresponding to multi-row prediction mode is 4, and the reference row indication information corresponding to multi-row prediction mode occupies a maximum of 3 bits, then the first bit of these 3 bits can be encoded using one context model, and the second and third bits can be encoded based on bypass encoding mode. In this way, encoding of all bits of the reference row indication information is possible using only one context model, reducing the number of context models used, further reducing the complexity and memory consumption of encoding, and without significantly changing the encoding performance.
[0181] For example, the context models used by reference line indicators are shown in Tables 13 and 14 below. [Table 13] [Table 14]
[0182] Figure 14 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and corresponds to the encoding method according to the embodiment in Figure 13. As shown in Figure 14, if it is determined that the current block supports multi-row prediction mode, and the number of candidate reference rows corresponding to multi-row prediction mode is 4, and the reference row indication information corresponding to multi-row prediction mode occupies a maximum of 3 bits, the method includes the following steps.
[0183] In step 1401, context-based adaptive binary arithmetic decoding is performed on the first bit of the reference row indication information based on a single context model.
[0184] In step 1402, when decoding is required for the second bit of the reference row indicator information, binary arithmetic decoding based on bypass is performed on the second bit of the reference row indicator information.
[0185] In step 1403, when decoding is required for the third bit of the reference row indicator information, binary arithmetic decoding based on bypass is performed on the third bit of the reference row indicator information.
[0186] As an example, if the encoded stream of the current block can be received in advance and the current block satisfies the analysis conditions, the reference pixel source of the current block is determined by decoding the reference row indication information. The analysis conditions include that the current block is a luminance intrablock, that the size of the current block satisfies certain constraints, and that the current block is not the first row of the encoded tree unit. Of course, these analysis conditions are not limited to the three conditions above and may include other conditions.
[0187] For example, if the current block can use multi-row prediction, it is necessary to parse intra_luma_ref_idx to obtain the predicted value of the current block, which will be used in the subsequent reconstruction process, by determining the reference pixels of the current block based on the value of intra_luma_ref_idx.
[0188] "Fourth embodiment of MRL mode"
[0189] Figure 15 is a flowchart of an encoding / decoding method according to an embodiment of the present invention, which is applied to either the encoding or decoding side, and as shown in Figure 15, if it is determined that the current block supports multi-row prediction mode and the number of candidate reference rows corresponding to multi-row prediction mode is 3, where the candidate reference row with index information 0 is row 0, the candidate reference row with index information 1 is row 1, and the candidate reference row with index information 2 is row 2, then the method includes the following steps.
[0190] In step 1501, when predicting the current block based on the multi-row prediction mode, the current block is predicted based on the target reference row, and the target reference row is determined based on the reference row indication information.
[0191] In this case, if the index information indicated by the reference row instruction is 0, the target reference row is row 0.
[0192] If the index information indicated by the reference row instruction is 1, the target reference row is row 1.
[0193] If the index information indicated by the reference row instruction is 2, the target reference row is row 2.
[0194] As an example, the target reference row corresponding to the index information indicated by the reference row indication information is shown in Table 15 below. [Table 15]
[0195] In an embodiment of the present invention, the nearest 3 rows and 3 columns can be selected as a candidate target reference row. That is, the target reference row is one row selected from the candidate reference rows, where the number of candidate reference rows corresponding to the multi-row prediction mode is 3, and the 3 rows and 3 columns closest to the boundary of the current block are used as the candidate reference row.
[0196] "Fifth Embodiment of MRL Mode"
[0197] Figure 16 is a flowchart of an encoding / decoding method according to an embodiment of the present invention, which is applied to either the encoding or decoding side, and as shown in Figure 16, if it is determined that the current block supports multi-row prediction mode and the number of candidate reference rows corresponding to multi-row prediction mode is 3, where the candidate reference row with index information 0 is row 0, the candidate reference row with index information 1 is row 1, and the candidate reference row with index information 2 is row 2, then the method includes the following steps.
[0198] In step 1601, when predicting the current block based on the multi-row prediction mode, the current block is predicted based on the target reference row, and the target reference row is determined based on the reference row indication information.
[0199] In this case, if the index information indicated by the reference row instruction is 0, the target reference row is row 0.
[0200] If the index information indicated by the reference row instruction is 1, the target reference row is row 2.
[0201] If the index information indicated by the reference row instruction is 2, the target reference row is the 3rd row.
[0202] As an example, the target reference row corresponding to the index information indicated by the reference row indication information is shown in Table 16 below. [Table 16]
[0203] In the embodiment of the present invention, rows 0, 2, and 3 can be selected as candidates for the target reference row.
[0204] "Sixth Embodiment of MRL Mode"
[0205] Figure 17 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 17, determines that the current block supports multi-line prediction mode, the method includes the following steps.
[0206] In step 1701, before predicting the current block based on the multi-row prediction mode, the row number indication information is decoded based on the number of candidate reference rows corresponding to the multi-row prediction mode, and the row number indication information is used to indicate the number of candidate reference rows corresponding to the multi-row prediction mode.
[0207] In step 1702, the target reference row used when predicting the current block based on the multi-row prediction mode encodes reference row indication information, and the reference row indication information is used to indicate the index information of the target reference row used when predicting the current block based on the multi-row prediction mode.
[0208] In step 1703, predict the current block based on the target reference row.
[0209] In an embodiment of the present invention, by adding row number indication information that can specify the number of candidate reference rows corresponding to the multi-row prediction mode, the multi-row prediction mode becomes able to select the number of reference rows.
[0210] As an example, row number indication information can reside in the sequence parameter set (SPS), image parameter set, slice level, or tile level. Preferably, the row number indication information resides in the sequence parameter set, meaning that syntax can be added to the SPS level to indicate the number of candidate reference rows corresponding to the multi-row prediction mode.
[0211] Figure 18 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and, as shown in Figure 18, determines that the current block supports multi-row prediction mode, the method includes the following steps.
[0212] In step 1801, before predicting the current block based on the multi-row prediction mode, the row number indication information is decoded and used to indicate the number of candidate reference rows corresponding to the multi-row prediction mode.
[0213] In step 1802, the number of candidate reference rows corresponding to the multi-row prediction mode is determined based on the row number indication information.
[0214] In step 1803, the target reference row is determined based on the number of candidate reference rows corresponding to the multi-row prediction mode and the reference row indication information. The reference row indication information is used to indicate the index information of the target reference row used when making a prediction for the current block based on the multi-row prediction mode.
[0215] In step 1804, predict the current block based on the target reference row.
[0216] In an embodiment of the present invention, by adding row number indication information that can specify the number of candidate reference rows corresponding to the multi-row prediction mode, the multi-row prediction mode becomes able to select the number of reference rows.
[0217] As an example, row number indication information can reside in the sequence parameter set (SPS), image parameter set, slice level, or tile level. Preferably, the row number indication information resides in the sequence parameter set, meaning that syntax can be added to the SPS level to indicate the number of candidate reference rows corresponding to the multi-row prediction mode.
[0218] "AMVR mode"
[0219] In AMVR mode, syntactic elements that need to be transmitted between the decoding and encoding sides may include a first AMVR indicator and a second AMVR indicator, the first of which is used to indicate whether to activate AMVR mode, and the second of which is used to indicate pixel precision index information used when encoding or decoding motion vector differences in AMVR mode. For example, the first AMVR indicator is amvr_flag and the second AMVR indicator is amvr_precision_flag.
[0220] In the related technologies, regarding affine prediction mode and non-affine prediction mode, non-affine prediction mode refers to prediction modes other than affine prediction mode, and for the first AMVR instruction information and the second AMVR instruction information, a total of four context models are required for encoding and decoding, as shown in Tables 17 and 18. [Table 17] [Table 18]
[0221] As can be seen from Tables 17 and 18, when the current block activates affine prediction mode, when encoding or decoding the first AMVR instruction information, it is necessary to perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the first AMVR instruction information based on the third context model. When the second AMVR instruction information indicates that the current block should activate AMVR mode, it is necessary to perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the second AMVR instruction information based on the fourth context model. When the current block activates non-affine prediction mode, when encoding or decoding the first AMVR instruction information, it is necessary to perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the first AMVR instruction information based on the first context model. When the second AMVR instruction information indicates that the current block should activate AMVR mode, it is necessary to perform context-based adaptive binary arithmetic coding or context-based adaptive binary arithmetic decoding on the second AMVR instruction information based on the second context model. In other words, encoding or decoding AMVR instruction information requires a total of four different context models, resulting in high memory consumption.
[0222] "First embodiment of AMVR mode"
[0223] Figure 19 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 19, includes the following steps.
[0224] In step 1901, if the current block activates affine prediction mode or another prediction mode other than affine prediction mode, when encoding the motion vector difference of the current block, if the current block supports AMVR mode, when encoding the first AMVR instruction information, context-based adaptive binary arithmetic coding is performed on the first AMVR instruction information based on the first context model.
[0225] In step 1902, when the first AMVR instruction information indicates that the current block should activate AMVR mode, context-based adaptive binary arithmetic coding is performed on the second AMVR instruction information based on the second context model, and the first and second context models are different.
[0226] For example, if the current block satisfies the condition that adaptive motion vector precision can be used, the current block may attempt to encode using multiple motion vector precisions. Exemplaryly, the encoder can determine whether to invoke AMVR by RDO, which motion vector precision to employ, and encode the corresponding syntactic information into the encoded stream. Here, the conditions for using adaptive motion vector precision include that the current block is an intra-predictive block and that the motion information of the current block includes non-zero motion vector differences. Of course, the conditions for using adaptive motion vector precision are not limited to the above conditions and may include other conditions.
[0227] Figure 20 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 19, and as shown in Figure 20, the method includes the following steps.
[0228] In step 2001, if the current block activates affine prediction mode or another prediction mode other than affine prediction mode, when decoding the motion vector difference of the current block, if the current block supports AMVR mode, when decoding the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information based on the first context model.
[0229] As an example, if the decoding side can receive the encoded stream of the current block first and confirms that the current block satisfies the analysis conditions, it can determine whether the current block invokes AMVR, i.e., whether adaptive motion vector precision is used, by analyzing the first AMVR. Here, the analysis conditions include that the current block is an interframe block and that the motion information of the current block includes non-zero motion vector differences. Of course, the analysis conditions are not limited to the above conditions and may include other conditions.
[0230] In step 2002, when the first AMVR instruction information instructs the current block to activate AMVR mode, context-based adaptive binary arithmetic decoding is performed on the second AMVR instruction information based on the second context model, and the first and second context models are different.
[0231] If it is determined that the current block has activated AMVR mode, it is also necessary to determine the accuracy used by further analyzing the second AMVR instruction information. The decoding side can obtain a predicted value for the current block to be used in the subsequent reconstruction process by uniquely determining the motion vector accuracy of the motion information of the current block based on the first and second AMVR instruction information.
[0232] For example, the context models used for the first AMVR instruction information and the second AMVR instruction information for the affine and non-affine prediction modes are as shown in Table 19 below. [Table 19]
[0233] In an embodiment of the present invention, AMVR instruction information can share a context model between the Affine prediction mode and the non-affine prediction mode. This reduces the number of context models required by AMVR to two, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0234] "Second embodiment of AMVR mode"
[0235] Figure 21 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 21, includes the following steps.
[0236] In step 2101, if the current block activates affine prediction mode, when encoding the motion vector difference of the current block, if the current block supports AMVR mode, when encoding the first AMVR instruction information, context-based adaptive binary arithmetic coding is performed on the first AMVR instruction information based on the first context model, and when the first AMVR instruction information indicates that the current block activates AMVR mode, bypass-based binary arithmetic coding is performed on the second AMVR instruction information.
[0237] In step 2102, if the current block activates a prediction mode other than affine prediction mode, when encoding the motion vector difference of the current block, if the current block supports AMVR mode, when encoding the first AMVR instruction information, context-based adaptive binary arithmetic coding is performed on the first AMVR instruction information based on the second context model, and when the first AMVR instruction information indicates that the current block activates AMVR mode, bypass-based binary arithmetic coding is performed on the second AMVR instruction information.
[0238] Figure 22 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and corresponds to the encoding method shown in Figure 21, and as shown in Figure 22, the method includes the following steps.
[0239] In step 2201, if the current block activates affine prediction mode, when decoding the motion vector difference of the current block, if the current block supports AMVR mode, when decoding the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information based on the first context model, and when the first AMVR instruction information indicates that the current block activates AMVR mode, bypass-based binary arithmetic decoding is performed on the second AMVR instruction information.
[0240] In step 2202, if the current block activates a prediction mode other than affine prediction mode, when decoding the motion vector difference of the current block, if the current block supports AMVR mode, when decoding the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information based on the second context model, and when the first AMVR instruction information indicates that the current block activates AMVR mode, bypass-based binary arithmetic decoding is performed on the second AMVR instruction information.
[0241] For example, the context models used for the first AMVR instruction information and the second AMVR instruction information for the affine and non-affine prediction modes are shown in Table 20 below. [Table 20]
[0242] In embodiments of the present invention, the Affine prediction mode and the non-affine prediction mode are modified to perform bypass-based binary arithmetic coding or decoding on the second AMVR instruction information, thereby reducing the number of context models required by AMVR to two, which in turn reduces the complexity of coding and decoding and lowers memory overhead.
[0243] "Third embodiment of AMVR mode"
[0244] Figure 23 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 23, includes the following steps.
[0245] In step 2301, if the current block activates affine prediction mode or another prediction mode other than affine prediction mode, when encoding the motion vector difference of the current block, if the current block supports adaptive motion vector accuracy AMVR mode, then when encoding the first AMVR instruction information, context-based adaptive binary arithmetic coding is performed on the first AMVR instruction information based on the first context model.
[0246] In step 2302, when the first AMVR instruction information indicates that the current block should activate AMVR mode, the second AMVR instruction information is subjected to bypass-based binary arithmetic decoding.
[0247] Figure 24 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and corresponds to the encoding method shown in Figure 23, and as shown in Figure 24, the method includes the following steps.
[0248] In step 2401, if the current block activates the affine prediction mode or another prediction mode other than the affine prediction mode, when decoding the motion vector difference of the current block, if the current block supports the adaptive motion vector accuracy AMVR mode, then when decoding the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information based on the first context model.
[0249] In step 2402, when the first AMVR instruction information indicates that the current block should activate AMVR mode, the second AMVR instruction information is subjected to bypass-based binary arithmetic decoding.
[0250] For example, the context models used for the first AMVR instruction information and the second AMVR instruction information for the affine and non-affine prediction modes are as shown in Table 21 below. [Table 21]
[0251] In an embodiment of the present invention, the first AMVR instruction information is modified to share a single context model in both affine and non-affine prediction modes, and to perform bypass-based binary arithmetic coding or decoding on the second AMVR instruction information. This reduces the number of context models required by AMVR to one, thereby reducing the complexity of coding and decoding and lowering memory overhead.
[0252] "Fourth embodiment of AMVR mode"
[0253] In another embodiment, a coding method applied to the coding side is further provided, which includes the following steps:
[0254] In step 1, if the current block activates affine prediction mode, when encoding the motion vector difference of the current block, if the current block supports AMVR mode, when encoding the first AMVR instruction information, context-based adaptive binary arithmetic coding is performed on the first AMVR instruction information based on the first context model, and if the first AMVR instruction information indicates that the current block activates AMVR mode, context-based adaptive binary arithmetic coding is performed on the second AMVR instruction information based on the second context model.
[0255] In step 2, if the current block activates a prediction mode other than affine prediction mode, when encoding the motion vector difference of the current block, if the current block supports AMVR mode, when encoding the first AMVR instruction information, context-based adaptive binary arithmetic coding is performed on the first AMVR instruction information based on the third context model, and if the first AMVR instruction information indicates that the current block activates AMVR mode, context-based adaptive binary arithmetic coding is performed on the second AMVR instruction information based on the second context model.
[0256] Here, the first, second, and third context models are different.
[0257] In another embodiment, a decoding method applied to the decoding side is further provided, which is a decoding method corresponding to the above encoding method, and which includes the following steps.
[0258] In step 1, if the current block activates affine prediction mode, when decoding the motion vector difference of the current block, if the current block supports AMVR mode, when decoding the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information based on the first context model, and if the first AMVR instruction information indicates that the current block activates AMVR mode, context-based adaptive binary arithmetic decoding is performed on the second AMVR instruction information based on the second context model.
[0259] In step 2, if the current block activates a prediction mode other than affine prediction mode, when decoding the motion vector difference of the current block, if the current block supports AMVR mode, when decoding the first AMVR instruction information, context-based adaptive binary arithmetic decoding is performed on the first AMVR instruction information based on the third context model, and if the first AMVR instruction information indicates that the current block activates AMVR mode, context-based adaptive binary arithmetic decoding is performed on the second AMVR instruction information based on the second context model.
[0260] Here, the first, second, and third context models are different.
[0261] For example, the context models used for the first AMVR instruction information and the second AMVR instruction information for the affine and non-affine prediction modes are as shown in Table 22 below. [Table 22]
[0262] In embodiments of the present invention, the first AMVR instruction information can share a single context model between the affine prediction mode and the non-affine prediction mode. This reduces the number of context models required in AMVR mode to three, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0263] "Luminance MPM"
[0264] If the current block is a luminance block, prediction mode index information must be transmitted between the encoding and decoding sides. This prediction mode index information is used to indicate the target prediction mode index information for the current block in the MPM list. The encoding and decoding sides store a list of the most likely intra-prediction modes, and conventional intra-prediction modes, intra-subblock prediction modes, and multi-row prediction modes can share this MPM list.
[0265] In related technologies, if the reference row for the target prediction mode of the current block is an adjacent row of the current block, two different context models are required to perform context-based adaptive binary arithmetic coding or decoding on the first bit of the prediction mode index information, and which specific context model to use depends on whether the current block invokes an intra-subblock prediction mode.
[0266] For example, the context models used for predictive mode index information are shown in Table 23 below. [Table 23]
[0267] Here, the prediction mode index information is intra_luma_mpm_idx. If intra_luma_ref_idx is equal to 0, it indicates that the reference row for the target prediction mode of the current block is an adjacent row of the current block, meaning that the current block does not activate multi-row prediction mode. If intra_luma_ref_idx is not equal to 0, it indicates that the reference row for the target prediction mode of the current block is not an adjacent row of the current block, meaning that the current block has activated multi-row prediction mode.
[0268] As can be seen from Table 23, if intra_luma_ref_idx is equal to 0, the first bit of intra_luma_mpm_idx requires selecting one of two different context models for encoding and decoding, depending on whether the current block invokes intra subblock prediction mode. Also, if intra_luma_ref_idx is not equal to 0, it indicates that the current block invokes multi-row prediction mode, and the multi-row prediction mode invoked by the current block is also from the MPM list.
[0269] "First Embodiment of a Luminance MPM"
[0270] Figure 25 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and includes the following steps, as shown in Figure 25.
[0271] In step 2501, if the current block triggers an intra-subblock prediction, the target prediction mode for the intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, the index information of the target prediction mode for the intra-subblock prediction triggered by the current block in the MPM list is determined.
[0272] In step 2502, prediction mode index information is encoded based on the index information of the target prediction mode of the intra-subblock prediction triggered by the current block in the MPM list, where the first bit of the prediction mode index information is obtained by context-based adaptive binary arithmetic coding based on the first context model, and the other bits are obtained by bypass-based binary arithmetic decoding.
[0273] In step 2503, if the current block triggers a conventional intra-prediction, the target prediction mode of the conventional intra-prediction is from the MPM list, and the current block is a luminance block, when predicting the current block based on the conventional intra-prediction, if the target prediction mode triggered by the current block is from the MPM list, the index information of the target prediction mode triggered by the current block in the MPM list is determined.
[0274] In step 2504, prediction mode index information is encoded based on the index information of the target prediction mode activated by the current block in the MPM list, where the first bit of the prediction mode index information is obtained by context-based adaptive binary arithmetic coding based on a second context model, and the other bits are obtained by bypass-based binary arithmetic decoding.
[0275] For example, when the current block activates a conventional intra-prediction mode, one flag is required to indicate whether the target prediction mode of the conventional prediction activated by the current block is from the MPM list. If it is confirmed that the target prediction mode is from the MPM list, then the index information of the target prediction mode in the MPM list is confirmed. If the target prediction mode is not from the MPM list, it is not necessary to confirm the index information of the target prediction mode in the MPM list.
[0276] For example, the encoding side can construct an MPM list, and the intra-subblock prediction mode, multi-row prediction mode, and conventional intra-prediction can share this MPM list.
[0277] For example, the encoding side can determine the prediction mode ultimately used by RDO, i.e., the target prediction mode. If the target prediction mode is an intra-subblock prediction mode or a multi-row prediction mode, the target prediction mode is always a prediction mode selected from the MPM list. To notify the decoding side which prediction mode has been selected, it is necessary to encode prediction mode index information (intra_luma_mpm_idx). If the target prediction mode is a conventional intra-prediction, it is necessary to encode a flag to indicate whether the target prediction mode of the conventional prediction triggered by the current block is from the MPM list. If it is determined that the target prediction mode is from the MPM list, then the index information of the target prediction mode in the MPM list is determined. If the target prediction mode is not from the MPM list, it is not necessary to determine the index information of the target prediction mode in the MPM list.
[0278] Figure 26 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 25, and as shown in Figure 26, the method includes the following steps.
[0279] In step 2601, when the current block initiates intra-subblock prediction, if the target prediction mode for the intra-subblock prediction is present in the MPM list and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, the prediction mode index information is decoded, where the first bit of the prediction mode index information is obtained by context-based adaptive binary arithmetic decoding based on the first context model, and the other bits are obtained by bypass-based binary arithmetic decoding.
[0280] In step 2602, based on the prediction mode index information, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list, and this prediction mode index information is used to indicate the target prediction mode index information in the MPM list.
[0281] In step 2603, the current block is predicted based on the target prediction mode.
[0282] In step 2604, when the current block triggers conventional intra prediction, if the target prediction mode of the conventional intra prediction is from the MPM list and the current block is a luminance block, when predicting the current block based on conventional intra prediction, decoding is performed on the prediction mode index information, where the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on the second context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding, and the second and first context models are the same context model.
[0283] In step 2605, the target prediction mode to be activated by the current block is determined from the MPM list based on the prediction mode index information, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list.
[0284] In step 2606, the current block is predicted based on the target prediction mode.
[0285] As an example, assuming the decoding side can receive the encoded stream first and constructs the same MPM list based on conventional intra-prediction, intra-subblock prediction mode, and multi-row prediction mode, if the current block activates intra-subblock prediction mode or multi-row prediction mode, the adopted target prediction mode will always be from that MPM list, and the final target prediction mode can be obtained simply by analyzing the index value in the list. If the current block activates conventional intra-prediction, one flag needs to be analyzed to determine whether the target prediction mode is from that MPM list, and if it is from that MPM list, the index value in that MPM list is analyzed.
[0286] The decryption process can obtain a predicted value for the current block to be used in the subsequent reconstruction process by uniquely determining the prediction mode of the current block based on the values of the above flags.
[0287] In an embodiment of the present invention, when the reference row of the target prediction mode of the current block is an adjacent row of the current block, when encoding or decoding the first bit of the prediction mode index information, instead of selecting a context model from two different context models based on whether the current block activates an intra-subblock prediction mode, the same context model can be used for both the condition that the current block activates an intra-subblock prediction mode and the condition that the current block does not activate an intra-subblock prediction mode, thereby performing context-based adaptive binary arithmetic encoding or decoding on the first bit of the prediction mode index information. This reduces the number of required context models to one, mitigates the complexity of encoding and decoding, and reduces memory overhead.
[0288] As an example, the context model used for predictive mode index information is shown in Table 24 below. [Table 24]
[0289] In other words, if intra_luma_ref_idx is equal to 0, then for the first bit of intra_luma_mpm_idx, context-based adaptive binary arithmetic coding or decoding can be performed on the first bit of intra_luma_mpm_idx based on the same context model, whether the current block activates intra-subblock prediction mode or not.
[0290] "Second Embodiment of Luminance MPM"
[0291] Figure 27 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 27, includes the following steps.
[0292] In step 2701, if the current block triggers an intra-subblock prediction, the target prediction mode for the intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, the index information of the target prediction mode for the intra-subblock prediction triggered by the current block in the MPM list is determined.
[0293] In step 2702, prediction mode index information is encoded based on the target prediction mode index information of the intra-subblock prediction invoked by the current block in the MPM list, where all bits of the prediction mode index information are obtained by performing binary arithmetic coding based on bypass.
[0294] In step 2703, when the current block initiates conventional intra-prediction, if the target prediction mode of the conventional intra-prediction is from the MPM list and the current block is a luminance block, when predicting the current block based on the conventional intra-prediction, if the target prediction mode initiated by the current block exists in the MPM list, the index information of the target prediction mode initiated by the current block in the MPM list is determined.
[0295] In step 2704, the prediction mode index information is encoded based on the target prediction mode index information activated by the current block in the MPM list, where all bits of the prediction mode index information are obtained by performing binary arithmetic coding based on bypass.
[0296] For example, when the current block invokes a conventional intra-prediction block, one flag is required to indicate whether the target prediction mode of the conventional prediction invoked by the current block is from the MPM list. If it is confirmed that the target prediction mode is from the MPM list, the index information of the target prediction mode in the MPM list is confirmed. If the target prediction mode is not from the MPM list, it is not necessary to confirm the index information of the target prediction mode in the MPM list.
[0297] Figure 28 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 27, and as shown in Figure 28, the method includes the following steps.
[0298] In step 2801, when the current block triggers intra-subblock prediction, if the target prediction mode for the intra-subblock prediction is present in the MPM list and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, decoding is performed on the prediction mode index information, where all bits of the prediction mode index information are obtained by performing binary arithmetic coding based on bypass.
[0299] In step 2802, based on the prediction mode index information, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list, and this prediction mode index information is used to indicate the target prediction mode index information in the MPM list.
[0300] In step 2803, the current block is predicted based on the target prediction mode.
[0301] In step 2804, when the current block triggers a conventional intra prediction, if the target prediction mode of the conventional intra prediction is from the MPM list and the current block is a luminance block, then when predicting the current block based on the conventional intra prediction, decoding is performed on the prediction mode index information, where all bits of the prediction mode index information are obtained by performing binary arithmetic coding based on bypass.
[0302] In step 2805, the target prediction mode to be activated by the current block is determined from the MPM list based on the prediction mode index information, and this prediction mode index information is used to indicate the index information of the target prediction mode to be activated by the current block in the MPM list.
[0303] In step 2806, the current block is predicted based on the target prediction mode.
[0304] In an embodiment of the present invention, when the reference row of the target prediction mode of the current block is an adjacent row of the current block, i.e., intra_luma_ref_idx is equal to 0, when encoding or decoding the first bit of the prediction mode index information, it is possible to perform bypass-based binary arithmetic encoding or decoding of the first bit of the prediction mode index information without considering whether the current block activates the intra subblock prediction mode, i.e., in two different cases: when the current block activates the intra subblock prediction mode and when the current block does not activate the intra subblock prediction mode. In this way, there is no need to use a context model for the first bit of the prediction mode index information, reducing the number of required context models to zero, thereby reducing the complexity of encoding and decoding and reducing memory overhead.
[0305] As an example, the context model used for predictive mode index information is shown in Table 25 below. [Table 25]
[0306] In other words, if intra_luma_ref_idx is equal to 0, the first bit of intra_luma_mpm_idx can be bypass-based binary arithmetic coding or decoding for the first bit of intra_luma_mpm_idx, whether the current block activates intra subblock prediction mode or not.
[0307] "Third Embodiment of the MPM for Luminance"
[0308] Figure 29 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 29, includes the following steps.
[0309] In step 2901, if the current block triggers an intra-subblock prediction, the target prediction mode for the intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, the index information of the target prediction mode for the intra-subblock prediction triggered by the current block in the MPM list is determined.
[0310] In step 2902, prediction mode index information is encoded based on the index information of the target prediction mode of the intra-subblock prediction triggered by the current block in the MPM list, where the first bit of the prediction mode index information is obtained by context-based adaptive binary arithmetic decoding based on one context model, and the other bits are obtained by bypass-based binary arithmetic decoding.
[0311] In step 2903, if the current block triggers a conventional intra-prediction, the target prediction mode of the conventional intra-prediction is from the MPM list, and the current block is a luminance block, when predicting the current block based on the conventional intra-prediction, if the target prediction mode of the conventional prediction triggered by the current block exists in the MPM list, the index information of the target prediction mode triggered by the current block in the MPM list is determined.
[0312] In step 2904, the prediction mode index information is encoded based on the target prediction mode index information activated by the current block in the MPM list, where all bits of the prediction mode index information are obtained by performing binary arithmetic coding based on bypass.
[0313] For example, when the current block initiates a conventional intra-prediction, one flag is required to indicate whether the target prediction mode of the conventional prediction initiated by the current block is from the MPM list. If it is confirmed that the target prediction mode is from the MPM list, the index information of the target prediction mode in the MPM list is confirmed. If the target prediction mode is not from the MPM list, it is not necessary to confirm the index information of the target prediction mode in the MPM list.
[0314] Figure 30 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and corresponds to the decoding method shown in Figure 29, and as shown in Figure 30, the method includes the following steps.
[0315] In step 3001, if the current block triggers intra-subblock prediction, the target prediction mode for intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, the prediction mode index information is decoded, where the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on one context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding.
[0316] In step 3002, based on the prediction mode index information, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list, and this prediction mode index information is used to indicate the target prediction mode index information in the MPM list.
[0317] In step 3003, the current block is predicted based on the target prediction mode.
[0318] In step 3004, when the current block triggers a conventional intra prediction, if the target prediction mode of the conventional intra prediction is from the MPM list and the current block is a luminance block, when predicting the current block based on the conventional intra prediction, decoding is performed on the prediction mode index information, where all bits of the prediction mode index information are obtained by performing binary arithmetic decoding based on bypass.
[0319] In step 3005, the target prediction mode to be activated by the current block is determined from the MPM list based on the prediction mode index information, and this prediction mode index information is used to indicate the index information of the target prediction mode to be activated by the current block in the MPM list.
[0320] In step 3006, the current block is predicted based on the target prediction mode.
[0321] In an embodiment of the present invention, when the reference row of the target prediction mode of the current block is an adjacent row of the current block, i.e., intra_luma_ref_idx is equal to 0, when encoding or decoding the prediction mode index information, if the current block activates an intra-subblock prediction mode, context-based adaptive binary arithmetic encoding or decoding is performed on the first bit of the prediction mode index information based on one context model; if the current block does not activate an intra-subblock prediction mode, bypass-based binary arithmetic encoding or decoding is performed on the first bit of the prediction mode index information. In this way, only one context model is required for encoding and decoding the prediction mode index information, reducing the number of required context models to one, reducing the complexity of encoding and decoding, and reducing memory overhead.
[0322] As an example, the context model used for predictive mode index information is shown in Table 26 below. [Table 26]
[0323] In other words, if intra_luma_ref_idx is equal to 0 and the current block invokes ISP mode, one context model is used to encode or decode the first bit of intra_luma_mpm_idx; if the current block does not invoke ISP mode, encoding or decoding the first bit of intra_luma_mpm_idx is performed by bypassing it.
[0324] "Fourth Embodiment of Luminance MPM"
[0325] Figure 31 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 31, includes the following steps.
[0326] In step 3101, if the current block triggers an intra-subblock prediction, the target prediction mode for the intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, the index information of the target prediction mode for the intra-subblock prediction triggered by the current block in the MPM list is determined.
[0327] In step 3102, prediction mode index information is encoded based on the index information of the target prediction mode of the intra-subblock prediction invoked by the current block in the MPM list, where all bits of the prediction mode index information are obtained by performing binary arithmetic coding based on bypass.
[0328] In step 3103, when the current block initiates a conventional intra-prediction, if the target prediction mode of the conventional intra-prediction is from the MPM list and the current block is a luminance block, when predicting the current block based on the conventional intra-prediction, if the target prediction mode initiated by the current block exists in the MPM list, the index information of the target prediction mode initiated by the current block in the MPM list is determined.
[0329] In step 3104, prediction mode index information is encoded based on the index information of the target prediction mode activated by the current block in the MPM list, where the first bit of the prediction mode index information is obtained by context-based adaptive binary arithmetic decoding based on one context model, and the other bits are obtained by bypass-based binary arithmetic decoding.
[0330] For example, when the current block invokes a conventional intra-prediction block, one flag is required to indicate whether the target prediction mode of the conventional prediction invoked by the current block is from the MPM list. If it is confirmed that the target prediction mode is from the MPM list, the index information of the target prediction mode in the MPM list is confirmed. If the target prediction mode is not from the MPM list, it is not necessary to confirm the index information of the target prediction mode in the MPM list.
[0331] Figure 32 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 31, and as shown in Figure 32, the method includes the following steps.
[0332] In step 3201, if the current block triggers intra-subblock prediction, the target prediction mode for intra-subblock prediction exists in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, decoding is performed on the prediction mode index information, where all bits of the prediction mode index information are obtained by performing binary arithmetic decoding based on bypass.
[0333] In step 3202, based on the prediction mode index information, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list, and this prediction mode index information is used to indicate the target prediction mode index information in the MPM list.
[0334] In step 3203, the current block is predicted based on the target prediction mode.
[0335] In step 3204, when the current block triggers conventional intra prediction, if the target prediction mode of the conventional intra prediction is from the MPM list and the current block is a luminance block, when predicting the current block based on the conventional intra prediction, decoding is performed on the prediction mode index information, where the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on one context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding.
[0336] In step 3205, the target prediction mode to be activated by the current block is determined from the MPM list based on the prediction mode index information, and this prediction mode index information is used to indicate the index information of the target prediction mode to be activated by the current block in the MPM list.
[0337] In step 3206, the current block is predicted based on the target prediction mode.
[0338] In an embodiment of the present invention, if the reference row of the target prediction mode of the current block is an adjacent row of the current block, i.e., intra_luma_ref_idx is equal to 0, when encoding or decoding the prediction mode index information, if the current block activates the intra subblock prediction mode, bypass-based binary arithmetic encoding or decoding is performed on the first bit of the prediction mode index information; if the current block does not activate the intra subblock prediction mode, context-based adaptive binary arithmetic encoding or decoding is performed on the first bit of the prediction mode index information based on a single context model. In this way, only one context model is required for encoding and decoding the prediction mode index information, reducing the number of required context models to one, reducing the complexity of encoding and decoding, and reducing memory overhead.
[0339] As an example, the context model used for predictive mode index information is shown in Table 27 below. [Table 27]
[0340] In other words, if intra_luma_ref_idx is equal to 0 and the current block does not invoke ISP mode, one context model is used to encode or decode the first bit of intra_luma_mpm_idx; if the current block invokes ISP mode, encoding or decoding the first bit of intra_luma_mpm_idx is performed by bypassing it.
[0341] "Fifth Embodiment of the MPM for Luminance"
[0342] Syntactic elements transmitted between the encoding and decoding sides may include planar indication information, which is used to indicate whether the target prediction mode of the current block is planar prediction mode, and the planar indication information occupies 1 bit. Exemplarily, the planar indication information is intra_luma_not_planar_flag.
[0343] In related technologies, the encoding and decoding methods for planar instruction information are as shown in Table 28 below. [Table 28]
[0344] As shown in Table 29 above, the planar instruction information intra_luma_not_planar_flag employs context-based adaptive binary arithmetic coding, where the selection of context depends on whether the current block triggers intra subblock prediction mode; in other words, two different context models are required for coding and decoding planar instruction information.
[0345] Figure 33 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 33, includes the following steps.
[0346] In step 3301, if the current block triggers an intra-subblock prediction, the target prediction mode of the intra-subblock prediction is present in the MPM list, and the current block is a luminance block, when predicting the current block based on the intra-subblock prediction, planar indication information is encoded depending on whether the target prediction mode of the intra-subblock prediction triggered by the current block is a planar prediction mode, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing context-based adaptive binary arithmetic decoding based on a first context model.
[0347] In step 3302, if the current block triggers a conventional intra prediction, the target prediction mode of the conventional intra prediction is from the MPM list, and the current block is a luminance block, when predicting the current block based on the conventional intra prediction, planar indication information is encoded depending on whether the target prediction mode of the conventional intra prediction triggered by the current block is a planar prediction mode, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing context-based adaptive binary arithmetic decoding based on a second context model, the first context model and the second context model being the same.
[0348] Figure 34 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 33, and as shown in Figure 34, the method includes the following steps.
[0349] In step 3401, if the current block triggers an intra-subblock prediction, the target prediction mode for the intra-subblock prediction is present in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, planar indication information is decoded, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing context-based adaptive binary arithmetic decoding based on a first context model.
[0350] In step 3402, when it is determined that the target prediction mode for the intra-subblock prediction triggered by the current block is the planar prediction mode based on the planar instruction information, the current block is predicted based on the planar prediction mode.
[0351] In step 3403, when it is determined that the target prediction mode for the intra-subblock prediction initiated by the current block is not the planar prediction mode based on the planar instruction information, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list based on the prediction mode index information, and the current block is predicted based on the target prediction mode.
[0352] In step 3404, if the current block triggers a conventional intra prediction, the target prediction mode of the conventional intra prediction is from the MPM list, and the current block is a luminance block, then when predicting the current block based on the conventional intra prediction, decoding is performed on the planar indication information, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing context-based adaptive binary arithmetic decoding based on a second context model, where the first and second context models are the same.
[0353] In step 3405, when it is determined that the target prediction mode activated by the current block is the planar prediction mode based on the planar instruction information, the current block is predicted based on the planar prediction mode.
[0354] In step 3406, when it is determined that the target prediction mode activated by the current block is not a planar prediction mode based on the planar instruction information, the target prediction mode activated by the current block is determined from the MPM list based on the prediction mode index information, and the current block is predicted based on the target prediction mode.
[0355] In an embodiment of the present invention, when encoding or decoding planar instruction information without considering whether the current block activates intra-subblock prediction mode, context-based adaptive binary arithmetic encoding or decoding is performed on the planar instruction information based on the same context model in both cases: when the current block activates intra-subblock prediction mode and when the current block activates conventional intra-prediction. This reduces the number of context models required for planar instruction information to one, thereby reducing the complexity of encoding and decoding and the memory overhead.
[0356] As an example, the encoding and decoding methods for planar instruction information are as shown in Table 29 below. [Table 29]
[0357] As shown in Table 29 above, the planar instruction information intra_luma_not_planar_flag still employs context-based adaptive binary arithmetic coding and decoding, but the context selection does not depend on whether the current block invokes intra-subblock prediction mode. Instead, coding and decoding are performed using a single fixed context model in both cases: when the current block invokes intra-subblock prediction mode and when the current block invokes conventional intra-prediction.
[0358] "Sixth Embodiment of Luminance MPM"
[0359] Figure 35 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 35, includes the following steps.
[0360] In step 3501, if the current block triggers an intra-subblock prediction, the target prediction mode of the intra-subblock prediction is present in the MPM list, and the current block is a luminance block, when predicting the current block based on the intra-subblock prediction, planar indication information is encoded depending on whether the target prediction mode of the intra-subblock prediction triggered by the current block is a planar prediction mode, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing binary arithmetic coding based on bypass.
[0361] In step 3502, if the current block triggers a conventional intra prediction, the target prediction mode of the conventional intra prediction is from the MPM list, and the current block is a luminance block, when predicting the current block based on the conventional intra prediction, planar indication information is encoded depending on whether the target prediction mode of the conventional intra prediction triggered by the current block is a planar prediction mode, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing binary arithmetic coding based on bypass.
[0362] Figure 36 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 35, and as shown in Figure 36, the method includes the following steps.
[0363] In step 3601, if the current block triggers an intra-subblock prediction, the target prediction mode for the intra-subblock prediction is present in the MPM list, and the current block is a luminance block, then when predicting the current block based on the intra-subblock prediction, the planar indication information is decoded, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing binary arithmetic decoding based on bypass.
[0364] In step 3602, when it is determined that the target prediction mode for the intra-subblock prediction triggered by the current block is the planar prediction mode based on the planar instruction information, the current block is predicted based on the planar prediction mode.
[0365] In step 3603, when it is determined, based on the planar instruction information, that the target prediction mode for the intra-subblock prediction initiated by the current block is not the planar prediction mode, the target prediction mode for the intra-subblock prediction initiated by the current block is determined from the MPM list based on the prediction mode index information, and the current block is predicted based on the target prediction mode.
[0366] In step 3604, if the current block triggers a conventional intra prediction, the target prediction mode of the conventional intra prediction is from the MPM list, and the current block is a luminance block, then when predicting the current block based on the conventional intra prediction, decoding is performed on the planar indication information, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing binary arithmetic decoding based on bypass.
[0367] In step 3605, when it is determined that the target prediction mode activated by the current block is the planar prediction mode based on the planar instruction information, the current block is predicted based on the planar prediction mode.
[0368] In step 3606, when it is determined that the target prediction mode activated by the current block is not a planar prediction mode based on the planar instruction information, the target prediction mode activated by the current block is determined from the MPM list based on the prediction mode index information, and the current block is predicted based on the target prediction mode.
[0369] In an embodiment of the present invention, when encoding or decoding planar instruction information without considering whether the current block activates intra-subblock prediction mode, bypass-based binary arithmetic encoding or decoding is performed on the planar instruction information in two cases: when the current block activates intra-subblock prediction and when the current block activates conventional intra-prediction. This reduces the context model required for planar instruction information to zero, thereby reducing the complexity and memory overhead of encoding and decoding.
[0370] As an example, the encoding and decoding methods for planar instruction information are shown in Table 30 below. [Table 30]
[0371] As shown in Table 30 above, the planar instruction information intra_luma_not_planar_flag does not employ a context-based adaptive binary arithmetic coding / decoding method, but instead employs a bypass-based binary arithmetic coding or decoding method in two cases: when the current block activates intra subblock prediction mode and when the current block activates conventional intra prediction.
[0372] Furthermore, the above method can also be applied to scenarios that only consider conventional intranet predictions.
[0373] "Example 1"
[0374] In another embodiment, a coding method applied to the coding side is further provided, the coding method comprising the following steps:
[0375] In step 1, if the current block triggers a conventional intra-prediction, the target prediction mode of the conventional intra-prediction is from the MPM list, and the current block is a luminance block, then when predicting the current block based on the conventional intra-prediction, if the target prediction mode triggered by the current block is from the MPM list, the index information of the target prediction mode triggered by the current block in the MPM list is determined.
[0376] In step 2, prediction mode index information is encoded based on the index information of the target prediction mode activated by the current block in the MPM list, where the first bit of the prediction mode index information is obtained by context-based adaptive binary arithmetic decoding based on one context model, and the other bits are obtained by bypass-based binary arithmetic decoding.
[0377] For example, when the current block invokes a conventional intra-prediction block, one flag is required to indicate whether the target prediction mode of the conventional prediction invoked by the current block is from the MPM list. If it is confirmed that the target prediction mode is from the MPM list, then the index information of the target prediction mode in the MPM list is determined. If the target prediction mode is not from the MPM list, it is not necessary to determine the index information of the target prediction mode in the MPM list.
[0378] In another embodiment, a decoding method applied to the decoding side is further provided, which is a decoding method corresponding to the above encoding method, and the decoding method includes the following steps.
[0379] In step 1, when the current block triggers conventional intra prediction, if the target prediction mode of the conventional intra prediction is from the MPM list and the current block is a luminance block, when predicting the current block based on conventional intra prediction, decoding is performed on the prediction mode index information, where the first bit of the prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on the second context model, and the other bits are obtained by performing bypass-based binary arithmetic decoding, and the second and first context models are the same context model.
[0380] In step 2, the target prediction mode to be activated by the current block is determined from the MPM list based on the prediction mode index information, and the prediction mode index information is used to indicate the index information of the target prediction mode in the MPM list.
[0381] In step 3, the current block is predicted based on the target prediction mode.
[0382] Example 2
[0383] In another embodiment, a coding method applied to the coding side is further provided, the coding method comprising the following steps:
[0384] In step 1, when the current block triggers conventional intra-prediction, if the target prediction mode of the conventional intra-prediction is from the MPM list and the current block is a luminance block, when predicting the current block based on conventional intra-prediction, if the target prediction mode triggered by the current block exists in the MPM list, the index information of the target prediction mode triggered by the current block in the MPM list is determined.
[0385] In step 2, the prediction mode index information is encoded based on the target prediction mode index information activated by the current block in the MPM list, where all bits of the prediction mode index information are obtained by performing binary arithmetic coding based on bypass.
[0386] For example, when the current block invokes a conventional intra-prediction block, one flag is required to indicate whether the target prediction mode of the conventional prediction invoked by the current block is from the MPM list. If it is confirmed that the target prediction mode is from the MPM list, the index information of the target prediction mode in the MPM list is confirmed. If the target prediction mode is not from the MPM list, it is not necessary to confirm the index information of the target prediction mode in the MPM list.
[0387] In another embodiment, a decoding method applied to the decoding side is further provided, which is a decoding method corresponding to the above encoding method, and the decoding method includes the following steps.
[0388] In step 1, when the current block triggers conventional intra prediction, if the target prediction mode of the conventional intra prediction is from the MPM list and the current block is a luminance block, then when predicting the current block based on the conventional intra prediction, decoding is performed on the prediction mode index information, where all bits of the prediction mode index information are obtained by performing binary arithmetic coding based on bypass.
[0389] In step 2, the target prediction mode to be activated by the current block is determined from the MPM list based on the prediction mode index information, and this prediction mode index information is used to indicate the index information of the target prediction mode to be activated by the current block in the MPM list.
[0390] In step 3, the current block is predicted based on the target prediction mode.
[0391] "Example 3"
[0392] In another embodiment, a coding method applied to the coding side is further provided, the coding method comprising the following steps:
[0393] In step 1, if the current block triggers a conventional intra prediction, the target prediction mode of the conventional intra prediction is from an MPM list, and the current block is a luminance block, when predicting the current block based on the conventional intra prediction, planar indication information is encoded depending on whether the target prediction mode of the conventional intra prediction triggered by the current block is a planar prediction mode, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing context-based adaptive binary arithmetic coding based on a context model.
[0394] In another embodiment, a decoding method applied to the decoding side is further provided, which is a decoding method corresponding to the above encoding method, and the decoding method includes the following steps.
[0395] In step 1, if the current block triggers a conventional intra prediction, the target prediction mode of the conventional intra prediction is from the MPM list, and the current block is a luminance block, then when predicting the current block based on the conventional intra prediction, decoding is performed on the planar indication information, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing context-based adaptive binary arithmetic decoding based on a single context model.
[0396] In step 2, when it is determined that the target prediction mode activated by the current block is the planar prediction mode based on the planar instruction information, the current block is predicted based on the planar prediction mode.
[0397] In step 3, when it is determined that the target prediction mode activated by the current block is not a planar prediction mode based on the planar instruction information, the target prediction mode activated by the current block is determined from the MPM list based on the prediction mode index information, and the current block is predicted based on the target prediction mode.
[0398] "Example 4"
[0399] In another embodiment, a coding method applied to the coding side is further provided, the coding method comprising the following steps:
[0400] In step 1, if the current block triggers a conventional intra prediction, the target prediction mode of the conventional intra prediction is from an MPM list, and the current block is a luminance block, when predicting the current block based on the conventional intra prediction, planar indication information is encoded depending on whether the target prediction mode of the conventional intra prediction triggered by the current block is a planar prediction mode, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing binary arithmetic coding based on bypass.
[0401] In another embodiment, a decoding method applied to the decoding side is further provided, which is a decoding method corresponding to the above encoding method, and the decoding method includes the following steps.
[0402] In step 1, if the current block triggers a conventional intra prediction, the target prediction mode of the conventional intra prediction is from the MPM list, and the current block is a luminance block, then when predicting the current block based on the conventional intra prediction, decoding is performed on the planar indication information, where the planar indication information is used to indicate whether the target prediction mode triggered by the current block is a planar prediction mode, and the planar indication information is obtained by performing binary arithmetic coding based on bypass.
[0403] In step 2, when it is determined that the target prediction mode activated by the current block is the planar prediction mode based on the planar instruction information, the current block is predicted based on the planar prediction mode.
[0404] In step 3, when it is determined that the target prediction mode activated by the current block is not a planar prediction mode based on the planar instruction information, the target prediction mode activated by the current block is determined from the MPM list based on the prediction mode index information, and the current block is predicted based on the target prediction mode.
[0405] "Chromaticity MPM"
[0406] The syntactic elements transmitted between the encoding and decoding sides further include chromaticity prediction mode index information, which is used to indicate the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list.
[0407] In related technologies, the chromaticity prediction mode index information and corresponding prediction modes are as shown in Table 31 below. [Table 31]
[0408] As can be seen from Table 31 above, if the current block supports cross-component prediction mode and activates cross-component prediction mode, the chromaticity prediction mode index information occupies a maximum of 4 bits. If the current block supports cross-component prediction mode but does not activate it, the chromaticity prediction mode index information occupies a maximum of 5 bits.
[0409] In related technologies, if the current block supports cross-component prediction mode and the current block activates cross-component prediction mode, the encoding and decoding method for chromaticity prediction mode index information is as shown in Table 32 below. [Table 32]
[0410] As can be seen from Table 32 above, when the current block supports cross-component prediction mode and the current block activates cross-component prediction mode, the first bit of the chromaticity prediction mode index information is obtained by context-based adaptive binary arithmetic decoding based on the first context model, the second bit of the chromaticity prediction mode index information is obtained by context-based adaptive binary arithmetic decoding based on the second context model, and the third and fourth bits of the chromaticity prediction mode index information are obtained by context-based adaptive binary arithmetic decoding based on the third context model. Furthermore, these three context models are different context models. In other words, the chromaticity prediction mode index information requires the use of three context models, resulting in significant memory overhead.
[0411] "First Embodiment of Chromaticity MPM"
[0412] Figure 37 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side, and as shown in Figure 37, the current block supports the cross-component prediction mode, the current block activates the cross-component prediction mode, the current block is the chromaticity block, and the method includes the following steps.
[0413] In step 3701, when predicting the current block based on the cross-component prediction mode, the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list is determined.
[0414] Here, the encoding side can select the final target prediction mode based on the rate distortion cost, and then notify the decoding side of which prediction mode was selected by encoding index information.
[0415] In step 3702, the chromaticity prediction mode index information is encoded based on the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list.
[0416] Here, the chromaticity prediction mode index information is used to indicate the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list. The first bit of the chromaticity prediction mode index information is obtained by context-based adaptive binary arithmetic coding based on a first context model, the second bit of the chromaticity prediction mode index information is obtained by context-based adaptive binary arithmetic coding based on a second context model, and the third and fourth bits of the chromaticity prediction mode index information are obtained by bypass-based binary arithmetic coding, where the first and second context models are different.
[0417] For example, the encoding side stores a list of candidate chromaticity prediction modes, and the encoding side can determine the target prediction mode to be used in the end using RDO. Then, by encoding an index value, it notifies the decoding side which prediction mode has been selected, i.e., it encodes chromaticity prediction mode index information.
[0418] As an example, the chromaticity prediction mode includes the same prediction mode as for luminance and the cross-component prediction mode. Here, the cross-component prediction mode includes a mode that derives linear model parameters using a two-sided template, a mode that derives linear model parameters using an upper template, a mode that derives linear model parameters using a left template, a planar prediction mode, a DC prediction mode, a vertical prediction mode, and a horizontal prediction mode.
[0419] Figure 38 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and corresponds to the encoding method shown in Figure 37 above, and as shown in Figure 38, the current block supports the cross-component prediction mode, the current block activates the cross-component prediction mode, the current block is the chromaticity block, and the method includes the following steps.
[0420] In step 3801, when predicting the current block based on the cross-component prediction mode, decoding is performed on the chromaticity prediction mode index information.
[0421] Here, the first bit of the chromaticity prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on the first context model, the second bit of the chromaticity prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on the second context model, the first and second context models are different, and the third and fourth bits of the chromaticity prediction mode index information are obtained by performing bypass-based binary arithmetic decoding.
[0422] In step 3802, the target prediction mode for the current block is determined from the candidate prediction mode list based on the chromaticity prediction mode index information.
[0423] In step 3803, the current block is predicted based on the target prediction mode.
[0424] For example, the decoding side can receive the encoded stream and then parse the syntax associated with the chromaticity prediction mode. Each prediction mode has a different encoded bit overhead, and the decoding side can parse the chromaticity prediction mode index information to uniquely determine the chromaticity prediction mode of the current block, thereby obtaining the predicted value of the current block to be used in the subsequent reconstruction process.
[0425] In an embodiment of the present invention, when the current block supports the cross-component prediction mode and the current block invokes the cross-component prediction mode, the third and fourth bits of the chromaticity prediction mode index information are obtained by bypass-based binary arithmetic decoding. This reduces the number of context models required for the chromaticity prediction mode index information to two, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0426] As an example, if the current block supports cross-component prediction mode and the current block activates cross-component prediction mode, the encoding and decoding methods for chromaticity prediction mode index information are as shown in Tables 33 and 34 below. [Table 33] [Table 34]
[0427] "Second Embodiment of Chromaticity MPM"
[0428] Figure 39 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side, and as shown in Figure 39, the current block supports the cross-component prediction mode, the current block activates the cross-component prediction mode, the current block is the chromaticity block, and the method includes the following steps.
[0429] In step 3901, when predicting the current block based on the cross-component prediction mode, the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list is determined.
[0430] Here, the encoding side can select the final target prediction mode based on the rate distortion cost, and then notify the decoding side of which prediction mode was selected by encoding index information.
[0431] In step 3902, the chromaticity prediction mode index information is encoded based on the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list.
[0432] Here, the chromaticity prediction mode index information is used to indicate the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list. The first bit of the chromaticity prediction mode index information is obtained by context-based adaptive binary arithmetic coding based on one context model, while the second, third, and fourth bits of the chromaticity prediction mode index information are obtained by binary arithmetic coding based on bit bypass.
[0433] Figure 40 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and corresponds to the encoding method shown in Figure 39 above, and as shown in Figure 40, the current block supports the cross-component prediction mode, the current block activates the cross-component prediction mode, the current block is the chromaticity block, and the method includes the following steps.
[0434] In step 4001, when predicting the current block based on the cross-component prediction mode, decoding is performed on the chromaticity prediction mode index information.
[0435] Here, the first bit of the chromaticity prediction mode index information is obtained by performing context-based adaptive binary arithmetic decoding based on one context model, while the second, third, and fourth bits of the chromaticity prediction mode index information are obtained by performing bypass-based binary arithmetic decoding.
[0436] In step 4002, the target prediction mode for the current block is determined from the candidate prediction mode list based on the chromaticity prediction mode index information.
[0437] In step 4003, the current block is predicted based on the target prediction mode.
[0438] In an embodiment of the present invention, when the current block supports cross-component prediction mode and the current block activates cross-component prediction mode, the first bit of the chromaticity prediction mode index information uses one context model, while the second, third, and fourth bits all employ a bypass-based binary arithmetic coding and decoding scheme. This reduces the number of context models required for the chromaticity prediction mode index information to one, thereby reducing the complexity of coding and decoding and lowering memory overhead.
[0439] As an example, if the current block supports cross-component prediction mode and the current block activates cross-component prediction mode, the encoding and decoding methods for chromaticity prediction mode index information are as shown in Tables 35 and 36 below. [Table 35] [Table 36]
[0440] "Third Embodiment of Chromaticity MPM"
[0441] Figure 41 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side, and as shown in Figure 41, if the current block supports the cross-component prediction mode and the current block is a chromaticity block, the method includes the following steps.
[0442] In step 4101, when predicting the current block based on the cross-component prediction mode, the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list is determined.
[0443] Here, the encoding side can select the final target prediction mode based on the rate distortion cost, and then notify the decoding side of which prediction mode was selected by encoding index information.
[0444] In step 4102, the chromaticity prediction mode index information is encoded based on the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list.
[0445] Here, the chromaticity prediction mode index information is used to indicate the index information of the target prediction mode for the current block in the corresponding candidate prediction mode list.
[0446] As an example, if the chromaticity prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode. When the chromaticity prediction mode index information is 110, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 111, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 11110, the target prediction mode is the planar prediction mode. When the chromaticity prediction mode index information is 111110, the target prediction mode is the vertical prediction mode. When the chromaticity prediction mode index information is 1111110, the target prediction mode is the horizontal prediction mode. If the chromaticity prediction mode index information is 1111111, the target prediction mode is the DC prediction mode.
[0447] For example, the chromaticity prediction mode index information and the corresponding prediction modes are shown in Table 37 below. [Table 37]
[0448] As can be seen from Table 37 above, if the current block supports cross-component prediction mode and activates it, the chromaticity prediction mode index information indicates cross-component prediction mode. In this case, the chromaticity prediction mode index information occupies a maximum of 3 bits, reducing bit overhead and consequently memory overhead. If the current block supports cross-component prediction mode but does not activate it, the chromaticity prediction mode index information indicates conventional intra-prediction. In this case, the chromaticity prediction mode index information occupies a maximum of 6 bits.
[0449] In another embodiment, when the chromaticity prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode. When the chromaticity prediction mode index information is 110, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 111, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 11110, the target prediction mode is the planar prediction mode. When the chromaticity prediction mode index information is 111110, the target prediction mode is the vertical prediction mode. When the chromaticity prediction mode index information is 1111110, the target prediction mode is the horizontal prediction mode. If the chromaticity prediction mode index information is 1111111, the target prediction mode is the DC prediction mode.
[0450] In step 4103, the current block is predicted based on the target prediction mode.
[0451] For example, the chromaticity prediction mode index information and the corresponding prediction modes are shown in Table 38 below. [Table 38]
[0452] As can be seen from Table 38 above, if the current block supports cross-component prediction mode and activates it, the chromaticity prediction mode index information indicates cross-component prediction mode. In this case, the chromaticity prediction mode index information occupies a maximum of 3 bits, reducing bit overhead and consequently memory overhead. If the current block supports cross-component prediction mode but does not activate it, the chromaticity prediction mode index information indicates conventional intra-prediction. In this case, the chromaticity prediction mode index information occupies a maximum of 7 bits.
[0453] Figure 42 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 41, and as shown in Figure 42, when the current block supports the cross-component prediction mode and the current block is a chromaticity block, the method includes the following steps.
[0454] In step 4201, when predicting the current block based on the cross-component prediction mode, decoding is performed on the chromaticity prediction mode index information.
[0455] In step 4202, the target prediction mode for the current block is determined from the list of candidate prediction modes based on the chromaticity prediction mode index information.
[0456] As an example, if the chromaticity prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode.
[0457] When the chromaticity prediction mode index information is 110, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 111, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 11110, the target prediction mode is the planar prediction mode. When the chromaticity prediction mode index information is 111110, the target prediction mode is the vertical prediction mode. When the chromaticity prediction mode index information is 1111110, the target prediction mode is the horizontal prediction mode. If the chromaticity prediction mode index information is 1111111, the target prediction mode is the DC prediction mode.
[0458] In another embodiment, when the chromaticity prediction mode index information is 10, the target prediction mode is the first cross-component prediction mode. When the chromaticity prediction mode index information is 110, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 111, the target prediction mode is a second cross-component prediction mode. When the chromaticity prediction mode index information is 11110, the target prediction mode is the planar prediction mode. When the chromaticity prediction mode index information is 111110, the target prediction mode is the vertical prediction mode. When the chromaticity prediction mode index information is 1111110, the target prediction mode is the horizontal prediction mode. If the chromaticity prediction mode index information is 1111111, the target prediction mode is the DC prediction mode.
[0459] Predict the current block based on the target prediction mode.
[0460] In step 4203, the current block is predicted based on the target prediction mode.
[0461] In embodiments of the present invention, if the current block supports the cross-component prediction mode and the current block activates the cross-component prediction mode, the bit overhead of the chromaticity prediction mode index information can be reduced, and consequently, the memory overhead can be reduced.
[0462] "CCLM mode"
[0463] Figure 43 is a flowchart of an encoding and decoding method according to an embodiment of the present invention, which can be applied to either the encoding or decoding side, and as shown in Figure 43, the method includes the following steps.
[0464] In step 4301, when the luminance and chromaticity of the current block share a single subdivision tree, if the width and height of the luminance block corresponding to the current block is 64*64 and the size of the chromaticity block corresponding to the current block is 32*32, then the current block does not support cross-component prediction mode.
[0465] In embodiments of the present invention, the dependence of luminance and chromaticity in CCLM mode can be reduced, and the need for the chromaticity block to wait for the reconstruction value of the 64*64 luminance block can be avoided.
[0466] "ALF mode"
[0467] The syntactic elements transmitted between the encoding and decoding sides further include ALF instruction information, which is used to indicate whether the current block invokes ALF. Exemplaryly, the ALF instruction information is alf_ctb_flag.
[0468] Regarding related technologies, the encoding and decoding methods for ALF instruction information are as shown in Table 39 below. [Table 39]
[0469] Here, the calculation formula selected by the context model is:
number
[0470] As can be seen from Table 39 and the above formula, the selection of the context model for encoding and decoding ALF instruction information depends on whether the block above the current block uses ALF, whether the block to the left of the current block uses ALF, and the index of the current component, requiring a total of nine context models to be used.
[0471] Specifically, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic coding and decoding is performed on the ALF indication information based on the target context model, which is one context model selected from three different context models included in the first set of context models, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF.
[0472] If the current block supports ALF and the current block is a CB chromaticity block, context-based adaptive binary arithmetic coding and decoding is performed on the ALF instruction information based on the target context model, which is one context model selected from three different context models included in a second set of context models, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF.
[0473] If the current block supports ALF and the current block is a CR chromaticity block, context-based adaptive binary arithmetic coding and decoding is performed on the ALF instruction information based on the target context model, which is one of three different context models included in a third set of context models, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF. Here, the nine context models mentioned above are different.
[0474] "First Embodiment of ALF Mode"
[0475] Figure 44 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and includes the following steps, as shown in Figure 44.
[0476] In step 4401, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic coding is performed on the ALF indication information based on the target context model before filtering the current block based on the ALF mode, where 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 block above the current block invokes ALF and whether the block to the left of the current block invokes ALF.
[0477] For example, the first set of context models includes the first, second, and third context models. If the block above the current block triggers ALF and the block to the left of the current block triggers ALF, the target context model is the first context model; if the block above the current block triggers ALF and the block to the left of the current block does not, or if the block above the current block does not trigger ALF and the block to the left of the current block triggers ALF, the target context model is the second context model; and if neither the block above nor the block to the left of the current block triggers ALF, the target context model is the third context model.
[0478] In step 4402, if the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information based on the target context model before filtering the current block based on the ALF mode, where the target context model is one context model selected from three different context models in a second context model set, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF, and the three context models in the second context model set and the three context models in the first context model set are different.
[0479] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0480] For example, the second set of context models includes the fourth, fifth, and sixth context models. If the block above the current block invokes ALF and the block to the left of the current block invokes ALF, the target context model is the fourth context model; if the block above the current block invokes ALF and the block to the left of the current block does not invoke ALF, or if the block above the current block does not invoke ALF and the block to the left of the current block invokes ALF, the target context model is the fifth context model; and if neither the block above nor the block to the left of the current block invokes ALF, the target context model is the sixth context model.
[0481] For example, the encoding side can determine whether the current block invokes ALF, i.e., whether to use adaptive loop filtering, by using RDO, and by encoding ALF instruction information in the code stream, it can notify the decoding side whether to invoke ALF, and consequently whether to perform adaptive loop filtering. If ALF is invoked, it is also necessary to encode the syntactic elements related to ALF, and the encoding side also performs filtering accordingly.
[0482] Figure 45 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 44, and as shown in Figure 45, the method includes the following steps.
[0483] In step 4501, if the current block supports the adaptive loop filter ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the target context model, where 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 block above the current block activates ALF and whether the block to the left of the current block activates ALF.
[0484] In step 4502, if the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the target context model before filtering the current block based on the ALF mode, where the target context model is one context model selected from three different context models in a second context model set, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF, and the three context models in the second context model set and the three context models in the first context model set are different.
[0485] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0486] After receiving the encoded stream, the decoding side can analyze whether the current block triggers adaptive loop filtering by decoding the ALF instruction information. If the ALF instruction information indicates that the current block triggers ALF, the decoding side can obtain the filtered and reconstructed pixels by continuing to decode the syntactic elements related to ALF in order to perform adaptive loop filtering on the current block.
[0487] As an example, the encoding and decoding methods for ALF instruction information are as shown in Table 40 below. [Table 40]
[0488] Here, the calculation formula selected by the context model is:
number
[0489] In an embodiment of the present invention, the CB chromaticity block and the CR chromaticity block can share three different context models with respect to the ALF instruction information. In this way, the number of context models used for the ALF instruction information can be reduced to six, resulting in reduced encoding and decoding complexity and reduced memory overhead.
[0490] "Second Embodiment of ALF Mode"
[0491] Figure 46 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 46, includes the following steps.
[0492] In step 4601, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic coding is performed on the ALF indication information based on the target context model before filtering the current block based on the ALF mode, where 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 block above the current block invokes ALF and whether the block to the left of the current block invokes ALF.
[0493] For example, the first set of context models includes the first, second, and third context models. If the block above the current block triggers ALF and the block to the left of the current block triggers ALF, the target context model is the first context model; if the block above the current block triggers ALF and the block to the left of the current block does not, or if the block above the current block does not trigger ALF and the block to the left of the current block triggers ALF, the target context model is the second context model; and if neither the block above nor the block to the left of the current block triggers ALF, the target context model is the third context model.
[0494] In step 4602, if the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic coding is performed on the ALF instruction information based on the target context model before filtering the current block based on the ALF mode, where the target context model is one context model selected from three different context models in a second set of context models, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF, and the three context models in the second set of context models and the three context models in the first set of context models are the same.
[0495] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0496] For example, the second set of context models includes the fourth, fifth, and sixth context models. If the block above the current block invokes ALF and the block to the left of the current block invokes ALF, the target context model is the fourth context model; if the block above the current block invokes ALF and the block to the left of the current block does not invoke ALF, or if the block above the current block does not invoke ALF and the block to the left of the current block invokes ALF, the target context model is the fifth context model; and if neither the block above nor the block to the left of the current block invokes ALF, the target context model is the sixth context model.
[0497] Figure 47 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 46, and as shown in Figure 47, the method includes the following steps.
[0498] In step 4701, if the current block supports the adaptive loop filter ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the target context model, where 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 block above the current block activates ALF and whether the block to the left of the current block activates ALF.
[0499] In step 4702, if the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the target context model before filtering the current block based on the ALF mode, where the target context model is one context model selected from three different context models in a second context model set, depending on whether the block above the current block invokes ALF and whether the block to the left of the current block invokes ALF, and the three context models in the second context model set and the three context models in the first context model set are different.
[0500] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0501] As an example, the encoding and decoding methods for ALF instruction information are as shown in Table 41 below. [Table 41]
[0502] Here, the calculation formula selected by the context model is:
number
[0503] In an embodiment of the present invention, the luminance block, CB chromaticity block, and CR chromaticity block can share three different context models for the ALF instruction information. This reduces the number of context models used for the ALF instruction information to three, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0504] "Third embodiment of ALF mode"
[0505] Figure 48 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 48, includes the following steps.
[0506] In step 4801, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic coding is performed on the ALF indication information based on the first context model before filtering the current block based on the ALF mode.
[0507] In step 4802, if the current block supports ALF and the current block is a CB chromaticity block, context-based adaptive binary arithmetic coding is performed on the ALF indication information based on a second context model before filtering the current block based on the ALF mode.
[0508] In step 4803, if the current block supports ALF and the current block is a CR chromaticity block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic coding is performed on the ALF instruction information based on a third context model, where the first, second, and third context models are different context models.
[0509] Figure 49 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 48, and as shown in Figure 49, the method includes the following steps.
[0510] In step 4901, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the first context model before filtering the current block based on the ALF mode, and the ALF indication information is used to indicate whether the current block activates ALF.
[0511] In step 4902, if the current block supports ALF and the current block is a CB chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on a second context model before filtering the current block based on the ALF mode.
[0512] In step 4903, if the current block supports ALF and the current block is a CR chromaticity block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on a third context model, where the first, second, and third context models are different context models.
[0513] As an example, the encoding and decoding methods for ALF instruction information are as shown in Table 42 below. [Table 42]
[0514] Here, the calculation formula selected by the context model is:
number
[0515] In an embodiment of the present invention, the luminance block shares one context model with respect to the ALF indicator information, the CB chromaticity block shares one context model, and the CR chromaticity block shares one context model. In this way, the number of context models used for the ALF indicator information can be reduced to three, which reduces the complexity of encoding and decoding and lowers memory overhead.
[0516] "Fourth embodiment of ALF mode"
[0517] Figure 50 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 50, includes the following steps.
[0518] In step 5001, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the first context model before filtering the current block based on the ALF mode.
[0519] In step 5002, if the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a second context model before filtering the current block based on the ALF mode.
[0520] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0521] Figure 51 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 50, and as shown in Figure 51, the method includes the following steps.
[0522] In step 5101, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the first context model before filtering the current block based on the ALF mode, and the ALF indication information is used to indicate whether the current block activates ALF.
[0523] In step 5102, if the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a second context model before filtering the current block based on the ALF mode, and the first and second context models are different.
[0524] As an example, the encoding and decoding methods for ALF instruction information are as shown in Table 43 below. [Table 43]
[0525] Here, the calculation formula selected by the context model is:
number
[0526] In an embodiment of the present invention, the luminance block shares one context model with respect to the ALF instruction information, and the CB chromaticity block and CR chromaticity block also share one context model. In this way, the number of context models used for the ALF instruction information can be reduced to two, which reduces the complexity of encoding and decoding and lowers memory overhead.
[0527] "Fifth Embodiment of ALF Mode"
[0528] Figure 52 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 52, includes the following steps.
[0529] In step 5201, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic coding is performed on the ALF indication information based on the target context model before filtering the current block based on the ALF mode, where 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 block above the current block invokes ALF and whether the block to the left of the current block invokes ALF.
[0530] For example, the first set of context models includes the first, second, and third context models. If the block above the current block triggers ALF and the block to the left of the current block triggers ALF, the target context model is the first context model; if the block above the current block triggers ALF and the block to the left of the current block does not, or if the block above the current block does not trigger ALF and the block to the left of the current block triggers ALF, the target context model is the second context model; and if neither the block above nor the block to the left of the current block triggers ALF, the target context model is the third context model.
[0531] In step 5202, if the current block supports ALF and the current block is a CB chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the first context model before filtering the current block based on the ALF mode.
[0532] In step 5203, if the current block supports ALF and the current block is a CR chromaticity block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the second context model, and the context models included in the first context model set, the first context model and the second context model are different context models.
[0533] Figure 53 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side, and is a decoding method corresponding to the encoding method shown in Figure 52, and as shown in Figure 53, the method includes the following steps.
[0534] In step 5301, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the target context model before filtering the current block based on the ALF mode, where 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 block above the current block activates ALF and whether the block to the left of the current block activates ALF.
[0535] For example, the first set of context models includes the first, second, and third context models. If the block above the current block triggers ALF and the block to the left of the current block triggers ALF, the target context model is the first context model; if the block above the current block triggers ALF and the block to the left of the current block does not, or if the block above the current block does not trigger ALF and the block to the left of the current block triggers ALF, the target context model is the second context model; and if neither the block above nor the block to the left of the current block triggers ALF, the target context model is the third context model.
[0536] In step 5302, if the current block supports ALF and the current block is a CB chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the first context model before filtering the current block based on the ALF mode.
[0537] In step 5303, if the current block supports ALF and the current block is a CR chromaticity block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the second context model, and the context models included in the first context model set, the first context model and the second context model are different context models.
[0538] As an example, the encoding and decoding method for ALF indication information for the luminance block is as shown in Table 44 below. [Table 44]
[0539] Here, the calculation formula selected by the context model is:
number
[0540] As an example, the encoding and decoding method for ALF instruction information for the chromaticity block is as shown in Table 45 below. [Table 45]
[0541] Here, the calculation formula selected by the context model is:
number
[0542] In an embodiment of the present invention, for ALF indication information, the luminance block needs to use three different context models, the CB chromaticity block shares one context model, and the CR chromaticity block shares one different context model. In this way, the number of context models used for ALF indication information can be reduced to five, which reduces the complexity of encoding and decoding and lowers memory overhead.
[0543] "Sixth Embodiment of ALF Mode"
[0544] Figure 54 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 54, includes the following steps.
[0545] In step 5401, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the first context model before filtering the current block based on the ALF mode.
[0546] In step 5402, if the current block supports ALF and the current block is a chromaticity block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the second context model, and the second context model and the first context model are the same context model.
[0547] Figure 55 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 54, and as shown in Figure 55, the method includes the following steps.
[0548] In step 5501, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on the first context model before filtering the current block based on the ALF mode, and the ALF indication information is used to indicate whether the current block activates ALF.
[0549] In step 5502, if the current block supports ALF and the current block is a chromaticity block, before filtering the current block based on the ALF mode, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on the second context model, and the second context model and the first context model are the same context model.
[0550] In an embodiment of the present invention, the luminance block, CB chromaticity block, and CR chromaticity block can share a single context model for the ALF instruction information. This reduces the number of context models used for the ALF instruction information to one, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0551] "The seventh embodiment of ALF mode"
[0552] Figure 56 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 56, includes the following steps.
[0553] In step 5601, if the current block supports ALF and the current block is a luminance block, the ALF indicator information is subjected to bypass-based binary arithmetic coding before filtering the current block based on the ALF mode.
[0554] In step 5602, if the current block supports ALF and the current block is a chromaticity block, the ALF indicator information is subjected to bypass-based binary arithmetic coding before filtering the current block based on the ALF mode.
[0555] Figure 57 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 56, and as shown in Figure 57, the method includes the following steps.
[0556] In step 5701, if the current block supports ALF and the current block is a luminance block, before filtering the current block based on the ALF mode, the ALF indicator information is subjected to bypass-based binary arithmetic decoding, and the ALF indicator information is used to indicate whether the current block activates ALF.
[0557] In step 5702, if the current block supports ALF and the current block is a chromaticity block, binary arithmetic decoding based on bypass is performed on the ALF indicator information before filtering the current block based on the ALF mode.
[0558] In an embodiment of the present invention, when the current block of the ALF instruction information is a luminance block, a CB chromaticity block, and a CR chromaticity block, a bypass-based binary arithmetic decoding method can be employed to encode or decode the ALF instruction information. In this way, the number of context models used for the ALF instruction information can be reduced to zero, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0559] "The eighth embodiment of ALF mode"
[0560] Figure 58 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 58, includes the following steps.
[0561] In step 5801, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic coding is performed on the ALF indication information based on one context model before filtering the current block based on the ALF mode, and the ALF indication information is used to indicate whether the current block activates ALF.
[0562] In step 5802, if the current block supports ALF, the current block activates the adaptive loop filter ALF, and the current block is a chromaticity block, then binary arithmetic decoding based on bypass is performed on the ALF indicator information before filtering is performed on the current block based on the ALF mode.
[0563] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0564] Figure 59 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 58, and as shown in Figure 59, the method includes the following steps.
[0565] In step 5901, if the current block supports ALF and the current block is a luminance block, context-based adaptive binary arithmetic decoding is performed on the ALF indication information based on one context model before filtering the current block based on the ALF mode, and the ALF indication information is used to indicate whether the current block activates ALF.
[0566] In step 5902, if the current block supports ALF, the current block activates the adaptive loop filter ALF, and the current block is a chromaticity block, then binary arithmetic decoding based on bypass is performed on the ALF indicator information before filtering is performed on the current block based on the ALF mode.
[0567] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0568] In an embodiment of the present invention, for the ALF indication information, the luminance block uses one context model, and the CB chromaticity block and CR chromaticity block are encoded or decoded using a bypass-based binary arithmetic encoding / decoding method. In this way, the number of context models used for the ALF indication information can be reduced to one, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0569] "The ninth embodiment of ALF mode"
[0570] Figure 60 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 60, includes the following steps.
[0571] In step 6001, if the current block supports ALF and the current block is a luminance block, the ALF indication information is binary arithmetic encoded by bypass before filtering the current block based on the ALF mode, and the ALF indication information is used to indicate whether the current block activates ALF.
[0572] In step 6002, if the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a context model before filtering the current block based on the ALF mode.
[0573] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0574] Figure 61 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 60, and as shown in Figure 61, the method includes the following steps.
[0575] In step 6101, if the current block supports ALF and the current block is a luminance block, before filtering the current block based on the ALF mode, the ALF indicator information is subjected to bypass-based binary arithmetic decoding, and the ALF indicator information is used to indicate whether the current block activates ALF.
[0576] In step 6102, if the current block supports ALF and the current block is a chromaticity block, context-based adaptive binary arithmetic decoding is performed on the ALF instruction information based on a context model before filtering the current block based on the ALF mode.
[0577] Here, the chromaticity block includes a CB chromaticity block and a CR chromaticity block.
[0578] In an embodiment of the present invention, the luminance block is encoded or decoded using a bypass-based binary arithmetic coding and decoding method for the ALF indication information, and the CB chromaticity block and CR chromaticity block share one context model. In this way, the number of context models used for the ALF indication information can be reduced to one, thereby reducing the complexity of coding and decoding and lowering memory overhead.
[0579] "MIP mode"
[0580] In MIP mode, syntactic elements transmitted between the encoder and decoder further include MIP instruction information, which is used to indicate whether the current block triggers an intra-predictive mode based on the matrix. Exemplarily, the MIP instruction information is Intra_MIP_flag.
[0581] In related technologies, if the current block supports a matrix-based intra-prediction mode, context-based adaptive binary arithmetic decoding can be performed on the MIP instruction information based on a target context model before predicting the current block based on the matrix-based intra-prediction mode. Here, the target context model is one of four different context models selected depending on whether the block above the current block activates a matrix-based intra-prediction mode, whether the block to the left of the current block activates a matrix-based intra-prediction mode, and whether the current block satisfies preset size conditions.
[0582] For example, the preset size condition may be that the width of the current block exceeds twice its height, or that the height of the current block exceeds twice its width. Of course, the preset size condition may be other conditions, and the embodiments of the present invention are not limited thereto.
[0583] Specifically, we assume that the four different context models mentioned above include the first, second, third, and fourth context models. If the block above the current block activates matrix-based intraprediction mode, the block to the left of the current block activates matrix-based intraprediction mode, and the current block does not meet the preset size condition, the target context model is the first context model. If the block above the current block activates matrix-based intraprediction mode, the block to the left of the current block does not activate matrix-based intraprediction mode, and the current block does not meet the preset size condition, or if the block above the current block does not activate matrix-based intraprediction mode, the block to the left of the current block activates matrix-based intraprediction mode, and the current block does not meet the preset size condition, the target context model is the second context model. If the block above the current block does not activate matrix-based intraprediction mode, the block to the left of the current block does not activate matrix-based intraprediction mode, and the current block does not meet the preset size condition, the target context model is the third context model. If the current block meets the preset size condition, the target context model is the fourth context model.
[0584] As can be seen from the above, in MIP mode, MIP instruction information needs to use four different context models, resulting in significant memory overhead.
[0585] "First Embodiment in MIP Mode"
[0586] Figure 62 is a flowchart of an encoding / decoding method according to an embodiment of the present invention, which can be applied to either the encoding or decoding side, and as shown in Figure 62, the method includes the following steps.
[0587] In step 6201, if the width and height of the current block are 32*32, the current block does not support the matrix-based intra-prediction mode.
[0588] Here, the current block is either a luminance block or a chromaticity block. For example, if the current block is a luminance block and its width and height are 32*32, then the current block does not support the matrix-based intra-predictive mode.
[0589] As another example, if the current block has a width and height of 32*16, the current block does not support matrix-based intra-predictive mode. Illustratively, the current block is either a luminance block or a chromaticity block.
[0590] As another example, if the current block has a width and height of 4x4, the current block does not support matrix-based intra-predictive mode. Illustratively, the current block is either a luminance block or a chromaticity block.
[0591] In embodiments of the present invention, if the current block is a large-sized block, it is guaranteed that the current block does not support the matrix-based intra-prediction mode, i.e., the current block cannot enable the matrix-based intra-prediction mode, thereby reducing the complexity of the calculations.
[0592] "Second Embodiment in MIP Mode"
[0593] Figure 63 is a flowchart of an encoding and decoding method according to an embodiment of the present invention, which is applied to the encoding side, and when the current block supports an intra-prediction mode based on a matrix, as shown in Figure 63, the method includes the following steps.
[0594] In step 6301, depending on whether the current block activates a matrix-based intra-prediction mode, context-based adaptive binary arithmetic coding is performed on the MIP instruction information based on the target context model, where the target context model is one of three different context models selected depending on whether the block above the current block activates a matrix-based intra-prediction mode and whether the block to the left of the current block activates a matrix-based intra-prediction mode.
[0595] As an example, let's assume that the three different context models described above 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, 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.
[0596] For example, if the encoding side determines that the current block satisfies the conditions for matrix-based intra-prediction, it can use RDO to determine whether the current block will activate MIP mode, i.e., whether to use the matrix-based intra-prediction method, and notify the decoding side whether to activate MIP mode by encoding MIP instruction information in the encoded stream.
[0597] In the encoded stream, the above MIP instruction information is encoded according to the specific situation, and if the current block activates MIP mode, other syntactic elements related to MIP also need to be encoded.
[0598] Figure 64 is a flowchart of an encoding and decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 63, and as shown in Figure 64, if the current block supports an intra-prediction mode based on a matrix, the method includes the following steps.
[0599] In step 6401, before predicting the current block based on the matrix-based intra-prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information based on the target context model, where the target context model is one of three different context models selected depending on whether the block above the current block triggers the matrix-based intra-prediction mode and whether the block to the left of the current block triggers the matrix-based intra-prediction mode.
[0600] As an example, let's assume that the three different context models described above 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, 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.
[0601] In step 6402, if it is determined based on the MIP instruction information that the current block will activate the matrix-based intra-prediction mode, the matrix-based intra-prediction mode will predict the current block.
[0602] For example, the decoding side receives the encoded stream, and if it determines that the current block satisfies the analysis conditions, it analyzes the MIP instruction information to determine whether the current block activates MIP mode. The analysis conditions include that the current block is a luminance block and that the size of the current block satisfies certain conditions. Of course, the analysis conditions are not limited to the above conditions and may include other conditions.
[0603] The MIP instruction information allows the decryption side to determine whether the prediction mode of the current block is an intra-prediction mode based on a matrix. If it is an intra-prediction mode based on a matrix, the decoding side can continue parsing other syntax related to that mode to obtain information about that prediction mode and, consequently, obtain a predicted value.
[0604] In an embodiment of the present invention, in MIP mode, one context model is selected from three different context models, without considering the size conditions of the current block, only depending on whether the block above the current block activates a matrix-based intra-prediction mode and whether the block to the left of the current block activates a matrix-based intra-prediction mode. In this way, the number of context models required for MIP instruction information can be reduced to three, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0605] "Third Embodiment in MIP Mode"
[0606] Figure 65 is a flowchart of an encoding and decoding method according to an embodiment of the present invention, which is applied to the encoding side, and when the current block supports an intra-prediction mode based on a matrix, as shown in Figure 65, the method includes the following steps.
[0607] In step 6501, depending on whether the current block activates the matrix-based intra-prediction mode, context-based adaptive binary arithmetic coding is performed on the MIP instruction information based on the target context model, where the target context model is one context model selected from two different context models depending on whether the current block satisfies the preset size condition.
[0608] Here, the preset size condition may be that the width of the current block is greater than twice its height, or that the height of the current block is greater than twice its width.
[0609] As an example, let's assume the two different context models described above include a first context model and a second context model. If the current block size satisfies the preset size condition, the target context model is the first context model; if the current block size does not satisfy the preset size condition, the target context model is the second context model.
[0610] Figure 66 is a flowchart of an encoding and decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 65 above, and as shown in Figure 66, if the current block supports an intra-prediction mode based on a matrix, the method includes the following steps.
[0611] In step 6601, before predicting the current block based on the matrix-based intra-prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information based on the target context model, where the target context model is one context model selected from two different context models depending on whether the current block satisfies the preset size condition.
[0612] Here, the preset size condition may be that the width of the current block is greater than twice its height, or that the height of the current block is greater than twice its width.
[0613] As an example, let's assume the two different context models described above include a first context model and a second context model. If the current block size satisfies the preset size condition, the target context model is the first context model; if the current block size does not satisfy the preset size condition, the target context model is the second context model.
[0614] In step 6602, if it is determined based on the MIP instruction information that the current block will activate the matrix-based intra-prediction mode, the matrix-based intra-prediction mode will predict the current block.
[0615] In an embodiment of the present invention, in MIP mode, the selection of a context model for MIP instruction information can be based solely on size conditions, without considering whether the block above the current block activates a matrix-based intra-prediction mode, or whether the block to the left of the current block activates a matrix-based intra-prediction mode. This reduces the number of context models required for MIP instruction information to two, thereby reducing the complexity of encoding and decoding and lowering memory overhead.
[0616] "Fourth Embodiment in MIP Mode"
[0617] Figure 67 is a flowchart of an encoding and decoding method according to an embodiment of the present invention, which is applied to the encoding side, and when the current block supports an intra-prediction mode based on a matrix, as shown in Figure 67, the method includes the following steps.
[0618] In step 6701, depending on whether the current block activates the matrix-based intra-prediction mode, context-based adaptive binary arithmetic coding is performed on the MIP instruction information based on the same context model.
[0619] Figure 68 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 67 above, and as shown in Figure 68, if the current block supports an intra-prediction mode based on a matrix, the method includes the following steps.
[0620] In step 6801, before predicting the current block based on the matrix-based intra-prediction mode, context-based adaptive binary arithmetic decoding is performed on the MIP instruction information based on the same context model.
[0621] In step 6802, if it is determined based on the MIP instruction information that the current block will activate the matrix-based intra-prediction mode, the matrix-based intra-prediction mode will predict the current block.
[0622] In an embodiment of the present invention, in MIP mode, context-based adaptive binary arithmetic coding or decoding is performed on the MIP instruction information based on the same context model under different conditions, without considering whether the block above the current block activates a matrix-based intra-prediction mode, whether the block to the left of the current block activates a matrix-based intra-prediction mode, or size conditions, for the selection of the context model of the MIP instruction information. In this way, the number of context models required for the MIP instruction information can be reduced to one, thereby reducing the complexity of coding and decoding and lowering memory overhead.
[0623] "Fifth Embodiment in MIP Mode"
[0624] Figure 69 is a flowchart of an encoding and decoding method according to an embodiment of the present invention, which is applied to the encoding side, and when the current block supports an intra-prediction mode based on a matrix, as shown in Figure 69, the method includes the following steps.
[0625] In step 6901, depending on whether the current block activates the matrix-based intra-prediction mode, bypass-based binary arithmetic coding is performed on the MIP instruction information.
[0626] Figure 70 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 69 above, and as shown in Figure 70, if the current block supports an intra-prediction mode based on a matrix, the method includes the following steps.
[0627] In step 7001, before predicting the current block based on the matrix-based intra-prediction mode, bypass-based binary arithmetic decoding is performed on the MIP instruction information.
[0628] In step 7002, if it is determined based on the MIP instruction information that the current block will activate the matrix-based intra-prediction mode, the matrix-based intra-prediction mode will predict the current block.
[0629] In embodiments of the present invention, in MIP mode, bypass-based binary arithmetic coding or decoding is performed on MIP instruction information under different conditions, without considering whether the block above the current block activates a matrix-based intra-prediction mode, whether the block to the left of the current block activates a matrix-based intra-prediction mode, or size conditions; that is, context-based adaptive binary arithmetic coding or decoding is not used. In this way, the number of context models required for MIP instruction information can be reduced to zero, thereby reducing the complexity of coding and decoding and lowering memory overhead.
[0630] "BDPCM mode"
[0631] In related technologies, BDPCM technology lacks flexibility because it does not have an SPS-level syntax to turn BDPCM mode on or off, nor does it have an SPS-level syntax to control the switch for the largest encoded block size that can enable BDPCM mode.
[0632] "First Embodiment in BDPCM Mode"
[0633] Figure 71 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side, and as shown in Figure 71, if the current block supports BDPCM mode, the method includes the following steps.
[0634] In step 7101, before performing BDPCM encoding on the current block, first BDPCM instruction information is encoded, and the first BDPCM instruction information is used to indicate whether the current processing unit supports BDPCM mode.
[0635] As an example, the first BDPCM instruction information can reside in a sequence parameter set, an image parameter set, a slice level, or a tile level. Preferably, the first BDPCM instruction information resides in a sequence parameter set, i.e., the first BDPCM instruction information is an SPS level syntax.
[0636] In another embodiment, the encoding side may encode range indication information, which is used to indicate the range of processing units that support the BDPCM mode. This range indication information may be present in the sequence parameter set, image parameter set, slice level, or tile level.
[0637] Figure 72 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 71 above, and as shown in Figure 72, if the current block supports BDPCM mode, the method includes the following steps.
[0638] In step 7201, before performing BDPCM decoding on the current block, a first BDPCM instruction information is decoded, and the first BDPCM instruction information is used to indicate whether the current processing unit supports BDPCM mode.
[0639] In step 7202, the current processing unit is decoded based on the first BDPCM instruction information.
[0640] For example, if the first BDPCM instruction information indicates that the current processing unit supports BDPCM mode, the current processing unit is processed based on the BDPCM mode.
[0641] As an example, the first BDPCM instruction information can reside in a sequence parameter set, an image parameter set, a slice level, or a tile level. Preferably, the first BDPCM instruction information resides in a sequence parameter set, i.e., the first BDPCM instruction information is an SPS level syntax.
[0642] In another embodiment, the decoding side may decode range indication information, which is used to indicate the range of a processing unit that supports the BDPCM mode. This range indication information may be present in the sequence parameter set, image parameter set, slice level, or tile level.
[0643] In embodiments of the present invention, syntax for turning BDPCM mode on or off is added to improve the flexibility of the encoding and decoding process. Syntax is also added for specifying the range of processing units that support BDPCM mode.
[0644] "Second Embodiment in BDPCM Mode"
[0645] Figure 73 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side, and as shown in Figure 73, if the current block supports BDPCM mode, the method includes the following steps.
[0646] In step 7301, before performing BDPCM processing on the current block, a second BDPCM instruction is encoded, which is used to indicate the size range of the processing unit that supports the BDPCM mode.
[0647] Here, the unit scope in the current processing unit may be at the sequence level, image parameter set level, or block level, etc. For example, the current processing unit may be the current image block.
[0648] For example, the size range may be smaller than 32*32.
[0649] For example, the second BDPCM instruction information is used to specify the maximum size of a processing unit that can support BDPCM mode, i.e., the maximum size of a processing unit that can use BDPCM mode. Exemplarily, the maximum size is 32*32.
[0650] As an example, the second BDPCM instruction information can reside in the sequence parameter set (SPS), image parameter set, slice level, or tile level. Preferably, the second BDPCM instruction information resides in the sequence parameter set, that is, the second BDPCM instruction information is syntax added to the SPS level.
[0651] Figure 74 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 73 above, and as shown in Figure 74, if the current block supports BDPCM mode, the method includes the following steps.
[0652] In step 7401, before performing BDPCM processing on the current block, a second BDPCM instruction is decoded, and the second BDPCM instruction is used to specify the size range of the processing unit that supports the BDPCM mode.
[0653] In step 7402, it is determined whether the current block can perform BDPCM processing based on the second BDPCM instruction information and the size of the current block.
[0654] For example, if the size of the current block is within the size range of the processing unit that supports the BDPCM mode specified in the second BDPCM instruction information, it is determined that the current block can perform BDPCM processing. If the size of the current block is not within the size range of the processing unit that supports the BDPCM mode specified in the second BDPCM instruction information, it is determined that the current block cannot perform BDPCM processing.
[0655] For example, the second BDPCM instruction information is used to specify the maximum size of the processing unit that can support BDPCM mode. If the size of the current block is less than or equal to the maximum size specified in the second BDPCM instruction information, it is determined that the current block can perform BDPCM processing. If the size of the current block is greater than the maximum size specified in the second BDPCM instruction information, it is determined that the current block cannot perform BDPCM processing.
[0656] As an example, the second BDPCM instruction information can reside in the sequence parameter set (SPS), image parameter set, slice level, or tile level. Preferably, the second BDPCM instruction information resides in the sequence parameter set, that is, the second BDPCM instruction information is syntax added to the SPS level.
[0657] In an embodiment of the present invention, syntax for controlling the size range in which the BDPCM mode can be used has been added, improving the flexibility of the encoding and decoding process.
[0658] "Third Embodiment in BDPCM Mode"
[0659] In BDPCM mode, syntactic elements transmitted between the encoding and decoding sides may include a third BDPCM instruction and a fourth BDPCM instruction. The third BDPCM instruction is used to indicate whether the current processing unit is initiating BDPCM mode, and the fourth BDPCM instruction is used to indicate the index information for the predicted direction of BDPCM mode. Exemplaryly, the third BDPCM instruction is Intra_bdpcm_flag, and the fourth BDPCM instruction is Intra_bdpcm_dir_flag.
[0660] In related technologies, if the current block supports BDPCM mode, when it is determined to encode or decode the third BDPCM instruction information, it is necessary to perform context-based adaptive binary arithmetic encoding or context-based adaptive binary arithmetic decoding for the third BDPCM instruction information based on one context model, and when it is determined to encode or decode the fourth BDPCM instruction information, it is necessary to perform context-based adaptive binary arithmetic encoding or context-based adaptive binary arithmetic decoding for the fourth BDPCM instruction information based on another different context model. In other words, as shown in Table 46 below, it is necessary to use two context models to encode and decode the third and fourth BDPCM instruction information. [Table 46]
[0661] Figure 75 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side, and as shown in Figure 75, if the current block supports BDPCM mode, the method includes the following steps.
[0662] In step 7501, before performing BDPCM coding on the current block, context-based adaptive binary arithmetic coding is performed on the third BDPCM instruction information based on one context model, depending on whether the current block activates BDPCM mode.
[0663] For example, if the current block satisfies the conditions for differential PCM encoding of quantized residuals based on the block, RDO can determine whether to activate BDPCM mode, i.e., whether to use the differential PCM encoding method of quantized residuals, and it can also indicate whether the current block activates BDPCM mode by encoding a third BDPCM instruction in the encoding stream.
[0664] In step 7502, if it is determined that the current block will activate BDPCM mode, the fourth BDPCM instruction information is subjected to bypass-based binary arithmetic coding based on the predicted direction index information of BDPCM mode.
[0665] Here, the prediction direction in BDPCM mode includes the horizontal prediction direction and the vertical prediction direction.
[0666] For example, the encoding side can determine the prediction direction by RDO, and based on the selected prediction direction, it indicates the prediction direction of the BDPCM mode by encoding a fourth BDPCM instruction information in the encoded stream.
[0667] Figure 76 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 75 above, and as shown in Figure 76, if the current block supports BDPCM mode, the method includes the following steps.
[0668] In step 7601, before performing block-based differential PCM decoding of the quantized residuals for the current block, context-based adaptive binary arithmetic decoding is performed on the third BDPCM instruction information based on one context model.
[0669] For example, the decoding side can receive the encoded stream of the current block, and if the current block satisfies the analysis conditions, it determines whether the current block activates BDPCM mode by analyzing third BDPCM instruction information.
[0670] Here, the analysis conditions include the current block size satisfying a certain size condition. Of course, these analysis conditions are not limited to the above conditions and may include other conditions as well.
[0671] In step 7602, when the third BDPCM instruction information indicates that the current block will activate BDPCM mode, the fourth BDPCM instruction information is subjected to bypass-based binary arithmetic decoding, and the fourth BDPCM instruction information is used to indicate the index information for the predicted direction of BDPCM mode.
[0672] If the current block activates BDPCM mode, the prediction direction needs to be determined by further analyzing the fourth BDPCM instruction information.
[0673] In step 7603, BDPCM processing is performed on the current block according to the predicted direction indicated by the fourth BDPCM instruction information.
[0674] For example, the decoding side can obtain residual data after quantization through an inverse accumulation process, then inversely quantize it, and add it with the predicted value to obtain the reconstructed pixel value.
[0675] As an example, the encoding and decoding methods for the third BDPCM instruction information and the fourth BDPCM instruction information are as shown in Table 47 below. [Table 47]
[0676] In an embodiment of the present invention, the third BDPCM instruction information uses one context model, and the fourth BDPCM instruction information employs a bypass-based binary arithmetic coding and decoding method. This reduces the number of context models required for the third and fourth BDPCM instruction information to one, thereby reducing the complexity of coding and decoding and lowering memory overhead.
[0677] "Fourth Embodiment in BDPCM Mode"
[0678] Figure 77 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side, and as shown in Figure 77, if the current block supports BDPCM mode, the method includes the following steps.
[0679] In step 7701, before performing BDPCM encoding on the current block, a third BDPCM instruction information is subjected to bypass-based binary arithmetic encoding, depending on whether the current block activates BDPCM mode.
[0680] For example, if the current block satisfies the conditions for differential PCM encoding of quantized residuals based on the block, rate distortion can be used to determine whether the current block uses the differential PCM encoding method for quantized residuals, and a third BDPCM instruction information is encoded in the encoding stream to indicate whether the current block activates BDPCM mode.
[0681] In step 7702, if it is determined that the current block will activate BDPCM mode, the fourth BDPCM instruction information is subjected to bypass-based binary arithmetic coding based on the predicted direction index information of BDPCM mode.
[0682] Here, the prediction direction in BDPCM mode includes the horizontal prediction direction and the vertical prediction direction.
[0683] For example, the encoding side can determine the prediction direction by rate distortion, and by encoding a fourth BDPCM instruction information in the encoded stream, it indicates the prediction direction of the BDPCM mode.
[0684] Figure 78 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 77 above, and as shown in Figure 78, if the current block supports BDPCM mode, the method includes the following steps.
[0685] In step 7801, before performing BDPCM decoding on the current block, bypass-based binary arithmetic decoding is performed on the third BDPCM instruction information.
[0686] For example, the decoding side can receive the encoded stream of the current block, and if the current block satisfies the analysis conditions, it determines whether the current block activates BDPCM mode by analyzing third BDPCM instruction information.
[0687] Here, the analysis conditions include the current block size satisfying a certain size condition. Of course, these analysis conditions are not limited to the above conditions and may include other conditions as well.
[0688] In step 7802, when the third BDPCM instruction information indicates that the current block will activate BDPCM mode, the fourth BDPCM instruction information is subjected to bypass-based binary arithmetic decoding, and the fourth BDPCM instruction information is used to indicate the index information for the predicted direction of BDPCM mode.
[0689] If the current block activates BDPCM mode, the prediction direction needs to be determined by further analyzing the fourth BDPCM instruction information.
[0690] In step 7803, BDPCM processing is performed on the current block according to the predicted direction indicated by the fourth BDPCM instruction information.
[0691] For example, the decoding side can obtain residual data after quantization through an inverse accumulation process, then inversely quantize it, and add it with the predicted value to obtain the reconstructed pixel value.
[0692] As an example, the encoding and decoding methods for the third BDPCM instruction information and the fourth BDPCM instruction information are as shown in Table 48 below. [Table 48]
[0693] In an embodiment of the present invention, the third BDPCM instruction information and the fourth BDPCM instruction information employ a bypass-based binary arithmetic coding and decoding method. This reduces the number of context models required for the third BDPCM instruction information and the fourth BDPCM instruction information to zero, thereby reducing the complexity of coding and decoding and lowering memory overhead.
[0694] "Fifth Embodiment in BDPCM Mode"
[0695] In BDPCM mode, syntactic elements transmitted between the encoder and decoder further include CBF indicator information, which is used to indicate whether the transformation block of the current block has non-zero transformation coefficients. Exemplary examples of CBF indicator information are cbf_flag or Tu_cbf_luma.
[0696] In related technologies, before predicting 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 based on a target context model. Here, the target context model is one of five different context models selected depending on the conditions that the current block invokes intra-subblock prediction mode, whether the previous transform block of the current block has non-zero transform coefficients, the partitioning depth of the transform block of the current block, and whether the current block invokes BDPCM mode.
[0697] Specifically, we assume these five different context models include the first, second, third, fourth, and fifth context models. If the current block triggers intra-subblock prediction, the target context model is one selected from the first and second context models, depending on whether the previous transforming block of the current block has non-zero transformation coefficients. Exemplaryly, if the previous transforming block of the current block has non-zero transformation coefficients, the target context model is the first context model; if the previous transforming block of the current block does not have non-zero transformation coefficients, the target context model is the second context model. If the current block does not trigger intra-subblock prediction, i.e., if the current block triggers conventional intra-prediction, the target context model is one selected from the third and fourth context models, depending on the partitioning depth of the transforming block of the current block. For example, if the current block's transformation block division depth is greater than the preset division depth, the target context model is the third context model; if the current block's transformation block division depth is less than or equal to the preset division depth, the target context model is the fourth context model; and if the current block activates BDPCM mode, the target context model is the fifth context model.
[0698] In related technologies, CBF instruction information requires the use of five context models, and the large number of required context models results in high encoding and decoding complexity and significant memory overhead.
[0699] Figure 79 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the decoding side, and as shown in Figure 79, the method includes the following steps.
[0700] In step 7901, when it is determined that the current block triggers intrasubblock prediction and that CBF instruction information should be coded, context-based adaptive binary arithmetic coding is performed on the CBF instruction information based on the target context model, where the target context model is a single context model selected from two different context models included in the first set of context models, depending on whether the previous transformation block of the current block has non-zero transformation coefficients.
[0701] As an example, assuming that the first set of context models includes a first context model and a second context model, the target context model is the first context model if the transformation block preceding the current block has non-zero transformation coefficients, and the target context model is the second context model if the transformation block preceding the current block does not have non-zero transformation coefficients.
[0702] In step 7902, when it is determined that the current block will initiate conventional intra-prediction or BDPCM mode, and that the CBF instruction information will be encoded, context-based adaptive binary arithmetic coding is performed on the CBF instruction information based on the target context model, where the target context model is one context model selected from two different context models in a second context model set, depending on the partition depth of the transformed block of the current block, and the two context models in the second context model set and the two context models in the first context model set are different.
[0703] As an example, assuming that the second set of context models includes the third and fourth context models, the target context model is the third context model if the partition depth of the current block's transformation block is greater than the preset partition depth, and the target context model is the fourth context model if the partition depth of the current block's transformation block is less than or equal to the preset partition depth.
[0704] Figure 80 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 79 above, and as shown in Figure 80, the method includes the following steps.
[0705] In step 8001, when it is determined that the current block triggers intrasubblock prediction and that decoding of the CBF instruction information is to be performed, context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, where the target context model is a single context model selected from two different context models included in the first set of context models, depending on whether the previous transformation block of the current block has non-zero transformation coefficients.
[0706] As an example, assuming that the first set of context models includes a first context model and a second context model, the target context model is the first context model if the transformation block preceding the current block has non-zero transformation coefficients, and the target context model is the second context model if the transformation block preceding the current block does not have non-zero transformation coefficients.
[0707] In step 8002, when it is determined that the current block will initiate conventional intra-prediction or BDPCM mode, and that the CBF instruction information will be decoded, context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, where the target context model is one context model selected from two different context models in a second context model set, depending on the partition depth of the transformed block of the current block, and the two context models in the second context model set and the two context models in the first context model set are different.
[0708] As an example, assuming that the second set of context models includes the third and fourth context models, the target context model is the third context model if the partition depth of the current block's transformation block is greater than the preset partition depth, and the target context model is the fourth context model if the partition depth of the current block's transformation block is less than or equal to the preset partition depth.
[0709] In an embodiment of the present invention, when the current block activates BDPCM mode, the selection of the context model for encoding and decoding CBF instruction information also depends on the partitioning depth of the current block's transformed block. The current block shares two context models when it activates BDPCM mode and when it activates conventional intra prediction. This reduces the number of context models required for CBF instruction information to four, thereby reducing the complexity of encoding and decoding and lowering content overhead.
[0710] "Sixth Embodiment in BDPCM Mode"
[0711] Figure 81 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 81, includes the following steps.
[0712] In step 8101, when it is determined that the current block will perform an intra-subblock prediction, a conventional intra-prediction, or a BDPCM mode, and it is determined that the CBF instruction information will be coded, context-based adaptive binary arithmetic coding is performed on the CBF instruction information based on the target context model, where the target context model is one of two different context models selected depending on the partition depth of the transformed block of the current block.
[0713] As an example, assuming these two different context models are the first and second context models, the target context model is the first context model if the partition depth of the current block's transformation block is greater than the preset partition depth, and the target context model is the second context model if the partition depth of the current block's transformation block is less than or equal to the preset partition depth.
[0714] Figure 82 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 81 above, and as shown in Figure 82, the method includes the following steps.
[0715] In step 8201, when it is determined that the current block will initiate intra-subblock prediction, conventional intra-prediction, or BDPCM mode, and that decoding of the CBF instruction information will be performed, context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, where the target context model is one of two different context models selected depending on the partition depth of the transformed block of the current block.
[0716] As an example, assuming these two different context models are the first and second context models, the target context model is the first context model if the partition depth of the current block's transformation block is greater than the preset partition depth, and the target context model is the second context model if the partition depth of the current block's transformation block is less than or equal to the preset partition depth.
[0717] In embodiments of the present invention, when the current block activates BDPCM mode or intra-subblock prediction mode, the selection of the context model for encoding and decoding CBF instruction information also depends on the partitioning depth of the transformed block of the current block. When the current block activates BDPCM mode, activates conventional intra-prediction, and activates intra-subblock partitioning mode, two context models are shared. This reduces the number of context models required for CBF instruction information to two, thereby reducing the complexity of encoding and decoding and lowering content overhead.
[0718] "Seventh Embodiment in BDPCM Mode"
[0719] Figure 83 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 83, includes the following steps.
[0720] In step 8301, if the current block triggers an intra-subblock prediction or a conventional intra-prediction, and it is determined to encode the CBF instruction information, context-based adaptive binary arithmetic encoding is performed on the CBF instruction information based on the target context model, the target context model being one context model selected from two different context models included in the first set of context models, depending on the partition depth of the transformed block of the current block.
[0721] As an example, assuming that the first set of context models includes the first and second context models, the target context model is the first context model if the partition depth of the current block's transformation block is greater than the preset partition depth, and the target context model is the second context model if the partition depth of the current block's transformation block is less than or equal to the preset partition depth.
[0722] In step 8302, when it is determined that the current block will activate BDPCM mode and that encoding of CBF instruction information will be performed, context-based adaptive binary arithmetic encoding is performed on the CBF instruction information based on the target context model, where the target context model is one of the context models included in the first set of context models.
[0723] Figure 84 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in the embodiment of Figure 83 above, and as shown in Figure 84, the method includes the following steps.
[0724] In step 8401, if the current block triggers an intra-subblock prediction or a conventional intra-prediction, and it is determined to decode the CBF instruction information before predicting the current block based on the intra-subblock prediction, context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, where the target context model is one context model selected from two different context models included in the first set of context models, depending on the partition depth of the transformed block of the current block.
[0725] As an example, assuming that the first set of context models includes the first and second context models, the target context model is the first context model if the partition depth of the current block's transformation block is greater than the preset partition depth, and the target context model is the second context model if the partition depth of the current block's transformation block is less than or equal to the preset partition depth.
[0726] In step 8402, when it is determined that the current block will activate BDPCM mode and that the CBF instruction information will be decoded, context-based adaptive binary arithmetic decoding is performed on the CBF instruction information based on the target context model, where the target context model is one of the context models included in the first set of context models.
[0727] In embodiments of the present invention, in intra-subblock prediction and conventional intra-prediction, CBF instruction information shares two context models based on the division depth of the transformed block of the current block. In BDPCM mode, for the context model of encoding and decoding CBF instruction information, one of the two context models used in conventional intra-prediction and intra-subblock prediction modes can be selected. This reduces the number of context models required for CBF instruction information to two, thereby reducing the complexity of encoding and decoding and lowering content overhead.
[0728] "JCCR mode"
[0729] Figure 85 is a flowchart of an encoding method according to an embodiment of the present invention, which is applied to the encoding side and, as shown in Figure 85, includes the following steps.
[0730] In step 8501, before encoding the current block based on the JCCR mode, JCCR instruction information is encoded depending on whether the current block supports the JCCR mode, and the JCCR instruction information is used to indicate whether the current processing unit supports the JCCR mode.
[0731] Here, the unit scope in the current processing unit may be at the sequence level, image parameter set level, or block level, etc. For example, the current processing unit is the current image block.
[0732] Here, whether the current processing unit supports JCCR mode refers to whether JCCR mode can be enabled, that is, whether JCCR mode is turned on. For example, the JCCR indication information is sps_jccr_enable_flag, which is the JCCR enable flag. For example, if sps_jccr_enable_flag is true, it indicates that the current block supports JCCR mode. For example, the current block may be a chromatic residual block.
[0733] As an example, JCCR instruction information can reside in the sequence parameter set (SPS), image parameter set, slice level, or tile level. Preferably, the JCCR instruction information resides in the sequence parameter set, that is, the JCCR instruction information is syntax added to the SPS level.
[0734] For example, the encoding side may encode range indication information, which is used to indicate the range of processing units that support the JCCR mode. For example, this range indication information may be present in the sequence parameter set (SPS), image parameter set, slice level, or tile level.
[0735] After this, the decryption process determines, based on the JCCR instruction information, whether the current block will activate JCCR mode.
[0736] For example, if the JCCR mode indicates that the current block supports JCCR mode, the determination of the CBF value of the current block can continue. If the CBF values of both the CB component and CR component of the current block are both true, i.e., if the residual coefficients of both the CB component and CR component of the current block are not zero, the encoder can activate JCCR mode. Exemplarily, whether the current block activates JCCR mode can be determined by RDO on the encoder.
[0737] Figure 86 is a flowchart of a decoding method according to an embodiment of the present invention, which is applied to the decoding side and is a decoding method corresponding to the encoding method shown in Figure 85 above, and as shown in Figure 86, the method includes the following steps.
[0738] In step 8601, before decoding the current block based on the JCCR mode, the JCCR instruction information is decoded, and the JCCR instruction information is used to indicate whether the current processing unit supports the JCCR mode.
[0739] In step 8602, if it is determined that the current block supports JCCR mode based on the JCCR instruction information, and the current block activates JCCR mode, the chromaticity residual coefficient of the current block is obtained by decoding the current block according to the correlation between the CB component and CR component of the current block.
[0740] For example, if it is determined that the current block supports JCCR mode based on the JCCR indication information, the determination of the current block's CBF value can be continued. If both the CBF value of the current block's CB component and the CBF value of its CR component are true, i.e., both the CB component and CR component of the current block have non-zero conversion coefficients, the analysis continues to determine whether the current block activates JCCR mode. If it is determined that the current block activates JCCR mode, the chromaticity residual coefficient of the current block is obtained by decoding the current block according to the correlation between the CB component and CR component of the current block.
[0741] Here, the CBF value of the current block is used to indicate whether the current block's transformation block has non-zero transformation coefficients, i.e., whether the current block's transformation block contains one or more transformation coefficients that are not equal to zero. The CBF value of the current block may include the CBF value of the current block's CB component and the CBF value of the current block's CR component. Here, the CBF value of the current block's CB component is used to indicate whether the current block's CB transformation block has non-zero transformation coefficients, i.e., whether the current block's CB transformation block contains one or more transformation coefficients that are not equal to zero. The CBF value of the current block's CR component is used to indicate whether the current block's CR transformation block has non-zero transformation coefficients, i.e., whether the current block's CR transformation block contains one or more transformation coefficients that are not equal to zero. If the CBF value of the current block's CB component is true, i.e., the CBF value of the CB component is 1, it indicates that the current block's CB transformation block has non-zero transformation coefficients. If the CBF value of the current block's CR component is true, i.e., the CBF value of the CR component is 1, it indicates that the current block's CR transformation block has non-zero transformation coefficients.
[0742] As an example, JCCR instruction information can reside in the sequence parameter set (SPS), image parameter set, slice level, or tile level. Preferably, the JCCR instruction information resides in the sequence parameter set, that is, the JCCR instruction information is syntax added to the SPS level....
Claims
1. A method of decryption, Decoding is performed on the first BDPCM instruction information, which is used to indicate whether the current processing unit supports BDPCM mode. The first BDPCM instruction information exists in the sequence parameter set, where, if the flag 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 flag value of the first BDPCM instruction information is a second value, it is determined that the current processing unit does not support BDPCM mode. If the current processing unit supports BDPCM mode, the second BDPCM instruction information is decoded, and the second BDPCM instruction information is used to indicate the size range of the image block that supports BDPCM mode, and the second BDPCM instruction information is present in the sequence parameter set. Based on the first BDPCM instruction information and the second BDPCM instruction information, the current processing unit is subjected to decoding. Includes, Here, based on the first BDPCM instruction information and the second BDPCM instruction information, decoding is performed on the current processing unit. This includes determining whether the current processing unit can support decoding in BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, Here, determining whether the current processing unit can support decoding of BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit is: The process includes determining that the current processing unit can support the BDPCM mode if the flag value of the first BDPCM instruction information is a 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 aforementioned method, If the current processing unit can support BDPCM mode, decoding is performed on the third BDPCM instruction information, and the third BDPCM instruction information is used to instruct whether the current processing unit should activate BDPCM mode. The third BDPCM instruction information is used to decode the fourth BDPCM instruction information when the current processing unit instructs to activate the BDPCM mode, and the fourth BDPCM instruction information is used to indicate the index information for the prediction direction of the BDPCM mode. BDPCM processing is performed 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 includes the horizontal prediction direction and the vertical prediction direction. Including, A decryption method characterized by the following.
2. The method according to claim 1, characterized in that the second BDPCM instruction information is also used to specify the maximum size of a processing unit capable of supporting the BDPCM mode.
3. The method according to 2, characterized in that the maximum size of the processing unit that can support the BDPCM mode is 32*32.
4. When the current processing unit activates BDPCM mode, and it is determined that it will decode CBF instruction information, it further includes performing context-based adaptive binary arithmetic decoding on the CBF instruction information based on a target context model, wherein the CBF instruction information is used to indicate whether the transformation block of the current processing unit has non-zero transformation coefficients, and the target context model is one context model in a first set of context models. The method according to feature 1.
5. The method according to any one of claims 1 to 4, characterized in that the current processing unit is the current image block.
6. A method of encoding, Encoding is performed on the first BDPCM instruction information, the first BDPCM instruction information is used to indicate whether the current processing unit supports BDPCM mode, the first BDPCM instruction information exists in the sequence parameter set, where, if the flag value of the first BDPCM instruction information is a first value, the first BDPCM instruction information is used to indicate that the current processing unit supports BDPCM mode, and if the flag value of the first BDPCM instruction information is a second value, the first BDPCM instruction information is used to indicate that the current processing unit does not support BDPCM mode. If the current processing unit supports BDPCM mode, a second BDPCM instruction information is encoded, the second BDPCM instruction information is used to indicate the size range of the processing unit that supports BDPCM mode, and the second BDPCM instruction information is present in the sequence parameter set. Based on the first BDPCM instruction information and the second BDPCM instruction information, encoding is performed for the current processing unit. Includes, Here, encoding is performed on the current processing unit based on the first BDPCM instruction information and the second BDPCM instruction information. This includes determining whether the current processing unit can support encoding in BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, Here, determining whether the current processing unit can support encoding in BDPCM mode is done based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit. The process includes determining that the current processing unit can support the BDPCM mode if the flag value of the first BDPCM instruction information is a 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 method further includes encoding a third BDPCM instruction information if the current processing unit can support the BDPCM mode, and the third BDPCM instruction information is used to instruct whether the current processing unit activates the BDPCM mode. If the third BDPCM instruction information is used to instruct the current processing unit to activate BDPCM mode, the method is: Encoding is performed on the fourth BDPCM instruction information, which is used to indicate the index information of the prediction direction of the BDPCM mode, where the prediction direction of the BDPCM mode further includes the horizontal prediction direction and the vertical prediction direction. A coding method characterized by the following.
7. The method according to 6, characterized in that the second BDPCM instruction information is also used to indicate the maximum size of a processing unit capable of supporting the BDPCM mode.
8. The method according to 7, characterized in that the maximum size of the processing unit that can support the BDPCM mode is 32*32.
9. If the third BDPCM instruction information is used to instruct the current processing unit to activate BDPCM mode, The encoding of CBF instruction information further includes performing context-based adaptive binary arithmetic coding on the CBF instruction information based on a target context model, wherein the CBF instruction information is used to indicate whether the transformation block of the current processing unit has non-zero transformation coefficients, and the target context model is one context model in a first set of context models. The method according to feature 6.
10. The method according to any one of claims 6 to 9, characterized in that the current processing unit is the current image block.
11. A decoding device, A first decoding module configured to decode first BDPCM instruction information, the first BDPCM instruction information being used to indicate whether the current processing unit supports BDPCM mode, the first BDPCM instruction information being present in a sequence parameter set, wherein if the flag 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 flag value of the first BDPCM instruction information is a second value, it is determined that the current processing unit does not support BDPCM mode. Equipped with, The decoding device further, If the current processing unit supports BDPCM mode, the second BDPCM instruction information is decoded, and the second BDPCM instruction information is used to indicate the size range of the image block that supports BDPCM mode, and the second BDPCM instruction information is present in the sequence parameter set. Based on the first BDPCM instruction information and the second BDPCM instruction information, the current processing unit is subjected to decoding. Used for, Here, based on the first BDPCM instruction information and the second BDPCM instruction information, decoding is performed on the current processing unit. This includes determining whether the current processing unit can support decoding in BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, Here, determining whether the current processing unit can support decoding of BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit is: The process includes determining that the current processing unit can support the BDPCM mode if the flag value of the first BDPCM instruction information is a 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 further, If the current processing unit can support BDPCM mode, the third BDPCM instruction information is decoded, and the third BDPCM instruction information is used to instruct whether the current processing unit should activate BDPCM mode. The third BDPCM instruction information decodes the fourth BDPCM instruction information when the current processing unit instructs to activate the BDPCM mode, and the fourth BDPCM instruction information is used to indicate the index information of the prediction direction of the BDPCM mode. BDPCM processing is performed 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 includes the horizontal prediction direction and the vertical prediction direction. A decoding device characterized by being used for [a specific purpose].
12. An encoding device, An encoding module configured to encode first BDPCM instruction information, the first BDPCM instruction information is used to indicate whether the current processing unit supports BDPCM mode, the first BDPCM instruction information is present in a sequence parameter set, wherein if the flag 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 flag value of the first BDPCM instruction information is a second value, it is determined that the current processing unit does not support BDPCM mode. Equipped with, The encoding device further, If the current processing unit supports BDPCM mode, a second BDPCM instruction information is encoded, the second BDPCM instruction information is used to indicate the size range of the processing unit that supports BDPCM mode, and the second BDPCM instruction information is present in the sequence parameter set. Based on the first BDPCM instruction information and the second BDPCM instruction information, encoding is performed for the current processing unit. Used for, Here, encoding is performed on the current processing unit based on the first BDPCM instruction information and the second BDPCM instruction information. This includes determining whether the current processing unit can support encoding in BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, Here, determining whether the current processing unit can support encoding in BDPCM mode is done based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit. The process includes determining that the current processing unit can support the BDPCM mode if the flag value of the first BDPCM instruction information is a 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 encoding device further, If the current processing unit can support BDPCM mode, encoding is performed on a third BDPCM instruction information, and the third BDPCM instruction information is used to instruct whether the current processing unit activates BDPCM mode, further comprising: If the third BDPCM instruction information is used to instruct the current processing unit to activate BDPCM mode, the encoding device, Encoding is performed on the fourth BDPCM instruction information, which is used to indicate the index information of the prediction direction of the BDPCM mode, where the prediction direction of the BDPCM mode further includes the horizontal prediction direction and the vertical prediction direction. An encoding device characterized by the following features.
13. It is an electronic device, Processor and Memory for storing processor-executable instructions, Equipped with, Here, the processor is configured to perform a decoding method, and the method is Decoding is performed on the first BDPCM instruction information, which is used to indicate whether the current processing unit supports BDPCM mode. The first BDPCM instruction information exists in the sequence parameter set, where, if the flag 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 flag value of the first BDPCM instruction information is a second value, it is determined that the current processing unit does not support BDPCM mode. If the current processing unit supports BDPCM mode, the second BDPCM instruction information is decoded, and the second BDPCM instruction information is used to indicate the size range of the image block that supports BDPCM mode, and the second BDPCM instruction information is present in the sequence parameter set. Based on the first BDPCM instruction information and the second BDPCM instruction information, the current processing unit is subjected to decoding. Includes, Here, based on the first BDPCM instruction information and the second BDPCM instruction information, decoding is performed on the current processing unit. This includes determining whether the current processing unit can support decoding in BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, Here, determining whether the current processing unit can support decoding of BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit is: The process includes determining that the current processing unit can support the BDPCM mode if the flag value of the first BDPCM instruction information is a 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 aforementioned method, If the current processing unit can support BDPCM mode, decoding is performed on the third BDPCM instruction information, and the third BDPCM instruction information is used to instruct whether the current processing unit should activate BDPCM mode. The third BDPCM instruction information is used to decode the fourth BDPCM instruction information when the current processing unit instructs to activate the BDPCM mode, and the fourth BDPCM instruction information is used to indicate the index information for the prediction direction of the BDPCM mode. BDPCM processing is performed 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 includes the horizontal prediction direction and the vertical prediction direction. Including, An electronic device characterized by the following features.
14. It is an electronic device, Processor and Memory for storing processor-executable instructions, Equipped with, Here, the processor is configured to perform an encoding method, and the method is Encoding is performed on the first BDPCM instruction information, which is used to indicate whether the current processing unit supports BDPCM mode. The first BDPCM instruction information exists in the sequence parameter set, where, if the flag 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 flag value of the first BDPCM instruction information is a second value, it is determined that the current processing unit does not support BDPCM mode. If the current processing unit supports BDPCM mode, a second BDPCM instruction information is encoded, the second BDPCM instruction information is used to indicate the size range of the processing unit that supports BDPCM mode, and the second BDPCM instruction information is present in the sequence parameter set. Based on the first BDPCM instruction information and the second BDPCM instruction information, encoding is performed for the current processing unit. Includes, Here, encoding is performed on the current processing unit based on the first BDPCM instruction information and the second BDPCM instruction information. This includes determining whether the current processing unit can support encoding in BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, Here, determining whether the current processing unit can support encoding in BDPCM mode is done based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit. The process includes determining that the current processing unit can support the BDPCM mode if the flag value of the first BDPCM instruction information is a 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 aforementioned method, If the current processing unit can support BDPCM mode, encoding is performed on a third BDPCM instruction information, and the third BDPCM instruction information is used to instruct whether the current processing unit activates BDPCM mode, further comprising: If the third BDPCM instruction information is used to instruct the current processing unit to activate BDPCM mode, the method is: Encoding is performed on the fourth BDPCM instruction information, which is used to indicate the index information of the prediction direction of the BDPCM mode, where the prediction direction of the BDPCM mode further includes the horizontal prediction direction and the vertical prediction direction. An electronic device characterized by the following features.
15. A computer-readable storage medium on which instructions are stored, When the aforementioned instruction is executed by the processor, the processor is made to implement a decoding method, and the method is Decoding is performed on the first BDPCM instruction information, which is used to indicate whether the current processing unit supports BDPCM mode. The first BDPCM instruction information exists in the sequence parameter set, where, if the flag 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 flag value of the first BDPCM instruction information is a second value, it is determined that the current processing unit does not support BDPCM mode. If the current processing unit supports BDPCM mode, the second BDPCM instruction information is decoded, and the second BDPCM instruction information is used to indicate the size range of the image block that supports BDPCM mode, and the second BDPCM instruction information is present in the sequence parameter set. Here, if the size of the current processing unit is within the size range of an image block that supports the BDPCM mode indicated by the second BDPCM instruction information, it is determined that the current block can perform differential PCM processing of quantized residuals based on the block. If the current processing unit size is not within the size range of an image block that supports the BDPCM mode indicated by the second BDPCM instruction information, it is determined that the current block cannot perform differential PCM processing of the quantized residuals based on the block. Based on the first BDPCM instruction information and the second BDPCM instruction information, the current processing unit is subjected to decoding. Includes, Here, based on the first BDPCM instruction information and the second BDPCM instruction information, decoding is performed on the current processing unit. This includes determining whether the current processing unit can support decoding in BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, Here, determining whether the current processing unit can support decoding of BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit is: The process includes determining that the current processing unit can support the BDPCM mode if the flag value of the first BDPCM instruction information is a 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 aforementioned method, If the current processing unit can support BDPCM mode, decoding is performed on the third BDPCM instruction information, and the third BDPCM instruction information is used to instruct whether the current processing unit should activate BDPCM mode. The third BDPCM instruction information is used to decode the fourth BDPCM instruction information when the current processing unit instructs to activate the BDPCM mode, and the fourth BDPCM instruction information is used to indicate the index information for the prediction direction of the BDPCM mode. BDPCM processing is performed 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 includes the horizontal prediction direction and the vertical prediction direction. Including, A computer-readable storage medium characterized by the following features.
16. A computer-readable storage medium on which instructions are stored, When the aforementioned instruction is executed by the processor, the processor implements an encoding method, and the method is Encoding is performed on the first BDPCM instruction information, the first BDPCM instruction information is used to indicate whether the current processing unit supports BDPCM mode, the first BDPCM instruction information exists in the sequence parameter set, where, if the flag value of the first BDPCM instruction information is a first value, the first BDPCM instruction information is used to indicate that the current processing unit supports BDPCM mode, and if the flag value of the first BDPCM instruction information is a second value, the first BDPCM instruction information is used to indicate that the current processing unit does not support BDPCM mode. If the current processing unit supports BDPCM mode, a second BDPCM instruction information is encoded, the second BDPCM instruction information is used to indicate the size range of the processing unit that supports BDPCM mode, and the second BDPCM instruction information is present in the sequence parameter set. Based on the first BDPCM instruction information and the second BDPCM instruction information, encoding is performed for the current processing unit. Includes, Here, encoding is performed on the current processing unit based on the first BDPCM instruction information and the second BDPCM instruction information. This includes determining whether the current processing unit can support encoding in BDPCM mode based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit, Here, determining whether the current processing unit can support encoding in BDPCM mode is done based on the first BDPCM instruction information, the second BDPCM instruction information, and the size of the current processing unit. The process includes determining that the current processing unit can support the BDPCM mode if the flag value of the first BDPCM instruction information is a 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 aforementioned method, If the current processing unit can support BDPCM mode, encoding is performed on a third BDPCM instruction information, and the third BDPCM instruction information is used to instruct whether the current processing unit activates BDPCM mode, further comprising: If the third BDPCM instruction information is used to instruct the current processing unit to activate BDPCM mode, the method is: Encoding is performed on the fourth BDPCM instruction information, which is used to indicate the index information of the prediction direction of the BDPCM mode, where the prediction direction of the BDPCM mode further includes the horizontal prediction direction and the vertical prediction direction. A computer-readable storage medium characterized by the following features.
Citation Information
Patent Citations
Bdpcm-based image coding method and device therefor
WO2020218793A1
Video signal processing method and device using block dpcm prediction method
WO2020251260A1
Maximum allowed block size for bdpcm mode
WO2020257557A1