Coding method, decoding method, coder, decoder and storage medium
By setting the parsing conditions of the mode parameters, the compression efficiency of the video encoding and decoding method is improved, solving the problem of insufficient encoding and decoding efficiency in the existing technology, and achieving more efficient encoding and decoding performance.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2024-12-23
- Publication Date
- 2026-07-02
AI Technical Summary
Existing video encoding and decoding methods need further optimization in terms of compression efficiency, especially when constructing a list of the most likely patterns, where the encoding and decoding efficiency is insufficient.
By setting parsing conditions for mode parameters, the compression efficiency of mode parameters can be improved and the encoding and decoding performance can be optimized. This includes parsing mode parameters under specific conditions and determining the optimal mode parameters for encoding processing.
It improves the compression efficiency of mode parameters, saves encoding bits, and optimizes encoding and decoding performance.
Smart Images

Figure CN2024141638_02072026_PF_FP_ABST
Abstract
Description
Encoding / decoding methods, encoders, decoders, and storage media Technical Field
[0001] This application relates to the field of video encoding and decoding technology, specifically to an encoding and decoding method, an encoder, a decoder, and a storage medium. Background Technology
[0002] In a video codec framework, if the current coding unit (CU) adopts an intra-frame codec mode, before encoding and decoding the current CU, a list of the most probable modes (MPM) for the current CU is first constructed. The MPM list contains candidate intra-frame codec modes, including the primary most probable mode (PMPM) and the second most probable mode (SMPM). Then, based on the MPM list, the intra-frame prediction mode is determined and intra-frame prediction is performed on the current block.
[0003] However, the compression efficiency of this encoding / decoding method in related technologies needs further optimization. Summary of the Invention
[0004] This application provides an encoding / decoding method, an encoder, a decoder, and a storage medium.
[0005] The technical solution of this application embodiment can be implemented as follows:
[0006] In a first aspect, embodiments of this application provide a decoding method applied to a decoder, the method comprising:
[0007] If the first condition is met, parse the mode parameters of the current block;
[0008] Based on the candidate mode list of the current block, determine the intra-prediction mode of the current block;
[0009] The prediction value of the current block is determined by predicting the current block based on the intra-prediction mode and mode parameters of the current block.
[0010] The reconstructed value of the current block is determined based on the predicted value and residual value of the current block.
[0011] Secondly, embodiments of this application provide an encoding method applied to an encoder, the method comprising:
[0012] Based on the candidate mode list of the current block, determine the intra-prediction mode of the current block;
[0013] The prediction value of the current block is determined by predicting the intra-prediction mode and candidate mode parameters of the current block.
[0014] Based on the predicted and residual values of the current block, determine the reconstructed value of the current block;
[0015] Cost calculation is performed based on the reconstruction value of the current block to determine the cost value of the candidate mode parameters;
[0016] Based on the cost value of candidate mode parameters, determine the optimal mode parameters corresponding to the minimum cost value.
[0017] If the first condition is met, the optimal mode parameters are encoded, and the resulting encoded bits are written into the bitstream.
[0018] Thirdly, embodiments of this application provide an encoder, including a first determining unit, a first predicting unit, and an encoding unit; wherein:
[0019] The first determining unit is configured to determine the intra-prediction mode of the current block based on the candidate mode list of the current block;
[0020] The first prediction unit is configured to predict the current block based on the intra-prediction mode and candidate mode parameters of the current block, and determine the predicted value of the current block; based on the predicted value and residual value of the current block, it determines the reconstructed value of the current block.
[0021] The first determining unit is further configured to perform cost calculation based on the reconstruction value of the current block to determine the cost value of the candidate mode parameters; and to determine the optimal mode parameters corresponding to the minimum cost value based on the cost value of the candidate mode parameters.
[0022] The encoding unit is configured to encode the optimal mode parameters when the first condition is met, and write the resulting encoded bits into the bit stream.
[0023] Fourthly, embodiments of this application provide a decoder, including a decoding unit, a second determining unit, and a second prediction unit; wherein:
[0024] The decoding unit is configured to parse the mode parameters of the current block when the first condition is met;
[0025] The second determining unit is configured to determine the intra-prediction mode of the current block based on the candidate mode list of the current block;
[0026] The second prediction unit is configured to predict the current block based on the intra-frame prediction mode and mode parameters of the current block, and determine the predicted value of the current block; and to determine the reconstructed value of the current block based on the predicted value and residual value of the current block.
[0027] Fifthly, embodiments of this application provide an encoder, including a first memory and a first processor; wherein:
[0028] A first memory for storing computer programs that can run on a first processor;
[0029] The first processor is used to execute the method described in the second aspect when running a computer program.
[0030] Sixthly, embodiments of this application provide a decoder, which includes a second memory and a second processor; wherein,
[0031] The second memory is used to store computer programs that can run on the second processor;
[0032] The second processor is used to execute the methods described in the first aspect when running a computer program.
[0033] In a seventh aspect, embodiments of this application provide a computer-readable storage medium that stores a bitstream generated by such encoding method.
[0034] Eighthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed, implements the method as described in the first aspect or the method as described in the second aspect.
[0035] This application provides an encoding / decoding method, encoder, decoder, and storage medium. The method includes: decoding mode parameters of the current block when a first condition is met; determining the intra-prediction mode of the current block based on a candidate mode list of the current block; predicting the current block based on the intra-prediction mode and mode parameters to determine the predicted value of the current block; and determining the reconstructed value of the current block based on the predicted value and residual value. Thus, by setting the parsing conditions for the mode parameters, the compression efficiency of the mode parameters is improved, coding bits are saved, and encoding / decoding performance is optimized. Attached Figure Description
[0036] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0037] Figure 1 is a schematic diagram showing the positions of adjacent blocks of the current block in an embodiment of this application;
[0038] Figure 2 is a schematic diagram showing the positions of non-adjacent blocks of the current block in an embodiment of this application;
[0039] Figure 3 is a schematic diagram of the template of the current block in an embodiment of this application;
[0040] Figure 4 is a flowchart illustrating MPDIP prediction in an embodiment of this application;
[0041] Figure 5 is a schematic diagram of the network architecture of an encoding / decoding system provided in an embodiment of this application;
[0042] Figure 6 is a flowchart illustrating a decoding method provided in an embodiment of this application;
[0043] Figure 7 is a schematic diagram of an image boundary region in an embodiment of this application;
[0044] Figure 8 is a schematic diagram of another image boundary region in an embodiment of this application;
[0045] Figure 9 is a diagram illustrating the planar prediction reference sample in an embodiment of this application;
[0046] Figure 10 is a flowchart illustrating an encoding method provided in an embodiment of this application;
[0047] Figure 11 is a schematic diagram of the composition structure of an encoder provided in an embodiment of this application;
[0048] Figure 12 is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of this application;
[0049] Figure 13 is a schematic diagram of the composition structure of a decoder provided in an embodiment of this application;
[0050] Figure 14 is a schematic diagram of the specific hardware structure of a decoder provided in an embodiment of this application;
[0051] Figure 15 is a schematic diagram of the composition structure of an encoding and decoding system provided in an embodiment of this application. Detailed Implementation
[0052] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0054] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0055] It should also be noted that the terms "first, second, and third" used in the embodiments of this application are only used to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0056] In video images, a coding block (CB) is typically represented by a first image component, a second image component, and a third image component. These three image components are a luma component, a blue chroma component, and a red chroma component, respectively. Specifically, the luma component is usually represented by the symbol Y, the blue chroma component is usually represented by the symbol Cb or U, and the red chroma component is usually represented by the symbol Cr or V. Thus, video images can be represented in YCbCr format or YUV format.
[0057] Before providing a further detailed description of the embodiments of this application, the nouns and terms used in the embodiments of this application will be explained. The nouns and terms used in the embodiments of this application shall be interpreted as follows:
[0058] Moving Picture Experts Group (MPEG)
[0059] International Organization for Standardization (ISO)
[0060] International Electrotechnical Commission (IEC)
[0061] Joint Video Experts Team (JVET)
[0062] Alliance for Open Media (AOM)
[0063] The next-generation video coding standard H.266 / Versatile Video Coding (VVC)
[0064] VVC Reference Software Testing Platform (VVC Test Model, VTM)
[0065] Audio Video Standard (AVS)
[0066] Most Probable Mode (MPM)
[0067] Prioritize the most probable mode (PMPM).
[0068] Second Most Probable Mode (SMPM)
[0069] Non-Most Probable Mode (Non-MPM)
[0070] Decoder-side intra-mode derivation (DIMD)
[0071] Matrix-based position-dependent intra prediction (MPDIP)
[0072] Sum Absolute Distortion (SAD)
[0073] Template-based intra-mode derivation (TIMD)
[0074] Decoder-side intra-mode derivation (DIMD)
[0075] Extrapolation filter-based intra prediction (EIP)
[0076] Intra-template matching prediction (Intra TMP)
[0077] Spatial Geometric Partitioning Mode (SGPM)
[0078] Context-based Adaptive Variable-Length code (CAVLC)
[0079] Context-based Adaptive Binary Arithmetic Coding (CABAC)
[0080] It's understandable that digital video compression technology primarily compresses massive amounts of digital video data to facilitate transmission and storage. With the surge in internet video and increasing demands for video clarity, while existing digital video compression standards can save considerable video data, there is still a need to pursue better digital video compression technologies to reduce the bandwidth and traffic pressure on digital video transmission.
[0081] 1. How to construct an MPM list
[0082] In the codec framework of related technologies, if the current CU adopts the ordinary intra-frame encoding and decoding mode (also known as intra-frame prediction mode), before encoding and decoding the current CU, the MPM list of the current CU is first constructed. The MPM list contains candidate intra-frame prediction modes, which include PMPM and SMPM. PMPM contains 6 (NUM_PRIMARY_MOST_PROBABLE_MODES = 6) candidate modes, while SMPM contains 16 (NUM_SECONDARY_MOST_PROBABLE_MODES = 16) candidate modes. That is, the MPM contains a total of 22 (NUM_MOST_PROBABLE_MODES = 6 + 16 = 22) candidate modes.
[0083] 1) The PMPM list is constructed in the following order:
[0084] a) PMPM's first candidate mode is the Planar mode;
[0085] b) Inheriting the intra-prediction mode of adjacent blocks; As shown in Figure 1, the current block is a block with width W and height H. Adjacent blocks are determined by taking the top-left corner coordinates (x, y) of the current block as the origin, as shown in Figure 1. First, determine the five adjacent positions: left (x-1, y+H-1), top (x+W-1, y-1), top-left (x-1, y-1), top-right (x+W, y-1), and bottom-left (x-1, y+H). Based on the CU encoding / decoding blocks where these five adjacent positions are located, determine the left adjacent CU, top adjacent CU, bottom-left adjacent CU, top-right adjacent CU, and bottom-left adjacent CU blocks. Specifically, as shown in Figure 1, the intra-prediction modes of the five adjacent blocks are added in the order of left L, top A, top-left AL, top-right AR, and bottom-left BL.
[0086] c) Add the intra-prediction mode derived from the DIMD mode of the current block;
[0087] d) Inherit the intra-prediction mode of non-adjacent blocks, as shown in Figure 2. The large block shown in the figure is a block of the same size as the current block. The position indicated by the number is the position of the block determined by that position. The intra-prediction mode of the determined block is added to the PMPM list in ascending order of the number.
[0088] By constructing steps a)-d) above, a maximum of M non-repeating candidate patterns can be obtained. Note: If the current CU satisfies the PMPM list sorting condition, then M equals 8 (NUM_PRIMARY_MOST_PROBABLE_MODES+2), including Planar patterns; if the current CU does not satisfy the PMPM list sorting condition, then M equals 22 (NUM_MOST_PROBABLE_MODES).
[0089] e) The current CU block satisfies the PMPM list sorting conditions, specifically as follows: If the size of the current CU block is less than or equal to 128 and the slice corresponding to the current block is Intra (intra-prediction slice), then the conditions for sorting the MPM list of the current CU are met; if the slice corresponding to the current block is Inter (inter-prediction slice), and the size of the current CU block is less than or equal to 1024, then the conditions for PMPM list sorting are also met. Otherwise, the current CU block does not satisfy the PMPM list sorting conditions.
[0090] f) If the current CU's PMPM list meets the sorting conditions, and the number of candidates in the PMPM list (excluding the first candidate pattern, i.e., the Planar pattern) is greater than or equal to 6 (NUM_PRIMARY_MOST_PROBABLE_MODES), then template sorting is required for the candidate patterns in the current PMPM list. Note: When sorting the patterns in the PMPM list, the first candidate pattern is not sorted. Finally, the candidate patterns in the PMPM list will be updated according to the SAD Cost of the template region.
[0091] 2) How to construct the SMPM list:
[0092] a) The patterns in the SMPM candidate list are first generated by adding a certain offset (offset=1,2,3,4) to other intra-frame angle prediction patterns in the PMPM list excluding Planar and DC;
[0093] b) If PMPM plus SMPM has fewer than 22 candidate patterns, some default candidate patterns will be added. Specifically: {DC_IDX,VER_IDX,HOR_IDX,VER_IDX-4,VER_IDX+4,14,22,42,58,10,26,38,62,6,30,34,66,2,48,52,16}.
[0094] 3) How to construct the Non-MPM list:
[0095] After the MPM list is constructed (22 intra-prediction modes), the other 45 (66-22) intra-prediction modes not in the MPM list will be added to the Non-MPM candidate list in the order of 0-66. Candidate modes that do not exist in the MPM list will be added to the Non-MPM list.
[0096] 4) After completing the MPM list and Non-MPM list, the intra-prediction mode of the current CU is encoded in the following manner.
[0097] 2. PM sorting method
[0098] Figure 3 is a schematic diagram of the template of the current block according to an embodiment of this application. As shown in Figure 3, the reference samples of the left and upper templates of the current block include at least the shaded areas in Figure 3. In the current codec, when the conditions for sorting the PMPM list are met, the SAD Cost of each prediction mode is obtained by using the reconstructed value and the predicted value of the template region, and finally the candidate modes in the PMPM are sorted in ascending order of SAD Cost.
[0099] The conditions for PMPM list sorting are as described above. If the current CU block meets the PMPM list sorting conditions, specifically: if the current CU block size is less than or equal to 128 and the corresponding slice is Intra (intra-prediction slice), then the conditions for sorting the current CU's MPM list are met; if the current block corresponds to an Inter (inter-prediction slice) and the current CU block size is less than or equal to 1024, then the conditions for MPM list sorting are also met. Otherwise, the current CU block does not meet the PMPM list sorting conditions.
[0100] PMPM's sorting algorithm:
[0101] 1) As shown in Figure 3, the calculation diagrams for the SAD cost of the left template and the upper template are illustrated. The area filled with diagonal lines is the reference area for calculating the SAD cost of the candidate patterns.
[0102] 2) When calculating the candidate mode SAD cost, the reconstructed sample with the diagonal-filled region is first used as the reference sample of the template region. Then, the candidate mode in PMPM is used to perform intra-frame prediction on the sample of the template region to obtain the predicted value of the template region.
[0103] 3) Finally, the template SAD cost corresponding to each candidate mode is calculated using the sample prediction value and reconstruction value of the template region.
[0104] 3. Intra-frame angle prediction
[0105] In the codec, intra-frame angle prediction modes are divided into traditional intra-frame angle prediction mode and MPDIP intra-frame angle prediction mode. The specific conditions for starting MPDIP intra-frame prediction are shown in Table 1.
[0106] Table 1
[0107] MPDIP intra-frame prediction activation conditions:
[0108] 1) The template type of the CU block to be encoded and decoded is Left_Above_Templete, which means that the samples of the left template region and the upper template region have been reconstructed.
[0109] 2) MPDIP prediction: For CU blocks of different sizes, different numbers of prediction modes will be used for intra-frame prediction using MPDIP, as shown in Table 1. If the width and height of the current CU block are both less than or equal to 16, and the intra-frame prediction mode is 0, 1, or (2+2×k), then the mode satisfies MPDIP prediction; otherwise, for other block sizes, and the intra-frame prediction mode is 0, 1, or (2+4×k), then the mode satisfies MPDIP prediction.
[0110] 3) For blocks of different sizes, reference samples with different numbers of rows and columns must have been reconstructed. See Table 2 for details.
[0111] Table 2
[0112] Where numMRLLeft represents the number of columns of the left reference sample and numMRLTop represents the number of rows of the top reference sample.
[0113] 4) The current block size is the block size supported by MPDIP mode. Currently, the block sizes supported by MPDIP mode are: 4×4, 4×8, 8×4, 8×8, 4×16, 16×4, 4×32, 32×4, 8×16, 16×8, 16×16, 8×32, 32×8, 16×32, 32×16, 32×32.
[0114] 5) When the current CU meets the above conditions for starting MPDIP intra-frame prediction (1) -> 4), MPDIP intra-frame prediction will be performed on the candidate mode of the current CU.
[0115] The specific MPDIP intra-frame prediction method is shown in Figure 4.
[0116] As shown in Figure 4, when performing intra-frame prediction on the current CU, if the intra-frame prediction mode can perform MPDIP intra-frame prediction, a reference sample will be obtained based on the current CU's position and CU block size. Finally, the prediction information of the current CU will be obtained using the reference sample and the matrix vector preset by the intra-frame prediction mode. If the current CU does not meet the activation conditions for MPDIP intra-frame prediction, the prediction information of the current CU block will be obtained using the traditional intra-frame angle prediction mode.
[0117] However, the compression efficiency of this encoding / decoding method in related technologies needs further optimization.
[0118] Based on this, embodiments of this application provide an encoding / decoding method, specifically an image / video encoding / decoding method. By setting the encoding / decoding conditions of mode parameters, the compression efficiency of mode parameters is improved, thereby optimizing encoding / decoding performance.
[0119] Furthermore, this application embodiment also provides a network architecture for an encoding / decoding system including an encoder and a decoder. Figure 5 shows a schematic diagram of such a network architecture. As shown in Figure 5, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01. The electronic devices 13 to 1N can perform video interaction through the communication network 01. During implementation, the electronic devices can be various types of devices with video encoding / decoding capabilities. For example, electronic devices may include smartphones, tablets, personal computers, personal digital assistants, navigators, digital phones, video phones, televisions, sensing devices, servers, etc., without specific limitations. Additionally, the decoder or encoder in this application embodiment can be the aforementioned electronic device.
[0120] It should be noted that the method in this application embodiment is mainly applied to the inter-frame prediction unit, and can be applied to the encoder, the decoder, or even both the encoder and the decoder at the same time, but this application embodiment does not make any specific limitations.
[0121] It should also be noted that when applied to the encoder, "current block" specifically refers to the coded block currently undergoing intra-frame prediction; when applied to the decoder, "current block" specifically refers to the decoded block currently undergoing intra-frame prediction.
[0122] The current block (CB) can be the current coding unit (CU) or the current prediction unit (PU), etc. Due to the need for parallel processing, an image can be divided into slices, etc. Slices within the same image can be processed in parallel, meaning they have no data dependency on each other. A "frame" is a commonly used term, generally understood as an image. In this article, "frame" can also be replaced with "image" or "slice," etc.
[0123] To facilitate understanding of the technical solutions of the embodiments of this application, the technical solutions of this application are described in detail below through specific embodiments. The above-mentioned related technologies are optional solutions and can be arbitrarily combined with the technical solutions of the embodiments of this application, all of which fall within the protection scope of the embodiments of this application. The embodiments of this application include at least some of the following contents.
[0124] In one embodiment of this application, referring to FIG6, a flowchart of a decoding method provided by an embodiment of this application is shown. As shown in FIG6, the method may include:
[0125] S601: If the first condition is met, parse the mode parameters of the current block;
[0126] The first condition can be understood as the parsing condition for the model parameters. If the first condition is met, it means that the model parameters need to be parsed; if the prediction condition is not met, it means that the model parameters do not need to be parsed.
[0127] In some embodiments, if the first condition is not met, the mode parameter is determined to be a first preset value, which is a default value of the mode parameter.
[0128] In some embodiments, the first condition includes at least: the current block does not meet the matrix-based intra-frame angle prediction (MPDIP) initiation condition.
[0129] MPDIP start conditions are used to indicate whether the current block can be predicted using MPDIP. If the current block does not meet the MPDIP start conditions, the mode parameters of the current block need to be further parsed. If not, the mode parameters are determined to be the first preset value.
[0130] In some embodiments, the MPDIP initiation conditions include at least one of the following: the template type of the current block is a first template type; the size of the current block is a block size that supports MPDIP prediction; and the reference sample of the current block has been reconstructed.
[0131] For example, the first template type includes, but is not limited to, Left_Above_Templete, which means that the upper left reference sample, the upper reference sample, and the left reference sample of the current block are reconstructed. As another example, the first template type can also be Above_Templete, which means that the upper reference sample of the current block is reconstructed. As yet another example, the first template type can also be Left_Templete, which means that the left reference sample of the current block is reconstructed.
[0132] Block sizes that support MPDIP prediction include at least one block size. For example, block sizes that support MPDIP prediction include, but are not limited to, at least one of the following: 4×4, 4×8, 8×4, 8×8, 4×16, 16×4, 4×32, 32×4, 8×16, 16×8, 16×16, 8×32, 32×8, 16×32, 32×16, 32×32, etc.
[0133] In some embodiments, the reference samples of the current block include the upper reference row sample and the left reference column sample of the current block; the number of upper reference rows and the number of left reference columns of the current block are related to the size of the current block. For example, as shown in Table 2, if the current block size is 32x16 / 16x32 / 32x32, the number of upper reference rows and the number of left reference columns of the current block are 1; otherwise, the number of upper reference rows and the number of left reference columns of the current block are 2.
[0134] In some embodiments, the first condition includes at least one of the following: the current block is predicted using upper reference row samples and left reference column samples; the current block does not use an intra-block partitioning mode; the current block is predicted using a mode candidate list; the intra-prediction mode of the current block is located at a first preset position in the mode candidate list; the intra-prediction mode of the current block is not one or more preset intra-prediction modes. For example, preset intra-prediction modes include, but are not limited to, non-traditional intra-angle prediction modes such as TIMP, DIMD, EIP, and Intra TMP.
[0135] The current block is predicted using upper reference row samples and left reference column samples, including but not limited to: the current block is predicted using the first upper reference row sample and the first left reference column sample. The first upper reference row sample is the sample of the upper adjacent row of the current block, and the first left reference row sample is the sample of the left adjacent column of the current block.
[0136] In some embodiments, the method further includes: parsing a first syntax element; the value of the first syntax element being a first preset value, determining that the current block uses upper reference row samples and left reference column samples for prediction; otherwise, determining that the current block does not use upper reference row samples and left reference column samples for prediction. Here, the first preset value is used to indicate that the current block uses upper reference row samples and left reference column samples for prediction.
[0137] In some embodiments, the method further includes: parsing a second syntax element; and determining whether the current block uses an intra-block partitioning mode based on the value of the second syntax element. For example, a value of 1 for the second syntax element indicates that the current block uses an intra-block partitioning mode; a value of 0 for the second syntax element indicates that the current block does not use an intra-block partitioning mode.
[0138] In some embodiments, the method further includes: parsing a third syntax element; and determining whether the current block uses the pattern candidate list for prediction based on the value of the third syntax element. For example, a value of 1 for the third syntax element indicates that the current block uses the pattern candidate list for prediction; a value of 0 for the third syntax element indicates that the current block does not use the pattern candidate list for prediction.
[0139] In some embodiments, the method further includes: parsing a fourth syntax element; and determining whether the intra-prediction mode of the current block is located at a first preset position in the mode candidate list based on the value of the fourth syntax element. For example, if the value of the fourth syntax element is the index of the first preset position, it is determined that the intra-prediction mode of the current block is located at the first preset position in the mode candidate list; otherwise, it is determined that the intra-prediction mode of the current block is not located at the first preset position in the mode candidate list. For example, the first preset position can be the first position in the mode candidate list, or it can be another position.
[0140] In some embodiments, the method further includes: parsing one or more fifth syntax elements; and determining, based on the values of the one or more fifth syntax elements, that the intra-prediction mode of the current block is not one or more preset intra-prediction modes. Each fifth syntax element indicates whether the current block adopts a corresponding preset intra-prediction mode. For example, a value of 1 indicates that the current block adopts the corresponding preset intra-prediction mode; a value of 0 indicates that the current block does not adopt the corresponding preset intra-prediction mode. For example, one or more preset intra-prediction modes include, but are not limited to, at least one of the following: TIMD, DIMP, EIP, IntraTMP, and other non-traditional angle prediction modes. The current block not adopting a corresponding preset intra-prediction mode can also be replaced by the current block adopting a traditional angle prediction mode.
[0141] In some embodiments, the first syntax element, the second syntax element, the third syntax element, the fourth syntax element, and the fifth syntax element may include, but are not limited to, block-level syntax elements.
[0142] In some embodiments, the first condition includes at least one of the following: the current block is predicted using upper reference row samples and left reference column samples; the current block does not use an intra-block partitioning mode; the current block is predicted using a mode candidate list; the intra-prediction mode of the current block is located at a first preset position in the mode candidate list; the intra-prediction mode of the current block is an intra-angle prediction mode; the current block does not meet the MPDIP start condition.
[0143] The first condition includes: the current block is not located within the boundary region of the current image; the current block not being located within the boundary region of the current image includes at least one of the following: the upper boundary of the current block does not coincide with the upper boundary of the current image; the lower boundary of the current block does not coincide with the lower boundary of the current image; the left boundary of the current block does not coincide with the left boundary of the current image; the right boundary of the current block does not coincide with the right boundary of the current image. Wherein, the upper and lower boundaries of the current image include one or more rows of samples, and the left and right boundaries of the current image include one or more columns of samples.
[0144] Figure 7 illustrates a schematic diagram of an image boundary region. The current image boundary region includes an upper boundary region, a lower boundary region, a left boundary region, and a right boundary region. In some embodiments, the upper boundary region may further include an upper-left boundary region, the left boundary region may further include a lower-left boundary region, the right boundary region may further include an upper-right boundary region, and the lower boundary region may further include a lower-right boundary region.
[0145] Figure 8 illustrates another type of image boundary region. The current image boundary regions include the upper boundary region, the left boundary region, and the right boundary region.
[0146] In some embodiments, the first condition includes: the current block is predicted using upper reference row samples and left reference column samples; the current block does not use an intra-block partitioning mode; the current block is predicted using a mode candidate list; the intra-prediction mode of the current block is located at a first preset position in the mode candidate list; the intra-prediction mode of the current block is an intra-angle prediction mode; and the current block does not meet the MPDIP activation condition, or the current block is not located in the boundary region of the current image.
[0147] In some embodiments, the first bit corresponding to the mode parameter is parsed when the first condition is met. The mode parameter includes at least the first bit, and the first condition serves as the parsing condition for the first bit. By reasonably setting the first condition, the compression efficiency of the first bit can be improved.
[0148] In some embodiments, if a first condition is met, the first bit corresponding to the mode parameter is parsed; if a second condition is met, the second bit corresponding to the mode parameter is parsed; and the value of the mode parameter is determined based on the values of the first and second bits. The mode parameter includes at least two bits, with the first condition serving as the parsing condition for the first bit and the second condition serving as the parsing condition for the second bit. By appropriately setting the first and second conditions, the compression efficiency of at least two bits can be improved.
[0149] In some embodiments, the method further includes: if the first condition is not met, determining that the mode parameter takes the value of a first preset value. The first preset value is a default value for the mode parameter. For example, the first preset value is 0, that is, the first bit and the second bit are 0.
[0150] In some embodiments, the second condition includes: the first bit is set to 1. Specifically, the first bit is set to 1; the second bit corresponding to the mode parameter is parsed; the first bit is set to 0, and the mode parameter is determined to be a first preset value.
[0151] In some embodiments, the second condition includes: the current block is not located in the boundary region of the current image; the current block not being located in the boundary region of the current image includes at least one of the following: the upper boundary of the current block does not coincide with the upper boundary of the current image; the lower boundary of the current block does not coincide with the lower boundary of the current image; the left boundary of the current block does not coincide with the left boundary of the current image; the right boundary of the current block does not coincide with the right boundary of the current image.
[0152] In some embodiments, the second condition includes: the first bit is 1, and the current block is not located in the boundary region of the current image.
[0153] For example, the method further includes: if the value of the first bit is 1, and the upper boundary of the current block coincides with the upper boundary of the current image or the lower boundary of the current block coincides with the lower boundary of the current image, then the value of the second bit is determined to be 1; if the value of the first bit is 1, and the upper boundary of the current block coincides with the left boundary of the current image or the right boundary of the current block coincides with the lower boundary of the current image, then the value of the second bit is determined to be 0.
[0154] In other words, when the value of the first bit is determined to be 1, the position information of the current block is used to determine whether to further parse the second bit; if not, the value of the second bit is deduced based on the position information of the current block.
[0155] For example, suppose the top-left corner of the current block CU is (x, y), its size is W×H, and the size of the current image is w×h. If the current CU is at the top or bottom boundary of the current image, i.e., y = 0 or y = h - H + 1, the value of the second bit is determined to be 1; if the current CU is at the left or right boundary of the current image, i.e., x = 0 or x = w - W + 1, the value of the second bit is determined to be 0.
[0156] In some embodiments, determining the value of the mode parameter based on the value of the first bit and the value of the second bit includes: if the value of the first bit is 0, the mode parameter is determined to be a first preset value; if the value of the first bit is 1 and the value of the second bit is 1, the mode parameter is determined to be a second preset value; if the value of the first bit is 1 and the value of the second bit is 0, the mode parameter is determined to be a third preset value. The first preset value, the second preset value, and the third preset value are different values. For example, the first preset value is 0, the second preset value is 1, and the third preset value is 2.
[0157] In some embodiments, the intra-frame prediction mode of the current block includes, but is not limited to, the planar prediction mode, and the mode parameter (planar_idx) is used to indicate the directionality of the planar prediction mode.
[0158] For example, if the mode parameter is set to a first preset value, the current block will use a non-directional planar prediction mode; if the mode parameter is set to a second preset value, the current block will use a horizontal planar prediction mode; and if the mode parameter is set to a third preset value, the current block will use a vertical planar prediction mode. The non-directional planar prediction mode can be understood as the ordinary Planar mode. The ordinary Planar mode calculates the predicted values for the current sample in both the horizontal and vertical directions, and then takes the average of these two predicted values as the final predicted value for the current sample.
[0159] For example, the first bit of the mode parameter is used to indicate whether the planar prediction mode has directionality, and the second bit is used to indicate whether the planar prediction mode is a horizontal or vertical planar prediction mode.
[0160] It should be noted that, in this embodiment of the application, for the planar_idx of the Planar mode, if the current block meets the first condition, the planar_idx is parsed to determine whether the current block uses the directional Planar mode for parsing. Otherwise, the directional Planar mode is not parsed, and the prediction is performed using the default ordinary Planar mode. This parsing scheme can save the encoded bits of planar_idx when the current block does not use the directional Planar mode, thereby further improving decoding efficiency.
[0161] It should also be noted that, in this embodiment of the application, when parsing planar_idx, if the current block meets the first condition, the first bit of planar_idx is parsed to determine whether the current block is parsed using a directional Planar mode. Otherwise, the directional Planar mode is not parsed, and the default ordinary Planar mode is used for prediction. Further, if the first bit of planar_idx indicates that the current block uses a directional Planar mode, it is determined whether the current block is at the boundary of the current image. If the current block is at the boundary of the current image, the second bit of planar_idx, i.e., the specific direction of the Planar mode, is derived based on the specific boundary position of the current block. This parsing scheme can also save the encoding bits of planar_idx when the current block uses a directional Planar mode, thereby further improving decoding efficiency.
[0162] S602: Determine the intra-prediction mode of the current block based on the candidate mode list of the current block;
[0163] In some embodiments, the method further includes: parsing the mode index of the current block; and determining the intra-prediction mode of the current block from the candidate mode list of the current block based on the mode index of the current block.
[0164] For example, the candidate pattern list can be a list of the most likely patterns (MPM) for the current block. Alternatively, the candidate pattern list can also be a list of non-most likely patterns (Non-MPM).
[0165] S603: Based on the intra-prediction mode and mode parameters of the current block, predict the current block and determine the predicted value of the current block;
[0166] In some embodiments, the mode parameters are used to indicate the directionality of the planar prediction mode. Accordingly, predicting the current block based on the intra-prediction mode and the mode parameters of the current block includes: if the intra-prediction mode of the current block is Planar mode, determining the directionality of the planar prediction mode of the current block based on the mode parameters of the current block; and predicting the current block based on the directionality of the planar prediction mode of the current block to determine the predicted value of the current block.
[0167] For example, when using a directional planar prediction mode, there are two directions: horizontal planar prediction and vertical planar prediction. Specifically, assuming the top-left corner of the current block is (x, y) and its size is W × H, the corresponding predicted value is calculated as follows:
[0168] 1. Horizontal plane prediction:
[0169] a) Obtain the reference sample of the current block to be encoded using the method shown in Figure 9;
[0170] b) Finally, the predicted value of each sample in the current block to be encoded is calculated as follows: pred(x,y)=((W-1-x)*rec(-1,y)+(x+1)*rec(W,-1)+(W>>1))>>log2(W)
[0171] Here, rec(-1,y) represents the reconstructed value of the reference sample (-1,y), (W-1-x) is the weight value, rec(W,-1) represents the reconstructed value of the reference sample (W,-1), (x+1) is the weight value, +(W>>1) means adding 0.5 times the width value to the horizontal weight value, and >>log2(W) means dividing the weight value by the total weight value W to obtain the final predicted value. This operation is to achieve rounding of the weight value.
[0172] 2. Vertical plane prediction:
[0173] a) Obtain the reference sample of the current block to be encoded using the method shown in Figure 9;
[0174] b) Finally, the predicted value of each sample in the current block to be encoded is calculated as follows: pred(x,y)=((H-1-y)*rec(x,-1)+(y+1)*rec(-1,H)+(H>>1))>>log2(H)
[0175] Where rec(x,-1) represents the reconstructed value of the reference sample (x,-1), (H-1-y) is the weight value, rec(-1,H) represents the reconstructed value of the reference sample (-1,H), (y+1) is the weight value, +(H>>1) means adding 0.5 times the height value to the weighted value in the vertical direction, and >>log2(H) means dividing the weighted value by the total weight value H to obtain the final predicted value.
[0176] 3. Ordinary planar prediction:
[0177] a) Obtain the reference sample of the current block using the method shown in Figure 9;
[0178] b) Finally, the predicted value of each sample in the current block is calculated as follows: pred(x,y)=(((W-1-x)*rec(-1,y)+(x+1)*rec(W,-1)) <<log2(H)+((H-1-y)*rec(x,-1)+(y+1)*rec(-1,H)) <<log2(W)+(1<<(log2(H)+log2(W))))>>(log2(H)+log2(W)+1)
[0179] Where pred(x,y) represents the average of the predicted values in the horizontal and vertical directions, <<log2(H) represents the weighted value in the horizontal direction multiplied by H, <<log2(W) represents the weighted value in the vertical direction multiplied by W, the sum of the weighted values is added to 0.5 times (W×H×2), and >>(log2(H)+log2(W)+1) represents the weighted value divided by (W×H×2) to obtain the final predicted value.
[0180] In some embodiments, the predicted value of the current block is determined based on the intra-prediction mode of the current block and the reference sample of the current block. For example, if the current block meets the MPDIP initiation conditions, the intra-prediction mode of the current block is replaced with the corresponding MPDIP mode, and MPDIP prediction is performed on the current block to obtain the predicted value of the current block; if the current block does not meet the MPDIP initiation conditions, prediction is performed on the current block based on the intra-prediction mode and mode parameters of the current block to determine the predicted value of the current block.
[0181] In related technologies, MPDIP prediction can be replaced by the traditional intra-frame angle prediction mode of MPDIP mode. As shown in Table 1, if the width and height of the current CU block are both less than or equal to 16, and the intra-frame prediction mode is the first intra-frame prediction mode 0, 1, (2+2×k), then this mode can perform MPDIP prediction; otherwise, for other block sizes, and the intra-frame prediction mode is the second intra-frame prediction mode 0, 1, (2+4×k), then this mode can perform MPDIP prediction.
[0182] S604: Determine the reconstruction value of the current block based on the predicted value and residual value of the current block.
[0183] In some embodiments, the method further includes: parsing the residual coefficients of the current block; performing inverse quantization and inverse transformation on the residual coefficients of the current block to obtain the residual value of the current block.
[0184] By adopting the above technical solution, the compression efficiency of the mode parameters is improved and the encoding bits are saved by setting the parsing conditions of the mode parameters, thereby optimizing the decoding performance.
[0185] In another embodiment of this application, referring to FIG10, a flowchart of an encoding method provided by an embodiment of this application is shown. As shown in FIG10, the method may include:
[0186] S1001: Determine the intra-prediction mode of the current block based on the candidate mode list of the current block;
[0187] In some embodiments, the method further includes: traversing the candidate mode list of the current block to determine the intra-prediction mode of the current block.
[0188] For example, the candidate pattern list can be a list of the most likely patterns (MPM) for the current block. Alternatively, the candidate pattern list can also be a list of non-most likely patterns (Non-MPM).
[0189] S1002: Based on the intra-prediction mode and candidate mode parameters of the current block, predict the current block and determine the predicted value of the current block;
[0190] In some embodiments, the method further includes: traversing a set of candidate pattern parameters to determine candidate pattern parameters for the current block; wherein the set of candidate pattern parameters includes one or more candidate pattern parameters.
[0191] In some embodiments, the intra-frame prediction mode of the current block includes, but is not limited to, a planar prediction mode, where the mode parameter (planar_idx) indicates the directionality of the planar prediction mode. The candidate mode parameter set includes: a first preset value indicating that the current block adopts a non-directional planar prediction mode; a second preset value indicating that the current block adopts a horizontal planar prediction mode; and a third preset value indicating that the current block adopts a vertical planar prediction mode.
[0192] In some embodiments, when the intra-prediction mode of the current block is Planar mode, the candidate mode parameter set is traversed to determine the candidate mode parameters of the current block.
[0193] In some embodiments, predicting the current block based on the intra-prediction mode and mode parameters of the current block includes: when the intra-prediction mode of the current block is Planar mode, determining the directionality of the planar prediction mode of the current block based on the candidate mode parameters of the current block; and predicting the current block based on the directionality of the planar prediction mode of the current block to determine the predicted value of the current block.
[0194] S1003: Determine the reconstructed value of the current block based on the predicted value and residual value of the current block;
[0195] S1004: Calculate the cost based on the reconstruction value of the current block to determine the cost value of the candidate mode parameters;
[0196] In some embodiments, the cost includes, but is not limited to, rate-distortion cost (RDO). Specifically, the distortion of the current block is determined based on the reconstructed and original values of the current block; and the rate-distortion cost of the candidate mode parameters is determined based on the distortion of the current block.
[0197] It should be noted that the substitution value may also include: sum of absolute errors (SAD), sum of transformed absolute errors (SATD), sum of squared differences (SSE), mean absolute difference (MAD), mean absolute error (MAE), mean squared error (MSE), etc.
[0198] S1005: Based on the cost of candidate mode parameters, determine the optimal mode parameters corresponding to the minimum cost.
[0199] S1006: If the first condition is met, encode the optimal mode parameters and write the resulting encoded bits into the bitstream.
[0200] In some embodiments, the current block does not meet the initiation conditions for matrix-based intra-frame angle prediction (MPDIP).
[0201] In some embodiments, the MPDIP initiation conditions include at least one of the following: the template type of the current block is a first template type; the size of the current block is a block size that supports MPDIP prediction; and the reference sample of the current block has been reconstructed.
[0202] In some embodiments, the reference samples of the current block include the upper reference row samples and the left reference column samples of the current block; the number of upper reference rows and the number of left reference columns of the current block are related to the size of the current block.
[0203] In some embodiments, the first condition includes at least one of the following: the current block is predicted using upper reference row samples and left reference column samples; the current block does not use an intra-block partitioning mode; the current block is predicted using a mode candidate list; the intra-prediction mode of the current block is located at a first preset position in the mode candidate list; the intra-prediction mode of the current block is not one or more preset intra-prediction modes.
[0204] In some embodiments, the first condition includes: the current block is not located in the boundary region of the current image; for example, the current block is not located in the boundary region of the current image including at least one of the following: the upper boundary of the current block does not coincide with the upper boundary of the current image; the lower boundary of the current block does not coincide with the lower boundary of the current image; the left boundary of the current block does not coincide with the left boundary of the current image; the right boundary of the current block does not coincide with the right boundary of the current image.
[0205] In some embodiments, the first condition includes: the current block is predicted using upper reference row samples and left reference column samples; the current block does not use an intra-block partitioning mode; the current block is predicted using a mode candidate list; the intra-prediction mode of the current block is located at a first preset position in the mode candidate list; the intra-prediction mode of the current block is an intra-angle prediction mode; and the current block does not meet the MPDIP activation condition, or the current block is not located in the boundary region of the current image.
[0206] In some embodiments, when a first condition is met, encoding the optimal mode parameter includes: determining a first bit and a second bit of the optimal encoding parameter; encoding the first bit of the optimal mode parameter when the first condition is met; and encoding the second bit of the optimal mode parameter when a second condition is met.
[0207] In some embodiments, the second condition includes: the first bit being 1. Specifically, if the first bit is 1, the second bit of the optimal mode parameter is encoded; if the first bit is 0, the mode parameter is determined to be a first preset value, that is, the second bit of the optimal mode parameter is not encoded.
[0208] In some embodiments, the second condition includes: the current block is not located in the boundary region of the current image; for example, the current block is not located in the boundary region of the current image including at least one of the following: the upper boundary of the current block does not coincide with the upper boundary of the current image; the lower boundary of the current block does not coincide with the lower boundary of the current image; the left boundary of the current block does not coincide with the left boundary of the current image; the right boundary of the current block does not coincide with the right boundary of the current image.
[0209] In some embodiments, the second condition includes: the first bit is 1, and the current block is not located in the boundary region of the current image.
[0210] For example, the method further includes: if the value of the first bit is 1, and the upper boundary of the current block coincides with the upper boundary of the current image or the lower boundary of the current block coincides with the lower boundary of the current image, then the value of the second bit is determined to be 1; if the value of the first bit is 1, and the upper boundary of the current block coincides with the left boundary of the current image or the right boundary of the current block coincides with the lower boundary of the current image, then the value of the second bit is determined to be 0.
[0211] In some embodiments, the method further includes: if the first condition is not met, determining that the mode parameter takes the value of a first preset value, i.e., not encoding the mode parameter.
[0212] In some embodiments, the mode parameter is set to a first preset value, which determines that the current block adopts a non-directional planar prediction mode; the mode parameter is set to a second preset value, which determines that the current block adopts a horizontal planar prediction mode; and the mode parameter is set to a third preset value, which determines that the current block adopts a vertical planar prediction mode.
[0213] In some embodiments, the method further includes: determining the mode index of the current block; the mode index is used to indicate the intra-prediction mode of the current block in the candidate mode list; encoding the mode index and writing the obtained encoded bits into the bitstream.
[0214] In some embodiments, the method further includes: transforming the residual samples of the current block to determine the transform coefficients of the current block; quantizing the transform coefficients to obtain the residual coefficients of the current block; encoding the parameter coefficients of the current block and writing the obtained encoded bits into the bitstream.
[0215] By adopting the above technical solution, the compression efficiency of the mode parameters can be improved and encoding bits can be saved by setting the encoding conditions of the mode parameters, thereby optimizing the encoding performance.
[0216] Based on the above embodiments, a possible implementation method for the syntax element parsing process is also provided.
[0217] Its corresponding parsing process: intra_luma_pred_mode()
[0218] As shown in the table above, `planar_idx` indicates whether the current CU uses a directional planar prediction mode. The direction of the current CU's planar prediction mode is determined as follows:
[0219] planar_idx == 0: The current CU uses the ordinary planar prediction method to predict the current CU;
[0220] planar_idx == 1: The current CU uses a horizontal planar prediction method to predict the current CU;
[0221] planar_idx == 2: The current CU uses a vertical planar prediction method to predict the current CU;
[0222] The conditions for decoding planar_idx are explained below:
[0223] The condition `if(intra_luma_ref_idx == 0 && !intra_subpartitions_mode_flag && intra_luma_mpm_idx == 0 && intra_luma_mpm_flag && MPDIP_flag)` is used to calculate the subpartitions mode flag. Here, `intra_luma_ref_idx == 0` indicates that the current subpartition uses the first row and first column as references for prediction, and `intra_luma_ref_idx` is the first syntax element. `intra_subpartitions_mode_flag` indicates that the current CU is not using ISP for decoding. `intra_subpartitions_mode_flag` is the second syntax element. `intra_luma_mpm_idx == 0 && intra_luma_mpm_flag` indicates that the current CU's prediction mode is located at the first position in the MPM list. `intra_luma_mpm_flag` is the third syntax element indicating whether the MPM list is used. `intra_luma_mpm_idx` is the fourth syntax element, representing the prediction mode index. `MPDIP_flag` indicates whether the current CU meets the MPDIP startup conditions.
[0224] In some embodiments, the intra-prediction mode of the current block is determined not to be one or more preset intra-prediction modes based on the value of one or more fifth syntax elements. For example, one or more fifth syntax elements include, but are not limited to, related syntax elements or parameters such as TIMD_flag, DIMP_flag, EIP_flag, and IntraTMP_flag.
[0225] It should be noted that since related technologies (such as ECM) will use the Planar mode as the first candidate mode when constructing the MPM list, when intra_luma_mpm_idx == 0 && intra_luma_mpm_flag, it means that the current CU's prediction decoding mode is Planar mode.
[0226] It should also be noted that in the ECM codec, when parsing the prediction mode of the current CU, if the current CU uses angle prediction mode and uses the first row and first column reference pixels (intra_luma_ref_idx == 0) and does not use ISP prediction (!intra_subpartitions_mode_flag), then it will determine whether the current CU's prediction mode is planar mode. For example, it will check if the current CU's prediction mode is at the beginning of the MPM list. That is, if the current CU's prediction mode is intra_luma_mpm_idx is 0 and intra_luma_mpm_flag is true, then it needs to further decode planar_idx to determine whether the current CU uses a normal planar prediction decoding mode or a directional planar prediction decoding mode. This scheme wastes an extra bit (bin) to represent cases where the current CU does not use a directional planar mode. Furthermore, since MPDIP is much more efficient than traditional angle prediction modes, for some blocks that meet the prediction requirements of MPDIP, MPDIP is more likely to be chosen for prediction rather than traditional angle prediction modes.
[0227] Based on this, embodiments of this application provide a novel directional Planar prediction decoding scheme. When the MPDIP startup conditions are met, this scheme does not parse the directional Planar mode, i.e., it skips the parsing of planar_idx and defaults to using the MPDIP Planar mode for prediction decoding. If the MPDIP startup conditions are not met, then the directional Planar mode will be decoded, i.e., planar_idx will be parsed.
[0228] Specifically, the decoding method is as follows:
[0229] 1. When parsing the prediction decoding mode of the current CU, if the following condition is met, proceed to operation 2; otherwise, proceed to operation 3:
[0230] intra_luma_ref_idx == 0: The current CU uses the first row and first column for intra-frame prediction;
[0231] ! intra_subpartitions_mode_flag: The current CU is not using ISP for intra-frame prediction;
[0232] intra_luma_mpm_idx == 0 && intra_luma_mpm_flag: The current CU's prediction mode is in the MPM list, and the prediction mode is at the beginning of the MPM list;
[0233] 2. Determine if the current CU meets the MPDIP boot conditions. If it does, proceed to step 3; otherwise, proceed to step 4.
[0234] MPDIP boot requirements include:
[0235] 1) The template type of the current CU block is Left_Above_Templete, which means that the samples in the left template region and the upper template region have been reconstructed;
[0236] 2) In the existing ECM, MPDIP prediction uses different numbers of prediction modes for intra-frame prediction based on the size of the CU block, as shown in Table 1. If the width and height of the current CU block are both less than or equal to 16, and the intra-frame prediction mode is 0, 1, (2+2×k), then the mode satisfies MPDIP prediction; otherwise, if the intra-frame prediction mode is 0, 1, (2+4×k), then the mode satisfies MPDIP prediction.
[0237] 3) For blocks of different sizes, reference samples with different numbers of rows and columns must have been reconstructed. See Table 2 for details:
[0238] 4) The current block size is the block size supported by MPDIP mode. Currently, the block sizes supported by MPDIP mode are: 4×4, 4×8, 8×4, 8×8, 4×16, 16×4, 4×32, 32×4, 8×16, 16×8, 16×16, 8×32, 32×8, 16×32, 32×16, 32×32.
[0239] 5) If the current CU meets the conditions of 1) -> 4) above, then the current CU is determined to meet the MPDIP startup conditions, that is, the value of MPDIP_flag is 1; if the current CU does not meet any of the conditions of 1) -> 4) above, then the current CU is determined not to meet the MPDIP startup conditions, that is, the value of MPDIP_flag is 0.
[0240] 3. The current CU's directional Planar mode is not parsed; it defaults to the normal Planar prediction mode, i.e., planar_idx is 0.
[0241] 4. Analyze the directional Planar mode of the current CU, i.e., parse planar_idx.
[0242] 5. Decode the current CU, construct an MPM list based on the existing ECM codec, and then obtain the prediction mode of the current CU based on its prediction mode index. It should be noted that if the prediction mode of the current CU is Planar mode, the directionality of the Planar mode is determined based on planar_idx.
[0243] 6. Use the prediction mode of the current CU to obtain the predicted value of the current CU, and use the residual coefficient to reconstruct the attribute information of the current CU block.
[0244] This application proposes a directional planar prediction encoding / decoding scheme. If the current CU also meets the above conditions, when parsing whether it belongs to the directional planar mode, it will determine whether the current CU meets the MPDIP activation condition. If the MPDIP activation condition is met, the directional planar mode will not be parsed, that is, the MPDIP planar mode will be used for prediction by default. Otherwise, it is necessary to continue parsing the directional planar mode of the current CU, i.e., planar_idx. This encoding / decoding scheme can save the encoding bits of planar_idx when the current CU meets the MPDIP activation condition, thereby further improving the encoding / decoding efficiency of ECM.
[0245] In some embodiments, the parsing condition for planar_idx can be replaced with: if(intra_luma_ref_idx==0&&!intra_subpartitions_mode_flag&&intra_luma_mpm_idx==0&&intra_luma_mpm_flag&&boundary_flag==0): where boundary_flag==0 indicates that the current CU is not located at the boundary.
[0246] In some embodiments, the parsing condition for planar_idx can also be replaced with: if(intra_luma_ref_idx==0&&!intra_subpartitions_mode_flag&&intra_luma_mpm_idx==0&&intra_luma_mpm_flag&&(MPDIP_flag==0||boundary_flag==0)): where MPDIP_flag==0 indicates that the current CU does not meet the MPDIP startup condition, and boundary_flag==0 indicates that the current CU is not located at the boundary.
[0247] Specifically, the decoding method is as follows:
[0248] 1. When parsing the prediction decoding mode of the current CU, if the following condition is met, proceed to operation 2; otherwise, proceed to operation 3:
[0249] intra_luma_ref_idx == 0: The current CU uses the first row or the first column for intra-frame prediction;
[0250] ! intra_subpartitions_mode_flag: The current CU is not using ISP for intra-frame prediction;
[0251] intra_luma_mpm_idx == 0 && intra_luma_mpm_flag: The current CU's prediction mode is in the MPM list, and the prediction mode is at the beginning of the MPM list;
[0252] 2. Determine whether the current CU meets the MPDIP boot conditions. If it meets the MPDIP boot conditions, proceed to operation 3; otherwise, proceed to operation 4.
[0253] 3. The current CU's directional Planar mode is not parsed; it defaults to the normal Planar prediction mode, i.e., planar_idx is 0.
[0254] 4. Determine if the current CU is at the boundary of the current image. If the current CU is at the boundary of the image, then there is no need to parse the Planar mode with direction. Otherwise, operation 5 needs to be performed.
[0255] If the current CU is at the upper or lower boundary of the current image, then the horizontal Planar mode is used for prediction;
[0256] If the current CU is located at the left or right boundary of the current image, then the vertical Planar mode is used for prediction.
[0257] 5. Analyze the directional Planar mode of the current CU.
[0258] 6. Decode the current CU, construct an MPM list based on the existing ECM codec, and then obtain the prediction mode of the current CU based on its prediction mode index. It should be noted that if the prediction mode of the current CU is Planar mode, the directionality of the Planar mode is determined based on planar_idx.
[0259] 7. Use the corresponding prediction mode to obtain the predicted value of the current CU block, and use the residual coefficient to reconstruct the attribute information of the current CU block.
[0260] The following demonstrates the encoding efficiency of attributes: The Planar prediction encoding and decoding scheme provided in this application embodiment was tested based on the latest test version of ECM, ECM15.0, and the specific performance is shown in Table 3.
[0261] Table 3
[0262] This performance test clearly shows that the solution provides significant performance improvements for various sequences in ECM 15.0.
[0263] In another embodiment of this application, based on the same inventive concept as the foregoing embodiments, referring to FIG11, a schematic diagram of the composition structure of an encoder provided in an embodiment of this application is shown. As shown in FIG11, the encoder 110 may include a first determining unit 1101, a first prediction unit 1102, and an encoding unit 1103; wherein,
[0264] The first determining unit is configured to determine the intra-prediction mode of the current block based on the candidate mode list of the current block;
[0265] The first prediction unit is configured to predict the current block based on the intra-prediction mode and candidate mode parameters of the current block, and determine the predicted value of the current block; based on the predicted value and residual value of the current block, it determines the reconstructed value of the current block.
[0266] The first determining unit is further configured to perform cost calculation based on the reconstruction value of the current block to determine the cost value of the candidate mode parameters; and to determine the optimal mode parameters corresponding to the minimum cost value based on the cost value of the candidate mode parameters.
[0267] The encoding unit is configured to encode the optimal mode parameters when the first condition is met, and write the resulting encoded bits into the bit stream.
[0268] Understandably, each functional unit of the encoder also performs the encoding method of any of the foregoing embodiments.
[0269] Understandably, in the embodiments of this application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular one. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or as a software functional module.
[0270] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0271] Therefore, embodiments of this application provide a computer-readable storage medium applied to an encoder 110, the computer-readable storage medium storing a computer program that, when executed by a first processor, implements the method of any of the foregoing embodiments.
[0272] This application provides a computer-readable storage medium that stores a bitstream generated by an encoding method such as described above.
[0273] Based on the composition of encoder 110 and the computer-readable storage medium, see Figure 12, which illustrates a specific hardware structure diagram of encoder 110 provided in this embodiment. As shown in Figure 12, encoder 110 may include: a first communication interface 1201, a first memory 1202, and a first processor 1203; the various components are coupled together through a first bus system 1204. It is understood that the first bus system 1204 is used to realize the connection and communication between these components. In addition to a data bus, the first bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the first bus system 1204 in Figure 12.
[0274] The first communication interface 1201 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
[0275] The first memory 1202 is used to store computer programs that can run on the first processor 1203;
[0276] The first processor 1203 is used to execute the following when running computer programs:
[0277] Based on the candidate mode list of the current block, determine the intra-prediction mode of the current block;
[0278] The prediction value of the current block is determined by predicting the intra-prediction mode and candidate mode parameters of the current block.
[0279] Based on the predicted and residual values of the current block, determine the reconstructed value of the current block;
[0280] Cost calculation is performed based on the reconstruction value of the current block to determine the cost value of the candidate mode parameters;
[0281] Based on the cost value of candidate mode parameters, determine the optimal mode parameters corresponding to the minimum cost value.
[0282] If the first condition is met, the optimal mode parameters are encoded, and the resulting encoded bits are written into the bitstream.
[0283] It is understood that the first memory 1202 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 1202 of the system and method described in this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0284] The first processor 1203 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the first processor 1203 or by instructions in software form. The first processor 1203 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. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the first memory 1202. The first processor 1203 reads the information in the first memory 1202 and completes the steps of the above method in conjunction with its hardware.
[0285] It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can 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 units for performing the functions of this application, or combinations thereof. For software implementation, the technology of this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions of this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0286] Alternatively, as another embodiment, the first processor 1203 is also configured to execute any of the methods in the foregoing embodiments when running a computer program.
[0287] This embodiment provides an encoder in which the compression efficiency of the mode parameters is improved and the encoding bits are saved by setting the encoding conditions of the mode parameters, thereby optimizing the encoding performance.
[0288] In another embodiment of this application, based on the same inventive concept as the foregoing embodiments, referring to FIG13, a schematic diagram of the composition structure of a decoder 130 provided in an embodiment of this application is shown. As shown in FIG13, the decoder 130 may include: a decoding unit 1301, a second determining unit 1302, and a second predicting unit 1303; wherein,
[0289] The decoding unit is configured to parse the mode parameters of the current block when the first condition is met;
[0290] The second determining unit is configured to determine the intra-prediction mode of the current block based on the candidate mode list of the current block;
[0291] The second prediction unit is configured to predict the current block based on the intra-frame prediction mode and mode parameters of the current block, and determine the predicted value of the current block; and to determine the reconstructed value of the current block based on the predicted value and residual value of the current block.
[0292] Understandably, each functional unit of the decoder also performs the decoding method of any of the aforementioned embodiments.
[0293] Based on the composition of the decoder 130 and the computer-readable storage medium, Figure 14 illustrates a schematic diagram of the specific hardware structure of the decoder 130 provided in this embodiment. As shown in Figure 14, the decoder 130 may include: a second communication interface 1401, a second memory 1402, and a second processor 1403; the various components are coupled together through a second bus system 1404. It is understood that the second bus system 1404 is used to realize the connection and communication between these components. In addition to a data bus, the second bus system 1404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the second bus system 1404 in Figure 14.
[0294] The second communication interface 1401 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
[0295] The second memory 1402 is used to store computer programs that can run on the second processor 1403;
[0296] The second processor 1403 is used to execute the following when running computer programs:
[0297] If the first condition is met, parse the mode parameters of the current block;
[0298] Based on the candidate mode list of the current block, determine the intra-prediction mode of the current block;
[0299] The prediction value of the current block is determined by predicting the current block based on the intra-prediction mode and mode parameters of the current block.
[0300] The reconstructed value of the current block is determined based on the predicted value and residual value of the current block.
[0301] Alternatively, as another embodiment, the second processor 1403 is also configured to execute any of the methods in the foregoing embodiments when running a computer program.
[0302] It is understood that the second memory 1402 has similar hardware functions to the first memory 1202, and the second processor 1403 has similar hardware functions to the first processor 1203; these will not be described in detail here.
[0303] This embodiment provides a decoder in which the compression efficiency of the mode parameters is improved by setting the parsing conditions of the mode parameters, thereby optimizing the decoding performance.
[0304] In another embodiment of this application, referring to FIG15, a schematic diagram of the composition structure of an encoding / decoding system provided in an embodiment of this application is shown. As shown in FIG15, the encoding / decoding system 150 may include an encoder 1501 and a decoder 1502.
[0305] In this embodiment, encoder 1501 can be any of the encoders in the foregoing embodiments, and decoder 1502 can be any of the decoders in the foregoing embodiments.
[0306] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0307] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0308] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict. The features disclosed in the several product embodiments provided in this application can be arbitrarily combined to obtain new product embodiments without conflict. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined to obtain new method embodiments or device embodiments without conflict.
[0309] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims. Industrial applicability
[0310] This application provides an encoding / decoding method, encoder, decoder, and storage medium. The method includes: decoding the mode parameters of the current block when a first condition is met; determining the intra-prediction mode of the current block based on a candidate mode list of the current block; predicting the current block based on the intra-prediction mode and mode parameters to determine the predicted value of the current block; and determining the reconstructed value of the current block based on the predicted value and residual value. Thus, by setting the parsing conditions for the mode parameters, the compression efficiency of the mode parameters is improved, coding bits are saved, and encoding / decoding performance is optimized.
Claims
1. A decoding method applied to a decoder, the method comprising: If the first condition is met, parse the mode parameters of the current block; Based on the candidate mode list of the current block, determine the intra-prediction mode of the current block; Based on the intra-frame prediction mode of the current block and the mode parameters, the current block is predicted to determine the predicted value of the current block; The reconstructed value of the current block is determined based on the predicted value and residual value of the current block.
2. The method according to claim 1, wherein, The first condition includes at least the following: the current block does not meet the matrix-based intra-frame angle prediction (MPDIP) initiation condition.
3. The method according to claim 2, wherein, The MPDIP startup conditions include at least one of the following: The template type of the current block is the first template type; The size of the current block is the block size that supports the MPDIP prediction; The reference sample of the current block has been reconstructed.
4. The method according to claim 3, wherein, The reference sample of the current block includes the upper reference row sample of the current block and the left reference column sample of the current block; The number of upper reference rows and the number of left reference columns of the current block are related to the size of the current block.
5. The method according to any one of claims 1-4, wherein, The first condition includes at least one of the following: The current block is predicted using upper reference row samples and left reference column samples; The current block does not use the intra-frame sub-block partitioning mode; The current block is predicted using the pattern candidate list; The intra-prediction mode of the current block is located at the first preset position in the mode candidate list; The intra-prediction mode of the current block is not one or more preset intra-prediction modes.
6. The method according to any one of claims 1-5, wherein, The first condition includes: the current block is not located in the boundary region of the current image; The current block not located in the boundary region of the current image includes at least one of the following: The upper boundary of the current block does not coincide with the upper boundary of the current image; The lower boundary of the current block does not coincide with the lower boundary of the current image; The left boundary of the current block does not coincide with the left boundary of the current image; The right boundary of the current block does not coincide with the right boundary of the current image.
7. The method according to any one of claims 1-5, wherein, The step of parsing the mode parameters of the current block when the first condition is met includes: If the first condition is met, the first bit corresponding to the mode parameter is parsed. If the second condition is met, the second bit corresponding to the mode parameter is parsed. The value of the mode parameter is determined based on the value of the first bit and the value of the second bit.
8. The method according to claim 7, wherein, The second condition includes: the value of the first bit is 1.
9. The method according to claim 7 or 8, wherein, The second condition includes: the current block is not located in the boundary region of the current image; The current block not located in the boundary region of the current image includes at least one of the following: The upper boundary of the current block does not coincide with the upper boundary of the current image; The lower boundary of the current block does not coincide with the lower boundary of the current image; The left boundary of the current block does not coincide with the left boundary of the current image; The right boundary of the current block does not coincide with the right boundary of the current image.
10. The method according to claim 9, wherein, The method further includes: If the value of the first bit is 1, and the upper boundary of the current block coincides with the upper boundary of the current image or the lower boundary of the current block coincides with the lower boundary of the current image, then the value of the second bit is determined to be 1. If the value of the first bit is 1, and the upper boundary of the current block coincides with the left boundary of the current image, or the right boundary of the current block coincides with the lower boundary of the current image, then the value of the second bit is determined to be 0.
11. The method according to claim 1, wherein, The method further includes: If the first condition is not met, the mode parameter is determined to be a first preset value.
12. The method according to any one of claims 1-11, wherein, When the intra-frame prediction mode of the current block is a planar prediction mode, the mode parameter is used to indicate the directionality of the planar prediction mode.
13. The method according to claim 12, wherein, The mode parameter is set to a first preset value, which determines that the current block adopts a non-directional planar prediction mode. The mode parameter is set to a second preset value, which determines that the current block adopts a horizontal planar prediction mode. The mode parameter is set to a third preset value, which determines that the current block adopts a vertical plane prediction mode.
14. The method according to claim 1, wherein, Determining the intra-prediction mode of the current block based on the candidate mode list of the current block includes: Parse the pattern index of the current block; Based on the mode index of the current block, the intra-prediction mode of the current block is determined from the candidate mode list of the current block.
15. An encoding method applied to an encoder, the method comprising: Based on the candidate mode list of the current block, determine the intra-prediction mode of the current block; Based on the intra-frame prediction mode and candidate mode parameters of the current block, the prediction value of the current block is determined. Based on the predicted value and residual value of the current block, the reconstructed value of the current block is determined; The cost is calculated based on the reconstruction value of the current block to determine the cost value of the candidate mode parameters; Based on the cost value of the candidate mode parameters, determine the optimal mode parameters corresponding to the minimum cost value. If the first condition is met, the optimal mode parameters are encoded, and the resulting encoded bits are written into the bitstream.
16. The method according to claim 15, wherein, The first condition includes at least the following: the current block does not meet the matrix-based intra-frame angle prediction (MPDIP) initiation condition.
17. The method according to claim 16, wherein, The MPDIP startup conditions include at least one of the following: The template type of the current block is the first template type; The size of the current block is the block size that supports the MPDIP prediction; The reference sample of the current block has been reconstructed.
18. The method according to claim 17, wherein, The reference sample of the current block includes the upper reference row sample of the current block and the left reference column sample of the current block; The number of upper reference rows and the number of left reference columns of the current block are related to the size of the current block.
19. The method according to any one of claims 15-18, wherein, The first condition includes at least one of the following: The current block is predicted using upper reference row samples and left reference column samples; The current block does not use the intra-frame sub-block partitioning mode; The current block is predicted using the pattern candidate list; The intra-prediction mode of the current block is located at the first preset position in the mode candidate list; The intra-prediction mode of the current block is not one or more preset intra-prediction modes.
20. The method according to any one of claims 15-19, wherein, The first condition includes: the current block is not located in the boundary region of the current image; The current block not located in the boundary region of the current image includes at least one of the following: The upper boundary of the current block does not coincide with the upper boundary of the current image; The lower boundary of the current block does not coincide with the lower boundary of the current image; The left boundary of the current block does not coincide with the left boundary of the current image; The right boundary of the current block does not coincide with the right boundary of the current image.
21. The method according to any one of claims 15-19, wherein, The process of encoding the optimal mode parameters when the first condition is met includes: Determine the first and second bits of the optimal encoding parameters; If the first condition is met, the first bit of the optimal mode parameter is encoded. If the second condition is met, the second bit of the optimal mode parameter is encoded.
22. The method according to claim 21, wherein, The second condition includes: the value of the first bit is 1.
23. The method according to claim 21 or 22, wherein, The second condition includes: the current block is not located in the boundary region of the current image; The current block not located in the boundary region of the current image includes at least one of the following: The upper boundary of the current block does not coincide with the upper boundary of the current image; The lower boundary of the current block does not coincide with the lower boundary of the current image; The left boundary of the current block does not coincide with the left boundary of the current image; The right boundary of the current block does not coincide with the right boundary of the current image.
24. The method according to claim 23, wherein, The method further includes: If the first condition is not met, the mode parameter is determined to be a first preset value.
25. The method according to any one of claims 15-24, wherein, When the intra-frame prediction mode of the current block is a planar prediction mode, the mode parameter is used to indicate the directionality of the planar prediction mode.
26. The method of claim 25, wherein, The mode parameter is set to a first preset value, which determines that the current block adopts a non-directional planar prediction mode. The mode parameter is set to a second preset value, which determines that the current block adopts a horizontal planar prediction mode. The mode parameter is set to a third preset value, which determines that the current block adopts a vertical plane prediction mode.
27. The method according to claim 15, wherein, The method further includes: Determine the mode index of the current block; the mode index is used to indicate the intra-prediction mode of the current block in the candidate mode list; The pattern index is encoded, and the resulting encoded bits are written into the bitstream.
28. An encoder, comprising a first determining unit, a first predicting unit, and an encoding unit; wherein: The first determining unit is configured to determine the candidate mode parameters of the current block. The first determining unit is further configured to determine the intra-prediction mode of the current block based on the candidate mode list of the current block; The first prediction unit is configured to predict the current block based on the intra-frame prediction mode of the current block and the candidate mode parameters, and determine the predicted value of the current block; and to determine the reconstructed value of the current block based on the predicted value and the residual value of the current block. The first determining unit is further configured to perform cost calculation based on the reconstruction value of the current block to determine the cost value of the candidate mode parameters; and to determine the optimal mode parameter corresponding to the minimum cost value based on the cost value of the candidate mode parameters. The encoding unit is configured to encode the optimal mode parameters when the first condition is met, and write the resulting encoded bits into the bitstream.
29. An encoder, comprising a first memory and a first processor; wherein: The first memory is used to store computer programs that can run on the first processor; The first processor is configured to perform the method as described in any one of claims 15 to 27 when running the computer program.
30. A decoder, comprising a decoding unit, a second determining unit, and a second predicting unit; wherein: The decoding unit is configured to parse the mode parameters of the current block when the first condition is met; The second determining unit is configured to determine the intra-prediction mode of the current block based on the candidate mode list of the current block; The second prediction unit is configured to predict the current block based on the intra-frame prediction mode of the current block and the mode parameters, and determine the predicted value of the current block; The reconstructed value of the current block is determined based on the predicted value and residual value of the current block.
31. A decoder, comprising a second memory and a second processor; wherein: The second memory is used to store computer programs that can run on the second processor; The second processor is configured to perform the method as described in any one of claims 1 to 14 when running the computer program.
32. A computer-readable storage medium, wherein, The computer-readable storage medium stores the bitstream generated by the encoding method as described in any one of claims 15 to 27.
33. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 14, or the method as described in any one of claims 15 to 27.