Mapping method, encoder, decoder and computer storage medium
By directly mapping the MIP mode to a preset non-MIP mode or the non-MIP mode to a preset MIP mode, the problems of high mapping complexity and large memory occupation in the prior art are solved, and the encoding and decoding rate is improved.
Patent Information
- Application Number
- CN202511011659.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-25
- Publication Date
- 2025-10-03
AI Technical Summary
The existing mapping method between the MIP mode and the non-MIP mode is complex, which increases the complexity of encoding and decoding and occupies a large amount of memory space, affecting the encoding and decoding rate.
By directly mapping the intra prediction mode to a preset non-MIP mode when it is determined to be a MIP mode, or directly mapping the non-MIP mode to a preset MIP mode, multiple queries to the mapping table are avoided and the mapping process is simplified.
It reduces the mapping complexity, improves the encoding and decoding rate, and saves memory space.
Smart Images

Figure CN120751141A_ABST
Abstract
Description
[0001] Description of the case
[0002] This application is a divisional application based on the patent with application date of June 25, 2019, application number 201980057204.X, and invention name “Mapping method, encoder, decoder and computer storage medium”. Technical Field
[0003] The embodiments of the present application relate to mapping technology of intra-frame prediction modes in the field of video coding, and more particularly to a mapping method, encoder, decoder, and computer storage medium. Background Art
[0004] Currently, due to the introduction of matrix-based intra prediction (MIP) technology, in Versatile Video Coding (VVC), it is necessary to perform mutual mapping between non-MIP mode and MIP mode. Specifically, during the construction of the Most Probable Modes List (MPM) and the acquisition of the Direct Mode (DM), the MIP mode needs to be mapped to the non-MIP mode through the "MIP-traditional mapping table". During the construction of the MIP_MPM list, the non-MIP mode needs to be mapped to the MIP mode through the "65-33 mapping table" and the "traditional-MIP mapping table".
[0005] However, the above mapping process is very cumbersome and increases the complexity. At the same time, since all the tables required for mapping must be stored on the codec side, a certain amount of memory space is occupied. It can be seen that the existing mapping method between MIP mode and non-MIP mode is relatively complex, which is not conducive to improving the encoding and decoding rate. Summary of the Invention
[0006] Embodiments of the present application provide a mapping method, an encoder, a decoder, and a computer storage medium, which can simplify the mapping between the MIP mode and the non-MIP mode and improve the encoding and decoding rate.
[0007] The technical solution of the embodiment of the present application can be implemented as follows:
[0008] In a first aspect, an embodiment of the present application provides a mapping method, which is applied to an encoder or a decoder, and the method includes:
[0009] Determine the intra-frame prediction mode to be used when encoding or decoding the current image block;
[0010] If the intra prediction mode is a matrix-based intra prediction MIP mode, mapping the MIP mode to a first non-MIP mode;
[0011] If the intra prediction mode is a non-MIP mode, mapping the non-MIP mode to a second MIP mode;
[0012] Among them, the non-MIP mode includes a DC intra-frame prediction mode, a planar intra-frame prediction mode and a directional intra-frame prediction mode; the first non-MIP mode is one of the non-MIP modes pre-set before encoding or decoding the current image block, and the second MIP mode is one of the MIP modes pre-set before encoding or decoding the current image block.
[0013] In a second aspect, an embodiment of the present application provides an encoder, comprising:
[0014] A first determination module is used to determine the intra-frame prediction mode used when encoding the current image block;
[0015] a first mapping module, configured to, if the intra prediction mode is a matrix-based intra prediction MIP mode, map the MIP mode to a first non-MIP mode;
[0016] A second mapping module is configured to map the non-MIP mode to a second MIP mode if the intra prediction mode is a non-MIP mode;
[0017] Among them, the non-MIP mode includes a DC intra-frame prediction mode, a planar intra-frame prediction mode and a directional intra-frame prediction mode; the first non-MIP mode is one of the non-MIP modes pre-set before encoding the current image block, and the second MIP mode is one of the MIP modes pre-set before encoding the current image block.
[0018] In a third aspect, an embodiment of the present application provides an encoder, comprising:
[0019] A processor and a storage medium storing instructions executable by the processor, wherein the storage medium relies on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, the mapping method described in one or more of the above embodiments is executed.
[0020] In a fourth aspect, an embodiment of the present application provides a decoder, comprising:
[0021] A second determination module is used to determine the intra-frame prediction mode used when decoding the current image block;
[0022] a third mapping module, configured to, if the intra prediction mode is a matrix-based intra prediction MIP mode, map the MIP mode to a first non-MIP mode;
[0023] a fourth mapping module, configured to map the non-MIP mode to a second MIP mode if the intra prediction mode is a non-MIP mode;
[0024] Among them, the non-MIP mode includes a DC intra-frame prediction mode, a planar intra-frame prediction mode and a directional intra-frame prediction mode; the first non-MIP mode is one of the non-MIP modes pre-set before decoding the current image block, and the second MIP mode is one of the MIP modes pre-set before decoding the current image block.
[0025] In a fifth aspect, an embodiment of the present application provides a decoder, comprising:
[0026] A processor and a storage medium storing instructions executable by the processor, wherein the storage medium relies on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, the mapping method described in one or more of the above embodiments is executed.
[0027] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processors execute the mapping method described in one or more of the above embodiments.
[0028] An embodiment of the present application provides a mapping method, an encoder, a decoder, and a computer storage medium. The method can be applied to an encoder or a decoder. The method may include: determining an intra-frame prediction mode used when encoding or decoding a current image block; if the intra-frame prediction mode is a MIP mode, mapping the MIP mode to a first non-MIP mode; if the intra-frame prediction mode is a non-MIP mode, mapping the non-MIP mode to a second MIP mode, wherein the non-MIP mode includes a DC intra-frame prediction mode, a planar intra-frame prediction mode, and a directional intra-frame prediction mode; the first non-MIP mode is one of the non-MIP modes pre-set before encoding or decoding the current image block, and the second MIP mode is pre-set before encoding or decoding the current image block. One of the MIP modes; that is, in an embodiment of the present application, by judging the intra-frame prediction mode used when encoding or decoding the current image block, the type of the intra-frame prediction mode is known. When the intra-frame prediction mode used is the MIP mode, the MIP mode is mapped to one of the pre-set non-MIP modes. When the intra-frame prediction mode used is the MIP mode, the MIP mode is mapped to one of the pre-set MIP modes. In this way, the query of multiple mapping tables in the existing mapping method is avoided, and there is no need to store all the tables required for mapping, which saves memory space, thereby simplifying the complexity of mapping between the MIP mode and the non-MIP mode, and can quickly realize the mapping between the MIP mode and the non-MIP mode, thereby improving the encoding and decoding rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 Schematic diagram of the arrangement of 67 prediction modes in intra-frame prediction;
[0030] Figure 2 Schematic diagram of the process of encoding for MIP mode;
[0031] Figure 3 Schematic diagram of the process of encoding intra mode for MIP list;
[0032] Figure 4 Schematic diagram of arrangement of upper adjacent image blocks and left adjacent image blocks of the luminance image block of the current image block;
[0033] Figure 5 A flowchart of the acquisition method for ABOVE and LEFT;
[0034] Figure 6 A flowchart of a method for obtaining ABOVE_MIP and LEFT_MIP;
[0035] Figure 7 Schematic diagram for determining the arrangement of DM mode;
[0036] Figure 8 It is a structural diagram of a video coding system;
[0037] Figure 9 It is a structural diagram of a video decoding system;
[0038] Figure 10 A flowchart of an optional mapping method provided in an embodiment of the present application;
[0039] Figure 11 A flowchart of an optional example of obtaining LEFT and ABOVE provided in an embodiment of the present application;
[0040] Figure 12 A flowchart of another optional example of obtaining LEFT and ABOVE provided in an embodiment of the present application;
[0041] Figure 13 A schematic diagram of an optional process for obtaining LEFT_MIP and ABOVE_MIP provided in an embodiment of the present application;
[0042] Figure 14 A schematic diagram of another optional example of obtaining LEFT_MIP and ABOVE_MIP provided in an embodiment of the present application;
[0043] Figure 15 A schematic diagram of the structure of an optional encoder proposed in an embodiment of the present application;
[0044] Figure 16 A schematic diagram of the structure of another optional encoder proposed in an embodiment of the present application;
[0045] Figure 17 A schematic diagram of the structure of an optional decoder proposed in an embodiment of the present application;
[0046] Figure 18 A schematic structural diagram of another optional decoder proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0047] 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 should be understood that the specific embodiments described herein are only used to explain the related applications and are not intended to limit the applications. It should also be noted that for ease of description, only the parts relevant to the related applications are shown in the drawings.
[0048] In video images, the latest Versatile Video Coding (VVC) (draft 5) accepted the affine linear weighted intra prediction technology (Affine Linear Weighted Intra Prediction) proposed in the Joint Video Experts Team (JVET)-N0217 and renamed it as the matrix-based intra prediction (MIP) technology. This technology adds different numbers of matrix-based intra prediction modes in the intra brightness prediction process according to the different sizes of intra brightness codec blocks.
[0049] 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 (HEVC, High Efficiency Video Coding) to 65. Figure 1 This is a schematic diagram of the arrangement of 67 prediction modes in intra-frame prediction, such as Figure 1 As shown in the figure, the arrows numbered 2-66 represent 65 intra-frame angle prediction modes, and there are two non-angle modes, namely the planar intra-frame prediction mode Planar numbered 0 and the DC intra-frame prediction mode DC 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 intra-frame prediction modes.
[0050] Among them, the MIP technology divides the luminance blocks into three categories according to the size of the luminance codec block within the frame. Assuming the luminance block size is W*H, the luminance blocks can be divided into three categories according to the size of the luminance block:
[0051] The luminance block with a size of 4×4 belongs to the first type of luminance block, the luminance blocks with sizes of 8×4, 4×8 and 8×8 belong to the second type of luminance block, and the luminance blocks of other sizes belong to the third type of luminance block.
[0052] For these three types of intra-frame luminance codec blocks, MIP technology adds M MIP modes on the basis of 67 intra-frame prediction modes:
[0053] For the first type of luminance blocks, M=35, for the second type of luminance blocks, M=19, and for the third type of luminance blocks, M=11.
[0054] Specifically, MIP technology is only used for intra-frame brightness prediction. Similar to the non-MIP mode, the input of MIP prediction is also the data of the previous row and left column of the current block (equivalent to the current image block mentioned below), 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. That is to say, by performing these three operations on the reconstructed brightness values of adjacent pixels in the previous row and left column of the input, the brightness prediction value of the current block can be obtained.
[0055] Figure 2 The flowchart for encoding the MIP mode is as follows: Figure 2 As shown, the specific implementation is as follows:
[0056] Step 1: Perform an average operation on the upper adjacent reference points of the current luminance 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 luminance block left , a total of N values. When the luminance block size is the first type of block, N = 2; when the luminance block size is the second or third type of block, N = 4. Vector bdry top and vector bdry left Form a new vector bdry red and perform subsequent operations;
[0057] Step 2: Get the corresponding matrix A through pattern number k 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 :
[0058] Pred red =A k ·bdry red +b k (1)
[0059] Step 3: Obtain the remaining predicted value Pred in the current image block through linear interpolation red .
[0060] In addition, the encoding process based on MIP technology requires that the specific encoding mode used for intra-frame prediction be written into the compressed bitstream. The decoding end parses the mode information to determine which mode to use, non-MIP mode or MIP mode; if it is non-MIP mode, which non-MIP mode to use; if it is MIP mode, which MIP mode to use.
[0061] It should be noted that in the intra-frame prediction of VVC, the encoder compares the rate-distortion cost RDcost of 67 non-MIP modes and M MIP modes for each luminance block, selects the optimal mode (equivalent to the optimal intra-frame prediction mode described below) and encodes it.
[0062] However, in the encoder and decoder, in order to save bit overhead, VVC uses intra-frame prediction technology based on MPM list. Figure 3 A flow chart of encoding the intra-frame mode of the MPM list is shown as follows: Figure 3 As shown, the method may include:
[0063] S301: First, use a conventional encoder to encode mip_flag: If the optimal mode (equivalent to the optimal intra prediction mode described below) is the MIP mode, execute S302; otherwise, execute S303;
[0064] S302: Perform regular encoding 1, and execute S304;
[0065] S304: Construct MIP_MPM and execute S305;
[0066] S305: mip_flag is 1, use the conventional encoder to encode mip_mpm_flag: if the optimal mode is in MIP_MPM, execute S306, otherwise execute S307;
[0067] S306: Perform regular encoding 1, and execute S308;
[0068] S308: If mip_mpm_flag is 1, use the unary truncation code to encode the position in the MIP_MPM list:
[0069] If the optimal mode is the first in the MIP_MPM list: bypass code 0;
[0070] If the optimal mode is in the second position in the MIP_MPM list: bypass code 10;
[0071] If the optimal mode is in the third position in the MIP_MPM list: bypass code 11;
[0072] S307: If mip_mpm_flag is 0, update the optimal mode number and execute S309;
[0073] S309: All modes are removed from the MIP_MPM list and renumbered, and then S310 is executed;
[0074] S310: Encode the updated optimal mode number using the bypass encoder, and end.
[0075] S303: Perform regular encoding 0 and execute S311;
[0076] S311: mip_flag is 0, conventional encoding uses reference rows 0, 1, and 3, and executes S312;
[0077] S312: Whether to use 1 or 3 reference rows, if yes, execute S313; if no, execute S314;
[0078] S313: Construct MPM and execute S321;
[0079] S314: Determine whether the optimal mode is the ISP mode. If yes, execute S315; if no, execute S316.
[0080] S315: conventional encoder encodes isp_flag: encodes ISP mode, and executes S313;
[0081] S316: Conventional code 0, execute S317;
[0082] S317: Construct MPM and execute S318;
[0083] S318: Conventional encoder encodes mpm_flag: Determine whether the optimal mode is in the MPM. If yes, execute S319; if not, execute S320.
[0084] S319: Conventional code 1, executing S321;
[0085] S320: Conventional code 0, execute S325;
[0086] S325: Update the optimal mode number, remove all modes from the MPM list and renumber them, and execute S326;
[0087] S326: Encode the updated optimal mode number using a binary truncation code, and end.
[0088] S321: Determine whether the optimal mode is the Planar mode. If yes, execute S322; if no, execute S323.
[0089] S322: If the optimal mode is at the first place in the MPM list, the optimal mode is the PLANAR mode: conventional coding 0, end.
[0090] S323: Conventional encoding 1, executing S324;
[0091] S324: If mpm_flag is 1, use the unary truncation code to encode the position in the MPM list:
[0092] If the optimal mode is the second in the MPM list: bypass code 10;
[0093] If the optimal mode is in the third position in the MPM list: bypass code 110;
[0094] If the optimal mode is in the fourth position in the MPM list: bypass code 1110;
[0095] If the optimal mode is in the fifth position of the MPM list: bypass code 11110;
[0096] If the optimal mode is in the sixth position in the MPM list: bypass code 11111.
[0097] It should be noted that since the multiple reference line technology (extend reference line) and intra-frame sub-block division technology (ISP, Itra Sub-Patitionar) are only used for the modes in the MPM list, when extend_ref_flag and isp_flag are both 0 (that is, 0 reference line is used and no sub-block division is performed), it is not necessary to encode mpm_flag, and the position of the optimal mode in the MPM list can be directly encoded.
[0098] Regarding the construction of MPM lists and MIP_MPM lists, in VVC luminance intra-frame prediction, if the optimal mode selected for the current luminance block is a non-MIP mode, it is necessary to construct an MPM list containing 6 most likely non-MIP modes; if the optimal mode selected for the current luminance block is a MIP mode, it is necessary to construct a MIP_MPM list containing 3 most likely MIP modes.
[0099] here, Figure 4 is a schematic diagram of the arrangement of the upper adjacent image blocks and the left adjacent image blocks of the brightness image block of the current image block, as shown in Figure 4 As shown, the above two lists are based on Figure 4 The optimal modes of the upper adjacent image block (A) and the left adjacent image block (L) of the current luminance block shown (equivalent to the luminance image block of the current image block described below) are derived.
[0100] Specifically, for the construction of the MPM list, in VVC intra-frame prediction, if the optimal mode of the current luminance block is a non-MIP mode, then the MPM list needs to be constructed. In the process of constructing the MPM list, it is first necessary to obtain the non-MIP mode ABOVE corresponding to the optimal mode of the upper adjacent block and the non-MIP mode LEFT corresponding to the optimal mode of the left adjacent block. Figure 5 A flowchart of the acquisition method of ABOVE and LEFT is shown below. Figure 5 As shown, the acquisition method may include:
[0101] S501: Initialize the non-MIP mode LEFT corresponding to the optimal mode of the left adjacent block and the non-MIP mode ABOVE corresponding to the optimal mode of the upper adjacent block to default values, where LEFT=0, ABOVE=0, and execute S502;
[0102] S502: Determine whether the left adjacent block exists. If so, execute S503; if not, execute S507.
[0103] S503: Determine whether the optimal mode of the left adjacent block is the MIP mode. If yes, execute S505; if no, execute S504.
[0104] S504: Update LEFT with the value of the mode of the left adjacent block, and execute S507;
[0105] S505: Map the optimal mode through the "MIP-traditional mapping table" and execute S506;
[0106] S506: Update LEFT with the mapped value and execute S507;
[0107] S507: Determine whether an upper adjacent block exists, and determine whether the upper adjacent block and the current block are in the same Coding Tree Unit (CTU). If both are yes, execute S508; otherwise, end.
[0108] S508: Determine whether the optimal mode of the upper adjacent block is the MIP mode. If yes, execute S509; if no, execute S511.
[0109] S509: Map the optimal mode using the "MIP-traditional mapping table" and execute S510;
[0110] S510: Update ABOVE with the mapped value, and end.
[0111] S511: Update ABOVE with the value of the pattern of the upper adjacent block, and end.
[0112] After obtaining LEFT and ABOVE, the MPM list is constructed as follows, where the Planar mode is numbered 0, the DC mode is numbered 1, the vertical mode is numbered 50, and the horizontal mode is numbered 18:
[0113] If LEFT and ABOVE are both non-angle modes:
[0114] MPMlist={Planar, DC, VER, HOR, VER-4, VER+4};
[0115] If LEFT and ABOVE are both angular modes (equivalent to the directional intra prediction modes described below) and non-angular modes, then let MAX be the larger mode number (i.e., the angular mode number):
[0116] MPMlist={Planar, MAX, DC, MAX-1, MAX+1, MAX-2};
[0117] If LEFT and ABOVE are both angle modes and are different, let MAX be the higher-numbered mode number:
[0118] If the difference between LEFT and ABOVE is between 2 and 66:
[0119] MPMlist={Planar, LEFT, ABOVE, DC, MAX-1, MAX+1};
[0120] otherwise:
[0121] MPMlist={Planar, LEFT, ABOVE, DC, MAX-2, MAX+2};
[0122] If LEFT and ABOVE are the same angle mode:
[0123] MPMlist={Planar, LEFT, LEFT-1, LEFT+1, DC, LEFT-2};
[0124] In addition, for the construction of the MIP_MPM list, in VVC intra-frame prediction, if the optimal mode of the current luminance block is the MIP mode, then the MIP_MPM list needs to be constructed. In the process of constructing the MIP_MPM list, it is first necessary to obtain the MIP mode ABOVE_MIP corresponding to the optimal mode of the upper adjacent block and the MIP mode LEFT_MIP corresponding to the optimal mode of the left adjacent block. Figure 6 A flowchart of the method for obtaining ABOVE_MIP and LEFT_MIP is shown in FIG. Figure 6 As shown, the acquisition method may include:
[0125] S601: Initialize LEFT_MIP and ABOVE_MIP to a default value of -1 (unavailable), where LEFT_MIP = -1, ABOVE_MIP = -1, and execute S602;
[0126] S602: Determine whether the left adjacent block exists. If so, execute S603; if not, execute S608.
[0127] S603: Determine whether the optimal mode of the left adjacent block is the MIP mode. If yes, execute S604; if no, execute S606.
[0128] S604: Determine whether the type of the left adjacent block is the same as the type of the current block. If so, execute S605; if not, execute S608.
[0129] S605: Update LEFT_MIP with the value of the mode of the left adjacent block, and execute S608;
[0130] S606: Map the optimal mode using the "traditional-MIP mapping table" and execute S607;
[0131] S607: Update LEFT_MIP with the mapped value and execute S608;
[0132] S608: Determine whether an upper adjacent block exists, and determine whether the upper adjacent block and the current block are in the same CTU. If both are yes, execute S609; otherwise, end.
[0133] S609: Determine whether the optimal mode of the upper adjacent block is the MIP mode. If yes, execute S610; if no, execute S612.
[0134] S610: Determine whether the type of the upper adjacent block is the same as the type of the current block. If so, proceed to S611; if not, terminate.
[0135] S611: Update ABOVE_MIP with the value of the mode of the upper adjacent block, and end;
[0136] S612: Map the optimal mode using the "traditional-MIP mapping table" and execute S613;
[0137] S613: Update ABOVE_MIP with the mapped value, and end.
[0138] In addition, after obtaining LEFT_MIP and ABOVE_MIP, the MIP_MPM list containing the three most likely MIP_MPM modes is constructed as follows, where the number in MIP_MPM is the number of the MIP mode, ranging from 0 to (M-1), and 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:
[0139] If LEFT_MIP is available (not -1), put LEFT_MIP into MIP_MPMlist;
[0140] If ABOVE_MIP is available (not -1), put ABOVE_MIP into MIP_MPMlist after passing redundancy check;
[0141] 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 MIP_MPMlist is filled:
[0142] The default list of the first type of luminance block is: {17, 34, 5};
[0143] The default list of the second type of luminance block is: {0, 7, 16};
[0144] The default list of the third type of luminance blocks is: {1, 4, 6}.
[0145] Here, it needs to be supplemented 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 same luminance block corresponding to the current luminance block is used to perform intra prediction of the current chroma block. Figure 7 To determine the arrangement diagram of DM mode, as shown in Figure 7 As shown in Figure 7 When the intra prediction mode of the CR position is the MIP mode, the MIP mode needs to be mapped to the non-MIP mode through the "MIP-traditional mapping table" to perform intra prediction of the current chroma block.
[0146] That is, due to the introduction of MIP technology, in the intra-frame prediction process, when constructing the MIP_MPM list, the non-MIP mode needs to be mapped to the MIP mode, and when constructing the MPM list and determining the DM mode, the MIP mode needs to be mapped to the non-MIP mode.
[0147] However, in practical applications, the above Figure 6 As can be seen, the MIP_MPM list construction process requires the use of non-MIP mode to MIP mode mapping. Specifically, the non-MIP mode is mapped to the MIP mode through the "Legacy-MIP Mapping Table." Specifically, the following Table 1 ("65-33 Mapping Table") first maps the 65 angle modes (numbered 2 to 66) to the 33 angle modes (numbered 2 to 34), while the non-angle mode numbers remain unchanged. The "65-33 Mapping Table" is shown in Table 1 below:
[0148] Table 1
[0149] Traditional model 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Angle Mode 0 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 Traditional model 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Angle Mode 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 Traditional model 34 35 36 37 38 39 40 41 42 43 44 45 49 47 48 49 50 Angle Mode 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 Traditional model 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 Angle Mode 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34
[0150] Then, the 33 angle modes are converted into 35 / 19 / 11 MIP modes through the “traditional-MIP mapping table”. For the three types of luminance blocks, the three “traditional-MIP mapping tables” are shown in Table 2, Table 3 and Table 4.
[0151] Table 2
[0152]
[0153] Table 3
[0154]
[0155]
[0156] Table 4
[0157]
[0158] Furthermore, the MPM list construction process and DM mode acquisition process require mapping MIP modes to non-MIP modes. Specifically, the "MIP-Legacy Mapping Table" maps 35, 19, and 11 MIP modes to 67 legacy modes. Tables 5, 6, and 7 show the three "MIP-Legacy Mapping Tables" for the three types of luma blocks.
[0159] Table 5
[0160]
[0161] Table 6
[0162]
[0163] Table 7
[0164]
[0165] It should be noted that the traditional modes in Tables 1 to 7 above are equivalent to the non-MIP modes in the embodiments of the present application.
[0166] Figure 8 It is a structural diagram of the video coding system. Figure 8As shown, the video coding system 800 includes a transform and quantization module 801, an intra-frame estimation module 802, an intra-frame prediction module 803, a motion compensation module 804, a motion estimation module 805, an inverse transform and inverse quantization module 806, a filter control analysis module 807, a deblocking filter and sample adaptive offset (SAO) filter module 808, a header information encoding and context-based adaptive binary arithmetic coding (CABAC) encoding module 809, and a decoded image buffer module 810. Figure 9 It is a structural diagram of the video decoding system, such as Figure 9 As shown, the video decoding system 900 includes components such as a header information decoding and CABAC decoding module 901, an inverse transform and inverse quantization module 902, an intra-frame prediction module 903, a motion compensation module 904, a deblocking filter and SAO filter module 905, and a decoded image buffer module 906. After the video image is processed by the transform and quantization module 801, the intra-frame estimation module 802, the intra-frame prediction module 803, the motion compensation module 804, the motion estimation module 805, the deblocking filter and SAO filter module 808, and the header information encoding and CABAC module 809 in the video encoding system 800, a bitstream of the video image is output. The bitstream is input to the video decoding system 900, and is processed by the header information decoding and CABAC decoding module 901, the inverse transform and inverse quantization module 902, the intra-frame prediction module 903, and the motion compensation module 904 in the video decoding system 900 to ultimately restore the original video image.
[0167] The above-mentioned "MIP-traditional mapping table" and "traditional-MIP mapping table" are mainly used in the intra-frame prediction module 803 and the header information encoding and CABAC encoding module 809 in video encoding, and in the intra-frame prediction module 903 and the header information encoding and CABAC decoding module 909 in video decoding, and act on both the encoding end and the decoding end.
[0168] Based on the introduction of MIP technology, VVC requires mutual mapping between non-MIP mode and MIP mode. Specifically, in the process of constructing the MIP_MPM list, the "65-33 mapping table" and the "traditional-MIP mapping table" need to be used to map the non-MIP mode to the MIP mode; in the process of constructing the MPM list and obtaining the DM mode, the "MIP-traditional mapping table" needs to be used to map the MIP mode to the non-MIP mode. However, this mapping process is very cumbersome and increases the complexity. At the same time, since all the tables required for the mapping need to be stored on the codec end, a certain amount of memory space is occupied.
[0169] The embodiment of the present application provides a mapping method. Figure 10 A flowchart of an optional mapping method provided in an embodiment of the present application is shown as follows: Figure 10 As shown, the method can be applied to an encoder or a decoder, and the method may include:
[0170] S1001: Determine the intra-frame prediction mode used when encoding or decoding the current image block;
[0171] S1002: If the intra prediction mode is the MIP mode, map the MIP mode to a first non-MIP mode;
[0172] S1003: If the intra prediction mode is a non-MIP mode, map the non-MIP mode to a second MIP mode;
[0173] Among them, the non-MIP mode includes a direct current intra-frame prediction mode DC, a planar intra-frame prediction mode Planar and a directional intra-frame prediction mode; the first non-MIP mode is one of the non-MIP modes pre-set before encoding or decoding the current image block, and the second MIP mode is one of the MIP modes pre-set before encoding or decoding the current image block.
[0174] The direction prediction mode may be 65 angle prediction modes numbered 2-66.
[0175] It should be noted that the above-mentioned current image block can be referred to as the current image block to be encoded when the encoder performs encoding, and can be referred to as the current image block to be decoded when the decoder performs decoding. Here, the embodiment of the present application does not make specific limitations.
[0176] Based on the complexity of the above mapping, in order to reduce the complexity of the mapping and improve the encoding and decoding rate, when mapping the MIP mode to the non-MIP mode, for example, when mapping the MIP mode to the non-MIP mode, the MIP mode is directly mapped to a pre-specified mode in the non-MIP mode, or when mapping the non-MIP mode to the MIP mode, the non-MIP mode is directly mapped to a pre-specified mode in the MIP mode. In this way, the encoding and decoding complexity caused by multiple queries using the mapping table is avoided, thereby improving the encoding and decoding rate.
[0177] It should be noted that, in actual applications, mapping the MIP mode to the non-MIP mode may include mapping the MIP mode to the non-MIP mode during the determination of the DM mode, and may also include mapping the MIP mode to the non-MIP mode when constructing the MPM list. In mapping the non-MIP mode to the MIP mode, it may be necessary to map the non-MIP mode to the MIP mode when constructing the MIP_MPM list. The above mapping method can be described in three usage scenarios below:
[0178] First, in the process of determining the DM mode, in order to determine the intra-frame prediction mode of the chrominance component of the image at the same position, in an optional embodiment, S1002 may include:
[0179] When it is determined that the intra-frame prediction mode for encoding or decoding the image luminance component of the current image block belongs to the MIP mode, mapping the intra-frame prediction mode for encoding or decoding the image luminance component of the current image block to a first non-MIP mode;
[0180] The first non-MIP mode is determined as the intra prediction mode for encoding or decoding the image chrominance component of the current image block, so as to encode or decode the image chrominance component of the current image block.
[0181] Here, in actual applications, if the intra-frame prediction mode of the image luminance component is known and the intra-frame prediction mode belongs to the MIP mode, mapping is no longer performed through the "MIP-traditional mapping table", but the DM mode is directly obtained as the first non-MIP mode. For example, the first non-MIP mode can be Planar or DC, and the image chrominance component of the current image block is predicted.
[0182] When constructing the MPM list, in order to reduce the complexity of mapping, in an optional embodiment, S1002 may include:
[0183] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from an encoded or decoded image block of the current image block;
[0184] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, mapping the optimal intra prediction mode of the left adjacent image block to a first non-MIP mode, and updating the value of the non-MIP mode LEFT corresponding to the optimal intra prediction mode of the left adjacent image block with the value of the first non-MIP mode;
[0185] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block belongs to the MIP mode, the optimal intra prediction mode of the upper adjacent image block is mapped to the first non-MIP mode, and the value of the non-MIP mode ABOVE corresponding to the optimal intra prediction mode of the upper adjacent image block is updated with the value of the first non-MIP mode;
[0186] According to the value of LEFT and the value of ABOVE, an MPM list is constructed to encode or decode the current image block.
[0187] Specifically, first, obtain the left adjacent image block and the upper adjacent image block, first determine whether the left adjacent image block exists, if not, maintain the initial default value of LEFT 0, if it exists, and the optimal intra-frame prediction mode of the left adjacent image block belongs to the MIP mode, in order to reduce the complexity of the mapping, the mapping table is not used here to complete the mapping, but the optimal intra-frame prediction mode of the left adjacent image block is directly mapped to the first non-MIP mode, and the value of LEFT is updated with the value of the first non-MIP mode. In this way, the value of LEFT can be determined. The value of LEFT obtained here may be the initial default value, or it may be the value after updating the initial default value.
[0188] Then determine whether the upper adjacent image block exists. If so, and the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, this matter needs to be mapped. In order to reduce the complexity of the mapping, the mapping table is not used here to complete the mapping. Instead, the optimal intra-frame prediction mode of the upper adjacent image block is directly mapped to the first non-MIP mode, and the value of ABOVE is updated with the value of the first non-MIP mode. In this way, the value of ABOVE can be determined. The value of ABOVE obtained here may be the initial default value, or it may be the value after updating the initial default value.
[0189] Finally, the value of LEFT and the value of ABOVE are used to construct the MPM list.
[0190] In addition, when constructing the MPM list, in order to reduce the complexity of mapping, in an optional embodiment, S1002 may include:
[0191] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from an encoded or decoded image block of the current image block;
[0192] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, mapping is disabled and the value of LEFT is maintained at the default value;
[0193] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block belongs to the MIP mode, mapping is prohibited and the value of ABOVE is maintained at the default value;
[0194] According to the value of LEFT and the value of ABOVE, an MPM list is constructed to encode or decode the current image block.
[0195] Here, after obtaining the left adjacent image block and the upper adjacent image block, when it is determined that the optimal intra-frame prediction mode of the left adjacent image block belongs to the MIP mode, not only is the mapping table not used, but the MIP mode is not mapped, that is, mapping is prohibited. Then, the value of LEFT remains the initial default value of 0, which is equivalent to mapping the MIP mode to Planar with the first non-MIP mode being 0. Similarly, when it is determined that the upper adjacent image block and the current image block are in the same CTU and the optimal intra-frame prediction mode belongs to the MIP mode, mapping is prohibited, which is equivalent to mapping the MIP mode to Planar with the first non-MIP mode being 0. Then, the value of ABOVE remains the initial default value of 0.
[0196] Finally, the value of LEFT and the value of ABOVE are used to construct the MPM list.
[0197] In addition, for a case where mapping is not required, in an optional embodiment, after obtaining the left adjacent image block and the upper adjacent image block of the current image block from the encoded or decoded image block of the current image block, and before constructing the MPM list according to the value of LEFT and the value of ABOVE to encode or decode the current image block, the method further includes:
[0198] When the optimal intra prediction mode of the left adjacent image block belongs to the non-MIP mode, the value of LEFT is updated with the value of the optimal intra prediction mode of the left adjacent image block;
[0199] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra-frame prediction mode of the upper adjacent image block is a non-MIP mode, the value of ABOVE is updated with the value of the optimal intra-frame prediction mode of the left adjacent image block.
[0200] That is to say, when the optimal intra-frame prediction mode of the left adjacent image block belongs to the non-MIP mode, mapping is not required, and the value of LEFT can be directly updated with the value of the optimal intra-frame prediction mode of the left adjacent image block; similarly, when the upper adjacent image block and the current image block are in the same CTU and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the non-MIP mode, mapping is not required, and the value of ABOVE can be directly updated with the value of the optimal intra-frame prediction mode of the upper adjacent image block.
[0201] Taking the first mode, Planar mode, as an example, Figure 11 A flowchart of an optional example of obtaining LEFT and ABOVE is provided in an embodiment of the present application, such as Figure 11 As shown, the method may include:
[0202] S1101: Initialize LEFT and ABOVE to the default value 0, LEFT = 0, ABOVE = 0, and execute S1102;
[0203] S1102: Determine whether a left adjacent block (equivalent to the above-mentioned left adjacent image block) exists. If so, execute S1103; if not, execute S1106;
[0204] S1103: Determine whether the optimal mode (equivalent to the optimal intra prediction mode) of the left adjacent block is the MIP mode. If yes, execute S1105; if not, execute S1104.
[0205] S1104: Update the value of LEFT using the value of the optimal mode of the left adjacent block (equivalent to the above-mentioned left adjacent image block) being the non-MIP mode, and execute S1106;
[0206] S1105: Update the value of LEFT to 0 and execute S1106;
[0207] S1106: Determine whether the upper adjacent block exists, and determine whether the upper adjacent block and the current block (equivalent to the above-mentioned current image block) are in the same CTU. If so, execute S1107; otherwise, end.
[0208] S1107: Determine whether the optimal mode of the upper adjacent block is the MIP mode. If yes, execute S1108; if no, execute S1109;
[0209] S1108: Update the value of LEFT to 0, and end.
[0210] S1109: Update the value of ABOVE with the value of the optimal mode of the upper adjacent block, and end.
[0211] Since the default values of LEFT and ABOVE are 0 during the construction of the MPM list, you can Figure 11 Modify and get Figure 12 , Figure 12 A flowchart of another optional example of obtaining LEFT and ABOVE provided in an embodiment of the present application is shown as follows: Figure 12 As shown, the method may include:
[0212] S1201: Initialize LEFT and ABOVE to the default value 0, LEFT = 0, ABOVE = 0, and execute S1202;
[0213] S1202: Determine whether the left adjacent block exists. If so, execute S1203; if not, execute S1205;
[0214] S1203: Determine whether the optimal mode of the left adjacent block is the MIP mode. If yes, execute S1205; if no, execute S1204;
[0215] S1204: Update the value of LEFT with the value of the optimal mode of the left adjacent block, and execute S1205;
[0216] S1205: Determine whether an upper adjacent block exists, and determine whether the upper adjacent block and the current block are in the same CTU. If so, execute S1206; otherwise, end.
[0217] S1206: Determine whether the optimal mode of the upper adjacent block is the MIP mode. If yes, end; if no, execute S1207;
[0218] S1207: Update the value of ABOVE with the value of the optimal mode of the upper adjacent block, and end.
[0219] When constructing the MIP_MPM list, in order to reduce the complexity of mapping, in an optional embodiment, S1003 may include:
[0220] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from an encoded or decoded image block of the current image block;
[0221] When the optimal intra prediction mode of the left adjacent image block belongs to a non-MIP mode, mapping the optimal intra prediction mode of the left adjacent image block to a second MIP mode, and updating the value of the MIP mode LEFT_MIP corresponding to the optimal intra prediction mode of the left adjacent image block with the value of the second MIP mode;
[0222] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block is a non-MIP mode, the optimal intra prediction mode of the upper adjacent image block is mapped to the second MIP mode, and the value of the MIP mode ABOVE_MIP corresponding to the optimal intra prediction mode of the upper adjacent image block is updated with the value of the second MIP mode;
[0223] According to the values of LEFT_MIP and ABOVE_MIP, a MIP_MPM list is constructed to encode or decode the current image block.
[0224] Here, after obtaining the left adjacent image block and the upper adjacent image block, when it is first determined that the left adjacent image block belongs to a non-MIP mode, in order to avoid using the mapping table, the optimal intra-frame prediction mode of the left adjacent image block is mapped to the second MIP mode, and the value of the second MIP mode is used to update the value of LEFT_MIP; similarly, when it is determined that the upper adjacent image block and the current image block are in the same CTU and the optimal intra-frame prediction mode of the upper adjacent image block belongs to a non-MIP mode, the optimal intra-frame prediction mode of the upper adjacent image block is mapped to the second MIP mode, and the value of the second MIP mode is used to update the value of ABOVE_MIP; finally, the value of LEFT_MIP and the value of ABOVE_MIP are used to construct a MIP_MPM list to achieve encoding or decoding.
[0225] In this way, the non-MIP mode is directly mapped to the pre-specified MIP mode without using a complicated mapping table, which reduces the complexity of mapping and thus improves the encoding and decoding rate.
[0226] When constructing the MIP_MPM list, in order to reduce the complexity of mapping, in an optional embodiment, S1003 may include:
[0227] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from an encoded or decoded image block of the current image block;
[0228] When the optimal intra prediction mode of the left adjacent image block belongs to a non-MIP mode, determine a second MIP mode according to the type of the current image block, map the optimal intra prediction mode of the left adjacent image block to the second MIP mode, and update the value of LEFT_MIP with the value of the second MIP mode;
[0229] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra prediction mode of the upper adjacent image block belongs to the non-MIP mode, determining a second MIP mode according to the type of the current image block, mapping the optimal intra prediction mode of the upper adjacent image block to the second MIP mode, and updating the value of ABOVE_MIP with the value of the second MIP mode;
[0230] According to the value of LEFT_MIP and the value of ABOVE_MIP, a MIP_MPM list is constructed to encode or decode the current image block.
[0231] That is to say, after obtaining the left adjacent image block and the upper adjacent image block, if it is determined that the optimal intra-frame prediction mode of the left adjacent image block belongs to the non-MIP mode, mapping is required at this time. The second MIP mode can be first determined according to the type of the current image block. For example, when the current image block belongs to the first type of luminance block, there is a corresponding MIP mode. When the current image block belongs to the second type of luminance block, there is a corresponding MIP mode. When the current image block belongs to the third type of luminance block, there is a corresponding MIP mode. In this way, the corresponding MIP mode, that is, the second MIP mode, can be determined according to the type of the current image block, and then the non-MIP mode is mapped to the determined corresponding second MIP mode, and the value of the corresponding second MIP mode is used to update the value of LEFT_MIP; the method for the upper adjacent image block is similar and will not be repeated here.
[0232] Finally, the MIP_MPM list is constructed using the values of LEFT_MIP and ABOVE_MIP to complete the encoding and decoding of the current image block.
[0233] When constructing the MIP_MPM list, in order to reduce the complexity of mapping, in an optional embodiment, S1003 may include:
[0234] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from an encoded or decoded image block of the current image block;
[0235] When the optimal intra prediction mode of the left adjacent image block is a non-MIP mode, mapping is disabled and the value of LEFT_MIP is maintained at the default value;
[0236] When the optimal intra prediction mode of the upper adjacent image block is a non-MIP mode, mapping is disabled and the value of ABOVE_MIP is maintained at the default value;
[0237] According to the values of LEFT_MIP and ABOVE_MIP, a MIP_MPM list is constructed to encode or decode the current image block.
[0238] Here, after obtaining the left adjacent image block and the upper adjacent image block, if it is determined that the optimal intra-frame prediction mode of the left adjacent image block belongs to the non-MIP mode, mapping is directly prohibited at this time. Since the default value of LEFT_MIP is -1, LEFT_MIP=-1; similarly, for the upper adjacent image block, when mapping is required, mapping is prohibited, so that LEFT_MIP=-1. In this way, both LEFT_MIP and LEFT_MIP are unavailable, and then the default list can be added after redundancy check according to the type of the current block until MIP_MPMlist is filled, thereby constructing the MIP_MPM list; in this way, the encoding and decoding complexity brought by the adaptation mapping table is avoided.
[0239] In addition, when constructing the MIP_MPM list, for a case where mapping is not required, in an optional embodiment, after obtaining the left adjacent image block and the upper adjacent image block of the current image block from the encoded or decoded image block of the current image block, and before constructing the MIP_MPM list according to the value of LEFT_MIP and the value of ABOVE_MIP to encode or decode the current image block, the method further includes:
[0240] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, and the type of the left adjacent image block is the same as the type of the current image block, the value of LEFT_MIP is updated with the value of the optimal intra prediction mode of the left adjacent image block;
[0241] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the upper adjacent image block is the same as that of the current image block, the value of ABOVE_MIP is updated with the value of the optimal intra-frame prediction mode of the upper adjacent image block.
[0242] That is to say, when the optimal intra-frame prediction mode of the left adjacent image block belongs to the MIP mode, and the type of the left adjacent image block is the same as the type of the current image block, mapping is not required, and the value of the optimal intra-frame prediction mode of the left adjacent image block is directly used to update the value of LEFT_MIP; similarly, for the upper adjacent image block, when mapping is not required, the value of the optimal intra-frame prediction mode of the upper adjacent image block is directly used to update the value of ABOVE_MIP.
[0243] In this way, the updated value of LEFT_MIP and the updated value of ABOVE_MIP can be obtained to construct the MIP_MPM list.
[0244] In addition, when constructing the MIP_MPM list, for a case where mapping is not required, in an optional embodiment, after obtaining the left adjacent image block and the upper adjacent image block of the current image block from the encoded or decoded image block of the current image block, and before constructing the MIP_MPM list according to the value of LEFT_MIP and the value of ABOVE_MIP to encode or decode the current image block, the method further includes:
[0245] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, and the type of the left adjacent image block is different from the type of the current image block, the value of LEFT_MIP is updated to the value of the second MIP mode, or the value of LEFT_MIP is maintained at the default value;
[0246] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the upper adjacent image block is different from the type of the current image block, the value of ABOVE_MIP is updated to the value of the second MIP mode, or the value of ABOVE_MIP is maintained at the default value.
[0247] Here, for the left adjacent image block, when the optimal intra-frame prediction mode of the left adjacent image block belongs to the MIP mode, and the type of the left adjacent image block is different from the type of the current image block, no mapping is required at this time. Here, the value of LEFT_MIP can be updated to the value of the second MIP mode, or the value of LEFT_MIP can be maintained at the default value to update the LEFT_MIP value, which is beneficial to constructing the MIP_MPM list; similarly, for the upper adjacent image block, when the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the upper adjacent image block is different from the type of the current image block, no mapping is required at this time. Here, the value of ABOVE_MIP can be updated to the value of the second MIP mode, or the value of ABOVE_MIP can be maintained at the default value to update the ABOVE_MIP value, which is beneficial to constructing the MIP_MPM list.
[0248] Taking the second mode, Planar mode, as an example, Figure 13 A flowchart of an optional example of obtaining LEFT_MIP and ABOVE_MIP provided in an embodiment of the present application is shown as follows: Figure 13 The method may include:
[0249] S1301: Initialize LEFT_MIP and ABOVE_MIP to the default value -1, LEFT_MIP = -1, ABOVE_MIP = -1, and execute S1302;
[0250] S1302: Determine whether the left adjacent block exists. If so, execute S1303; if not, execute S1307.
[0251] S1303: Determine whether the optimal mode of the left adjacent block is the MIP mode. If yes, execute S1304; if no, execute S1306;
[0252] S1304: Determine whether the type of the left adjacent block is the same as the type of the current block. If so, execute S1305; if not, execute S1307.
[0253] S1305: Update the value of LEFT_MIP with the value of the optimal mode of the left adjacent block, and execute S1307;
[0254] S1306: Update the value of LEFT_MIP to 0, and execute S1307;
[0255] S1307: Determine whether an upper adjacent block exists, and determine whether the upper adjacent block and the current block are in the same CTU. If so, execute S1308; otherwise, end.
[0256] S1308: Determine whether the optimal mode of the upper adjacent block is the MIP mode. If yes, execute S1309; if not, execute S1311.
[0257] S1309: Determine whether the type of the upper adjacent block is the same as the type of the current block. If so, execute S1310; if not, end.
[0258] S1310: Update the value of ABOVE_MIP with the value of the optimal mode of the upper adjacent block, and end.
[0259] S1311: Update the value of ABOVE_MIP to 0, and end.
[0260] Still taking the second mode as Planar mode as an example, Figure 14 A flowchart of another optional example of obtaining LEFT_MIP and ABOVE_MIP provided in an embodiment of the present application is shown as follows: Figure 14 As shown, the method may include:
[0261] S1401: Initialize LEFT_MIP and ABOVE_MIP to the default value -1, LEFT_MIP = -1, ABOVE_MIP = -1, and execute S1402;
[0262] S1402: Determine whether the left adjacent block exists. If so, execute S1403; if not, execute S1407.
[0263] S1403: Determine whether the optimal mode of the left adjacent block is the MIP mode. If yes, execute S1404; if no, execute S1406;
[0264] S1404: Determine whether the type of the left adjacent block is the same as the type of the current block. If so, execute S1405; if not, execute S1406;
[0265] S1405: Update the value of LEFT_MIP with the value of the optimal mode of the left adjacent block, and execute S1407;
[0266] S1406: Update the value of LEFT_MIP to 0, and execute S1407;
[0267] S1407: Determine whether an upper adjacent block exists, and determine whether the upper adjacent block and the current block are in the same CTU. If so, execute S1408; otherwise, end.
[0268] S1408: Determine whether the optimal mode of the upper adjacent block is the MIP mode. If yes, execute S1409; if no, execute S1411.
[0269] S1409: Determine whether the type of the upper adjacent block is the same as the type of the current block. If so, execute S1410; if not, execute S1411.
[0270] S1410: Update the value of ABOVE_MIP with the value of the optimal mode of the upper adjacent block, and end.
[0271] S1411: Update the value of ABOVE_MIP to 0, and end.
[0272] In addition, when constructing the MIP_MPM list, for a case where mapping is not required, in an optional embodiment, after obtaining the left adjacent image block and the upper adjacent image block of the current image block from the encoded or decoded image block of the current image block, and before constructing the MIP_MPM list according to the value of LEFT_MIP and the value of ABOVE_MIP to encode or decode the current image block, the method further includes:
[0273] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, and the type of the left adjacent image block is different from the type of the current image block, a second MIP mode is determined according to the type of the left adjacent image block and the type of the current image block, and the value of LEFT_MIP is updated with the value of the second MIP mode;
[0274] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the left adjacent image block is different from the type of the current image block, the second MIP mode is determined according to the type of the upper adjacent image block and the type of the current image block, and the value of ABOVE_MIP is updated with the value of the second MIP mode.
[0275] Here, for scenes that do not require mapping, the second MIP mode can be determined based on the combination type between the type of the left adjacent image block and the type of the current image block. For example, when the left adjacent image block is a first-category luminance block and the current image block is a second-category luminance value, the corresponding second mode is the Planar mode. When the left adjacent image block is a first-category luminance block and the current image block is a third-category luminance value, the corresponding second MIP mode is the DC mode. Similarly, the values of the second MIP modes corresponding to different types of combinations can be determined in advance to determine the second MIP mode. Then, when mapping is not required, the values of the second MIP mode are updated with the values of the LEFT_MIP and ABOVE_MIP.
[0276] It should be noted that the mapping used in the construction of the above-mentioned DM mode and MPM list, and the mapping used in the construction of the MIP_MPM list can be combined with each other into multiple encoding and decoding methods, all of which fall within the scope of protection of this application. Here, the embodiments of this application do not specifically elaborate on the above-mentioned combination methods.
[0277] In addition, the mapping used in the construction of the DM mode and the MPM list in the embodiment of the present application, and the mapping used in the construction of the MIP_MPM list can be applied not only to the encoder, but also to the decoder, and will not be repeated here.
[0278] An embodiment of the present application provides a mapping method, which can be applied to an encoder or decoder. The method may include: determining an intra-frame prediction mode used when encoding or decoding a current image block; if the intra-frame prediction mode is a MIP mode, mapping the MIP mode to a first non-MIP mode; if the intra-frame prediction mode is a non-MIP mode, mapping the non-MIP mode to a second MIP mode, wherein the non-MIP mode includes a DC intra-frame prediction mode, a planar intra-frame prediction mode, and a directional intra-frame prediction mode; the first non-MIP mode is one of the non-MIP modes pre-set before encoding or decoding the current image block, and the second MIP mode is one of the MIP modes pre-set before encoding or decoding the current image block. that is, in an embodiment of the present application, the type of the intra-frame prediction mode is determined by judging the intra-frame prediction mode used when encoding or decoding the current image block. When the intra-frame prediction mode used is the MIP mode, the MIP mode is mapped to one of the pre-set non-MIP modes. When the intra-frame prediction mode used is the MIP mode, the MIP mode is mapped to one of the pre-set MIP modes. In this way, querying multiple mapping tables in the existing mapping method is avoided, and there is no need to store all the tables required for mapping, which saves memory space, thereby simplifying the complexity of mapping between the MIP mode and the traditional mode, and can quickly realize the mapping between the MIP mode and the traditional mode, thereby improving the encoding and decoding rate.
[0279] Example 2
[0280] Based on the same invention concept, Figure 15 This is a schematic diagram of the structure of an optional encoder proposed in an embodiment of the present application, such as Figure 15 As shown, the encoder proposed in the embodiment of the present application may include a first mapping module 151.
[0281] A first determination module 151 is configured to determine an intra-frame prediction mode to be used when encoding a current image block;
[0282] A first mapping module 152 is configured to map the MIP mode to a first non-MIP mode if the intra prediction mode is the MIP mode;
[0283] A second mapping module 153 is configured to map the non-MIP mode to a second MIP mode if the intra prediction mode is a non-MIP mode;
[0284] Among them, the non-MIP mode includes a DC intra-frame prediction mode, a planar intra-frame prediction mode and a directional intra-frame prediction mode; the first non-MIP mode is one of the non-MIP modes pre-set before encoding the current image block, and the second MIP mode is one of the MIP modes pre-set before encoding the current image block.
[0285] Furthermore, in the embodiment of the present application, the first mapping module 152 is specifically configured to:
[0286] When it is determined that the intra-frame prediction mode for encoding the image luminance component of the current image block belongs to the MIP mode, mapping the intra-frame prediction mode for encoding the image luminance component of the current image block to a first non-MIP mode;
[0287] The first non-MIP mode is determined as the intra prediction mode for encoding the image chrominance component of the current image block, so as to encode the image chrominance component of the current image block.
[0288] Furthermore, the first mapping module 152 is specifically configured to:
[0289] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the encoded image blocks of the current image block;
[0290] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, mapping the optimal intra prediction mode of the left adjacent image block to a first non-MIP mode, and updating the value of the non-MIP mode LEFT corresponding to the optimal intra prediction mode of the left adjacent image block with the value of the first non-MIP mode;
[0291] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block belongs to the MIP mode, the optimal intra prediction mode of the upper adjacent image block is mapped to the first non-MIP mode, and the value of the non-MIP mode ABOVE corresponding to the optimal intra prediction mode of the upper adjacent image block is updated with the value of the first non-MIP mode;
[0292] Based on the value of LEFT and the value of ABOVE, build the MPM list to encode the current image block.
[0293] Furthermore, the first mapping module 152 is specifically configured to:
[0294] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the encoded image blocks of the current image block;
[0295] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, mapping is prohibited, and the value of the non-MIP mode LEFT corresponding to the optimal intra prediction mode of the left adjacent image block is maintained at the default value;
[0296] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block is a MIP mode, mapping is prohibited and the value of the non-MIP mode ABOVE corresponding to the optimal intra prediction mode of the upper adjacent image block is maintained at the default value;
[0297] Based on the value of LEFT and the value of ABOVE, build the MPM list to encode the current image block.
[0298] Furthermore, the first mapping module 152 is further specifically configured to:
[0299] After obtaining the left adjacent image block and the above adjacent image block of the current image block from the coded image blocks of the current image block, and before constructing the MPM list according to the value of LEFT and the value of ABOVE to encode the current image block, when the optimal intra-frame prediction mode of the left adjacent image block belongs to the non-MIP mode, updating the value of LEFT with the value of the optimal intra-frame prediction mode of the left adjacent image block;
[0300] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra-frame prediction mode of the upper adjacent image block is a non-MIP mode, the value of ABOVE is updated with the value of the optimal intra-frame prediction mode of the left adjacent image block.
[0301] Furthermore, the second mapping module 153 is specifically configured to:
[0302] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the encoded image blocks of the current image block;
[0303] When the optimal intra prediction mode of the left adjacent image block belongs to a non-MIP mode, mapping the optimal intra prediction mode of the left adjacent image block to a second MIP mode, and updating the value of the MIP mode LEFT_MIP corresponding to the optimal intra prediction mode of the left adjacent image block with the value of the second MIP mode;
[0304] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block is a non-MIP mode, the optimal intra prediction mode of the upper adjacent image block is mapped to the second MIP mode, and the value of the MIP mode ABOVE_MIP corresponding to the optimal intra prediction mode of the upper adjacent image block is updated with the value of the second MIP mode;
[0305] According to the value of LEFT_MIP and the value of ABOVE_MIP, a MIP_MPM list is constructed to encode the current image block.
[0306] Furthermore, the second mapping module 153 is specifically configured to:
[0307] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the encoded image blocks of the current image block;
[0308] When the optimal intra prediction mode of the left adjacent image block belongs to a non-MIP mode, determining a second MIP mode according to the type of the current image block, mapping the optimal intra prediction mode of the left adjacent image block to the second MIP mode, and updating the value of the MIP mode LEFT_MIP corresponding to the optimal intra prediction mode of the left adjacent image block with the value of the second MIP mode;
[0309] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block is a non-MIP mode, determine the second MIP mode according to the type of the current image block, map the optimal intra prediction mode of the upper adjacent image block to the second MIP mode, and use the value of the second MIP mode to update the value of the MIP mode ABOVE_MIP corresponding to the optimal intra prediction mode of the upper adjacent image block;
[0310] According to the value of LEFT_MIP and the value of ABOVE_MIP, a MIP_MPM list is constructed to encode the current image block.
[0311] Furthermore, the second mapping module 153 is specifically configured to:
[0312] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the encoded image blocks of the current image block;
[0313] When the optimal intra prediction mode of the left adjacent image block belongs to a non-MIP mode, mapping is prohibited and the value of the MIP mode LEFT_MIP corresponding to the optimal intra prediction mode of the left adjacent image block is maintained at the default value;
[0314] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra prediction mode of the upper adjacent image block is a non-MIP mode, mapping is prohibited, and the value of the MIP mode ABOVE_MIP corresponding to the optimal intra prediction mode of the upper adjacent image block is maintained at the default value;
[0315] According to the value of LEFT_MIP and the value of ABOVE_MIP, a MIP_MPM list is constructed to encode the current image block.
[0316] Furthermore, the second mapping module 153 is further specifically configured to:
[0317] After obtaining the left neighboring image block and the above neighboring image block of the current image block from the coded image blocks of the current image block, and before constructing the MIP_MPM list according to the value of LEFT_MIP and the value of ABOVE_MIP to encode the current image block, when the optimal intra-frame prediction mode of the left neighboring image block belongs to the MIP mode and the type of the left neighboring image block is the same as the type of the current image block, updating the value of LEFT_MIP with the value of the optimal intra-frame prediction mode of the left neighboring image block;
[0318] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the upper adjacent image block is the same as that of the current image block, the value of ABOVE_MIP is updated with the value of the optimal intra-frame prediction mode of the upper adjacent image block.
[0319] Furthermore, the second mapping module 153 is further specifically configured to:
[0320] After obtaining the left neighboring image block and the above neighboring image block of the current image block from the coded image blocks of the current image block, and before constructing the MIP_MPM list according to the value of LEFT_MIP and the value of ABOVE_MIP to encode the current image block, when the optimal intra prediction mode of the left neighboring image block belongs to the MIP mode and the type of the left neighboring image block is different from the type of the current image block, updating the value of LEFT_MIP to the value of the second MIP mode, or maintaining the value of LEFT_MIP at the default value;
[0321] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the upper adjacent image block is different from the type of the current image block, the value of ABOVE_MIP is updated to the value of the second MIP mode, or the value of ABOVE_MIP is maintained at the default value.
[0322] Furthermore, the second mapping module 153 is further specifically configured to:
[0323] After obtaining a left-side neighboring image block and an above-side neighboring image block of the current image block from an already coded image block of the current image block, and before constructing a MIP_MPM list according to the value of LEFT_MIP and the value of ABOVE_MIP to encode the current image block, when the optimal intra-frame prediction mode of the left-side neighboring image block belongs to a MIP mode and the type of the left-side neighboring image block is different from the type of the current image block, determining a second MIP mode according to the type of the left-side neighboring image block and the type of the current image block, and updating the value of LEFT_MIP with the value of the second MIP mode;
[0324] When the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the left adjacent image block is different from the type of the current image block, a second MIP mode is determined according to the type of the upper adjacent image block and the type of the current image block, and the value of ABOVE_MIP is updated with the value of the second MIP mode.
[0325] Figure 16 This is a schematic diagram of the structure of another optional encoder proposed in the embodiment of the present application, such as Figure 16 As shown, the encoder 1600 proposed in the embodiment of the present application may also include a processor 161 and a storage medium 162 storing instructions executable by the processor 161. The storage medium 162 relies on the processor 161 to perform operations through the communication bus 163. When the instructions are executed by the processor 161, the mapping method described in one or more of the above embodiments is executed.
[0326] It should be noted that in actual application, the various components in the encoder are coupled together through the communication bus 163. It is understood that the communication bus 163 is used to achieve connection and communication between these components. In addition to the data bus, the communication bus 163 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 16 Various buses are labeled as communication buses 163.
[0327] Based on the same invention concept, Figure 17 This is a schematic diagram of the structure of an optional decoder proposed in an embodiment of the present application, such as Figure 17 As shown, the decoder may include:
[0328] A second determination module 171 is configured to determine an intra-frame prediction mode to be used when decoding a current image block;
[0329] a third mapping module 172 for mapping the MIP mode to a first non-MIP mode if the intra prediction mode is the MIP mode;
[0330] a fourth mapping module 173, configured to map the non-MIP mode to a second MIP mode if the intra prediction mode is a non-MIP mode;
[0331] Among them, the non-MIP mode includes a DC intra-frame prediction mode, a planar intra-frame prediction mode and a directional intra-frame prediction mode; the first non-MIP mode is one of the non-MIP modes pre-set before decoding the current image block, and the second MIP mode is one of the MIP modes pre-set before decoding the current image block.
[0332] Furthermore, in the embodiment of the present application, the third mapping module 172 is specifically configured to:
[0333] When it is determined that the intra-frame prediction mode for decoding the image luminance component of the current image block belongs to the MIP mode, mapping the intra-frame prediction mode for decoding the image luminance component of the current image block to a first non-MIP mode;
[0334] The first non-MIP mode is determined as the intra prediction mode for decoding the image chrominance component of the current image block, so as to decode the image chrominance component of the current image block.
[0335] Furthermore, the third mapping module 172 is specifically configured to:
[0336] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the decoded image blocks of the current image block;
[0337] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, mapping the optimal intra prediction mode of the left adjacent image block to a first non-MIP mode, and updating the value of the non-MIP mode LEFT corresponding to the optimal intra prediction mode of the left adjacent image block with the value of the first non-MIP mode;
[0338] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block belongs to the MIP mode, the optimal intra prediction mode of the upper adjacent image block is mapped to the first non-MIP mode, and the value of the non-MIP mode ABOVE corresponding to the optimal intra prediction mode of the upper adjacent image block is updated with the value of the first non-MIP mode;
[0339] Based on the value of LEFT and the value of ABOVE, build the MPM list to decode the current image block.
[0340] Furthermore, the third mapping module 172 is specifically configured to:
[0341] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the encoded image blocks of the current image block;
[0342] When the optimal intra prediction mode of the left adjacent image block belongs to the MIP mode, mapping is prohibited, and the value of the non-MIP mode LEFT corresponding to the optimal intra prediction mode of the left adjacent image block is maintained at the default value;
[0343] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block is a MIP mode, mapping is prohibited and the value of the non-MIP mode ABOVE corresponding to the optimal intra prediction mode of the upper adjacent image block is maintained at the default value;
[0344] Based on the value of LEFT and the value of ABOVE, build the MPM list to decode the current image block.
[0345] Furthermore, the third mapping module 172 is further specifically configured to:
[0346] After obtaining the left neighboring image block and the above neighboring image block of the current image block from the decoded image block of the current image block, and before constructing the MPM list according to the value of LEFT and the value of ABOVE to decode the current image block, when the optimal intra-frame prediction mode of the left neighboring image block belongs to the non-MIP mode, updating the value of LEFT with the value of the optimal intra-frame prediction mode of the left neighboring image block;
[0347] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra-frame prediction mode of the upper adjacent image block is a non-MIP mode, the value of ABOVE is updated with the value of the optimal intra-frame prediction mode of the left adjacent image block.
[0348] Furthermore, the fourth mapping module 173 is specifically configured to:
[0349] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the decoded image blocks of the current image block;
[0350] When the optimal intra prediction mode of the left adjacent image block belongs to a non-MIP mode, mapping the optimal intra prediction mode of the left adjacent image block to a second MIP mode, and updating the value of the MIP mode LEFT_MIP corresponding to the optimal intra prediction mode of the left adjacent image block with the value of the second MIP mode;
[0351] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block is a non-MIP mode, the optimal intra prediction mode of the upper adjacent image block is mapped to the second MIP mode, and the value of the MIP mode ABOVE_MIP corresponding to the optimal intra prediction mode of the upper adjacent image block is updated with the value of the second MIP mode;
[0352] According to the value of LEFT_MIP and the value of ABOVE_MIP, a MIP_MPM list is constructed to decode the current image block.
[0353] Furthermore, the fourth mapping module 173 is specifically configured to:
[0354] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the encoded image blocks of the current image block;
[0355] When the optimal intra prediction mode of the left adjacent image block belongs to a non-MIP mode, determining a second MIP mode according to the type of the current image block, mapping the optimal intra prediction mode of the left adjacent image block to the second MIP mode, and updating the value of the MIP mode LEFT_MIP corresponding to the optimal intra prediction mode of the left adjacent image block with the value of the second MIP mode;
[0356] When the upper adjacent image block and the current image block are in the same CTU and the optimal intra prediction mode of the upper adjacent image block is a non-MIP mode, determine the second MIP mode according to the type of the current image block, map the optimal intra prediction mode of the upper adjacent image block to the second MIP mode, and use the value of the second MIP mode to update the value of the MIP mode ABOVE_MIP corresponding to the optimal intra prediction mode of the upper adjacent image block;
[0357] According to the value of LEFT_MIP and the value of ABOVE_MIP, a MIP_MPM list is constructed to decode the current image block.
[0358] Furthermore, the fourth mapping module 173 is specifically configured to:
[0359] Obtaining a left adjacent image block and an upper adjacent image block of the current image block from the decoded image blocks of the current image block;
[0360] When the optimal intra prediction mode of the left adjacent image block belongs to a non-MIP mode, mapping is prohibited and the value of the MIP mode LEFT_MIP corresponding to the optimal intra prediction mode of the left adjacent image block is maintained at the default value;
[0361] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra prediction mode of the upper adjacent image block is a non-MIP mode, mapping is prohibited, and the value of the MIP mode ABOVE_MIP corresponding to the optimal intra prediction mode of the upper adjacent image block is maintained at the default value;
[0362] According to the value of LEFT_MIP and the value of ABOVE_MIP, a MIP_MPM list is constructed to decode the current image block.
[0363] Furthermore, the fourth mapping module 173 is further configured to:
[0364] After obtaining the left neighboring image block and the above neighboring image block of the current image block from the decoded image block of the current image block, and before constructing the MIP_MPM list based on the value of LEFT_MIP and the value of ABOVE_MIP to decode the current image block, when the optimal intra-frame prediction mode of the left neighboring image block belongs to the MIP mode and the type of the left neighboring image block is the same as the type of the current image block, updating the value of LEFT_MIP with the value of the optimal intra-frame prediction mode of the left neighboring image block;
[0365] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the upper adjacent image block is the same as that of the current image block, the value of ABOVE_MIP is updated with the value of the optimal intra-frame prediction mode of the upper adjacent image block.
[0366] Furthermore, the fourth mapping module 173 is further specifically configured to:
[0367] After obtaining the left neighboring image block and the above neighboring image block of the current image block from the decoded image block of the current image block, and before constructing the MIP_MPM list according to the value of LEFT_MIP and the value of ABOVE_MIP to decode the current image block, when the optimal intra prediction mode of the left neighboring image block belongs to the MIP mode and the type of the left neighboring image block is different from the type of the current image block, updating the value of LEFT_MIP to the value of the second MIP mode, or maintaining the value of LEFT_MIP at the default value;
[0368] When the upper adjacent image block and the current image block are in the same CTU, and the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the upper adjacent image block is different from the type of the current image block, the value of ABOVE_MIP is updated to the value of the second MIP mode, or the value of ABOVE_MIP is maintained at the default value.
[0369] Furthermore, the fourth mapping module 173 is further specifically configured to:
[0370] After obtaining a left-side neighboring image block and an above-side neighboring image block of the current image block from a decoded image block of the current image block, and before constructing a MIP_MPM list based on the value of LEFT_MIP and the value of ABOVE_MIP to decode the current image block, when the optimal intra-frame prediction mode of the left-side neighboring image block belongs to a MIP mode and the type of the left-side neighboring image block is different from the type of the current image block, determining a second MIP mode based on the type of the left-side neighboring image block and the type of the current image block, and updating the value of LEFT_MIP with the value of the second MIP mode;
[0371] When the optimal intra-frame prediction mode of the upper adjacent image block belongs to the MIP mode, and the type of the left adjacent image block is different from the type of the current image block, a second MIP mode is determined according to the type of the upper adjacent image block and the type of the current image block, and the value of ABOVE_MIP is updated with the value of the second MIP mode.
[0372] Figure 18 This is a schematic diagram of the structure of another optional decoder proposed in the embodiment of the present application, such as Figure 18 As shown, the decoder 1800 proposed in the embodiment of the present application may also include a processor 181 and a storage medium 182 storing instructions executable by the processor 181. The storage medium 182 relies on the processor 181 to perform operations through the communication bus 183. When the instructions are executed by the processor 181, the mapping method described in one or more of the above embodiments is executed.
[0373] It should be noted that in actual application, the various components in the encoder are coupled together through the communication bus 183. It is understood that the communication bus 183 is used to achieve connection and communication between these components. In addition to the data bus, the communication bus 183 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 18 Various buses are labeled as communication buses 183.
[0374] An embodiment of the present application provides a computer storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processors execute the mapping method described in one or more of the above embodiments.
[0375] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0376] The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor or by software instructions. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0377] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing module may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic modules for performing the functions described herein, or a combination thereof.
[0378] For software implementation, the techniques described herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0379] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0380] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0381] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0382] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are protected by this application.
[0383] Industrial Applicability
[0384] An embodiment of the present application provides a mapping method, an encoder, a decoder, and a computer storage medium, which determine the intra-frame prediction mode used when encoding or decoding the current image block. If the intra-frame prediction mode is the MIP mode, the MIP mode is mapped to a first non-MIP mode. If the intra-frame prediction mode is the non-MIP mode, the non-MIP mode is mapped to a second MIP mode to improve the encoding and decoding rate.
Claims
1. An image decoding method, applied to a decoder, characterized in that: The method comprises: Parse the code stream and determine the intra-frame prediction mode of the current image block; If the intra prediction mode is a matrix-based intra prediction MIP mode, using the MIP mode as the intra prediction mode of the image luminance component of the current image block; Mapping the MIP mode to a first non-MIP mode, where the first non-MIP mode is used to determine an intra-frame prediction mode of an image chrominance component of the current image block; wherein the first non-MIP mode is one of non-MIP modes pre-set before decoding the current image block, and the non-MIP mode includes a direct current intra-frame prediction mode, a planar intra-frame prediction mode, or a directional intra-frame prediction mode; The current image block is decoded using the intra-frame prediction mode of the image luminance component and the intra-frame prediction mode of the image chrominance component.
2. The method according to claim 1, characterized in that The first non-MIP mode is the planar intra prediction mode.
3. The method according to claim 1 or 2, characterized in that The first non-MIP mode is used to determine the intra-frame prediction mode of the image chrominance component of the current image block, including: The first non-MIP mode is used as the intra-frame prediction mode of the image chrominance component of the current image block.
4. An image coding method, applied to an encoder, characterized in that: The method comprises: Determining an intra-frame prediction mode for a current image block, and writing the intra-frame prediction mode into a bitstream; If the intra prediction mode is the MIP mode, using the MIP mode as the intra prediction mode of the image luminance component of the current image block; Mapping the MIP mode to a first non-MIP mode, where the first non-MIP mode is used to determine an intra-frame prediction mode of an image chrominance component of the current image block; wherein the first non-MIP mode is one of non-MIP modes pre-set before decoding the current image block, and the non-MIP mode includes a direct current intra-frame prediction mode, a planar intra-frame prediction mode, or a directional intra-frame prediction mode; The current image block is decoded using the intra-frame prediction mode of the image luminance component and the intra-frame prediction mode of the image chrominance component.
5. The method according to claim 4, characterized in that The first non-MIP mode is the planar intra prediction mode.
6. The method according to claim 4 or 5, characterized in that The first non-MIP mode is used to determine the intra-frame prediction mode of the image chrominance component of the current image block, including: The first non-MIP mode is used as the intra-frame prediction mode of the image chrominance component of the current image block.
7. A decoder, characterized in that include: A determination module, used to parse the code stream and determine the intra-frame prediction mode of the current image block; a mapping module, configured to use the MIP mode as the intra-frame prediction mode of the image luminance component of the current image block if the intra-frame prediction mode is the MIP mode; Mapping the MIP mode to a first non-MIP mode, where the first non-MIP mode is used to determine an intra-frame prediction mode of an image chrominance component of the current image block; wherein the first non-MIP mode is one of non-MIP modes pre-set before decoding the current image block, and the non-MIP mode includes a direct current intra-frame prediction mode, a planar intra-frame prediction mode, or a directional intra-frame prediction mode; A processing module is configured to decode the current image block using the intra-frame prediction mode of the image luminance component and the intra-frame prediction mode of the image chrominance component.
8. The decoder according to claim 7, wherein: The first non-MIP mode is the planar intra prediction mode.
9. The decoder according to claim 7 or 8, characterized in that The mapping module is configured to use the first non-MIP mode as the intra-frame prediction mode of the image chrominance component of the current image block.
10. An encoder, characterized in that include: A determination module, configured to determine an intra-frame prediction mode to be used for decoding a current image block, and write the intra-frame prediction mode into a bitstream; a mapping module, configured to use the MIP mode as the intra-frame prediction mode of the image luminance component of the current image block if the intra-frame prediction mode is the MIP mode; Mapping the MIP mode to a first non-MIP mode, where the first non-MIP mode is used to determine an intra-frame prediction mode of an image chrominance component of the current image block; wherein the first non-MIP mode is one of non-MIP modes pre-set before decoding the current image block, and the non-MIP mode includes a direct current intra-frame prediction mode, a planar intra-frame prediction mode, or a directional intra-frame prediction mode; A processing module is configured to decode the current image block using the intra-frame prediction mode of the image luminance component and the intra-frame prediction mode of the image chrominance component.
11. The encoder according to claim 10, wherein The first non-MIP mode is the planar intra prediction mode.
12. The encoder according to claim 10 or 11, characterized in that The mapping module is configured to use the first non-MIP mode as the intra-frame prediction mode of the image chrominance component of the current image block.
13. A computer-readable storage medium, wherein: Executable instructions are stored, and when the executable instructions are executed by one or more processors, the processors execute the image decoding method according to any one of claims 1 to 3.
14. A computer-readable storage medium, wherein: Executable instructions are stored, and when the executable instructions are executed by one or more processors, the processors execute the image encoding method according to any one of claims 4 to 6.