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

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

Info

Publication number
WO2021134303A1
WO2021134303A1 PCT/CN2019/130127 CN2019130127W WO2021134303A1 WO 2021134303 A1 WO2021134303 A1 WO 2021134303A1 CN 2019130127 W CN2019130127 W CN 2019130127W WO 2021134303 A1 WO2021134303 A1 WO 2021134303A1
Authority
WO
WIPO (PCT)
Prior art keywords
lfnst
mip
scanning order
current block
value
Prior art date
Application number
PCT/CN2019/130127
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 CN201980103082.3A priority Critical patent/CN114830659A/zh
Priority to EP19958126.5A priority patent/EP4109898A4/en
Priority to PCT/CN2019/130127 priority patent/WO2021134303A1/zh
Publication of WO2021134303A1 publication Critical patent/WO2021134303A1/zh
Priority to US17/807,639 priority patent/US20220329809A1/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/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/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
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • 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/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks

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
  • the simplified secondary transform (Reduced Second Transform, RST) technology has been accepted, and the name has been changed to Low-Frequency Non-Separable Transform (LFNST) technology. Since the selection of the scan order in the LFNST technology is based on the intra-frame prediction mode, but for the non-traditional intra-frame prediction mode, the lack of variability when performing LFNST transformation reduces the coding efficiency.
  • RST Reduced Second Transform
  • LFNST Low-Frequency Non-Separable Transform
  • the embodiments of the present application provide a transformation method, an encoder, a decoder, and a storage medium, which can improve the applicability of the LFNST technology to non-traditional intra prediction modes, make the selection of the scanning order more flexible, and thus can improve coding efficiency.
  • an embodiment of the present application provides a transformation method, which is applied to an encoder, and the method includes:
  • 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 embodiments of the present application provide an inverse transform method, which is applied to a decoder, and the method includes:
  • the prediction mode parameter indicates that the current block uses MIP to determine the intra-frame prediction value, parse the code stream to determine the MIP 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 encoder which includes a first determination unit, a first calculation unit, a first transformation unit, and a first construction unit;
  • a first determining unit configured to determine a prediction mode parameter of the current block; and when the prediction mode parameter indicates that the current block uses MIP to determine an intra prediction value, determine the MIP parameter;
  • the first calculation unit is configured to determine the intra-frame prediction value of the current block according to the MIP parameter, and calculate the prediction difference between the current block and the intra-frame prediction value;
  • a first transformation unit configured to perform a first transformation on the prediction difference to obtain a first coefficient matrix
  • the first determining unit 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;
  • a first construction unit configured to use the first coefficient matrix to construct an input coefficient matrix of the LFNST according to the scan order of the LFNST coefficients
  • the first transformation unit 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 coefficient scanning order includes Horizontal scanning order and vertical scanning order.
  • an encoder which includes a first memory and a first processor; wherein,
  • the first memory is used to store a computer program that can run on the first processor
  • the first processor is configured to execute the method described in the first aspect when the computer program is running.
  • an embodiment of the present application provides a decoder, which includes a parsing unit, a second transformation unit, a second determination unit, and a second construction unit; wherein,
  • a parsing unit configured to parse 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 MIP to determine the intra prediction value, parse the code stream to determine the MIP parameter;
  • the parsing unit is further configured to analyze the code stream and determine the transform coefficient matrix and LFNST index number of the current block;
  • the second transformation unit is configured to, when the LFNST index number indicates that the current block uses LFNST, use LFNST to process the transformation coefficient matrix of the current block to obtain an LFNST output coefficient matrix;
  • the second determining unit is configured to determine the scanning order of LFNST coefficients used by the current block according to the MIP parameters
  • the second construction unit 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, which includes a second memory and a second processor; wherein,
  • the second memory is used to store a computer program that can run on the second processor
  • the second processor is configured to execute the method described in the second aspect when the computer program is running.
  • an embodiment of the present application provides a computer storage medium that stores a computer program that, when executed by a first processor, implements the method described in the first aspect, or is executed by a second
  • the processor implements the method described in the second aspect when executed.
  • the embodiments of the present application provide a transformation method, an encoder, a decoder, and a storage medium, which determine the prediction mode parameter of the current block; when the prediction mode parameter indicates that the current block uses the matrix-based intra prediction MIP to determine the intra prediction value , Determine the MIP parameters; determine the intra prediction value of the current block according to the MIP parameters, 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, determine the LFNST coefficient scanning order used by the current block according to the MIP parameters; use the first coefficient matrix to construct the input coefficient matrix of LFNST according to the LFNST coefficient scanning order; perform LFNST processing on the input coefficient matrix , The transformation coefficient matrix of the current block is obtained; wherein, the first transformation is a transformation different from LFNST, and the LFNST coefficient scanning order includes horizontal scanning order and vertical scanning order.
  • the selection of LFNST coefficient scanning order is more flexible, which not only improves the applicability of LFNST technology to non-traditional intra prediction modes, It also improves the coding and decoding efficiency, while also improving the video image quality.
  • Figure 1 is a schematic diagram of the application location of a LFNST technology provided by related technical solutions
  • FIG. 2A is a block diagram of a video encoding system provided by an embodiment of this application.
  • 2B is a block diagram of a video decoding system provided by an embodiment of this application.
  • FIG. 3 is a schematic flowchart of a conversion method provided by an embodiment of this application.
  • FIG. 4 is a flowchart of a MIP prediction process provided by an embodiment of this application.
  • 5A is a schematic structural diagram of a horizontal scanning sequence provided by an embodiment of this application.
  • 5B is a schematic structural diagram of a vertical scanning sequence provided by an embodiment of this application.
  • FIG. 6 is a schematic structural diagram of a calculation process of a matrix multiplication of LFNST technology provided by an embodiment of the application;
  • Figure 7A is a structural block diagram of an LFNST transform provided by related technical solutions.
  • Fig. 7B is a structural block diagram of another LFNST transform provided by related technical solutions.
  • FIG. 7C is a structural block diagram of yet another LFNST transform provided by related technical solutions.
  • Fig. 7D is a structural block diagram of yet another LFNST transform provided by related technical solutions.
  • FIG. 8 is a schematic flowchart of another conversion method provided by an embodiment of this application.
  • FIG. 9 is a flow chart of a specific process of LFNST according to an embodiment of the application.
  • FIG. 10 is a schematic diagram of the composition structure of an encoder provided by an embodiment of the application.
  • FIG. 11 is a schematic diagram of a specific hardware structure of an encoder provided by an embodiment of the application.
  • FIG. 12 is a schematic diagram of the composition structure of a decoder provided by an embodiment of the application.
  • FIG. 13 is a schematic diagram of a specific hardware structure of a decoder provided by an embodiment of the application.
  • 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, specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; in this way, the video image can be in YCbCr format It can also be expressed in YUV format.
  • CB coding block
  • 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
  • FIG. 1 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 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 Vertical scanning order; but for non-traditional frame prediction modes, especially Matrix-based Intra Prediction (MIP) mode, the value of predModeIntra is directly set to indicate the intra prediction mode corresponding to PLANAR mode
  • MIP Matrix-based Intra Prediction
  • the index number ie 0) causes the current block in MIP mode to select only the horizontal scanning order, which makes the current block in MIP mode lack variability when performing LFNST transformation, which results in LFNST technology not being suitable for MIP mode, and It also reduces coding efficiency.
  • the embodiment of the present application provides a transformation method, which is applied to an encoder.
  • determining the prediction mode parameter of the current block when the prediction mode parameter indicates that the current block uses the matrix-based intra prediction MIP to determine the intra prediction value, the MIP parameter is determined; according to the MIP parameter, the intra prediction value of the current block is determined, and the calculated value is calculated.
  • the prediction difference between the current block and the intra-frame prediction value; the prediction difference value is transformed for the first time to obtain the first coefficient matrix; when the current block uses LFNST, the MIP parameter is used to determine the LFNST coefficient scanning order; 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; among them, the first transformation is different from LFNST Conversion, LFNST coefficient scanning order includes horizontal scanning order and vertical scanning order.
  • the selection of LFNST coefficient scanning order is more flexible, which not only improves the applicability of LFNST technology to non-traditional intra prediction modes, It also improves the coding and decoding efficiency, while also improving the video image quality.
  • the video encoding system 10 includes a transform and quantization unit 101, an intra-frame estimation unit 102, and an intra-frame
  • 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.
  • the video decoding system 20 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, and an intra-frame
  • the 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 deblocking filtering and SAO filtering.
  • the code stream of the video signal is output; the code stream is input into the video decoding system 20, and first passes through the decoding unit 201 to obtain the decoded transform coefficient; the transform coefficient is passed through
  • 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
  • the transform method in the embodiment of this application can be applied to the transform and quantization unit 101 shown in FIG. 2A.
  • 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. 2A or the inverse transform and inverse quantization unit 202 shown in FIG. 2B, whether it is inverse transform or inverse quantization.
  • 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. 3 shows a schematic flowchart of a conversion method provided by an embodiment of the present application.
  • the method may include:
  • 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, and the first image component is the brightness component, that is, the image component to be predicted is the brightness component, then the current block can also be called the brightness block; or, it is assumed that the current block performs the second image component Prediction, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the current block can also be called a chrominance block.
  • 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 determining the prediction mode parameter of the current block may include:
  • a minimum rate-distortion cost result is selected from a plurality of calculated rate-distortion cost results, and a 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, while traditional intra prediction modes can include direct current (DC) mode, planar (PLANAR) mode, angular mode, etc.
  • Non-traditional intra prediction modes can include MIP mode, Cross-component Linear Model Prediction (CCLM) mode, Intra Block Copy (IBC) mode and PLT (Palette) mode, etc. .
  • the rate-distortion cost result corresponding to each prediction mode can be obtained; then the minimum rate-distortion cost result is selected from the obtained multiple rate-distortion cost results, and The prediction mode corresponding to the minimum rate-distortion cost result is determined as the prediction mode parameter of the current block; in this way, the determined prediction mode can be used to encode the current block, and in this prediction mode, the prediction residual can be made small , Can improve coding efficiency.
  • S303 Determine the intra-frame prediction value of the current block according to the MIP parameter, and calculate the prediction difference between the current block and the intra-frame prediction value;
  • the input data for MIP prediction includes: the position of the current block (xTbCmp, yTbCmp), the MIP prediction mode applied to the current block (can be represented by modeId), and the height of the current block (in nTbH) Representation), the width of the current block (indicated by nTbW), and the transposition processing indication flag (which can be represented by isTransposed) whether transposition is needed, etc.;
  • the output data of MIP prediction includes: the prediction block of the current block, in the prediction block
  • the MIP prediction process can be divided into four steps: configuring core parameters 41, obtaining reference pixels 42, constructing input samples 43, and generating predicted values 44.
  • the core parameter 41 for configuring the core parameter 41, according to the size of the current block in the frame, the current block can be divided into three categories, and mipSizeId is used to record the type of the current block; and for different types of current blocks, refer to the number of sampling points and matrix multiplication output The number of sampling points is different.
  • the reference pixels 42 when predicting the current block, the upper block and the left block of the current block are already coded blocks at this time.
  • the reference pixels of the MIP technology are the reconstructed values of the upper row of pixels and the left column of the current block.
  • the process of obtaining the reference pixel adjacent to the upper side of the current block (indicated by refT) and the reference pixel adjacent to the left side (indicated by refL) is the process of obtaining the reference pixels.
  • this step is used for the input of matrix multiplication, and mainly includes: obtaining reference samples 431, constructing reference sampling buffer 432, and deriving matrix multiplication input samples 433; among them, the process of obtaining reference samples is downsampling Process, and the construction of the reference sampling buffer 432 may include the buffer filling mode 4321 when transposition is not required and the buffer filling mode 4322 when transposition is required.
  • this step is used to obtain the MIP predicted value of the current block, which may mainly include: constructing a matrix multiplication output sampling block 441, matrix multiplication output sampling clamp 442, matrix multiplication output sampling transposition 443, and generating MIP The final predicted value 444; wherein, the construction of the matrix multiplication output sampling block 441 may include obtaining the weight matrix 4411, obtaining the shift factor and the offset factor 4412, and the matrix multiplication operation 4413, and generating the MIP final predicted value 444 may also include generating unneeded upper The sampled predicted value 4441 and the generated predicted value 4442 that need to be up-sampled. In this way, after the four steps, the intra prediction value of the current block can be obtained.
  • the difference calculation can be performed according to the actual pixel value of the current block and the intra-frame prediction value, and the calculated difference value is used as the prediction difference value, which is convenient for subsequent prediction difference values. Transformation processing.
  • the MIP parameter may include a MIP transposition indicator parameter (which can be represented by isTransposed); here, the value of the MIP transposition indicator parameter is used to indicate whether to transpose the sampling point input vector used in the MIP mode. .
  • the adjacent reference sample set can be obtained according to the reference sample value corresponding to the adjacent reference pixel on the left side of the current block and the reference sample value corresponding to the adjacent reference pixel on the upper side; After the adjacent reference sample set, an input reference sample set can be constructed at this time, that is, the sampling point input vector used in the MIP mode.
  • an input reference sample set can be constructed at this time, that is, the sampling point input vector used in the MIP mode.
  • there is a difference between the encoder side and the decoder side which is mainly related to the value of the MIP transpose indicator parameter.
  • the utilization rate distortion optimization method can still be used to determine the value of the MIP transposition indicator parameter. Specifically, it may include:
  • the value of the MIP transposition indicator parameter can be determined to be 1 at this time;
  • the value of the MIP transposition indicator parameter can be determined to be 0 at this time.
  • the reference sample value corresponding to the upper side of the adjacent reference sample set can be stored before the reference sample value corresponding to the left side, At this time, there is no need to perform transposition processing, that is, there is no need to perform transposition processing on the sampling point input vector used in the MIP mode, and the buffer can be directly determined as the input reference sample value set; when the MIP transposition indicates the value of the parameter When it is 1, in the buffer, the reference sample value corresponding to the upper side of the adjacent reference sample set can be stored after the reference sample value corresponding to the left side.
  • the buffer is transposed, that is, it is necessary Transpose the input vector of the sampling points used in the MIP mode, and then determine the transposed buffer as the input reference sample value set. In this way, after the input reference sample value set is obtained, it can be used in the process of determining the intra prediction value corresponding to the current block in the MIP mode.
  • the MIP parameter may also include a MIP mode index number (which can be represented by modeId), where the MIP mode index number is used to indicate the MIP mode used by the current block, and the MIP mode is used to indicate the use of MIP to determine the The calculation and derivation method of the intra prediction value of the current block is described.
  • MIP mode index number which can be represented by modeId
  • MIP mode index number that is, different MIP modes have different MIP mode index numbers; in this way, according to the use MIP determines the calculation and derivation method of the intra-frame prediction value of the current block, and can determine the specific MIP mode, so that the corresponding MIP mode index number can be obtained; in this embodiment of the application, the value of the MIP mode index number can be 0, 1, 2, 3, 4, or 5.
  • the MIP parameters can also include parameters such as the size of the current block and the aspect ratio; among them, according to the size of the current block (that is, the width and height of the current block), the category of the current block can also be determined (you can use mipSizeId said).
  • determining the category of the current block according to the size of the current block may include:
  • the value of mipSizeId can be set to 0;
  • the value of mipSizeId can be set to 1;
  • the value of mipSizeId can be set to 2.
  • determining the category of the current block according to the size of the current block may include:
  • the value of mipSizeId can be set to 0;
  • the value of mipSizeId can be set to 1;
  • the value of mipSizeId can be set to 2.
  • the MIP parameters can also be determined, which is convenient for determining the LFNST transform core (which can be represented by the kernel) used by the current block according to the determined MIP parameters.
  • 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.
  • LFNST can be performed on the current block only when the current block meets the following conditions at the same time. Among them, these conditions include: (a) the width and height of the current block are greater than or equal to 4; (b) the width and height of the current block are less than or equal to the maximum size of the transform block; (c) the current block or the current coding block
  • the prediction mode of is the intra prediction mode; (d) the primary transformation of the current block is two-dimensional forward primary transformation (DCT2) in both the horizontal and vertical directions; (e) the current block or the frame of the coding block where the current block is located
  • DCT2 two-dimensional forward primary transformation
  • the prediction mode is non-MIP mode or the prediction mode of the transform block is MIP mode, and the width and height of the transform block are both greater than or equal to 16. 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.
  • the LFNST coefficient scanning order includes a horizontal scanning order and a vertical scanning order.
  • the selected LFNST coefficient scanning order can be implicitly derived; for example, in the current H.266/VVC, the selected LFNST coefficient can be determined according to the intra prediction mode of the current block. The scan order of the LFNST coefficients.
  • the value of the intra prediction mode indicator (which can be represented by predModeIntra) can be determined, and 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) is 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 respectively in VVC);
  • the value of predModeIntra can be the index number of the used MIP mode
  • predModeIntra can be [0,66].
  • predModeIntra can also be set 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,
  • 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,
  • the scan order used by the current block in the MIP mode can only select the horizontal scan order. This results in a lack of variability when performing LFNST in MIP mode, which reduces coding efficiency.
  • the scanning order of LFNST coefficients used in the current block can be determined in combination with the MIP 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 MIP mode has variability and can be Improve coding efficiency.
  • the MIP parameters can include parameters such as the MIP transposition indication parameter (which can be represented by isTransposed), the MIP mode index number (which can be represented by modeId), the size of the current block, and the type of the current block (which can be represented by mipSizeId); the following will How to select the scanning order of the LFNST coefficients used by the current block according to the MIP parameters is described in detail.
  • the determining the current block uses according to the MIP parameter can include:
  • the LFNST coefficient scanning order is set to the vertical scanning order
  • the LFNST coefficient scanning order is set to the horizontal scanning order.
  • the determining the current block uses according to the MIP parameter can include:
  • the LFNST coefficient scanning order is set to the vertical scanning order
  • the LFNST coefficient scanning order is set to the horizontal scanning order.
  • the MIP transposition indicator parameter is used to indicate whether to transpose the input vector of the sampling point used in the MIP mode, and the LFNST coefficient scanning sequence includes the horizontal scanning sequence and the vertical scanning sequence, you can The MIP transpose indicates the value of the parameter to select the LFNST coefficient scanning order used in the current block.
  • the LFNST coefficient when the value of the MIP transposition indicator parameter is equal to 1, that is, when the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is transposed, the LFNST coefficient can be The scan sequence is set to the vertical scan sequence; when the value of the MIP transposition indicator parameter is equal to 0, that is, the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is not transposed, and the LFNST can be set at this time The coefficient scan order is set to the horizontal scan order.
  • the LFNST when the value of the MIP transposition indicator parameter is equal to 1, that is, when the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is transposed, the LFNST can be set at this time.
  • the coefficient scanning order is set to the horizontal scanning order; when the value of the MIP transposition indicator parameter is equal to 0, that is, the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is not to be transposed.
  • the LFNST coefficient scanning order is set to the vertical scanning order.
  • the determining the LFNST used by the current block according to the MIP parameter can include:
  • the LFNST coefficient scanning order is set to be equal to the LFNST coefficient scanning order corresponding to the preset value of the LFNST intra prediction mode index number.
  • the MIP mode index number is used to indicate the MIP mode used by the current block
  • the MIP mode is used to indicate the calculation and derivation method of using MIP to determine the intra prediction value of the current block; that is, according to the MIP mode index number , You can also determine the LFNST coefficient scanning order.
  • the MIP mode index number can also be converted to the value of the LFNST intra prediction mode index number (which can be represented by predModeIntra); and then the value of predModeIntra is determined Output LFNST coefficient scanning order, such as horizontal scanning order or vertical scanning order.
  • the determining the MIP parameter can include:
  • the method may further include:
  • the LFNST coefficient scanning order used by the current block is a horizontal scanning order, then the LFNST coefficient scanning order used by the current block is set as a vertical scanning order;
  • the scanning order of the LFNST coefficients used by the current block is the vertical scanning order, then the scanning order of the LFNST coefficients used by the current block is set as the horizontal scanning order.
  • the MIP mode index number is used to indicate the MIP mode used by the current block, and the MIP mode is used to indicate the calculation and derivation method of using MIP to determine the intra prediction value of the current block;
  • the value of the MIP transposition indicator parameter It is used to indicate whether to transpose the sampling point input vector used in the MIP mode; that is, the LFNST coefficient scanning order can be determined according to the combination of the MIP transposition indicator parameter and the MIP mode index number.
  • the LFNST coefficient scanning order used by the current block can be set to the horizontal scanning order; If the value of the indicator parameter is equal to 1, then the scan order of the LFNST coefficients used in the current block can be set to the vertical scan order; or, in some MIP modes, if the value of the indicator parameter of the MIP transpose is equal to 0, then you can set The LFNST coefficient scanning order used in the current block is set to the vertical scanning order; if the value of the MIP transposition indication parameter is equal to 1, then the LFNST coefficient scanning order used in the current block can be set to the horizontal scanning order, which is not specifically limited in the implementation of this application.
  • the MIP mode index number can also be converted to the value of the LFNST intra prediction mode index number (which can be represented by predModeIntra), and then the current block usage can be determined according to the value of predModeIntra
  • the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is transposed.
  • the MIP parameter includes at least the MIP mode index number (modeId)
  • modeId MIP mode index number
  • the value of the LFNST intra prediction mode index number can also be obtained by looking up the table Way to get.
  • the determining the value of the LFNST intra prediction mode index number according to the value of the MIP mode index number may include:
  • first lookup table uses a first lookup table to determine the value of the LFNST intra prediction mode index number corresponding to the value of the MIP mode index number, where the first lookup table contains at least two LFNST frames with different values One or more different MIP mode index numbers corresponding to the intra prediction mode index numbers.
  • the first look-up table (Look-Up Table1, LUT1) is used to reflect the correspondence between the MIP mode index number and the LFNST intra prediction mode index number, that is, the first look-up table contains at least two different values One or more different MIP mode index numbers corresponding to each of the LFNST intra prediction mode index numbers.
  • different MIP modes can correspond to different values of predModeIntra; in this way, the MIP mode index number is determined according to the MIP mode, and then the value of predModeIntra is determined according to the first lookup table; and then according to the value of predModeIntra, Determine the scanning order of the LFNST coefficients used in the current block.
  • the LFNST coefficient scanning order can also be directly determined according to the value of the MIP 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 determine the LFNST intra prediction mode index number according to the MIP mode index number. Value.
  • the determining, according to the MIP parameters, the scanning order of the LFNST coefficients used by the current block may include:
  • the LFNST coefficient scanning order is set to be equal to the LFNST coefficient scanning order corresponding to the preset value of the MIP mode index number.
  • the method may further include:
  • the second look-up table uses a second look-up table to determine the LFNST coefficient scanning order corresponding to the value of the MIP mode index number; wherein, the second look-up table contains at least one or more different LFNST coefficient scanning orders corresponding to different The index number of the MIP mode.
  • the method may further include:
  • the LFNST coefficient scanning order is set to the vertical scanning order.
  • the selected LFNST coefficient scan order can be determined according to the value of the MIP mode index number (modeId); here, the value of the MIP mode index number can include There are 0, 1, 2, 3, 4, and 5.
  • the LFNST coefficient scanning order when the MIP mode index number value is 0, the LFNST coefficient scanning order can be set to the horizontal scanning order; when the MIP mode index number value is 1, the LFNST coefficient scanning order can be set It is the vertical scanning order; when the MIP mode index number value is 2, the LFNST coefficient scanning order can be set to the horizontal scanning order; when the MIP mode index number value is 3, the LFNST coefficient scanning order can be set to vertical
  • the scanning order, etc., are not specifically limited in the embodiment of the present application.
  • the value of the MIP mode index number when the value of the MIP mode index number satisfies the preset integer range, for example, the value of the MIP mode index number can be 0, 1, 2, and the LFNST coefficient scan order can be set to the horizontal scan order ;
  • the value of the MIP mode index number when the value of the MIP mode index number does not meet the preset integer range, for example, the value of the MIP mode index number can be 3, 4, 5, and the LFNST coefficient scanning order can be set to the vertical scanning order, etc.
  • the scanning order of LFNST coefficients can be selected according to one or more combinations of information in MIP parameters; it can also be based on MIP parameters to compare with traditional intra prediction modes. According to the mapping angle, the scanning order of LFNST coefficients is selected.
  • the method may further include:
  • the LFNST coefficient scanning order used by the current block is set to the horizontal scanning order
  • the scan order of the LFNST coefficients used in the current block is set to the vertical scan order.
  • the prediction mode of the current block is a non-MIP mode
  • the value of predModeIntra can be determined according to the intra-frame prediction mode; then the scanning order of LFNST coefficients used by the current block can be determined according to the value of predModeIntra.
  • the method may also include:
  • the value of the LFNST index number is set to indicate that the value corresponding to the LFNST is used, and the value of the LFNST index number is written into the video bitstream.
  • 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 written into the video code stream; so
  • 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.
  • S307 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 is based on direct matrix multiplication to apply inseparable transformations.
  • 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,
  • FIG. 6 shows a structural schematic diagram of a calculation process of a matrix multiplication of LFNST technology provided by an embodiment of the present application.
  • (a) shows the calculation process of the forward LFNST transformation. After the primary transformation coefficient passes through the transformation matrix T, the secondary transformation coefficient can be obtained;
  • (b) shows the calculation process of the reverse LFNST transformation . After the inverse quadratic transformation coefficients are transposed by the transformation matrix T T , the inverse primary transformation coefficients can be obtained.
  • 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
  • the forward LFNST process corresponding to the 4 ⁇ 4 transform block is shown in Fig. 7A.
  • 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 Fig. 7B.
  • 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 Fig. 7C.
  • 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 Fig. 7D.
  • 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.
  • Fig. 7A or Fig. 7B or Fig. 7C or Fig. 7D implements related processing such as the primary transformation of the prediction difference and the secondary transformation of the LFNST.
  • the applicability of the LFNST technology to the current block using the MIP mode can be improved, so that the selection of the scanning order is more flexible.
  • the relevant information of the MIP parameters is introduced, and the characteristics of the current block are judged according to the MIP information, and then the scanning order is selected.
  • the transformation method is applied to VTM7.0, and the test is performed under All Intra conditions at 24 frame intervals. Based on the average bit rate change under the same peak signal to noise ratio (Peak Signal to Noise Ratio, PSNR), it can be tested at this time.
  • PSNR Peak Signal to Noise Ratio
  • the three image components (ie Y, Cb, and Cr) obtain BD-rate changes of -0.03%, 0.00%, and -0.01% respectively; especially on large-resolution sequences, there will be better performance, Specifically, a BD-rate change of -0.10% in Y can be achieved on Class A1, thereby improving coding efficiency.
  • This embodiment provides a transformation method, which is applied to an encoder.
  • determining the prediction mode parameter of the current block when the prediction mode parameter indicates that the current block uses the matrix-based intra prediction MIP to determine the intra prediction value, the MIP parameter is determined; according to the MIP parameter, the intra prediction value of the current block is determined, and the calculated value is calculated.
  • the prediction difference between the current block and the intra-frame prediction value; the prediction difference value is transformed for the first time to obtain the first coefficient matrix; when the current block uses LFNST, the MIP parameter is used to determine the LFNST coefficient scanning order; 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; among them, the first transformation is different from LFNST Transformation, LFNST coefficient scanning order includes horizontal scanning order and vertical scanning order.
  • FIG. 8 shows a schematic flowchart of another conversion method provided by an embodiment of the present application. As shown in Figure 8, the method may include:
  • 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.
  • prediction mode of the current block can be determined, and the corresponding prediction mode parameters will be written into the code stream, and the encoder will transmit it to the decoder.
  • 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.
  • the value of predModeIntra can be determined, and the calculation formula is as the aforementioned formula (1) .
  • 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) is 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.
  • MIP parameters can include parameters such as MIP transposition indication parameters (which can be represented by isTransposed), MIP mode index number (which can be represented by modeId), the size of the current block, and the category of the current block (which can be represented by mipSizeId), etc. ; The values of these parameters can be obtained by parsing the code stream.
  • the value of isTransposed can be determined by parsing the code stream; when the value of isTransposed is equal to 1, the input vector of the sampling point used in the MIP mode needs to be transposed; when the value of isTransposed is equal to 0 , There is no need to transpose the sampling point input vector used in the MIP mode; that is, the MIP transposition indication parameter can be used to indicate whether to transpose the sampling point input vector used in the MIP mode.
  • the MIP mode index number (which can be represented by modeId) can also be determined; where the MIP mode index number can be used to indicate the MIP mode used by the current block, and the MIP mode can be used to indicate the use of MIP Determine the calculation and derivation method of the intra prediction value of the current block. That is to say, different MIP modes have different values of the corresponding MIP mode index number; here, the value of the MIP mode index number can be 0, 1, 2, 3, 4, or 5.
  • parameter information such as the size of the current block, the aspect ratio, and the category of the current block (which can be represented by mipSizeId) can also be determined.
  • mipSizeId the category of the current block
  • the value of the LFNST index number can be used to indicate whether the current block uses LFNST. Specifically, after the LFNST index sequence number is parsed, when the value of the LFNST index sequence number is equal to 0, it indicates that the current block does not use LFNST; and when the value of the LFNST index sequence number is greater than 0, it indicates that the current block uses LFNST. At this time, LFNST can be used to process the transform coefficient matrix of the current block.
  • the specific process of LFNST can be divided into four steps: configuring core parameters 91, intra prediction mode mapping 92, selecting transformation matrix 93, calculating matrix multiplication 94 and constructing a transformation coefficient matrix 95. step.
  • this step is used to determine the value of predModeIntra, which may mainly include: non-traditional intra prediction mode mapping 921 and wide angle mapping 922; for selecting the transformation matrix 93, this step It is used to select a transformation set and a transformation matrix, mainly including: selecting a transformation set 931, selecting a transformation matrix group 932, and selecting a transformation matrix size 933.
  • the core parameters 91 For configuring the core parameters 91, 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 is as follows:
  • the intra-frame 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 value of predModeIntra can be determined, and the calculation formula is as the aforementioned formula (1).
  • 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 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 respectively 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);
  • intra_mip_flag[xTbY][yTbY] is equal to 1 and cIdx is equal to 0, that is, the prediction mode of the current block is MIP mode
  • the value of predModeIntra can be directly set to the index number (ie 0) indicating the PLANAR mode.
  • 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 index number (which can be represented by SetIdx) in the LFNST transform core candidate set can be determined, and the specific value is shown in Table 2.
  • 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 core candidate set includes two sets of transformation matrices (also called LFNST transformation cores).
  • the candidate set of LFNST transformation cores is determined After that, 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,
  • S805 Determine the scanning order of LFNST coefficients used by the current block according to the MIP parameters
  • the MIP parameters can include parameters such as the MIP transposition indication parameter (which can be represented by isTransposed), the MIP mode index number (which can be represented by modeId), the size of the current block, and the type of the current block (which can be represented by mipSizeId); the following will How to select the LFNST transform core used by the current block according to the MIP parameters is described in detail.
  • the determining the LFNST coefficient scanning order used by the current block according to the MIP parameter may include:
  • the LFNST coefficient scanning order is set to the vertical scanning order
  • the LFNST coefficient scanning order is set to the horizontal scanning order.
  • the determining the LFNST coefficient scanning order used by the current block according to the MIP parameter may include:
  • the LFNST coefficient scanning order is set to the vertical scanning order
  • the LFNST coefficient scanning order is set to the horizontal scanning order.
  • the value of the MIP transposition indicator parameter is used to indicate whether to transpose the sampling point input vector used in the MIP mode, then after parsing the code stream, the value of the MIP transposition indicator parameter is obtained, The value of the indicator parameter can be MIP transposed to select the LFNST coefficient scanning order used in the current block.
  • the LFNST coefficient when the value of the MIP transposition indicator parameter is equal to 1, that is, when the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is transposed, the LFNST coefficient can be The scan sequence is set to the vertical scan sequence; when the value of the MIP transposition indicator parameter is equal to 0, that is, the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is not transposed, and the LFNST can be set at this time The coefficient scan order is set to the horizontal scan order.
  • the LFNST when the value of the MIP transposition indicator parameter is equal to 1, that is, when the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is transposed, the LFNST can be set at this time.
  • the coefficient scanning order is set to the horizontal scanning order; when the value of the MIP transposition indicator parameter is equal to 0, that is, the value of the MIP transposition indicator parameter indicates that the sampling point input vector used in the MIP mode is not to be transposed.
  • the LFNST coefficient scanning order is set to the vertical scanning order.
  • the determining the LFNST coefficient scanning order used by the current block according to the MIP parameter may include:
  • the LFNST coefficient scanning order is set to be equal to the LFNST coefficient scanning order corresponding to the preset value of the LFNST intra prediction mode index number.
  • the MIP mode index number is used to indicate the MIP mode used by the current block
  • the MIP mode is used to indicate the calculation and derivation method of using MIP to determine the intra prediction value of the current block; that is, according to the MIP mode index number , You can also determine the LFNST coefficient scanning order.
  • the MIP mode index number can also be converted to the value of the LFNST intra prediction mode index number (which can be represented by predModeIntra); and then according to the value of predModeIntra Take the value to determine the LFNST coefficient scan order, such as the horizontal scan order or the vertical scan order.
  • the LFNST coefficient scanning order used by the current block is determined according to the MIP parameter , Can include:
  • the method may further include:
  • the LFNST coefficient scanning order used by the current block is a horizontal scanning order, then the LFNST coefficient scanning order used by the current block is set as a vertical scanning order;
  • the scanning order of the LFNST coefficients used by the current block is the vertical scanning order, then the scanning order of the LFNST coefficients used by the current block is set as the horizontal scanning order.
  • the MIP mode index number is used to indicate the MIP mode used by the current block, and the MIP mode is used to indicate the calculation and derivation method of using MIP to determine the intra prediction value of the current block;
  • the value of the MIP transposition indicator parameter It is used to indicate whether to transpose the sampling point input vector used in the MIP mode; that is, the LFNST coefficient scanning order can be determined according to the combination of the MIP transposition indicator parameter and the MIP mode index number.
  • the MIP mode index number can also be converted to the value of the LFNST intra prediction mode index number (which can be represented by predModeIntra), and then the current block usage can be determined according to the value of predModeIntra
  • the value of the MIP transpose indicator parameter indicates that the sampling point input vector used in the MIP mode is transposed
  • the LFNST coefficient scanning sequence used by the current block is the horizontal scanning sequence
  • the LFNST coefficient scanning order used by the current block can be set to the vertical scanning order; if the LFNST coefficient scanning order used by the current block is the vertical scanning order, then the LFNST coefficient scanning order used by the current block can be set to the horizontal scanning order.
  • the MIP parameter includes at least the MIP mode index number (modeId)
  • modeId MIP mode index number
  • the value of the LFNST intra prediction mode index number can also be obtained by looking up the table Way to get.
  • the determining the value of the LFNST intra prediction mode index number according to the value of the MIP mode index number may include:
  • first lookup table uses a first lookup table to determine the value of the LFNST intra prediction mode index number corresponding to the value of the MIP mode index number, where the first lookup table contains at least two LFNST frames with different values One or more different MIP mode index numbers corresponding to the intra prediction mode index numbers.
  • the first look-up table (Look-Up Table1, LUT1) is used to reflect the correspondence between the MIP mode index number and the LFNST intra prediction mode index number, that is, the first look-up table contains at least two different values One or more different MIP mode index numbers corresponding to each of the LFNST intra prediction mode index numbers.
  • different MIP modes can correspond to different values of predModeIntra; in this way, the MIP mode index number is determined according to the MIP mode, and then the value of predModeIntra is determined according to the first lookup table; and then according to the value of predModeIntra, Determine the scanning order of the LFNST coefficients used in the current block.
  • the LFNST coefficient scanning order can also be directly determined according to the value of the MIP 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 determine the LFNST intra prediction mode index number according to the MIP mode index number. Value.
  • the determining, according to the MIP parameters, the scanning order of the LFNST coefficients used by the current block may include:
  • the LFNST coefficient scanning order is set to be equal to the LFNST coefficient scanning order corresponding to the preset value of the MIP mode index number.
  • the method may further include:
  • the second look-up table uses a second look-up table to determine the LFNST coefficient scanning order corresponding to the value of the MIP mode index number; wherein, the second look-up table contains at least one or more different LFNST coefficient scanning orders corresponding to different The index number of the MIP mode.
  • the method may further include:
  • the LFNST coefficient scanning order is set to the vertical scanning order.
  • the selected LFNST coefficient scan order can be determined according to the value of the MIP mode index number (modeId); here, the value of the MIP mode index number can include There are 0, 1, 2, 3, 4, and 5.
  • the LFNST coefficient scanning order when the MIP mode index number value is 0, the LFNST coefficient scanning order can be set to the horizontal scanning order; when the MIP mode index number value is 1, the LFNST coefficient scanning order can be set It is the vertical scanning order; when the MIP mode index number value is 2, the LFNST coefficient scanning order can be set to the horizontal scanning order; when the MIP mode index number value is 3, the LFNST coefficient scanning order can be set to vertical
  • the scanning order, etc., are not specifically limited in the embodiment of the present application.
  • the value of the MIP mode index number when the value of the MIP mode index number satisfies the preset integer range, for example, the value of the MIP mode index number can be 0, 1, 2, and the LFNST coefficient scan order can be set to the horizontal scan order ;
  • the value of the MIP mode index number when the value of the MIP mode index number does not meet the preset integer range, for example, the value of the MIP mode index number can be 3, 4, 5, and the LFNST coefficient scanning order can be set to the vertical scanning order, etc.
  • the scanning order of LFNST coefficients can be selected according to one or more combinations of information in MIP parameters; it can also be based on MIP parameters to compare with traditional intra prediction modes. According to the mapping angle, the scanning order of LFNST coefficients is selected.
  • the scanning order of LFNST coefficients can also be selected according to one or more information combinations in MIP parameters; it can also be compared with traditional intra prediction based on MIP parameters. For the mapping between the modes, the scanning order of the LFNST coefficients is then selected according to the mapped angle, which is not specifically limited in the embodiment of the present application.
  • the method may further include:
  • the LFNST coefficient scanning order used by the current block is set to the horizontal scanning order
  • the scan order of the LFNST coefficients used in the current block is set to the vertical scan order.
  • the prediction mode of the current block is a non-MIP mode
  • the value of predModeIntra can be determined according to the intra-frame prediction mode; then the scanning order of LFNST coefficients used by the current block can be determined according to the value of predModeIntra.
  • S806 Construct a 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 method may further include:
  • the first coefficient matrix can be transformed for the first time to obtain the predicted difference of the current block; here, the first transformation is a transformation process different from LFNST.
  • the prediction mode parameters of the current block are determined by analyzing the code stream, if the prediction mode is MIP mode, the current block can also be predicted according to the MIP mode to obtain the intra prediction value of the current block; and then according to the intra prediction The value and the prediction difference are summed, and then the obtained sum value 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 applicability of the LFNST technology to the current block using the MIP mode can be improved, so that the selection of the scanning order is more flexible.
  • the relevant information of the MIP parameters is introduced, and the characteristics of the current block are judged according to the MIP information, and then the scanning order is selected.
  • the conversion method is applied to VTM7.0, and tested under All Intra conditions at 24 frame intervals, based on the average bit rate change under the same peak signal to noise ratio (Peak Signal to Noise Ratio, PSNR).
  • the three image components (ie Y, Cb, and Cr) obtain BD-rate changes of -0.03%, 0.00%, and -0.01% respectively; especially on large-resolution sequences, there will be better performance, Specifically, a BD-rate change of -0.10% in Y can be achieved on Class A1, thereby improving decoding efficiency.
  • This embodiment provides a transformation method, which is applied to a decoder. Determine the prediction mode parameter of the current block by parsing the code stream; and when the prediction mode parameter indicates that the current block uses MIP to determine the intra prediction value, parse the code stream to determine the MIP parameter; parse the code stream to determine the current The transform coefficient matrix of the block and the LFNST index number; when the LFNST index number indicates that the current block uses LFNST, the transform coefficient matrix of the current block is processed using LFNST to obtain the LFNST output coefficient matrix; according to the MIP parameter , Determine the LFNST coefficient scan order used by the current block; according to the LFNST coefficient scan order, use the LFNST output coefficient matrix to construct a first coefficient matrix; wherein the LFNST coefficient scan order includes a vertical scan order and a horizontal scan order .
  • FIG. 10 shows a schematic diagram of the composition structure of an encoder 100 provided by an embodiment of the present application.
  • the encoder 100 may include: a first determination unit 1001, a first calculation unit 1002, a first transformation unit 1003, and a first construction unit 1004; wherein,
  • the first determining unit 1001 is configured to determine the prediction mode parameter of the current block; and when the prediction mode parameter indicates that the current block uses MIP to determine the intra prediction value, determine the MIP parameter;
  • the first calculation unit 1002 is configured to determine the intra prediction value of the current block according to the MIP parameter, and calculate the prediction difference between the current block and the intra prediction value;
  • the first transformation unit 1003 is configured to perform a first transformation on the prediction difference to obtain a first coefficient matrix
  • the first determining unit 1001 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 unit 1004 is configured to construct an input coefficient matrix of LFNST by using the first coefficient matrix according to the scanning order of the LFNST coefficients;
  • the first transformation unit 1003 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 coefficient scanning order Including horizontal scanning order and vertical scanning order.
  • the MIP parameter includes a MIP transposition indicator parameter, wherein the value of the MIP transposition indicator parameter is used to indicate whether to transpose the sampling point input vector used in the MIP mode.
  • the encoder 100 may further include a first transposition unit 1005 configured to perform transposition processing on the sampling point input vector used in the MIP mode when the value of the MIP transposition indication parameter indicates , Setting the LFNST coefficient scanning sequence to the vertical scanning sequence; and when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is not to be transposed, the LFNST coefficient scanning sequence is set It is the horizontal scanning sequence.
  • a first transposition unit 1005 configured to perform transposition processing on the sampling point input vector used in the MIP mode when the value of the MIP transposition indication parameter indicates , Setting the LFNST coefficient scanning sequence to the vertical scanning sequence; and when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is not to be transposed, the LFNST coefficient scanning sequence is set It is the horizontal scanning sequence.
  • the first transposition unit 1005 is further configured to set the LFNST coefficient scanning order when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is transposed Is a horizontal scanning sequence; and when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is not to be transposed, the LFNST coefficient scanning sequence is set to the vertical scanning sequence.
  • the MIP parameters include a MIP mode index sequence number, wherein the MIP mode index sequence number is used to indicate the MIP mode used by the current block, and the MIP mode is used to indicate the MIP mode used to determine the current block.
  • the calculation and derivation method of intra prediction value is used to indicate the MIP mode used by the current block.
  • the encoder 100 may further include a first setting unit 1006, where:
  • the first determining unit 1001 is further configured to determine the value of the LFNST intra prediction mode index number according to the value of the MIP mode index number;
  • the first setting unit 1006 is configured to set the LFNST coefficient scanning order equal to the LFNST coefficient scanning order corresponding to the preset value of the LFNST intra prediction mode index number.
  • the first determining unit 1001 is further configured to use a first lookup table to determine the value of the LFNST intra prediction mode index number corresponding to the value of the MIP mode index number, wherein the first The look-up table contains at least one or more different MIP mode index numbers corresponding to two LFNST intra prediction mode index numbers with different values.
  • the first setting unit 1006 is further configured to set the LFNST coefficient scanning order equal to the LFNST coefficient scanning order corresponding to the preset value of the MIP mode index number.
  • the first determining unit 1001 is further configured to use a second look-up table to determine the LFNST coefficient scanning order corresponding to the value of the MIP mode index number; wherein, the second look-up table contains at least the different One or more different MIP mode index numbers corresponding to the scanning sequence of the LFNST coefficients.
  • the first setting unit 1006 is further configured to set the LFNST coefficient scanning order to the horizontal scanning order when the value of the MIP mode index number is within a preset range of one or more integers; And when the value of the MIP mode index number is not within the preset range of one or more integers, the LFNST coefficient scanning order is set to the vertical scanning order.
  • the MIP parameter further includes a MIP transposition indicator parameter, and the value of the MIP transposition indicator parameter is used to indicate whether to transpose the sampling point input vector used in the MIP mode;
  • the first transposition unit 1005 is further configured to, when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is transposed, if the scanning order of the LFNST coefficients used in the current block is horizontal Scan order, the LFNST coefficient scan order used by the current block is set to the vertical scan order; and if the LFNST coefficient scan order used by the current block is the vertical scan order, the LFNST coefficient scan order used by the current block is set Set to horizontal scan order.
  • the first setting unit 1006 is further configured to set the value of the LFNST index sequence number to indicate the value corresponding to the use of LFNST, and write the value of the LFNST index sequence number into the video bitstream.
  • a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, may also be a module, or may also be non-modular.
  • the various components 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 It is said that the part that contributes to the existing technology 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 A personal computer, a server, or a network device, etc.) or a processor (processor) executes all or part of the steps of the method described in this embodiment.
  • 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.
  • an embodiment of the present application provides a computer storage medium for use in the encoder 100.
  • the computer storage medium stores a transformation program that, when executed by a first processor, implements any one of the foregoing embodiments. Methods.
  • FIG. 11 shows an example of a specific hardware structure of the encoder 100 provided by an embodiment of the present application, which may include: a first communication interface 1101, a first memory 1102, and a first communication interface 1101; A processor 1103; various components are coupled together through a first bus system 1104.
  • the first bus system 1104 is used to implement connection and communication between these components.
  • the first bus system 1104 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the first bus system 1104 in FIG. 11. among them,
  • the first communication interface 1101 is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
  • the first memory 1102 is configured to store a computer program that can run on the first processor 1103;
  • the first processor 1103 is configured to execute the following when running the computer program:
  • 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 first memory 1102 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Synchronous Link Dynamic Random Access Memory
  • Synchlink DRAM Synchronous Link Dynamic Random Access Memory
  • DRRAM Direct Rambus RAM
  • the first processor 1103 may be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the foregoing method can be completed by an integrated logic circuit of hardware in the first processor 1103 or instructions in the form of software.
  • the above-mentioned first processor 1103 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) Or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the first memory 1102, and the first processor 1103 reads the information in the first memory 1102, and completes the steps of the foregoing method in combination with its hardware.
  • the embodiments described in this application can be implemented by hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more application specific integrated circuits (ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable Logic device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, and others for performing the functions described in this application Electronic unit or its combination.
  • ASIC application specific integrated circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing equipment
  • PLD programmable Logic Device
  • PLD Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • the technology described in this application can be implemented through modules (for example, procedures, functions, etc.) that perform the functions described in this application.
  • the software codes can be stored in the memory and executed by
  • the first processor 1103 is further configured to execute the method described in any one of the foregoing embodiments when the computer program is running.
  • This embodiment provides an encoder, which may include a first determination unit, a first calculation unit, a first transformation unit, and a first construction unit;
  • the introduction of MIP parameters during LFNST transformation makes the selection of LFNST coefficient scanning order more flexible, which not only improves the applicability of LFNST technology to non-traditional intra prediction modes, but also improves coding efficiency and at the same time improves video image quality.
  • FIG. 12 shows a schematic diagram of the composition structure of a decoder 120 provided by an embodiment of the present application.
  • the decoder 120 may include: an analysis unit 1201, a second transformation unit 1202, a second determination unit 1203, and a second construction unit 1204;
  • the parsing unit 1201 is configured to parse 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 MIP to determine the intra prediction value, parse the code stream to determine the MIP parameter;
  • the parsing unit 1201 is further configured to analyze the code stream and determine the transform coefficient matrix and LFNST index number of the current block;
  • the second transformation unit 1202 is configured to, when the LFNST index number indicates that the current block uses LFNST, use LFNST to process the transformation coefficient matrix of the current block to obtain an LFNST output coefficient matrix;
  • the second determining unit 1203 is configured to determine the scanning order of LFNST coefficients used by the current block according to the MIP parameters;
  • the second construction unit 1204 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.
  • the MIP parameter includes a MIP transposition indicator parameter, wherein the value of the MIP transposition indicator parameter is used to indicate whether to transpose the sampling point input vector used in the MIP mode.
  • the decoder 120 may further include a second transposition unit 1205, configured to perform transposition processing on the sampling point input vector used in the MIP mode when the value of the MIP transposition indication parameter indicates , Setting the LFNST coefficient scanning sequence to the vertical scanning sequence; and when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is not to be transposed, the LFNST coefficient scanning sequence is set It is the horizontal scanning sequence.
  • a second transposition unit 1205 configured to perform transposition processing on the sampling point input vector used in the MIP mode when the value of the MIP transposition indication parameter indicates , Setting the LFNST coefficient scanning sequence to the vertical scanning sequence; and when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is not to be transposed, the LFNST coefficient scanning sequence is set It is the horizontal scanning sequence.
  • the second transposition unit 1205 is further configured to set the LFNST coefficient scanning order when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is transposed. Is a horizontal scanning sequence; and when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is not to be transposed, the LFNST coefficient scanning sequence is set to the vertical scanning sequence.
  • the MIP parameters include a MIP mode index sequence number, wherein the MIP mode index sequence number is used to indicate the MIP mode used by the current block, and the MIP mode is used to indicate the MIP mode used to determine the current block.
  • the calculation and derivation method of intra prediction value is used to indicate the MIP mode used by the current block.
  • the decoder 120 may further include a second setting unit 1206, where:
  • the second determining unit 1203 is further configured to determine the value of the LFNST intra prediction mode index number according to the value of the MIP mode index number;
  • the second setting unit 1206 is configured to set the LFNST coefficient scanning order to be equal to the LFNST coefficient scanning order corresponding to the preset value of the LFNST intra prediction mode index number.
  • the second determining unit 1203 is further configured to use a first lookup table to determine the value of the LFNST intra prediction mode index number corresponding to the value of the MIP mode index number, wherein the first The look-up table contains at least one or more different MIP mode index numbers corresponding to two LFNST intra prediction mode index numbers with different values.
  • the second setting unit 1206 is further configured to set the LFNST coefficient scanning order equal to the LFNST coefficient scanning order corresponding to the preset value of the MIP mode index number.
  • the second determining unit 1203 is further configured to use a second look-up table to determine the LFNST coefficient scanning order corresponding to the value of the MIP mode index sequence number; wherein, the second look-up table contains at least the different One or more different MIP mode index numbers corresponding to the scanning sequence of the LFNST coefficients.
  • the second setting unit 1206 is further configured to set the LFNST coefficient scanning order to the horizontal scanning order when the value of the MIP mode index number is within a preset range of one or more integers; And when the value of the MIP mode index number is not within the preset range of one or more integers, the LFNST coefficient scanning order is set to the vertical scanning order.
  • the MIP parameter further includes a MIP transposition indicator parameter, and the value of the MIP transposition indicator parameter is used to indicate whether to transpose the sampling point input vector used in the MIP mode;
  • the second transposition unit 1205 is further configured to, when the value of the MIP transposition indication parameter indicates that the sampling point input vector used in the MIP mode is transposed, if the scanning order of the LFNST coefficients used in the current block is horizontal Scan order, the LFNST coefficient scan order used by the current block is set to the vertical scan order; and if the LFNST coefficient scan order used by the current block is the vertical scan order, the LFNST coefficient scan order used by the current block is set Set to horizontal scan order.
  • the decoder 120 may further include a second calculation unit 1207, where:
  • the second construction unit 1204 is configured to construct the intra prediction value of the current block according to the MIP parameter
  • the second transformation unit 1202 is configured to perform transformation processing different from LFNST on the first coefficient matrix to obtain the prediction difference of the current block;
  • the second calculation unit 1207 is configured to calculate the sum of the intra prediction value and the prediction difference, and use the sum as the reconstruction value of the current block.
  • a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, or it may also be non-modular.
  • the various components 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.
  • this embodiment provides a computer storage medium, which is applied to the decoder 120.
  • the computer storage medium stores a transformation program, and when the transformation program is executed by the second processor, any one of the preceding embodiments is implemented. The method described.
  • FIG. 13 shows an example of a specific hardware structure of the decoder 120 provided by an embodiment of the present application, which may include: a second communication interface 1301, a second memory 1302, and a Two processors 1303; the components are coupled together through the second bus system 1304.
  • the second bus system 1304 is used to implement connection and communication between these components.
  • the second bus system 1304 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the second bus system 1304 in FIG. 13. among them,
  • the second communication interface 1301 is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
  • the second memory 1302 is configured to store a computer program that can run on the second processor 1303;
  • the second processor 1303 is configured to execute: when the computer program is running:
  • the prediction mode parameter indicates that the current block uses MIP to determine the intra-frame prediction value, parse the code stream to determine the MIP 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.
  • the second processor 1303 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.
  • the hardware function of the second memory 1302 is similar to that of the first memory 1102, and the hardware function of the second processor 1303 is similar to that of the first processor 1103; it will not be described in detail here.
  • This embodiment provides a decoder, which may include a parsing unit, a second transformation unit, a second determination unit, and a second construction unit; in this way, for the current block in the MIP mode, since the LFNST transformation is being performed MIP parameters are introduced to make the selection of LFNST coefficient scanning order more flexible, which not only improves the applicability of LFNST technology to non-traditional intra prediction modes, but also improves decoding efficiency and at the same time improves video image quality.
  • the prediction mode parameter of the current block is first determined; when the prediction mode parameter indicates that the current block uses matrix-based intra prediction MIP to determine the intra prediction value, the MIP parameter is determined; and the MIP parameter is determined according to the MIP parameter Intra prediction value, calculate the prediction difference between the current block and the intra prediction value; then perform the first transformation on the prediction difference to obtain the first coefficient matrix; when the current block uses LFNST, according to the MIP parameter Determine the scan order of the LFNST coefficients used in the current block; then use the first coefficient matrix to construct the input coefficient matrix of LFNST according to the scan order of the LFNST coefficients; finally perform LFNST processing on the input coefficient matrix to obtain the transform coefficient matrix of the current block;
  • the secondary transformation is different from LFNST, and the LFNST coefficient scanning order includes a horizontal scanning order and a vertical scanning order.
  • the selection of LFNST coefficient scanning order is more flexible, which not only improves the applicability of LFNST technology to non-traditional intra prediction modes, It also improves the coding and decoding efficiency, while also improving the video image quality.

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

本申请实施例公开了一种变换方法、编码器、解码器以及存储介质,该方法包括:确定当前块的预测模式参数;当所述预测模式参数指示所述当前块使用基于矩阵的帧内预测MIP确定帧内预测值时,确定MIP参数;根据MIP参数,确定当前块的帧内预测值,计算当前块与所述帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当所述当前块使用低频不可分离二次变换LFNST时,根据所述MIP参数,确定当前块使用的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技术中关于扫描顺序的选择是根据帧内预测模式进行的,但是对于非传统帧内预测模式,在进行LFNST变换时缺乏可变性,降低了编码效率。
发明内容
本申请实施例提供一种变换方法、编码器、解码器以及存储介质,可以提高LFNST技术对非传统帧内预测模式的适用性,使得扫描顺序的选择更加灵活,从而能够提高编码效率。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种变换方法,应用于编码器,该方法包括:
确定当前块的预测模式参数;
当所述预测模式参数指示所述当前块使用基于矩阵的帧内预测MIP确定帧内预测值时,确定MIP参数;
根据所述MIP参数,确定所述当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;
对所述预测差值进行第一次变换,得到第一系数矩阵;
当所述当前块使用低频不可分离二次变换LFNST时,根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
对所述输入系数矩阵进行LFNST处理,得到所述当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
第二方面,本申请实施例提供了一种反变换方法,应用于解码器,该方法包括:
解析码流,确定当前块的预测模式参数;
当所述预测模式参数指示所述当前块使用MIP确定帧内预测值时,解析码流,确定MIP参数;
解析码流,确定所述当前块的变换系数矩阵和LFNST索引序号;
当所述LFNST索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
第三方面,本申请实施例提供了一种编码器,该编码器包括第一确定单元、第一计算单元、第一变换单元和第一构造单元;其中,
第一确定单元,配置为确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用MIP确定帧内预测值时,确定MIP参数;
第一计算单元,配置为根据所述MIP参数,确定所述当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;
第一变换单元,配置为对所述预测差值进行第一次变换,得到第一系数矩阵;
第一确定单元,还配置为当所述当前块使用LFNST时,根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
第一构造单元,配置为根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
第一变换单元,还配置为对所述输入系数矩阵进行LFNST处理,得到所述当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
第四方面,本申请实施例提供了一种编码器,该编码器包括第一存储器和第一处理器;其中,
第一存储器,用于存储能够在第一处理器上运行的计算机程序;
第一处理器,用于在运行所述计算机程序时,执行如第一方面所述的方法。
第五方面,本申请实施例提供了一种解码器,该解码器包括解析单元、第二变换单元、第二确定单元和第二构造单元;其中,
解析单元,配置为解析码流,确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用MIP确定帧内预测值时,解析码流,确定MIP参数;
解析单元,还配置为解析码流,确定所述当前块的变换系数矩阵和LFNST索引序号;
第二变换单元,配置为当所述LFNST索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
第二确定单元,配置为根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
第二构造单元,配置为根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
第六方面,本申请实施例提供了一种解码器,该解码器包括第二存储器和第二处理器;其中,
第二存储器,用于存储能够在第二处理器上运行的计算机程序;
第二处理器,用于在运行所述计算机程序时,执行如第二方面所述的方法。
第七方面,本申请实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如第一方面所述的方法、或者被第二处理器执行时实现如第二方面所述的方法。
本申请实施例提供了一种变换方法、编码器、解码器以及存储介质,通过确定当前块的预测模式参数;当预测模式参数指示当前块使用基于矩阵的帧内预测MIP确定帧内预测值时,确定MIP参数;根据MIP参数,确定当前块的帧内预测值,计算所当前块与帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当所述当前块使用LFNST时,根据所述MIP参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。这样,针对采用MIP模式的当前块来说,由于在进行LFNST变换时引入了MIP参数,使得LFNST系数扫描顺序的选择更加灵活,从而不仅提高了LFNST技术对非传统帧内预测模式的适用性,还提高了编解码效率,同时还能够提升视频图像质量。
附图说明
图1为相关技术方案提供的一种LFNST技术的应用位置示意图;
图2A为本申请实施例提供的一种视频编码系统的组成框图;
图2B为本申请实施例提供的一种视频解码系统的组成框图;
图3为本申请实施例提供的一种变换方法的流程示意图;
图4为本申请实施例提供的一种MIP预测过程的流程框图;
图5A为本申请实施例提供的一种水平扫描顺序的结构示意图;
图5B为本申请实施例提供的一种垂直扫描顺序的结构示意图;
图6为本申请实施例提供的一种LFNST技术矩阵乘法的计算过程的结构示意图;
图7A为相关技术方案提供的一种LFNST变换的结构框图;
图7B为相关技术方案提供的另一种LFNST变换的结构框图;
图7C为相关技术方案提供的又一种LFNST变换的结构框图;
图7D为相关技术方案提供的再一种LFNST变换的结构框图;
图8为本申请实施例提供的另一种变换方法的流程示意图;
图9为本申请实施例提供的一种LFNST具体过程的流程框图;
图10为本申请实施例提供的一种编码器的组成结构示意图;
图11为本申请实施例提供的一种编码器的具体硬件结构示意图;
图12为本申请实施例提供的一种解码器的组成结构示意图;
图13为本申请实施例提供的一种解码器的具体硬件结构示意图。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
在视频图像中,一般采用第一图像分量、第二图像分量和第三图像分量来表征编码块(Coding Block,CB);其中,这三个图像分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量,具体地,亮度分量通常使用符号Y表示,蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。
在本申请实施例中,第一图像分量可以为亮度分量,第二图像分量可以为蓝色色度分量,第三图像分量可以为红色色度分量,但是本申请实施例不作具体限定。
下面将针对目前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技术中,由于变换矩阵与预测模式的方向特性相关,目前是根据帧内预测模式来选择扫描顺序的。这里,对于扫描顺序来说,在编码器侧,是指将二维一次变换系数填充到一维一次变换系数向量的扫描顺序,而在解码器侧,是指将一维一次变换系数向量填充到二维反一次变换系数矩阵的扫描顺序。其中,对于传统帧内预测模式,可以根据传统帧内预测模式的编号来确定帧内预测模式指示符(可以用predModeIntra表示)的取值,然后根据predModeIntra的取值来确定扫描顺序为水平扫描顺序还是垂直扫描顺序;但是对于非传统帧预测模式,尤其是基于矩阵的帧内预测(Matrix-based Intra Prediction,MIP)模式,是将predModeIntra的取值直接设置为指示PLANAR模式对应的帧内预测模式索引序号(即0),致使MIP模式下当前块只能选择水平扫描顺序,使得采用MIP模式下当前块在进行LFNST变换时缺乏可变性,从而导致LFNST技术不能很好地适用于MIP模式,并且还降低了编码效率。
本申请实施例提供了一种变换方法,应用于编码器。通过确定当前块的预测模式参数;当预测模式参数指示当前块使用基于矩阵的帧内预测MIP确定帧内预测值时,确定MIP参数;根据MIP参数,确定当前块的帧内预测值,计算所当前块与帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当所述当前块使用LFNST时,根据所述MIP参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST 系数扫描顺序包括水平扫描顺序和垂直扫描顺序。这样,针对采用MIP模式的当前块来说,由于在进行LFNST变换时引入了MIP参数,使得LFNST系数扫描顺序的选择更加灵活,从而不仅提高了LFNST技术对非传统帧内预测模式的适用性,还提高了编解码效率,同时还能够提升视频图像质量。
下面将结合附图对本申请各实施例进行详细说明。
参见图2A,其示出了本申请实施例提供的一种视频编码系统的组成框图示例;如图2A所示,该视频编码系统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中。
参见图2B,其示出了本申请实施例提供的一种视频解码系统的组成框图示例;如图2B所示,该视频解码系统20包括解码单元201、反变换与反量化单元202、帧内预测单元203、运动补偿单元204、滤波单元205和解码图像缓存单元206等,其中,解码单元201可以实现头信息解码以及CABAC解码,滤波单元205可以实现去方块滤波以及SAO滤波。输入的视频信号经过图2A的编码处理之后,输出该视频信号的码流;该码流输入视频解码系统20中,首先经过解码单元201,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元202进行处理,以便在像素域中产生残差块;帧内预测单元203可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元204是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换与反量化单元202的残差块与由帧内预测单元203或运动补偿单元204产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过滤波单元205以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元206中,解码图像缓存单元206存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。
本申请实施例中的变换方法,可以应用在如图2A所示的变换与量化单元101部分,该变换与量化单元101包括有图1所示的正一次变换单元11和量化单元12,这时候该变换方法具体应用在变换与量化之间的部分。另外,本申请实施例中的变换方法,还可以应用在如图2A所示的反变换与反量化单元106部分或者如图2B所示的反变换与反量化单元202部分,无论是反变换与反量化单元106还是反变换与反量化单元202,均可以包括有图1所示的反量化单元13和反一次变换单元14,这时候该变换方法具体应用在反量化与反变换之间的部分。也就是说,本申请实施例中的变换方法,既可以应用于视频编码系统,也可以应用于视频解码系统,甚至还可以同时应用于视频编码系统和视频解码系统,但是本申请实施例不作具体限定。还需要说明的是,当该变换方法应用于视频编码系统时,“当前块”具体是指帧内预测中的当前编码块;当该变换方法应用于视频解码系统时,“当前块”具体是指帧内预测中的当前解码块。
基于上述图2A的应用场景示例,参见图3,其示出了本申请实施例提供的一种变换方法的流程示意图。如图3所示,该方法可以包括:
S301:确定当前块的预测模式参数;
需要说明的是,视频图像可以划分为多个图像块,每个当前待编码的图像块可以称为编码块(Coding Block,CB)。这里,每个编码块可以包括第一图像分量、第二图像分量和第三图像分量;而当前块为视频图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的编码块。
其中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。
还需要说明的是,预测模式参数指示了当前块的编码模式及该模式相关的参数。通常可以采用率失真优化(Rate Distortion Optimization,RDO)的方式确定当前块的预测模式参数。
具体地,在一些实施例中,对于S301来说,所述确定当前块的预测模式参数,可以包括:
确定当前块的待预测图像分量;
基于所述当前块的参数,利用多种预测模式分别对所述待预测图像分量进行预测编码,计算多种预测模式下每一种预测模式对应的率失真代价结果;
从计算得到的多个率失真代价结果中选取最小率失真代价结果,并将所述最小率失真代价结果对应的预测模式确定为所述当前块的预测模式参数。
也就是说,在编码器侧,针对当前块可以采用多种预测模式分别对待预测图像分量进行编码。这里,多种预测模式通常包括有传统帧内预测模式和非传统帧内预测模式,而传统帧内预测模式又可以包括有直流(Direct Current,DC)模式、平面(PLANAR)模式和角度模式等,非传统帧内预测模式又可以包括有MIP模式、跨分量线性模型预测(Cross-component Linear Model Prediction,CCLM)模式、帧内块复制(Intra Block Copy,IBC)模式和PLT(Palette)模式等。
这样,在利用多种预测模式分别对当前块进行编码之后,可以得到每一种预测模式对应的率失真代价结果;然后从所得到的多个率失真代价结果中选取最小率失真代价结果,并将该最小率失真代价结果对应的预测模式确定为当前块的预测模式参数;如此,最终可以使用所确定的预测模式对当前块进行编码,而且在这种预测模式下,可以使得预测残差小,能够提高编码效率。
S302:当所述预测模式参数指示当前块使用MIP确定帧内预测值时,确定MIP参数;
S303:根据所述MIP参数,确定当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;
需要说明的是,针对MIP模式,MIP预测的输入数据,包括有:当前块的位置(xTbCmp,yTbCmp)、当前块所应用的MIP预测模式(可以用modeId表示)、当前块的高度(用nTbH表示)、当前块的宽度(用nTbW表示)以及是否需要转置的转置处理指示标志(可以用isTransposed表示)等;MIP预测的输出数据,包括有:当前块的预测块,该预测块中像素坐标[x][y]所对应的帧内预测值为predSamples[x][y];其中,x=0,1,…,nTbW-1;y=0,1,…,nTbH-1。
具体地,如图4所示,MIP预测过程可以分为四个步骤:配置核心参数41、获取参考像素42、构造输入采样43以及生成预测值44。其中,对于配置核心参数41来说,根据帧内当前块的大小,可以将当前块划分为三类,用mipSizeId记录当前块的种类;而且不同种类的当前块,参考采样点数量和矩阵乘法输出采样点数量是不同的。对于获取参考像素42来说,预测当前块时,这时候当前块的上块和左块都是已编码的块,MIP技术的参考像素为当前块的上一行像素和左一列像素的重建值,获取当前块的上侧边相邻的参考像素(用refT表示)和左侧边相邻的参考像素(用refL表示)的过程即为参考像素的获取过程。对于构造输入采样43来说,该步骤用于矩阵乘法的输入,主要可以包括:获取参考采样431、构造参考采样缓冲区432和推导矩阵乘法输入采样433;其中,获取参考采样的过程为下采样过程,而构造参考采样缓冲区432又可以包括不需要转置时缓冲区的填充方式4321和需要转置时缓冲区的填充方式4322。对于生成预测值44来说,该步骤用于获取当前块的MIP预测值,主要可以包括:构造矩阵乘法输出采样块441、矩阵乘法输出采样嵌位442、矩阵乘法输出采样转置443和生成MIP最终预测值444;其中,构造矩阵乘法输出采样块441又可以包括获取权重矩阵4411、获取移位因子和偏移因子4412和矩阵乘法运算4413,生成MIP最终预测值444又可以包括生成不需要上采样的预测值4441和生成需要上采样的预测值4442。这样,在经过该四个步骤之后,可以得到当前块的帧内预测值。
如此,在确定出当前块的帧内预测值之后,可以根据当前块的像素真实值与帧内预测值进行差值计算,将计算得到的差值作为预测差值,便于后续针对预测差值进行变换处理。
进一步地,在MIP预测过程中,还需要确定出MIP参数。
在一些实施例中,MIP参数可以包括有MIP转置指示参数(可以用isTransposed表示);这里,MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理。
具体地,在MIP模式中,根据当前块左侧边相邻参考像素对应的参考采样值和上侧边相邻参考像 素对应的参考采样值,可以得到相邻参考采样集;如此,在得到相邻参考采样集之后,这时候可以构造一个输入参考样值集,即MIP模式使用的采样点输入向量。但是针对输入参考样值集的构造,在编码器侧和解码器侧的构造方式是有区别的,主要是和MIP转置指示参数的取值有关。
当应用于编码器侧时,仍然可以利用率失真优化的方式,确定MIP转置指示参数的取值,具体地,可以包括:
分别计算进行转置处理的第一代价值和不进行转置处理的第二代价值;
如果第一代价值小于第二代价值,这时候可以确定MIP转置指示参数的取值为1;
如果第一代价值不小于第二代价值,这时候可以确定MIP转置指示参数的取值为0。
进一步地,当所述MIP转置指示参数的取值为0时,在缓冲区内,可以将相邻参考采样集中上侧边对应的参考采样值存储在左侧边对应的参考采样值之前,这时候不需要进行转置处理,即不需要对MIP模式使用的采样点输入向量进行转置处理,可以直接将缓冲区确定为输入参考样值集;当所述MIP转置指示参数的取值为1时,在缓冲区内,可以将相邻参考采样集中上侧边对应的参考采样值存储在左侧边对应的参考采样值之后,这时候对所述缓冲区进行转置处理,即需要对MIP模式使用的采样点输入向量进行转置处理,然后将转置后的缓冲区确定为输入参考样值集。这样,在得到输入参考样值集之后,可以用于MIP模式下确定当前块对应的帧内预测值的过程。
还需要说明的是,在编码器侧,在确定出MIP转置指示参数的取值之后,还需要将所确定的MIP转置指示参数的取值写入码流中,便于后续在解码器侧进行解析处理。
在一些实施例中,MIP参数还可以包括MIP模式索引序号(可以用modeId表示),其中,MIP模式索引序号用于指示所述当前块使用的MIP模式,而MIP模式用于指示使用MIP确定所述当前块的帧内预测值的计算推导方式。
也就是说,在MIP模式中,由于MIP模式又可以包括有很多种,这多种MIP模式可以通过MIP模式索引序号进行区分,即不同的MIP模式具有不同的MIP模式索引序号;这样,根据使用MIP确定当前块的帧内预测值的计算推导方式,可以确定出具体的MIP模式,从而就可以得到对应的MIP模式索引序号;本申请实施例中,MIP模式索引序号的取值可以为0、1、2、3、4或5。
在一些实施例中,MIP参数还可以包括当前块的大小、宽高比等参数;其中,根据当前块的大小(即当前块的宽度和高度),还可以确定出当前块的类别(可以用mipSizeId表示)。
在一种实施方式中,根据当前块的大小,确定当前块的类别,可以包括:
如果当前块的宽度和高度均等于4,那么可以将mipSizeId的取值设置为0;
反之,如果当前块的宽度和高度之一等于4,或者当前块的宽度和高度均等于8,那么可以将mipSizeId的取值设置为1;
反之,如果当前块为其他大小的块,那么可以将mipSizeId的取值设置为2。
在另一种实施方式中,根据当前块的大小,确定当前块的类别,可以包括:
如果当前块的宽度和高度均等于4,那么可以将mipSizeId的取值设置为0;
反之,如果当前块的宽度和高度之一等于4,那么可以将mipSizeId的取值设置为1;
反之,如果当前块为其他大小的块,那么可以将mipSizeId的取值设置为2。
这样,在使用MIP确定帧内预测值的过程中,还可以确定出MIP参数,便于根据所确定的MIP参数来确定当前块使用的LFNST变换核(可以用kernel表示)。
S304:对所述预测差值进行第一次变换,得到第一系数矩阵;
S305:当所述当前块使用LFNST时,根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
需要说明的是,第一次变换为不同于LFNST的变换,第一系数矩阵可以为二维一次变换系数矩阵。这样,在确定出预测差值之后,首先会对预测差值进行第一次变换,以得到第一系数矩阵,即二维一次变换系数矩阵;然后会通过LFNST系数扫描顺序将二维一次变换系数矩阵转换为一维一次变换系数矩阵;再针对一维一次变换系数矩阵中的系数进行第二次变换(即LFNST处理),以得到LFNST变换系数矩阵,最后对LFNST变换系数矩阵进行量化和编码处理,将所得到的量化值写入视频码流中。
还需要说明的是,并不是任意的当前块都可以执行LFNST。只有当前块同时满足如下条件时,才可以对当前块进行LFNST。其中,这些条件包括:(a)当前块的宽度和高度均大于或等于4;(b)当前块的宽度和高度均小于或等于变换块的最大尺寸;(c)当前块或当前所在编码块的预测模式为帧内预测模式;(d)当前块的一次变换在水平方向和垂直方向上均为二维正向一次变换(DCT2);(e)当前块或当前块所在编码块的帧内预测模式为非MIP模式或者变换块的预测模式为MIP模式且变换块的宽度和高度均大于或等于16。也就是说,针对本申请实施例中的当前块,需要同时满足上述的五个条件。
进一步地,在确定当前块可以执行LFNST时,这时候还需要确定当前块使用的LFNST系数扫描 顺序。通常而言,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。这里,根据当前块或当前块所在编码块的编码参数,可以隐含推导出所选择的LFNST系数扫描顺序;比如在目前H.266/VVC中,根据当前块的帧内预测模式,可以确定出所选择的LFNST系数扫描顺序。
具体来讲,在获取到当前块的帧内预测模式之后,可以确定出帧内预测模式指示符(可以用predModeIntra表示)的取值,计算公式如下,
Figure PCTCN2019130127-appb-000001
其中,图像分量指示符(可以用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的取值:
i、当前块的预测模式为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];
ii、当前块的预测模式为MIP模式时,
可以直接将predModeIntra的取值设置为指示PLANAR模式的索引序号(即0)。
对于传统帧内预测模式(比如宽角度映射)来说,可以根据当前块的尺寸进行宽角度的映射,将传统帧内预测模式[0,66]扩展到[-14,80];具体的映射过程如下:
首先计算宽高比例因子(可以用whRatio表示),如下所示,
whRatio=Abs(Log2(nTbW/nTbH))           (2)
对于非正方形的当前块(即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 PCTCN2019130127-appb-000002
这里,当nLfnstSize为8时,这时候不将v[j]中的元素对应填充到d’[][]右下角4x4的子块,这一子块内仍然填充反量化后的系数,即这一部分所填充的值应该为0,如图5A所示;在图5A中,右下角4x4的子块采用灰色进行填充,该灰色填充的部分内仍然填充反量化后的系数,即这一部分所填充的值应该为0。
反之,如果predModeIntra的取值大于34,那么可以按照垂直扫描的顺序(即光栅扫描的转置顺序)将v[j]中的元素对应填充到d’[x][y]。其中,d’[x][y]内所填充的元素如下所示,
Figure PCTCN2019130127-appb-000003
这里,当nLfnstSize为8时,这时候不将v[j]中的元素对应填充到d’[][]右下角4x4的子块,这一子块内仍然填充反量化后的系数;即这一部分所填充的值应该为0,如图5B所示;在图5B中,右下角4x4的子块采用灰色进行填充,该灰色填充的部分内仍然填充反量化后的系数,即这一部分所填充的值应该为0。
在目前H.266/VVC中,针对MIP模式,由于将predModeIntra的取值设置为指示PLANAR模式的索引序号(即0),使得MIP模式下当前块所使用的扫描顺序只能选取水平扫描顺序,导致MIP模式下进行LFNST时缺乏可变性,降低了编码效率。而在本申请实施例中,可以结合MIP参数来确定当前块使用的LFNST系数扫描顺序,这时候可以选取水平扫描顺序,还可以选取垂直扫描顺序,使得MIP模式下进行LFNST时具备可变性,能够提高编码效率。
这里,MIP参数可以包括有MIP转置指示参数(可以用isTransposed表示)、MIP模式索引序号(可以用modeId表示)、当前块的大小、当前块的类别(可以用mipSizeId表示)等参数;下面将针对如何根据MIP参数来选取当前块使用的LFNST系数扫描顺序进行详细描述。
可选地,在一些实施例中,当MIP参数为MIP转置指示参数时,对于S305来说,当所述当前块使用LFNST时,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为垂直扫描顺序;
当所述MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为水平扫描顺序。
可选地,在一些实施例中,当MIP参数为MIP转置指示参数时,对于S305来说,当所述当前块使用LFNST时,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为垂直扫描顺序;
当所述MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为水平扫描顺序。
需要说明的是,由于MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理,而且LFNST系数扫描顺序包括有水平扫描顺序和垂直扫描顺序,这时候可以MIP转置指示参数的取值来选择当前块所使用的LFNST系数扫描顺序。
在一种实施方式中,当MIP转置指示参数的取值等于1,即MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,此时可以将LFNST系数扫描顺序设置为垂直扫描顺序;当MIP转置指示参数的取值等于0,即MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,此时可以将LFNST系数扫描顺序设置为水平扫描顺序。
在另一种实施方式中,当MIP转置指示参数的取值等于1,即MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,此时可以将LFNST系数扫描顺序设置为水平扫描顺序;当MIP转置指示参数的取值等于0,即MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,此时可以将LFNST系数扫描顺序设置为垂直扫描顺序。
可选地,在一些实施例中,当MIP参数为MIP模式索引序号时,对于S305来说,当所述当前块使用LFNST时,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
根据所述MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值;
将所述LFNST系数扫描顺序设置为等于预设的所述LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描顺序。
需要说明的是,MIP模式索引序号用于指示当前块使用的MIP模式,MIP模式则用于指示使用MIP确定所述当前块的帧内预测值的计算推导方式;也即,根据MIP模式索引序号,也可以确定出LFNST系数扫描顺序。
还需要说明的是,在确定出MIP模式索引序号之后,还可以将MIP模式索引序号转换为LFNST帧内预测模式索引序号(可以用predModeIntra表示)的取值;然后再根据predModeIntra的取值,确定出LFNST系数扫描顺序,比如水平扫描顺序或者垂直扫描顺序。
可选地,在一些实施例中,当MIP参数为MIP模式索引序号和MIP转置指示参数时,对于S305来说,当所述当前块使用LFNST时,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
根据所述MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值;
将所述LFNST系数扫描顺序设置为等于预设的所述LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描顺序;
当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,该方法还可以包括:
若所述当前块使用的LFNST系数扫描顺序是水平扫描顺序,则将所述当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序;
若所述当前块使用的LFNST系数扫描顺序是垂直扫描顺序,则将所述当前块使用的LFNST系数扫描顺序设置为水平扫描顺序。
需要说明的是,MIP模式索引序号用于指示当前块使用的MIP模式,MIP模式则用于指示使用MIP确定所述当前块的帧内预测值的计算推导方式;MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理;也即,还可以根据MIP转置指示参数和MIP模式索引序号的两者组合,以确定出LFNST系数扫描顺序。
具体地,根据MIP模式索引序号的不同,在某些MIP模式下,如果MIP转置指示参数的取值等于0,那么可以将当前块使用的LFNST系数扫描顺序设置为水平扫描顺序;如果MIP转置指示参数的取值等于1,那么可以将当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序;或者,在某些MIP模式下,如果MIP转置指示参数的取值等于0,那么可以将当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序;如果MIP转置指示参数的取值等于1,那么可以将当前块使用的LFNST系数扫描顺序设置为水平扫描顺序,本申请实施不作具体限定。
这样,在确定出MIP模式索引序号之后,还可以将MIP模式索引序号转换为LFNST帧内预测模式索引序号(可以用predModeIntra表示)的取值后,再根据predModeIntra的取值,确定出当前块使用的LFNST系数扫描顺序;并且当MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,这时候,如果当前块使用的LFNST系数扫描顺序是水平扫描顺序,那么可以将当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序;如果当前块使用的LFNST系数扫描顺序是垂直扫描顺序,那么可以将当前块使用的LFNST系数扫描顺序设置为水平扫描顺序。
还需要说明的是,针对上述的几种选取当前块使用的LFNST变换核的方式,实验结果表明,根据MIP转置指示参数和MIP模式索引序号的两者组合,所确定LFNST系数扫描顺序的性能最佳。
进一步地,当MIP参数中至少包括有MIP模式索引序号(modeId)时,在选取当前块使用的LFNST系数扫描顺序的过程中,对于LFNST帧内预测模式索引序号的取值,还可以通过查表的方式获得。
具体地,在一些实施例中,所述根据所述MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值,可以包括:
使用第一查找表确定所述MIP模式索引序号的取值对应的所述LFNST帧内预测模式索引序号的取值,其中,所述第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的MIP模式索引序号。
这里,第一查找表(Look-Up Table1,LUT1)用于反映MIP模式索引序号和LFNST帧内预测模式索引序号之间的对应关系,即在第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的MIP模式索引序号。
也就是说,不同的MIP模式可以对应不同的predModeIntra的取值;如此,根据MIP模式确定出MIP模式索引序号,然后根据第一查找表确定出predModeIntra的取值;再根据predModeIntra的取值,以确定出当前块使用的LFNST系数扫描顺序。
进一步地,还可以根据MIP模式索引序号的取值直接确定LFNST系数扫描顺序,这时候不再需要借助predModeIntra的取值,即不再需要根据MIP模式索引序号来确定LFNST帧内预测模式索引序号的取值。
在一些实施例中,当所述当前块使用LFNST时,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
将所述LFNST系数扫描顺序设置为等于预设的所述MIP模式索引序号的取值对应的LFNST系数扫描顺序。
可选地,在一些实施例中,该方法还可以包括:
使用第二查找表确定所述MIP模式索引序号的取值对应的LFNST系数扫描顺序;其中,所述第二查找表中,至少包含不同的所述LFNST系数扫描顺序各自对应的一个或多个不同的MIP模式索引序号。
可选地,在一些实施例中,该方法还可以包括:
当所述MIP模式索引序号的取值在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为水平扫描顺序;
当所述MIP模式索引序号的取值不在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为垂直扫描顺序。
需要说明的是,如果当前块使用的预测模式为MIP模式,那么可以根据MIP模式索引序号(modeId)的取值来确定所选择的LFNST系数扫描顺序;这里,MIP模式索引序号的取值可以包括有0、1、2、3、4、5。
在一种实施方式中,当MIP模式索引序号的取值为0时,可以将LFNST系数扫描顺序设置为水平扫描顺序;当MIP模式索引序号的取值为1时,可以将LFNST系数扫描顺序设置为垂直扫描顺序;当MIP模式索引序号的取值为2时,可以将LFNST系数扫描顺序设置为水平扫描顺序;当MIP模式索引序号的取值为3时,可以将LFNST系数扫描顺序设置为垂直扫描顺序等,本申请实施例不作具体限定。
在另一种实施方式中,当MIP模式索引序号的取值满足预设整数范围时,比如MIP模式索引序号的取值可以为0、1、2,可以将LFNST系数扫描顺序设置为水平扫描顺序;当MIP模式索引序号的取值不满足预设整数范围时,比如MIP模式索引序号的取值可以为3、4、5,可以将LFNST系数扫描顺序设置为垂直扫描顺序等,本申请实施例也不作具体限定。
除此之外,如果当前块的预测模式为MIP模式,可以根据MIP参数中的一种或多种信息组合,来选择LFNST系数扫描顺序;还可以是根据MIP参数进行与传统帧内预测模式之间的映射,然后根据所映射的角度,来选择LFNST系数扫描顺序。
进一步地,在一些实施例中,当预测模式参数指示当前块使用非MIP模式时,该方法还可以包括:
基于所述帧内预测模式,确定predModeIntra的取值;
若predModeIntra的取值小于或等于34,则将当前块使用的LFNST系数扫描顺序设置为水平扫描顺序;
若predModeIntra的取值大于34,则将当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序。
也就是说,如果当前块的预测模式为非MIP模式,这时候可以根据帧内预测模式,确定出predModeIntra的取值;然后根据predModeIntra的取值来确定当前块使用的LFNST系数扫描顺序。
还需要说明的是,当所述当前块使用LFNST时,该方法还可以包括:
将LFNST索引序号的取值设置为指示使用LFNST所对应的取值,并将所述LFNST索引序号的取值写入视频码流。
这样,在编码器侧,如果当前块使用LFNST,那么这时候可以将LFNST索引序号的取值设置为指示使用LFNST所对应的取值,并且将LFNST索引序号的取值写入视频码流;如此,在解码器侧,通过解析码流可以得到LFNST索引序号的取值,便于解码器侧能够确定出当前块使用LFNST。
S306:根据所述LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;
S307:对所述输入系数矩阵进行LFNST处理,得到所述当前块的变换系数矩阵。
需要说明的是,LFNST系数扫描顺序可以包括有水平扫描顺序和垂直扫描顺序。这样,在确定出LFNST系数扫描顺序之后,可以利用第一系数矩阵(即二维一次变换系数矩阵)来构造出LFNST的输入系数矩阵(即一维一次变换系数矩阵);然后对其进行LFNST处理,得到当前块的变换系数矩阵。
进一步地,LFNST是基于直接矩阵乘法方式来应用不可分离变换。为了尽可能减小计算复杂度和的存储空间,在LFNST变换中使用了简化的不可分变换技术。其中,简化的不可分变换技术的主要思想是将N维向量映射到不同空间中的R维向量,这里,N/R(R<N)为缩放因子;这时候简化的不可分变换技术所对应的变换矩阵为R×N矩阵,如下所示,
Figure PCTCN2019130127-appb-000004
这里,正向LFNST变换和反向LFNST变换所使用的变换矩阵互为转置关系,参见图6,其示出了本申请实施例提供的一种LFNST技术矩阵乘法的计算过程的结构示意图。如图6所示,(a)示出了正向LFNST变换的计算过程,由一次变换系数经过变换矩阵T之后,可以得到二次变换系数;(b)示出了反向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)。下面分别对其进行详细描述。
当TU等于4×4时,4×4的变换块对应的正向LFNST过程如图7A所示。其中,在图7A中,白色块为预测差值,灰色块为一次变换系数,黑色块为二次变换系数;这里,在“0”示例的位置上,编码器将变换系数设置为0。对于4×4的变换块,正向LFNST时,使用的变换矩阵大小为8×16,当前变换块内的4×4个一次变换系数全部作为输入,输出为4×2个二次变换系数。
当TU等于4×N或N×4(N>4)时,4×N或N×4的变换块对应的正向LFNST过程如图7B所示。其中,在图7B中,白色块为预测差值,灰色块为一次变换系数,黑色块为二次变换系数;这里,对于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过程如图7C所示。其中,在图7C中,白色块为预测差值,灰色块为一次变换系数,黑色块为二次变换系数;对于8×8的变换块,正向LFNST时,使用的变换矩阵大小为8×48,当前变换块内的前三个4×4子块(即位于左上角的三个子块)的一次变换系数作为输入,输出为4×2个二次变换系数。这里,在“0”示例的位置上,编码器将变换系数仍然设置为0。
当TU大于8×8时,大于8×8的变换块对应的正向LFNST过程如图7D所示。其中,在图7D中,白色块为预测差值,灰色块为一次变换系数,黑色块为二次变换系数;对于大于8×8的变换块,正向LFNST时,使用的变换矩阵大小为48×16,当前变换块内的前三个4×4子块(即位于左上角的三个子块)的一次变换系数作为输入,输出为4×4个二次变换系数。这里,在“0”示例的位置上,编码器将变换系数仍然设置为0。
这样,预测差值所对应的TU无论是4×4大小,还是4×N或N×4(N>4)大小、或者8×8大小,甚至还可以大于8×8大小,这时候可以按照图7A或者图7B或者图7C或者图7D来实现对预测差值的一次变换以及LFNST的二次变换等相关处理。
在本申请实施例中,可以提高LFNST技术对使用MIP模式的当前块的适用性,使得扫描顺序的选取更加灵活。通过在使用MIP模式的当前块进行LFNST过程中引入了MIP参数的相关信息,并根据这些MIP信息判断当前块的特性,进而选择出扫描顺序。例如,该变换方法应用在VTM7.0上,以24帧间隔在All Intra条件下进行测试,基于同等峰值信噪比(Peak Signal to Noise Ratio,PSNR)下的平均码率变化,这时候可以在三个图像分量(即Y、Cb和Cr)上分别获得-0.03%、0.00%和-0.01%的BD-rate变化;尤其是在大分辨率的序列上,将会有更好的性能表现,具体地,在Class A1上可以达到Y有-0.10%的BD-rate变化,从而提高了编码效率。
本实施例提供了一种变换方法,应用于编码器。通过确定当前块的预测模式参数;当预测模式参数指示当前块使用基于矩阵的帧内预测MIP确定帧内预测值时,确定MIP参数;根据MIP参数,确定当前块的帧内预测值,计算所当前块与帧内预测值之间的预测差值;对预测差值进行第一次变换,得到第一系数矩阵;当所述当前块使用LFNST时,根据所述MIP参数,确定当前块使用的LFNST系数扫描顺序;根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。这样,针对采用MIP模式的当前块来说,由于在进行LFNST变换时引入了MIP参数,使得LFNST系数扫描顺序的选择更加灵活,从而不仅提高了LFNST技术对非传统帧内预测模式的适用性,还提高了编码效率,同时还能够提升视频图像质量。
基于上述图2B的应用场景示例,参见图8,其示出了本申请实施例提供的另一种变换方法的流程示意图。如图8所示,该方法可以包括:
S801:解析码流,确定当前块的预测模式参数;
需要说明的是,预测模式参数指示了当前块的编码模式及该模式相关的参数。其中,预测模式通常包括有传统帧内预测模式和非传统帧内预测模式,而传统帧内预测模式又可以包括有DC模式、PLANAR模式和角度模式等,非传统帧内预测模式又可以包括有MIP模式、CCLM模式、IBC模式和 PLT模式等。
还需要说明的是,在编码器侧,会针对当前块进行预测编码,在这过程中就可以确定出当前块的预测模式,并将相应的预测模式参数写入码流,由编码器传输到解码器。
在解码器侧,通过解析码流可以获取到当前块或者当前块所在编码块的亮度或色度分量的帧内预测模式,这时候可以确定出predModeIntra的取值,计算公式如前述式(1)。
在式(1)中,图像分量指示符(可以用cIdx表示)用于指示当前块的亮度分量或色度分量;这里,如果当前块预测的为亮度分量,那么cIdx等于0;如果当前块预测的为色度分量,那么cIdx等于1。另外,(xTbY,yTbY)是当前块左上角采样点的坐标,IntraPredModeY[xTbY][yTbY]为亮度分量的帧内预测模式,IntraPredModeC[xTbY][yTbY]为色度分量的帧内预测模式。
S802:当所述预测模式参数指示所述当前块使用MIP确定帧内预测值时,解析码流,确定MIP参数;
需要说明的是,MIP参数可以包括有MIP转置指示参数(可以用isTransposed表示)、MIP模式索引序号(可以用modeId表示)、当前块的大小、当前块的类别(可以用mipSizeId表示)等参数;这些参数的取值可以通过解析码流得到。
在一些实施例中,通过解析码流,可以确定isTransposed的取值;当isTransposed的取值等于1时,需要对MIP模式使用的采样点输入向量进行转置处理;当isTransposed的取值等于0时,不需要对MIP模式使用的采样点输入向量进行转置处理;也就是说,MIP转置指示参数可以用于指示是否对MIP模式使用的采样点输入向量进行转置处理。
在一些实施例中,通过解析码流,还可以确定MIP模式索引序号(可以用modeId表示);其中,MIP模式索引序号可以用于指示当前块使用的MIP模式,MIP模式可以用于指示使用MIP确定当前块的帧内预测值的计算推导方式。也就是说,不同的MIP模式,其对应的MIP模式索引序号的取值是不同的;这里,MIP模式索引序号的取值可以为0、1、2、3、4或5。
在一些实施例中,通过解析码流,还可以确定当前块的大小、宽高比、当前块的类别(可以用mipSizeId表示)等参数信息。这样,在确定出MIP参数之后,以方便后续根据所确定的MIP参数来选择当前块使用的LFNST系数扫描顺序。
S803:解析码流,确定所述当前块的变换系数矩阵和LFNST索引序号;
需要说明的是,LFNST索引序号的取值可以用于指示当前块是否使用LFNST。具体地,在解析出LFNST索引序号之后,当LFNST索引序号的取值等于0时,表明了当前块不使用LFNST;而当LFNST索引序号的取值大于0时,表明了当前块使用LFNST,这时候可以对当前块的变换系数矩阵使用LFNST进行处理。
S804:当所述LFNST索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
需要说明的是,在解码器侧,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。
具体地,如图9所示,LFNST具体过程可以分为四个步骤:配置核心参数91、帧内预测模式映射92、选择变换矩阵93、计算矩阵乘法94和构造一次变换系数矩阵95等五个步骤。其中,对于帧内预测模式映射92来说,该步骤用于确定predModeIntra的取值,主要可以包括:非传统帧内预测模式映射921和宽角度映射922;对于选择变换矩阵93来说,该步骤用于选择出变换集以及变换矩阵,主要可以包括:选择变换集931、选择变换矩阵组别932和选择变换矩阵尺寸933。
对于配置核心参数91来说,首先需要配置进行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等参数配置的,公式如下,
nLfnstOutSzie=(nTbW>=8&&nTbH>=8)?48:16                        (6)
nonZeroSize=(nTbW==4&&nTbH==4)||(nTbW==8&&nTbH==8)?8:16       (7)
除此之外,还需要配置参数nLfnstSize,表示当前块内仅前nLfnstSize×nLfnstSize范围内会存在有一次变换系数,nLfnstSize的取值如下所示,
Log2LfnstSize=(nTbW>=8&&nTbH>=8)?3:2                               (8)
nLfnstSize=1<<Log2LfnstSize                                        (9)
这时候通过解析码流,还可以获取到当前块或者当前块所在编码块的亮度或色度分量的帧内预测模式,这时候可以确定出predModeIntra的取值,计算公式如前述式(1)。
进一步地,获取二次变化系数的向量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]                                   (10)
yC=DiagScanOrder[2][2][x][1]                                   (11)
u[i]=d[xC][yC]                                                 (12)
进一步地,对于帧内预测模式映射92来说,帧内预测模式又可以划分为传统帧内预测模式和非传统帧内预测模式。对于非传统帧内预测模式来说,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的取值:
i、当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];
ii、当intra_mip_flag[xTbY][yTbY]等于1而且cIdx等于0时,即当前块的预测模式为MIP模式,可以直接将predModeIntra的取值设置为指示PLANAR模式的索引序号(即0)。
对于传统帧内预测模式(比如宽角度映射)来说,在解析码流的过程中,还可以根据当前块的尺寸进行宽角度的映射,将传统帧内预测模式[0,66]扩展到[-14,80];具体的映射过程如下:
首先计算宽高比例因子(可以用whRatio表示),如上述的式(2)所示。然后对于非正方形的当前块(即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所示。
表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变换集中包括有四个变换核候选集(set0,set1,set2,set3),分别对应于SetIdx的取值为0、1、2、3。这样,由于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 PCTCN2019130127-appb-000005
这里,Clip3为嵌位工作,可以将系数的值限制在下面的两个数之间,如下所示,
CoeffMin=-(1<<15)                                         (14)
CoeffMax=(1<<15)-1                                        (15)
如此,经过上述矩阵计算之后,可以实现对变换系数的变换处理。这里,对于4×4LFNST,在解码器侧,将会输入16个或8个系数,会输出16个系数;而对于8×8LFNST,在解码器侧,将会输入16个或8个系数,会输出48个系数,以实现对变换系数的LFNST变换处理,可以得到LFNST输出系数矩阵。
S805:根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
这里,MIP参数可以包括有MIP转置指示参数(可以用isTransposed表示)、MIP模式索引序号(可以用modeId表示)、当前块的大小、当前块的类别(可以用mipSizeId表示)等参数;下面将针对如何根据MIP参数来选取当前块使用的LFNST变换核进行详细描述。
可选地,在一些实施例中,当MIP参数为MIP转置指示参数时,对于S805来说,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为垂直扫描顺序;
当所述MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为水平扫描顺序。
可选地,在一些实施例中,当MIP参数为MIP转置指示参数时,对于S805来说,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为垂直扫描顺序;
当所述MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为水平扫描顺序。
需要说明的是,由于MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理,那么通过解析码流,获取到MIP转置指示参数的取值之后,可以MIP转置指示参数的 取值来选择当前块所使用的LFNST系数扫描顺序。
在一种实施方式中,当MIP转置指示参数的取值等于1,即MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,此时可以将LFNST系数扫描顺序设置为垂直扫描顺序;当MIP转置指示参数的取值等于0,即MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,此时可以将LFNST系数扫描顺序设置为水平扫描顺序。
在另一种实施方式中,当MIP转置指示参数的取值等于1,即MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,此时可以将LFNST系数扫描顺序设置为水平扫描顺序;当MIP转置指示参数的取值等于0,即MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,此时可以将LFNST系数扫描顺序设置为垂直扫描顺序。
可选地,在一些实施例中,当MIP参数为MIP模式索引序号时,对于S805来说,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
根据所述MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值;
将所述LFNST系数扫描顺序设置为等于预设的所述LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描顺序。
需要说明的是,MIP模式索引序号用于指示当前块使用的MIP模式,MIP模式则用于指示使用MIP确定所述当前块的帧内预测值的计算推导方式;也即,根据MIP模式索引序号,也可以确定出LFNST系数扫描顺序。
还需要说明的是,通过解析码流,获取到MIP模式索引序号之后,还可以将MIP模式索引序号转换为LFNST帧内预测模式索引序号(可以用predModeIntra表示)的取值;然后再根据predModeIntra的取值,确定出LFNST系数扫描顺序,比如水平扫描顺序或者垂直扫描顺序。
可选地,在一些实施例中,当MIP参数为MIP模式索引序号和MIP转置指示参数时,对于S805来说,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
根据所述MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值;
将所述LFNST系数扫描顺序设置为等于预设的所述LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描顺序;
当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,该方法还可以包括:
若所述当前块使用的LFNST系数扫描顺序是水平扫描顺序,则将所述当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序;
若所述当前块使用的LFNST系数扫描顺序是垂直扫描顺序,则将所述当前块使用的LFNST系数扫描顺序设置为水平扫描顺序。
需要说明的是,MIP模式索引序号用于指示当前块使用的MIP模式,MIP模式则用于指示使用MIP确定所述当前块的帧内预测值的计算推导方式;MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理;也即,还可以根据MIP转置指示参数和MIP模式索引序号的两者组合,以确定出LFNST系数扫描顺序。
这样,在获取到MIP模式索引序号之后,还可以将MIP模式索引序号转换为LFNST帧内预测模式索引序号(可以用predModeIntra表示)的取值后,再根据predModeIntra的取值,确定出当前块使用的LFNST系数扫描顺序;并且当MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,这时候,如果当前块使用的LFNST系数扫描顺序是水平扫描顺序,那么可以将当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序;如果当前块使用的LFNST系数扫描顺序是垂直扫描顺序,那么可以将当前块使用的LFNST系数扫描顺序设置为水平扫描顺序。
还需要说明的是,针对上述的几种选取当前块使用的LFNST变换核的方式,实验结果表明,根据MIP转置指示参数和MIP模式索引序号的两者组合,所确定LFNST系数扫描顺序的性能最佳。
进一步地,当MIP参数中至少包括有MIP模式索引序号(modeId)时,在选取当前块使用的LFNST系数扫描顺序的过程中,对于LFNST帧内预测模式索引序号的取值,还可以通过查表的方式获得。
具体地,在一些实施例中,所述根据所述MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值,可以包括:
使用第一查找表确定所述MIP模式索引序号的取值对应的所述LFNST帧内预测模式索引序号的取值,其中,所述第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的MIP模式索引序号。
这里,第一查找表(Look-Up Table1,LUT1)用于反映MIP模式索引序号和LFNST帧内预测模式索引序号之间的对应关系,即在第一查找表中,至少包含两个不同取值的LFNST帧内预测模式索引序 号各自所对应的一个或多个不同的MIP模式索引序号。
也就是说,不同的MIP模式可以对应不同的predModeIntra的取值;如此,根据MIP模式确定出MIP模式索引序号,然后根据第一查找表确定出predModeIntra的取值;再根据predModeIntra的取值,以确定出当前块使用的LFNST系数扫描顺序。
进一步地,还可以根据MIP模式索引序号的取值直接确定LFNST系数扫描顺序,这时候不再需要借助predModeIntra的取值,即不再需要根据MIP模式索引序号来确定LFNST帧内预测模式索引序号的取值。
在一些实施例中,当所述当前块使用LFNST时,所述根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序,可以包括:
将所述LFNST系数扫描顺序设置为等于预设的所述MIP模式索引序号的取值对应的LFNST系数扫描顺序。
可选地,在一些实施例中,该方法还可以包括:
使用第二查找表确定所述MIP模式索引序号的取值对应的LFNST系数扫描顺序;其中,所述第二查找表中,至少包含不同的所述LFNST系数扫描顺序各自对应的一个或多个不同的MIP模式索引序号。
可选地,在一些实施例中,该方法还可以包括:
当所述MIP模式索引序号的取值在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为水平扫描顺序;
当所述MIP模式索引序号的取值不在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为垂直扫描顺序。
需要说明的是,如果当前块使用的预测模式为MIP模式,那么可以根据MIP模式索引序号(modeId)的取值来确定所选择的LFNST系数扫描顺序;这里,MIP模式索引序号的取值可以包括有0、1、2、3、4、5。
在一种实施方式中,当MIP模式索引序号的取值为0时,可以将LFNST系数扫描顺序设置为水平扫描顺序;当MIP模式索引序号的取值为1时,可以将LFNST系数扫描顺序设置为垂直扫描顺序;当MIP模式索引序号的取值为2时,可以将LFNST系数扫描顺序设置为水平扫描顺序;当MIP模式索引序号的取值为3时,可以将LFNST系数扫描顺序设置为垂直扫描顺序等,本申请实施例不作具体限定。
在另一种实施方式中,当MIP模式索引序号的取值满足预设整数范围时,比如MIP模式索引序号的取值可以为0、1、2,可以将LFNST系数扫描顺序设置为水平扫描顺序;当MIP模式索引序号的取值不满足预设整数范围时,比如MIP模式索引序号的取值可以为3、4、5,可以将LFNST系数扫描顺序设置为垂直扫描顺序等,本申请实施例也不作具体限定。
除此之外,如果当前块的预测模式为MIP模式,可以根据MIP参数中的一种或多种信息组合,来选择LFNST系数扫描顺序;还可以是根据MIP参数进行与传统帧内预测模式之间的映射,然后根据所映射的角度,来选择LFNST系数扫描顺序。
还需要注意的是,如果当前块的预测模式为MIP模式,也可以根据MIP参数中的一种或多种信息组合,来选择LFNST系数扫描顺序;还可以是根据MIP参数进行与传统帧内预测模式之间的映射,然后根据所映射的角度,来选择LFNST系数扫描顺序,本申请实施例不作具体限定。
进一步地,在一些实施例中,当预测模式参数指示当前块使用非MIP模式时,该方法还可以包括:
基于所述帧内预测模式,确定predModeIntra的取值;
若predModeIntra的取值小于或等于34,则将当前块使用的LFNST系数扫描顺序设置为水平扫描顺序;
若predModeIntra的取值大于34,则将当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序。
也就是说,如果当前块的预测模式为非MIP模式,这时候可以根据帧内预测模式,确定出predModeIntra的取值;然后根据predModeIntra的取值来确定当前块使用的LFNST系数扫描顺序。
S806:根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵。
需要说明的是,LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。另外,在确定出LFNST系数扫描顺序之后,可以使用LFNST输出系数矩阵构造出第一系数矩阵;这里,第一系数矩阵可以为二维一次变换系数矩阵。
在一些实施例中,在S806之后,该方法还可以包括:
根据所述MIP参数,构造所述当前块的帧内预测值;
对所述第一系数矩阵进行不同于LFNST的变换处理,得到所述当前块的预测差值;
计算所述帧内预测值和所述预测差值的和值,将所述和值作为所述当前块的重建值。
也就是说,在构造出第一系数矩阵之后,可以对第一系数矩阵进行第一次变换,以得到当前块的预 测差值;这里,第一次变换为不同于LFNST的变换处理。另外,通过解析码流确定出当前块的预测模式参数之后,如果预测模式为MIP模式,还可以根据MIP模式对当前块进行预测处理,以得到当前块的帧内预测值;进而根据帧内预测值和预测差值进行求和处理,然后将所得到的和值作为当前块的重建值,也就实现了对当前块的编解码处理,并且能够恢复出当前块的原始值。
在本申请实施例中,可以提高LFNST技术对使用MIP模式的当前块的适用性,使得扫描顺序的选取更加灵活。通过在使用MIP模式的当前块进行LFNST过程中引入了MIP参数的相关信息,并根据这些MIP信息判断当前块的特性,进而选择出扫描顺序。例如,该变换方法应用在VTM7.0上,以24帧间隔在All Intra条件下进行测试,基于同等峰值信噪比(Peak Signal to Noise Ratio,PSNR)下的平均码率变化,这时候可以在三个图像分量(即Y、Cb和Cr)上分别获得-0.03%、0.00%和-0.01%的BD-rate变化;尤其是在大分辨率的序列上,将会有更好的性能表现,具体地,在Class A1上可以达到Y有-0.10%的BD-rate变化,从而提高了解码效率。
本实施例提供了一种变换方法,应用于解码器。通过解析码流,确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用MIP确定帧内预测值时,解析码流,确定MIP参数;解析码流,确定所述当前块的变换系数矩阵和LFNST索引序号;当所述LFNST索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。这样,针对采用MIP模式的当前块来说,由于在进行LFNST变换时引入了MIP参数,使得LFNST系数扫描顺序的选择更加灵活,从而不仅提高了LFNST技术对非传统帧内预测模式的适用性,还提高了解码效率,同时还能够提升视频图像质量。
基于前述实施例相同的发明构思,参见图10,其示出了本申请实施例提供的一种编码器100的组成结构示意图。如图10所示,该编码器100可以包括:第一确定单元1001、第一计算单元1002、第一变换单元1003和第一构造单元1004;其中,
第一确定单元1001,配置为确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用MIP确定帧内预测值时,确定MIP参数;
第一计算单元1002,配置为根据所述MIP参数,确定所述当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;
第一变换单元1003,配置为对所述预测差值进行第一次变换,得到第一系数矩阵;
第一确定单元1001,还配置为当所述当前块使用LFNST时,根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
第一构造单元1004,配置为根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
第一变换单元1003,还配置为对所述输入系数矩阵进行LFNST处理,得到所述当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
在上述方案中,所述MIP参数包括MIP转置指示参数,其中,所述MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理。
在上述方案中,参见图10,编码器100还可以包括第一转置单元1005,配置为当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为垂直扫描顺序;以及当所述MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为水平扫描顺序。
在上述方案中,第一转置单元1005,还配置为当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为水平扫描顺序;以及当所述MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为垂直扫描顺序。
在上述方案中,所述MIP参数包括MIP模式索引序号,其中,所述MIP模式索引序号用于指示所述当前块使用的MIP模式,所述MIP模式用于指示使用MIP确定所述当前块的帧内预测值的计算推导方式。
在上述方案中,参见图10,编码器100还可以包括第一设置单元1006,其中,
第一确定单元1001,还配置为根据所述MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值;
第一设置单元1006,配置为将所述LFNST系数扫描顺序设置为等于预设的所述LFNST帧内预测 模式索引序号的取值对应的LFNST系数扫描顺序。
在上述方案中,第一确定单元1001,还配置为使用第一查找表确定所述MIP模式索引序号的取值对应的所述LFNST帧内预测模式索引序号的取值,其中,所述第一查找表至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的MIP模式索引序号。
在上述方案中,第一设置单元1006,还配置为将所述LFNST系数扫描顺序设置为等于预设的所述MIP模式索引序号的取值对应的LFNST系数扫描顺序。
在上述方案中,第一确定单元1001,还配置为使用第二查找表确定所述MIP模式索引序号的取值对应的LFNST系数扫描顺序;其中,所述第二查找表至少包含不同的所述LFNST系数扫描顺序各自对应的一个或多个不同的MIP模式索引序号。
在上述方案中,第一设置单元1006,还配置为当所述MIP模式索引序号的取值在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为水平扫描顺序;以及当所述MIP模式索引序号的取值不在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为垂直扫描顺序。
在上述方案中,所述MIP参数还包括MIP转置指示参数,所述MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理;
第一转置单元1005,还配置为当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,若所述当前块使用的LFNST系数扫描顺序是水平扫描顺序,则将所述当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序;以及若所述当前块使用的LFNST系数扫描顺序是垂直扫描顺序,则将所述当前块使用的LFNST系数扫描顺序设置为水平扫描顺序。
在上述方案中,第一设置单元1006,还配置为将LFNST索引序号的取值设置为指示使用LFNST所对应的取值,并将所述LFNST索引序号的取值写入视频码流。
可以理解地,在本申请实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
因此,本申请实施例提供了一种计算机存储介质,应用于编码器100,该计算机存储介质存储有变换程序,所述变换程序被第一处理器执行时实现前述实施例中任一项所述的方法。
基于上述编码器100的组成以及计算机存储介质,参见图11,其示出了本申请实施例提供的编码器100的具体硬件结构示例,可以包括:第一通信接口1101、第一存储器1102和第一处理器1103;各个组件通过第一总线系统1104耦合在一起。可理解,第一总线系统1104用于实现这些组件之间的连接通信。第一总线系统1104除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图11中将各种总线都标为第一总线系统1104。其中,
第一通信接口1101,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第一存储器1102,用于存储能够在第一处理器1103上运行的计算机程序;
第一处理器1103,用于在运行所述计算机程序时,执行:
确定当前块的预测模式参数;
当所述预测模式参数指示所述当前块使用基于矩阵的帧内预测MIP确定帧内预测值时,确定MIP参数;
根据所述MIP参数,确定所述当前块的帧内预测值,计算所述当前块与所述帧内预测值之间的预测差值;
对所述预测差值进行第一次变换,得到第一系数矩阵;
当所述当前块使用低频不可分离二次变换LFNST时,根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
根据所述LFNST系数扫描顺序,使用所述第一系数矩阵构造LFNST的输入系数矩阵;
对所述输入系数矩阵进行LFNST处理,得到所述当前块的变换系数矩阵;其中,所述第一次变换是不同于LFNST的变换,所述LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。
可以理解,本申请实施例中的第一存储器1102可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1102旨在包括但不限于这些和任意其它适合类型的存储器。
而第一处理器1103可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1103中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1103可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器1102,第一处理器1103读取第一存储器1102中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可选地,作为另一个实施例,第一处理器1103还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
本实施例提供了一种编码器,该编码器可以包括第一确定单元、第一计算单元、第一变换单元和第一构造单元;这样,针对采用MIP模式的当前块来说,由于在进行LFNST变换时引入了MIP参数,使得LFNST系数扫描顺序的选择更加灵活,从而不仅提高了LFNST技术对非传统帧内预测模式的适用性,还提高了编码效率,同时还能够提升视频图像质量。
基于前述实施例相同的发明构思,参见图12,其示出了本申请实施例提供的一种解码器120的组成结构示意图。如图12所示,该解码器120可以包括:解析单元1201、第二变换单元1202、第二确定单元1203和第二构造单元1204;其中,
解析单元1201,配置为解析码流,确定当前块的预测模式参数;以及当所述预测模式参数指示所述当前块使用MIP确定帧内预测值时,解析码流,确定MIP参数;
解析单元1201,还配置为解析码流,确定所述当前块的变换系数矩阵和LFNST索引序号;
第二变换单元1202,配置为当所述LFNST索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
第二确定单元1203,配置为根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
第二构造单元1204,配置为根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
在上述方案中,所述MIP参数包括MIP转置指示参数,其中,所述MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理。
在上述方案中,参见图12,解码器120还可以包括第二转置单元1205,配置为当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为垂直扫描顺序;以及当所述MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为水平扫描顺序。
在上述方案中,第二转置单元1205,还配置为当所述MIP转置指示参数的取值指示对MIP模式使 用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为水平扫描顺序;以及当所述MIP转置指示参数的取值指示不对MIP模式使用的采样点输入向量进行转置处理时,将所述LFNST系数扫描顺序设置为垂直扫描顺序。
在上述方案中,所述MIP参数包括MIP模式索引序号,其中,所述MIP模式索引序号用于指示所述当前块使用的MIP模式,所述MIP模式用于指示使用MIP确定所述当前块的帧内预测值的计算推导方式。
在上述方案中,参见图12,解码器120还可以包括第二设置单元1206,其中,
第二确定单元1203,还配置为根据所述MIP模式索引序号的取值,确定LFNST帧内预测模式索引序号的取值;
第二设置单元1206,配置为将所述LFNST系数扫描顺序设置为等于预设的所述LFNST帧内预测模式索引序号的取值对应的LFNST系数扫描顺序。
在上述方案中,第二确定单元1203,还配置为使用第一查找表确定所述MIP模式索引序号的取值对应的所述LFNST帧内预测模式索引序号的取值,其中,所述第一查找表至少包含两个不同取值的LFNST帧内预测模式索引序号各自所对应的一个或多个不同的MIP模式索引序号。
在上述方案中,第二设置单元1206,还配置为将所述LFNST系数扫描顺序设置为等于预设的所述MIP模式索引序号的取值对应的LFNST系数扫描顺序。
在上述方案中,第二确定单元1203,还配置为使用第二查找表确定所述MIP模式索引序号的取值对应的LFNST系数扫描顺序;其中,所述第二查找表至少包含不同的所述LFNST系数扫描顺序各自对应的一个或多个不同的MIP模式索引序号。
在上述方案中,第二设置单元1206,还配置为当所述MIP模式索引序号的取值在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为水平扫描顺序;以及当所述MIP模式索引序号的取值不在预设的一个或多个整数范围内时,将所述LFNST系数扫描顺序设置为垂直扫描顺序。
在上述方案中,所述MIP参数还包括MIP转置指示参数,所述MIP转置指示参数的取值用于指示是否对MIP模式使用的采样点输入向量进行转置处理;
第二转置单元1205,还配置为当所述MIP转置指示参数的取值指示对MIP模式使用的采样点输入向量进行转置处理时,若所述当前块使用的LFNST系数扫描顺序是水平扫描顺序,则将所述当前块使用的LFNST系数扫描顺序设置为垂直扫描顺序;以及若所述当前块使用的LFNST系数扫描顺序是垂直扫描顺序,则将所述当前块使用的LFNST系数扫描顺序设置为水平扫描顺序。
在上述方案中,在上述方案中,参见图12,解码器120还可以包括第二计算单元1207,其中,
第二构造单元1204,配置为根据所述MIP参数,构造所述当前块的帧内预测值;
第二变换单元1202,配置为对所述第一系数矩阵进行不同于LFNST的变换处理,得到所述当前块的预测差值;
第二计算单元1207,配置为计算所述帧内预测值和所述预测差值的和值,将所述和值作为所述当前块的重建值。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机存储介质,应用于解码器120,该计算机存储介质存储有变换程序,所述变换程序被第二处理器执行时实现前述实施例中任一项所述的方法。
基于上述解码器120的组成以及计算机存储介质,参见图13,其示出了本申请实施例提供的解码器120的具体硬件结构示例,可以包括:第二通信接口1301、第二存储器1302和第二处理器1303;各个组件通过第二总线系统1304耦合在一起。可理解,第二总线系统1304用于实现这些组件之间的连接通信。第二总线系统1304除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图13中将各种总线都标为第二总线系统1304。其中,
第二通信接口1301,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第二存储器1302,用于存储能够在第二处理器1303上运行的计算机程序;
第二处理器1303,用于在运行所述计算机程序时,执行:
解析码流,确定当前块的预测模式参数;
当所述预测模式参数指示所述当前块使用MIP确定帧内预测值时,解析码流,确定MIP参数;
解析码流,确定所述当前块的变换系数矩阵和LFNST索引序号;
当所述LFNST索引序号指示所述当前块使用LFNST时,对所述当前块的变换系数矩阵使用LFNST进行处理,得到LFNST输出系数矩阵;
根据所述MIP参数,确定所述当前块使用的LFNST系数扫描顺序;
根据所述LFNST系数扫描顺序,使用所述LFNST输出系数矩阵构造第一系数矩阵;其中,所述LFNST系数扫描顺序包括垂直扫描顺序和水平扫描顺序。
可选地,作为另一个实施例,第二处理器1303还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
可以理解,第二存储器1302与第一存储器1102的硬件功能类似,第二处理器1303与第一处理器1103的硬件功能类似;这里不再详述。
本实施例提供了一种解码器,该解码器可以包括解析单元、第二变换单元、第二确定单元和第二构造单元;这样,针对采用MIP模式的当前块来说,由于在进行LFNST变换时引入了MIP参数,使得LFNST系数扫描顺序的选择更加灵活,从而不仅提高了LFNST技术对非传统帧内预测模式的适用性,还提高了解码效率,同时还能够提升视频图像质量。
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例中,首先确定当前块的预测模式参数;当预测模式参数指示当前块使用基于矩阵的帧内预测MIP确定帧内预测值时,确定MIP参数;以及根据MIP参数,确定当前块的帧内预测值,计算所当前块与帧内预测值之间的预测差值;然后对预测差值进行第一次变换,得到第一系数矩阵;当所述当前块使用LFNST时,根据MIP参数确定当前块使用的LFNST系数扫描顺序;再根据LFNST系数扫描顺序,使用第一系数矩阵构造LFNST的输入系数矩阵;最后对输入系数矩阵进行LFNST处理,得到当前块的变换系数矩阵;其中,第一次变换是不同于LFNST的变换,LFNST系数扫描顺序包括水平扫描顺序和垂直扫描顺序。这样,针对采用MIP模式的当前块来说,由于在进行LFNST变换时引入了MIP参数,使得LFNST系数扫描顺序的选择更加灵活,从而不仅提高了LFNST技术对非传统帧内预测模式的适用性,还提高了编解码效率,同时还能够提升视频图像质量。

Claims (29)

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

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201980103082.3A CN114830659A (zh) 2019-12-30 2019-12-30 变换方法、编码器、解码器以及存储介质
EP19958126.5A EP4109898A4 (en) 2019-12-30 2019-12-30 TRANSFORMATION METHOD, ENCODER, DECODER AND STORAGE MEDIUM
PCT/CN2019/130127 WO2021134303A1 (zh) 2019-12-30 2019-12-30 变换方法、编码器、解码器以及存储介质
US17/807,639 US20220329809A1 (en) 2019-12-30 2022-06-17 Transform method, encoder, decoder, and storage medium

Applications Claiming Priority (1)

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

Related Child Applications (1)

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

Publications (1)

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

Family

ID=76686245

Family Applications (1)

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

Country Status (4)

Country Link
US (1) US20220329809A1 (zh)
EP (1) EP4109898A4 (zh)
CN (1) CN114830659A (zh)
WO (1) WO2021134303A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11218728B2 (en) * 2019-06-04 2022-01-04 Tencent America LLC Method and apparatus for video coding

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
CN110024399B (zh) * 2016-11-28 2024-05-17 韩国电子通信研究院 对图像编码/解码的方法和设备及存储比特流的记录介质

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
JONATHAN PFAFF , TOBIAS HINZ , PHILLIP HELLE , PHILLIP MERKLE , BJORN STALLENBERGER , MICHAEL SCHAFER , DETLEV MARPE , THOMAS WIEG: "Non-CE3: Harmonization of 8-Bit MIP with Unified-MPM and LFNST", 15. JVET MEETING; 20190703 - 20190712; GOTHENBURG; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), vol. JVET-O0485-r2, no. JVET-O0485 ; m48610, 1 July 2019 (2019-07-01), pages 1 - 4, XP030219703 *
K. NASER (INTERDIGITAL), F. LE LÉANNEC, T. POIRIER (INTERDIGITAL): "Non-CE6 Interaction between Implicit MTS and LFNST and MIP", 15. JVET MEETING; 20190703 - 20190712; GOTHENBURG; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-O0529 ; m48656, 25 June 2019 (2019-06-25), XP030219824 *
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), pages 1 - 16, XP030202676 *

Also Published As

Publication number Publication date
EP4109898A4 (en) 2023-01-11
EP4109898A1 (en) 2022-12-28
CN114830659A (zh) 2022-07-29
US20220329809A1 (en) 2022-10-13

Similar Documents

Publication Publication Date Title
WO2016138779A1 (zh) 帧内编解码方法、编码器和解码器
JP7277616B2 (ja) ビデオ・データを処理する方法、装置及び記憶媒体
WO2021004152A1 (zh) 图像分量的预测方法、编码器、解码器以及存储介质
WO2021139572A1 (zh) 编码方法、解码方法、编码器、解码器以及存储介质
WO2022104498A1 (zh) 帧内预测方法、编码器、解码器以及计算机存储介质
WO2021004155A1 (zh) 图像分量预测方法、编码器、解码器以及存储介质
US20220329786A1 (en) Transform method and decoder
WO2021120122A1 (zh) 图像分量预测方法、编码器、解码器以及存储介质
US20220329862A1 (en) Transformation method, encoder, decoder, and storage medium
US20220329809A1 (en) Transform method, encoder, decoder, and storage medium
WO2023044868A1 (zh) 视频编解码方法、设备、系统、及存储介质
WO2023197195A1 (zh) 视频编解码方法、编码器、解码器及存储介质
WO2021134637A1 (zh) 变换方法、编码器、解码器以及存储介质
CN114424544A (zh) 允许基于矩阵的帧内预测块具有多个变换块
WO2024007120A1 (zh) 编解码方法、编码器、解码器以及存储介质
WO2024007116A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2023184747A1 (zh) 视频编解码方法、装置、设备、系统及存储介质
CN113302934B (zh) 图像预测方法、编码器、解码器以及存储介质
WO2023236113A1 (zh) 视频编解码方法、装置、设备、系统及存储介质
CN113840144B (zh) 图像分量的预测方法、编码器、解码器及计算机存储介质
WO2023197181A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2023197179A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2022266971A1 (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: 19958126

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: 2019958126

Country of ref document: EP

Effective date: 20220801