Methods for predicting internal structure, encoders, decoders, and methods for transmitting bit streams.
Patent Information
- Application Number
- VN1202305881
- Authority / Receiving Office
- VN · VN
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2021-02-22
- Publication Date
- 2024-01-25
- Estimated Expiration
- 2041-02-22
AI Technical Summary
Existing video coding technologies require additional prediction circuitry when using two different intra-frame prediction modes, leading to increased hardware implementation costs and complexity, which affects encoding and decoding performance.
By using two different intra-frame angle prediction modes to determine the two prediction blocks of the current block, and combining them through various weight matrices, the hardware implementation cost is reduced, the complexity is reduced, and a simple and efficient encoding and decoding method is achieved.
While improving the accuracy of intra-frame prediction, it reduces the complexity and cost of hardware implementation and improves encoding and decoding performance.
Smart Images

Figure VN1202305881_0
Abstract
Description
Intra-frame prediction methods, encoders, decoders, and storage media Technical Field This application relates to the field of image processing technology, and in particular to an intra-frame prediction method, an encoder, a decoder, and a storage medium. Background Technology To capture finer edge directions in natural video, Versatile Video Coding (VVC) expands the 33 intra-frame luminance prediction angle modes defined in the High Efficiency Video Coding (HEVC) standard to 65, plus two non-angle modes: the Planar mode (number 0) and the Direct Current (DC) mode (number 1). To improve the accuracy of intra-frame prediction, a method using two different intra-frame prediction modes has been proposed. However, in hardware implementation, some circuits for different intra-frame prediction modes cannot be reused, thus requiring two sets of intra-frame prediction circuits. Adding new prediction circuits increases the hardware implementation cost and complexity, and reduces encoding and decoding performance. Summary of the Invention This application provides an intra-frame prediction method, encoder, decoder, and storage medium, which can improve the accuracy of intra-frame prediction, reduce hardware implementation costs and complexity, and achieve a simple and efficient encoding and decoding method, thereby improving compression performance. The technical solution of this application embodiment can be implemented as follows: In a first aspect, embodiments of this application provide an intra-frame prediction method applied to a decoder, the method comprising: Decode the bitstream to determine the intra-prediction mode parameters for the current block; When the intra-prediction mode parameter instructs the current block to use IWCP mode to determine the intra-prediction value of the current block, the first mode index and the second mode index of the current block are determined. Construct a list of the most likely modes (MPMs) for the current block; The first intra-frame prediction mode and the second intra-frame prediction mode of the current block are determined based on the first mode index, the second mode index, and the MPM list; wherein the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes. The weight matrix of the current block is determined, and the predicted value of the current block is determined based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix. Secondly, embodiments of this application provide an intra-frame prediction method applied to an encoder, the method comprising: When the current block uses the IWCP mode to determine the intra-prediction value of the current block, the first intra-prediction mode and the second intra-prediction mode of the current block are determined; wherein, the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes. Construct the MPM list for the current block; The first mode index and the second mode index of the current block are determined based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list. Write the first mode index and the second mode index into the bitstream. Thirdly, embodiments of this application provide an encoder, the encoder comprising: a first determining part, a first constructing part, and an encoding part. The first determining part is configured to determine a first intra-prediction mode and a second intra-prediction mode of the current block when the current block uses the IWCP mode to determine the intra-prediction value of the current block; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes. The first construction section is configured to construct the MPM list of the current block; The first determining part is further configured to determine the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list; The encoding portion is configured to write the first mode index and the second mode index into the bitstream. Fourthly, embodiments of this application provide a decoder, the decoder comprising: a decoding part, a second determining part, and a second constructing part. The decoding part is configured as a decoding bitstream; The second determining part is configured to determine the intra-prediction mode parameters of the current block; when the intra-prediction mode parameters indicate that the current block uses the IWCP mode to determine the intra-prediction value of the current block, the first mode index and the second mode index of the current block are determined. The second construction part is configured to construct a list of the most likely modes (MPMs) for the current block. The second determining part is further configured to determine a first intra-frame prediction mode and a second intra-frame prediction mode of the current block based on the first mode index, the second mode index, and the MPM list; wherein the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes; determine the weight matrix of the current block, and determine the prediction value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix. Fifthly, embodiments of this application provide an encoder, which includes a first processor and a first memory storing instructions executable by the first processor. When the instructions are executed, the first processor implements the intra-frame prediction method as described above. In a sixth aspect, embodiments of this application provide a decoder, the decoder including a second processor and a second memory storing instructions executable by the second processor, wherein when the instructions are executed, the second processor executes the intra-frame prediction method as described above. In a seventh aspect, embodiments of this application provide a computer storage medium storing a computer program that, when executed by a first processor, implements the intra-frame prediction method as described in the first aspect, or, when executed by a second processor, implements the intra-frame prediction method as described in the second aspect. This application provides an intra-frame prediction method, an encoder, a decoder, and a storage medium. The decoder decodes the bitstream and determines the intra-frame prediction mode parameters of the current block. When the intra-frame prediction mode parameters indicate that the current block uses the IWCP mode to determine the intra-frame prediction value of the current block, a first mode index and a second mode index of the current block are determined. A most probable mode (MPM) list of the current block is constructed. A first intra-frame prediction mode and a second intra-frame prediction mode of the current block are determined based on the first mode index, the second mode index, and the MPM list. The first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes. A weight matrix of the current block is determined, and the prediction value of the current block is determined based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix. When the encoder determines the intra-prediction value of the current block using the IWCP mode, it determines the first intra-prediction mode and the second intra-prediction mode of the current block; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes; it constructs the MPM list of the current block; it determines the first mode index and the second mode index of the current block based on the first intra-prediction mode, the second intra-prediction mode, and the MPM list; and it writes the first mode index and the second mode index into the bitstream. In other words, in the embodiments of this application, the codec can determine two different prediction blocks of the current block using two different intra-angle prediction modes, and then combine them using various weight matrices to obtain more complex prediction blocks. This improves the accuracy of intra-prediction while reducing hardware implementation costs and complexity, achieving a simple and efficient encoding / decoding method, thereby improving compression performance. Attached Figure Description Figure 1 is a schematic diagram of weight allocation; Figure 2 is a schematic diagram of weight allocation. Figure 3 is a schematic diagram of intra-frame prediction; Figure 4. Block diagram of a video coding system; Figure 5. Block diagram of a video decoding system; Figure 6 is a schematic diagram of the implementation process of the intra-frame prediction method. Figure 7 is a schematic diagram of the IWCP mode; Figure 8 is a schematic diagram of adjacent blocks; Figure 9 is a schematic diagram of the implementation process of the intra-frame prediction method (II). Figure 10 is a schematic diagram of the encoder structure proposed in an embodiment of this application; Figure 11 is a schematic diagram of the encoder structure proposed in the embodiment of this application (II). Figure 12 is a schematic diagram of the composition structure of the decoder proposed in the embodiment of this application; Figure 13 is a schematic diagram of the composition structure of the decoder proposed in the embodiment of this application. Detailed Implementation The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining the relevant application and not for limiting the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings. Currently, common video codec standards are based on a block-based hybrid coding framework. Each frame in a video image is divided into square Largest Coding Units (LCUs) of the same size (e.g., 128×128, 64×64, etc.). Each LCU can be further divided into rectangular Coding Units (CUs) according to rules; and the Coding Units may be further divided into smaller Prediction Units (PUs). Specifically, the hybrid coding framework may include modules such as prediction, transformation, quantization, entropy coding, and in-loop filtering; among them, the prediction module may include intra-prediction and inter-prediction, and inter-prediction may include motion estimation and motion compensation. Because there is a strong correlation between adjacent pixels within a video frame, intra-frame prediction can eliminate spatial redundancy between adjacent pixels in video encoding and decoding technology. However, because there is also a strong similarity between adjacent frames in a video image, inter-frame prediction can eliminate temporal redundancy between adjacent frames in video encoding and decoding technology, thereby improving encoding and decoding efficiency. The basic workflow of a video codec is as follows: At the encoding end, a frame is divided into blocks. Intra-frame prediction or inter-frame prediction is used on the current block to generate a prediction block. The original block of the current block is subtracted from the prediction block to obtain a residual block. The residual block is transformed and quantized to obtain a quantization coefficient matrix. The quantization coefficient matrix is entropy-encoded and output to the bitstream. At the decoding end, intra-frame prediction or inter-frame prediction is used on the current block to generate a prediction block. On the other hand, the bitstream is decoded to obtain a quantization coefficient matrix. The quantization coefficient matrix is inverse-quantized and inverse-transformed to obtain a residual block. The prediction block and the residual block are added to obtain a reconstructed block. The reconstructed blocks form a reconstructed image. Loop filtering is performed on the reconstructed image based on the image or based on the blocks to obtain a decoded image. The encoding end also needs similar operations to the decoding end to obtain the decoded image. The decoded image can serve as a reference frame for inter-frame prediction in subsequent frames. The block division information, prediction, transformation, quantization, entropy coding, loop filtering, and other mode or parameter information determined at the encoding end need to be output to the bitstream if necessary. The decoding end determines the same block partitioning information, prediction, transform, quantization, entropy coding, loop filtering, and other mode or parameter information as the encoding end by parsing and analyzing existing information, thereby ensuring that the decoded image obtained by the encoding end is the same as that obtained by the decoding end. The decoded image obtained by the encoding end is usually also called the reconstructed image. During prediction, the current block can be divided into prediction units, and during transform, the current block can be divided into transform units. The division of prediction units and transform units can be different. The above is the basic flow of a video codec under a block-based hybrid coding framework. With the development of technology, some modules or steps of this framework or flow may be optimized. The embodiments of this application are applicable to the basic flow of a video codec under this block-based hybrid coding framework, but are not limited to this framework and flow. The current block can be the current coding unit (CU) or the current prediction unit (PU), etc. Inter-frame prediction uses information from the decoded or reconstructed image, or reference frame, to predict the current block. Inter-frame prediction uses motion information to find a reference block in the reference frame and generates a prediction block based on the reference block. Motion information includes a list of reference frames, the reference frame index, and motion vectors. Motion vectors can be integer-pixel or fractional-pixel. If the motion vector is fractional-pixel, interpolation filtering is used in the reference frame to create the required fractional-pixel block. The integer-pixel or fractional-pixel block found in the reference frame based on the motion vector is called the reference block. Some techniques directly use the reference block as the prediction block, while others process the reference block further to generate the prediction block. Processing the reference block further to generate the prediction block can also be understood as using the reference block as the prediction block and then processing it to generate a new prediction block. The Versatile Video Coding (VVC) standard, currently under development, includes an inter-frame prediction mode called Geometric Partitioning Mode (GPM). The Audio Video Coding Standard (AVS) standard, also under development, includes an inter-frame prediction mode called Angular Weighted Prediction (AWP). Although these two modes differ in name and specific implementation, they share common principles. It's important to note that traditional unidirectional prediction simply finds a reference block of the same size as the current block, while traditional bidirectional prediction uses two reference blocks of the same size. The pixel value of each point within the predicted block is the average of the corresponding positions in the two reference blocks; that is, all points in each reference block occupy a 50% proportion. Bidirectional weighted prediction allows the proportions of the two reference blocks to differ, such as all points in the first reference block occupying a 75% proportion, and all points in the second reference block occupying a 25% proportion. However, the proportions of all points within the same reference block are the same. Other optimization methods, such as using Decoder Side Motion Vector Refinement (DMVR) and Bidirectional Optical Flow (BIO), can cause some changes in the reference or predicted pixels. Furthermore, GPM or AWP also use two reference blocks of the same size as the current block, but some pixel positions use 100% of the pixel values from the corresponding positions in the first reference block, and some pixel positions use 100% of the pixel values from the corresponding positions in the second reference block. In the boundary regions, the pixel values from the corresponding positions in the two reference blocks are used in a certain proportion. The weighting can be determined by the prediction model of GPM or AWP. For example, Figure 1 is a first schematic diagram of weight allocation. As shown in Figure 1, it illustrates the weight allocation of a GPM (Gross Partition Map) on a 64×64 current block according to an embodiment of this application, wherein there are 64 partitioning modes for the GPM. Figure 2 is a second schematic diagram of weight allocation. As shown in Figure 2, it illustrates the weight allocation of an AWP (Automatic Partition Map) on a 64×64 current block according to an embodiment of this application, wherein there are 56 partitioning modes for the AWP. In both Figure 1 and Figure 2, under each partitioning mode, the black area represents the weight value of the position corresponding to the first reference block as 0%, the white area represents the weight value of the position corresponding to the first reference block as 100%, and the gray area represents a weight value greater than 0% and less than 100% according to the different shades of the color. The weight value of the position corresponding to the second reference block is 100% minus the weight value of the position corresponding to the first reference block. GPM and AWP use different methods to derive weights. GPM determines the angle and offset for each mode and then calculates the weight matrix for each mode. AWP first draws a one-dimensional weight line and then uses a method similar to intra-frame angle prediction to fill the entire matrix with the one-dimensional weight line. It should be understood that early encoding and decoding technologies only used rectangular partitioning, whether for CUs, PUs, or Transform Units (TUs). GPM and AWP, however, achieved non-rectangular partitioning for prediction without such partitioning. GPM and AWP use a weighted mask of two reference blocks, as shown in the weight map above. This mask determines the weights of the two reference blocks when generating the prediction block, and the blending area is obtained by weighting the corresponding positions of the two reference blocks, resulting in a smoother transition. Since GPM and AWP do not divide the current block into two CUs or PUs along the dividing line, the subsequent residual transformations, quantizations, inverse transforms, and inverse quantizations are all processed as a single unit. Motion information used in the current block can be saved. Subsequent blocks in the current frame can use motion information from previously decoded blocks (such as adjacent blocks) based on their adjacent positional relationships. This utilizes spatial correlation, so this type of decoded motion information is called spatial motion information. Motion information used by each block in the current frame can also be saved. Subsequent frames can use motion information from previously decoded frames based on their reference relationships. This utilizes temporal correlation, so this type of decoded frame motion information is called temporal motion information. The method for storing motion information used by each block in the current frame typically involves using a fixed-size matrix, such as a 4×4 matrix, as a minimum unit, with each minimum unit storing a separate set of motion information. In this way, for each decoded block, the minimum units corresponding to its position can store the motion information for that block. This allows for direct retrieval of the motion information corresponding to the position when using spatial or temporal motion information. For example, if a 16x16 block uses traditional one-way prediction, then all 4×4 minimum units corresponding to this block store the motion information for that one-way prediction. If a block uses GPM or AWP, then the motion information stored in each of the block's smallest units is determined based on the GPM or AWP mode, the first motion information, the second motion information, and the position of each smallest unit. One approach is that if all 4×4 pixels of a smallest unit come from the first motion information, then that smallest unit stores the first motion information; if all 4×4 pixels of a smallest unit come from the second motion information, then that smallest unit stores the second motion information. If the 4×4 pixels of a smallest unit come from both the first and second motion information, then AWP selects one motion information to store. GPM's approach is to combine two motion information sets into bidirectional motion information if the two sets point to different reference frame lists; otherwise, only the second motion information is stored. It's important to note that GPM or AWP is an inter-frame prediction technique. GPM or AWP requires transmitting a flag in the bitstream indicating whether it's being used. This flag indicates whether the current block uses GPM or AWP. If GPM or AWP is used, the encoder needs to transmit the specific mode used in the bitstream—one of the 64 partitioning modes for GPM or one of the 56 partitioning modes for AWP—as well as the index values of two unidirectional motion information. In other words, for the current block, the decoder can determine whether GPM or AWP is being used by decoding the bitstream. If it's determined that GPM or AWP is being used, the decoder can parse the prediction mode parameters of GPM or AWP and the two motion information index values. For example, if the current block can be divided into two partitions, then the first index value corresponding to the first partition and the second index value corresponding to the second partition can be parsed. Specifically, for GPM mode, if GPM is used, the bitstream will transmit the prediction mode parameters under GPM, such as the specific partitioning mode of GPM; typically, GPM includes 64 partitioning modes. For AWP mode, if AWP is used, the bitstream will transmit the prediction mode parameters under AWP, such as the specific partitioning mode of AWP; typically, AWP includes 56 partitioning modes. In inter-frame prediction modes, such as GPM and AWP, two unidirectional motion information sequences are needed to locate two reference blocks. The current implementation involves constructing a candidate list of unidirectional motion information on the encoder side using relevant information from previously encoded / decoded portions of the current block. Unidirectional motion information is then selected from this list, and its index values are written into the bitstream. The decoder side uses the same method, constructing a candidate list of unidirectional motion information using relevant information from previously decoded portions of the current block. This candidate list must be identical to the one constructed by the encoder. Thus, by parsing the index values of the two unidirectional motion information sequences from the bitstream and then retrieving them from the candidate lists, the two unidirectional motion information sequences required for the current block are obtained. In other words, the unidirectional motion information described in this application can include: motion vector information, i.e., the value of (x, y), and corresponding reference frame information, i.e., a reference frame list and the reference frame index value in the reference frame list. One representation is to record the reference frame index values of two reference frame lists, where the reference frame index value corresponding to one reference frame list is valid (e.g., 0, 1, 2, etc.), and the reference frame index value corresponding to the other reference frame list is invalid (e.g., -1). The reference frame list with valid reference frame index values is the reference frame list used for the motion information of the current block. The corresponding reference frame can be found from this reference frame list based on the reference frame index value. Each reference frame list has a corresponding motion vector; the motion vector corresponding to a valid reference frame list is valid, and the motion vector corresponding to an invalid reference frame list is invalid. The decoder can find the required reference frame through the reference frame information in the unidirectional motion information. Based on the position of the current block and the value of the motion vector (x, y), the decoder can find the reference block in the reference frame and thus determine the inter-frame prediction value of the current block. Intra-frame prediction uses the reconstructed pixels that have already been encoded and decoded around the current block as reference pixels to predict the current block. Figure 3 is a schematic diagram of intra-frame prediction. As shown in Figure 3, the current block size is 4×4. The pixels in the left row and top column of the current block are the reference pixels for the current block. Intra-frame prediction uses these reference pixels to predict the current block. These reference pixels may all be available, i.e., all have been encoded and decoded. Some may also be unavailable. For example, if the current block is the leftmost part of the entire frame, then the reference pixels on the left side of the current block are unavailable. Or, if the lower left part of the current block has not yet been encoded and decoded, then the reference pixels in the lower left are also unavailable. In cases where reference pixels are unavailable, available reference pixels, certain values, or certain methods can be used to fill the gaps, or no filling can be performed. Furthermore, when performing intra-frame prediction, the Multiple Reference Line (MRL) intra-frame prediction method can use more reference pixels to improve encoding and decoding efficiency. For example, four reference rows / columns can be used as reference pixels for the current block. Intra-frame prediction has multiple prediction modes. In H.264, intra-frame prediction of a 4×4 block mainly includes nine modes. Among them, mode 0 copies the pixels above the current block vertically as the prediction value; mode 1 copies the reference pixel on the left horizontally as the prediction value; mode 2 (DC) uses the average of multiple adjacent points as the prediction value for all points; modes 3-8 copy the reference pixel to the corresponding position in the current block at a certain angle. Because some positions in the current block may not correspond exactly to the reference pixel, it may be necessary to use the weighted average of the reference pixels, or the interpolated reference pixel sub-pixels. In addition to these, there are Planar modes, and with the development of technology and the expansion of blocks, the number of angle prediction modes is also increasing. For example, HEVC uses 35 prediction modes in its intra-frame prediction, including Planar mode, DC mode, and 33 angle modes. VVC uses 67 prediction modes in its intra-frame prediction, including Planar mode, DC mode, and 65 angle modes. AVS3 uses 66 prediction modes in its DC mode, Planar mode, Bilinear mode, and 63 angle modes. Other techniques improve prediction, such as improving the subpixel interpolation of the reference pixel and filtering the predicted pixels. For example, the multiple introductory prediction filter (MIPF) in AVS3 uses different filters to generate predicted values for different block sizes. Within the same block, pixels closer to the reference pixel are predicted using one filter, while pixels farther from the reference pixel are predicted using another. Techniques for filtering predicted pixels include the intra prediction filter (IPF) in AVS3, which can filter the predicted values using the reference pixel. In intra-frame prediction, the Most Probable Modes List (MPM) intra-frame mode coding technique can be used to improve encoding and decoding efficiency. An MPM list is constructed by utilizing the intra-frame prediction modes of surrounding already encoded blocks, as well as intra-frame prediction modes derived from the intra-frame prediction modes of surrounding already encoded blocks, such as adjacent modes, and some commonly used or frequently used intra-frame prediction modes, such as DC, Planar, and Bilinear modes. Referencing the intra-frame prediction modes of surrounding already encoded blocks leverages spatial correlation, as textures have a certain degree of spatial continuity. The MPM can be used as a prediction for intra-frame prediction modes, meaning that the probability of the current block using an MPM is considered higher than the probability of not using an MPM. Therefore, during binarization, fewer codewords are used for the MPM, thus saving overhead and improving encoding and decoding efficiency. While current intra-frame prediction modes include DC, Planar, and Bilinear modes, they can only handle simple texture prediction. Even with the increasing number of angle-based modes, prediction is limited to a single angled straight line. Therefore, current intra-frame prediction modes can only handle simple texture prediction. For complex textures, prediction requires dividing the texture into smaller blocks, encoding more residuals, or causing significant distortion. To address the aforementioned issues, an intra-prediction method is proposed. The codec can determine two different prediction blocks for the current block using two different intra-prediction modes. These blocks can then be combined using various weight matrices to obtain more complex prediction blocks, thus improving prediction accuracy. However, due to the different computational logic of non-angular prediction modes such as DC, Planar, PLANE, and Bilinear modes compared to angular prediction modes, each non-angular prediction mode has its own logic. In hardware implementation, the circuitry for non-angular prediction modes cannot be reused. When using two intra-prediction modes, if the two modes are predicted serially in hardware and then combined based on the weight matrix, both prediction modes can utilize existing intra-prediction circuitry. However, the predicted values from the first prediction need to be stored, and the time for this weighted combination prediction is significantly longer than that of using only one intra-prediction mode. If the two intra-prediction modes are predicted serially in hardware, the speed of generating the weighted combination prediction value is significantly better than the serial implementation. The cost of this approach is the need for two sets of intra-prediction circuitry. This means that an additional intra-frame prediction circuit is needed. This intra-frame prediction circuit performs the predictions for both the intra-frame non-angle prediction mode and the intra-frame angle prediction mode. In other words, a new intra-frame prediction circuit needs to be added. Therefore, while the current method of using two different intra-prediction modes can improve prediction performance to some extent, it increases hardware implementation costs due to the need for additional prediction circuitry. Thus, simplifying the added intra-prediction circuitry can reduce the complexity of intra-weighted prediction. To address this issue, in the embodiments of this application, the codec can determine two different prediction blocks for the current block using two different intra-angle prediction modes. These blocks can then be combined using various weight matrices to obtain more complex prediction blocks. This improves the accuracy of intra-prediction while reducing hardware implementation costs and complexity, achieving a simple and efficient encoding / decoding method, thereby improving compression performance. Referring to Figure 4, which shows an example of a block diagram of a video coding system provided in this application embodiment; as shown in Figure 4, the video coding system 10 includes a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control and analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoding image buffer unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC).For the input raw video signal, a video coding block can be obtained by partitioning it into Coding Tree Units (CTUs). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 101, including transforming the residual information from the pixel domain to the transform domain and quantizing the resulting transform coefficients to further reduce the bit rate. The intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block. The motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by the motion estimation unit 105 is a process of generating motion vectors, which can estimate the motion of the video coding block. Then, the motion compensation unit 104 uses the motion vectors determined by the motion estimation unit 105 to perform the motion estimation. The motion compensation is performed. After determining the intra-prediction mode, the intra-prediction unit 103 is also used to provide the selected intra-prediction data to the coding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the coding unit 109. In addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block, reconstruct the residual block in the pixel domain, and remove the block artifacts by the filter control analysis unit 107 and the filtering unit 108. Then, the reconstructed residual block is added to a predictive block in the frame of the decoding image buffer unit 110 to generate the reconstructed video coding block. The coding unit 109 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-prediction mode and output the bitstream of the video signal. The decoding image buffer unit 110 is used to store the reconstructed video coding block for prediction reference. As video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoding image buffer unit 110. Referring to Figure 5, which shows an example of a block diagram of a video decoding system provided in this application embodiment; as shown in Figure 5, the video decoding system 20 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoding image buffer unit 206, etc., wherein the decoding unit 201 can perform header information decoding and CABAC decoding, and the filtering unit 205 can perform deblocking filtering and SAO filtering. After the input video signal is processed by the encoding process shown in Figure 4, the bitstream of the video signal is output; the bitstream is input into the video decoding system 20, and first passes through the decoding unit 201 to obtain the decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and the data from the previously decoded blocks from the current frame or image; the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and makes The prediction information is used to generate a predictive block for the video block being decoded; the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 with the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal is passed through the filtering unit 205 to remove block artifacts, which can improve video quality; then the decoded video block is stored in the decoding image buffer unit 206, which stores reference images for subsequent intra-frame prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal. The intra-prediction method in this application embodiment is mainly applied to the intra-prediction unit 103 as shown in Figure 4 and the intra-prediction unit 203 as shown in Figure 5. That is, the intra-prediction method in this application embodiment can be applied to both video coding systems and video decoding systems, and even simultaneously, but this application embodiment does not impose specific limitations. It should also be noted that when the intra-prediction method is applied to the intra-prediction unit 103, "current block" specifically refers to the current coding block in intra-prediction; when the intra-prediction method is applied to the intra-prediction unit 203, "current block" specifically refers to the current decoding block in intra-prediction. The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. One embodiment of this application proposes an intra-frame prediction method applied to a decoder. Figure 6 is a schematic diagram of the implementation flow of the intra-frame prediction method. As shown in Figure 17, the method for the decoder to perform intra-frame prediction may include the following steps: Step 101: Decode the bitstream and determine the intra-prediction mode parameters of the current block. In the embodiments of this application, the decoder can determine the intra-prediction mode parameters of the current block by decoding the bitstream. It should be noted that, in the implementation of this application, the intra-prediction mode parameter can indicate whether the current block can use the intra-weighted combined prediction (IWCP) mode, that is, whether the current block can use two different intra-angle prediction modes to determine the prediction value of the current block. It is understood that, in the embodiments of this application, the intra-prediction mode parameter can be interpreted as a flag indicating whether IWCP mode is used. Specifically, the decoder, by decoding the bitstream, can determine a variable that serves as the intra-prediction mode parameter, and thus the intra-prediction mode parameter can be determined through the value of this variable. It should be noted that, in the embodiments of this application, the IWCP mode is an intra-frame prediction method. Specifically, the IWCP mode determines two different intra-frame angle prediction modes for the current block, and then determines two prediction blocks according to these two different intra-frame angle prediction modes. Then, a weight matrix can be determined, and the two prediction blocks are combined according to the weight matrix to finally obtain a new prediction block, that is, the prediction block of the current block. Figure 7 is a schematic diagram of the IWCP mode. As shown in Figure 7, when performing intra-frame prediction on the current block, the first prediction block of the current block can be determined by intra-frame angle prediction mode 1 (first intra-frame prediction mode), and the second prediction block of the current block can be determined by intra-frame angle prediction mode 2 (second intra-frame prediction mode). Then, the first prediction block and the second prediction block can be combined using the weight matrix to finally obtain a new prediction block. It should be noted that, in the embodiments of this application, the video image can be divided into multiple image blocks, and the current block is each current image block to be encoded, which can be called a coding block (CB). Here, each coding block may include a first image component, a second image component, and a third image component. Specifically, in this application, assuming that a first intra-frame prediction is performed, and the first image component is a luma component, that is, the image component to be predicted is a luma component, then the coding block to be predicted can be called a luma block; or, assuming that a second intra-frame prediction is performed, and the second image component is a chroma component, that is, the image component to be predicted is a chroma component, then the coding block to be predicted can be called a chroma block. Furthermore, in the embodiments of this application, when applying the IWCP mode, the size of the current block can be limited. It is understandable that, since the intra-prediction method proposed in this application requires generating two prediction blocks using two different intra-angle prediction modes, and then weighting them according to the weight matrix to obtain a new prediction block, in order to reduce complexity and consider the trade-off between compression performance and complexity, in the embodiments of this application, the IWCP mode can be restricted from being used for prediction blocks of certain sizes. Therefore, in this application, the decoder can first determine the size parameters of the current block, and then determine whether the current block uses the IWCP mode based on the size parameters. It should be noted that, in the embodiments of this application, the size parameter of the current block may include the height and width of the current block. Therefore, the decoder can use the height and width of the current block to restrict the use of the IWCP mode, that is, restrict the size of the prediction block that can use the IWCP mode. For example, in this application, if both the width and height are greater than or equal to a first lower limit, and both the width and height are less than or equal to a first upper limit, then it can be determined that the current block uses the IWCP mode. It is evident that one possible limitation is to use the IWCP mode only when the width and height of the predicted block are less than (or less than or equal to) the first upper limit, and the width and height of the predicted block are greater than (or greater than or equal to) the first lower limit. Here, the first lower limit can be 8, and the first upper limit can be 16 or 32, etc. For example, in this application, a frame-level flag can be used to determine whether the current frame to be decoded uses IWCP mode. For instance, intra-frame frames (e.g., I-frames) can be configured to use IWCP mode, while inter-frame frames (e.g., B-frames, P-frames) cannot. Alternatively, intra-frame frames can be configured not to use IWCP mode, while inter-frame frames can use IWCP mode. Or, some inter-frame frames can be configured to use IWCP mode, while others cannot. Inter-frame frames can also use intra-frame prediction, and therefore, inter-frame frames may also use IWCP mode. For example, in this application, a flag below the frame level and above the CU level (such as tile, slice, patch, LCU, etc.) can be used to determine whether this region uses IWCP mode. Step 102: When the intra-prediction mode parameter indicates that the current block uses IWCP mode to determine the intra-prediction value of the current block, determine the first mode index and the second mode index of the current block. In the embodiments of this application, after the decoder determines the intra-prediction mode parameters of the current block, if the intra-prediction mode parameters indicate that the current block uses the IWCP mode to determine the intra-prediction value of the current block, then the decoder can further determine the first mode index and the second mode index of the current block. It is understood that, in the embodiments of this application, the first mode index is used to indicate the first intra-prediction mode used by the current block, and the second mode index can be used to indicate the second intra-prediction mode of the current block. Specifically, the values of the first mode index and the second mode index are related to the number of intra-frame angle prediction modes that may exist in the first intra-frame prediction mode and the second intra-frame prediction mode. For example, the first intra-frame prediction mode and the second intra-frame prediction mode may be one of the 28 intra-frame angle prediction modes with mode numbers 4-31, then the values of the first mode index and the second mode index both belong to the range of 0 to 27. For example, in an embodiment of this application, the parameter iwcp_pred_mode0_index can be used to represent the first mode index, and the parameter iwcp_pred_mode1_index can be used to represent the second mode index. Step 103: Construct the MPM list for the current block. In embodiments of this application, the decoder can also construct an MPM list for the current block. The prediction modes in the MPM list are all intra-frame angle prediction modes. Furthermore, in the embodiments of this application, when the decoder constructs the MPM list of the current block, it needs to first determine the weight matrix derivation mode of the current block, and then use the weight matrix derivation mode to further determine the MPM list of the current block. It should be noted that, in this application, the weight matrix derivation mode is used to determine the weight matrix used in the current block. Specifically, the weight matrix derivation mode can be a mode for deriving the weight matrix. For a prediction block of a given length and width, each weight matrix derivation mode can derive a weight matrix; for prediction blocks of the same size, different weight matrix derivation modes will derive different weight matrices. For example, in this application, AVS3's AWP has 56 weight matrix derivation modes, and VVC's GPM has 64 weight matrix derivation modes. Optionally, in this application, when the decoder constructs the MPM list for the current block, it can directly derive the MPM list based on the prediction modes and weight matrices of the neighboring blocks of the current block. Optionally, in this application, when constructing the MPM list for the current block, the decoder can also construct the MPM list based on the prediction modes of the adjacent blocks, a preset angle prediction mode set, and the weight matrix derived mode. The preset angle prediction mode set can be a subset of all intra-frame angle prediction modes. Taking AVS3 as an example, the preset angle prediction mode set can include only the 28 intra-frame angle prediction modes with mode numbers 4-31. It is understood that in this application, if the range of the first intra-frame prediction mode and the second intra-frame prediction mode is not limited, then the preset angle prediction mode set can be a combination of all intra-frame angle prediction modes; if the range of the first intra-frame prediction mode and the second intra-frame prediction mode needs to be limited, then the preset angle prediction mode set can be only a combination of some intra-frame angle prediction modes. In this case, the preset angle prediction mode set can be used to limit the range of the first intra-frame prediction mode and the second intra-frame prediction mode, thereby effectively reducing overhead and improving compression performance. Optionally, in this application, when the decoder constructs the MPM list based on the intra-prediction modes of the adjacent blocks of the current block, the preset angle prediction mode set, and the weight matrix derived mode, it can use the prediction modes of the adjacent blocks to determine the first candidate mode; use the weight matrix derived mode to determine the second candidate mode; and further construct the MPM list of the current block based on the first candidate mode, the second candidate mode, and the preset angle prediction mode set. Specifically, in this application, when the decoder determines the first candidate mode using the prediction mode of the adjacent block, if the adjacent block is a normal intra-prediction block and the prediction mode of the adjacent block is an intra-prediction mode, then the prediction mode of the adjacent block is determined as the first candidate mode. It is understood that in this application, a normal intra-prediction block refers to a prediction block using prediction modes such as DC mode, Planar mode, Bilinear mode, and angular prediction mode, rather than a prediction block using prediction modes such as intra-block copy (IBC) or intra-string copy prediction. Figure 8 is a schematic diagram of adjacent blocks. As shown in Figure 8, the current block is E, where (x0, y0) are the coordinates of the upper left corner sample of block E in the image, (x1, y0) are the coordinates of the upper right corner sample of block E in the image, and (x0, y1) are the coordinates of the lower left corner sample of block E in the image. The adjacent block A of the current block E is the block containing sample (x0-1, y0), the adjacent block B of the current block E is the block containing sample (x0, y0-1), the adjacent block C of the current block E is the block containing sample (x1+1, y0-1), the adjacent block D of the current block E is the block containing sample (x0-1, y0-1), the adjacent block F of the current block E is the block containing sample (x0-1, y1), and the adjacent block G of the current block E is the block containing sample (x1, y0-1). The spatial relationship between the current block E and its adjacent blocks A, B, C, and D is shown in Figure 8. It is understandable that in this application, the decoder can also use adjacent blocks further to the right and further down of the current block. Specifically, in this application, when the decoder determines the second candidate mode using the weight matrix derivation mode, it can first determine the boundary line angle index value according to the weight matrix derivation mode; then it can use the boundary line angle index value to determine the second candidate mode. It should be noted that, in the embodiments of this application, the second candidate mode can be determined as L different intra-frame angle prediction modes, thereby ensuring the construction of an MPM list of length L. Furthermore, in the embodiments of this application, when the weight matrix includes two weights, the positions where the weights change form a straight line; or, when the weight matrix has multiple weights, the positions in the transition region with the same weight form a straight line, which can be called a boundary line. We can assume the horizontal angle to the right is 0 degrees, and the angle increases counterclockwise. Then the boundary line may be horizontal 0 degrees, vertical 90 degrees, inclined at 45 degrees, 135 degrees, and various other angles. If a prediction block chooses to use a certain weight matrix, the corresponding texture is likely to exhibit different characteristics on both sides of the boundary line. For example, the two sides of the boundary line may have textures with two different angles, or one side of the boundary line may have a texture with one angle, while the other side has a relatively flat texture. Since the boundary line itself also has an angle, we can assume that a point obtained through intra-frame angle prediction may be close to some textures of the current block. Therefore, this straight line is correlated with the two intra-frame prediction modes of the current block. Specifically, in this application, assuming the boundary line is obtained by predicting an intra-frame angle from a point, at least one intra-frame angle prediction pattern can be found that can approximate the boundary line. For example, a horizontal boundary line matches a horizontal intra-frame prediction pattern, such as pattern 24 in AVS3; a vertical boundary line matches a vertical intra-frame prediction pattern, such as pattern 12 in AVS3; a 45-degree boundary line can match an intra-frame prediction pattern from the lower left to the upper right of 45 degrees, such as pattern 30 in AVS3; it can also match an intra-frame prediction pattern from the upper right to the lower left of 225 degrees, such as pattern 6 in AVS3. If a weight matrix has only one weight value, it can match patterns without obvious angles, such as DC mode, Planar mode, and Bilinear mode. Therefore, the weight matrix-derived pattern can match certain intra-frame prediction patterns, and thus can be used to assist in the decoding of intra-frame prediction patterns. It should be noted that in this application, the weight matrix derivation mode can also be the index of the weight matrix. For example, the 56 modes of AWP can be considered as 56 weight matrix derivation modes. For example, in this application, a mapping table can be constructed to further represent the mapping relationship between the weight matrix derived mode and the intra-frame angle prediction mode. Specifically, the boundary lines of multiple modes of AWP and GPM are all the same angle. For example, the boundary line angle of AVS3 AWP is the same every 8 modes. There are 8 boundary line angles in total for the 56 AWP modes. The index of the boundary line angle can be obtained by modulo 8 (%8) the mode number of the weight matrix derived mode. For example, Table 1 is a mapping table. Taking the angle mode of AVS3 as an example, the boundary line angle indices 0 and 1 can correspond to two intra-frame angle prediction modes, one from the upper right corner to the lower left corner, and the other from the upper left corner to the lower right corner. In specific implementation, another approximately corresponding intra-frame angle prediction mode can also be found for the indices of other boundary line angles, or all the indices of the boundary line angles can correspond to only one intra-frame angle prediction mode. Table 1 For a weight matrix, besides the intra-angle prediction mode corresponding to its boundary line being highly likely to be used, certain intra-angle prediction modes related to it are also highly likely to be used. For example, intra-angle prediction modes corresponding to angles close to or perpendicular to the boundary line. The decoder can utilize the correlation between the weight matrix and the intra-angle prediction modes to construct an MPM list of intra-weighted combined prediction modes. For example, when constructing the MPM list of intra-weighted combined prediction modes, if the list length is 4, then candidate modes corresponding to the boundary line angle indices in Table 2 below can be added to the MPM list. Table 2 Index of dividing line angle: 01234567 Candidate pattern: 0302724211815129 Candidate pattern: 1624122417142412 Candidate pattern: 224623181916118 Candidate pattern: 3129251224121310 Understandably, based on Table 2 above, having the number of candidate modes corresponding to the index of each boundary angle equal to the length of the MPM list ensures that the MPM list is filled even if all intra-prediction modes of the referenced adjacent blocks are unavailable. For example, if the length of the MPM list is 4, then the number of candidate modes corresponding to the index of each boundary angle can be set to 4. Furthermore, in this application, when the decoder constructs the MPM list based on the first candidate mode, the second candidate mode, and the preset angle prediction mode set, it can also perform filtering processing on the first candidate mode based on the preset angle prediction mode set to obtain filtered candidate modes; and construct the MPM list based on the filtered candidate modes and the second candidate mode. Specifically, in this application, when the decoder performs a filtering process on the first candidate mode based on a preset angle prediction mode set to obtain a filtered candidate mode, if the first candidate mode belongs to the preset angle prediction mode set, then the first candidate mode is determined as the filtered candidate mode; if the first candidate mode is an intra-frame angle prediction mode and does not belong to the preset angle prediction mode set, then a replacement mode of the first candidate mode is determined in the preset angle prediction mode set, and the replacement mode is determined as the filtered candidate mode. Furthermore, in this application, if the first candidate mode is not an intra-frame angle prediction mode, the decoder can directly delete the first candidate mode. Understandably, in this application, since the preset angle prediction mode set to which the first and second intra-frame prediction modes belong is a subset of all intra-frame angle prediction modes and does not include intra-frame non-angle prediction modes, the selection of the most probable mode (MPM) for the current block, i.e., the method for constructing the MPM list, also needs to be adjusted accordingly for intra-frame weighted combined prediction modes. Specifically, the decoder needs to refer to the intra-frame prediction modes of the neighboring blocks surrounding the current block when constructing the MPM list. These neighboring blocks include the left neighboring block, top neighboring block, top-left neighboring block, top-right neighboring block, bottom-left neighboring block, etc. Due to spatial correlation, if the neighboring blocks use a certain prediction mode, the current block has a high probability of using the same or similar prediction mode. Optionally, since both the first and second intra-frame prediction modes of the intra-weighted combined prediction mode can only be intra-frame angular prediction modes, when a reference neighboring block uses an intra-frame non-angular prediction mode, i.e., the first candidate mode is not an intra-frame angular prediction mode, the decoder will not use the intra-frame non-angular prediction mode used by this reference block when constructing the MPM list of the current block, i.e., it will not add the intra-frame non-angular prediction mode to the MPM list of the current block. Optionally, since the preset angle prediction mode set to which the first and second intra-frame prediction modes belong is a subset of all intra-frame angle prediction modes, when a reference neighboring block uses an intra-frame angle prediction mode outside the preset angle prediction mode set (i.e., the first candidate mode is an intra-frame angle prediction mode but does not belong to the preset angle prediction mode set), the decoder can convert the intra-frame angle prediction mode outside the preset angle prediction mode set into an intra-frame angle prediction mode with a similar angle that belongs to the preset angle prediction mode set when constructing the MPM list for the current block, and then add it to the MPM list. Taking AVS3 as an example, if the preset angle prediction mode set restricts the first and second intra-frame prediction modes to only use intra-frame angle prediction modes 4-31, and the neighboring block of the current block uses intra-frame angle prediction mode 43, then the decoder can add intra-frame angle prediction mode 12, which is similar to intra-frame angle prediction mode 43, to the MPM list of the current block under the intra-frame weighted combination prediction mode. Furthermore, in the embodiments of this application, when the decoder constructs the MPM list based on the filtered candidate mode and the second candidate mode, if the filtered candidate mode meets the preset addition conditions, the filtered candidate mode is added to the MPM list; if the MPM list does not meet the preset list length L, and the second candidate mode meets the preset addition conditions, the second candidate mode is added to the MPM list; where L is an integer greater than or equal to 1. For example, in this application, the value of L can be 4, that is, the preset list length of the MPM list is 4, or in other words, the MPM list includes 4 most likely patterns. It is understood that, in the embodiments of this application, the decoder can sort the L modes in the MPM list in ascending order of mode number. It should be noted that, in the embodiments of this application, if the candidate mode after filtering is different from the predicted mode in the MPM list, the decoder can determine that the candidate mode after filtering meets the preset addition condition; correspondingly, if the second candidate mode is different from the predicted mode in the MPM list, the decoder can determine that the second candidate mode meets the preset addition condition. It is understood that, in the embodiments of this application, when the decoder adds the filtered candidate modes corresponding to adjacent blocks to the MPM list, it can determine the order parameters corresponding to the adjacent blocks; according to the order parameters, the intra-frame filtered candidate modes corresponding to the adjacent blocks are added to the MPM list in sequence. The decoder can determine the corresponding order parameters based on the spatial distance between the adjacent blocks and the current block. For example, the closer the spatial distance between the adjacent blocks and the current block, the stronger their correlation, and the earlier they are added, i.e., the smaller the order parameter; the farther the spatial distance between the adjacent blocks and the current block, the weaker their correlation, and the later they are added, i.e., the larger the order parameter. Furthermore, in embodiments of this application, after adding the filtered candidate modes and / or the second candidate modes to the MPM list, the decoder can also sort the L predicted modes in the MPM list in ascending order of mode number. For example, in this application, it is assumed that the MPM list of the current block in the intra-frame weighted combination prediction mode is IwcpMpm[4], that is, the list length of the MPM list is 4, the index of the weight matrix derivation mode is IwcpIndex, the weight matrix derivation mode reuses 56 derivation modes of AWP, and the preset angle prediction mode set to which the first intra-frame prediction mode and the second intra-frame prediction mode belong is the intra-frame angle prediction mode number 4-31. Then, when the decoder constructs the MPM list of the current block, it can perform the following steps in sequence: Step S1: Set the array cand_mode
[0010] All values of `cand_mode` are initialized to invalid values. Perform the following operations on `cand_mode`: (a) If a neighboring block F "exists" and is a normal intra-prediction block, cand_mode[0] is equal to the intra-prediction mode of F. (b) If a neighboring block G "exists" and is a normal intra-prediction block, then cand_mode[1] is equal to the intra-prediction mode of G. (c) If the adjacent block C "exists" and is a normal intra-prediction block, then cand_mode[2] is equal to the intra-prediction mode of C. (d) If the adjacent block A "exists" and is a normal intra-prediction block, then cand_mode[3] is equal to the intra-prediction mode of A. (e) If the neighboring block B "exists" and is a normal intra-prediction block, then cand_mode[4] is equal to the intra-prediction mode of B. (f) If the adjacent block D "exists" and is a normal intra-prediction block, cand_mode[5] is equal to the intra-prediction mode of D. (g)cand_mode[6] is equal to candidate mode 0 corresponding to IwcpIndex%8. (h)cand_mode[7] is equal to candidate mode 1 corresponding to IwcpIndex%8. (i)cand_mode[8] is equal to candidate mode 2 corresponding to IwcpIndex%8. (j)cand_mode[9] is equal to candidate mode 3 corresponding to IwcpIndex%8. In this context, "existence" of an adjacent block X (where X is A, B, C, D, F, or G) means that the block should be within the image and belong to the same slice as block E; otherwise, the adjacent block "does not exist." If a block "does not exist" or has not yet been decoded, then the block is "unavailable"; otherwise, the block is "available." If the block containing the image sample "does not exist" or the sample has not yet been decoded, then the sample is "unavailable"; otherwise, the sample is "available." It is understood that in this application, the execution steps (a) to (f) above constitute the process for determining the first candidate mode; the execution steps (g) to (j) above constitute the process for determining the second candidate mode, wherein the decoder can refer to Table 2 above to determine the second candidate mode. Step S2: For i ranging from 0 to 5, perform the following operations: (a) If cand_mode[i] is less than 3 or cand_mode[i] is equal to 33, cand_mode[i] is set to an invalid value. In other words, if the first candidate mode is an intra-frame non-angle prediction mode, the decoder can directly delete the first candidate mode, that is, not use the first candidate mode. (b) Otherwise, if cand_mode[i] equals 3, let cand_mode[i] equal 4. (c) Otherwise, if cand_mode[i] equals 32, let cand_mode[i] equal 31. (d) Otherwise, if cand_mode[i] is greater than 33, perform the following operation: If cand_mode[i] is less than 44, set cand_mode[i] to cand_mode[i] - 30. Otherwise, if cand_mode[i] is less than 58, set cand_mode[i] to cand_mode[i] - 33. Otherwise, set cand_mode[i] to cand_mode[i] - 34. In other words, if the first candidate mode is an intra-frame angle prediction mode, but the first candidate mode does not belong to the preset angle prediction mode set, then the decoder can select a similar intra-frame angle prediction mode from the preset angle prediction mode set as the replacement mode for the first candidate mode, and then use the replacement mode as the candidate mode after filtering. (e) Otherwise, do not modify the value of cand_mode[i]. In other words, if the first candidate mode belongs to the preset angle prediction mode set, then the decoder can directly use the first candidate mode, that is, the first candidate mode is the candidate mode after filtering. It is understood that in this application, step S2 above is the screening process for the first candidate mode, which ultimately determines the candidate mode after screening the first candidate mode. Step S3: Set mpm_num to 0, and perform the following operations for i from 0 to 9: (a) If cand_mode[i] is not an invalid value, then perform the following operation: Compare cand_mode[i] with IwcpMpm[j], where j ranges from 0 to mpm_num-1. If cand_mode[i] and IwcpMpm[j] are not equal, perform the following operation: 1. Let IwcpMpm[mpm_num] equal cand_mode[i]. 2. Set mpm_num to equal mpm_num + 1. 3. If mpm_num equals 4, then end step 3. In other words, if there are fewer than 4 predicted modes in the MPM list, and the filtered candidate mode is different from any predicted mode in the MPM list, the decoder can add the filtered candidate mode to the MPM list. If there are still fewer than 4 predicted modes in the MPM list after all filtered candidate modes that meet the preset addition conditions have been added to the MPM list, the decoder can continue to add the second candidate mode that meets the preset addition conditions to the MPM list until the length of the MPM list reaches 4. Step S4: Sort the four numbers of IwcpMpm[4] in ascending order. Finally, the decoder can sort the four intra-frame angle prediction modes in the MPM list in ascending order of mode number. It is understood that this application does not restrict the execution order of the above steps 102 and 103, that is, it does not restrict the order between the determination process of the first mode index and the second mode index and the construction process of the MPM list. Step 104: Determine the first intra-frame prediction mode and the second intra-frame prediction mode of the current block based on the first mode index, the second mode index, and the MPM list; wherein the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes. In the embodiments of this application, after the decoder determines the first mode index and the second mode index of the current block and completes the construction of the MPM list of the current block, it can further determine the first intra-frame prediction mode and the second intra-frame prediction mode of the current block based on the first mode index, the second mode index and the MPM list. It is understood that, in the embodiments of this application, the first intra-frame prediction mode and the second intra-frame prediction mode can be two different intra-frame angle prediction modes. Specifically, in the embodiments of this application, the first intra-frame prediction mode and the second intra-frame prediction mode can be two different intra-frame angle prediction modes from a preset set of angle prediction modes. In other words, in this application, both the first intra-frame prediction mode and the second intra-frame prediction mode can only be intra-frame angle prediction modes. That is, neither the first nor the second intra-frame prediction mode can be any other basic intra-frame prediction mode besides the intra-frame angle prediction mode, such as intra-frame non-angle prediction modes, including DC mode, Planar mode, PLANE mode, Bilinear mode, PCM mode, etc. Among these, basic intra-frame prediction modes include, but are not limited to, angle prediction modes and non-angle prediction modes. Examples include the 67 intra-frame prediction modes used by VVC and the 66 intra-frame prediction modes used by AVS3. It is understandable that in this application, the restriction of the first intra-frame prediction mode and the second intra-frame prediction mode to intra-angle prediction mode can, on the one hand, reduce the hardware implementation complexity of the intra-frame weighted combined prediction mode, because when the hardware implements the intra-frame weighted combined prediction mode in parallel, only one additional circuit supporting intra-frame angle weighted prediction is needed; on the other hand, the intra-frame weighted combined prediction mode itself is applicable to relatively complex block content, while the intra-frame non-angle prediction mode is usually used for scenes with relatively uniform texture changes, and fewer available modes can also reduce overhead. Therefore, the use or non-use of the intra-frame non-angle prediction mode in the intra-frame weighted combined prediction mode has almost no impact on compression performance. Furthermore, in this application, although a greater number of available intra-frame angle prediction modes can result in more accurate predictions, the overhead of transmitting the selected mode's flag in the bitstream also increases accordingly. Therefore, to achieve better compression performance, a reasonable set of available intra-frame prediction modes can be selected to achieve a better trade-off between prediction performance and overhead. Specifically, the decoder can use a preset set of angle prediction modes to restrict the available intra-frame angle prediction modes for the first and second intra-frame prediction modes, where the preset set of angle prediction modes is a subset of all intra-frame angle prediction modes. Taking AVS3 as an example, AVS3 has 62 angle modes, namely the intra-frame angle prediction modes with mode numbers 3-32 and 34-65. For example, in this application, the first intra-frame prediction mode and the second intra-frame prediction mode may use only the intra-frame angle prediction modes with mode numbers 3-32, or the first intra-frame prediction mode and the second intra-frame prediction mode may use only the 28 intra-frame angle prediction modes with mode numbers 4-31. For example, in this application, taking VVC as an example, the first intra-frame prediction mode and the second intra-frame prediction mode may use only intra-frame angle prediction modes with even mode numbers, or the first intra-frame prediction mode and the second intra-frame prediction mode may use only intra-frame angle prediction modes with odd mode numbers. For example, in this application, the set of angle prediction modes used by the first intra-frame prediction mode and the set of angle prediction modes used by the second intra-frame prediction mode are different. Optionally, the decoder can use the same preset set of angle prediction modes to restrict the first and second intra-frame prediction modes. That is, if the first intra-frame prediction mode can only use the 28 intra-frame angle prediction modes with mode numbers 4-31, the second intra-frame prediction mode can also only use the 28 intra-frame angle prediction modes with mode numbers 4-31. Therefore, the first and second intra-frame prediction modes can use the same MPM list and the same or similar encoding / decoding methods. In other words, if the decoder uses different preset sets of angle prediction modes to restrict the first and second intra-frame prediction modes, then different MPM lists or significantly different encoding / decoding methods need to be used for the first and second intra-frame prediction modes. Furthermore, in embodiments of this application, the decoder can determine a first mapping table between index values and binary symbol strings; wherein the first mapping table includes binary symbol strings of first length, second length, and third length, respectively. For example, in this application, the first length is 3 bits, the second length is 5 bits, and the third length is 6 bits. It should be noted that, in this application, the first mapping table between index values and binary symbol strings can be used to determine the values of the first pattern index and the second pattern index. Optionally, in this application, for AVS3, if 28 intra-frame angle prediction modes with mode numbers 4-31 are used, i.e., the preset angle prediction mode set includes 28 modes, then encoding can be done in the form of 4+8+16, i.e., modes with 4 shortest codewords, modes with 8 shorter codewords, and modes with 16 longer codewords. Specifically, the modes with 4 shortest codewords use 3-bit codewords (the first length), the modes with 8 shorter codewords use 5-bit codewords (the second length), and the modes with 16 longer codewords use 6-bit codewords (the third length). It should be noted that in this application, the predicted angles of the 28 intra-frame angle prediction modes with mode numbers 4-31 basically cover the entire commonly used angle range. At the same time, the intra-frame angle prediction modes with mode numbers 4-31 are simpler than the intra-frame angle prediction modes with mode numbers 34-65, and using these 28 modes to encode in the form of 4+8+16 will not cause codeword waste. Therefore, the decoder can preferably define a preset angle prediction mode set according to the 28 intra-frame angle prediction modes with mode numbers 4-31. Furthermore, in the embodiments of this application, if the list length of the MPM list of the current block is 4, then the 4 most probable patterns in the MPM list can be used with a binary symbol string of the first length, that is, the 4 shortest codeword patterns can be used by the 4 MPMs in the MPM list; correspondingly, other prediction patterns in the preset angle prediction pattern set and outside the MPM list can use a binary symbol string of the second length and a binary symbol string of the third length, respectively. Optionally, in this application, for the 24 intra-frame angle prediction modes other than the 4 MPMs in the MPM list within the preset angle prediction mode set, the decoder can evenly distribute the shorter codeword modes and the longer codeword modes. Specifically, the decoder can evenly distribute the 8 shorter codeword modes (second-length binary symbol strings) among the remaining 24 intra-frame angle prediction modes. For example, every 2 longer codeword modes (third-length binary symbol strings) use 1 shorter codeword mode (second-length binary symbol string). Furthermore, in the specific execution process, this can be achieved by modulo 3 (%3) the sequence numbers from 0 to 23 in the remaining 24 intra-frame angle prediction modes. For example, modes with a sequence number modulo 3 remainder of 2 use 5-bit codewords, i.e., use the second-length binary symbol string, and modes with a sequence number modulo 3 remainder of 0 or 1 use 6-bit codewords, i.e., use the third-length binary symbol string. For example, in this application, if 28 intra-frame angle prediction modes with mode numbers 4-31 are used, that is, the preset angle prediction mode set includes 28 modes, then the first mapping relationship table between index values and binary symbol strings can be as shown in Table 3, wherein the first length is 3 bits, the second length is 5 bits, and the third length is 6 bits. Table 3 The first bit can be used to indicate whether it is an MPM, for example, "1" indicates that it is an MPM and "0" indicates that it is not an MPM. If the intra-prediction mode in the first frame is MPM, assuming that the MPM list includes 4 MPMs, then 2 bits can be used to indicate which MPM in the MPM list is used, that is, "00, 01, 10, 11" represent the first MPM, second MPM, third MPM, and fourth MPM in the MPM list, respectively. Furthermore, in this application, binary symbol strings with a bit flag of 0 are decoded using a context model, while binary symbol strings with a non-zero bit flag are not decoded using a context model. The value of the bit flag indicates how many bits have been decoded, and the bit flag can be represented by binIdx. It should be noted that, in this application, for the decoding side, when performing debinarization according to Table 3, the context model can be used to decode binary symbol strings with binIdx equal to 0, while the equal probability model or bypass mode can be used to decode binary symbol strings with binIdx not equal to 0. Furthermore, in this application, when the decoder determines the first intra-frame prediction mode and the second intra-frame prediction mode of the current block based on the first mode index, the second mode index, and the MPM list, it can first determine the value i of the first mode index according to the first mapping table between index values and binary symbol strings; where i is an integer greater than or equal to 0. If i is greater than or equal to 0 and less than L, then the (i+1)th angle prediction mode in the MPM list is determined as the first intra-frame prediction mode; if i is greater than or equal to L, then the first intra-frame prediction mode is determined using the preset angle prediction mode set and the MPM list. Specifically, in this application, when the decoder determines the first intra-frame prediction mode using the preset angle prediction mode set and the MPM list, if i is greater than or equal to the mode number of the first mode in the MPM list, then i and 1 are summed; if (i+1) is greater than or equal to the mode number of the second mode in the MPM list, then (i+1) and 1 are summed; if (i+2) is greater than or equal to the mode number of the third mode in the MPM list, then (i+2) and 1 are summed; if (i+3) is greater than or equal to the mode number of the fourth mode in the MPM list, then (i+3) and 1 are summed; (i+4) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set. Accordingly, in this application, when the decoder determines the first intra-frame prediction mode using the preset angle prediction mode set and the MPM list, if i is less than the mode number of the first mode in the MPM list, then i is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set; or, if (i+1) is less than the mode number of the second mode in the MPM list, then (i+1) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set; or, if (i+2) is less than the mode number of the third mode in the MPM list, then (i+2) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set; or, if (i+3) is less than the mode number of the fourth mode in the MPM list, then (i+3) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set. For example, in this application, if the mode numbers of the four MPMs in the MPM list are 4, 8, 12, and 16 respectively, and the value i of the first mode index determined based on the first mapping relationship table between the index value and the binary symbol string shown in Table 3 above is 5, then in the preset angle prediction mode set including 28 intra-frame angle prediction modes with mode numbers 4-31, i is compared sequentially with the mode numbers of the four MPMs in the MPM list. Specifically, 5 is greater than the mode number of the first mode in the MPM list, so the decoder can determine to add 1 to i, i.e., i+1=6. Then, 6 is compared with the mode number of the second mode in the MPM list. 6 is less than 8, so the value 6 of (i+1) can be determined as the mode number of the first intra-frame prediction mode, and the intra-frame angle prediction mode with mode number 6 in the preset angle prediction mode set is determined as the first intra-frame prediction mode. For example, in this application, if the mode numbers of the four MPMs in the MPM list are 4, 8, 12, and 16 respectively, and the value i of the first mode index determined based on the first mapping relationship table between the index value and the binary symbol string shown in Table 3 above is 10, then in the preset angle prediction mode set including 28 intra-frame angle prediction modes with mode numbers 4-31, i is compared sequentially with the mode numbers of the four MPMs in the MPM list. Specifically, 10 is greater than the mode number of the first mode in the MPM list, so the decoder can determine to add 1 to i, i.e., i+1=11, and then compare 11 with the second mode in the MPM list. Compared to the mode number of (i+1), 11 is greater than 8. Therefore, the decoder can determine to add 1 to (i+1), i.e., (i+1)+1=12. Then, 12 is compared with the mode number of the third mode in the MPM list. 12 is equal to 12. Therefore, the decoder can determine to add 1 to (i+2), i.e., (i+2)+1=13. Then, 12 is compared with the mode number of the fourth mode in the MPM list. 13 is less than 16. Therefore, the value 13 of (i+3) can be determined as the mode number of the first intra-frame prediction mode. And the intra-frame angle prediction mode with mode number 13 in the preset angle prediction mode set is determined as the first intra-frame prediction mode. Furthermore, in this application, when the decoder determines the first intra-frame prediction mode and the second intra-frame prediction mode of the current block based on the first mode index, the second mode index, and the MPM list, it can first determine the value j of the second mode index based on the first mapping table; where j is an integer greater than or equal to 0. If j is greater than or equal to 0 and less than L, then the (i+1)th angle prediction mode in the MPM list is determined as the first intra-frame prediction mode; if j is greater than or equal to L, then the first intra-frame prediction mode is determined using the preset angle prediction mode set and the MPM list. Specifically, in this application, when the decoder determines the second intra-frame prediction mode using the preset angle prediction mode set and the MPM list, if j is greater than or equal to the mode number of the first mode in the MPM list, then j and 1 are summed; if (j+1) is greater than or equal to the mode number of the second mode in the MPM list, then (j+1) and 1 are summed; if (j+2) is greater than or equal to the mode number of the third mode in the MPM list, then (j+2) and 1 are summed; if (j+3) is greater than or equal to the mode number of the fourth mode in the MPM list, then (j+3) and 1 are summed; (j+4) is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set. Accordingly, in this application, when the decoder determines the second intra-frame prediction mode using the preset angle prediction mode set and the MPM list, if j is less than the mode number of the first mode in the MPM list, then j is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set; or, if (j+1) is less than the mode number of the second mode in the MPM list, then (j+1) is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set; or, if (j+2) is less than the mode number of the third mode in the MPM list, then (j+2) is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set; or, if (j+3) is less than the mode number of the fourth mode in the MPM list, then (j+3) is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set. For example, in this application, if the current block uses IWCP mode, the length of the MPM list of the current block is 4, i.e., L=4. The preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31. The decoder can determine the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index by decoding the bitstream. Then, based on the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index, the first intra-frame prediction mode is IwcpPredMode0 and the second intra-frame prediction mode is IwcpPredMode1. When the decoder determines the first intra-frame prediction mode IwcpPredMode0 using the first mode index iwcp_pred_mode0_index, it can perform the following operations: 1. Perform inverse binarization on the binary symbol string according to Table 3, and determine the value of iwcp_pred_mode0_index as i. Specifically, after determining the binary symbol string iwcp_pred_mode0_index based on the decoded binary symbol string, the binary symbol string can be de-binarized according to Table 3. That is, the matching binary symbol string is found in the right column of Table 3 based on iwcp_pred_mode0_index, and then the value i of iwcp_pred_mode0_index is determined from the left column of the same row. 2. If i is greater than or equal to 0 and less than 4, then IwcpPredMode0 is equal to IwcpMpm[i]. 3. If i is greater than or equal to 4, then IwcpPredMode0 is equal to (iwcp_pred_mode0_index+(iwcp_pred_mode0_index>=IwcpMpm[0])+((iwcp_pred_mode0_index+1)>=IwcpMpm[1])+((iwcp_pred_mode0_index+2)>=IwcpMpm[2])+((iwcp_pred_mode0_index+3)>=IwcpMpm[3])). In other words, in this application, if the first intra-frame prediction mode IwcpPredMode0 does not belong to the MPM list, but is one of the other 24 intra-frame angle prediction modes outside the MPM list in the preset angle prediction mode set, then the decoder can compare the value i of the first mode index iwcp_pred_mode0_index with the mode number of each angle prediction mode in the MPM list in turn, and choose whether to perform an increment operation according to the comparison result, and finally calculate the mode number of the first intra-frame prediction mode, and determine the first intra-frame prediction mode in the preset angle prediction mode set according to the mode number. When the decoder determines the second intra-frame prediction mode IwcpPredMode1 using the second mode index iwcp_pred_mode1_index, it can perform the following operations: 1. Perform inverse binarization on the binary symbol string according to Table 3, and determine the value of iwcp_pred_mode1_index as j. Specifically, after determining the binary symbol string iwcp_pred_mode1_index based on the decoded binary symbol string, the binary symbol string can be debinarized according to Table 3. That is, the matching binary symbol string is found in the right column of Table 3 based on iwcp_pred_mode1_index, and then the value j of iwcp_pred_mode1_index is determined from the left column of the same row. 2. If j is greater than or equal to 0 and less than 4, then IwcpPredMode1 is equal to IwcpMpm[i]. 3. If j is greater than or equal to 4, then IwcpPredMode1 equals (iwcp_pred_mode1_index+(iwcp_pred_mode1_index>=IwcpMpm[0])+((iwcp_pred_mode1_index+1)>=Iwc pMpm[1])+((iwcp_pred_mode1_index+2)>=IwcpMpm[2])+((iwcp_pred_mode1_index+3)>=IwcpMpm[3])). Furthermore, in the embodiments of this application, since the intra-frame weighted combined prediction mode needs to use the first intra-frame prediction mode and the second intra-frame prediction mode to determine the prediction value of the current block, the first intra-frame prediction mode and the second intra-frame prediction mode can share a preset angle prediction mode set and can also share the same MPM list. However, the first intra-frame prediction mode and the second intra-frame prediction mode are not the same in the intra-frame weighted combined prediction mode. Therefore, when encoding and decoding the second intra-frame prediction mode, the first intra-frame prediction mode can be referenced. Specifically, when determining the second intra-frame prediction mode, the first intra-frame prediction mode can be excluded. Understandably, in this application, for the 28 intra-frame angle prediction modes, since the probability of the four MPMs in the MPM list appearing in the aforementioned 4+8+16 encoding / decoding scheme is very high (the probability of the first intra-frame prediction mode being one of the four MPMs in the MPM list is approximately 50%, and the probability of the second intra-frame prediction mode being one of the four MPMs in the MPM list is approximately 50%), if both the first and second intra-frame prediction modes are MPMs in the MPM list, then when determining the second intra-frame prediction mode, only one of the other three MPMs in the MPM list, excluding the first intra-frame prediction mode, needs to be selected. This reduces the original 4-to-1 selection (requiring four 3-bit codewords) to a 3-to-1 selection (requiring one 2-bit codeword and two 3-bit codewords). Correspondingly, if neither the first nor the second intra-frame prediction mode is an MPM in the MPM list, then the second intra-frame prediction mode can also be removed from the 24 intra-frame angle prediction modes in the 8+16 scheme, but the impact of this is relatively small. Therefore, when both the first intra-frame prediction mode and the second intra-frame prediction mode are MPMs in the MPM list, it is possible to perform deletion processing on the first intra-frame prediction mode before determining the second intra-frame prediction mode, thereby reducing overhead. Further, in the embodiments of this application, if the first intra-frame prediction mode is an MPM in the MPM list, that is, the decoder determines that the value i of the first mode index is greater than or equal to 0 and less than L, then after determining the (i+1)th angle prediction mode in the MPM list as the first intra-frame prediction mode, when determining the second intra-frame prediction mode, the decoder can determine the value j of the second mode index according to the second mapping table between the index value and the binary symbol string; if j is greater than or equal to i, then j is incremented by 1; after the increment operation, if j is greater than or equal to 0 and less than L, then the (j+1)th angle prediction mode in the MPM list is determined as the second intra-frame prediction mode; if j is greater than or equal to L, then the second intra-frame prediction mode is determined using the preset angle prediction mode set and the MPM list. Furthermore, in embodiments of this application, the decoder can determine a second mapping table between index values and binary symbol strings; wherein the second mapping table includes binary symbol strings of first length, second length, third length, and fourth length, respectively. For example, in this application, the first length is 3 bits, the second length is 5 bits, the third length is 6 bits, and the fourth length is 2 bits. It should be noted that, in this application, the second mapping table between index values and binary symbol strings is only used to determine the value of the second pattern index. Optionally, in this application, the second mapping table between index values and binary symbol strings can be as shown in Table 4, wherein the first length is 3 bits, the second length is 5 bits, the third length is 6 bits, and the fourth length is 2 bits. Table 4 The MPM list has a length of 4. The preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31. The decoder can determine the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index by decoding the bitstream. Then, based on the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index, the first intra-frame prediction mode is derived as IwcpPredMode0 and the second intra-frame prediction mode is derived as IwcpPredMode1. It should be noted that, in this application, for the decoding side, when performing debinarization according to Table 4, the context model can be used to decode binary symbol strings with binIdx equal to 0, while the equal probability model or bypass mode can be used to decode binary symbol strings with binIdx non-zero. When the decoder determines the first intra-frame prediction mode IwcpPredMode0 using the first mode index iwcp_pred_mode0_index, it can perform the following operations: 1. Perform inverse binarization on the binary symbol string according to Table 3, and determine the value of iwcp_pred_mode0_index as i. 2. If i is greater than or equal to 0 and less than 4, then IwcpPredMode0 is equal to IwcpMpm[i]. 3. If i is greater than or equal to 4, then IwcpPredMode0 is equal to (iwcp_pred_mode0_index+(iwcp_pred_mode0_index>=IwcpMpm[0])+((iwcp_pred_mode0_index+1)>=IwcpMpm[1])+((iwcp_pred_mode0_index+2)>=IwcpMpm[2])+((iwcp_pred_mode0_index+3)>=IwcpMpm[3])). When the decoder determines the second intra-frame prediction mode IwcpPredMode1 using the second mode index iwcp_pred_mode1_index, it can perform the following operations: 1. If i is greater than or equal to 0 and less than 4, then perform the following operation: (a) Perform debinarization on the binary symbol string according to Table 4, and determine the value of iwcp_pred_mode1_index as j; (b) If iwcp_pred_mode1_index is greater than or equal to iwcp_pred_mode0_index, that is, j is greater than or equal to i, then iwcp_pred_mode1_index is equal to iwcp_pred_mode1_index+1, that is, j is incremented by 1, i.e. j = j + 1, and then step 3 is executed. 2. If i is greater than or equal to 4, then perform debinarization on the binary symbol string according to Table 3, determine the value of iwcp_pred_mode1_index as j, and then execute step 3; 3. If j is greater than or equal to 0 and less than 4, then IwcpPredMode1 is equal to IwcpMpm[i]. 4. If j is greater than or equal to 4, then IwcpPredMode1 equals (iwcp_pred_mode1_index+(iwcp_pred_mode1_index>=IwcpMpm[0])+((iwcp_pred_mode1_index+1)>=Iwc pMpm[1])+((iwcp_pred_mode1_index+2)>=IwcpMpm[2])+((iwcp_pred_mode1_index+3)>=IwcpMpm[3])). Therefore, if it is necessary to determine the second intra-frame prediction mode based on the first intra-frame prediction mode, then the value j of iwcp_pred_mode1_index depends on the value i of iwcp_pred_mode0_index. Specifically, taking Table 4 as an example, if both the first and second intra-frame prediction modes are MPMs in the MPM list, then there are only 3 available MPMs for the second intra-frame prediction mode. This can be represented by 1 to 2 bits, such as "00, 01, 10" representing the remaining first, second, and third MPMs respectively. It is evident that by eliminating one possibility, the encoding / decoding method or the binarization / debinarization method can be changed to save overhead. It should be noted that, in the embodiments of this application, if the preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31, and the length of the MPM list is 4, then when determining the first mapping table between index values and binary symbol strings using binary symbol strings of the first, second, and third lengths, the first length binary symbol string can be used first for the 4 MPMs in the MPM list, i.e., the shortest codeword can be used. Next, 8 intra-frame angle prediction modes are selected from the remaining 24 intra-frame angle prediction modes to use the second length binary symbol string, and 16 intra-frame angle prediction modes are selected to use the third length binary symbol string. Specifically, in this application, for the remaining 24 intra-frame angle prediction modes, the prediction modes corresponding to the first 8 mode numbers can be predicted in ascending order of mode number, using shorter codewords, i.e., using a second-length binary symbol string, and then using longer codewords, i.e., using a third-length binary symbol string, for the prediction modes corresponding to the next 16 mode numbers. For example, in this application, the first mapping relationship table between index values and binary symbol strings shown in Table 3 above can be replaced with Table 5 below. Table 5, which is used to characterize the first mapping relationship between index values and binary symbol strings, can also be used to determine the values of the first pattern index and the second pattern index. Table 5 Accordingly, the second mapping relationship table between index values and binary symbol strings shown in Table 4 above can be replaced with Table 6 below. Table 6, which is used to characterize the second mapping relationship between index values and binary symbol strings, can also be used to determine the value of the second pattern index. Table 6 It is understandable that in this application, if the 28 intra-frame angle prediction modes with mode numbers 4-31 are used, that is, the preset angle prediction mode set includes 28 modes, then the encoding can be done in the form of 4+8+16, that is, the mode with 4 3-bit codewords, the mode with 8 5-bit codewords, and the mode with 16 6-bit codewords. Optionally, in this application, if the preset angle prediction mode set includes 20 modes, then it can be represented by 4 three-bit codewords and 16 five-bit codewords. Optionally, in this application, if the preset angle prediction mode set includes 36 modes, then it can be represented using four 3-bit codewords and 32 6-bit codewords. For example, AVS3 uses 36 intra-frame angle prediction modes with mode numbers 4-31, 42-45, and 56-59. It should be noted that in this application, if all modes in the preset angle prediction mode set are represented using a set of binary symbol strings as shown in Tables 3 and 4, then the "codeword" can be understood as a binary symbol string. The length of the codeword can be understood as the length of the binary symbol string. Another representation method is to use a flag bit plus a binary symbol string. For example, a binary MPM_flag can be used to indicate whether the current mode is MPM mode. That is, if MPM_flag is 1, it means the current mode is MPM mode; if MPM_flag is 0, it means the current mode is not MPM mode. If the current mode is MPM mode, there are a total of 4 possibilities for MPM. A 2-bit binary symbol string is then used to represent which MPM mode the current mode is. Then the codeword can be understood as a flag bit plus a binary symbol string, and the length of the codeword can be understood as the length of the flag bit plus the length of the binary symbol string. Step 105: Determine the weight matrix of the current block, and determine the predicted value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix. In the embodiments of this application, the decoder needs to determine the weight matrix of the current block, and then, after determining the first intra-frame prediction mode and the second intra-frame prediction mode used by the current block, further determine the prediction value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode and the weight matrix. Specifically, in this application, the decoder can determine the weight matrix of the current block based on the weight matrix derivation mode of the current block. Furthermore, in this application, when the decoder determines the prediction value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix, it can first determine the first prediction value of the current block according to the first intra-frame prediction mode; determine the second prediction value of the current block according to the second intra-frame prediction mode; and then use the weight matrix to perform a weighted operation on the first prediction value and the second prediction value to obtain the prediction value of the current block. It is understood that in this application, the first intra-frame prediction mode and the second intra-frame prediction mode can both be intra-frame angle prediction modes, that is, the embodiments of this application use two different intra-frame angle prediction modes. Then, the first intra-frame prediction mode and the second intra-frame prediction mode are combined to generate the first prediction block and the second prediction block, respectively. Then, based on the first prediction block and the second prediction block, combined with the weight matrix, the prediction block of the current block is determined. Furthermore, in the embodiments of this application, not all points in every possible weight matrix have the same weight. In other words, at least one possible weight matrix contains at least two different weight values. It should be noted that in the embodiments of this application, the decoder can use a method similar to GPM or AWP to determine the weight matrix. Specifically, if GPM or AWP is used in the same codec standard or codec, then this method can be used to determine the weight matrix, thus reusing some of the same logic. For example, AVS3 inter-frame prediction uses AWP, so the AWP method can be used to determine the weight matrix in AVS3. Of course, different methods than GPM or AWP in the same codec standard or codec can also be used, such as using different number of modes, different transition region algorithms, or different parameters, etc. Because inter-frame prediction utilizes temporal correlation, it uses the reconstructed image in the reference frame as the reference block. Intra-frame prediction utilizes spatial correlation, it uses the reconstructed pixels around the current block as reference pixels. The closer the spatial distance, the stronger the correlation; the farther the distance, the weaker the correlation. Therefore, if a certain weight matrix causes the pixel positions used by a prediction block to be far from the reference pixels, then this part may not be able to produce a more suitable prediction value than the existing technology. In this case, such a weight matrix can be omitted, but can be used in inter-frame prediction. This application provides an intra-frame prediction method. The codec can determine two different prediction blocks for the current block through two different intra-frame angle prediction modes. Then, it can be combined through various weight matrices to obtain more complex prediction blocks. While improving the accuracy of intra-frame prediction, it can reduce hardware implementation costs and complexity, realize a simple and efficient encoding and decoding method, and thus improve compression performance. Based on the above embodiments, in another embodiment of this application, the following prediction sample matrix is the prediction block mentioned above, that is, "block" can be understood as "sample matrix", and the array mentioned in the text means matrix. Taking the prediction of the luma component using IWCP as an example, however, this invention is not limited to the luma component, but can also be used for the chroma component and any other component of any format. Taking the application of the intra-frame prediction method proposed in this application in AVS3 as an example, the specific process of the decoder using the intra-frame weighted combination prediction mode to determine the prediction value of the current block can be described as follows: It should be noted that, in a specific decoding embodiment, since AVS3 uses AWP technology, the weight matrix of the Intra-Weighted Combination Prediction (IWCP) mode reuses the weight matrix of AWP. That is, the weight matrix of IWCP is derived in the same way as the weight matrix of AWP. For example, a sequence-level flag can be used to determine whether the current sequence to be decoded uses IWCP mode. For instance: See the sequence header definition for an error! Reference source not found. Table 7 The sequence header definition descriptor is sequence_header(){ …… iwcp_enable_flagu(1)…… The intra-weighted combined prediction mode enable flag, `iwcp_enable_flag`, is a binary variable. Specifically, a value of '1' indicates that the intra-weighted combined prediction mode can be used; a value of '0' indicates that the intra-weighted combined prediction mode should not be used. The value of `IwcpEnableFlag` is equal to `iwcp_enable_flag`. If `iwcp_enable_flag` does not exist in the bitstream, the value of `IwcpEnableFlag` is 0. For example, a frame-level flag can be used to determine whether the current frame to be decoded uses IWCP mode. For instance, intra-frame frames (such as I-frames) can be configured to use IWCP mode, while inter-frame frames (such as B-frames and P-frames) cannot. Alternatively, intra-frame frames can be configured not to use IWCP mode, while inter-frame frames can use IWCP mode. Or, some inter-frame frames can be configured to use IWCP mode, while others cannot. For example, a flag below the frame level and above the CU level (such as tile, slice, patch, LCU, etc.) can be used to determine whether this region uses IWCP mode. For example, the decoder decodes the current CU. If the current CU meets the IWCP usage conditions, it decodes the IWCP usage flag of the current CU. Otherwise, it does not need to decode the IWCP usage flag of the current CU. The IWCP usage conditions can be that the current CU is an intra-coded CU (IntraCuFlag below is 1), the current sequence can use IWCP (IwcpEnableFlag below is 1), and the size of the current block meets the restrictions (width >= IwcpMinSize && height >= IwcpMinSize && width <= IwcpMaxSize && height <= IwcpMaxSize). One possible case is that IwcpMinSize equals 8 and IwcpMaxSize equals 32. Another possible case is that IwcpMinSize equals 8 and IwcpMaxSize equals 16. Here, width is the width of the current CU, and height is the height of the current CU. For example, in YUV4:2:0 encoding, an 8×8 luma block corresponds to a 4×4 chroma block at the same position. One possible approach is to allow the 8×8 luma block to use IWCP mode but prohibit the 4×4 chroma block from using IWCP mode. This is because the prediction performance improvement of the 4×4 block using IWCP mode is not significant, and it also increases the hardware implementation cost. For example, if the current CU uses IWCP, then the current CU will not use other modes such as Derived Tree (DT), Intra Prediction Filter (IPF), and Improved Intra Prediction (IIP). That is, if the current CU uses IWCP, it does not need to process information related to these modes. This is because the prediction performance after combining IWCP with these modes does not significantly improve. Conversely, if the current CU uses IWCP and does not use Derived Tree (DT), Intra Prediction Filter (IPF), and Improved Intra Prediction (IIP) by default, it does not need to transmit flags indicating whether they are used, such as dt_split_flag, intra_pf_flag, and iip_flag, in the bitstream, which saves codewords and improves compression efficiency. For example, as shown in Table 8 below: Table 8 The intra-weighted combined prediction flag (iwcp_flag) is a binary variable. A value of '1' indicates that the intra-weighted combined prediction mode should be used; a value of '0' indicates that the intra-weighted combined prediction mode should not be used. The value of IwcpFlag is equal to the value of iwcp_flag. If iwcp_flag is not present in the bitstream, the value of IwcpFlag is 0. The derived mode partitioning flag, `dt_split_flag`, is a binary variable. A value of '1' indicates that derived mode partitioning should be performed; a value of '0' indicates that derived mode partitioning should not be performed. The value of `DtSplitFlag` is equal to the value of `dt_split_flag`, and its value ranges from 0 to 4. If `dt_split_flag` does not exist in the bitstream, the value of `DtSplitFlag` is 0. Derived mode partitioning indicates that rectangular prediction cells can be divided based on the current CU. The intra-prediction filtering flag, `intra_pf_flag`, is a binary variable. A value of '1' indicates that the current coding unit should use intra-prediction filtering; a value of '0' indicates that the current coding unit should not use intra-prediction filtering. The value of `IntraPfFlag` is equal to the value of `intra_pf_flag`. If `intra_pf_flag` is not present in the bitstream, its value is 0. Intra-prediction filtering can generate new prediction values by filtering the initial prediction values using reference pixels after the initial prediction values have been generated. The improved intra-prediction flag `iip_flag` is a binary variable. A value of '1' indicates that the current coding unit should use improved intra-prediction; a value of '0' indicates that the current coding unit should not use improved intra-prediction. The value of `IipFlag` is equal to the value of `iip_flag`. If `iip_flag` is not present in the bitstream, the value of `IipFlag` is 0. Improved intra-prediction can use different filters to generate predictions than when improved intra-prediction is not used. For example, for prediction of a certain angle, improved intra-prediction uses an 8-tap filter to generate predictions, while when improved intra-prediction is not used, a 4-tap filter is used. For example, if the current CU uses IWCP, then the bitstream needs to be decoded and the weight matrix export mode iwcp_idx and the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index of the two intra-frame prediction modes need to be determined, as shown in Table 9 below. The weight matrix export mode reuses the weight matrix export mode of AWP. Table 9 The intra-frame weighted combined prediction mode index, iwcp_idx, is used to determine the weight matrix of the intra-frame weighted combined prediction mode. The value of iwcp_idx is equal to the value of iwcp_idx. If iwcp_idx does not exist in the bitstream, the value of iwcp_idx is equal to 0. The first mode index iwcp_pred_mode0_index in the intra-weighted combined prediction mode is used to determine the first intra-prediction mode IwcpPredMode0 of the luma block in the intra-weighted combined prediction mode. The second mode index iwcp_pred_mode1_index in the intra-weighted combined prediction mode is used to determine the second intra-prediction mode IwcpPredMode1 of the luma block in the intra-weighted combined prediction mode. Furthermore, after determining the first intra-frame prediction mode and the second intra-frame prediction mode, based on the method proposed in step 105 of the above embodiments, the first intra-frame luminance prediction sample matrix predMatrixY0 can be determined according to IwcpPredMode0, the second intra-frame luminance prediction sample matrix predMatrixY1 can be determined according to IwcpPredMode1, and the luminance weight matrix IwcpWeightMatrixY can be determined according to IwcpIndex. Then, the luminance weight matrix IwcpWeightMatrixY is used to perform a weighted operation on the first intra-frame luminance prediction sample matrix predMatrixY0 and the second intra-frame luminance prediction sample matrix predMatrixY1 to finally determine the luminance prediction sample matrix predMatrixIwcpY. Specifically, when determining the brightness prediction sample matrix predMatrixIwcpY of IWCP based on two intra-frame brightness prediction sample matrices predMatrixY0 and predMatrixY1 and the weight matrix IwcpWeightMatrixY, the specific method is as follows: The value of the element predMatrixIwcpY[x][y] in the prediction sample matrix predMatrixIwcpY of the intra-frame weighted combined prediction mode is ((predMatrixY0[x][y]*IwcpWeightMatrixY[x][y]+predMatrixY1[x][y]*(8-IwcpWeightMatrixY[x][y])+4)>>3). Here, (x, y) is the coordinate position within the current block. Furthermore, after determining the prediction block of IWCP, namely the prediction sample matrix predMatrixIwcpY of the intra-frame weighted combined prediction mode, subsequent processing may include decoding of quantization coefficients, inverse transform, inverse quantization to determine residual blocks, combination of residual blocks and prediction blocks into reconstruction blocks, and subsequent loop filtering, etc. This application provides an intra-frame prediction method. The codec can determine two different prediction blocks for the current block through two different intra-frame angle prediction modes. Then, it can be combined through various weight matrices to obtain more complex prediction blocks. While improving the accuracy of intra-frame prediction, it can reduce hardware implementation costs and complexity, realize a simple and efficient encoding and decoding method, and thus improve compression performance. One embodiment of this application proposes an intra-frame prediction method applied to an encoder. Figure 9 is a schematic diagram of the implementation flow of the intra-frame prediction method. As shown in Figure 11, the method for the encoder to perform intra-frame prediction may include the following steps: Step 201: When the current block uses IWCP mode to determine the intra-prediction value of the current block, determine the first intra-prediction mode and the second intra-prediction mode of the current block; wherein, the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes. In the embodiments of this application, if it is determined that the current block uses the IWCP mode to determine the intra-prediction value of the current block, then the encoder can first determine the first intra-prediction mode and the second intra-prediction mode of the current block; wherein, the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes. It should be noted that, in the embodiments of this application, the IWCP mode is an intra-frame prediction method. Specifically, the IWCP mode determines two different intra-frame angle prediction modes for the current block, and then determines two prediction blocks according to these two different intra-frame angle prediction modes. Then, a weight matrix can be determined, and the two prediction blocks are combined according to the weight matrix to finally obtain a new prediction block, that is, the prediction block of the current block. Furthermore, in the embodiments of this application, when applying the IWCP mode, the size of the current block can be limited. It is understandable that, since the intra-frame prediction method proposed in this application requires generating two prediction blocks using two different intra-frame angle prediction modes, and then weighting them according to the weight matrix to obtain a new prediction block, in order to reduce complexity and consider the trade-off between compression performance and complexity, in the embodiments of this application, the IWCP mode can be restricted from being used for prediction blocks of certain sizes. Therefore, in this application, the encoder can first determine the size parameters of the current block, and then determine whether the current block uses the IWCP mode based on the size parameters. It should be noted that, in the embodiments of this application, the size parameters of the current block may include the height and width of the current block. Therefore, the encoder can use the height and width of the current block to restrict the use of the IWCP mode, that is, restrict the size of the prediction block that can use the IWCP mode. For example, in this application, if both the width and height are greater than or equal to a first lower limit, and both the width and height are less than or equal to a first upper limit, then it can be determined that the current block uses the IWCP mode. It is evident that one possible limitation is to use the IWCP mode only when the width and height of the predicted block are less than (or less than or equal to) the first upper limit, and the width and height of the predicted block are greater than (or greater than or equal to) the first lower limit. Here, the first lower limit can be 8, and the first upper limit can be 16 or 32, etc. For example, in YUV4:2:0 encoding, an 8×8 luma block corresponds to a 4×4 chroma block at the same position. One possible approach is to allow the 8×8 luma block to use IWCP mode but prohibit the 4×4 chroma block from using IWCP mode. This is because the prediction performance improvement of the 4×4 block using IWCP mode is not significant, and it also increases the hardware implementation cost. For example, in this application, a frame-level flag can be used to determine whether the current frame to be decoded uses IWCP mode. For instance, intra-frame frames (e.g., I-frames) can be configured to use IWCP mode, while inter-frame frames (e.g., B-frames, P-frames) cannot. Alternatively, intra-frame frames can be configured not to use IWCP mode, while inter-frame frames can use IWCP mode. Or, some inter-frame frames can be configured to use IWCP mode, while others cannot. Inter-frame frames can also use intra-frame prediction, and therefore, inter-frame frames may also use IWCP mode. For example, in this application, a flag below the frame level and above the CU level (such as tile, slice, patch, LCU, etc.) can be used to determine whether this region uses IWCP mode. It is understood that, in the embodiments of this application, the encoder can determine a combination of a minimum rate distortion intra-prediction mode and a weight matrix derivation mode, wherein the combination includes a first intra-prediction mode, a second intra-prediction mode, and a weight matrix derivation mode. Furthermore, in the embodiments of this application, the first intra-frame prediction mode and the second intra-frame prediction mode can be two different intra-frame angle prediction modes. Specifically, in the embodiments of this application, the first intra-frame prediction mode and the second intra-frame prediction mode can be two different intra-frame angle prediction modes from a preset set of angle prediction modes. In other words, in this application, both the first intra-frame prediction mode and the second intra-frame prediction mode can only be intra-frame angle prediction modes. That is, neither the first nor the second intra-frame prediction mode can be any other basic intra-frame prediction mode besides the intra-frame angle prediction mode, such as intra-frame non-angle prediction modes, including DC mode, Planar mode, PLANE mode, Bilinear mode, PCM mode, etc. Among these, basic intra-frame prediction modes include, but are not limited to, angle prediction modes and non-angle prediction modes. Examples include the 67 intra-frame prediction modes used by VVC and the 66 intra-frame prediction modes used by AVS3. It is understandable that in this application, the restriction of the first intra-frame prediction mode and the second intra-frame prediction mode to intra-angle prediction mode can, on the one hand, reduce the hardware implementation complexity of the intra-frame weighted combined prediction mode, because when the hardware implements the intra-frame weighted combined prediction mode in parallel, only one additional circuit supporting intra-frame angle weighted prediction is needed; on the other hand, the intra-frame weighted combined prediction mode itself is applicable to relatively complex block content, while the intra-frame non-angle prediction mode is usually used for scenes with relatively uniform texture changes, and fewer available modes can also reduce overhead. Therefore, the use or non-use of the intra-frame non-angle prediction mode in the intra-frame weighted combined prediction mode has almost no impact on compression performance. Furthermore, in this application, although a greater number of available intra-frame angle prediction modes can result in more accurate predictions, the overhead of transmitting the selected mode's flag in the bitstream also increases accordingly. Therefore, to achieve better compression performance, a reasonable set of available intra-frame prediction modes can be selected to achieve a better trade-off between prediction performance and overhead. Specifically, the encoder can use a preset set of angle prediction modes to restrict the available intra-frame angle prediction modes for the first and second intra-frame prediction modes. The preset set of angle prediction modes is a subset of all intra-frame angle prediction modes. Taking AVS3 as an example, AVS3 has 62 angle modes, namely intra-frame angle prediction modes with mode numbers 3-32 and 34-65. For example, in this application, the first intra-frame prediction mode and the second intra-frame prediction mode may use only the intra-frame angle prediction modes with mode numbers 3-32, or the first intra-frame prediction mode and the second intra-frame prediction mode may use only the 28 intra-frame angle prediction modes with mode numbers 4-31. For example, in this application, taking VVC as an example, the first intra-frame prediction mode and the second intra-frame prediction mode may use only intra-frame angle prediction modes with even mode numbers, or the first intra-frame prediction mode and the second intra-frame prediction mode may use only intra-frame angle prediction modes with odd mode numbers. For example, in this application, the set of angle prediction modes used by the first intra-frame prediction mode and the set of angle prediction modes used by the second intra-frame prediction mode are different. Optionally, the decoder can use the same preset set of angle prediction modes to restrict the first and second intra-frame prediction modes. That is, if the first intra-frame prediction mode can only use the 28 intra-frame angle prediction modes with mode numbers 4-31, the second intra-frame prediction mode can also only use the 28 intra-frame angle prediction modes with mode numbers 4-31. Therefore, the first and second intra-frame prediction modes can use the same MPM list and the same or similar encoding / decoding methods. In other words, if the decoder uses different preset sets of angle prediction modes to restrict the first and second intra-frame prediction modes, then different MPM lists or significantly different encoding / decoding methods need to be used for the first and second intra-frame prediction modes. Step 202: Construct the MPM list for the current block. In embodiments of this application, the encoder can also construct an MPM list for the current block. The prediction modes in the MPM list are all intra-frame angle prediction modes. Furthermore, in the embodiments of this application, when the encoder constructs the MPM list of the current block, it needs to first determine the weight matrix derivation mode of the current block, and then use the weight matrix derivation mode to further determine the MPM list of the current block. It should be noted that, in this application, the weight matrix derivation mode is used to determine the weight matrix used in the current block. Specifically, the weight matrix derivation mode can be a mode for deriving the weight matrix. For a prediction block of a given length and width, each weight matrix derivation mode can derive a weight matrix; for prediction blocks of the same size, different weight matrix derivation modes will derive different weight matrices. For example, in this application, AVS3's AWP has 56 weight matrix derivation modes, and VVC's GPM has 64 weight matrix derivation modes. Optionally, in this application, when the decoder constructs the MPM list for the current block, it can directly derive the MPM list based on the prediction modes and weight matrices of the neighboring blocks of the current block. Optionally, in this application, when constructing the MPM list for the current block, the encoder can also construct the MPM list based on the prediction modes of the adjacent blocks of the current block, a preset angle prediction mode set, and the weight matrix derived mode. The preset angle prediction mode set can be a subset of all intra-frame angle prediction modes. Taking AVS3 as an example, the preset angle prediction mode set can include only the 28 intra-frame angle prediction modes with mode numbers 4-31. It is understood that in this application, if the range of the first intra-frame prediction mode and the second intra-frame prediction mode is not limited, then the preset angle prediction mode set can be a combination of all intra-frame angle prediction modes; if the range of the first intra-frame prediction mode and the second intra-frame prediction mode needs to be limited, then the preset angle prediction mode set can be only a combination of some intra-frame angle prediction modes. In this case, the preset angle prediction mode set can be used to limit the range of the first intra-frame prediction mode and the second intra-frame prediction mode, thereby effectively reducing overhead and improving compression performance. Optionally, in this application, when the encoder constructs the MPM list based on the intra-prediction modes of the neighboring blocks of the current block, the preset angle prediction mode set, and the weight matrix derived mode, it can first use the prediction modes of the neighboring blocks to determine a first candidate mode; at the same time, it can use the weight matrix derived mode to determine a second candidate mode; and then it can further construct the MPM list of the current block based on the first candidate mode, the second candidate mode, and the preset angle prediction mode set. Specifically, in this application, when the encoder determines the first candidate mode using the prediction mode of the adjacent block, if the adjacent block is a normal intra-frame prediction block and the prediction mode of the adjacent block is an intra-frame prediction mode, then the prediction mode of the adjacent block is determined as the first candidate mode. It is understood that in this application, a normal intra-prediction block refers to a prediction block using prediction modes such as DC mode, Planar mode, Bilinear mode, and angular prediction mode, rather than a prediction block using prediction modes such as IBC mode and intra string copy prediction. Specifically, in this application, when the encoder determines the second candidate mode using the weight matrix derivation mode, it can first determine the boundary line angle index value according to the weight matrix derivation mode; then it can use the boundary line angle index value to determine the second candidate mode. It should be noted that, in the embodiments of this application, the second candidate mode can be determined as L different intra-frame angle prediction modes, thereby ensuring the construction of an MPM list of length L. Furthermore, in the embodiments of this application, when the weight matrix includes two weights, the positions where the weights change form a straight line; or, when the weight matrix has multiple weights, the positions in the transition region with the same weight form a straight line, which can be called a boundary line. We can assume the horizontal angle to the right is 0 degrees, and the angle increases counterclockwise. Then the boundary line may be horizontal 0 degrees, vertical 90 degrees, inclined at 45 degrees, 135 degrees, and various other angles. If a prediction block chooses to use a certain weight matrix, the corresponding texture is likely to exhibit different characteristics on both sides of the boundary line. For example, the two sides of the boundary line may have textures with two different angles, or one side of the boundary line may have a texture with one angle, while the other side has a relatively flat texture. Since the boundary line itself also has an angle, we can assume that a point obtained through intra-frame angle prediction may be close to some textures of the current block. Therefore, this straight line is correlated with the two intra-frame prediction modes of the current block. Specifically, in this application, assuming the boundary line is obtained by predicting an intra-frame angle from a point, at least one intra-frame angle prediction pattern can be found that can approximate the boundary line. For example, a horizontal boundary line matches a horizontal intra-frame prediction pattern, such as pattern 24 in AVS3; a vertical boundary line matches a vertical intra-frame prediction pattern, such as pattern 12 in AVS3; a 45-degree boundary line can match an intra-frame prediction pattern from the lower left to the upper right of 45 degrees, such as pattern 30 in AVS3; it can also match an intra-frame prediction pattern from the upper right to the lower left of 225 degrees, such as pattern 6 in AVS3. If a weight matrix has only one weight value, it can match patterns without obvious angles, such as DC mode, Planar mode, and Bilinear mode. Therefore, the weight matrix-derived pattern can match certain intra-frame prediction patterns, and thus can be used to assist in the decoding of intra-frame prediction patterns. It should be noted that in this application, the weight matrix derivation mode can also be the index of the weight matrix. For example, the 56 modes of AWP can be considered as 56 weight matrix derivation modes. For example, in this application, a mapping table can be constructed to further represent the mapping relationship between the weight matrix derived mode and the intra-frame angle prediction mode. Specifically, the boundary lines of multiple modes of AWP and GPM are all the same angle. For example, the boundary line angle of AVS3 AWP is the same every 8 modes. There are 8 boundary line angles in total for the 56 AWP modes. The index of the boundary line angle can be obtained by modulo 8 (%8) the mode number of the weight matrix derived mode. For example, Table 1 above is a mapping table. Taking the angle mode of AVS3 as an example, the boundary line angle indices 0 and 1 can correspond to two intra-frame angle prediction modes, one from the upper right corner to the lower left corner, and the other from the upper left corner to the lower right corner. In specific implementation, another approximately corresponding intra-frame angle prediction mode can also be found for the indices of other boundary line angles, or all the indices of the boundary line angles can correspond to only one intra-frame angle prediction mode. For a weight matrix, besides the intra-angle prediction mode corresponding to its boundary line being highly likely to be used, certain intra-angle prediction modes related to it are also highly likely to be used. For example, intra-angle prediction modes corresponding to angles close to or perpendicular to the boundary line. The encoder can utilize the correlation between the weight matrix and the intra-angle prediction modes to construct an MPM list of intra-weighted combined prediction modes. For example, when constructing the MPM list of intra-weighted combined prediction modes, if the list length is 4, then candidate modes corresponding to the boundary line angle indices in Table 2 above can be added to the MPM list. Understandably, based on Table 2 above, having the number of candidate modes corresponding to the index of each boundary angle equal to the length of the MPM list ensures that the MPM list is filled even if all intra-prediction modes of the referenced adjacent blocks are unavailable. For example, if the length of the MPM list is 4, then the number of candidate modes corresponding to the index of each boundary angle can be set to 4. Furthermore, in this application, when the encoder constructs the MPM list based on the first candidate mode, the second candidate mode, and the preset angle prediction mode set, it can also perform filtering processing on the first candidate mode based on the preset angle prediction mode set to obtain filtered candidate modes; and construct the MPM list based on the filtered candidate modes and the second candidate mode. Specifically, in this application, when the encoder performs filtering processing on the first candidate mode based on the preset angle prediction mode set to obtain filtered candidate modes, if the first candidate mode belongs to the preset angle prediction mode set, then the first candidate mode is determined as the filtered candidate mode; if the first candidate mode is an intra-frame angle prediction mode and does not belong to the preset angle prediction mode set, then a replacement mode of the first candidate mode is determined in the preset angle prediction mode set, and the replacement mode is determined as the filtered candidate mode. Furthermore, in this application, if the first candidate mode is not an intra-frame angle prediction mode, the encoder can directly delete the first candidate mode. It is understandable that in this application, since the preset angle prediction mode set to which the first and second intra-frame prediction modes belong is a subset of all intra-frame angle prediction modes and does not include intra-frame non-angle prediction modes, the selection of the most probable mode (MPM) for the current block, i.e., the method for constructing the MPM list, also needs to be adjusted accordingly for intra-frame weighted combined prediction modes. Specifically, the encoder needs to refer to the intra-frame prediction modes of the neighboring blocks surrounding the current block when constructing the MPM list. These neighboring blocks include the left neighboring block, top neighboring block, top-left neighboring block, top-right neighboring block, bottom-left neighboring block, etc. Due to spatial correlation, if the neighboring blocks use a certain prediction mode, the current block has a high probability of using the same or similar prediction mode. Optionally, since the first and second intra-frame prediction modes of the intra-weighted combined prediction mode can only be intra-frame angular prediction modes, when a reference neighboring block uses an intra-frame non-angular prediction mode, i.e., the first candidate mode is not an intra-frame angular prediction mode, the encoder will not use the intra-frame non-angular prediction mode used by this reference block when constructing the MPM list of the current block, i.e., it will not add the intra-frame non-angular prediction mode to the MPM list of the current block. Optionally, since the preset angle prediction mode set to which the first and second intra-frame prediction modes belong is a subset of all intra-frame angle prediction modes, when a reference neighboring block uses an intra-frame angle prediction mode outside the preset angle prediction mode set (i.e., the first candidate mode is an intra-frame angle prediction mode but does not belong to the preset angle prediction mode set), the encoder can convert the intra-frame angle prediction mode outside the preset angle prediction mode set into an intra-frame angle prediction mode with a similar angle within the preset angle prediction mode set when constructing the MPM list for the current block, and then add it to the MPM list. Taking AVS3 as an example, if the preset angle prediction mode set restricts the first and second intra-frame prediction modes to only use intra-frame angle prediction modes 4-31, and the neighboring block of the current block uses intra-frame angle prediction mode 43, then the encoder can add intra-frame angle prediction mode 12, which is similar to intra-frame angle prediction mode 43, to the MPM list of the current block under the intra-frame weighted combined prediction mode. Furthermore, in the embodiments of this application, when the encoder constructs the MPM list based on the filtered candidate pattern and the second candidate pattern, if the filtered candidate pattern meets the preset addition condition, the filtered candidate pattern is added to the MPM list; if the MPM list does not meet the preset list length L, and the second candidate pattern meets the preset addition condition, the second candidate pattern is added to the MPM list; wherein, L is an integer greater than or equal to 1. For example, in this application, the value of L can be 4, that is, the preset list length of the MPM list is 4, or in other words, the MPM list includes 4 most likely patterns. It is understood that, in the embodiments of this application, the encoder can sort the L modes in the MPM list in ascending order of mode number. It should be noted that, in the embodiments of this application, if the filtered candidate mode is different from all the predicted modes in the MPM list, the encoder can determine that the filtered candidate mode meets the preset addition condition; correspondingly, if the second candidate mode is different from all the predicted modes in the MPM list, the encoder can determine that the second candidate mode meets the preset addition condition. It is understood that in the embodiments of this application, when the encoder adds the filtered candidate modes corresponding to adjacent blocks to the MPM list, it determines the order parameters corresponding to the adjacent blocks; according to the order parameters, the intra-frame filtered candidate modes corresponding to the adjacent blocks are added to the MPM list in sequence. The encoder can determine the corresponding order parameters based on the spatial distance between the adjacent blocks and the current block. For example, the closer the spatial distance between the adjacent blocks and the current block, the stronger their correlation, and the earlier they are added, i.e., the smaller the order parameter; the farther the spatial distance between the adjacent blocks and the current block, the weaker their correlation, and the later they are added, i.e., the larger the order parameter. Furthermore, in embodiments of this application, after the encoder adds the filtered candidate modes and / or the second candidate modes to the MPM list, it can also sort the L predicted modes in the MPM list in ascending order of mode number. For example, in this application, it is assumed that the MPM list of the current block in the intra-frame weighted combined prediction mode is IwcpMpm[4], that is, the list length of the MPM list is 4, the index of the weight matrix derivation mode is IwcpIndex, the weight matrix derivation mode reuses 56 derivation modes of AWP, and the preset angle prediction mode set to which the first intra-frame prediction mode and the second intra-frame prediction mode belong is the intra-frame angle prediction mode number 4-31. Then, when the encoder constructs the MPM list of the current block, it can perform the following steps in sequence: Step S1: Set the array cand_mode
[0010] , and initialize all values of cand_mode to invalid values. Perform the following operation on cand_mode: (a) If a neighboring block F "exists" and is a normal intra-prediction block, cand_mode[0] is equal to the intra-prediction mode of F. (b) If a neighboring block G "exists" and is a normal intra-prediction block, then cand_mode[1] is equal to the intra-prediction mode of G. (c) If the adjacent block C "exists" and is a normal intra-prediction block, then cand_mode[2] is equal to the intra-prediction mode of C. (d) If the adjacent block A "exists" and is a normal intra-prediction block, then cand_mode[3] is equal to the intra-prediction mode of A. (e) If the neighboring block B "exists" and is a normal intra-prediction block, then cand_mode[4] is equal to the intra-prediction mode of B. (f) If the adjacent block D "exists" and is a normal intra-prediction block, cand_mode[5] is equal to the intra-prediction mode of D. (g)cand_mode[6] is equal to candidate mode 0 corresponding to IwcpIndex%8. (h)cand_mode[7] is equal to candidate mode 1 corresponding to IwcpIndex%8. (i)cand_mode[8] is equal to candidate mode 2 corresponding to IwcpIndex%8. (j)cand_mode[9] is equal to candidate mode 3 corresponding to IwcpIndex%8. In this context, "existence" of an adjacent block X (where X is A, B, C, D, F, or G) means that the block should be within the image and belong to the same slice as block E; otherwise, the adjacent block "does not exist." If a block "does not exist" or has not yet been decoded, then the block is "unavailable"; otherwise, the block is "available." If the block containing the image sample "does not exist" or the sample has not yet been decoded, then the sample is "unavailable"; otherwise, the sample is "available." It is understood that in this application, the execution steps (a) to (f) above constitute the process for determining the first candidate mode; the execution steps (g) to (j) above constitute the process for determining the second candidate mode, wherein the encoder may refer to Table 2 above to determine the second candidate mode. Step S2: For i ranging from 0 to 5, perform the following operations: (a) If cand_mode[i] is less than 3 or cand_mode[i] is equal to 33, cand_mode[i] is set to an invalid value. In other words, if the first candidate mode is an intra-frame non-angle prediction mode, the encoder can directly delete the first candidate mode, that is, not use the first candidate mode. (b) Otherwise, if cand_mode[i] equals 3, let cand_mode[i] equal 4. (c) Otherwise, if cand_mode[i] equals 32, let cand_mode[i] equal 31. (d) Otherwise, if cand_mode[i] is greater than 33, perform the following operation: If cand_mode[i] is less than 44, set cand_mode[i] to cand_mode[i] - 30. Otherwise, if cand_mode[i] is less than 58, set cand_mode[i] to cand_mode[i] - 33. Otherwise, set cand_mode[i] to cand_mode[i] - 34. In other words, if the first candidate mode is an intra-frame angle prediction mode, but the first candidate mode does not belong to the preset angle prediction mode set, the encoder can select a similar intra-frame angle prediction mode from the preset angle prediction mode set as the replacement mode for the first candidate mode, and then use the replacement mode as the candidate mode after filtering. (e) Otherwise, do not modify the value of cand_mode[i]. In other words, if the first candidate mode belongs to the preset angle prediction mode set, then the encoder can directly use the first candidate mode, that is, the first candidate mode is the candidate mode after filtering. It is understood that in this application, step S2 above is the screening process for the first candidate mode, which ultimately determines the candidate mode after screening the first candidate mode. Step S3: Set mpm_num to 0, and perform the following operations for i from 0 to 9: (a) If cand_mode[i] is not an invalid value, then perform the following operation: Compare cand_mode[i] with IwcpMpm[j], where j ranges from 0 to mpm_num-1. If cand_mode[i] and IwcpMpm[j] are not equal, perform the following operation: 1. Let IwcpMpm[mpm_num] equal cand_mode[i]. 2. Set mpm_num to equal mpm_num + 1. 3. If mpm_num equals 4, then end step 3. In other words, if there are fewer than 4 predicted patterns in the MPM list, and the filtered candidate pattern is different from any predicted pattern in the MPM list, the encoder can add the filtered candidate pattern to the MPM list. If there are still fewer than 4 predicted patterns in the MPM list after all filtered candidate patterns that meet the preset addition conditions have been added to the MPM list, the encoder can continue to add the second candidate pattern that meets the preset addition conditions to the MPM list until the length of the MPM list reaches 4. Step S4: Sort the four numbers of IwcpMpm[4] in ascending order. Finally, the encoder can sort the four intra-frame angle prediction modes in the MPM list in ascending order of mode number. It is understood that this application does not restrict the execution order of the above steps 202 and 203, that is, it does not restrict the order between the determination process of the first intra-frame prediction mode and the second intra-frame prediction mode and the construction process of the MPM list. Step 203: Determine the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list. In the embodiments of this application, after the encoder determines the first intra-frame prediction mode and the second intra-frame prediction mode of the current block and completes the construction of the MPM list of the current block, it can further determine the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode and the MPM list. It is understood that, in the embodiments of this application, the first mode index can be used to indicate the first intra-prediction mode used by the current block, and the second mode index can be used to indicate the second intra-prediction mode of the current block. Specifically, the values of the first mode index and the second mode index are related to the number of intra-frame angle prediction modes that may exist in the first intra-frame prediction mode and the second intra-frame prediction mode. For example, the first intra-frame prediction mode and the second intra-frame prediction mode may be one of the 28 intra-frame angle prediction modes with mode numbers 4-31, then the values of the first mode index and the second mode index both belong to the range of 0 to 27. For example, in an embodiment of this application, the parameter iwcp_pred_mode0_index can be used to represent the first mode index, and the parameter iwcp_pred_mode1_index can be used to represent the second mode index. Furthermore, in embodiments of this application, the encoder can determine a first mapping table between index values and binary symbol strings; wherein the first mapping table includes binary symbol strings of first length, second length, and third length, respectively. For example, in this application, the first length is 3 bits, the second length is 5 bits, and the third length is 6 bits. It should be noted that, in this application, the first mapping table between index values and binary symbol strings can be used to determine the values of the first pattern index and the second pattern index. Optionally, in this application, for AVS3, if 28 intra-frame angle prediction modes with mode numbers 4-31 are used, i.e., the preset angle prediction mode set includes 28 modes, then encoding can be done in the form of 4+8+16, i.e., modes with 4 shortest codewords, modes with 8 shorter codewords, and modes with 16 longer codewords. Specifically, the modes with 4 shortest codewords use 3-bit codewords (the first length), the modes with 8 shorter codewords use 5-bit codewords (the second length), and the modes with 16 longer codewords use 6-bit codewords (the third length). It should be noted that in this application, the predicted angles of the 28 intra-frame angle prediction modes with mode numbers 4-31 basically cover the entire commonly used angle range. At the same time, the intra-frame angle prediction modes with mode numbers 4-31 are simpler than the intra-frame angle prediction modes with mode numbers 34-65, and using these 28 modes in the form of 4+8+16 will not cause codeword waste. Therefore, the encoder can preferably define a preset angle prediction mode set according to the 28 intra-frame angle prediction modes with mode numbers 4-31. Furthermore, in the embodiments of this application, if the list length of the MPM list of the current block is 4, then the 4 most probable patterns in the MPM list can be used with a binary symbol string of the first length, that is, the 4 shortest codeword patterns can be used by the 4 MPMs in the MPM list; correspondingly, other prediction patterns in the preset angle prediction pattern set and outside the MPM list can use a binary symbol string of the second length and a binary symbol string of the third length, respectively. Optionally, in this application, for the 24 intra-frame angle prediction modes other than the 4 MPMs in the MPM list within the preset angle prediction mode set, the encoder can evenly distribute the modes with shorter codewords and the modes with longer codewords. Specifically, the encoder can evenly distribute the modes with 8 shorter codewords (a binary symbol string of the second length) among the remaining 24 intra-frame angle prediction modes. For example, every 2 modes with longer codewords (a binary symbol string of the third length) use 1 mode with shorter codewords (a binary symbol string of the second length). Furthermore, in the specific execution process, this can be achieved by modulo 3 (%3) the sequence numbers from 0 to 23 in the remaining 24 intra-frame angle prediction modes. For example, modes with a sequence number modulo 3 remainder of 2 use 5-bit codewords, i.e., use a binary symbol string of the second length, and modes with a sequence number modulo 3 remainder of 0 or 1 use 6-bit codewords, i.e., use a binary symbol string of the third length. For example, in this application, if 28 intra-frame angle prediction modes with mode numbers 4-31 are used, that is, the preset angle prediction mode set includes 28 modes, then the first mapping table between index values and binary symbol strings can be as shown in Table 3 above, wherein the first length is 3 bits, the second length is 5 bits, and the third length is 6 bits. The first bit can be used to indicate whether it is an MPM, for example, "1" indicates that it is an MPM and "0" indicates that it is not an MPM. If the intra-prediction mode in the first frame is MPM, assuming that the MPM list includes 4 MPMs, then 2 bits can be used to indicate which MPM in the MPM list is used, that is, "00, 01, 10, 11" represent the first MPM, second MPM, third MPM, and fourth MPM in the MPM list, respectively. Furthermore, in this application, binary symbol strings with a bit flag of 0 are encoded using a context model, while binary symbol strings with a bit flag of non-zero are not encoded using a context model. The value of the bit flag can represent the number of bits that have been encoded, and the bit flag can be represented by binIdx. It should be noted that, in this application, for the encoding side, when performing binarization according to Table 3, binary symbol strings with binIdx = 0 can be encoded using the context model, while binary symbol strings with binIdx = non-0 can be encoded using the equal probability model or the bypass mode. Furthermore, in this application, when the encoder determines the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list, if the mode number of the first intra-frame prediction mode is the same as the mode number of the m-th mode in the MPM list, then the value i of the first mode index is assigned according to m; if the mode number of the first intra-frame prediction mode is different from the mode number of any mode in the MPM list, then the value i of the first mode index is determined using the MPM list; the first mode index is determined according to the first mapping table and i. Wherein, m is an integer greater than or equal to 0 and less than L. In other words, in this application, if the mode number of the first intra-frame prediction mode is the same as the mode number of a mode in the MPM list, then the value i of the first mode index can be directly set to the order m of the most likely mode. For example, if the first intra-frame prediction mode is the same as the second mode in the MPM list, then i = 2 is set. Specifically, in this application, when the encoder determines the value i of the first mode index using the MPM list, if the mode number of the first intra-frame prediction mode is greater than or equal to the mode number of the fourth mode in the MPM list, then i is assigned a value according to the difference between the mode number of the first intra-frame prediction mode and 4; if the mode number of the first intra-frame prediction mode is less than the mode number of the fourth mode in the MPM list, but greater than or equal to the mode number of the third mode in the MPM list, then i is assigned a value according to the difference between the mode number of the first intra-frame prediction mode and 3; if the mode number of the first intra-frame prediction mode is less than the mode number of the MPM list... If the mode number of the third mode in the table is greater than or equal to the mode number of the second mode in the MPM list, then i is assigned a value based on the difference between the mode number of the first intra-frame prediction mode and 2; if the mode number of the first intra-frame prediction mode is less than the mode number of the second mode in the MPM list, but greater than or equal to the mode number of the first mode in the MPM list, then i is assigned a value based on the difference between the mode number of the first intra-frame prediction mode and 1; if the mode number of the first intra-frame prediction mode is less than the mode number of the first mode in the MPM list, then i is assigned a value based on the mode number of the first intra-frame prediction mode. For example, in this application, if the mode numbers of the four MPMs in the MPM list are 4, 8, 12, and 16 respectively, and the mode number of the first intra-frame prediction mode is 9, the encoder can compare the mode number of the first intra-frame prediction mode with the mode numbers of the four MPMs respectively. Specifically, 9 is greater than the mode number of the second MPM and less than the mode number of the third MPM, so the value of the first mode index i can be set to i = 9 - 2 = 7. For example, in this application, if the mode numbers of the four MPMs in the MPM list are 4, 8, 12, and 16 respectively, and the mode number of the first intra-frame prediction mode is 15, the encoder can compare the mode number of the first intra-frame prediction mode with the mode numbers of the four MPMs respectively. Specifically, if 15 is greater than the mode number of the third MPM and less than the mode number of the fourth MPM, then the value of the first mode index i can be set to 15-3=12. It is understood that in this application, after the encoder determines the value i of the first mode index corresponding to the prediction mode in the first frame, it can determine the first mode index according to the first mapping table and i. Specifically, the encoder can perform binarization processing on i according to the first mapping table shown in Table 3 above to determine the first mode index. Furthermore, in this application, when the encoder determines the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list, if the mode number of the second intra-frame prediction mode is the same as the mode number of the m-th mode in the MPM list, then the value j of the first mode index is assigned according to m; if the mode number of the second intra-frame prediction mode is different from the mode number of any mode in the MPM list, then the value j of the first mode index is determined using the MPM list; and the second mode index is determined according to the first mapping table and j. Here, m is an integer greater than or equal to 0 and less than L. In other words, in this application, if the mode number of the second intra-frame prediction mode is the same as the mode number of a mode in the MPM list, then the value j of the first mode index can be directly set to the order m of the most likely mode. For example, if the second intra-frame prediction mode is the same as the third mode in the MPM list, then j = 3 is set. Specifically, in this application, when the encoder determines the value j of the first mode index using the MPM list, if the mode number of the second intra-frame prediction mode is greater than or equal to the mode number of the fourth mode in the MPM list, then j is assigned a value according to the difference between the mode number of the second intra-frame prediction mode and 4; if the mode number of the second intra-frame prediction mode is less than the mode number of the fourth mode in the MPM list, but greater than or equal to the mode number of the third mode in the MPM list, then j is assigned a value according to the difference between the mode number of the second intra-frame prediction mode and 3; if the mode number of the second intra-frame prediction mode is less than the mode number of the MPM list... If the mode number of the third mode in the table is greater than or equal to the mode number of the second mode in the MPM list, then j is assigned a value based on the difference between the mode number of the second intra-frame prediction mode and 2; if the mode number of the second intra-frame prediction mode is less than the mode number of the second mode in the MPM list, but greater than or equal to the mode number of the first mode in the MPM list, then j is assigned a value based on the difference between the mode number of the second intra-frame prediction mode and 1; if the mode number of the second intra-frame prediction mode is less than the mode number of the first mode in the MPM list, then j is assigned a value based on the mode number of the second intra-frame prediction mode. For example, in this application, if the mode numbers of the four MPMs in the MPM list are 4, 8, 12, and 16 respectively, and the mode number of the second intra-frame prediction mode is 17, the encoder can compare the mode number of the second intra-frame prediction mode with the mode numbers of the four MPMs respectively. Specifically, if 17 is greater than the mode number of the fourth MPM, then the value of the first mode index j can be set to 17-4=13. For example, in this application, if the mode numbers of the four MPMs in the MPM list are 4, 8, 12, and 16 respectively, and the mode number of the second intra-frame prediction mode is 6, the encoder can compare the mode number of the second intra-frame prediction mode with the mode numbers of the four MPMs respectively. Specifically, 6 is greater than the mode number of the first MPM and less than the mode number of the second MPM, so the value of the first mode index j = 6 - 1 = 5 can be set. It is understood that in this application, after the encoder determines the value j of the second mode index corresponding to the second intra-frame prediction mode, it can determine the second mode index according to the first mapping table and j. Specifically, the encoder can perform binarization processing on j according to the first mapping table shown in Table 3 above to determine the second mode index. For example, in this application, if the current block uses the IWCP mode, the length of the MPM list of the current block is 4, i.e., L=4. The 4 modes in the MPM list are arranged in ascending order of mode number. The preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31. The encoder can first determine the first intra-frame prediction mode as IwcpPredMode0 and the second intra-frame prediction mode as IwcpPredMode1. Then, based on the first intra-frame prediction mode IwcpPredMode0 and the second intra-frame prediction mode IwcpPredMode1, it can further determine the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index. The values of iwcp_pred_mode0_index and iwcp_pred_mode1_index are in the range of 0-27. After the encoder determines the first intra-prediction mode IwcpPredMode0 used for the intra-weighted combination prediction mode of the current block, the following operations can be performed when determining the first mode index iwcp_pred_mode0_index: 1. If IwcpPredMode0 equals IwcpMpm[m], where m is greater than or equal to 0 and less than 4, then the value i of iwcp_pred_mode0_index is equal to m. In other words, if the intra-frame prediction mode is the same as the m-th MPM in the MPM list, then m can be directly used to assign a value to i, i.e., i = m. 2. If IwcpPredMode0 is not equal to IwcpMpm[m], then the value i of iwcp_pred_mode0_index is equal to IwcpPredMode0. <iwcpmpm[0]?iwcppredmode0:iwcppredmode0<iwcpmpm[1]?iwcppredmode0-1:iwcppredmode0<iwcpmpm[2]?iwcppredmode0-2:iwcppredmode0<iwcpmpm[3]?iwcppredmode0-3:iwcppredmode0–4。3. Binarize the value i of iwcp_pred_mode0_index according to Table 3 to determine iwcp_pred_mode0_index in the form of a binary symbol string. Specifically, when binarizing the value i of iwcp_pred_mode0_index according to Table 3, the index value that is the same as i can be determined from the left column of Table 3, and then the binary symbol string iwcp_pred_mode0_index can be determined from the right column of the same row. Accordingly, after the encoder determines the second intra-prediction mode IwcpPredMode1 used for the intra-weighted combination prediction mode of the current block, the following operations can be performed when determining the second mode index iwcp_pred_mode1_index: 1. If IwcpPredMode1 equals IwcpMpm[m], where m is greater than or equal to 0 and less than 4, then the value j of iwcp_pred_mode1_index is equal to m. In other words, if the intra-frame prediction mode is the same as the m-th MPM in the MPM list, then m can be directly used to assign a value to j, i.e., i = m. 2. If IwcpPredMode1 is not equal to IwcpMpm[m], then the value j of iwcp_pred_mode1_index is equal to IwcpPredMode1. <iwcpmpm[0]?iwcppredmode1:iwcppredmode1<iwcpmpm[1]?iwcppredmode1-1:iwcppredmode1<iwcpmpm[2]?iwcppredmode1-2:iwcppredmode1<iwcpmpm[3]?iwcppredmode1-3:iwcppredmode1–4。3. Binarize the value j of iwcp_pred_mode1_index according to Table 3 to determine iwcp_pred_mode1_index in the form of a binary symbol string. Specifically, when binarizing the value j of iwcp_pred_mode1_index according to Table 3, the index value that is the same as j can be determined from the left column of Table 3, and then the binary symbol string iwcp_pred_mode1_index can be determined from the right column of the same row. Furthermore, in the embodiments of this application, since the intra-frame weighted combined prediction mode needs to use the first intra-frame prediction mode and the second intra-frame prediction mode to determine the prediction value of the current block, the first intra-frame prediction mode and the second intra-frame prediction mode can share a preset angle prediction mode set and can also share the same MPM list. However, the first intra-frame prediction mode and the second intra-frame prediction mode are not the same in the intra-frame weighted combined prediction mode. Therefore, when encoding and decoding the second intra-frame prediction mode, the first intra-frame prediction mode can be referenced. Specifically, when determining the second intra-frame prediction mode, the first intra-frame prediction mode can be excluded. Understandably, in this application, for the 28 intra-frame angle prediction modes, since the probability of the four MPMs in the MPM list appearing in the aforementioned 4+8+16 encoding / decoding scheme is very high (the probability of the first intra-frame prediction mode being one of the four MPMs in the MPM list is approximately 50%, and the probability of the second intra-frame prediction mode being one of the four MPMs in the MPM list is approximately 50%), if both the first and second intra-frame prediction modes are MPMs in the MPM list, then when determining the second intra-frame prediction mode, only one of the other three MPMs in the MPM list, excluding the first intra-frame prediction mode, needs to be selected. This reduces the original 4-to-1 selection (requiring four 3-bit codewords) to a 3-to-1 selection (requiring one 2-bit codeword and two 3-bit codewords). Correspondingly, if neither the first nor the second intra-frame prediction mode is an MPM in the MPM list, then the second intra-frame prediction mode can also be removed from the 24 intra-frame angle prediction modes in the 8+16 scheme, but the impact of this is relatively small. Therefore, when both the first intra-frame prediction mode and the second intra-frame prediction mode are MPMs in the MPM list, it is possible to perform deletion processing on the first intra-frame prediction mode before determining the second intra-frame prediction mode, thereby reducing overhead. Optionally, in embodiments of this application, when the encoder determines the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list, if the mode number of the second intra-frame prediction mode is the same as the mode number of the m-th mode in the MPM list, then the value j of the first mode index is assigned according to m; if the mode number of the second intra-frame prediction mode is different from the mode number of any mode in the MPM list, then the value j of the first mode index is determined using the MPM list; and the second mode index is determined based on the first mapping table, the second mapping table between the index value and the binary symbol string, and j. Specifically, in this application, when the encoder determines the second mode index based on the first mapping table, the second mapping table of the index value and the binary symbol string, and j, if i is less than L and less than j, then after subtracting 1 from j, j is binarized according to the second mapping table to determine the second mode index; if j is greater than or equal to L, then j is binarized according to the first mapping table to determine the second mode index. Furthermore, in embodiments of this application, the encoder can determine a second mapping table between index values and binary symbol strings; wherein the second mapping table includes binary symbol strings of first length, second length, third length, and fourth length, respectively. For example, in this application, the first length is 3 bits, the second length is 5 bits, the third length is 6 bits, and the fourth length is 2 bits. It should be noted that, in this application, the second mapping table between index values and binary symbol strings is only used to determine the value of the second pattern index. Optionally, in this application, the second mapping table between index values and binary symbol strings can be as shown in Table 4 above, wherein the first length is 3 bits, the second length is 5 bits, the third length is 6 bits, and the fourth length is 2 bits. It should be noted that, in this application, for the encoding side, when performing binarization according to Table 4, binary symbol strings with binIdx = 0 can be encoded using the context model, while binary symbol strings with binIdx = non-0 can be encoded using the equal probability model or the bypass mode. For example, in this application, if the current block uses the IWCP mode, the length of the MPM list of the current block is 4, i.e., L=4. The 4 modes in the MPM list are arranged in ascending order of mode number. The preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31. The encoder can first determine the first intra-frame prediction mode as IwcpPredMode0 and the second intra-frame prediction mode as IwcpPredMode1. Then, based on the first intra-frame prediction mode IwcpPredMode0 and the second intra-frame prediction mode IwcpPredMode1, it can further determine the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index. After the encoder determines the first intra-prediction mode IwcpPredMode0 used for the intra-weighted combination prediction mode of the current block, the following operations can be performed when determining the first mode index iwcp_pred_mode0_index: 1. If IwcpPredMode0 equals IwcpMpm[m], where m is greater than or equal to 0 and less than 4, then the value i of iwcp_pred_mode0_index is equal to m. In other words, if the intra-frame prediction mode is the same as the m-th MPM in the MPM list, then m can be directly used to assign a value to i, i.e., i = m. 2. If IwcpPredMode0 is not equal to IwcpMpm[m], then the value i of iwcp_pred_mode0_index is equal to IwcpPredMode0. <iwcpmpm[0]?iwcppredmode0:iwcppredmode0<iwcpmpm[1]?iwcppredmode0-1:iwcppredmode0<iwcpmpm[2]?iwcppredmode0-2:iwcppredmode0<iwcpmpm[3]?iwcppredmode0-3:iwcppredmode0–4。3. Binarize the value i of iwcp_pred_mode0_index according to Table 3 to determine iwcp_pred_mode0_index in the form of a binary symbol string. Specifically, when binarizing the value i of iwcp_pred_mode0_index according to Table 3, the index value that is the same as i can be determined from the left column of Table 3, and then the binary symbol string iwcp_pred_mode0_index can be determined from the right column of the same row. Accordingly, if the second intra-prediction mode is determined based on the first intra-prediction mode, then after the encoder determines the second intra-prediction mode IwcpPredMode1 used for the intra-weighted combination prediction mode of the current block, when determining the second mode index iwcp_pred_mode1_index, the following operations can be performed: 1. If IwcpPredMode1 equals IwcpMpm[m], where m is greater than or equal to 0 and less than 4, then the value j of iwcp_pred_mode1_index is equal to m. In other words, if the intra-frame prediction mode is the same as the m-th MPM in the MPM list, then m can be directly used to assign a value to j, i.e., i = m. 2. If IwcpPredMode1 is not equal to IwcpMpm[m], then the value j of iwcp_pred_mode1_index is equal to IwcpPredMode1. <iwcpmpm[0]?iwcppredmode1:iwcppredmode1<iwcpmpm[1]?iwcppredmode1-1:iwcppredmode1<iwcpmpm[2]?iwcppredmode1-2:iwcppredmode1<iwcpmpm[3]?iwcppredmode1-3:iwcppredmode1–4。3. If the value j of iwcp_pred_mode0_index is less than 4, then, a. If iwcp_pred_mode1_index is greater than or equal to iwcp_pred_mode0_index, then iwcp_pred_mode1_index equals iwcp_pred_mode1_index - 1. b. Binarize the value j of iwcp_pred_mode1_index according to Table 4 to determine iwcp_pred_mode1_index in binary symbol string form. 4. If the value j of iwcp_pred_mode0_index is greater than or equal to 4, then the value j of iwcp_pred_mode1_index is binarized according to Table 3 to determine iwcp_pred_mode1_index in the form of a binary symbol string. Therefore, if it is necessary to determine the second intra-frame prediction mode based on the first intra-frame prediction mode, then `iwcp_pred_mode1_index` also depends on `iwcp_pred_mode0_index`. Specifically, taking Table 4 as an example, if both the first and second intra-frame prediction modes are MPMs in the MPM list, then there are only three available MPMs for the second intra-frame prediction mode. This can be represented by one or two bits, such as "00, 01, 10" representing the remaining first, second, and third MPMs, respectively. It is evident that by eliminating one possibility, the encoding / decoding method or the binarization / debinarization method can be changed to save overhead. It should be noted that, in the embodiments of this application, if the preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31, and the length of the MPM list is 4, then when determining the first mapping table between index values and binary symbol strings using binary symbol strings of the first, second, and third lengths, the first length binary symbol string can be used first for the 4 MPMs in the MPM list, i.e., the shortest codeword can be used. Next, 8 intra-frame angle prediction modes are selected from the remaining 24 intra-frame angle prediction modes to use the second length binary symbol string, and 16 intra-frame angle prediction modes are selected to use the third length binary symbol string. Specifically, in this application, for the remaining 24 intra-frame angle prediction modes, the prediction modes corresponding to the first 8 mode numbers can be predicted in ascending order of mode number, using shorter codewords, i.e., using a second-length binary symbol string, and then using longer codewords, i.e., using a third-length binary symbol string, for the prediction modes corresponding to the next 16 mode numbers. For example, in this application, the first mapping relationship table between index values and binary symbol strings shown in Table 3 can be replaced with Table 5. Table 5, which is used to characterize the first mapping relationship between index values and binary symbol strings, can also be used to determine the values of the first pattern index and the second pattern index. Accordingly, the second mapping relationship table between index values and binary symbol strings shown in Table 4 above can also be replaced with Table 6 above. Table 6, which is used to characterize the second mapping relationship between index values and binary symbol strings, can also be used to determine the value of the second pattern index. It is understandable that in this application, if the 28 intra-frame angle prediction modes with mode numbers 4-31 are used, that is, the preset angle prediction mode set includes 28 modes, then the encoding can be done in the form of 4+8+16, that is, the mode with 4 3-bit codewords, the mode with 8 5-bit codewords, and the mode with 16 6-bit codewords. Optionally, in this application, if the preset angle prediction mode set includes 20 modes, then it can be represented by 4 three-bit codewords and 16 five-bit codewords. Optionally, in this application, if the preset angle prediction mode set includes 36 modes, then it can be represented using four 3-bit codewords and 32 6-bit codewords. For example, AVS3 uses 36 intra-frame angle prediction modes with mode numbers 4-31, 42-45, and 56-59. It should be noted that in this application, if all modes in the preset angle prediction mode set are represented using a set of binary symbol strings as shown in Tables 3 and 4, then the "codeword" can be understood as a binary symbol string. The length of the codeword can be understood as the length of the binary symbol string. Another representation method is to use a flag bit plus a binary symbol string. For example, a binary MPM_flag can be used to indicate whether the current mode is MPM mode. That is, if MPM_flag is 1, it means the current mode is MPM mode; if MPM_flag is 0, it means the current mode is not MPM mode. If the current mode is MPM mode, there are a total of 4 possibilities for MPM. A 2-bit binary symbol string is then used to represent which MPM mode the current mode is. Then the codeword can be understood as a flag bit plus a binary symbol string, and the length of the codeword can be understood as the length of the flag bit plus the length of the binary symbol string. Step 204: Write the first mode index and the second mode index into the bitstream. In the embodiments of this application, after the encoder determines the first mode index for indicating the first intra-frame prediction mode and the second mode index for indicating the second intra-frame prediction mode, it can write the first mode index and the second mode index into the bitstream and transmit them to the decoding side, so that the decoder can determine the prediction value of the current block based on the first mode index and the second mode index determined by the decoded bitstream. Furthermore, in the embodiments of this application, the encoder needs to determine the weight matrix of the current block, so that after determining the first intra-frame prediction mode and the second intra-frame prediction mode used by the current block, it further determines the prediction value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode and the weight matrix. It is understood that, in the embodiments of this application, when the encoder determines the predicted value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix, it can first determine the first predicted value of the current block according to the first intra-frame prediction mode; at the same time, it can determine the second predicted value of the current block according to the second intra-frame prediction mode; then, it can use the weight matrix to perform a weighted operation on the first predicted value and the second predicted value, and finally obtain the predicted value of the current block. Furthermore, in the embodiments of this application, after the encoder determines the predicted value of the current block, it can also perform a difference operation on the actual value and the predicted value of the current block to obtain the difference result between the two, thereby determining the prediction difference of the current block, i.e., the residual. In other words, in this application, the encoder can calculate the difference between the true value of the current block and the intra-frame predicted value to obtain the residual, and the residual is transformed, quantized, entropy encoded and written into the bitstream and transmitted to the decoding side. Specifically, in this application, the encoder can determine the weight matrix of the current block based on the weight matrix derivation mode of the current block. It is understood that in this application, the first intra-frame prediction mode and the second intra-frame prediction mode can both be intra-frame angle prediction modes, that is, the embodiments of this application use two different intra-frame angle prediction modes. Then, the first intra-frame prediction mode and the second intra-frame prediction mode are combined to generate the first prediction block and the second prediction block, respectively. Then, based on the first prediction block and the second prediction block, combined with the weight matrix, the prediction block of the current block is determined. Furthermore, in the embodiments of this application, not all points in every possible weight matrix have the same weight. In other words, at least one possible weight matrix contains at least two different weight values. It should be noted that in the embodiments of this application, the encoder can use a method similar to GPM or AWP to determine the weight matrix. Specifically, if GPM or AWP is used in the same codec standard or codec, then this method can be used to determine the weight matrix, thus reusing some of the same logic. For example, AVS3 inter-frame prediction uses AWP, so the AWP method can be used to determine the weight matrix in AVS3. Of course, different methods than GPM or AWP in the same codec standard or codec can also be used, such as using different number of modes, different transition region algorithms, or different parameters, etc. Because inter-frame prediction utilizes temporal correlation, it uses the reconstructed image in the reference frame as the reference block. Intra-frame prediction utilizes spatial correlation, it uses the reconstructed pixels around the current block as reference pixels. The closer the spatial distance, the stronger the correlation; the farther the distance, the weaker the correlation. Therefore, if a certain weight matrix causes the pixel positions used by a prediction block to be far from the reference pixels, then this part may not be able to produce a more suitable prediction value than the existing technology. In this case, such a weight matrix can be omitted, but can be used in inter-frame prediction. This application provides an intra-frame prediction method. The codec can determine two different prediction blocks for the current block through two different intra-frame angle prediction modes. Then, it can be combined through various weight matrices to obtain more complex prediction blocks. While improving the accuracy of intra-frame prediction, it can reduce hardware implementation costs and complexity, realize a simple and efficient encoding and decoding method, and thus improve compression performance. Based on the above embodiments, in another embodiment of this application, after the encoder determines that the current block uses the IWCP mode, it can further determine the intra-prediction mode parameters of the current block; wherein, the intra-prediction mode parameters are used to determine whether the current block uses the IWCP mode; and then the intra-prediction mode parameters can be written into the bitstream. It should be noted that, in the implementation of this application, the intra-frame prediction mode parameter can indicate whether the current block can use the IWCP mode, that is, whether the current block can use two different intra-frame angle prediction modes to determine the prediction value of the current block. It is understood that, in the embodiments of this application, the intra-prediction mode parameter can be understood as a flag indicating whether IWCP mode is used. Specifically, the encoder parses the bitstream and can determine a variable that serves as the intra-prediction mode parameter, thereby determining the intra-prediction mode parameter through the value of this variable. For example, in this application, if the current block uses IWCP mode, the encoder can set the value of the intra-prediction mode parameter to indicate that the current block uses IWCP mode. Specifically, the encoder can set the value of the variable to 1. For example, in this application, if the current block does not use IWCP mode, the encoder can set the value of the intra-prediction mode parameter to indicate that the current block does not use IWCP mode. Specifically, the encoder can set the variable value to 0. Furthermore, in the embodiments of this application, after the encoder completes the setting of the intra-prediction mode parameters, it can write the intra-prediction mode parameters into the bitstream and transmit them to the decoder, so that the decoder can obtain the intra-prediction mode parameters after decoding the bitstream. In other words, in the embodiments of this application, on the encoder side, predictive coding is performed on the current block. During this process, the intra-prediction mode parameters of the current block can be determined, and the corresponding intra-prediction mode parameters are written into the bitstream and transmitted from the encoder to the decoder. It is understood that, in the embodiments of this application, the encoder may determine the prediction mode parameters before performing intra-frame prediction on the current block, and then determine the specific coding mode of the current block through the prediction mode parameters. In the embodiments of this application, when the encoder determines the prediction mode parameters of the current block, it can first use multiple different prediction modes to predict and encode the current block, and then calculate the rate-distortion cost result corresponding to each prediction mode under multiple prediction modes; finally, it can select the minimum rate-distortion cost result from the multiple calculated rate-distortion cost results, and determine the prediction mode corresponding to the minimum rate-distortion cost result as the prediction mode parameters of the current block. In other words, on the encoder side, multiple prediction modes can be used to encode the image components to be predicted for the current block. Furthermore, in the embodiments of this application, after the encoder encodes the current block using multiple prediction modes, it can obtain the rate-distortion cost result corresponding to each prediction mode; then, it selects the minimum rate-distortion cost result from the multiple rate-distortion cost results, and determines the prediction mode corresponding to the minimum rate-distortion cost result as the prediction mode parameter of the current block; in this way, the current block can be encoded using the determined prediction mode, and under this prediction mode, the prediction residual can be small, which can improve the encoding and decoding efficiency. In the embodiments of this application, further, at the encoding end, when the encoder attempts to perform intra-frame prediction for a prediction block, it also attempts to calculate the cost according to the IWCP mode encoding. When attempting to calculate the cost according to the IWCP mode encoding, it tries all or some of the possible costs, and then selects the one with the smallest cost as the cost for IWCP mode encoding. It should be noted that, in the embodiments of this application, all the above possible cases include a combination of the following three variations: the first intra-frame prediction mode of the current block is all possible prediction modes, the second intra-frame prediction mode of the current block is all possible prediction modes, and the weight matrix derivation mode is all possible modes. It is understandable that in this application, the first intra-frame prediction mode and the second intra-frame prediction mode are two completely different intra-frame angle prediction modes. The encoder can limit the intra-frame angle prediction modes that the IWCP mode can use, as well as limit the number of weight matrix derived modes that the IWCP mode can use. In this way, the possible situations will be reduced accordingly, and the complexity of the encoding end will also be reduced accordingly. For example, in this application, assuming there are 66 available intra-frame angle prediction modes in IWCP mode, then there are 66 possible first intra-frame prediction modes. Since the second intra-frame prediction mode is different from the first intra-frame prediction mode, there are 65 possible second intra-frame prediction modes. Assuming there are 56 weight matrix derivation modes (taking AWP as an example), then this application may use any two different intra-frame angle prediction modes and any weight matrix derivation mode, for a total of 66×65×56 possibilities. If the available intra-frame angle prediction modes are restricted, that is, the range of modes in the preset angle prediction mode set is limited, for example, the preset angle prediction mode set is limited to only the 28 intra-frame angle prediction modes with mode numbers 4-31, then there are 28 possibilities for the first intra-frame prediction mode. Since the second intra-frame prediction mode is different from the first intra-frame prediction mode, there are 27 possibilities for the second intra-frame prediction mode. Assuming there are 56 weight matrix derivation modes (taking AWP as an example), then this application may use any two different intra-frame angle prediction modes and any weight matrix derivation mode, for a total of 28×27×56 possibilities. Furthermore, in the embodiments of this application, the encoder can perform rate-distortion optimization (RDO) on all possible IWCP modes to determine the combination with the minimum cost, wherein each combination is a combination including a first intra-frame prediction mode, a second intra-frame prediction mode, and a weight matrix derived mode. Optionally, to reduce the time consumption of RDO, an initial selection can be performed on all possible IWCP modes, such as using SAD and SATD as approximate costs, to determine a set number of candidate combinations of first-frame intra-prediction modes, second-frame intra-prediction modes, and weight matrix derived modes. Then, RDO can be used for fine-tuning to determine the combination of first-frame intra-prediction modes, second-frame intra-prediction modes, and weight matrix derived modes with the lowest cost. This allows for the use of fast algorithms during the initial selection to reduce the number of attempts; for example, if an intra-frame angle prediction mode incurs a high cost, several adjacent intra-frame prediction modes can be avoided. It is understood that in this application, the cost in the aforementioned preliminary and refined selection processes may include the overhead of encoding the first intra-prediction mode, the second intra-prediction mode, and the weight matrix derived mode in the bitstream. Alternatively, the estimated cost of the overhead of the first intra-prediction mode, the second intra-prediction mode, and the weight matrix derived mode in the bitstream can be used during the preliminary selection. For example, the number of bits can be estimated based on whether the first or second intra-prediction mode is an MPM, or based on the order of the intra-prediction modes. In RDO, the cost can be obtained through relatively accurate trial coding. This process requires the method of constructing the MPM list or sorting the intra-prediction modes described in this application. It is understood that in this application, during the initial selection and refinement processes, the first prediction block is determined based on the first intra-frame prediction mode, the second prediction block is determined based on the second intra-frame prediction mode, the weight matrix is derived based on the weight matrix derivation mode, and the prediction block of this application is determined based on the first prediction block, the second prediction block, and the weight matrix. During the initial selection of SAD and SATD, the current block and the prediction block are used to determine SAD and SATD. Furthermore, in the embodiments of this application, the encoder may first analyze the texture of the current block, for example, using gradient analysis. The analyzed data aids in initial selection. For example, if the texture in a certain direction of the current block is stronger, the initial selection will prioritize intra-prediction modes in that approximate direction. Conversely, if the texture in a certain direction of the current block is weaker, the initial selection will prioritize or avoid intra-prediction modes in that approximate direction. It should be noted that, in this application, the cost of encoding according to the IWCP mode includes the cost of the codewords occupied by the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix derivation mode in the bitstream, the cost of various flags and quantization coefficients to be transmitted in the bitstream such as the prediction residual transformation quantization entropy encoding, and the cost of distortion of the reconstruction block, etc. After determining the cost of encoding in IWCP mode, if the cost of encoding in IWCP mode is less than the cost of other prediction modes, where other prediction modes may include other intra-frame prediction modes or inter-frame prediction modes, the encoder will select IWCP mode as the prediction mode for the current block; otherwise, it will select some other prediction mode. Furthermore, in the embodiments of this application, the encoder will try different block divisions and their encoding costs. If a prediction block ultimately selects the IWCP mode, then the flag bits required by the IWCP mode, as well as the information of the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix derivation mode, can be written into the bitstream according to the syntax. At the same time, this prediction block will be predicted and subsequently encoded using the IWCP mode method. This application provides an intra-frame prediction method. The codec can determine two different prediction blocks for the current block through two different intra-frame angle prediction modes. Then, it can be combined through various weight matrices to obtain more complex prediction blocks. While improving the accuracy of intra-frame prediction, it can reduce hardware implementation costs and complexity, realize a simple and efficient encoding and decoding method, and thus improve compression performance. Based on the above embodiments, in another embodiment of this application, FIG10 is a schematic diagram of the composition structure of the encoder proposed in the embodiment of this application. As shown in FIG10, the encoder 300 proposed in the embodiment of this application may include a first determining part 301, a first constructing part 302, and an encoding part 303. The first determining part 301 is configured to determine a first intra-prediction mode and a second intra-prediction mode of the current block when the current block uses the IWCP mode to determine the intra-prediction value of the current block; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes. The first construction section 302 is configured to construct the MPM list of the current block; The first determining portion 301 is further configured to determine the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list; The encoding section 303 is configured to write the first mode index and the second mode index into the bitstream. Figure 11 is a schematic diagram of the composition structure of the encoder proposed in the embodiment of this application. As shown in Figure 11, the encoder 300 proposed in the embodiment of this application may further include a first processor 304, a first memory 305 storing executable instructions of the first processor 304, a first communication interface 306, and a first bus 307 for connecting the first processor 304, the first memory 305 and the first communication interface 306. Further, in an embodiment of this application, the first processor 304 is configured to: determine a first intra-prediction mode and a second intra-prediction mode for the current block when the current block uses the IWCP mode to determine the intra-prediction value of the current block; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes; construct an MPM list for the current block; determine a first mode index and a second mode index for the current block based on the first intra-prediction mode, the second intra-prediction mode, and the MPM list; and write the first mode index and the second mode index into the bitstream. Figure 12 is a schematic diagram of the composition structure of the decoder proposed in an embodiment of this application. As shown in Figure 12, the decoder 400 proposed in this embodiment may include a decoding part 401, a second determining part 402, and a second constructing part 403. The decoding section 401 is configured as a decoding bitstream; The second determining part 402 is configured to determine the intra-prediction mode parameters of the current block; when the intra-prediction mode parameters indicate that the current block uses the IWCP mode to determine the intra-prediction value of the current block, the first mode index and the second mode index of the current block are determined. The second construction section 403 is configured to construct a list of the most likely modes (MPMs) of the current block; The second determining part 402 is further configured to determine a first intra-frame prediction mode and a second intra-frame prediction mode of the current block based on the first mode index, the second mode index, and the MPM list; wherein the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes; determine the weight matrix of the current block, and determine the prediction value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix. Figure 13 is a schematic diagram of the composition structure of the decoder proposed in the embodiment of this application. As shown in Figure 13, the decoder 400 proposed in the embodiment of this application may further include a second processor 404, a second memory 405 storing executable instructions of the second processor 404, a second communication interface 406, and a second bus 407 for connecting the second processor 404, the second memory 405 and the second communication interface 406. Further, in the embodiments of this application, the second processor 404 is configured to decode the bitstream, determine the intra-prediction mode parameters of the current block; when the intra-prediction mode parameters indicate that the current block uses the IWCP mode to determine the intra-prediction value of the current block, determine the first mode index and the second mode index of the current block; construct the most probable mode (MPM) list of the current block; determine the first intra-prediction mode and the second intra-prediction mode of the current block according to the first mode index, the second mode index and the MPM list; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes; determine the weight matrix of the current block, and determine the prediction value of the current block based on the first intra-prediction mode, the second intra-prediction mode and the weight matrix. Furthermore, in this embodiment, the functional modules 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 can be implemented in hardware or as a software functional module. 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. This application provides an encoder and a decoder. The decoder decodes the bitstream and determines the intra-prediction mode parameters of the current block. When the intra-prediction mode parameters indicate that the current block uses the IWCP mode to determine the intra-prediction value of the current block, it determines the first mode index and the second mode index of the current block; it constructs the most probable mode (MPM) list of the current block; it determines the first intra-prediction mode and the second intra-prediction mode of the current block based on the first mode index, the second mode index, and the MPM list; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes; it determines the weight matrix of the current block, and determines the prediction value of the current block based on the first intra-prediction mode, the second intra-prediction mode, and the weight matrix. The encoder, when the current block uses the IWCP mode to determine the intra-prediction value of the current block, determines the first intra-prediction mode and the second intra-prediction mode of the current block; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes; it constructs the MPM list of the current block; it determines the first mode index and the second mode index of the current block based on the first intra-prediction mode, the second intra-prediction mode, and the MPM list; and it writes the first mode index and the second mode index into the bitstream. In other words, in the embodiments of this application, the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then combine them through various weight matrices to finally obtain more complex prediction blocks. On the basis of improving the accuracy of intra-frame prediction, it can reduce the hardware implementation cost, reduce complexity, realize a simple and efficient encoding and decoding method, thereby improving compression performance. This application provides a computer-readable storage medium and a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the methods described in the above embodiments. Specifically, the program instructions corresponding to an intra-frame prediction method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to an intra-frame prediction method in the storage media are read or executed by an electronic device, the following steps are included: Decode the bitstream to determine the intra-prediction mode parameters for the current block; When the intra-prediction mode parameter instructs the current block to use IWCP mode to determine the intra-prediction value of the current block, the first mode index and the second mode index of the current block are determined. Construct a list of the most likely modes (MPMs) for the current block; The first intra-frame prediction mode and the second intra-frame prediction mode of the current block are determined based on the first mode index, the second mode index, and the MPM list; wherein the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes. The weight matrix of the current block is determined, and the predicted value of the current block is determined based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix. It also includes the following steps: When the current block uses the IWCP mode to determine the intra-prediction value of the current block, the first intra-prediction mode and the second intra-prediction mode of the current block are determined; wherein, the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes. Construct the MPM list for the current block; The first mode index and the second mode index of the current block are determined based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list. Write the first mode index and the second mode index into the bitstream. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code. This application is described with reference to schematic and / or block diagrams of implementations of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the schematic and / or block diagrams, and combinations thereof, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the schematic and / or block diagrams. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks in a block diagram. The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Industrial applicability This application provides an intra-frame prediction method, an encoder, a decoder, and a storage medium. The decoder decodes the bitstream and determines the intra-frame prediction mode parameters of the current block. When the intra-frame prediction mode parameters indicate that the current block uses the IWCP mode to determine the intra-frame prediction value of the current block, a first mode index and a second mode index of the current block are determined. A most probable mode (MPM) list of the current block is constructed. A first intra-frame prediction mode and a second intra-frame prediction mode of the current block are determined based on the first mode index, the second mode index, and the MPM list. The first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes. A weight matrix of the current block is determined, and the prediction value of the current block is determined based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix. When the encoder determines the intra-prediction value of the current block using the IWCP mode, it determines the first intra-prediction mode and the second intra-prediction mode of the current block; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes; it constructs the MPM list of the current block; it determines the first mode index and the second mode index of the current block based on the first intra-prediction mode, the second intra-prediction mode, and the MPM list; and it writes the first mode index and the second mode index into the bitstream. In other words, in the embodiments of this application, the codec can determine two different prediction blocks of the current block using two different intra-angle prediction modes, and then combine them using various weight matrices to obtain more complex prediction blocks. This improves the accuracy of intra-prediction while reducing hardware implementation costs and complexity, achieving a simple and efficient encoding / decoding method, thereby improving compression performance.
Claims
1. An intra-frame prediction method applied to a decoder, the method comprising: Decode the bitstream to determine the intra-prediction mode parameters for the current block; When the intra-prediction mode parameter instructs the current block to use the intra-weighted combined prediction (IWCP) mode to determine the intra-prediction value of the current block, the first mode index and the second mode index of the current block are determined. Construct a list of the most likely modes (MPMs) for the current block; The first intra-frame prediction mode and the second intra-frame prediction mode of the current block are determined based on the first mode index, the second mode index, and the MPM list; wherein the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes. The weight matrix of the current block is determined, and the predicted value of the current block is determined based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix.
2. The method according to claim 1, wherein, The method further includes: Determine the weight matrix derivation mode for the current block.
3. The method according to claim 2, wherein, The MPM list used to construct the current block includes: The MPM list is constructed based on the prediction patterns of the neighboring blocks of the current block and the weight matrix derivation pattern.
4. The method according to claim 2, wherein, The MPM list used to construct the current block includes: The MPM list is constructed based on the prediction patterns of the neighboring blocks of the current block, the preset angle prediction pattern set, and the weight matrix derivation pattern.
5. The method according to claim 4, wherein, The MPM list is constructed based on the intra-prediction modes of neighboring blocks of the current block, the preset angle prediction mode set, and the weight matrix derived mode, including: The first candidate pattern is determined using the prediction patterns of the adjacent blocks; The second candidate pattern is determined by deriving the pattern from the weight matrix; The MPM list is constructed based on the first candidate pattern, the second candidate pattern, and the preset angle prediction pattern set.
6. The method according to claim 5, wherein, The step of determining the first candidate pattern using the prediction patterns of the adjacent blocks includes: If the adjacent block is a normal intra-prediction block and the prediction mode of the adjacent block is an intra-prediction mode, then the prediction mode of the adjacent block is determined as the first candidate mode.
7. The method according to claim 5, wherein, The step of determining the second candidate pattern using the weight matrix to derive the pattern includes: Determine the boundary line angle index value based on the weight matrix derivation mode; The second candidate pattern is determined using the boundary line angle index value.
8. The method according to claim 5, wherein, The step of constructing the MPM list based on the first candidate mode, the second candidate mode, and the preset angle prediction mode set includes: The first candidate mode is filtered based on the preset angle prediction mode set to obtain the filtered candidate mode. The MPM list is constructed based on the filtered candidate pattern and the second candidate pattern.
9. The method according to claim 8, wherein, The step of filtering the first candidate modes based on the preset angle prediction mode set to obtain filtered candidate modes includes: If the first candidate pattern belongs to the preset angle prediction pattern set, then the first candidate pattern is determined as the filtered candidate pattern; If the first candidate mode is an intra-frame angle prediction mode and does not belong to the preset angle prediction mode set, then the replacement mode of the first candidate mode is determined in the preset angle prediction mode set, and the replacement mode is determined as the filtered candidate mode.
10. The method according to claim 8, wherein, The method further includes: If the first candidate mode is not an intra-frame angle prediction mode, then the first candidate mode is deleted.
11. The method according to claim 8, wherein, The step of constructing the MPM list based on the filtered candidate pattern and the second candidate pattern includes: If the filtered candidate pattern meets the preset addition conditions, then the filtered candidate pattern is added to the MPM list; If the MPM list does not meet the preset list length L, and the second candidate pattern meets the preset addition condition, then the second candidate pattern is added to the MPM list; where L is an integer greater than or equal to 1.
12. The method according to claim 11, wherein, The method further includes: If the filtered candidate mode is different from the predicted mode in the MPM list, then the filtered candidate mode is determined to meet the preset addition condition. If the second candidate mode is different from all the predicted modes in the MPM list, then the second candidate mode is determined to meet the preset addition condition.
13. The method according to claim 11, wherein, The method further includes: Determine the order parameters corresponding to the adjacent blocks; According to the order parameters, the filtered candidate patterns are added to the MPM list in sequence.
14. The method according to claim 11, wherein, The method further includes: The prediction modes in the MPM list are sorted in ascending order of mode number.
15. The method according to claim 14, wherein, The method further includes: A first mapping table is determined between index values and binary symbol strings; wherein the first mapping table includes binary symbol strings of first length, second length, and third length, respectively.
16. The method according to claim 15, wherein, The method further includes: The prediction patterns in the MPM list use a binary symbol string of the first length. In the preset angle prediction mode set, other prediction modes besides the MPM list use the second length of binary symbol string and the third length of binary symbol string.
17. The method according to claim 16, wherein, Determining the first intra-frame prediction mode and the second intra-frame prediction mode of the current block based on the first mode index, the second mode index, and the MPM list includes: The value i of the first pattern index is determined according to the first mapping table; If i is greater than or equal to 0 and less than L, then the (i+1)th angle prediction mode in the MPM list is determined as the first intra-frame prediction mode. If i is greater than or equal to L, then the first intra-frame prediction mode is determined using the preset angle prediction mode set and the MPM list.
18. The method according to claim 17, wherein, The step of determining the first intra-frame prediction mode using the preset angle prediction mode set and the MPM list includes: If i is greater than or equal to the mode number of the first mode in the MPM list, then sum i and 1. If (i+1) is greater than or equal to the mode number of the second mode in the MPM list, then sum (i+1) and 1. If (i+2) is greater than or equal to the mode number of the third mode in the MPM list, then sum (i+2) and 1. If (i+3) is greater than or equal to the mode number of the fourth mode in the MPM list, then sum (i+3) and 1. (i+4) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set.
19. The method according to claim 18, wherein, The method further includes: If i is less than the mode number of the first mode in the MPM list, then i is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set; or, If (i+1) is less than the mode number of the second mode in the MPM list, then (i+1) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set; or, If (i+2) is less than the mode number of the third mode in the MPM list, then (i+2) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set; or, If (i+3) is less than the mode number of the fourth mode in the MPM list, then (i+3) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set.
20. The method of claim 16, wherein, Determining the first intra-frame prediction mode and the second intra-frame prediction mode of the current block based on the first mode index, the second mode index, and the MPM list includes: The value j of the second pattern index is determined based on the first mapping table; If j is greater than or equal to 0 and less than L, then the (i+1)th angle prediction mode in the MPM list is determined as the first intra-frame prediction mode. If j is greater than or equal to L, then the first intra-frame prediction mode is determined using the preset angle prediction mode set and the MPM list.
21. The method according to claim 20, wherein, The step of determining the second intra-frame prediction mode using the preset angle prediction mode set and the MPM list includes: If j is greater than or equal to the mode number of the first mode in the MPM list, then j and 1 are summed. If (j+1) is greater than or equal to the mode number of the second mode in the MPM list, then sum (j+1) and 1. If (j+2) is greater than or equal to the mode number of the third mode in the MPM list, then sum (j+2) and 1. If (j+3) is greater than or equal to the mode number of the fourth mode in the MPM list, then sum (j+3) and 1. (j+4) is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set.
22. The method according to claim 21, wherein, The method further includes: If j is less than the mode number of the first mode in the MPM list, then j is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set; or, If (j+1) is less than the mode number of the second mode in the MPM list, then (j+1) is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set; or, If (j+2) is less than the mode number of the third mode in the MPM list, then (j+2) is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set; or, If (j+3) is less than the mode number of the fourth mode in the MPM list, then (j+3) is determined as the mode number of the second intra-frame prediction mode, and the second intra-frame prediction mode is determined in the preset angle prediction mode set.
23. The method according to claim 17, wherein, After determining the (i+1)th angle prediction mode in the MPM list as the first intra-frame prediction mode if i is greater than or equal to 0 and less than L, the method further includes: The value j of the second pattern index is determined according to the second mapping table between the index value and the binary symbol string; If j is greater than or equal to i, then increment j by 1; If j is greater than or equal to 0 and less than L, then the (j+1)th angle prediction mode in the MPM list is determined as the second intra-frame prediction mode. If j is greater than or equal to L, then the second intra-frame prediction mode is determined using the preset angle prediction mode set and the MPM list.
24. The method according to claim 2, wherein, The determination of the weight matrix for the current block includes: The weight matrix of the current block is determined based on the weight matrix derivation mode.
25. The method according to claim 24, wherein, Determining the predicted value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix includes: A first prediction value for the current block is determined according to the first intra-frame prediction mode; a second prediction value for the current block is determined according to the second intra-frame prediction mode; The first predicted value and the second predicted value are weighted using the weight matrix to obtain the predicted value of the current block.
26. The method according to claim 11, wherein, The value of L is 4.
27. The method according to claim 11, wherein, The second candidate mode consists of L different intra-frame angle prediction modes.
28. The method according to claim 4, wherein, The preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31.
29. The method according to claim 4, wherein, The first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes in the preset angle prediction mode set.
30. The method according to claim 1, wherein, The method further includes: All prediction modes in the MPM list are intra-frame angle prediction modes.
31. The method according to claim 1, wherein, The method further includes: Determine the size parameters of the current block; Determine whether the current block uses the IWCP mode based on the size parameters.
32. The method according to claim 31, wherein, The dimensional parameters include width and height; the method further includes: If both the width and the height are greater than or equal to the first lower limit, and both the width and the height are less than or equal to the first upper limit, then it is determined that the current block uses the IWCP mode.
33. The method according to claim 1, wherein, The method further includes: Binary strings with a bit flag of 0 are decoded using a context model, while binary strings with a bit flag of non-zero are not decoded using a context model.
34. The method according to claim 1, wherein, The method further includes: If the intra-prediction mode parameter indicates that the current block uses IWCP mode, then the flag information of derived mode DT, intra-prediction filter IPF, and improved intra-prediction IIP is not decoded.
35. The method according to claim 1, wherein, The method further includes: For YUV4:2:0 format, if the current block is an 8×8 luma block, then the current block is determined to use the IWCP mode; if the current block is a 4×4 chroma block, then the current block is determined not to use the IWCP mode.
36. An intra-frame prediction method applied to an encoder, the method comprising: When the current block uses the IWCP mode to determine the intra-prediction value of the current block, the first intra-prediction mode and the second intra-prediction mode of the current block are determined; wherein, the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes. Construct the MPM list for the current block; The first mode index and the second mode index of the current block are determined based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list. Write the first mode index and the second mode index into the bitstream.
37. The method of claim 36, wherein, The method further includes: Determine the weight matrix derivation mode for the current block.
38. The method according to claim 37, wherein, The MPM list used to construct the current block includes: The MPM list is constructed based on the prediction patterns of the neighboring blocks of the current block and the weight matrix derivation pattern.
39. The method according to claim 37, wherein, The MPM list used to construct the current block includes: The MPM list is constructed based on the prediction patterns of the neighboring blocks of the current block, the preset angle prediction pattern set, and the weight matrix derivation pattern.
40. The method according to claim 39, wherein, The MPM list is constructed based on the intra-prediction modes of neighboring blocks of the current block, the preset angle prediction mode set, and the weight matrix derived mode, including: The first candidate pattern is determined using the prediction patterns of the adjacent blocks; The second candidate pattern is determined by deriving the pattern from the weight matrix; The MPM list is constructed based on the first candidate pattern, the second candidate pattern, and the preset angle prediction pattern set.
41. The method according to claim 40, wherein, The step of determining the first candidate pattern using the prediction patterns of the adjacent blocks includes: If the adjacent block is a normal intra-prediction block and the prediction mode of the adjacent block is an intra-prediction mode, then the prediction mode of the adjacent block is determined as the first candidate mode.
42. The method according to claim 40, wherein, The step of determining the second candidate pattern using the weight matrix to derive the pattern includes: Determine the boundary line angle index value based on the weight matrix derivation mode; The second candidate pattern is determined using the boundary line angle index value.
43. The method according to claim 40, wherein, The step of constructing the MPM list based on the first candidate mode, the second candidate mode, and the preset angle prediction mode set includes: The first candidate mode is filtered based on the preset angle prediction mode set to obtain the filtered candidate mode. The MPM list is constructed based on the filtered candidate pattern and the second candidate pattern.
44. The method according to claim 43, wherein, The step of filtering the first candidate modes based on the preset angle prediction mode set to obtain filtered candidate modes includes: If the first candidate pattern belongs to the preset angle prediction pattern set, then the first candidate pattern is determined as the filtered candidate pattern; If the first candidate mode is an intra-frame angle prediction mode and does not belong to the preset angle prediction mode set, then the replacement mode of the first candidate mode is determined in the preset angle prediction mode set, and the replacement mode is determined as the filtered candidate mode.
45. The method according to claim 43, wherein, The method further includes: If the first candidate mode is not an intra-frame angle prediction mode, then the first candidate mode is deleted.
46. The method according to claim 43, wherein, The step of constructing the MPM list based on the filtered candidate pattern and the second candidate pattern includes: If the filtered candidate pattern meets the preset addition conditions, then the filtered candidate pattern is added to the MPM list; If the MPM list does not meet the preset list length L, and the second candidate pattern meets the preset addition condition, then the second candidate pattern is added to the MPM list; where L is an integer greater than or equal to 1.
47. The method according to claim 46, wherein, The method further includes: If the filtered candidate mode is different from the predicted mode in the MPM list, then the filtered candidate mode is determined to meet the preset addition condition. If the second candidate mode is different from all the predicted modes in the MPM list, then the second candidate mode is determined to meet the preset addition condition.
48. The method according to claim 46, wherein, The method further includes: Determine the order parameters corresponding to the adjacent blocks; According to the order parameters, the filtered candidate patterns are added to the MPM list in sequence.
49. The method according to claim 46, wherein, The method further includes: The prediction modes in the MPM list are sorted in ascending order of mode number.
50. The method according to claim 49, wherein, The method further includes: A first mapping table is determined between index values and binary symbol strings; wherein the first mapping table includes binary symbol strings of first length, second length, and third length, respectively.
51. The method according to claim 50, wherein, The method further includes: The prediction patterns in the MPM list use a binary symbol string of the first length. In the preset angle prediction mode set, other prediction modes besides the MPM list use the second length of binary symbol string and the third length of binary symbol string.
52. The method according to claim 51, wherein, Determining the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list includes: If the mode number of the first intra-frame prediction mode is the same as the mode number of the m-th mode in the MPM list, then the value of the first mode index i is assigned according to m; where m is an integer greater than or equal to 0 and less than L. If the mode number of the first intra-frame prediction mode is different from the mode number of any mode in the MPM list, then the value i of the first mode index is determined using the MPM list. The first pattern index is determined based on the first mapping table and i.
53. The method according to claim 52, wherein, Determining the value i of the first pattern index using the MPM list includes: If the mode number of the first intra-frame prediction mode is greater than or equal to the mode number of the fourth mode in the MPM list, then i is assigned a value according to the difference between the mode number of the first intra-frame prediction mode and 4. If the mode number of the first intra-frame prediction mode is less than the mode number of the fourth mode in the MPM list, and greater than or equal to the mode number of the third mode in the MPM list, then i is assigned a value according to the difference between the mode number of the first intra-frame prediction mode and 3. If the mode number of the first intra-frame prediction mode is less than the mode number of the third mode in the MPM list, and greater than or equal to the mode number of the second mode in the MPM list, then i is assigned a value according to the difference between the mode number of the first intra-frame prediction mode and 2. If the mode number of the first intra-frame prediction mode is less than the mode number of the second mode in the MPM list, and greater than or equal to the mode number of the first mode in the MPM list, then i is assigned a value according to the difference between the mode number of the first intra-frame prediction mode and 1. If the mode number of the first intra-frame prediction mode is less than the mode number of the first mode in the MPM list, then i is assigned a value according to the mode number of the first intra-frame prediction mode.
54. The method according to claim 52, wherein, Determining the first pattern index based on the first mapping table and i includes: The first pattern index is determined by binarizing i according to the first mapping table.
55. The method according to claim 51, wherein, Determining the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list includes: If the mode number of the second intra-frame prediction mode is the same as the mode number of the m-th mode in the MPM list, then the value j of the second mode index is assigned according to m; where m is an integer greater than or equal to 0 and less than L; If the mode number of the second intra-frame prediction mode is different from the mode number of any mode in the MPM list, then the value j of the second mode index is determined using the MPM list. The second pattern index is determined based on the first mapping table and j.
56. The method according to claim 55, wherein, Determining the value j of the second mode index using the MPM list includes: If the mode number of the second intra-frame prediction mode is greater than or equal to the mode number of the fourth mode in the MPM list, then j is assigned a value according to the difference between the mode number of the second intra-frame prediction mode and 4. If the mode number of the second intra-frame prediction mode is less than the mode number of the fourth mode in the MPM list, and greater than or equal to the mode number of the third mode in the MPM list, then j is assigned a value according to the difference between the mode number of the second intra-frame prediction mode and 3. If the mode number of the second intra-frame prediction mode is less than the mode number of the third mode in the MPM list, and greater than or equal to the mode number of the second mode in the MPM list, then j is assigned a value according to the difference between the mode number of the second intra-frame prediction mode and 2. If the mode number of the second intra-frame prediction mode is less than the mode number of the second mode in the MPM list, and greater than or equal to the mode number of the first mode in the MPM list, then j is assigned a value according to the difference between the mode number of the second intra-frame prediction mode and 1. If the mode number of the second intra-frame prediction mode is less than the mode number of the first mode in the MPM list, then j is assigned a value according to the mode number of the second intra-frame prediction mode.
57. The method of claim 55, wherein, The step of determining the second pattern index based on the first mapping table and j includes: Binarize j according to the first mapping table to determine the second pattern index.
58. The method according to claim 52, wherein, Determining the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list includes: If the mode number of the second intra-frame prediction mode is the same as the mode number of the m-th mode in the MPM list, then the value j of the second mode index is assigned according to m; where m is an integer greater than or equal to 0 and less than L; If the mode number of the second intra-frame prediction mode is different from the mode number of any mode in the MPM list, then the value j of the second mode index is determined using the MPM list. The second pattern index is determined based on the first mapping table, the second mapping table of index value and binary symbol string, and j.
59. The method according to claim 58, wherein, The step of determining the second pattern index based on the first mapping table, the second mapping table of index values and binary symbol strings, and j includes: If i is less than L and less than j, then after subtracting 1 from j, j is binarized according to the second mapping table to determine the second pattern index. If j is greater than or equal to L, then j is binarized according to the first mapping table to determine the second pattern index.
60. The method according to claim 37, wherein, The determination of the weight matrix for the current block includes: The weight matrix of the current block is determined based on the weight matrix derivation mode.
61. The method according to claim 60, wherein, The method further includes: A first prediction value for the current block is determined according to the first intra-frame prediction mode; a second prediction value for the current block is determined according to the second intra-frame prediction mode; The first predicted value and the second predicted value are weighted using the weight matrix to obtain the predicted value of the current block.
62. The method according to claim 46, wherein, The value of L is 4.
63. The method according to claim 46, wherein, The second candidate mode consists of L different intra-frame angle prediction modes.
64. The method according to claim 39, wherein, The preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31.
65. The method according to claim 39, wherein, The first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes in the preset angle prediction mode set.
66. The method of claim 36, wherein, The method further includes: All prediction modes in the MPM list are intra-frame angle prediction modes.
67. The method of claim 36, wherein, The method further includes: Determine the size parameters of the current block; Determine whether the current block uses the IWCP mode based on the size parameters.
68. The method according to claim 67, wherein, The dimensional parameters include width and height; the method further includes: If both the width and the height are greater than or equal to the first lower limit, and both the width and the height are less than or equal to the first upper limit, then it is determined that the current block uses the IWCP mode.
69. The method according to claim 36, wherein, The method further includes: Determine the intra-prediction mode parameters of the current block; wherein, the intra-prediction mode parameters are used to determine whether the current block uses the IWCP mode; The town prediction mode parameters are written into the bitstream.
70. The method of claim 36, wherein, The method further includes: Binary symbol strings with a bit flag of 0 are encoded using a context model, while binary symbol strings with a bit flag of non-zero are not encoded using a context model.
71. The method according to claim 36, wherein, The method further includes: For YUV4:2:0 format, if the current block is an 8×8 luma block, then the current block is determined to use the IWCP mode; if the current block is a 4×4 chroma block, then the current block is determined not to use the IWCP mode.
72. An encoder, the encoder comprising: First determination part, first construction part, coding part The first determining part is configured to determine a first intra-prediction mode and a second intra-prediction mode of the current block when the current block uses the IWCP mode to determine the intra-prediction value of the current block; wherein the first intra-prediction mode and the second intra-prediction mode are two different intra-angle prediction modes. The first construction section is configured to construct the MPM list of the current block; The first determining part is further configured to determine the first mode index and the second mode index of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the MPM list; The encoding portion is configured to write the first mode index and the second mode index into the bitstream.
73. An encoder, the decoder comprising a first processor and a first memory storing instructions executable by the first processor, wherein when the instructions are executed, the first processor executes the method as described in any one of claims 1-35.
74. A decoder, the decoder comprising: Decoding part, second determination part, second construction part. The decoding section is configured as a decoding bitstream; The second determining part is configured to determine the intra-prediction mode parameters of the current block; when the intra-prediction mode parameters indicate that the current block uses the IWCP mode to determine the intra-prediction value of the current block, the first mode index and the second mode index of the current block are determined. The second construction part is configured to construct a list of the most likely modes (MPMs) for the current block; The second determining part is further configured to determine a first intra-frame prediction mode and a second intra-frame prediction mode of the current block based on the first mode index, the second mode index, and the MPM list; wherein the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes; determine the weight matrix of the current block, and determine the prediction value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix.
75. A decoder, the encoder including a second processor and a second memory storing instructions executable by the second processor, wherein when the instructions are executed, the second processor executes the method as described in any one of claims 36-71.
76. A computer storage medium, wherein, The computer storage medium stores a computer program that, when executed by a first processor, implements the method as described in any one of claims 1-35, or, when executed by a second processor, implements the method as described in any one of claims 36-71.