Image codec method, image decodec method, and decoder
Patent Information
- Application Number
- JP2025070555
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2039-06-25
AI Technical Summary
The existing video codecs, particularly those utilizing Matrix-based Intra Prediction (MIP) in Versatile Video Coding (VVC), face inefficiencies due to the need for large storage space and increased processing time caused by the use of different parameters for luminance blocks of varying sizes, leading to higher complexity and reduced performance.
The proposed solution involves unifying the initial right shift parameters for different sizes and MIP mode numbers using an offset parameter to standardize the number of right shift bits, thereby simplifying the MIP algorithm and reducing the need for parameter queries and storage of additional tables.
This approach reduces storage space and overall processing time while maintaining codec performance, enhancing the efficiency of the video coding process by eliminating the need for querying and storing multiple parameter sets.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of video codecs, and in particular, to an image coding method, an encoder, a decoder, and a storage medium.
Background Art
[0002] In the reference software test platform of Versatile Video Coding (VVC), a new intra-coding technology called Matrix-based Intra Prediction (MIP) has been proposed. MIP is an intra-prediction technology based on neural networks, that is, it uses a multi-layer neural network to predict the luminance value of the current block based on adjacent reconstructed luminance blocks. Specifically, when performing intra-prediction using the MIP mode, similar to the conventional intra-mode, the input of the MIP prediction is also the data of the luminance blocks adjacent to the previous row and the left column of the current block, and the output is the predicted value of the luminance component of the current block. The specific prediction process can be divided into three steps: downsampling, matrix vector multiplication, and interpolation.
[0003] However, when performing luminance prediction through the MIP mode, the parameters used for luminance blocks of different sizes may also be different, and thus, it is necessary to occupy a large storage space to store a large number of parameters, and the search and call of the parameters in the prediction process also increase the overall time and reduce the efficiency of the codec.
Summary of the Invention
Problems to be Solved by the Invention
[0004] The embodiments of the present application provide an image codec method, an encoder, a decoder, and a storage medium, which can reduce the storage space and overall time required for the codec process while ensuring the codec performance, and effectively improve the efficiency of the codec.
Means for Solving the Problem
[0005] The technical solutions of the embodiments of the present application are realized as follows.
[0006] The embodiments of the present application provide an image coding method applicable to an encoder, and the method includes: Before performing coding processing according to the MIP mode, performing correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, where the offset parameter is used to indicate the number of right shift bits of the predicted value, and When performing coding processing according to the MIP mode, performing coding processing according to the offset parameter.
[0007] The embodiments of the present application provide an image decoding method applicable to a decoder, and the method includes: Before performing decoding processing according to the MIP mode, performing correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, where the offset parameter is used to indicate the number of right shift bits of the predicted value, and When performing decoding processing according to the MIP mode, performing decoding processing according to the offset parameter.
[0008] The embodiments of the present application provide an encoder, and the encoder includes a first correction part and a coding part. Before executing the coding process according to the MIP mode, the first correction part is configured to execute a correction for unifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter, where the offset parameter is used to indicate the number of right shift bits of a predicted value. When the coding part executes the coding process according to the MIP mode, it is configured to execute the coding process according to the offset parameter.
[0009] The embodiment of the present application provides a decoder, and the decoder includes a second correction part and a decoding part. Before executing the decoding process according to the MIP mode, the second correction part is configured to execute a correction for unifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter, where the offset parameter is used to indicate the number of right shift bits of a predicted value. When the coding part executes the decoding process according to the MIP mode, it is configured to execute the decoding process according to the offset parameter.
[0010] The embodiment of the present application provides an encoder, and the encoder includes a first processor, a first memory for storing executable instructions of the first processor, a first communication interface, and a first bus used to connect the first processor, the first memory, and the first communication interface. When the instructions are executed by the first processor, the above image coding method is realized.
[0011] An embodiment of the present application provides a decoder, the decoder includes a second processor, a second memory for storing executable instructions of the second processor, a second communication interface, and a second bus configured to connect the second processor, the second memory, and the second communication interface. When the instructions are executed by the second processor, the above-mentioned image decoding method is realized.
[0012] An embodiment of the present application provides a computer-readable storage medium on which a program is stored, which is applicable to an encoder and a decoder. When the program is executed by a processor, the above-mentioned image codec method is realized.
Advantages of the Invention
[0013] Embodiments of the present application provide an image codec method, an encoder, a decoder, and a storage medium. Before executing the coding process according to the MIP mode, the encoder performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value. When executing the coding process according to the MIP mode, the coding process is executed according to the offset parameter. Before executing the decoding process according to the MIP mode, the decoder performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. When executing the decoding process according to the MIP mode, the decoding process is executed according to the offset parameter. As can be seen, the image codec method proposed by the present application executes a correction to unify the number of right shift bits of the predicted value by using the offset parameter, so that all luminance blocks with different sizes and different MIP mode numbers have the same sW value. Thereby, when executing the codec process, without the need to query and call the sW value, the complexity of the MIP algorithm is reduced, and on the basis of guaranteeing the codec performance, the storage space and the overall time required for the codec process are reduced, and the efficiency of the codec can be effectively improved.
Brief Description of Drawings
[0014]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Embodiments for Carrying Out the Invention
[0015] Hereinafter, with reference to the drawings in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. It should be understood that the specific embodiments described here are only used to explain the related applications and do not limit the related applications. Furthermore, it should be noted that for the sake of easy explanation, only the parts related to the related applications are shown in the drawings.
[0016] In video images, VVC accepts the Affine Linear Weighted Intra Prediction technology proposed by the Joint Video Experts Team (JVET)-N0217, and corrects its name to Matrix-based Intra Prediction, i.e., MIP technology. This technology adds different numbers of matrix-based intra prediction modes to the intra luminance prediction process for different sizes of intra luminance coding blocks.
[0017] To capture finer edge directions presented in natural videos, in VVC, the 33 intra luminance prediction angle modes defined in the video compression standard (HEVC: High Efficiency Video Coding) are extended to 65. Figure 1 is a schematic diagram of the arrangement of 67 prediction modes in intra prediction. As shown in Figure 1, arrow numbers 2 to 66 represent 65 intra angle prediction modes. Additionally, there are two non-angle modes: the Planar mode with number 0 that gradually flattens and the DC mode with number 1. Therefore, the intra prediction process in VVC includes two non-angle modes and 65 angle modes. Here, these 67 prediction modes are referred to as the conventional modes of intra prediction.
[0018] MIP is an intra prediction technology based on neural networks, i.e., it uses a multi-layer neural network to predict the luminance value of the current block based on adjacent reconstructed pixels. Specifically, the MIP technology divides the luminance coding block into three types according to the size of the intra luminance coding block. The size of the luminance coding block is set as W×H, where W is the width parameter and H is the height parameter. According to the size of the luminance coding block, the luminance coding block can be divided into the following three types.
[0019] A luminance coding block with a size of 4×4 is a first type of luminance block, a luminance coding block with sizes of 8×4, 4×8, and 8×8 is a second type of luminance block, and a luminance coding block with other sizes is a third type of luminance block.
[0020] For such three types of intra-luminance coding blocks, the MIP technology adds M types of MIP modes based on 67 types of conventional intra-prediction modes. Here, for the first type of luminance block, M = 35; for the second type of luminance block, M = 19; and for the third type of luminance block, M = 11.
[0021] Specifically, the MIP technology is only applied to intra-luminance prediction. Similar to the conventional modes, the input of MIP prediction is also the data of the previous row and the left column of the current block, and the output is the predicted value of the current block. The specific prediction process can be divided into three steps: average, matrix-vector multiplication, and interpolation. That is, the predicted value of the luminance component of the current block can be obtained by performing these three steps on the reconstructed luminance values of the pixels adjacent to the input previous row and left column.
[0022] Figure 2 is an exemplary flowchart for coding in the MIP mode. As shown in Figure 2, the execution of luminance prediction by the MIP mode is specifically realized as follows.
[0023] In step 1, an average operation is performed on the adjacent reference points above the current block to obtain a vector bdry top having a total of N values, and an average operation is performed on the adjacent reference points to the left of the current block to obtain a vector bdry left having a total of N values. When the current block is of the first type of luminance coding, N = 2; when the current block is of the second or third type of luminance coding, N = 4. The vector bdry top and the vector bdryleft forms a new vector bdry red and performs subsequent operations.
[0024] In step 2, through the mode number k of the MIP mode, the corresponding matrix A k and the offset amount b k are obtained, and through the following formula (1), as shown in FIG. 2, a partial predicted value of the current block identified by the cross line is calculated and obtained.
Equation
[0025] In step 3, the remaining predicted value Predred of the current block is obtained through linear interpolation.
[0026] It should be noted that for the embodiment process coded by the current block, the specific coding mode used for intra prediction needs to be written into the compressed code stream, so that the decoding side can determine which mode to use, specifically, whether it is a conventional mode or an MIP mode, and if it is a conventional mode, which specific conventional mode, and if it is an MIP mode, which specific MIP mode, by analyzing the mode information.
[0027] In the intra prediction of VVC, for each luminance coding block, a comparison of the rate distortion cost RDcost between all 67 conventional modes and M MIP modes is performed, and the optimal mode is selected from the 67 conventional modes and M MIP modes for coding. To save bit overhead, VVC uses an intra mode coding technique based on the most probable modes list (MPM).
[0028] Since the multi-reference line technique (extend reference line) and the intra sub-block partitioning technique (ISP: Intra Sub-Partitionar) are only used for the modes in the MPM list, when both the extendrefflag and the ispflag are 0, that is, when using a reference line of 0 and not performing sub-block partitioning, it should be noted that there is no need to code the mpmflag, and directly code the position of the optimal mode in the MPM list.
[0029] Furthermore, for the construction of the MPM list and the MIPMPM list, in VVC luma intra prediction, if the optimal mode selected for the current block is a conventional mode, it is necessary to construct an MPM list including the six most likely conventional modes, and if the optimal mode selected for the current block is an MIP mode, it is necessary to construct an MIPMPM list including the three most likely MIP modes.
[0030] Figure 3 is a schematic diagram of the arrangement of the adjacent luma block above the current block and the adjacent luma block on the left side. As shown in Figure 3, both of the above two lists are derived according to the optimal modes of the adjacent luma block (A) above the current block and the adjacent luma block (L) on the left side shown in Figure 3.
[0031] Furthermore, for the construction of the MIPMPM list, in VVC intra prediction, if the optimal mode of the current block is an MIP mode, it is necessary to construct an MIPMPM list. In the process of constructing the MIPMPM list, first, it is necessary to obtain the MIP mode ABOVE_MIP corresponding to the optimal mode of the adjacent luma block above, and the MIP mode LEFT_MIP corresponding to the optimal mode of the adjacent luma block on the left side.
[0032] Furthermore, after obtaining LEFT_MIP and ABOVE_MIP, construct a MIPMPM list containing the three most likely MIPMPM modes according to the following method. Here, the numbers in MIPMPM are the numbers of MIP modes, the number range is from 0 to (M - 1), for the first type of luminance block, the numbers are from 0 to 34, for the second type of luminance block, the numbers are from 0 to 18, and for the third type of luminance block, the numbers are from 0 to 10. If LEFT_MIP is available (not -1), add LEFT_MIP to MIPMPMlist. If ABOVE_MIP is available (not -1), add ABOVE_MIP to MIPMPMlist after redundancy check. If LEFT_MIP is unavailable (-1) and ABOVE_MIP is unavailable (-1), add the default list to MIPMPMlist until it is full after redundancy check according to the type of the current block.
[0033] The default list for the first type of luminance block is {17, 34, 5}. The default list for the second type of luminance block is {0, 7, 16}. The default list for the third type of luminance block is {1, 4, 6}.
[0034] Furthermore, in the chroma intra prediction process of VVC, there is a direct mode (DM: Direct Mode) that uses the correlation between components. Use the intra prediction mode at the central position of the luminance coding block at the same position corresponding to the current block to perform the intra prediction of the current chroma block. Figure 4 is a schematic diagram of the arrangement for determining the DM mode. As shown in Figure 4, since the MIP technology is only used for the luminance coding block, when the intra prediction mode at the CR position in Figure 4 is the MIP mode, it is necessary to add mapping the MIP mode to the conventional mode through the "MIP - conventional mapping table" to perform the intra prediction of the current chroma block.
[0035] That is, by introducing the MIP technology, in the intra prediction process, when constructing the MIP MPM list, it is necessary to map the conventional mode to the MIP mode, and when constructing the MPM list and determining the DM mode, it is necessary to map the MIP mode to the conventional mode. [Table 1]
[0036] Furthermore, in the process of constructing the MPM list and the process of obtaining the DM mode, it is necessary to use the mapping from the MIP mode to the conventional mode. Specifically, through the "MIP-conventional mapping table", 35 / 19 / 11 types of MIP modes are mapped to 67 types of conventional modes. For the three types of luminance blocks, the three "MIP-conventional mapping tables" are as shown in Table 2, Table 3 and Table 4. [Table 2] [Table 3] [Table 4]
[0037] FIG. 5 is an exemplary structural diagram of a video coding system. As shown in FIG. 5, the video coding system 100 includes components such as a conversion and quantization module 101, an intra prediction module 102, an intra prediction module 103, a motion compensation module 104, a motion estimation module 105, an inverse conversion and inverse quantization module 106, a filter control analysis module 107, a deblocking filtering and sample adaptive offset (SAO) filtering module 108, a header coding and context-based adaptive binary arithmetic coding (CABAC) coding module 109, and a decoded image cache module 110. FIG. 6 is an exemplary structural diagram of a video decoding system. As shown in FIG. 6, the video decoding system 200 includes components such as a header decoding and CABAC decoding module 201, an inverse conversion and inverse quantization module 202, an intra prediction module 203, a motion compensation module 204, a deblocking filtering and SAO filtering module 205, and a decoded image cache module 206. The video image is output as a code stream of the video image after partial processing by components such as the conversion and quantization module 101, the intra prediction module 102, the intra prediction module 103, the motion compensation module 104, the motion estimation module 105, the deblocking filtering and SAO filtering module 108, and the header coding and CABAC module 109 in the video coding system 100. The code stream is input to the video decoding system 200, and after partial processing by components such as the header decoding and CABAC decoding module 201, the inverse conversion and inverse quantization module 202, the intra prediction module 203, and the motion compensation module 204 in the video decoding system 200, the original video image is finally restored.
[0038] According to the height parameter and width parameter, the current block can be of 25 types of sizes. Specifically, in the standard, it is stipulated that the maximum luminance block is 128×128. However, since the maximum size of the conversion unit is 64×64, that is, for the luminance block with a size of 128×128, it is necessary to first perform quadtree division, so the maximum luminance block size is 64×64. Table 5 is a schematic table of the luminance block sizes, as shown in Table 5.
Table 5
[0039] In the prior art, according to the height parameter and width parameter of the current block, the MIP mode is restricted. Specifically, if the ratio of the width to the height of the current block is greater than 4, or the ratio of the height to the width is greater than 4, the current block is not coded via the MIP mode. Table 6 shows the restrictions on the luminance block sizes in the MIP mode of the prior art, as shown in Table 6.
Table 6
[0040] In the prior art, in the first type of luminance block in the MIP mode (the luminance block corresponding to 4×4), each of the two upper adjacent luminance blocks and the left adjacent luminance block perform a matrix operation to generate a 4×4 prediction block. In the second type of luminance block in the MIP mode (the luminance blocks corresponding to 4×8, 8×4, 8×8), each of the four upper adjacent luminance blocks and the left adjacent luminance block perform a matrix operation to generate a 4×4 prediction block. In the third type of luminance block in the MIP mode (the luminance block corresponding to other sizes), each of the four upper adjacent luminance blocks and the left adjacent luminance block perform a matrix operation to generate a 4×8 prediction block (4×16 luminance block), an 8×4 prediction block (16×4 luminance block), or an 8×8 prediction block (luminance block of other sizes). Here, since the third type of luminance block generates a non-square prediction block, when calculating, it is necessary to perform extraction of odd rows on the matrix.
[0041] Furthermore, in the syntax, the application class of MIP can be indicated via MipSizeId, the number of MIP modes can be indicated via numModes, the number of luminance blocks in the upper reference row or the left reference column obtained by downsampling can be indicated via boundarySize, the width parameter of the prediction block can be indicated via predW, the height parameter of the prediction block can be indicated via predH, and the side length of the matrix of MIP can be indicated via predC. Table 7 shows the syntax relationship corresponding to the prior art MIP mode. As shown in Table 7, MipSizeId, numModes, boundarySize, predW, predH, and predC in the syntax have the following relationships.
Table 7
[0042] Furthermore, in grammar, MipSizeId takes a value of 0 to display a 4×4 luma block, a value of 1 to display 4×8, 8×4, or 8×8 luma blocks, and a value of 2 to display luma blocks of other sizes. numModes indicates the total number of MIP prediction modes, that is, there are a total of 35 types of 4×4 luma blocks, 19 types of 4×8, 8×4, and 8×8 luma blocks, and 11 types of luma blocks of other sizes. boundarySize indicates that the adjacent luma block in the row above the current block or the adjacent luma block in the left column will ultimately be downsampled to two or four adjacent luma blocks.
[0043] In the prior art, when the encoder performs luma prediction via the MIP mode, it can be performed via the following formula (2).
Number
[0044] Here, mWeight and vBias are the weight matrix and bias matrix obtained by training each MIP mode via deep learning. Specifically, mWeight is the weight matrix of each MIP mode, and vBias is the bias matrix of each MIP mode. sB is the left shift amount of the bias matrix, oW is the reserved value for rounding, sW is the right shift amount of the overall predicted value, and it is necessary to obtain the sW value in different MIP modes via table lookup.
[0045] Based on JVET-N1001-v7, when generating the prediction matrix of MIP, the encoder needs to determine whether to extract the predicted values of odd rows via the variables incW and incH. Specifically, it is as follows.
Number
[0046] Here, incW = 2 or incH = 2 indicates that it is necessary to extract using the width parameter or the height parameter.
[0047] Table 8 is the grammar description of sW in the prior art. As shown in Table 8, the value of sW is 9 only when MipSizeId is equal to 1, that is, when the current block size is 4×8, 8×4, or 8×8, and the MIP mode number is 3, 8, 12, or 17. In all other MIP modes, the value of sW is 8. Here, since the value of sW in the MIP mode is a mapping relationship, the value of sW in all modes can be obtained through Table 8.
Table 8
[0048] Table 9 is the mWeight matrix when MipSizeId is 1 and the MIP mode number is 3 and 12.
Table 9
[0049] Table 10 is the vBias matrix when MipSizeId is 1 and the MIP mode number is 3 and 12.
Table 10
[0050] Table 11 is the mWeight matrix when MipSizeId is 1 and the MIP mode number is 8 and 17. Table 12 is the vBias matrix when MipSizeId is 1 and the MIP mode number is 8 and 17.
Table 11
Table 12
[0051] As shown in Table 8, for different grammatical explanations of sW in different MIP modes, when the encoder performs luminance prediction via the MIP mode, if the MipSizeId of the current block is 1, that is, the current block is a second-type luminance block (a luminance block with sizes of 4×8, 8×4, or 8×8), and the MIP mode number corresponding to the current coding block is mode 3, 8, 12, or 17, the value of sW is different from other modes. As a result, the non-uniformity of the algorithm occurs, and the time complexity of the algorithm increases in the process of querying Table 8 above, and the storage of Table 8 also needs to occupy memory space. That is, when performing luminance prediction via the MIP mode, the parameters used for luminance blocks of different sizes may also be different, so it is necessary to occupy a large amount of memory space to store a large number of parameters, and the overall time also increases in the search and call of parameters in the prediction process, reducing the efficiency of the codec.
[0052] To solve the above problems, the present application proposes an image coding method. By correcting the value of sW in MIP mode numbers 3, 8, 12, and 17 of the second-type luminance block, the values of sW in all MIP mode numbers are made the same, thereby reducing the memory space and reducing the overall time by omitting the operation of searching the table.
[0053] Furthermore, the image coding method proposed in the present application can affect the intra prediction part in the video coding hybrid framework, that is, it is mainly applied to the intra prediction module 103 in video coding and the intra prediction module 203 in video decoding, and acts simultaneously on the coding side and the decoding side.
[0054] In the embodiments of the present application, based on the calculation parameters obtained in the training of the machine learning method, it should be noted that the image codec method proposed in the present application can correct the corresponding weight matrix and bias matrix while performing the correction to unify sW according to the offset parameter of the fixed value. Here, in the present application, the second type of luminance block is not limited to the correction of the value of sW in the MIP mode numbers of 3, 8, 12, and 17. After the change of specific parameters (including different combinations of parameters such as size, mode, right shift value, etc.), for different values of sW that are the calculation parameters obtained in the training of the machine learning method, the correction to unify is performed.
[0055] Furthermore, in the following embodiments, taking the values of sW in the MIP mode numbers 3, 8, 12, and 17 of the second type of luminance block as examples, the image codec method proposed in the present application will be exemplarily described.
[0056] Hereinafter, with reference to the drawings in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described.
[0057] In one embodiment of the present application, FIG. 7 is an exemplary implementation flowchart 1 of the image coding method proposed by the embodiment of the present application. As shown in FIG. 7, in the embodiment of the present application, the method by which the encoder performs image coding may include the following steps.
[0058] In step 101, before performing the coding process according to the MIP mode, a correction is performed to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, where the offset parameter is used to indicate the number of right shift bits of the predicted value.
[0059] In the embodiments of the present application, before performing the coding process according to the MIP mode, the encoder can first set the offset parameter used to indicate the number of offset bits.
[0060] In the embodiments of the present application, based on the above formula (2), the offset parameter, that is, sW in formula (2), that is, the offset parameter is the right shift amount of the overall predicted value. That is, when performing luminance prediction on the current block, it should be noted that the offset parameter is used to indicate the number of right shift bits of the overall predicted value of the current block.
[0061] Furthermore, in the embodiments of the present application, before the encoder performs coding processing according to the MIP mode, the offset parameter can be set to a fixed positive integer. That is, after the encoder sets the offset parameter, for any current block, regardless of the size of the current block and regardless of the MIP mode number corresponding to the current block, the offset parameters used are all determined.
[0062] It should be noted that in the embodiments of the present application, when the encoder performs correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, the offset parameter can be set to any positive integer. Specifically, the encoder can preferably set the offset parameter sW to 6, or preferably set the offset parameter sW to 7, or preferably set the offset parameter sW to 8, and preferably can also set the offset parameter sW to 9.
[0063] For example, Table 13 is the first grammar description of sW in the present application. In the embodiments of the present application, when the encoder executes a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for the luminance blocks with a size of 4×8, 8×4, or 8×8 and an MIP mode number of 3, 8, 12, or 17, the corresponding sW can be set to the same numerical value as the sW corresponding to other luminance blocks. That is, when the sW corresponding to other luminance blocks is 8, the sW corresponding to the luminance blocks with a size of 4×8, 8×4, or 8×8 and an MIP mode number of 3, 8, 12, or 17 is set to 8, so that different current blocks have the same offset parameter sW.
Table 13
[0064] For example, Table 14 is the second grammar description of sW in the present application. In the embodiments of the present application, when the encoder executes a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for the luminance blocks with a size of 4×8, 8×4, or 8×8 and an MIP mode number of 3, 8, 12, or 17, the corresponding sW can be set to the same numerical value as the sW corresponding to other luminance blocks. That is, when the sW corresponding to other luminance blocks is 7, the sW corresponding to the luminance blocks with a size of 4×8, 8×4, or 8×8 and an MIP mode number of 3, 8, 12, or 17 is set to 7, so that different current blocks have the same offset parameter sW.
Table 14
[0065] For example, Table 15 is the second grammar description of sW in the present application. In the embodiments of the present application, when the encoder executes a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for the luminance blocks with a size of 4×8, 8×4, or 8×8 and an MIP mode number of 3, 8, 12, or 17, the corresponding sW can be set to the same numerical value as the sW corresponding to other luminance blocks. That is, when the sW corresponding to other luminance blocks is 8, the sW corresponding to the luminance blocks with a size of 4×8, 8×4, or 8×8 and an MIP mode number of 3, 8, 12, or 17 is set to 8, so that different current blocks have the same offset parameter sW. [Table 15]
[0066] As shown in Table 8 above, in the prior art, the offset parameter sW corresponding to different current blocks may be different. Specifically, only when MipSizeId is equal to 1, that is, when the current block is a second-type luminance block with sizes of 4×8, 8×4, or 8×8, and when the MIP mode number is 3, 8, 12, or 17, the value of sW is different from the values of sW in all other MIP mode numbers. Therefore, when coding the current block, the encoder needs to perform queries and calls of the offset parameter sW according to the size and MIP mode number of the current block, thereby increasing the overall time and reducing the codec efficiency. At the same time, since it is necessary to store the grammar description table of sW, the storage space also increases. Compared with the prior art, in the present application, before performing the coding process according to the MIP mode, the offset parameter sW can be set first. The offset parameters sW corresponding to all luminance blocks with different sizes and different MIP mode numbers are set to the same value. When coding the current block, there is no need to perform queries and calls of the offset parameter sW according to the size and MIP mode number of the current block. Moreover, the encoder also does not need to store the grammar description table of sW. Furthermore, it reduces the storage space and overall time required for the codec process, and effectively improves the codec efficiency.
[0067] In the embodiments of the present application, when setting the offset parameter sW, the encoder sets all the offset parameters sW corresponding to different sizes and different MIP mode numbers to the same value. However, only when MipSizeId is equal to 1, that is, when the current block is a second-type luminance block, the size is 4×8, 8×4, or 8×8, and the MIP mode number is 3, 8, 12, or 17, the value of sW is different from the sW values of all other MIP mode numbers. Therefore, when the encoder uniformly corrects sW for the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, it should be noted that the offset parameter sW corresponding to the case where the size is 4×8, 8×4, or 8×8 and the MIP mode number is 3, 8, 12, or 17 is set.
[0068] As can be seen from this, in the embodiments of the present application, the process in which the encoder performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter is, that is, when the initial right shift parameter is different from the offset parameter, the initial right shift parameter is corrected to the offset parameter so that the right shift bits of all predicted values corresponding to all sizes and all MIP mode numbers are the same.
[0069] In step 102, when performing coding processing according to the MIP mode, perform coding processing according to the offset parameter.
[0070] In the embodiments of the present application, after the encoder performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, when the encoder performs coding processing according to the MIP mode, it can perform coding processing based on the set offset parameter.
[0071] In the embodiments of the present application, it should be noted that after the encoder sets the offset parameter and executes the coding process according to the MIP mode, it can directly execute the coding process on the current block according to the offset parameter. Thereby, on the basis of guaranteeing the codec performance, the storage space and the overall time required for the codec process can be reduced, and the efficiency of the codec can be effectively improved.
[0072] In the embodiments of the present application, furthermore, FIG. 8 is an exemplary implementation flowchart 2 of the image coding method proposed by the embodiments of the present application. As shown in FIG. 8, after the encoder executes the correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, that is, after step 101, the method by which the encoder executes image coding further includes the following steps.
[0073] In step 103, according to the preset calculation rule, correct the initial weight matrix and the initial bias matrix to obtain the corrected weight matrix and the corrected bias matrix, where the initial weight matrix and the initial bias matrix correspond to the initial right shift parameter that has been corrected for unification.
[0074] In the embodiments of the present application, after the encoder executes the correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, it can correct the initial weight matrix and the initial bias matrix according to the preset calculation rule, thereby obtaining the corrected weight matrix and the corrected bias matrix.
[0075] It should be noted that in the implementation of the present application, the initial weight matrix and the initial bias matrix correspond to the initial right shift parameter that has been corrected for unification.
[0076] In the embodiments of the present application, it should be noted that the preset calculation rules can be used to update the corresponding initial weight matrix and initial bias matrix when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17.
[0077] Furthermore, in the embodiments of the present application, after the encoder sets the offset parameter, that is, after correcting the offset parameter corresponding to the case where the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17, in order to prevent the codec performance from degrading, furthermore, an update process can be executed on the corresponding initial weight matrix and initial bias matrix, whereby a corrected weight matrix and a corrected bias matrix can be obtained.
[0078] In the embodiments of the present application, when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17, it should be noted that when the encoder obtains the corrected weight matrix and the corrected bias matrix according to the preset calculation rules, it can update the corresponding initial weight matrix and the initial bias matrix through a plurality of different methods. For example, when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17, the encoder can update any element value A in the initial weight matrix to A / 2 and any element value B in the initial bias matrix to B / 2 according to the rounding-down calculation rule, so as to obtain the corrected weight matrix and the corrected bias matrix. Here, both A and B are integers. Furthermore, the encoder can also update any element value A in the initial weight matrix to A / 2 and any element value B in the initial bias matrix to B / 2 according to the rounding-up calculation rule, so as to obtain the corrected weight matrix and the corrected bias matrix. Furthermore, the encoder can also update any element value A in the initial weight matrix to A / 2 and any element value B in the initial bias matrix to B / 2 according to the rounding calculation rule, so as to obtain the corrected weight matrix and the corrected bias matrix.
[0079] In step 104, perform coding processing according to the offset parameter, the corrected weight matrix and the corrected bias matrix.
[0080] In the embodiments of the present application, when the encoder performs coding processing according to the MIP mode, it can perform coding processing based on the set offset parameter, the corrected weight matrix and the corrected bias matrix.
[0081] In the embodiments of the present application, after setting the offset parameter, in order to prevent the degradation of codec performance, the encoder further updates the corresponding initial weight matrix and initial bias matrix to obtain the corrected weight matrix and the corrected bias matrix. When performing the coding process according to the MIP mode, it should be noted that the coding process can be performed on the current block according to the offset parameter, the corrected weight matrix, and the corrected bias matrix. Thereby, on the basis of guaranteeing the codec performance, the storage space and the overall time required for the codec process can be reduced, and the efficiency of the codec can be effectively improved.
[0082] It should be noted that in the embodiments of the present application, after the encoder sets the offset parameter, it can directly perform the coding process on the current block according to the offset parameter, the initial weight matrix, and the initial bias matrix. That is, after completing the setting of the offset parameter, the encoder can also not update the corresponding initial weight matrix and initial bias matrix.
[0083] In the prior art, when predicting the luminance value for the current block through the MIP mode, it is necessary to make the number of bits of the right shift non-uniform, that is, the offset parameter sW needs to be different. The image coding method proposed in the present application uniformly sets the offset parameter to make the realization of the MIP mode simpler and more unified. Furthermore, because the offset parameter sW in the prior art is different, it is necessary to store the sW table representing the number of right shift bits. In the calculation process, it is necessary to query and call the sW corresponding to the current block to determine the number of bits by which the predicted value calculated by the MIP needs to be right-shifted. Since the image coding method proposed in the present application uniformly sets the offset parameter, there is no need to store the sW table representing the number of right shift bits. Thereby, while saving storage space, the processing process of querying and calling sW is omitted.
[0084] Furthermore, in the embodiments of the present application, after the encoder sets the offset parameter, the corresponding initial weight matrix and the initial bias matrix are further updated to ensure that there is no obvious loss in codec performance. Specifically, according to the general test criteria of VVC, the BD-rates in Y, U, and V are 0.00%, -0.02%, and -0.02% respectively, where the results at an interval of 24 frames are expected to be the same as the codec performance at an interval of 8 frames.
[0085] In the image coding method proposed in the embodiments of the present application, before the encoder performs coding processing according to the MIP mode, a correction is performed to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the right shift bit number of the predicted value. And when performing coding processing according to the MIP mode, the coding processing is performed according to the offset parameter. As can be seen from this, the image codec method proposed by the present application performs a correction to unify the right shift bit number of the predicted value using the offset parameter, so that all luminance blocks with different sizes and different MIP mode numbers have the same sW value. When performing codec processing, without the need to query and call the sW value, it reduces the complexity of the MIP algorithm, guarantees the codec performance, reduces the storage space and the overall time required for the codec process, and can effectively improve the efficiency of the codec.
[0086] Based on the above embodiments, in another embodiment of the present application, when the size is 4×8, 8×4, or 8×8, and the MIP mode number is 3, 8, 12, or 17, the method for the encoder to obtain the corrected weight matrix and the corrected bias matrix according to the preset calculation rules may include the following steps.
[0087] In step 103a, according to the rounding calculation rule, all element values in the initial weight matrix are corrected to values with the same binary order as other weight matrix element values to obtain a corrected weight matrix.
[0088] In step 103b, according to the rounding calculation rule, all elements in the initial bias matrix are corrected to values with the same binary order as other bias matrix element values to obtain a corrected bias matrix.
[0089] In the embodiment of the present application, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the encoder can, according to the rounding calculation rule, correct all element values in the initial weight matrix to values with the same binary order as other weight matrix element values, and at the same time correct all elements in the initial bias matrix to values with the same binary order as other bias matrix element values, thereby obtaining a corrected weight matrix and a corrected bias matrix.
[0090] Based on Table 9 above, Table 16 is the corrected weight matrix when MipSizeId is 1 and the MIP mode number is 3 and 12. As shown in Table 16, the encoder updates each element value A in Table 9 to A / 2 according to the rounding calculation rule to obtain the corrected weight matrix when MipSizeId is 1 and the MIP mode number is 3 and 12.
Table 16
[0091] Based on Table 10 above, Table 17 is the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. As shown in Table 17, the encoder corrects each element value B in Table 10 to B / 2 according to the rounding calculation rule to obtain the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12.
Table 17
[0092] Based on Table 11 above, Table 18 is the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17. As shown in Table 18, the encoder updates each element value A in Table 11 to A / 2 according to the rounding calculation rule to obtain the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17.
Table 18
[0093] Based on Table 12 above, Table 19 is the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17. As shown in Table 22, the encoder corrects each element value B in Table 12 to B / 2 according to the rounding calculation rule to obtain the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17.
Table 19
[0094] In an embodiment of the present application, further, when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17, the method for the encoder to obtain the corrected weight matrix and the corrected bias matrix according to the preset calculation rules may include the following steps.
[0095] In step 103c, according to the rounding calculation rule, all element values in the initial weight matrix are corrected to the same binary order value as other weight matrix element values to obtain the corrected weight matrix.
[0096] In step 103d, according to the rounding calculation rule, all elements in the initial bias matrix are corrected to the same binary order value as other bias matrix element values to obtain the corrected bias matrix.
[0097] In an embodiment of the present application, when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17, the encoder can correct all element values in the initial weight matrix to the same binary order value as other weight matrix element values according to the rounding calculation rule, and at the same time, correct all elements in the initial bias matrix to the same binary order value as other bias matrix element values, thereby obtaining the corrected weight matrix and the corrected bias matrix.
[0098] Based on Table 9 above, Table 20 is the corrected weight matrix when MipSizeId is 1 and the MIP mode number is 3 and 12. As shown in Table 20, the encoder updates each element value A in Table 9 to A / 2 according to the rounding calculation rule to obtain the corrected weight matrix when MipSizeId is 1 and the MIP mode number is 3 and 12.
Table 20
[0099] Based on Table 10 above, Table 21 is the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. As shown in Table 21, the encoder corrects each element value B in Table 10 to B / 2 according to the rounding calculation rule to obtain the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12.
Table 21
[0100] Based on Table 11 above, Table 22 is the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17. As shown in Table 22, the encoder updates each element value A in Table 11 to A / 2 according to the rounding calculation rule to obtain the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17.
Table 22
[0101] Based on Table 12 above, Table 23 is the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17. As shown in Table 23, the encoder corrects each element value B in Table 12 to B / 2 according to the rounding calculation rule to obtain the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17.
Table 23
[0102] In the embodiments of the present application, further, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the method for the encoder to obtain the corrected weight matrix and the corrected bias matrix according to the preset calculation rules may include the following steps.
[0103] In step 103e, according to the rounding calculation rule, all element values in the initial weight matrix are corrected to the same binary order value as other weight matrix element values to obtain the corrected weight matrix.
[0104] In step 103f, according to the rounding calculation rule, all elements in the initial bias matrix are corrected to the same binary order value as other bias matrix element values to obtain the corrected bias matrix.
[0105] In the embodiments of the present application, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the encoder can correct all element values in the initial weight matrix to the same binary order value as other weight matrix element values according to the rounding calculation rule, and at the same time, correct all elements in the initial bias matrix to the same binary order value as other bias matrix element values, thereby obtaining the corrected weight matrix and the corrected bias matrix.
[0106] Based on Table 9 above, Table 24 is the corrected weight matrix when MipSizeId is 1 and the MIP mode number is 3 and 12. As shown in Table 24, the encoder updates each element value A in Table 9 to A / 2 according to the rounding calculation rule to obtain the corrected weight matrix when MipSizeId is 1 and the MIP mode number is 3 and 12.
Table 24
[0107] Based on Table 10 above, Table 25 is the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. As shown in Table 25, the encoder corrects each element value B in Table 10 to B / 2 according to the rounding calculation rule to obtain the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12.
Table 25
[0108] Based on Table 11 above, Table 26 is the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17. As shown in Table 26, the encoder updates each element value A in Table 11 to A / 2 according to the rounding calculation rule to obtain the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17.
Table 26
[0109] Based on Table 12 above, Table 27 is the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17. As shown in Table 30, the encoder corrects each element value B in Table 12 to B / 2 according to the rounding calculation rule to obtain the corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17.
Table 27
[0110] In the image coding method proposed in the embodiments of the present application, before the encoder executes the coding process according to the MIP mode, it performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value. And when executing the coding process according to the MIP mode, the coding process is executed according to the offset parameter. As can be seen from this, the image codec method proposed by the present application performs a correction to unify the number of right shift bits of the predicted value by using the offset parameter, so that all luminance blocks with different sizes and different MIP mode numbers have the same sW value. When performing the codec process, without the need to query and call the sW value, it reduces the complexity of the MIP algorithm, guarantees the codec performance, reduces the storage space and overall time required for the codec process, and can effectively improve the efficiency of the codec.
[0111] In another embodiment of the present application, FIG. 9 is an exemplary implementation flowchart 1 of the image decoding method proposed by the embodiments of the present application. As shown in FIG. 9, in the embodiments of the present application, the method by which the decoder performs image decoding may include the following steps.
[0112] In step 201, before executing the decoding process according to the MIP mode, a correction is performed to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value.
[0113] In the embodiments of the present application, before executing the decoding process according to the MIP mode, the decoder can first set the offset parameter used to indicate the number of offset bits.
[0114] In an embodiment of the present application, based on the above formula (2), the offset parameter, i.e., sW in formula (2), is such that the offset parameter is the right shift amount of the overall predicted value. That is, when performing luminance prediction for the current block, it should be noted that the offset parameter is used to indicate the number of right shift bits of the overall predicted value of the current block.
[0115] Furthermore, in an embodiment of the present application, before the decoder executes the decoding process according to the MIP mode, the offset parameter can be set to one fixed positive integer. That is, after the decoder sets the offset parameter, for any current block, regardless of the size of the current block and regardless of the MIP mode number corresponding to the current block, the offset parameter used is all determined.
[0116] It should be noted that in an embodiment of the present application, when the decoder executes correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, the offset parameter can be set to any positive integer. Specifically, the decoder can preferably set the offset parameter sW to 6, or preferably set the offset parameter sW to 7, or preferably set the offset parameter sW to 8, and preferably the offset parameter sW can also be set to 9.
[0117] In the prior art, the offset parameter sW corresponding to different current blocks may be different. Specifically, only when MipSizeId is equal to 1, that is, when the current block is a second-type luminance block with sizes of 4×8, 8×4, or 8×8 and the MIP mode number is 3, 8, 12, or 17, the value of sW is different from the values of sW in all other MIP mode numbers. Therefore, when decoding the current block, the decoder needs to perform querying and calling of the offset parameter sW according to the size and MIP mode number of the current block, thereby increasing the overall time and reducing the codec efficiency. At the same time, since it is necessary to store the grammar description table of sW, the storage space also increases. Compared with the prior art, in the present application, before performing the decoding process according to the MIP mode, the offset parameter sW can be set first. The offset parameter sW corresponding to all luminance blocks with different sizes and different MIP mode numbers is set to the same value. When decoding the current block, there is no need to perform querying and calling of the offset parameter sW according to the size and MIP mode number of the current block, and the decoder also does not need to store the grammar description table of sW. Furthermore, it reduces the storage space and overall time required for the codec process, and effectively improves the codec efficiency.
[0118] In the embodiments of the present application, when the decoder sets the offset parameter sW, it sets all the offset parameters sW corresponding to different sizes and different MIP mode numbers to the same value. However, only when MipSizeId is equal to 1, that is, when the current block is a second-type luminance block, the size is 4×8, 8×4, or 8×8, and the MIP mode number is 3, 8, 12, or 17, the value of sW is different from the sW values of all other MIP mode numbers. Therefore, when the decoder uniformly corrects sW for the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, it should be noted that the offset parameter sW corresponding to the case where the size is 4×8, 8×4, or 8×8 and the MIP mode number is 3, 8, 12, or 17 is set.
[0119] As can be seen from this, in the embodiments of the present application, the process in which the decoder performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter is that, when the initial right shift parameter is different from the offset parameter, the initial right shift parameter is corrected to the offset parameter so that the right shift bit numbers of all predicted values corresponding to all sizes and all MIP mode numbers are the same.
[0120] In step 202, when performing the decoding process according to the MIP mode, perform the decoding process according to the offset parameter.
[0121] In the embodiments of the present application, after the decoder performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, when the decoder performs the decoding process according to the MIP mode, it can perform the decoding process based on the set offset parameter.
[0122] In the embodiments of the present application, it should be noted that after the decoder sets the offset parameter and executes the decoding process according to the MIP mode, it can directly execute the decoding process on the current block according to the offset parameter. Thereby, on the basis of guaranteeing the codec performance, the storage space and the overall time required for the codec process can be reduced, and the efficiency of the codec can be effectively improved.
[0123] In the embodiments of the present application, furthermore, FIG. 10 is an exemplary implementation flowchart 2 of the image decoding method proposed by the embodiments of the present application. As shown in FIG. 10, after the decoder executes the correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, that is, after step 201, the method by which the decoder executes image decoding may further include the following steps.
[0124] In step 203, according to the preset calculation rules, correct the initial weight matrix and the initial bias matrix to obtain the corrected weight matrix and the corrected bias matrix, where the initial weight matrix and the initial bias matrix correspond to the initial right shift parameters for which the correction to unify is executed.
[0125] In the embodiments of the present application, after the decoder executes the correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, the initial weight matrix and the initial bias matrix can be corrected according to the preset calculation rules, thereby obtaining the corrected weight matrix and the corrected bias matrix.
[0126] It should be noted that in the implementation of the present application, the initial weight matrix and the initial bias matrix correspond to the initial right shift parameters for which the correction to unify is executed.
[0127] It should be noted that in the embodiments of the present application, the preset calculation rules can be used to update the corresponding initial weight matrix and initial bias matrix when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17.
[0128] Furthermore, in the embodiments of the present application, after the decoder sets the offset parameter, that is, after correcting the offset parameter corresponding to the case where the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, in order to prevent the codec performance from degrading, further, an update process can be executed on the corresponding initial weight matrix and initial bias matrix, whereby a corrected weight matrix and a corrected bias matrix can be obtained.
[0129] In the embodiments of the present application, when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17, it should be noted that when the decoder obtains the corrected weight matrix and the corrected bias matrix according to the preset calculation rules, it can update the corresponding initial weight matrix and the initial bias matrix through a plurality of different methods. For example, when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17, the decoder can update any element value A in the initial weight matrix to A / 2 and simultaneously update any element value B in the initial bias matrix to B / 2 according to the rounding-down calculation rule to obtain the corrected weight matrix and the corrected bias matrix. Here, both A and B are integers. Further, the decoder can also update any element value A in the initial weight matrix to A / 2 and simultaneously update any element value B in the initial bias matrix to B / 2 according to the rounding-up calculation rule to obtain the corrected weight matrix and the corrected bias matrix. Further, the decoder can also update any element value A in the initial weight matrix to A / 2 and simultaneously update any element value B in the initial bias matrix to B / 2 according to the rounding calculation rule to obtain the corrected weight matrix and the corrected bias matrix.
[0130] In step 204, perform a decoding process according to the offset parameter, the corrected weight matrix, and the corrected bias matrix.
[0131] In the embodiments of the present application, when the decoder executes a decoding process according to the MIP mode, it can execute the decoding process based on the set offset parameter, the corrected weight matrix, and the corrected bias matrix.
[0132] In the embodiment of the present application, after setting the offset parameter, in order to prevent the codec performance from degrading, the decoder further updates the corresponding initial weight matrix and initial bias matrix to obtain the corrected weight matrix and the corrected bias matrix. When performing the decoding process according to the MIP mode, note that the decoding process can be performed on the current block according to the offset parameter, the corrected weight matrix, and the corrected bias matrix. Thereby, on the basis of guaranteeing the codec performance, the storage space and the overall time required for the codec process can be reduced, and the efficiency of the codec can be effectively improved.
[0133] Note that in the embodiment of the present application, after the decoder sets the offset parameter, it is also possible to directly perform the decoding process on the current block according to the offset parameter, the initial weight matrix, and the initial bias matrix. That is, after completing the setting of the offset parameter, the decoder may not update the corresponding initial weight matrix and initial bias matrix.
[0134] In the prior art, when predicting the luminance value for the current block through the MIP mode, it is necessary to make the number of bits of the right shift non-uniform, that is, the offset parameter sW needs to be different. The image decoding method proposed in the present application sets the offset parameter uniformly to make the realization of the MIP mode simpler and more unified. Furthermore, because the offset parameter sW in the prior art is different, it is necessary to store the sW table representing the number of right shift bits. In the calculation process, it is necessary to query and call the sW corresponding to the current block to determine the number of bits by which the predicted value calculated by MIP needs to be right-shifted. Since the image decoding method proposed in the present application sets the offset parameter uniformly, there is no need to store the sW table representing the number of right shift bits. Thereby, while saving storage space, the processing process of querying and calling sW is omitted.
[0135] In the image decoding method proposed in the embodiment of the present application, before the decoder executes the decoding process according to the MIP mode, it performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value, and when executing the decoding process according to the MIP mode, it executes the decoding process according to the offset parameter. As can be seen from this, the image codec method proposed by the present application performs a correction to unify the number of right shift bits of the predicted value using the offset parameter, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value. When executing the codec process, without the need to query and call the sW value, it reduces the complexity of the MIP algorithm and guarantees the codec performance. Based on this, it can reduce the storage space and overall time required for the codec process, and effectively improve the efficiency of the codec.
[0136] According to the above embodiment, in another embodiment of the present application, FIG. 11 is an exemplary structural diagram 1 of the encoder proposed by the embodiment of the present application. As shown in FIG. 11, the encoder 300 proposed by the embodiment of the present application can include a first correction part 301 and a coding part 302.
[0137] The first correction part 301 is configured to perform a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter before executing the coding process according to the MIP mode. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value.
[0138] The coding part 302 is configured to execute the coding process according to the offset parameter when executing the coding process according to the MIP mode.
[0139] Specifically, when the initial right shift parameter is different from the offset parameter, the first correction part 301 corrects the initial right shift parameter to the offset parameter so that the right shift bits of all predicted values corresponding to all sizes and all MIP mode numbers are the same.
[0140] FIG. 12 is an exemplary structural diagram 2 of the configuration of the encoder proposed by the embodiment of the present application. As shown in FIG. 12, the encoder 300 proposed by the embodiment of the present application further includes a first processor 303, a first memory 304 for storing executable instructions of the first processor 303, a first communication interface 305, and a first bus 306 used to connect the first processor 303, the first memory 304, and the first communication interface 305.
[0141] Furthermore, in the embodiment of the present application, before executing the coding process according to the MIP mode, the first processor 303 is used to perform a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the right shift bits of the predicted value, and when executing the coding process according to the MIP mode, the coding process is executed according to the offset parameter.
[0142] Furthermore, each functional module in this embodiment can be integrated into one processing unit, or each unit can physically exist separately, and two or more units can also be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of software functional modules.
[0143] When the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this embodiment, in essence or in the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and contains several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method in this embodiment. The above-mentioned storage medium includes various media that can store program codes, such as a USB disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0144] The embodiment of the present application provides an encoder. Before executing the coding process according to the MIP mode, the encoder performs a correction to unify the initial right shift parameter corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value. And when executing the coding process according to the MIP mode, the coding process is executed according to the offset parameter. As can be seen from this, the image codec method proposed by the present application executes a correction to unify the number of right shift bits of the predicted value by using the offset parameter, so that all luminance blocks with different sizes and different MIP mode numbers have the same sW value. When performing the codec process, without the need to query and call the sW value, it reduces the complexity of the MIP algorithm, guarantees the codec performance, reduces the storage space and the overall time required for the codec process, and can effectively improve the efficiency of the codec.
[0145] FIG. 13 is an exemplary structural diagram 1 of the configuration of the decoder proposed by the embodiment of the present application. As shown in FIG. 13, the decoder 400 proposed by the embodiment of the present application can include a first correction part 401 and a decoding part 402.
[0146] Before executing the decoding process according to the MIP mode, the second correction part 401 is configured to execute a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, where the offset parameter is used to indicate the number of right shift bits of the predicted value.
[0147] When executing the decoding process according to the MIP mode, the decoding part 402 is configured to execute the decoding process according to the offset parameter.
[0148] Specifically, when the initial right shift parameter is different from the offset parameter, the second correction part 401 corrects the initial right shift parameter to the offset parameter so that the number of right shift bits of all predicted values corresponding to all sizes and all MIP mode numbers are the same.
[0149] FIG. 14 is an exemplary structural diagram 2 of the configuration of the decoder proposed by the embodiment of the present application. As shown in FIG. 14, the decoder 400 proposed by the embodiment of the present application can further include a second processor 403, a second memory 404 for storing instructions executable by the second processor 403, a second communication interface 405, and a second bus 406 used to connect the second processor 403, the second memory 404, and the first communication interface 405.
[0150] Furthermore, in the embodiments of the present application, before the second processor 403 executes the decoding process according to the MIP mode, it is used to perform a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value, and when executing the decoding process according to the MIP mode, it is used to execute the decoding process according to the offset parameter.
[0151] Furthermore, each functional module in this embodiment can be integrated into one processing unit, or each unit can physically exist separately, and two or more units can also be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional module.
[0152] When the integrated unit is realized in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this embodiment, in essence or in the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and contains several instructions for causing a computer device (which can be a personal computer, a server, a network device, etc.) or a processor to execute all or part of the steps of the method in this embodiment. The aforementioned storage medium includes various media that can store program codes such as a USB disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0153] The embodiments of the present application provide an encoder, and before the decoder executes decoding processing according to the MIP mode, it performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, and when executing decoding processing according to the MIP mode, it executes decoding processing according to the offset parameter. As can be seen from this, the image codec method proposed by the present application performs a correction to unify the right shift bit number of the predicted value by using the offset parameter, so that all luminance blocks with different sizes and different MIP mode numbers have the same sW value, and when performing codec processing, without the need to query and call the sW value, it reduces the complexity of the MIP algorithm, guarantees the codec performance, reduces the storage space and overall time required for the codec process, and can effectively improve the efficiency of the codec.
[0154] The embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium in which a program is stored, and when the program is executed by a processor, it realizes the method described in the above embodiments.
[0155] Specifically, the program instructions corresponding to the image coding method in this embodiment can be stored in storage media such as optical disks, hard disks, and USB disks. When the program instructions corresponding to one image coding method in the storage media are read or executed by an electronic device, Before executing coding processing according to the MIP mode, it is to perform a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, where the offset parameter is used to indicate the right shift bit number of the predicted value, and when executing coding processing according to the MIP mode, it includes the step of executing coding processing according to the offset parameter.
[0156] Specifically, the program instructions corresponding to the image decoding method in this embodiment can be stored in a storage medium such as an optical disk, a hard disk, or a USB disk. When the program instructions corresponding to one image decoding method in the storage medium are read or executed by an electronic device, Before executing the decoding process according to the MIP mode, perform a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value, and When executing the decoding process according to the MIP mode, include the step of executing the decoding process according to the offset parameter.
[0157] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of embodiments of hardware, software, or a combination of software and hardware. Furthermore, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk memory and optical memory) containing computer-usable program code.
[0158] This application is described with reference to exemplary realization flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each process and / or block of the exemplary realization flowchart and / or block diagram, and combinations of processes and / or blocks of the exemplary realization flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions are provided to the processor of a general-purpose computer, a dedicated computer, an embedded processor, or other programmable data processing device to generate a machine that causes the instructions executed by the processor of the computer or other programmable data processing device to perform the functions specified in one or more processes of the exemplary realization flowchart and / or one or more blocks of the block diagram.
[0159] These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to operate in a specific manner, and a product comprising an instruction device can be generated from the instructions stored in the computer-readable memory. The instruction device implements the functions specified in one or more processes of the exemplary realization flowchart and / or one or more blocks of the block diagram.
[0160] These computer program instructions can also be loaded into a computer or other programmable data processing device, causing the computer or other programmable device to execute a series of operation steps to generate a process implemented by the computer. Thereby, the instructions executed by the computer or other programmable device provide steps for implementing the functions specified in one or more processes of the exemplary realization flowchart and / or one or more blocks of the block diagram.
[0161] The above is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Industrial Applicability
[0162] The embodiments of the present application provide an image codec method, an encoder, a decoder, and a storage medium. Before executing the coding process according to the MIP mode, the encoder performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Here, the offset parameter is used to indicate the number of right shift bits of the predicted value. When executing the coding process according to the MIP mode, the coding process is executed according to the offset parameter. Before executing the decoding process according to the MIP mode, the decoder performs a correction to unify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, and when executing the decoding process according to the MIP mode, the decoding process is executed according to the offset parameter. As can be seen from this, the image codec method proposed by the present application uses the offset parameter to perform a correction to unify the number of right shift bits of the predicted value, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value, and when executing the codec process, without the need to query and call the sW value, it reduces the complexity of the MIP algorithm, guarantees the codec performance, reduces the storage space and overall time required for the codec process, and can effectively improve the efficiency of the codec.
Claims
1. 1. An image coding method applied to an encoder, comprising: determining mode parameters of the current block; In response to determining that the mode parameter indicates that a prediction value of the current block is to be determined by a matrix-based intra prediction (MIP) mode, predicting the current block by MIP based on an offset parameter, wherein the offset parameter is equal to 6. Image coding methods.
2. the offset parameter indicates the number of bits of right shift to calculate the predicted value; 2. The image coding method of claim 1.
3. The number of right shift bits to calculate all prediction values corresponding to all sizes and all MIP mode numbers is the same.
3. The image coding method according to claim 2.
4. predicting the current block by MIP based on an offset parameter, predicting the current block based on the same offset parameter for all sizes and all MIP mode numbers; 2. The image coding method of claim 1.
5. predicting the current block by MIP based on an offset parameter, predicting the current block based on the offset parameters, an initial weight matrix, and an initial bias matrix; 2. The image coding method of claim 1.
6. 1. An image decoding method applied to a decoder, comprising: determining mode parameters of the current block; In response to determining that the mode parameter indicates that a prediction value of the current block is to be determined by a matrix-based intra prediction (MIP) mode, predicting the current block by MIP based on an offset parameter, wherein the offset parameter is equal to 6. Image decoding methods.
7. the offset parameter indicates the number of bits of right shift to calculate the predicted value; 7. The image decoding method of claim 6.
8. The number of right shift bits to calculate all prediction values corresponding to all sizes and all MIP mode numbers is the same.
8. The image decoding method of claim 7.
9. predicting the current block by MIP based on an offset parameter, predicting the current block based on the same offset parameter for all sizes and all MIP mode numbers; 7. The image decoding method of claim 6.
10. predicting the current block by MIP based on an offset parameter, predicting the current block based on the offset parameters, an initial weight matrix, and an initial bias matrix; 7. The image decoding method of claim 6.
11. 1. A decoder comprising a processor, a memory for storing instructions for the processor, a communication interface, and a bus used to connect the processor, the memory, and the communication interface, wherein the processor, when executing the instructions, determining mode parameters of the current block; in response to determining that the mode parameter indicates that a prediction value of the current block is to be determined by a matrix-based intra prediction (MIP) mode, predicting the current block by MIP based on an offset parameter, wherein the offset parameter is equal to 6. decoder.
12. the offset parameter indicates the number of bits of right shift to calculate the predicted value; A decoder according to claim 11.
13. The number of right shift bits to calculate all prediction values corresponding to all sizes and all MIP mode numbers is the same.
13. A decoder according to claim 12.
14. the processor is configured to predict the current block based on the same offset parameter for all sizes and all MIP mode numbers; A decoder according to claim 11.
15. the processor is configured to predict the current block based on the offset parameter, an initial weight matrix, and an initial bias matrix. A decoder according to claim 11.
16. A computer-readable storage medium, comprising: A computer-readable storage medium on which a computer program and a bitstream are stored, the computer program causing a processor to execute the image coding method according to any one of claims 1 to 5 to generate the bitstream.
17. A computer-readable storage medium, comprising: A computer-readable storage medium on which a computer program and a bitstream are stored, the computer program causing a processor to execute the image decoding method according to any one of claims 6 to 10 to decode the bitstream.