Transformation method, encoder, decoder, and storage medium

By directly determining the LFNST transformation core based on the CCLM parameters in the encoder and decoder, the problem of poor applicability of LFNST technology to CCLM mode in H.266/VVC is solved, simplifying the encoding process and improving the encoding efficiency.

CN119788855AActive Publication Date: 2025-04-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411925403.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2019-12-31
Publication Date
2025-04-08
Estimated Expiration
2039-12-31

AI Technical Summary

Technical Problem

The LFNST technology in H.266/VVC has poor applicability to the CCLM mode, and the additional mapping processing increases the complexity of the encoding process and reduces the encoding efficiency.

Method used

By directly determining the LFNST transformation core in the encoder and decoder based on the CCLM parameters, the transformation process is simplified.

Benefits of technology

It improves the applicability of LFNST technology to the CCLM mode, reduces the transformation steps in the encoding process, and improves the encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788855A_ABST
    Figure CN119788855A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a transformation method, an encoder, a decoder and a storage medium. The encoder determines a prediction mode parameter of a current block; determining a CCLM parameter when the prediction mode parameter indicates that the current block determines an intra prediction value using CCLM; determining an intra-frame prediction value of the current block according to the CCLM parameter, and calculating a prediction difference value between the current block and the intra-frame prediction value; when the current block uses the LFNST, determining an LFNST transform kernel used by the current block according to the CCLM parameter, setting an LFNST index sequence number, and writing the LFNST index sequence number into a video code stream; and performing transformation processing on the prediction difference value by using an LFNST transformation kernel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a transformation method, an encoder, a decoder, and a storage medium. Background Art

[0002] As people's requirements for video display quality increase, new video applications such as high-definition and ultra-high-definition video have emerged. H.265 / High Efficiency Video Coding (HEVC) can no longer meet the needs of the rapid development of video applications. The Joint Video Exploration Team (JVET) has proposed the next-generation video coding standard H.266 / Versatile Video Coding (VVC), and its corresponding test model is the VVC reference software test platform (VVC Test Model, VTM).

[0003] At present, the simplified secondary transform (Reduced Second Transform, RST) technology has been accepted in H.266 / VVC and renamed as Low-Frequency Non-Separable Transform (LFNST) technology. Among them, the LFNST technology mainly includes five steps: configuring core parameters, intra-frame prediction mode mapping, transform matrix selection, matrix multiplication calculation, and primary transform coefficient matrix construction. Specifically, since the transform matrix in LFNST is related to the directional characteristics of the prediction mode, the selection of the transform matrix is ​​achieved by determining the transform set corresponding to the intra-frame prediction mode. For non-traditional intra-frame prediction modes, such as the Cross-component Linear Model Prediction (CCLM) mode, it is necessary to map it to the traditional intra-frame prediction mode before selecting the transform kernel candidate set. In other words, the LFNST technology is less applicable to the CCLM mode, and the additional mapping process increases the transformation process of the LFNST technology, thereby reducing the coding efficiency. Summary of the invention

[0004] The embodiments of the present application provide a transformation method, an encoder, a decoder, and a storage medium, which can improve the applicability of the LFNST technology to the CCLM mode, reduce the transformation process of the LFNST technology, and effectively improve the coding efficiency.

[0005] The technical solution of the embodiment of the present application can be implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a transformation method, which is applied to an encoder, and the method includes:

[0007] Determining prediction mode parameters for the current block;

[0008] When the prediction mode parameter indicates that the current block uses CCLM to determine an intra-frame prediction value, determining a CCLM parameter;

[0009] Determine an intra-frame prediction value of the current block according to the CCLM parameter, and calculate a prediction difference between the current block and the intra-frame prediction value;

[0010] When the current block uses LFNST, determine the LFNST transformation kernel used by the current block according to the CCLM parameters, set the LFNST index number and write it into the video bitstream;

[0011] The prediction difference is transformed using the LFNST transformation kernel.

[0012] In a second aspect, an embodiment of the present application provides a transformation method, which is applied to a decoder, and the method includes:

[0013] Parse the bitstream and determine the prediction mode parameters of the current block;

[0014] When the prediction mode parameter indicates that the current block uses the CCLM mode to determine the intra-frame prediction value, parsing the bitstream to determine the CCLM parameter;

[0015] Parsing the bitstream to determine the transform coefficient and LFNST index number of the current block;

[0016] When the LFNST index number indicates that the current block uses LFNST, determining, according to the CCLM parameter, an LFNST transformation kernel used by the current block;

[0017] The transform coefficients are transformed using the LFNST transform kernel.

[0018] In a third aspect, an embodiment of the present application provides an encoder, the encoder comprising: a first determining part, a calculating part, a first transforming part,

[0019] The first determining part is configured to determine a prediction mode parameter of the current block; and when the prediction mode parameter indicates that the current block uses CCLM to determine an intra-frame prediction value, determine a CCLM parameter; and determine the intra-frame prediction value of the current block according to the CCLM parameter;

[0020] The calculation part is configured to calculate the prediction difference between the current block and the intra-frame prediction value according to the CCLM parameter;

[0021] The first determining part is further configured to determine the LFNST transformation core used by the current block according to the CCLM parameter when the current block uses LFNST, set the LFNST index number and write it into the video bitstream;

[0022] The first transformation part is configured to use the LFNST transformation kernel to perform transformation processing on the prediction difference.

[0023] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first processor and a first memory storing instructions executable by the first processor, wherein when the instructions are executed, the first processor implements the transformation method as described above.

[0024] In a fifth aspect, an embodiment of the present application provides a decoder, the decoder comprising: a parsing part, a second determining part, a second transforming part,

[0025] The parsing part is configured to parse the code stream to determine the prediction mode parameters of the current block; and parse the code stream when the prediction mode parameters indicate that the current block uses the CCLM mode to determine the intra-frame prediction value;

[0026] The second determining part is configured to determine CCLM parameters; and parse the bitstream to determine the transform coefficient and LFNST index number of the current block; and when the LFNST index number indicates that the current block uses LFNST, determine the LFNST transform kernel used by the current block according to the CCLM parameters;

[0027] The second transform section is configured to use the LFNST transform kernel to perform transform processing on the transform coefficients.

[0028] In a sixth aspect, an embodiment of the present application provides a decoder, comprising a second processor and a second memory storing instructions executable by the second processor, wherein when the instructions are executed, the second processor implements the transformation method as described above.

[0029] In a seventh aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a first processor and a second processor, the transformation method as described above is implemented.

[0030] The embodiment of the present application provides a transformation method, an encoder, a decoder and a storage medium, wherein the encoder determines the prediction mode parameters of the current block; when the prediction mode parameters indicate that the current block uses CCLM to determine the intra-frame prediction value, the CCLM parameters are determined; according to the CCLM parameters, the intra-frame prediction value of the current block is determined, and the prediction difference between the current block and the intra-frame prediction value is calculated; when the current block uses LFNST, according to the CCLM parameters, the LFNST transformation core used by the current block is determined, the LFNST index number is set and written into the video bitstream; the prediction difference is transformed using the LFNST transformation core. The decoder parses the bitstream to determine the prediction mode parameters of the current block; when the prediction mode parameters indicate that the current block uses CCLM mode to determine the intra-frame prediction value, the bitstream is parsed to determine the CCLM parameters; the bitstream is parsed to determine the transformation coefficient and the LFNST index number of the current block; when the LFNST index number indicates that the current block uses LFNST, the LFNST transformation core used by the current block is determined according to the CCLM parameters; and the transformation coefficient is transformed using the LFNST transformation core. It can be seen that in the embodiment of the present application, when the codec performs transformation processing on the current block using the CCLM mode for intra-frame prediction, it is not necessary to map the CCLM mode to the traditional intra-frame prediction mode, but can directly determine the LFNST transformation kernel used by the current block according to the CCLM parameters corresponding to the current block, so that the LFNST transformation kernel can be used for LFNST transformation. It can be understood that it is precisely because the CCLM parameters are introduced when performing the LFNST transformation that the selection of the LFNST transformation kernel is more flexible, thereby improving the applicability of the LFNST technology to the CCLM mode, reducing the transformation process of the LFNST technology, and effectively improving the coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a schematic diagram of the application of LFNST technology;

[0032] Figure 2 This is a flowchart of the specific process of LFNST;

[0033] Figure 3 A schematic diagram of a brightness block at the center of a brightness position;

[0034] Figure 4 It is a block diagram of the video coding system;

[0035] Figure 5 The block diagram of the video decoding system is as follows;

[0036] Figure 6 The following is a schematic diagram of the implementation process of the transformation method. Figure 1 ;

[0037] Figure 7The following is a schematic diagram of the implementation process of the transformation method. Figure 2 ;

[0038] Figure 8 The following is a schematic diagram of the implementation process of the transformation method. Figure 3 ;

[0039] Fig. 9 Schematic diagram of the calculation process of matrix multiplication of LFNST technology Figure 1 ;

[0040] Fig.10 Schematic diagram of the calculation process of matrix multiplication of LFNST technology Figure 2 ;

[0041] Fig.11 The structure frame of LFNST transformation Figure 1 ;

[0042] Fig.12 The structure frame of LFNST transformation Figure 2 ;

[0043] Fig.13 The structure frame of LFNST transformation Figure 3 ;

[0044] Fig.14 The structure frame of LFNST transformation Figure 4 ;

[0045] Fig.15 The following is a schematic diagram of the implementation process of the transformation method. Figure 4 ;

[0046] Fig.16 It is a schematic diagram of the LFNST transformation process;

[0047] Fig.17 The following is a schematic diagram of the implementation process of the transformation method. Figure 5 ;

[0048] Fig.18 The following is a schematic diagram of the implementation process of the transformation method. Figure 6 ;

[0049] Fig.19 The structure of the encoder is shown in Figure 2. Figure 1 ;

[0050] Fig. 20 The structure of the encoder is shown in Figure 2. Figure 2 ;

[0051] Fig.21 The structure of the decoder is shown in Figure 2. Figure 1 ;

[0052] Fig. 22 The structure of the decoder is shown in Figure 2. Figure 2 . DETAILED DESCRIPTION

[0053] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0054] In a video image, a first image component, a second image component and a third image component are generally used to represent a coding block (Coding Block, CB); wherein the three image components are a brightness component, a blue chrominance component and a red chrominance component, respectively. Specifically, the brightness 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 the YCbCr format or in the YUV format.

[0055] In the embodiment of the present application, the first image component may be a brightness component, the second image component may be a blue chrominance component, and the third image component may be a red chrominance component, but the embodiment of the present application does not make any specific limitation.

[0056] In H.266, in order to further improve the coding performance and coding efficiency, the cross-component prediction (CCP) was extended and improved, and the cross-component linear model prediction (CCLM) was proposed. In H.266, CCLM realizes the prediction from the first image component to the second image component, from the first image component to the third image component, and between the second image component and the third image component.

[0057] Specifically, in the embodiment of the present application, when the CCLM method realizes the prediction of the luminance component to the chrominance component, in order to reduce the redundancy between the luminance component and the chrominance component and between different chrominance components, the inter-component linear model prediction mode is used in the next generation video coding standard. For example, according to formula (1), the predicted value of chrominance is constructed using the reconstructed luminance value of the same coding block:

[0058] Pred C [i,j]=α·Rec L [i,j]+β (1)

[0059] Among them, i, j represent the position coordinates of the sampling point in the coding block, i represents the horizontal direction, j represents the vertical direction, Pred C[i, j] represents the predicted value of the second image component of the sampling point with the position coordinates [i, j] in the coding block, Rec L [i, j] represents the reconstructed value of the first image component of the sampling point with the position coordinate [i, j] in the same coding block (after downsampling), α and β are the scaling factors of the linear model, which can be derived by minimizing the regression error between the adjacent reference values ​​of the first image component and the adjacent reference values ​​of the second image component, as shown in the following formula (2):

[0060]

[0061] Wherein, L(n) represents the adjacent reference values ​​of the downsampled first image component (e.g., the left side and the top side), C(n) represents the adjacent reference values ​​of the second image component (e.g., the left side and the top side), and N is the number of adjacent reference values ​​of the second image component.

[0062] Specifically, in addition to a method for predicting a chrominance component using a luminance component, that is, a method for predicting a second image component using a first image component, or a method for predicting a third image component using a first image component, the CCLM mode also includes a prediction between two chrominance components, that is, a prediction method between the second image component and the third image component. In an embodiment of the present application, the Cr component can be predicted from the Cb component, or the Cb component can be predicted from the Cr component.

[0063] It should be noted that in the embodiments of the present application, the prediction between the chrominance components in CCLM, that is, the prediction between the second image component and the third image component, can be applied to the residual domain. Taking the prediction of the Cr component as an example, the Cb residual can be used to predict the Cr residual. The final prediction value of the Cr component is obtained by adding a weighted reconstructed Cb residual to the traditional intra-frame prediction value of the Cr component, as shown in formula (3):

[0064] Pred* Cr [i,j]=γ·resi Cb '[i,j]+Pred Cr [i,j] (3)

[0065] in, Represents the final predicted value of the Cr component of the sampling point with position coordinates [i, j] in the current coding block, resi Cb '[i,j] is the prediction residual of the reconstructed Cb component. The calculation method of the scale factor γ is the same as the calculation method of the prediction model parameters of the luminance component to the chrominance component in CCLM. The only difference is that a regression cost related to the default γ value in the error function is added, so that the obtained scale factor γ can be biased towards the default value of -0.5. Specifically, the scale factor γ can be calculated by formula (4).

[0066]

[0067] Wherein, Cb(n) represents the adjacent reference Cb value of the current coding block, Cr(n) represents the adjacent reference Cr value of the current coding block, and λ may be an empirical value, for example, λ=∑(Cb(n)·Cb(n))>>9.

[0068] H.266 / VVC accepted the RST technology proposed by LGE in JVET-N0193 and renamed it LFNST technology. In subsequent meetings, as the standard was formulated, the LFNST technology was continuously optimized. The following is a description of the current technical solutions for the LFNST technology.

[0069] Figure 1 For the application diagram of LFNST technology, see Figure 1 , which shows a schematic diagram of the application location of a LFNST technology provided by a related technical solution. Figure 1 As shown, in the intra prediction mode, for the encoder side, the LFNST technology is applied between the forward primary transform unit 11 and the quantization unit 12, and the LFNST technology is applied between the inverse quantization unit 13 and the inverse primary transform unit 14.

[0070] Specifically, on the encoder side, first, the data, such as the prediction residual (which can be represented by residual), is subjected to a first transformation (which can be called "Core Transform" or "primary transform" or "main transform") through the positive primary transform unit 11 to obtain a transform coefficient matrix after the first transformation; then, an LFNST transform (which can be called "Secondary Transform" or "secondary transform") is performed on the coefficients in the transform coefficient matrix to obtain a LFNST transform coefficient matrix, and finally, the LFNST transform coefficient matrix is ​​quantized through the quantization unit 12, and the final quantized value is written into the bitstream.

[0071] On the decoder side, by parsing the bitstream, the quantized value of the LFNST transform coefficient matrix can be obtained, and the quantized value is dequantized by the dequantization unit 13 (which can be called "Scaling") to obtain the restored value of the LFNST transform coefficient matrix. The restored value is subjected to an inverse LFNST transform to obtain the coefficient matrix; and then the coefficient matrix is ​​subjected to an inverse transform corresponding to the "Core Transform" on the encoder side by the inverse transform unit 14, and finally the restored value of the residual is obtained. It should be noted that the standard only defines the "inverse transform" operation on the decoder side, so the "reverse LFNST transform" is also referred to as the "LFNST transform" in the standard; in order to facilitate the distinction from the transform on the encoder side, the encoder side "LFNST transform" can be referred to as the "forward LFNST transform" and the decoder side "LFNST transform" can be referred to as the "reverse LFNST transform" in the embodiment of the present application.

[0072] That is to say, on the encoder side, the prediction residual of the current transform block can obtain the primary transform coefficient through the positive primary transform, and then some of the primary transform coefficients are transformed secondary through matrix multiplication to obtain fewer and more concentrated secondary transform coefficients, which are then quantized; on the decoder side, after parsing the quantization value, it is inverse quantized, the inverse quantized coefficients are inversely transformed secondary through matrix multiplication, and then the coefficients after the inverse secondary transform are inversely transformed primary to restore the prediction residual.

[0073] In LFNST technology, the LFNST transformation process can mainly include the following steps: configuring core parameters, intra-frame prediction mode mapping, selecting transformation matrix, calculating matrix multiplication, and constructing inverse primary transformation coefficient matrix; after these steps are processed, the LFNST transformation is completed. However, in the step of selecting the transformation matrix, it is necessary to first select a transformation set. Since the transformation matrix is ​​related to the directional characteristics of the prediction mode, the transformation set is currently selected based on the intra-frame prediction mode. Among them, for the traditional intra-frame prediction mode, the value of the intra-frame prediction mode indicator can be determined according to the number of the traditional intra-frame prediction mode, and then the transform set index number can be determined according to the value of the intra-frame prediction mode indicator.

[0074] Specifically, Figure 2 This is a flowchart of the specific process of LFNST, such as Figure 2As shown, the specific process of LFNST can be divided into five steps, including configuring core parameters, intra-frame prediction mode mapping, selecting transformation matrix, calculating matrix multiplication and constructing inverse primary transformation coefficient matrix. Among them, for intra-frame prediction mode mapping, this step is used to determine the value of predModeIntra, which can mainly include: non-traditional intra-frame prediction mode mapping and wide-angle mapping; for selecting transformation matrix, this step is used to select transformation set and transformation matrix, which can mainly include: selecting transformation set, selecting transformation matrix group and selecting transformation matrix size.

[0075] For configuring the core parameters, first you need to configure the length of the input secondary transform coefficient vector for LFNST calculation (which can be represented by nonZeroSize) and the length of the output primary transform coefficient vector (which can be represented by nLfnstOutSzie).

[0076] In addition, the parameter nLfnstSize needs to be configured, indicating that there will be only one transform coefficient within the first nLfnstSize×nLfnstSize range in the current block. At this time, by parsing the bit stream, the intra-frame prediction mode of the brightness or chrominance component of the current block or the coding block where the current block is located can be obtained. At this time, the value of the intra-frame prediction mode indicator (which can be represented by predModeIntra) can be determined.

[0077] Further, the vector u[i] of the secondary change coefficient is obtained, i=0, 1, ..., nonZeroSize-1. When it is determined that the current transform block uses LFNST, the inverse quantized coefficient d[x][y] at this time is the secondary transform coefficient. The first nonZeroSize values ​​thereof are obtained in a diagonal scanning order, which is the vector u[i] of the secondary change coefficient, i=0, 1, ..., nonZeroSize-1.

[0078] Furthermore, for the mapping of intra prediction modes, intra prediction modes can be divided into traditional intra prediction modes and non-traditional intra prediction modes. For non-traditional intra prediction modes, the information indicated by the value of predModeIntra is as follows:

[0079] If the value of predModeIntra can be INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (81, 82, 83 in VVC respectively), it indicates that the prediction mode of the current block is CCLM mode;

[0080] If intra_mip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, it indicates that the prediction mode of the current block is MIP mode. At this time, the value of predModeIntra indicates the MIP mode index number modeId used;

[0081] If it is not the above two cases, the value of predModeIntra can be [0, 66], indicating that the prediction mode of the current block is the traditional intra-frame prediction mode.

[0082] At present, when determining the index number of the LFNST transform kernel candidate set according to the number of the traditional intra prediction mode by parsing the code stream, if the prediction mode of the current block is CCLM mode and MIP mode, and the current block is a non-traditional intra prediction mode, the value of predModeIntra is mainly set in the following way:

[0083] (1) When the value of predModeIntra indicates INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM (81, 82, 83 in VVC, respectively),

[0084] If the mode of the central luminance block corresponding to the luminance position of the current block (such as the chrominance block) is MIP mode, that is, intra_mip_flag[xTbY+

[0085] If nTbW / 2][yTbY+nTbH / 2] is 1, the value of predMode Intra is set to the index number indicating the PLANAR mode (i.e. 0);

[0086] Otherwise, if the mode of the central luminance block at the luminance position corresponding to the current block (such as the chrominance block) is the IBC mode or the PLT mode, the value of predModeIntra is set to the index number indicating the DC mode (i.e., 1);

[0087] Otherwise, the value of predModeIntra is set to the value of the mode index number of the central luminance block corresponding to the luminance position of the current block (such as the chrominance block) IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2];

[0088] (2) When intra_mip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, that is, the prediction mode of the current block is the MIP mode, the value of predModeIntra can be directly set to the index number indicating the PLANAR mode (that is, 0).

[0089] For the traditional intra prediction mode (such as wide angle mapping), during the code stream parsing process, wide angle mapping can also be performed according to the size of the current block, and the traditional intra prediction mode [0, 66] is extended to [-14, 80]. The specific mapping process is as follows:

[0090] First, calculate the aspect ratio factor (which can be expressed by whRatio). For a non-square current block (i.e., nTbW is not equal to nTbH), the value of predModeIntra can be modified 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).

[0091] In the current H.266 / VVC, the value of the LFNST index number (which can be represented by SetIdx) can be determined according to the value of predModeIntra. Specifically, the value of the LFNST index number is set to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set. Generally speaking, the LFNST transform set includes four transform core candidate sets (set0, set1, set2, set3), corresponding to the values ​​of SetIdx of 0, 1, 2, and 3, respectively.

[0092] It can be understood that in the embodiments of the present application, it is precisely because the LFNST transformation matrix is ​​related to the directional characteristics of the prediction mode, and for non-traditional intra-frame prediction modes, such as the CCLM mode, since the transformation set cannot be selected, it is necessary to first map it to a traditional intra-frame prediction mode. Specifically, during mapping, the value of predModeIntra is set mainly based on the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block. That is to say, at present, if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the MIP mode, the CCLM mode can be mapped to PLANAR; if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the IBC mode or the PLT mode, the CCLM mode can be mapped to DC; if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the traditional intra-frame prediction mode, then continue to perform wide-angle mapping according to the size of the current chrominance transform block. Then, the transform kernel candidate set is selected according to the mapped angle.

[0093] However, when the non-traditional intra-frame prediction mode is mapped by the above method, on the one hand, if the current chroma transform block uses the CCLM mode, the characteristics of the luminance block at the center of the luminance position corresponding to the chroma transform block cannot represent the characteristics of the current chroma transform block, and it is not reasonable to select the transform kernel candidate set based on this characteristic; on the other hand, although the chroma block using CCLM is predicted by the corresponding luminance block using a linear relationship. However, the luminance block at the center of the luminance position corresponding to the chroma transform block may only be a sub-block of the corresponding luminance block and cannot represent the characteristics of the entire corresponding luminance block. For example, Figure 3 A schematic diagram of a brightness block at the center of the brightness position, such as Figure 3 As shown, the right side is the chroma block and the left side is the luminance block at the corresponding position. The luminance block at the center of the luminance position corresponding to the left gray sub-block in the chroma block is the dark sub-block (CR) in the left block. The obtained luminance block pattern is only the pattern of the dark sub-block (CR), which cannot represent the overall characteristics of the gray block in the left block; on the other hand, the existing solution introduces the dependency between chroma and luminance during the transformation process; finally, since the intra-frame prediction modes supported by luminance and chroma are not the same, when the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chroma transform block is not supported in the chroma block, such as MIP, IBC, PLT mode, additional mapping is required.

[0094] That is to say, for the current H.266 / VVC, the CCLM mode needs to be mapped to the traditional intra-frame prediction mode before the transform kernel candidate set can be selected. However, the above mapping method has poor accuracy and may introduce new mappings. It can be seen that the current LFNST technology has poor applicability to the CCLM mode, and the additional mapping processing increases the transformation process of the LFNST technology, thereby reducing the coding efficiency.

[0095] In order to overcome the above defects, in an embodiment of the present application, when the codec performs transformation processing on the current block using the CCLM mode for intra-frame prediction, it is not necessary to map the CCLM mode to the traditional intra-frame prediction mode, but can directly determine the LFNST transformation kernel used by the current block according to the CCLM parameters corresponding to the current block, so that the LFNST transformation kernel can be used for LFNST transformation. It can be understood that it is precisely because the CCLM parameters are introduced when performing the LFNST transformation that the selection of the LFNST transformation kernel is more flexible, thereby improving the applicability of the LFNST technology to the CCLM mode, reducing the transformation process of the LFNST technology, and effectively improving the coding efficiency.

[0096] It should be noted that, in the embodiments of the present application, Figure 4 is a block diagram of the video coding system; see Figure 4 , which shows an example of a block diagram of a video encoding system provided by an embodiment of the present application; Figure 4As shown, 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 analysis unit 107, a filtering unit 108, a coding unit 109 and a decoded image cache unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (Sample Adaptive 0ffset, SAO) filtering, and the coding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC). For the input original video signal, through the coding tree block (Coding Tree A video coding block can be obtained by dividing the video coding block into a video coding unit (CTU), and 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 obtained 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 a motion vector, and the motion vector can estimate the motion of the video coding block, and then the motion compensation unit 104 calculates the motion vector based on the motion vector determined by the motion estimation unit 105. The intra prediction unit 103 is used to perform motion compensation; after determining the intra prediction mode, the intra prediction unit 103 is also used to provide the selected intra prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding 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 the reconstructed residual block is removed by the filter control analysis unit 107 and the filtering unit 108. The block effect artifacts are then removed, and the reconstructed residual block is then added to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video coding block; the encoding 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 code stream of the video signal; and the decoded image buffer unit 110 is used to store the reconstructed video coding block for prediction reference.As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 110 .

[0097] Figure 5 is a block diagram of the video decoding system; see Figure 5 , which shows an example of a block diagram of a video decoding system provided by an embodiment of the present application; Figure 5 As shown, 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 decoded image buffer unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. The input video signal is Figure 4 After the encoding process, the code stream of the video signal is output; the code stream is input into the video decoding system 20, and first passes through the decoding unit 201 to obtain the decoded transform coefficient; the transform coefficient is processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data of the current video decoding block based on the determined intra-frame prediction mode and the data of the previously decoded block from the current frame or picture; the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information The decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 and 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 the block effect artifacts, which can improve the video quality; the decoded video block is then stored in the decoded image cache unit 206, which stores the reference image used for subsequent intra-frame prediction or motion compensation, and is also used for the output of the video signal, that is, the restored original video signal is obtained.

[0098] The transformation method in the embodiment of the present application can be applied to Figure 4 The transformation and quantization unit 101 shown in FIG. 1 includes Figure 1 The first transform unit 11 and the quantization unit 12 shown in the figure, at this time, the transform method is specifically applied to the part between the transform and the quantization. In addition, the transform method in the embodiment of the present application can also be applied to the following Figure 4 The inverse transform and inverse quantization unit 106 shown in FIG. Figure 5The inverse transform and inverse quantization unit 202 shown in the figure, whether it is the inverse transform and inverse quantization unit 106 or the inverse transform and inverse quantization unit 202, can include Figure 1 The inverse quantization unit 13 and the inverse primary transform unit 14 shown, at this time, the transformation method is specifically applied to the part between the inverse quantization and the inverse transform. That is to say, the transformation method in the embodiment of the present application can be applied to both the video encoding system and the video decoding system, and can even be applied to both the video encoding system and the video decoding system at the same time, but the embodiment of the present application does not make specific limitations. It should also be noted that when the transformation method is applied to the video encoding system, the "current block" specifically refers to the current encoding block in the intra-frame prediction; when the transformation method is applied to the video decoding system, the "current block" specifically refers to the current decoding block in the intra-frame prediction.

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

[0100] An embodiment of the present application proposes a transformation method, which is applied to an encoder. Figure 6 The following is a schematic diagram of the implementation process of the transformation method. Figure 1 ,like Figure 6 As shown, the method for the encoder to perform transformation processing may include the following steps:

[0101] Step 601: Determine prediction mode parameters of the current block.

[0102] In an embodiment of the present application, the encoder may first determine the prediction mode parameters of the current block.

[0103] It should be noted that, in the embodiment of the present application, the video image can be divided into a plurality of image blocks, and each image block currently to be encoded can be referred to as a coding block (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 a coding block in the video image that is currently to be predicted for the first image component, the second image component, or the third image component.

[0104] It can be understood that, in the embodiments of the present application, assuming that the current block performs a first image component prediction, and the first image component is a luminance component, that is, the image component to be predicted is a luminance component, then the current block can also be called a luminance block; or, assuming that the current block performs a second image component prediction, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the current block can also be called a chrominance block.

[0105] It should be noted that, in the embodiment of the present application, the prediction mode parameter indicates the coding mode of the current block and parameters related to the mode. The prediction mode parameter of the current block can usually be determined by using rate distortion optimization (RDO).

[0106] Further, in an embodiment of the present application, the coding mode may include two categories: a traditional intra prediction mode and a non-traditional intra prediction mode. Specifically, the traditional intra prediction mode may include a direct current (DC) mode, a planar (PLANAR) mode, and an angle mode, etc.; the non-traditional intra prediction mode may include a matrix-based intra prediction (MIP) mode, a CCLM mode, an intra block copy (IBC) mode, and a PLT (Palette) mode, etc.

[0107] That is, in the embodiment of the present application, the encoder can determine whether the encoding mode of the current block is a traditional intra-frame prediction mode or a non-traditional intra-frame prediction mode through the prediction mode parameters.

[0108] In an embodiment of the present application, further, when determining the prediction mode parameters of the current block, the encoder may first determine the image component to be predicted of the current block; then, based on the parameters of the current block, use multiple prediction modes to perform prediction encoding on the image component to be predicted respectively, and calculate the rate-distortion cost result corresponding to each prediction mode in the multiple prediction modes; finally, the minimum rate-distortion cost result may be selected from the multiple rate-distortion cost results calculated, and the prediction mode corresponding to the minimum rate-distortion cost result may be determined as the prediction mode parameter of the current block.

[0109] That is, at the encoder side, multiple prediction modes can be used to encode the image components to be predicted respectively for the current block. Here, the multiple prediction modes generally include a traditional intra-frame prediction mode and a non-traditional intra-frame prediction mode.

[0110] Furthermore, in an embodiment of the present application, after the encoder encodes the current block respectively using multiple prediction modes, it can obtain the rate-distortion cost result corresponding to each prediction mode; then, the minimum rate-distortion cost result is selected from the multiple rate-distortion cost results obtained, 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 finally be encoded using the determined prediction mode, and under this prediction mode, the prediction residual can be made small, which can improve the coding efficiency.

[0111] Step 602: When the prediction mode parameter indicates that the current block uses CCLM to determine an intra-frame prediction value, determine CCLM parameters.

[0112] In an embodiment of the present application, after the encoder determines the prediction mode parameters of the current block, if the prediction mode parameters indicate that the current block uses CCLM to determine an intra-frame prediction value, the encoder may continue to determine the CCLM parameters.

[0113] It should be noted that, in an embodiment of the present application, the CCLM parameters may include a CCLM mode index number, wherein the CCLM mode index number is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation and derivation method of using CCLM to determine the intra-frame prediction value of the current block.

[0114] It is understandable that in the embodiments of the present application, the CCLM mode may specifically include a plurality of different prediction modes, and therefore, different index numbers are required to be used to calibrate and distinguish different prediction modes in the CCLM mode. In other words, different CCLM modes correspond to different CCLM mode index numbers.

[0115] Furthermore, in an embodiment of the present application, when the encoder determines the calculation and derivation method of the intra-frame prediction value of the current block based on the use of CCLM parameters, it can determine the specific CCLM mode, thereby obtaining the corresponding CCLM mode index number.

[0116] It should be noted that, in the embodiments of the present application, the CCLM mode index numbers may specifically include 81, 82, and 83.

[0117] It is understandable that, in the present application, after determining the CCLM parameters, the encoder also needs to write the determined CCLM parameters into the bitstream to facilitate subsequent parsing processing at the decoder side.

[0118] Step 603: Determine the intra-frame prediction value of the current block according to the CCLM parameters, and calculate the prediction difference between the current block and the intra-frame prediction value.

[0119] In an embodiment of the present application, after determining the CCLM parameters corresponding to the current block, the encoder can further determine the intra-frame prediction value of the current block using the CCLM parameters, thereby calculating the prediction difference between the current block and the intra-frame prediction value.

[0120] It should be noted that in an embodiment of the present application, after determining the CCLM parameters, the encoder can use the CCLM mode index number included in the CCLM parameters to determine the CCLM mode used by the current block, thereby obtaining a calculation derivation method for using CCLM to determine the intra-frame prediction value of the current block.

[0121] Exemplarily, in an embodiment of the present application, when the encoder determines the intra-frame prediction value of the current block according to the CCLM parameter, the encoder can use the above formula (1) to reconstruct the first image component value Rec of the sampling point (after downsampling) with the position coordinate [i, j] in the coding block. L [i, j], calculate the second image component prediction value Pred of the sampling point with position coordinates [i, j] in the coding block C [i,j].

[0122] Exemplarily, in an embodiment of the present application, after determining the intra-frame prediction value of the current block, the encoder can continue to calculate the difference between the true pixel value of the current block and the intra-frame prediction value, and use the calculated difference as the prediction difference to facilitate subsequent transformation processing of the prediction difference.

[0123] It can be understood that in an embodiment of the present application, the encoder can further determine CCLM parameters when determining the intra-frame prediction value using the CCLM mode, so that the LFNST transform kernel (which can be represented by kernel) used by the current block can be determined according to the CCLM parameters in subsequent processing.

[0124] Step 604: When the current block uses LFNST, determine the LFNST transformation kernel used by the current block according to the CCLM parameters, set the LFNST index number and write it into the video bitstream.

[0125] In an embodiment of the present application, if the current block uses the LFNST transformation technology, the encoder can further determine the LFNST transformation kernel used by the current block according to the CCLM parameters, so that the LFNST index number can be set and written into the video bitstream.

[0126] It should be noted that, in the embodiments of the present application, not any current block can use LFNST transformation. Specifically, only when the current block satisfies certain preset conditions at the same time, can the current block be subjected to LFNST transformation. Among them, the preset conditions may include: (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 coding block where the current block is located is an intra-frame prediction mode; (d) the current block's one-time transformation is a two-dimensional forward one-time transformation (for example, DCT2) in both the horizontal and vertical directions; (e) the intra-frame prediction mode of the current block or the coding block where the current block is located is a non-MIP mode or the prediction mode of the transform block is a 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 the embodiments of the present application, the above five conditions need to be met at the same time to determine that the current block uses LFNST transformation technology.

[0127] Further, in an embodiment of the present application, after determining that the current block can use the LFNST technology, it is also necessary to determine the LFNST transform kernel (which can be represented by kernel) used by the current block. Among them, there are 4 transform kernel candidate sets in LFNST, and these four transform kernel candidate sets may include set0, set1, set2 and set3. Among them, according to the coding parameters of the current block or the coding block where the current block is located, the selected transform kernel candidate set can be implicitly derived; for example, in the current H.266 / VVC, according to the intra-frame prediction mode of the current block, it can be determined which of the four transform kernel candidate sets to use.

[0128] Specifically, in an embodiment of the present application, after obtaining the intra-frame prediction mode of the current block, the encoder can determine the value of the intra-frame prediction mode indicator (which can be represented by predModeIntra), and the calculation formula is as follows:

[0129]

[0130] Among them, the image component indicator (which can be represented by cIdx) is used to indicate the luminance component or chrominance component of the current block; here, if the current block is predicted as a luminance component, then cIdx is equal to 0; if the current block is predicted as a chrominance component, then cIdx is equal to 1. In addition, (xTbY, yTbY) is the coordinate of the upper left corner sampling point of the current block, IntraPredModeY[xTbY][yTbY] is the intra-frame prediction mode of the luminance component, and IntraPredModeC[xTbY][yTbY] is the intra-frame prediction mode of the chrominance component.

[0131] In the current H.266 / VVC, intra prediction modes can be divided into traditional intra prediction modes and non-traditional intra prediction modes. For non-traditional intra prediction modes, the information indicated by the value of predModeIntra is as follows:

[0132] 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);

[0133] If the prediction mode of the current block is the MIP mode, the value of predModeIntra may be the MIP mode index number used;

[0134] If the prediction mode of the current block is the traditional intra prediction mode, the value of predModeIntra can be in [0, 66].

[0135] Furthermore, if the prediction mode of the current block is CCLM mode and MIP mode, the encoder can also set the value of predModeIntra in the following way:

[0136] (1) When the prediction mode of the current block is CCLM mode:

[0137] If the mode of the central luminance block corresponding to the luminance position of the current block (such as the chrominance block) is MIP mode, that is, intra_mip_flag[xTbY+

[0138] If nTbW / 2][yTbY+nTbH / 2] is 1, the value of predMode Intra is set to the index number indicating the PLANAR mode (i.e. 0);

[0139] Otherwise, if the mode of the central luminance block at the luminance position corresponding to the current block (such as the chrominance block) is the IBC mode or the PLT mode, the value of predModeIntra is set to the index number indicating the DC mode (i.e. 1);

[0140] Otherwise, the value of predModeIntra is set to the value of the mode index number of the central luminance block corresponding to the luminance position of the current block (such as the chrominance block) IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2];

[0141] (2) When the prediction mode of the current block is MIP mode:

[0142] The value of predModeIntra may be directly set to the index number indicating the PLANAR mode (ie, 0).

[0143] For the traditional intra prediction mode (such as wide angle mapping), wide angle mapping can be performed according to the size of the current block, and the traditional intra prediction mode [0, 66] is extended to [-14, 80]. The specific mapping process is as follows:

[0144] First, calculate the width-to-height ratio factor (which can be expressed as whRatio), as shown below:

[0145] whRatio=Abs(Log2(nTbW / nTbH)) (6)

[0146] For a non-square current block (i.e., nTbW is not equal to nTbH), predModeIntra can be modified 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).

[0147] In the current H.266 / VVC, according to the value of predModeIntra and Table 1, the value of the LFNST index number (which can be represented by SetIdx) can be determined, and the specific values ​​are shown in Table 1. Here, the value of the LFNST index number is set to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set. Generally speaking, the LFNST transform set includes four transform core candidate sets (set0, set1, set2, set3), corresponding to the values ​​of SetIdx of 0, 1, 2, and 3, respectively.

[0148] Table 1

[0149] predModeIntra SetIdx predModeIntra<0 1 0<=predModeIntra<=1 0 2<=predModeIntra<=12 1 13<=predModeIntra<=23 2 24<=predModeIntra<=44 3 45<=predModeIntra<=55 2 56<=predModeIntra<=80 1

[0150] It can be understood that in the embodiments of the present application, it is precisely because the LFNST transformation matrix is ​​related to the directional characteristics of the prediction mode, and for non-traditional intra-frame prediction modes, such as the CCLM mode, since the transformation set cannot be selected, it is necessary to first map it to a traditional intra-frame prediction mode. Specifically, during mapping, the value of predModeIntra is set mainly based on the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block. That is to say, at present, if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the MIP mode, the CCLM mode can be mapped to PLANAR; if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the IBC mode or the PLT mode, the CCLM mode can be mapped to DC; if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the traditional intra-frame prediction mode, then continue to perform wide-angle mapping according to the size of the current chrominance transform block. Then, the transform kernel candidate set is selected according to the mapped angle.

[0151] That is to say, for the current H.266 / VVC, the CCLM mode needs to be mapped to the traditional intra-frame prediction mode before the transform kernel candidate set can be selected. However, the above mapping method has poor accuracy and may introduce new mappings. It can be seen that the current LFNST technology has poor applicability to the CCLM mode, and the additional mapping processing increases the transformation process of the LFNST technology, thereby reducing the coding efficiency.

[0152] Furthermore, in an embodiment of the present application, if the current block uses the LFNST transformation technology, the encoder no longer determines the value of predModeIntra by mapping the CCLM mode to the traditional intra prediction mode, but determines the LFNST transformation kernel used by the current block based on the CCLM parameters, so that the corresponding LFNST index number can be set.

[0153] It can be understood that in an embodiment of the present application, the CCLM parameters may include a CCLM mode index number, wherein the CCLM mode index number is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation and derivation method of using CCLM to determine the intra-frame prediction value of the current block.

[0154] It should be noted that in an embodiment of the present application, when the encoder determines the LFNST index number based on the CCLM parameter, it can first determine the LFNST transform core candidate set, and then determine the LFNST transform core used by the current block from the LFNST transform core candidate set, and then set the LFNST index number and write it into the video bitstream. Here, the LFNST transform matrix is ​​a plurality of fixed coefficient matrices obtained through training, and the LFNST transform core candidate set includes 2 groups of transform matrices (also referred to as LFNST transform cores). After the LFNST transform core candidate set is determined, it is necessary to select a group of LFNST transform cores from the LFNST transform core candidate set, that is, determine the transform matrix used when the current block LFNST is used.

[0155] Further, in the embodiment of the present application, since the LFNST transform core candidate set includes two or more preset transform cores, the transform core used by the current block can be selected in a rate-distortion optimization manner. Specifically, the rate-distortion cost (Rate Distortion Cost, RDCost) can be calculated for each transform core in a rate-distortion optimization manner, and then the transform core with the smallest rate-distortion cost is selected as the transform core used by the current block.

[0156] That is to say, on the encoder side, a group of LFNST transform cores can be selected through RDCost, and the index number corresponding to the LFNST transform core (which can be represented by lfnst_idx) is written into the video bitstream and transmitted to the decoder side. When the first group of LFNST transform cores (i.e., the first group of transform matrices) in the LFNST transform core candidate set is selected, lfnst_idx is set to 1; when the second group of LFNST transform cores (i.e., the second group of transform matrices) in the LFNST transform core candidate set is selected, lfnst_idx is set to 2.

[0157] It should be noted that, in the embodiment of the present application, for the value of the LFNST index number (i.e., lfnst_idx), when the value of the LFNST index number is equal to 0, LFNST will not be used; and when the value of the LFNST index number is greater than 0, LFNST will be used, and the index number of the transform core is equal to the value of the LFNST index number, or the index number of the transform core is equal to the value of the LFNST index number minus 1. Furthermore, after the encoder determines the LFNST transform core used for the current block, it is also necessary to set the LFNST index number and write it into the video bitstream, so that the subsequent decoder side can obtain the LFNST index number by parsing the bitstream.

[0158] For example, in the embodiments of the present application, Figure 7 The following is a schematic diagram of the implementation process of the transformation method. Figure 2 ,like Figure 7 As shown, when the CCLM parameter is the CCLM mode index number, the encoder determines the LFNST transform kernel used by the current block according to the CCLM parameter, and the method of setting the LFNST index number and writing it into the video bitstream may include the following steps:

[0159] Step 701: Determine the value of the LFNST intra prediction mode index number according to the value of the CCLM mode index number.

[0160] Step 702: Select an LFNST transform core candidate set from multiple LFNST transform core candidate sets according to the value of the LFNST intra prediction mode index sequence number.

[0161] Step 703: Select a transformation core indicated by an LFNST index number from the selected LFNST transformation core candidate set, and set it as the LFNST transformation core used by the current block.

[0162] Step 704: Set the value of the LFNST index number to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set; wherein the LFNST transform core candidate set includes two or more preset LFNST transform cores.

[0163] It should be noted that, in an embodiment of the present application, the CCLM mode index number is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation and derivation method of using CCLM to determine the intra-frame prediction value of the current block. In other words, the encoder can further determine the LFNST transformation kernel according to the CCLM mode index number.

[0164] Furthermore, in an embodiment of the present application, after determining the CCLM mode index number, the encoder may also convert the CCLM mode index number into a value of an LFNST intra-frame prediction mode index number (which can be represented by predModeIntra); and then, based on the value of predModeIntra, select an LFNST transform core candidate set from multiple LFNST transform core candidate sets to determine the transform core candidate set; and in the selected LFNST transform core candidate set, select the transform core indicated by the LFNST index number and set it as the LFNST transform core used by the current block.

[0165] It can be understood that, in the embodiment of the present application, for the value of the LFNST index number, when the value of the LFNST index number is equal to 0, the LFNST will not be used; and when the value of the LFNST index number is greater than 0, the LFNST will be used, and the index number of the transform core is equal to the value of the LFNST index number, or the index number of the transform core is equal to the value of the LFNST index number minus 1. Furthermore, after the encoder determines the LFNST transform core used for the current block, it is also necessary to set the LFNST index number and write it into the video bitstream, so that the subsequent decoder side can obtain the LFNST index number by parsing the bitstream.

[0166] Exemplarily, in an embodiment of the present application, when the encoder determines the value of the LFNST intra-frame prediction mode index number according to the value of the CCLM mode index number, it can specifically use a first lookup table to determine the value of the LFNST intra-frame prediction mode index number corresponding to the value of the CCLM mode index number, wherein the first lookup table contains at least one or more different CCLM mode index numbers corresponding to each of two LFNST intra-frame prediction mode index numbers with different values.

[0167] That is to say, in the present application, when the CCLM parameter is the CCLM mode index number (modeId), the encoder can also obtain the value of the LFNST intra-frame prediction mode index number by looking up a table when selecting the LFNST transform kernel used for the current block.

[0168] It should be noted that, in an embodiment of the present application, the first look-up table (Look-Up Table 1, LUT1) is used to reflect the correspondence between the CCLM mode index number and the LFNST intra-frame prediction mode index number, that is, in the first look-up table, at least one or more different CCLM mode index numbers corresponding to two LFNST intra-frame prediction mode index numbers with different values ​​are included.

[0169] That is to say, in the present application, different CCLM modes may correspond to different values ​​of predModeIntra; therefore, the encoder determines the CCLM mode index number according to the CCLM mode, and then determines the value of predModeIntra according to the first lookup table; then, according to the value of predModeIntra, an LFNST transform core candidate set can be selected from multiple LFNST transform core candidate sets, thereby determining the LFNST transform core used for the current block.

[0170] It can be understood that in the embodiment of the present application, the value of predModeIntra can be determined according to the value of the CCLM mode index number (modeId); then according to the value of predModeIntra, the value of SetIdx can be directly determined according to Table 2, that is, the LFNST transform core candidate set selected by the current block is determined. Here, the value of SetIdx indicates the transform core candidate set used in LFNST; since the value of the CCLM mode index number (modeId) can include 81, 82 and 83, the value of predModeIntra is also 81, 82 and 83. Based on the above Table 1, the corresponding relationship between predModeIntra and SetIdx is as follows:

[0171] Table 2

[0172] predModeIntra SetIdx predModeIntra<0 1 0<=predModeIntra<=1 0 2<=predModeIntra<=12 1 13<=predModeIntra<=23 2 24<=predModeIntra<=44 3 45<=predModeIntra<=55 2 56<=predModeIntra<=80 1 predModeIntra==81 3 82<=predModeIntra<=83 1

[0173] It can be seen that in the present application, after updating the above Table 1 to the above Table 2, for the CCLM mode, the encoder no longer needs to select the transform kernel candidate set by mapping the CCLM mode to the traditional intra-frame prediction mode, but can directly obtain the corresponding LFNST index number based on the CCLM mode index number corresponding to the CCLM mode by querying the first lookup table, and finally realize the determination of the LFNST transform kernel candidate set.

[0174] In an embodiment of the present application, further, the encoder can also directly determine the LFNST transform kernel candidate set according to the value of the CCLM mode index number. At this time, there is no need to rely on the value of predModeIntra, that is, there is no need to determine the value of the LFNST intra-frame prediction mode index number according to the CCLM mode index number.

[0175] Exemplarily, in some embodiments, Figure 8 The following is a schematic diagram of the implementation process of the transformation method. Figure 3 ,like Figure 8 As shown, when the CCLM parameter is the CCLM mode index number, the encoder determines the LFNST transform kernel used by the current block according to the CCLM parameter, and the method of setting the LFNST index number and writing it into the video bitstream may include the following steps:

[0176] Step 801: Select an LFNST transform kernel candidate set from multiple LFNST transform kernel candidate sets according to the value of the CCLM mode index sequence number.

[0177] Step 802: Select a transform core indicated by the LFNST index number from the selected LFNST transform core candidate set, and set it as the LFNST transform core used by the current block.

[0178] Step 803: Set the value of the LFNST index number to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set; wherein the LFNST transform core candidate set includes two or more preset LFNST transform cores.

[0179] Further, in an embodiment of the present application, when the encoder selects an LFNST transform core candidate set from multiple LFNST transform core candidate sets based on the value of the CCLM mode index number, it can specifically use a second lookup table to determine the value of the LFNST transform core candidate set index number corresponding to the value of the CCLM mode index number, and select the LFNST transform core candidate set indicated by the value of the LFNST transform core candidate set index number as the selected LFNST transform core candidate set.

[0180] It should be noted that, in an embodiment of the present application, the second look-up table (Look-Up Table 2, LUT2) contains at least one or more different CCLM mode index numbers corresponding to two different values ​​of the LFNST transform core candidate set index numbers.

[0181] It should be noted that if the prediction mode used by the current block is CCLM mode, the selected LFNST transform core candidate set can be directly determined according to the value of CCLM mode index number (modeId). As shown in Table 3, the value of SetIdx indicates the transform core candidate set used in LFNST; the value of CCLM mode index number (modeId) can include 81, 82 and 83, and each CCLM mode index number corresponds to a LFNST transform core candidate set. Specifically, the corresponding relationship between modeId and SetIdx is as follows:

[0182] Table 3

[0183] modeId SetIdx modeId==81 3 82<=modeId<=83 1

[0184] It can be seen that in the present application, for the CCLM mode, the encoder no longer needs to select the transform core candidate set by mapping the CCLM mode to the traditional intra-frame prediction mode, but can directly obtain the corresponding LFNST index number based on the CCLM mode index number corresponding to the CCLM mode by querying the second lookup table, and finally determine the LFNST transform core candidate set. In other words, the encoder can determine the value of the corresponding LFNST transform core candidate set index number according to the value of the CCLM mode index number, so as to select the LFNST transform core candidate set indicated by the value of the LFNST transform core candidate set index number as the selected LFNST transform core candidate set. For example, it can be seen from Table 3 that when the value of the CCLM mode index number (modeId) is 81, it can be determined that the value of the LFNST transform core candidate set index number (SetIdx) is 3, that is, the transform core candidate set indicated by 3 is used as the selected LFNST transform core candidate set; or, when modeId is 82 or 83, it can be determined that the value of SetIdx is 1, that is, the transform core candidate set indicated by 1 is used as the selected LFNST transform core candidate set, and so on.

[0185] In an embodiment of the present application, further, if the prediction mode of the current block is the CCLM mode, the encoder may also fixedly select one of the transform sets (such as set1 or set2 or set3) as an LFNST transform core candidate set selected from multiple LFNST transform core candidate sets when determining the LFNST transform core candidate set.

[0186] That is to say, in the present application, when the encoder determines the LFNST transform kernel candidate set, for the current block using the CCLM mode for intra-frame prediction, the encoder no longer performs mapping with the traditional intra-frame prediction mode, but directly uses a preset fixed transform set as the corresponding LFNST transform kernel candidate set. Exemplarily, in the present application, for the current block using the CCLM mode, the encoder can directly determine the LFNST transform kernel candidate set corresponding to the current block as set1.

[0187] In an embodiment of the present application, further, if the prediction mode of the current block is the CCLM mode, the encoder no longer performs mapping with the traditional intra prediction mode, but directly selects the LFNST transform kernel candidate set according to the value of the CCLM mode index number (modeId). Specifically, as shown in Table 4, each CCLM mode corresponds to an LFNST transform kernel candidate set, wherein the value of the LFNST index number (which can be represented by SetIdx) can be determined according to the value of predModeIntra of the CCLM mode:

[0188] Table 4

[0189] predModeIntra SetIdx predModeIntra<0 1 0<=predModeIntra<=1 0 2<=predModeIntra<=12 1 13<=predModeIntra<=23 2 24<=predModeIntra<=44 3 45<=predModeIntra<=55 2 56<=predModeIntra<=80 1 predModeIntra==81 a predModeIntra==82 b predModeIntra==83 c

[0190] It can be understood that in the embodiment of the present application, a, b, and c can all take any value from the four transform core candidate sets (set0, set1, set2, set3) corresponding to the values ​​of SetIdx in {0, 1, 2, 3} respectively.

[0191] It should be noted that, in the embodiment of the present application, if the prediction mode of the current block is the CCLM mode, the encoder may also select the LFNST transform kernel candidate set according to one or more information combinations in the CCLM parameters.

[0192] Furthermore, in an embodiment of the present application, if the prediction mode of the current block is the CCLM mode, the encoder can also map the CCLM parameters to the traditional intra-frame prediction mode, map it to a certain traditional intra-frame prediction mode, and then fix one of the transform sets (such as set1 or set2 or set3) as a LFNST transform core candidate set selected from multiple LFNST transform core candidate sets, or select the LFNST transform core candidate set based on the above Table 4.

[0193] It should be noted that in an embodiment of the present application, the encoder can also determine the transformation matrix (i.e., transformation kernel) to be used based on one or more information combinations in the CCLM parameters, and the determination of the transformation matrix includes the selection of a transformation set and a transformation matrix group; wherein the encoder can fixedly select a transformation matrix group in a transformation set based on the CCLM parameters, without the need for selection on the encoder side, and therefore there is no need to transmit lfnst_idx.

[0194] Further, in an embodiment of the present application, when the prediction mode parameter indicates that the current block uses a non-CCLM mode, the encoder can first determine the value of predModeIntra based on the intra-frame prediction mode when performing a LFNST transform core candidate set; and then select an LFNST transform core candidate set from multiple LFNST transform core candidate sets based on the value of predModeIntra.

[0195] That is to say, in the present application, if the prediction mode of the current block is a non-CCLM mode, the value of predModeIntra can be determined according to the intra-frame prediction mode; then, according to the value of predModeIntra, in combination with the above-mentioned Table 1, an LFNST transform core candidate set can be selected from multiple LFNST transform core candidate sets, and then the transform core indicated by the LFNST index number can be selected from the selected LFNST transform core candidate set, and set as the LFNST transform core used by the current block; the value of the LFNST index number is set to indicate that the current block uses LFNST, and the index number of the LFNST transform core in the LFNST transform core candidate set.

[0196] It can be understood that, in the embodiment of the present application, for the value of the LFNST index number, when the value of the LFNST index number is equal to 0, the LFNST will not be used; and when the value of the LFNST index number is greater than 0, the LFNST will be used, and the index number of the transform core is equal to the value of the LFNST index number, or the index number of the transform core is equal to the value of the LFNST index number minus 1. Furthermore, after the encoder determines the LFNST transform core used for the current block, it is also necessary to set the LFNST index number and write it into the video bitstream, so that the subsequent decoder side can obtain the LFNST index number by parsing the bitstream.

[0197] Step 605: Use the LFNST transformation kernel to transform the prediction difference.

[0198] In an embodiment of the present application, after the encoder determines the LFNST transform kernel used by the current block according to the CCLM parameters, the encoder may use the LFNST transform kernel to perform transform processing on the prediction difference.

[0199] It should be noted that, in the embodiment of the present application, after the encoder determines the FNST transformation kernel, it can obtain the transformation matrix selected by the current block, and then the prediction difference can be transformed.

[0200] It should be noted that in the embodiments of the present application, each set of transformation matrices may also include basic transformation matrices T of two sizes, such as 16x16 and 16x48. For the transformation matrices selected for the 4 types of TUs with different sizes, specifically, for the 4x4 size TU, an 8x16 transformation matrix is used, and this 8x16 transformation matrix comes from the first 8x16 of the 16x16 basic transformation matrix; for the 4xN or Nx4 (N>4) size TUs, a 16x16 basic transformation matrix is used; for the 8x8 size TU, an 8x48 transformation matrix is used, and this 8x48 transformation matrix comes from the first 8x48 of the 16x48 basic transformation matrix; for TUs larger than 8x8 size, a 16x48 basic transformation matrix is used. It should be noted that in the current H.266 / VVC, only the transformation matrix of the decoder-side LFNST is stored (which can be represented by T T ), 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).

[0201] It should be noted that in the embodiments of the present application, LFNST applies non-separable transformation based on the direct matrix multiplication method. In order to minimize the computational complexity and storage space as much as possible, a simplified non-separable transformation technique is used in the LFNST transformation. Among them, the main idea of the simplified non-separable transformation technique is to map an N-dimensional vector to an R-dimensional vector in a different space, where N / R (R<N) is the scaling factor; at this time, the transformation matrix corresponding to the simplified non-separable transformation technique is an R×N matrix, as follows

[0202]

[0203] Here, the transformation matrices used for the forward LFNST transformation and the reverse LFNST transformation are transpose relations with each other Fig. 9 is a structural schematic of the calculation process of the LFNST technology matrix multiplication Figure 1 , Fig.10 is a structural schematic of the calculation process of the LFNST technology matrix multiplication Figure 2 , see Fig. 9 and Fig.10 , which shows a structural schematic diagram of the calculation process of a kind of LFNST technology matrix multiplication provided by the embodiments of the present application. As Fig. 9 shown in the calculation process of the forward LFNST transformation, after a set of transformation coefficients pass through the transformation matrix T, the secondary transformation coefficients can be obtained; Fig.10 shows the calculation process of the reverse LFNST transformation. After the anti-secondary transformation coefficients pass through the transposed transformation matrix T T and then, the anti-primary transformation coefficients can be obtained.

[0204] Furthermore, in the LFNST technology, it can be determined whether to use 4×4 inseparable transform or 8×8 inseparable transform according to the size of the current block; here, "4×4 inseparable transform" can be collectively referred to as "4×4LFNST" and "8×8 inseparable transform" can be collectively referred to as "8×8LFNST". Assuming that the width of the current block is nTbW and the height is nTbH, it can be concluded that: if min(nTbW, nTbH) <= 4, then 4×4LFNST can be used for the current block; otherwise, 8×8LFNST 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.

[0205] In one embodiment, for 4×4 LFNST, on the encoder side, 16 coefficients will be input, and after forward LFNST, 16 or 8 coefficients will be output; on the decoder side, 16 or 8 coefficients will be input, and 16 coefficients will be output; that is, the encoder and decoder are exactly opposite in terms of the number of inputs and outputs.

[0206] Assume that the size of a transform unit (TU) can be expressed as nTbW×nTbH, where the transform block is a 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). The following describes them in detail.

[0207] Fig.11 The structure frame of LFNST transformation Figure 1 ; Fig.12 The structure frame of LFNST transformation Figure 2 ; Fig.13 The structure frame of LFNST transformation Figure 3 ; Fig.14 The structure frame of LFNST transformation Figure 4 When TU is equal to 4×4, the forward LFNST process corresponding to the 4×4 transform block is as follows: Fig.11 As shown. Fig.11 In the example, the white blocks are prediction differences, the gray blocks are primary transform coefficients, and the black blocks are secondary transform coefficients; here, at the position of the "0" example, the encoder sets the transform coefficient to 0. For a 4×4 transform block, during forward LFNST, the transform matrix size used is 8×16, and all 4×4 primary transform coefficients in the current transform block are used as input, and the output is 4×2 secondary transform coefficients.

[0208] When TU is equal to 4×N or N×4 (N>4), the forward LFNST process corresponding to the 4×N or N×4 transform block is as follows Fig.12 As shown. Fig.12In the example, the white block is the prediction difference, the gray block is the primary transform coefficient, and the black block is the secondary transform coefficient; here, for a 4×N or N×4 transform block, during forward LFNST, the transform matrix size used is 16×16, and the primary transform coefficient in the first 4×4 sub-block in the current transform block (specifically, the uppermost sub-block for a 4×N transform block and the leftmost sub-block for an N×4 transform block) is used as input, and the output is 4×4 secondary transform coefficients. Here, at the position of the "0" example, the encoder still sets the transform coefficient to 0.

[0209] In another embodiment, for 8×8 LFNST, on the encoder side, 48 coefficients will be input, and after forward LFNST, 16 or 8 coefficients will be output; 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 inputs and outputs.

[0210] When TU is equal to 8×8, the forward LFNST process corresponding to the 8×8 transform block is as follows Fig.13 As shown. Fig.13 In the example, the white block is the prediction difference, the gray block is the primary transform coefficient, and the black block is the secondary transform coefficient. For an 8×8 transform block, the transform matrix size used in the forward LFNST is 8×48, and the primary transform coefficients of the first three 4×4 sub-blocks (i.e., the three sub-blocks in the upper left corner) in the current transform block are used as input, and the output is 4×2 secondary transform coefficients. Here, at the position of the "0" example, the encoder still sets the transform coefficient to 0.

[0211] When TU is larger than 8×8, the forward LFNST process corresponding to the transform block larger than 8×8 is as follows Fig.14 As shown. Fig.14 In the example, the white block is the prediction difference, the gray block is the primary transform coefficient, and the black block is the secondary transform coefficient. For transform blocks larger than 8×8, the transform matrix size used in the forward LFNST is 48×16, and the primary transform coefficients of the first three 4×4 sub-blocks (i.e., the three sub-blocks in the upper left corner) in the current transform block are used as input, and the output is 4×4 secondary transform coefficients. Here, at the position of the "0" example, the encoder still sets the transform coefficient to 0.

[0212] In this way, the TU corresponding to the prediction difference can be 4×4, 4×N, N×4 (N>4), or 8×8, or even larger than 8×8. Fig.11 or Fig.12 or Fig.13 or Fig.14 To realize the transformation processing of the prediction difference.

[0213] It can be seen that in the embodiment of the present application, for the current block using the CCLM mode for intra-frame prediction, the decoder introduces the relevant information of the CCLM parameters in the process of performing LFNST on the current block using the CCLM mode, and selects a transform set (or transform kernel) according to the CCLM information. Therefore, when the current block is transformed, it is no longer necessary to map the CCLM mode to the traditional intra-frame prediction mode, thereby improving the applicability of the LFNST technology to the current block using the CCLM mode, making the selection of the transform set (or transform kernel) more flexible.

[0214] The present application proposes a transformation method, which is applied to an encoder, wherein the encoder determines the prediction mode parameters of the current block; when the prediction mode parameters indicate that the current block uses CCLM to determine the intra-frame prediction value, the CCLM parameters are determined; according to the CCLM parameters, the intra-frame prediction value of the current block is determined, and the prediction difference between the current block and the intra-frame prediction value is calculated; when the current block uses LFNST, according to the CCLM parameters, the LFNST transformation core used by the current block is determined, the LFNST index number is set and written into the video bitstream; the prediction difference is transformed using the LFNST transformation core. It can be seen that in an embodiment of the present application, when the codec transforms the current block that uses the CCLM mode for intra-frame prediction, it does not need to map the CCLM mode to the traditional intra-frame prediction mode, but can directly determine the LFNST transformation core used by the current block based on the CCLM parameters corresponding to the current block, so that the LFNST transformation core can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST transformation kernel more flexible, thereby improving the applicability of LFNST technology to CCLM mode and reducing the transformation process of LFNST technology, effectively improving coding efficiency.

[0215] Another embodiment of the present application proposes a transformation method, which is applied to a decoder. Fig.15 The following is a schematic diagram of the implementation process of the transformation method. Figure 4 ,like Fig.15 As shown, the method for the decoder to perform transformation processing may include the following steps:

[0216] Step 1501: parse the bitstream to determine the prediction mode parameters of the current block.

[0217] In the implementation of the present application, after receiving the bitstream of the video, the decoder may first parse the bitstream to determine the prediction mode parameters corresponding to the current block.

[0218] It should be noted that, in the implementation of the present application, the prediction mode parameter indicates the encoding mode of the current block and the parameters related to the mode. Among them, the prediction mode generally includes a traditional intra-frame prediction mode and a non-traditional intra-frame prediction mode, and the traditional intra-frame prediction mode may include a DC mode, a PLANAR mode and an angle mode, etc., and the non-traditional intra-frame prediction mode may include a MIP mode, a CCLM mode, an IBC mode and a PLT mode, etc.

[0219] It can be understood that in the embodiments of the present application, on the encoder side, predictive coding is performed 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 bitstream and transmitted from the encoder to the decoder.

[0220] Accordingly, in the present application, on the decoder side, the intra-frame prediction mode of the brightness or chrominance component of the current block or the coding block where the current block is located can be obtained by parsing the bitstream. At this time, the value of the intra-frame prediction mode indicator (which can be represented by predModeIntra) can be determined, and the calculation formula is as shown in the above formula (5).

[0221] In formula (5), the image component indicator (which can be represented by cIdx) is used to indicate the luminance component or the chrominance component of the current block; here, if the current block is predicted as a luminance component, then cIdx is equal to 0; if the current block is predicted as a chrominance component, then cIdx is equal to 1. In addition, (xTbY, yTbY) is the coordinate of the upper left corner sampling point of the current block, IntraPredModeY[xTbY][yTbY] is the intra-frame prediction mode of the luminance component, and IntraPredModeC[xTbY][yTbY] is the intra-frame prediction mode of the chrominance component.

[0222] That is, in the embodiment of the present application, the decoder can determine whether the decoding mode of the current block is a traditional intra-frame prediction mode or a non-traditional intra-frame prediction mode through the prediction mode parameters.

[0223] Step 1502: When the prediction mode parameter indicates that the current block uses the CCLM mode to determine the intra-frame prediction value, parse the bitstream to determine the CCLM parameters.

[0224] In an embodiment of the present application, after the decoder determines the prediction mode parameters of the current block, if the prediction mode parameters indicate that the current block uses the CCLM mode to determine the intra-frame prediction value, the decoder may continue to determine the CCLM parameters.

[0225] It should be noted that, in an embodiment of the present application, the CCLM parameters may include a CCLM mode index number, wherein the CCLM mode index number is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation and derivation method of using CCLM to determine the intra-frame prediction value of the current block.

[0226] Further, in an embodiment of the present application, the decoder can determine CCLM parameters by parsing the bitstream. Specifically, the decoder determines the CCLM mode index number (which can be represented by modeId) by parsing the bitstream. The CCLM mode index number can be used to indicate the CCLM mode used by the current block, and the CCLM mode can be used to indicate the calculation and derivation method of using CCLM to determine the intra-frame prediction value of the current block.

[0227] It is understandable that in the embodiments of the present application, the CCLM mode may specifically include a plurality of different prediction modes, and therefore, different index numbers are required to be used to calibrate and distinguish different prediction modes in the CCLM mode. In other words, different CCLM modes correspond to different CCLM mode index numbers.

[0228] Furthermore, in an embodiment of the present application, when the decoder determines the calculation and derivation method of the intra-frame prediction value of the current block based on the use of CCLM parameters, it can determine the specific CCLM mode, thereby obtaining the corresponding CCLM mode index number.

[0229] It should be noted that, in the embodiments of the present application, the CCLM mode index numbers may specifically include 81, 82, and 83.

[0230] Step 1503: parse the bitstream to determine the transform coefficient and LFNST index number of the current block.

[0231] In the embodiment of the present application, after determining the CCLM parameters corresponding to the current block, the decoder can continue to parse the bitstream to further determine the transform coefficient and LFNST index number of the current block.

[0232] It should be noted that, in the embodiment of the present application, the value of the LFNST index number can be used to indicate whether the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set. Specifically, after parsing the LFNST index number, when the value of the LFNST index number is equal to 0, it indicates that the current block does not use LFNST; and when the value of the LFNST index number is greater than 0, it indicates that the current block uses LFNST, and the index number of the transform core is equal to the value of the LFNST index number, or the index number of the transform core is equal to the value of the LFNST index number minus 1.

[0233] Further, in an embodiment of the present application, on the decoder side, the input data of LFNST may include: the luminance position (xTbY, yTbY) of the current transform block, the width nTbW of the current block, the height nTbH of the current block, whether the current block is a luminance component or a chrominance component cIdx, and the coefficient d[x][y] after inverse quantization (scaling) of the current transform block, x=0, 1, ..., nTbW-1, y=0, 1, ..., nTbH-1; accordingly, the output data of LFNST may include: the primary transform coefficient d'[x][y] generated by the secondary transform coefficient through LFNST, x=0, 1, ..., nLfnstSize-1, y=0, 1, ..., nLfnstSize-1.

[0234] It can be understood that in the embodiments of the present application, Fig.16 It is a schematic diagram of the LFNST transformation process flow, as shown in Fig.16 As shown, the specific process of LFNST transformation can be divided into five steps, including configuring core parameters 81, intra prediction mode mapping 82, selecting transformation matrix 83, calculating matrix multiplication 84 and constructing inverse primary transformation coefficient matrix 85. Among them, for intra prediction mode mapping 82, this step is used to determine the value of predModeIntra, which can mainly include: non-traditional intra prediction mode mapping 821 and wide angle mapping 822; for selecting transformation matrix 83, this step is used to select a transformation set and a transformation matrix, which can mainly include: selecting a transformation set 831, selecting a transformation matrix group 832 and selecting a transformation matrix size 833.

[0235] For configuring the core parameter 81, first, it is necessary to configure the length of the input secondary transform coefficient vector for LFNST calculation (which can be represented by nonZeroSize) and the length of the output primary transform coefficient vector (which can be represented by nLfnstOutSzie). The values ​​of nonZeroSize and nLfnstOutSzie are shown in Table 5.

[0236] Table 5

[0237] Change block size nonZeroSize nLfnstOutSzie 4×4 8 16 4×N or N×4 (N>4) 16 16 8×8 8 48 >8×8 16 48

[0238] In the current H.266 / VVC, the nonZeroSize and nLfnstOutSzie parameters are calculated using the following formula:

[0239] nLfnstOutSize=(nTbW>=8&&nTbH>=8)? 48:16 (8)

[0240] nonZeroSize=(nTbW==4&&nTbH==4)||(nTbW==8&&nTbH==8)? 8:16 (9)

[0241] In addition, the decoder also needs to configure the parameter nLfnstSize, which means that there will be only one transform coefficient within the first nLfnstSize×nLfnstSize range in the current block. The value of nLfnstSize is as follows:

[0242] Log2LfnstSize=(nTbW>=8&&nTbH>=8)? 3:2 (10)

[0243] nLfnstSize=1< <Log2LfnstSize (11)

[0244] At this time, by parsing the bitstream, the intra-frame prediction mode of the brightness or chrominance component of the current block or the coding block where the current block is located can be obtained. At this time, the value of the intra-frame prediction mode indicator (which can be represented by predModeIntra) can be determined. The calculation formula is as shown in the above formula (5).

[0245] Further, obtain the vector u[i] of the secondary change coefficient, i=0, 1, ..., nonZeroSize-1. When it is determined that the current transform block uses LFNST, the inverse quantized coefficient d[x][y] at this time is the secondary transform coefficient. Obtain its first nonZeroSize values ​​in diagonal scanning order, which is the vector u[i] of the secondary change coefficient, i=0, 1, ..., nonZeroSize-1; in the following formula, xC and yC are expressed as the horizontal and vertical coordinates of the coefficient numbered i in the current block relative to the upper left corner point in diagonal order), xC and yC are as follows,

[0246] xC=DiagScanOrder[2][2][i][0] (12)

[0247] yC=DiagScanOrder[2][2][i][1] (13)

[0248] u[i]=d[xC][yC] (14)

[0249] Further, for the intra prediction mode mapping 82, the intra prediction mode can be divided into a traditional intra prediction mode and a non-traditional intra prediction mode. For the non-traditional intra prediction mode, the information indicated by the value of predModeIntra is as follows:

[0250] If the value of predModeIntra can be INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (81, 82, 83 in VVC respectively), it indicates that the prediction mode of the current block is CCLM mode;

[0251] If intra_mip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, it indicates that the prediction mode of the current block is MIP mode. At this time, the value of predModeIntra indicates the MIP mode index number modeId used;

[0252] If it is not the above two cases, the value of predModeIntra can be [0,66], indicating that the prediction mode of the current block is the traditional intra-frame prediction mode.

[0253] Furthermore, the LFNST transform kernel candidate set index number is determined by parsing the code stream according to the number of the traditional intra-frame prediction mode. At this time, if the prediction mode of the current block is CCLM mode and MIP mode, the value of predModeIntra can also be set in the following way:

[0254] (1) When the value of predModeIntra indicates INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM (81, 82, 83 in VVC, respectively),

[0255] If the mode of the central luminance block at the luminance position corresponding to the current block (such as the chrominance block) is the MIP mode, that is, intra_mip_flag[xTbY+nTbW / 2][yTbY+nTbH / 2] is 1, the value of predMode Intra is set to the index number indicating the PLANAR mode (that is, 0);

[0256] Otherwise, if the mode of the central luminance block at the luminance position corresponding to the current block (such as the chrominance block) is the IBC mode or the PLT mode, the value of predModeIntra is set to the index number indicating the DC mode (i.e. 1);

[0257] Otherwise, the value of predModeIntra is set to the value of the mode index number of the central luminance block corresponding to the luminance position of the current block (such as the chrominance block) IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2];

[0258] (2) When intra_mip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, that is, the prediction mode of the current block is the MIP mode, the value of predModeIntra can be directly set to the index number indicating the PLANAR mode (that is, 0).

[0259] For the traditional intra prediction mode (such as wide angle mapping), during the code stream parsing process, wide angle mapping can also be performed according to the size of the current block, and the traditional intra prediction mode [0, 66] is extended to [-14, 80]. The specific mapping process is as follows:

[0260] First, the width-to-height ratio factor (which can be expressed as whRatio) is calculated, as shown in the above formula (6).

[0261] For a non-square current block (i.e., nTbW is not equal to nTbH), the value of predModeIntra can be modified 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).

[0262] In the current H.266 / VVC, according to the value of predModeIntra and Table 1, the value of the LFNST index number (which can be represented by SetIdx) can be determined, and the specific values ​​are shown in Table 1. Here, the value of the LFNST index number is set to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set. Generally speaking, the LFNST transform set includes four transform core candidate sets (set0, set1, set2, set3), corresponding to the values ​​of SetIdx of 0, 1, 2, and 3, respectively.

[0263] It can be understood that in the embodiments of the present application, it is precisely because the LFNST transformation matrix is ​​related to the directional characteristics of the prediction mode, and for non-traditional intra-frame prediction modes, such as the CCLM mode, since the transformation set cannot be selected, it is necessary to first map it to a traditional intra-frame prediction mode. Specifically, during mapping, the value of predModeIntra is set mainly based on the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block. That is to say, at present, if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the MIP mode, the CCLM mode can be mapped to PLANAR; if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the IBC mode or the PLT mode, the CCLM mode can be mapped to DC; if the intra-frame prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block is the traditional intra-frame prediction mode, then continue to perform wide-angle mapping according to the size of the current chrominance transform block. Then, the transform kernel candidate set is selected according to the mapped angle.

[0264] That is to say, for the current H.266 / VVC, the CCLM mode needs to be mapped to the traditional intra-frame prediction mode before the transform kernel candidate set can be selected. However, the above mapping method has poor accuracy and may introduce new mappings. It can be seen that the current LFNST technology has poor applicability to the CCLM mode, and the additional mapping processing increases the transformation process of the LFNST technology, thereby reducing the decoding efficiency.

[0265] Furthermore, in an embodiment of the present application, if the current block uses LFNST transformation technology, the decoder no longer determines the value of predModeIntra by mapping the CCLM mode to the traditional intra prediction mode, but determines the LFNST transformation kernel used by the current block based on the CCLM parameters, so that the corresponding LFNST index number can be set.

[0266] It should be noted that in the embodiment of the present application, after determining the LFNST index number, the decoder can determine the LFNST transform core candidate set according to the CCLM parameters, and then determine the LFNST transform core used for the current block from the LFNST transform core candidate set.

[0267] Step 1504: When the LFNST index number indicates that the current block uses LFNST, determine the LFNST transformation kernel used by the current block according to the CCLM parameters.

[0268] In an embodiment of the present application, after the decoder determines the transform coefficient and LFNST index number of the current block by parsing the bitstream, if it is determined based on the LFNST index number that the current block uses LFNST, the decoder can further determine the LFNST transform kernel used by the current block according to the CCLM parameters.

[0269] It can be understood that in an embodiment of the present application, the CCLM parameters may include a CCLM mode index number, wherein the CCLM mode index number is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation and derivation method of using CCLM to determine the intra-frame prediction value of the current block.

[0270] It should be noted that, in the embodiment of the present application, since the LFNST transform core candidate set includes two or more preset transform cores, after the LFNST index number is obtained by parsing the code stream, the transform core indicated by the LFNST index number can be selected from the LFNST transform core candidate set according to the value of the obtained LFNST index number. For example, when the value of the LFNST index number is 1, the first group of LFNST transform cores (i.e., the first group of transform matrices) in the LFNST transform core candidate set will be selected; or, when the value of the LFNST index number is 2, the second group of LFNST transform cores (i.e., the second group of transform matrices) in the LFNST transform core candidate set will be selected.

[0271] Further, in an embodiment of the present application, for the value of the LFNST index number (i.e., lfnst_idx), when the value of the LFNST index number is equal to 0, LFNST will not be used; and when the value of the LFNST index number is greater than 0, LFNST will be used, and the index number of the transform core is equal to the value of the LFNST index number, or the index number of the transform core is equal to the value of the LFNST index number minus 1. Furthermore, the decoder can further determine the LFNST transform core used by the current block according to the LFNST index number.

[0272] For example, in the embodiments of the present application, Fig.17 The following is a schematic diagram of the implementation process of the transformation method. Figure 5 ,like Fig.17 As shown, when the decoder determines the LFNST transform kernel used by the current block according to the CCLM parameter, if the CCLM parameter is a CCLM mode index number, when the LFNST index number indicates that the current block uses LFNST, the method for the decoder to determine the LFNST transform kernel used by the current block according to the CCLM parameter may include the following steps:

[0273] Step 1701: Determine the value of the LFNST intra prediction mode index number according to the value of the CCLM mode index number.

[0274] Step 1702: Select an LFNST transform core candidate set from multiple LFNST transform core candidate sets according to the value of the LFNST intra prediction mode index sequence number.

[0275] Step 1703: Select a transformation core indicated by an LFNST index number from the selected LFNST transformation core candidate set, and set it as the LFNST transformation core used for the current block; wherein the LFNST transformation core candidate set includes two or more preset LFNST transformation cores.

[0276] It should be noted that, in an embodiment of the present application, the CCLM mode index number is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation and derivation method of using CCLM to determine the intra-frame prediction value of the current block. In other words, the decoder can further determine the LFNST transformation kernel according to the CCLM mode index number.

[0277] Furthermore, in an embodiment of the present application, after determining the CCLM mode index number, the decoder may also convert the CCLM mode index number into a value of an LFNST intra-frame prediction mode index number (which may be represented by predModeIntra); and then, based on the value of predModeIntra, select an LFNST transform core candidate set from multiple LFNST transform core candidate sets to determine the transform core candidate set; and in the selected LFNST transform core candidate set, select the transform core indicated by the LFNST index number and set it as the LFNST transform core used by the current block.

[0278] It should be noted that in an embodiment of the present application, after determining the CCLM mode index number, the decoder can also convert the CCLM mode index number into the value of the LFNST intra-frame prediction mode index number (which can be represented by predModeIntra), and then select an LFNST transform core candidate set from multiple LFNST transform core candidate sets according to the value of predModeIntra to determine the transform core candidate set; and in the selected LFNST transform core candidate set, select the transform core indicated by the LFNST index number.

[0279] Exemplarily, in an embodiment of the present application, when the decoder determines the value of the LFNST intra-frame prediction mode index number according to the value of the CCLM mode index number, it can specifically use a first lookup table to determine the value of the LFNST intra-frame prediction mode index number corresponding to the value of the CCLM mode index number, wherein the first lookup table contains at least one or more different CCLM mode index numbers corresponding to each of two LFNST intra-frame prediction mode index numbers with different values.

[0280] That is to say, in the present application, when the CCLM parameter is the CCLM mode index number (modeId), the decoder can also obtain the value of the LFNST intra-frame prediction mode index number by looking up a table when selecting the LFNST transform kernel used for the current block.

[0281] It should be noted that, in an embodiment of the present application, the first look-up table (Look-Up Table 1, LUT1) is used to reflect the correspondence between the CCLM mode index number and the LFNST intra-frame prediction mode index number, that is, in the first look-up table, at least one or more different CCLM mode index numbers corresponding to two LFNST intra-frame prediction mode index numbers with different values ​​are included.

[0282] That is to say, in the present application, different CCLM modes may correspond to different values ​​of predModeIntra; therefore, the decoder determines the CCLM mode index number according to the CCLM mode, and then determines the value of predModeIntra according to the first lookup table; then, according to the value of predModeIntra, an LFNST transform core candidate set can be selected from multiple LFNST transform core candidate sets, thereby determining the LFNST transform core used for the current block.

[0283] It can be understood that in the embodiment of the present application, the value of predModeIntra can be determined according to the value of the CCLM mode index number (modeId); then according to the value of predModeIntra, the value of SetIdx can be directly determined according to Table 2, that is, the LFNST transform core candidate set selected by the current block is determined. Here, the value of SetIdx indicates the transform core candidate set used in LFNST; since the value of the CCLM mode index number (modeId) can include 81, 82 and 83, the value of predModeIntra is also 81, 82 and 83. Based on the above Table 1, the correspondence between predModeIntra and SetIdx can refer to the above Table 2.

[0284] It can be seen that in the present application, after updating the above Table 1 to the above Table 2, for the CCLM mode, the decoder no longer needs to select the transform core candidate set by mapping the CCLM mode to the traditional intra-frame prediction mode, but can directly obtain the corresponding LFNST index number based on the CCLM mode index number corresponding to the CCLM mode by querying the first lookup table, and finally realize the determination of the LFNST transform core candidate set.

[0285] In an embodiment of the present application, further, the decoder can also directly determine the LFNST transform kernel candidate set according to the value of the CCLM mode index number. At this time, there is no need to rely on the value of predModeIntra, that is, there is no need to determine the value of the LFNST intra-frame prediction mode index number according to the CCLM mode index number.

[0286] Exemplarily, in some embodiments, Fig.18 The following is a schematic diagram of the implementation process of the transformation method. Figure 6 ,like Fig.18 As shown, when the CCLM parameter is a CCLM mode index number, and when the LFNST index number indicates that the current block uses LFNST, the method for the decoder to determine the LFNST transform kernel used by the current block according to the CCLM parameter may include the following steps:

[0287] Step 1801: Select an LFNST transform kernel candidate set from multiple LFNST transform kernel candidate sets according to the value of the CCLM mode index number.

[0288] Step 1802: Select a transform core indicated by an LFNST index number from the selected LFNST transform core candidate set, and set it as the LFNST transform core used for the current block; wherein the LFNST transform core candidate set includes two or more preset LFNST transform cores.

[0289] Further, in an embodiment of the present application, when the decoder selects an LFNST transform core candidate set from multiple LFNST transform core candidate sets based on the value of the CCLM mode index number, it can specifically use a second lookup table to determine the value of the LFNST transform core candidate set index number corresponding to the value of the CCLM mode index number, and select the LFNST transform core candidate set indicated by the value of the LFNST transform core candidate set index number as the selected LFNST transform core candidate set.

[0290] It should be noted that, in an embodiment of the present application, the second look-up table (Look-Up Table 2, LUT2) contains at least one or more different CCLM mode index numbers corresponding to two different values ​​of the LFNST transform core candidate set index numbers.

[0291] It should be noted that if the prediction mode used by the current block is CCLM mode, the selected LFNST transform core candidate set can be directly determined according to the value of CCLM mode index number (modeId). As shown in Table 3, the value of SetIdx indicates the transform core candidate set used in LFNST; the value of CCLM mode index number (modeId) can include 81, 82 and 83, each CCLM mode index number corresponds to a LFNST transform core candidate set, specifically, the corresponding relationship between modeId and SetIdx is shown in Table 3 above.

[0292] It can be seen that in the present application, for the CCLM mode, the decoder no longer needs to select the transform core candidate set by mapping the CCLM mode to the traditional intra-frame prediction mode, but can directly obtain the corresponding LFNST index number based on the CCLM mode index number corresponding to the CCLM mode by querying the second lookup table, and finally determine the LFNST transform core candidate set. In other words, the decoder can determine the value of the corresponding LFNST transform core candidate set index number according to the value of the CCLM mode index number, so as to select the LFNST transform core candidate set indicated by the value of the LFNST transform core candidate set index number as the selected LFNST transform core candidate set. For example, it can be seen from Table 3 that when the value of the CCLM mode index number (modeId) is 81, it can be determined that the value of the LFNST transform core candidate set index number (SetIdx) is 3, that is, the transform core candidate set indicated by 3 is used as the selected LFNST transform core candidate set; or, when modeId is 82 or 83, it can be determined that the value of SetIdx is 1, that is, the transform core candidate set indicated by 1 is used as the selected LFNST transform core candidate set, and so on.

[0293] In an embodiment of the present application, further, if the prediction mode of the current block is the CCLM mode, the decoder may also fixedly select one of the transform sets (such as set1 or set2 or set3) as an LFNST transform core candidate set selected from multiple LFNST transform core candidate sets when determining the LFNST transform core candidate set.

[0294] That is to say, in the present application, when the decoder determines the LFNST transform kernel candidate set, for the current block using the CCLM mode for intra-frame prediction, the decoder no longer performs mapping with the traditional intra-frame prediction mode, but directly uses a preset fixed transform set as the corresponding LFNST transform kernel candidate set. Exemplarily, in the present application, for the current block using the CCLM mode, the decoder can directly determine the LFNST transform kernel candidate set corresponding to the current block as set1.

[0295] In an embodiment of the present application, further, if the prediction mode of the current block is the CCLM mode, the decoder no longer performs mapping with the traditional intra prediction mode, but directly selects the LFNST transform core candidate set according to the value of the CCLM mode index number (modeId). Specifically, as shown in Table 4, each CCLM mode corresponds to an LFNST transform core candidate set, wherein the value of the LFNST index number (which can be represented by SetIdx) can be determined according to the value of predModeIntra of the CCLM mode.

[0296] It can be understood that in the embodiment of the present application, a, b, and c in Table 4 can take any value from {0, 1, 2, 3} corresponding to the value of SetIdx in four transform core candidate sets (set0, set1, set2, set3).

[0297] It should be noted that, in an embodiment of the present application, if the prediction mode of the current block is the CCLM mode, the decoder may also select the LFNST transform kernel candidate set according to one or more information combinations in the CCLM parameters.

[0298] Furthermore, in an embodiment of the present application, if the prediction mode of the current block is the CCLM mode, the decoder can also map the CCLM parameters with the traditional intra prediction mode, map it to a certain traditional intra prediction mode, and then fix one of the transform sets (such as set1 or set2 or set3) as a LFNST transform core candidate set selected from multiple LFNST transform core candidate sets, or select the LFNST transform core candidate set based on the above Table 4.

[0299] It should be noted that in an embodiment of the present application, the decoder can also determine the transformation matrix (i.e., transformation kernel) to be used based on one or more information combinations in the CCLM parameters, and determining the transformation matrix includes the selection of a transformation set and a transformation matrix group; wherein the decoder can fixedly select a certain transformation matrix group in a certain transformation set based on the CCLM parameters, and there is no need to make a selection on the encoder side, nor to transmit lfnst_idx, and therefore, the decoder side does not need to parse the lfnst_idx bitstream.

[0300] Further, in an embodiment of the present application, when the prediction mode parameter indicates that the current block uses a non-CCLM mode, the decoder can first determine the value of predModeIntra based on the intra-frame prediction mode when performing a LFNST transform core candidate set; and then select an LFNST transform core candidate set from multiple LFNST transform core candidate sets based on the value of predModeIntra.

[0301] That is to say, if the prediction mode of the current block is non-CCLM mode, the value of predModeIntra can be determined according to the intra-frame prediction mode; then according to the value of predModeIntra, combined with the above Table 1, an LFNST transform core candidate set can be selected from multiple LFNST transform core candidate sets, and then the transform core indicated by the LFNST index number is selected from the selected LFNST transform core candidate set, and set as the LFNST transform core used by the current block.

[0302] It can be understood that, in the embodiment of the present application, for the value of the LFNST index number, when the value of the LFNST index number is equal to 0, the LFNST will not be used; and when the value of the LFNST index number is greater than 0, the LFNST will be used, and the index number of the transform core is equal to the value of the LFNST index number, or the index number of the transform core is equal to the value of the LFNST index number minus 1. Furthermore, after determining the LFNST transform core used for the current block, the decoder also needs to set the LFNST index number and write it into the video bitstream, so that the subsequent decoder side can obtain the LFNST index number by parsing the bitstream.

[0303] Step 1505: Use the LFNST transformation kernel to transform the transformation coefficients.

[0304] In an embodiment of the present application, after determining the LFNST transform kernel used by the current block according to the CCLM parameters, the decoder may use the LFNST transform kernel to perform transform processing on the prediction difference.

[0305] It should be noted that, in an embodiment of the present application, after selecting the LFNST transform core candidate set, the decoder can obtain the value of the LFNST index number (lfnst_idx) by parsing the bitstream; then, according to the value of lfnst_idx, the transform matrix (transform core) indicated by lfnst_idx can be selected from the LFNST transform core candidate set. For example, when lfnst_idx is 1, the first set of transform matrices can be used as the LFNST transform core during decoding; when lfnst_idx is 2, the second set of transform matrices can be used as the LFNST transform core during decoding.

[0306] Further, in an embodiment of the present application, for each set of transformation matrices (transformation kernels), there are two sizes of basic transformation matrices, and the sizes of the basic transformation matrices used on the decoder side are 16×16 and 48×16. Selection is made according to nLfnstOutSize. If nLfnstOutSize is 16, a 16x16 basic transformation matrix is ​​selected; or, if nLfnstOutSize is 48, a 48x16 basic transformation matrix is ​​selected. Alternatively, if nonZeroSize is 8, only the first 8 rows in the transformation matrix are used for matrix multiplication calculations.

[0307] Further, in the embodiment of the present application, the secondary transformation coefficient vector u[i] is taken as input, and the transformation matrix is ​​used to multiply it to obtain the primary transformation coefficient vector v[j], where i=0, 1, ..., nonZeroSize-1, j=0, 1, ..., nLfnstOutSize-1. Assuming that the transformation matrix obtained in the previous step is lowFreqTransMatrix, the specific calculation process of v[j] is as follows:

[0308]

[0309] Among them, Clip3 is a clamping operation, which can limit the value of the coefficient between the following two numbers, as shown below:

[0310] CoeffMin=-(1<<15) (16)

[0311] CoeffMax=(1<<15)-1 (17)

[0312] Furthermore, after the above matrix calculation, the transformation processing of the transformation coefficients can be realized. Here, for 4×4 LFNST, 16 or 8 coefficients will be input on the decoder side, and 16 coefficients will be output; and for 8×8 LFNST, 16 or 8 coefficients will be input on the decoder side, and 48 coefficients will be output to realize the LFNST transformation processing of the transformation coefficients.

[0313] It can be seen that in the embodiment of the present application, for the current block using the CCLM mode for intra-frame prediction, the decoder introduces the relevant information of the CCLM parameters in the process of performing LFNST on the current block using the CCLM mode, and selects a transform set (or transform kernel) according to the CCLM information. Therefore, when the current block is transformed, it is no longer necessary to map the CCLM mode to the traditional intra-frame prediction mode, thereby improving the applicability of the LFNST technology to the current block using the CCLM mode, making the selection of the transform set (or transform kernel) more flexible.

[0314] The present application proposes a transformation method, which is applied to a decoder, wherein the decoder parses a bitstream to determine prediction mode parameters of a current block; when the prediction mode parameters indicate that the current block uses the CCLM mode to determine an intra-frame prediction value, the decoder parses the bitstream to determine the CCLM parameters; parses the bitstream to determine the transformation coefficient and LFNST index number of the current block; when the LFNST index number indicates that the current block uses LFNST, the LFNST transformation kernel used by the current block is determined according to the CCLM parameters; and the transformation coefficient is transformed using the LFNST transformation kernel. It can be seen that in an embodiment of the present application, when the codec performs transformation processing on the current block that uses the CCLM mode for intra-frame prediction, it does not need to map the CCLM mode to the traditional intra-frame prediction mode, but can directly determine the LFNST transformation kernel used by the current block according to the CCLM parameters corresponding to the current block, so that the LFNST transformation kernel can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST transformation kernel more flexible, thereby improving the applicability of LFNST technology to CCLM mode and reducing the transformation process of LFNST technology, effectively improving coding efficiency.

[0315] Based on the above embodiment, in yet another embodiment of the present application, Fig.19 The structure of the encoder is shown in Figure 2. Figure 1 ,like Fig.19 As shown, the encoder 300 proposed in the embodiment of the present application may include a first determination part 301, a calculation part 302, and a first transformation part 303.

[0316] The first determining part 301 is configured to determine a prediction mode parameter of the current block; and when the prediction mode parameter indicates that the current block uses CCLM to determine an intra-frame prediction value, determine a CCLM parameter; and determine the intra-frame prediction value of the current block according to the CCLM parameter;

[0317] The calculation part 302 is configured to calculate the prediction difference between the current block and the intra prediction value according to the CCLM parameter;

[0318] The first determining part 301 is further configured to determine the LFNST transformation kernel used by the current block according to the CCLM parameters when the current block uses LFNST, set the LFNST index number and write it into the video bitstream;

[0319] The first transform part 303 is configured to use the LFNST transform kernel to perform transform processing on the prediction difference.

[0320] Fig. 20 The structure of the encoder is shown in Figure 2. Figure 2 ,like Fig. 20 As shown, the encoder 300 proposed in the embodiment of the present application may also include a first processor 304, a first memory 305 storing executable instructions of the first processor 304, a first communication interface 306, and a first bus 307 for connecting the first processor 304, the first memory 305 and the first communication interface 306.

[0321] Further, in an embodiment of the present application, the above-mentioned first processor 304 is used to determine a prediction mode parameter of a current block; when the prediction mode parameter indicates that the current block uses CCLM to determine an intra-frame prediction value, determine the CCLM parameter; determine the intra-frame prediction value of the current block according to the CCLM parameter, and calculate the prediction difference between the current block and the intra-frame prediction value; when the current block uses LFNST, determine the LFNST transformation core used by the current block according to the CCLM parameter, set the LFNST index number and write it into the video bitstream; use the LFNST transformation core to transform the prediction difference.

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

[0323] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0324] An embodiment of the present application provides an encoder, which determines the prediction mode parameters of the current block; when the prediction mode parameters indicate that the current block uses CCLM to determine the intra-frame prediction value, the CCLM parameters are determined; according to the CCLM parameters, the intra-frame prediction value of the current block is determined, and the prediction difference between the current block and the intra-frame prediction value is calculated; when the current block uses LFNST, according to the CCLM parameters, the LFNST transformation core used by the current block is determined, the LFNST index number is set and written into the video bitstream; the prediction difference is transformed using the LFNST transformation core. It can be seen that in an embodiment of the present application, when the codec transforms the current block that uses the CCLM mode for intra-frame prediction, it does not need to map the CCLM mode to the traditional intra-frame prediction mode, but can directly determine the LFNST transformation core used by the current block according to the CCLM parameters corresponding to the current block, so that the LFNST transformation core can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST transformation kernel more flexible, thereby improving the applicability of LFNST technology to CCLM mode and reducing the transformation process of LFNST technology, effectively improving coding efficiency.

[0325] Fig.21 The structure of the decoder is shown in Figure 2. Figure 1 ,like Fig.21 As shown, the decoder 400 proposed in the embodiment of the present application may include a parsing part 401 , a second determining part 402 , and a second transforming part 403 .

[0326] The parsing part 401 is configured to parse the code stream to determine the prediction mode parameters of the current block; and when the prediction mode parameters indicate that the current block uses the CCLM mode to determine the intra-frame prediction value, parse the code stream;

[0327] The second determining part 402 is configured to determine CCLM parameters; and parse the bitstream to determine the transform coefficient and LFNST index number of the current block; and when the LFNST index number indicates that the current block uses LFNST, determine the LFNST transform kernel used by the current block according to the CCLM parameters;

[0328] The second transform section 403 is configured to use the LFNST transform kernel to perform transform processing on the transform coefficients.

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

[0330] Further, in an embodiment of the present application, the second processor 404 is configured to parse a bitstream to determine a prediction mode parameter of a current block; when the prediction mode parameter indicates that the current block uses a CCLM mode to determine an intra-frame prediction value, parse the bitstream to determine the CCLM parameter; parse the bitstream to determine a transform coefficient and an LFNST index number of the current block; when the LFNST index number indicates that the current block uses LFNST, determine, according to the CCLM parameter, a LFNST transform kernel used by the current block; and perform transform processing on the transform coefficient using the LFNST transform kernel.

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

[0332] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0333] An embodiment of the present application provides a decoder that parses a bitstream to determine prediction mode parameters of a current block; when the prediction mode parameters indicate that the current block uses the CCLM mode to determine an intra-frame prediction value, the decoder parses the bitstream to determine the CCLM parameters; parses the bitstream to determine the transformation coefficient and LFNST index number of the current block; when the LFNST index number indicates that the current block uses LFNST, the LFNST transformation core used by the current block is determined according to the CCLM parameters; and the transformation coefficient is transformed using the LFNST transformation core. It can be seen that in an embodiment of the present application, when the codec performs transformation processing on the current block that uses the CCLM mode for intra-frame prediction, it does not need to map the CCLM mode to the traditional intra-frame prediction mode, but can directly determine the LFNST transformation core used by the current block based on the CCLM parameters corresponding to the current block, so that the LFNST transformation core can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST transformation kernel more flexible, thereby improving the applicability of LFNST technology to CCLM mode and reducing the transformation process of LFNST technology, effectively improving coding efficiency.

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

[0335] Specifically, the program instructions corresponding to a transformation method in this embodiment can be stored in a storage medium such as a CD, a hard disk, a USB flash drive, etc. When the program instructions corresponding to a transformation method in the storage medium are read or executed by an electronic device, the following steps are included:

[0336] Determining prediction mode parameters for the current block;

[0337] When the prediction mode parameter indicates that the current block uses CCLM to determine an intra-frame prediction value, determining a CCLM parameter;

[0338] Determine an intra-frame prediction value of the current block according to the CCLM parameter, and calculate a prediction difference between the current block and the intra-frame prediction value;

[0339] When the current block uses LFNST, determine the LFNST transformation kernel used by the current block according to the CCLM parameters, set the LFNST index number and write it into the video bitstream;

[0340] The prediction difference is transformed using the LFNST transformation kernel.

[0341] Specifically, the program instructions corresponding to a transformation method in this embodiment can be stored in a storage medium such as a CD, a hard disk, a USB flash drive, etc. When the program instructions corresponding to a transformation method in the storage medium are read or executed by an electronic device, the following steps are included:

[0342] Parse the bitstream and determine the prediction mode parameters of the current block;

[0343] When the prediction mode parameter indicates that the current block uses the CCLM mode to determine the intra-frame prediction value, parsing the bitstream to determine the CCLM parameter;

[0344] Parsing the bitstream to determine the transform coefficient and LFNST index number of the current block;

[0345] When the LFNST index number indicates that the current block uses LFNST, determining, according to the CCLM parameter, an LFNST transformation kernel used by the current block;

[0346] The transform coefficients are transformed using the LFNST transform kernel.

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

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

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

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

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

[0352] Industrial Applicability

[0353] The embodiment of the present application provides a transformation method, an encoder, a decoder and a storage medium, wherein the encoder determines the prediction mode parameters of the current block; when the prediction mode parameters indicate that the current block uses CCLM to determine the intra-frame prediction value, the CCLM parameters are determined; according to the CCLM parameters, the intra-frame prediction value of the current block is determined, and the prediction difference between the current block and the intra-frame prediction value is calculated; when the current block uses LFNST, according to the CCLM parameters, the LFNST transformation core used by the current block is determined, the LFNST index number is set and written into the video bitstream; the prediction difference is transformed using the LFNST transformation core. The decoder parses the bitstream to determine the prediction mode parameters of the current block; when the prediction mode parameters indicate that the current block uses CCLM mode to determine the intra-frame prediction value, the bitstream is parsed to determine the CCLM parameters; the bitstream is parsed to determine the transformation coefficient and the LFNST index number of the current block; when the LFNST index number indicates that the current block uses LFNST, the LFNST transformation core used by the current block is determined according to the CCLM parameters; and the transformation coefficient is transformed using the LFNST transformation core. It can be seen that in the embodiment of the present application, when the codec performs transformation processing on the current block using the CCLM mode for intra-frame prediction, it is not necessary to map the CCLM mode to the traditional intra-frame prediction mode, but can directly determine the LFNST transformation kernel used by the current block according to the CCLM parameters corresponding to the current block, so that the LFNST transformation kernel can be used for LFNST transformation. It can be understood that it is precisely because the CCLM parameters are introduced when performing the LFNST transformation that the selection of the LFNST transformation kernel is more flexible, thereby improving the applicability of the LFNST technology to the CCLM mode, reducing the transformation process of the LFNST technology, and effectively improving the coding efficiency.

Claims

1. A transformation method, applied to an encoder, comprising: Determining prediction mode parameters for the current block; When the prediction mode parameter indicates that the current block uses an inter-component linear model prediction CCLM to determine an intra-frame prediction value, determining a CCLM parameter; Determine an intra-frame prediction value of the current block according to the CCLM parameter, and calculate a prediction difference between the current block and the intra-frame prediction value; When the current block uses a low frequency non-separable secondary transform LFNST, determining the LFNST transform kernel used by the current block according to the CCLM parameter, setting the LFNST index number and writing it into the video bitstream; The prediction difference is transformed using the LFNST transformation kernel.

2. The method according to claim 1, wherein: The CCLM parameter includes a CCLM mode index number, wherein the CCLM mode index number is used to indicate a CCLM mode used by the current block, and the CCLM mode is used to indicate a calculation and derivation method for determining an intra-frame prediction value of the current block using CCLM.

3. The method according to claim 2, wherein: The step of determining the LFNST transformation core used by the current block according to the CCLM parameter, setting the LFNST index sequence number and writing it into the video bitstream includes: Determine the value of the LFNST intra prediction mode index number according to the value of the CCLM mode index number; Selecting an LFNST transform core candidate set from multiple LFNST transform core candidate sets according to the value of the LFNST intra prediction mode index sequence number; Selecting a transformation core indicated by the LFNST index number from the selected LFNST transformation core candidate set, and setting it as the LFNST transformation core used by the current block; The value of the LFNST index number is set to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set; The LFNST transform kernel candidate set includes two or more preset LFNST transform kernels.

4. The method according to claim 3, wherein: The determining the value of the LFNST intra prediction mode index number according to the value of the CCLM mode index number includes: A first lookup table is used to determine the value of the LFNST intra-frame prediction mode index number corresponding to the value of the CCLM mode index number, wherein the first lookup table contains at least one or more different CCLM mode index numbers corresponding to two LFNST intra-frame prediction mode index numbers with different values.

5. The method according to claim 2, wherein: When the current block uses LFNST, determining the LFNST transformation core used by the current block according to the CCLM parameter, setting the LFNST index sequence number and writing it into the video bitstream, including: Selecting an LFNST transform core candidate set from multiple LFNST transform core candidate sets according to the value of the CCLM mode index sequence number; Selecting a transformation core indicated by the LFNST index number from the selected LFNST transformation core candidate set, and setting it as the LFNST transformation core used by the current block; The value of the LFNST index number is set to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set; The LFNST transform kernel candidate set includes two or more preset LFNST transform kernels.

6. The method according to claim 5, wherein: The step of selecting a LFNST transform core candidate set from a plurality of LFNST transform core candidate sets according to the value of the CCLM mode index sequence number comprises: Determine the value of the LFNST transform core candidate set index number corresponding to the value of the CCLM mode index number using a second lookup table, and select the LFNST transform core candidate set indicated by the value of the LFNST transform core candidate set index number as the selected LFNST transform core candidate set; The second lookup table contains at least one or more different CCLM mode index numbers corresponding to two different values ​​of the LFNST transform kernel candidate set index numbers.

7. The method according to claim 1, wherein: After determining the CCLM parameters, the method further includes: The prediction mode parameters of the current block and the CCLM parameters are written into the bitstream.

8. A transformation method, applied to a decoder, the method comprising: Parse the bitstream and determine the prediction mode parameters of the current block; When the prediction mode parameter indicates that the current block uses the CCLM mode to determine the intra-frame prediction value, parsing the bitstream to determine the CCLM parameter; Parsing the bitstream to determine the transform coefficient and LFNST index number of the current block; When the LFNST index number indicates that the current block uses LFNST, determining, according to the CCLM parameter, an LFNST transformation kernel used by the current block; The transform coefficients are transformed using the LFNST transform kernel.

9. The method according to claim 8, wherein: The CCLM parameter includes a CCLM mode index number, wherein the CCLM mode index number is used to indicate a CCLM mode used by the current block, and the CCLM mode is used to indicate a calculation and derivation method for determining an intra-frame prediction value of the current block using CCLM.

10. The method according to claim 9, wherein: When the LFNST index number indicates that the current block uses LFNST, determining the LFNST transformation kernel used by the current block according to the CCLM parameter includes: Determine the value of the LFNST intra prediction mode index number according to the value of the CCLM mode index number; Selecting an LFNST transform core candidate set from multiple LFNST transform core candidate sets according to the value of the LFNST intra prediction mode index sequence number; Selecting a transformation core indicated by the LFNST index number from the selected LFNST transformation core candidate set, and setting it as the LFNST transformation core used by the current block; The LFNST transform kernel candidate set includes two or more preset LFNST transform kernels.

11. The method according to claim 10, wherein: The determining the value of the LFNST intra prediction mode index number according to the value of the CCLM mode index number includes: A first lookup table is used to determine the value of the LFNST intra-frame prediction mode index number corresponding to the value of the CCLM mode index number, wherein the first lookup table contains at least one or more different CCLM mode index numbers corresponding to two LFNST intra-frame prediction mode index numbers with different values.

12. The method according to claim 9, wherein: When the LFNST index number indicates that the current block uses LFNST, determining the LFNST transformation kernel used by the current block according to the CCLM parameter includes: Selecting an LFNST transform core candidate set from multiple LFNST transform core candidate sets according to the value of the CCLM mode index sequence number; Selecting a transformation core indicated by the LFNST index number from the selected LFNST transformation core candidate set, and setting it as the LFNST transformation core used by the current block; The LFNST transform kernel candidate set includes two or more preset LFNST transform kernels.

13. The method according to claim 12, wherein: The step of selecting a LFNST transform core candidate set from a plurality of LFNST transform core candidate sets according to the value of the CCLM mode index sequence number comprises: Determine the value of the LFNST transform core candidate set index number corresponding to the value of the CCLM mode index number using a second lookup table, and select the LFNST transform core candidate set indicated by the value of the LFNST transform core candidate set index number as the selected LFNST transform core candidate set; The second lookup table contains at least one or more different CCLM mode index numbers corresponding to two different values ​​of the LFNST transform kernel candidate set index numbers.

14. An encoder, comprising a first processor and a first memory storing instructions executable by the first processor, wherein when the instructions are executed, the first processor implements the method according to any one of claims 1 to 7.

15. A computer storage medium, wherein: The computer storage medium stores a computer program, which implements the method according to any one of claims 1 to 7 when executed by a first processor, or implements the method according to any one of claims 8 to 13 when executed by a second processor.

Citation Information

Patent Citations

  • Image encoding and decoding method and device

    CN109922348A

  • Transformation method, encoder, decoder, and storage medium

    CN114830663A

  • Method and device for image decoding in image coding system

    WO2018174357A1

  • Intra-prediction-based image coding method and apparatus thereof

    WO2019198997A1

  • Image decoding method / device, image encoding method / device, and recording medium in which bitstream is stored

    WO2019221465A1