IMAGE ENCODING METHODS, IMAGE DECODING METHODS, ENCODERS, DECODERS, AND COMPUTER-READABLE STORAGE MEDIA

VN130091APending Publication Date: 2026-10-15GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
VN1202607263
Authority / Receiving Office
VN · VN
Patent Type
Applications
Current Assignee / Owner
Filing Date
2019-06-25
Publication Date
2026-10-15

Smart Images

  • Figure VN1202607263_0
    Figure VN1202607263_0
Patent Text Reader

Abstract

The invention relates to a method of image encoding, a method of image decoding, an encoder, a decoder, and a storage medium. Before encoding by MIP methods, the encoder uniformly adjusts the initial right-shift parameters corresponding to different sizes and different MIP method numbers according to offset parameters, wherein the offset parameters are used to denote the right-shift digits of the predicted values; and during the encoding by MIP methods, performs encoding according to offset parameters. Before decoding by MIP methods, the decoder uniformly adjusts the initial right-shift parameters corresponding to different sizes and different MIP method numbers according to offset parameters, wherein the offset parameters are used to denote the right-shift digits of the predicted values; and during the decoding by MIP methods, performs decoding according to offset parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Image coding method, encoder, decoder and storage medium TECHNICAL FIELD

[0001] The embodiment of the present application relates to the technical field of video coding, in particular to an image coding method, an encoder, a decoder and a storage medium. BACKGROUND

[0002] In the reference software test platform of Versatile Video Coding (VVC), a new intra coding technology, Matrix-based Intra Prediction (MIP), is proposed. MIP is a neural network-based intra prediction technology, that is, a multi-layer neural network is used to predict the luminance value of the current block based on the adjacent reconstructed luminance blocks. Specifically, the same as the traditional intra mode, when intra prediction is performed using the MIP mode, the input of the MIP prediction is also the data of the adjacent luminance blocks of 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 includes three steps: downsampling, matrix-vector multiplication and interpolation.

[0003] However, when the luminance prediction is performed by the MIP mode, the parameters used by the luminance blocks of different sizes may also be different, so a large storage space is required to store a large number of parameters, and the searching and calling of the parameters in the prediction process also increases the overall time, thereby reducing the coding efficiency.

[0004] SUMMARY

[0005] The embodiment of the present application provides an image coding method, an encoder, a decoder and a storage medium, which can reduce the storage space and the overall time required in the coding process on the basis of ensuring the coding performance, and effectively improve the coding efficiency.

[0006] The technical scheme of the embodiment of the present application is as follows:

[0007] The embodiment of the present application provides an image coding method applied to an encoder, and the method comprises the following steps:

[0008] Before the coding processing is performed according to the MIP mode, the initial right shift parameters corresponding to different sizes and different MIP mode numbers are uniformly modified according to offset parameters; wherein the offset parameters are used to indicate the right shift number of the predicted value; and

[0009] When the coding processing is performed according to the MIP mode, the coding processing is performed according to the offset parameters.

[0010] The embodiment of the present application provides an image decoding method applied to a decoder, and the method comprises the following steps:

[0011] Before decoding processing according to the MIP mode, uniformly modifying initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter; wherein the offset parameter is used to indicate a right shift number of a prediction value; and

[0012] When decoding processing according to the MIP mode, decoding processing is performed according to the offset parameter.

[0013] Embodiments of the present application provide an encoder, which comprises a first modification part and an encoding part,

[0014] The first modification part is configured to uniformly modify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before encoding processing according to the MIP mode; wherein the offset parameter is used to indicate a right shift number of a prediction value.

[0015] The encoding part is configured to perform encoding processing according to the offset parameter when encoding processing according to the MIP mode.

[0016] Embodiments of the present application provide a decoder, which comprises a second modification part and a decoding part,

[0017] The second modification part is configured to uniformly modify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before decoding processing according to the MIP mode; wherein the offset parameter is used to indicate a right shift number of a prediction value.

[0018] The decoding part is configured to perform decoding processing according to the offset parameter when decoding processing according to the MIP mode.

[0019] Embodiments of the present application provide an encoder, which comprises a first processor, a first memory storing instructions executable by the first processor, a first communication interface, and a first bus for connecting the first processor, the first memory, and the first communication interface, and when the instructions are executed by the first processor, the image encoding method as described above is implemented.

[0020] Embodiments of the present application provide a decoder, which comprises a second processor, a second memory storing instructions executable by the second processor, a second communication interface, and a second bus for connecting the second processor, the second memory, and the first communication interface, and when the instructions are executed by the second processor, the image decoding method as described above is implemented.

[0021] The embodiment of the present application provides a computer readable storage medium, which stores a program, and is applied to an encoder and a decoder, and the program is executed by a processor to realize the image coding method.

[0022] The embodiment of the present application provides an image coding method, an encoder, a decoder and a storage medium. The encoder modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers uniformly according to an offset parameter before performing the encoding processing according to the MIP mode; wherein the offset parameter is used to indicate the right shift number of the prediction value; and the encoding processing is performed according to the offset parameter when the encoding processing is performed according to the MIP mode. The decoder modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers uniformly according to an offset parameter before performing the decoding processing according to the MIP mode; and the decoding processing is performed according to the offset parameter when the decoding processing is performed according to the MIP mode. Therefore, the image coding method provided by the present application can modify the right shift number of the prediction value uniformly by using the offset parameter, so that all the luma blocks with different sizes and different MIP mode numbers have the same sW value, thereby reducing the complexity of the MIP algorithm, reducing the storage space and the overall time required in the coding process on the basis of ensuring the coding performance, and effectively improving the coding efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0023] Fig. 1 is a schematic diagram of the arrangement of 67 prediction modes in the intra prediction;

[0024] Fig. 2 is a schematic diagram of the flow of the encoding of the MIP mode;

[0025] Fig. 3 is a schematic diagram of the arrangement of the upper adjacent luma block and the left adjacent luma block of the current block;

[0026] Fig. 4 is a schematic diagram of the arrangement of the determination of the DM mode;

[0027] Fig. 5 is a schematic diagram of the structure of the video coding system;

[0028] Fig. 6 is a schematic diagram of the structure of the video decoding system;

[0029] Fig. 7 is a schematic diagram of the implementation flow of the image coding method provided by the embodiment of the present application;

[0030] Fig. 8 is a schematic diagram of the implementation flow of the image coding method provided by the embodiment of the present application;

[0031] Fig. 9 is a schematic diagram of the implementation flow of the image decoding method provided by the embodiment of the present application;

[0032] FIG. 10 is a schematic diagram of an implementation flow of an image decoding method according to an embodiment of the present application;

[0033] FIG. 11 is a schematic diagram of a structure of an encoder according to an embodiment of the present application;

[0034] FIG. 12 is a schematic diagram of a structure of an encoder according to an embodiment of the present application;

[0035] FIG. 13 is a schematic diagram of a structure of a decoder according to an embodiment of the present application;

[0036] FIG. 14 is a schematic diagram of a structure of a decoder according to an embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are only used to explain the related application, and not to limit the application. In addition, it should be noted that, for the convenience of description, only the parts related to the application are shown in the drawings.

[0038] In a video image, VVC accepts the affine linear weighted intra prediction technology (Affine Linear Weighted Intra Prediction) proposed in Joint Video Experts Team (JVET)-N0217, and is renamed as matrix-based intra prediction, i.e. MIP technology. This technology increases different numbers of matrix-based intra prediction modes in the intra-luminance prediction process for different sizes of intra-luminance coding blocks.

[0039] In order to capture finer edge directions presented in natural videos, the 33 intra-luminance prediction angle modes defined in High Efficiency Video Coding (HEVC) in VVC are extended to 65, and FIG. 1 is a schematic diagram of arrangement of 67 prediction modes in intra prediction. As shown in FIG. 1, the arrows numbered 2-66 represent 65 intra-angle prediction modes, and in addition, there are two non-angle modes, i.e. the Planar mode numbered 0 and the DC mode numbered 1. Therefore, the intra prediction process in VVC includes two non-angle modes and 65 angle modes. Here, the 67 prediction modes are referred to as traditional modes of intra prediction.

[0040] MIP is a neural network based intra prediction technique, i.e. using a multi-layer neural network to predict the luma value of a current block based on the neighboring reconstructed pixels. Specifically, the MIP technique divides the luma coding block into three categories according to the size of the luma coding block, assuming the size of the luma coding block is WxH, where W is the width parameter and H is the height parameter. The luma coding block can be divided into three categories according to the size of the luma coding block:

[0041] The luma coding block with the size of 4x4 is the first category of luma block, the luma coding block with the size of 8x4, 4x8 and 8x8 is the second category of luma block, and the luma coding block with other sizes is the third category of luma block.

[0042] For the three types of intra luma coding blocks, the MIP technique increases M MIP modes based on the 67 traditional intra prediction modes, where M=35 for the first category of luma block, M=19 for the second category of luma block, and M=11 for the third category of luma block.

[0043] Specifically, the MIP technique is only applied to intra luma prediction. Like the traditional mode, the input of MIP prediction is also the last row and the left column data of the current block, and the output is the prediction value of the current block. The specific prediction process consists of three steps: averaging, matrix-vector multiplication and interpolation. That is, by performing these three operations on the reconstructed luma values of the input adjacent pixels in the last row and the left column, the luma component prediction value of the current block can be obtained.

[0044] FIG. 2 is a flowchart of the MIP mode encoding process. As shown in FIG. 2, the specific implementation of the MIP mode for luma prediction is as follows:

[0045] Step 1: Perform averaging operation on the adjacent reference points above the current block to obtain vector bdry top , which has N values; perform averaging operation on the adjacent reference points to the left of the current block to obtain vector bdry left , which has N values. When the current block is the first category of luma coding, N=2; when the current block is the second or third category of luma coding, N=4. Vector bdry top and vector bdry left form a new vector bdry red and perform subsequent operations;

[0046] Step 2: Obtain the corresponding matrix A k and offset b k through the mode number k of the MIP mode, and obtain the partial prediction value of the current block as shown in FIG. 2 with cross lines through the following formula (1):

[0047] Pred red =A k ·bdryred +b k (1)

[0048] Third step: obtain the remaining prediction value Predred in the current block by linear interpolation.

[0049] It should be noted that, in the implementation process of encoding the current block, it is necessary to write which kind of encoding mode of the specific use of intra prediction into the compressed code stream, so that the decoding end can determine which kind of mode is used by analyzing the mode information, whether it is a traditional mode or a MIP mode; if it is a traditional mode, which kind of traditional mode; if it is a MIP mode, which kind of MIP mode.

[0050] In the intra prediction of VVC, the rate distortion cost RDcost of 67 traditional modes and M MIP modes is compared for each luminance coding block, and the optimal mode is selected and coded from the 67 traditional modes and M MIP modes. In order to save bit overhead, the intra mode coding technology based on the most probable mode list (MPM) is used in VVC.

[0051] It should be noted that, since the multi-reference line technology (extend reference line) and the intra sub-block partition technology (ISP) are only used for the modes in the MPM list, when extendrefflag and ispflag are both 0, i.e. 0 reference line is used and sub-block partition is not performed, mpmflag does not need to be coded, and the position of the optimal mode in the MPM list is directly coded.

[0052] Further, for the construction of the MPM list and the MIP MPM list, in the VVC luminance intra prediction, if the optimal mode selected for the current block is a traditional mode, a MPM list containing 6 most probable traditional modes needs to be constructed; if the optimal mode selected for the current block is a MIP mode, a MIP MPM list containing 3 most probable MIP modes needs to be constructed.

[0053] Fig. 3 is a schematic diagram of the arrangement of the upper adjacent luminance block and the left adjacent luminance block of the current block, as shown in Fig. 3, the above two lists are derived according to the optimal mode of the upper adjacent luminance block (A) and the left adjacent luminance block (L) of the current block as shown in Fig. 3.

[0054] Further, for the construction of MIP MPM list, in VVC intra prediction, if the optimal mode of the current block is MIP mode, it is necessary to construct MIP MPM list. In the process of constructing MIP MPM list, it is necessary to first obtain the MIP mode corresponding to the optimal mode of the upper adjacent luma block, that is, ABOVE MIP, and the MIP mode corresponding to the optimal mode of the left adjacent luma block, that is, LEFT MIP.

[0055] Further, after obtaining LEFT MIP and ABOVE MIP, the construction of MIP MPM list containing three most probable MIP MPM modes is carried out according to the following method, wherein the number in MIP MPM is the number of MIP mode, the number range is 0 to (M-1), for the first type of luma block, the number is 0-34; for the second type of luma block, the number is 0-18; for the third type of luma block, the number is 0-10:

[0056] If LEFT MIP is available (not -1), LEFT MIP is put into MIP MPM list;

[0057] If ABOVE MIP is available (not -1), ABOVE MIP is put into MIP MPM list after redundancy check;

[0058] If LEFT MIP is not available (is -1), ABOVE MIP is not available (is -1), according to the type of the current block, the default list is added to MIP MPM list after redundancy check until MIP MPM list is full:

[0059] The default list of the first type of luma block is {17, 34, 5};

[0060] The default list of the second type of luma block is {0, 7, 16};

[0061] The default list of the third type of luma block is {1, 4, 6}.

[0062] Further, it needs to be supplemented that in the process of VVC chroma intra prediction, there is a direct mode (DM) which utilizes the inter-component correlation, which uses the intra prediction mode of the center position of the same position luma coding block corresponding to the current block to perform intra prediction of the current chroma block. Fig. 4 is a schematic diagram of determining the arrangement of DM mode. As shown in Fig. 4, since MIP technology is only applied to luma coding blocks, when the intra prediction mode of the CR position in Fig. 4 is MIP mode, it is necessary to map the MIP mode to a traditional mode through a “MIP-traditional mapping table” to perform intra prediction of the current chroma block.

[0063] That is, due to the introduction of MIP technology, in the intra prediction process, in the construction of MIP MPM list, it is necessary to map the traditional mode to MIP mode, in the construction of MPM list and the determination of DM mode, it is necessary to map MIP mode to traditional mode.

[0064] Table 1

[0065]

[0066] In addition, in the MPM list construction process and the DM mode acquisition process, MIP mode to traditional mode mapping is needed. Specifically, 35 / 19 / 11 MIP modes are mapped to 67 traditional modes through "MIP-traditional mapping table". For three types of luminance blocks, three "MIP-traditional mapping tables" are shown in Table 2, Table 3 and Table 4.

[0067] Table 2

[0068] MIP mode 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 traditional mode 0 1 8 1 8 0 1 2 0 1 8 1 8 1 2 1 8 1 8 1 8 0

[0069] Table 3

[0070] MIP mode 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 traditional mode 0 1 0 1 0 2 1 8 1 0 1 0 4 5 0 1 0 5 0 5 0

[0071] Table 4

[0072] MIP mode 0 1 2 3 4 5 6 7 8 9 traditional mode 1 1 1 1 1 8 0 1 0 1 5 0 0

[0073] FIG. 5 is a structural diagram of a video encoding system, as shown in FIG. 5, the video encoding system 100 includes components such as 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 filter and sample adaptive offset (SAO) filter module 108, a header information encoding and context-based adaptive binary arithmatic coding (CABAC) encoding module 109, and a decoded picture buffer module 110. FIG. 6 is a structural diagram of a video decoding system, as shown in FIG. 6, the video decoding system 200 includes components such as a header information 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 filter and SAO filter module 205, and a decoded picture buffer module 206. A video image is processed by the transform and quantization module 101, the intra estimation module 102, the intra prediction module 103, the motion compensation module 104, the motion estimation module 105, the deblocking filter and SAO filter module 108, and the header information encoding and CABAC module 109 in the video encoding system 100, and a bitstream of the video image is output. The bitstream is input into the video decoding system 200, and is processed by the header information decoding and CABAC decoding module 201, the inverse transform and inverse quantization module 202, the intra prediction module 203, and the motion compensation module 204 in the video decoding system 200, and finally the original video image is recovered.

[0074] According to the height parameter and the width parameter, the current block can be 25 sizes, specifically, the standard specifies that the maximum size of a luma block is 128x128, but since the maximum size of a transform unit is 64x64, that is, a luma block must be divided by a quadtree when the size is 128x128, therefore the maximum size of a luma block is 64x64. Table 5 is a size table of a luma block, as shown in Table 5,

[0075] Table 5

[0076] (4x4) (4x8) (4x16) (4x32) (4x64) (8x4) (8x8) (8x16) (8x32) (8x64) (16x4) (16x8) (16x16) (16x32) (16x64) (32x4) (32x8) (32x16) (32x32) (32x64) (64x4) (64x8) (64x16) (64x32) (64x64)

[0077] In the prior art, MIP mode is limited according to 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 encoded by MIP mode, and Table 6 is the limitation of the size of the luma block in the MIP mode in the prior art, as shown in Table 6,

[0078] Table 6

[0079]

[0080] In the prior art, in the first type of luma block in the MIP mode (corresponding to a 4x4 luma block), two upper adjacent and left adjacent luma blocks are generated by matrix operation to generate a 4x4 prediction block; in the second type of luma block in the MIP mode (corresponding to 4x8, 8x4, 8x8 luma blocks), four upper adjacent and left adjacent luma blocks are generated by matrix operation to generate a 4x4 prediction block; in the third type of luma block in the MIP mode (corresponding to other size luma blocks), four upper adjacent and left adjacent luma blocks are generated by matrix operation to generate a 4x8 prediction block (4x16 luma block), 8x4 prediction block (16x4 luma block) or 8x8 prediction block (other size luma block). Among them, since the third type of luma block will generate a non-square prediction block, the odd rows of the matrix need to be extracted when calculating.

[0081] Further, in the syntax, MIP application categories can be represented by MipSizeId, the number of MIP modes is represented by numModes, the number of luma blocks of the upper reference row or the left reference column obtained by downsampling is represented by boundarySize, the width parameter of the prediction block is represented by predW, the height parameter of the prediction block is represented by predH, and the side length of the MIP matrix is represented by predC. Table 7 is the syntax relationship corresponding to the MIP mode in the prior art, as shown in Table 7, MipSizeId, numModes, boundarySize, predW, predH, and predC in the syntax have the following relationships:

[0082] Table 7

[0083] MipSizeIdnumModesboundarySizepredWpredHpredC035244411944442114Min(nTbW, 8)Min(nTbH, 8)8

[0084] Further, in the syntax, MipSizeId takes value 0 to represent 4x4 luma block, takes value 1 to represent 4x8, 8x4, 8x8 luma block, takes value 2 to represent other size luma block. numModes represents how many MIP prediction modes there are in total, i.e. 35 for 4x4 luma block, 19 for 4x8, 8x4, 8x8 luma block, 11 for other size luma block. boundarySize represents whether the neighboring luma block above or left of the current block is finally downsampled into 2 or 4 neighboring luma blocks.

[0085] In the prior art, when the encoder performs luma prediction by MIP mode, it can be performed by the following formula (2):

[0086]

[0087] wherein mWeight and vBias are weight matrix and bias matrix of each MIP mode trained by deep learning, specifically, mWeight is weight matrix of each type of MIP mode, and vBias is bias matrix of each type of MIP mode. sB is the left shift amount of the bias matrix, oW is the rounding reserve value, sW is the right shift amount of the overall prediction value, and sW value under different MIP modes needs to be obtained by table lookup.

[0088] Based on JVET-N1001-v7, when generating the prediction matrix of MIP, the encoder judges whether the prediction value of the odd row needs to be extracted by variables incW and incH, specifically:

[0089] oW = 1 << (sW - 1)

[0090] sB = BitDepth Y -1

[0091] mipW = isTransposed? predH : predW

[0092] mipH = isTransposed? predW : predH

[0093] incW = (predC > mipW)? 2 : 1

[0094] incH = (predC > mipH)? 2 : 1

[0095] Wherein, incW = 2 or incH = 2 represents that extraction needs to be performed on the width parameter or the height parameter.

[0096] Table 8 is a syntax description of sW in the prior art. As shown in Table 8, sW is equal to 9 only when MipSizeId is equal to 1, i.e. the current block size is 4x8, 8x4, 8x8, and the MIP mode number is 3, 8, 12, 17, and sW is equal to 8 for all other MIP modes. 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.

[0097] Table 8

[0098]

[0099] Table 9 is the mWeight matrix when MipSizeId is 1, the MIP mode number is 3 and 12.

[0100] Table 9

[0101] 218-569-3411-7612-444894-45623-152-3-147677-34-5-21-31-16466615-41-3-382-30260358-778122-391-1463-25-11-240554-415121-332-610740216-123-41-65-1-10-62267375-73-253-4-1108466-28-1158-25-3-141896-35-330118-155229-21-4-7-1-3-2-224-9529129731-5-2-30103464-29-160-604142970-1327-5-21303193-13-1

[0102] Table 10 is the vBias matrix when MipSizeId is 1, the MIP mode number is 3 and 12.

[0103] Table 10

[0104] 1231133324443555

[0105] Table 11 is the mWeight matrix when MipSizeId is 1, the MIP mode number is 8 and 17. Table 12 is the vBias matrix when MipSizeId is 1, the MIP mode number is 8 and 17.

[0106] Table 11

[0107] - 9123138 209261724-26-22 1413883061 1435-16 18-16 53132713539-11 1130-19 3251424112-41 1-14 7322726310-3-56 3124934185-91 021426237-11 14-71 520825940504-46 9234078461-56 113329752132-86 123319751136-10 913630374614-58 382172524101-79 583131413124-81 703271142144-71 482314110

[0108] Table 12

[0109] -7-10-11-11-10-14-17-18-11-15-19-21-10-17-21-22

[0110] It is just because of the different syntax description of sW in different MIP modes as shown in Table 8 that the value of sW is different from other modes when the MipSizeId of the current block is 1, i.e. the current block is the second type of luminance block (the luminance block with the size of 4x8, 8x4, 8x8), and the MIP mode number corresponding to the current coding block is 3, 8, 12, 17 mode, which causes the algorithm to be not unified, and the process of querying the above Table 8 increases the time complexity of the algorithm, and the storage of Table 8 also needs to occupy the storage space. That is, when the luminance prediction is performed by the MIP mode, the parameters used by the luminance blocks with different sizes may also be different, so a large storage space is needed to store a large number of parameters, and the searching and calling of the parameters in the prediction process also increases the overall time, thereby reducing the coding efficiency.

[0111] In order to solve the above problems, the present application provides an image coding method, by modifying the value of sW when the second type of luminance block is in the MIP mode number of 3, 8, 12, 17, so that the value of sW in all MIP mode numbers is the same, thereby reducing the storage space and reducing the overall time by omitting the table lookup operation.

[0112] Further, the image coding method provided by the present application can affect the intra prediction part in the video coding hybrid framework, i.e. mainly applied to the intra prediction module 103 in the video coding and the intra prediction module 203 in the video decoding, which simultaneously acts on the encoding end and the decoding end.

[0113] It should be noted that in the embodiments of the present application, based on the calculation parameters trained by the machine learning method, the image coding method proposed in the present application can uniformly modify sW according to the fixed offset parameter, and simultaneously modify the corresponding weight matrix and bias matrix. In the present application, the modification of the value of sW when the MIP mode number of the second type of luminance block is 3, 8, 12, and 17 is not limited, but the different values of sW obtained by the machine learning method are uniformly modified after the specific parameters (including different combinations of size, mode, right shift value, etc.) are changed.

[0114] Further, in the following embodiments, the value of sW when the MIP mode number of the second type of luminance block is 3, 8, 12, and 17 is taken as an example to illustrate the image coding method proposed in the present application.

[0115] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.

[0116] In an embodiment of the present application, FIG. 7 is a schematic diagram of the implementation process of an image coding method proposed in the embodiment of the present application, as shown in FIG. 7, in the embodiments of the present application, the method of the encoder for image coding can include the following steps.

[0117] Step 101, before coding processing according to the MIP mode, uniformly modify the initial right shift parameter corresponding to different sizes and different MIP mode numbers according to the offset parameter; wherein the offset parameter is used to indicate the right shift number of the prediction value.

[0118] In the embodiments of the present application, before coding processing according to the MIP mode, the encoder can first set the offset parameter used to indicate the offset number.

[0119] It should be noted that in the embodiments of the present application, based on the above formula (2), the offset parameter is sW in formula (2), that is, the offset parameter is the right shift number of the overall prediction value, that is, when predicting the luminance of the current block, the offset parameter is used to indicate the right shift number of the overall prediction value of the current block.

[0120] Further, in the embodiments of the present application, the encoder can set the offset parameter to a fixed positive integer before coding processing according to the MIP mode. That is, after the encoder sets the offset parameter, for any current block, no matter what the size of the current block is, or no matter what the MIP mode number corresponding to the current block is, the offset parameter used is determined.

[0121] It should be noted that in the embodiments of the present application, the encoder can set the offset parameter as any positive integer when uniformly modifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter. Specifically, the encoder can preferably set the offset parameter sW as 6, or preferably set the offset parameter sW as 7, or preferably set the offset parameter sW as 8, and can also preferably set the offset parameter sW as 9.

[0122] For example, Table 13 is a syntax description one of sW in the present application. In the embodiments of the present application, when uniformly modifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for the luma block with the size of 4x8, 8x4 or 8x8 and the MIP mode number of 3, 8, 12 or 17, the encoder can set the corresponding sW as the same value as that of other luma blocks, i.e., when the sW corresponding to other luma blocks is 8, the sW corresponding to the luma block with the size of 4x8, 8x4 or 8x8 and the MIP mode number of 3, 8, 12 or 17 is set as 8, so that different current blocks can have the same offset parameter sW.

[0123] Table 13

[0124]

[0125] For example, Table 14 is a syntax description two of sW in the present application. In the embodiments of the present application, when uniformly modifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for the luma block with the size of 4x8, 8x4 or 8x8 and the MIP mode number of 3, 8, 12 or 17, the encoder can set the corresponding sW as the same value as that of other luma blocks, i.e., when the sW corresponding to other luma blocks is 7, the sW corresponding to the luma block with the size of 4x8, 8x4 or 8x8 and the MIP mode number of 3, 8, 12 or 17 is set as 7, so that different current blocks can have the same offset parameter sW.

[0126] Table 14

[0127]

[0128] For example, Table 15 is a syntax description table of sW in the present application. In the embodiments of the present application, when the encoder unifies and modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for the luma block with size of 4x8, 8x4 or 8x8 and MIP mode number of 3, 8, 12 or 17, the corresponding sW can be set to the same value as the sW corresponding to other luma blocks, i.e. when the sW corresponding to other luma blocks is 8, the sW corresponding to the luma block with size of 4x8, 8x4 or 8x8 and MIP mode number of 3, 8, 12 or 17 is set to 8, so that different current blocks can have the same offset parameter sW.

[0129] Table 15

[0130]

[0131] As shown in Table 8, in the prior art, the offset parameter sW corresponding to different current blocks can be different, specifically, when and only when MipSizeId is equal to 1, i.e. the current block is a second type luma block with size of 4x8, 8x4 or 8x8 and MIP mode number of 3, 8, 12 or 17, the value of sW is different from the value of sW under all other MIP mode numbers. Therefore, when encoding the current block, the encoder needs to query and call the offset parameter sW according to the size and MIP mode number of the current block, which increases the overall time and reduces the coding efficiency. At the same time, since the syntax description table of sW needs to be stored, the storage space is also increased. Compared with the prior art, before encoding processing according to the MIP mode, the present application can first set the offset parameter sW, and set the offset parameter sW corresponding to all luma blocks with different sizes and different MIP mode numbers to the same value, so that when encoding the current block, the query and call of the offset parameter sW according to the size and MIP mode number of the current block is no longer needed, and the encoder also does not need to store the syntax description table of sW, thereby being able to reduce the storage space and overall time required in the coding process, and effectively improve the coding efficiency.

[0132] It should be noted that in the embodiments of the present application, although the encoder sets the offset parameter sW to the same value for all offset parameters sW corresponding to different sizes and different MIP mode numbers when setting the offset parameter sW, since the value of sW is different from the value of sW corresponding to all other MIP mode numbers only when MipSizeId is equal to 1, i.e., the current block is a second type of luma block, the size is 4x8, 8x4, 8x8, and the MIP mode number is 3, 8, 12, 17, the encoder sets the offset parameter sW corresponding to the size of 4x8, 8x4, 8x8, and the MIP mode number of 3, 8, 12, 17 when modifying the initial right shift parameter corresponding to different sizes and different MIP mode numbers by the offset parameter.

[0133] Therefore, in the embodiments of the present application, the process of the encoder modifying the initial right shift parameter corresponding to different sizes and different MIP mode numbers by the offset parameter is to modify the initial right shift parameter to the offset parameter when the initial right shift parameter and the offset parameter are different, so that the right shift number of all prediction values corresponding to all sizes and all MIP mode numbers is the same.

[0134] Step 102, when encoding according to the MIP mode, encoding according to the offset parameter.

[0135] In the embodiments of the present application, after the encoder modifies the initial right shift parameter corresponding to different sizes and different MIP mode numbers by the offset parameter, when the encoder encodes according to the MIP mode, the encoder can encode based on the set offset parameter.

[0136] It should be noted that in the embodiments of the present application, after the encoder sets the offset parameter, when the encoder encodes according to the MIP mode, the encoder can directly encode the current block according to the offset parameter. Thus, the storage space and the overall time required in the encoding and decoding process can be reduced on the basis of ensuring the coding and decoding performance, and the coding and decoding efficiency can be effectively improved.

[0137] In the embodiments of the present application, further, FIG. 8 is a schematic diagram of the implementation process of an image encoding method according to an embodiment of the present application, as shown in FIG. 8, after the encoder modifies the initial right shift parameter corresponding to different sizes and different MIP mode numbers by the offset parameter, i.e., after step 101, the method of the encoder for image encoding can further include the following steps:

[0138] In step 103, the initial weight matrix and the initial bias matrix are modified according to a preset calculation rule to obtain a modified weight matrix and a modified bias matrix; the initial weight matrix and the initial bias matrix correspond to the initial right shift parameter that is uniformly modified.

[0139] In the embodiments of the present application, after the initial right shift parameters corresponding to different sizes and different MIP mode numbers are uniformly modified according to the offset parameter, the initial weight matrix and the initial bias matrix can be modified according to the preset calculation rule, so that the modified weight matrix and the modified bias matrix can be obtained.

[0140] It should be noted that in the embodiments of the present application, the initial weight matrix and the initial bias matrix correspond to the initial right shift parameter that is uniformly modified.

[0141] It should be noted that in the embodiments of the present application, the preset calculation rule can be used to update the corresponding initial weight matrix and the initial bias matrix when the size is 4x8, 8x4 or 8x8, and the MIP mode number is 3, 8, 12 or 17.

[0142] Further, in the embodiments of the present application, after the offset parameter is set, that is, the offset parameter corresponding to the size of 4x8, 8x4 or 8x8, and the MIP mode number of 3, 8, 12 or 17 is changed, in order to prevent the coding performance from being reduced, the corresponding initial weight matrix and the initial bias matrix can be further updated to obtain the modified weight matrix and the modified bias matrix.

[0143] It should be noted that in the embodiments of the present application, when the size is 4x8, 8x4 or 8x8, and the MIP mode number is 3, 8, 12 or 17, the encoder can update the corresponding initial weight matrix and initial bias matrix in multiple different ways when obtaining the modified weight matrix and the modified bias matrix according to the pre-designed calculation rule. For example, when the size is 4x8, 8x4 or 8x8, 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 according to the down rounding calculation rule, and at the same time update any element value B in the initial bias matrix to B / 2, so as to obtain the modified weight matrix and the modified bias matrix. Wherein, A and B are integers. Further, the encoder can also update any element value A in the initial weight matrix to A / 2 according to the up rounding calculation rule, and at the same time update any element value B in the initial bias matrix to B / 2, so as to obtain the modified weight matrix and the modified bias matrix. Further, the encoder can also update any element value A in the initial weight matrix to A / 2 according to the rounding calculation rule, and at the same time update any element value B in the initial bias matrix to B / 2, so as to obtain the modified weight matrix and the modified bias matrix.

[0144] Step 104, performing encoding processing according to the offset parameter, the modified weight matrix and the modified bias matrix.

[0145] In the embodiments of the present application, when the encoder performs encoding processing according to the MIP mode, the encoding processing can be performed based on the set offset parameter, the modified weight matrix and the modified bias matrix.

[0146] It should be noted that in the embodiments of the present application, after the encoder sets the offset parameter, in order to prevent the decrease of the coding performance, the corresponding initial weight matrix and initial bias matrix are updated to obtain the modified weight matrix and the modified bias matrix, and then when the encoding processing is performed according to the MIP mode, the current block can be encoded and processed according to the offset parameter, the modified weight matrix and the modified bias matrix. Thus, the storage space and the overall time required in the encoding and decoding process can be reduced on the basis of ensuring the coding performance, and the coding efficiency can be effectively improved.

[0147] It should be noted that in the embodiments of the present application, after the encoder sets the offset parameter, the current block can also be encoded and processed directly according to the offset parameter, the initial weight matrix and the initial bias matrix. That is, after the encoder completes the setting of the offset parameter, the corresponding initial weight matrix and initial bias matrix can also not be updated.

[0148] In the prior art, when the current block is predicted by the MIP mode, the number of bits to be right shifted is not uniform, that is, the offset parameter sW is not the same, and the image coding method provided in the present application uniformly sets the offset parameter, so that the implementation of the MIP mode is more simple and uniform. Further, because the offset parameter sW is not the same in the prior art, a sW table representing the number of bits to be right shifted needs to be stored, and in the calculation process, the sW corresponding to the current block is queried and called to determine the number of bits to be right shifted in the MIP calculation of the prediction value. However, because the offset parameter is uniformly set in the image coding method provided in the present application, the sW table representing the number of bits to be right shifted no longer needs to be stored, thereby saving storage space and eliminating the processing flow of querying and calling sW.

[0149] Further, in the embodiments of the present application, after the offset parameter is set, the corresponding initial weight matrix and initial bias matrix can also be updated, so that the coding and decoding performance is not obviously lost. Specifically, according to the VVC test standard, the BD-rate on Y, U and V is 0.00%, -0.02% and -0.02% respectively, and the results at 24 frame intervals are expected to be similar to the coding and decoding performance at 8 frame intervals.

[0150] The image coding method provided in the embodiments of the present application uniformly modifies the initial right shift parameter corresponding to different sizes and different MIP mode numbers according to the offset parameter before the encoder performs coding processing according to the MIP mode; wherein the offset parameter is used to indicate the number of bits to be right shifted in the prediction value; and when coding processing is performed according to the MIP mode, the coding processing is performed according to the offset parameter. As can be seen, the image coding and decoding method provided in the present application uniformly modifies the number of bits to be right shifted in the prediction value by using the offset parameter, so that all the Y blocks of different sizes and different MIP mode numbers have the same sW value, thereby eliminating the need to query and call sW value when coding and decoding processing is performed, reducing the complexity of the MIP algorithm, and reducing the storage space and overall time required in the coding and decoding process on the basis of ensuring the coding and decoding performance, thereby effectively improving the coding and decoding efficiency.

[0151] Based on the above embodiments, 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 of the encoder for obtaining the modified weight matrix and the modified bias matrix according to the pre-designed calculation rule can include the following steps:

[0152] Step 103a, according to the calculation rule of taking the integer part, the values of all elements in the initial weight matrix are modified to the same binary order of magnitude as the values of other weight matrix elements, to obtain the modified weight matrix.

[0153] Step 103b, according to the down-round calculation rule, modifying all elements in the initial bias matrix to the value of the same binary order of magnitude as the value of other bias matrix elements, to obtain the modified bias matrix.

[0154] In the embodiments of the present application, when the size is 4x8, 8x4 or 8x8, and the MIP mode number is 3, 8, 12 or 17, the encoder can modify all element values in the initial weight matrix to the value of the same binary order of magnitude as the value of other weight matrix elements according to the down-round calculation rule, and modify all elements in the initial bias matrix to the value of the same binary order of magnitude as the value of other bias matrix elements, so as to obtain the modified weight matrix and the modified bias matrix.

[0155] Based on the above Table 9, Table 16 is the modified weight matrix when MipSizeId is 1, 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 down-round calculation rule, thereby obtaining the modified weight matrix when MipSizeId is 1, the MIP mode number is 3 and 12.

[0156] Table 16

[0157] 109-284-2205-386-222447-23311-81-2-123838-17-3-10-20-8233302-20-2-191-20130179-39461-200-1231-13-6-120227-21260-171-3532018-61-20-32-1-10-31133187-37-131-2-154233-14-629-13-2-120948-18-21509-82114-11-2-4-1-2-1-112-4814514810-3-1-1551232-15-80-302021435-713-3-1015196-7-1

[0158] Based on the above Table 10, Table 17 is the modified bias matrix when MipSizeId is 1, the MIP mode number is 3 and 12, as shown in Table 17, the encoder updates each element value B in Table 10 to B / 2 according to the down-round calculation rule, thereby obtaining the modified bias matrix when MipSizeId is 1, the MIP mode number is 3 and 12.

[0159] Table 17

[0160] 0110011112221222

[0161] Based on the above Table 11, Table 18 is the modified weight matrix when MipSizeId is 1 and MIP mode number is 8 and 17. As shown in Table 18, the encoder updates each element value A in Table 11 to A / 2 according to the down-rounding calculation rule, thereby obtaining the modified weight matrix when MipSizeId is 1 and MIP mode number is 8 and 17.

[0162] Table 18

[0163] -4 -5 -6 -6 -5 -7 -9 -9 -6 -8 -10 -11 -5 -9 -11 -11

[0164] Based on the above Table 12, Table 19 is the modified bias matrix when MipSizeId is 1 and MIP mode number is 8 and 17. As shown in Table 22, the encoder updates each element value B in Table 12 to B / 2 according to the down-rounding calculation rule, thereby obtaining the modified bias matrix when MipSizeId is 1 and MIP mode number is 8 and 17.

[0165] Table 19

[0166] -4 -5 -6 -6 -5 -7 -9 -9 -6 -8 -10 -11 -5 -9 -11 -11

[0167] In the embodiments of the present application, further, 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 the modified weight matrix and the modified bias matrix according to the pre-designed calculation rule can include the following steps:

[0168] Step 103c, modifying all element values in the initial weight matrix to the value of the same binary order of magnitude as other weight matrix element values according to the up-rounding calculation rule, to obtain the modified weight matrix.

[0169] Step 103d, modifying all elements in the initial bias matrix to the value of the same binary order of magnitude as other bias matrix element values according to the up-rounding calculation rule, to obtain the modified bias matrix.

[0170] In the embodiments of the present application, when the size is 4x8, 8x4 or 8x8, and the MIP mode number is 3, 8, 12 or 17, the encoder can modify all element values in the initial weight matrix to values of the same binary order of magnitude as other weight matrix element values according to the rounding-up calculation rule, and modify all elements in the initial bias matrix to values of the same binary order of magnitude as other bias matrix element values, so as to obtain the modified weight matrix and the modified bias matrix.

[0171] Based on the above Table 9, Table 20 is the modified 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-up calculation rule, so as to obtain the modified weight matrix when MipSizeId is 1, and the MIP mode number is 3 and 12.

[0172] Table 20

[0173] 109-285-1206-386-222447-22312-71-1023839-17-2-11-11-8233313-21-1-191-10130179-38461-1910232-12-5-120327-20361-161-3542018-62-21-33000-31134188-36-122-2054233-14-529-12-1020948-17-11519-73115-10-2-30-1-1-112-4714614921-2-1-1552232-14-80-302121535-614-2-1115297-60

[0174] Based on the above Table 10, Table 21 is the modified bias matrix when MipSizeId is 1, and the MIP mode number is 3 and 12. As shown in Table 21, the encoder updates each element value B in Table 10 to B / 2 according to the rounding-up calculation rule, so as to obtain the modified bias matrix when MipSizeId is 1, and the MIP mode number is 3 and 12.

[0175] Table 21

[0176] 1121122212222333

[0177] Based on the above Table 11, Table 22 is the modified weight matrix when MipSizeId is 1, MIP mode number is 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-up calculation rule, thereby obtaining the modified weight matrix when MipSizeId is 1, MIP mode number is 8 and 17.

[0178] Table 22

[0179] -4 5 2 7 4 5 1 3 1 3 6 1 2 -13 -11 7 7 4 1 5 3 5 7 1 8 -89 -83 1 6 4 6 8 2 0 -56 15 -92 1 6 3 7 1 2 1 6 -21 7 1 3 7 1 4 1 3 2 5 -1 -23 1 1 6 2 5 1 7 4 3 -45 1 0 7 1 3 1 9 0 6 2 -38 1 0 4 1 3 0 2 0 3 0 2 -23 4 6 1 7 0 9 2 3 1 -23 5 7 1 6 5 8 1 7 3 -43 6 2 1 6 0 3 8 1 7 3 -55 6 8 1 5 7 2 3 6 2 -46 3 5 6 1 4 5 7 1 7 2 -37 4 1 1 5 7 5 5

[0180] Based on the above Table 12, Table 23 is the modified bias matrix when MipSizeId is 1, MIP mode number is 8 and 17. As shown in Table 23, the encoder updates each element value B in Table 12 to B / 2 according to the rounding-up calculation rule, thereby obtaining the modified bias matrix when MipSizeId is 1, MIP mode number is 8 and 17.

[0181] Table 23

[0182] -3 -5 -5 -5 -5 -7 -8 -9 -5 -7 -9 -10 -5 -8 -10 -11

[0183] In the embodiments of the present application, further, 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 the modified weight matrix and the modified bias matrix according to the pre-designed calculation rule can include the following steps:

[0184] Step 103e, modifying all element values in the initial weight matrix to values of the same binary order of magnitude as other weight matrix element values according to the rounding calculation rule, to obtain the modified weight matrix.

[0185] Step 103f, modifying all elements in the initial bias matrix to values of the same binary order of magnitude as other bias matrix element values according to the rounding calculation rule, to obtain the modified bias matrix.

[0186] In the embodiments of the present application, when the size is 4x8, 8x4 or 8x8, and the MIP mode number is 3, 8, 12 or 17, the encoder can modify all element values in the initial weight matrix to values of the same binary order of magnitude as other weight matrix element values according to the rounding calculation rule, and modify all elements in the initial bias matrix to values of the same binary order of magnitude as other bias matrix element values, so as to obtain the modified weight matrix and the modified bias matrix.

[0187] Based on the above Table 9, Table 24 is the modified 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, so as to obtain the modified weight matrix when MipSizeId is 1, and the MIP mode number is 3 and 12.

[0188] Table 24

[0189] 109-285-2206-386-222447-23312-81-2-123839-17-3-11-21-8233313-21-2-191-20130179-39461-201-1232-13-6-120327-21361-171-3542018-62-21-33-1-10-31134188-37-132-2-154233-14-629-13-2-120948-18-21519-83115-11-2-4-1-2-1-112-4814614921-3-1-1552232-15-80-302121535-714-3-1115297-7-1

[0190] Based on the above Table 10, Table 25 is the modified bias matrix when MipSizeId is 1, and the MIP mode number is 3 and 12. As shown in Table 25, the encoder updates each element value B in Table 10 to B / 2 according to the rounding calculation rule, so as to obtain the modified bias matrix when MipSizeId is 1, and the MIP mode number is 3 and 12.

[0191] Table 25

[0192] 1121122212222333

[0193] Based on the above table 11, table 26 is the modified weight matrix when MipSizeId is 1, MIP mode number is 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, thereby obtaining the modified weight matrix when MipSizeId is 1, MIP mode number is 8 and 17.

[0194] Table 26

[0195] -4-5-6-6-5-7-9-9-6-8-10-11-5-9-11-11

[0196] Based on the above table 12, table 27 is the modified offset matrix when MipSizeId is 1, MIP mode number is 8 and 17, as shown in table 30, the encoder updates each element value B in table 12 to B / 2 according to the rounding calculation rule, thereby obtaining the modified offset matrix when MipSizeId is 1, MIP mode number is 8 and 17.

[0197] Table 27

[0198] -4-5-6-6-5-7-9-9-6-8-10-11-5-9-11-11

[0199] The image coding method provided in the embodiments of the present application, the encoder modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter before encoding processing according to the MIP mode; wherein the offset parameter is used to indicate the right shift number of the prediction value; and during the encoding processing according to the MIP mode, the encoding processing is performed according to the offset parameter. It can be seen that the image coding and decoding method provided in the present application modifies the right shift number of the prediction value by using the offset parameter, so that all the luminance blocks of different sizes and different MIP mode numbers have the same sW value, thereby during the coding and decoding processing, the sW value does not need to be queried and called, the complexity of the MIP algorithm can be reduced, the storage space and the overall time required in the coding and decoding process can be reduced on the basis of ensuring the coding and decoding performance, and the coding and decoding efficiency can be effectively improved.

[0200] In another embodiment of the present application, FIG. 9 is a schematic flow diagram of an implementation of an image decoding method according to an embodiment of the present application. As shown in FIG. 9, in an embodiment of the present application, the method of image decoding performed by the decoder can include the following steps.

[0201] In step 201, before decoding processing according to the MIP mode, the initial right shift parameters corresponding to different sizes and different MIP mode numbers are uniformly modified according to an offset parameter; wherein the offset parameter is used to indicate the right shift number of the prediction value.

[0202] In an embodiment of the present application, before decoding processing according to the MIP mode, the decoder can first set the offset parameter used to indicate the offset number.

[0203] It should be noted that in an embodiment of the present application, based on the above formula (2), the offset parameter is sW in formula (2), that is, the offset parameter is the right shift amount of the overall prediction value. That is, when performing brightness prediction on the current block, the offset parameter is used to indicate the right shift number of the overall prediction value of the current block.

[0204] Further, in an embodiment of the present application, the decoder can set the offset parameter to a fixed positive integer before decoding processing according to the MIP mode. That is, after the decoder sets the offset parameter, for any current block, no matter what the size of the current block is, or no matter what the MIP mode number corresponding to the current block is, the offset parameter used is determined.

[0205] It should be noted that in an embodiment of the present application, when the decoder uniformly modifies 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, or preferably set the offset parameter sW to 9.

[0206] In the prior art, the offset parameter sW corresponding to different current blocks can be different. Specifically, the value of sW is different from the value of sW under all other MIP mode numbers only when MipSizeId is equal to 1, that is, the current block is a second type of luminance block, the size is 4*8, 8*4, 8*8, and the MIP mode number is 3, 8, 12, and 17. Therefore, when decoding the current block, the decoder needs to query and call the offset parameter sW according to the size and MIP mode number of the current block, thereby increasing the overall time and reducing the coding efficiency. At the same time, since the syntax description table of sW needs to be stored, the storage space is also increased. Compared with the prior art, the present application can set the offset parameter sW before decoding processing according to the MIP mode. The offset parameters sW corresponding to all luminance blocks of different sizes and different MIP mode numbers are all set to the same value. Therefore, when decoding the current block, the offset parameter sW no longer needs to be queried and called according to the size and MIP mode number of the current block, and the decoder also does not need to store the syntax description table of sW, thereby reducing the storage space and the overall time required in the coding process, and effectively improving the coding efficiency.

[0207] It should be noted that in the embodiments of the present application, although the decoder sets the offset parameter sW to the same value corresponding to different sizes and different MIP mode numbers, since the value of sW is different from the value of sW under all other MIP mode numbers only when MipSizeId is equal to 1, that is, the current block is a second type of luminance block, the size is 4*8, 8*4, 8*8, and the MIP mode number is 3, 8, 12, and 17, therefore, when the decoder uniformly modifies the initial right shift parameter corresponding to different sizes and different MIP mode numbers according to the offset parameter sW, the offset parameter sW corresponding to the size of 4*8, 8*4, 8*8, and the MIP mode number of 3, 8, 12, and 17 is set.

[0208] Therefore, in the embodiments of the present application, the process of uniformly modifying the initial right shift parameter corresponding to different sizes and different MIP mode numbers according to the offset parameter sW is that when the initial right shift parameter and the offset parameter are different, the initial right shift parameter is modified to the offset parameter, so that the right shift number of all prediction values corresponding to all sizes and all MIP mode numbers is the same.

[0209] Step 202, when decoding processing according to the MIP mode, decoding processing is performed according to the offset parameter.

[0210] In the embodiments of the present application, after the decoder uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, the decoder can perform decoding processing based on the set offset parameter when performing decoding processing according to the MIP mode.

[0211] It should be noted that in the embodiments of the present application, after the decoder sets the offset parameter, the decoder can directly decode the current block according to the offset parameter when performing decoding processing according to the MIP mode. Thus, the storage space and the overall time required in the encoding and decoding process can be reduced on the basis of ensuring the coding performance, and the coding efficiency can be effectively improved.

[0212] In the embodiments of the present application, further, FIG. 10 is a schematic diagram of the implementation flow of an image decoding method according to an embodiment of the present application. As shown in FIG. 10, after the decoder uniformly modifies 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 of the decoder for image decoding can further include the following steps:

[0213] Step 203: modifying the initial weight matrix and the initial bias matrix according to a pre-designed calculation rule to obtain a modified weight matrix and a modified bias matrix; wherein the initial weight matrix and the initial bias matrix correspond to the uniformly modified initial right shift parameter.

[0214] In the embodiments of the present application, after the decoder uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, the decoder can modify the initial weight matrix and the initial bias matrix according to a pre-designed calculation rule, so as to obtain a modified weight matrix and a modified bias matrix.

[0215] It should be noted that in the embodiments of the present application, the initial weight matrix and the initial bias matrix correspond to the uniformly modified initial right shift parameter.

[0216] It should be noted that in the embodiments of the present application, the pre-designed calculation rule can be used to update the corresponding initial weight matrix and the initial bias matrix when the size is 4x8, 8x4 or 8x8, and the MIP mode number is 3, 8, 12 or 17.

[0217] Further, in the embodiments of the present application, after the decoder sets the offset parameter, that is, changes the offset parameter corresponding to the size of 4x8, 8x4 or 8x8, and the MIP mode number of 3, 8, 12 or 17, in order to prevent the coding performance from being reduced, the corresponding initial weight matrix and the initial bias matrix can be further updated to obtain a modified weight matrix and a modified bias matrix.

[0218] It should be noted that in the embodiments of the present application, when the size is 4x8, 8x4 or 8x8, and the MIP mode number is 3, 8, 12 or 17, the decoder can update the corresponding initial weight matrix and initial bias matrix in multiple different ways when obtaining the modified weight matrix and the modified bias matrix according to the pre-designed calculation rule. For example, when the size is 4x8, 8x4 or 8x8, 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 according to the down rounding calculation rule, and at the same time update any element value B in the initial bias matrix to B / 2, so as to obtain the modified weight matrix and the modified bias matrix. Wherein, A and B are integers. Further, the decoder can also update any element value A in the initial weight matrix to A / 2 according to the up rounding calculation rule, and at the same time update any element value B in the initial bias matrix to B / 2, so as to obtain the modified weight matrix and the modified bias matrix. Further, the decoder can also update any element value A in the initial weight matrix to A / 2 according to the rounding calculation rule, and at the same time update any element value B in the initial bias matrix to B / 2, so as to obtain the modified weight matrix and the modified bias matrix.

[0219] Step 204, decoding processing is performed according to the offset parameter, the modified weight matrix and the modified bias matrix.

[0220] In the embodiments of the present application, when the decoder performs decoding processing according to the MIP mode, the decoding processing can be performed based on the set offset parameter, the modified weight matrix and the modified bias matrix.

[0221] It should be noted that in the embodiments of the present application, after the decoder sets the offset parameter, in order to prevent the decrease of the coding and decoding performance, the corresponding initial weight matrix and initial bias matrix are updated to obtain the modified weight matrix and the modified bias matrix, and then when decoding processing is performed according to the MIP mode, the current block can be decoded according to the offset parameter, the modified weight matrix and the modified bias matrix. Thus, the storage space and the overall time required in the coding and decoding process can be reduced on the basis of ensuring the coding and decoding performance, and the coding and decoding efficiency can be effectively improved.

[0222] It should be noted that in the embodiments of the present application, after the decoder sets the offset parameter, the current block can also be decoded directly according to the offset parameter, the initial weight matrix and the initial bias matrix. That is to say, after the decoder completes the setting of the offset parameter, the corresponding initial weight matrix and initial bias matrix can also not be updated.

[0223] In the prior art, when a current block is predicted by a MIP mode, the number of bits to be right shifted is not uniform, that is, the offset parameter sW is not the same. The image decoding method proposed in the present application uniformly sets the offset parameter, so that the implementation of the MIP mode is more simple and uniform. Further, because the offset parameter sW is not the same in the prior art, a sW table representing the number of bits to be right shifted needs to be stored, and in the calculation process, the sW corresponding to the current block is queried and called to determine the number of bits to be right shifted in the MIP calculation of the prediction value. However, because the offset parameter is uniformly set in the image decoding method proposed in the present application, the sW table representing the number of bits to be right shifted no longer needs to be stored, thereby saving storage space and eliminating the processing flow of querying and calling sW.

[0224] The image decoding method proposed in the embodiments of the present application includes: before decoding processing according to a MIP mode, uniformly modifying initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter; wherein the offset parameter is used to indicate the number of bits to be right shifted in a prediction value; and when decoding processing according to the MIP mode, decoding processing is performed according to the offset parameter. As can be seen, the image encoding and decoding method proposed in the present application uniformly modifies the number of bits to be right shifted in the prediction value by using the offset parameter, so that all the luma blocks of different sizes and different MIP mode numbers have the same sW value, thereby eliminating the need to query and call sW when encoding and decoding processing is performed, reducing the complexity of the MIP algorithm, and effectively improving the encoding and decoding efficiency by reducing the storage space and overall time required in the encoding and decoding process while ensuring the encoding and decoding performance.

[0225] Based on the above embodiments, in another embodiment of the present application, FIG. 11 is a schematic diagram of the composition structure of an encoder according to an embodiment of the present application, as shown in FIG. 11, the encoder 300 according to an embodiment of the present application can include a first modification part 301 and an encoding part 302.

[0226] The first modification part 301 is configured to uniformly modify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before encoding processing according to a MIP mode; wherein the offset parameter is used to indicate the number of bits to be right shifted in a prediction value.

[0227] The encoding part 302 is configured to perform encoding processing according to the offset parameter when encoding processing according to the MIP mode is performed.

[0228] The first modification part 301 is specifically configured to modify the initial right shift parameter to the offset parameter when the initial right shift parameter and the offset parameter are different, so that the right shift number of all prediction values corresponding to all sizes and all MIP mode numbers is the same.

[0229] Fig. 12 is a schematic diagram of the second constituent structure of the encoder according to the embodiment of the application. As shown in Fig. 12, the encoder 300 according to the embodiment of the application can further include a first processor 303, a first memory 304 storing executable instructions of the first processor 303, a first communication interface 305, and a first bus 306 for connecting the first processor 303, the first memory 304, and the first communication interface 305.

[0230] Further, in the embodiment of the application, the first processor 303 is configured to uniformly modify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before encoding processing according to a MIP mode; wherein the offset parameter is used to indicate the right shift number of a prediction value; and the encoding processing is performed according to the offset parameter when the encoding processing according to the MIP mode is performed.

[0231] In addition, each functional module in the embodiment can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of a software functional module.

[0232] 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 this understanding, the technical solutions of the embodiment can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method of the embodiment. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program codes that can be stored in the medium.

[0233] The embodiment of the present application provides an encoder, which is configured to modify initial right shift parameters corresponding to different sizes and different MIP mode numbers uniformly according to an offset parameter before encoding processing according to a MIP mode; wherein the offset parameter is used for indicating right shift numbers of prediction values; and the encoding processing is performed according to the offset parameter when the encoding processing is performed according to the MIP mode. It can be seen that, by modifying the right shift numbers of the prediction values uniformly according to the offset parameter, the image coding and decoding method provided by the present application makes all the luma blocks of different sizes and different MIP mode numbers have the same sW value, so that the sW value does not need to be queried and called when the coding and decoding processing is performed, the complexity of the MIP algorithm can be reduced, the storage space and the overall time required in the coding and decoding process can be reduced on the basis of ensuring the coding and decoding performance, and the coding and decoding efficiency can be effectively improved.

[0234] Fig. 13 is a schematic structural diagram of a decoder according to an embodiment of the present application; as shown in Fig. 13, the decoder 400 provided by the embodiment of the present application can include a second modification part 401 and a decoding part 402.

[0235] The second modification part 401 is configured to modify initial right shift parameters corresponding to different sizes and different MIP mode numbers uniformly according to an offset parameter before decoding processing according to a MIP mode; wherein the offset parameter is used for indicating right shift numbers of prediction values.

[0236] The decoding part 402 is configured to perform decoding processing according to the offset parameter when the decoding processing is performed according to the MIP mode.

[0237] The second modification part 401 is specifically configured to modify the initial right shift parameter to the offset parameter when the initial right shift parameter and the offset parameter are different, so that the right shift numbers of all the prediction values corresponding to all the sizes and all the MIP mode numbers are the same.

[0238] Fig. 14 is a schematic structural diagram of a decoder according to another embodiment of the present application; as shown in Fig. 14, the decoder 400 provided by the embodiment of the present application can further include a second processor 403, a second memory 404 in which executable instructions of the second processor 403 are stored, a second communication interface 405, and a second bus 406 used for connecting the second processor 403, the second memory 404 and the second communication interface 405.

[0239] Further, in the embodiment of the present application, the second processor 403 is configured to uniformly modify initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before decoding processing according to the MIP mode, and the offset parameter is used to indicate a right shift number of a prediction value, and the decoding processing is performed according to the offset parameter when the decoding processing according to the MIP mode is performed.

[0240] In addition, each functional module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional module.

[0241] The integrated unit, if realized in the form of a software functional module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiment can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the embodiment method. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.

[0242] The embodiment of the present application provides an encoder, which uniformly modifies initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before decoding processing according to the MIP mode, and performs decoding processing according to the offset parameter when the decoding processing according to the MIP mode is performed. It can be seen that, by using the offset parameter to uniformly modify the right shift number of the prediction value, the image encoding and decoding method provided by the present application makes all the luminance blocks of different sizes and different MIP mode numbers have the same sW value, so that the sW value does not need to be queried and called when the encoding and decoding processing is performed, the complexity of the MIP algorithm can be reduced, the storage space and the overall time required in the encoding and decoding process can be reduced on the basis of ensuring the encoding and decoding performance, and the encoding and decoding efficiency can be effectively improved.

[0243] The embodiment of the present application provides a computer readable storage medium and a computer readable storage medium, and a program is stored on the computer readable storage medium, and the program is executed by a processor to realize the method described in the above embodiment.

[0244] Specifically, the program instructions corresponding to the image encoding method in the embodiment can be stored on a storage medium such as an optical disc, a hard disk, a U disk, etc. When the program instructions corresponding to the image encoding method in the storage medium are read by an electronic device or executed, the following steps are included:

[0245] Before the encoding processing according to the MIP mode, the initial right shift parameters corresponding to different sizes and different MIP mode numbers are uniformly modified according to an offset parameter; wherein the offset parameter is used to indicate the right shift number of the prediction value; and

[0246] When the encoding processing according to the MIP mode is performed, the encoding processing is performed according to the offset parameter.

[0247] Specifically, the program instructions corresponding to the image decoding method in the embodiment can be stored on a storage medium such as an optical disc, a hard disk, a U disk, etc. When the program instructions corresponding to the image decoding method in the storage medium are read by an electronic device or executed, the following steps are included:

[0248] Before the decoding processing according to the MIP mode, the initial right shift parameters corresponding to different sizes and different MIP mode numbers are uniformly modified according to an offset parameter; wherein the offset parameter is used to indicate the right shift number of the prediction value; and

[0249] When the decoding processing according to the MIP mode is performed, the decoding processing is performed according to the offset parameter.

[0250] Those skilled in the art should 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 be in the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer usable program code.

[0251] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks.

[0252] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart or flowsheet block or blocks.

[0253] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks.

[0254] The above descriptions are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Industrial Applicability

[0255] The embodiment of the present application provides an image coding method, an encoder, a decoder and a storage medium. The encoder modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers uniformly according to an offset parameter before encoding processing according to the MIP mode; wherein the offset parameter is used to indicate the right shift number of the prediction value; and the encoding processing is performed according to the offset parameter when the encoding processing is performed according to the MIP mode. The decoder modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers uniformly according to an offset parameter before decoding processing according to the MIP mode; and the decoding processing is performed according to the offset parameter when the decoding processing is performed according to the MIP mode. It can be seen that the image coding method provided by the present application modifies the right shift number of the prediction value uniformly by using the offset parameter, so that all the luminance blocks with different sizes and different MIP mode numbers have the same sW value, thereby when the coding processing is performed, the sW value does not need to be queried and called, the complexity of the MIP algorithm can be reduced, the storage space and the overall time required in the coding process can be reduced on the basis of ensuring the coding performance, and the coding efficiency can be effectively improved.

Claims

1. An image encoding method applied to an encoder, the method comprising: Before encoding according to the matrix-based intra-prediction MIP mode, the initial right-shift parameters corresponding to different sizes and MIP mode numbers are uniformly modified according to the offset parameter; wherein, the offset parameter is used to indicate the number of right shifts of the predicted value; and, When performing encoding processing according to the MIP mode, the encoding processing is performed based on the offset parameter.

2. The method according to claim 1, wherein, The standardization modification of the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameters includes: When the initial right shift parameter and the offset parameter are not the same, the initial right shift parameter is modified 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.

3. The method according to claim 1, wherein, After uniformly modifying the initial right-shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameters, the method further includes: The initial weight matrix and the initial bias matrix are modified according to the preset calculation rules to obtain the modified weight matrix and the modified bias matrix; wherein, the initial weight matrix and the initial bias matrix correspond to the unified modified initial right shift parameter; Encoding is performed based on the offset parameter, the modified weight matrix, and the modified bias matrix.

4. The method according to claim 3, wherein, The step of modifying the initial weight matrix and initial bias matrix according to a preset calculation rule to obtain the modified weight matrix and modified bias matrix includes: According to the floor rule, all element values ​​in the initial weight matrix are modified to values ​​of the same binary order of magnitude as the element values ​​of other weight matrices to obtain the modified weight matrix; Following the floor rule, all elements in the initial bias matrix are modified to have the same binary order of magnitude as the elements of other bias matrices to obtain the modified bias matrix.

5. The method according to claim 3, wherein, The step of obtaining the modified weight matrix and modified bias matrix according to the preset calculation rules includes: According to the rounding-up calculation rule, all element values ​​in the initial weight matrix are modified to values ​​of the same binary order of magnitude as the element values ​​of other weight matrices to obtain the modified weight matrix; Following the rounding-up calculation rule, all elements in the initial bias matrix are modified to values ​​of the same binary order as the elements of other bias matrices to obtain the modified bias matrix.

6. The method according to claim 3, wherein, The step of obtaining the modified weight matrix and modified bias matrix according to the preset calculation rules includes: According to the rounding calculation rules, all element values ​​in the initial weight matrix are modified to values ​​of the same binary order of magnitude as the element values ​​of other weight matrices to obtain the modified weight matrix; According to the rounding calculation rules, all elements in the initial bias matrix are modified to values ​​of the same binary order as the element values ​​of other bias matrices to obtain the modified bias matrix; wherein, B is an integer.

7. An image decoding method, applied to a decoder, the method comprising: Before decoding according to the MIP mode, the initial right shift parameters corresponding to different sizes and different MIP mode numbers are uniformly modified according to the offset parameter; wherein, the offset parameter is used to indicate the number of right shifts of the predicted value; and, When performing decoding according to the MIP mode, the decoding process is performed based on the offset parameter.

8. The method according to claim 7, wherein, The standardization modification of the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameters includes: When the initial right shift parameter and the offset parameter are not the same, the initial right shift parameter is modified 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.

9. The method according to claim 8, wherein, After uniformly modifying the initial right-shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameters, the method further includes: The initial weight matrix and the initial bias matrix are modified according to the preset calculation rules to obtain the modified weight matrix and the modified bias matrix; wherein, the initial weight matrix and the initial bias matrix correspond to the unified modified initial right shift parameter; Encoding is performed based on the offset parameter, the modified weight matrix, and the modified bias matrix.

10. An encoder, the encoder comprising: The first modification and the encoding section, The first modification is configured to uniformly modify the initial right shift parameters corresponding to different sizes and different MIP pattern numbers according to the offset parameter before encoding processing according to the MIP mode; wherein, the offset parameter is used to indicate the number of right shifts of the predicted value; The encoding portion is configured to perform encoding processing based on the offset parameter when encoding processing is performed according to the MIP mode.

11. The encoder according to claim 10, wherein, The first modification is specifically configured such that when the initial right shift parameter and the offset parameter are different, the initial right shift parameter is modified 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.

12. A decoder, the decoder comprising: The second modification and decoding part, The second modification is configured to uniformly modify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter before decoding according to the MIP mode; wherein, the offset parameter is used to indicate the number of right shifts of the predicted value; The decoding section is configured to perform decoding processing based on the offset parameter when performing decoding processing according to the MIP mode.

13. The decoder according to claim 12, wherein, The second modification is specifically configured such that when the initial right shift parameter and the offset parameter are not the same, the initial right shift parameter is modified 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.

14. An encoder, the encoder comprising a first processor, a first memory storing instructions executable by the first processor, a first communication interface, and a first bus for connecting the first processor, the first memory, and the first communication interface, wherein when the instructions are executed by the first processor, the encoder implements the method as described in any one of claims 1-6.

15. A decoder, the decoder comprising a second processor, a second memory storing instructions executable by the second processor, a second communication interface, and a second bus for connecting the second processor, the second memory, and the first communication interface, wherein when the instructions are executed by the second processor, the decoder implements the method as described in any one of claims 7-9.

16. A computer-readable storage medium having a program stored thereon for use in an encoder and a decoder, wherein the program, when executed by a processor, implements the method as described in any one of claims 1-9.