WO2021134637A1 - 变换方法、编码器、解码器以及存储介质 - Google Patents

变换方法、编码器、解码器以及存储介质 Download PDF

Info

Publication number
WO2021134637A1
WO2021134637A1 PCT/CN2019/130850 CN2019130850W WO2021134637A1 WO 2021134637 A1 WO2021134637 A1 WO 2021134637A1 CN 2019130850 W CN2019130850 W CN 2019130850W WO 2021134637 A1 WO2021134637 A1 WO 2021134637A1
Authority
WO
WIPO (PCT)
Prior art keywords
lfnst
cclm
current block
value
scanning order
Prior art date
Application number
PCT/CN2019/130850
Other languages
English (en)
French (fr)
Inventor
霍俊彦
李新伟
乔文涵
马彦卓
万帅
杨付正
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2019/130850 priority Critical patent/WO2021134637A1/zh
Priority to EP19958506.8A priority patent/EP4087246A4/en
Priority to CN201980103052.2A priority patent/CN114830658A/zh
Publication of WO2021134637A1 publication Critical patent/WO2021134637A1/zh
Priority to US17/807,671 priority patent/US20220329861A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the embodiments of the present application relate to the field of image processing technologies, and in particular, to a transformation method, an encoder, a decoder, and a storage medium.
  • VVC High Efficiency Video Coding
  • VTM VVC Test Model
  • H.266/VVC has accepted the simplified secondary transform (Reduced Second Transform, RST) technology, and changed its name to Low-Frequency Non-Separable Transform (LFNST) technology.
  • the LFNST technology mainly includes five steps: configuration of core parameters, intra-frame prediction mode mapping, transformation matrix selection, matrix multiplication calculation, and primary transformation coefficient matrix construction. Specifically, when constructing a transformation coefficient matrix, the scanning order indicates the corresponding positions of the elements in the one-dimensional vector in the two-dimensional coefficient matrix, and the scanning order is determined according to the intra prediction mode.
  • CCLM Cross-component Linear Model Prediction
  • the embodiments of the present application provide a transformation method, an encoder, a decoder, and a storage medium that can improve the applicability of the LFNST technology to the CCLM mode, reduce the transformation process of the LFNST technology, and effectively improve the coding efficiency.
  • an embodiment of the present application provides a transformation method applied to an encoder, and the method includes:
  • the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, determine the CCLM parameter
  • the first transform is a transform different from LFNST
  • the LFNST coefficient scanning order includes a horizontal scanning order and a vertical scanning order.
  • an embodiment of the present application provides a transformation method applied to a decoder, and the method includes:
  • the prediction mode parameter indicates that the current block uses CCLM to determine the intra-frame prediction value, parse the code stream to determine the CCLM parameter;
  • the LFNST output coefficient matrix is used to construct a first coefficient matrix; wherein the LFNST coefficient scanning order includes a vertical scanning order and a horizontal scanning order.
  • an embodiment of the present application provides an encoder, the encoder includes: a first determining part, a calculating part, a first transforming part, a first constructing part,
  • the first determining part is configured to determine the prediction mode parameter of the current block; and when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, determine the CCLM parameter; and determine the CCLM parameter according to the CCLM parameter The intra prediction value of the current block;
  • the calculation part is configured to calculate the prediction difference between the current block and the intra prediction value according to the CCLM parameter
  • the first transformation part is configured to perform a first transformation on the prediction difference to obtain a first coefficient matrix
  • the first determining part is further configured to determine the scanning order of LFNST coefficients used by the current block according to the MIP parameters when the current block uses LFNST;
  • the first construction part is configured to use the first coefficient matrix to construct the input coefficient matrix of the LFNST according to the scanning order of the LFNST coefficients;
  • the first transform part is further configured to perform LFNST processing on the input coefficient matrix to obtain the transform coefficient matrix of the current block; wherein, the first transform is a transform different from LFNST, and the LFNST coefficient scan
  • the sequence includes horizontal scanning sequence and vertical scanning sequence.
  • an embodiment of the present application provides an encoder.
  • the encoder includes a first processor and a first memory storing executable instructions of the first processor. When the instructions are executed, the encoder When the first processor is executed, the conversion method as described above is implemented.
  • an embodiment of the present application provides a decoder, which includes: an analysis part, a second transformation part, a second determination part, and a second construction part,
  • the parsing part is configured to analyze the code stream to determine the prediction mode parameter of the current block; and when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, analyze the code stream to determine the CCLM parameter; and Code stream, determining the transform coefficient matrix of the current block and the LFNST intra prediction mode index number;
  • the second transform part is configured to, when the LFNST intra prediction mode index number indicates that the current block uses LFNST, use LFNST to process the transform coefficient matrix of the current block to obtain the LFNST output coefficient matrix;
  • the second determining part is configured to determine the scanning order of LFNST coefficients used by the current block according to the MIP parameters
  • the second construction part is configured to construct a first coefficient matrix using the LFNST output coefficient matrix according to the LFNST coefficient scanning order; wherein the LFNST coefficient scanning order includes a vertical scanning order and a horizontal scanning order.
  • an embodiment of the present application provides a decoder.
  • the decoder includes a second processor and a second memory storing executable instructions of the second processor. When the instructions are executed, the decoder When the second processor is executed, the conversion method as described above is implemented.
  • an embodiment of the present application provides a computer storage medium, the computer storage medium stores a computer program, and when the computer program is executed by the first processor and the second processor, the conversion method as described above is implemented .
  • the embodiments of the present application provide a transformation method, an encoder, a decoder, and a storage medium.
  • the encoder determines the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, the CCLM parameter is determined;
  • the CCLM parameters determine the intra prediction value of the current block, calculate the prediction difference between the current block and the intra prediction value; perform the first transformation on the prediction difference to obtain the first coefficient matrix; when the current block uses LFNST ,
  • the CCLM parameters determine the LFNST coefficient scanning order used by the current block; according to the LFNST coefficient scanning order, use the first coefficient matrix to construct the input coefficient matrix of LFNST; perform LFNST processing on the input coefficient matrix to obtain the transformation coefficient matrix of the current block; ,
  • the first transformation is different from LFNST, the LFNST coefficient scanning order includes horizontal scanning order and vertical scanning order.
  • the decoder parses the code stream and determines the prediction mode parameters of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, it parses the code stream and determines the CCLM parameters; parses the code stream to determine the transform coefficients and LFNST of the current block Intra prediction mode index number; when the LFNST intra prediction mode index number indicates that the current block uses LFNST, use LFNST to process the transform coefficient matrix of the current block to obtain the LFNST output coefficient matrix; determine the LFNST used by the current block according to the CCLM parameters
  • Coefficient scanning order According to the LFNST coefficient scanning order, the LFNST output coefficient matrix is used to construct the first coefficient matrix; among them, the LFNST coefficient scanning order includes the vertical scanning order and the horizontal scanning order.
  • the codec when the codec performs transformation processing on the current block that uses the CCLM mode for intra prediction, it does not need to map the CCLM mode to the traditional intra mode, but can be directly based on
  • the CCLM parameter corresponding to the current block determines the scanning order of the LFNST coefficients used in the current block, so that the LFNST coefficient scanning order can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST coefficient scanning order more flexible, which can improve the applicability of LFNST technology to CCLM mode, and reduce the transformation process of LFNST technology, which is effective Improve the coding efficiency.
  • Figure 1 is a schematic diagram of the application of LFNST technology
  • FIG. 2 is a flow chart of the specific process of LFNST
  • Fig. 3 is a schematic diagram of a luminance block in the center of a luminance position
  • Figure 4 is a block diagram of the video encoding system
  • FIG. 5 is a block diagram of the video decoding system
  • Figure 6 is the first schematic diagram of the implementation process of the transformation method
  • Figure 7 is a schematic structural diagram of a horizontal scanning sequence
  • FIG. 8 is a schematic diagram of the structure of the vertical scanning sequence
  • Figure 9 is a second schematic diagram of the implementation process of the transformation method.
  • Figure 10 is a structural schematic diagram 1 of the calculation process of LFNST technology matrix multiplication
  • Figure 11 is the second structural diagram of the calculation process of LFNST technology matrix multiplication
  • Figure 12 is the first structural block diagram of LFNST transform
  • Figure 13 is the second structural block diagram of LFNST transform
  • Figure 14 is the third structural block diagram of LFNST transform
  • Figure 15 is the fourth structural block diagram of LFNST transform
  • Figure 16 is the third schematic diagram of the implementation process of the transformation method.
  • FIG. 17 is a schematic diagram of the LFNST transform processing flow
  • Figure 18 is a fourth schematic diagram of the implementation process of the transformation method.
  • Figure 19 is a schematic diagram 1 of the composition structure of the encoder
  • Fig. 20 is a second schematic diagram of the composition structure of the encoder
  • Figure 21 is a schematic diagram of the structure of the decoder
  • Figure 22 is a second schematic diagram of the composition of the decoder.
  • the first image component, the second image component, and the third image component are generally used to represent the coding block (CB); among them, the three image components are a luminance component and a blue chrominance component. And a red chrominance component.
  • the luminance component is usually represented by the symbol Y
  • the blue chrominance component is usually represented by the symbol Cb or U
  • the red chrominance component is usually represented by the symbol Cr or V; in this way, the video image can be in YCbCr format. It can also be expressed in YUV format.
  • the first image component may be a luminance component
  • the second image component may be a blue chrominance component
  • the third image component may be a red chrominance component
  • CCLM Cross-component prediction
  • CCLM implements the prediction between the first image component to the second image component, the first image component to the third image component, and the second image component and the third image component.
  • the next generation video coding is used in the standard.
  • the reconstructed luminance value of the same coding block is used to construct the predicted value of chrominance:
  • i, j represent the position coordinates of the sampling point in the coding block
  • i represents the horizontal direction
  • j represents the vertical direction
  • Pred C [i,j] represents the position coordinate of the sampling point in the coding block [i,j].
  • the predicted value of the two image components, Rec L [i,j] represents the reconstructed value of the first image component of the sampling point with the position coordinate [i,j] in the same coding block (downsampled)
  • ⁇ and ⁇ are linear models
  • the scale factor can be derived by minimizing the regression error between the adjacent reference value of the first image component and the adjacent reference value of the second image component, as shown in the following formula (2):
  • L(n) represents the down-sampled adjacent reference value of the first image component (for example, the left side and upper side)
  • C(n) represents the adjacent reference value of the second image component (for example, the left side and the upper side)
  • N is the number of adjacent reference values of the second image component.
  • the CCLM mode includes, in addition to the method of predicting the chrominance component with the luminance component, that is, the method of predicting the second image component with the first image component, or the method of predicting the third image component with the first image component. In addition, it also includes the prediction between the two chrominance components, that is, the prediction method between the second image component and the third image component.
  • the Cr component can be predicted from the Cb component.
  • the Cb component can also be predicted from the Cr component.
  • the prediction between chrominance components in CCLM can be applied to the residual domain.
  • the Cb residual can be used to predict the Cr residual.
  • the final prediction value of the Cr component is obtained by adding a weighted reconstruction Cb residual to the traditional intra prediction value of the Cr component, as shown in formula (3):
  • the calculation method of the prediction model parameters from the luminance component to the chrominance component is the same. The only difference is that a regression cost related to the default ⁇ value in the error function is added, so that the obtained scale factor ⁇ can be biased to the default of -0.5
  • the value, specifically, the scale factor ⁇ can be calculated by formula (4).
  • Cb(n) represents the adjacent reference Cb value of the above-mentioned current coding block
  • Cr(n) represents the adjacent reference Cr value of the above-mentioned current coding block
  • H.266/VVC accepted the RST technology proposed by LGE in JVET-N0193 and changed its name to LFNST technology.
  • LFNST technology has been continuously optimized following the standard formulation process. The following will describe related technical solutions for the current LFNST technology.
  • Fig. 1 is a schematic diagram of the application of LFNST technology. See Fig. 1, which shows a schematic diagram of the application position of an LFNST technology provided by related technical solutions.
  • LFNST technology is applied between the positive primary transformation unit 11 and the quantization unit 12, and between the inverse quantization unit 13 and the inverse primary transformation unit 14. LFNST technology.
  • the positive primary transformation unit 11 performs the first transformation (which can be called “Core Transform” or “primary transformation” or “ Primary transformation”) to obtain the transformation coefficient matrix after the first transformation; then perform LFNST transformation (may be called “Secondary Transform” or “secondary transformation") on the coefficients in the transformation coefficient matrix to obtain LFNST transformation coefficients
  • LFNST transformation may be called “Secondary Transform” or “secondary transformation”
  • the matrix is finally quantized by the quantization unit 12 for the LFNST transform coefficient matrix, and the final quantized value is written into the video bitstream.
  • the quantized value of the LFNST transform coefficient matrix can be obtained by parsing the code stream, and the quantized value is inversely quantized by the inverse quantization unit 13 (may be called "Scaling") to obtain the restoration of the LFNST transform coefficient matrix
  • the coefficient matrix can be obtained by performing the reverse LFNST transformation on the restored value; then the coefficient matrix is subjected to the inverse transformation corresponding to the "Core Transform" on the encoder side through the inverse primary transformation unit 14, and finally the residual restored value is obtained.
  • the standard only defines the “inverse transform” operation on the decoder side, so in the standard, the “inverse LFNST transform” is also called “LFNST transform”; here, in order to facilitate the transformation with the encoder side To distinguish, the "LFNST transform” on the encoder side can be called “forward LFNST transform”, and the “LFNST transform” on the decoder side can be called “reverse LFNST transform”.
  • the prediction residual of the current transform block can be transformed by a positive primary transformation to obtain primary transformation coefficients, and then part of the primary transformation coefficients can be transformed by matrix multiplication for secondary transformation, resulting in a smaller and more concentrated two.
  • the decoder is subjected to inverse quantization processing.
  • the inverse quantized coefficient is subjected to inverse secondary transformation through matrix multiplication, and then the inverse is reversed.
  • the coefficients after the second transformation are inversely transformed to recover the prediction residuals.
  • the LFNST transformation process can mainly include steps such as configuring core parameters, intra prediction mode mapping, selecting transformation matrix, calculating matrix multiplication, and constructing inverse primary transformation coefficient matrix; after these steps are processed, LFNST is completed Transform.
  • the transformation set needs to be selected first. Since the transformation matrix is related to the directional characteristics of the prediction mode, the transformation set is currently selected according to the 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 number can be determined according to the value of the intra prediction mode indicator.
  • Figure 2 is a flow chart of the specific process of LFNST.
  • the specific process of LFNST can be divided into five steps, including configuring core parameters, intra prediction mode mapping, selecting transformation matrix, calculating matrix multiplication, and constructing once The transformation coefficient matrix.
  • this step is used to determine the value of predModeIntra, which can mainly include: non-traditional intra-frame prediction mode mapping and wide-angle mapping;
  • selecting transformation matrix this step is used to select
  • the transformation set and transformation matrix can mainly include: selecting a transformation set, selecting a transformation matrix group, and selecting a transformation matrix size.
  • nLfnstSize which means that there will be one transform coefficient in the first nLfnstSize ⁇ nLfnstSize range in the current block.
  • the inverse quantized coefficient d[x][y] at this time is the secondary transform coefficient.
  • the intra-frame prediction modes can be divided into traditional intra-frame prediction modes and non-traditional intra-frame prediction modes.
  • the information indicated by the value of predModeIntra is as follows:
  • predModeIntra can be INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (81, 82, 83 respectively in VVC), it indicates that the prediction mode of the current block is CCLM mode;
  • 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 used MIP mode index number modeId;
  • predModeIntra can be [0, 66], which indicates that the prediction mode of the current block is the traditional intra prediction mode.
  • the LFNST transform core candidate set index number is determined according to the number of the traditional intra prediction mode by parsing the code stream, if the prediction mode of the current block is the CCLM mode and the MIP mode, the current block is the non-traditional intra prediction mode.
  • predModeIntra indicates INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (81, 82, 83 in VVC).
  • the mode of the central luminance block corresponding to the luminance position of the current block is MIP mode, that is, intra_mip_flag[xTbY+nTbW/2][yTbY+nTbH/2] is 1, then the value of predMode Intra is set to Indicates the index number of the PLANAR mode (ie 0);
  • the value of predModeIntra is set to the index number indicating the DC mode (ie 1);
  • predModeIntra the value of predModeIntra to the value IntraPredModeY[xTbY+nTbW/2][yTbY+nTbH/2] of the mode index number of the central luminance block corresponding to the luminance position of the current block (such as the chrominance block);
  • wide-angle mapping can also be performed according to the size of the current block, and the traditional intra prediction mode [0, 66] can be extended to [ -14, 80];
  • the specific mapping process is as follows:
  • predModeIntra For the current block that is not square (that is, 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?
  • the LFNST coefficient scan order can be determined according to the value of predModeIntra. Specifically, if predModeIntra is less than or equal to 34, then fill v[j] into d'according to the horizontal scan order (raster scan) [x][y]. Otherwise, fill v[j] into d'[x][y] in the order of vertical scanning (transposition order of raster scanning).
  • the LFNST transformation matrix is related to the directional characteristics of the prediction mode, and for non-traditional intra prediction modes, such as CCLM mode, the selection of the transform set is not possible.
  • the CCLM mode can be mapped to PLANAR; if the chrominance transform block corresponds to the luminance block in the center of the luminance position If the intra prediction mode of the chrominance transform block is IBC or PLT, the CCLM mode can be mapped to DC; if the intra prediction mode of the luminance block in the center of the corresponding luminance position of the chrominance transform block is the traditional intra prediction mode, it will continue to be based on the current color
  • the size of the degree transformation block performs wide-angle mapping. After that, the candidate set of transform cores is selected according to the mapped angle.
  • the current chrominance transform block uses the CCLM mode
  • the characteristics of the luminance block in the center of the corresponding luminance position of the chrominance transform block cannot represent the current Based on the characteristics of the chroma transform block, it is unreasonable to select the candidate set of transform cores based on this characteristic; on the other hand, although the chroma block using CCLM is predicted from the corresponding luminance block using a linear relationship.
  • the luminance block corresponding to the center of the luminance position of the chrominance transformation block may only be a sub-block of the corresponding luminance block, which cannot represent the characteristics of the entire corresponding luminance block.
  • Figure 3 is a schematic diagram of the luminance block in the center of the luminance position, as shown in Figure 3.
  • the right side is the chroma block
  • the left side is the brightness block at the corresponding position.
  • the luminance block in the center of the luminance position corresponding to the gray sub-block on the left in the chrominance block is the dark sub-block (CR) in the left block.
  • the acquired luminance block mode is only the dark sub-block (CR) mode, which cannot represent the overall characteristics of the gray block in the left block; on the other hand, the existing scheme introduces the difference between chroma and brightness in the transformation process.
  • the CCLM mode needs to be mapped to the traditional intra prediction mode before the scan order can be determined.
  • the accuracy of the above mapping method is poor, and new mapping may be introduced.
  • the current LFNST technology has poor applicability to the CCLM mode, and the additional mapping processing increases the transformation process of the LFNST technology, thereby reducing the coding efficiency.
  • the codec when the codec performs transformation processing on the current block that uses the CCLM mode for intra prediction, it does not need to map the CCLM mode to the traditional intra mode, but can directly According to the CCLM parameters corresponding to the current block, the LFNST coefficient scanning order used by the current block is determined, so that the LFNST coefficient scanning order can be used to perform LFNST transformation. It is understandable that the introduction of CCLM parameters when performing LFNST transformation makes the selection of LFNST coefficient scanning order more flexible, which can improve the applicability of LFNST technology to CCLM mode, and reduce the transformation process of LFNST technology, which is effective Improve the coding efficiency.
  • FIG. 4 is a block diagram of the composition of a video encoding system; refer to FIG. 4, which shows an example of a block diagram of the composition of a video encoding system provided by an embodiment of the present application; FIG. 4
  • the video encoding system 10 includes a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, and a filter control analysis unit 107.
  • the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering
  • the encoding unit 109 can implement header information encoding And context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC).
  • CABAC Context-based Adaptive Binary Arithmatic Coding
  • a video coding block can be obtained by dividing the coding tree unit (CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is paired by the transformation and quantization unit 101
  • the video coding block is transformed, including transforming the residual information from the pixel domain to the transform domain, and quantizing the resulting transform coefficients to further reduce the bit rate;
  • the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used for Perform intra-frame prediction on the video encoding block; specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video encoding block;
  • the motion compensation unit 104 and the motion estimation unit 105 is used to perform inter-frame predictive coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information;
  • the motion estimation performed by the motion estimation unit 105 is a method for generating a motion vector In the process, the motion vector can estimate the motion of
  • the context content can be based on adjacent coding blocks, can be used to encode information indicating the determined intra prediction mode, and output the code stream of the video signal; and the decoded image buffer unit 110 is used to store reconstructed video coding blocks for Forecast reference. As the video image encoding progresses, new reconstructed video encoding blocks will be continuously generated, and these reconstructed video encoding blocks will be stored in the decoded image buffer unit 110.
  • FIG. 5 is a block diagram of the composition of a video decoding system; refer to FIG. 5, which shows an example of a composition block diagram of a video decoding system provided by an embodiment of the present application; as shown in FIG. 5, the video decoding system 20 includes a decoding unit 201, The inverse transform and inverse quantization unit 202, the intra-frame prediction unit 203, the motion compensation unit 204, the filtering unit 205, and the decoded image buffer unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement de- Block filter and SAO filter.
  • the decoding unit 201 can implement header information decoding and CABAC decoding
  • the filtering unit 205 can implement de- Block filter and SAO filter.
  • the code stream of the video signal is output; the code stream is input into the video decoding system 20, and first passes through the decoding unit 201 to obtain the decoded transform coefficient;
  • the inverse transform and inverse quantization unit 202 performs processing to generate a residual block in the pixel domain;
  • the intra prediction unit 203 can be used to generate data based on the determined intra prediction mode and the data from the previous decoded block of the current frame or picture The prediction data of the current video decoding block;
  • the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information to generate the predictability of the video decoding block being decoded Block; by summing the residual block from the inverse transform and inverse quantization unit 202 and the corresponding predictive block generated by the intra prediction unit 203 or the motion compensation unit 204 to form a decoded video block; the decoded video signal Through the filtering unit 205 in order to remove the block effect artifacts, the video quality can be improved
  • the transform method in the embodiment of this application can be applied to the transform and quantization unit 101 shown in FIG. 4, and the transform and quantization unit 101 includes the positive primary transform unit 11 and the quantization unit 12 shown in FIG.
  • the transformation method is specifically applied to the part between transformation and quantization.
  • the transform method in the embodiment of the present application can also be applied to the inverse transform and inverse quantization unit 106 shown in FIG. 4 or the inverse transform and inverse quantization unit 202 shown in FIG.
  • the inverse quantization unit 106 or the inverse transform and inverse quantization unit 202 can both include the inverse quantization unit 13 and the inverse primary transform unit 14 shown in FIG. 1.
  • the transform method is specifically applied to the part between inverse quantization and inverse transform. .
  • the transformation method in the embodiment of this application can be applied to both a video encoding system, a video decoding system, or even a video encoding system and a video decoding system at the same time.
  • the embodiment of this application does not make specific details. limited.
  • the “current block” specifically refers to the current encoding block in intra prediction; when the transformation method is applied to a video decoding system, the “current block” specifically refers to Refers to the current decoded block in intra prediction.
  • FIG. 6 is a schematic diagram of the implementation process of the transformation method.
  • the method for the encoder to perform transformation processing may include the following steps:
  • Step 101 Determine the prediction mode parameter of the current block.
  • the encoder may first determine the prediction mode parameter of the current block.
  • each image block currently to be encoded may be referred to as a coding block (CB).
  • each encoding block may include a first image component, a second image component, and a third image component; and the current block is the encoding of the first image component, the second image component, or the third image component currently to be predicted in the video image.
  • the current block is the encoding of the first image component, the second image component, or the third image component currently to be predicted in the video image.
  • the current block performs the first image component prediction
  • the first image component is a brightness component, that is, the image component to be predicted is a brightness component
  • the current block can also be called a brightness block
  • the current block performs second image component prediction
  • the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component
  • the current block can also be called a chrominance block.
  • the prediction mode parameter indicates the coding mode of the current block and parameters related to the mode.
  • a rate-distortion optimization (Rate Distortion Optimization, RDO) method can be used to determine the prediction mode parameters of the current block.
  • the coding mode may include two categories: traditional intra prediction mode and non-traditional intra prediction mode.
  • traditional intra prediction modes may include direct current (DC) mode, planar (PLANAR) mode, and angular mode, etc.
  • non-traditional intra prediction modes may include matrix-based intra prediction (Matrix-based Intra Prediction (MIP) mode, CCLM mode, Intra Block Copy (IBC) mode, PLT (Palette) mode, etc.
  • the encoder can determine the specific encoding mode of the traditional intra prediction mode or the non-traditional intra prediction mode through the prediction mode parameter.
  • the encoder may first determine the image component to be predicted of the current block; then, based on the parameters of the current block, use multiple prediction modes to separately The image component to be predicted is predicted and encoded, and the rate-distortion cost result corresponding to each prediction mode under multiple prediction modes is calculated; finally, the minimum rate-distortion cost result can be selected from the multiple rate-distortion cost results obtained by calculation, and The prediction mode corresponding to the minimum rate-distortion cost result is determined as the prediction mode parameter of the current block.
  • multiple prediction modes can be used for the current block to respectively encode the image components to be predicted.
  • multiple prediction modes usually include traditional intra prediction modes and non-traditional intra prediction modes.
  • the encoder after the encoder uses multiple prediction modes to respectively encode the current block, it can obtain the rate-distortion cost result corresponding to each prediction mode; and then obtain the result of the rate-distortion cost from the obtained multiple rate-distortion modes.
  • the minimum rate-distortion cost result is selected in the cost result, 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 determined prediction mode can be used to encode the current block in the end. In this prediction mode, the prediction residual can be made small, and the coding efficiency can be improved.
  • Step 102 Determine the CCLM parameter when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value.
  • the encoder 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.
  • the CCLM parameter may include a CCLM mode index number, where 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 use of The CCLM determines the calculation and derivation mode of the intra prediction value of the current block.
  • the CCLM mode may specifically include multiple different prediction modes. Therefore, different index numbers need to be used to calibrate and distinguish the different prediction modes in the CCLM mode. In other words, different CCLM modes correspond to different CCLM mode index numbers.
  • the encoder when the encoder determines the calculation and derivation method of the intra prediction value of the current block according to the use of the CCLM parameters, it can determine the specific CCLM mode, so that the corresponding CCLM mode index number can be obtained. .
  • the CCLM mode index sequence number may specifically include 81, 82, and 83.
  • Step 103 Determine the intra-frame prediction value of the current block according to the CCLM parameters, and calculate the prediction difference between the current block and the intra-frame prediction value.
  • the encoder can use the CCLM parameter to further determine the intra prediction value of the current block, so as to calculate the current block and the intra prediction The predicted difference between the values.
  • the encoder can use the CCLM mode index number included in the CCLM parameters to determine the CCLM mode used by the current block, so that the CCLM can be used to determine the CCLM mode.
  • the calculation and derivation method of the intra prediction value of the current block is described.
  • the encoder when determining the intra prediction value of the current block according to the CCLM parameters, can use the above formula (1) to use the position coordinates (down-sampled) in the coding block
  • the reconstructed value of the first image component of the sampling point is calculated to obtain the predicted value of the second image component of the sampling point of the position coordinate in the coding block.
  • the encoder can continue to calculate the difference between the real pixel value of the current block and the intra-frame prediction value, and calculate the difference The value is used as the predicted difference to facilitate subsequent transformation processing on the predicted difference.
  • the encoder can further determine the CCLM parameter during the process of determining the intra prediction value using the CCLM mode, so that the current block can be determined according to the CCLM parameter in the subsequent processing.
  • the LFNST transform kernel used (it can be expressed by the kernel).
  • Step 104 Perform a first transformation on the prediction difference to obtain a first coefficient matrix.
  • the encoder may perform a first transformation on the prediction prediction difference value, so as to obtain the first coefficient matrix.
  • the first transformation is a transformation different from LFNST
  • the first coefficient matrix may be a two-dimensional primary transformation coefficient matrix.
  • the prediction difference is first transformed to obtain the first coefficient matrix, that is, the two-dimensional primary transform coefficient matrix; then the two-dimensional primary transform coefficients are scanned through the LFNST coefficient scanning order
  • the matrix is converted into a one-dimensional primary transformation coefficient matrix; the coefficients in the one-dimensional primary transformation coefficient matrix are transformed for the second time (that is, LFNST processing) to obtain the LFNST transformation coefficient matrix, and finally the LFNST transformation coefficient matrix is quantized and encoded , Write the obtained quantized value into the video bitstream.
  • Step 105 When the current block uses LFNST, determine the scan order of the LFNST coefficients used by the current block according to the CCLM parameters.
  • the encoder can further determine the scanning order of the LFNST coefficients used by the current block according to the CCLM parameters.
  • the LFNST transform can be performed on the current block.
  • the preset conditions may include: (a) the width and height of the current block are both greater than or equal to 4; (b) the width and height of the current block are both less than or equal to the maximum size of the transform block; (c) the current block or the current block
  • the prediction mode of the coding block is the intra prediction mode; (d) the primary transformation of the current block is two-dimensional forward primary transformation (DCT2) in the horizontal and vertical directions; (e) the current block or the coding block of the current block
  • the intra prediction mode of is the non-MIP mode or the prediction mode of the transform block is the MIP mode, and the width and height of the transform block are both greater than or equal to 16. That is to say, for the current block in the embodiment of the present application, the above five conditions need to be met at the same time to determine
  • the LFNST coefficient scanning order includes a horizontal scanning order and a vertical scanning order.
  • the selected scanning order of LFNST coefficients can be implicitly derived; for example, in the current H.266/VVC, according to the intra prediction of the current block Mode, you can determine the selected LFNST coefficient scanning order.
  • the encoder can determine the value of the intra prediction mode indicator (which can be represented by predModeIntra).
  • the calculation formula is as follows:
  • the image component indicator (can be represented by cIdx) is used to indicate the luminance component or chrominance component of the current block; here, if the current block predicts the luminance component, then cIdx is equal to 0; if the current block predicts the chrominance component , Then cIdx is equal to 1.
  • (xTbY, yTbY) are the coordinates of the sampling point in the upper left corner of the current block
  • IntraPredModeY[xTbY][yTbY] is the intra prediction mode of the luminance component
  • IntraPredModeC[xTbY][yTbY] is the intra prediction mode of the chrominance component.
  • intra-frame prediction modes can be divided into traditional intra-frame prediction modes and non-traditional intra-frame prediction modes.
  • predModeIntra the information indicated by the value of predModeIntra is as follows:
  • predModeIntra can be INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (81, 82, 83 in VVC);
  • the value of predModeIntra can be the index number of the used MIP mode
  • predModeIntra can be [0, 66].
  • the encoder can also set the value of predModeIntra in the following manner:
  • the mode of the central luminance block corresponding to the luminance position of the current block is MIP mode, that is, intra_mip_flag[xTbY+nTbW/2][yTbY+nTbH/2] is 1, then the value of predMode Intra is set to Indicates the index number of the PLANAR mode (ie 0);
  • the value of predModeIntra is set to the index number indicating the DC mode (ie 1);
  • predModeIntra the value of predModeIntra to the value IntraPredModeY[xTbY+nTbW/2][yTbY+nTbH/2] of the mode index number of the central luminance block corresponding to the luminance position of the current block (such as the chrominance block);
  • predModeIntra can be directly set to the index number (that is, 0) indicating the PLANAR mode.
  • wide-angle mapping can be performed according to the size of the current block, and the traditional intra prediction mode [0, 66] is extended to [-14, 80]; specific mapping The process is as follows:
  • the LFNST coefficient scanning order can be determined according to the value of predModeIntra. Specifically, if the value of predModeIntra is less than or equal to 34, the elements in v[j] can be filled to d'[x][y] according to the horizontal scanning order (raster scan). Among them, the elements filled in d’[x][y] are as follows,
  • Figure 7 is a schematic structural diagram of the horizontal scanning sequence; as shown in Figure 7; in Figure 7, the 4x4 sub-block in the lower right corner is filled with gray, and the gray filled part is still filled with the dequantized coefficients, that is, this part is filled with inverse quantization coefficients.
  • the filled value should be 0.
  • the elements in v[j] can be filled to d’[x][y] according to the order of vertical scanning (that is, the transposition order of raster scanning).
  • the elements filled in d’[x][y] are as follows,
  • Figure 8 is a schematic diagram of the structure of the vertical scanning sequence; as shown in Figure 8; in Figure 8, the 4x4 sub-block in the lower right corner is filled with gray, and the gray filled part is still filled with the dequantized coefficients, that is, this part is filled with The filled value should be 0.
  • the scan order is currently selected according to the intra prediction mode.
  • the scanning order on the encoder side, it refers to the scanning order of filling the two-dimensional primary transform coefficients into the one-dimensional primary transform coefficient vector, and on the decoder side, it refers to filling the one-dimensional primary transform coefficient vector into the The scanning order of the two-dimensional inverse primary transformation coefficient matrix.
  • the value of the intra prediction mode indicator (which can be represented by predModeIntra) can be determined according to the number of the traditional intra prediction mode, and then the scanning order is determined as the horizontal scanning order according to the value of predModeIntra It is still the vertical scanning order; but for non-traditional frame prediction modes, such as the CCLM mode, it needs to be mapped to the traditional intra-frame prediction mode first.
  • the predModeIntra value is set mainly based on the intra prediction mode of the luminance block at the center of the luminance position corresponding to the chrominance transform block.
  • the CCLM mode can be mapped to PLANAR; if the chrominance transform block corresponds to the luminance block in the center of the luminance position If the intra prediction mode of the chrominance transform block is IBC or PLT, the CCLM mode can be mapped to DC; if the intra prediction mode of the luminance block in the center of the corresponding luminance position of the chrominance transform block is the traditional intra prediction mode, it will continue to be based on the current color
  • the size of the degree transformation block performs wide-angle mapping. Then, according to the mapped angle, it is determined whether the scanning sequence is the horizontal scanning sequence or the vertical scanning sequence.
  • the CCLM mode needs to be mapped to the traditional intra prediction mode before the scan order can be determined.
  • the accuracy of the above mapping method is poor, and new mapping may be introduced.
  • the current LFNST technology has poor applicability to the CCLM mode, and the additional mapping processing increases the transformation process of the LFNST technology, thereby reducing the coding efficiency.
  • the encoder no longer determines the value of predModeIntra by mapping the CCLM mode to the traditional intra prediction mode, but determines the value of predModeIntra based on the CCLM parameters. Describe the scan order used by the current block. Specifically, the LFNST coefficient scanning order used by the current block can be determined in combination with the CCLM parameters. At this time, the horizontal scanning order can be selected, and the vertical scanning order can also be selected, so that the LFNST in the CCLM mode has variability and can improve coding efficiency.
  • the CCLM parameter may include a CCLM mode index sequence number, where 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 use of
  • the CCLM determines the calculation and derivation mode of the intra prediction value of the current block.
  • FIG. 9 is the second schematic diagram of the implementation flow of the transformation method.
  • the encoder according to The CCLM parameter and the method for determining the scanning order of LFNST coefficients used by the current block may include the following steps:
  • Step 201 Determine the value of the LFNST intra prediction mode index number according to the value of the MIP mode index number.
  • Step 202 Set the LFNST coefficient scanning order to be equal to the LFNST coefficient scanning order corresponding to the value of the preset LFNST intra prediction mode index number.
  • the CCLM mode index number is used to indicate the CCLM mode used by the current block
  • the CCLM mode is used to indicate the use of CCLM to determine the calculation of the intra prediction value of the current block Derivation method.
  • the encoder can further determine the LFNST transform core according to the CCLM mode index number.
  • the encoder can also convert the CCLM mode index number into the value of the LFNST intra prediction mode index number (which can be represented by predModeIntra); and then According to the value of predModeIntra, determine the LFNST coefficient scanning order, such as the horizontal scanning order or the vertical scanning order.
  • the encoder determines the scanning order of the LFNST coefficients used by the current block, the value of the index number of the LFNST intra prediction mode can be obtained by looking up a table.
  • the encoder 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 determine the CCLM using the first lookup table.
  • the value of the mode index number corresponds to the value of the LFNST intra prediction mode index number, wherein the first look-up table contains at least two LFNST intra prediction mode index numbers of different values corresponding to each One or more different CCLM mode index numbers.
  • the first look-up table (Look-Up Table1, LUT1) is used to reflect the correspondence between the CCLM mode index number and the LFNST intra prediction mode index number, that is, the first look-up table (Look-Up Table1, LUT1)
  • the look-up table contains at least one or more different CCLM mode index numbers corresponding to two LFNST intra prediction mode index numbers with different values.
  • 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; Then, according to the value of predModeIntra, the scanning order of the LFNST coefficients used in the current block is determined.
  • 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 based on the CCLM mode index corresponding to the CCLM mode
  • the sequence number is obtained by querying the first look-up table to obtain the corresponding LFNST intra prediction mode index sequence number, and finally the determination of the scanning order of the LFNST coefficients is realized.
  • the decoder can directly determine the LFNST coefficient scanning order according to the value of the CCLM mode index number. At this time, it is no longer necessary to use the value of predModeIntra, that is, it is no longer necessary to use the value of the CCLM mode index number. To determine the value of the index number of the LFNST intra prediction mode.
  • the decoder may specifically scan the LFNST coefficients when determining the scanning order of the LFNST coefficients used by the current block according to the CCLM parameters The order is set equal to the LFNST coefficient scanning order corresponding to the preset value of the CCLM mode index number.
  • the encoder when the encoder sets the LFNST coefficient scanning order to be equal to the LFNST coefficient scanning order corresponding to the preset value of the CCLM mode index number, the encoder may specifically use the second The look-up table determines the LFNST coefficient scanning order corresponding to the value of the CCLM mode index number; wherein, the second look-up table contains at least one or more different CCLM modes corresponding to the different LFNST coefficient scanning orders. Index number.
  • the encoder uses the second look-up table to determine the LFNST coefficient scanning sequence corresponding to the value of the CCLM mode index number
  • the LFNST coefficient scanning order can be set to the horizontal scanning order; if the value of the MIP mode index number is not within the preset one or more integer ranges, the LFNST can be set
  • the coefficient scan order is set to the vertical scan order.
  • 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 based on the CCLM mode index corresponding to the CCLM mode
  • the sequence number is obtained by querying the second lookup table to obtain the corresponding LFNST intra prediction mode index sequence number, and finally the determination of the LFNST coefficient scanning order is realized.
  • the encoder can determine according to the value of the CCLM mode index number (modeId) Scan order of selected LFNST coefficients.
  • the value of the CCLM mode index number may include 81, 82, and 83.
  • the LFNST coefficient scanning order can be set to the horizontal scanning order; when the value of the CCLM mode index number is 83, the LFNST
  • the coefficient scanning sequence is set as the vertical scanning sequence, which is not specifically limited in the embodiment of the present application.
  • the encoder can determine the selected LFNST coefficient scan according to the preset integer range order.
  • the LFNST coefficient scan order may be set to the horizontal scan order;
  • the LFNST coefficient scanning order can be set to the vertical scanning order, etc., which is not specifically limited in the embodiment of the present application.
  • the LFNST coefficient scanning order can be selected according to one or more information combinations in the CCLM parameters.
  • the encoder can also perform the mapping with the traditional intra prediction mode according to the CCLM parameters, and map it to a certain traditional intra prediction mode. Prediction mode, and then select the LFNST coefficient scanning order according to the mapped angle.
  • the encoder may first determine the predModeIntra setting based on the intra prediction mode when selecting the LFNST coefficient scanning order. Value; if the value of predModeIntra is less than or equal to 34, the scan order of the LFNST coefficients used by the current block is set to the horizontal scan order; if the value of predModeIntra is greater than 34, the scan order of the LFNST coefficients used by the current block is set to the vertical scan order.
  • 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 the LFNST coefficient used by the current block can be determined according to the value of predModeIntra Scan order.
  • the encoder can also set the value of the LFNST index number to indicate the value corresponding to the use of LFNST, and write the value of the LFNST index number into the video Code stream.
  • the value of the LFNST index number can be set to indicate the value corresponding to the use of LFNST, and the value of the LFNST index number can be set The value is written into the video code stream; in this way, on the decoder side, the value of the LFNST index number can be obtained by parsing the code stream, so that the decoder side can determine that the current block uses LFNST.
  • Step 106 According to the LFNST coefficient scanning order, use the first coefficient matrix to construct the input coefficient matrix of the LFNST.
  • Step 107 Perform LFNST processing on the input coefficient matrix to obtain the transform coefficient matrix of the current block.
  • the LFNST coefficient scanning sequence may include a horizontal scanning sequence and a vertical scanning sequence.
  • the first coefficient matrix that is, the two-dimensional primary transformation coefficient matrix
  • the LFNST processing Get the transform coefficient matrix of the current block.
  • LFNST applies the inseparable transformation based on the direct matrix multiplication method.
  • a simplified indivisible transform technique is used in the LFNST transform.
  • the main idea of the simplified inseparable transform technology is to map N-dimensional vectors to R-dimensional vectors in different spaces, where N/R (R ⁇ N) is the scaling factor; at this time, the simplified inseparable transform technology corresponds to the transformation
  • the matrix is an R ⁇ N matrix, as shown below,
  • Figure 10 is a structural schematic diagram of the calculation process of the LFNST technology matrix multiplication
  • Figure 11 is a structural schematic diagram of the calculation process of the LFNST technology matrix multiplication.
  • FIG. 10 and FIG. 11 show a schematic structural diagram of a calculation process of a LFNST technology matrix multiplication provided by an embodiment of the present application.
  • Figure 10 shows the calculation process of the forward LFNST transformation. After the primary transformation coefficient passes through the transformation matrix T, the secondary transformation coefficients can be obtained;
  • Figure 11 shows the calculation process of the reverse LFNST transformation. After transposing the transformation matrix T T , the inverse primary transformation coefficient can be obtained.
  • the “4 ⁇ 4 inseparable transform” can be collectively referred to as “4 ⁇ 4LFNST” and “8 ⁇ 4 inseparable transform”.
  • ⁇ 8 inseparable transform is collectively referred to as "8 ⁇ 8LFNST”.
  • 16 coefficients will be input on the encoder side, and 16 or 8 coefficients will be output after the forward LFNST; while on the decoder side, 16 coefficients will be input Or 8 coefficients, 16 coefficients will be output; that is to say, the encoder and the decoder have the opposite number of inputs and outputs.
  • TU Transform unit
  • Figure 12 is the first structural block diagram of LFNST transformation
  • Figure 13 is the second structural block diagram of LFNST transformation
  • Figure 14 is the third structural block diagram of LFNST transformation
  • Figure 15 is the fourth structural block diagram of LFNST transformation.
  • the forward LFNST process corresponding to the 4 ⁇ 4 transform block is shown in Figure 12.
  • the white block is the prediction difference
  • the gray block is the primary transform coefficient
  • the black block is the secondary transform coefficient; here, at the position of the “0” example, the encoder sets the transform coefficient to 0.
  • the transform matrix size used is 8 ⁇ 16
  • the 4 ⁇ 4 primary transform coefficients in the current transform block are all input
  • the output is 4 ⁇ 2 secondary transform coefficients.
  • the forward LFNST process corresponding to the 4 ⁇ N or N ⁇ 4 transform block is shown in Figure 13.
  • the white block is the prediction difference
  • the gray block is the primary transform coefficient
  • the black block is the secondary transform coefficient; here, for the 4 ⁇ N or N ⁇ 4 transform block, when the forward LFNST is used,
  • the transform matrix size is 16 ⁇ 16
  • the first 4 ⁇ 4 sub-block in the current transform block specifically, it is the uppermost sub-block for the 4 ⁇ N transform block, and the left-most sub-block for the N ⁇ 4 transform block
  • the primary transform coefficients within are used as input
  • the output is 4 ⁇ 4 secondary transform coefficients.
  • the encoder still sets the transform coefficient to 0.
  • the forward LFNST process corresponding to the 8 ⁇ 8 transform block is shown in Figure 14.
  • the white block is the prediction difference
  • the gray block is the primary transform coefficient
  • the black block is the secondary transform coefficient
  • the transform matrix size used is 8 ⁇ 48.
  • the primary transform coefficients of the first three 4 ⁇ 4 sub-blocks (that is, the three sub-blocks located in the upper left corner) in the current transform block are used as input, and the output is 4 ⁇ 2 secondary transform coefficients.
  • the encoder still sets the transform coefficient to 0.
  • the forward LFNST process corresponding to the transform block larger than 8 ⁇ 8 is shown in Figure 15.
  • the white block is the prediction difference
  • the gray block is the primary transformation coefficient
  • the black block is the secondary transformation coefficient
  • the transformation matrix size used is 48 ⁇ 16
  • the primary transform coefficients of the first three 4 ⁇ 4 sub-blocks (that is, the three sub-blocks located in the upper left corner) in the current transform block are used as input, and the output is 4 ⁇ 4 secondary transform coefficients.
  • the encoder still sets the transform coefficient to 0.
  • the decoder introduces the relevant information of the CCLM parameters in the process of LFNST using the current block of the CCLM mode, and according to CCLM The information selects the scan order. Therefore, when performing transform processing on the current block, there is no need to map the CCLM mode to the traditional intra prediction mode, thereby improving the applicability of the LFNST technology to the current block using the CCLM mode, and making the selection of the scanning order more flexible.
  • This embodiment provides a transformation method, which is applied to the encoder, and the encoder determines the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, the CCLM parameter is determined; and the CCLM parameter is determined according to the CCLM parameter
  • the intra prediction value of the current block is calculated, and the prediction difference between the current block and the intra prediction value is calculated; the prediction difference is transformed for the first time to obtain the first coefficient matrix; when the current block uses LFNST, according to the CCLM parameters, Determine the scanning order of LFNST coefficients used in the current block; use the first coefficient matrix to construct the input coefficient matrix of LFNST according to the scanning order of LFNST coefficients; perform LFNST processing on the input coefficient matrix to obtain the transformation coefficient matrix of the current block; among them, the first transformation Unlike LFNST, the LFNST coefficient scanning order includes horizontal scanning order and vertical scanning order.
  • the codec when the codec performs transformation processing on the current block that uses the CCLM mode for intra prediction, it does not need to map the CCLM mode to the traditional intra mode, but can be directly based on
  • the CCLM parameter corresponding to the current block determines the scanning order of the LFNST coefficients used in the current block, so that the LFNST coefficient scanning order can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST coefficient scanning order more flexible, which can improve the applicability of LFNST technology to CCLM mode, and reduce the transformation process of LFNST technology, which is effective Improve the coding efficiency.
  • FIG. 16 is the third schematic diagram of the implementation flow of the transformation method.
  • the method for the decoder to perform transformation processing may include the following steps:
  • Step 301 Parse the code stream to determine the prediction mode parameters of the current block.
  • the decoder may 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.
  • the prediction mode parameter indicates the coding mode of the current block and parameters related to the mode.
  • prediction modes usually include traditional intra prediction modes and non-traditional intra prediction modes, while traditional intra prediction modes can include DC mode, PLANAR mode, and angle mode, etc., and non-traditional intra prediction modes can include MIP mode, CCLM mode, IBC mode and PLT mode, etc.
  • the intra prediction mode of the luminance or chrominance component of the current block or the coding block where the current block is located can be obtained by parsing the code stream, and then the intra prediction mode indication can be determined
  • the value of the symbol (which can be expressed by predModeIntra), the calculation formula is as the above formula (5).
  • the image component indicator (which can be represented by cIdx) is used to indicate the luminance component or chrominance component of the current block; here, if the current block predicts the luminance component, then cIdx is equal to 0; if the current block predicts Is the chrominance component, then cIdx is equal to 1.
  • (xTbY, yTbY) are the coordinates of the sampling point in the upper left corner of the current block
  • IntraPredModeY[xTbY][yTbY] is the intra prediction mode of the luminance component
  • IntraPredModeC[xTbY][yTbY] is the intra prediction mode of the chrominance component.
  • the decoder can determine the specific encoding mode of the traditional intra prediction mode or the non-traditional intra prediction mode for the decoding mode of the current block through the prediction mode parameter.
  • Step 302 When the prediction mode parameter indicates that the current block uses CCLM to determine the intra-frame prediction value, analyze the code stream to determine the CCLM parameter.
  • the decoder may continue to determine the CCLM parameter.
  • the CCLM parameter may include a CCLM mode index number, where 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 use of The CCLM determines the calculation and derivation mode of the intra prediction value of the current block.
  • the decoder can determine the CCLM parameters by analyzing the code stream. Specifically, the decoder can determine the CCLM mode index number (which can be represented by modeId) by analyzing the code stream. Wherein, the CCLM mode index number may be used to indicate the CCLM mode used by the current block, and the CCLM mode may be used to indicate the calculation and derivation method of using CCLM to determine the intra prediction value of the current block.
  • the CCLM mode may specifically include multiple different prediction modes. Therefore, different index numbers need to be used to calibrate and distinguish the different prediction modes in the CCLM mode. In other words, different CCLM modes correspond to different CCLM mode index numbers.
  • the decoder can determine the specific CCLM mode when determining the calculation and derivation method of the intra prediction value of the current block according to the use of CCLM parameters, so that the corresponding CCLM mode index number can be obtained. .
  • the CCLM mode index sequence number may specifically include 81, 82, and 83.
  • Step 303 Analyze the code stream to determine the transform coefficient and LFNST index number of the current block.
  • Step 304 When the LFNST index number indicates that the current block uses LFNST, use LFNST to process the transform coefficient matrix of the current block to obtain the LFNST output coefficient matrix.
  • the decoder can continue to analyze the code stream, and then can further determine the transform coefficient and LFNST index number of the current block.
  • the value of the LFNST index sequence number may be used to indicate whether the current block uses LFNST, and the index sequence number of the LFNST transform core in the LFNST transform core 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 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 one.
  • FIG. 17 is a schematic diagram of the LFNST transformation processing flow. As shown in FIG. 17, the specific process of LFNST transformation can be divided into five steps, which specifically include configuring core parameters 81 and intra prediction Pattern mapping 82, selection of transformation matrix 83, calculation of matrix multiplication 84 and construction of primary transformation coefficient matrix 85.
  • this step is used to determine the value of predModeIntra, which may mainly include: non-traditional intra prediction mode mapping 821 and wide angle mapping 822; for selecting the transformation matrix 83, this step It is used to select a transformation set and a transformation matrix, and mainly includes: selecting a transformation set 831, selecting a transformation matrix group 832, and selecting a transformation matrix size 833.
  • the core parameter 81 For configuring the core parameter 81, it is first necessary to configure the length of the input secondary transform coefficient vector for LFNST calculation (which can be expressed by nonZeroSize) and the length of the output primary transform coefficient vector (which can be expressed by nLfnstOutSzie). Among them, the values for nonZeroSize and nLfnstOutSzie are shown in Table 1.
  • Transform block size nonZeroSize nLfnstOutSzie 4 ⁇ 4 8 16 4 ⁇ N or N ⁇ 4 (N>4) 16 16 8 ⁇ 8 8 48 >8 ⁇ 8 16 48
  • nLfnstSize which means that there will be one transform coefficient in the first nLfnstSize ⁇ nLfnstSize range in the current block.
  • nLfnstSize is as follows:
  • the intra prediction mode of the luminance or chrominance component of the current block or the coding block where the current block is located can also be obtained.
  • the intra prediction mode indicator (which can be represented by predModeIntra) can be determined.
  • the calculation formula is as the aforementioned formula (5).
  • the inverse quantized coefficient d[x][y] at this time is the secondary transform coefficient.
  • the intra prediction mode can be divided into a traditional intra prediction mode and a non-traditional intra prediction mode.
  • the information indicated by the value of predModeIntra is as follows:
  • predModeIntra can be INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (81, 82, 83 respectively in VVC), it indicates that the prediction mode of the current block is CCLM mode;
  • 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 used MIP mode index number modeId;
  • predModeIntra can be [0,66], which indicates that the prediction mode of the current block is the traditional intra prediction mode.
  • the LFNST transform core candidate set index number is determined according to the serial number of the traditional intra prediction mode by parsing the code stream. At this time, if the prediction mode of the current block is CCLM mode and MIP mode, you can also set the value of predModeIntra as follows:
  • predModeIntra indicates INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM (81, 82, 83 in VVC).
  • the mode of the central luminance block corresponding to the luminance position of the current block is MIP mode, that is, intra_mip_flag[xTbY+ nTbW/2][yTbY+nTbH/2] is 1, then the value of predMode Intra is set to indicate The index number of the PLANAR mode (ie 0);
  • the value of predModeIntra is set to the index number indicating the DC mode (ie 1);
  • predModeIntra the value of predModeIntra to the value IntraPredModeY[xTbY+nTbW/2][yTbY+nTbH/2] of the mode index number of the central luminance block corresponding to the luminance position of the current block (such as the chrominance block);
  • wide-angle mapping can also be performed according to the size of the current block, and the traditional intra prediction mode [0, 66] can be extended to [ -14,80];
  • the specific mapping process is as follows:
  • the value of the LFNST index number (which can be represented by SetIdx) can be determined, and the specific value is shown in Table 2.
  • the value of the LFNST index number is set to indicate that the current block uses LFNST and the LFNST transform core is in the LFNST transform core candidate set.
  • the LFNST transform set includes four transform core candidate sets (set0, set1, set2, set3), which correspond to the values of SetIdx as 0, 1, 2, and 3.
  • the LFNST transformation kernel candidate set includes two sets of transformation matrices (also called LFNST transformation kernels). In this way, after determining the LFNST transformation kernel candidate set, A group of LFNST transform cores needs to be selected from the LFNST transform core candidate set, that is, the transform matrix used when determining the current block LFNST.
  • a group of LFNST transform cores can be selected through RDCost, and the index number (which can be represented by lfnst_idx) corresponding to the LFNST transform core is written into the video code stream and transmitted to the decoder side. Therefore, on the decoder side, the value of lfnst_idx can be obtained by parsing the code stream; then, according to the value of lfnst_idx, the transformation matrix (transformation core) indicated by lfnst_idx can be selected from the LFNST transformation core candidate set.
  • the first group of LFNST transform cores that is, the first group of transform matrices
  • the LFNST transform core candidate set will be selected
  • the second set of LFNST transform cores that is, the second set of transform matrices
  • nLfnstOutSize 16x16
  • nLfnstOutSize 48
  • the specific calculation process of v[j] is as follows:
  • Clip3 is a clamp work, and the value of the coefficient can be limited between the two numbers below, as shown below,
  • Step 305 Determine the scanning order of the LFNST coefficients used in the current block according to the CCLM parameters.
  • the decoder may further determine the LFNST transform core used by the current block according to the CCLM parameter.
  • the CCLM parameter may include a CCLM mode index sequence number, where 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 use of
  • the CCLM determines the calculation and derivation mode of the intra prediction value of the current block.
  • FIG. 18 is the fourth schematic diagram of the implementation process of the transformation method.
  • the CCLM parameter is the CCLM mode index number
  • the decoder According to the CCLM parameters, the method for determining the scanning order of LFNST coefficients used by the current block may include the following steps:
  • Step 401 Determine the value of the LFNST intra prediction mode index number according to the value of the MIP mode index number.
  • Step 402 Set the LFNST coefficient scanning order to be equal to the LFNST coefficient scanning order corresponding to the value of the preset LFNST intra prediction mode index number.
  • the CCLM mode index number is used to indicate the CCLM mode used by the current block
  • the CCLM mode is used to indicate the use of CCLM to determine the calculation of the intra prediction value of the current block Derivation method.
  • the decoder can further determine the LFNST transform core according to the CCLM mode index number.
  • the decoder can also convert the CCLM mode index number into the value of the LFNST intra prediction mode index number (which can be represented by predModeIntra); and then According to the value of predModeIntra, determine the LFNST coefficient scanning order, such as the horizontal scanning order or the vertical scanning order.
  • the decoder determines the scan order of the LFNST coefficients used by the current block
  • the value of the index number of the LFNST intra prediction mode can be obtained by looking up a table.
  • the decoder when the decoder determines the value of the LFNST intra prediction mode index number according to the value of the CCLM mode index number, it can specifically determine the CCLM using the first lookup table.
  • the value of the mode index number corresponds to the value of the LFNST intra prediction mode index number, wherein the first look-up table contains at least two LFNST intra prediction mode index numbers of different values corresponding to each One or more different CCLM mode index numbers.
  • the first look-up table (Look-Up Table1, LUT1) is used to reflect the correspondence between the CCLM mode index number and the LFNST intra prediction mode index number, that is, the first look-up table (Look-Up Table1, LUT1)
  • the look-up table contains at least one or more different CCLM mode index numbers corresponding to two LFNST intra prediction mode index numbers with different values.
  • CCLM modes can correspond to different values of predModeIntra; therefore, the decoder determines the CCLM mode index number according to the CCLM mode, and then determines the value of predModeIntra according to the first lookup table; Then, according to the value of predModeIntra, the scanning order of the LFNST coefficients used in the current block is determined.
  • 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 base on the CCLM mode index corresponding to the CCLM mode.
  • the sequence number is obtained by querying the first look-up table to obtain the corresponding LFNST intra prediction mode index sequence number, and finally the determination of the scanning order of the LFNST coefficients is realized.
  • the decoder can directly determine the LFNST coefficient scanning order according to the value of the CCLM mode index number. At this time, it is no longer necessary to use the value of predModeIntra, that is, it is no longer necessary to use the value of the CCLM mode index number. To determine the value of the index number of the LFNST intra prediction mode.
  • the decoder may specifically scan the LFNST coefficients when determining the scanning order of the LFNST coefficients used by the current block according to the CCLM parameters The order is set equal to the LFNST coefficient scanning order corresponding to the preset value of the CCLM mode index number.
  • the decoder when the decoder sets the scanning order of the LFNST coefficients to be equal to the scanning order of the LFNST coefficients corresponding to the preset value of the CCLM mode index number, the decoder may specifically use the second The look-up table determines the LFNST coefficient scanning order corresponding to the value of the CCLM mode index number; wherein, the second look-up table contains at least one or more different CCLM modes corresponding to the different LFNST coefficient scanning orders. Index number.
  • the decoder uses the second look-up table to determine the LFNST coefficient scanning order corresponding to the value of the CCLM mode index number
  • the LFNST coefficient scanning order can be set to the horizontal scanning order; if the value of the MIP mode index number is not within the preset one or more integer ranges, the LFNST can be set
  • the coefficient scan order is set to the vertical scan order.
  • 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 base on the CCLM mode index corresponding to the CCLM mode.
  • the sequence number is obtained by querying the second lookup table to obtain the corresponding LFNST intra prediction mode index sequence number, and finally the determination of the LFNST coefficient scanning order is realized.
  • the decoder can determine according to the value of the CCLM mode index number (modeId) Scan order of selected LFNST coefficients.
  • the value of the CCLM mode index number may include 81, 82, and 83.
  • the LFNST coefficient scanning order can be set to the horizontal scanning order; when the value of the CCLM mode index number is 83, the LFNST
  • the coefficient scanning sequence is set as the vertical scanning sequence, which is not specifically limited in the embodiment of the present application.
  • the decoder can determine the selected LFNST coefficient scan according to the preset integer range order.
  • the LFNST coefficient scan order may be set to the horizontal scan order;
  • the LFNST coefficient scanning order can be set to the vertical scanning order, etc., which is not specifically limited in the embodiment of the present application.
  • the LFNST coefficient scanning order can be selected according to one or more information combinations in the CCLM parameters.
  • the decoder can also perform the mapping with the traditional intra prediction mode according to the CCLM parameters, and map it to a certain traditional intra prediction mode. Prediction mode, and then select the LFNST coefficient scanning order according to the mapped angle.
  • the decoder may first determine the predModeIntra setting based on the intra prediction mode when selecting the LFNST coefficient scanning order. Value; if the value of predModeIntra is less than or equal to 34, the scan order of the LFNST coefficients used by the current block is set to the horizontal scan order; if the value of predModeIntra is greater than 34, the scan order of the LFNST coefficients used by the current block is set to the vertical scan order.
  • 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 the LFNST coefficient used by the current block can be determined according to the value of predModeIntra Scan order.
  • the encoder can also set the value of the LFNST index number to indicate the value corresponding to the use of LFNST, and write the value of the LFNST index number into the video Code stream.
  • the value of the LFNST index number can be set to indicate the value corresponding to the use of LFNST, and the value of the LFNST index number can be set The value is written into the video code stream; in this way, on the decoder side, the value of the LFNST index number can be obtained by parsing the code stream, so that the decoder side can determine that the current block uses LFNST.
  • Step 306 According to the LFNST coefficient scanning order, use the LFNST output coefficient matrix to construct a first coefficient matrix.
  • the decoder may further construct the first coefficient matrix using the LFNST output coefficient matrix according to the LFNST coefficient scanning order.
  • the LFNST coefficient scanning order includes a vertical scanning order and a horizontal scanning order.
  • the LFNST output coefficient matrix can be used to construct the first coefficient matrix; here, the first coefficient matrix can be a two-dimensional primary transformation coefficient matrix.
  • the decoder may also first construct the first coefficient matrix according to the CCLM Parameters, construct the intra-frame prediction value of the current block; then perform a transformation process different from LFNST on the first coefficient matrix to obtain the prediction difference of the current block; finally, the intra-frame prediction value sum can be calculated The sum of the prediction differences is taken as the reconstruction value of the current block.
  • the decoder may perform the first transformation on the first coefficient matrix to obtain the prediction difference of the current block; here, the first transformation It is a conversion process different from LFNST.
  • the prediction mode parameters of the current block are determined by analyzing the code stream, if the prediction mode is CCLM mode, the current block can also be predicted according to the CCLM mode to obtain the intra prediction value of the current block; and then according to the intra prediction The value and the predicted difference are summed, and then the obtained sum is used as the reconstruction value of the current block, which also realizes the encoding and decoding processing of the current block, and can restore the original value of the current block.
  • the decoder introduces the relevant information of the CCLM parameters in the process of LFNST using the current block of the CCLM mode, and according to CCLM The information selects the scan order. Therefore, when performing transform processing on the current block, there is no need to map the CCLM mode to the traditional intra prediction mode, thereby improving the applicability of the LFNST technology to the current block using the CCLM mode, and making the selection of the scanning order more flexible.
  • This embodiment provides a transformation method, which is applied to a decoder.
  • the decoder parses the code stream and determines the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, the code stream is parsed and determined CCLM parameters; parse the code stream to determine the transform coefficients of the current block and the LFNST intra prediction mode index number; when the LFNST intra prediction mode index number indicates that the current block uses LFNST, use LFNST to process the transform coefficient matrix of the current block to obtain LFNST output coefficient matrix; according to the CCLM parameters, determine the scanning order of the LFNST coefficients used in the current block; according to the LFNST coefficient scanning order, use the LFNST output coefficient matrix to construct the first coefficient matrix; among them, the LFNST coefficient scanning order includes the vertical scanning order and the horizontal scanning order .
  • the codec when the codec performs transformation processing on the current block that uses the CCLM mode for intra prediction, it does not need to map the CCLM mode to the traditional intra mode, but can be directly based on
  • the CCLM parameter corresponding to the current block determines the scanning order of the LFNST coefficients used in the current block, so that the LFNST coefficient scanning order can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST coefficient scanning order more flexible, which can improve the applicability of LFNST technology to CCLM mode, and reduce the transformation process of LFNST technology, which is effective Improve the coding efficiency.
  • FIG. 19 is a schematic diagram of the composition structure of the encoder.
  • the encoder 300 proposed in the embodiment of the present application may include a first determining part 301, which calculates Part 302, first transformation part 303, first construction part 304.
  • the first determining part 301 is configured to determine the prediction mode parameter of the current block; and when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, determine the CCLM parameter; and according to the CCLM parameter, Determining the intra prediction value of the current block;
  • the calculation part 302 is configured to calculate the prediction difference between the current block and the intra prediction value according to the CCLM parameter;
  • the first transformation part 303 is configured to perform a first transformation on the prediction difference to obtain a first coefficient matrix
  • the first determining part 301 is further configured to determine the scanning order of LFNST coefficients used by the current block according to the MIP parameters when the current block uses LFNST;
  • the first construction part 304 is configured to use the first coefficient matrix to construct an input coefficient matrix of the LFNST according to the scanning order of the LFNST coefficients;
  • the first transformation part 303 is further configured to perform LFNST processing on the input coefficient matrix to obtain the transformation coefficient matrix of the current block; wherein, the first transformation is a transformation different from LFNST, and the LFNST coefficients
  • the scanning order includes a horizontal scanning order and a vertical scanning order.
  • FIG. 20 is a second schematic diagram of the structure of the encoder.
  • the encoder 300 proposed in this embodiment of the present application may further include a first processor 305 and a first memory 306 storing executable instructions of the first processor 305 , A first communication interface 307, and a first bus 308 for connecting the first processor 305, the first memory 306, and the first communication interface 307.
  • the above-mentioned first processor 305 is configured to determine the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, determine the CCLM Parameters; according to the CCLM parameters, determine the intra prediction value of the current block, calculate the prediction difference between the current block and the intra prediction value; perform the first transformation on the prediction difference, Obtain the first coefficient matrix; when the current block uses LFNST, determine the LFNST coefficient scanning order used by the current block according to the CCLM parameters; use the first coefficient matrix to construct the LFNST according to the LFNST coefficient scanning order The input coefficient matrix of the input coefficient matrix; LFNST processing the input coefficient matrix to obtain the transformation coefficient matrix of the current block; wherein, the first transformation is a transformation different from LFNST, the LFNST coefficient scanning order includes horizontal scanning order and vertical Scan order.
  • the functional modules in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software function module.
  • 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.
  • the technical solution of this embodiment is essentially or correct
  • the part that the prior art contributes or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer).
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes.
  • the embodiment of the application provides an encoder that determines the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, the CCLM parameter is determined; and the CCLM parameter is determined according to the CCLM parameter.
  • Intra prediction value calculate the prediction difference between the current block and the intra prediction value; perform the first transformation of the prediction difference to obtain the first coefficient matrix; when the current block uses LFNST, determine the current block according to the CCLM parameters LFNST coefficient scanning order used; according to the LFNST coefficient scanning order, use the first coefficient matrix to construct the input coefficient matrix of LFNST; perform LFNST processing on the input coefficient matrix to obtain the transformation coefficient matrix of the current block; where the first transformation is different from In the transformation of LFNST, the scanning order of LFNST coefficients includes the horizontal scanning order and the vertical scanning order.
  • the codec when the codec performs transformation processing on the current block that uses the CCLM mode for intra prediction, it does not need to map the CCLM mode to the traditional intra mode, but can be directly based on
  • the CCLM parameter corresponding to the current block determines the scanning order of the LFNST coefficients used in the current block, so that the LFNST coefficient scanning order can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST coefficient scanning order more flexible, which can improve the applicability of LFNST technology to CCLM mode, and reduce the transformation process of LFNST technology, which is effective Improve the coding efficiency.
  • FIG. 21 is a schematic diagram 1 of the composition structure of a decoder.
  • the decoder 400 proposed in this embodiment of the present application may include an analysis part 401, a second transformation part 402, a second determination part 403, and a second construction part 404.
  • the parsing part 401 is configured to analyze the code stream to determine the prediction mode parameter of the current block; and when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, analyze the code stream to determine the CCLM parameter; and Parse the code stream, and determine the transform coefficient matrix of the current block and the LFNST intra prediction mode index number;
  • the second transform part 402 is configured to use LFNST to process the transform coefficient matrix of the current block when the LFNST intra prediction mode index number indicates that the current block uses LFNST to obtain the LFNST output coefficient matrix;
  • the second determining part 403 is configured to determine the scanning order of LFNST coefficients used by the current block according to the MIP parameters;
  • the second construction part 404 is configured to construct a first coefficient matrix using the LFNST output coefficient matrix according to the LFNST coefficient scanning order; wherein the LFNST coefficient scanning order includes a vertical scanning order and a horizontal scanning order.
  • FIG. 22 is a second schematic diagram of the structure of the decoder.
  • the decoder 400 proposed in this embodiment of the present application may further include a second processor 405, and a second memory 406 storing executable instructions of the second processor 405. , A second communication interface 407, and a second bus 408 for connecting the second processor 405, the second memory 406, and the second communication interface 407.
  • the above-mentioned second processor 405 is configured to parse the code stream and determine the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value
  • the code stream is parsed to determine the CCLM parameters; the code stream is parsed to determine the transform coefficients of the current block and the LFNST intra prediction mode index number; when the LFNST intra prediction mode index number indicates that the current block uses LFNST, Use LFNST to process the transform coefficient matrix of the current block to obtain the LFNST output coefficient matrix; determine the LFNST coefficient scanning order used by the current block according to the CCLM parameters; use the LFNST according to the LFNST coefficient scanning order
  • the output coefficient matrix constructs the first coefficient matrix; wherein the LFNST coefficient scanning order includes a vertical scanning order and a horizontal scanning order.
  • the functional modules in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software function module.
  • 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.
  • the technical solution of this embodiment is essentially or correct
  • the part that the prior art contributes or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer).
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • the embodiment of the present application provides a decoder that parses the code stream and determines the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, the code stream is parsed to determine the CCLM parameter; Analyze the code stream to determine the transform coefficients of the current block and the LFNST intra prediction mode index number; when the LFNST intra prediction mode index number indicates that the current block uses LFNST, use LFNST to process the transform coefficient matrix of the current block to obtain the LFNST output coefficients Matrix; Determine the LFNST coefficient scanning order used in the current block according to the CCLM parameters; According to the LFNST coefficient scanning order, use the LFNST output coefficient matrix to construct the first coefficient matrix; Among them, the LFNST coefficient scanning order includes the vertical scanning order and the horizontal scanning order.
  • the codec when the codec performs transformation processing on the current block that uses the CCLM mode for intra prediction, it does not need to map the CCLM mode to the traditional intra mode, but can be directly based on
  • the CCLM parameter corresponding to the current block determines the scanning order of the LFNST coefficients used in the current block, so that the LFNST coefficient scanning order can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST coefficient scanning order more flexible, which can improve the applicability of LFNST technology to CCLM mode, and reduce the transformation process of LFNST technology, which is effective Improve the coding efficiency.
  • the embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the method as described in the above-mentioned embodiment is implemented.
  • the program instructions corresponding to a conversion method in this embodiment can be stored on storage media such as optical disks, hard disks, USB flash drives, etc.
  • storage media such as optical disks, hard disks, USB flash drives, etc.
  • the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, determine the CCLM parameter
  • the first transform is a transform different from LFNST
  • the LFNST coefficient scanning order includes a horizontal scanning order and a vertical scanning order.
  • the program instructions corresponding to a conversion method in this embodiment can be stored on storage media such as optical disks, hard disks, USB flash drives, etc.
  • storage media such as optical disks, hard disks, USB flash drives, etc.
  • the prediction mode parameter indicates that the current block uses CCLM to determine the intra-frame prediction value, parse the code stream to determine the CCLM parameter;
  • the LFNST output coefficient matrix is used to construct a first coefficient matrix; wherein the LFNST coefficient scanning order includes a vertical scanning order and a horizontal scanning order.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device realizes the functions specified in one or more processes in the schematic diagram and/or one block or more in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in one or more processes in the schematic diagram and/or one block or more in the block diagram.
  • the embodiments of the present application provide a transformation method, an encoder, a decoder, and a storage medium.
  • the encoder determines the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, the CCLM parameter is determined;
  • the CCLM parameters determine the intra prediction value of the current block, calculate the prediction difference between the current block and the intra prediction value; perform the first transformation on the prediction difference to obtain the first coefficient matrix; when the current block uses LFNST ,
  • the CCLM parameters determine the LFNST coefficient scanning order used by the current block; according to the LFNST coefficient scanning order, use the first coefficient matrix to construct the input coefficient matrix of LFNST; perform LFNST processing on the input coefficient matrix to obtain the transformation coefficient matrix of the current block; ,
  • the first transformation is different from LFNST, the LFNST coefficient scanning order includes horizontal scanning order and vertical scanning order.
  • the decoder parses the code stream and determines the prediction mode parameters of the current block; when the prediction mode parameter indicates that the current block uses CCLM to determine the intra prediction value, it parses the code stream and determines the CCLM parameters; parses the code stream to determine the transform coefficients and LFNST of the current block Intra prediction mode index number; when the LFNST intra prediction mode index number indicates that the current block uses LFNST, use LFNST to process the transform coefficient matrix of the current block to obtain the LFNST output coefficient matrix; determine the LFNST used by the current block according to the CCLM parameters
  • Coefficient scanning order According to the LFNST coefficient scanning order, the LFNST output coefficient matrix is used to construct the first coefficient matrix; among them, the LFNST coefficient scanning order includes the vertical scanning order and the horizontal scanning order.
  • the codec when the codec performs transformation processing on the current block that uses the CCLM mode for intra prediction, it does not need to map the CCLM mode to the traditional intra mode, but can be directly based on
  • the CCLM parameter corresponding to the current block determines the scanning order of the LFNST coefficients used in the current block, so that the LFNST coefficient scanning order can be used for LFNST transformation. It is understandable that the introduction of CCLM parameters during LFNST transformation makes the selection of LFNST coefficient scanning order more flexible, which can improve the applicability of LFNST technology to CCLM mode, and reduce the transformation process of LFNST technology, which is effective Improve the coding efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请实施例公开了一种变换方法、编码器、解码器以及存储介质,编码器确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,确定CCLM参数;根据CCLM参数,确定当前块的帧内预测值,计算当前块与帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当当前块使用LFNST时,根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。

Description

变换方法、编码器、解码器以及存储介质 技术领域
本申请实施例涉及图像处理技术领域,尤其涉及一种变换方法、编码器、解码器以及存储介质。
背景技术
随着人们对视频显示质量要求的提高,高清和超高清视频等新视频应用形式应运而生。H.265/高效率视频编码(High Efficiency Video Coding,HEVC)已经无法满足视频应用迅速发展的需求,联合视频研究组(Joint Video Exploration Team,JVET)提出了下一代视频编码标准H.266/多功能视频编码(Versatile Video Coding,VVC),其相应的测试模型为VVC的参考软件测试平台(VVC Test Model,VTM)。
目前,H.266/VVC中已经接受了简化的二次变换(Reduced Second Transform,RST)技术,并更名为低频不可分二次变换(Low-Frequency Non-Separable Transform,LFNST)技术。其中,LFNST技术主要包括配置核心参数、帧内预测模式映射、变换矩阵选择、矩阵乘法计算以及一次变换系数矩阵构造这五个步骤。具体地,在构造一次变换系数矩阵时,扫描顺序指示了一维向量中的元素在二维系数矩阵中的对应位置,而扫描顺序则是根据帧内预测模式确定的。但是对于非传统帧内预测模式,如线性模型预测(Cross-component Linear Model Prediction,CCLM)模式,需要先将其映射为传统帧内预测模式之后才能进行扫描顺序的确定,也就是说,LFNST技术对CCLM模式的适用性较差,且额外的映射处理增加了LFNST技术的变换过程,从而降低了编码效率。
发明内容
本申请实施例提供一种变换方法、编码器、解码器以及存储介质可以提高LFNST技术对CCLM模式的适用性,且减少了LFNST技术的变换过程,有效地提高了编码效率。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种变换方法,应用于编码器,所述方法包括:
确定当前块的预测模式参数;
当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,确定CCLM参数;
根据所述CCLM参数,确定所述当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;
对所述预测差值进行第一次变换,得到第一系数矩阵;
当所述当前块使用LFNST时,根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序;
根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
对所述输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
第二方面,本申请实施例提供了一种变换方法,应用于解码器,所述方法包括:
解析码流,确定当前块的预测模式参数;
当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;
解析码流,确定所述当前块的变换系数和LFNST帧内预测模式索引序号;
当所述LFNST帧内预测模式索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
第三方面,本申请实施例提供了一种编码器,所述编码器包括:第一确定部分,计算部分,第一变换部分,第一构造部分,
所述第一确定部分,配置为确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,确定CCLM参数;以及根据所述CCLM参数,确定所述当前块的帧内预测值;
所述计算部分,配置为根据所述CCLM参数,计算所述当前块与所述帧内预测值之间的预测差值;
所述第一变换部分,配置为对所述预测差值进行第一次变换,得到第一系数矩阵;
所述第一确定部分,还配置为当所述当前块使用LFNST时,根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
所述第一构造部分,配置为根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
所述第一变换部分,还配置为对所述输入系数矩阵进行LFNST处理,得到所述当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
第四方面,本申请实施例提供了一种编码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器,当所述指令被执行时,所述第一处理器执行时实现如权上所述的变换方法。
第五方面,本申请实施例提供了一种解码器,所述解码器包括:解析部分,第二变换部分,第二确定部分,第二构 造部分,
所述解析部分,配置为解析码流,确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;以及解析码流,确定所述当前块的变换系数矩阵和LFNST帧内预测模式索引序号;
所述第二变换部分,配置为当所述LFNST帧内预测模式索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
所述第二确定部分,配置为根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
所述第二构造部分,配置为根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
第六方面,本申请实施例提供了一种解码器,所述解码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器,当所述指令被执行时,所述第二处理器执行时实现如权上所述的变换方法。
第七方面,本申请实施例提供了一种计算机存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序被第一处理器和第二处理器执行时,实现如上所述的变换方法。
本申请实施例提供了一种变换方法、编码器、解码器以及存储介质,编码器确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,确定CCLM参数;根据CCLM参数,确定当前块的帧内预测值,计算当前块与帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当当前块使用LFNST时,根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。解码器解析码流,确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;解析码流,确定当前块的变换系数和LFNST帧内预测模式索引序号;当LFNST帧内预测模式索引序号指示当前块使用LFNST时,对当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用LFNST输出系数矩阵构造第一系数矩阵;其中,LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。由此可见,在本申请的实施例中,编解码器在对使用CCLM模式进行帧内预测的当前块进行变换处理时,不需要将CCLM模式映射至传统能够帧内模式,而是可以直接根据当前块对应的CCLM参数,确定出当前块使用的LFNST系数扫描顺序,从而便可以利用LFNST系数扫描顺序进行LFNST变换。可以理解的是,正是由于在进行LFNST变换时引入了CCLM参数,使得LFNST系数扫描顺序的选择更加灵活,从而可以提高LFNST技术对CCLM模式的适用性,且减少了LFNST技术的变换过程,有效地提高了编码效率。
附图说明
图1为LFNST技术的应用示意图;
图2为LFNST具体过程的流程框图;
图3为亮度位置的中心的亮度块的示意图;
图4为视频编码系统的组成框图;
图5为视频解码系统的组成框图;
图6为变换方法的实现流程示意图一;
图7为水平扫描顺序的结构示意图;
图8为垂直扫描顺序的结构示意图;
图9为变换方法的实现流程示意图二;
图10为LFNST技术矩阵乘法的计算过程的结构示意图一;
图11为LFNST技术矩阵乘法的计算过程的结构示意图二;
图12为LFNST变换的结构框图一;
图13为LFNST变换的结构框图二;
图14为LFNST变换的结构框图三;
图15为LFNST变换的结构框图四;
图16为变换方法的实现流程示意图三;
图17为LFNST变换处理流程示意图;
图18为变换方法的实现流程示意图四;
图19为编码器的组成结构示意图一;
图20为编码器的组成结构示意图二;
图21为解码器的组成结构示意图一;
图22为解码器的组成结构示意图二。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
在视频图像中,一般采用第一图像分量、第二图像分量和第三图像分量来表征编码块(Coding Block,CB);其中,这三个图像分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量,具体地,亮度分量通常使用符号Y表示, 蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。
在本申请实施例中,第一图像分量可以为亮度分量,第二图像分量可以为蓝色色度分量,第三图像分量可以为红色色度分量,但是本申请实施例不作具体限定。
在H.266中,为了进一步提升了编码性能和编码效率,针对分量间预测(Cross-component Prediction,CCP)进行了扩展改进,提出了线性模型预测(Cross-component Linear Model Prediction,CCLM)。在H.266中,CCLM实现了第一图像分量到第二图像分量、第一图像分量到第三图像分量以及第二图像分量与第三图像分量之间的预测。
具体地,在本申请的实施例中,CCLM方法在实现亮度分量到色度分量的预测时,为了减少亮度分量与色度分量间和不同色度分量之间的冗余,在下一代视频编码标准中使用分量间线性模型预测模式。例如,根据公式(1),利用同一编码块的重建亮度值构造色度的预测值:
Pred C[i,j]=α·Rec L[i,j]+β           (1)
其中,i,j表示编码块中采样点的位置坐标,i表示水平方向,j表示竖直方向,Pred C[i,j]表示编码块中位置坐标为[i,j]的采样点的第二图像分量预测值,Rec L[i,j]表示同一编码块中(经过下采样的)位置坐标为[i,j]的采样点的第一图像分量重建值,α和β是线性模型的比例因子,可以通过最小化第一图像分量相邻参考值和第二图像分量相邻参考值的回归误差推导得到,如下公式(2):
Figure PCTCN2019130850-appb-000001
其中,L(n)表示经过下采样的第一图像分量相邻参考值(例如左侧和上侧),C(n)表示第二图像分量相邻参考值(例如左侧和上侧),N为第二图像分量相邻参考值的个数。
具体地,CCLM模式除包含以亮度分量对色度分量预测的方法之外,即以第一图像分量对第二图像分量进行预测,或者以第一图像分量对第三图像分量进行预测的方法之外,也包含两个色度分量之间的预测,即还包含第二图像分量与第三图像分量之间的预测方法,其中,在本申请的实施例中,既可以从Cb分量预测Cr分量,也可以从Cr分量预测Cb分量。
需要说明的是,在本申请的实施例中中,CCLM中色度分量之间的预测,即第二图像分量与第三图像分量之间的预测可以应用于残差域。以对Cr分量进行预测为例,可以利用Cb残差预测Cr残差。Cr分量的最终预测值通过Cr分量的传统帧内预测值添加一个带权重的重建Cb残差得到,如公式(3)所示:
Pred* Cr[i,j]=γ·resi Cb'[i,j]+Pred Cr[i,j]         (3)
其中,
Figure PCTCN2019130850-appb-000002
表示上述当前编码块中位置坐标为[i,j]的采样点的Cr分量的最终预测值,resi Cb'[i,j]是重建Cb分量的预测残差,比例因子γ的计算方法和CCLM中亮度分量到色度分量的预测模型参数的计算方式一样,唯一不同的是增加了一个与误差函数中的默认γ值有关的回归代价,从而可以使得到的比例因子γ偏向于-0.5的默认值,具体地,可以通过公式(4)对比例因子γ进行计算。
Figure PCTCN2019130850-appb-000003
其中,Cb(n)表示上述当前编码块的相邻参考Cb值,Cr(n)表示上述当前编码块的相邻参考Cr值,λ可以为一个经验值,例如,λ=∑(Cb(n)·Cb(n))>>9。
H.266/VVC中接受了由LGE在JVET-N0193中提出的RST技术,并更名为LFNST技术。在之后的会议中,随着标准的制定过程,LFNST技术不断优化。下面将针对目前LFNST技术的相关技术方案描述。
图1为LFNST技术的应用示意图,参见图1,其示出了相关技术方案提供的一种LFNST技术的应用位置示意图。如图1所示,在帧内预测模式中,对于编码器侧,在正一次变换单元11与量化单元12之间应用有LFNST技术,在反量化单元13与反一次变换单元14之间应用有LFNST技术。
具体来说,在编码器侧,首先针对数据,比如预测残差(可以用residual表示)通过正一次变换单元11进行第一次变换(可以称之为“Core Transform”或者“一次变换”或者“主变换”),以得到第一次变换后的变换系数矩阵;然后针对该变换系数矩阵中的系数进行LFNST变换(可以称之为“Secondary Transform”或者“二次变换”),得到LFNST变换系数矩阵,最后针对LFNST变换系数矩阵通过量化单元12进行量化处理,将最终的量化值写入视频码流(bitstream)。
在解码器侧,通过解析码流,可以获得LFNST变换系数矩阵的量化值,通过反量化单元13对该量化值进行反量化处理(可以称之为“Scaling”),得到LFNST变换系数矩阵的恢复值,对该恢复值进行反向LFNST变换,可以得到系数矩阵;然后再通过反一次变换单元14对系数矩阵进行与编码器侧“Core Transform”对应的反变换,最终得到residual的恢复值。需要注意的是,标准中仅定义了解码器侧的“反变换”操作,因此在标准中针对“反向LFNST变换”也称之为“LFNST变换”;这里,为了便于和编码器侧的变换进行区分,可以将编码器侧“LFNST变换”称为“正向LFNST变换”,将解码器侧“LFNST变换”称为“反向LFNST变换”。
也就是说,在编码器侧,当前变换块的预测残差通过正一次变换,可以得到一次变换系数,然后将部分一次变换系数通过矩阵乘法进行二次变换,得到数量更少且更加集中的二次变换系数,再对其进行量化处理;在解码器侧,则是在 解析出量化值之后,对其进行反量化处理,将反量化后的系数通过矩阵乘法进行反二次变换,然后将反二次变换后的系数进行反一次变换,从而恢复出预测残差。
在LFNST技术中,LFNST变换过程主要可以包括:配置核心参数、帧内预测模式映射、选择变换矩阵、计算矩阵乘法和构造反一次变换系数矩阵等步骤;经过这些步骤的处理之后,便完成了LFNST变换。然而,在选择变换矩阵的步骤中,首先需要选择变换集,由于变换矩阵与预测模式的方向特性相关,目前是根据帧内预测模式来选择变换集的。其中,对于传统帧内预测模式,可以根据传统帧内预测模式的编号来确定帧内预测模式指示符的取值,然后根据帧内预测模式指示符的取值来确定变换集索引序号。
具体地,图2为LFNST具体过程的流程框图,如图2所示,LFNST具体过程可以分为五个步骤,包括配置核心参数、帧内预测模式映射、选择变换矩阵、计算矩阵乘法和构造一次变换系数矩阵。其中,对于帧内预测模式映射来说,该步骤用于确定predModeIntra的取值,主要可以包括:非传统帧内预测模式映射和宽角度映射;对于选择变换矩阵来说,该步骤用于选择出变换集以及变换矩阵,主要可以包括:选择变换集、选择变换矩阵组别和选择变换矩阵尺寸。
对于配置核心参数来说,首先需要配置进行LFNST计算的输入二次变换系数向量的长度(可以用nonZeroSize表示)和输出一次变换系数向量的长度(可以用nLfnstOutSzie表示)。
除此之外,还需要配置参数nLfnstSize,表示当前块内仅前nLfnstSize×nLfnstSize范围内会存在有一次变换系数,这时候通过解析码流,还可以获取到当前块或者当前块所在编码块的亮度或色度分量的帧内预测模式,这时候可以确定出帧内预测模式指示符(可以用predModeIntra表示)的取值。
进一步地,获取二次变化系数的向量u[i],i=0,1,…,nonZeroSize-1。在确定当前变换块使用了LFNST时,此时的反量化后的系数d[x][y]即为二次变换系数。按照对角扫描顺序获取其前nonZeroSize个值,即为二次变化系数的向量u[i],i=0,1,…,nonZeroSize-1。
进一步地,对于帧内预测模式的映射来说,帧内预测模式又可以划分为传统帧内预测模式和非传统帧内预测模式。对于非传统帧内预测模式来说,predModeIntra取值指示的信息如下:
若predModeIntra的取值可以为INTRA_LT_CCLM、INTRA_L_CCLM或INTRA_T_CCLM(在VVC中分别为81,82,83),则指示当前块的预测模式为CCLM模式;
若intra_mip_flag[xTbY][yTbY]等于1而且cIdx等于0,则指示当前块的预测模式为MIP模式,此时predModeIntra的取值指示了所使用的MIP模式索引序号modeId;
若不是上述的两种情况,predModeIntra的取值可以在[0,66],则指示当前块的预测模式为传统帧内预测模式。
目前,在通过解析码流根据传统帧内预测模式的编号来确定LFNST变换核候选集索引序号时,如果当前块的预测模式为CCLM模式和MIP模式,级当前块为非传统帧内预测模式,主要使用如下方式设置predModeIntra的取值:
(1)当predModeIntra的取值指示INTRA_LT_CCLM、INTRA_L_CCLM或INTRA_T_CCLM(在VVC中分别为81,82,83)时,
若当前块(比如色度块)对应亮度位置的中心亮度块的模式为MIP模式,即intra_mip_flag[xTbY+nTbW/2][yTbY+nTbH/2]为1,则将predMode Intra的取值设置为指示PLANAR模式的索引序号(即0);
否则,若当前块(比如色度块)对应亮度位置的中心亮度块的模式为IBC模式或者PLT模式,则将predModeIntra的取值设置为指示DC模式的索引序号(即1);
否则,将predModeIntra的取值设置为当前块(比如色度块)对应亮度位置的中心亮度块的模式索引序号的取值IntraPredModeY[xTbY+nTbW/2][yTbY+nTbH/2];
(2)当intra_mip_flag[xTbY][yTbY]等于1而且cIdx等于0时,即当前块的预测模式为MIP模式,可以直接将predModeIntra的取值设置为指示PLANAR模式的索引序号(即0)。
对于传统帧内预测模式(比如宽角度映射)来说,在解析码流的过程中,还可以根据当前块的尺寸进行宽角度的映射,将传统帧内预测模式[0,66]扩展到[-14,80];具体的映射过程如下:
首先计算宽高比例因子(可以用whRatio表示),对于非正方形的当前块(即nTbW不等于nTbH),这时候可以对predModeIntra的取值进行如下修正,如果nTbW大于nTbH、且predModeIntra大于或等于2、且predModeIntra小于((whRatio>1?(8+2×whRatio):8),那么predModeIntra=(predModeIntra+65);否则,如果nTbW小于nTbH、且predModeIntra小于或等于66、且predModeIntra大于((whRatio>1?(60-2×whRatio):60),那么predModeIntra=(predModeIntra-67)。
在目前H.266/VVC中,根据predModeIntra的取值可以确定出LFNST系数扫描顺序,具体地,如果predModeIntra小于或等于34,则按照水平扫描顺序(光栅扫描)将v[j]填入d’[x][y]。否则,按照垂直扫描的顺序(光栅扫描的转置顺序)的将v[j]填入d’[x][y]。
可以理解的是,在本申请的实施例中,正是由于LFNST变换矩阵与预测模式的方向特性相关,而对于非传统的帧内预测模式,如CCLM模式,由于无法进行变换集的选取,需要先将其映射为传统帧内预测模式。具体地,在映射时主要基于色度变换块对应亮度位置的中心的亮度块的帧内预测模式来进行predModeIntra取值的设置。也就是说,目前,如果色度变换块对应亮度位置的中心的亮度块的帧内预测模式为MIP模式,则可以将CCLM模式映射为PLANAR;如果色度变换块对应亮度位置的中心的亮度块的帧内预测模式为IBC模式或者PLT模式,可以将CCLM模式映射为DC;如果色度变换块对应亮度位置的中心的亮度块的帧内预测模式为传统帧内预测模式,则继续根据当前色度变换块的尺寸进行宽角度的映射。之后根据映射后的角度进行变换核候选集的选择。
然而,通过上述方法对非传统帧内预测模式进行映射时,一方面,如果当前色度变换块使用的是CCLM模式,则色度变换块对应亮度位置的中心的亮度块的特性并不能表示当前色度变换块的特性,根据这一特性进行变换核候选集的选择并不合理;再一方面,虽然使用CCLM的色度块使用线性关系由对应亮度块预测得来的。但是色度变换块对应亮度位置的中心的亮度块可能只是对应亮度块的一个子块,不能代表整个对应亮度块的特性,例如,图3为亮度位置的中心的亮度块的示意图,如图3所示,右侧为色度块,左侧为对应位置的亮度块。则色度块中左侧灰色子块对应的亮度位置的中心的亮度块为左侧块中的深色子块(CR)。所获取的亮度块模式仅为深色子块(CR)的模式,不能代表左侧块中灰色块的整体特性;另一方面,现有方案的做法在变换过程中引入了色度和亮度之间的依赖性;最后,由于亮度和色度所支 持的帧内预测模式并不相同,当色度变换块对应亮度位置的中心的亮度块的帧内预测模式在色度块中不支持时,如MIP,IBC,PLT模式,还需要额外的映射。
也就是说,对于目前H.266/VVC,需要先将CCLM模式映射为传统帧内预测模式之后才能进行扫描顺序的确定,然而上述的映射方式准确性较差,且可能引入新的映射,可见,目前的LFNST技术对CCLM模式的适用性较差,且额外的映射处理增加了LFNST技术的变换过程,从而降低了编码效率。
为了克服上述缺陷,在本申请的实施例中,编解码器在对使用CCLM模式进行帧内预测的当前块进行变换处理时,不需要将CCLM模式映射至传统能够帧内模式,而是可以直接根据当前块对应的CCLM参数,确定出当前块使用的LFNST系数扫描顺序,从而便可以利用LFNST系数扫描顺序进行LFNST变换。可以理解的是,正是由于在进行LFNST变换时引入了CCLM参数,使得LFNST系数扫描顺序的选择更加灵活,从而可以提高LFNST技术对CCLM模式的适用性,且减少了LFNST技术的变换过程,有效地提高了编码效率。
需要说明的是,在本申请的实施例中,图4为视频编码系统的组成框图;参见图4,其示出了本申请实施例提供的一种视频编码系统的组成框图示例;如图4所示,该视频编码系统10包括变换与量化单元101、帧内估计单元102、帧内预测单元103、运动补偿单元104、运动估计单元105、反变换与反量化单元106、滤波器控制分析单元107、滤波单元108、编码单元109和解码图像缓存单元110等,其中,滤波单元108可以实现去方块滤波及样本自适应缩进(Sample Adaptive 0ffset,SAO)滤波,编码单元109可以实现头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmatic Coding,CABAC)。针对输入的原始视频信号,通过编码树块(Coding Tree Unit,CTU)的划分可以得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元101对该视频编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元102和帧内预测单元103是用于对该视频编码块进行帧内预测;明确地说,帧内估计单元102和帧内预测单元103用于确定待用以编码该视频编码块的帧内预测模式;运动补偿单元104和运动估计单元105用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元105执行的运动估计为产生运动向量的过程,所述运动向量可以估计该视频编码块的运动,然后由运动补偿单元104基于由运动估计单元105所确定的运动向量执行运动补偿;在确定帧内预测模式之后,帧内预测单元103还用于将所选择的帧内预测数据提供到编码单元109,而且运动估计单元105将所计算确定的运动向量数据也发送到编码单元109;此外,反变换与反量化单元106是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元107和滤波单元108去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元110的帧中的一个预测性块,用以产生经重构建的视频编码块;编码单元109是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该视频信号的码流;而解码图像缓存单元110是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元110中。
图5为视频解码系统的组成框图;参见图5,其示出了本申请实施例提供的一种视频解码系统的组成框图示例;如图5所示,该视频解码系统20包括解码单元201、反变换与反量化单元202、帧内预测单元203、运动补偿单元204、滤波单元205和解码图像缓存单元206等,其中,解码单元201可以实现头信息解码以及CABAC解码,滤波单元205可以实现去方块滤波以及SAO滤波。输入的视频信号经过图4的编码处理之后,输出该视频信号的码流;该码流输入视频解码系统20中,首先经过解码单元201,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元202进行处理,以便在像素域中产生残差块;帧内预测单元203可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元204是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换与反量化单元202的残差块与由帧内预测单元203或运动补偿单元204产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过滤波单元205以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元206中,解码图像缓存单元206存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。
本申请实施例中的变换方法,可以应用在如图4所示的变换与量化单元101部分,该变换与量化单元101包括有图1所示的正一次变换单元11和量化单元12,这时候该变换方法具体应用在变换与量化之间的部分。另外,本申请实施例中的变换方法,还可以应用在如图4所示的反变换与反量化单元106部分或者如图5所示的反变换与反量化单元202部分,无论是反变换与反量化单元106还是反变换与反量化单元202,均可以包括有图1所示的反量化单元13和反一次变换单元14,这时候该变换方法具体应用在反量化与反变换之间的部分。也就是说,本申请实施例中的变换方法,既可以应用于视频编码系统,也可以应用于视频解码系统,甚至还可以同时应用于视频编码系统和视频解码系统,但是本申请实施例不作具体限定。还需要说明的是,当该变换方法应用于视频编码系统时,“当前块”具体是指帧内预测中的当前编码块;当该变换方法应用于视频解码系统时,“当前块”具体是指帧内预测中的当前解码块。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
本申请的一实施例提出了一种变换方法,应用于编码器,图6为变换方法的实现流程示意图一,如图6所示,编码器进行变换处理的方法可以包括以下步骤:
步骤101、确定当前块的预测模式参数。
在本申请的实施例中,编码器可以先确定出当前块的预测模式参数。
需要说明的是,在本申请的实施例中,视频图像可以划分为多个图像块,每个当前待编码的图像块可以称为编码块(Coding Block,CB)。这里,每个编码块可以包括第一图像分量、第二图像分量和第三图像分量;而当前块为视频图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的编码块。
可以理解的是,在本申请的实施例中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。
需要说明的是,在本申请的实施例中,预测模式参数指示了当前块的编码模式及该模式相关的参数。通常可以采用率失真优化(Rate Distortion Optimization,RDO)的方式确定当前块的预测模式参数。
进一步地,在本申请的实施例中,编码模式可以包括传统帧内预测模式和非传统帧内预测模式这两大类。具体地,传统帧内预测模式可以包括直流(Direct Current,DC)模式、平面(PLANAR)模式以及角度模式等;非传统帧内预测模式又可以包括有基于矩阵的帧内预测(Matrix-based Intra Prediction,MIP)模式、CCLM模式、帧内块复制(Intra Block Copy,IBC)模式以及PLT(Palette)模式等。
也就是说,在本申请的实施例中,编码器可以通过预测模式参数来确定当前块的编码模式是传统帧内预测模式或非传统帧内预测模式的具体哪一种编码模式。
在本申请的实施例中,进一步地,编码器在确定当前块的预测模式参数是,可以先确定当前块的待预测图像分量;然后基于所述当前块的参数,利用多种预测模式分别对所述待预测图像分量进行预测编码,计算多种预测模式下每一种预测模式对应的率失真代价结果;最后便可以从计算得到的多个率失真代价结果中选取最小率失真代价结果,并将所述最小率失真代价结果对应的预测模式确定为所述当前块的预测模式参数。
也就是说,在编码器侧,针对当前块可以采用多种预测模式分别对待预测图像分量进行编码。这里,多种预测模式通常包括有传统帧内预测模式和非传统帧内预测模式。
进一步地,在本申请的实施例中,编码器在利用多种预测模式分别对当前块进行编码之后,可以得到每一种预测模式对应的率失真代价结果;然后从所得到的多个率失真代价结果中选取最小率失真代价结果,并将该最小率失真代价结果对应的预测模式确定为当前块的预测模式参数;如此,最终可以使用所确定的预测模式对当前块进行编码,而且在这种预测模式下,可以使得预测残差小,能够提高编码效率。
步骤102、当预测模式参数指示当前块使用CCLM确定帧内预测值时,确定CCLM参数。
在本申请的实施例中,编码器在确定当前块的预测模式参数之后,如果预测模式参数指示所述当前块使用CCLM确定帧内预测值,那么编码器可以继续确定CCLM参数。
需要说明的是,在本申请的实施例中,CCLM参数可以包括CCLM模式索引序号,其中,所述CCLM模式索引序号用于指示所述当前块使用的CCLM模式,所述CCLM模式用于指示使用CCLM确定所述当前块的帧内预测值的计算推导方式。
可以理解的是,在本申请的实施例中,对于CCLM模式,具体可以包括多种不同的预测模式,因此,需要利用不同的索引序号对CCLM模式中的不同预测模式进行标定和区分。也就是说,不同的CCLM模式对应有不同的CCLM模式索引序号。
进一步地,在本申请的实施例中,编码器在根据使用CCLM参数确定当前块的帧内预测值的计算推导方式时,可以确定出具体的CCLM模式,从而就可以获得对应的CCLM模式索引序号。
需要说明的是,在本申请的实施例中,CCLM模式索引序号具体可以包括81,82,83。
可以理解的是,在本申请中,编码器在确定出CCLM参数之后,还需要将所确定的CCLM参数写入码流中,便于后续在解码器侧进行解析处理。
步骤103、根据CCLM参数,确定当前块的帧内预测值,计算当前块与帧内预测值之间的预测差值。
在本申请的实施例中,编码器在确定出当前块对应的CCLM参数之后,便可以利用CCLM参数进一步确定出当前块的帧内预测值,从而可以计算所述当前块与所述帧内预测值之间的预测差值。
需要说明的是,在本申请的实施例中,编码器在确定CCLM参数之后,便可以利用CCLM参数中包括的CCLM模式索引序号确定出当前块使用的CCLM模式,从而便可以获得使用CCLM确定所述当前块的帧内预测值的计算推导方式。
示例性的,在本申请的实施例中,编码器在根据CCLM参数确定所述当前块的帧内预测值时,可以通过上述公式(1),利用编码块中(经过下采样的)位置坐标为的采样点的第一图像分量重建值,计算获得编码块中位置坐标为的采样点的第二图像分量预测值。
示例性的,在本申请的实施例中,编码器在确定当前块的帧内预测值之后,便可以继续根据当前块的像素真实值与帧内预测值进行差值计算,将计算得到的差值作为预测差值,便于后续针对预测差值进行变换处理。
可以理解的是,在本申请的实施例中,编码器在使用CCLM模式确定帧内预测值的过程中,还可以进一步确定出CCLM参数,从而可以在后续处理过程中根据CCLM参数来确定当前块使用的LFNST变换核(可以用kernel表示)。
步骤104、对预测差值进行第一次变换,得到第一系数矩阵。
在本申请的实施例中,编码器在计算获得预测差值之后,可以对预测预测差值进行第一次变换,从而可以获得到第一系数矩阵。
需要说明的是,在本申请的实施例中,第一次变换为不同于LFNST的变换,第一系数矩阵可以为二维一次变换系数矩阵。这样,在确定出预测差值之后,首先会对预测差值进行第一次变换,以得到第一系数矩阵,即二维一次变换系数矩阵;然后会通过LFNST系数扫描顺序将二维一次变换系数矩阵转换为一维一次变换系数矩阵;再针对一维一次变换系数矩阵中的系数进行第二次变换(即LFNST处理),以得到LFNST变换系数矩阵,最后对LFNST变换系数矩阵进行量化和编码处理,将所得到的量化值写入视频码流中。
步骤105、当当前块使用LFNST时,根据CCLM参数,确定当前块使用的LFNST系数扫描顺序。
在本申请的实施例中,如果当前块使用LFNST变换技术,那么编码器便可以根据CCLM参数,进一步确定所述当前块使用的LFNST系数扫描顺序。
需要说明的是,在本申请的实施例中,并不是任何一个当前块都可以使用LFNST变换的。具体地,只有当前块同时满足一定的预设条件时,才可以对当前块进行LFNST变换。其中,该预设条件可以包括:(a)当前块的宽度和高度均大于或等于4;(b)当前块的宽度和高度均小于或等于变换块的最大尺寸;(c)当前块或当前所在编码块的预测模式为帧内预测模式;(d)当前块的一次变换在水平方向和垂直方向上均为二维正向一次变换(DCT2);(e)当前块或当前块所在编码块的帧内预测模式为非MIP模式或者变换块的预测模式为MIP模式且变换块的宽度和高度均大于或等于16。 也就是说,针对本申请实施例中的当前块,需要同时满足上述的五个条件,才能确定当前块使用LFNST变换技术。
进一步地,在本申请的实施例中,在确定当前块可以执行LFNST之后,还需要确定当前块使用的LFNST系数扫描顺序。通常而言,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。具体地址,在本申请中,根据当前块或当前块所在编码块的编码参数,可以隐含推导出所选择的LFNST系数扫描顺序;比如在目前H.266/VVC中,根据当前块的帧内预测模式,可以确定出所选择的LFNST系数扫描顺序。
具体来讲,在本申请的实施例中,编码器在获取到当前块的帧内预测模式之后,可以确定出帧内预测模式指示符(可以用predModeIntra表示)的取值,计算公式如下,
Figure PCTCN2019130850-appb-000004
其中,图像分量指示符(可以用cIdx表示)用于指示当前块的亮度分量或色度分量;这里,如果当前块预测的为亮度分量,那么cIdx等于0;如果当前块预测的为色度分量,那么cIdx等于1。另外,(xTbY,yTbY)是当前块左上角采样点的坐标,IntraPredModeY[xTbY][yTbY]为亮度分量的帧内预测模式,IntraPredModeC[xTbY][yTbY]为色度分量的帧内预测模式。
在目前H.266/VVC中,帧内预测模式又可以划分为传统帧内预测模式和非传统帧内预测模式。对于非传统帧内预测模式来说,predModeIntra取值指示的信息如下:
若当前块的预测模式为CCLM模式,则predModeIntra的取值可以为INTRA_LT_CCLM、INTRA_L_CCLM或INTRA_T_CCLM(在VVC中分别为81,82,83);
若当前块的预测模式为MIP模式,则predModeIntra的取值可以为所使用的MIP模式索引序号;
若当前块的预测模式为传统帧内预测模式,则predModeIntra的取值可以在[0,66]。
进一步地,如果当前块的预测模式为CCLM模式和MIP模式,那么编码器还可以通过如下方式设置predModeIntra的取值:
(1)当前块的预测模式为CCLM模式时:
若当前块(比如色度块)对应亮度位置的中心亮度块的模式为MIP模式,即intra_mip_flag[xTbY+nTbW/2][yTbY+nTbH/2]为1,则将predMode Intra的取值设置为指示PLANAR模式的索引序号(即0);
否则,若当前块(比如色度块)对应亮度位置的中心亮度块的模式为IBC模式或者PLT模式,则将predModeIntra的取值设置为指示DC模式的索引序号(即1);
否则,将predModeIntra的取值设置为当前块(比如色度块)对应亮度位置的中心亮度块的模式索引序号的取值IntraPredModeY[xTbY+nTbW/2][yTbY+nTbH/2];
(2)当前块的预测模式为MIP模式时:
可以直接将predModeIntra的取值设置为指示PLANAR模式的索引序号(即0)。
对于传统帧内预测模式(比如宽角度映射)来说,可以根据当前块的尺寸进行宽角度的映射,将传统帧内预测模式[0,66]扩展到[-14,80];具体的映射过程如下:
首先计算宽高比例因子(可以用whRatio表示),如下所示,
whRatio=Abs(Log2(nTbW/nTbH))        (6)
对于非正方形的当前块(即nTbW不等于nTbH),这时候可以对predModeIntra进行如下修正,如果nTbW大于nTbH、且predModeIntra大于或等于2、且predModeIntra小于((whRatio>1?(8+2×whRatio):8),那么predModeIntra=(predModeIntra+65);否则,如果nTbW小于nTbH、且predModeIntra小于或等于66、且predModeIntra大于((whRatio>1?(60-2×whRatio):60),那么predModeIntra=(predModeIntra-67)。
在目前H.266/VVC中,可以根据predModeIntra的取值来确定LFNST系数扫描顺序。具体地,如果predModeIntra的取值小于或等于34,那么可以按照水平扫描顺序(光栅扫描)将v[j]中的元素对应填充到d’[x][y]。其中,d’[x][y]内所填充的元素如下所示,
Figure PCTCN2019130850-appb-000005
这里,当nLfnstSize为8时,这时候不将v[j]中的元素对应填充到d’[][]右下角4x4的子块,这一子块内仍然填充反量化后的系数,即这一部分所填充的值应该为0。
图7为水平扫描顺序的结构示意图;如图7所示;在图7中,右下角4x4的子块采用灰色进行填充,该灰色填充的部分内仍然填充反量化后的系数,即这一部分所填充的值应该为0。
反之,如果predModeIntra的取值大于34,那么可以按照垂直扫描的顺序(即光栅扫描的转置顺序)将v[j]中的元素对应填充到d’[x][y]。其中,d’[x][y]内所填充的元素如下所示,
Figure PCTCN2019130850-appb-000006
这里,当nLfnstSize为8时,这时候不将v[j]中的元素对应填充到d’[][]右下角4x4的子块,这一子块内仍然填充反量化后的系数;即这一部分所填充的值应该为0。
图8为垂直扫描顺序的结构示意图;如图8所示;在图8中,右下角4x4的子块采用灰色进行填充,该灰色填充的部分内仍然填充反量化后的系数,即这一部分所填充的值应该为0。
可以理解的是,在本申请的实施例中,正是由于变换矩阵与预测模式的方向特性相关,目前是根据帧内预测模式来选择扫描顺序的。这里,对于扫描顺序来说,在编码器侧,是指将二维一次变换系数填充到一维一次变换系数向量的扫描顺序,而在解码器侧,是指将一维一次变换系数向量填充到二维反一次变换系数矩阵的扫描顺序。其中,对于传统帧内预测模式,可以根据传统帧内预测模式的编号来确定帧内预测模式指示符(可以用predModeIntra表示)的取值,然 后根据predModeIntra的取值来确定扫描顺序为水平扫描顺序还是垂直扫描顺序;但是对于非传统帧预测模式,如CCLM模式,需要先将其映射为传统帧内预测模式。具体地,在映射时主要基于色度变换块对应亮度位置的中心的亮度块的帧内预测模式来进行predModeIntra取值的设置。也就是说,目前,如果色度变换块对应亮度位置的中心的亮度块的帧内预测模式为MIP模式,则可以将CCLM模式映射为PLANAR;如果色度变换块对应亮度位置的中心的亮度块的帧内预测模式为IBC模式或者PLT模式,可以将CCLM模式映射为DC;如果色度变换块对应亮度位置的中心的亮度块的帧内预测模式为传统帧内预测模式,则继续根据当前色度变换块的尺寸进行宽角度的映射。之后根据映射后的角度确定扫描顺序为水平扫描顺序还是垂直扫描顺序。
也就是说,对于目前H.266/VVC,需要先将CCLM模式映射为传统帧内预测模式之后才能进行扫描顺序的确定,然而上述的映射方式准确性较差,且可能引入新的映射,可见,目前的LFNST技术对CCLM模式的适用性较差,且额外的映射处理增加了LFNST技术的变换过程,从而降低了编码效率。
进一步地,在本申请的实施例中,如果当前块使用LFNST变换技术,编码器不再通过将CCLM模式映射到传统帧内预测模式来进行predModeIntra取值的确定,而是基于CCLM参数来确定所述当前块使用的扫描顺序。具体地,可以结合CCLM参数来确定当前块使用的LFNST系数扫描顺序,这时候可以选取水平扫描顺序,还可以选取垂直扫描顺序,使得CCLM模式下进行LFNST时具备可变性,能够提高编码效率。
可以理解的是,在本申请的实施例中,CCLM参数可以包括CCLM模式索引序号,其中,所述CCLM模式索引序号用于指示所述当前块使用的CCLM模式,所述CCLM模式用于指示使用CCLM确定所述当前块的帧内预测值的计算推导方式。
示例性的,在本申请的实施例中,当所述当前块使用LFNST时,图9为变换方法的实现流程示意图二,如图9示,当CCLM参数为CCLM模式索引序号时,编码器根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序的方法可以包括以下步骤:
步骤201、根据MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值。
步骤202、将LFNST系数扫描顺序设置为等于预设的LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描顺序。
需要说明的是,在本申请的实施例中,CCLM模式索引序号用于指示所述当前块使用的CCLM模式,所述CCLM模式用于指示使用CCLM确定所述当前块的帧内预测值的计算推导方式。也就是说,编码器可以根据CCLM模式索引序号,进一步确定出LFNST变换核。
进一步地,在本申请的实施例中,编码器在确定出CCLM模式索引序号之后,还可以将CCLM模式索引序号转换为LFNST帧内预测模式索引序号(可以用predModeIntra表示)的取值;然后再根据predModeIntra的取值,确定出LFNST系数扫描顺序,比如水平扫描顺序或者垂直扫描顺序。
需要说明的是,在本申请的实施例中,编码器在确定当前块使用的LFNST系数扫描顺序时,对于LFNST帧内预测模式索引序号的取值,可以通过查表的方式获得。
示例性的,在本申请的实施例中,编码器在根据所述CCLM模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值时,具体可以使用第一查找表确定所述CCLM模式索引序号的取值对应的所述LFNST帧内预测模式索引序号的取值,其中,所述第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的CCLM模式索引序号。
需要说明的是,在本申请的实施例中,第一查找表(Look-Up Table1,LUT1)用于反映CCLM模式索引序号和LFNST帧内预测模式索引序号之间的对应关系,即在第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的CCLM模式索引序号。
也就是说,在本申请中,不同的CCLM模式可以对应不同的predModeIntra的取值;因此,编码器在根据CCLM模式确定出CCLM模式索引序号,然后根据第一查找表确定出predModeIntra的取值;再根据predModeIntra的取值,确定出当前块使用的LFNST系数扫描顺序。
由此可见,在本申请中,对于CCLM模式,编码器不再需要通过将CCLM模式映射到传统帧内预测模式来进行变换核候选集的选择,而是可以直接基于CCLM模式对应的CCLM模式索引序号,通过第一查找表的查询,获得相应地LFNST帧内预测模式索引序号,最终实现LFNST系数扫描顺序的确定。
在本申请的实施例中,进一步地,解码器还可以根据CCLM模式索引序号的取值直接确定LFNST系数扫描顺序,这时候不再需要借助predModeIntra的取值,即不再需要根据CCLM模式索引序号来确定LFNST帧内预测模式索引序号的取值。
在本申请的实施例中,进一步地,当所述当前块使用LFNST时,解码器在根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序时,具体可以将所述LFNST系数扫描顺序设置为等于预设的所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序。
示例性的,在本申请的实施例中,编码器在将所述LFNST系数扫描顺序设置为等于预设的所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序时,具体可以使用第二查找表确定所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序;其中,所述第二查找表中,至少包含不同的所述LFNST系数扫描顺序各自对应的一个或多个不同的CCLM模式索引序号。
示例性的,在本申请的实施例中,编码器在使用第二查找表确定所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序时,如果所述MIP模式索引序号的取值在预设的一个或多个整数范围内,可以将所述LFNST系数扫描顺序设置为水平扫描顺序;如果MIP模式索引序号的取值不在预设的一个或多个整数范围内时,可以将所述LFNST系数扫描顺序设置为垂直扫描顺序。
由此可见,在本申请中,对于CCLM模式,编码器不再需要通过将CCLM模式映射到传统帧内预测模式来进行变换核候选集的选择,而是可以直接基于CCLM模式对应的CCLM模式索引序号,通过第二查找表的查询,获得相应地LFNST帧内预测模式索引序号,最终实现LFNST系数扫描顺序的确定。
需要说明的是,在本申请的实施例中,如果当前块使用的预测模式为CCLM模式,当CCLM参数为CCLM模式索引序号时,编码器可以根据CCLM模式索引序号(modeId)的取值来确定所选择的LFNST系数扫描顺序。
可以理解的是,在本申请中,CCLM模式索引序号的取值可以包括有81、82、83。
示例性的,在本申请中,当CCLM模式索引序号的取值为81或82时,可以将LFNST系数扫描顺序设置为水平扫描顺序;当CCLM模式索引序号的取值为83时,可以将LFNST系数扫描顺序设置为垂直扫描顺序,本申请实施例不作具体限定。
需要说明的是,在本申请的实施例中,如果当前块使用的预测模式为CCLM模式,当CCLM参数为CCLM模式索引序号时,编码器可以根据预设整数范围来确定所选择的LFNST系数扫描顺序。
示例性的,在本申请中,当CCLM模式索引序号的取值满足预设整数范围时,比如CCLM模式索引序号的取值为81或82时,可以将LFNST系数扫描顺序设置为水平扫描顺序;当CCLM模式索引序号的取值不满足预设整数范围时,比如CCLM模式索引序号的取值为83时,可以将LFNST系数扫描顺序设置为垂直扫描顺序等,本申请实施例也不作具体限定。
除此之外,如果当前块的预测模式为CCLM模式,可以根据CCLM参数中的一种或多种信息组合,来选择LFNST系数扫描顺序。
进一步地,在本申请的实施例中,如果当前块的预测模式为CCLM模式,编码器还可以根据CCLM参数进行与传统帧内预测模式之间的映射,将其映射为某一种传统帧内预测模式,然后根据所映射的角度,来选择LFNST系数扫描顺序。
进一步地,在本申请的实施例中,当预测模式参数指示当前块使用非CCLM模式时,编码器在进行LFNST系数扫描顺序的选择时,可以先基于所述帧内预测模式,确定predModeIntra的取值;如果predModeIntra的取值小于或等于34,则将当前块使用的LFNST系数扫描顺序设置为水平扫描顺序;如果predModeIntra的取值大于34,则将当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序。
也就是说,在本申请中,如果当前块的预测模式为非CCLM模式,这时候可以根据帧内预测模式,确定出predModeIntra的取值;然后根据predModeIntra的取值来确定当前块使用的LFNST系数扫描顺序。
还需要说明的是,当所述当前块使用LFNST时,编码器还可以将LFNST索引序号的取值设置为指示使用LFNST所对应的取值,并将所述LFNST索引序号的取值写入视频码流。
可以理解的是,在本申请中,在编码器侧,如果当前块使用LFNST,那么这时候可以将LFNST索引序号的取值设置为指示使用LFNST所对应的取值,并且将LFNST索引序号的取值写入视频码流;如此,在解码器侧,通过解析码流可以得到LFNST索引序号的取值,便于解码器侧能够确定出当前块使用LFNST。
步骤106、根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵。
步骤107、对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵。
需要说明的是,在本申请的实施例中,LFNST系数扫描顺序可以包括有水平扫描顺序和垂直扫描顺序。这样,在确定出LFNST系数扫描顺序之后,可以利用第一系数矩阵(即二维一次变换系数矩阵)来构造出LFNST的输入系数矩阵(即一维一次变换系数矩阵);然后对其进行LFNST处理,得到当前块的变换系数矩阵。
需要说明的是,在本申请的实施例中,LFNST是基于直接矩阵乘法方式来应用不可分离变换。为了尽可能减小计算复杂度和的存储空间,在LFNST变换中使用了简化的不可分变换技术。其中,简化的不可分变换技术的主要思想是将N维向量映射到不同空间中的R维向量,这里,N/R(R<N)为缩放因子;这时候简化的不可分变换技术所对应的变换矩阵为R×N矩阵,如下所示,
Figure PCTCN2019130850-appb-000007
这里,正向LFNST变换和反向LFNST变换所使用的变换矩阵互为转置关系,图10为LFNST技术矩阵乘法的计算过程的结构示意图一,图11为LFNST技术矩阵乘法的计算过程的结构示意图二,参见图10和图11,其示出了本申请实施例提供的一种LFNST技术矩阵乘法的计算过程的结构示意图。如图10所示的正向LFNST变换的计算过程,由一次变换系数经过变换矩阵T之后,可以得到二次变换系数;图11示出了反向LFNST变换的计算过程,由反二次变换系数经过转置变换矩阵T T之后,可以得到反一次变换系数。
进一步地,在LFNST技术中,可以根据当前块的大小决定是采用4×4不可分变换还是8×8不可分变换;这里,可以将“4×4不可分变换”统称为“4×4LFNST”,“8×8不可分变换”统称为“8×8LFNST”。其中,假定当前块的宽度为nTbW,高度为nTbH,那么可以得出:如果min(nTbW,nTbH)<=4,那么可以对当前块使用4×4LFNST;否则,可以对当前块使用8×8LFNST。需要注意的是,min(A,B)的返回值是A和B中的较小值。
在一种实施方式中,针对4×4LFNST,在编码器侧,将会输入16个系数,经过正向LFNST后,会输出16个或8个系数;而在解码器侧,将会输入16个或8个系数,会输出16个系数;也就是说,编码器和解码器关于输入和输出的数量正好相反。
假定变换块(Transform unit,TU)的大小可以表示为nTbW×nTbH,其中,变换块是基于预测差值所得到的预测残差块。即TU可以等于4×4,也可以等于4×N或N×4(N>4)。下面分别对其进行详细描述。
图12为LFNST变换的结构框图一;图13为LFNST变换的结构框图二;图14为LFNST变换的结构框图三;图15为LFNST变换的结构框图四。当TU等于4×4时,4×4的变换块对应的正向LFNST过程如图12所示。其中,在图12中,白色块为预测差值,灰色块为一次变换系数,黑色块为二次变换系数;这里,在“0”示例的位置上,编码器将变换系数设置为0。对于4×4的变换块,正向LFNST时,使用的变换矩阵大小为8×16,当前变换块内的4×4个一次变换系数全部作为输入,输出为4×2个二次变换系数。
当TU等于4×N或N×4(N>4)时,4×N或N×4的变换块对应的正向LFNST过程如图13所示。其中,在图13中,白色块为预测差值,灰色块为一次变换系数,黑色块为二次变换系数;这里,对于4×N或N×4的变换块,正向LFNST时,使用的变换矩阵大小为16×16,当前变换块内的第一个4×4子块(具体地,对于4×N变换块为最上侧子块,对于N×4变换块为最左侧子块)内的一次变换系数作为输入,输出为4×4个二次变换系数。这里,在“0”示例的位置上,编码器将变换系数仍然设置为0。
在另一种实施方式中,对于8×8LFNST,在编码器侧,将会输入48个系数,经过正向LFNST后,会输出16个或8个系数;而在解码器侧,将会输入16个或8个系数,会输出48个系数;也就是说,编码器和解码器关于输入和输出的数量正好相反。
当TU等于8×8时,8×8的变换块对应的正向LFNST过程如图14所示。其中,在图14中,白色块为预测差值,灰色块为一次变换系数,黑色块为二次变换系数;对于8×8的变换块,正向LFNST时,使用的变换矩阵大小为8×48,当前变换块内的前三个4×4子块(即位于左上角的三个子块)的一次变换系数作为输入,输出为4×2个二次变换系数。这里,在“0”示例的位置上,编码器将变换系数仍然设置为0。
当TU大于8×8时,大于8×8的变换块对应的正向LFNST过程如图15所示。其中,在图15中,白色块为预测差值,灰色块为一次变换系数,黑色块为二次变换系数;对于大于8×8的变换块,正向LFNST时,使用的变换矩阵大小为48×16,当前变换块内的前三个4×4子块(即位于左上角的三个子块)的一次变换系数作为输入,输出为4×4个二次变换系数。这里,在“0”示例的位置上,编码器将变换系数仍然设置为0。
这样,预测差值所对应的TU无论是4×4大小,还是4×N或N×4(N>4)大小、或者8×8大小,甚至还可以大于8×8大小,这时候可以按照图12或者图13或者图14或者图15来实现对预测差值的变换处理。
由此可见,在本申请的实施例中,对于使用CCLM模式进行帧内预测的当前块,解码器通过在使用CCLM模式的当前块进行LFNST的过程中引入了CCLM参数的相关信息,并根据CCLM信息选择出扫描顺序。从而在对当前块进行变换处理时,不需要再将CCLM模式映射至传统帧内预测模式,进而可以提高LFNST技术对使用CCLM模式的当前块的适用性,使得扫描顺序的选取更加灵活。
本实施例提供了一种变换方法,应用于编码器,编码器确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,确定CCLM参数;根据CCLM参数,确定当前块的帧内预测值,计算当前块与帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当当前块使用LFNST时,根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。由此可见,在本申请的实施例中,编解码器在对使用CCLM模式进行帧内预测的当前块进行变换处理时,不需要将CCLM模式映射至传统能够帧内模式,而是可以直接根据当前块对应的CCLM参数,确定出当前块使用的LFNST系数扫描顺序,从而便可以利用LFNST系数扫描顺序进行LFNST变换。可以理解的是,正是由于在进行LFNST变换时引入了CCLM参数,使得LFNST系数扫描顺序的选择更加灵活,从而可以提高LFNST技术对CCLM模式的适用性,且减少了LFNST技术的变换过程,有效地提高了编码效率。
本申请的另一实施例提出了一种变换方法,应用于解码器,图16为变换方法的实现流程示意图三,如图16所示,解码器进行变换处理的方法可以包括以下步骤:
步骤301、解析码流,确定当前块的预测模式参数。
在本申请的实施中,解码器可以在接收到视频的码流之后,先解析码流,从而确定当前块对应的预测模式参数。
需要说明的是,在本申请的实施中,预测模式参数指示了当前块的编码模式及该模式相关的参数。其中,预测模式通常包括有传统帧内预测模式和非传统帧内预测模式,而传统帧内预测模式又可以包括有DC模式、PLANAR模式和角度模式等,非传统帧内预测模式又可以包括有MIP模式、CCLM模式、IBC模式和PLT模式等。
可以理解的是,在本申请的实施例中,在编码器侧,会针对当前块进行预测编码,在这过程中就可以确定出当前块的预测模式,并将相应的预测模式参数写入码流,由编码器传输到解码器。
相应地,在本申请中,在解码器侧,通过解析码流可以获取到当前块或者当前块所在编码块的亮度或色度分量的帧内预测模式,这时候可以确定出帧内预测模式指示符(可以用predModeIntra表示)的取值,计算公式如上述公式(5)。
在公式(5)中,图像分量指示符(可以用cIdx表示)用于指示当前块的亮度分量或色度分量;这里,如果当前块预测的为亮度分量,那么cIdx等于0;如果当前块预测的为色度分量,那么cIdx等于1。另外,(xTbY,yTbY)是当前块左上角采样点的坐标,IntraPredModeY[xTbY][yTbY]为亮度分量的帧内预测模式,IntraPredModeC[xTbY][yTbY]为色度分量的帧内预测模式。
也就是说,在本申请的实施例中,解码器可以通过预测模式参数来确定当前块的解码模式是传统帧内预测模式或非传统帧内预测模式的具体哪一种编码模式。
步骤302、当预测模式参数指示当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数。
在本申请的实施例中,解码器在确定当前块的预测模式参数之后,如果预测模式参数指示当前块使用CCLM模式确定帧内预测值,那么解码器可以继续确定CCLM参数。
需要说明的是,在本申请的实施例中,CCLM参数可以包括CCLM模式索引序号,其中,所述CCLM模式索引序号用于指示所述当前块使用的CCLM模式,所述CCLM模式用于指示使用CCLM确定所述当前块的帧内预测值的计算推导方式。
进一步地,在本申请的实施例中,解码器通过解析码流,可以确定CCLM参数,具体地,解码器通过解析码流确定CCLM模式索引序号(可以用modeId表示)。其中,CCLM模式索引序号可以用于指示当前块使用的CCLM模式,CCLM模式可以用于指示使用CCLM确定当前块的帧内预测值的计算推导方式。
可以理解的是,在本申请的实施例中,对于CCLM模式,具体可以包括多种不同的预测模式,因此,需要利用不同的索引序号对CCLM模式中的不同预测模式进行标定和区分。也就是说,不同的CCLM模式对应有不同的CCLM模式索引序号。
进一步地,在本申请的实施例中,解码器在根据使用CCLM参数确定当前块的帧内预测值的计算推导方式时,可以确定出具体的CCLM模式,从而就可以获得对应的CCLM模式索引序号。
需要说明的是,在本申请的实施例中,CCLM模式索引序号具体可以包括81,82,83。
步骤303、解析码流,确定当前块的变换系数和LFNST索引序号。
步骤304、当LFNST索引序号指示当前块使用LFNST时,对当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵。
在本申请的实施例中,解码器在确定出当前块对应的CCLM参数之后,可以继续解析码流,便可以进一步确定出当前块的变换系数和LFNST索引序号。
需要说明的是,在本申请的实施例中,LFNST索引序号的取值可以用于指示当前块是否使用LFNST、且LFNST变换核在LFNST变换核候选集中的索引序号。具体地,在解析出LFNST索引序号之后,当LFNST索引序号的取值等于0时,表明了当前块不使用LFNST;而当LFNST索引序号的取值大于0时,表明了当前块使用LFNST,且变换核的索引序号等于LFNST索引序号的取值,或者,变换核的索引序号等于LFNST索引序号的取值减1。
进一步地,在本申请的实施例中,在解码器侧,LFNST的输入数据可以包括:当前变换块的亮度位置(xTbY,yTbY),当前块的宽度nTbW,当前块的高度nTbH,当前块是亮度分量还是色度分量cIdx,当前变换块反量化(Scaling)后的系数d[x][y],x=0,1,…,nTbW-1,y=0,1,…,nTbH-1;相应地,LFNST的输出数据可以包括:二次变换系数经过LFNST生成的一次变换系数d’[x][y],x=0,1,…,nLfnstSize-1,y=0,1,…,nLfnstSize-1。
可以理解的是,在本申请的实施例中,图17为LFNST变换处理流程示意图,如图17所示,LFNST变换的具体过程可以分为五个步骤,具体包括配置核心参数81、帧内预测模式映射82、选择变换矩阵83、计算矩阵乘法84和构造一次变换系数矩阵85。其中,对于帧内预测模式映射82来说,该步骤用于确定predModeIntra的取值,主要可以包括:非传统帧内预测模式映射821和宽角度映射822;对于选择变换矩阵83来说,该步骤用于选择出变换集以及变换矩阵,主要可以包括:选择变换集831、选择变换矩阵组别832和选择变换矩阵尺寸833。
对于配置核心参数81来说,首先需要配置进行LFNST计算的输入二次变换系数向量的长度(可以用nonZeroSize表示)和输出一次变换系数向量的长度(可以用nLfnstOutSzie表示)。其中,针对nonZeroSize和nLfnstOutSzie的取值如表1所示。
表1
变换块尺寸 nonZeroSize nLfnstOutSzie
4×4 8 16
4×N或N×4(N>4) 16 16
8×8 8 48
>8×8 16 48
在目前H.266/VVC中,则是通过以下公式计算得到nonZeroSize和nLfnstOutSzie等参数配置的,公式如下,
nLfnstOutSize=(nTbW>=8&&nTbH>=8)?48:16         (10)
nonZeroSize=(nTbW==4&&nTbH==4)||(nTbW==8&&nTbH==8)?8:16      (11)
除此之外,解码器还需要配置参数nLfnstSize,表示当前块内仅前nLfnstSize×nLfnstSize范围内会存在有一次变换系数,nLfnstSize的取值如下所示,
Log2LfnstSize=(nTbW>=8&&nTbH>=8)?3:2       (12)
nLfnstSize=1<<Log2LfnstSize         (13)
这时候通过解析码流,还可以获取到当前块或者当前块所在编码块的亮度或色度分量的帧内预测模式,这时候可以确定出帧内预测模式指示符(可以用predModeIntra表示)的取值,计算公式如前述式(5)。
进一步地,获取二次变化系数的向量u[i],i=0,1,…,nonZeroSize-1。在确定当前变换块使用了LFNST时,此时的反量化后的系数d[x][y]即为二次变换系数。按照对角扫描顺序获取其前nonZeroSize个值,即为二次变化系数的向量u[i],i=0,1,…,nonZeroSize-1;在下式中,xC和yC表示为按照对角顺序,编号为x的系数所在当前块内相对于左上角点的横坐标和纵坐标),xC和yC如下所示,
xC=DiagScanOrder[2][2][x][0]      (14)
yC=DiagScanOrder[2][2][x][1]       (15)
u[i]=d[xC][yC]       (16)
进一步地,对于帧内预测模式映射82来说,帧内预测模式又可以划分为传统帧内预测模式和非传统帧内预测模式。对于非传统帧内预测模式来说,predModeIntra取值指示的信息如下:
若predModeIntra的取值可以为INTRA_LT_CCLM、INTRA_L_CCLM或INTRA_T_CCLM(在VVC中分别为81,82,83),则指示当前块的预测模式为CCLM模式;
若intra_mip_flag[xTbY][yTbY]等于1而且cIdx等于0,则指示当前块的预测模式为MIP模式,此时predModeIntra的取值指示了所使用的MIP模式索引序号modeId;
若不是上述的两种情况,predModeIntra的取值可以在[0,66],则指示当前块的预测模式为传统帧内预测模式。
进一步地,通过解析码流根据传统帧内预测模式的编号来确定LFNST变换核候选集索引序号。这时候,如果当前块的预测模式为CCLM模式和MIP模式,那么还可以使用如下方式设置predModeIntra的取值:
(1)当predModeIntra的取值指示INTRA_LT_CCLM、INTRA_L_CCLM或INTRA_T_CCLM(在VVC中分别为81,82,83)时,
若当前块(比如色度块)对应亮度位置的中心亮度块的模式为MIP模式,即intra_mip_flag[xTbY+ nTbW/2][yTbY+nTbH/2]为1,则将predMode Intra的取值设置为指示PLANAR模式的索引序号(即0);
否则,若当前块(比如色度块)对应亮度位置的中心亮度块的模式为IBC模式或者PLT模式,则将predModeIntra的取值设置为指示DC模式的索引序号(即1);
否则,将predModeIntra的取值设置为当前块(比如色度块)对应亮度位置的中心亮度块的模式索引序号的取值IntraPredModeY[xTbY+nTbW/2][yTbY+nTbH/2];
(2)当intra_mip_flag[xTbY][yTbY]等于1而且cIdx等于0时,即当前块的预测模式为MIP模式,可以直接将predModeIntra的取值设置为指示PLANAR模式的索引序号(即0)。
对于传统帧内预测模式(比如宽角度映射)来说,在解析码流的过程中,还可以根据当前块的尺寸进行宽角度的映射,将传统帧内预测模式[0,66]扩展到[-14,80];具体的映射过程如下:
首先计算宽高比例因子(可以用whRatio表示),如上述的式(6)所示。
对于非正方形的当前块(即nTbW不等于nTbH),这时候可以对predModeIntra的取值进行如下修正,如果nTbW大于nTbH、且predModeIntra大于或等于2、且predModeIntra小于((whRatio>1?(8+2×whRatio):8),那么predModeIntra=(predModeIntra+65);否则,如果nTbW小于nTbH、且predModeIntra小于或等于66、且predModeIntra大于((whRatio>1?(60-2×whRatio):60),那么predModeIntra=(predModeIntra-67)。
在目前H.266/VVC中,根据predModeIntra的取值以及表2,可以确定出LFNST索引序号(可以用SetIdx表示)的取值,具体取值如表2所示。这里,LFNST索引序号的取值设置为指示当前块使用LFNST、且LFNST变换核在LFNST变换核候选集中的索引序号。通常来说,LFNST变换集中包括有四个变换核候选集(set0,set1,set2,set3),分别对应于SetIdx的取值为0、1、2、3。
表2
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
由于LFNST的变换矩阵是通过训练得到的多个固定系数矩阵,LFNST变换核候选集包括有2组变换矩阵(也可以称之为LFNST变换核),如此,在确定出LFNST变换核候选集之后,需要从LFNST变换核候选集中选取一组LFNST变换核,即确定当前块LFNST时所使用的变换矩阵。
还需要说明的是,由于在编码器侧,可以通过RDCost选择出一组LFNST变换核,并将LFNST变换核对应的索引序号(可以用lfnst_idx表示)写入视频码流,传输到解码器侧。从而在解码器侧,通过解析码流,可以获取到lfnst_idx的取值;然后根据lfnst_idx的取值,可以从LFNST变换核候选集中选择出lfnst_idx所指示的变换矩阵(变换核)。例如,当lfnst_idx的取值等于1时,将选择LFNST变换核候选集中的第一组LFNST变换核(即第一组变换矩阵);当lfnst_idx的取值等于2时,将选择LFNST变换核候选集中的第二组LFNST变换核(即第二组变换矩阵)。
进一步地,针对每一组变换矩阵(变换核),包含有两种尺寸的基础变换矩阵,在解码器侧所使用的基础变换矩阵大小为16×16和48×16。根据nLfnstOutSize进行选择,若nLfnstOutSize为16,则选择16x16的基础变换矩阵;或者,若nLfnstOutSize为48,则选择48x16的基础变换矩阵;或者,若nonZeroSize为8,则变换矩阵中仅前8行用于矩阵乘法计算。
进一步地,将二次变换系数向量u[i]作为输入,使用变换矩阵与之相乘得到一次变换系数向量v[j],这里,i=0,1,…,nonZeroSize-1,j=0,1,…,nLfnstOutSize-1。假定前面步骤获取到的变换矩阵为lowFreqTransMatrix,那么v[j]的具体计算过程如下所示,
Figure PCTCN2019130850-appb-000008
这里,Clip3为嵌位工作,可以将系数的值限制在下面的两个数之间,如下所示,
CoeffMin=-(1<<15)          (18)
CoeffMax=(1<<15)-1            (19)
如此,经过上述矩阵计算之后,可以实现对变换系数的变换处理。这里,对于4×4LFNST,在解码器侧,将会输入16个或8个系数,会输出16个系数;而对于8×8LFNST,在解码器侧,将会输入16个或8个系数,会输出48个系数,以实现对变换系数的LFNST变换处理,可以得到LFNST输出系数矩阵。
步骤305、根据CCLM参数,确定当前块使用的LFNST系数扫描顺序。
在本申请的实施例中,解码器可以根据所述CCLM参数,进一步确定所述当前块使用的LFNST变换核。
可以理解的是,在本申请的实施例中,CCLM参数可以包括CCLM模式索引序号,其中,所述CCLM模式索引序号用于指示所述当前块使用的CCLM模式,所述CCLM模式用于指示使用CCLM确定所述当前块的帧内预测值的计算推导方式。
示例性的,在本申请的实施例中,当所述当前块使用LFNST时,图18为变换方法的实现流程示意图四,如图18所示,当CCLM参数为CCLM模式索引序号时,解码器根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序的方法可以包括以下步骤:
步骤401、根据MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值。
步骤402、将LFNST系数扫描顺序设置为等于预设的LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描 顺序。
需要说明的是,在本申请的实施例中,CCLM模式索引序号用于指示所述当前块使用的CCLM模式,所述CCLM模式用于指示使用CCLM确定所述当前块的帧内预测值的计算推导方式。也就是说,解码器可以根据CCLM模式索引序号,进一步确定出LFNST变换核。
进一步地,在本申请的实施例中,解码器在确定出CCLM模式索引序号之后,还可以将CCLM模式索引序号转换为LFNST帧内预测模式索引序号(可以用predModeIntra表示)的取值;然后再根据predModeIntra的取值,确定出LFNST系数扫描顺序,比如水平扫描顺序或者垂直扫描顺序。
需要说明的是,在本申请的实施例中,解码器在确定当前块使用的LFNST系数扫描顺序时,对于LFNST帧内预测模式索引序号的取值,可以通过查表的方式获得。
示例性的,在本申请的实施例中,解码器在根据所述CCLM模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值时,具体可以使用第一查找表确定所述CCLM模式索引序号的取值对应的所述LFNST帧内预测模式索引序号的取值,其中,所述第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的CCLM模式索引序号。
需要说明的是,在本申请的实施例中,第一查找表(Look-Up Table1,LUT1)用于反映CCLM模式索引序号和LFNST帧内预测模式索引序号之间的对应关系,即在第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的CCLM模式索引序号。
也就是说,在本申请中,不同的CCLM模式可以对应不同的predModeIntra的取值;因此,解码器在根据CCLM模式确定出CCLM模式索引序号,然后根据第一查找表确定出predModeIntra的取值;再根据predModeIntra的取值,确定出当前块使用的LFNST系数扫描顺序。
由此可见,在本申请中,对于CCLM模式,解码器不再需要通过将CCLM模式映射到传统帧内预测模式来进行变换核候选集的选择,而是可以直接基于CCLM模式对应的CCLM模式索引序号,通过第一查找表的查询,获得相应地LFNST帧内预测模式索引序号,最终实现LFNST系数扫描顺序的确定。
在本申请的实施例中,进一步地,解码器还可以根据CCLM模式索引序号的取值直接确定LFNST系数扫描顺序,这时候不再需要借助predModeIntra的取值,即不再需要根据CCLM模式索引序号来确定LFNST帧内预测模式索引序号的取值。
在本申请的实施例中,进一步地,当所述当前块使用LFNST时,解码器在根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序时,具体可以将所述LFNST系数扫描顺序设置为等于预设的所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序。
示例性的,在本申请的实施例中,解码器在将所述LFNST系数扫描顺序设置为等于预设的所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序时,具体可以使用第二查找表确定所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序;其中,所述第二查找表中,至少包含不同的所述LFNST系数扫描顺序各自对应的一个或多个不同的CCLM模式索引序号。
示例性的,在本申请的实施例中,解码器在使用第二查找表确定所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序时,如果所述MIP模式索引序号的取值在预设的一个或多个整数范围内,可以将所述LFNST系数扫描顺序设置为水平扫描顺序;如果MIP模式索引序号的取值不在预设的一个或多个整数范围内时,可以将所述LFNST系数扫描顺序设置为垂直扫描顺序。
由此可见,在本申请中,对于CCLM模式,解码器不再需要通过将CCLM模式映射到传统帧内预测模式来进行变换核候选集的选择,而是可以直接基于CCLM模式对应的CCLM模式索引序号,通过第二查找表的查询,获得相应地LFNST帧内预测模式索引序号,最终实现LFNST系数扫描顺序的确定。
需要说明的是,在本申请的实施例中,如果当前块使用的预测模式为CCLM模式,当CCLM参数为CCLM模式索引序号时,解码器可以根据CCLM模式索引序号(modeId)的取值来确定所选择的LFNST系数扫描顺序。
可以理解的是,在本申请中,CCLM模式索引序号的取值可以包括有81、82、83。
示例性的,在本申请中,当CCLM模式索引序号的取值为81或82时,可以将LFNST系数扫描顺序设置为水平扫描顺序;当CCLM模式索引序号的取值为83时,可以将LFNST系数扫描顺序设置为垂直扫描顺序,本申请实施例不作具体限定。
需要说明的是,在本申请的实施例中,如果当前块使用的预测模式为CCLM模式,当CCLM参数为CCLM模式索引序号时,解码器可以根据预设整数范围来确定所选择的LFNST系数扫描顺序。
示例性的,在本申请中,当CCLM模式索引序号的取值满足预设整数范围时,比如CCLM模式索引序号的取值为81或82时,可以将LFNST系数扫描顺序设置为水平扫描顺序;当CCLM模式索引序号的取值不满足预设整数范围时,比如CCLM模式索引序号的取值为83时,可以将LFNST系数扫描顺序设置为垂直扫描顺序等,本申请实施例也不作具体限定。
除此之外,如果当前块的预测模式为CCLM模式,可以根据CCLM参数中的一种或多种信息组合,来选择LFNST系数扫描顺序。
进一步地,在本申请的实施例中,如果当前块的预测模式为CCLM模式,解码器还可以根据CCLM参数进行与传统帧内预测模式之间的映射,将其映射为某一种传统帧内预测模式,然后根据所映射的角度,来选择LFNST系数扫描顺序。
进一步地,在本申请的实施例中,当预测模式参数指示当前块使用非CCLM模式时,解码器在进行LFNST系数扫描顺序的选择时,可以先基于所述帧内预测模式,确定predModeIntra的取值;如果predModeIntra的取值小于或等于34,则将当前块使用的LFNST系数扫描顺序设置为水平扫描顺序;如果predModeIntra的取值大于34,则将当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序。
也就是说,在本申请中,如果当前块的预测模式为非CCLM模式,这时候可以根据帧内预测模式,确定出 predModeIntra的取值;然后根据predModeIntra的取值来确定当前块使用的LFNST系数扫描顺序。
还需要说明的是,当所述当前块使用LFNST时,编码器还可以将LFNST索引序号的取值设置为指示使用LFNST所对应的取值,并将所述LFNST索引序号的取值写入视频码流。
可以理解的是,在本申请中,在编码器侧,如果当前块使用LFNST,那么这时候可以将LFNST索引序号的取值设置为指示使用LFNST所对应的取值,并且将LFNST索引序号的取值写入视频码流;如此,在解码器侧,通过解析码流可以得到LFNST索引序号的取值,便于解码器侧能够确定出当前块使用LFNST。
步骤306、根据LFNST系数扫描顺序,使用LFNST输出系数矩阵构造第一系数矩阵。
在本申请的实施例中,解码器在确定出LFNST系数扫描顺序之后,可以进一步根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵。
需要说明的是,LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。另外,在确定出LFNST系数扫描顺序之后,可以使用LFNST输出系数矩阵构造出第一系数矩阵;这里,第一系数矩阵可以为二维一次变换系数矩阵。
进一步地,在本申请的实施例中,解码器在根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵之后,即步骤306之后,解码器还可以先根据所述CCLM参数,构造所述当前块的帧内预测值;然后对所述第一系数矩阵进行不同于LFNST的变换处理,得到所述当前块的预测差值;最后便可以计算所述帧内预测值和所述预测差值的和值,将所述和值作为所述当前块的重建值。
也就是说,在本申请的实施例中,解码器在构造出第一系数矩阵之后,可以对第一系数矩阵进行第一次变换,以得到当前块的预测差值;这里,第一次变换为不同于LFNST的变换处理。另外,通过解析码流确定出当前块的预测模式参数之后,如果预测模式为CCLM模式,还可以根据CCLM模式对当前块进行预测处理,以得到当前块的帧内预测值;进而根据帧内预测值和预测差值进行求和处理,然后将所得到的和值作为当前块的重建值,也就实现了对当前块的编解码处理,并且能够恢复出当前块的原始值。
由此可见,在本申请的实施例中,对于使用CCLM模式进行帧内预测的当前块,解码器通过在使用CCLM模式的当前块进行LFNST的过程中引入了CCLM参数的相关信息,并根据CCLM信息选择出扫描顺序。从而在对当前块进行变换处理时,不需要再将CCLM模式映射至传统帧内预测模式,进而可以提高LFNST技术对使用CCLM模式的当前块的适用性,使得扫描顺序的选取更加灵活。
本实施例提供了一种变换方法,应用于解码器,解码器解析码流,确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;解析码流,确定当前块的变换系数和LFNST帧内预测模式索引序号;当LFNST帧内预测模式索引序号指示当前块使用LFNST时,对当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用LFNST输出系数矩阵构造第一系数矩阵;其中,LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。由此可见,在本申请的实施例中,编解码器在对使用CCLM模式进行帧内预测的当前块进行变换处理时,不需要将CCLM模式映射至传统能够帧内模式,而是可以直接根据当前块对应的CCLM参数,确定出当前块使用的LFNST系数扫描顺序,从而便可以利用LFNST系数扫描顺序进行LFNST变换。可以理解的是,正是由于在进行LFNST变换时引入了CCLM参数,使得LFNST系数扫描顺序的选择更加灵活,从而可以提高LFNST技术对CCLM模式的适用性,且减少了LFNST技术的变换过程,有效地提高了编码效率。
基于上述实施例,在本申请的再一实施例中,图19为编码器的组成结构示意图一,如图19所示,本申请实施例提出的编码器300可以包括第一确定部分301,计算部分302,第一变换部分303,第一构造部分304。
所述第一确定部分301,配置为确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,确定CCLM参数;以及根据所述CCLM参数,确定所述当前块的帧内预测值;
所述计算部分302,配置为根据所述CCLM参数,计算所述当前块与所述帧内预测值之间的预测差值;
所述第一变换部分303,配置为对所述预测差值进行第一次变换,得到第一系数矩阵;
所述第一确定部分301,还配置为当所述当前块使用LFNST时,根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
所述第一构造部分304,配置为根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
所述第一变换部分303,还配置为对所述输入系数矩阵进行LFNST处理,得到所述当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
图20为编码器的组成结构示意图二,如图20所示,本申请实施例提出的编码器300还可以包括第一处理器305、存储有第一处理器305可执行指令的第一存储器306、第一通信接口307,和用于连接第一处理器305、第一存储器306以及第一通信接口307的第一总线308。
进一步地,在本申请的实施例中,上述第一处理器305,用于确定当前块的预测模式参数;当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,确定CCLM参数;根据所述CCLM参数,确定所述当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;对所述预测差值进行第一次变换,得到第一系数矩阵;当所述当前块使用LFNST时,根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序;根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;对所述输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例方法的全部或部分步骤。而前 述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例提供了一种编码器,该编码器确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,确定CCLM参数;根据CCLM参数,确定当前块的帧内预测值,计算当前块与帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当当前块使用LFNST时,根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。由此可见,在本申请的实施例中,编解码器在对使用CCLM模式进行帧内预测的当前块进行变换处理时,不需要将CCLM模式映射至传统能够帧内模式,而是可以直接根据当前块对应的CCLM参数,确定出当前块使用的LFNST系数扫描顺序,从而便可以利用LFNST系数扫描顺序进行LFNST变换。可以理解的是,正是由于在进行LFNST变换时引入了CCLM参数,使得LFNST系数扫描顺序的选择更加灵活,从而可以提高LFNST技术对CCLM模式的适用性,且减少了LFNST技术的变换过程,有效地提高了编码效率。
图21为解码器的组成结构示意图一,如图21所示,本申请实施例提出的解码器400可以包括解析部分401,第二变换部分402,第二确定部分403,第二构造部分404。
所述解析部分401,配置为解析码流,确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;以及解析码流,确定所述当前块的变换系数矩阵和LFNST帧内预测模式索引序号;
所述第二变换部分402,配置为当所述LFNST帧内预测模式索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
所述第二确定部分403,配置为根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
所述第二构造部分404,配置为根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
图22为解码器的组成结构示意图二,如图22所示,本申请实施例提出的解码器400还可以包括第二处理器405、存储有第二处理器405可执行指令的第二存储器406、第二通信接口407,和用于连接第二处理器405、第二存储器406以及第二通信接口407的第二总线408。
进一步地,在本申请的实施例中,上述第二处理器405,用于解析码流,确定当前块的预测模式参数;当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;解析码流,确定所述当前块的变换系数和LFNST帧内预测模式索引序号;当所述LFNST帧内预测模式索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序;根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例提供了一种解码器,该解码器解析码流,确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;解析码流,确定当前块的变换系数和LFNST帧内预测模式索引序号;当LFNST帧内预测模式索引序号指示当前块使用LFNST时,对当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用LFNST输出系数矩阵构造第一系数矩阵;其中,LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。由此可见,在本申请的实施例中,编解码器在对使用CCLM模式进行帧内预测的当前块进行变换处理时,不需要将CCLM模式映射至传统能够帧内模式,而是可以直接根据当前块对应的CCLM参数,确定出当前块使用的LFNST系数扫描顺序,从而便可以利用LFNST系数扫描顺序进行LFNST变换。可以理解的是,正是由于在进行LFNST变换时引入了CCLM参数,使得LFNST系数扫描顺序的选择更加灵活,从而可以提高LFNST技术对CCLM模式的适用性,且减少了LFNST技术的变换过程,有效地提高了编码效率。
本申请实施例提供计算机可读存储介质和计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现如上述实施例所述的方法。
具体来讲,本实施例中的一种变换方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种变换方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
确定当前块的预测模式参数;
当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,确定CCLM参数;
根据所述CCLM参数,确定所述当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;
对所述预测差值进行第一次变换,得到第一系数矩阵;
当所述当前块使用LFNST时,根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序;
根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
对所述输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
具体来讲,本实施例中的一种变换方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种变换方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
解析码流,确定当前块的预测模式参数;
当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;
解析码流,确定所述当前块的变换系数和LFNST帧内预测模式索引序号;
当所述LFNST帧内预测模式索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序;
根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的实现流程示意图和/或方框图来描述的。应理解可由计算机程序指令实现流程示意图和/或方框图中的每一流程和/或方框、以及实现流程示意图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。
工业实用性
本申请实施例提供了一种变换方法、编码器、解码器以及存储介质,编码器确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,确定CCLM参数;根据CCLM参数,确定当前块的帧内预测值,计算当前块与帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当当前块使用LFNST时,根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。解码器解析码流,确定当前块的预测模式参数;当预测模式参数指示当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;解析码流,确定当前块的变换系数和LFNST帧内预测模式索引序号;当LFNST帧内预测模式索引序号指示当前块使用LFNST时,对当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;根据CCLM参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用LFNST输出系数矩阵构造第一系数矩阵;其中,LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。由此可见,在本申请的实施例中,编解码器在对使用CCLM模式进行帧内预测的当前块进行变换处理时,不需要将CCLM模式映射至传统能够帧内模式,而是可以直接根据当前块对应的CCLM参数,确定出当前块使用的LFNST系数扫描顺序,从而便可以利用LFNST系数扫描顺序进行LFNST变换。可以理解的是,正是由于在进行LFNST变换时引入了CCLM参数,使得LFNST系数扫描顺序的选择更加灵活,从而可以提高LFNST技术对CCLM模式的适用性,且减少了LFNST技术的变换过程,有效地提高了编码效率。

Claims (20)

  1. 一种变换方法,应用于编码器,所述方法包括:
    确定当前块的预测模式参数;
    当所述预测模式参数指示所述当前块使用分量间CCLM确定帧内预测值时,确定CCLM参数;
    根据所述CCLM参数,确定所述当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;
    对所述预测差值进行第一次变换,得到第一系数矩阵;
    当所述当前块使用低频不可分离二次变换LFNST时,根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序;
    根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
    对所述输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
  2. 根据权利要求1所述的方法,其中,所述CCLM参数包括CCLM模式索引序号,其中,所述CCLM模式索引序号用于指示所述当前块使用的CCLM模式,所述CCLM模式用于指示使用CCLM确定所述当前块的帧内预测值的计算推导方式。
  3. 根据权利要求2所述方法,其中,所述根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序,包括:
    根据所述CCLM模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值;
    将所述LFNST系数扫描顺序设置为等于预设的所述LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描顺序。
  4. 根据权利要求3所述方法,其中,所述根据所述CCLM模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值,包括:
    使用第一查找表确定所述CCLM模式索引序号的取值对应的所述LFNST帧内预测模式索引序号的取值,其中,所述第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的CCLM模式索引序号。
  5. 根据权利要求2所述方法,其中,所述根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序,包括:
    将所述LFNST系数扫描顺序设置为等于预设的所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序。
  6. 根据权利要求5所述方法,其中,所述方法还包括:
    使用第二查找表确定所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序;
    其中,所述第二查找表中,不同的所述LFNST系数扫描顺序各自对应的一个或多个不同的CCLM模式索引序号。
  7. 根据权利要求5所述方法,其中,所述方法还包括:
    当所述CCLM模式索引序号的取值在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为水平扫描顺序;
    当所述CCLM模式索引序号的取值不在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为垂直扫描顺序。
  8. 根据权利要求1至7任一项所述的方法,其中,所述根据所述CCLM模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值之后,所述方法还包括:
    将LFNST索引序号的取值设置为指示使用LFNST所对应的取值,并将所述LFNST索引序号的取值写入视频码流。
  9. 一种变换方法,应用于解码器,所述方法包括:
    解析码流,确定当前块的预测模式参数;
    当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;
    解析码流,确定所述当前块的变换系数和LFNST帧内预测模式索引序号;
    当所述LFNST帧内预测模式索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
    根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序;
    根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
  10. 根据权利要求9所述的方法,其中,所述CCLM参数包括CCLM模式索引序号,其中,所述CCLM模式索引序号用于指示所述当前块使用的CCLM模式,所述CCLM模式用于指示使用CCLM确定所述当前块的帧内预测值的计算推导方式。
  11. 根据权利要求10所述方法,其中,所述根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序,包括:
    根据所述CCLM模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值;
    将所述LFNST系数扫描顺序设置为等于预设的所述LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描顺序。
  12. 根据权利要求11所述方法,其中,所述根据所述CCLM模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值,包括:
    使用第一查找表确定所述CCLM模式索引序号的取值对应的所述LFNST帧内预测模式索引序号的取值,其中,所 述第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的CCLM模式索引序号。
  13. 根据权利要求10所述方法,其中,所述根据所述CCLM参数,确定所述当前块使用的LFNST系数扫描顺序,包括:
    将所述LFNST系数扫描顺序设置为等于预设的所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序。
  14. 根据权利要求13所述方法,其中,所述方法还包括:
    使用第二查找表确定所述CCLM模式索引序号的取值对应的LFNST系数扫描顺序;
    其中,所述第二查找表中,不同的所述LFNST系数扫描顺序各自对应的一个或多个不同的CCLM模式索引序号。
  15. 根据权利要求13所述方法,其中,所述方法还包括:
    当所述CCLM模式索引序号的取值在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为水平扫描顺序;
    当所述CCLM模式索引序号的取值不在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为垂直扫描顺序。
  16. 一种编码器,所述编码器包括:第一确定部分,计算部分,第一变换部分,第一构造部分,
    所述第一确定部分,配置为确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,确定CCLM参数;以及根据所述CCLM参数,确定所述当前块的帧内预测值;
    所述计算部分,配置为根据所述CCLM参数,计算所述当前块与所述帧内预测值之间的预测差值;
    所述第一变换部分,配置为对所述预测差值进行第一次变换,得到第一系数矩阵;
    所述第一确定部分,还配置为当所述当前块使用LFNST时,根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
    所述第一构造部分,配置为根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
    所述第一变换部分,还配置为对所述输入系数矩阵进行LFNST处理,得到所述当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
  17. 一种编码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器,当所述指令被执行时,所述第一处理器执行时实现如权利要求1-8任一项所述的方法。
  18. 一种解码器,所述解码器包括:解析部分,第二变换部分,第二确定部分,第二构造部分,
    所述解析部分,配置为解析码流,确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用CCLM确定帧内预测值时,解析码流,确定CCLM参数;以及解析码流,确定所述当前块的变换系数矩阵和LFNST帧内预测模式索引序号;
    所述第二变换部分,配置为当所述LFNST帧内预测模式索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
    所述第二确定部分,配置为根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
    所述第二构造部分,配置为根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
  19. 一种解码器,所述解码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器,当所述指令被执行时,所述第二处理器执行时实现如权利要求9-15任一项所述的方法。
  20. 一种计算机存储介质,其中,所述计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如权利要求1-8任一项所述的方法,或者,被第二处理器执行时实现如权利要求9-15任一项所述的方法。
PCT/CN2019/130850 2019-12-31 2019-12-31 变换方法、编码器、解码器以及存储介质 WO2021134637A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2019/130850 WO2021134637A1 (zh) 2019-12-31 2019-12-31 变换方法、编码器、解码器以及存储介质
EP19958506.8A EP4087246A4 (en) 2019-12-31 2019-12-31 TRANSFORM PROCESS, ENCODER, DECODER, AND STORAGE MEDIA
CN201980103052.2A CN114830658A (zh) 2019-12-31 2019-12-31 变换方法、编码器、解码器以及存储介质
US17/807,671 US20220329861A1 (en) 2019-12-31 2022-06-17 Transform method, encoder, decoder, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/130850 WO2021134637A1 (zh) 2019-12-31 2019-12-31 变换方法、编码器、解码器以及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/807,671 Continuation US20220329861A1 (en) 2019-12-31 2022-06-17 Transform method, encoder, decoder, and storage medium

Publications (1)

Publication Number Publication Date
WO2021134637A1 true WO2021134637A1 (zh) 2021-07-08

Family

ID=76686131

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/130850 WO2021134637A1 (zh) 2019-12-31 2019-12-31 变换方法、编码器、解码器以及存储介质

Country Status (4)

Country Link
US (1) US20220329861A1 (zh)
EP (1) EP4087246A4 (zh)
CN (1) CN114830658A (zh)
WO (1) WO2021134637A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108141597A (zh) * 2015-09-29 2018-06-08 高通股份有限公司 用于具有重组的视频译码的非可分离二次变换
CN109076222A (zh) * 2016-05-13 2018-12-21 索尼公司 图像处理装置和方法
US20190306526A1 (en) * 2018-04-03 2019-10-03 Electronics And Telecommunications Research Institute Inter-prediction method and apparatus using reference frame generated based on deep learning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021086061A1 (ko) * 2019-10-29 2021-05-06 엘지전자 주식회사 변환에 기반한 영상 코딩 방법 및 그 장치

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108141597A (zh) * 2015-09-29 2018-06-08 高通股份有限公司 用于具有重组的视频译码的非可分离二次变换
CN109076222A (zh) * 2016-05-13 2018-12-21 索尼公司 图像处理装置和方法
US20190306526A1 (en) * 2018-04-03 2019-10-03 Electronics And Telecommunications Research Institute Inter-prediction method and apparatus using reference frame generated based on deep learning

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MOONMO KOO , JAEHYUN LIM , MEHDI SALEHIFAR , SEUNG HWAN KIM: "CE6: Reduced Secondary Transform (RST) (CE6-3.1)", 14. JVET MEETING; 20190319 - 20190327; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-N0193, 12 March 2019 (2019-03-12), Geneva, pages 1 - 16, XP030202676 *
See also references of EP4087246A4 *
Z. ZHANG (ERICSSON), R. SJÖBERG, R. YU (ERICSSON): "Non-CE6: On LFNST transform set selection for a CCLM coded block", 15. JVET MEETING; 20190703 - 20190712; GOTHENBURG; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 24 June 2019 (2019-06-24), Gothenburg, pages 1 - 4, XP030218887 *

Also Published As

Publication number Publication date
EP4087246A4 (en) 2023-02-08
CN114830658A (zh) 2022-07-29
US20220329861A1 (en) 2022-10-13
EP4087246A1 (en) 2022-11-09

Similar Documents

Publication Publication Date Title
US10412393B2 (en) Intra-frame encoding method, intra-frame decoding method, encoder, and decoder
US10869035B2 (en) Encoding and decoding methods and apparatuses with multiple image block division manners
JP7277616B2 (ja) ビデオ・データを処理する方法、装置及び記憶媒体
WO2021004152A1 (zh) 图像分量的预测方法、编码器、解码器以及存储介质
US20220329786A1 (en) Transform method and decoder
WO2021004155A1 (zh) 图像分量预测方法、编码器、解码器以及存储介质
WO2021139572A1 (zh) 编码方法、解码方法、编码器、解码器以及存储介质
US20230262212A1 (en) Picture prediction method, encoder, decoder, and computer storage medium
CN112771865A (zh) 使用参数化模型对量化矩阵进行编解码
CA3222255A1 (en) Decoding prediction method and apparatus, and computer storage medium
US20220329862A1 (en) Transformation method, encoder, decoder, and storage medium
WO2021196231A1 (zh) 变换方法、编码器、解码器以及存储介质
US20220329809A1 (en) Transform method, encoder, decoder, and storage medium
JP2021515494A (ja) 適応乗算係数を用いた画像フィルタリングのための方法および装置
AU2019357929A1 (en) Video image component prediction method and apparatus, and computer storage medium
WO2021134637A1 (zh) 变换方法、编码器、解码器以及存储介质
CN113395520B (zh) 解码预测方法、装置及计算机存储介质
WO2023197195A1 (zh) 视频编解码方法、编码器、解码器及存储介质
WO2024007116A1 (zh) 解码方法、编码方法、解码器以及编码器
CN113302934B (zh) 图像预测方法、编码器、解码器以及存储介质
WO2023197189A1 (zh) 编解码方法、装置、编码设备、解码设备以及存储介质
WO2024007120A1 (zh) 编解码方法、编码器、解码器以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19958506

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019958506

Country of ref document: EP

Effective date: 20220801