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

CN118975249APending Publication Date: 2024-11-15GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202280094581.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-04-13
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing video coding standard H.266/VVC lacks a coding mode adapted to non-angle prediction, resulting in reduced coding efficiency.

Method used

By introducing the first type of intra prediction mode parameters into the video encoding and decoding method, the prediction value and transformation parameters of the current block are determined, and then the transformation kernel or transformation matrix is ​​flexibly selected to improve the applicability and coding efficiency of non-traditional intra prediction modes.

Benefits of technology

It improves the applicability and coding efficiency of non-traditional intra prediction modes, and improves video image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118975249A_ABST
    Figure CN118975249A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a video encoding and decoding method, an encoder, a decoder and a storage medium. The method comprises the following steps: determining a first type of intra-frame prediction mode parameters; determining a first prediction value of the current block according to the first type of intra-frame prediction mode parameters, and calculating a residual value between an original value of the current block and the first prediction value; determining a first transformation parameter of the current block according to the first predicted value of the current block or the first type of intra-frame prediction mode parameter; determining a second transformation parameter for transforming the current block based on the first transformation parameter; and based on the second transformation parameter, carrying out transformation processing on the residual value to obtain a transformation coefficient of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding and decoding methods, encoders, decoders, and storage media Technical Field This application relates to the field of image processing technology, and in particular to a video encoding / decoding method, encoder, decoder, and storage medium. Background Technology As people's demands for video display quality increase, new video application forms such as high-definition and ultra-high-definition video have emerged. The Joint Video Exploration Team (JVET) of the international standards organizations ISO / IEC and ITU-T developed the video coding standard H.266 / Versatile Video Coding (VVC). H.266 / VVC includes transform techniques associated with the coding mode of the coding block. However, these transform techniques do not adapt to non-angle prediction coding modes, reducing coding efficiency. Summary of the Invention This application provides a video encoding / decoding method, encoder, decoder, and storage medium, which can improve the applicability to non-traditional intra-frame prediction modes, make the selection of transform kernel more flexible, and thus improve encoding / decoding efficiency. The technical solution of this application embodiment can be implemented as follows: In a first aspect, embodiments of this application provide a video decoding method applied to a decoder, the method comprising: Decode the bitstream and determine the first type of intra-frame prediction mode parameters for the current block; The first prediction value of the current block is determined based on the first type of intra-frame prediction mode parameters; The first transform parameter of the current block is determined based on the first predicted value of the current block or the first type of intra-frame prediction mode parameter; Based on the first transformation parameters, determine the second transformation parameters for transforming the current block; Based on the second transformation parameters, the transformation coefficients of the current block are transformed to determine the residual value of the current block; Based on the residual value and the first predicted value, the reconstruction value of the current block is determined. Secondly, embodiments of this application provide a video encoding method applied to an encoder, the method comprising: Determine the parameters of the first type of intra-frame prediction mode; Based on the first type of intra-frame prediction mode parameters, determine the first predicted value of the current block, and calculate the residual value between the original value of the current block and the first predicted value; The first transform parameter of the current block is determined based on the first predicted value of the current block or the first type of intra-frame prediction mode parameter; Based on the first transformation parameters, determine the second transformation parameters for transforming the current block; Based on the second transformation parameters, the residual value is transformed to obtain the transformation coefficients of the current block. Thirdly, embodiments of this application provide a decoder, including: The decoding section is configured to decode the bitstream and determine the first type of intra-prediction mode parameters for the current block; The first prediction part is configured to determine the first prediction value of the current block based on the first type of intra-frame prediction mode parameters; The first determining part is configured to determine a first transformation parameter of the current block based on a first prediction value of the current block or a first type of intra-frame prediction mode parameter; and to determine a second transformation parameter for transforming the current block based on the first transformation parameter. The first transformation part is configured to transform the transformation coefficients of the current block based on the second transformation parameters to determine the residual value of the current block; The reconstruction portion is configured to determine the reconstruction value of the current block based on the residual value and the first predicted value. Fourthly, embodiments of this application provide an encoder, which includes: The second determining part is configured to determine the parameters of the first type of intra-frame prediction mode; The second prediction part is configured to determine the first prediction value of the current block based on the first type of intra-frame prediction mode parameters; The second determining portion is further configured to: calculate the residual value between the original value of the current block and the first predicted value; determine the first transformation parameter of the current block based on the first predicted value of the current block or the first type of intra-frame prediction mode parameter; and determine the second transformation parameter for transforming the current block based on the first transformation parameter. The second transformation part is configured to transform the residual value based on the second transformation parameters to obtain the transformation coefficients of the current block. Fifthly, embodiments of this application provide a decoder, including: The first memory is configured to store computer programs running on the first processor; The first processor is configured to execute the method described in the first aspect when running the computer program. Sixthly, embodiments of this application provide an encoder, the encoder comprising: The second memory is configured to store computer programs running on the second processor; The second processor is configured to execute the method described in the second aspect when running the computer program. In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a first processor, implements the method described in the second aspect, or when executed by a second processor, implements the method described in the first aspect. This application provides a video encoding / decoding method, encoder, decoder, and storage medium. The method involves determining a first predicted value for the current block based on parameters of a first type of intra-frame prediction mode; determining a first transform parameter for the current block based on the first predicted value or the first type of intra-frame prediction mode parameters; determining a second transform parameter for transforming the current block based on the first transform parameter; performing transform processing on the transform coefficients of the current block based on the second transform parameter to determine the residual value of the current block; and determining the reconstructed value of the current block based on the residual value and the first predicted value. Thus, for a current block using a first type of intra-frame prediction mode (e.g., MIP), the introduction of the first predicted value or the first type of intra-frame prediction mode parameters during LFNST transform makes the selection of the transform kernel or transform matrix (corresponding to the second transform parameter) more flexible. This not only improves the applicability of non-traditional intra-frame prediction modes (first type of intra-frame prediction modes) but also improves decoding efficiency and enhances video image quality. Attached Figure Description Figure 1 is a schematic diagram of the application location of an LFNST technology provided by the relevant technical solution; Figure 2A is a block diagram of a video encoding system provided in an embodiment of this application; Figure 2B is a block diagram of a video decoding system provided in an embodiment of this application; Figure 3 is a flowchart illustrating a video decoding method provided in an embodiment of this application; Figure 4 is a flowchart of a MIP prediction process provided in an embodiment of this application; Figure 5 is a schematic diagram of the calculation process of matrix multiplication using LFNST technology provided in an embodiment of this application; Figure 6A is a structural block diagram of an LFNST transform provided by a related technical solution; Figure 6B is a structural block diagram of another LFNST transformation provided by the relevant technical solution; Figure 6C is a structural block diagram of another LFNST transform provided by the relevant technical solution; Figure 6D is a structural block diagram of another LFNST transformation provided by the relevant technical solution; Figure 7 is a flowchart of a specific LFNST process provided in an embodiment of this application; Figure 8 is a flowchart illustrating another video encoding method provided in an embodiment of this application; Figure 9 is a schematic diagram of the composition structure of a decoder provided in an embodiment of this application; Figure 10 is a schematic diagram of the specific hardware structure of a decoder provided in an embodiment of this application; Figure 11 is a schematic diagram of the composition structure of an encoder provided in an embodiment of this application; Figure 12 is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of this application. Detailed Implementation In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application. In video images, a coding block (CB) is typically represented by a first image component, a second image component, and a third image component; these three image components are a luminance component, a blue chrominance component, and a red chrominance component, respectively. For example, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; thus, the video image can be represented in YCbCr format or YUV format. In addition, the video image can also be in RGB format, YcgCo format, etc., and this application embodiment does not impose any limitations. In the embodiments of this application, the first image component can be a luminance component, the second image component can be a blue chroma component, and the third image component can be a red chroma component, but the embodiments of this application do not impose specific limitations. The embodiments of this application can be applied to scenarios of low-frequency indivisible quadratic transformation or extended low-frequency indivisible quadratic transformation, or other scenarios that require transformation techniques associated with the coding mode of the coding block. The embodiments of this application are not limited. The following will describe the relevant technical solutions for LFNST technology. Referring to Figure 1, it shows a schematic diagram of the application location of an LFNST technology provided by a related technical solution. As shown in Figure 1, in the intra-frame prediction mode, for the encoder side, LFNST technology is applied between the positive first-order transform unit 11 and the quantization unit 12, and LFNST technology is applied between the inverse quantization unit 13 and the inverse first-order transform unit 14. On the encoder side, the data, such as the prediction residual (which can be represented as residual), is first transformed by the positive first-order transform unit 11 (which can be called "Core Transform", "first-order transform" or "main transform") to obtain the transform coefficient matrix after the first transformation (i.e., the second transform coefficient). Then, the coefficients in the transform coefficient matrix are subjected to LFNST transformation (which can be called "Secondary Transform") to obtain the LFNST transform coefficient matrix (i.e., the first transform coefficient). Finally, the LFNST transform coefficient matrix is ​​quantized by the quantization unit 12, and the final quantized coefficients are written into the video bitstream. On the decoder side, the quantization coefficients of the LFNST transform coefficient matrix can be obtained by parsing the bitstream. The inverse quantization unit 13 performs inverse quantization on these coefficients (which can be called "scaling") to obtain the recovered values ​​of the LFNST transform coefficient matrix (i.e., the first transform coefficients). Performing an inverse LFNST transform on these recovered values ​​yields the second transform coefficients. Then, the inverse first transform unit 14 performs an inverse transform on the second transform coefficients corresponding to the encoder-side "Core Transform," ultimately obtaining the residual recovered values. It is important to note that the standard only defines the "inverse transform" operation on the decoder side; therefore, the "inverse LFNST transform" is also referred to as the "LFNST transform" in the standard. Here, to distinguish it from the encoder-side transform, the encoder-side "LFNST transform" can be called the "forward LFNST transform," and the decoder-side "LFNST transform" can be called the "inverse LFNST transform." In other words, on the encoder side, the prediction residual of the current transform block is transformed into first-order transform coefficients, i.e., second-order transform coefficients, through positive first-order transform. Then, some of the first-order transform coefficients are multiplied by matrix multiplication and multiplied by the transform matrix to perform a second-order transform, resulting in fewer and more concentrated second-order transform coefficients (i.e., first-order transform coefficients). These are then quantized to obtain quantized coefficients. On the decoder side, after parsing the quantized coefficients, they are dequantized. The dequantized first-order transform coefficients are then multiplied by matrix multiplication to perform an inverse second-order transform, and then the inverse second-order transform coefficients are performed an inverse first-order transform to recover the prediction residual. In LFNST-related technologies, the LFNST transform process can include steps such as configuring core parameters, intra-prediction mode mapping, selecting the transform matrix, calculating matrix multiplication, and constructing the inverse first-order transform coefficient matrix. After these steps, the LFNST transform is complete. However, in the step of selecting the transform matrix (i.e., the transform kernel), the transform set must first be selected. Since the transform matrix is ​​related to the directional characteristics of the prediction mode, the transform set is currently selected based on the intra-prediction mode. Specifically, for traditional intra-prediction modes, the value of the intra-prediction mode indicator (which can be represented by `predModeIntra`) can be determined based on the traditional intra-prediction mode number; that is, the value of the first transform parameter. Then, the transform set index number is determined based on the value of predModeIntra. However, for non-traditional frame prediction modes, especially matrix-based intra-prediction (MIP) mode, the value of predModeIntra is directly set to the intra-prediction mode index number corresponding to the PLANAR mode (i.e., 0). This causes the current block in MIP mode to be able to select the transform set with transform set index number 0. This makes the current block lack variability when performing LFNST transform in MIP mode, which makes LFNST technology not well applicable to MIP mode and also reduces coding efficiency. This application provides a video decoding method applied to a decoder. The method involves determining a first predicted value for the current block based on parameters of a first type of intra-frame prediction mode; determining a first transform parameter for the current block based on the first predicted value or the first type of intra-frame prediction mode parameters; determining a second transform parameter for transforming the current block based on the first transform parameter; performing transform processing on the transform coefficients of the current block based on the second transform parameter to determine the residual value of the current block; and determining the reconstructed value of the current block based on the residual value and the first predicted value. Thus, for a current block using a first type of intra-frame prediction mode (e.g., MIP), the introduction of the first predicted value or the first type of intra-frame prediction mode parameters during the LFNST transform makes the selection of the transform kernel or transform matrix (corresponding to the second transform parameter) more flexible. This not only improves the applicability of non-traditional intra-frame prediction modes (first type of intra-frame prediction modes) but also improves decoding efficiency and enhances video image quality. This application provides a video coding method applied to an encoder. The method involves: determining first-type intra-prediction mode parameters; determining a first predicted value for the current block based on the first-type intra-prediction mode parameters, and calculating the residual value between the original value and the first predicted value of the current block; determining a first transform parameter for the current block based on the first predicted value or the first-type intra-prediction mode parameters; determining a second transform parameter for transforming the current block based on the first transform parameter; and transforming the residual value based on the second transform parameter to obtain the transform coefficients of the current block. Thus, for a current block using a first-type intra-prediction mode (e.g., MIP), the introduction of the first predicted value or the first-type intra-prediction mode parameters during the LFNST transform makes the selection of the transform kernel or transform matrix (corresponding to the second transform parameter) more flexible. This not only improves the applicability of non-traditional intra-prediction modes (first-type intra-prediction modes) but also improves coding efficiency and video image quality. The system framework used in the various embodiments of this application will now be described in detail with reference to the accompanying drawings. Referring to Figure 2A, which shows an example of a block diagram of a video coding system provided in this application embodiment; as shown in Figure 2A, 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 2B, which shows an example of a block diagram of a video decoding system provided in an embodiment of this application; as shown in Figure 2B, 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 undergoes the encoding process shown in Figure 2A, the output video signal bitstream is generated. This bitstream is input into the video decoding system 20, first passing through the decoding unit 201 to obtain the decoded transform coefficients. These transform coefficients are then 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 generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from previously decoded blocks in 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... 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 video encoding method in this embodiment can be applied to the transform and quantization unit 101 shown in FIG2A. The transform and quantization unit 101 includes the positive first-order transform unit 11 and the quantization unit 12 shown in FIG1. ​​In this case, the video encoding method is applied after the transform and before the quantization. Additionally, the video decoding method in this embodiment can also be applied to the inverse transform and inverse quantization unit 202 shown in FIG2B. The inverse transform and inverse quantization unit 202 may include the inverse quantization unit 13 and the inverse first-order transform unit 14 shown in FIG1. ​​In this case, the video decoding method is applied after inverse quantization and before inverse transform. That is, the video encoding method in this embodiment is applied to a video encoding system, and the video decoding method in this embodiment is applied to a video decoding system. It can even be applied to both a video encoding system and a video decoding system simultaneously, but this embodiment does not limit this. It should also be noted that when the video encoding method is applied to a video encoding system, the "current block" (i.e., transform block) can be the current encoded block in intra-frame prediction; when the video decoding method is applied to a video decoding system, the "current block" (i.e., transform block) can be the current decoded block in intra-frame prediction. Based on the application scenario example in Figure 2B above, and referring to Figure 3, which shows a flowchart of a video decoding method provided in this application embodiment, applied to a decoder. As shown in Figure 3, the method may include: S101. Decode the bitstream and determine the first type of intra-frame prediction mode parameters for the current block. In this embodiment, during the decoding process, the decoder first obtains the prediction mode parameters of the current block when decoding the bitstream. The prediction mode parameters indicate the encoding mode of the current block and the parameters related to that mode. The prediction modes typically include traditional intra-frame prediction modes and non-traditional intra-frame prediction modes. Traditional intra-frame prediction modes may include DC mode, Planar mode, and Angle prediction mode, etc., while non-traditional intra-frame prediction modes (first type of intra-frame prediction modes) may include MIP mode, CCLM mode, IBC mode, and PLT mode, etc. It should be noted that, in the embodiments of this application, the second type of intra-frame prediction mode represents the traditional intra-frame prediction mode, and the first type of intra-frame prediction mode represents the non-traditional intra-frame prediction mode. The first type of intra-frame prediction mode can be understood as a non-angle prediction mode. When the decoder is decoding, if the decoded prediction mode parameters do not represent the first type of intra-prediction mode, it determines the first type of intra-prediction mode parameters of the current block in the bitstream. In the embodiments of this application, when the encoder encodes the current block, the encoder performs predictive encoding on the current block. During this process, the prediction mode of the current block can be determined, and the corresponding prediction mode parameters are written into the bit stream and transmitted by the encoder to the decoder. It should be noted that the encoder can use rate distortion optimization (RDO) to determine the prediction mode parameters of the current block. In this embodiment, the decoding of the current block is also performed on different color components. An image component indicator (which can be represented by cIdx) is used to indicate the luminance component or chrominance component of the current block. For example, if the current block predicts the luma component, then cIdx equals 0; if the current block predicts the chroma component, then cIdx equals 1. Additionally, (xTbY, yTbY) are the coordinates of the top-left sampling point of the current block, IntraPredModeY[xTbY][yTbY] is the intra-prediction mode for the luma component, and IntraPredModeC[xTbY][yTbY] is the intra-prediction mode for the chroma component. After learning the prediction mode, the decoder can determine the first type of intra-prediction mode parameters for the current block. The first type of intra-prediction mode parameters are the parameters corresponding to the first type of intra-prediction mode. For example, when the first type of intra-prediction mode is MIP mode, the parameters corresponding to the first type of intra-prediction mode are MIP parameters. The first type of intra-prediction mode parameters may include: the first type of intra-prediction mode index (which can be represented by modeId), the size of the current block, and the class of the current block (which can be represented by mipSizeId); the values ​​of these parameters can be obtained from the decoded bitstream. Among them, the MIP parameters may include the MIP transpose indicator parameter (which can be represented by isTransposed), the MIP mode index number (which can be represented by modeId), the size of the current block, and the class of the current block (which can be represented by mipSizeId). In one implementation, determining the category of the current block based on its size may include: If the width and height of the current block are both equal to 4, then the value of mipSizeId can be set to 0; Conversely, if either the width or height of the current block is 4, or if both the width and height of the current block are 8, then the value of mipSizeId can be set to 1. Conversely, if the current block is of a different size, then the value of mipSizeId can be set to 2. In another implementation, determining the category of the current block based on its size may include: If the width and height of the current block are both equal to 4, then the value of mipSizeId can be set to 0; Conversely, if either the width or height of the current block is 4, then the value of mipSizeId can be set to 1; Conversely, if the current block is of a different size, then the value of mipSizeId can be set to 2. In this way, during the process of using MIP to determine the intra-prediction value, the MIP parameters can also be determined, which makes it easier to determine the LFNST transform kernel (which can be represented as kernel) used in the current block based on the determined MIP parameters. The following explanation uses the MIP parameter as an example. In some embodiments, the value of isTransposed can be determined by decoding the bitstream. When the value of isTransposed is equal to 1, the sampling point input vector used in MIP mode needs to be transposed. When the value of isTransposed is equal to 0, the sampling point input vector used in MIP mode does not need to be transposed. In other words, the MIP transpose indicator parameter can be used to indicate whether the sampling point input vector used in MIP mode needs to be transposed. In some embodiments, the MIP mode index number (which can be represented by modeId) can also be determined by decoding the bitstream. The MIP mode index number can indicate the MIP mode used by the current block, and the MIP mode can indicate the calculation derivation method for determining the intra-prediction value of the current block using MIP. That is, since there can be many different MIP modes, these modes can be distinguished by their MIP mode index numbers; different MIP modes have different MIP mode index numbers. Thus, based on the calculation derivation method for determining the intra-prediction value of the current block using MIP, the specific MIP mode can be determined, and the corresponding MIP mode index number can be obtained. In this embodiment, the MIP mode index number can be 0, 1, 2, 3, 4, or 5. In some embodiments, by decoding the bitstream, parameters such as the size, aspect ratio, and type of the current block (which can be represented by mipSizeId) can also be determined. This allows for the subsequent selection of the transform kernel (which can be represented by a kernel, such as the LFNST transform kernel) or scan order parameters for the current block based on the determined MIP parameters, or the determination of the first prediction value for the current block based on the determined MIP parameters, and the selection of the transform kernel or scan order parameters based on the first prediction value. S102. Determine the first prediction value of the current block based on the parameters of the first type of intra-frame prediction mode. In this embodiment of the application, the decoder can perform intra-frame prediction using the first type of intra-frame prediction mode parameters, thereby determining the first prediction value of the current block. The explanation will be based on the example of the first type of intra-frame prediction mode using MIP parameters. In this embodiment of the application, for the MIP mode, the input data for MIP prediction includes: the position of the current block (xTbCmp, yTbCmp), the MIP prediction mode applied to the current block (which can be represented by modeId), the height of the current block (represented by nTbH), the width of the current block (represented by nTbW), and a transpose processing indicator flag indicating whether transpose is required (which can be represented by isTransposed), etc.; the output data for MIP prediction includes: the prediction block of the current block, wherein the intra-frame prediction value corresponding to the pixel coordinates [x][y] in the prediction block is predSamples[x][y]; where x = 0, 1, ..., nTbW-1; y = 0, 1, ..., nTbH-1. In some embodiments of this application, as shown in Figure 4, the MIP prediction process can be divided into four steps: configuring core parameters 41, acquiring reference pixels 42, constructing input samples 43, and generating prediction values ​​44. Specifically, for configuring core parameters 41, the current block can be divided into three categories based on its size within the frame, with mipSizeId recording the type of the current block; moreover, the number of reference sampling points and the number of matrix multiplication output sampling points are different for different types of current blocks. For acquiring reference pixels 42, when predicting the current block, the upper and left blocks of the current block are already encoded. The reference pixels in MIP technology are the reconstructed values ​​of the pixels in the previous row and the left column of the current block. The process of acquiring the reference pixels adjacent to the upper side (denoted by refT) and the reference pixels adjacent to the left side (denoted by refL) of the current block is the process of acquiring reference pixels. For constructing input samples 43, this step is used for the input of matrix multiplication and mainly includes: obtaining reference samples 431, constructing a reference sampling buffer 432, and deriving matrix multiplication input samples 433. The process of obtaining reference samples is a downsampling process, and constructing the reference sampling buffer 432 can include buffer filling methods 4321 when transposition is not needed and buffer filling methods 4322 when transposition is needed. For generating predicted values ​​44, this step is used to obtain the MIP predicted value of the current block and mainly includes: constructing a matrix multiplication output sampling block 441, matrix multiplication output sampling embedding 442, matrix multiplication output sampling transposition 443, and generating the final MIP predicted value 444. The process of constructing the matrix multiplication output sampling block 441 can include obtaining the weight matrix 4411, obtaining the shift factor and offset factor 4412, and performing matrix multiplication operations 4413. The process of generating the final MIP predicted value 444 can include generating predicted values ​​that do not require upsampling 4441 and generating predicted values ​​that require upsampling 4442. After these four steps, the intra-frame prediction value of the current block can be obtained. In this way, after determining the intra-frame prediction value of the current block, the difference between the actual pixel value of the current block and the intra-frame prediction value can be calculated, and the calculated difference can be used as the prediction difference, which is convenient for subsequent transformation processing of the prediction difference. It should be noted that the MIP parameters also need to be determined during the MIP prediction process. In some embodiments, the MIP parameter may include a MIP transpose indicator parameter (which can be represented by isTransposed); here, the value of the MIP transpose indicator parameter is used to indicate whether the sampling point input vector used in the MIP mode is transposed. In MIP mode, an adjacent reference sample set can be obtained based on the reference sample values ​​corresponding to the reference pixels on the left and top edges of the current block. After obtaining this adjacent reference sample set, an input reference sample set can be constructed, which is the sampling point input vector used in MIP mode. However, the construction of the input reference sample set differs between the encoder and decoder sides, mainly due to the value of the MIP transpose indicator parameter. During encoding, the MIP transpose indicator parameter is calculated and determined by the encoder; during decoding, the decoder can decode the MIP transpose indicator parameter from the bitstream. It should be noted that the decoder decodes the MIP transpose indicator parameter. When the MIP transpose indicator parameter is 0, the reference sample value corresponding to the upper edge of the adjacent reference sample set can be stored before the reference sample value corresponding to the left edge in the buffer. In this case, no transpose processing is required, that is, the sampling point input vector used in MIP mode does not need to be transposed, and the buffer can be directly determined as the input reference sample set. When the MIP transpose indicator parameter is 1, the reference sample value corresponding to the upper edge of the adjacent reference sample set can be stored after the reference sample value corresponding to the left edge in the buffer. In this case, the buffer needs to be transposed, that is, the sampling point input vector used in MIP mode needs to be transposed, and then the transposed buffer is determined as the input reference sample set. In this way, after obtaining the input reference sample set, it can be used in the process of determining the intra-prediction value corresponding to the current block in MIP mode. S103. Determine the first transform parameter of the current block based on the first predicted value or the first type of intra-frame prediction mode parameter of the current block. In this embodiment, the decoder can determine the first transform parameter of the current block based on the first predicted value of the current block. Alternatively, the decoder can determine the first transform parameter of the current block based on the first type of intra-frame prediction mode parameter of the current block; this embodiment does not impose any limitations. In some embodiments of this application, the implementation of determining the first transform parameter of the current block based on the first prediction value of the current block by the decoder may include: S1. Based on the first prediction value of the current block, determine the first index of the second type of intra-frame prediction mode of the current block; S2. Determine the first transform parameters of the current block based on the first index of the second type of intra-prediction mode of the current block. In this embodiment, the decoder can determine the first index of a second type of intra-frame prediction mode using the first prediction value of the current block. The second type of intra-frame prediction mode includes at least one of the following: planar mode, DC mode, and intra-frame angle prediction mode. Then, the decoder can determine the first transform parameter of the current block based on the first index of the second type of intra-frame prediction mode of the current block. In this embodiment, the first transformation parameter serves as the basis for determining the second transformation parameter, namely the transformation kernel index parameter (referring to the transformation coefficient matrix index) and the scan order parameter of the transformation parameter. In other words, the decoder can map non-traditional intra-prediction modes to traditional intra-prediction modes and determine the first transform parameter of the current block through the first index of the traditional intra-prediction mode. This allows the current block to use a flexible approach corresponding to the traditional intra-prediction mode in non-traditional intra-prediction mode to select the second transform parameter to be transformed, thereby improving the applicability of non-traditional intra-prediction modes (first type of intra-prediction mode), improving coding efficiency, and enhancing video image quality. It should be noted that, in the embodiments of this application, the first predicted value can be the final predicted value of intra-frame prediction using the first type of intra-frame prediction mode, or it can be an intermediate predicted value during the intra-frame prediction process using the first type of intra-frame prediction mode. For example, for the MIP mode, the first predicted value can be the final predicted value after upsampling in the MIP prediction, or it can be the intermediate predicted value before upsampling in the MIP prediction. This application embodiment does not impose any restrictions. In some embodiments of this application, the decoder may set the first transform parameter of the current block to be equal to the first index of the second type of intra-prediction mode of the current block. In some embodiments of this application, the implementation of S1 is as follows, including: S201. Based on the first predicted value, determine the index set of the second type of intra-frame prediction mode of the first predicted value; S202. Based on the index set of the second type of intra-prediction mode of the first prediction value, determine the first index of the second type of intra-prediction mode of the current block; wherein, the index set of the second type of intra-prediction mode stores the cumulative weight value corresponding to some or all of the allowed values ​​of the index of the second type of intra-prediction mode. In the embodiments of this application, the decoder can map the first predicted value to the second type of intra-frame prediction mode, that is, obtain the index set of the second type of intra-frame prediction mode, and then determine the first index of the second type of intra-frame prediction mode to be used by the current block from the index set of the second type of intra-frame prediction mode. It should be noted that the index set of the second type of intra-prediction mode can store the cumulative weight values ​​corresponding to some or all of the allowed values ​​of one or more second type intra-prediction mode indices. If multiple indices are stored, the first index of the second type intra-prediction mode in the current block can be selected from the cumulative weight values ​​corresponding to the multiple second type intra-prediction mode indices. In some embodiments of this application, the decoder determines the horizontal and vertical gradient values ​​of the sampling points corresponding to some or all of the first predicted values; and determines the index set of the second type of intra-frame prediction mode of the first predicted value based on the horizontal and vertical gradient values ​​of the sampling points. For example, using MIP prediction values, different analysis methods are employed to map the MIP prediction values ​​to traditional intra-prediction modes by calculating the gradient information of the MIP mode prediction values. For instance, the traditional intra-prediction mode is derived from the gradient information, and the transform set and scan order used when performing LFNST are selected based on the derived intra-prediction mode. It should be noted that for each sampling point, the decoder can determine the second index of the second type of intra-frame prediction mode corresponding to each sampling point. After determining the sampling points corresponding to some or all of the first prediction values, the index set of the second type of intra-frame prediction mode can be obtained. In some embodiments of this application, the process of determining the second index of the second type of intra-frame prediction mode for each sampling point is consistent. For a sampling point, the decoder determines the index set of the second type of intra-frame prediction mode for the first prediction value based on the horizontal and vertical gradient values ​​of the sampling point, including: (1) and (2). As follows: (1) The decoder determines the gradient angle value of the sampling point based on the horizontal and vertical gradient values ​​of the sampling point; determines the second index of the second type of intra-prediction mode corresponding to the gradient angle value based on the gradient angle value of the sampling point; and updates the cumulative weight value of the second index of the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode. In this embodiment, the decoder determines the gradient angle value of the sampling point based on the horizontal and vertical gradient values ​​of the sampling point and a preset functional relationship. The first implementation is as follows: the preset functional relationship is the arctangent function; where the arctangent function is the ratio of the horizontal gradient value to the vertical gradient value of the sampling point. For example, the preset functional relationship is shown in formula (1): Among them, G x and G y θ represents the gradient values ​​in the horizontal and vertical directions; θ is the gradient angle. In some embodiments of this application, the decoder processes the ratio of the horizontal gradient value to the vertical gradient value of the sampling point based on the arctangent function to determine the gradient angle value of the sampling point. The second implementation is as follows: the preset functional relationship is a second mapping table between the gradient angle value of the sampling point and the horizontal and vertical gradient values ​​of the sampling point. In some embodiments of this application, the decoder inputs the horizontal and vertical gradient values ​​of the sampling point, or the ratio of the horizontal and vertical gradient values ​​of the sampling point, into a second mapping table and outputs the gradient angle value of the sampling point. It should be noted that, given the second mapping table, the mapping gradient angle value can be determined using the second mapping table, the horizontal gradient value, and the vertical gradient value of the sampling point. The second mapping table represents the correspondence between the horizontal and vertical gradient values ​​of the sampling point and the gradient angle value. Alternatively, it can represent the correspondence between the ratio of the horizontal gradient value to the vertical gradient value and the gradient angle value. This application embodiment does not impose any limitations on this. In this embodiment of the application, after the decoder determines the gradient angle value, it can determine the second index of the second type of intra-frame prediction mode of the sampling point based on the gradient angle value of the sampling point. In some embodiments of this application, the implementation of the decoder determining the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value of the sampling point includes: determining the second type of intra-frame prediction mode index value corresponding to the intra-frame angle prediction direction with the smallest angle between the intra-frame angle prediction direction indicated by some or all of the allowed values ​​of the index of the second type of intra-frame prediction mode and the direction indicated by the gradient angle value; and setting the second index of the second type of intra-frame prediction mode of the gradient angle value as the second type of intra-frame prediction mode index value. It should be noted that the decoder can use an array to store the cumulative weight values ​​corresponding to some or all of the allowed values ​​of the index of the second type of intra-prediction mode. Each set of data in the array is the cumulative weight value of the allowed value corresponding to the second type of intra-prediction mode. The decoder first finds the intra-frame angle prediction direction that is closest to the direction indicated by the gradient angle value, and then determines the second type of intra-frame prediction mode corresponding to the intra-frame angle prediction direction. The index value of the second type of intra-frame prediction mode is used as the second index of the second type of intra-frame prediction mode of the gradient angle value. In some embodiments of this application, the implementation of the decoder determining the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value of the sampling point includes: determining the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value according to a preset third mapping table between the gradient angle value and the index of the second type of intra-frame prediction mode. The third mapping table represents the correspondence between gradient angle values ​​of different values ​​or different value ranges and the index of the second type of intra-frame prediction mode. In some embodiments of this application, after determining the second index of the second type of intra-prediction mode corresponding to each sampling point, the decoder can update the cumulative weight value corresponding to the determined second index of the second type of intra-prediction mode in the index set of the second type of intra-prediction mode. That is, after determining the second index of a sampling point each time, the decoder can increase the cumulative weight value corresponding to the determined second index of the second type of intra-prediction mode in the index set of the second type of intra-prediction mode by a set value. In this way, after all sampling points have been processed, the index set of the second type of intra-prediction mode for the first predicted value can be obtained. In some embodiments of this application, the set value is equal to 1. Or the set value is equal to the sum of the absolute values ​​of the horizontal gradient and the absolute values ​​of the vertical gradient (G). This application does not impose any limitations on the embodiments. For example, as shown in formula (2), G is: G = |G x |+|G y | (2) (2) The decoder determines the gradient direction, first gradient intensity and mode partition corresponding to the sampling point based on the horizontal and vertical gradient values ​​of the sampling point; the second index of the second type of intra-frame prediction mode is determined based on the gradient direction, first gradient intensity and mode partition corresponding to the sampling point; the cumulative weight value corresponding to the second index of the determined second type of intra-frame prediction mode is updated in the index set of the second type of intra-frame prediction mode. In some embodiments of this application, the decoder determines the first gradient intensity of a sampling point based on the horizontal gradient value (gHor[x][y]) and the vertical gradient value (gVer[x][y]). Based on the horizontal and vertical gradient values ​​of the sampling point, the decoder performs a second type of intra-frame prediction mode partitioning process on the sampling point to determine the horizontal region index (signH[x][y]), the vertical region index (signV[x][y]), and the gradient intensity index (HgV[x][y]). Based on the horizontal region index, the vertical region index, and the gradient intensity index of the sampling point, the decoder determines the mode partition (region[x][y]) of the sampling point. Based on the gradient intensity index of the sampling point, the decoder determines the gradient direction (HgV[x][y]==1?) corresponding to the sampling point. In some embodiments of this application, the implementation of the decoder determining the second index of the second type of intra-frame prediction mode based on the gradient direction corresponding to the sampling point, the first gradient strength, and the mode partition includes: The decoder determines the gradient offset ratio (grad[x][y]) of the sampling point based on the gradient direction corresponding to the sampling point; maps the gradient offset ratio of the sampling point to the preset mode offset range to obtain the intra-frame prediction mode index offset (angIdx[x][y]) of the sampling point; determines the target second-type intra-frame prediction mode corresponding to the mode partition of the sampling point according to the fourth mapping table of preset mode partition and mode index; and determines the second index of the second-type intra-frame prediction mode of the sampling point by combining the target second-type intra-frame prediction mode and the intra-frame prediction mode index offset. In some embodiments of this application, after determining the second index of the second type of intra-prediction mode corresponding to each sampling point, the decoder can update the cumulative weight value corresponding to the determined second index of the second type of intra-prediction mode in the index set of the second type of intra-prediction mode. That is, after determining the second index of a sampling point each time, the decoder can increase the cumulative weight value corresponding to the determined second index of the second type of intra-prediction mode in the index set of the second type of intra-prediction mode by a set value. In this way, after all sampling points have been processed, the index set of the second type of intra-prediction mode for the first predicted value can be obtained. In this embodiment of the application, the implementation of the decoder updating the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode includes: increasing the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode by a set value. Wherein, the set value is equal to 1 or the set value is equal to the sum of the absolute values ​​of the horizontal gradient value and the absolute values ​​of the vertical gradient value, which is not limited in the embodiments of this application. For example, taking the MIP mode as an example, the predicted value of the MIP mode (i.e. the first predicted value) is analyzed, a traditional intra-frame prediction mode is derived based on the predicted value of the MIP mode, and predModeIntra is mapped to this traditional intra-frame prediction mode to obtain the first index, that is, the first transform parameter equal to the first index is obtained. In this embodiment, the decoder can analyze the gradient of the MIP prediction value, extract the direction with the largest gradient value, and map this direction to a traditional intra-frame prediction mode. This mapping process consists of two steps: obtaining the predicted pixels of the MIP mode and deriving the traditional intra-frame prediction mode using the gradient. The mapping process includes: obtaining the predicted pixels of the MIP mode (i.e., the sampling points of the first prediction value) and deriving the traditional intra-frame prediction mode using the gradient. The decoder determines the index set of the second type of intra-frame prediction mode based on the first prediction value as follows: In this embodiment, the decoder can obtain the predicted value of the MIP mode based on the position and size of the MIP transform block (current block). When performing transform quantization on the residual value of the current transform block, the prediction of the current transform block is already complete, and the predicted value can be directly obtained through the position and size of the MIP transform block. One possible approach is to obtain the final predicted value after the MIP has undergone matrix multiplication and upsampling; another possible approach is to obtain the predicted value of the MIP before upsampling. In this embodiment of the application, the process of the decoder using gradient to derive the traditional intra-frame prediction mode is as follows: taking the analysis of the final predicted pixel of the MIP mode as an example, for the final predicted pixel of the MIP mode, the vertical gradient (vertical gradient value) and horizontal gradient (horizontal gradient value) of all or part of the predicted pixels are calculated, and the direction of the largest gradient (gradient angle value) is mapped to a traditional intra-frame prediction mode. In this embodiment, the MIP prediction mode is mapped to the traditional intra-frame prediction mode by analyzing the predicted value before MIP upsampling, and the transform set and scanning order used when performing LFNST are selected according to the mapped traditional intra-frame prediction mode. For example, one possible approach is to compute the horizontal and vertical gradients of the final MIP prediction using the Sobel operator. The Sobel operator formula (3) is shown below, where G x It is used to calculate the horizontal gradient, G y It is used to calculate the vertical gradient. and The following details the process of deriving the traditional intra-frame prediction mode using Sobel gradient analysis and MIP prediction values. First, let's introduce the following parameter settings and concepts: The sampling points for the predicted values ​​in the MIP mode are: p[x][y], where x = 0..nTbW–1, y = 0..nTbH–1, where nTbW represents the width of the current MIP transform block and nTbH represents the height of the current MIP transform block. The decoder obtains the traditional intra-prediction mode IntraPredModeD (i.e., the second type of intra-prediction mode), where IntraPredModeD is between [0, 66]. Some rules need to be set, as follows: Set mapHgV = {{2,1},{1,2}} and mapVgH = {{3,4},{4,3}}, which means dividing the horizontal and vertical directions into 4 partitions. The angTable is set to {0, 2048, 4096, 6144, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 47104, 53248, 59392, 65536}, with 16 patterns corresponding to different angle offsets. Each value in angTable is set to an index between 0 and 15. Set angOffset = {18, 18, 50, 50}. Set HoG

[0067] The range [0, 66] corresponds to an array containing the gradient intensities for each conventional intra-prediction mode. At the start of this process, all values ​​in all HOG arrays are initialized to 0. For each predicted pixel p[x][y], with x=1…nTbW-2, y=1…nTbH-2, the calculation process is as follows: Calculate the horizontal gradient gHor[x][y] = p[x-1][y-1] + 2.p[x-1][y] + p[x-1][y+1] – p[x+1][y-1] – 2.p[x+1][y] – p[x+1][y+1]; Calculate the vertical gradient gVer[x][y]=p[x-1][y-1]+2.p[x][y-1]+p[x+1][y-1]–p[x-1][y+1]–2.p[x][y+1]–p[x+1][y+1]. Calculate the gradient intensity iAmp[x][y] = abs(gHor[x][y]) + abs(gVer[x][y]). Calculate the horizontal region index signH[x][y] = gHor[x][y] < 0? 1: 0. Calculate the vertical region index signV[x][y] = gVer[x][y] < 0? 1: 0. Calculate the gradient intensity index HgV[x][y] = (abs(gHor[x][y]) > abs(gVer[x][y]) ? 1 : 0), The pattern partition is determined by calculating: region[x][y] = (HgV[x][y] == 1? mapHgV[signH[x][y]][signV[x][y]]: mapVgH[signH[x][y]][signV[x][y]]), which means that the pattern partition of the sampling point is determined based on the horizontal region index, vertical region index and gradient intensity index of the sampling point. The gradient offset ratio grad[x][y] = (HgV[x][y] = 1?abs(gVer[x][y]) / abs(gHor[x][y]):abs((gHor[x][y] / gVer[x][y]))) is calculated based on the gradient direction corresponding to the sampling point. Calculate grad[x][y] = round(grad[x][y] * (1 << 16)) and calculate the intra-frame prediction mode index offset angIdx[x][y] = argmin i (abs(angTable[i]–grad[x][y])) maps the gradient offset ratio of the sampling point to the preset mode offset range to obtain the intra-frame prediction mode index offset of the sampling point. Calculate the index of the second type of intra-prediction mode: ipm[x][y] = angOffset[region[x][y]] (possibly 18 or 50) + angIdx[x][y], that is, according to the fourth mapping table of preset mode partitions and mode indices, determine the target second type of intra-prediction mode (angOffset[region[x][y]]) corresponding to the mode partition of the sampling point; combine the target second type of intra-prediction mode and the intra-prediction mode index offset to determine the second index (ipm[x][y]) of the second type of intra-prediction mode of the sampling point. Set HOG[ipm[x][y]] = HOG[ipm[x][y]] (cumulative weight value) + iAmp[x][y] (set value). Thus, we obtain the second type of intra-frame prediction mode corresponding to each sampling point, and the second index of the second type of intra-frame prediction mode: HOG[ipm[x][y]]. In some embodiments of this application, for S202, the decoder can determine the first index of the second type of intra-prediction mode of the current block based on the index set of the second type of intra-prediction mode of the first prediction value, including: The decoder sets the first index of the second type of intra-prediction mode of the current block to the second index of the second type of prediction mode corresponding to the largest cumulative weight value in the index set of the second type of intra-prediction modes of the first prediction value. Alternatively, it sets the first index of the second type of intra-prediction mode of the current block to the second index of the second type of prediction mode corresponding to the smallest cumulative weight value in the index set of the second type of intra-prediction modes of the first prediction value. This embodiment of the application does not impose any limitations. It should be noted that after the decoder obtains the index set of the second type of intra-prediction mode of the first prediction value through sampling points of some or all of the prediction values ​​in the first prediction value, the decoder determines the second index of the second type of prediction mode corresponding to the largest cumulative weight value in the index set of the second type of intra-prediction mode of the first prediction value as the first index of the second type of intra-prediction mode of the current block. For example, setting the traditional intra-prediction mode of IntraPredModeD to argmax. i (HoG[i]). Where, argmax i (L[i]), i = 0, ..., N, returns the index between 0 and N that maximizes L (if there are multiple maximum values, return the smaller index). argmin i (L[i]), i = 0, ..., N, returns the index between 0 and N that minimizes L (if there are multiple minimum values, return the smaller index). Finally, map predModeIntra to IntraPredModeD. It should be noted that if all HOG values ​​are zero, the value of predModeIntra will be updated to the index number indicating the PLANA mode. In some embodiments of this application, the decoder may further determine the second type of intra-prediction value of the current block based on candidate second type intra-prediction modes; the candidate second type intra-prediction modes include one or more of the following intra-prediction modes: planar mode, DC mode, and intra-angle prediction mode. A first index of the second type intra-prediction mode of the current block is determined based on the first intra-prediction value and the second type intra-prediction value. For example, the decoder calculates the difference between the MIP mode prediction value and the traditional intra-prediction mode prediction value, selects the traditional intra-prediction mode whose prediction value is closest to the MIP mode prediction value, and selects the transform set and scan order to be used when performing LFNST based on the selected intra-prediction mode. In some embodiments of this application, the decoder determines a first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value; and determines the index value corresponding to the candidate second type of intra-frame prediction mode when the first prediction error satisfies a first preset condition as the first index of the second type of intra-frame prediction mode of the current block. The decoder determines the first prediction error between the first type of intra-frame prediction value and the second type of intra-frame prediction value in the following two ways: Method 1: Determine the first prediction difference between the first type of intra-frame prediction value and the second type of intra-frame prediction value according to the first error criterion; The first error criterion is one of the following error criteria: sum of absolute errors (SAD), sum of squared errors (SSD), mean absolute error (MAD), and mean square error (MSE); the first preset condition is that the first prediction error reaches its minimum value. Method 2: Determine the first prediction difference between the first type of intra-frame predicted value and the second type of intra-frame predicted value according to the second error criterion; The second error criterion is one of the following: signal-to-noise ratio (SNR) and peak signal-to-noise ratio (PSNR); the first preset condition is that the first prediction error reaches its maximum value. In some embodiments of this application, the implementation of determining the first transform parameter of the current block based on the first type of intra-prediction mode parameters of the current block by the decoder may include: determining the first index of the second type of intra-prediction mode of the current block based on the first type of intra-prediction mode parameters; and determining the first transform parameter of the current block based on the first index of the second type of intra-prediction mode. In this embodiment, the decoder determines the first index of the second type of intra-prediction mode for the current block based on the first type of intra-prediction mode parameters in the following two ways: Method 1: The decoder determines the first index of the second type of intra-prediction mode for the current block based on the first preset mapping relationship between the first type of intra-prediction mode parameters and the second type of intra-prediction mode index. The first type of intra-frame prediction mode parameters include: a first type of intra-frame prediction mode index; a first preset mapping relationship representing the correspondence between the first type of intra-frame prediction mode index and the second type of intra-frame prediction mode index; and the decoder determining the first index of the second type of intra-frame prediction mode from the first preset mapping relationship based on the first type of intra-frame prediction mode index. Method 2: The decoder determines the first index of the second type of intra-prediction mode for the current block based on the first type of intra-prediction mode weighted matrix indicated by the first type of intra-prediction mode parameters. In some embodiments of this application, the decoder determines the gradient parameters of the weighted matrix of the first type of intra-prediction mode; and determines the first index of the second type of intra-prediction mode of the current block based on the gradient parameters of the weighted matrix of the first type of intra-prediction mode. For example, by analyzing the weighted matrix of the MIP, the MIP prediction mode is mapped to the traditional intra-frame prediction mode, and the transform set and scan order used when performing LFNST are selected according to the mapped traditional intra-frame prediction mode. In some embodiments of this application, for S2, the implementation of the decoder determining the first transform parameters of the current block based on the first index of the second type of intra-prediction mode includes: The first index of the second type of intra-frame prediction mode is mapped to a wide angle to determine the wide-angle prediction mode index; based on the wide-angle prediction mode index, the first transformation parameter is determined. It should be noted that for transform blocks using the first type of intra-prediction mode, the decoder analyzes the first prediction value of the first type of intra-prediction mode, maps the first type of intra-prediction mode to the traditional intra-prediction mode (the second type of intra-prediction mode), performs wide-angle mapping on the mapped traditional prediction mode, and then selects the transform set (transform matrix) and scanning order based on the traditional prediction mode after wide-angle mapping (i.e., the determined first transform parameters). For example, for a transform block using the MIP prediction mode, the MIP mode is mapped to the traditional intra-frame prediction mode by analyzing the predicted value of the MIP mode. The mapped traditional prediction mode is then mapped at a wide angle, and the transform set (transformation matrix) and scanning order are selected based on the traditional prediction mode after the wide-angle mapping. In this embodiment, the MIP mode and the use of LFNST technology are used as an example for illustration. It should be noted that this application is also applicable to scenarios using extended LFNST technology. It should be noted that not every current block can undergo LFNST. LFNST can only be performed on the current block if it simultaneously meets the following conditions: (a) the width and height of the current block are both greater than or equal to 4; (b) the width and height of the current block are both less than or equal to the maximum size of the transform block; (c) the prediction mode of the current block or the current coding block is intra-frame prediction mode; (d) the first transform of the current block is a two-dimensional forward first transform (DCT2) in both the horizontal and vertical directions; (e) the intra-frame prediction mode of the current block or the coding block is non-MIP mode, or the prediction mode of the transform block is MIP mode and the width and height of the transform block are both greater than or equal to 16. In other words, for the current block in this embodiment, all five conditions above must be met simultaneously. Furthermore, when it is determined that the current block can execute LFNST, it is also necessary to determine the LFNST transform kernel (which can be represented as a kernel) used by the current block. There are four transform kernel candidate sets in LFNST, which can include set0, set1, set2, and set3. The selected transform kernel candidate set can be implicitly derived based on the encoding parameters of the current block or the coding block to which the current block belongs; for example, in H.266 / VVC, based on the intra-prediction mode of the current block, it can be determined which of the four transform kernel candidate sets to use. In this embodiment of the application, after obtaining the intra-prediction mode of the current block, the initial value of the intra-prediction mode (which can be represented by predModeIntra) can be determined. The calculation formula is as follows: The image component indicator (represented by cIdx) indicates whether the current block contains the luma or chroma component. Here, if the current block is predicted to contain the luma component, cIdx equals 0; if the current block is predicted to contain the chroma component, cIdx equals 1. Additionally, (xTbY, yTbY) are the coordinates of the top-left sampling point of the current block, IntraPredModeY[xTbY][yTbY] is the intra-prediction mode for the luma component, and IntraPredModeC[xTbY][yTbY] is the intra-prediction mode for the chroma component. It should be noted that the LFNST index number can be used to indicate whether the current block uses LFNST and the index number of the LFNST transform kernel in the LFNST transform kernel candidate set. Specifically, after resolving the LFNST index number, when the LFNST index number is equal to 0, it indicates that the current block does not use LFNST; while when the LFNST index number is greater than 0, it indicates that the current block uses LFNST, and the index number of the transform kernel is equal to the value of the LFNST index number, or the value of the LFNST index number minus 1. It should also be noted that, on the decoder side, the input data of LFNST may include: the luminance position (xTbY, yTbY) of the current transform block, the width of the current block nTbW, the height of the current block nTbH, whether the current block is a luminance component or a chrominance component cIdx, and the coefficients d[x][y] after the current transform block is dequantized (scaled), x = 0, 1, ..., nTbW-1, y = 0, 1, ..., nTbH-1; the output data of LFNST may include: the first transform coefficients d'[x][y] generated by LFNST from the second transform coefficients, x = 0, 1, ..., nLfnstSize-1, y = 0, 1, ..., nLfnstSize-1. In H.266 / VVC, intra-prediction modes can be further divided into traditional intra-prediction modes and non-traditional intra-prediction modes. For non-traditional intra-prediction modes, the predModeIntra value indicates the following information: If the prediction mode of the current block is CCLM mode, the value of predModeIntra can be INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (81, 82, 83 in VVC respectively). If the prediction mode of the current block is MIP mode, then the value of predModeIntra can be the index number of the MIP mode used. If the prediction mode of the current block is the traditional intra-frame prediction mode, then the value of predModeIntra can be [0, 66]. Additionally, if the prediction mode for the current block is CCLM or MIP, the value of predModeIntra can be set as follows: (1) When the prediction mode of the current block is CCLM mode, If the mode of the center luminance block at the luminance position corresponding to the current block (such as the chroma block) is MIP mode, that is, intra_mip_flag[xTbY+nTbW / 2][yTbY+nTbH / 2] is 1, then the value of predMode Intra is set to the index number indicating the PLANAR mode (i.e., 0). Otherwise, if the mode of the center luminance block at the luminance position corresponding to the current block (such as the chroma block) is IBC (Intra Block Copy) mode or Palette mode, then the value of predModeIntra is set to the index number indicating the DC mode (i.e., 1). Otherwise, set the value of predModeIntra to the mode index number of the center luminance block at the luminance position of the current block (e.g., chroma block) IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2]; (2) When the prediction mode of the current block is MIP mode, If intra_mip_flag[xTbY][yTbY] is 1 and cIdx is 0, it indicates that the prediction mode of the current transform block is MIP mode. At this time, the prediction value of MIP mode is analyzed, a traditional intra-prediction mode is derived based on the prediction value of MIP mode, and predModeIntra is mapped to this traditional intra-prediction mode. For the traditional intra-frame prediction mode, a wide-angle mapping can be performed based on the size of the current block, extending the traditional intra-frame prediction mode [0, 66] to [-14, 80]; the mapping process is as follows: First, calculate the aspect ratio factor (which can be represented by whRatio), as shown below. whRatio=Abs(Log2(nTbW / nTbH)) (5) For the current block that is not square (i.e., nTbW is not equal to nTbH), the predModeIntra can be corrected as follows: if nTbW is greater than nTbH, and predModeIntra is greater than or equal to 2, and predModeIntra is less than ((whRatio>1?(8+2×whRatio):8), then predModeIntra = (predModeIntra+65); otherwise, if nTbW is less than nTbH, and predModeIntra is less than or equal to 66, and predModeIntra is greater than ((whRatio>1?(60-2×whRatio):60), then predModeIntra = (predModeIntra-67). Understandably, for the current block using the first type of intra-prediction mode (e.g., MIP), the introduction of the first predicted value or the first type of intra-prediction mode parameter of the current block during the LFNST transform makes the selection of the transform kernel or transform matrix (corresponding to the second transform parameter) in the transform technique more flexible. This not only improves the applicability of non-traditional intra-prediction modes (first type of intra-prediction mode), but also improves decoding efficiency and enhances video image quality. S104. Based on the first transformation parameters, determine the second transformation parameters for transforming the current block. In this embodiment, the decoder can determine the second transformation parameter corresponding to the first transformation parameter based on a preset first mapping table between the first transformation parameter and the second transformation parameter. The second transformation parameter includes at least one of the following: a transformation kernel index parameter (referring to the transformation coefficient matrix index) and a transformation parameter scan order parameter; wherein, the transformation kernel index parameter indicates the transformation kernel used in the decoding process of the transformation parameters of the current block; the scan order parameter indicates the scan order of the transformation parameters, and the scan order includes horizontal order and vertical order. It should be noted that the transform kernel index parameter refers to the transform coefficient matrix index, which can be obtained directly from the bitstream, or the decoder can determine the transform set (i.e., the transform kernel candidate set) and then obtain the index number of the transform kernel in the transform kernel candidate set from the bitstream. In this embodiment, the MIP mode and the use of LFNST technology are used as an example for illustration. It should be noted that this application is also applicable to scenarios using extended LFNST technology. In the current H.266 / VVC, based on the value of predModeIntra and Table 1 (the first mapping table), the value of the LFNST index number (which can be represented by SetIdx) can be determined, as shown in Table 1. Here, the LFNST index number is set to indicate that the current block uses LFNST and that the LFNST transform kernel is in the LFNST transform kernel candidate set. Typically, the LFNST transform set includes four transform kernel candidate sets (set0, set1, set2, set3), corresponding to SetIdx values ​​of 0, 1, 2, and 3, respectively. Table 1 predModeIntraSetIdxpredModeIntra<010<=predModeIntra<=102<=predModeIntra<=12113<=predModeIntra<=23224<=predModeIntra<=44345<=predModeIntra<=55256<=predModeIntra<=801 In this embodiment, the LFNST transform kernel candidate set can be determined first based on the MIP parameters or the first predicted value. Then, the LFNST index number is obtained from the bitstream. Based on the LFNST index number, the LFNST transform kernel used in the current block is determined from the LFNST transform kernel candidate set. Here, the LFNST transform matrix is ​​a set of fixed coefficient matrices obtained through training. The LFNST transform kernel candidate set includes two sets of transform matrices (also referred to as LFNST transform kernels). After determining the LFNST transform kernel candidate set, one set of LFNST transform kernels needs to be selected from the LFNST transform kernel candidate set, that is, the transform matrix used when performing LFNST on the current block is determined. It should be noted that in the extended LFNST, there are more LFNST transform kernel candidate sets, and each LFNST transform kernel candidate set includes 3 sets of transform matrices, which will not be discussed further here. Specifically, when the first LFNST transform kernel (i.e., the first transform matrix) in the LFNST transform kernel candidate set is selected, lfnst_idx is set to 1; when the second LFNST transform kernel (i.e., the second transform matrix) in the LFNST transform kernel candidate set is selected, lfnst_idx is set to 2. It should be noted that after determining the MIP mode index, the MIP mode index number can be converted into the LFNST intra-prediction mode index number, that is, the value of the first index of the second type of intra-prediction mode (which can be represented by predModeIntra); then, based on the value of predModeIntra, an LFNST transform kernel candidate set is selected from multiple LFNST transform kernel candidate sets to determine the transform kernel candidate set; and in the selected LFNST transform kernel candidate set, the transform kernel indicated by the LFNST index number is selected and set as the LFNST transform kernel used in the current block. Here, regarding the value of the LFNST index number, when the value of the LFNST index number is equal to 0, LFNST will not be used; while when the value of the LFNST index number is greater than 0, LFNST will be used, and the index number of the transform kernel will be equal to the value of the LFNST index number, or the value of the LFNST index number minus 1. S105. Based on the second transformation parameter, perform transformation processing on the transformation coefficients of the current block to determine the residual value of the current block. S106. Based on the residual value and the first predicted value, determine the reconstruction value of the current block. In this embodiment of the application, the transformation coefficients include: quantization coefficients. In this embodiment, the decoder dequantizes the quantization coefficients to obtain first transform coefficients; the first transform coefficients are transformed to obtain a first transform coefficient vector; the first transform coefficient vector is transformed using the transform matrix indicated by the transform kernel index parameter to obtain a second transform coefficient vector; the second transform coefficient vector is transformed using the scan order parameter of the transform parameters to obtain the second transform coefficients. The second transform coefficients are inversely transformed to obtain the residual value of the current block. After obtaining the residual value and the first predicted value, the decoder can determine the reconstructed value of the current block based on the residual value and the first predicted value. For example, after determining the LFNST transform kernel, the transformation matrix selected for the current block can be obtained, and then the prediction difference can be transformed. Among them, each set of transformation matrices can also include basic transformation matrices T of two sizes, such as 16x16 and 16x48. For the transformation matrices selected for 4 sizes of TUs, specifically, for a 4x4 TU, an 8x16 transformation matrix will be used, and this 8x16 transformation matrix comes from the first 8x16 of the 16x16 basic transformation matrix; for a 4xN or Nx4 (N>4) TU, a 16x16 basic transformation matrix will be used; for an 8x8 TU, an 8x48 transformation matrix will be used, and this 8x48 transformation matrix comes from the first 8x48 of the 16x48 basic transformation matrix; for a TU larger than 8x8, a 16x48 basic transformation matrix will be used. It should be noted that in the current H.266 / VVC, only the transformation matrix of the decoder-side LFNST (which can be represented by T T is stored), and the transformation matrix used on the encoder side is the transpose matrix of the transformation matrix of the LFNST (which can be represented by T). It should also be noted that LFNST applies an inseparable transformation based on the direct matrix multiplication method. To minimize the computational complexity and storage space as much as possible, a simplified inseparable transformation technique is used in the LFNST transformation. Among them, the main idea of the simplified inseparable transformation technique is to map an N-dimensional vector to an R-dimensional vector in a different space. Here, N / R (R<N) is the scaling factor; at this time, the transformation matrix corresponding to the simplified inseparable transformation technique is an R×N matrix, as shown below, Here, the transformation matrices used for the forward LFNST transformation and the reverse LFNST transformation are transpose relations with each other. Refer to Figure 5, which shows a schematic structural diagram of the calculation process of a matrix multiplication of an LFNST technology provided by an embodiment of the present application. As shown in Figure 5, (a) shows the calculation process of the forward LFNST transformation. After the primary transformation coefficients pass through the transformation matrix T, the secondary transformation coefficients can be obtained; (b) shows the calculation process of the reverse LFNST transformation, and after the inverse secondary transformation coefficients pass through the transpose transformation matrix T T then the inverse primary transformation coefficients can be obtained. Furthermore, in the LFNST technology, it can be determined whether to use a 4×4 inseparable transformation or an 8×8 inseparable transformation according to the size of the current block; here, "4×4 inseparable transformation" can be collectively referred to as "4×4 LFNST", and "8×8 inseparable transformation" can be collectively referred to as "8×8 LFNST". Among them, assuming that the width of the current block is nTbW and the height is nTbH, then it can be obtained that: if min(nTbW, nTbH)<=4, then the 4×4 LFNST can be used for the current block; otherwise, the 8×8 LFNST can be used for the current block. It should be noted that the return value of min(A, B) is the smaller value of A and B. In one implementation, for a 4×4 LFNST, 16 coefficients will be input to the encoder side, and after passing through the forward LFNST, 16 or 8 coefficients will be output; while on the decoder side, 16 or 8 coefficients will be input, and 16 coefficients will be output; that is, the encoder and decoder have exactly opposite numbers of input and output. Assume the size of the transform unit (TU) can be expressed as nTbW×nTbH, where the transform unit is the prediction residual block obtained based on the prediction difference. That is, TU can be equal to 4×4, or 4×N or N×4 (N>4). These will be described in detail below. When TU equals 4×4, the forward LFNST process corresponding to a 4×4 transform block is shown in Figure 6A. In Figure 6A, the white blocks represent prediction differences, the gray blocks represent first-order transform coefficients, and the black blocks represent second-order transform coefficients; here, at the "0" example position, the encoder sets the transform coefficients to 0. For a 4×4 transform block, during forward LFNST, the transform matrix size used is 8×16. All 4×4 first-order transform coefficients within the current transform block are used as input, and the output is 4×2 second-order transform coefficients. When TU equals 4×N or N×4 (N>4), the forward LFNST process corresponding to a 4×N or N×4 transform block is shown in Figure 6B. In Figure 6B, white blocks represent prediction differences, gray blocks represent first-order transform coefficients, and black blocks represent second-order transform coefficients. Here, for a 4×N or N×4 transform block, the transform matrix size used in forward LFNST is 16×16. The first-order transform coefficients within the first 4×4 sub-block of the current transform block (specifically, the topmost sub-block for a 4×N transform block, and the leftmost sub-block for an N×4 transform block) are used as input, and the output is 4×4 second-order transform coefficients. Here, at the "0" example position, the encoder still sets the transform coefficients to 0. In another implementation, for an 8×8 LFNST, 48 coefficients will be input on the encoder side, and 16 or 8 coefficients will be output after passing through the forward LFNST; while on the decoder side, 16 or 8 coefficients will be input, and 48 coefficients will be output; that is, the encoder and decoder have exactly opposite numbers of input and output. When TU equals 8×8, the forward LFNST process corresponding to the 8×8 transform block is shown in Figure 6C. In Figure 6C, the white blocks represent prediction differences, the gray blocks represent first-order transform coefficients, and the black blocks represent second-order transform coefficients. For an 8×8 transform block, the transform matrix size used in forward LFNST is 8×48. The first-order transform coefficients of the first three 4×4 sub-blocks within the current transform block (i.e., the three sub-blocks located in the upper left corner) are used as input, and the output is 4×2 second-order transform coefficients. Here, at the "0" example position, the encoder still sets the transform coefficients to 0. When TU is greater than 8×8, the forward LFNST process corresponding to transform blocks greater than 8×8 is shown in Figure 6D. In Figure 6D, white blocks represent prediction differences, gray blocks represent first-order transform coefficients, and black blocks represent second-order transform coefficients. For transform blocks greater than 8×8, the transform matrix size used in forward LFNST is 48×16. The first-order transform coefficients of the first three 4×4 sub-blocks within the current transform block (i.e., the three sub-blocks located in the upper left corner) are used as input, and the output is 4×4 second-order transform coefficients. Here, at the "0" example position, the encoder still sets the transform coefficients to 0. Thus, the TU corresponding to the prediction difference can be 4×4, 4×N, N×4 (N>4), 8×8, or even larger than 8×8. In this case, the transformation of the prediction difference can be implemented according to Figure 6A, Figure 6B, Figure 6C, or Figure 6D. It should be noted that after selecting the LFNST transform kernel candidate set, the LFNST index number (lfnst_idx) is obtained by parsing the bitstream. Based on the value of lfnst_idx, the transform matrix (transform kernel) indicated by lfnst_idx can be selected from the LFNST transform kernel candidate set. For example, when lfnst_idx is 1, the first set of transform matrices can be used as the LFNST transform kernel during the decoding process; when lfnst_idx is 2, the second set of transform matrices can be used as the LFNST transform kernel during the decoding process. Furthermore, for each set of transformation matrices (transform kernels), there are two sizes of fundamental transformation matrices, with the sizes used on the decoder side being 16×16 and 48×16. The selection is based on nLfnstOutSzie: if nLfnstOutSzie is 16, a 16x16 fundamental transformation matrix is ​​selected; or if nLfnstOutSzie is 48, a 48x16 fundamental transformation matrix is ​​selected. Alternatively, if nonZeroSize is 8, only the first 8 rows of the transformation matrix are used for matrix multiplication calculations. Furthermore, the quadratic transformation coefficient vector u[i] is taken as input and multiplied with the transformation matrix to obtain the first-order transformation coefficient vector v[j], where i = 0, 1, ..., nonZeroSize-1, j = 0, 1, ..., nLfnstOutSzie-1. Assuming the transformation matrix obtained in the previous steps is lowFreqTransMatrix, the specific calculation process of v[j] is as follows: Here, Clip3 is a clipping mechanism that restricts the value of the coefficient to between two numbers, as shown below. CoeffMin = -(1 = 15) (8) CoeffMax = (1 = 15) - 1 (9) Thus, after the matrix calculations described above, the transformation coefficients can be transformed. Here, for a 4×4 LFNST, the decoder will input either 16 or 8 coefficients and output 16 coefficients; while for an 8×8 LFNST, the decoder will input either 16 or 8 coefficients and output 48 coefficients, thereby achieving the LFNST transformation of the transformation coefficients. It should be noted that, as shown in Figure 7, the LFNST process can be divided into five steps: configuring core parameters 81, intra-prediction mode mapping 82, selecting the transformation matrix 83, calculating matrix multiplication 84, and constructing the first-order transformation coefficient matrix 85. Specifically, for intra-prediction mode mapping 82, this step is used to determine the value of predModeIntra, which mainly includes: non-traditional intra-prediction mode mapping 821 and wide-angle mapping 822; for selecting the transformation matrix 83, this step is used to select the transformation set and the transformation matrix, which mainly includes: selecting the transformation set 831, selecting the transformation matrix group 832, and selecting the transformation matrix size 833. To configure core parameter 81, you first need to configure the length of the input quadratic transform coefficient vector (which can be represented by nonZeroSize) and the length of the output first transform coefficient vector (which can be represented by nLfnstOutSzie) for LFNST calculation. The values ​​for nonZeroSize and nLfnstOutSzie are shown in Table 2. Table 2 Transform block size nonZeroSizenLfnstOutSzie4×48164×N or N×4 (N>4) 16168×8848>8×81648 The parameters nonZeroSize and nLfnstOutSzie are calculated using the following formula: nLfnstOutSzie=(nTbW>=8&&nTbH>=8)? 48:16 (10) nonZeroSize=(nTbW==4&&nTbH==4)||(nTbW==8&&nTbH==8)? 8:16 (11) In addition, the parameter nLfnstSize needs to be configured, indicating that there will only be one transformation coefficient within the first nLfnstSize × nLfnstSize range in the current block. The values ​​of nLfnstSize are shown below. Log2LfnstSize=(nTbW>=8&&nTbH>=8)? 3:2 (12) nLfnstSize=1<<Log2LfnstSize (13) At this point, by parsing the bitstream, the intra-prediction mode of the luminance or chrominance components of the current block or the coding block to which the current block belongs can be obtained. At this point, the value of predModeIntra can be determined, and the calculation formula is as described above. Further, obtain the vector u[i] of the quadratic transformation coefficients, i = 0, 1, ..., nonZeroSize-1. When it is determined that the current transform block uses LFNST, the dequantized coefficients d[x][y] are the quadratic transformation coefficients. Obtain the first nonZeroSize values ​​in diagonal scan order, which are the vector u[i] of the quadratic transformation coefficients, i = 0, 1, ..., nonZeroSize-1; in the following formula, xC and yC represent the x and y coordinates of the coefficient numbered x in the current block relative to the top left corner point, in diagonal order. xC and yC are shown below. xC=DiagScanOrder[2][2][x][0] (14) yC=DiagScanOrder[2][2][x][1] (15) u[i]=d[xC][yC] (16) In this embodiment, the applicability of LFNST technology to the current block using MIP mode can be improved, making the selection of transform set (or transform kernel) more flexible. By analyzing the characteristics of MIP prediction values, a mapping between MIP and traditional intra-frame prediction modes is established. During LFNST using transform blocks with MIP, the transform set (transform matrix) and scanning order are selected according to the mapped traditional prediction mode. This method was tested on ECM4.0 with a 48-frame interval under All Intra conditions, achieving BD-rate changes of -0.08%, 0.05%, and -0.10% in Y, Cb, and Cr respectively (i.e., average bitrate changes under the same psnr), thereby improving decoding efficiency. Based on the application scenario example in Figure 2A above, and referring to Figure 8, a flowchart of a video encoding method provided by an embodiment of this application is shown. As shown in Figure 8, the method may include: S301. Determine the parameters of the first type of intra-frame prediction mode. It should be noted that a video image can be divided into multiple image blocks, and each image block to be encoded 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; and the current block is the coding block in the video image to be predicted for the first image component, the second image component, or the third image component. In this context, if the current block performs prediction of the first image component, and the first image component is the luminance component, that is, the image component to be predicted is the luminance component, then the current block can also be called the luminance block; or, if the current block performs prediction of the second image component, and the second image component is the chrominance component, that is, the image component to be predicted is the chrominance component, then the current block can also be called the chrominance block. It should also be noted that the prediction mode parameters indicate the coding mode of the current block and the parameters associated with that mode. Rate Distortion Optimization (RDO) is typically used to determine the prediction mode parameters of the current block. Specifically, in some embodiments, determining the prediction mode parameters for the current block may include: Determine the image components to be predicted for the current block; Based on the parameters of the current block, the image components to be predicted are predicted and encoded using multiple prediction modes respectively, and the rate-distortion cost result corresponding to each prediction mode is calculated. 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 parameter 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. Here, multiple prediction modes typically include traditional intra-frame prediction modes and non-traditional intra-frame prediction modes. Traditional intra-frame prediction modes can include Direct Current (DC) mode, Planar mode, and Angle mode, while non-traditional intra-frame prediction modes can include MIP mode, Cross-component Linear Model Prediction (CCLM) mode, Intra Block Copy (IBC) mode, and PLT (Palette) mode, etc. In this way, after encoding the current block using multiple prediction modes, the rate-distortion cost result corresponding to each prediction mode can be obtained. Then, the minimum rate-distortion cost result is selected from the multiple rate-distortion cost results, and the prediction mode corresponding to the minimum rate-distortion cost result is determined as the prediction mode parameter of the current block. In this way, the current block can be encoded using the determined prediction mode. Moreover, under this prediction mode, the prediction residual can be small, which can improve the coding efficiency. S302. Based on the parameters of the first type of intra-frame prediction mode, determine the first predicted value of the current block, and calculate the residual value between the original value of the current block and the first predicted value. S303. Determine the first transform parameter of the current block based on the first predicted value of the current block or the first type of intra-frame prediction mode parameter. S304. Based on the first transformation parameters, determine the second transformation parameters for transforming the current block. S305. Based on the second transformation parameter, the residual value is transformed to obtain the transformation coefficients of the current block. In this embodiment, the decoder can determine the first transform parameter of the current block based on the first predicted value of the current block. Alternatively, the decoder can determine the first transform parameter of the current block based on the first type of intra-frame prediction mode parameter of the current block; this embodiment does not impose any limitations. In some embodiments of this application, the implementation of determining the first transform parameter of the current block based on the first prediction value of the current block by the decoder may include: S1. Based on the first prediction value of the current block, determine the first index of the second type of intra-frame prediction mode of the current block; S2. Determine the first transform parameters of the current block based on the first index of the second type of intra-prediction mode of the current block. In this embodiment, the decoder can determine the first index of a second type of intra-frame prediction mode using the first prediction value of the current block. The second type of intra-frame prediction mode includes at least one of the following: planar mode, DC mode, and intra-frame angle prediction mode. Then, the decoder can determine the first transform parameter of the current block based on the first index of the second type of intra-frame prediction mode of the current block. In this embodiment, the first transformation parameter serves as the basis for determining the second transformation parameter, namely the transformation kernel index parameter (referring to the transformation coefficient matrix index) and the scan order parameter of the transformation parameter. In other words, the decoder can map non-traditional intra-prediction modes to traditional intra-prediction modes and determine the first transform parameter of the current block through the first index of the traditional intra-prediction mode. This allows the current block to use a flexible approach corresponding to the traditional intra-prediction mode in non-traditional intra-prediction mode to select the second transform parameter to be transformed, thereby improving the applicability of non-traditional intra-prediction modes (first type of intra-prediction mode), improving coding efficiency, and enhancing video image quality. It should be noted that, in the embodiments of this application, the first predicted value can be the final predicted value of intra-frame prediction using the first type of intra-frame prediction mode, or it can be an intermediate predicted value during the intra-frame prediction process using the first type of intra-frame prediction mode. For example, for the MIP mode, the first predicted value can be the final predicted value after upsampling in the MIP prediction, or it can be the intermediate predicted value before upsampling in the MIP prediction. This application embodiment does not impose any restrictions. In some embodiments of this application, the decoder may set the first transform parameter of the current block to be equal to the first index of the second type of intra-prediction mode of the current block. In some embodiments of this application, the implementation of S1 is as follows, including: S201, determining an index set of the second type of intra-frame prediction mode based on the first prediction value; S202. Based on the index set of the second type of intra-prediction mode of the first prediction value, determine the first index of the second type of intra-prediction mode of the current block; wherein, the index set of the second type of intra-prediction mode stores the cumulative weight value corresponding to some or all of the allowed values ​​of the index of the second type of intra-prediction mode. In some embodiments of this application, for some or all of the predicted values ​​in the first predicted value, the horizontal gradient value and vertical gradient value of the sampling point corresponding to the some or all predicted values ​​are determined; based on the horizontal gradient value and vertical gradient value of the sampling point, the index set of the second type of intra-frame prediction mode of the first predicted value is determined. The encoder determines the index set of the second type of intra-frame prediction mode of the first prediction value based on the horizontal and vertical gradient values ​​of the sampling points, including: (1) and (2). (1) Determine the gradient angle value of the sampling point based on the horizontal and vertical gradient values ​​of the sampling point; determine the second index of the second type of intra-prediction mode corresponding to the gradient angle value based on the gradient angle value of the sampling point; update the cumulative weight value of the second index of the second type of intra-prediction mode in the index set of the second type of intra-prediction mode corresponding to the determined second index of the second type of intra-prediction mode. In some embodiments of this application, determining the gradient angle value of a sampling point based on its horizontal and vertical gradient values ​​includes: determining the gradient angle value of the sampling point based on its horizontal and vertical gradient values ​​and a preset functional relationship. The preset functional relationship is the arctangent function; wherein the arctangent function is the ratio of the horizontal gradient value to the vertical gradient value of the sampling point. In some embodiments of this application, the gradient angle value of a sampling point is determined based on the horizontal and vertical gradient values ​​of the sampling point and a preset functional relationship, including: processing the ratio of the horizontal and vertical gradient values ​​of the sampling point based on the arctangent function to determine the gradient angle value of the sampling point. The preset functional relationship is a second mapping table between the gradient angle value of the sampling point and the horizontal and vertical gradient values ​​of the sampling point; In some embodiments of this application, the gradient angle value of a sampling point is determined based on the horizontal and vertical gradient values ​​of the sampling point and a preset functional relationship. This includes: inputting the horizontal and vertical gradient values ​​of the sampling point, or the ratio of the horizontal and vertical gradient values ​​of the sampling point, into a second mapping table, and outputting the gradient angle value of the sampling point. In some embodiments of this application, determining a second index of a second type of intra-frame prediction mode corresponding to the gradient angle value of a sampling point includes: determining the second type of intra-frame prediction mode index value corresponding to the intra-frame angle prediction direction with the smallest angle between the direction indicated by the gradient angle value and the direction indicated by some or all of the allowed values ​​of the index of the second type of intra-frame prediction mode; and setting the second index of the second type of intra-frame prediction mode of the gradient angle value as the second type of intra-frame prediction mode index value. Alternatively, a second index of the second type of intra-prediction mode corresponding to the gradient angle value can be determined based on a third mapping table between the preset gradient angle value and the index of the second type of intra-prediction mode. The third mapping table represents the correspondence between gradient angle values ​​of different values ​​or different value ranges and the second type of intra-frame prediction mode index. (2) The encoder determines the gradient direction, first gradient intensity and mode partition corresponding to the sampling point based on the horizontal and vertical gradient values ​​of the sampling point; the second index of the second type of intra-frame prediction mode is determined based on the gradient direction, first gradient intensity and mode partition corresponding to the sampling point; the cumulative weight value corresponding to the second index of the determined second type of intra-frame prediction mode is updated in the index set of the second type of intra-frame prediction mode. In some embodiments of this application, determining the gradient direction, first gradient intensity, and mode partition corresponding to a sampling point based on its horizontal and vertical gradient values ​​includes: determining the first gradient intensity of the sampling point based on its horizontal and vertical gradient values; performing a second type of intra-frame prediction mode partitioning process on the sampling point based on its horizontal and vertical gradient values ​​to determine its horizontal region index, vertical region index, and gradient intensity index; determining the mode partition of the sampling point based on its horizontal region index, vertical region index, and gradient intensity index; and determining the gradient direction corresponding to the sampling point based on its gradient intensity index. In some embodiments of this application, determining the second index of the second type of intra-frame prediction mode based on the gradient direction corresponding to the sampling point, the first gradient intensity, and the mode partition includes: determining the gradient offset ratio of the sampling point according to the gradient direction corresponding to the sampling point; mapping the gradient offset ratio of the sampling point to a preset mode offset range to obtain the intra-frame prediction mode index offset of the sampling point; determining the target second type of intra-frame prediction mode corresponding to the mode partition of the sampling point according to the fourth mapping table of preset mode partitions and mode indices; and determining the second index of the second type of intra-frame prediction mode of the sampling point by combining the target second type of intra-frame prediction mode and the intra-frame prediction mode index offset. In some embodiments of this application, updating the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode includes: adding a set value to the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode. The set value is 1, or the set value is the sum of the absolute values ​​of the horizontal gradient and the absolute values ​​of the vertical gradient. In some embodiments of this application, determining the first index of the second type of intra-frame prediction mode of the current block based on the index set of the second type of intra-frame prediction modes of the first prediction value includes: setting the first index of the second type of intra-frame prediction mode of the current block as the second index of the second type of prediction mode corresponding to the largest cumulative weight value in the index set of the second type of intra-frame prediction modes of the first prediction value. In some embodiments of this application, determining the first index of the second type of intra-prediction mode of the current block based on the first prediction value of the current block includes: determining the second type of intra-prediction value of the current block according to the candidate second type of intra-prediction mode; and determining the first index of the second type of intra-prediction mode of the current block according to the first intra-prediction value and the second type of intra-prediction value. Among them, the candidate second-class intra-prediction modes include one or more of the following intra-prediction modes: planar mode, DC mode, and intra-angle prediction mode. In some embodiments of this application, a first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value is determined; the index value corresponding to the candidate second type of intra-frame prediction mode when the first prediction error satisfies the first preset condition is determined as the first index of the second type of intra-frame prediction mode of the current block. There are two ways to determine the first prediction difference: Method 1: Determine the first prediction difference between the first type of intra-frame prediction value and the second type of intra-frame prediction value according to the first error criterion; The first error criterion is one of the following error criteria: sum of absolute errors (SAD), sum of squared errors (SSD), mean absolute error (MAD), and mean square error (MSE); the first preset condition is that the first prediction error reaches its minimum value. Method 2: Determine the first prediction difference between the first type of intra-frame predicted value and the second type of intra-frame predicted value according to the second error criterion; The second error criterion is one of the following: signal-to-noise ratio (SNR) and peak signal-to-noise ratio (PSNR); the first preset condition is that the first prediction error reaches its maximum value. In some embodiments of this application, the implementation of determining the first transform parameter of the current block based on the first type of intra-prediction mode parameters of the current block by the decoder may include: determining the first index of the second type of intra-prediction mode of the current block based on the first type of intra-prediction mode parameters; and determining the first transform parameter of the current block based on the first index of the second type of intra-prediction mode. In some embodiments of this application, determining the first index of the second type of intra-prediction mode for the current block based on the first type of intra-prediction mode parameters includes two methods: Method 1: The encoder determines the first index of the second type of intra-prediction mode for the current block based on the first preset mapping relationship between the first type of intra-prediction mode parameters and the second type of intra-prediction mode index. The first type of intra-prediction mode parameters include: the first type of intra-prediction mode index; the first preset mapping relationship represents the correspondence between the first type of intra-prediction mode index and the second type of intra-prediction mode index; In some embodiments of this application, the encoder determines the first index of the second type of intra-prediction mode of the current block according to a first preset mapping relationship between the first type of intra-prediction mode parameters and the second type of intra-prediction mode index, including: determining the first index of the second type of intra-prediction mode from the first preset mapping relationship according to the first type of intra-prediction mode index. Method 2: The encoder determines the first index of the second type of intra-prediction mode for the current block based on the first type of intra-prediction mode weighted matrix indicated by the first type of intra-prediction mode parameters. In some embodiments of this application, the encoder determines the first index of the second type of intra-prediction mode of the current block based on the first type of intra-prediction mode weighting matrix indicated by the first type of intra-prediction mode parameters, including: determining the gradient parameters of the first type of intra-prediction mode weighting matrix; and determining the first index of the second type of intra-prediction mode of the current block according to the gradient parameters of the first type of intra-prediction mode weighting matrix. For S2, the encoder determines the first transform parameters of the current block based on the first index of the second type of intra-prediction mode, including: performing wide-angle mapping on the first index of the second type of intra-prediction mode to determine the wide-angle prediction mode index; and determining the first transform parameters based on the wide-angle prediction mode index. In some embodiments of this application, the encoder determines a second transformation parameter for transforming the current block based on a first transformation parameter, including: determining a second transformation parameter corresponding to the first transformation parameter according to a preset first mapping table between the first transformation parameter and the second transformation parameter. The second transformation parameter includes at least one of the following: a transformation kernel index parameter (referring to the transformation coefficient matrix index) and a transformation parameter scan order parameter; wherein, the transformation kernel index parameter indicates the transformation kernel used in the decoding process of the transformation parameters of the current block; the scan order parameter indicates the scan order of the transformation parameters, and the scan order includes horizontal order and vertical order. In some embodiments of this application, the step of transforming the residual value based on the second transformation parameter to obtain the transformation coefficients of the current block includes: transforming the residual value to obtain second transformation coefficients; converting the second transformation coefficients using the scan order parameter of the transformation parameter to obtain a second transformation coefficient vector; transforming the second transformation coefficient vector using the transformation matrix indicated by the transformation kernel index parameter to obtain a first transformation coefficient vector; converting the first transformation coefficient vector to obtain a first transformation coefficient; and quantizing the first transformation coefficients to obtain the quantized coefficients of the current block, wherein the quantized coefficients are the transformation coefficients of the current block. It should be noted that the description and explanation of the first index for determining the second type of intra-prediction mode by the encoder are consistent with those by the decoder, and will not be repeated here. The difference lies in the prediction mode parameters, which indicate the coding mode of the current block and the parameters associated with that mode. Typically, the encoder can use Rate Distortion Optimization (RDO) to determine the prediction mode parameters for the current block. The encoder determines the LFNST transform core used in the current block, sets the LFNST index number, and writes it to the video stream. It should be noted that since the LFNST transform core candidate set includes two or more pre-defined transform cores for MIP, rate-distortion optimization can be used to select the transform core for the current block. Specifically, the rate-distortion cost (RDCost) can be calculated for each transform core using rate-distortion optimization, and then the transform core with the lowest rate-distortion cost can be selected as the transform core for the current block. In other words, on the encoder side, a set of LFNST transform cores can be selected using RDCost, and the index number corresponding to the LFNST transform core (which can be represented by lfnst_idx) can be written into the video bitstream and transmitted to the decoder side. Understandably, for the current block using the first type of intra-prediction mode (e.g., MIP), the introduction of the first predicted value or the first type of intra-prediction mode parameter of the current block during the LFNST transform makes the selection of the transform kernel or transform matrix (corresponding to the second transform parameter) in the transform technique more flexible. This not only improves the applicability of non-traditional intra-prediction modes (first type of intra-prediction mode), but also improves coding efficiency and enhances video image quality. Based on the same inventive concept as the foregoing embodiments, referring to FIG9, a schematic diagram of the composition structure of a decoder 1 provided in an embodiment of this application is shown. As shown in FIG9, the decoder 1 may include: Decoding section 10 is configured to decode the bitstream and determine the first type of intra-frame prediction mode parameters for the current block. The first prediction portion 11 is configured to determine a first prediction value for the current block based on the first type of intra-frame prediction mode parameters; The first determining part 12 is configured to determine a first transformation parameter of the current block based on a first prediction value of the current block or a first type of intra-frame prediction mode parameter; and to determine a second transformation parameter for transforming the current block based on the first transformation parameter. The first transformation part 13 is configured to perform transformation processing on the transformation coefficients of the current block based on the second transformation parameters to determine the residual value of the current block; Reconstruction section 14 is configured to determine the reconstruction value of the current block based on the residual value and the first predicted value. In some embodiments of this application, determining the first transform parameter of the current block based on the first predicted value of the current block or the first type of intra-frame prediction parameter includes: Based on the first prediction value of the current block, determine the first index of the second type of intra-frame prediction mode of the current block; The first transform parameter of the current block is determined based on the first index of the second type of intra-prediction mode of the current block. In some embodiments of this application, determining the first transform parameter of the current block based on the first predicted value of the current block or the first type of intra-frame prediction parameter includes: Based on the first type of intra-prediction mode parameters, determine the first index of the second type of intra-prediction mode of the current block; The first transform parameters of the current block are determined based on the first index of the second type of intra-frame prediction mode. In some embodiments of this application, the second type of intra-frame prediction mode includes at least one of the following: planar mode, DC mode, and intra-frame angle prediction mode. In some embodiments of this application, the first determining portion 12 is further configured to set the first transform parameter of the current block to be equal to the first index of the second type of intra-frame prediction mode of the current block. In some embodiments of this application, the first transformation portion 13 is further configured to determine the second transformation parameter corresponding to the first transformation parameter according to a preset first mapping table between the first transformation parameter and the second transformation parameter. In some embodiments of this application, the second transformation parameter includes at least one of the following: a transformation kernel index parameter and a scan order parameter of the transformation parameters; wherein the transformation kernel index parameter indicates the transformation kernel used in the decoding process of the transformation parameters of the current block; and the scan order parameter indicates the scan order of the transformation parameters, the scan order including horizontal order and vertical order. In some embodiments of this application, the first determining portion 12 is further configured to determine an index set of a second type of intra-frame prediction mode based on the first predicted value; Based on the index set of the second type of intra-prediction mode of the first predicted value, the first index of the second type of intra-prediction mode of the current block is determined; wherein, the index set of the second type of intra-prediction mode stores the cumulative weight value corresponding to some or all of the allowed values ​​of the index of the second type of intra-prediction mode. In some embodiments of this application, the first determining portion 12 is further configured to determine, for some or all of the predicted values ​​in the first predicted values, the horizontal gradient value and the vertical gradient value of the sampling point corresponding to the some or all predicted values. Based on the horizontal and vertical gradient values ​​of the sampling points, the index set of the second type of intra-frame prediction mode for the first prediction value is determined. In some embodiments of this application, the first determining portion 12 is further configured to determine the gradient angle value of the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point; Based on the gradient angle value of the sampling point, determine the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value; Update the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode. In some embodiments of this application, the first determining portion 12 is further configured to determine the gradient angle value of the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point, as well as a preset functional relationship. In some embodiments of this application, the preset functional relationship is the arctangent function; wherein, the arctangent function is the ratio of the horizontal gradient value to the vertical gradient value of the sampling point; In some embodiments of this application, the first determining portion 12 is further configured to process the ratio of the horizontal gradient value and the vertical gradient value of the sampling point based on the arctangent function to determine the gradient angle value of the sampling point. In some embodiments of this application, the preset functional relationship is a second mapping table between the gradient angle value of the sampling point and the horizontal and vertical gradient values ​​of the sampling point; In some embodiments of this application, the first determining portion 12 is further configured to input the horizontal gradient value and the vertical gradient value of the sampling point, or the ratio of the horizontal gradient value and the vertical gradient value of the sampling point, into the second mapping table, and output the gradient angle value of the sampling point. In some embodiments of this application, the first determining portion 12 is further configured to determine, from the intra-angle prediction directions indicated by some or all of the allowable values ​​of the index of the second type of intra-frame prediction mode, the second type of intra-frame prediction mode index value corresponding to the intra-frame angle prediction direction with the smallest angle between the direction indicated by the gradient angle value and the direction indicated by the gradient angle value. Set the second index of the second type of intra-frame prediction mode of the gradient angle value as the index value of the second type of intra-frame prediction mode. In some embodiments of this application, the first determining portion 12 is further configured to determine a second index of the second type of intra-frame prediction mode corresponding to the gradient angle value based on a third mapping table between a preset gradient angle value and a second type of intra-frame prediction mode index. In some embodiments of this application, the third mapping table represents the correspondence between gradient angle values ​​of different values ​​or different value ranges and the second type of intra-frame prediction mode index. In some embodiments of this application, the first determining portion 12 is further configured to increase the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode by a set value. In some embodiments of this application, the set value is equal to 1. In some embodiments of this application, the set value is equal to the sum of the absolute values ​​of the horizontal gradient and the absolute values ​​of the vertical gradient. In some embodiments of this application, the first determining portion 12 is further configured to set the first index of the second type of intra-frame prediction mode of the current block as the second index of the second type of prediction mode corresponding to the largest cumulative weight value in the index set of the second type of intra-frame prediction modes of the first prediction value. In some embodiments of this application, the first determining portion 12 is further configured to determine the second type intra-prediction value of the current block based on the candidate second type intra-prediction mode; Based on the first intra-frame prediction value and the second type of intra-frame prediction value, determine the first index of the second type of intra-frame prediction mode of the current block. In some embodiments of this application, the candidate second type of intra-frame prediction mode includes one or more of the following intra-frame prediction modes: planar mode, DC mode, and intra-frame angle prediction mode. In some embodiments of this application, the first determining portion 12 is further configured to determine a first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value; The index value corresponding to the candidate second type intra-frame prediction mode when the first prediction error satisfies the first preset condition is determined as the first index of the second type intra-frame prediction mode of the current block. In some embodiments of this application, the first determining portion 12 is further configured to determine the first prediction difference between the first intra-frame prediction value and the second type of intra-frame prediction value according to a first error criterion. The first error criterion is one of the following error criteria: sum of absolute errors, sum of squared errors, mean absolute error and mean square error; the first preset condition is that the first prediction error reaches its minimum value. In some embodiments of this application, the first determining portion 12 is further configured to determine the first prediction difference between the first intra-frame prediction value and the second type of intra-frame prediction value according to a second error criterion. The second error criterion is one of the following error criteria: signal-to-noise ratio and peak signal-to-noise ratio; the first preset condition is that the first prediction error reaches its maximum value. In some embodiments of this application, the first determining portion 12 is further configured to determine the gradient direction, first gradient intensity, and mode partition corresponding to the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point. The gradient direction corresponding to the sampling point, the first gradient intensity, and the mode partition are used to determine the second index of the second type of intra-frame prediction mode. Update the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode. In some embodiments of this application, the first determining portion 12 is further configured to determine the first gradient intensity of the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point; Based on the horizontal and vertical gradient values ​​of the sampling points, the sampling points are partitioned using the second type of intra-frame prediction mode to determine the horizontal region index, vertical region index, and gradient intensity index of the sampling points. Based on the horizontal region index, the vertical region index, and the gradient intensity index of the sampling point, the pattern partition of the sampling point is determined; Based on the gradient intensity index of the sampling point, the gradient direction corresponding to the sampling point is determined. In some embodiments of this application, the first determining portion 12 is further configured to determine the gradient offset ratio of the sampling point based on the gradient direction corresponding to the sampling point; The gradient offset ratio of the sampling point is mapped to a preset mode offset range to obtain the intra-frame prediction mode index offset of the sampling point; Based on the fourth mapping table of preset mode partitions and mode indexes, determine the target second type intra-frame prediction mode corresponding to the mode partition of the sampling point; By combining the target second type intra-prediction mode and the intra-prediction mode index offset, the second index of the second type intra-prediction mode of the sampling point is determined. In some embodiments of this application, the first determining portion 12 is further configured to determine the first index of the second type of intra-prediction mode of the current block according to a first preset mapping relationship between the first type of intra-prediction mode parameters and the second type of intra-prediction mode index. In some embodiments of this application, the first type of intra-frame prediction mode parameters include: a first type of intra-frame prediction mode index; the first preset mapping relationship represents the correspondence between the first type of intra-frame prediction mode index and the second type of intra-frame prediction mode index; The first determining portion 12 is further configured to determine the first index of the second type of intra-frame prediction mode from the first preset mapping relationship based on the first type of intra-frame prediction mode index. In some embodiments of this application, the first determining portion 12 is further configured to determine the first index of the second type of intra-prediction mode of the current block based on the first type of intra-prediction mode weighting matrix indicated by the first type of intra-prediction mode parameters. In some embodiments of this application, the first determining portion 12 is further configured to determine the gradient parameters of the weighting matrix of the first type of intra-frame prediction mode; The first index of the second type of intra-prediction mode of the current block is determined based on the gradient parameters of the weighted matrix of the first type of intra-prediction mode. In some embodiments of this application, the first determining portion 12 is further configured to perform wide-angle mapping on the first index of the second type of intra-frame prediction mode to determine the wide-angle prediction mode index. The first transformation parameter is determined based on the wide-angle prediction mode index. In some embodiments of this application, the transformation coefficients include: quantization coefficients; the first transformation portion 13 is further configured to dequantize the quantization coefficients to obtain the first transformation coefficients; The first transformation coefficients are transformed to obtain the first transformation coefficient vector; The first transformation coefficient vector is transformed using the transformation matrix indicated by the transformation kernel index parameter to obtain the second transformation coefficient vector. The second transformation coefficient vector is transformed using the scan order parameter of the transformation parameters to obtain the second transformation coefficients; The second transformation coefficients are inversely transformed to obtain the residual value of the current block. Based on the same inventive concept as the foregoing embodiments, referring to Figure 10, which shows a schematic diagram of the composition structure of a decoder provided in an embodiment of this application. As shown in Figure 10, the decoder may include: The first memory 1002 is configured to store computer programs running on the first processor; The first processor 1003 is configured to execute a decoder method when running the computer program. In this embodiment, the decoder further includes a first communication interface 1001; the first communication interface 1001 is used for receiving and transmitting signals during information exchange with other external network elements. The various components are coupled together via a first bus system 1004. It is understood that the first bus system 1004 is used to realize the connection and communication between these components. In addition to a data bus, the first bus system 1004 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the first bus system 1004 in Figure 10. It is understood that the first memory 1002 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 1002 of the system and method described in this application is intended to include, but is not limited to, these and any other suitable types of memory. The first processor 1003 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the first processor 1003 or by instructions in software form. The first processor 1003 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the first memory 1002. The first processor 1003 reads the information in the first memory 1002 and completes the steps of the above method in conjunction with its hardware. It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor. Alternatively, as another embodiment, the first processor 1003 is further configured to execute the method described in any of the foregoing embodiments when running the computer program. Based on the same inventive concept as the foregoing embodiments, referring to Figure 11, which shows a schematic diagram of the composition structure of an encoder 2 provided in an embodiment of this application. As shown in Figure 11, the encoder 2 may include: The second determining part 20 is configured to determine the parameters of the first type of intra-frame prediction mode; The second prediction part 21 is configured to determine the first prediction value of the current block based on the first type of intra-frame prediction mode parameters; The second determining portion 20 is further configured to calculate the residual value between the original value of the current block and the first predicted value; and to determine a first transformation parameter of the current block based on the first predicted value of the current block or the first type of intra-frame prediction mode parameter; and to determine a second transformation parameter for transforming the current block based on the first transformation parameter. The second transformation part 22 is configured to transform the residual value based on the second transformation parameters to obtain the transformation coefficients of the current block. In some embodiments of this application, the second determining portion 20 is further configured to determine a first index of a second type of intra-frame prediction mode for the current block based on a first prediction value of the current block; The first transform parameter of the current block is determined based on the first index of the second type of intra-prediction mode of the current block. In some embodiments of this application, determining the first transform parameter of the current block based on the first predicted value of the current block or the first type of intra-frame prediction parameter includes: Based on the first type of intra-prediction mode parameters, determine the first index of the second type of intra-prediction mode of the current block; The first transform parameters of the current block are determined based on the first index of the second type of intra-frame prediction mode. In some embodiments of this application, the second type of intra-frame prediction mode includes at least one of the following: planar mode, DC mode, and intra-frame angle prediction mode. In some embodiments of this application, the second determining portion 20 is further configured to set the first transform parameter of the current block to be equal to the first index of the second type of intra-frame prediction mode of the current block. In some embodiments of this application, the second transformation portion 22 is further configured to determine the second transformation parameter corresponding to the first transformation parameter according to a preset first mapping table between the first transformation parameter and the second transformation parameter. In some embodiments of this application, the second transformation parameter includes at least one of the following: a transformation kernel index parameter and a scan order parameter of the transformation parameters; wherein the transformation kernel index parameter indicates the transformation kernel used in the decoding process of the transformation parameters of the current block; and the scan order parameter indicates the scan order of the transformation parameters, the scan order including horizontal order and vertical order. In some embodiments of this application, the second determining portion 20 is further configured to determine an index set of a second type of intra-frame prediction mode for the first prediction value based on the first prediction value; Based on the index set of the second type of intra-prediction mode of the first predicted value, the first index of the second type of intra-prediction mode of the current block is determined; wherein, the index set of the second type of intra-prediction mode stores the cumulative weight value corresponding to some or all of the allowed values ​​of the index of the second type of intra-prediction mode. In some embodiments of this application, the second determining portion 20 is further configured to determine, for some or all of the predicted values ​​in the first predicted values, the horizontal gradient value and the vertical gradient value of the sampling point corresponding to the some or all predicted values. Based on the horizontal and vertical gradient values ​​of the sampling points, the index set of the second type of intra-frame prediction mode for the first prediction value is determined. In some embodiments of this application, the second determining portion 20 is further configured to determine the gradient angle value of the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point; Based on the gradient angle value of the sampling point, determine the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value; Update the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode. In some embodiments of this application, the second determining part 20 is further configured to determine the gradient angle value of the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point, as well as a preset functional relationship. In some embodiments of this application, the preset functional relationship is the arctangent function; wherein, the arctangent function is the ratio of the horizontal gradient value to the vertical gradient value of the sampling point; In some embodiments of this application, the second determining portion 20 is further configured to process the ratio of the horizontal gradient value and the vertical gradient value of the sampling point based on the arctangent function to determine the gradient angle value of the sampling point. In some embodiments of this application, the preset functional relationship is a second mapping table between the gradient angle value of the sampling point and the horizontal and vertical gradient values ​​of the sampling point; In some embodiments of this application, the second determining part 20 is further configured to input the horizontal gradient value and the vertical gradient value of the sampling point, or the ratio of the horizontal gradient value and the vertical gradient value of the sampling point, into the second mapping table, and output the gradient angle value of the sampling point. In some embodiments of this application, the second determining portion 20 is further configured to determine, from the intra-angle prediction directions indicated by some or all of the allowable values ​​of the index of the second type of intra-frame prediction mode, the second type of intra-frame prediction mode index value corresponding to the intra-frame angle prediction direction with the smallest angle between the direction indicated by the gradient angle value and the direction indicated by the gradient angle value. Set the second index of the second type of intra-frame prediction mode of the gradient angle value as the index value of the second type of intra-frame prediction mode. In some embodiments of this application, the second determining portion 20 is further configured to determine a second index of the second type of intra-frame prediction mode corresponding to the gradient angle value based on a third mapping table between a preset gradient angle value and a second type of intra-frame prediction mode index. In some embodiments of this application, the third mapping table represents the correspondence between gradient angle values ​​of different values ​​or different value ranges and the second type of intra-frame prediction mode index. In some embodiments of this application, the second determining portion 20 is further configured to increase the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode by a set value. In some embodiments of this application, the set value is equal to 1. In some embodiments of this application, the set value is equal to the sum of the absolute values ​​of the horizontal gradient and the absolute values ​​of the vertical gradient. In some embodiments of this application, the second determining portion 20 is further configured to set the first index of the second type of intra-frame prediction mode of the current block as the second index of the second type of prediction mode corresponding to the largest cumulative weight value in the index set of the second type of intra-frame prediction modes of the first prediction value. In some embodiments of this application, the second determining portion 20 is further configured to determine the second type intra-prediction value of the current block based on the candidate second type intra-prediction mode; Based on the first intra-frame prediction value and the second type of intra-frame prediction value, determine the first index of the second type of intra-frame prediction mode of the current block. In some embodiments of this application, the candidate second type of intra-frame prediction mode includes one or more of the following intra-frame prediction modes: planar mode, DC mode, and intra-frame angle prediction mode. In some embodiments of this application, the second determining portion 20 is further configured to determine a first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value; The index value corresponding to the candidate second type intra-frame prediction mode when the first prediction error satisfies the first preset condition is determined as the first index of the second type intra-frame prediction mode of the current block. In some embodiments of this application, the second determining portion 20 is further configured to determine the first prediction difference between the first intra-frame prediction value and the second type of intra-frame prediction value according to a first error criterion; The first error criterion is one of the following error criteria: sum of absolute errors, sum of squared errors, mean absolute error and mean square error; the first preset condition is that the first prediction error reaches its minimum value. In some embodiments of this application, the second determining portion 20 is further configured to determine the first prediction difference between the first intra-frame prediction value and the second type of intra-frame prediction value according to a second error criterion; The second error criterion is one of the following error criteria: signal-to-noise ratio and peak signal-to-noise ratio; the first preset condition is that the first prediction error reaches its maximum value. In some embodiments of this application, the second determining portion 20 is further configured to determine the gradient direction, first gradient intensity, and mode partition corresponding to the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point. The gradient direction corresponding to the sampling point, the first gradient intensity, and the mode partition are used to determine the second index of the second type of intra-frame prediction mode. Update the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode. In some embodiments of this application, the second determining portion 20 is further configured to determine the first gradient intensity of the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point; Based on the horizontal and vertical gradient values ​​of the sampling points, the sampling points are partitioned using the second type of intra-frame prediction mode to determine the horizontal region index, vertical region index, and gradient intensity index of the sampling points. Based on the horizontal region index, the vertical region index, and the gradient intensity index of the sampling point, the pattern partition of the sampling point is determined; Based on the gradient intensity index of the sampling point, the gradient direction corresponding to the sampling point is determined. In some embodiments of this application, the second determining portion 20 is further configured to determine the gradient offset ratio of the sampling point based on the gradient direction corresponding to the sampling point; The gradient offset ratio of the sampling point is mapped to a preset mode offset range to obtain the intra-frame prediction mode index offset of the sampling point; Based on the fourth mapping table of preset mode partitions and mode indexes, determine the target second type intra-frame prediction mode corresponding to the mode partition of the sampling point; By combining the target second type intra-prediction mode and the intra-prediction mode index offset, the second index of the second type intra-prediction mode of the sampling point is determined. In some embodiments of this application, the second determining portion 20 is further configured to determine the first index of the second type of intra-prediction mode of the current block according to a first preset mapping relationship between the first type of intra-prediction mode parameters and the second type of intra-prediction mode index. In some embodiments of this application, the first type of intra-frame prediction mode parameters include: a first type of intra-frame prediction mode index; the first preset mapping relationship represents the correspondence between the first type of intra-frame prediction mode index and the second type of intra-frame prediction mode index; The second determining portion 20 is further configured to determine the first index of the second type of intra-frame prediction mode from the first preset mapping relationship based on the first type of intra-frame prediction mode index. In some embodiments of this application, the second determining portion 20 is further configured to determine the first index of the second type of intra-prediction mode of the current block based on the first type of intra-prediction mode weighted matrix indicated by the first type of intra-prediction mode parameters. In some embodiments of this application, the second determining portion 20 is further configured to determine the gradient parameters of the weighting matrix of the first type of intra-frame prediction mode; The first index of the second type of intra-prediction mode of the current block is determined based on the gradient parameters of the weighted matrix of the first type of intra-prediction mode. In some embodiments of this application, the second determining portion 20 is further configured to perform wide-angle mapping on the first index of the second type of intra-frame prediction mode to determine the wide-angle prediction mode index; The first transformation parameter is determined based on the wide-angle prediction mode index. In some embodiments of this application, the second transformation portion 22 is further configured to transform the residual value to obtain second transformation coefficients; The second transformation coefficients are transformed using the scan order parameters of the transformation parameters to obtain the second transformation coefficient vector; The second transformation coefficient vector is transformed using the transformation matrix indicated by the transformation kernel index parameter to obtain the first transformation coefficient vector. The first transformation coefficient vector is transformed to obtain the first transformation coefficients; The first transform coefficient is quantized to obtain the quantization coefficient of the current block, and the quantization coefficient is the transform coefficient of the current block. Based on the same inventive concept as the foregoing embodiments, referring to Figure 12, which shows a schematic diagram of the composition structure of an encoder provided in an embodiment of this application. As shown in Figure 12, the encoder may include: a second communication interface 1201, a second memory 1202, and a second processor 1203; the various components are coupled together through a second bus system 1204. It is understood that the second bus system 1204 is used to realize the connection and communication between these components. In addition to a data bus, the second bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the second bus system 1204 in Figure 12. The second communication interface 1201 is used for receiving and sending signals during the process of sending and receiving information with other external network elements; The second memory 1202 is configured to store computer programs running on the second processor; The second processor 1201 is configured to execute the encoder-based method when running the computer program. It is understood that the second memory 1202 has similar hardware functions to the first memory 1002, and the second processor 1203 has similar hardware functions to the first processor 1003; details will not be elaborated here. This application provides a computer-readable storage medium storing a computer program that, when executed by a first processor, implements the method described in the decoder, or when executed by a second processor, implements the method described in the encoder. The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims. Industrial applicability In this embodiment, a first predicted value for the current block is determined based on parameters of a first type of intra-frame prediction mode; a first transform parameter for the current block is determined based on the first predicted value or the parameters of the first type of intra-frame prediction mode; a second transform parameter for transforming the current block is determined based on the first transform parameter; the transform coefficients of the current block are transformed based on the second transform parameter to determine the residual value of the current block; and the reconstructed value of the current block is determined based on the residual value and the first predicted value. Thus, for a current block using a first type of intra-frame prediction mode (e.g., MIP), the introduction of the first predicted value or the parameters of the first type of intra-frame prediction mode during LFNST transformation makes the selection of the transform kernel or transform matrix (corresponding to the second transform parameter) more flexible. This not only improves the applicability of non-traditional intra-frame prediction modes (first type of intra-frame prediction modes) but also improves decoding efficiency and enhances video image quality.

Claims

1. A video decoding method, applied to a decoder, the method comprising: : Decode the bitstream to determine the first type of intra-prediction mode parameters for the current block. ; Based on the first type of intra-frame prediction mode parameters, determine the first prediction value of the current block. ; The first transform parameter of the current block is determined based on the first predicted value of the current block or the first type of intra-frame prediction mode parameter. ; Based on the first transformation parameters, determine the second transformation parameters for transforming the current block. ; Based on the second transformation parameters, the transformation coefficients of the current block are transformed to determine the residual value of the current block. ; Based on the residual value and the first predicted value, the reconstruction value of the current block is determined. 。 2. The method according to claim 1 The step of determining the first transform parameter of the current block based on the first predicted value of the current block or the first type of intra-frame prediction parameter includes: Based on the first prediction value of the current block, determine the first index of the second type of intra-frame prediction mode of the current block; Based on the first index of the second type of intra-prediction mode of the current block, determine the first transform of the current block. parameter.

3. As described in claim 1 The method, wherein determining the first transform parameter of the current block based on the first predicted value of the current block or the first type of intra-frame prediction parameter includes: Based on the first type of intra-prediction mode parameters, determine the first index of the second type of intra-prediction mode of the current block; Based on the first index of the second type of intra-frame prediction mode, determine the first [index] of the current block. Transform parameters.

4. As described in claim 2 or 3 The method, in which, The second type of intra-frame prediction mode includes at least one of the following: planar mode, DC mode, and intra-frame prediction mode. Angle prediction mode.

5. According to claim 2 or 3. The method, wherein the method further includes: Set the first transform parameter of the current block to be equal to the second type of intra-frame pre-transformation parameter of the current block. The first index of the test mode.

6. According to claims 1 to 5 The method of any one of the claims, wherein determining the second transformation parameters for transforming the current block based on the first transformation parameters, includes: Based on a preset first mapping table between the first transformation parameters and the second transformation parameters, determine the pair corresponding to the first transformation parameters. The corresponding second transformation parameter.

7. According to the rights Find the method described in 1 or 6, where, The second transform parameter includes at least one of the following: a transform kernel index parameter and a transform parameter scan order parameter; wherein, the transform kernel index parameter indicates the transform kernel used in the decoding process of the transform parameters of the current block; the scan order parameter indicates the scan order of the transform parameters, and the scan order... The order includes horizontal order and vertical order.

8. According to the method of claim 2, wherein determining the first index of the second type of intra-frame prediction mode of the current block based on the first prediction value of the current block includes: Based on the first predicted value, determine the index set of the second type of intra-frame prediction mode of the first predicted value; Based on the index set of the second type of intra-prediction modes of the first predicted value, a first index of the second type of intra-prediction mode of the current block is determined; wherein, the index set of the second type of intra-prediction modes stores a portion or... The cumulative weight value corresponding to all allowed values.

9. The method of claim 8, wherein determining the index set of a second type of conventional intra-frame prediction mode based on the first prediction value of the current block comprises: For some or all of the predicted values ​​in the first predicted value, determine the horizontal gradient value and vertical gradient value of the sampling point corresponding to the some or all predicted values; The first predicted value is determined based on the horizontal and vertical gradient values ​​of the sampling points. The index set of the second type of intra-frame prediction mode 。 10. The method according to claim 9, wherein determining the index set of the second type of intra-frame prediction mode of the first prediction value based on the horizontal gradient value and the vertical gradient value of the sampling point comprises: The gradient angle value of the sampling point is determined based on the horizontal gradient value and the vertical gradient value of the sampling point. Based on the gradient angle value of the sampling point, determine the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value; Update the index set of the second type of intra-prediction mode corresponding to the determined first... Cumulative weight of the second index of the second type of intra-prediction mode Repetition value.

11. The method according to claim 10, wherein determining the gradient angle value of the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point comprises: Based on the horizontal and vertical gradient values ​​of the sampling points, And a preset functional relationship, to determine the sampling points Gradient angle value.

12. The method according to claim 11, wherein the preset functional relationship is an arctangent function; wherein the arctangent function is the ratio of the horizontal gradient value to the vertical gradient value of the sampling point; The step of determining the gradient angle value of the sampling point based on the horizontal and vertical gradient values ​​of the sampling point and a preset functional relationship includes: Based on the arctangent function, the horizontal gradient value and the vertical gradient value of the sampling point are... The ratio of the gradient values ​​is processed to determine the sampling. The gradient angle value of the sample point.

13. The method according to claim 11, wherein the preset functional relationship is the gradient angle value of the sampling point and the... A second mapping table between the horizontal and vertical gradient values ​​of the sampling points; The horizontal gradient value and the vertical gradient based on the sampling points The gradient angle value of the sampling point is determined based on the value and a preset functional relationship, including: The horizontal and vertical gradient values ​​of the sampling points, or the horizontal and vertical gradient values ​​of the sampling points... The ratio of degree values ​​is input into the second mapping table, and the output is... The gradient angle value of the sampling point.

14. The method of claim 10, wherein determining the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value based on the gradient angle value of the sampling point comprises: From the intra-angle prediction directions indicated by some or all of the allowable values ​​of the index of the second type of intra-frame prediction mode, determine the second type of intra-frame prediction mode index value corresponding to the intra-frame angle prediction direction with the smallest angle between it and the direction indicated by the gradient angle value. The first gradient angle value The second index of the type II intra-frame prediction mode is set to... The index value of the second type of intra-frame prediction mode.

15. The method of claim 10, wherein determining a second index of a second type of intra-frame prediction mode corresponding to the gradient angle value of the sampling point comprises: Based on the preset gradient angle value and the second type of intra-frame prediction mode index, the first... A three-map table is used to determine the corresponding gradient angle value. The second index of the second type of intra-prediction mode.

16. The method according to claim 15, wherein, The third mapping table represents Gradient angles of different values ​​or within different ranges The correspondence between the values ​​and the indexes of the second type of intra-frame prediction mode.

17. The method of claim 10, wherein updating the index set of the second type of intra-prediction mode corresponds to the cumulative weight value of the second index of the determined second type of intra-prediction mode, comprising: For the second type of intra-frame prediction mode The index set corresponds to the determined second type of intra-frame. Accumulation of the second index of the prediction pattern The weight value is increased by the set value.

18. According to the right The method described in claim 17, wherein, The set value is equal to 1.

19. The claim 17 The method, in which, The set values, etc. The sum of the absolute values ​​of the horizontal gradient and the absolute values ​​of the vertical gradient.

20. The method of claim 8, wherein determining the first index of the second type of intra-prediction mode of the current block based on the index set of the second type of intra-prediction modes of the first prediction value comprises: The first index of the second type of intra-frame prediction mode of the current block. The second type of intra-frame prediction mode set as the first prediction value The second index of the second type of prediction pattern corresponds to the largest cumulative weight value in the index set of the formula.

21. The method according to claim 2 or 20, wherein determining the first index of the second type of intra-frame prediction mode of the current block based on the first prediction value of the current block comprises: Based on the candidate second-type intra prediction mode, determine the second-type intra prediction mode for the current block. Predicted value; Based on the first intra-frame prediction value and the... The second type of intra-frame prediction value is used to determine the first index of the second type of intra-frame prediction mode of the current block.

22. The claim 21 Method, in which, The candidate second type intra-frame pre The prediction modes include one or more of the following intra-frame prediction modes: planar mode, DC mode, and intra-frame angle prediction mode.

23. The method according to claim 21, wherein determining the first index of the second type of intra-prediction mode of the current block based on the first intra-prediction value and the second type of intra-prediction value comprises: Determine the first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value; The first pre Candidates corresponding to the measurement error when the first preset condition is met The index value corresponding to the second type of intra-prediction mode is determined as the first index of the second type of intra-prediction mode of the current block.

24. The method of claim 23, wherein determining the first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value comprises: Based on the first error criterion, the first prediction difference between the first intra-frame prediction value and the second type of intra-frame prediction value is determined. Among them, the first An error criterion is one of the following error criteria: absolute. The sum of errors, the sum of squared errors, the mean absolute error, and the mean square error; the first preset condition is that the first prediction error reaches its minimum value.

25. The method of claim 23, wherein determining the first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value comprises: Based on the second error criterion, the first intra-frame prediction value and the second type of intra-frame prediction value are determined. The first prediction difference; Among them, the first The two error criteria are one of the following error criteria: signal-to-noise ratio and peak signal-to-noise ratio; the first preset condition is that the first prediction error reaches its maximum value.

26. The method according to claim 10, wherein determining the index set of the second type of intra-frame prediction mode of the first prediction value based on the horizontal gradient value and the vertical gradient value of the sampling point comprises: Based on the horizontal and vertical gradient values ​​of the sampling point, the gradient direction, first gradient intensity, and mode partition corresponding to the sampling point are determined. The gradient direction corresponding to the sampling point, the first gradient intensity, and the modulus Partitioning to determine the second type of intra-frame prediction mode. Two-index; Update the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode.

27. The method according to claim 26, wherein determining the gradient direction, first gradient intensity, and mode partition corresponding to the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point comprises: Based on the horizontal gradient value and the vertical gradient value of the sampling point, the first gradient intensity of the sampling point is determined; Based on the horizontal and vertical gradient values ​​of the sampling points, the sampling points are partitioned using the second type of intra-frame prediction mode to determine the horizontal region index, vertical region index, and gradient intensity index of the sampling points. Based on the level of the sampling points Region index, the vertical region index, and the gradient intensity Index, to determine the pattern partition of the sampling point; Based on the gradient intensity index of the sampling point, the gradient direction corresponding to the sampling point is determined.

28. The method according to claim 26 or 27, wherein determining the second index of the second type of intra-frame prediction mode, based on the gradient direction corresponding to the sampling point, the first gradient intensity, and the mode partition, comprises: The gradient offset ratio of the sampling point is determined based on the gradient direction corresponding to the sampling point. The gradient offset ratio of the sampling point is mapped to a preset mode offset range to obtain the intra-frame prediction mode index offset of the sampling point; Based on the fourth mapping table of preset mode partitions and mode indexes, the corresponding sampling point is determined. The target type II intra-frame pre-defined pattern partition corresponds to the above pattern partition. Test mode; By combining the target second type intra-prediction mode and the intra-prediction mode index offset, the second index of the second type intra-prediction mode of the sampling point is determined.

29. The method of claim 3, wherein determining the second type of intra-frame prediction mode parameters for the current block based on the first type of intra-frame prediction mode parameters. The first index of the intra-prediction mode includes: Based on the first preset mapping relationship between the first type of intra-prediction mode parameters and the second type of intra-prediction mode index, the first index of the second type of intra-prediction mode of the current block is determined.

30. The method according to claim 29, wherein the first type of intra-frame prediction mode parameter includes: a first type of intra-frame prediction mode index; the first preset mapping relationship represents the correspondence between the first type of intra-frame prediction mode index and the second type of intra-frame prediction mode index; The first preset mapping based on the first type of intra-frame prediction mode parameters and the second type of intra-frame prediction mode index The relationship between the two is used to determine the second one of the current blocks. The first index of the intra-prediction mode includes: Based on the first type of intra-frame prediction mode index, the first index of the second type of intra-frame prediction mode is determined from the first preset mapping relationship.

31. The method according to claim 3, wherein the step of determining based on the first type of intra-frame prediction mode parameters... Define the second type of intra-frame prediction mode of the current block The first index includes: Based on the weighted matrix of the first type of intra-prediction mode indicated by the first type of intra-prediction mode parameters, the first index of the second type of intra-prediction mode of the current block is determined.

32. The method of claim 31, wherein the step of determining the second type of intra-prediction mode weighting matrix of the current block based on the first type of intra-prediction mode parameter indicated by the first type of intra-prediction mode weighting matrix is... The first index of the test mode includes: Determine Describe the gradient parameters of the weighting matrix of the first type of intra-prediction mode; The first index of the second type of intra-prediction mode of the current block is determined based on the gradient parameters of the weighted matrix of the first type of intra-prediction mode.

33. The method according to claim 2, wherein the method based on the second type of intra-frame prediction mode... The first index determines the first change of the current block. Changing parameters, including: The first index of the second type of intra-frame prediction mode is mapped wide-angle to determine the wide-angle prediction mode index. The first transformation parameter is determined based on the wide-angle prediction mode index.

34. The method according to claim 7, wherein the transform coefficients include: quantization coefficients; and the step of transforming the transform coefficients of the current block based on the second transform parameter to determine the residual value of the current block includes: The quantization coefficients are dequantized to obtain the first transformation coefficients; The first transformation coefficients are transformed to obtain the first transformation coefficient vector; Using the transformation matrix indicated by the transformation kernel index parameter, the first transformation is performed. The coefficient vector is transformed to obtain the second transformed coefficient vector; Adopted The scan order parameter of the transformation parameter, for the... The second transformation coefficient vector is transformed to obtain the second transformation coefficients; The second transformation coefficients are inversely transformed to obtain the residual value of the current block. 35 A video encoding method, applied to an encoder, the method comprising: Determine the parameters of the first type of intra-frame prediction mode; According to the above The first type of intra-frame prediction mode parameters are used to determine the first prediction value of the current block and to calculate the current block. The residual value between the original value and the first predicted value; Based on the first predicted value of the current block or the The first type of intra-frame prediction mode parameters determine the current... The first transformation parameter of the front block; Based on the first transformation parameters, determine the second transformation parameters for transforming the current block; Based on the second transformation parameters, the residual value is transformed to obtain the transformation coefficients of the current block.

36. The method of claim 35, wherein the step of basing the prediction on the first prediction value of the current block or the first type of intra-frame prediction mode parameter... Determine the first transformation parameters of the current block, including include: Based on the first prediction value of the current block, determine the first index of the second type of intra-frame prediction mode of the current block; The first transform parameter of the current block is determined based on the first index of the second type of intra-prediction mode of the current block.

37. The method of claim 35, wherein the first prediction value based on the current block or the first Class-intra-prediction parameters, determining the first transform parameters of the current block. Numbers, including: Based on the first type of intra-prediction mode parameters, determine the second type of intra-prediction mode for the current block. First index; Based on the second type of intra-frame prediction mode The first index determines the first transformation parameter of the current block.

38. The method according to claim 36 or 37, wherein, Second type of frame Internal prediction modes include at least one of the following: planar mode, DC mode. And intra-frame angle prediction mode.

39. The method according to claim 36 or 37, wherein the method further comprises: Set the first transform parameter of the current block to be equal to the first index of the second type of intra-prediction mode of the current block.

40. The method according to any one of claims 35 to 39, wherein In this context, determining the second transformation parameters for transforming the current block based on the first transformation parameters includes: The second transformation parameter corresponding to the first transformation parameter is determined according to the first mapping table between the preset first transformation parameter and the second transformation parameter.

41. The method according to claim 35 or 40, wherein, Place The second transformation parameter includes at least one of the following: The transformation kernel index parameter and the scan order parameter of the transformation parameters; wherein, the transformation kernel index parameter indicates the transformation kernel used in the decoding process of the transformation parameters of the current block; the scan order parameter indicates the scan order of the transformation parameters, and the scan order includes horizontal order and vertical order.

42. The method of claim 36, wherein determining the first index of the second type of intra-frame prediction mode of the current block based on the first prediction value of the current block comprises: Based on the first predicted value, determine the second category of the first predicted value. The index set of intra-frame prediction modes; Based on the first The index set of the second type of intra-prediction mode of a predicted value determines the first index of the second type of traditional intra-prediction mode of the current block; wherein the index set of the second type of intra-prediction mode stores the cumulative weight values ​​corresponding to some or all of the allowed values ​​of the index of the second type of intra-prediction mode.

43. The method of claim 42, wherein the step of determining a second type of conventional intra-frame prediction mode based on a first prediction value of the current block... The index set includes: For the first predicted value From some or all of the predicted values, determine the horizontal and vertical gradient values ​​of the sampling points corresponding to the partial or all predicted values; Based on the horizontal and vertical gradient values ​​of the sampling points, the index set of the second type of intra-frame prediction mode for the first prediction value is determined.

44. The method according to claim 43, wherein determining the index set of the second type of intra-frame prediction mode of the first prediction value based on the horizontal gradient value and the vertical gradient value of the sampling point comprises: According to the sampling points Horizontal gradient value and vertical gradient value Determine the gradient angle value of the sampling point; Based on the gradient angle value of the sampling point, determine the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value; Update the index set of the second type of intra prediction mode to correspond to the second index of the determined second type of intra prediction mode. The cumulative weight value of the index.

45. According to the rights The method described in claim 44, wherein determining the gradient angle value of the sampling point based on the horizontal and vertical gradient values ​​of the sampling point includes: Based on the horizontal and vertical gradient values ​​of the sampling points and a preset functional relationship, the gradient angle value of the sampling points is determined.

46. ​​The method according to claim 45, wherein the preset functional relationship is an arctangent function; wherein the arctangent function is the horizontal gradient value of the sampling point and the... The ratio of the vertical gradient values; The basis The gradient angle value of the sampling point is determined by the horizontal and vertical gradient values ​​of the sampling point, and a preset functional relationship, including: Based on the arctangent function, the ratio of the horizontal gradient value to the vertical gradient value of the sampling point is processed to determine the gradient angle value of the sampling point.

47. The method according to claim 45, wherein the preset functional relationship is a second mapping table between the gradient angle value of the sampling point and the horizontal and vertical gradient values ​​of the sampling point; The horizontal ladder based on the sampling points The gradient angle value of the sampling point is determined by the degree value, the vertical gradient value, and a preset functional relationship, including: Input the horizontal and vertical gradient values ​​of the sampling point, or the ratio of the horizontal and vertical gradient values ​​of the sampling point, into the second mapping table, and output the gradient angle value of the sampling point.

48. The method of claim 44, wherein determining the second index of the second type of intra-frame prediction mode corresponding to the gradient angle value based on the gradient angle value of the sampling point comprises: From the index of the second type of intra-frame prediction mode Among the intra-frame angle prediction directions indicated by some or all of the allowed values, determine the second type of intra-frame prediction mode index value corresponding to the intra-frame angle prediction direction with the smallest angle between it and the direction indicated by the gradient angle value. Set the second index of the second type of intra-frame prediction mode of the gradient angle value as the second type of intra-frame prediction mode. Test mode index value.

49. According to claim 4 4. The method wherein, the step of determining a second type of intra-frame prediction mode corresponding to the gradient angle value based on the gradient angle value of the sampling point. The second index includes: According to the preset gradient A third mapping table between angle values ​​and second-type intra-prediction mode indices determines a second index of the second-type intra-prediction mode corresponding to the gradient angle value.

50. The method according to claim 49, wherein, The third mapping table represents the gradient angle values ​​with different values ​​or different ranges of values ​​and the second... The correspondence between intra-frame prediction mode indices.

51. According to claim 44 The method described herein, wherein updating the second type of frame The cumulative weight values ​​of the second index corresponding to the determined second type of intra-prediction mode in the index set of intra-prediction modes include... : Index of the second type of intra-prediction mode The cumulative weight value corresponding to the second index of the determined second type of intra-prediction mode is increased by a set value.

52. The method according to claim 51, wherein, The set value is equal to 1.

53. The method according to claim 51, wherein, The set value is equal to the absolute value of the horizontal gradient value and the absolute value of the vertical gradient value. The sum of values.

54. The method according to claim 42 The method, wherein determining the first index of the second type of intra-prediction mode of the current block based on the index set of the second type of intra-prediction modes of the first prediction value includes: Set the first index of the second type of intra-frame prediction mode of the current block to the second type of intra-frame prediction mode index set with the largest cumulative weight value corresponding to the second type of prediction mode. The second index of the prediction pattern.

55. According to the rights The method described in claim 36 or 54, wherein the determination of the second type of intra-frame prediction mode of the current block based on the first prediction value of the current block... The first index includes: Based on candidate second type frames Intra-prediction mode determines the second type of intra-prediction value for the current block; Based on the first intra-frame prediction value and the second type of intra-frame prediction value, determine the first index of the second type of intra-frame prediction mode of the current block.

56. The method according to claim 55, wherein, The candidate second type of intra-frame prediction mode includes one or more of the following intra-frame prediction modes: planar mode, DC mode, and intra-frame angle prediction mode.

57. According to claims The method of 56, wherein the step according to the The first index of the second type of intra-prediction mode of the current block is determined by comparing the first intra-prediction value with the second type of intra-prediction value, including: Determine the first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value; The index value corresponding to the candidate second type intra-frame prediction mode when the first prediction error satisfies the first preset condition is determined as the first index of the second type intra-frame prediction mode of the current block. 58 The method according to claim 57, wherein The determination of the first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value includes: Based on the first error criterion, the first prediction difference between the first intra-frame prediction value and the second type of intra-frame prediction value is determined. The first error criterion is one of the following: sum of absolute errors, sum of squared errors, mean absolute error, and mean square error; the first preset condition is... The first prediction error reaches its minimum value. 59 According to claim 57, the method wherein determining the first prediction error between the first intra-frame prediction value and the second type of intra-frame prediction value comprises: According to the second error criterion, the first prediction difference between the first intra-frame prediction value and the second type of intra-frame prediction value is determined. The second error criterion is one of the following error criteria: signal-to-noise ratio and peak signal-to-noise ratio; the first preset condition is that the first prediction error reaches its maximum value.

60. The method of claim 44, wherein the step of determining the first predicted value based on the horizontal gradient value and the vertical gradient value of the sampling point... The index set of the second type of intra-frame prediction mode includes : Based on the horizontal and vertical gradient values ​​of the sampling point, the gradient direction, first gradient intensity, and mode partition corresponding to the sampling point are determined. The gradient direction corresponding to the sampling point, the first gradient intensity, and the mode partition are used to determine the second index of the second type of intra-frame prediction mode. Update the cumulative weight value of the second index corresponding to the determined second type of intra-prediction mode in the index set of the second type of intra-prediction mode.

61. The method according to claim 60, wherein determining the gradient direction, first gradient intensity, and mode partition corresponding to the sampling point based on the horizontal gradient value and the vertical gradient value of the sampling point comprises: Based on the horizontal and vertical gradient values ​​of the sampling points, the sampling point is determined. The first gradient strength is described; Based on the water at the sampling points The horizontal gradient value and the vertical gradient value are used to perform partitioning processing of the sampling point for the second type of intra-frame prediction mode, and to determine the horizontal region index, vertical region index and gradient intensity index of the sampling point; Based on the horizontal region index, the vertical region index, and the gradient intensity index of the sampling point, the pattern partition of the sampling point is determined; Based on the gradient intensity index of the sampling point, the gradient direction corresponding to the sampling point is determined.

62. The method according to claim 60 or 61, wherein determining the second index of the second type of intra-frame prediction mode, based on the gradient direction corresponding to the sampling point, the first gradient intensity, and the mode partition, comprises: According to the above sampling The gradient direction corresponding to the sample point determines the gradient of the sample point. Degree offset ratio; The gradient offset ratio of the sampling point is mapped to a preset mode offset range to obtain the intra-frame prediction mode index offset of the sampling point; Based on the fourth mapping table of preset mode partitions and mode indexes, determine the target second type intra-frame prediction mode corresponding to the mode partition of the sampling point; Combining the target's second type of intra-frame prediction mode and the The intra-prediction mode index offset is used to determine the second index of the second type of intra-prediction mode for the sampling point.

63. The method according to claim 37, wherein determining the first index of the second type of intra-prediction mode of the current block based on the first type of intra-prediction mode parameters comprises: Based on the first preset mapping relationship between the first type of intra-prediction mode parameters and the second type of intra-prediction mode index, the first index of the second type of intra-prediction mode of the current block is determined.

64. The method according to claim 63, wherein the first One type of intra-frame prediction mode parameters includes: Type I frames Intra-prediction mode index; the first preset mapping relationship represents the correspondence between the first type of intra-prediction mode index and the second type of intra-prediction mode index; The second type of frame in the current block is determined based on the first preset mapping relationship between the first type of intra-frame prediction mode parameters and the second type of intra-frame prediction mode index. The first index of the internal prediction pattern includes: according to The first index of the first type of intra-frame prediction mode is described, and the first index of the second type of intra-frame prediction mode is determined from the first preset mapping relationship.

65. The method of claim 37, wherein determining the first index of the second type of intra-prediction mode of the current block based on the first type of intra-prediction mode parameters comprises: The first type of intra-prediction based on the first type of intra-prediction mode parameters indicates the first type of intra-prediction. The pattern weighting matrix determines the current block's... The first index of the second type of intra-prediction mode.

66. The method of claim 65, wherein determining the first index of the second type of intra-prediction mode of the current block based on the first type of intra-prediction mode weighted matrix indicated by the first type of intra-prediction mode parameters comprises: Determine the first type Gradient parameters of the intra-prediction mode weighting matrix; The first index of the second type of intra-prediction mode of the current block is determined based on the gradient parameters of the weighted matrix of the first type of intra-prediction mode.

67. The method of claim 36, wherein determining the first transform parameter of the current block based on the first index of the second type of intra-frame prediction mode comprises: The first index of the second type of intra-frame prediction mode is mapped wide-angle to determine the wide-angle prediction mode index. The first transformation parameter is determined based on the wide-angle prediction mode index.

68. The method according to claim 41, wherein the transformation of the residual value based on the second transformation parameter is... The transformation coefficients of the current block are obtained, including... : The residual value is transformed to obtain the second transformation coefficient; Scan using the transformation parameters The sequence parameters are used to transform the second transformation coefficients, resulting in the second transformation coefficient vector. Using the transformation kernel index parameter The transformation matrix indicated by the number is used to transform the second transformation coefficient vector to obtain the first transformation coefficient vector; Transform the first transformation coefficient vector to obtain the second... One transformation coefficient; The first transform coefficients are quantized to obtain the quantization coefficients of the current block. The quantization coefficients are the transformation coefficients of the current block.

69. A decoder, the decoder comprising: The decoding section is configured to decode the bitstream, determining when... The first type of intra-prediction mode parameters of the preceding block; The first prediction part is configured to predict based on the first type of intra-frame prediction. Mode parameters determine the first mode of the current block. Predicted value; The first determining part is configured based on the first part of the current block. The predicted value or the first type of intra-frame prediction mode parameter is used to determine the first transform parameter of the current block; and based on the first transform... Parameters, which determine the second transformation parameters for transforming the current block; The first transformation part is configured to transform the transformation coefficients of the current block based on the second transformation parameters to determine the residual value of the current block; Reconstruction section, It is configured to determine the reconstruction value of the current block based on the residual value and the first prediction value. 7 0. An encoder, the encoder comprising: The second determining part is configured to determine the parameters of the first type of intra-frame prediction mode; Second prediction Part of it is configured to be based on the first type of frame Internal prediction mode parameters are used to determine the first prediction value of the current block; The second determination Partially, it is also configured to calculate the residual value between the original value of the current block and the first predicted value; and based on the first value of the current block... Predicted value or the first type of intra-frame prediction mode Parameters, determining the first transformation parameters of the current block; and based on the first transformation parameters The number determines the second transformation parameters for transforming the current block; The second transformation part is configured to, based on the second transformation parameters, perform... The residual value is transformed to obtain the current value. Transformation coefficients of the previous block.

70. A decoder, the decoder comprising: The first memory is configured to store computer programs running on the first processor; The first processor is configured to, when running the computer program, perform the operations described in claims 1 to 3.

4. The method described in any one of the above.

71. An encoder, the encoder comprising: The second memory is configured to store computer programs running on the second processor; The second processor is configured to perform the method as described in any one of claims 35 to 68 when running the computer program.

72. A computer-readable storage medium storing a computer program that, when executed by a first processor, implements the method as claimed in any one of claims 1 to 34, or when executed by a second processor, implements the method as claimed in any one of claims 35 to 68.

Citation Information

Cited By

  • Encoding method, decoding method, bitstream, encoder, decoder, and storage medium

    WO2026143519A1

  • Encoding method, decoding method, encoders, decoders and storage medium

    WO2026193658A1

  • Encoding method, decoding method, encoder, decoder, storage medium, and bitstream

    WO2026193709A1