Transform method, encoder, decoder, and storage medium

By directly utilizing CCLM parameters to determine the LFNST transform kernel in the encoder and decoder, the problem of insufficient applicability of LFNST technology to CCLM mode in H.266/VVC is solved, thereby improving coding efficiency.

CN119788855BActive Publication Date: 2025-12-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The LFNST technique in H.266/VVC is poorly suited for CCLM mode. The additional mapping processing increases the transformation process and reduces coding efficiency.

Method used

The encoder and decoder determine the LFNST transform kernel directly based on the CCLM parameters, avoiding mapping the CCLM mode to the traditional intra-frame prediction mode and improving the flexibility of the LFNST transform kernel.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788855B_ABST
    Figure CN119788855B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a transform method, an encoder, a decoder and a storage medium. The encoder determines a prediction mode parameter of a current block; when the prediction mode parameter indicates that the current block uses CCLM to determine an intra prediction value, CCLM parameters are determined; according to the CCLM parameters, the intra prediction value of the current block is determined, and a prediction difference value between the current block and the intra prediction value is calculated; when the current block uses LFNST, according to the CCLM parameters, an LFNST transform kernel used by the current block is determined, an LFNST index serial number is set and written into a video code stream; and the prediction difference value is processed by using the LFNST transform kernel.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of image processing, and in particular, to a transformation method, an encoder, a decoder and a storage medium. BACKGROUND

[0002] With the increasing demand for video display quality, new video application forms such as high-definition and ultra-high-definition videos have emerged. H.265 / High Efficiency Video Coding (HEVC) has been unable to meet the needs of the rapid development of video applications, and the Joint Video Exploration Team (JVET) has proposed the next generation video coding standard H.266 / Versatile Video Coding (VVC). The corresponding test model is the reference software test platform of VVC (VVC Test Model, VTM).

[0003] At present, the Reduced Second Transform (RST) technology has been accepted in H.266 / VVC and renamed as Low-Frequency Non-Separable Transform (LFNST) technology. The LFNST technology mainly includes five steps of configuring core parameters, intra 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 prediction mode. For non-traditional intra prediction modes such as Cross-component Linear Model Prediction (CCLM) mode, the selection of the transform kernel candidate set needs to be performed after the non-traditional intra prediction modes are mapped to traditional intra prediction modes, that is, the applicability of the LFNST technology to the CCLM mode is poor, and the additional mapping process increases the transform process of the LFNST technology, thereby reducing the coding efficiency. SUMMARY

[0004] 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 transform process of the LFNST technology, and effectively improve the coding efficiency.

[0005] The technical solutions of the embodiments of the present application can be implemented as follows:

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

[0007] determining a prediction mode parameter of a current block;

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

[0009] determining the intra prediction value of the current block according to the CCLM parameter, and calculating a prediction difference value between the current block and the intra prediction value;

[0010] when the current block uses LFNST, determining a LFNST transform kernel used by the current block according to the CCLM parameter, setting a LFNST index number and writing the LFNST index number into a video bitstream;

[0011] transforming the prediction difference value using the LFNST transform kernel.

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

[0013] parsing a bitstream to determine a prediction mode parameter of a current block;

[0014] when the prediction mode parameter indicates that the current block uses CCLM mode to determine an intra prediction value, parsing the bitstream to determine a CCLM parameter;

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

[0016] when the LFNST index number indicates that the current block uses LFNST, determining a LFNST transform kernel used by the current block according to the CCLM parameter;

[0017] transforming the transform coefficient 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 a current block, and when the prediction mode parameter indicates that the current block uses CCLM to determine an intra prediction value, determine a CCLM parameter, and determine the intra prediction value of the current block according to the CCLM parameter;

[0020] the calculating part is configured to calculate a prediction difference value between the current block and the intra prediction value according to the CCLM parameter;

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

[0022] The first transform part is configured to perform transform processing on the prediction difference value by using the LFNST transform kernel.

[0023] In a fourth aspect, an embodiment of the present application provides an encoder, which comprises a first processor and a first memory storing executable instructions of the first processor, when the instructions are executed, the first processor performs the transform method as described above.

[0024] In a fifth aspect, an embodiment of the present application provides a decoder, which comprises a parsing part, a second determining part and a second transform part.

[0025] The parsing part is configured to parse a bitstream, determine a prediction mode parameter of a current block, and when the prediction mode parameter indicates that the current block uses a CCLM mode to determine an intra prediction value, parse the bitstream.

[0026] The second determining part is configured to determine a CCLM parameter, parse the bitstream, determine a transform coefficient and a LFNST index number of the current block, and 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.

[0027] The second transform part is configured to perform transform processing on the transform coefficient by using the LFNST transform kernel.

[0028] In a sixth aspect, an embodiment of the present application provides a decoder, which comprises a second processor and a second memory storing executable instructions of the second processor, when the instructions are executed, the second processor performs the transform method as described above.

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

[0030] This application provides a transformation method, an encoder, a decoder, and a storage medium. 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 intra-frame prediction values, it determines the CCLM parameters; based on the CCLM parameters, it determines the intra-frame prediction values ​​of the current block and calculates the prediction difference between the current block and the intra-frame prediction values; when the current block uses LFNST, it determines the LFNST transform kernel used by the current block based on the CCLM parameters, sets the LFNST index number, and writes it into the video bitstream; it uses the LFNST transform kernel to transform the prediction difference. 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 intra-frame prediction values, it parses the bitstream to determine the CCLM parameters; it parses the bitstream to determine the transform coefficients and LFNST index number of the current block; when the LFNST index number indicates that the current block uses LFNST, it determines the LFNST transform kernel used by the current block based on the CCLM parameters; it uses the LFNST transform kernel to transform the transform coefficients. Therefore, in the embodiments of this application, when the codec performs transform processing on the current block using CCLM mode for intra-frame prediction, it does not need to map the CCLM mode to the traditional intra-frame prediction mode. Instead, it can directly determine the LFNST transform kernel used by the current block based on the CCLM parameters corresponding to the current block, thus enabling LFNST transform to be performed using the LFNST transform kernel. It is understood that the introduction of CCLM parameters during LFNST transform makes the selection of the LFNST transform 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. Attached Figure Description

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

[0032] Figure 2 A flowchart illustrating the specific process of LFNST;

[0033] Figure 3 A schematic diagram of the luminance block at the center of the luminance location;

[0034] Figure 4 This is a block diagram of the components of a video encoding system;

[0035] Figure 5 This is a block diagram of the video decoding system.

[0036] Figure 6 Schematic diagram of the implementation process of the transformation method Figure 1 ;

[0037] Figure 7Implementation flowchart of the transform method Figure 2 ;

[0038] Figure 8 Implementation flowchart of the transform method Figure 3 ;

[0039] Figure 9 Implementation flowchart of the transform method Figure 1 ;

[0040] Figure 10 Implementation flowchart of the transform method Figure 2 ;

[0041] Figure 11 Implementation flowchart of the transform method Figure 1 ;

[0042] Figure 12 Implementation flowchart of the transform method Figure 2 ;

[0043] Figure 13 Implementation flowchart of the transform method Figure 3 ;

[0044] Figure 14 Implementation flowchart of the transform method Figure 4 ;

[0045] Figure 15 Implementation flowchart of the transform method Figure 4 ;

[0046] Figure 16 Implementation flowchart of the transform method

[0047] Figure 17 Implementation flowchart of the transform method Figure 5 ;

[0048] Figure 18 Implementation flowchart of the transform method Figure 6 ;

[0049] Figure 19 Implementation flowchart of the transform method Figure 1 ;

[0050] Figure 20 Implementation flowchart of the transform method Figure 2 ;

[0051] Figure 21 Implementation flowchart of the transform method Figure 1 ;

[0052] Figure 22 Implementation flowchart of the transform methodFigure 2 . DETAILED DESCRIPTION

[0053] In order to enable 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, and the attached drawings are used 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 (CB); wherein the three image components are a luminance component, a blue chrominance component and a red chrominance component respectively, specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV format.

[0055] In the embodiments of the present application, the first image component can be a luminance component, the second image component can be a blue chrominance component, and the third image component can be a red chrominance component, but the embodiments of the present application are not limited in this way.

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

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

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

[0059] Wherein i, j represent the position coordinates of the sampling points in the coding block, i represents the horizontal direction, and j represents the vertical direction, Pred C[i,j] denotes the second image component prediction value of the sample point with position coordinate [i,j] in the coding block, Rec L [i,j] denotes the first image component reconstructed value of the sample point with position coordinate [i,j] (after down-sampling) in the same coding block, and α and β are the scale factors of the linear model, which can be derived by minimizing the regression error of the first image component neighboring reference values and the second image component neighboring reference values, as shown in the following formula (2):

[0060]

[0061] wherein L(n) denotes the first image component neighboring reference values (such as the left and top sides) after down-sampling, C(n) denotes the second image component neighboring reference values (such as the left and top sides), and N is the number of the second image component neighboring reference values.

[0062] Specifically, the CCLM mode contains the prediction between two chroma components, i.e., the prediction between the second image component and the third image component, in addition to the method of predicting the chroma components with the luma component, i.e., predicting the second image component with the first image component or predicting the third image component with the first image component.

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

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

[0065] wherein, represents the final prediction value of the Cr component of the sample point with position coordinate [i,j] in the above current coding block, resi Cb '[i,j] is the prediction residual of the reconstructed Cb component, and the calculation method of the scale factor γ is the same as that of the calculation of the prediction model parameters of the luma component to the chroma component in the CCLM, with the only difference being that a regression cost related to the default γ value in the error function is added, so that the obtained scale factor γ is biased to the default value of -0.5. Specifically, the scale factor γ can be calculated by the following formula (4).

[0066]

[0067] wherein Cb(n) represents the neighboring reference Cb value of the current coding block, Cr(n) represents the neighboring reference Cr value of the current coding block, and λ can be an empirical value, for example, λ = ∑(Cb(n) · Cb(n)) » 9.

[0068] The RST technology proposed by LGE in JVET-N0193 was accepted in H.266 / VVC and renamed as LFNST technology. In the following meetings, the LFNST technology was continuously optimized along with the standardization process. The related technical solutions of the current LFNST technology will be described below.

[0069] Figure 1 For the application diagram of the LFNST technology, see Figure 1 which shows an application position diagram of the LFNST technology provided by the related technical solution. As Figure 1 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, for data such as prediction residual (which can be represented by residual), the first transform (which can be referred to as “Core Transform” or “primary transform” or “main transform”) is performed by the forward primary transform unit 11 to obtain the transformed coefficient matrix after the first transform; then the LFNST transform (which can be referred to as “Secondary Transform” or “secondary transform”) is performed on the coefficients in the transformed coefficient matrix to obtain the LFNST transformed coefficient matrix, and finally the quantization processing is performed on the LFNST transformed coefficient matrix by the quantization unit 12, and the final quantized value is written into the bitstream.

[0071] At the decoder side, by parsing the bitstream, the quantized value of the LFNST transform coefficient matrix can be obtained, the quantized value is processed by the inverse quantization unit 13 (which can be called "Scaling"), to obtain the restored value of the LFNST transform coefficient matrix, and the inverse LFNST transform is performed on the restored value to obtain the coefficient matrix; then the inverse transform corresponding to the "Core Transform" at the encoder side is performed on the coefficient matrix by the inverse primary transform unit 14, and finally the restored value of the residual is obtained. It should be noted that only the "inverse transform" operation at the decoder side is defined in the standard, so the "inverse LFNST transform" is also called "LFNST transform" in the standard; in order to distinguish the transform at the encoder side, the "LFNST transform" at the encoder side can be called "forward LFNST transform", and the "LFNST transform" at the decoder side can be called "inverse LFNST transform".

[0072] That is, at the encoder side, the prediction residual of the current transform block is processed by the primary transform to obtain the primary transform coefficient, and then part of the primary transform coefficient is processed by matrix multiplication to obtain the secondary transform coefficient, and then the secondary transform coefficient is quantized; at the decoder side, after the quantized value is parsed, the inverse quantization is performed on the quantized value, and then the inverse secondary transform is performed on the inverse quantized coefficient by matrix multiplication, and then the inverse primary transform is performed on the inverse secondary transform coefficient, so as to restore the prediction residual.

[0073] In the LFNST technology, the LFNST transform process mainly includes the following steps: configuring core parameters, intra prediction mode mapping, selecting a transform matrix, calculating matrix multiplication, and constructing an inverse primary transform coefficient matrix. After these steps, the LFNST transform is completed. However, in the step of selecting the transform matrix, the transform set needs to be selected first. Since the transform matrix is related to the directional characteristics of the prediction mode, the transform set is currently selected according to the intra prediction mode. Among them, for the traditional intra prediction mode, the value of the intra prediction mode indicator can be determined according to the number of the traditional intra prediction mode, and then the transform set index sequence number can be determined according to the value of the intra prediction mode indicator.

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

[0075] For configuring core parameters, first, 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) need to be configured.

[0076] In addition, the parameter nLfnstSize needs to be configured, which indicates that there will be primary transform coefficients only within the range of nLfnstSize x nLfnstSize in the current block. At this time, by parsing the code stream, the intra prediction mode of the current block or the luminance or chroma component of the coding block where the current block is located can be obtained, and the value of the intra prediction mode indicator (which can be represented by predModeIntra) can be determined.

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

[0078] Further, for the mapping of the intra prediction mode, the intra prediction mode can be divided into traditional intra prediction mode and non-traditional intra prediction mode. For non-traditional intra prediction mode, the value of predModeIntra indicates the following information:

[0079] If the value of predModeIntra can be INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (in VVC, 81, 82, 83 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 cldx is equal to 0, it indicates that the prediction mode of the current block is MIP mode, and the value of predModeIntra indicates the MIP mode index modeId used;

[0081] If it is not the above two cases, the value of predModeIntra can be in [0, 66], which indicates that the prediction mode of the current block is a traditional intra prediction mode.

[0082] At present, when determining the LFNST transform kernel candidate set index number 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 not a traditional intra prediction mode, the value of predModeIntra is mainly set as follows:

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

[0084] If the mode of the center luma block corresponding to the luma position of the current block (such as a chroma block) is MIP mode, that is, intra_mip_flag[ xTbY + nTbW / 2 ][ yTbY + nTbH / 2 ] is 1, the value of predModeIntra is set to the index number indicating the PLANAR mode (i.e. 0);

[0085]

[0086] Otherwise, if the mode of the center luma block corresponding to the luma position of the current block (such as a chroma block) is IBC mode or 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 IntraPredModeY[ xTbY + nTbW / 2 ][ yTbY + nTbH / 2 ] of the center luma block corresponding to the luma position of the current block (such as a chroma block);

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

[0089] ​For the traditional intra prediction mode (such as wide angle mapping), in the process of parsing the code stream, the 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, the width-height ratio factor (which can be represented as whRatio) is calculated, for the non-square current block (that is, nTbW is not equal to nTbH), at this time, 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 as SetIdx) can be determined according to the value of predModeIntra, specifically, the value of the LFNST index number is set to the index number of the LFNST transform kernel in the LFNST transform kernel candidate set, which indicates that the current block uses LFNST. Generally, the LFNST transform set includes four transform kernel candidate sets (set0, set1, set2, set3), respectively corresponding to the values of SetIdx being 0, 1, 2, 3.

[0092] It can be understood that in the embodiments of the present application, since the LFNST transform matrix is related to the directional characteristics of the prediction mode, for non-traditional intra prediction modes such as the CCLM mode, since the selection of the transform set cannot be performed, it is necessary to first map it to a traditional intra prediction mode. Specifically, in the mapping, the setting of the predModeIntra value is mainly based on the intra prediction mode of the luminance block corresponding to the center of the chroma transform block. That is, at present, if the intra prediction mode of the luminance block corresponding to the center of the chroma transform block is the MIP mode, the CCLM mode can be mapped to the PLANAR; if the intra prediction mode of the luminance block corresponding to the center of the chroma transform block is the IBC mode or the PLT mode, the CCLM mode can be mapped to the DC; if the intra prediction mode of the luminance block corresponding to the center of the chroma transform block is a traditional intra prediction mode, the wide-angle mapping is continued according to the size of the current chroma transform block. Then the selection of the transform kernel candidate set is performed according to the mapped angle.

[0093] However, when the non-traditional intra 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 corresponding to the center of the chroma transform block cannot represent the characteristics of the current chroma transform block, and the selection of the transform kernel candidate set according to this characteristic is not reasonable; on the other hand, although the chroma block using the CCLM is predicted by the corresponding luminance block using a linear relationship. However, the luminance block corresponding to the center of 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 For the luminance block corresponding to the center of the chroma block, as shown in Figure 3 The left side is the luminance block corresponding to the center of the chroma block. The luminance block corresponding to the center of the chroma block is a dark sub-block (CR) in the left block. The obtained luminance block mode is only the mode of the dark sub-block (CR), and cannot represent the overall characteristics of the gray block in the left block; on the other hand, the existing scheme introduces the dependency between chroma and luminance in the transform process; finally, since the intra prediction modes supported by luminance and chroma are not the same, when the intra prediction mode of the luminance block corresponding to the center of the chroma transform block is not supported in the chroma block, such as the MIP, IBC, PLT mode, additional mapping is also needed.

[0094] That is, for the current H.266 / VVC, the CCLM mode needs to be mapped into a traditional intra prediction mode before the selection of the transform kernel candidate set, however, the above mapping method has poor accuracy, and a new mapping may be introduced, and it can be seen that the current LFNST technology has poor applicability to the CCLM mode, and the additional mapping processing increases the transform process of the LFNST technology, thereby reducing the coding efficiency.

[0095] In order to overcome the above defects, in the embodiments of the present application, when the current block using the CCLM mode is processed by the transform, the CCLM mode does not need to be mapped to the traditional intra prediction mode, but the LFNST transform kernel used by the current block can be directly determined according to the CCLM parameters corresponding to the current block, so that the LFNST transform can be performed by using the LFNST transform kernel. It can be understood that, due to the introduction of the CCLM parameters in the LFNST transform, the selection of the LFNST transform kernel is more flexible, thereby the applicability of the LFNST technology to the CCLM mode can be improved, and the transform process of the LFNST technology is reduced, thereby the coding efficiency is effectively improved.

[0096] It should be noted that, in the embodiments of the present application, Figure 4 is a component block diagram of a video coding system; see Figure 4 which shows an example of a component block diagram of a video coding system provided by the embodiments of the present application; as Figure 4As shown, the video coding system 10 includes a transform and quantization unit 101, an intra estimation unit 102, an intra 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 filter unit 108, an encoding unit 109 and a decoded picture buffer unit 110, etc. The filter unit 108 can implement deblocking filter and sample adaptive offset (SAO) filter, and the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmatic coding (CABAC). For an input raw video signal, a video coding block can be obtained by coding tree unit (CTU) partitioning, and then the residual pixel information obtained after intra or inter prediction is transformed by the transform and quantization unit 101, including transforming the residual information from pixel domain to transform domain, and quantizing the obtained transform coefficients to further reduce bit rate. The intra estimation unit 102 and the intra prediction unit 103 are used for intra prediction of the video coding block. Specifically, the intra estimation unit 102 and the intra prediction unit 103 are used to determine an intra 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 prediction encoding 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 that can estimate the motion of the video coding block, and then the motion compensation is performed by the motion compensation unit 104 based on the motion vector determined by the motion estimation unit 105. After the intra prediction mode is determined, 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 determined motion vector data to the encoding unit 109. In addition, the inverse transform and inverse quantization unit 106 is used for reconstruction of the video coding block, reconstructing a residual block in pixel domain, removing blockiness artifacts by the filter control analysis unit 107 and the filter unit 108, and then adding the reconstructed residual block to a predictive block in one of the frames of the decoded picture buffer unit 110 to generate a reconstructed video coding block. The encoding unit 109 is used to encode various encoding parameters and quantized transform coefficients, and in the CABAC-based encoding algorithm, the context content can be based on neighboring coding blocks, which can be used to encode information indicating the determined intra prediction mode, and output a bitstream of the video signal. The decoded picture buffer unit 110 is used to store the reconstructed video coding block for predictive reference.As video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoding image buffer unit 110.

[0097] Figure 5 Here is a block diagram of the video decoding system; see [link / reference]. Figure 5 It illustrates an example block diagram of a video decoding system provided in an embodiment of this application; as shown 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 decoding image buffer unit 206. The decoding unit 201 can perform header information decoding and CABAC decoding, while the filtering unit 205 can perform deblocking filtering and SAO filtering. The input video signal is processed... Figure 4 After encoding, the video signal bitstream is output. This bitstream is input into the video decoding system 20, first passing through the decoding unit 201 to obtain the decoded transform coefficients. The transform coefficients are then processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the pixel domain. The intra-frame prediction unit 203 can generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from previously decoded blocks in the current frame or image. The motion compensation unit 204 determines the prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and uses this prediction information. The predictive block of the video block being decoded is generated; the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 with the corresponding predictive block generated by the intra-prediction unit 203 or the motion compensation unit 204; the decoded video signal is passed through the filtering unit 205 to remove block artifacts, which can improve video quality; then the decoded video block is stored in the decoding image buffer unit 206, which stores reference images for subsequent intra-prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal.

[0098] The transformation method in the embodiments of this application can be applied to, for example, Figure 4 The transformation and quantization unit 101 shown includes: Figure 1 The positive first-order transformation unit 11 and quantization unit 12 shown indicate that the transformation method is specifically applied in the part between transformation and quantization. Furthermore, the transformation method in this embodiment can also be applied to, for example... Figure 4 The inverse transform and inverse quantization unit 106 shown, or as... Figure 5The inverse transform and inverse quantization unit 202 shown, whether it is the inverse transform and inverse quantization unit 106 or the inverse transform and inverse quantization unit 202, can include a Figure 1 The inverse quantization unit 13 and the inverse primary transform unit 14 shown, at this time, the transform method is specifically applied to the part between the inverse quantization and the inverse transform. That is, the transform method in the embodiment of the application can be applied to a video encoding system, can be applied to a video decoding system, and can even be applied to both a video encoding system and a video decoding system, but the embodiment of the application does not make specific limitation. It should be noted that when the transform method is applied to a video encoding system, the "current block" specifically refers to a current coding block in intra prediction; when the transform method is applied to a video decoding system, the "current block" specifically refers to a current decoding block in intra prediction.

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

[0100] An embodiment of the application provides a transform method applied to an encoder, Figure 6 The implementation process of the transform method is shown Figure 1 As shown in the figure, Figure 6 As shown, the method for transform processing of the encoder can include the following steps:

[0101] Step 601, determining a prediction mode parameter of a current block.

[0102] In the embodiment of the application, the encoder can first determine the prediction mode parameter of the current block.

[0103] It should be noted that in the embodiment of the application, a video image can be divided into a plurality of image blocks, and each current image block to be encoded can be referred to as a coding block (CB). Here, each coding block can include a first image component, a second image component and a third image component; and the current block is a coding block in which first image component, second image component or third image component prediction of a video image is currently performed.

[0104] It can be understood that in the embodiment of the application, it is assumed that the current block performs 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, so the current block can also be referred to as a luminance block; or it is assumed that the current block performs second image component prediction, and the second image component is a chroma component, that is, the image component to be predicted is a chroma component, so the current block can also be referred to as a chroma block.

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

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

[0107] That is to say, in the embodiments of the present application, the encoder can determine the specific coding mode of the current block from the traditional intra prediction mode or the non-traditional intra prediction mode through the prediction mode parameter.

[0108] In the embodiments of the present application, further, when determining the prediction mode parameter of the current block, the encoder can first determine the to-be-predicted image component of the current block; then based on the parameters of the current block, the to-be-predicted image component is respectively predicted and encoded by using multiple prediction modes, the rate distortion cost results corresponding to each prediction mode under multiple prediction modes are calculated; finally, the minimum rate distortion cost result can be selected from the multiple calculated rate distortion cost results, and the prediction mode corresponding to the minimum rate distortion cost result is determined as the prediction mode parameter of the current block.

[0109] That is to say, on the encoder side, the to-be-predicted image component can be encoded by using multiple prediction modes respectively for the current block. Here, the multiple prediction modes usually include traditional intra prediction mode and non-traditional intra prediction mode.

[0110] Further, in the embodiments of the present application, after the encoder respectively encodes the current block by using multiple prediction modes, the rate distortion cost result corresponding to each prediction mode can be obtained; then the minimum rate distortion cost result can be selected from the multiple obtained rate distortion cost results, and the prediction mode corresponding to the minimum rate distortion cost result is determined as the prediction mode parameter of the current block; in this way, the current block can be finally encoded by using the determined prediction mode, and in this prediction mode, the prediction residual can be small, and the coding efficiency can be improved.

[0111] Step 602, when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, determine the CCLM parameter.

[0112] In the embodiments of the present application, after the encoder determines the prediction mode parameter of the current block, if the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, the encoder can continue to determine the CCLM parameter.

[0113] It should be noted that in the embodiments of the present application, the CCLM parameter can include a CCLM mode index sequence number, wherein the CCLM mode index sequence number is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation derivation manner of using CCLM to determine the intra prediction value of the current block.

[0114] It can be understood that in the embodiments of the present application, for the CCLM mode, it can specifically include a plurality of different prediction modes, and therefore different index sequence numbers are needed to calibrate and distinguish different prediction modes in the CCLM mode. That is, different CCLM modes correspond to different CCLM mode index sequence numbers.

[0115] Further, in the embodiments of the present application, when the encoder determines the calculation derivation manner of using the CCLM parameter to determine the intra prediction value of the current block, it can determine the specific CCLM mode, so as to obtain the corresponding CCLM mode index sequence number.

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

[0117] It can be understood that in the present application, after the encoder determines the CCLM parameter, it also needs to write the determined CCLM parameter into the code stream, so as to facilitate subsequent analysis and processing at the decoder side.

[0118] Step 603, determine the intra prediction value of the current block according to the CCLM parameter, and calculate the prediction difference value between the current block and the intra prediction value.

[0119] In the embodiments of the present application, after the encoder determines the CCLM parameter corresponding to the current block, it can further determine the intra prediction value of the current block by using the CCLM parameter, so as to calculate the prediction difference value between the current block and the intra prediction value.

[0120] It should be noted that in the embodiments of the present application, after determining the CCLM parameters, the encoder can determine the CCLM mode used by the current block by using the CCLM mode index sequence number included in the CCLM parameters, so as to obtain the calculation derivation mode of determining the intra prediction value of the current block using CCLM.

[0121] For example, in the embodiments of the present application, when the encoder determines the intra prediction value of the current block according to the CCLM parameters, the first image component reconstruction value Rec of the sampling point with position coordinates [i, j] in the coding block (after downsampling) can be calculated by using the above formula (1). L The second image component prediction value Pred of the sampling point with position coordinates [i, j] in the coding block can be calculated by using the first image component reconstruction value Rec of the sampling point with position coordinates [i, j] in the coding block (after downsampling). C [i, j].

[0122] For example, in the embodiments of the present application, after the encoder determines the intra prediction value of the current block, it can continue to calculate the difference value between the actual pixel value and the intra prediction value of the current block, and take the calculated difference value as the prediction difference value, so as to facilitate subsequent transformation processing on the prediction difference value.

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

[0124] Step 604, when the current block uses LFNST, determining the LFNST transform kernel used by the current block according to the CCLM parameters, setting the LFNST index sequence number and writing it into the video bitstream.

[0125] In the embodiments of the present application, if the current block uses the LFNST transform technology, the encoder can further determine the LFNST transform kernel used by the current block according to the CCLM parameters, so as to set the LFNST index sequence number and write it into the video bitstream.

[0126] It should be noted that in the embodiments of the present application, not any current block can use the LFNST transform. Specifically, only when the current block meets certain preset conditions, the LFNST transform can be performed on the current block. The preset conditions can include: (a) the width and height of the current block are greater than or equal to 4; (b) the width and height of the current block are less than or equal to the maximum size of the transform block; (c) the prediction mode of the current block or the coding block in which the current block is located is an intra prediction mode; (d) the primary transform of the current block is a two-dimensional forward primary transform (for example, DCT2) in the horizontal direction and the vertical direction; (e) the intra prediction mode of the current block or the coding block in which 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 greater than or equal to 16. That is, for the current block in the embodiments of the present application, the five conditions above need to be met at the same time to determine that the current block uses the LFNST transform technology.

[0127] Further, in the embodiments of the present application, after it is determined 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 four transform kernel candidate sets in LFNST, which can include set0, set1, set2 and set3. Among them, according to the coding parameters of the current block or the coding block in which 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 prediction mode of the current block, it can be determined which one of the four transform kernel candidate sets is used.

[0128] Specifically, in the embodiments of the present application, after the encoder obtains the intra prediction mode of the current block, it can determine the value of the intra 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 the chrominance component of the current block; here, if the current block is predicted as a luminance component, cIdx is equal to 0; if the current block is predicted as a chrominance component, cIdx is equal to 1. In addition, (xTbY, yTbY) is the coordinate of the top-left sampling point of the current block, IntraPredModeY[xTbY][yTbY] is the intra prediction mode of the luminance component, and IntraPredModeC[xTbY][yTbY] is the intra prediction mode of the chrominance component.

[0131] In current H.266 / VVC, intra-prediction modes can be further divided into traditional intra-prediction modes and non-traditional intra-prediction modes. For non-traditional intra-prediction modes, the predModeIntra value indicates the following information:

[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 MIP mode, then the value of predModeIntra can be the index number of the MIP mode used.

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

[0135] Furthermore, if the prediction mode of the current block is CCLM mode or 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 center luminance block at the luminance position corresponding to the current block (e.g., chroma block) is MIP mode, i.e., intra_mip_flag[xTbY+

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

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

[0140] Otherwise, set the value of predModeIntra to the mode index number of the center luminance block at the luminance position of the current block (e.g., chroma block) IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2];

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

[0142] You can directly set the value of predModeIntra to the index number indicating the PLANA mode (i.e., 0).

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

[0144] First, the width-height ratio factor (which can be denoted as whRatio) is calculated as follows,

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

[0146] For the 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 LFNST index number (which can be denoted as SetIdx) can be determined, and the specific value is shown in Table 1. Here, the value of LFNST index number is set to indicate that the current block uses LFNST, and the index number of the LFNST transform kernel in the LFNST transform kernel candidate set. Generally, the LFNST transform set includes four transform kernel candidate sets (set0, set1, set2, set3), respectively corresponding to the values of SetIdx being 0, 1, 2, 3.

[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, since the LFNST transform matrix is related to the directional characteristics of the prediction mode, for non-traditional intra prediction modes such as the CCLM mode, since the selection of the transform set cannot be performed, it is necessary to first map it to a traditional intra prediction mode. Specifically, in the mapping, the setting of the predModeIntra value is mainly based on the intra prediction mode of the luminance block corresponding to the center of the chroma transform block in the luminance position. That is, at present, if the intra prediction mode of the luminance block corresponding to the center of the chroma transform block in the luminance position is the MIP mode, the CCLM mode can be mapped to the PLANAR; if the intra prediction mode of the luminance block corresponding to the center of the chroma transform block in the luminance position is the IBC mode or the PLT mode, the CCLM mode can be mapped to the DC; if the intra prediction mode of the luminance block corresponding to the center of the chroma transform block in the luminance position is a traditional intra prediction mode, the wide-angle mapping is continued according to the size of the current chroma transform block. Then, the selection of the transform kernel candidate set is performed according to the mapped angle.

[0151] That is, for the current H.266 / VVC, the selection of the transform kernel candidate set needs to be performed after the CCLM mode is mapped to a traditional intra prediction mode, however, the above mapping method has poor accuracy, and a new mapping may be introduced, and it can be seen that the current LFNST technology has poor applicability to the CCLM mode, and the additional mapping processing increases the transform process of the LFNST technology, thereby reducing the coding efficiency.

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

[0153] It can be understood that, in the embodiments of the present application, the CCLM parameter can 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 derivation manner of the intra prediction value of the current block determined by using the CCLM.

[0154] It should be noted that in the embodiments of the present application, when the encoder determines the LFNST index number based on the CCLM parameter, the LFNST transform kernel candidate set is first determined, and then the LFNST transform kernel used by the current block is determined from the LFNST transform kernel candidate set, and then the LFNST index number is set and written into the video code stream. Here, the transform matrix of LFNST is a plurality of fixed coefficient matrices obtained by training, and the LFNST transform kernel candidate set includes two groups of transform matrices (which can also be referred to as LFNST transform kernels). After the LFNST transform kernel candidate set is determined, one group of LFNST transform kernels needs to be selected from the LFNST transform kernel candidate set, that is, the transform matrix used by the current block when determining LFNST.

[0155] Further, in the embodiments of the present application, since the LFNST transform kernel candidate set includes two or more preset transform kernels, the rate distortion optimization method can be used to select the transform kernel used by the current block at this time. Specifically, the rate distortion cost (Rate Distortion Cost, RDCost) can be calculated for each transform kernel using the rate distortion optimization method, and then the transform kernel with the minimum rate distortion cost is selected as the transform kernel used by the current block.

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

[0157] It should be noted that in the embodiments 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 kernel is equal to the value of the LFNST index number, or the index number of the transform kernel is equal to the value of the LFNST index number minus 1. Further, after the encoder determines the LFNST transform kernel used by the current block, it also needs to set the LFNST index number and write it into the video code stream, so that the decoder side can obtain the LFNST index number by analyzing the code stream subsequently.

[0158] For example, in the embodiments of the present application, Figure 7 The implementation process of the transform method is shown in the figure Figure 2 For example,Figure 7 As shown, when the CCLM parameter is a CCLM mode index, the method for determining, by the encoder, an LFNST transform kernel used by the current block according to the CCLM parameter, setting an LFNST index, and writing the LFNST index into a video bitstream can include the following steps:

[0159] Step 701: determining a value of an LFNST intra prediction mode index according to a value of the CCLM mode index.

[0160] Step 702: selecting an LFNST transform kernel candidate set from a plurality of LFNST transform kernel candidates according to the value of the LFNST intra prediction mode index.

[0161] Step 703: selecting a transform kernel indicated by the LFNST index from the selected LFNST transform kernel candidate set and setting the transform kernel as the LFNST transform kernel used by the current block.

[0162] Step 704: setting the value of the LFNST index as an index of the LFNST transform kernel used by the current block in the LFNST transform kernel candidate set, wherein the LFNST transform kernel candidate set contains two or more preset LFNST transform kernels.

[0163] It should be noted that in the embodiments of the present application, the CCLM mode index is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation derivation manner of determining the intra prediction value of the current block using CCLM. That is, the encoder can further determine the LFNST transform kernel according to the CCLM mode index.

[0164] Further, in the embodiments of the present application, after determining the CCLM mode index, the encoder can further convert the CCLM mode index into a value of an LFNST intra prediction mode index (which can be represented by predModeIntra); then select an LFNST transform kernel candidate set from a plurality of LFNST transform kernel candidates according to the value of predModeIntra to determine the transform kernel candidate set; and select a transform kernel indicated by the LFNST index from the selected LFNST transform kernel candidate set and set the transform kernel as the LFNST transform kernel used by the current block.

[0165] It can be understood that in the embodiments 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. Further, after the encoder determines the LFNST transform core used by the current block, it also needs to set the LFNST index number and write it into the video code stream, so as to facilitate the subsequent decoder side to obtain the LFNST index number by analyzing the code stream.

[0166] For example, in the embodiments of the present application, when the encoder determines the value of the LFNST intra 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 prediction mode index number corresponding to the value of the CCLM mode index number, wherein the first lookup table contains one or more different CCLM mode index numbers corresponding to each of the two different values of the LFNST intra prediction mode index number.

[0167] That is, 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 prediction mode index number in the process of selecting the LFNST transform core used by the current block through the lookup table.

[0168] It should be noted that in the embodiments of the present application, the first lookup table (Look-Up Table 1, LUT1) is used to reflect the corresponding relationship between the CCLM mode index number and the LFNST intra prediction mode index number, that is, in the first lookup table, one or more different CCLM mode index numbers corresponding to each of the two different values of the LFNST intra prediction mode index number are contained.

[0169] That is, in the present application, different CCLM modes can 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; and then according to the value of predModeIntra, one LFNST transform core candidate set can be selected from a plurality of LFNST transform core candidate sets, and then the LFNST transform core used by the current block is determined.

[0170] It can be understood that in the embodiments of the present application, the value of predModeIntra can be determined according to the value of the CCLM mode index sequence number (modeId); and then according to the value of predModeIntra, the value of SetIdx can be directly determined according to Table 2, that is, the LFNST transform kernel candidate set selected by the current block is determined. Here, the value of SetIdx indicates the transform kernel candidate set used by LFNST; since the value of the CCLM mode index sequence number (modeId) can include 81, 82 and 83, the value of predModeIntra is also 81, 82 and 83, and 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] As can be seen, 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 prediction mode, but can directly obtain the corresponding LFNST index sequence number by querying the first lookup table based on the CCLM mode index sequence number corresponding to the CCLM mode, and finally realize the determination of the LFNST transform kernel candidate set.

[0174] In the embodiments 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 sequence number, at this time, the value of predModeIntra is no longer needed, that is, the value of the LFNST intra prediction mode index sequence number is no longer needed to be determined according to the CCLM mode index sequence number.

[0175] For example, in some embodiments, Figure 8 Flowchart for implementation of the transform method Figure 3 As Figure 8 indicated, when the CCLM parameter is the CCLM mode index sequence number, the method for the encoder to determine the LFNST transform kernel used by the current block according to the CCLM parameter, set the LFNST index sequence number and write it into the video bitstream can include the following steps:

[0176] Step 801, selecting an LFNST transform kernel candidate set from a plurality of LFNST transform kernel candidate sets according to the value of the CCLM mode index sequence number.

[0177] Step 802, selecting the transform kernel indicated by the LFNST index sequence number from the selected LFNST transform kernel candidate set and setting it as the LFNST transform kernel used by the current block.

[0178] Step 803, setting the value of the LFNST index sequence number as an index sequence number of the LFNST transform kernel in the LFNST transform kernel candidate set, which indicates that the current block uses LFNST, and the LFNST transform kernel is in the LFNST transform kernel candidate set; wherein the LFNST transform kernel candidate set contains two or more preset LFNST transform kernels.

[0179] Further, in the embodiments of the present application, when the encoder selects an LFNST transform kernel candidate set from a plurality of LFNST transform kernel candidate sets according to the value of the CCLM mode index sequence number, the second lookup table can be used to determine the value of the LFNST transform kernel candidate set index sequence number corresponding to the value of the CCLM mode index sequence number, and the LFNST transform kernel candidate set indicated by the value of the LFNST transform kernel candidate set index sequence number is selected as the selected LFNST transform kernel candidate set.

[0180] It should be noted that in the embodiments of the present application, the second lookup table (Look-Up Table 2, LUT2) contains at least two different values of the LFNST transform kernel candidate set index sequence number each corresponding to one or more different CCLM mode index sequence numbers.

[0181] It should be noted that if the prediction mode used by the current block is the CCLM mode, the selected LFNST transform kernel candidate set can be directly determined according to the value of the CCLM mode index sequence number (modeId). As shown in Table 3, the value of SetIdx indicates the transform kernel candidate set used in LFNST; the value of the CCLM mode index sequence number (modeId) can include 81, 82 and 83, each CCLM mode index sequence number corresponds to an LFNST transform kernel candidate set, and specifically, the correspondence 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 prediction mode, but can directly obtain the corresponding LFNST index sequence number through the query of the second lookup table based on the CCLM mode index sequence number corresponding to the CCLM mode, and finally realize the determination of the LFNST transform core candidate set. That is, the encoder can determine the value of the corresponding LFNST transform core candidate set index sequence number according to the value of the CCLM mode index sequence number, to select the LFNST transform core candidate set indicated by the value of the LFNST transform core candidate set index sequence 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 sequence number (modeId) is 81, the value of the LFNST transform core candidate set index sequence number (SetIdx) can be determined as 3, that is, the transform core candidate set indicated by 3 is selected as the selected LFNST transform core candidate set; or when modeId is 82 or 83, the value of SetIdx can be determined as 1, that is, the transform core candidate set indicated by 1 is selected as the selected LFNST transform core candidate set, and so on.

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

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

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

[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 embodiments of the present application, a, b, c can each correspond to any value of SetIdx from the four transform kernel candidate sets (set0, set1, set2, set3) with the value of SetIdx being {0, 1, 2, 3}.

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

[0192] Further, in the embodiments 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 a certain traditional intra prediction mode, and then select one of the transform sets (such as set1 or set2 or set3) as the selected LFNST transform kernel candidate set from the multiple LFNST transform kernel candidate sets, or select the LFNST transform kernel candidate set based on the above table 4.

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

[0194] Further, in the embodiments 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 prediction mode when selecting the LFNST transform kernel candidate set, and then select one LFNST transform kernel candidate set from the multiple LFNST transform kernel candidate sets according to the value of predModeIntra.

[0195] That is, 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 prediction mode at this time; then according to the value of predModeIntra, and in combination with the above table 1, the LFNST transform kernel candidate set can be selected from the plurality of LFNST transform kernel candidates, and then the transform kernel indicated by the LFNST index sequence number can be selected from the selected LFNST transform kernel candidate set, and set as the LFNST transform kernel used by the current block; the value of the LFNST index sequence number is set as the index sequence number of the LFNST transform kernel in the LFNST transform kernel candidate set.

[0196] It can be understood that in the embodiments of the present application, for the value of the LFNST index sequence number, when the value of the LFNST index sequence number is equal to 0, LFNST will not be used; and when the value of the LFNST index sequence number is greater than 0, LFNST will be used, and the index sequence number of the transform kernel is equal to the value of the LFNST index sequence number, or the index sequence number of the transform kernel is equal to the value of the LFNST index sequence number minus 1. Further, after the encoder determines the LFNST transform kernel used by the current block, it also needs to set the LFNST index sequence number and write it into the video code stream, so that the subsequent decoder side can obtain the LFNST index sequence number by analyzing the code stream.

[0197] Step 605, using the LFNST transform kernel to perform transform processing on the prediction difference.

[0198] In the embodiments of the present application, after the encoder determines the LFNST transform kernel used by the current block according to the CCLM parameter, the LFNST transform kernel can be used to perform transform processing on the prediction difference.

[0199] It should be noted that in the embodiments of the present application, after the encoder determines the FNST transform kernel, the transform matrix selected by the current block can be obtained, and at this time the prediction difference can be processed.

[0200] It should be noted that in the embodiments of the present application, each group of transformation matrices can also contain two sizes of basic transformation matrices T, such as 16x16 and 16x48. For the transformation matrices selected for the four sizes of TUs, specifically, for the 4x4 size TU, an 8x16 transformation matrix is used, which is from the front 8x16 of the 16x16 basic transformation matrix; for the 4xN or Nx4 (N>4) size TU, a 16x16 basic transformation matrix is used; for the 8x8 size TU, an 8x48 transformation matrix is used, which is from the front 8x48 of the 16x48 basic transformation matrix; for the TU with a size greater than 8x8, a 16x48 basic transformation matrix is used. It should be noted that in the current H.266 / VVC, only the transformation matrix (which can be represented as T T ) of the decoder side LFNST is stored, and the transformation matrix used by the encoder side is the transpose matrix (which can be represented as T

[0201] It should be noted that in the embodiments of the present application, the LFNST is based on a direct matrix multiplication manner to apply non-separable transformation. In order to reduce the calculation complexity and storage space as much as possible, a simplified non-separable transformation technique is used in the LFNST transformation. 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 a scaling factor; at this time, the transformation matrix corresponding to the simplified non-separable transformation technique is an R×N matrix, as shown below,

[0202]

[0203] Here, the transformation matrices used by the forward LFNST transformation and the inverse LFNST transformation are in a transposed relationship, Figure 9 is a structure diagram of the calculation process of the matrix multiplication of the LFNST technology Figure 1 , Figure 10 is a structure diagram of the calculation process of the matrix multiplication of the LFNST technology Figure 2 , see Figure 9 and Figure 10 , which shows a structure diagram of the calculation process of the matrix multiplication of the LFNST technology according to an embodiment of the present application. As shown in Figure 9 , the calculation process of the forward LFNST transformation, after the first transformation coefficient passes through the transformation matrix T, the second transformation coefficient can be obtained; Figure 10 shows the calculation process of the inverse LFNST transformation, after the inverse second transformation coefficient passes through the transpose transformation matrix T T , the inverse first transformation coefficient can be obtained.

[0204] Furthermore, in the LFNST technique, the choice between a 4×4 or 8×8 inseparable transformation can be determined based on the size of the current block. Here, the "4×4 inseparable transformation" can be collectively referred to as "4×4 LFNST," and the "8×8 inseparable transformation" as "8×8 LFNST." Assuming the current block has a width of nTbW and a height of nTbH, we can conclude that: if min(nTbW, nTbH) <= 4, then 4×4 LFNST can be used on the current block; otherwise, 8×8 LFNST can be used. It is important to note that the return value of min(A, B) is the smaller of A and B.

[0205] In one implementation, for a 4×4 LFNST, 16 coefficients will be input on the encoder side, and after passing through the forward LFNST, 16 or 8 coefficients will be output; while on the decoder side, 16 or 8 coefficients will be input, and 16 coefficients will be output; that is, the encoder and decoder have exactly opposite numbers of input and output.

[0206] Assume the size of the transform unit (TU) can be expressed as nTbW×nTbH, where the transform unit is the prediction residual block obtained based on the prediction difference. That is, TU can be equal to 4×4, or 4×N or N×4 (N>4). These will be described in detail below.

[0207] Figure 11 The structural block of the LFNST transform Figure 1 ; Figure 12 The structural block of the LFNST transform Figure 2 ; Figure 13 The structural block of the LFNST transform Figure 3 ; Figure 14 The structural block of the LFNST transform Figure 4 When TU equals 4×4, the forward LFNST process corresponding to the 4×4 transform block is as follows: Figure 11 As shown. Among them, in Figure 11 In the diagram, white blocks represent prediction differences, gray blocks represent first-order transform coefficients, and black blocks represent second-order transform coefficients. Here, at the "0" example position, the encoder sets the transform coefficients to 0. For a 4×4 transform block, during forward LFNST, the transform matrix size used is 8×16. All 4×4 first-order transform coefficients within the current transform block are used as input, and the output is 4×2 second-order transform coefficients.

[0208] When TU equals 4×N or N×4 (N>4), the forward LFNST process corresponding to the 4×N or N×4 transform block is as follows: Figure 12 As shown. Among them, in Figure 12In the diagram, white blocks represent prediction differences, gray blocks represent first-order transform coefficients, and black blocks represent second-order transform coefficients. For 4×N or N×4 transform blocks, during forward LFNST, the transform matrix size is 16×16. The first-order transform coefficients within the first 4×4 sub-block of the current transform block (specifically, the topmost sub-block for 4×N transform blocks and the leftmost sub-block for N×4 transform blocks) are used as input, and the output is 4×4 second-order transform coefficients. Here, at the "0" example position, the encoder still sets the transform coefficients to 0.

[0209] In another implementation, for an 8×8 LFNST, 48 coefficients will be input on the encoder side, and after passing through the forward LFNST, 16 or 8 coefficients will be output; while on the decoder side, 16 or 8 coefficients will be input, and 48 coefficients will be output; that is, the encoder and decoder have exactly opposite numbers of input and output.

[0210] When TU equals 8×8, the forward LFNST process corresponding to the 8×8 transform block is as follows: Figure 13 As shown. Among them, in Figure 13 In the diagram, white blocks represent prediction differences, gray blocks represent first-order transform coefficients, and black blocks represent second-order transform coefficients. For an 8×8 transform block, during forward LFNST, the transform matrix size used is 8×48. The first-order transform coefficients of the first three 4×4 sub-blocks within the current transform block (i.e., the three sub-blocks located in the upper left corner) are used as input, and the output is 4×2 second-order transform coefficients. Here, at the "0" example position, the encoder still sets the transform coefficients to 0.

[0211] When TU is greater than 8×8, the forward LFNST process corresponding to the transform block greater than 8×8 is as follows: Figure 14 As shown. Among them, in Figure 14 In the diagram, white blocks represent prediction differences, gray blocks represent first-order transform coefficients, and black blocks represent second-order transform coefficients. For transform blocks larger than 8×8, the transform matrix size used in forward LFNST is 48×16. The first-order transform coefficients of the first three 4×4 sub-blocks within the current transform block (i.e., the three sub-blocks located in the upper left corner) are used as input, and the output is 4×4 second-order transform coefficients. Here, at the "0" example position, the encoder still sets the transform coefficients to 0.

[0212] Thus, the TU corresponding to the prediction difference can be 4×4, 4×N, N×4 (N>4), 8×8, or even larger than 8×8. In this case, it can be calculated according to... Figure 11 or Figure 12 or Figure 13 or Figure 14 This is used to transform the predicted difference.

[0213] Therefore, in the embodiments of the present application, for the current block using the CCLM mode for intra prediction, the decoder introduces the related information of the CCLM parameter in the process of LFNST on the current block using the CCLM mode, and selects the transform set (or transform kernel) according to the CCLM information. Therefore, when the current block is processed by the transform, it is not necessary to map the CCLM mode to the traditional intra prediction mode, and thus the applicability of the LFNST technology to the current block using the CCLM mode can be improved, and the selection of the transform set (or transform kernel) is more flexible.

[0214] The present application provides a transform method applied to an encoder, the encoder determines a prediction mode parameter of a current block; when the prediction mode parameter indicates that the current block uses CCLM to determine an intra prediction value, a CCLM parameter is determined; the intra prediction value of the current block is determined according to the CCLM parameter, and a prediction difference value between the current block and the intra prediction value is calculated; when the current block uses LFNST, the LFNST transform kernel used by the current block is determined according to the CCLM parameter, the LFNST index number is set and written into a video code stream; and the prediction difference value is processed by the LFNST transform kernel. Therefore, in the embodiments of the present application, when the current block using the CCLM mode for intra prediction is processed by the transform, the codec does not need to map the CCLM mode to the traditional intra prediction mode, but can directly determine the LFNST transform kernel used by the current block according to the CCLM parameter corresponding to the current block, so that the LFNST transform kernel can be used for LFNST transform. It can be understood that, due to the introduction of the CCLM parameter in the LFNST transform, the selection of the LFNST transform kernel is more flexible, so that the applicability of the LFNST technology to the CCLM mode can be improved, and the transform process of the LFNST technology is reduced, and the coding efficiency is effectively improved.

[0215] Another embodiment of the present application provides a transform method applied to a decoder, Figure 15 The implementation process of the transform method is shown Figure 4 As shown in the figure, Figure 15 The method for transform processing of the decoder can include the following steps:

[0216] Step 1501, parsing the code stream to determine the prediction mode parameter of the current block.

[0217] In the embodiments of the present application, the decoder can first parse the code stream after receiving the code stream of the video, so as to determine the prediction mode parameter corresponding to the current block.

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

[0219] It can be understood that in the embodiments of the present application, the encoder side can perform prediction coding on the current block, and in this process, the prediction mode of the current block can be determined, and the corresponding prediction mode parameter can be written into the bitstream and transmitted to the decoder by the encoder.

[0220] Correspondingly, in the present application, the intra prediction mode of the luminance or chrominance component of the current block or the coding block in which the current block is located can be obtained by parsing the bitstream at the decoder side, and at this time, the value of the intra prediction mode indicator (which can be represented as 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 as 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, cIdx is equal to 0; if the current block is predicted as a chrominance component, cIdx is equal to 1. In addition, (xTbY, yTbY) is the coordinate of the top-left sampling point of the current block, IntraPredModeY[xTbY][yTbY] is the intra prediction mode of the luminance component, and IntraPredModeC[xTbY][yTbY] is the intra prediction mode of the chrominance component.

[0222] That is, in the embodiments of the present application, the decoder can determine the specific coding mode of the current block by the prediction mode parameter, that is, whether the decoding mode of the current block is a traditional intra prediction mode or a non-traditional intra prediction mode.

[0223] Step 1502, when the prediction mode parameter indicates that the current block uses the CCLM mode to determine the intra prediction value, the bitstream is parsed, and the CCLM parameter is determined.

[0224] In the embodiments of the present application, after the decoder determines the prediction mode parameter of the current block, if the prediction mode parameter indicates that the current block uses the CCLM mode to determine the intra prediction value, the decoder can continue to determine the CCLM parameter.

[0225] It should be noted that in the embodiments of the present application, the CCLM parameter can include 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 derivation manner of determining the intra prediction value of the current block using CCLM.

[0226] Further, in the embodiments of the present application, the decoder can determine the CCLM parameter by parsing the code stream, and specifically, the decoder can determine the CCLM mode index number (which can be represented as modeId) by parsing the code stream. Wherein 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 derivation manner of determining the intra prediction value of the current block using CCLM.

[0227] It can be understood that in the embodiments of the present application, for the CCLM mode, specifically, it can include a plurality of different prediction modes, therefore, different index numbers need to be used to calibrate and distinguish different prediction modes in the CCLM mode. That is, different CCLM modes correspond to different CCLM mode index numbers.

[0228] Further, in the embodiments of the present application, the decoder can determine the specific CCLM mode when determining the calculation derivation manner of determining the intra prediction value of the current block using the CCLM parameter, so as to obtain the corresponding CCLM mode index number.

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

[0230] Step 1503, parsing the code stream to determine the transform coefficient and the LFNST index number of the current block.

[0231] In the embodiments of the present application, after the decoder determines the CCLM parameter corresponding to the current block, the decoder can continue to parse the code stream, and can further determine the transform coefficient and the LFNST index number of the current block.

[0232] It should be noted that in the embodiments 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 kernel in the LFNST transform kernel candidate set. Specifically, after the LFNST index number is parsed, 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 kernel is equal to the value of the LFNST index number, or the index number of the transform kernel is equal to the value of the LFNST index number minus 1.

[0233] Further, in the embodiments of this application, on the decoder side, the input data of LFNST may include: the luminance position (xTbY, yTbY) of the current transform block, the width of the current block nTbW, the height of the current block nTbH, whether the current block is a luminance component or a chrominance component cIdx, and the coefficients d[x][y] after the current transform block is dequantized (scaled), x = 0, 1, ..., nTbW-1, y = 0, 1, ..., nTbH-1; correspondingly, the output data of LFNST may include: the first transform coefficients d'[x][y] generated by LFNST from the second transform coefficients, x = 0, 1, ..., nLfnstSize-1, y = 0, 1, ..., nLfnstSize-1.

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

[0235] To configure core parameter 81, you first need to configure the length of the input quadratic transform coefficient vector (which can be represented by nonZeroSize) and the length of the output first transform coefficient vector (which can be represented by nLfnstOutSzie) for LFNST calculation. The values ​​for nonZeroSize and nLfnstOutSzie are shown in Table 5.

[0236] Table 5

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

[0238] In the current H.266 / VVC, the parameters nonZeroSize and nLfnstOutSzie 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 represents that there will be a once transform coefficient only in the range of nLfnstSize x nLfnstSize in the current block, and 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 code stream, the intra prediction mode of the current block or the luminance or chrominance component of the coding block where the current block is located can also be obtained, and at this time, the value of the intra prediction mode indicator (which can be represented as predModeIntra) can be determined, and the calculation formula is as described in the foregoing formula (5).

[0245] Further, the vector u[i], i = 0, 1, …, nonZeroSize-1 of the secondary transform coefficient is obtained. When it is determined that the current transform block uses LFNST, the dequantized coefficient d[x][y] at this time is the secondary transform coefficient. The first nonZeroSize values thereof are obtained in the diagonal scanning order, that is, the vector u[i], i = 0, 1, …, nonZeroSize-1 of the secondary transform coefficient; in the following formula, xC and yC represent the horizontal coordinate and the vertical coordinate of the coefficient numbered i in the current block relative to the top-left corner point in the diagonal order), and 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, and the value of predModeIntra indicates the MIP mode index modeId used;

[0252] If it is not the above two cases, the value of predModeIntra can be in [0, 66], which indicates that the prediction mode of the current block is a traditional intra prediction mode.

[0253] Further, the LFNST transform kernel candidate set index is determined according to the number of the traditional intra prediction mode by parsing the bitstream. 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 as follows:

[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 center luma block corresponding to the luma position of the current block (such as a chroma block) is MIP mode, i.e. intra_mip_flag[xTbY+nTbW / 2][yTbY+nTbH / 2] is 1, the value of predModeIntra is set to the index sequence number indicating the PLANAR mode (i.e. 0);

[0256] Otherwise, if the mode of the center luma block corresponding to the luma position of the current block (such as a chroma block) is IBC mode or PLT mode, the value of predModeIntra is set to the index sequence number indicating the DC mode (i.e. 1);

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

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

[0259] For the traditional intra prediction mode (such as wide-angle mapping), in the process of parsing the code stream, the 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-height ratio factor (which can be denoted 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 LFNST index number (which can be denoted as SetIdx) can be determined, and the specific value is shown in Table 1. Here, the value of LFNST index number is set as the index number indicating that the current block uses LFNST and the LFNST transform kernel is in the LFNST transform kernel candidate set. Generally, the LFNST transform kernel set includes four transform kernel candidate sets (set0, set1, set2, set3), respectively corresponding to the values of SetIdx being 0, 1, 2, and 3.

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

[0264] That is, for the current H.266 / VVC, the selection of the transform kernel candidate set needs to be performed after the CCLM mode is mapped to a traditional intra prediction mode, however, the above mapping method has poor accuracy, and a new mapping can be introduced, and it can be seen that the current LFNST technology has poor applicability to the CCLM mode, and the additional mapping processing increases the transform process of the LFNST technology, thereby reducing the decoding efficiency.

[0265] Further, in the embodiments of the present application, if the current block uses the LFNST transform technology, the decoder no longer determines the predModeIntra value by mapping the CCLM mode to a traditional intra prediction mode, but determines the LFNST transform 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 embodiments of the present application, after the LFNST index number is determined, the LFNST transform kernel candidate set can be determined according to the CCLM parameters, and then the LFNST transform kernel used by the current block is determined from the LFNST transform kernel candidate set.

[0267] Step 1504, when the LFNST index number indicates that the current block uses the LFNST, the LFNST transform kernel used by the current block is determined according to the CCLM parameters.

[0268] In the embodiments of the present application, after determining the transform coefficients and the LFNST index of the current block by parsing the bitstream, if it is determined that the current block uses LFNST based on the LFNST index, the decoder can further determine the LFNST transform kernel used by the current block according to the CCLM parameter.

[0269] It can be understood that, in the embodiments of the present application, the CCLM parameter can include a CCLM mode index, wherein the CCLM mode index is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation derivation manner of determining the intra prediction value of the current block using CCLM.

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

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

[0272] For example, in the embodiments of the present application, Figure 17 Flowchart for implementation of the transform method Figure 5 As shown in Figure 17 When the CCLM parameter is the CCLM mode index, if the LFNST index 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 can include the following steps:

[0273] Step 1701, determining the value of the LFNST intra prediction mode index sequence number according to the value of the CCLM mode index sequence number.

[0274] Step 1702, selecting a LFNST transform kernel candidate set from the plurality of LFNST transform kernel candidates according to the value of the LFNST intra prediction mode index sequence number.

[0275] Step 1703, selecting the transform kernel indicated by the LFNST index sequence number from the selected LFNST transform kernel candidate set, and setting the selected transform kernel as the LFNST transform kernel used by the current block; wherein the LFNST transform kernel candidate set contains two or more preset LFNST transform kernels.

[0276] It should be noted that in the embodiments of the present application, the CCLM mode index sequence number is used to indicate the CCLM mode used by the current block, and the CCLM mode is used to indicate the calculation derivation manner of determining the intra prediction value of the current block using CCLM. That is, the decoder can further determine the LFNST transform kernel according to the CCLM mode index sequence number.

[0277] Further, in the embodiments of the present application, after determining the CCLM mode index sequence number, the decoder can also convert the CCLM mode index sequence number into the value of the LFNST intra prediction mode index sequence number (which can be represented by predModeIntra), and then select a LFNST transform kernel candidate set from the plurality of LFNST transform kernel candidates according to the value of predModeIntra to determine the transform kernel candidate set, and select the transform kernel indicated by the LFNST index sequence number from the selected LFNST transform kernel candidate set.

[0278] It should be noted that in the embodiments of the present application, after determining the CCLM mode index sequence number, the decoder can also convert the CCLM mode index sequence number into the value of the LFNST intra prediction mode index sequence number (which can be represented by predModeIntra), and then select a LFNST transform kernel candidate set from the plurality of LFNST transform kernel candidates according to the value of predModeIntra to determine the transform kernel candidate set, and select the transform kernel indicated by the LFNST index sequence number from the selected LFNST transform kernel candidate set.

[0279] Exemplarily, in the embodiments of the present application, the decoder can specifically determine the value of the LFNST intra prediction mode index sequence number corresponding to the value of the CCLM mode index sequence number by using a first look-up table when determining the value of the LFNST intra prediction mode index sequence number according to the value of the CCLM mode index sequence number, wherein the first look-up table contains one or more different CCLM mode index sequence numbers corresponding to each of two different values of the LFNST intra prediction mode index sequence number.

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

[0281] It should be noted that, in the embodiments of the present application, the first look-up table (Look-Up Table 1, LUT1) is used to reflect the corresponding relationship between the CCLM mode index sequence number and the LFNST intra prediction mode index sequence number, that is, in the first look-up table, one or more different CCLM mode index sequence numbers corresponding to each of two different values of the LFNST intra prediction mode index sequence number are contained.

[0282] That is, in the present application, different CCLM modes can correspond to different values of predModeIntra; therefore, the decoder determines the value of the CCLM mode index sequence number according to the CCLM mode, and then determines the value of predModeIntra according to the first look-up table; and then according to the value of predModeIntra, one LFNST transform kernel candidate set can be selected from a plurality of LFNST transform kernel candidate sets, and then the LFNST transform kernel used by the current block is determined.

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

[0284] Therefore, 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 prediction mode, but can directly obtain the corresponding LFNST index sequence number through the query of the first lookup table based on the CCLM mode index sequence number corresponding to the CCLM mode, and finally realize the determination of the LFNST transform core candidate set.

[0285] In the embodiments of the present application, further, the decoder can also directly determine the LFNST transform core candidate set according to the value of the CCLM mode index sequence number, at this time, it is no longer necessary to determine the value of the LFNST intra prediction mode index sequence number according to the value of the predModeIntra.

[0286] Exemplarily, in some embodiments, Figure 18 Implementation flowchart of the transform method Figure 6 As shown in Figure 18 When the CCLM parameter is the CCLM mode index sequence number, when the LFNST index sequence number indicates that the current block uses LFNST, the method for the decoder to determine the LFNST transform core used by the current block according to the CCLM parameter can include the following steps:

[0287] Step 1801, according to the value of the CCLM mode index sequence number, selecting one LFNST transform core candidate set from a plurality of LFNST transform core candidate sets.

[0288] Step 1802, selecting the transform core indicated by the LFNST index sequence number from the selected LFNST transform core candidate set, and setting it as the LFNST transform core used by the current block; wherein the LFNST transform core candidate set contains two or more preset LFNST transform cores.

[0289] Further, in the embodiments of the present application, when the decoder selects one 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, it can specifically use the second lookup table to determine the value of the LFNST transform core candidate set index sequence number corresponding to the value of the CCLM mode index sequence number, and select the LFNST transform core candidate set indicated by the value of the LFNST transform core candidate set index sequence number as the selected LFNST transform core candidate set.

[0290] It should be noted that in the embodiments of the present application, the second look-up table (Look-Up Table 2, LUT2) contains at least two different CCLM mode index numbers corresponding to each of the two different LFNST transform kernel candidate set index numbers.

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

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

[0293] In the embodiments of the present application, further, if the prediction mode of the current block is a CCLM mode, the decoder can also select one of the transform sets (such as set1 or set2 or set3) as the selected LFNST transform kernel candidate set when determining the LFNST transform kernel candidate set.

[0294] That is, in the present application, for a current block using CCLM mode, the decoder no longer performs mapping between the conventional intra prediction modes, but directly selects a preset fixed transform set as the corresponding LFNST transform kernel candidate set. For example, in the present application, for a current block using CCLM mode, the decoder can directly determine the LFNST transform kernel candidate set corresponding to the current block as set1.

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

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

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

[0298] Further, in the embodiments of the present application, if the prediction mode of the current block is CCLM mode, the decoder can also perform mapping between the conventional intra prediction modes according to the CCLM parameters, map it to a certain conventional intra prediction mode, and then fixedly select one of the transform sets (such as set1 or set2 or set3) as the selected LFNST transform kernel candidate set from the multiple LFNST transform kernel candidate sets, or select the LFNST transform kernel candidate set based on the above Table 4.

[0299] It should be noted that in the embodiments of the present application, the decoder can also determine the transform matrix (i.e., the transform kernel) used according to one or more combinations of information in the CCLM parameter, and the determination of the transform matrix includes the selection of the transform set and the transform matrix group; wherein the decoder can select a certain transform matrix group in a certain transform set according to the CCLM parameter, without the need for selection on the encoder side, and thus without the need for transmission of lfnst_idx, so that the decoder side does not need to parse the code stream of lfnst_idx.

[0300] Further, in the embodiments 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 prediction mode when performing the LFNST transform kernel candidate set, and then select a LFNST transform kernel candidate set from the plurality of LFNST transform kernel candidate sets according to the value of predModeIntra.

[0301] That is, if the prediction mode of the current block is a non-CCLM mode, the value of predModeIntra can be determined according to the intra prediction mode at this time, and then a LFNST transform kernel candidate set can be selected from the plurality of LFNST transform kernel candidate sets according to the value of predModeIntra and in combination with the above table 1, and then the transform kernel indicated by the LFNST index sequence number is selected from the selected LFNST transform kernel candidate set, and is set as the LFNST transform kernel used by the current block.

[0302] It can be understood that in the embodiments of the present application, for the value of the LFNST index sequence number, when the value of the LFNST index sequence number is equal to 0, the LFNST will not be used; and when the value of the LFNST index sequence number is greater than 0, the LFNST will be used, and the index sequence number of the transform kernel is equal to the value of the LFNST index sequence number, or the index sequence number of the transform kernel is equal to the value of the LFNST index sequence number minus 1. Further, after the decoder determines the LFNST transform kernel used by the current block, it also needs to set the LFNST index sequence number and write it into the video code stream, so as to facilitate the subsequent decoder side to obtain the LFNST index sequence number by parsing the code stream.

[0303] Step 1505, using the LFNST transform kernel to perform transform processing on the transform coefficient.

[0304] In the embodiments of the present application, after the decoder determines the LFNST transform kernel used by the current block according to the CCLM parameter, the LFNST transform kernel can be used to perform transform processing on the prediction difference value.

[0305] It should be noted that in the embodiments of the present application, after the LFNST transform kernel candidate set is selected, the decoder can obtain the value of the LFNST index number (lfnst_idx) by parsing the code stream, and then can select the transform matrix (transform kernel) indicated by the lfnst_idx from the LFNST transform kernel candidate set according to the value of the lfnst_idx. For example, when the lfnst_idx is 1, the first group of transform matrices can be used as the LFNST transform kernel in the decoding process; when the lfnst_idx is 2, the second group of transform matrices can be used as the LFNST transform kernel in the decoding process.

[0306] Further, in the embodiments of the present application, for each group of transform matrices (transform kernel), two sizes of basic transform matrices are included, and the basic transform matrix size used at the decoder side is 16x16 and 48x16. According to nLfnstOutSize, if nLfnstOutSize is 16, the 16x16 basic transform matrix is selected; or if nLfnstOutSize is 48, the 48x16 basic transform matrix is selected. Or, if nonZeroSize is 8, only the first 8 rows of the transform matrix are used for matrix multiplication calculation.

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

[0308]

[0309] where Clip3 is a clipping operation that limits the value of the coefficient to be between the following two numbers, as follows,

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

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

[0312] Further, after the above matrix calculation, the transform processing of the transform coefficient can be realized. Here, for the 4x4 LFNST, 16 or 8 coefficients will be input at the decoder side, and 16 coefficients will be output; and for the 8x8 LFNST, 16 or 8 coefficients will be input at the decoder side, and 48 coefficients will be output, to realize the LFNST transform processing of the transform coefficient.

[0313] Therefore, in the embodiments of the present application, for the current block using the CCLM mode for intra prediction, the decoder introduces the related information of the CCLM parameter in the process of performing LFNST on the current block using the CCLM mode, and selects the transform set (or the transform kernel) according to the CCLM information. Therefore, when performing the transform processing on the current block, it is not necessary to map the CCLM mode to the traditional intra prediction mode, and thus the applicability of the LFNST technology to the current block using the CCLM mode can be improved, and the selection of the transform set (or the transform kernel) is more flexible.

[0314] The present application provides a transform method, applied to a decoder, the decoder parses a code stream, determines 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 prediction value, the code stream is parsed to determine a CCLM parameter; the code stream is parsed to determine a transform coefficient of the current block and an LFNST index sequence number; when the LFNST index sequence number indicates that the current block uses LFNST, an LFNST transform kernel used by the current block is determined according to the CCLM parameter; and the transform coefficient is processed by using the LFNST transform kernel. Therefore, in the embodiments of the present application, when the current block using the CCLM mode for intra prediction is processed by the codec, the CCLM mode does not need to be mapped to the traditional intra prediction mode, but the LFNST transform kernel used by the current block can be directly determined according to the CCLM parameter corresponding to the current block, so that the LFNST transform can be performed by using the LFNST transform kernel. It can be understood that, due to the introduction of the CCLM parameter when performing the LFNST transform, the selection of the LFNST transform kernel is more flexible, so that the applicability of the LFNST technology to the CCLM mode can be improved, and the transform process of the LFNST technology is reduced, and the coding efficiency is effectively improved.

[0315] Based on the above embodiments, in another embodiment of the present application, Figure 19 The structure of the encoder is shown in the figure Figure 1 As shown in the figure Figure 19 The encoder 300 provided by the embodiments of the present application can include a first determination part 301, a calculation part 302, and a first transform part 303.

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

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

[0318] The first determining part 301 is further configured to, when the current block uses LFNST, determine a LFNST transform kernel used by the current block according to the CCLM parameter, set a LFNST index number and write the LFNST index number into a video code stream.

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

[0320] Figure 20 An encoder Figure 2 As Figure 20 As shown in the figure, the encoder 300 can further include a first processor 304, a first memory 305 storing executable instructions of the first processor 304, a first communication interface 306, and a first bus 307 for connecting the first processor 304, the first memory 305 and the first communication interface 306.

[0321] Further, in the embodiment of the present application, the first processor 304 is configured to determine a prediction mode parameter of a current block, determine a CCLM parameter when the prediction mode parameter indicates that the current block uses CCLM to determine an intra prediction value, determine the intra prediction value of the current block according to the CCLM parameter, calculate a prediction difference value between the current block and the intra prediction value, determine a LFNST transform kernel used by the current block according to the CCLM parameter when the current block uses LFNST, set a LFNST index number and write the LFNST index number into a video code stream, and use the LFNST transform kernel to perform transform processing on the prediction difference value.

[0322] In addition, each functional module in the embodiment can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional module.

[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 such understanding. The technical solutions of the embodiments essentially or the parts that contribute to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the embodiments. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0324] The embodiment of the present application provides a kind of encoder, the prediction mode parameter of current block is determined;When the prediction mode parameter indicates that current block uses CCLM to determine intra prediction value, CCLM parameter is determined;According to CCLM parameter, the intra prediction value of current block is determined, and the prediction difference between current block and intra prediction value is calculated;When current block uses LFNST, according to CCLM parameter, the LFNST transform kernel used by current block is determined, LFNST index number is set and is written into video code stream;Using LFNST transform kernel, the transform processing of prediction difference is carried out.It can be seen from this that, in the embodiment of the present application, when the current block using CCLM mode is carried out intra prediction, the CCLM mode is not mapped to traditional intra prediction mode in the codec for transform processing, but the LFNST transform kernel used by current block can be directly determined according to the CCLM parameter corresponding to current block, so that LFNST transform kernel can be used for LFNST transform.It can be understood that, due to the introduction of CCLM parameter when LFNST transform is carried out, the selection of LFNST transform kernel is more flexible, so that the applicability of LFNST technology to CCLM mode can be improved, and the transform process of LFNST technology is reduced, and the coding efficiency is effectively improved.

[0325] Figure 21 The composition structure of the decoder is shown in Figure 1 As Figure 21 shown, the decoder 400 provided by the embodiment of the present application can include an analysis part 401, a second determination part 402 and a second transform part 403.

[0326] The analysis part 401 is configured to analyze the code stream, determine the prediction mode parameter of current block, and when the prediction mode parameter indicates that the current block uses CCLM mode to determine intra prediction value, analyze the code stream;

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

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

[0329] Figure 22 An example of a decoder Figure 2 As shown in Figure 22 The decoder 400 provided by the embodiments of the present application can further include a second processor 404, a second memory 405 storing executable instructions of the second processor 404, a second communication interface 406, and a second bus 407 for connecting the second processor 404, the second memory 405, and the second communication interface 406.

[0330] Further, in the embodiments 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 prediction value, parse the bitstream to determine a CCLM parameter, parse the bitstream to determine a transform coefficient and an LFNST index sequence number of the current block, when the LFNST index sequence number indicates that the current block uses LFNST, determine an LFNST transform kernel used by the current block according to the CCLM parameter, and use the LFNST transform kernel to perform transform processing on the transform coefficient.

[0331] In addition, each functional module in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional module.

[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 such understanding. The technical solutions of the embodiments essentially or the parts that contribute to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the embodiments. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0333] The embodiment of the present application provides a decoder, which parses a code stream, determines a prediction mode parameter of a current block, parses the code stream, and determines a CCLM parameter when the prediction mode parameter indicates that the current block uses a CCLM mode to determine an intra prediction value; parses the code stream, and determines a transform coefficient and an LFNST index sequence number of the current block; determines a LFNST transform kernel used by the current block according to the CCLM parameter when the LFNST index sequence number indicates that the current block uses LFNST; and performs transform processing on the transform coefficient using the LFNST transform kernel. Therefore, in the embodiment of the present application, when a current block using a CCLM mode is processed, the codec does not need to map the CCLM mode to a traditional intra prediction mode, but can directly determine the LFNST transform kernel used by the current block according to the CCLM parameter corresponding to the current block, so that the LFNST transform kernel can be used for LFNST transform. It can be understood that, due to the introduction of the CCLM parameter in the LFNST transform, the selection of the LFNST transform kernel is more flexible, thereby improving the applicability of the LFNST technology to the CCLM mode, reducing the transform process of the LFNST technology, and effectively improving the coding efficiency.

[0334] The embodiment of the present application provides a computer readable storage medium and a computer readable storage medium, which stores a program, and the program is executed by a processor to implement the method described in the above embodiment.

[0335] Specifically, the program instructions corresponding to the transform method in the embodiment can be stored on a storage medium such as an optical disc, a hard disk, a U disk, etc. When the program instructions corresponding to the transform method in the storage medium are read by an electronic device or executed, the following steps are included:

[0336] determining a prediction mode parameter of a current block;

[0337] determining a CCLM parameter when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value;

[0338] determining the intra prediction value of the current block according to the CCLM parameter, and calculating a prediction difference value between the current block and the intra prediction value;

[0339] determining a LFNST transform kernel used by the current block according to the CCLM parameter when the current block uses LFNST, setting a LFNST index number and writing the LFNST index number into a video bitstream;

[0340] transforming the prediction difference value using the LFNST transform kernel.

[0341] Specifically, the program instructions corresponding to the transform method in the embodiment can be stored on a storage medium such as an optical disc, a hard disk, a U disk, etc. When the program instructions corresponding to the transform method in the storage medium are read by an electronic device or executed, the following steps are included:

[0342] parsing a bitstream to determine a prediction mode parameter of a current block;

[0343] parsing the bitstream to determine a CCLM parameter when the prediction mode parameter indicates that the current block uses a CCLM mode to determine an intra prediction value;

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

[0345] determining a LFNST transform kernel used by the current block according to the CCLM parameter when the LFNST index number indicates that the current block uses LFNST;

[0346] transforming the transform coefficient using the LFNST transform kernel.

[0347] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in 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.) containing computer usable program code.

[0348] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks. Figure 1 Figure 1

[0349] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks. Figure 1 Figure 1

[0350] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheet block or blocks. Figure 1 Figure 1

[0351] The above-described embodiments are merely preferred embodiments of the present application and are 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. The encoder determines a prediction mode parameter of a current block; determines a CCLM parameter when the prediction mode parameter indicates that the current block uses the CCLM to determine an intra prediction value; determines the intra prediction value of the current block according to the CCLM parameter, and calculates a prediction difference value between the current block and the intra prediction value; determines an LFNST transformation kernel used by the current block according to the CCLM parameter when the current block uses the LFNST, sets an LFNST index sequence number and writes the LFNST index sequence number into a video code stream; and uses the LFNST transformation kernel to perform transformation processing on the prediction difference value. The decoder parses a code stream, determines a prediction mode parameter of a current block; parses the code stream to determine a CCLM parameter when the prediction mode parameter indicates that the current block uses the CCLM mode to determine an intra prediction value; parses the code stream to determine a transformation coefficient of the current block and an LFNST index sequence number; determines an LFNST transformation kernel used by the current block according to the CCLM parameter when the LFNST index sequence number indicates that the current block uses the LFNST; and uses the LFNST transformation kernel to perform transformation processing on the transformation coefficient. It can be seen that, in the embodiment of the present application, the codec does not need to map the CCLM mode to a traditional intra prediction mode when performing transformation processing on the current block using the CCLM mode for intra prediction, but can directly determine the LFNST transformation kernel used by the current block according to the CCLM parameter corresponding to the current block, so that the LFNST transformation kernel can be used for LFNST transformation. It can be understood that, due to the introduction of the CCLM parameter when performing the LFNST transformation, the selection of the LFNST transformation kernel is more flexible, so that the applicability of the LFNST technology to the CCLM mode can be improved, and the transformation process of the LFNST technology is reduced, thereby effectively improving the encoding efficiency.

Claims

1. A transformation method applied to an encoder, the method comprising: Determine the prediction mode parameters for the current block; When the prediction mode parameters instruct the current block to use the inter-component linear model (CCLM) to predict the intra-frame prediction value, the CCLM parameters are determined. Based on the CCLM parameters, determine the intra-prediction value of the current block, and calculate the prediction difference between the current block and the intra-prediction value; When the current block uses the low-frequency non-separable secondary transform LFNST, the LFNST transform core used by the current block is determined according to the CCLM parameters, the LFNST index number is set and written into the video bitstream; The predicted difference is transformed using the LFNST transform kernel. The CCLM parameters 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 derivation method for determining the intra-prediction value of the current block using CCLM. When the current block uses LFNST, the LFNST transform kernel used by the current block is determined according to the CCLM parameters, the LFNST index number is set and written to the video stream, including: Based on the value of the CCLM mode index number, select one LFNST transform kernel candidate set from multiple LFNST transform kernel candidate sets; From 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; Set the value of the LFNST index number to indicate that the current block uses LFNST and that the LFNST transform kernel is the index number in the LFNST transform kernel candidate set; The LFNST transform kernel candidate set includes two or more preset LFNST transform kernels; The step of selecting an LFNST transform kernel candidate set from multiple LFNST transform kernel candidate sets based on the value of the CCLM mode index number includes: The second lookup table is used to determine the value of the LFNST transform kernel candidate set index corresponding to the value of the CCLM mode index, and the LFNST transform kernel candidate set indicated by the value of the LFNST transform kernel candidate set index is selected as the selected LFNST transform kernel candidate set. The second lookup table contains at least different CCLM mode index numbers corresponding to the LFNST transform kernel candidate set index numbers with different values. The different CCLM mode index numbers at least indicate INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM, and each CCLM mode index number corresponds to a different LFNST transform kernel candidate set index number.

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

3. A transformation method applied to a decoder, the method comprising: Analyze the bitstream to determine the prediction mode parameters for the current block; When the prediction mode parameter indicates that the current block uses CCLM mode to determine the intra-frame prediction value, the bitstream is parsed and the CCLM parameter is determined. Analyze the bitstream to determine the transform coefficients and LFNST index number of the current block; When the LFNST index number indicates that the current block uses LFNST, the LFNST transform kernel used by the current block is determined according to the CCLM parameters; The transformation coefficients are transformed using the LFNST transform kernel. The CCLM parameters 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 derivation method for determining the intra-prediction value of the current block using CCLM. When the LFNST index number indicates that the current block uses LFNST, determining the LFNST transform kernel used by the current block based on the CCLM parameters includes: Based on the value of the CCLM mode index number, select one LFNST transform kernel candidate set from multiple LFNST transform kernel candidate sets; From 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; The LFNST transform kernel candidate set includes two or more preset LFNST transform kernels; The step of selecting an LFNST transform kernel candidate set from multiple LFNST transform kernel candidate sets based on the value of the CCLM mode index number includes: The second lookup table is used to determine the value of the LFNST transform kernel candidate set index corresponding to the value of the CCLM mode index, and the LFNST transform kernel candidate set indicated by the value of the LFNST transform kernel candidate set index is selected as the selected LFNST transform kernel candidate set. The second lookup table contains at least different CCLM mode index numbers corresponding to the LFNST transform kernel candidate set index numbers with different values. The different CCLM mode index numbers at least indicate INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM, and each CCLM mode index number corresponds to a different LFNST transform kernel candidate set index number.

4. An encoder, the 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 executes the method as described in claim 1 or 2.

5. A computer storage medium, wherein, The computer storage medium stores a computer program and a bitstream, and when the computer program is executed by a processor, it implements the method as described in claim 1 or 2 to generate the bitstream.

Citation Information

Patent Citations

  • Transformation method, encoder, decoder, and storage medium

    CN114830663A