Image codec method, encoder, decoder and storage medium
By unifying initial right shift parameters using offset parameters, the proposed method addresses the inefficiencies in the MIP technique, reducing storage and processing time while improving codec efficiency.
Patent Information
- Application Number
- JP2024030632
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2039-06-25
AI Technical Summary
The existing Matrix-based Intra Prediction (MIP) technique in video codecs requires different parameters for various sized luminance blocks, leading to increased storage space and processing time due to the need to store and search multiple parameters.
The proposed solution unifies the initial right shift parameters for different sizes and MIP mode numbers using offset parameters before performing the coding or decoding process, thereby simplifying the MIP algorithm and reducing the complexity of parameter management.
This approach reduces storage space and overall processing time, enhancing the efficiency of the codec by ensuring consistent right-shift bit counts across all block sizes and MIP modes, without the need for extensive parameter querying and storage.
Smart Images

Figure 0007674550000031 
Figure 0007674550000032 
Figure 0007674550000033
Abstract
Description
[Technical field]
[0001] The present application relates to the technical field of video codec, and in particular to an image codec method, an encoder, a decoder and a storage medium. [Background technology]
[0002] In the reference software test platform of versatile video coding (VVC), a new intra coding technique, matrix-based intra prediction (MIP), is proposed. MIP is an intra prediction technique based on neural networks, that is, it uses a multi-layer neural network to predict the luminance value of a current block based on adjacent reconstructed luminance blocks. Specifically, like the conventional intra mode, when intra prediction is performed using MIP mode, the input of MIP prediction is also the data of the luminance block adjacent to the previous row and left column of the current block, and the output is the luminance component predicted value of the current block. The specific prediction process is divided into three steps: downsampling, matrix vector multiplication, and interpolation.
[0003] However, when performing luma prediction via MIP mode, the parameters used for luma blocks of different sizes may also be different, thus occupying a large memory space and needing to store a large number of parameters, and the search and call of the parameters for the prediction process also increases the overall time and reduces the efficiency of the codec. Summary of the Invention [Problem to be solved by the invention]
[0004] The present embodiment provides an image coding method, encoder, decoder and storage medium, which reduces the storage space and overall time required for the coding process while ensuring the codec performance, and effectively improves the efficiency of the codec. [Means for solving the problem]
[0005] The technical solution of the present embodiment is realized as follows.
[0006] An embodiment of the present application provides an image coding method applied to an encoder, the method comprising: Before performing a coding process according to a MIP mode, perform a correction to unify 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 right shift bit number of a predicted value; and When performing the coding process according to the MIP mode, performing the coding process according to the offset parameter.
[0007] An embodiment of the present application provides an image decoding method, which is applied to a decoder, the method comprising: Before performing a decoding process according to a MIP mode, perform a correction to unify 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 right shift bit number of a predicted value; and When performing the decoding process according to the MIP mode, performing the decoding process according to the offset parameter.
[0008] An embodiment of the present invention provides an encoder, the encoder comprising: a first correction part and a coding part; The first correction unit is configured to perform a correction for unifying initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a coding process according to a MIP mode, where the offset parameter is used to indicate a right shift bit number of a predicted value; The coding part is configured to perform the coding process according to the offset parameter when performing the coding process according to the MIP mode.
[0009] An embodiment of the present invention provides a decoder, the decoder comprising: a second correction part and a decoding part; The second correction unit is configured to perform a correction for unifying initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a decoding process according to a MIP mode, where the offset parameter is used to indicate a right shift bit number of a predicted value; The coding part is configured to perform a decoding process according to the offset parameter when performing a decoding process according to the MIP mode.
[0010] An embodiment of the present application provides an encoder comprising a first processor, a first memory storing executable instructions for 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, and the instructions, when executed by the first processor, realize the above-mentioned image coding method.
[0011] An embodiment of the present application provides a decoder comprising a second processor, a second memory storing executable instructions for the second processor, a second communication interface, and a second bus configured to connect the second processor to the second memory and the second communication interface, and the instructions, when executed by the second processor, realize the above-mentioned image decoding method.
[0012] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon, which is applied to an encoder and a decoder, and which, when executed by a processor, realizes the above image codec method. Effect of the Invention
[0013] The present embodiment provides an image codec method, an encoder, a decoder and a storage medium, in which the encoder performs a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a coding process according to a MIP mode, where the offset parameter is used to indicate a right shift bit number of a predicted value, and performs the coding process according to the offset parameter when performing the coding process according to the MIP mode. The decoder performs a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter before performing a decoding process according to a MIP mode, and performs the decoding process according to the offset parameter when performing the decoding process according to the MIP mode. As can be seen, the image coding method proposed by the present application uses the offset parameter to perform 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, so that there is no need to query and call the sW value when performing coding processing, which reduces the complexity of the MIP algorithm, and reduces the storage space and overall time required for the coding process while ensuring codec performance, thereby effectively improving the efficiency of the codec. [Brief description of the drawings]
[0014] [Figure 1] FIG. 1 is a schematic diagram of an arrangement of 67 types of prediction modes in intra prediction. [Diagram 2] 1 is an exemplary flowchart for coding in MIP mode. [Diagram 3] FIG. 13 is a schematic diagram of the arrangement of upper and left neighboring luminance blocks of a current block; [Figure 4] FIG. 2 is a schematic diagram of an arrangement for determining a DM mode. [Diagram 5] 1 is an exemplary structural diagram of a video coding system. [Figure 6] 1 is an exemplary structural diagram of a video decoding system; [Figure 7] 1 is an exemplary implementation flowchart 1 of an image coding method proposed by an embodiment of the present application. [Figure 8] 2 is an exemplary implementation flowchart 2 of the image coding method proposed by the embodiment of the present application. [Figure 9] 1 is an exemplary implementation flowchart 1 of an image decoding method proposed by an embodiment of the present application; [Figure 10] 2 is an exemplary implementation flowchart 2 of the image decoding method proposed by the present embodiment; [Figure 11] FIG. 1 is an exemplary structural diagram of an encoder proposed by an embodiment of the present invention. [Figure 12] FIG. 2 is an exemplary structural diagram of an encoder proposed by an embodiment of the present invention. [Figure 13] FIG. 1 is an exemplary structural diagram of a decoder configuration proposed by an embodiment of the present invention. [Figure 14] FIG. 2 is an exemplary structural diagram of a decoder configuration proposed by an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] Hereinafter, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. It should be understood that the specific embodiments described herein are only used to describe related applications, and do not limit the applications. In addition, it should be noted that, for ease of description, only parts related to the related applications are shown in the drawings.
[0016] In video images, VVC accepts the Affine Linear Weighted Intra Prediction technique proposed in the Joint Video Experts Team (JVET)-N0217 and amends its name to Matrix-Based Intra Prediction, or MIP technique, which adds different numbers of matrix-based intra prediction modes to the intra luma prediction process for different sizes of intra luma coding blocks.
[0017] In order to capture finer edge directions presented in natural video, in VVC, the 33 types of intra luminance prediction angle modes defined in the video compression standard (HEVC: High Efficiency Video Coding) are extended to 65 types. Figure 1 is a schematic diagram of the arrangement of 67 types of prediction modes in intra prediction. As shown in Figure 1, arrow numbers 2 to 66 represent 65 types of intra angle prediction modes. In addition, there are also two types of non-angle modes, namely, a gradually flattening Planar mode numbered 0 and a direct current DC mode numbered 1. Therefore, the intra prediction process in VVC includes two types of non-angle modes and 65 types of angle modes, and here, these 67 types of prediction modes are referred to as conventional modes of intra prediction.
[0018] MIP is an intra prediction technique based on neural networks, that is, it uses a multi-layer neural network to predict the luminance value of a current block based on neighboring reconstructed pixels. Specifically, the MIP technique divides the luminance coding block into three types according to the size of the intra luminance coding block, and sets the size of the luminance coding block as W×H, where W is a width parameter and H is a height parameter. According to the size of the luminance coding block, the luminance coding block can be divided into the following three types:
[0019] Luminance coding blocks of size 4x4 are luminance blocks of the first type, luminance coding blocks of sizes 8x4, 4x8 and 8x8 are luminance blocks of the second type, and luminance coding blocks of other sizes are luminance blocks of the third type.
[0020] For these three types of intra-luminance coding blocks, the MIP technique adds M MIP modes based on the 67 conventional intra-prediction modes, where M=35 for the first type of luminance block, M=19 for the second type of luminance block, and M=11 for the third type of luminance block.
[0021] Specifically, the MIP technique is only applied to intra-luminance prediction, and similar to the conventional mode, the input of the 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, and the specific prediction process is divided into three steps: averaging, matrix vector multiplication and interpolation. That is, through performing these three steps on the reconstructed luminance values of the adjacent pixels of the input previous row and left column, the luminance component predicted value of the current block can be obtained.
[0022] FIG. 2 is an exemplary flowchart of coding in MIP mode. As shown in FIG. 2, the MIP mode performs luma prediction, which is specifically realized as follows:
[0023] In step 1, we perform the average operation on the neighboring reference points above the current block to obtain a vector bdry with a total of N values. top and perform the average operation on the adjacent reference points on the left side of the current block to obtain a vector bdry with a total of N values. left If the current block is the first type of luma coding, N=2, if the current block is the second or third type of luma coding, N=4. top and the vector bdryleft is a new vector bdry red and perform the subsequent operations.
[0024] In step 2, the corresponding matrix A is obtained through the mode number k of the MIP mode. k and offset amount b k Then, the partial prediction value of the current block identified by the crossing line is calculated and obtained through the following equation (1), as shown in FIG.
number
[0025] In step 3, the predicted value Predred of the current block's remainder is obtained through linear interpolation.
[0026] It should be noted that for the implementation process of coding 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, through analyzing the mode information, specifically which mode to use, whether a conventional mode or a MIP mode, and if a conventional mode, which specific conventional mode, and if a MIP mode, which specific MIP mode.
[0027] In intra prediction of VVC, for each luma coding block, a comparison of the RDcost between all 67 traditional modes and M MIP modes is performed, and the optimal mode is selected from the 67 traditional modes and M MIP modes for coding. To save bit overhead, an intra mode coding technique based on Most Probable Modes List (MPM) is used for VVC.
[0028] Note that since the extend reference line and intra sub-block partitioning techniques (ISP) are only used for modes in the MPM list, if extendrefflag and ispflag are both 0, i.e., if we use a reference line that is 0 and do not perform sub-block partitioning, we directly code the position of the optimal mode in the MPM list without the need to code mpmflag.
[0029] Furthermore, for constructing 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, then an MPM list needs to be constructed containing the six most likely conventional modes, and if the optimal mode selected for the current block is a MIP mode, then an MIPMPM list needs to be constructed containing the three most likely MIP modes.
[0030] FIG. 3 is a schematic diagram of the arrangement of the upper adjacent luminance blocks and the left adjacent luminance blocks of the current block. As shown in FIG. 3, the above two lists are both derived according to the optimal modes of the upper adjacent luminance blocks (A) and the left adjacent luminance blocks (L) of the current block shown in FIG. 3.
[0031] In addition, for constructing the MIPMPM list, if the optimal mode of the current block is a MIP mode in VVC intra prediction, then it is necessary to construct the MIPMPM list. In the process of constructing the MIPMPM list, it is necessary to first obtain the MIP mode ABOVE_MIP corresponding to the optimal mode of the upper adjacent luminance block, and the MIP mode LEFT_MIP corresponding to the optimal mode of the left adjacent luminance block.
[0032] Further, after obtaining LEFT_MIP and ABOVE_MIP, construct a MIPMPM list including three most probable MIPMPM modes according to the following method, where the number in MIPMPM is the number of the MIP mode, and the number ranges from 0 to (M-1), and for the first type of luminance block, the number is 0 to 34, for the second type of luminance block, the number is 0 to 18, and for the third type of luminance block, the number is 0 to 10; If LEFT_MIP is available (is not -1), put LEFT_MIP into the MIPMPMlist, If ABOVE_MIP is available (not -1), put ABOVE_MIP into the MIPMPMlist after a redundancy check, If LEFT_MIP is not available (is -1) and ABOVE_MIP is not available (is -1), add the default list according to the type of the current block, after redundancy check, until the MIPMPMlist is filled.
[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] In addition, in the chroma intra prediction process of VVC, there is a direct mode (DM) that uses correlation between components, and the intra prediction mode of the central position of the luma coding block at the same position corresponding to the current block is used to perform intra prediction of the current chroma block. Figure 4 is a schematic diagram of an arrangement for determining the DM mode. As shown in Figure 4, since the MIP technique is only used for luma coding blocks, it is necessary to add that if the intra prediction mode of the CR position in Figure 4 is an MIP mode, the MIP mode is mapped to a conventional mode via a "MIP-conventional mapping table" to perform intra prediction of the current chroma block.
[0035] That is, with the introduction of MIP technology, in the intra prediction process, the construction of the MPMPM list requires mapping of conventional modes to MIP modes, and the construction of the MPM list and the determination of the DM mode require mapping of MIP modes to conventional modes. [Table 1]
[0036] In addition, in the process of constructing the MPM list and obtaining the DM mode, it is necessary to use the mapping from the MIP mode to the conventional mode. Specifically, 35 / 19 / 11 kinds of MIP modes are mapped to 67 kinds of conventional modes through the "MIP-conventional mapping table". For 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 a transform and quantization module 101, an intra estimation module 102, an intra prediction module 103, a motion compensation module 104, a motion estimation module 105, an inverse transform 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) module 109, a frame coding module 110, a frame coding module 111, a frame coding module 112, a frame coding module 113, a frame coding module 114, a frame coding module 115, a frame coding module 116, a frame coding module 117, a frame coding module 118, a frame coding module 119, a frame coding module 120, a frame coding module 121, a frame coding module 122, a frame coding module 123, a frame coding module 124, a frame coding module 125, a frame coding module 126, a frame coding module 127, a frame coding module 128, a frame coding module 129, a frame coding module 130, a frame coding module 131, a frame coding module 132, a frame coding module 133, a frame coding module 134, a frame coding module 135, a frame coding module 136, a frame coding module 137, a frame coding module 138, a frame coding module 139 ... 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 transform 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 decoding image cache module 206. After partial processing such as transform and quantization module 101, intra estimation module 102, intra prediction module 103, motion compensation module 104, motion estimation module 105, deblocking filtering and SAO filtering module 108, and header coding and CABAC module 109 of the video coding system 100, the video coding system 100 outputs a code stream of the video image, and the code stream is input to a video decoding system 200, and after partial processing such as header decoding and CABAC decoding module 201, inverse transform and inverse quantization module 202, intra prediction module 203 and motion compensation module 204 in the video decoding system 200, the original video image is finally restored.
[0038] According to the height and width parameters, the current block can have 25 different sizes, specifically, the standard specifies that the maximum luma block is 128×128, but the maximum size of the transform unit is 64×64, that is, the luma block has a size of 128×128 and needs to perform quadtree division first, so the maximum luma block size is 64×64. Table 5 is a schematic table of the sizes of luma blocks, as shown in Table 5. [Table 5]
[0039] In the prior art, the MIP mode is restricted according to the height and width parameters of the current block. Specifically, if the width-to-height ratio of the current block is greater than 4, or the height-to-width ratio is greater than 4, the current block is not coded through the MIP mode. Table 6 shows the luminance block size restriction in the MIP mode of the prior art, as shown in Table 6. [Table 6]
[0040] In the prior art, for a first type of luminance block in MIP mode (luminance block corresponding to 4×4), two upper adjacent luminance blocks and two left adjacent luminance blocks are matrix-operated to generate a 4×4 prediction block, for a second type of luminance block in MIP mode (luminance block corresponding to 4×8, 8×4, 8×8), four upper adjacent luminance blocks and four left adjacent luminance blocks are matrix-operated to generate a 4×4 prediction block, and for a third type of luminance block in MIP mode (luminance block corresponding to other sizes), four upper adjacent luminance blocks and four left adjacent luminance blocks are matrix-operated 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, because the third type of luminance block generates a non-square prediction block, it is necessary to perform odd-row extraction on the matrix when calculating.
[0041] Further, in the grammar, MipSizeId can indicate the application class of MIP, numModes can indicate the number of MIP modes, boundarySize can indicate the number of luminance blocks in the upper reference row or left reference column obtained by downsampling, predW can indicate the width parameter of the prediction block, predH can indicate the height parameter of the prediction block, and predC can indicate the side length of the MIP matrix. Table 7 is a grammar relationship corresponding to the MIP modes of the prior art, and as shown in Table 7, MipSizeId, numModes, boundarySize, predW, predH, and predC in the grammar have the following relationship. [Table 7]
[0042] Further, in the grammar, MipSizeId takes a value of 0 to indicate a 4×4 luma block, a value of 1 to indicate a 4×8, 8×4, 8×8 luma block, and a value of 2 to indicate luma blocks of other sizes. numModes indicates the total number of MIP prediction modes, i.e., there are a total of 35 types of 4×4 luma blocks, a total of 19 types of 4×8, 8×4, 8×8 luma blocks, and a total of 11 types of luma blocks of other sizes. boundarySize indicates that the neighboring luma blocks in the row above or the left column of the current block are finally downsampled to two or four neighboring luma blocks.
[0043] In the prior art, when an encoder performs luma prediction via MIP mode, it can be performed via the following equation (2):
number
[0044] Here, mWeight and vBias are the weight matrix and bias matrix that each MIP mode obtains through deep learning training, 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, and sW is the right shift amount of the entire predicted value, and the sW value in different MIP modes needs to be obtained through table lookup.
[0045] Based on JVET-N1001-v7, when generating a prediction matrix for MIP, the encoder determines whether it needs to extract the prediction values of odd rows via the variables incW and incH, specifically as follows:
number
[0046] Here, incW=2 or incH=2 indicates that extraction is required with the width or height parameter.
[0047] Table 8 is a grammatical description of sW in the prior art, and as shown in Table 8, only when MipSizeId is equal to 1, that is, only when the current block size is 4×8, 8×4, 8×8 and the MIP mode number is 3, 8, 12, 17, the value of sW is 9, and the values of sW in all the remaining MIP modes are all 8. Here, the values of sW in the MIP modes are in a mapping relationship, so the values of sW in all the modes can be obtained through Table 8. [Table 8]
[0048] Table 9 is the mWeight matrix when MipSizeId is 1 and MIP mode numbers are 3 and 12. [Table 9]
[0049] Table 10 is the vBias matrix when MipSizeId is 1 and MIP mode numbers are 3 and 12. [Table 10]
[0050] Table 11 is the mWeight matrix when MipSizeId is 1 and MIP mode numbers are 8 and 17. Table 12 is the vBias matrix when MipSizeId is 1 and MIP mode numbers are 8 and 17. [Table 11] [Table 12]
[0051] As shown in Table 8, due to the different grammar descriptions of sW in different MIP modes, when the encoder performs luminance prediction through the MIP mode, if the MipSizeId of the current block is 1, that is, if the current block is a second type luminance block (luminance block with a size of 4×8, 8×4, 8×8), and the MIP mode number corresponding to the current coding block is 3, 8, 12, 17 mode, the value of sW is different from other modes, which causes the inconsistency of the algorithm, and the time complexity of the algorithm increases in the process of querying the above Table 8, and the storage of Table 8 also needs to occupy memory space. That is, when performing luminance prediction through the MIP mode, the parameters used in luminance blocks of different sizes may also be different, so it is necessary to occupy a large memory space and store a large number of parameters, and the overall time for searching and calling the parameters in the prediction process also increases, reducing the efficiency of the codec.
[0052] To solve the above problems, this application proposes an image coding method to correct the values of sW in MIP mode numbers 3, 8, 12, and 17 of the second type luminance block, so that the values of sW in all MIP mode numbers are all the same, thereby reducing storage space and reducing overall time by omitting the operation of looking up a table.
[0053] Furthermore, the image coding method proposed in this application can affect the intra prediction part in the video coding hybrid framework, i.e., it is mainly applied to the intra prediction module 103 in video coding and the intra prediction module 203 in video decoding, and acts on the coding side and the decoding side simultaneously.
[0054] It should be noted that in the embodiment of the present application, based on the calculation parameters obtained by training the machine learning method, the image codec method proposed in the present application can perform unified correction of sW according to a fixed offset parameter, and simultaneously correct the corresponding weight matrix and bias matrix. Here, in the present application, the second type luminance block is not limited to the correction of the value of sW in the MIP mode numbers of 3, 8, 12, and 17, and performs unified correction for the cases of different values of sW, which is the calculation parameter obtained by training the machine learning method, after specific parameter (including different combinations of parameters such as size, mode, right shift value, etc.) changes.
[0055] Furthermore, in the following embodiments, the values of sW in the MIP mode numbers 3, 8, 12, and 17 of the second type luminance block are taken as examples to exemplify the image coding method proposed in this application.
[0056] Hereinafter, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application.
[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, and as shown in FIG. 7, in the embodiment of the present application, the method in 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 an offset parameter, where the offset parameter is used to indicate the right shift bit number of the predicted value.
[0059] In an embodiment of the present application, before performing a coding process according to the MIP mode, the encoder can first set an offset parameter used to indicate the number of offset bits.
[0060] It should be noted that in the embodiment of the present application, based on the above equation (2), the offset parameter is sW in equation (2), i.e., the offset parameter is the right shift amount of the entire predicted value, i.e., when performing luma prediction on the current block, the offset parameter is used to indicate the number of right shift bits of the entire predicted value of the current block.
[0061] Furthermore, in the embodiment of the present application, the encoder can set the offset parameter to one fixed positive integer before performing the coding process according to the MIP mode, that is, after the encoder sets the offset parameter, the offset parameter to be used for any current block is determined regardless of the size of the current block and regardless of the MIP mode number corresponding to the current block.
[0062] It should be noted that in the embodiment of the present application, when the encoder performs the 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 also preferably set the offset parameter sW to 9.
[0063] For example, Table 13 is the first grammar description of sW in the present application. In an embodiment of the present application, when the encoder performs correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for a luminance block whose size is 4×8, 8×4 or 8×8 and whose MIP mode number is 3, 8, 12 or 17, it can set the corresponding sW to the same value as the sW corresponding to other luminance blocks, that is, if the sW corresponding to other luminance blocks is 8, then the sW corresponding to the luminance block whose size is 4×8, 8×4 or 8×8 and whose MIP mode number is 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 an embodiment 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, for a luminance block whose size is 4×8, 8×4 or 8×8 and whose MIP mode number is 3, 8, 12 or 17, it can set the corresponding sW to the same value as the sW corresponding to other luminance blocks, that is, if the sW corresponding to other luminance blocks is 7, then the sW corresponding to the luminance block whose size is 4×8, 8×4 or 8×8 and whose MIP mode number is 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 an embodiment 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, for a luminance block whose size is 4×8, 8×4 or 8×8 and whose MIP mode number is 3, 8, 12 or 17, it can set the corresponding sW to the same value as the sW corresponding to other luminance blocks, that is, if the sW corresponding to other luminance blocks is 8, then the sW corresponding to the luminance blocks whose size is 4×8, 8×4 or 8×8 and whose MIP mode number is 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, the current block is a second type luminance block, the size is 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17, the value of sW is different from the value of sW in all the remaining MIP mode numbers. Therefore, when the encoder codes the current block, it needs to perform query and call of the offset parameter sW according to the size and MIP mode number of the current block, which increases the overall time and reduces the efficiency of the codec, and at the same time, it also needs to store the grammar description table of sW, so that the storage space is also increased. Compared with the prior art, the present application can first set the offset parameter sW before performing the coding process according to the MIP mode, and the offset parameters sW corresponding to all luminance blocks of different sizes and different MIP mode numbers are all set to the same value, so that when coding 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 encoder also does not need to store a grammar description table of sW, further reducing the storage space and overall time required for the coding process, and effectively improving the efficiency of the codec.
[0067] It should be noted that in the embodiment of the present application, when the encoder 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, but only when MipSizeId is equal to 1, i.e., when the current block is a second type luminance block, the size is 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17, the value of sW is different from the values of sW of all the remaining MIP mode numbers, so that 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 sets the offset parameter sW corresponding to the size of 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17.
[0068] As can be seen, in the embodiment of the present application, the process in which 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 is, that is, if 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 all the same.
[0069] In step 102, if the coding process is performed according to the MIP mode, the coding process is performed according to the offset parameter.
[0070] In an embodiment of the present application, the encoder performs a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, and then when the encoder performs a coding process according to the MIP mode, the encoder can perform the coding process based on the set offset parameter.
[0071] It should be noted that in the embodiment of the present application, when the encoder performs the coding process according to the MIP mode after setting the offset parameter, it can directly perform the coding process for the current block according to the offset parameter, which can effectively improve the efficiency of the codec by reducing the storage space and overall time required for the codec process while ensuring the codec performance.
[0072] In the embodiment of the present application, further, FIG. 8 is an exemplary implementation flowchart 2 of the image coding method proposed by the embodiment of the present application. As shown in FIG. 8, 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, i.e., after step 101, the method of the encoder performing image coding further includes the following steps:
[0073] In step 103, according to a preset calculation rule, the initial weight matrix and the initial bias matrix are corrected to obtain a corrected weight matrix and a corrected bias matrix, where the initial weight matrix and the initial bias matrix correspond to the initial right-shift parameters that have been corrected to be unified.
[0074] In an embodiment of the present application, after performing a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, the encoder can correct the initial weight matrix and the initial bias matrix according to a preset calculation rule, thereby obtaining a corrected weight matrix and a corrected bias matrix.
[0075] It should be noted that in the present implementation, the initial weight matrix and the initial bias matrix correspond to the initial right-shift parameters that have been subjected to the unifying correction.
[0076] It should be noted that in the present embodiment, 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 embodiment of the present application, after the encoder sets the offset parameters, i.e., after correcting the offset parameters corresponding to the size being 4×8, 8×4 or 8×8 and the MIP mode number being 3, 8, 12 or 17, it can further perform an update process on the corresponding initial weight matrix and initial bias matrix to obtain a corrected weight matrix and a corrected bias matrix, in order to prevent the codec performance from being degraded.
[0078] It should be noted that 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 update the corresponding initial weight matrix and initial bias matrix through multiple different methods when obtaining the corrected weight matrix and corrected bias matrix according to the preset calculation rule. 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 update any element value B in the initial bias matrix to B / 2 according to the calculation rule of rounding down to obtain the corrected weight matrix and the corrected bias matrix. Here, A and B are both integers. In addition, the encoder can also update any element value A in the initial weight matrix to A / 2 and update any element value B in the initial bias matrix to B / 2 according to the calculation rule of rounding up 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 to obtain a corrected weight matrix and a corrected bias matrix.
[0079] In step 104, a coding process is performed according to the offset parameters, the corrected weight matrix and the corrected bias matrix.
[0080] In an embodiment of the present application, when the encoder performs the coding process according to the MIP mode, the encoder can perform the coding process based on the set offset parameters, the corrected weight matrix, and the corrected bias matrix.
[0081] It should be noted that in the embodiment of the present application, after setting the offset parameters, the encoder can further update the corresponding initial weight matrix and initial bias matrix to obtain a corrected weight matrix and a corrected bias matrix to prevent the degradation of the codec performance, and when performing the coding process according to the MIP mode, the encoder can perform the coding process for the current block according to the offset parameters, the corrected weight matrix and the corrected bias matrix, thereby reducing the storage space and overall time required for the codec process and effectively improving the efficiency of the codec under the condition of ensuring the codec performance.
[0082] It should be noted that in the embodiment of the present application, after the encoder sets the offset parameter, it can directly perform coding processing for the current block according to the offset parameter and the initial weight matrix and the initial bias matrix, that is, after the encoder completes the setting of the offset parameter, it can also not update the corresponding initial weight matrix and initial bias matrix.
[0083] In the prior art, when predicting luminance values for a current block through MIP mode, the number of right shift bits needs to be non-uniform, that is, the offset parameter sW needs to be different. The image coding method proposed in this application sets the offset parameter to be uniform, making the realization of MIP mode simpler and more uniform. Furthermore, since the offset parameter sW in the prior art is different, it is necessary to store an sW table representing the number of right shift bits. In the calculation process, the sW corresponding to the current block is queried and called to determine the number of bits that the predicted value calculated by MIP needs to be right shifted. The image coding method proposed in this application sets the offset parameter to be uniform, so there is no need to store the sW table representing the number of right shift bits, thereby saving storage space and omitting the processing process of querying and calling sW.
[0084] Furthermore, in the embodiment of the present application, after the encoder sets the offset parameters, it further updates the corresponding initial weight matrix and initial bias matrix, so that there is no obvious loss in codec performance. Specifically, according to the common test standard of VVC, the BD-rates in Y, U, and V are 0.00%, -0.02%, and -0.02%, respectively, where the result of 24 frame intervals is expected to be the same as the codec performance of 8 frame intervals.
[0085] In the image coding method proposed in the embodiment of the present application, before performing 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, where the offset parameter is used to indicate the right shift bit number of the predicted value, and when performing the coding process according to the MIP mode, the encoder performs the coding process according to the offset parameter. As can be seen, the image coding method proposed by the present application uses the offset parameter to perform a correction to unify the right shift bit number of the predicted value, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value, and there is no need to query and call the sW value when performing the coding process, thereby reducing the complexity of the MIP algorithm, ensuring the codec performance, reducing the storage space and overall time required for the coding process, and effectively improving the efficiency of the codec.
[0086] Based on the above embodiment, in another embodiment of the present application, when the size is 4x8, 8x4 or 8x8, and the MIP mode number is 3, 8, 12 or 17, the method for the encoder to obtain a corrected weight matrix and a corrected bias matrix according to a preset calculation rule may include the following steps:
[0087] In step 103a, all element values in the initial weight matrix are corrected to values of the same binary order as other weight matrix element values according to the calculation rule of truncation to obtain a corrected weight matrix.
[0088] In step 103b, all elements in the initial bias matrix are corrected to the same binary order value as other bias matrix element values according to the calculation rule of truncation to obtain a corrected bias matrix.
[0089] 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 values of the same binary order as other weight matrix element values according to the truncation calculation rule, and at the same time, correct all elements in the initial bias matrix to values of the same binary order as other bias matrix element values, thereby obtaining a corrected weight matrix and a corrected bias matrix.
[0090] Based on the above Table 9, Table 16 is the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. As shown in Table 16, the encoder updates each element value A in Table 9 to A / 2 according to the truncation calculation rule to obtain the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 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 truncation 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 the above Table 11, 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 truncation 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, and as shown in Table 22, the encoder corrects each element value B in Table 12 to B / 2 according to the truncation 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 the embodiment of the present application, further, if 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 rule may include the following steps:
[0095] In step 103c, all element values in the initial weight matrix are corrected to values of the same binary order as other weight matrix element values according to the round-up calculation rule to obtain a corrected weight matrix.
[0096] In step 103d, all elements in the initial bias matrix are corrected to the same binary order value as other bias matrix element values according to the round-up calculation rule to obtain a 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 values of the same binary order as other weight matrix element values according to the round-up calculation rule, and at the same time, correct all elements in the initial bias matrix to values of the same binary order as other bias matrix element values, thereby obtaining a corrected weight matrix and a corrected bias matrix.
[0098] Based on Table 9 above, Table 20 is the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. As shown in Table 20, the encoder updates each element value A in Table 9 to A / 2 according to the round-up calculation rule to obtain the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. [Table 20]
[0099] Based on Table 10 above, Table 21 is a 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 round-up calculation rule to obtain a corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. [Table 21]
[0100] Based on the above Table 11, 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 round-up 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 a 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 round-up calculation rule to obtain a corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17. [Table 23]
[0102] In the embodiment of the present application, further, if 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 rule may include the following steps:
[0103] In step 103e, all element values in the initial weight matrix are corrected to values of the same binary order as other weight matrix element values according to the rounding off calculation rule to obtain a corrected weight matrix.
[0104] In step 103f, all elements in the initial bias matrix are corrected to values of the same binary order as other bias matrix element values according to the rounding calculation rule to obtain a corrected bias matrix.
[0105] 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 values of the same binary order 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 values of the same binary order as other bias matrix element values, thereby obtaining a corrected weight matrix and a corrected bias matrix.
[0106] Based on Table 9 above, Table 24 is the corrected weight matrix when MipSizeId is 1 and the MIP mode numbers are 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 numbers are 3 and 12. [Table 24]
[0107] Based on Table 10 above, Table 25 is a 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 a corrected bias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. [Table 25]
[0108] Based on the above Table 11, 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, and 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 embodiment of the present application, before performing 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, where the offset parameter is used to indicate the right shift bit number of the predicted value, and when performing the coding process according to the MIP mode, the encoder performs the coding process according to the offset parameter. As can be seen, the image coding method proposed by the present application uses the offset parameter to perform a correction to unify the right shift bit number of the predicted value, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value, and there is no need to query and call the sW value when performing the coding process, thereby reducing the complexity of the MIP algorithm, ensuring the codec performance, reducing the storage space and overall time required for the coding process, and effectively improving 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 embodiment of the present application, and as shown in FIG. 9, in the embodiment of the present application, the method in which the decoder performs image decoding may include the following steps:
[0112] In step 201, before performing 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 an offset parameter, where the offset parameter is used to indicate the right shift bit number of the predicted value.
[0113] In an embodiment of the present application, before performing a decoding process according to the MIP mode, the decoder can first set an offset parameter used to indicate the number of offset bits.
[0114] It should be noted that in the embodiment of the present application, based on the above equation (2), the offset parameter is sW in equation (2), i.e., the offset parameter is the right shift amount of the entire predicted value, i.e., when performing luma prediction on the current block, the offset parameter is used to indicate the number of right shift bits of the entire predicted value of the current block.
[0115] Furthermore, in the embodiment of the present application, the decoder can set the offset parameter to one fixed positive integer before performing the decoding process according to the MIP mode, that is, after the decoder sets the offset parameter, the offset parameter to be used for any current block is determined regardless of the size of the current block and regardless of the MIP mode number corresponding to the current block.
[0116] It should be noted that in the embodiment of the present application, when the decoder performs the 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 also preferably set the offset parameter sW 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, the current block is a second type luminance block, the size is 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17, the value of sW is different from the value of sW in all the remaining MIP mode numbers. Therefore, when the decoder decodes the current block, it needs to perform query and call of the offset parameter sW according to the size and MIP mode number of the current block, which increases the overall time and reduces the efficiency of the codec, and at the same time, it also needs to store the grammar description table of sW, so that the storage space is also increased. Compared with the prior art, the present application can first set the offset parameter sW before performing the decoding process according to the MIP mode, and the offset parameters sW corresponding to all luminance blocks of different sizes and different MIP mode numbers are all set to the same value, so that 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, further reducing the storage space and overall time required for the codec process, and effectively improving the efficiency of the codec.
[0118] It should be noted that in the embodiment 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, but only when MipSizeId is equal to 1, i.e., the current block is a second type luminance block, the size is 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17, the value of sW is different from the value of sW of all the remaining 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 sets the offset parameter sW corresponding to the size of 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17.
[0119] As can be seen, in the embodiment of the present application, the process in which the decoder performs correction to unify the initial right-shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter is as follows: if 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 all the same.
[0120] In step 202, if the decoding process is performed according to the MIP mode, the decoding process is performed according to the offset parameter.
[0121] In an embodiment of the present application, the decoder performs a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, and then when the decoder performs a decoding process according to the MIP mode, the decoder can perform the decoding process based on the set offset parameter.
[0122] It should be noted that in the embodiment of the present application, when the decoder performs the decoding process according to the MIP mode after setting the offset parameter, it can directly perform the decoding process on the current block according to the offset parameter, which can effectively improve the efficiency of the codec by reducing the storage space and overall time required for the codec process while ensuring the codec performance.
[0123] In addition, in the embodiment of the present application, FIG. 10 is an exemplary implementation flowchart 2 of the image decoding method proposed by the embodiment of the present application. As shown in FIG. 10, 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, i.e., after step 201, the method of the decoder performing image decoding may further include the following steps:
[0124] In step 203, according to a preset calculation rule, the initial weight matrix and the initial bias matrix are corrected to obtain a corrected weight matrix and a corrected bias matrix, where the initial weight matrix and the initial bias matrix correspond to the initial right-shift parameters that have been corrected to be unified.
[0125] In an embodiment of the present application, the decoder can perform a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, and then correct the initial weight matrix and the initial bias matrix according to a preset calculation rule, thereby obtaining a corrected weight matrix and a corrected bias matrix.
[0126] It should be noted that in the present implementation, the initial weight matrix and the initial bias matrix correspond to the initial right-shift parameters that have been subjected to the unifying correction.
[0127] It should be noted that in the present embodiment, 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 embodiment of the present application, after the decoder sets the offset parameters, i.e., after correcting the offset parameters corresponding to the size being 4×8, 8×4 or 8×8 and the MIP mode number being 3, 8, 12 or 17, in order to prevent the degradation of the codec performance, the decoder can further perform an update process on the corresponding initial weight matrix and initial bias matrix, thereby obtaining a corrected weight matrix and a corrected bias matrix.
[0129] It should be noted that 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 decoder can update the corresponding initial weight matrix and initial bias matrix through multiple different methods when obtaining the corrected weight matrix and the corrected bias matrix according to the preset calculation rule. 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 update any element value B in the initial bias matrix to B / 2 according to the calculation rule of rounding down to obtain the corrected weight matrix and the corrected bias matrix. Here, A and B are both integers. In addition, the decoder can also update any element value A in the initial weight matrix to A / 2 and update any element value B in the initial bias matrix to B / 2 according to the calculation rule of rounding up to obtain the corrected weight matrix and the corrected bias matrix. In addition, the decoder can also update any element value A in the initial weight matrix to A / 2 and at the same time update any element value B in the initial bias matrix to B / 2 according to the rounding calculation rule to obtain a corrected weight matrix and a corrected bias matrix.
[0130] In step 204, a decoding process is performed according to the offset parameters, the corrected weight matrix and the corrected bias matrix.
[0131] In an embodiment of the present application, when the decoder performs the decoding process according to the MIP mode, the decoder can perform the decoding process based on the set offset parameters, the corrected weight matrix and the corrected bias matrix.
[0132] It should be noted that in the embodiment of the present application, after setting the offset parameter, the decoder can further update the corresponding initial weight matrix and initial bias matrix to obtain a corrected weight matrix and a corrected bias matrix, and perform the decoding process for the current block according to the offset parameter, the corrected weight matrix and the corrected bias matrix when performing the decoding process according to the MIP mode, in order to prevent the codec performance from being degraded, thereby reducing the storage space and overall time required for the codec process and effectively improving the efficiency of the codec under the condition of ensuring the codec performance.
[0133] It should be noted that in the embodiment of the present application, after the decoder sets the offset parameter, it can also directly perform the decoding process for the current block according to the offset parameter, the initial weight matrix and the initial bias matrix, that is, after the decoder completes the setting of the offset parameter, it can also not update the corresponding initial weight matrix and the initial bias matrix.
[0134] In the prior art, when predicting luminance values for a current block through MIP mode, the number of right shift bits needs to be non-uniform, that is, the offset parameter sW needs to be different; the image decoding method proposed in this application sets the offset parameter to be uniform, making the realization of MIP mode simpler and more uniform; furthermore, since the offset parameter sW in the prior art is different, it is necessary to store an sW table representing the number of right shift bits; in the calculation process, the sW corresponding to the current block is queried and called to determine the number of bits that the predicted value calculated by MIP needs to be right shifted; the image decoding method proposed in this application sets the offset parameter to be uniform, so there is no need to store the sW table representing the number of right shift bits, thereby saving storage space and omitting the processing process of querying and calling sW.
[0135] In the image decoding method proposed in the embodiment of the present application, before performing 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, where the offset parameter is used to indicate the right shift bit number of the predicted value, and when performing the decoding process according to the MIP mode, the decoder performs the decoding process according to the offset parameter. As can be seen, the image codec method proposed by the present application uses the offset parameter to perform a correction to unify the right shift bit number of the predicted value, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value, and there is no need to query and call the sW value when performing the coding process, which reduces the complexity of the MIP algorithm and ensures the coding performance, while reducing the storage space and overall time required for the coding process, and effectively improving 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 configuration of an encoder proposed by an embodiment of the present application, and as shown in FIG. 11, the encoder 300 proposed by an embodiment of the present application may 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 initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a coding process according to a MIP mode, where the offset parameter is used to indicate the number of right shift bits of a predicted value.
[0138] The coding part 302 is configured to perform the coding process according to the offset parameter when performing the coding process according to the MIP mode.
[0139] The first correction part 301 is specifically configured to correct the initial right shift parameter to the offset parameter when the initial right shift parameter is different from the offset parameter, so that the right shift bit numbers of all predicted values corresponding to all sizes and all MIP mode numbers are all the same.
[0140] FIG. 12 is an exemplary structural diagram 2 of the configuration of an encoder proposed by an embodiment of the present application. As shown in FIG. 12, the encoder 300 proposed by an embodiment of the present application further includes a first processor 303, a first memory 304 storing executable instructions for 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] Further, in an embodiment of the present application, the first processor 303 is used to perform a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a coding process according to a MIP mode, where the offset parameter is used to indicate the right shift bit number of a predicted value, and when performing a coding process according to the MIP mode, performs the coding process according to the offset parameter.
[0142] Furthermore, each functional module in this embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The integrated units may be realized using the form of hardware, or may be realized using the form of software functional modules.
[0143] When an 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 one computer-readable storage medium. Based on this understanding, the technical solution of the present embodiment, in essence or a part that contributes to the prior art, or all or a part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in one storage medium and includes several instructions for a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or a part of the steps of the method in the present embodiment. The aforementioned storage medium includes various media that can store program code, such as U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0144] The embodiment of the present application provides an encoder, which performs a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a coding process according to a MIP mode, where the offset parameter is used to indicate the right shift bit number of a predicted value, and performs the coding process according to the offset parameter when performing the coding process according to the MIP mode. As can be seen, the image coding method proposed by the present application uses the offset parameter to perform a correction to unify the right shift bit number of a predicted value, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value, and there is no need to query and call the sW value when performing the coding process, thereby reducing the complexity of the MIP algorithm, ensuring the coding performance, reducing the storage space and overall time required for the coding process, and effectively improving the efficiency of the codec.
[0145] FIG. 13 is an exemplary structural diagram 1 of the configuration of a decoder proposed by an embodiment of the present application. As shown in FIG. 13, the decoder 400 proposed by an embodiment of the present application may include a first correction part 401 and a decoding part 402.
[0146] The second correction part 401 is configured to perform a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a decoding process according to a MIP mode, where the offset parameter is used to indicate the number of right shift bits of a predicted value.
[0147] When the decoding portion 402 performs the decoding process according to the MIP mode, it is configured to perform the decoding process according to the offset parameter.
[0148] The second correction part 401 is specifically configured to correct the initial right shift parameter to the offset parameter when the initial right shift parameter is different from the offset parameter, so that the right shift bit numbers of all predicted values corresponding to all sizes and all MIP mode numbers are all the same.
[0149] FIG. 14 is an exemplary structural diagram 2 of the configuration of a decoder proposed by an embodiment of the present application. As shown in FIG. 14, the decoder 400 proposed by an embodiment of the present application may further include a second processor 403, a second memory 404 storing executable instructions for 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] Further, in an embodiment of the present application, the second processor 403 is used to perform a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a decoding process according to a MIP mode, where the offset parameter is used to indicate the number of right shift bits of a predicted value, and is used to perform the decoding process according to the offset parameter when performing the decoding process according to the MIP mode.
[0151] Furthermore, each functional module in this embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The integrated units may be realized using the form of hardware, or may be realized using the form of software functional modules.
[0152] When an 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 one computer-readable storage medium. Based on this understanding, the technical solution of the present embodiment, in essence or a part that contributes to the prior art, or all or a part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in one storage medium and includes several instructions for a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or a part of the steps of the method in the present embodiment. The aforementioned storage medium includes various media that can store program codes, such as U disks, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0153] The embodiment of the present application provides an encoder, and the decoder performs a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a decoding process according to a MIP mode, and performs a decoding process according to the offset parameter when performing a decoding process according to a MIP mode. As can be seen, the image coding method proposed by the present application uses an offset parameter to perform a correction to unify the right shift bit number of a predicted value, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value, and there is no need to query and call the sW value when performing a coding process, which reduces the complexity of the MIP algorithm, ensures the coding performance, and reduces the storage space and overall time required for the coding process, and effectively improves the efficiency of the coding.
[0154] The present embodiment provides a computer-readable storage medium and a computer-readable storage medium having a program stored thereon, the program implementing the method according to the above embodiment when executed by a processor.
[0155] Specifically, the program instructions corresponding to the image coding method in this embodiment can be stored in a storage medium such as an optical disk, a hard disk, a U disk, etc., and when the program instructions corresponding to one image coding method in the storage medium are read or executed by an electronic device, Before performing a coding process according to a MIP mode, perform a correction to unify 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 right shift bit number of a predicted value; and When performing the coding process according to the MIP mode, performing the coding process 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, a U disk, etc., and when the program instructions corresponding to one image decoding method in the storage medium are read or executed by an electronic device, Before performing a decoding process according to a MIP mode, perform a correction to unify 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 right shift bit number of a predicted value; and When performing the decoding process according to the MIP mode, performing the decoding process according to the offset parameter.
[0157] Those skilled in the art will appreciate that the embodiments of the present application may be provided as a method, a system, or a computer program product. Thus, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment that combines software and hardware. Furthermore, the present application may take the form of a computer program product embodied in one or more computer usable storage media (including, but not limited to, disk memory, optical memory, etc.) that contain computer usable program code.
[0158] The present application will be described with reference to exemplary implementation flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or block of the exemplary implementation flowcharts and / or block diagrams, and combinations of processes and / or blocks of the exemplary implementation flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine that executes the instructions by the processor of the computer or other programmable data processing device to generate an apparatus for performing the functions specified in one or more processes of the exemplary implementation flowcharts and / or one or more blocks of the block diagrams.
[0159] These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory can cause an article of manufacture to be produced that includes an instruction apparatus that embodies the functions specified in a process or processes of the exemplary implementation flowcharts and / or a block or blocks of the block diagrams.
[0160] These computer program instructions can be loaded into a computer or other programmable data processing apparatus and cause the computer or other programmable apparatus to perform a series of operational steps to generate a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in a process or processes of the exemplary implementation flowcharts and / or a block or blocks of the block diagrams.
[0161] The above are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. [Industrial Applicability]
[0162] The present embodiment provides an image codec method, an encoder, a decoder and a storage medium, in which the encoder performs a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before performing a coding process according to a MIP mode, where the offset parameter is used to indicate a right shift bit number of a predicted value, and performs the coding process according to the offset parameter when performing the coding process according to the MIP mode. The decoder performs a correction to unify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter before performing a decoding process according to a MIP mode, and performs the decoding process according to the offset parameter when performing the decoding process according to the MIP mode. As can be seen, the image coding method proposed by the present application uses an offset parameter to perform 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. Therefore, when performing coding processing, there is no need to query and call the sW value, which reduces the complexity of the MIP algorithm and ensures coding performance, while reducing the storage space and overall time required for the coding process, and effectively improving the efficiency of the codec.
Claims
1. 1. An image coding method applied to an encoder, comprising: When performing the coding process using a matrix-based intra prediction (MIP) mode, performing the coding process based on a uniform offset parameter; The offset parameter is the number of bits of right shift used in the calculation of the MIP prediction value, When performing the coding process using the MIP mode, performing the coding process based on a unified offset parameter For prediction values corresponding to any size and MIP mode number, using an offset parameter having the same number of right shift bits to obtain the uniform offset parameter, the offset parameter being equal to 6; Image coding methods.
2. When performing the coding process using the MIP mode, performing the coding process based on the unified offset parameter further includes: performing a coding process using a MIP mode based on a weight matrix and the uniform offset parameter, the weight matrix being selected based on a size and a MIP mode number; 2. The image coding method according to claim 1.
3. 1. An image decoding method applied to a decoder, comprising: When performing the decoding process using a matrix-based intra-prediction (MIP) mode, performing the decoding process based on a uniform offset parameter; The offset parameter is the number of bits of right shift used in the calculation of the MIP prediction value, When performing the decoding process using the MIP mode, performing the decoding process based on a uniform offset parameter For prediction values corresponding to any size and MIP mode number, using an offset parameter having the same number of right shift bits to obtain the uniform offset parameter, the offset parameter being equal to 6; Image decoding methods.
4. When performing the decoding process using the MIP mode, performing the decoding process based on the uniform offset parameter further includes: performing a decoding process using a MIP mode based on a weight matrix and the uniform offset parameter, the weight matrix being selected based on a size and a MIP mode number; 4. An image decoding method according to claim 3.
5. 3. An encoder comprising a first processor, a first memory for storing executable instructions for 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, the encoder performing the image coding method according to claim 1 or 2, wherein the instructions, when executed by the first processor, are transmitted to the first processor via a first bus.
6. 5. A decoder comprising a second processor, a second memory for storing executable instructions for the second processor, a second communication interface, and a second bus used to connect the second processor, the second memory, and the second communication interface, the decoder performing the image decoding method according to claim 3 or 4, wherein the instructions, when executed by the second processor, are
7. A computer readable storage medium having a computer program stored thereon, the program causing a processor to execute the image coding method according to claim 1 or 2.
8. A computer readable storage medium having a computer program stored thereon, said program causing a processor to execute the image decoding method according to claim 3 or 4.
Citation Information
Patent Citations
Image processing device, and image processing method
WO2020255769A1