Image encoding and decoding method, encoder, decoder and storage medium

By uniformly modifying the initial right shift parameters in MIP mode, and using offset parameters to indicate the right shift number of the predicted value, the memory space and time increase caused by different luminance block parameters is solved, and a more efficient encoding and decoding process is achieved.

CN120034648AActive Publication Date: 2025-05-23GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Application Number
CN202510164332.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2019-06-25
Publication Date
2025-05-23
Estimated Expiration
2039-06-25

AI Technical Summary

Technical Problem

When performing brightness prediction through Matrix-based Intra Prediction (MIP) mode, different parameters are used for brightness blocks of different sizes, resulting in large storage space and increasing prediction process time, reducing encoding and decoding efficiency.

Method used

During the encoding and decoding process, the initial right shift parameters corresponding to different sizes and MIP mode numbers are uniformly modified, and the right shift number of the predicted value is indicated by using the offset parameters, so that the brightness blocks of different sizes and MIP mode numbers have the same sW value.

Benefits of technology

It reduces the storage space and overall time required during the encoding and decoding process, improves the encoding and decoding efficiency, and reduces the complexity of the MIP algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034648A_ABST
    Figure CN120034648A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image encoding and decoding method, an encoder, a decoder and a storage medium, and the method comprises the steps: carrying out the unified modification of initial right shift parameters corresponding to different sizes and different MIP mode numbers according to an offset parameter before the encoder carries out the encoding processing according to an MIP mode; wherein the offset parameter is used for indicating the right shift number of the predicted value; and when coding processing is carried out according to the MIP mode, coding processing is carried out according to the offset parameter. Before the decoder carries out decoding processing according to the MIP mode, initial right shift parameters corresponding to different sizes and different MIP mode numbers are subjected to unified modification according to the offset parameters; wherein the offset parameter is used for indicating the right shift number of the predicted value; and when decoding processing is carried out according to the MIP mode, decoding processing is carried out according to the offset parameter.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the PCT international patent application PCT / CN2019 / 092689 with an application date of June 25, 2019, which has entered the Chinese national phase with Chinese patent application number 201980048358.2 and the invention name “Image Coding and Decoding Method, Encoder, Decoder and Storage Medium”. Technical Field

[0002] The embodiments of the present application relate to the field of video coding and decoding technology, and in particular to an image coding and decoding method, an encoder, a decoder, and a storage medium. Background Art

[0003] In the reference software test platform of Versatile Video Coding (VVC), a new intra-frame coding technology, Matrix-based Intra Prediction (MIP) was proposed. MIP is an intra-frame prediction technology based on neural networks, that is, a multi-layer neural network is used to predict the brightness value of the current block based on the adjacent reconstructed brightness blocks. Specifically, like the traditional intra-frame mode, when using the MIP mode for intra-frame prediction, the input of the MIP prediction is also the data of the adjacent brightness blocks in the previous row and the left column of the current block, and the output is the brightness component prediction value of the current block. The specific prediction process is divided into three steps: downsampling, matrix-vector multiplication and interpolation.

[0004] However, when performing brightness prediction through the MIP mode, the parameters used for brightness blocks of different sizes may also be different. Therefore, a large storage space is required to store a large number of parameters, and the search and call of parameters during the prediction process also increases the overall time, thereby reducing the encoding and decoding efficiency. Summary of the invention

[0005] The embodiments of the present application provide an image encoding and decoding method, an encoder, a decoder, and a storage medium, which can reduce the storage space and overall time required in the encoding and decoding process while ensuring the encoding and decoding performance, thereby effectively improving the encoding and decoding efficiency.

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

[0007] The present application provides an image encoding method, which is applied to an encoder, and the method includes:

[0008] Before encoding according to the MIP mode, uniformly modifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and,

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

[0010] The present application provides an image decoding method, which is applied to a decoder. The method includes:

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

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

[0013] The embodiment of the present application provides an encoder, the encoder comprising: a first modifying part and an encoding part,

[0014] The first modification part 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 encoding processing according to the MIP mode; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value;

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

[0016] The embodiment of the present application provides a decoder, the decoder comprising: a second modifying part and a decoding part,

[0017] The second modification part 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 processing according to the MIP mode; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value;

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

[0019] An embodiment of the present application provides an encoder, which includes 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. When the instructions are executed by the first processor, the image encoding method as described above is implemented.

[0020] An embodiment of the present application provides a decoder, which includes 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. When the instructions are executed by the second processor, the image decoding method as described above is implemented.

[0021] An embodiment of the present application provides a computer-readable storage medium on which a program is stored, which is applied to an encoder and a decoder. When the program is executed by a processor, the image encoding and decoding method as described above is implemented.

[0022] The embodiment of the present application provides an image coding and decoding method, an encoder, a decoder and a storage medium. Before the encoder performs coding 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 the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and when the coding processing is performed according to the MIP mode, the coding processing is performed according to the offset parameter. Before the decoder performs 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 the offset parameter; and when the decoding processing is performed according to the MIP mode, the decoding processing is performed according to the offset parameter. It can be seen that the image coding and decoding method proposed in the present application uniformly modifies the number of right shift bits of the predicted value by using the offset parameter, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value, so that when performing coding and decoding processing, there is no need to query and call the sW value, which can reduce the complexity of the MIP algorithm, and can reduce the storage space and overall time required in the coding and decoding process on the basis of ensuring the coding and decoding performance, and effectively improve the coding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 Schematic diagram of the arrangement of 67 prediction modes in intra-frame prediction;

[0024] Figure 2 Schematic diagram of the process of encoding for MIP mode;

[0025] Figure 3 Schematic diagram of arrangement of the upper adjacent luminance blocks and the left adjacent luminance blocks of the current block;

[0026] Figure 4 Schematic diagram for determining the arrangement of DM mode;

[0027] Figure 5 It is a schematic diagram of the structure of a video coding system;

[0028] Figure 6It is a structural diagram of a video decoding system;

[0029] Figure 7 A schematic diagram of an implementation process of an image encoding method proposed in an embodiment of the present application Figure 1 ;

[0030] Figure 8 A schematic diagram of an implementation process of an image encoding method proposed in an embodiment of the present application Figure 2 ;

[0031] Fig. 9 A schematic diagram of an implementation process of an image decoding method proposed in an embodiment of the present application Figure 1 ;

[0032] Fig.10 A schematic diagram of an implementation process of an image decoding method proposed in an embodiment of the present application Figure 2 ;

[0033] Fig.11 The structure of the encoder proposed in this application embodiment is shown in FIG. Figure 1 ;

[0034] Fig.12 The structure of the encoder proposed in this application embodiment is shown in FIG. Figure 2 ;

[0035] Fig.13 The structure of the decoder proposed in this application embodiment is shown in FIG. Figure 1 ;

[0036] Fig.14 The structure of the decoder proposed in this application embodiment is shown in FIG. Figure 2 . DETAILED DESCRIPTION

[0037] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the related applications, rather than to limit the applications. It should also be noted that, for the convenience of description, only the parts related to the related applications are shown in the accompanying drawings.

[0038] In video images, VVC accepted the Affine Linear Weighted IntraPrediction technology proposed in the Joint Video Experts Team (JVET)-N0217 and renamed it as matrix-based intra prediction, namely MIP technology. This technology adds different numbers of matrix-based intra prediction modes in the intra-frame brightness prediction process according to the different sizes of intra-frame brightness coding blocks.

[0039] In order to capture finer edge directions presented in natural videos, VVC expands the 33 intra-frame brightness prediction angle modes defined in the video compression standard (High Efficiency Video Coding, HEVC) to 65. Figure 1 Schematic diagram of the arrangement of 67 prediction modes in intra-frame prediction, such as Figure 1 As shown, arrows numbered 2-66 represent 65 intra-frame angle prediction modes, and there are two non-angle modes, namely the gradual flat Planar mode numbered 0 and the DC mode numbered 1; therefore, the intra-frame prediction process in VVC includes two non-angle modes and 65 angle modes. Here, these 67 prediction modes are called traditional modes of intra-frame prediction.

[0040] MIP is an intra-frame prediction technology based on neural networks, that is, a multi-layer neural network is used to predict the brightness value of the current block based on adjacent reconstructed pixels. Specifically, MIP technology divides brightness coding blocks into three categories according to the size of the brightness coding block within the frame. Assuming the size of the brightness coding block is W×H, where W is the width parameter and H is the height parameter, the brightness coding blocks can be divided into three categories according to the size of the brightness coding block:

[0041] The luminance coding block with a size of 4×4 is a first type of luminance block, the luminance coding blocks with sizes of 8×4, 4×8 and 8×8 are second type of luminance blocks, and luminance coding blocks of other sizes are third type of luminance blocks.

[0042] For these three types of intra-frame luminance coding blocks, MIP technology adds M MIP modes based on 67 traditional intra-frame prediction modes, where M=35 for the first type of luminance blocks, M=19 for the second type of luminance blocks, and M=11 for the third type of luminance blocks.

[0043] Specifically, MIP technology is only used for intra-frame brightness prediction. Like the traditional mode, the input of MIP prediction is also the data of the previous row and the left column of the current block, and the output is the predicted value of the current block. The specific prediction process is divided into three steps: averaging, matrix-vector multiplication, and interpolation. In other words, by performing these three operations on the reconstructed brightness values ​​of the adjacent pixels in the previous row and the left column of the input, the predicted value of the brightness component of the current block can be obtained.

[0044] Figure 2 A schematic diagram of the process of encoding for the MIP mode is shown as follows: Figure 2 As shown, the specific implementation of brightness prediction in MIP mode is as follows:

[0045] Step 1: Perform an average operation on the upper adjacent reference points of the current block to obtain the vector bdry top, a total of N values; the vector bdry is obtained by averaging the adjacent reference points on the left side of the current block left , a total of N values. When the current block is the first type of brightness coding, N = 2; when the current block is the second or third type of brightness coding, N = 4. Vector bdry top and vector bdry left Form a new vector bdry red and perform subsequent operations;

[0046] Step 2: Get the corresponding matrix A through the mode number k of the MIP mode k and offset b k , calculated by the following formula (1): Figure 2 The partial prediction values ​​of the current block are marked with cross lines in :

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

[0048] Step 3: Obtain the remaining predicted value Predred in the current block through linear interpolation.

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

[0050] In VVC's intra prediction, 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 encoded from the 67 traditional modes and M MIP modes. In order to save bit overhead, VVC uses the intra mode coding technology based on the Most Probable Modes List (MPM).

[0051] It should be noted that since the multi-reference line technology (extend reference line) and intra sub-block division technology (Intra Sub-Patitionar, ISP) are only used for the modes in the MPM list, when extendrefflag and ispflag are both 0, that is, when 0 reference line is used and no sub-block division is performed, it is not necessary to encode mpmflag, and the position of the optimal mode in the MPM list can be directly encoded.

[0052] Furthermore, with regard to the construction of the MPM list and the MIPMPM list, in the VVC luminance intra-frame prediction, if the optimal mode selected for the current block is the traditional mode, it is necessary to construct an MPM list containing the 6 most likely traditional modes; if the optimal mode selected for the current block is the MIP mode, it is necessary to construct a MIPMPM list containing the 3 most likely MIP modes.

[0053] Figure 3 is a schematic diagram of the arrangement of the upper adjacent brightness block and the left adjacent brightness block of the current block, such as Figure 3 As shown, the above two lists are based on Figure 3 The optimal modes of the upper adjacent luminance block (A) and the left adjacent luminance block (L) of the current block are derived.

[0054] Furthermore, for the construction of the MIPMPM list, in VVC intra prediction, if the optimal mode of the current block is the MIP mode, the MIPMPM list needs to be constructed. In the process of constructing the MIPMPM list, it is first necessary to obtain the MIP mode ABOVE_MIP corresponding to the optimal mode of the upper adjacent luminance block and the MIP mode LEFT_MIP corresponding to the optimal mode of the left adjacent luminance block.

[0055] Further, after obtaining LEFT_MIP and ABOVE_MIP, a MIPMPM list containing three most likely MIPMPM modes is constructed according to the following method, wherein the number in MIPMPM is the number of the MIP mode, the number range is 0 to (M-1), the first type of luminance block is numbered 0-34; the second type of luminance block is numbered 0-18; and the third type of luminance block is numbered 0-10:

[0056] If LEFT_MIP is available (not -1), put LEFT_MIP into MIPMPMlist;

[0057] If ABOVE_MIP is available (not -1), put ABOVE_MIP into MIPMPMlist after passing redundancy check;

[0058] If LEFT_MIP is not available (-1), ABOVE_MIP is not available (-1), add the default list after redundancy check according to the type of the current block until the MIPMPMlist is filled:

[0059] The default list of the first type of luminance blocks is: {17, 34, 5};

[0060] The default list of the second type of luminance blocks is: {0, 7, 16};

[0061] The default list of the third type of luminance blocks is: {1, 4, 6}.

[0062] Furthermore, it should be added that in the VVC chroma intra prediction process, there is a direct mode (DM) that uses the correlation between components. The intra prediction mode of the center position of the co-located luminance coding block corresponding to the current block is used to perform intra prediction of the current chroma block. Figure 4 To determine the arrangement diagram of the DM mode, Figure 4 As shown in Figure 4 When the intra-frame prediction mode of the CR position is the MIP mode, the MIP mode needs to be mapped to the traditional mode through the "MIP-traditional mapping table" to perform intra-frame prediction of the current chrominance block.

[0063] That is to say, due to the introduction of MIP technology, in the intra-frame prediction process, in constructing the MIP MIP list, the traditional mode needs to be mapped to the MIP mode, and in constructing the MPM list and determining the DM mode, the MIP mode needs to be mapped to the traditional mode.

[0064] Table 1

[0065]

[0066] In addition, the mapping of MIP mode to traditional mode is required in the process of constructing the MPM list and obtaining the DM mode. Specifically, 35 / 19 / 11 MIP modes are mapped to 67 traditional modes through the "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]

[0069]

[0070] Table 3

[0071] MIP Mode 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Traditional Model 0 1 0 1 0 22 18 18 1 0 1 0 1 0 44 0 50 1 0

[0072] Table 4

[0073] MIP Mode 0 1 2 3 4 5 6 7 8 9 10 Traditional Model 1 1 1 1 18 0 1 0 1 50 0

[0074] Figure 5 It is a schematic diagram of the structure of the video coding system. Figure 5As shown, the video encoding system 100 includes a transform and quantization module 101, an intra-frame estimation module 102, an intra-frame 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 a sample adaptive offset (Sample Adaptive Offset, SAO) filter module 108, a header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC) encoding module 109 and a decoded image cache module 110 and other components; Figure 6 It is a structural diagram of a video decoding system. Figure 6 As shown, 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-frame prediction module 203, a motion compensation module 204, a deblocking filter and SAO filter module 205, and a decoded image buffer module 206. After the video image is partially processed by the transform and quantization module 101, the intra-frame estimation module 102, the intra-frame 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, a code stream of the video image is output; the code stream is input into the video decoding system 200, and is partially processed by the header information decoding and CABAC decoding module 201, the inverse transform and inverse quantization module 202, the intra-frame prediction module 203, and the motion compensation module 204 in the video decoding system 200, and the original video image is finally restored.

[0075] According to the height parameter and width parameter, the current block can be of 25 sizes. Specifically, the standard stipulates that the maximum size of the luminance block is 128×128, but since the maximum size of the transform unit is 64×64, that is, the luminance block must be quadtree-divided at the size of 128×128, so the maximum luminance block size is 64×64. Table 5 is a schematic table of luminance block sizes, as shown in Table 5,

[0076] Table 5

[0077]

[0078]

[0079] In the prior art, the MIP mode is restricted according to the height parameter and width parameter of the current block. Specifically, if the aspect 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 the MIP mode. Table 6 is the restriction of the luminance block size under the MIP mode in the prior art, as shown in Table 6.

[0080] Table 6

[0081] In the prior art, in the first type of luminance block in the MIP mode (corresponding to the 4×4 luminance block), there are 2 upper adjacent and left adjacent luminance blocks, which are subjected to matrix operation to generate a 4×4 prediction block; in the second type of luminance block in the MIP mode (corresponding to the 4×8, 8×4, 8×8 luminance blocks), there are 4 upper adjacent and left adjacent luminance blocks, which are subjected to matrix operation to generate a 4×4 prediction block; in the third type of luminance block in the MIP mode (corresponding to luminance blocks of other sizes), there are 4 upper adjacent and left adjacent luminance blocks, which are subjected to matrix operation to generate a 4×8 prediction block (4×16 luminance block), an 8×4 prediction block (16×4 luminance block) or an 8×8 prediction block (luminance blocks of other sizes). Among them, since the third type of luminance block will generate a non-square prediction block, it is necessary to extract odd rows of the matrix during calculation.

[0082] Further, in the syntax, MipSizeId can be used to indicate the application category of MIP, numModes indicates the number of MIP modes, boundarySize indicates the number of luminance blocks of the upper reference row or left reference column obtained by downsampling, predW indicates the width parameter of the prediction block, predH indicates the height parameter of the prediction block, and predC indicates the side length of the MIP matrix. Table 7 shows 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 relationship:

[0083] Table 7

[0084] MipSizeId numModes boundarySize pred pred predC 0 35 2 4 4 4 1 19 4 4 4 4 2 11 4 Min(nTbW,8) Min(nTbH,8) 8

[0085] Furthermore, in the syntax, MipSizeId takes a value of 0 for a 4×4 luma block, a value of 1 for a 4×8, 8×4, 8×8 luma block, and a value of 2 for other luma blocks. numModes indicates how many MIP prediction modes there are, i.e., there are 35 4×4 luma blocks, 19 4×8, 8×4, 8×8 luma blocks, and 11 other luma blocks. boundarySize indicates that the adjacent luma blocks in the upper row or left column of the current block are eventually downsampled into 2 or 4 adjacent luma blocks.

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

[0087]

[0088] Among them, mWeight and vBias are the weight matrix and bias matrix trained by deep learning for each MIP mode. Specifically, mWeight is the weight matrix of each type of MIP mode, and vBias is the bias matrix of each type of MIP mode. sB is the left shift of the bias matrix, oW is the rounded retention value, and sW is the right shift of the overall prediction value. The sW value under different MIP modes needs to be obtained by looking up the table.

[0089] Based on JVET-N1001-v7, when generating the prediction matrix of MIP, the encoder uses the variables incW and incH to determine whether the prediction values ​​of odd rows need to be extracted. Specifically:

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

[0091] sB=BitDepth Y -1

[0092] mipW=isTransposed? predH:predW

[0093] mipH=isTransposed? predW:predH

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

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

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

[0097] Table 8 is a syntax description of sW in the prior art. As shown in Table 8, when and only when MipSizeId is equal to 1, that is, the current block size is 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17, the sW value is 9, and the sW value in all other MIP modes is 8. Among them, since the sW value in the MIP mode is a mapping relationship, the sW values ​​in all modes can be obtained through Table 8.

[0098] Table 8

[0099]

[0100] Table 9 shows the mWeight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12.

[0101] Table 9

[0102] 218 -56 9 -3 411 -76 12 -4 448 94 -45 6 23 -15 2 -3 -1 476 77 -34 -5 -2 1 -3 1 -16 466 61 5 -4 1 -3 -38 2 -3 0 260 358 -77 8 122 -39 1 -1 463 -25 -11 -2 405 54 -41 5 121 -33 2 -6 107 402 16 -12 3 -4 1 -6 5 -1 -1 0 -62 267 375 -73 -25 3 -4 -1 108 466 -28 -11 58 -25 -3 -1 418 96 -35 -3 301 18 -15 5 229 -21 -4 -7 -1 -3 -2 -2 24 -95 291 297 3 1 -5 -2 -30 103 464 -29 -16 0 -6 0 41 429 70 -13 27 -5 -2 1 303 193 -13 -1

[0103] Table 10 shows the vBias matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12.

[0104] Table 10

[0105] 1 2 3 1 1 3 3 3 2 4 4 4 3 5 5 5

[0106] Table 11 shows the mWeight matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17. Table 12 shows the vBias matrix when MipSizeId is 1 and the MIP mode numbers are 8 and 17.

[0107] Table 11

[0108] -91 23 13 8 209 261 72 24 -26 -22 14 13 88 306 114 35 -16 18 -16 5 31 327 135 39 -11 11 30 -19 3 325 142 41 12 -4 1 1 -14 273 227 26 3 10 -3 -5 6 231 249 34 1 8 5 -9 10 214 262 37 -1 11 4 -7 15 208 259 40 5 0 4 -4 6 92 340 78 4 6 1 -5 6 113 329 75 2 13 2 -8 6 123 319 75 1 13 6 -10 9 136 303 74 6 1 4 -5 8 38 217 252 4 10 1 -7 9 58 313 141 3 12 4 -8 11 70 327 114 2 14 4 -7 14 82 314 110

[0109] Table 12

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

[0111] It is precisely because of the different syntax descriptions of sW in different MIP modes as shown in Table 8 that when the encoder performs brightness prediction through the MIP mode, if the MipSizeId of the current block is 1, that is, the current block is a second-class brightness block (a brightness block of size 4×8, 8×4, 8×8), and the MIP mode number corresponding to the current coding block is 3, 8, 12, 17, the value of sW will be different from other modes, which causes the inconsistency of the algorithm, and the process of querying the above Table 8 increases the time complexity of the algorithm, and the storage of Table 8 also requires storage space. In other words, when brightness prediction is performed through the MIP mode, the parameters used by brightness blocks of different sizes may also be different. Therefore, a large storage space is required to store a large number of parameters, and the search and call of parameters in the prediction process also increase the overall time, thereby reducing the encoding and decoding efficiency.

[0112] In order to solve the above problems, the present application proposes an image encoding method, by modifying the value of sW of the second type of luminance block when the MIP mode numbers are 3, 8, 12, and 17, so that the values ​​of sW under all MIP mode numbers are the same, thereby reducing the storage space and reducing the overall time by omitting the table lookup operation.

[0113] Furthermore, the image coding method proposed in the present application can affect the intra-frame prediction part in the hybrid framework of video coding, that is, it is mainly applied to the intra-frame prediction module 103 in video coding and the intra-frame prediction module 203 in video decoding, and acts on both the encoding end and the decoding end.

[0114] It should be noted that, in the embodiment of the present application, based on the calculation parameters obtained by training the machine learning method, the image encoding and decoding method proposed in the present application can uniformly modify sW according to the offset parameter with a fixed value, and modify the corresponding weight matrix and bias matrix at the same time. Among them, in the present application, it is not limited to the modification of the value of sW when the second type of luminance block is numbered 3, 8, 12, and 17 in the MIP mode, but after the specific parameters (including different combinations of parameters such as size, mode, right shift value, etc.) are changed, the calculation parameters obtained by training the machine learning method, the different value situations of sW are uniformly modified.

[0115] Furthermore, in the following embodiments, the image encoding and decoding method proposed in the present application is schematically described by taking the value of sW of the second type of luminance block when the MIP mode number is 3, 8, 12, and 17 as an example.

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

[0117] In one embodiment of the present application, Figure 7 A schematic diagram of an implementation process of an image encoding method proposed in an embodiment of the present application Figure 1 ,like Figure 7 As shown, in an embodiment of the present application, the method for an encoder to perform image encoding may include the following steps.

[0118] Step 101: Before encoding according to the MIP mode, uniformly modify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value.

[0119] In an embodiment of the present application, before performing encoding processing according to the MIP mode, the encoder may first set an offset parameter for indicating the number of offset bits.

[0120] It should be noted that, in the 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 of the overall prediction value, that is, when performing brightness prediction on the current block, the offset parameter is used to indicate the number of right shift bits of the overall prediction value of the current block.

[0121] Further, in an embodiment of the present application, the encoder may set the offset parameter to a fixed positive integer before performing encoding processing according to the MIP mode. That is, after the encoder sets the offset parameter, for any current block, no matter how big the current block is or how many MIP mode numbers the current block corresponds to, the offset parameter used is fixed.

[0122] It should be noted that, in the embodiment of the present application, when the encoder 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 encoder can preferably set the offset parameter sW to 6, or preferably set the offset parameter sW to 7, or preferably set the offset parameter sW to 8, and can also preferably set the offset parameter sW to 9.

[0123] For example, Table 13 is a syntax description of sW in the present application. In an embodiment of the present application, when the encoder uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for a luminance block with a size of 4×8, 8×4 or 8×8 and a MIP mode number of 3, 8, 12 or 17, its corresponding sW can be set to the same value as the sW corresponding to other luminance blocks, that is, when the sW corresponding to other luminance blocks is 8, the sW corresponding to the luminance block with a size of 4×8, 8×4 or 8×8 and a 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.

[0124] Table 13

[0125]

[0126] For example, Table 14 is the second syntax description of sW in the present application. In an embodiment of the present application, when the encoder uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for a luminance block with a size of 4×8, 8×4 or 8×8 and a MIP mode number of 3, 8, 12 or 17, its corresponding sW can be set to the same value as the sW corresponding to other luminance blocks, that is, when the sW corresponding to other luminance blocks is 7, the sW corresponding to the luminance block with a size of 4×8, 8×4 or 8×8 and a MIP mode number of 3, 8, 12 or 17 is set to 7, so that different current blocks can have the same offset parameter sW.

[0127] Table 14

[0128]

[0129] For example, Table 15 is the second syntax description of sW in the present application. In an embodiment of the present application, when the encoder uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, for a luminance block with a size of 4×8, 8×4 or 8×8 and a MIP mode number of 3, 8, 12 or 17, its corresponding sW can be set to the same value as the sW corresponding to other luminance blocks, that is, when the sW corresponding to other luminance blocks is 8, the sW corresponding to the luminance block with a size of 4×8, 8×4 or 8×8 and a 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.

[0130] Table 15

[0131]

[0132] As shown in Table 8 above, in the prior art, the offset parameter sW corresponding to different current blocks may be different. Specifically, when and only when MipSizeId is equal to 1, that is, the current block is a second-class luminance block with a size of 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17, the value of sW is different from the sW values ​​under all other MIP mode numbers. Therefore, when the encoder encodes the current block, it is necessary to query and call the offset parameter sW according to the size of the current block and the MIP mode number, thereby increasing the overall time and reducing the encoding and decoding 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 encoding according to the MIP mode, and set the offset parameter sW corresponding to all luminance blocks of different sizes and different MIP mode numbers to the same value, so that when encoding the current block, there is no need to query and call the offset parameter sW according to the size and MIP mode number of the current block, and the encoder does not need to store the syntax description table of sW, thereby reducing the storage space and overall time required in the encoding and decoding process, and effectively improving the encoding and decoding efficiency.

[0133] It should be noted that, in the embodiment 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, but because when and only when MipSizeId is equal to 1, that is, the current block is a second-type luminance block with a size of 4×8, 8×4, 8×8, and the MIP mode numbers are 3, 8, 12, 17, the value of sW is different from the sW values ​​of all other MIP mode numbers. Therefore, when the encoder uniformly modifies the initial right shift parameters sW corresponding to different sizes and different MIP mode numbers according to the offset parameter, the offset parameter sW corresponding to the sizes of 4×8, 8×4, 8×8 and the MIP mode numbers are 3, 8, 12, 17 is set.

[0134] It can be seen that in an embodiment of the present application, the encoder performs a process of uniformly modifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, that is, 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 number of right shift bits of all prediction values ​​corresponding to all sizes and all MIP mode numbers are the same.

[0135] Step 102: When encoding is performed in the MIP mode, encoding is performed according to the offset parameter.

[0136] In an embodiment of the present application, after the encoder uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameters, when the encoder performs encoding processing according to the MIP mode, the encoding processing can be performed based on the set offset parameters.

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

[0138] In the embodiments of the present application, further, Figure 8 A schematic diagram of an implementation process of an image encoding method proposed in an embodiment of the present application Figure 2 ,like Figure 8 As shown, after the encoder 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 101, the method for image encoding by the encoder may further include the following steps:

[0139] Step 103: modify the initial weight matrix and the initial bias matrix according to a preset 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 parameters.

[0140] In an embodiment of the present application, after the encoder uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameters, it can calculate the initial weight matrix and the initial bias matrix according to the preset calculation rules, thereby obtaining the modified weight matrix and the modified bias matrix.

[0141] It should be noted that, in the implementation of the present application, the initial weight matrix and the initial bias matrix correspond to the uniformly modified initial right-shift parameters.

[0142] It should be noted that, in an embodiment of the present application, the preset calculation rules can be used to update the corresponding initial weight matrix and initial bias matrix when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17.

[0143] Furthermore, in an embodiment of the present application, after the encoder sets the offset parameters, that is, changes the offset parameters corresponding to the size of 4×8, 8×4 or 8×8 and the MIP mode number of 3, 8, 12 or 17, in order to prevent the encoding and decoding 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.

[0144] It should be noted that in an embodiment of the present application, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the encoder can update the corresponding initial weight matrix and initial bias matrix by a variety of different methods when obtaining the modified weight matrix and the modified bias matrix according to the preset calculation rule. For example, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the encoder can update any element value A in the initial weight matrix to A / 2 according to the calculation rule of rounding down, and 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 both integers. Further, the encoder can also update any element value A in the initial weight matrix to A / 2 according to the calculation rule of rounding up, and 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. Furthermore, the encoder may update any element value A in the initial weight matrix to A / 2 and update any element value B in the initial bias matrix to B / 2 according to the rounding calculation rule, thereby obtaining a modified weight matrix and a modified bias matrix.

[0145] Step 104: Perform encoding processing according to the offset parameter, the modified weight matrix and the modified bias matrix.

[0146] In an embodiment 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 parameters, the modified weight matrix, and the modified bias matrix.

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

[0148] It should be noted that, in the embodiment of the present application, after the encoder sets the offset parameter, it may also directly encode the current block according to the offset parameter, the initial weight matrix and the initial bias matrix. In other words, after the encoder completes the setting of the offset parameter, it may not update the corresponding initial weight matrix and initial bias matrix.

[0149] In the prior art, when the brightness prediction value of the current block is performed through the MIP mode, the number of bits that need to be right-shifted is not uniform, that is, the offset parameter sW is different. The image encoding method proposed in the present application sets the offset parameter uniformly, so that the implementation of the MIP mode is more concise and uniform; further, precisely because the offset parameter sW in the prior art is different, it is necessary to store an sW table representing the number of right-shifted bits, and during the calculation process, query and call the sW corresponding to the current block to determine the number of bits that need to be right-shifted for the prediction value calculated by the MIP. The image encoding method proposed in the present application sets the offset parameter uniformly, so it is no longer necessary to store the sW table representing the number of right-shifted bits, thereby saving storage space and eliminating the processing flow of querying and calling sW.

[0150] Further, in an embodiment of the present application, after setting the offset parameters, the encoder can also update the corresponding initial weight matrix and initial bias matrix so that there is no significant loss in encoding and decoding performance. Specifically, according to the VVC pass-through standard, the BD-rate on Y, U, and V is 0.00%, -0.02%, and -0.02%, respectively, among which, the result at 24 frame intervals is expected to be similar to the encoding and decoding performance at 8 frame intervals.

[0151] An image encoding method proposed in an embodiment of the present application, before the encoder performs 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 the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and when the encoding processing is performed according to the MIP mode, the encoding processing is performed according to the offset parameter. It can be seen that the image encoding and decoding method proposed in the present application, by using the offset parameter to uniformly modify the number of right shift bits of the predicted value, makes all luminance blocks of different sizes and different MIP mode numbers have the same sW value, so that when performing encoding and decoding processing, there is no need to query and call the sW value, which can reduce the complexity of the MIP algorithm, and can reduce the storage space and overall time required in the encoding and decoding process on the basis of ensuring the encoding and decoding performance, effectively improving the encoding and decoding efficiency.

[0152] Based on the above embodiment, in another embodiment of the present application, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the method for the encoder to obtain the modified weight matrix and the modified bias matrix according to the preset calculation rule may include the following steps:

[0153] Step 103a: According to the calculation rule of rounding down, all element values ​​in the initial weight matrix are modified to values ​​of the same binary order as the element values ​​of other weight matrices to obtain a modified weight matrix.

[0154] Step 103b: According to the calculation rule of rounding down, all elements in the initial bias matrix are modified to values ​​of the same binary order as the values ​​of elements of other bias matrices, so as to obtain a modified bias matrix.

[0155] In an embodiment of the present application, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the encoder can modify all element values ​​in the initial weight matrix to values ​​of the same binary order as other weight matrix element values ​​according to the rounding-down calculation rule, and modify all elements in the initial bias matrix to values ​​of the same binary order as other bias matrix element values, thereby obtaining a modified weight matrix and a modified bias matrix.

[0156] Based on the above Table 9, Table 16 is the modified weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. As shown in Table 16, the encoder updates each element value A in Table 9 to A / 2 according to the rounding-down calculation rule, thereby obtaining the modified weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12.

[0157] Table 16

[0158] 109 -28 4 -2 205 -38 6 -2 224 47 -23 3 11 -8 1 -2 -1 238 38 -17 -3 -1 0 -2 0 -8 233 30 2 -2 0 -2 -19 1 -2 0 130 179 -39 4 61 -20 0 -1 231 -13 -6 -1 202 27 -21 2 60 -17 1 -3 53 201 8 -6 1 -2 0 -3 2 -1 -1 0 -31 133 187 -37 -13 1 -2 -1 54 233 -14 -6 29 -13 -2 -1 209 48 -18 -2 150 9 -8 2 114 -11 -2 -4 -1 -2 -1 -1 12 -48 145 148 1 0 -3 -1 -15 51 232 -15 -8 0 -3 0 20 214 35 -7 13 -3 -1 0 151 96 -7 -1

[0159] Based on the above Table 10, Table 17 is a modified bias matrix when MipSizeId is 1 and 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 rounding-down calculation rule, thereby obtaining a modified bias matrix when MipSizeId is 1 and the MIP mode number is 3 and 12.

[0160] Table 17

[0161] 0 1 1 0 0 1 1 1 1 2 2 2 1 2 2 2

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

[0163] Table 18

[0164] -46 11 6 4 104 130 36 12 -13 -11 7 6 44 153 57 17 -8 9 -8 2 15 163 67 19 -6 5 15 -10 1 162 71 20 6 -2 0 0 -7 136 113 13 1 5 -2 -3 3 115 124 17 0 4 2 -5 5 107 131 18 -1 5 2 -4 7 104 129 20 2 0 2 -2 3 46 170 39 2 3 0 -3 3 56 164 37 1 6 1 -4 3 61 159 37 0 6 3 -5 4 68 151 37 3 0 2 -3 4 19 108 126 2 5 0 -4 4 29 156 70 1 6 2 -4 5 35 163 57 1 7 2 -4 7 41 157 55

[0165] Based on the above Table 12, Table 19 is the modified bias matrix when MipSizeId is 1 and the 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 rounding-down calculation rule, thereby obtaining the modified bias matrix when MipSizeId is 1 and the MIP mode number is 8 and 17.

[0166] Table 19

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

[0168] In an embodiment of the present application, further, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the method for the encoder to obtain the modified weight matrix and the modified bias matrix according to the preset calculation rule may include the following steps:

[0169] Step 103c: According to the calculation rule of rounding up, all element values ​​in the initial weight matrix are modified to values ​​of the same binary order as the element values ​​of other weight matrices to obtain a modified weight matrix.

[0170] Step 103d: According to the calculation rule of rounding up, all elements in the initial bias matrix are modified to values ​​of the same binary order as the values ​​of elements of other bias matrices, so as to obtain a modified bias matrix.

[0171] In an embodiment of the present application, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the encoder can modify all element values ​​in the initial weight matrix to values ​​of the same binary order as other weight matrix element values ​​according to the rounding-up calculation rule, and modify all elements in the initial bias matrix to values ​​of the same binary order as other bias matrix element values, thereby obtaining a modified weight matrix and a modified bias matrix.

[0172] Based on the above Table 9, Table 20 is the modified weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. As shown in Table 20, the encoder updates each element value A in Table 9 to A / 2 according to the rounding-up calculation rule, thereby obtaining the modified weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12.

[0173] Table 20

[0174] 109 -28 5 -1 206 -38 6 -2 224 47 -22 3 12 -7 1 -1 0 238 39 -17 -2 -1 1 -1 1 -8 233 31 3 -2 1 -1 -19 1 -1 0 130 179 -38 4 61 -19 1 0 232 -12 -5 -1 203 27 -20 3 61 -16 1 -3 54 201 8 -6 2 -2 1 -3 3 0 0 0 -31 134 188 -36 -12 2 -2 0 54 233 -14 -5 29 -12 -1 0 209 48 -17 -1 151 9 -7 3 115 -10 -2 -3 0 -1 -1 -1 12 -47 146 149 2 1 -2 -1 -15 52 232 -14 -8 0 -3 0 21 215 35 -6 14 -2 -1 1 152 97 -6 0

[0175] 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 calculation rule of rounding up, thereby obtaining the modified bias matrix when MipSizeId is 1 and the MIP mode number is 3 and 12.

[0176] Table 21

[0177] 1 1 2 1 1 2 2 2 1 2 2 2 2 3 3 3

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

[0179] Table 22

[0180] -45 12 7 4 105 131 36 12 -13 -11 7 7 44 153 57 18 -8 9 -8 3 16 164 68 20 -5 6 15 -9 2 163 71 21 6 -2 1 1 -7 137 114 13 2 5 -1 -2 3 116 125 17 1 4 3 -4 5 107 131 19 0 6 2 -3 8 104 130 20 3 0 2 -2 3 46 170 39 2 3 1 -2 3 57 165 38 1 7 1 -4 3 62 160 38 1 7 3 -5 5 68 152 37 3 1 2 -2 4 19 109 126 2 5 1 -3 5 29 157 71 2 6 2 -4 6 35 164 57 1 7 2 -3 7 41 157 55

[0181] Based on the above Table 12, Table 23 is the modified bias matrix when MipSizeId is 1 and the 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 calculation rule of rounding up, thereby obtaining the modified bias matrix when MipSizeId is 1 and the MIP mode number is 8 and 17.

[0182] Table 23

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

[0184] In an embodiment of the present application, further, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the method for the encoder to obtain the modified weight matrix and the modified bias matrix according to the preset calculation rule may include the following steps:

[0185] Step 103e: According to the rounding calculation rule, all element values ​​in the initial weight matrix are modified to values ​​of the same binary order as the element values ​​of other weight matrices to obtain a modified weight matrix.

[0186] Step 103f: According to the rounding calculation rule, all elements in the initial bias matrix are modified to values ​​of the same binary order as the values ​​of elements of other bias matrices, so as to obtain a modified bias matrix.

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

[0188] Based on the above Table 9, Table 24 is the modified weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12. As shown in Table 24, the encoder updates each element value A in Table 9 to A / 2 according to the rounding calculation rule, thereby obtaining the modified weight matrix when MipSizeId is 1 and the MIP mode numbers are 3 and 12.

[0189] Table 24

[0190] 109 -28 5 -2 206 -38 6 -2 224 47 -23 3 12 -8 1 -2 -1 238 39 -17 -3 -1 1 -2 1 -8 233 31 3 -2 1 -2 -19 1 -2 0 130 179 -39 4 61 -20 1 -1 232 -13 -6 -1 203 27 -21 3 61 -17 1 -3 54 201 8 -6 2 -2 1 -3 3 -1 -1 0 -31 134 188 -37 -13 2 -2 -1 54 233 -14 -6 29 -13 -2 -1 209 48 -18 -2 151 9 -8 3 115 -11 -2 -4 -1 -2 -1 -1 12 -48 146 149 2 1 -3 -1 -15 52 232 -15 -8 0 -3 0 21 215 35 -7 14 -3 -1 1 152 97 -7 -1

[0191] Based on the above Table 10, Table 25 is a 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, thereby obtaining the modified bias matrix when MipSizeId is 1 and the MIP mode number is 3 and 12.

[0192] Table 25

[0193] 1 1 2 1 1 2 2 2 1 2 2 2 2 3 3 3

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

[0195] Table 26

[0196] -46 12 7 4 105 131 36 12 -13 -11 7 7 44 153 57 18 -8 9 -8 3 16 164 68 20 -6 6 15 -10 2 163 71 21 6 -2 1 1 -7 137 114 13 2 5 -2 -3 3 116 125 17 1 4 3 -5 5 107 131 19 -1 6 2 -4 8 104 130 20 3 0 2 -2 3 46 170 39 2 3 1 -3 3 57 165 38 1 7 1 -4 3 62 160 38 1 7 3 -5 5 68 152 37 3 1 2 -3 4 19 109 126 2 5 1 -4 5 29 157 71 2 6 2 -4 6 35 164 57 1 7 2 -4 7 41 157 55

[0197] Based on the above Table 12, Table 27 is the modified bias matrix when MipSizeId is 1 and the 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 bias matrix when MipSizeId is 1 and the MIP mode number is 8 and 17.

[0198] Table 27

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

[0200] An image encoding method proposed in an embodiment of the present application, before the encoder performs 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 the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and when the encoding processing is performed according to the MIP mode, the encoding processing is performed according to the offset parameter. It can be seen that the image encoding and decoding method proposed in the present application, by using the offset parameter to uniformly modify the number of right shift bits of the predicted value, makes all luminance blocks of different sizes and different MIP mode numbers have the same sW value, so that when performing encoding and decoding processing, there is no need to query and call the sW value, which can reduce the complexity of the MIP algorithm, and can reduce the storage space and overall time required in the encoding and decoding process on the basis of ensuring the encoding and decoding performance, effectively improving the encoding and decoding efficiency.

[0201] In another embodiment of the present application, Fig. 9 A schematic diagram of an implementation process of an image decoding method proposed in an embodiment of the present application Figure 1 ,like Fig. 9 As shown, in an embodiment of the present application, the method for a decoder to perform image decoding may include the following steps.

[0202] Step 201: Before decoding according to the MIP mode, uniformly modify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value.

[0203] In an embodiment of the present application, before performing decoding processing according to the MIP mode, the decoder may first set an offset parameter for indicating the number of offset bits.

[0204] It should be noted that, in the 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 of the overall prediction value, that is, when performing brightness prediction on the current block, the offset parameter is used to indicate the number of right shift bits of the overall prediction value of the current block.

[0205] Further, in an embodiment of the present application, the decoder may set the offset parameter to a fixed positive integer before performing decoding processing according to the MIP mode. That is, after the decoder sets the offset parameter, for any current block, no matter how big the current block is or how many MIP mode numbers the current block corresponds to, the offset parameter used by the decoder is fixed.

[0206] It should be noted that, in the 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, and can also preferably set the offset parameter sW to 9.

[0207] In the prior art, the offset parameter sW corresponding to different current blocks may be different. Specifically, when and only when MipSizeId is equal to 1, that is, the current block is a second-class luminance block with a size of 4×8, 8×4, 8×8, and the MIP mode number is 3, 8, 12, 17, the value of sW is different from the sW values ​​under all other MIP mode numbers. Therefore, when the decoder decodes the current block, it needs to query and call the offset parameter sW according to the size of the current block and the MIP mode number, which increases the overall time and reduces the encoding and decoding 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 according to the MIP mode, and set the offset parameter sW corresponding to all luminance blocks of different sizes and different MIP mode numbers to the same value, so that when decoding the current block, it is no longer necessary to query and call the offset parameter sW according to the size of the current block and the MIP mode number, and the decoder does not need to store the syntax description table of sW, thereby reducing the storage space and overall time required in the encoding and decoding process, and effectively improving the encoding and decoding efficiency.

[0208] It should be noted that, in the embodiment of the present application, although the decoder 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, but because when and only when MipSizeId is equal to 1, that is, the current block is a second-type luminance block with a size of 4×8, 8×4, 8×8, and the MIP mode numbers are 3, 8, 12, 17, the value of sW is different from the sW values ​​of all other MIP mode numbers. Therefore, when the decoder uniformly modifies the initial right shift parameters sW corresponding to different sizes and different MIP mode numbers according to the offset parameter, the offset parameter sW corresponding to the sizes of 4×8, 8×4, 8×8 and the MIP mode numbers are 3, 8, 12, 17 is set.

[0209] It can be seen that in an embodiment of the present application, the decoder performs a process of uniformly modifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter, that is, 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 number of right shift bits of all prediction values ​​corresponding to all sizes and all MIP mode numbers are the same.

[0210] Step 202: When decoding is performed in the MIP mode, decoding is performed according to the offset parameter.

[0211] In an embodiment 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 parameters, when the decoder performs decoding processing according to the MIP mode, it can perform decoding processing based on the set offset parameters.

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

[0213] In the embodiments of the present application, further, Fig.10 A schematic diagram of an implementation process of an image decoding method proposed in an embodiment of the present application Figure 2 ,like Fig.10 As shown, 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 for decoding an image by the decoder may further include the following steps:

[0214] Step 203: modify the initial weight matrix and the initial bias matrix according to a preset 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 parameters.

[0215] In an embodiment 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 parameters, it can calculate the initial weight matrix and the initial bias matrix according to the preset calculation rules, thereby obtaining the modified weight matrix and the modified bias matrix.

[0216] It should be noted that, in the implementation of the present application, the initial weight matrix and the initial bias matrix correspond to the uniformly modified initial right-shift parameters.

[0217] It should be noted that, in an embodiment of the present application, the preset calculation rules can be used to update the corresponding initial weight matrix and initial bias matrix when the size is 4×8, 8×4 or 8×8 and the MIP mode number is 3, 8, 12 or 17.

[0218] Furthermore, in an embodiment of the present application, after the decoder sets the offset parameters, that is, changes the offset parameters corresponding to the size of 4×8, 8×4 or 8×8 and the MIP mode number of 3, 8, 12 or 17, in order to prevent the encoding and decoding 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.

[0219] It should be noted that in an embodiment of the present application, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the decoder can update the corresponding initial weight matrix and initial bias matrix by a variety of different methods when obtaining the modified weight matrix and the modified bias matrix according to the preset calculation rule. For example, when the size is 4×8, 8×4 or 8×8, and the MIP mode number is 3, 8, 12 or 17, the decoder can update any element value A in the initial weight matrix to A / 2 according to the calculation rule of rounding down, and 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 both integers. Further, the decoder can also update any element value A in the initial weight matrix to A / 2 according to the calculation rule of rounding up, and 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. Furthermore, the decoder can also update any element value A in the initial weight matrix to A / 2 and update any element value B in the initial bias matrix to B / 2 according to the rounding calculation rule, thereby obtaining a modified weight matrix and a modified bias matrix.

[0220] Step 204: Perform decoding processing according to the offset parameter, the modified weight matrix and the modified bias matrix.

[0221] In an embodiment 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 parameters, the modified weight matrix, and the modified bias matrix.

[0222] It should be noted that in the embodiment of the present application, after the decoder sets the offset parameter, in order to prevent the reduction of the encoding and decoding performance, the decoder also updates the corresponding initial weight matrix and initial bias matrix to obtain the modified weight matrix and the modified bias matrix, and then when the decoding process 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. In this way, the storage space and 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.

[0223] It should be noted that, in the embodiment of the present application, after the decoder sets the offset parameter, it may also directly decode the current block according to the offset parameter, the initial weight matrix, and the initial bias matrix. In other words, after the decoder completes the setting of the offset parameter, it may not update the corresponding initial weight matrix and initial bias matrix.

[0224] In the prior art, when the brightness prediction value of the current block is performed through the MIP mode, the number of bits required for right shift is not uniform, that is, the offset parameter sW is different. The image decoding method proposed in the present application sets the offset parameter uniformly, so that the implementation of the MIP mode is more concise and unified; further, precisely because the offset parameter sW is different in the prior art, it is necessary to store an sW table representing the number of right shifts, and during the calculation process, query and call the sW corresponding to the current block to determine the number of bits required for the right shift of the prediction value calculated by the MIP. The image decoding method proposed in the present application sets the offset parameter uniformly, so it is no longer necessary to store the sW table representing the number of right shifts, thereby saving storage space and eliminating the processing flow of querying and calling sW.

[0225] An image decoding method proposed in an embodiment of the present application, before the decoder performs 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 the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and when the decoding processing is performed according to the MIP mode, the decoding processing is performed according to the offset parameter. It can be seen that the image encoding and decoding method proposed in the present application, by using the offset parameter to uniformly modify the number of right shift bits of the predicted value, makes all luminance blocks of different sizes and different MIP mode numbers have the same sW value, so that when performing encoding and decoding processing, there is no need to query and call the sW value, which can reduce the complexity of the MIP algorithm, and can reduce the storage space and overall time required in the encoding and decoding process on the basis of ensuring the encoding and decoding performance, effectively improving the encoding and decoding efficiency.

[0226] Based on the above embodiment, in yet another embodiment of the present application, Fig.11The structure of the encoder proposed in this application embodiment is shown in FIG. Figure 1 ,like Fig.11 As shown, the encoder 300 proposed in the embodiment of the present application may include a first modification part 301 and an encoding part 302.

[0227] The first modification part 301 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 encoding processing according to the MIP mode; wherein the offset parameter is used to indicate the number of right shift bits of the prediction value.

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

[0229] 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 number of right shift bits of all prediction values ​​corresponding to all sizes and all MIP mode numbers are the same.

[0230] Fig.12 The structure of the encoder proposed in this application embodiment is shown in FIG. Figure 2 ,like Fig.12 As shown, the encoder 300 proposed in the embodiment of the present application may also 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.

[0231] Further, in an embodiment of the present application, the above-mentioned first processor 303 is used to uniformly modify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter before encoding processing is performed according to the MIP mode; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and when encoding processing is performed according to the MIP mode, encoding processing is performed according to the offset parameter.

[0232] In addition, each functional module in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or software functional modules.

[0233] If the integrated unit is implemented in the form of a software function 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 solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0234] An embodiment of the present application provides an encoder, which, before encoding processing according to the MIP mode, uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and when encoding processing is performed according to the MIP mode, encoding processing is performed according to the offset parameter. It can be seen that the image encoding and decoding method proposed in the present application uniformly modifies the number of right shift bits of the predicted value by using the offset parameter, so that all brightness blocks of different sizes and different MIP mode numbers have the same sW value, so that when performing encoding and decoding processing, there is no need to query and call the sW value, which can reduce the complexity of the MIP algorithm, and can reduce the storage space and overall time required in the encoding and decoding process on the basis of ensuring the encoding and decoding performance, effectively improving the encoding and decoding efficiency.

[0235] Fig.13 The structure of the decoder proposed in this application embodiment is shown in FIG. Figure 1 ,like Fig.13 As shown, the decoder 400 proposed in the embodiment of the present application may include a second modifying part 401 and a decoding part 402 .

[0236] The second modification part 401 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 processing according to the MIP mode; wherein the offset parameter is used to indicate the number of right shift bits of the prediction value.

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

[0238] 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 number of right shift bits of all prediction values ​​corresponding to all sizes and all MIP mode numbers are the same.

[0239] Fig.14 The structure of the decoder proposed in this application embodiment is shown in FIG. Figure 2 ,like Fig.14 As shown, the decoder 400 proposed in the embodiment of the present application may also include a second processor 403, a second memory 404 storing executable instructions of the second processor 403, a second communication interface 405, and a second bus 406 for connecting the second processor 403, the second memory 404 and the second communication interface 405.

[0240] Furthermore, in an embodiment of the present application, the above-mentioned second processor 403 is used to uniformly modify the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter before decoding processing is performed according to the MIP mode; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and when decoding processing is performed according to the MIP mode, decoding processing is performed according to the offset parameter.

[0241] In addition, each functional module in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or software functional modules.

[0242] If the integrated unit is implemented in the form of a software function 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 solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0243] The embodiment of the present application provides an encoder, which, before decoding according to the MIP mode, uniformly modifies the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter; and, when decoding according to the MIP mode, performs decoding according to the offset parameter. It can be seen that the image encoding and decoding method proposed in the present application uniformly modifies the number of right shift bits of the predicted value by using the offset parameter, so that all brightness blocks of different sizes and different MIP mode numbers have the same sW value, so that when performing encoding and decoding, there is no need to query and call the sW value, which can reduce the complexity of the MIP algorithm, and can reduce the storage space and overall time required in the encoding and decoding process on the basis of ensuring the encoding and decoding performance, effectively improving the encoding and decoding efficiency.

[0244] The embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, the method described in the above embodiments is implemented.

[0245] Specifically, the program instructions corresponding to an image encoding method in this embodiment may be stored on a storage medium such as an optical disk, a hard disk, or a USB flash drive. When the program instructions corresponding to an image encoding method in the storage medium are read or executed by an electronic device, the following steps are included:

[0246] Before encoding according to the MIP mode, uniformly modifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and,

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

[0248] Specifically, the program instructions corresponding to an image decoding method in this embodiment may be stored in a storage medium such as an optical disk, a hard disk, or a USB flash drive. When the program instructions corresponding to an image decoding method in the storage medium are read or executed by an electronic device, the following steps are included:

[0249] Before decoding according to the MIP mode, uniformly modifying the initial right shift parameters corresponding to different sizes and different MIP mode numbers according to the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and

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

[0251] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0252] The present application is described with reference to implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0253] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0254] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing the steps in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0255] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

[0256] Industrial Applicability

[0257] The embodiment of the present application provides an image coding and decoding method, an encoder, a decoder and a storage medium. Before the encoder performs coding 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 the offset parameter; wherein the offset parameter is used to indicate the number of right shift bits of the predicted value; and when the coding processing is performed according to the MIP mode, the coding processing is performed according to the offset parameter. Before the decoder performs 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 the offset parameter; and when the decoding processing is performed according to the MIP mode, the decoding processing is performed according to the offset parameter. It can be seen that the image coding and decoding method proposed in the present application uniformly modifies the number of right shift bits of the predicted value by using the offset parameter, so that all luminance blocks of different sizes and different MIP mode numbers have the same sW value, so that when performing coding and decoding processing, there is no need to query and call the sW value, which can reduce the complexity of the MIP algorithm, and can reduce the storage space and overall time required in the coding and decoding process on the basis of ensuring the coding and decoding performance, and effectively improve the coding and decoding efficiency.

Claims

1. An image encoding method, applied to an encoder, the method include: Determine the mode parameters of the current block; as well as, When the mode parameter indicates that the prediction value of the current block is determined according to a matrix-based intra-frame prediction MIP mode, the current block is predicted according to an offset parameter according to the MIP mode, wherein all block sizes and the offset parameters in all MIP modes are the same.

2. The method according to claim 1, in, The offset parameter is a fixed positive integer.

3. The method according to claim 2, in, The offset parameter is 6.

4. The method according to claim 1, in, The offset parameter indicates the number of right shift bits used to calculate the predicted value.

5. The method according to claim 1, in, The predicting the current block according to the offset parameter according to the MIP mode includes: The current block is predicted according to the offset parameter and the weight matrix.

6. The method according to claim 1, in, The method further comprises: The mode parameters of the current block are written into the bitstream.

7. An image decoding method, applied to a decoder, the method include: Determine the mode parameters of the current block; as well as, When the mode parameter indicates that the prediction value of the current block is determined according to a matrix-based intra-frame prediction MIP mode, the current block is predicted according to an offset parameter according to the MIP mode, wherein all block sizes and the offset parameters in all MIP modes are the same.

8. The method according to claim 7, in, The offset parameter is a fixed positive integer.

9. The method according to claim 8, in, The offset parameter is 6.

10. The method according to claim 7, in, The offset parameter indicates the number of right shift bits used to calculate the predicted value.

11. The method according to claim 7, in, The predicting the current block according to the offset parameter according to the MIP mode includes: The current block is predicted according to the offset parameter and the weight matrix.

12. The method according to claim 7, in, The method further comprises: Parse the code stream to determine the mode parameters of the current block.

13. An 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 method as described in any one of claims 1 to 6 is implemented.

14. A 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 second communication interface, wherein when the instructions are executed by the second processor, the method as described in any one of claims 7 to 12 is implemented.

15. A computer-readable storage medium having a program stored thereon, applied to an encoder, wherein when the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

16. A computer-readable storage medium having a program stored thereon, applied to a decoder, wherein when the program is executed by a processor, the method according to any one of claims 7 to 12 is implemented.

Citation Information

Patent Citations

  • Video coding-decoding inter-frame image prediction method and video coder-decoder

    CN102387360A

  • Intra-frame prediction method and system of video coding

    CN104702959A

  • Image encoding and decoding method, encoder, decoder and storage medium

    CN120034647A

  • Method for coding video sequence consisting digital images, involves determining reference block in reference image, modifying determined reference block, and coding block to be coded by using predictor block

    FR2956552A1

  • Image encoding apparatus and image encoding method

    US20070058714A1

Cited By

  • Image encoding and decoding method, encoder, decoder and storage medium

    CN120034647A

  • Image coding method, encoder, decoder, and storage medium

    CN120034647B