Encoding method, decoding method, encoder, decoder, and storage media

KR103021960B1Active Publication Date: 2026-09-18GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
KR1020227023785
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-01-08
Filing Date
2020-12-29
Publication Date
2026-09-18
Estimated Expiration
2040-12-29

Smart Images

  • Figure 112022071920041-PCT00030_ABST
    Figure 112022071920041-PCT00030_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an encoding method, a decoding method, an encoder, a decoder, and a storage medium. The above method comprises determining the prediction parameters of the current block—the prediction parameters include prediction mode parameters—and, when the prediction mode parameters indicate that the intra prediction values ​​are determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma components of the current block, obtaining adjacent sample values ​​of the current block and determining the MIP input sample values ​​of the current block according to the adjacent sample values ​​of the current block, determining the MIP prediction values ​​of the chroma components of the current block according to the MIP input sample values, the MIP weighting matrix, and shifting parameters, determining the intra prediction values ​​of the chroma components of the current block by filtering the MIP prediction values, determining the prediction residual values ​​of the chroma components of the current block according to the intra prediction values ​​of the chroma components of the current block, determining LFNST parameters by performing Low-Frequency Non-Separable Transform (LFNST) on the prediction residual values, and encoding the LFNST parameters and writing them as a bitstream.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] (Related Application)

[0002] The present application claims priority to a prior U.S. application filed on January 8, 2020, in the name of Junyan Huo, Shuai Wan and Yanzhuo Ma, application number 62 / 958,582, titled "VIDEO ENCODING AND DECODING METHOD, APPARATUS AND COMMUNICATION SYSTEM", the full text of which is incorporated herein by reference.

[0003] The embodiments of the present application relate to the technical field of video coding, and in particular to encoding methods, decoding methods, encoders, decoders, and storage media. Background Technology

[0004] As people's demands for video display quality increase, new forms of video applications, such as high definition and ultra-high definition video, are emerging. H.265 / High Efficiency Video Coding (HEVC) can no longer meet the demands of rapidly evolving video applications. The Joint Video Exploration Team (JVET) proposes the next-generation video coding standard, H.266 / Versatile Video Coding (VVC).

[0005] In H.266 / VVC, Matrix-Based Intra Prediction (MIP) is an intra prediction mode used to acquire the intra prediction block of the current block. Low-Frequency Non-Separable Transform (LFNST) technology is used to determine the prediction residuals of the current block. However, when LFNST technology is applied to MIP mode prediction, it has a negative impact on the coding efficiency of VVC.

[0006] Embodiments of the present application provide an encoding method, a decoding method, an encoder, a decoder, and a storage medium that can improve coding efficiency.

[0007] The technical solution of the embodiment of the present application can be achieved as follows.

[0008] In a first aspect, an embodiment of the present application provides an encoding method applied to an encoder. The method comprises:

[0009] Finalizing the prediction parameters of the current block - the prediction parameters include the prediction mode parameters - and,

[0010] If the prediction mode parameter indicates that the intra prediction value is determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, the adjacent sample value of the current block is obtained, and the MIP input sample value of the current block is determined according to the adjacent sample value of the current block, and

[0011] Determining the MIP predicted value of the chroma component of the current block based on the MIP input sample values, MIP weighting matrix, and shifting parameters - the MIP predicted value is the predicted value of some samples of the chroma component of the current block - and,

[0012] Filtering the MIP prediction values ​​to determine the intra prediction values ​​of the chroma components of the current block, and

[0013] Determining the predicted residual value of the chroma component of the current block based on the intra-predicted value of the chroma component of the current block, and

[0014] Performing LFNST (Low-Frequency Non-Separable Transform) on the predicted residual values ​​to determine the LFNST parameters, and

[0015] It includes encoding LFNST parameters and writing them to a bitstream.

[0016] In a second aspect, an embodiment of the present application provides a decoding method applied to a decoder. The method comprises:

[0017] Parsing the bitstream to obtain the prediction parameters and LFNST (Low-Frequency Non-Separable Transform) parameters of the current block - the prediction parameters include the prediction mode parameters - and,

[0018] If the prediction mode parameter indicates that the intra prediction value is determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, the adjacent sample value of the current block is obtained, and the MIP input sample value of the current block is determined according to the adjacent sample value of the current block, and

[0019] Determining the MIP predicted value of the chroma component of the current block based on the MIP input sample values, MIP weighting matrix, and shifting parameters - the MIP predicted value is the predicted value of some samples of the chroma component of the current block - and,

[0020] Filtering the MIP prediction values ​​to determine the intra prediction values ​​of the chroma components of the current block, and

[0021] If the LFNST parameter indicates to perform LFNST on the current block, the reconstructed transformation coefficient block of the current block is determined, and a second transformation coefficient block is obtained by performing LFNST on at least a portion of the reconstructed transformation coefficients among the reconstructed transformation coefficient blocks, and

[0022] Obtaining a reconstructed residual block of the chroma component of the current block by performing a first transformation on the second transformation coefficient block, and

[0023] It includes determining the reconstructed block of the chroma component of the current block based on the intra-predicted value of the chroma component of the current block and the reconstructed residual block.

[0024] In a third aspect, an embodiment of the present application provides an encoder. The encoder includes a first determination unit, a first prediction unit, a first transformation unit, and an encoding unit.

[0025] The first determination unit is configured to determine the prediction parameters of the current block, and the prediction parameters include prediction mode parameters.

[0026] The first confirmation unit is also configured to acquire adjacent sample values ​​of the current block and to confirm the MIP input sample values ​​of the current block according to the adjacent sample values ​​of the current block when the prediction mode parameter indicates that the intra prediction value is to be confirmed using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block.

[0027] The first prediction unit is configured to determine the MIP predicted value of the chroma component of the current block based on the MIP input sample value, the MIP weighting matrix, and the shifting parameter, wherein the MIP predicted value is the predicted value of a partial sample among the chroma components of the current block. The first prediction unit is also configured to determine the intra predicted value of the chroma component of the current block by filtering the MIP predicted value.

[0028] The first transformation unit is configured to determine the predicted residual value of the chroma component of the current block based on the intra-predicted value of the chroma component of the current block, and to determine the LFNST parameters by performing LFNST (Low-Frequency Non-Separable Transform) on the predicted residual value.

[0029] The encoding unit is configured to encode LFNST parameters and write them to a bitstream.

[0030] In a fourth aspect, an embodiment of the present application provides an encoder. The encoder includes a first memory and a first processor. The first memory is configured to store a computer program executable on the first processor. The first processor is configured to execute the method of the first aspect when executing the computer program.

[0031] In a fifth aspect, an embodiment of the present application provides a decoder. The decoder includes a parsing unit, a second determination unit, a second prediction unit, and a second conversion unit.

[0032] The parsing unit is configured to parse the bitstream to obtain the prediction parameters and LFNST (Low-Frequency Non-Separable Transform) parameters of the current block, and the prediction parameters include prediction mode parameters.

[0033] The second confirmation unit is configured to acquire adjacent sample values ​​of the current block and to confirm the MIP input sample values ​​of the current block according to the adjacent sample values ​​of the current block when the prediction mode parameter indicates that the intra prediction value is to be confirmed using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block.

[0034] The second prediction unit is configured to determine the MIP prediction value of the chroma component of the current block based on the MIP input sample value, the MIP weighting matrix, and the shifting parameter, and to determine the intra prediction value of the chroma component of the current block by filtering the MIP prediction value, and the MIP prediction value is the prediction value of some samples of the chroma component of the current block.

[0035] The second transformation unit is configured to determine the reconstructed transformation factor block of the current block when the LFNST parameter indicates to perform LFNST on the current block, obtain a second transformation factor block by performing LFNST on at least a portion of the reconstructed transformation factors among the reconstructed transformation factor blocks, and obtain a reconstructed residual block of the chroma component of the current block by performing a first transformation on the second transformation factor block.

[0036] The second confirmation unit is also configured to confirm the reconstructed block of the chroma component of the current block according to the intra-predicted value of the chroma component of the current block and the reconstructed residual block.

[0037] In a sixth aspect, an embodiment of the present application provides a decoder. The decoder includes a second memory and a second processor. The second memory is configured to store a computer program executable on the second processor. The second processor is configured to execute the method of the second aspect when executing the computer program.

[0038] In a seventh aspect, an embodiment of the present application provides a computer storage medium. The computer storage medium stores a computer program. The method of the first aspect is implemented when the computer program is executed by a first processor, or the method of the second aspect is implemented when the computer program is executed by a second processor.

[0039] Embodiments of the present application provide an encoding method, a decoding method, an encoder, a decoder, and a storage medium. At the encoder side, after determining the prediction parameters of the current block, if the prediction mode parameter indicates that the intra prediction value is determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, adjacent sample values ​​of the current block are obtained, MIP input sample values ​​of the current block are determined according to the adjacent sample values ​​of the current block, MIP prediction values ​​of the chroma component of the current block are determined according to the MIP input sample values, the MIP weighting matrix, and shifting parameters, the MIP prediction values ​​are filtered to determine the intra prediction values ​​of the chroma component of the current block, the prediction residual values ​​of the chroma component of the current block are determined according to the intra prediction values ​​of the chroma component of the current block, Low-Frequency Non-Separable Transform (LFNST) is performed on the prediction residual values ​​to determine LFNST parameters, and the LFNST parameters are encoded and written as a bitstream.At the decoder side, after parsing the bitstream to obtain the prediction parameters and LFNST parameters of the current block, if the prediction mode parameter indicates that the intra prediction value is determined using MIP mode for the chroma component of the current block, the adjacent sample value of the current block is obtained, the MIP input sample value of the current block is determined according to the adjacent sample value of the current block, the MIP prediction value of the chroma component of the current block is determined according to the MIP input sample value, the MIP weighting matrix, and the shifting parameter, the MIP prediction value is filtered to determine the intra prediction value of the chroma component of the current block, and if the LFNST parameter indicates that LFNST is performed on the current block, the reconstructed transform coefficient block of the current block is determined, a second transform coefficient block is obtained by performing LFNST on at least a portion of the reconstructed transform coefficients among the reconstructed transform coefficient block, and the reconstructed residual block of the chroma component of the current block is obtained by performing the first transformation on the second transform coefficient block, and according to the intra prediction value of the chroma component of the current block and the reconstructed residual block, the current The reconstructed block of the block's chroma component is finalized. In this way, for MIP modes, not only is encoding and decoding performance guaranteed, but complexity can also be reduced, the storage space required for the encoding and decoding processes can be decreased, and encoding and decoding efficiency can be effectively improved. Furthermore, when LFNST technology is applied to MIP mode prediction, the introduction of MIP parameters can make the LFNST transform more flexible and further enhance encoding and decoding efficiency. Brief explanation of the drawing

[0040] FIG. 1 is a schematic diagram showing the structure of an encoder provided in an embodiment of the present application. FIG. 2 is a schematic diagram showing the structure of a decoder provided in an embodiment of the present application. FIG. 3 is a flowchart of an encoding method provided in an embodiment of the present application. FIG. 4 is a flowchart of another encoding method provided in an embodiment of the present application. FIG. 5 is a flowchart of a Matrix-Based Intra Prediction (MIP) prediction process provided in an embodiment of the present application. FIG. 6 is a flowchart for obtaining an intra-prediction block using the MIP mode provided in an embodiment of the present application. FIG. 7 is a diagram illustrating the procedure for performing the LFNST (Low Frequency Non-separable Transform) provided in an embodiment of the present application. FIG. 8 is a flowchart encoding LFNST parameters provided in an embodiment of the present application. FIG. 9 is a flowchart of a decoding method provided in an embodiment of the present application. FIG. 10 is a flowchart for parsing LFNST parameters provided in an embodiment of the present application. FIG. 11 is another diagram illustrating a procedure for performing LFNST provided in an embodiment of the present application. FIG. 12 is a schematic diagram showing the structure of another encoder provided in an embodiment of the present application. FIG. 13 is a schematic diagram showing the specific hardware structure of an encoder provided in an embodiment of the present application. FIG. 14 is a schematic diagram showing the structure of another decoder provided in an embodiment of the present application. FIG. 15 is a schematic diagram showing the specific hardware structure of a decoder provided in an embodiment of the present application. FIG. 16 is a schematic diagram showing the structure of a transmitting device provided in an embodiment of the present application. FIG. 17 is a schematic diagram showing the structure of a target device provided in an embodiment of the present application. FIG. 18 is a schematic diagram showing the structure of a communication system provided in an embodiment of the present application. Specific details for implementing the invention

[0041] In order to understand the features and technical content of the embodiments of the present application more specifically, the embodiments of the present application will be described in detail below with reference to the attached drawings. The attached drawings are for reference and explanation purposes only and are not intended to limit the embodiments of the present application.

[0042] All technical and scientific terms used in this specification have the same meaning as generally understood by those skilled in the art to which this application is applied, unless otherwise defined. The terms used in this specification are merely for describing the embodiments of this application and are not intended to limit this application.

[0043] In the following description, it should be understood that the mentioned “some embodiments” describe a subset of all possible embodiments, but that the “some embodiments” may be the same subset or a different subset of all possible embodiments and may be combined with one another unless there is a conflict. It should be noted that the terms “first / second / third” mentioned in the embodiments of this application are used merely to distinguish similar objects and do not indicate a specific order of objects. With regard to “first / second / third,” it should be understood that specific orders or sequences may be interchanged where permitted, allowing the embodiments of this application described herein to be realized in a different order than that shown or described herein.

[0044] As video compression technology advanced, the International Telecommunication Union-Transmission (ITU-T) and the International Organization for Standardization (ISO) / International Electrotechnical Commission (IEC) launched a standardization project called Versatile Video Coding (VVC) to develop a next-generation video encoding standard. The objective was to improve VVC performance by approximately 50% compared to the H.265 / HEVC standard when encoding high-definition video that possesses one or more of the following characteristics: high resolution, high frame rate, high bit depth, high dynamic range, wide color gamut, and omnidirectional field of view. The Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 is responsible for the aforementioned standardization project. Various intra-prediction modes and inter-prediction modes were adopted in the VVC Working Draft (WD) after it was verified that they could achieve high compression efficiency when encoding high-definition video.

[0045] Here, the Matrix-Based Intra Prediction (MIP) mode is the intra prediction mode. In VVC, the encoder or decoder can call the MIP mode to obtain the intra prediction block of the current block. Then, the Low Frequency Non-separable Transform (LFNST), which is a secondary transformation (or called a second-order transformation), can be applied to the prediction residual of the current block.

[0046] In related technology, LFNST can be applied to MIP mode prediction of a fixed configuration with an LFNST transform kernel candidate set and LFNST prefix indicator parameters, but this has a negative impact on the coding efficiency of VVC.

[0047] Accordingly, embodiments of the present application provide an encoding method, the basic concept of which is as follows. Predicted parameters of the current block are determined, and the predicted parameters include prediction mode parameters. If the prediction mode parameters indicate that an intra-predicted value is determined using a Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, adjacent sample values ​​of the current block are obtained, and MIP input sample values ​​of the current block are determined according to the adjacent sample values ​​of the current block. MIP predicted values ​​of the chroma component of the current block are determined according to the MIP input sample values, the MIP weighting matrix, and shifting parameters, and the MIP predicted values ​​are the predicted values ​​of some samples of the chroma component of the current block. The intra-predicted values ​​of the chroma component of the current block are determined by filtering the MIP predicted values. Predicted residual values ​​of the chroma component of the current block are determined according to the intra-predicted values ​​of the chroma component of the current block. Low-Frequency Non-Separable Transform (LFNST) is performed on the predicted residual values ​​to determine LFNST parameters. LFNST parameters are encoded and written as a bitstream. Another embodiment of the present application provides a decoding method, the basic concept of which is as follows. The bitstream is parsed to obtain the prediction parameters and LFNST (Low-Frequency Non-Separable Transform) parameters of the current block, and the prediction parameters include prediction mode parameters. If the prediction mode parameters indicate that an intra-prediction value is determined using the MIP (Matrix-Based Intra Prediction) mode for the chroma component of the current block, adjacent sample values ​​of the current block are obtained, and MIP input sample values ​​of the current block are determined according to the adjacent sample values ​​of the current block.Based on the MIP input sample value, the MIP weight matrix, and the shifting parameter, the MIP predicted value of the chroma component of the current block is determined, and the MIP predicted value is the predicted value of some samples of the chroma component of the current block. The intra predicted value of the chroma component of the current block is determined by filtering the MIP predicted value. If the LFNST parameter indicates that LFNST is performed on the current block, the reconstructed transformation factor block of the current block is determined, and a second transformation factor block is obtained by performing LFNST on at least a portion of the reconstructed transformation factors among the reconstructed transformation factor blocks. The reconstructed residual block of the chroma component of the current block is obtained by performing the first transformation on the second transformation factor block. Based on the intra predicted value of the chroma component of the current block and the reconstructed residual block, the reconstructed block of the chroma component of the current block is determined. In this way, for the MIP mode, not only can encoding and decoding performance be guaranteed, but complexity can be reduced, the storage space required for the encoding and decoding process can be reduced, and encoding and decoding efficiency can be effectively improved. In addition, when LFNST technology is applied to MIP mode prediction, the introduction of MIP parameters can make the LFNST transform more flexible and further improve encoding and decoding efficiency.

[0048] Hereinafter, embodiments of the present application will be described in detail with reference to the attached drawings.

[0049] Referring to FIG. 1, FIG. 1 is a block diagram illustrating the system structure of an encoder provided in an embodiment of the present application. The encoder (100) includes a splitting unit (101), a prediction unit (102), a first adder (107), a conversion unit (108), a quantization unit (109), an inverse quantization unit (110), an inverse conversion unit (111), a second adder (112), a filtering unit (113), a decoded picture buffer (DPB) unit (114), and an entropy coding unit (115). Here, the input of the encoder (100) may be a video consisting of a series of pictures or a single still picture, and the output of the encoder (100) is used to represent a bitstream (also referred to as a “code stream”) of a compressed version of the input video.

[0050] The splitting unit (101) splits a picture of an input video into one or more Coding Tree Units (CTUs). The splitting unit (101) splits the picture into a plurality of tiles, and can further split one tile into one or more bricks. Here, one tile or one brick may include one or more complete and / or partial CTUs. Additionally, the splitting unit (101) may form one or more slices, and one slice may include one or more tiles arranged in raster order in the picture, or one or more tiles covering a rectangular area of ​​the picture. The splitting unit (101) may also form one or more sub-pictures, and one sub-picture may include one or more slices, tiles, or bricks.

[0051] In the encoding process of the encoder (100), the splitting unit (101) passes the CTU to the prediction unit (102). Generally, the prediction unit (102) may consist of a block splitting unit (103), a motion estimation (ME) unit (104), a motion compensation (MC) unit (105), and an intra prediction unit (106). Specifically, the block splitting unit (103) further splits the input CTU into smaller coding units (CUs) by repeatedly using quadtree splitting, binary splitting, and ternary splitting. The prediction unit (102) may obtain inter-prediction blocks of CUs using the ME unit (104) and the MC unit (105). The intra prediction unit (106) may obtain intra-prediction blocks of CUs using various intra-prediction modes, including MIP mode. In the example, the rate distortion optimized motion estimation method may be called by the ME unit (104) and MC unit (105) to obtain an inter prediction block, and the rate distortion optimized mode determination method may be called by the intra prediction unit (106) to obtain an intra prediction block.

[0052] The prediction unit (102) outputs a prediction block of CU, and the first adder (107) calculates the difference value between the CU and the prediction block of CU among the outputs of the division unit (101), i.e., the residual CU. The transformation unit (108) reads the residual CU and performs one or more transformation operations on the residual CU to obtain coefficients. The quantization unit (109) quantizes the coefficients and outputs the quantized coefficients (i.e., levels). The inverse quantization unit (110) scales the quantized coefficients and outputs the reconstructed coefficients. The inverse transformation unit (111) performs one or more inverse transformations corresponding to the transformation of the transformation unit (108) and outputs the reconstructed residual. The second adder (112) calculates the reconstructed CU by adding the reconstructed residual and the prediction block of CU from the prediction unit (102). The second adder (112) also transmits its output to the prediction unit (102) to be used as an intra-prediction reference. After all CUs in the picture or sub-picture have been reconstructed, the filtering unit (113) performs in-loop filtering on the reconstructed picture or sub-picture. The filtering unit (113) includes one or more filters such as a deblocking filter, a Sample Adaptive Offset (SAO) filter, an Adaptive Loop Filter (ALF), a Luma Mapping with Chroma Scaling (LMCS) filter, and a neural network filter. Alternatively, when the filtering unit (113) determines that a CU is not to be used as a reference for encoding another CU, the filtering unit (113) performs in-loop filtering on one or more target pixels within the CU.

[0053] The output of the filtering unit (113) is a decoded picture or subpicture, and this decoded picture or subpicture is buffered into the DPB unit (114). The DPB unit (114) outputs the decoded picture or subpicture according to timing and control information. Here, the picture stored in the DPB unit (114) may be used as a reference for performing inter-prediction or intra-prediction in the prediction unit (102). Finally, the entropy coding unit (115) converts the parameters required to decode the picture from the encoder (100) (e.g., control parameters and additional information, etc.) into a binary form and writes this binary form to a bitstream according to the syntax structure of each data unit. That is, the encoder (100) finally outputs a bitstream.

[0054] Additionally, the encoder (100) may have a first processor and a first memory for recording a computer program. When the first processor reads and executes the computer program, the encoder (100) reads the input video and generates a corresponding bitstream. Additionally, the encoder (100) may also be a computing device having one or more chips. Such a unit implemented as an integrated circuit in a chip has connection and data exchange functions similar to the corresponding unit of FIG. 1.

[0055] Referring to FIG. 2, an example of a block diagram of the system structure of a decoder provided in an embodiment of the present application is illustrated. As shown in FIG. 2, the decoder (200) may include a parsing unit (201), a prediction unit (202), a scaling unit (205), a conversion unit (206), an adder (207), a filtering unit (208), and a decoded picture buffer unit (209). The input of the decoder (200) is a bitstream for representing a compressed version of a video or static picture, and the output of the decoder (200) may be a decoded video consisting of a series of pictures or a single decoded static picture.

[0056] The input bitstream of the decoder (200) may be a bitstream generated by the encoder (100). The parsing unit (201) parses the input bitstream and obtains the value of a syntax element from the input bitstream. The parsing unit (201) converts the binary representation of the syntax element into a numeric value and transmits the numeric value to the unit of the decoder (200) to obtain one or more decoded pictures. The parsing unit (201) may also parse one or more syntax elements from the input bitstream to display the decoded pictures.

[0057] In the decoding process of the decoder (200), the parsing unit (201) transmits to the unit of the decoder (200) one or more variables for acquiring one or more decoded pictures, which are set or determined according to the value of the syntax element and the value of the syntax element.

[0058] The prediction unit (202) determines the prediction block of the current decoding block (e.g., CU). The prediction unit (202) may include a motion compensation unit (203) and an intra prediction unit (204). Specifically, when an inter-decoding mode is indicated to be used to decode the current decoding block, the prediction unit (202) obtains the inter-prediction block by transmitting relevant parameters from the parsing unit (201) to the motion compensation unit (203). When an intra prediction mode (including a MIP mode indicated based on the MIP mode index value) is indicated to be used to decode the current decoding block, the prediction unit (202) obtains the intra-prediction block by transmitting relevant parameters from the parsing unit (201) to the intra prediction unit (204).

[0059] The scaling unit (205) has the same function as the inverse quantization unit (110) of the encoder (100). The scaling unit (205) performs a scaling operation on the quantized coefficients (i.e., levels) from the parsing unit (201) to obtain the reconstructed coefficients.

[0060] The conversion unit (206) has the same function as the inverse conversion unit (111) of the encoder (100). The conversion unit (206) obtains a reconstructed residual by performing one or more conversion operations (i.e., the inverse operation of one or more conversion operations performed by the inverse conversion unit (111) of the encoder (100).

[0061] The adder (207) performs an addition operation on its input (a prediction block from the prediction unit (202) and a reconstructed residual from the conversion unit (206)) to obtain a reconstructed block of the current decoding block. The reconstructed block is also transmitted to the prediction unit (202) so as to be used as a reference for another block encoded in intra-prediction mode.

[0062] After all CUs within a picture or sub-picture have been reconstructed, the filtering unit (208) performs in-loop filtering on the reconstructed picture or sub-picture. The filtering unit (208) includes one or more filters such as a deblocking filter, a sample adaptive compensation filter, an adaptive loop filter, a luma mapping with chroma scaling filter, etc. Or, when the filtering unit (208) determines that the reconstructed block is not used as a reference for decoding another block, the filtering unit (208) performs in-loop filtering on one or more target pixels among the reconstructed blocks. Here, the output of the filtering unit (208) is the decoded picture or sub-picture, and the decoded picture or sub-picture is buffered to the DPB unit (209). The DPB unit (209) outputs the decoded picture or sub-picture according to timing and control information. The picture stored in the DPB unit (209) can also be used as a reference for performing inter-prediction or intra-prediction by the prediction unit (202).

[0063] Additionally, the decoder (200) may have a second processor and a second memory for recording a computer program. When the first processor reads and executes the computer program, the decoder (200) reads the input bitstream and generates a corresponding decoded video. Additionally, the decoder (200) may also be a computing device having one or more chips. Such a unit implemented as an integrated circuit in a chip has connection and data exchange functions similar to the corresponding unit of FIG. 2.

[0064] The encoding method provided in the embodiment of the present application is mainly applied to the intra-prediction unit (106) and conversion unit (108) of the encoder (100), and the decoding method provided in the embodiment of the present application is mainly applied to the intra-prediction unit (204) and conversion unit (206) of the decoder (200). That is, the embodiment of the present application may be applied to the encoder, the decoder, or both the encoder and the decoder simultaneously, and is not limited thereto.

[0065] Additionally, when an embodiment of the present application is applied to an encoder (100), "current block" specifically refers to a picture block currently to be encoded in intra prediction (which may also be referred to as a "coding block"), and when an embodiment of the present application is applied to a decoder (200), "current block" specifically refers to a picture block currently to be decoded in intra prediction (which may also be referred to as a "decoding block").

[0066] If the encoder (100) can obtain a better prediction effect by using the encoding method provided in the embodiment of the present application, it is used to improve encoding performance, and correspondingly, the decoder (200) can improve video decoding quality by using the decoding method provided in the embodiment of the present application, and thus improve decoding performance.

[0067] In one embodiment of the present application, FIG. 3 is a flowchart of an encoding method provided in an embodiment of the present application. As illustrated in FIG. 3, the method comprises the following.

[0068] S301, determine the prediction parameters of the current block, and the prediction parameters include prediction mode parameters.

[0069] A picture to be encoded may be divided into multiple picture blocks, and each picture block to be encoded may be called a coding block. Here, each coding block may include a first image component, a second image component, and a third image component. The current block is a coding block in which the prediction of the current first image component, second image component, or third image component in the picture of the video is performed.

[0070] For the current block, a prediction of the first image component is performed, and assuming that the first image component is a luminance component, that is, that the image component to be predicted is a luminance component, the current block can also be called a luminance block, and the predicted value of the luminance component of the current block is obtained. Alternatively, for the current block, a prediction of the second image component is performed, and assuming that the second image component is a chroma component, that is, that the image component to be predicted is a chroma component, the current block can also be called a chroma block, and the predicted value of the luminance component of the current block is obtained.

[0071] In addition, it should be noted that the prediction parameters may include prediction mode parameters, which are used to indicate the prediction mode used by the current block, and that different prediction modes correspond to different prediction mode parameters. Regarding the determination of the prediction mode parameters, simple decision strategies may be used, for example, by determining them based on the magnitude of the distortion value, or complex decision strategies may be used, for example, by determining them based on the results of Rate Distortion Optimization (RDO), and the embodiments of this application are not limited thereto. Generally, the prediction mode parameters of the current block can be determined using the RDO method, that is, the prediction parameters of the current block are determined.

[0072] Specifically, in some embodiments, determining the prediction parameters of the current block may include the following.

[0073] Precoding is performed on the current block using various prediction modes to obtain ratio distortion compensation values ​​corresponding to the various prediction modes.

[0074] Select the optimal ratio distortion value from the multiple acquired ratio distortion values, and determine the prediction parameter in the prediction mode corresponding to the optimal ratio distortion value as the prediction parameter of the current block.

[0075] That is, on the encoder side, precoding processing can be performed on the current block using various prediction modes. Various prediction modes generally include inter prediction modes, traditional intra prediction modes, and non-traditional intra prediction modes. Traditional intra prediction modes may include direct current (DC) mode, planear mode, angle intra prediction mode, etc. Non-traditional intra prediction modes may include MIP mode, CCLM (Cross-Component Linear Model Prediction) mode, IBC (Intra Block Copy) mode, and PLT (Palette) mode, etc. Inter prediction modes may include traditional inter prediction modes and geometrical partitioning for inter blocks (GEO) mode, etc.

[0076] In this way, after performing precoding processing on the current block using various prediction modes, ratio distortion compensation values ​​corresponding to the various prediction modes can be obtained. Then, the optimal ratio distortion compensation value is selected from the multiple obtained ratio distortion compensation values ​​(generally, the minimum ratio distortion compensation value is the optimal ratio distortion compensation value), and the prediction parameter in the prediction mode corresponding to the optimal ratio distortion compensation value is determined as the prediction parameter of the current block.

[0077] In addition, precoding processing can be performed separately on the current block using various prediction modes to obtain distortion values ​​corresponding to the various prediction modes. An optimal distortion value is selected from the multiple obtained distortion values, and the prediction parameter in the prediction mode corresponding to the optimal distortion value is determined as the prediction parameter of the current block. In this way, the encoder performs predictive coding on the current block using the prediction mode indicated by the prediction mode parameter among the finally determined prediction parameters, thereby reducing the prediction residual and improving coding efficiency.

[0078] S302, if the prediction mode parameter indicates that the intra prediction value is determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, the adjacent sample value of the current block is obtained, and the MIP input sample value of the current block is determined according to the adjacent sample value of the current block.

[0079] With respect to the current block, it should be noted that the embodiment of the present application performs intra-prediction on the chroma component of the current block using MIP mode. In this process, it is first necessary to obtain adjacent sample values ​​of the current block, and then determine the MIP input sample values ​​of the current block based on the adjacent sample values ​​of the current block.

[0080] Regarding MIP mode, it can be understood that MIP core parameters must first be set. MIP core parameters may include the type of the current block (represented by mipSizeId), the number of reference samples for each side (represented by boundySize), the number of MIP input samples (represented by inSize), and the MIP prediction block size output from matrix multiplication (arranged as predSize×predSize). In MIP mode, the current block can be classified into three types based on the width and height of the current block, and mipSizeId may be 0, 1, or 2, and mipSizeId represents the type of the current block, that is, the "block size index value of the current block" mentioned in the embodiments of the present application. For different mipSizeIds, the number of reference samples (each edge requires boundySize reference samples), the number of MIP input samples (inSize), and the size of the MIP prediction blocks output from matrix multiplication (arranged as predSize × predSize) also differ.

[0081] Additionally, it should be noted that the prediction parameters may include the current block size parameters in addition to the prediction mode parameters. The current block size parameters may include the current block's width (represented as nTbW) and height (represented as nTbH). Furthermore, the current block size index value (i.e., mipSizeId) can be determined based on the current block size parameters.

[0082] In one possible embodiment, determining the block size index value of the current block according to the size parameter of the current block includes the following.

[0083] If both the width and height of the current block are 4, the block size index value of the current block can be set to 0.

[0084] Otherwise, if the width and height of the current block are both 8, or if one of the width and height of the current block is 4, the block size index value of the current block can be set to 1.

[0085] Otherwise, if the current block is a block of a different size, the block size index value of the current block can be set to 2.

[0086] In another possible embodiment, determining the block size index value of the current block according to the size parameter of the current block includes the following.

[0087] If both the width and height of the current block are 4, the block size index value of the current block can be set to 0.

[0088] Otherwise, if one of the width and height of the current block is 4, the block size index value of the current block can be set to 1.

[0089] Otherwise, if the current block is a block of a different size, the block size index value of the current block can be set to 2.

[0090] In this way, based on the block size index value of the current block, the number of adjacent boundary reference samples (where the variable is boundarySize) and the size of the MIP prediction block (where the variable is predSize and the size of the MIP prediction block is predSize × predSize) can be determined through the look-up table (LUT) shown in Table 1, and the number of MIP input sample values ​​(represented by inSize) used in the MIP matrix multiplication process is calculated. The calculation formula is as follows.

[0091]

[0092] In Equation (1), the operation rules of the operators are the same as the operation rules of the operators defined in the ITU-T H.265 standard, for example, "==" is a logical "equality" operator.

[0093] [Table 1]

[0094]

[0095] As such, according to Table 1, when the value of mipSizeId is 0, the value of boundarySize is 2 and the value of predSize is 4. That is, at this time, two pixels are selected as reference pixels for each edge, and the output of matrix multiplication is a 4x4 MIP prediction block.

[0096] When the value of mipSizeId is 1, the value of boundarySize is 4 and the value of predSize is 4. That is, in this case, 4 pixels are selected as reference pixels for each edge, and the output of matrix multiplication is a 4x4 MIP prediction block.

[0097] When the value of mipSizeId is 2, the value of boundarySize is 4 and the value of predSize is 8. That is, in this case, 4 pixels are selected as reference pixels for each edge, and the output of matrix multiplication is an 8x8 MIP prediction block.

[0098] In addition, the values ​​of boundarySize, inSize, and predSize can be determined simultaneously through the lookup table shown in Table 2 based on the block size index value of the current block.

[0099] [Table 2]

[0100]

[0101] As such, according to Table 2, when the value of mipSizeId is 0, the value of boundarySize is 2, the value of inSize is 4, and the value of predSize is 4. That is, at this time, 2 pixels are selected for each edge as reference samples, the quantity of matrix multiplication input samples is 4, and the output of matrix multiplication is a 4×4 MIP prediction block.

[0102] When the value of mipSizeId is 1, the value of boundarySize is 4, the value of inSize is 8, and the value of predSize is 4. That is, at this time, 4 pixels are selected for each edge as reference samples, the quantity of matrix multiplication input samples is 8, and the output of matrix multiplication is a 4×4 MIP prediction block.

[0103] When the value of mipSizeId is 2, the value of boundarySize is 4, the value of inSize is 7, and the value of predSize is 8. That is, at this time, 4 pixels are selected for each edge as reference samples, the quantity of matrix multiplication input samples is 7, and the output of matrix multiplication is an 8×8 MIP prediction block.

[0104] In addition, a reference pixel must be acquired after setting the MIP core parameters. Subsequently, the MIP input sample value is configured based on the reference pixel and the MIP core parameters. Here, the reference pixel refers to the adjacent sample value of the current block, which includes the left adjacent sample value and the upper adjacent sample value of the current block. In other words, the MIP input sample value of the current block can be determined based on the left adjacent sample value and the upper adjacent sample value of the current block.

[0105] In some embodiments, determining the MIP input sample value of the current block based on the adjacent sample value of the current block may include the following.

[0106] The block size index value of the current block is determined based on the current block size parameter.

[0107] Downsampling filtering is performed on adjacent sample values ​​of the current block to obtain a first temporary reference value.

[0108] If the block size index value of the current block is within a preset range, the second constant value is determined according to the bit depth of the adjacent sample value of the current block. The value corresponding to index number 0 among the MIP input sample values ​​is set as the difference between the second constant value and the value corresponding to index number 0 among the first temporary reference values. The value corresponding to index number i among the MIP input sample values ​​is set as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where i is an integer greater than 0.

[0109] If the block size index value of the current block is outside the preset range, the value corresponding to index number j among the MIP input sample values ​​is set to the difference between the value corresponding to index number (j+1) among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where j is an integer greater than or equal to 0.

[0110] Additionally, if the block size index value of the current block is within a preset range, the above method may further include the following.

[0111] The second constant value is determined according to the bit depth of the adjacent sample value of the current block. The value corresponding to index number 0 among the MIP input sample values ​​is set as the difference between the value corresponding to index number 0 among the first temporary reference values ​​and the second constant value. The value corresponding to index number i among the MIP input sample values ​​is set as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where i is an integer greater than 0.

[0112] A first temporary reference value can be obtained after performing downsampling filtering on adjacent sample values ​​of the current block. For the first temporary reference value, specifically, after performing downsampling filtering on adjacent sample values ​​of the current block, the filtered adjacent sample values ​​can be buffered into a buffer (represented by pTemp). Among the first temporary reference values, the value corresponding to index number 0 is pTemp[0], and among the first temporary reference values, the value corresponding to index number i is pTemp[i].

[0113] Additionally, whether the value of the size parameter of the current block is within a preset range can be determined based on whether the block size index value of the current block (represented by mipSizeId) is within a preset range. Specifically, if mipSizeId=0 or 1, it indicates that the block size index value of the current block is within a preset range, that is, that the value of the size parameter of the current block is within a preset range. If mipSizeId=2, it indicates that the block size index value of the current block is outside a preset range, that is, that the value of the size parameter of the current block is not within a preset range.

[0114] In other words, the MIP input sample value is determined by the buffer (represented by pTemp), the block size index value of the current block (represented by MipSizeId), and the bit depth of the adjacent sample value of the current block (represented by BitDepth). The number of input samples included in the MIP input sample value is related only to the block size index value of the current block, and finally, the value corresponding to index number x among the MIP input sample values ​​(represented by p[x]) can be obtained.

[0115] In addition, in some embodiments, determining a second constant value according to the bit depth of an adjacent sample value of the current block may include the following.

[0116] The second constant value is set to be equal to an integer power of 2, and the exponent of the power is equal to the bit depth of the adjacent sample value of the current block minus 1.

[0117] In addition, in some embodiments, determining a second constant value according to the bit depth of an adjacent sample value of the current block may include the following.

[0118] Binary left shifting is performed on "1" to obtain a second constant value, and the number of bits shifted left is equal to the bit depth of the adjacent sample value of the current block minus 1.

[0119] That is, after obtaining the bit depth (represented as BitDepth) of the adjacent sample value of the current block, the second constant value can be represented as 1<<(BitDepth-1) or 2^(BitDepth-1). In this way, if the value of the size parameter of the current block is within a preset range, the second constant value can be combined to determine the MIP input sample value of the current block.

[0120] In addition, it should be noted that the MIP input samples are matrix vectors used for matrix multiplication operations. The current technical approach is determined by the buffer (represented by pTemp), the type of the current block (i.e., the block size index value of the current block, represented by mipSizeId), the bit depth of the adjacent sample values ​​of the current block (represented by BitDepth), and the number of MIP input samples, and finally, the value corresponding to index number x among the MIP input sample values ​​(represented by p[x]) is obtained.

[0121] Specifically, the process of constructing the x-th input sample value p[x] is as follows.

[0122] In a possible embodiment, if the block size index value of the current block is within a preset range, the configuration process may include the following:

[0123] Calculate the difference between the second constant value and the value corresponding to index number 0 among the first temporary reference values ​​to obtain the value corresponding to index number 0 among the MIP input sample values.

[0124] A subtraction operation is performed on the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values ​​to obtain the value corresponding to index number i among the MIP input sample values. i is a positive integer greater than 0 and less than N, and N represents the quantity of elements included in the input sample matrix.

[0125] In an embodiment of the present application, when calculating the difference, the minuend is set to be the same as the second constant value, and when calculating the difference, the subtraction is set to be the same as the value corresponding to index number 0 among the first temporary reference values.

[0126] That is, if mipSizeId=0 or 1, set 1<<(BitDepth-1) minus pTemp[0] to p[0]; if x is not equal to 0, set pTemp[x] minus pTemp[0] to p[x]. Specifically, it is as follows.

[0127]

[0128] In another possible embodiment, if the block size index value of the current block is within a preset range, the configuration process may include the following:

[0129] Calculate the difference between the value corresponding to index number 0 among the first temporary reference values ​​and the second constant value to obtain the value corresponding to index number 0 among the MIP input sample values.

[0130] A subtraction operation is performed on the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values ​​to obtain the value corresponding to index number i among the MIP input sample values. i is a positive integer greater than 0 and less than N, and N represents the quantity of elements included in the input sample matrix.

[0131] In an embodiment of the present application, when calculating the difference, the minuend is set to be the same as the value corresponding to index number 0 among the first temporary reference values, and when calculating the difference, the subtraction is set to be the same as the second constant value.

[0132] That is, when mipSizeId=0 or 1, or when x is 0, the value corresponding to index number 0 among the MIP input sample values ​​(represented by p[0]) can be obtained by subtracting the second constant value (i.e., 1<<(BitDepth-1)) from the value corresponding to index number 0 among the first temporary reference values ​​(represented by pTemp[0]). When x is not 0, the value corresponding to index number x among the MIP input sample values ​​(represented by p[x]) can be obtained by subtracting the value corresponding to index number 0 among the first temporary reference values ​​(represented by pTemp[0]) from the value corresponding to index number x among the first temporary reference values ​​(represented by pTemp[x]). Specifically, it is as follows.

[0133]

[0134] In another possible embodiment, if the block size index value of the current block falls outside a preset range, the configuration process may include the following:

[0135] A subtraction operation is performed on the value corresponding to index number (i+1) among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values ​​to obtain the value corresponding to index number i among the MIP input sample values. i is a positive integer greater than or equal to 0 and less than N, and N represents the quantity of elements included in the input sample matrix.

[0136] That is, when mipSizeId=2, the value corresponding to index number 0 among the first temporary reference values, i.e., pTemp[0], can be ignored. The value corresponding to index number x among the MIP input sample values ​​(represented by p[x]) can be obtained by subtracting the value corresponding to index number 0 among the first temporary reference values ​​(i.e., pTemp[0]) from the value corresponding to index number (x+1) among the first temporary reference values ​​(i.e., pTemp[x+1]). x is a positive integer greater than or equal to 0. Specifically, it is as follows.

[0137]

[0138] Taking the current 4×4 block as an example, four values ​​are stored in the buffer pTemp. That is, the first temporary reference value includes the value corresponding to index number 0 (i.e., pTemp[0]), the value corresponding to index number 1 (i.e., pTemp[1]), the value corresponding to index number 2 (i.e., pTemp[2]), and the value corresponding to index number 3 (i.e., pTemp[3]). At this time, four MIP input sample values ​​can be determined according to Equation (2), Equation (3), or Equation (4), denoted as p[x], where x=0, 1, 2, 3. The four MIP input sample values ​​can also form a 1×4 MIP input sample matrix.

[0139] Additionally, in the embodiments of the present application, the value of p[x] can be obtained by a unified calculation method, and there is no need to determine the value of mipSizeId. In some embodiments, determining the MIP input sample value of the current block based on the adjacent sample value of the current block includes the following.

[0140] Downsampling filtering is performed on adjacent sample values ​​of the current block to obtain a first temporary reference value.

[0141] A second constant value is determined based on the bit depth of the adjacent sample value of the current block. The second constant value is buffered into the data unit after the first temporary reference value to obtain the second temporary reference value.

[0142] The value corresponding to index number j among the MIP input sample values ​​is set as the difference between the value corresponding to index number (j+1) among the second temporary reference values ​​and the value corresponding to index number 0 among the second temporary reference values, where j is an integer greater than or equal to 0.

[0143] That is, in an embodiment of the present application, a second constant value (i.e., (1<<(BitDepth-1))) is added to the end of the buffer pTemp to serve as an additional element, in which case there is no need to consider the size parameter of the current block (i.e., there is no need to consider the value of mipSizeId), and p[x] can be directly set to p[x]=pTemp[x+1]-pTemp[0], where x=0, ..., inSize - 1.

[0144] In this way, after determining the MIP input sample value of the current block based on the adjacent sample value of the current block, the predicted MIP value of the current block can be determined further.

[0145] The MIP predicted value of the chroma component of the current block is determined based on S303, the MIP input sample value, the MIP weighting matrix, and the shifting parameter.

[0146] The MIP prediction is the predicted value of a partial sample from the chroma component of the current block.

[0147] The shifting parameter includes a shifting offset parameter and a shifting number parameter. In this case, as illustrated in FIG. 4, S303 may include the following steps.

[0148] S303-1, the sum of the MIP input sample values ​​and the product of the shifting offset parameter are determined according to the value of the shifting offset parameter, and the value of the shifting offset parameter is a fixed constant.

[0149] The shifting offset parameter is also called the shifting compensation parameter or offset factor and can be denoted by fO. In the embodiments of the present application, the value of the shifting offset parameter may be set as a fixed constant such as 32, 46, 56, 66, etc. The value of the shifting offset parameter may be set to be associated with a shifting offset parameter table, and the value of the shifting offset parameter may be determined through a lookup table, but is not limited thereto.

[0150] S303-2, the first constant value is determined according to the value of the shifting number parameter.

[0151] S303-3, the value of the first offset is set as the difference between the first constant value and the product.

[0152] The shifting number parameter is also referred to as a shifting factor, number of shifting bits, weighted shifting value, etc., and can be represented as sW, shift, weight shift, etc. In an embodiment of the present application, the shifting number parameter is represented as sW. Additionally, the first offset can be represented as oW, and the first offset relates to both the shifting number parameter and the shifting offset parameter.

[0153] In an embodiment of the present application, the value of the shifting number parameter may be set to a fixed constant, for example, 5, 6, or 7. The value of the shifting number parameter may also be set to be associated with a shifting number parameter table, and the value of the shifting number parameter may be determined through a lookup table, but is not limited thereto.

[0154] S303-4, determine the MIP weight matrix of the current block based on the prediction parameters.

[0155] It should be noted that the prediction parameters may include prediction mode parameters and may also include size parameters of the current block. In the prediction parameters, if the prediction mode parameter indicates that the chroma component of the current block determines the intra-predicted value using MIP mode, a weight matrix table may be pre-configured and stored in memory or a storage unit. The memory or storage unit may be integrated into the encoder or installed separately. In this way, depending on the block size index value (mipSizeId) and the MIP mode index value (modeId) of the current block, the MIP weight matrix (also referred to as the MIP weight matrix or MIP matrix) to be used by the current block can be determined through a lookup table and is denoted as mWeight[x][y]. The block size index value (mipSizeId) of the current block is determined by the size parameter of the current block, and the size of the MIP weight matrix mWeight[x][y] is related only to the block size index value of the current block, as shown in Table 3.

[0156] In the MIP weight matrix of Table 3, the number of columns is the number of matrix multiplication input samples inSize, and the number of rows is the number of matrix multiplication output samples predSized×predSized, so the MIP weight matrix of the current block can be determined.

[0157] [Table 3]

[0158]

[0159] In the case of an encoder, it can be understood that a shifting number parameter table may be pre-configured and stored in a memory or storage unit. Here, the memory or storage unit may be integrated into the encoder or may be installed separately. In an embodiment of the present application, the shifting number parameter (sW) may be determined in several ways as follows.

[0160] In possible embodiments, for different block size index values ​​and different MIP mode index values, the shifting number parameter may be different. In some embodiments, the method may also include the following.

[0161] When determining the intra-predicted value using MIP mode for the chroma component of the current block, the MIP mode index value of the current block is determined.

[0162] A value corresponding to the MIP mode index value is retrieved from the first preset lookup table according to the MIP mode index value, and the first preset lookup table is used to record the correspondence between the MIP mode index value and the value of the shifting number parameter.

[0163] The retrieved value is confirmed as the value of the shifting number parameter.

[0164] The value of the shifting number parameter can be looked up based on the block size index value (represented by mipSizeId) and the MIP mode index value (modeId) of the current block. For different mipSizeId and modeId in the first preset lookup table of Table 4, the shifting number parameter required for matrix multiplication can be determined through the lookup table.

[0165] [Table 4]

[0166]

[0167] However, the encoder side must store Table 4 in memory or a storage unit in the form of a lookup table. However, storage requires a cost, and the same applies to the lookup process. Since the value of the shifting number parameter in Table 4 is related to both the block size index value and the MIP mode index value of the current block, memory usage increases and computational complexity increases.

[0168] In order to reduce memory usage and computational complexity, the method for determining the shifting number parameter in the embodiments of the present application can be simplified.

[0169] In other possible embodiments, the value of the shifting number parameter may be set as a fixed constant, which is a fixed constant unrelated to the block size index value and the MIP mode index value. For example, for different block size index values ​​and different MIP mode index values, the value of the shifting number parameter may be set to 5. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting number parameter may be set to 6. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting number parameter may be set to 7. In the embodiments of the present application, preferably, the value of the shifting number parameter is set to 6, but is not limited thereto.

[0170] In another possible embodiment, regarding the value of the shifting number parameter, the method may further include the following.

[0171] The block size index value of the current block is determined based on the current block size parameter.

[0172] The value of the shifting number parameter is determined based on the block size index value of the current block.

[0173] The block size index value of the current block can be determined according to the size parameter of the current block. In some embodiments, determining the block size index value of the current block according to the size parameter of the current block may include the following.

[0174] If both the width and height of the current block are 4, the block size index value of the current block is set to 0.

[0175] If both the width and height of the current block are 8, or if either the width or height of the current block is 4, the block size index value of the current block is set to 1.

[0176] If the width and height of the current block do not satisfy the above conditions, the block size index value of the current block is set to 2.

[0177] In this way, after determining the block size index value of the current block, the value of the shifting number parameter can be determined further according to the block size index value of the current block.

[0178] Optionally, in some embodiments, determining the value of the shifting number parameter according to the block size index value of the current block may include the following.

[0179] When the block size index values ​​are 0, 1, and 2, respectively, the values ​​of the shifting number parameters corresponding to the block size index values ​​of the current block are 5, 6, and 5, respectively.

[0180] Optionally, in some embodiments, determining the value of the shifting number parameter according to the block size index value of the current block may include the following.

[0181] The value of the shifting number parameter is set to be equal to the ratio of the current block width or height and the first preset value corresponding to the current block size index value.

[0182] Here, the first preset value represents the quantity of MIP input sample values ​​obtained from the boundary of the current block. In this case, the above method may further include the following.

[0183] When the block size index values ​​of the current block are 0, 1, and 2, respectively, the first preset values ​​corresponding to the block size index values ​​of the current block are 2, 4, and 4, respectively.

[0184] That is, when the first preset value represents the quantity of MIP input sample values ​​obtained from the boundary of the current block, if the block size index value of the current block is 0, the corresponding first preset value is 2, if the block size index value of the current block is 1, the corresponding first preset value is 4, and if the block size index value of the current block is 2, the corresponding first preset value is 4, and in this way, the value of the shifting number parameter can be determined according to the ratio of the width or height of the current block to the corresponding first preset value.

[0185] Optionally, in some embodiments, determining the value of the shifting number parameter according to the block size index value of the current block may include the following.

[0186] The value of the shifting number parameter is set to be equal to the ratio of the current block width or height and the second preset value corresponding to the current block size index value.

[0187] Here, the second preset value represents the size of the MIP prediction block of the current block obtained by calculating using the MIP weighting matrix directly. In this case, the method may also include the following.

[0188] When the block size index values ​​of the current block are 0, 1, and 2, respectively, the second preset values ​​corresponding to the block size index values ​​of the current block are 4, 4, and 8, respectively.

[0189] That is, when the second preset value represents the size of the MIP prediction block of the current block obtained by calculating directly using the MIP weighting matrix, if the block size index value of the current block is 0, the corresponding second preset value is 4, if the block size index value of the current block is 1, the corresponding second preset value is 4, and if the block size index value of the current block is 2, the corresponding second preset value is 8, and in this way, the value of the shifting number parameter can be determined according to the ratio of the width or height of the current block to the second preset value.

[0190] In another possible embodiment, the shifting number parameter table may be minimized and the value of the shifting number parameter is still determined by a lookup table. Optionally, in some embodiments, determining the value of the shifting number parameter according to the block size index value of the current block may include the following.

[0191] Based on the block size index value, a value corresponding to the block size index value is retrieved from the second preset lookup table. Here, the second preset lookup table is used to record the correspondence between the block size index value and the value of the shifting number parameter.

[0192] The retrieved value is confirmed as the value of the shifting number parameter.

[0193] It must be explained that the value of the shifting number parameter can be looked up based only on the block size index value of the current block (represented by mipSizeId). In the second preset lookup table exemplified in Table 5, each block size index value can correspond to a fixed value. That is, the size of each block or the set of sizes of each block can have a fixed value of the shifting number parameter as shown in Table 5.

[0194] [Table 5]

[0195]

[0196] According to Table 5, when the block size index values ​​of the current block are 0, 1, and 2, respectively, the values ​​of the shifting number parameters corresponding to the block size index values ​​are 5, 6, and 5, respectively.

[0197] In the above-described embodiment, by simplifying the method for determining the shifting number parameter, the storage of the minimize lookup table can be realized, in particular by minimizing the shifting number parameter table or by fixing the shifting number parameter value. Accordingly, the memory occupied to store the shifting number parameter table in MIP mode can be reduced without increasing computational complexity.

[0198] A shifting offset parameter table can be pre-set in the encoder, and the shifting offset parameter table can be stored in memory or a storage unit. Here, the memory or storage unit may be integrated into the encoder or installed separately. In an embodiment of the present application, the shifting offset parameter (fO) can be determined in the following manner.

[0199] In possible embodiments, the shifting offset parameter may also differ depending on the different block size index value and the different MIP mode index value. In some embodiments, the method may also include the following.

[0200] When determining the intra-predicted value using MIP mode for the chroma component of the current block, the MIP mode index value of the current block is determined.

[0201] Depending on the MIP mode index value, a value corresponding to the MIP mode index value is retrieved from a third preset lookup table, and the third preset lookup table is used to record the correspondence between the MIP mode index value and the value of the shifting offset parameter.

[0202] The retrieved value is confirmed as the value of the shifting offset parameter.

[0203] It should be noted that the value of the shifting offset parameter can be looked up based on the block size index value (represented by mipSizeId) and the MIP mode index value (modeId) of the current block. For different mipSizeId and modeId, the shifting offset parameter required for matrix multiplication can be determined through the lookup table, as shown in the third preset lookup table exemplified in Table 6.

[0204] [Table 6]

[0205]

[0206] However, the encoder side must store Table 6 in memory or a storage unit in the form of a lookup table. However, storage requires a cost, and the lookup process likewise requires a cost. Since the value of the shifting offset parameter in Table 6 is related to both the current block's block size and the MIP mode index value, memory usage increases and computational complexity increases.

[0207] In order to reduce memory usage and computational complexity, the method for determining the shifting offset parameter in the embodiments of the present application can be simplified.

[0208] In other possible embodiments, the value of the shifting offset parameter may be set as a fixed constant, which is a fixed constant unrelated to the block size index value and the MIP mode index value. Generally, the range of the fixed constant is 0 to 100. For example, for different block size index values ​​and different MIP mode index values, the value of the shifting offset parameter may be set to 32. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting offset parameter may be set to 46. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting offset parameter may be set to 56. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting offset parameter may be set to 66. In the embodiments of the present application, preferably, the value of the shifting offset parameter is set to 32, but is not limited thereto.

[0209] In another possible embodiment, regarding the value of the shifting offset parameter, the method may further include the following.

[0210] The block size index value of the current block is determined based on the current block size parameter.

[0211] The value of the shifting offset parameter is determined based on the block size index value of the current block.

[0212] The block size index value of the current block can be determined based on the current block size parameter. Then, the value of the shifting offset parameter can be determined further based on the current block size index value.

[0213] Optionally, in some embodiments, determining the value of the shifting offset parameter according to the block size index value of the current block may include the following.

[0214] When the block size index values ​​are 0, 1, and 2, respectively, the values ​​of the shifting offset parameters corresponding to the block size index values ​​of the current block are 34, 23, and 46, respectively.

[0215] Optionally, in some embodiments, the shifting offset parameter table may be minimized and the shifting factor is still determined by a lookup table. Optionally, in some embodiments, determining the value of the shifting offset parameter according to the block size index value of the current block may include the following.

[0216] Based on the block size index value, the value corresponding to the block size index value is retrieved from the fourth preset lookup table. Here, the fourth preset lookup table is used to record the correspondence between the block size index value and the value of the shifting offset parameter.

[0217] The retrieved value is confirmed as the value of the shifting offset parameter.

[0218] It must be explained that the value of the shifting offset parameter can be looked up based only on the current block size index value (represented by mipSizeId). As shown in the fourth preset lookup table exemplified in Table 7, each block size index value can correspond to a fixed value. That is, the size of each block or the set of sizes of each block can have a fixed value of the shifting offset parameter as exemplified in Table 7.

[0219] [Table 7]

[0220]

[0221] According to Table 7, when the block size index values ​​of the current block are 0, 1, and 2, respectively, the values ​​of the shifting offset parameters corresponding to the block size index values ​​are 34, 23, and 46, respectively.

[0222] In the above-described embodiment, by simplifying the method for determining the shifting offset parameter, the storage of the minimize lookup table can be realized, in particular by minimizing the shifting offset parameter table or by fixing the shifting offset parameter value. Accordingly, the memory occupied to store the shifting offset parameter table in MIP mode can be reduced without increasing computational complexity.

[0223] Thus, after determining the shifting offset parameter (fO) and the shifting number parameter (sW), for the first constant value, optionally, in some embodiments, determining the first constant value according to the value of the shifting number parameter may include the following.

[0224] The first constant value is set to be equal to an integer power of 2, and the exponent of the power is equal to the value of the shifting number parameter minus 1.

[0225] Optionally, in some embodiments, determining the first constant value according to the value of the shifting number parameter may include the following.

[0226] A binary left shift is performed on "1" to obtain a first constant value, and the number of bits shifted to the left is equal to the value of the shifting number parameter minus 1.

[0227] That is, after obtaining the shifting number parameter (sW), the first constant value can be expressed as 1<<(sW-1) or 2^(sW-1). When the value of the shifting number parameter is set to 6, the first constant value is equal to 32.

[0228] Here, if the first offset is denoted as oW, it can be obtained by calculating the product of the sum of the MIP input sample values ​​and the shifting offset parameter according to the shifting offset parameter (fO), i.e., is. The value of oW is It can be set to.

[0229] In this way, the MIP weighting matrix, MIP input sample value, shifting number parameter, and first offset can be obtained in MIP mode, and subsequently, it becomes convenient to determine the MIP prediction value of the current block.

[0230] S303-5, determines the MIP predicted value of the chroma component of the current block according to the MIP weighting matrix, MIP input sample value, shifting number parameter and the first offset.

[0231] Here, the MIP prediction represents the predicted value of a partial sample in the chroma component of the current block.

[0232] Determining the MIP prediction value of the current block based on the MIP weighting matrix, MIP input sample value, shifting number parameter, and first offset may include the following:

[0233] Calculate the first weighted sum of the MIP weight matrix and the MIP input sample values.

[0234] Calculate the first weighted sum and the first offset sum.

[0235] Binary right-shifting is performed on the first sum to obtain the first right-shift value, and the number of bits shifted to the right is equal to the value of the shifting number parameter.

[0236] The MIP prediction value of the current block is set to be equal to the sum of the first right shift value and the value corresponding to index number 0 among the first temporary reference values, and the first temporary reference value is obtained by performing downsampling filtering on the adjacent sample value of the current block.

[0237] Specifically, in MIP mode, the MIP weight matrix (represented by mWeight), shifting number parameter (represented by sW), and shifting offset parameter (represented by fO) can be determined based on the current block's block size index value (represented by mipSizeId) and MIP mode index value (represented by modeId). Then, the MIP input sample value (represented by p[x]), mWeight, sW, and fO are input into matrix multiplication to obtain the MIP prediction value (which can be represented as predMip[x][y]) output from the matrix multiplication, and the samples of predMip[x][y] are arranged in a matrix / array form according to predSize × predSize. The formula for predMip[x][y] is as follows.

[0238]

[0239] [x][y] represents the position coordinates of a pixel, x represents the horizontal direction, y represents the vertical direction, inSize represents the number of input samples, and p[i] represents the value corresponding to index number i among the MIP input sample values. pTemp[0] represents the value corresponding to index number 0 in the first temporary reference value. ">>" represents the binary right-shifting operator, and "<<" represents the binary left-shifting operator. x=0, … , predSize-1, y=0, … , predSize-1. In this way, the MIP prediction block can be obtained by calculating predMip[x][y] according to the above calculation formula (5).

[0240] In some embodiments, when the fixed value of sW is 6 and the fixed value of fO is 32, the calculation formula is as follows.

[0241]

[0242] In addition, to obtain the MIP prediction block of the current block, it is necessary to perform clipping on the predicted values ​​of the samples within the MIP prediction block. Then, it is determined whether to transpose the MIP prediction block. If the determination result is "Yes," it is necessary to transpose the predicted sample values ​​within the MIP prediction block, and the transposed MIP prediction block is confirmed as the MIP prediction block of the current block. If the determination result is "No," it is not necessary to transpose the predicted sample values ​​within the MIP prediction block, and this MIP prediction block can be directly confirmed as the MIP prediction block of the current block to obtain the MIP prediction value of the current block. The MIP prediction value is the predicted value of some samples within the current block.

[0243] S304, filter the MIP prediction values ​​to determine the intra prediction values ​​of the chroma components of the current block.

[0244] Determining the intra-predicted value of the current block by filtering the MIP predicted value may include the following.

[0245] Determines whether the size parameter of the MIP prediction block is the same as the size parameter of the current block.

[0246] If the size parameter of the MIP prediction block is the same as the size parameter of the current block, the intra prediction block of the current block is set to be the same as the MIP prediction block, and the MIP prediction block includes the predicted sample values ​​of all pixel locations within the current block.

[0247] If the size parameter of the MIP prediction block is different from the size parameter of the current block, the MIP prediction block is filtered to obtain the filtered prediction block, and the filtered prediction block is set as the intra prediction block of the current block.

[0248] Here, filtering may include upsampling filtering or low-pass filtering.

[0249] It should be noted that the MIP prediction block consists of MIP prediction values. After acquiring the MIP prediction block, since the size parameter of the MIP prediction block includes only two types—4x4 MIP prediction blocks and 8x8 MIP prediction blocks—the size parameter of the current block may or may not be the same as the size parameter of the MIP prediction block. In other words, since the sample value corresponding to the MIP prediction block may not completely fill the current block, upsampling of the MIP prediction block is required to generate the final prediction value. That is, whether to upsample the MIP prediction block is determined by determining whether the size parameter of the MIP prediction block is the same as the size parameter of the current block.

[0250] Furthermore, if the size parameters of the MIP prediction block and the current block are identical—that is, if both the width and height of the MIP prediction block are the same as those of the current block—it indicates that there is no need to perform upsampling on the MIP prediction block. In this case, the MIP prediction block can be directly filled into the current block. In other words, there are no empty pixels in the current block after filling. In this case, the intra-predicted value of each pixel in the current block can be directly replaced with the predicted value of each pixel in the MIP prediction block. This is as follows.

[0251]

[0252] [x][y] represents the position coordinates of a pixel, where x represents the horizontal direction and y represents the vertical direction. predSamples[x][y] represents the intra-predicted value corresponding to the pixel at position coordinates [x][y] in the current block, and predMip[x][y] represents the predicted value corresponding to the pixel at position coordinates [x][y] in the MIP prediction block. Thus, according to Equation (7), the MIP prediction block predMip[x][y] can be directly used as the intra-predicted block predSamples[x][y] of the current block, that is, directly as the intra-predicted value of at least one pixel within the current block.

[0253] In addition, if the size parameter of the MIP prediction block and the size parameter of the current block are different, that is, if at least one of the width and height of the MIP prediction block is different from that of the current block, the MIP prediction block cannot completely fill the current block. In other words, there are empty pixels in the current block after filling, and this indicates that filtering needs to be performed on the MIP prediction block. That is, if upsampling is required in both the horizontal and vertical directions, a first upsampling block can be obtained by performing horizontal upsampling on the MIP prediction block and then performing vertical upsampling. Then, a second upsampling block can be obtained by performing vertical upsampling on the MIP prediction block and then performing horizontal upsampling. Finally, a weighted average is calculated on predSamples[x][y] and predSamplesTemp[x][y] to ultimately obtain the intra-predicted value of the chroma component of the current block, i.e., the intra-predicted block of the current block.

[0254] For example, if the side length nTbS of the current block (where S can be replaced with W and H, respectively) and the side length predSize of predMip (where predSize is related only to the blocksizeIdx of the current block) are the same, the MIP prediction block can be directly set as the intra prediction block of the current block. Otherwise, filtering must be performed on the MIP prediction block to obtain the intra prediction block of the current block. Here, taking a 4×4 current block as an example, if the size parameter of the current block and the size parameter of the MIP prediction block are the same, there is no need to perform filtering on the MIP prediction block. Therefore, the MIP prediction block can be directly set as the intra prediction block of the current block, and the intra prediction value of at least one pixel of the current block can be obtained.

[0255] Simply put, regarding the prediction process of MIP mode, the input data of MIP mode may include the position of the current block (xTbCmp, yTbCmp), the MIP mode index value applied to the current block (which can be represented as modeId), the height of the current block (which can be represented as nTbH), the width of the current block (which can be represented as nTbW), a transposition identifier indicating whether transposition is required (i.e., the MIP transposition parameter, which can be represented as isTransposed), etc. The output data of MIP mode may include an intra-prediction block of the current block. The prediction value corresponding to the pixel coordinates [x][y] of the intra-prediction block is predSamples[x][y], where x=0, 1, …, nTbW-1 and y=0, 1, …, nTbH-1.

[0256] As illustrated in Fig. 5, the MIP prediction process specifically includes the following steps.

[0257] S501 configures the core parameters.

[0258] For S501, the MIP core parameters may include the type of the current block (represented by mipSizeId), the number of reference samples for each edge (represented by boundySize), the number of MIP input samples (represented by inSize), and the size of the MIP prediction block output from matrix multiplication (arranged as predSize × predSize). The current block can be classified into three types based on the size of the current block, where mipSizeId represents the type of the current block. Here, mipSizeId can be 0, 1, or 2. Additionally, for different types of current blocks, the number of reference samples and the size of the MIP prediction block output from matrix multiplication are different.

[0259] S502, obtain a reference sample.

[0260] For S502, when predicting the current block, the upper and left adjacent blocks of the current block are both already encoded blocks, and the reference pixel in MIP mode is the reconstructed value of the pixel in the upper adjacent row and the pixel in the left adjacent column adjacent to the current block. In other words, the process of obtaining the adjacent reference pixel on the upper side (represented by refT) and the adjacent reference pixel on the left side (represented by refL) of the current block is precisely the process of obtaining the reference pixel.

[0261] S503 configures the input sample.

[0262] For S503, this step is used as input for matrix multiplication and, specifically, may include the following.

[0263] S5031, obtain a reference sample.

[0264] S5032 configures the reference sample buffer.

[0265] S5033 derives matrix multiplication input samples.

[0266] For S5031, the process of acquiring a reference sample is the process of performing downsampling on a reference pixel. For S5032, there are two filling methods for configuring the reference sample buffer, and specifically, it may include the following.

[0267] S5032-1, Method for filling a buffer when a preposition is not required.

[0268] S5032-2, Method for filling a buffer when a transposition is required.

[0269] S504, generates intra-predicted values.

[0270] For S504, this step is used to obtain the MIP prediction value of the current block and, specifically, may include the following.

[0271] S5041 constructs the MIP prediction block of the matrix multiplication output sample.

[0272] S5042, clipping is performed on the MIP prediction block of the matrix multiplication output sample.

[0273] S5043, performs transposition on the MIP prediction block of the matrix multiplication output sample.

[0274] S5044, generates MIP prediction values.

[0275] For S5041, the process of configuring the MIP prediction block may specifically include the following contents.

[0276] S5041-1, obtain the weighted matrix.

[0277] S5041-2, obtain shifting parameters.

[0278] S5041-3, performs matrix multiplication operations.

[0279] That is, in the process of constructing the MIP prediction block, not only the weight matrix but also the shifting parameters (including the shifting offset parameter and the shifting number parameter) must be obtained. Then, matrix multiplication operations are performed to obtain the MIP prediction block of the matrix multiplication output sample. For S5044, generating the final MIP prediction value involves two cases, and specifically, may include the following.

[0280] S5044-1, generates predicted values ​​that do not require upsampling.

[0281] S5044-2, generates predicted values ​​that require upsampling.

[0282] In this way, in the embodiment of the present application, after going through the four steps S501 to S504 described above, an intra-predicted value of at least one pixel among the chroma components of the current block can be obtained.

[0283] S305, determine the predicted residual value of the chroma component of the current block based on the intra-predicted value of the chroma component of the current block.

[0284] After obtaining the intra-predicted value of the chroma component of the current block, the difference between the actual value of the chroma component of the current block and the intra-predicted value of the chroma component of the current block can be calculated, and thus the predicted residual value of the chroma component of the current block, i.e., the residual block of the current block, can be obtained.

[0285] S306, perform LFNST (Low-Frequency Non-Separable Transform) on the predicted residual values ​​to determine the LFNST parameters.

[0286] With respect to the transformation unit (108) illustrated in FIG. 1, the transformation unit (108) may perform a first transformation on the residual block of the current block, for example, an integer transformation based on a discrete cosine transform (DCT) initial design. The transformation unit (108) may also perform a second transformation, such as LFNST, on the residual block of the current block. Specifically, in some embodiments, determining LFNST parameters by performing LFNST (Low-Frequency Non-Separable Transform) on the predicted residual values ​​may include the following.

[0287] Based on the predicted residual value, the residual block of the current block is determined, and a first transformation is performed on the residual block to obtain a first transformation coefficient block.

[0288] Determine whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0289] If the confirmed result is yes, LFNST is performed on at least some of the transformation coefficients in the first transformation coefficient block to determine the LFNST parameters.

[0290] In an embodiment of the present application, the encoder performs a first transformation (also referred to as "core transformation," "first transformation," or "main transformation") on the predicted residual values ​​of the residual block to obtain a first transformation coefficient block after the first transformation. Then, an LFNST transformation (also referred to as "second transformation" or "second transformation") is performed on some or all of the transformation coefficients in the first transformation coefficient block to determine the LFNST parameters. Here, it should be noted that the first transformation is a transformation different from LFNST.

[0291] In addition, it should be noted that not all current blocks are capable of performing LFNST. In order to determine whether to perform LFNST for at least some of the transformation coefficients in the first transformation coefficient block, some conditions (such as the minimum value among the size parameters of the current block, the block size index value of the current block, etc.) must be checked after the first transformation. Optionally, in some embodiments, determining whether to perform LFNST for at least some of the transformation coefficients in the first transformation coefficient block may include the following.

[0292] When determining the intra-predicted value using MIP mode for the chroma component of the current block, the minimum value among the size parameters of the current block is determined.

[0293] Determine whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block according to the minimum value.

[0294] In addition, determining whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block according to the minimum value may include the following:

[0295] If the minimum value is greater than or equal to the first preset threshold, it is determined to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0296] Here, the first preset threshold may be used to represent a preset threshold for evaluating whether to perform LFNST. In an embodiment of the present application, the first preset threshold may be set to 8, and is not specifically limited thereto.

[0297] That is, when performing intra prediction using MIP mode on the chroma component of the current block, the minimum value among the size parameters of the current block can be determined. For example, if the minimum values ​​of width and height are 8 or greater, it is determined to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0298] Optionally, in some embodiments, determining whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block may include the following.

[0299] When determining the intra-predicted value using MIP mode for the chroma component of the current block, the block size index value of the current block is determined according to the size parameter of the current block.

[0300] Depending on the block size index value, it is determined whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0301] In addition, determining whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block according to the block size index value may include the following:

[0302] If the block size index value is equal to the second preset threshold, it is determined to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0303] Here, a second preset threshold may also be used to represent a preset threshold for evaluating whether to perform LFNST. In an embodiment of the present application, the second preset threshold may be set to one of a preset value (e.g., 2) or a plurality of preset values ​​(e.g., 1, 2), but is not specifically limited.

[0304] That is, when performing intra prediction using MIP mode on the chroma component of the current block, the block size index value (mipSizeId) of the current block can be determined according to the size parameter of the current block. For example, when the value of mipSizeId is equal to 2, it can be determined to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0305] Optionally, in some embodiments, determining whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block may include the following.

[0306] Calculate the first result in the case where LFNST is not performed for at least some of the transformation coefficients in the first transformation coefficient block.

[0307] When performing LFNST on at least some of the transformation coefficients in the first transformation coefficient block, the second result is calculated.

[0308] Based on the first result and the second result, it is determined whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0309] Determining whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block according to the first result and the second result may include the following.

[0310] If the result of the first comparison is greater than the result of the second comparison, it is decided to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0311] It should be noted that in the embodiments of the present application, a traditional rate distortion optimization method may be adopted. A first result is calculated when LFNST is not performed on at least some of the transformation coefficients in the first transformation coefficient block. Then, a second result is calculated when LFNST is performed on at least some of the transformation coefficients in the first transformation coefficient block. By comparing the first result and the second result, if the first result is greater than the second result, it is decided to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0312] In this way, if the determined result is yes, that is, if it is determined that it is necessary to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block, LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block to determine the LFNST parameters.

[0313] S307, encodes the LFNST parameter and writes it to the bitstream.

[0314] The LFNST parameter includes an LFNST index number that can be represented by lfnst_index. In some embodiments, determining the LFNST parameter may include the following.

[0315] If it is determined to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block, the value of the LFNST index number is set to be greater than 0.

[0316] If it is determined not to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block, the value of the LFNST index number is set to 0.

[0317] Additionally, for S307, encoding the LFNST parameter and writing it as a bitstream may include the following.

[0318] Encodes the LFNST index number and writes it to the bitstream.

[0319] That is, after determining the LFNST parameter, i.e., lfnst_index, if lfnst_index is 0, it means that LFNST is not executed. If lfnst_index is greater than 0, it means that LFNST needs to be executed. During the encoding process, lfnst_index can be encoded using CABAC (context-based adaptive binary arithmetic coding) with a descriptor of "ae(v)".

[0320] For example, referring to FIG. 8, an example of the description of the syntax structure of LFNST parameters provided in the prior art is shown. In this case, the determination condition for determining whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block may include at least one of the following: treeType = DUAL_TREE_CHROMA, or !IntraMipFlag[ x0 ][ y0 ], or Min( lfnstWidth, lfnstHeight ) >= 16.

[0321] [Table 8]

[0322]

[0323] Referring to Tables 9A and 9B, an example of the description of the syntax structure of the LFNST parameters provided in the embodiments of the present application is shown. In this case, the determination condition for determining whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block may include at least one of the following: intra_mip_flag[x0][y0] = = 1&&Min(lfnstWidth, lfnstHeight) >= 8, or intra_mip_flag[x0][y0] = = 1&& mipSizeId = = 2.

[0324] Specifically, as shown in the syntax structure of Table 9A, if the minimum value of the size parameter of the current block is 8 or greater (i.e., both width and height are 8 or greater), the lfnst_index of the current block can be encoded using MIP mode (i.e., when intra_mip_flag[x0][y0]==1). Alternatively, the above determination condition may be set such that both width and height are greater than or equal to the first value (e.g., 8), and the sum of the width and height is greater than or equal to the second value (e.g., 16). As shown in the syntax structure of Table 9B, if the block size index value (mipSizeId) of the current block is 2, the lfnst_index of the current block can be encoded using MIP mode (i.e., when intra_mip_flag[x0][y0]==1). Alternatively, the above determination condition may be set so that mipSizeId is equal to one of a plurality of preset values ​​(e.g., 1 and 2).

[0325] [Table 9A]

[0326]

[0327] [Table 9B]

[0328]

[0329] In addition, it should be noted that if it is determined that LFNST can be performed on the current block, the LFNST transformation kernel (represented by kernel) used for the current block must be determined. In some embodiments, determining LFNST parameters by performing LFNST on predicted residual values ​​includes determining the LFNST transformation kernel used for the current block and determining LFNST parameters by performing LFNST on predicted residual values ​​using the LFNST transformation kernel.

[0330] In an embodiment of the present application, LFNST has four sets of transformation kernel candidates, and the four sets of transformation kernel candidates may include set0, set1, set2, and set3. Here, in an embodiment of the present application, the LFNST transformation kernel candidate sets may be determined using MIP parameters, and then an LFNST transformation kernel to be used in the current block is selected from the LFNST transformation kernel candidate sets. Accordingly, in some embodiments, the method may further include the following.

[0331] When determining intra-predicted values ​​using MIP mode for the chroma component of the current block, the MIP parameters are determined from the prediction parameters of the current block.

[0332] The set of LFNST transformation kernel candidates is determined based on the MIP parameters.

[0333] The transformation kernel indicated by the LFNST index number in the LFNST transformation kernel candidate set is set as the LFNST transformation kernel used for the current block.

[0334] The value of the LFNST index number is set so that the value of the LFNST index number indicates the index number of the LFNST transformation kernel in the LFNST transformation kernel candidate set, which performs LFNST on the current block.

[0335] The LFNST transform kernel candidate set includes two or more preset LFNST transform kernels.

[0336] It should be noted that MIP parameters may include at least one of the MIP mode index value (represented by modeId) and the MIP transpose indicator parameter (represented by isTransposed). For the LFNST transform kernel used in the current block, when the value of the MIP transpose indicator parameter indicates that a transpose is performed on the sample input vector used in MIP mode, it is necessary to perform a matrix transpose on the selected transform kernel to obtain the LFNST transform kernel used in the current block.

[0337] In addition, in some embodiments, determining the set of LFNST transformation kernel candidates according to MIP parameters may include the following.

[0338] The value of the LFNST intra-prediction mode index number is determined based on the MIP mode index value.

[0339] Based on the value of the LFNST intra-prediction mode index number, the index value of the LFNST transformation kernel candidate set is determined through the 5th preset lookup table.

[0340] The LFNST transformation kernel candidate set is selected from a plurality of candidate LFNST transformation kernel candidate sets according to the index value of the LFNST transformation kernel candidate set.

[0341] Here, the LFNST intra prediction mode index number can be represented as predModeIntra, and the index value of the LFNST transformation kernel candidate set can be represented as lfnstTrSetIdx.

[0342] The fifth preset lookup table is shown in Table 10. The value of predModeIntra can be determined based on the MIP mode index value (i.e., the value of modeId). Then, based on the value of predModeIntra, the value of lfnstTrSetIdx can be directly determined through Table 10. That is, the selected set of LFNST conversion kernel candidates for the current block is determined. Here, the value of lfnstTrSetIdx represents the set of conversion kernel candidates used in LFNST. Since the value of modeId can include 0, 1, 2, 3, 4, and 5, the value of predModeIntra is also 0, 1, 2, 3, 4, or 5, and the correspondence with lfnstTrSetIdx is as follows.

[0343] [Table 10]

[0344]

[0345] In a specific embodiment, determining the value of the LFNST intra prediction mode index number according to the MIP mode index value may include setting the value of the LFNST intra prediction mode index number to be the same as the MIP mode index value.

[0346] That is, the embodiment of the present application may set the value of predModeIntra to be the same as the value of modeId, and then directly determine the value of lfnstTrSetIdx through Table 10 according to the value of predModeIntra. That is, determine the selected set of LFNST transformation kernel candidates for the current block. In addition, in another specific embodiment of the present application, it should be noted that the embodiment of the present application may directly map the value of modeId to the value of PLANAR mode, and then determine the value of lfnstTrSetIdx using the value of predModeIntra corresponding to PLANAR mode. That is, determine the selected set of LFNST transformation kernel candidates for the current block.

[0347] In some embodiments, the LFNST parameter may further include an LFNST coefficient. Determining the LFNST parameter may include the following.

[0348] LFNST is performed on at least some of the transformation coefficients in the first transformation coefficient block to obtain LFNST coefficients.

[0349] Correspondingly, encoding LFNST parameters and writing them to a bitstream includes the following:

[0350] Quantization coefficients are obtained by quantizing the LFNST coefficients.

[0351] Encodes the quantization coefficients and writes them as a bitstream.

[0352] It should be noted that when lfnst_index is not 0, that is, when it is decided to perform LFNST on the current block, LFNST can be performed on at least some of the transform coefficients in the first transform coefficient block to obtain LFNST coefficients. Then, the LFNST coefficients are quantized and encoded and written as a bitstream.

[0353] Assume that d[x][y] is the first transformation coefficient block, where x=0, ..., nTbW-1, y=0, ..., nTbH-1, where nTbW and nTbH represent the width and height of the current block, respectively. Assume that v[x] represents the block containing the LFNST coefficients, where x = 0, ..., nLfnstOutSize-1, and nLfnstOutSize=(nTbW >= 8 && nTbH >= 8)? 48:16.

[0354] In a possible embodiment, LFNST coefficients can be obtained by performing LFNST on at least some of the transformation coefficients in the first transformation coefficient block in a direct horizontal scan sequence. Specifically, as follows.

[0355]

[0356] log2LfnstSize is determined as follows.

[0357]

[0358] In another possible embodiment, the scan order may include a horizontal scan order and a vertical scan order. Here, the scan order is related to the value of the MIP preposition parameter (indicated by isTransposed).

[0359] Optionally, in some embodiments, performing LFNST on at least some of the transformation coefficients in the first transformation coefficient block to obtain LFNST coefficients may include the following.

[0360] When the value of the MIP pre-indicator parameter indicates that pre-processing is performed on the sample input vector used in MIP mode, LFNST is performed on at least some of the transformation coefficients in the first transformation coefficient block in vertical scan order to obtain LFNST coefficients.

[0361] If the value of the MIP pre-indicator parameter indicates that pre-processing is not performed on the sample input vector used in MIP mode, LFNST is performed on at least some of the transformation coefficients in the first transformation coefficient block in a horizontal scan order to obtain LFNST coefficients.

[0362] Specifically, if the value of isTransposed is equal to 0, LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block in a horizontal scan order without performing transposition processing on the sample input vector used in MIP mode, and specifically as follows.

[0363]

[0364] If the value of isTransposed is equal to 1, transposition processing is performed on the sample input vector used in MIP mode, and LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block in vertical scan order, specifically as follows.

[0365]

[0366] The log2LfnstSize is determined according to the above mathematical formula (9).

[0367] Optionally, in some embodiments, performing LFNST on at least some of the transformation coefficients in the first transformation coefficient block to obtain LFNST coefficients may include the following.

[0368] When the value of the MIP pre-indicator parameter indicates that pre-processing is performed on the sample input vector used in MIP mode, LFNST is performed on at least some of the transformation coefficients in the first transformation coefficient block in a horizontal scan order to obtain LFNST coefficients.

[0369] If the value of the MIP pre-indicator parameter indicates that pre-processing is not performed on the sample input vector used in MIP mode, LFNST is performed on at least some of the transformation coefficients in the first transformation coefficient block in vertical scan order to obtain LFNST coefficients.

[0370] Specifically, when the value of isTransposed is 1, a preprocessing is performed on the sample input vector used in MIP mode, and LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block in a horizontal scan order, as specifically shown in the above equation (10).

[0371] When the value of isTransposed is 0, the sample input vector used in MIP mode is not subjected to transposition processing, and LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block in vertical scan order, as specifically shown in Equation (11).

[0372] The log2LfnstSize is determined according to the above mathematical formula (9).

[0373] In addition, in the embodiments of the present application, LFNST can be applied to existing intra-prediction modes (e.g., angle intra-prediction mode, DC mode, PLANAR mode, etc.) in addition to the MIP mode. The specific implementation method is similar to the implementation method of the MIP mode.

[0374] In some embodiments, determining the set of LFNST transformation kernel candidates according to MIP parameters may include the following.

[0375] The value of the LFNST intra prediction mode index number is determined based on the index value of the existing intra prediction mode.

[0376] Based on the value of the LFNST intra prediction mode index number, the index value of the LFNST transformation kernel candidate set is determined through the 6th preset lookup table.

[0377] Based on the index value of the LFNST transformation kernel candidate set, the LFNST transformation kernel candidate set is selected from a plurality of candidate LFNST transformation kernel candidate sets.

[0378] The 6th preset lookup table is as shown in Table 11. The value of predModeIntra can be determined based on the index value of the existing intra prediction mode. Then, based on the value of predModeIntra, the value of lfnstTrSetIdx can be directly determined through Table 11. That is, the selected set of LFNST transformation kernel candidates for the current block is determined. Here, the index value of the existing intra prediction mode is assigned to predModeIntra to determine the value of lfnstTrSetIdx.

[0379] [Table 11]

[0380]

[0381] Hereinafter, the encoding method of an embodiment of the present application will be specifically described with reference to the encoder (100) illustrated in FIG. 1.

[0382] It should be understood that the current block (or referred to as the “coding block”) in the embodiments of the present application may be a CU or a partition of a CU (e.g., a transformation block). Specifically, when the intra prediction unit (106) determines that a MIP mode is used to perform encoding on the current block, or when the intra prediction unit (106) evaluates the MIP mode used to encode the current block using a rate distortion optimization method, the intra prediction unit (106) obtains an intra prediction block of the current block, and the intra prediction block of the current block includes an intra prediction value of at least one pixel (sample) within the current block.

[0383] Specifically, for the intra prediction unit (106), the step of obtaining an intra prediction block using MIP mode is as follows.

[0384] First, the intra prediction unit (106) obtains one or more reference pixels from adjacent pixels of the current block. For example, it obtains them by performing downsampling on adjacent pixels or by directly extracting them from adjacent pixels.

[0385] Next, the intra prediction unit (106) determines one or more partial prediction pixels corresponding to pixel locations in the current block using the acquired reference pixel, MIP matrix, and shifting parameters. Here, the pixel location may be a preset pixel location within the current block. For example, the pixel location has uniform horizontal and vertical coordinate values. The shifting parameters include a shifting number parameter and a shifting offset parameter, and the shifting parameters are used in the shifting operation during the process of acquiring the intra prediction value of the partial pixel.

[0386] Finally, when a predicted pixel corresponding to some pixels of the current block is obtained, the intra prediction unit (106) must obtain a predicted pixel corresponding to the remaining pixels excluding some pixels of the current block. For example, the intra prediction unit (106) obtains a predicted pixel corresponding to the remaining pixels using an interpolation filter, and the inputs of the interpolation filter are the partial pixels and adjacent pixels.

[0387] As illustrated in FIG. 6, this is a flowchart for obtaining an intra-prediction block using the MIP mode provided in an embodiment of the present application. This procedure can be implemented in an encoder (100), where "current block" refers to a "coding block."

[0388] In step 601, the intra prediction unit (106) obtains adjacent pixels of the current block, for example, the adjacent pixels are indicated by gray squares adjacent to the current block in step 601 of FIG. 6. The intra prediction unit (106) obtains one or more reference pixels from the adjacent pixels. In the example of step 601 shown in FIG. 6, optionally, the intra prediction unit (106) may calculate the average of two neighboring pixels and use the average as a reference pixel. Optionally, the intra prediction unit (106) selects one for every two neighboring pixels as a reference pixel. For example, in the example of step 601 shown in FIG. 6, the intra prediction unit (106) selects four reference pixels from eight upper adjacent pixels of the current block and selects another four reference pixels from eight left adjacent pixels of the current block.

[0389] The specific process of Step 601 is as follows.

[0390] The intra prediction unit (106) obtains the width and height of the current block from the block division unit (103), and the width and height are represented by the variables cbWidth and cbHeight. As an example, the intra prediction unit (206) calls the rate distortion optimization mode determination method to determine the intra prediction mode, and the current block is divided into one or more transformation blocks. The variables nTbW and nTbH are the width and height of the transformation blocks, respectively. When the MIP mode is used as the intra prediction mode to obtain the intra prediction value of the current block, the intra prediction unit (106) determines the variable represented by the block size index value of the MIP, i.e., mipSizeId.

[0391] Optionally, the intra prediction unit (106) determines the value of mipSizeId as follows.

[0392] - If both nTbW and nTbH are 4, mipSizeId is set to 0.

[0393] - Otherwise, if cbWidth or cbHeight is 4, mipSizeId is set to 1.

[0394] - Otherwise, mipSizeId is set to 2.

[0395] Specifically, when the size parameter of the current block is 8x8 (i.e., when both cbWidth and cbHeight are 8), mipSizeId is set to 2.

[0396] Optionally, the intra prediction unit (106) determines the value of mipSizeId as follows.

[0397] - If both nTbW and nTbH are 4, mipSizeId is set to 0.

[0398] - Otherwise, if cbWidth or cbHeight is 4, or if both cbWidth and cbHeight are 8, mipSizeId is set to 1.

[0399] - Otherwise, mipSizeId is set to 2.

[0400] Specifically, if the size parameter of the current block is 8x8, mipSizeId is set to 1.

[0401] Additionally, the intra prediction unit (106) obtains the values ​​of boundarySize and predSize according to mipSizeId. Specifically, as follows.

[0402] - If mipSizeId is 0, boundarySize is set to 2 and predSize is set to 4.

[0403] - Otherwise, if mipSizeId is 1, boundarySize is set to 4 and predSize is set to 4.

[0404] - Otherwise (when mipSizeId is 2), boundarySize is set to 4 and predSize is set to 8.

[0405] boundarySize represents the quantity of reference pixels obtained from the adjacent upper side reference pixel and the adjacent left side reference pixel of the current block, respectively.

[0406] The intra prediction unit (106) may also obtain the variable isTransposed to indicate the order of reference pixels stored in the buffer pTemp. For example, isTransposed being equal to 0 indicates that the intra prediction unit (106) first obtains a reference pixel from the upper side adjacent reference pixel of the current block and then obtains a reference pixel from the left side adjacent reference pixel of the current block, and isTransposed being equal to 1 indicates that the intra prediction unit (106) first obtains a reference pixel from the left side adjacent reference pixel of the current block and then obtains a reference pixel from the upper side adjacent reference pixel of the current block. The value of isTransposed is one of the parameters of the MIP mode to be transmitted to the entropy coding unit (115), encoded, and written to the bitstream.

[0407] As shown in mathematical formula 1 above, the intra prediction unit (106) obtains the value of the variable inSize to indicate the number of reference pixels used when the MIP mode is used.

[0408] The intra prediction unit (106) calls the following process to obtain a reference pixel group (stored as array p[x], where x is 0, …, inSize - 1) using adjacent reference pixels of the current block.

[0409] The intra prediction unit (106) obtains an nTbW reference pixel from an adjacent upper side reference pixel of the current block (e.g., stored in array refT) and obtains an nTbH reference pixel from an adjacent left side reference pixel of the current block (e.g., stored in array refL). The intra prediction unit (106) calls downsampling on refT to obtain a boundarySize reference pixel and stores the boundarySize reference pixel in refT. The intra prediction unit (106) calls downsampling on refL to obtain a boundarySize reference pixel and stores the boundarySize reference pixel in refL.

[0410] The intra prediction unit (106) may also obtain the variable isTransposed to indicate the order of reference pixels stored in the buffer (pTemp). For example, if isTransposed is equal to 0 (or FALSE), it indicates that the intra prediction unit (106) first obtains a reference pixel from the upper side adjacent reference pixel of the current block and then obtains a reference pixel from the left side adjacent reference pixel of the current block. Otherwise, if isTransposed is equal to 1 (or TRUE), it indicates that the intra prediction unit (106) first obtains a reference pixel from the left side adjacent reference pixel of the current block and then obtains a reference pixel from the upper side adjacent reference pixel of the current block. The intra prediction unit (106) may determine the value of isTransposed using a rate distortion optimization method or based on a correlation comparison between adjacent reference pixels and the current block. The value of isTransposed is transmitted to the entropy coding unit (115) to be encoded and written to the bitstream as one of the parameters of the MIP mode.

[0411] The intra prediction unit (106) puts elements of refT and refL into buffer pTemp in the order indicated by isTransposed.

[0412] Optionally, the intra prediction unit (106) obtains p[x], where x=0, … , inSize-1. It is as follows.

[0413] - When mipSizeId is 2, p[x]=pTemp[x+1]-pTemp[0].

[0414] Otherwise (if mipSizeId is less than 2), p[0]=pTemp[0]-(1<<(BitDepth-1)), p[x]=pTemp[x]-pTemp[0].

[0415] BitDepth is the bit depth of the color component of the pixel in the current block. Here, the color component is one of the RGB components, one of the YUV components, or one of the YCbCr components, for example, the Y component, etc.

[0416] Optionally, the intra prediction unit (106) can obtain p[x], where x=0, ..., inSize-1. It is as follows.

[0417] - When mipSizeId is 2, p[x]=pTemp[x+1]-pTemp[0].

[0418] - Otherwise (mipSizeId is less than 2), p[0]=(1<<(BitDepth-1))-pTemp[0], p[x]=pTemp[x]-pTemp[0].

[0419] Optionally, the intra prediction unit (106) may obtain the value of p[x] using a uniform calculation method and does not need to determine the value of mipSizeId. For example, (1<<(BitDepth-1)) is added as an additional element to buffer pTemp, whereby the intra prediction unit (106) calculates p[x] as pTemp[x+1]-pTemp[0].

[0420] In step 602, the intra prediction unit (106) obtains the MIP prediction value of the current block using a reference pixel group and an MIP weighting matrix. The MIP weighting matrix is ​​selected from a predefined group of MIP weighting matrices based on a MIP mode index value (indicated as ModeId) corresponding to the MIP mode and a block size index value of the MIP (indicated as mipSizeId).

[0421] The intra prediction unit (106) obtains the MIP prediction value (represented as predMip[x][y]) of a partial prediction pixel corresponding to one or more pixel locations within the current block. In the example of step 602 illustrated in FIG. 6, the partial prediction pixel is a pixel indicated by a gray square in the current block. The input to the prediction module (601) is the reference pixel p[x] obtained in step 601. The prediction module (601) calculates the partial prediction pixel using an MIP weighting matrix and shifting parameters. Here, the shifting parameters include a shifting number parameter and a shifting offset parameter.

[0422] In a possible embodiment, when the prediction module (601) represents a pixel with coordinates (x, y), the acquired prediction pixel is represented as predMip[x][y], and the calculation formula for predMip[x][y] is as shown in Equation (5) and Equation (6).

[0423] In Equation (5) or Equation (6), mWeight[i][j] is a MIP weight matrix. Here, the matrix elements are preset constants or can be adaptively updated using a training method, and the input of the training method is one or more coded pictures or blocks, or pictures from other bitstreams provided to the encoder (100) by an external device. fO is a shifting offset parameter used to determine oW. sW is a shifting number parameter. p[i] is a MIP input sample value calculated using a reference pixel. pTemp[0] represents the value corresponding to index number 0 in the first temporary reference value. ">>" is a binary right shifting operator defined in VVC. When the MIP mode is finally determined to perform intra prediction for the current block, the intra prediction unit (106) may also transmit mWeight[i][j] to the entropy coding unit (115). The entropy coding unit (115) can write mWeight[i][j] to one or more data units of the bitstream.

[0424] The prediction module (601) can determine the values ​​of sW and fO based on the size of the current block and the MIP mode used in the current block. In one example, the prediction module (601) obtains the values ​​of sW and fO using a lookup table.

[0425] Optionally, the prediction module (601) can determine sW according to the size parameter and MIP mode of the current block using Table 4 above.

[0426] Optionally, the prediction module (601) can also determine sW based on the size parameter of the current block using Table 5 above.

[0427] Optionally, the prediction module (601) may set sW directly to a constant value. For example, for blocks and other MIP modes with various size parameters, the prediction module (601) may set sW to 5. Or, for blocks and other MIP modes with various size parameters, the prediction module (601) may set sW to 6. Or, for blocks and other MIP modes with various size parameters, the prediction module (601) may set sW to 7.

[0428] Optionally, the prediction module (601) can determine the fO based on the size parameter of the current block and the MIP mode using Table 6 above.

[0429] Optionally, the prediction module (601) can determine fO based on the size parameter of the current block using Table 7 above.

[0430] Optionally, the prediction module (601) may set fO directly to a constant value (e.g., 0 to 100). For example, for blocks and other MIP modes having various size parameters, the prediction module (601) sets fO to 32. Or the prediction module (601) sets fO to 46. Or the prediction module (601) sets fO to 56. Or the prediction module (601) sets fO to 66.

[0431] The intra prediction unit (106) can perform a clipping operation on the MIP prediction values ​​within predMip. When isTransposed is 1 (or TRUE), the predSize×predSize array predMip[x][y] (x=0, …, predSize-1, y=0, …, predSize-1) is transformed into predTemp[y][x]=predMip[x][y], and predMip=predTemp.

[0432] For example, optionally, when the size parameter of the current block is 8x8 (i.e., when both cbWidth and cbHeight are 8), the intra prediction unit (106) determines mipSizeId to 2 and obtains an 8x8 predMip.

[0433] Optionally, if the size parameter of the current block is 8x8 (i.e., if both cbWidth and cbHeight are 8), the intra prediction unit (106) determines mipSizeId to 1 and obtains a 4x4 predMip.

[0434] Step 603, the intra prediction unit (106) obtains the intra prediction values ​​of the current block (stored in the array as predSamples[x][y], x=0, ..., nTbW-1, y=0, ..., nTbH-1). They are as follows.

[0435] - When the intra prediction unit (106) determines that nTbW is greater than predSize or that nTbH is greater than predSize, the intra prediction unit (106) calls an upsampling process to obtain predSamples using predMip. The intra prediction unit (106) obtains a prediction pixel corresponding to the remaining pixels excluding some pixels in the current block. As illustrated in FIG. 6, the intra prediction unit (106) may use a filtering module (602) to obtain a prediction pixel corresponding to the remaining pixels excluding some pixels in the current block. The input to the filtering module (602) is the pixel indicated by the gray square in step 602. The filtering module (602) may use one or more interpolation filters and uses the input to obtain a prediction pixel corresponding to the remaining pixels excluding some pixels in the current block. For example, the input includes a reference pixel and a partial prediction pixel at one or more pixel locations in the current block. Alternatively, the input includes a partial predicted pixel of one or more pixel locations among neighbor pixels and the current block. Alternatively, the input includes a reference pixel, a neighbor pixel, and a partial predicted pixel of one or more pixel locations among the current block. For example, optionally, when the size of the current block is 8x8 (i.e., both cbWidth and cbHeight are 8), the intra prediction unit (106) determines mipSizeId to 1, and the intra prediction unit (106) applies upsampling to a 4x4 predMip to obtain an 8x8 intra prediction block of the current block.

[0436] - Otherwise, the intra prediction unit (106) sets the intra prediction block of the current block to be the same as the MIP prediction block of the current block. That is, it sets predSamples[x][y] (x=0, …, nTbW-1, y=0, … nTbH-1) to be the same as predMip[x][y]. For example, specifically, when the size parameter of the current block is 8x8 (i.e., when both cbWidth and cbHeight are 8), the intra prediction unit (106) determines mipSizeId to 2, and the intra prediction unit (106) obtains predSamples of the current block, the size of which is 8x8 (i.e., when both cbWidth and cbHeight are 8).

[0437] In this way, according to the block diagram of the procedure illustrated in FIG. 6, after step 603, the intra prediction unit (106) can obtain an intra prediction block of the current block (i.e., CU), that is, determine an intra prediction value of at least one pixel of the current block.

[0438] The prediction unit (102) outputs an intra-prediction block of the current block. The first adder (107) calculates the difference value between the current block and the intra-prediction block of the current block among the outputs of the division unit (101), i.e., the residual block (i.e., residual CU). The conversion unit (108) reads the residual block and performs one or more conversion operations on the residual block to obtain coefficients. The quantization unit (109) quantizes the coefficients and outputs quantized coefficients (i.e., levels).

[0439] The transformation unit (108) performs a first transformation, such as an integer transformation designed based on the initial DCT, on the residual block. The transformation unit (108) determines whether a second transformation can be applied to the block. When application is permitted, the transformation unit (108) further determines whether to apply a second transformation to the coefficients obtained after performing the first transformation. LFNST is an example of a second transformation.

[0440] Referring to FIG. 7, this is a diagram illustrating a procedure for performing LFNST provided in an embodiment of the present application. In FIG. 7, block (701) represents a residual block.

[0441] Step 701, the conversion unit (108) performs a first conversion (i.e., core conversion), for example, an integer conversion designed based on the original DCT, on the block (701) to obtain a block (702) containing conversion coefficients (referred to as "first conversion coefficients") corresponding to the first conversion.

[0442] Step 702, the conversion unit (108) determines whether it is permissible to perform a secondary conversion, such as LFNST, on all or part of the first conversion coefficients of the block (702).

[0443] For example, optionally, if the intra-prediction mode of the transformation block including LFNST is MIP mode and the minimum values ​​of the width and height of the transformation block are 8 or greater, the transformation unit (108) is allowed to perform LFNST on the transformation block.

[0444] Optionally, if the intra-prediction mode of the transformation block including LFNST is MIP mode and the value of mipSizeId is one of a preset value (e.g., 2) or a plurality of preset values ​​(e.g., 1, 2), the transformation unit (108) is allowed to perform LFNST on the transformation block.

[0445] When the conversion unit (108) allows performing LFNST on the conversion block, the conversion unit (108) determines an LFNST parameter, for example, lfnst_index. When lfnst_index is 0, it indicates that the conversion unit (108) does not perform LFNST on the conversion block. When lfnst_index is greater than 0, it indicates that LFNST is performed on the conversion block using a conversion kernel from the LFNST conversion kernel candidate set.

[0446] The conversion unit (108) can determine the value of lfnst_index using a traditional rate distortion optimization method. First, the conversion unit (108) obtains a first result without performing LFNST on the conversion block.

[0447] The transformation unit (108) selects a set of LFNST transformation kernel candidates according to MIP parameters. The MIP parameters may include at least one of an MIP mode index value (i.e., modeId) and an MIP transpose instruction parameter (i.e., isTransposed).

[0448] The conversion unit (108) sets the value of the variable predModeIntra to be the same as the value of modeId. The conversion unit (108) selects a portion of the first conversion coefficients in block (702), for example, the coefficients of sub-blocks (7001, 7002, 7003), and determines a conversion kernel for performing LFNST on the coefficients of the sub-blocks. The size of the sub-blocks may be a preset value, for example, 8x8. The conversion unit (108) determines the index value (i.e., lfnstTrSetIdx) of the LFNST conversion kernel candidate set according to the value of predModeIntra. For block coding in MIP mode, the conversion unit (108) can obtain the value of lfnstTrSetIdx using the lookup table of Table 10.

[0449] The transformation unit (108) can determine the value of lfnst_index using a traditional rate distortion optimization method (i.e., the value being greater than 0 indicates that the transformation kernel used in the LFNST transformation kernel candidate set is indicated by lfnstTrSetIdx). The transformation unit (108) sets the value of lfnst_index to the index number of the transformation kernel in the LFNST transformation kernel candidate set, thereby causing the compensation function to have a minimum value and also obtaining a second compensation result.

[0450] If the result of the first comparison is greater than the result of the second comparison, the conversion unit (108) decides to perform LFNST on the conversion block and transmits lfnst_index, which represents the index number of the conversion kernel, to the entropy coding unit (115). Otherwise, the conversion unit (108) decides not to perform LFNST on the conversion block, sets lfnst_value to 0, and transmits lfnst_index, which indicates that LFNST is not performed, to the entropy coding unit (115).

[0451] If lfnst_index is not 0, the transformation unit (108) performs LFNST on the transformation block using coefficients from sub-blocks (7001, 7002, 7003), obtains LFNST coefficients, and places the LFNST coefficients in the sub-blocks (7011, 7012, 7013) of the block (703). d[x][y] is assumed to be the block of the first transformation coefficients, x=0, …, nTbW-1, y=0, …, nTbH-1, where nTbW and nTbH are the width and height of the block (703), respectively. v[x] is assumed to be the block of the LFNST coefficients, x=0, …, nLfnstOutSize-1, nLfnstOutSize=(nTbW>=8 && nTbH>= 8)? 48:16.

[0452] Optionally, the conversion unit (108) obtains a block (703) of conversion coefficients using the following command and transmits a block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (8). log2LfnstSize is as shown in Equation (9) above.

[0453] Optionally, when isTransposed is equal to 0, the transformation unit (108) obtains a block (703) of LFNST coefficients using the following command and transmits the block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (10).

[0454] When isTransposed is equal to 1, the transformation unit (108) obtains a block (703) of LFNST coefficients using the following command and transmits the block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (11).

[0455] Optionally, when isTransposed is equal to 1, the transformation unit (108) obtains a block (703) of LFNST coefficients using the following command and transmits the block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (10).

[0456] When isTransposed is equal to 0, the transformation unit (108) obtains a block (703) of LFNST coefficients using the following command and transmits the block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (11).

[0457] log2LfnstSize is determined according to the above equation (9).

[0458] Additionally, the transformation unit (108) can also determine the value of lfnst_index for a transformation block encoded in a traditional intra-prediction mode (i.e., angle intra-prediction mode, DC mode, and PLANAR mode, etc.). This is similar to the rate distortion optimization method for determining the value of lfnst_index of a transformation block in MIP mode, where LFNST is not performed on the transformation block and the first result is determined.

[0459] The conversion unit (108) uses a lookup table to determine the value of lfnstTrSetIdx according to the mode index value of the existing intra prediction mode (assigned to predModeIntra). That is, it determines the set of LFNST conversion kernel candidates selected for the current block, specifically as shown in Table 11.

[0460] Next, the transformation unit (108) can determine the value of lfnst_index using a traditional rate distortion optimization method (i.e., if this value is greater than 0, it indicates that the transformation kernel used in the LFNST transformation kernel candidate set is indicated by lfnstTrSetIdx). The transformation unit (108) sets the value of lfnst_index to the index number of the transformation kernel in the LFNST transformation kernel candidate set, thereby causing the compensation function to have a minimum value and also obtaining a second compensation result.

[0461] If the result of the first comparison is greater than the result of the second comparison, the conversion unit (108) decides to perform LFNST on the conversion block and transmits lfnst_index, which represents the index number of the conversion kernel, to the entropy coding unit (115). Otherwise, the conversion unit (108) decides not to perform LFNST on the conversion block, sets lfnst_value to 0, and transmits lfnst_index, which indicates that LFNST is not performed, to the entropy coding unit (115).

[0462] If lfnst_index is not 0, the transformation unit (108) performs LFNST on the transformation block using coefficients from sub-blocks (7001, 7002, 7003), obtains LFNST coefficients, and places the LFNST coefficients in the sub-blocks (7011, 7012, 7013) of the block (703). d[x][y] is assumed to be the block of the first transformation coefficients, x=0, …, nTbW-1, y=0, …, nTbH-1, where nTbW and nTbH are the width and height of the block (703), respectively. v[x] is assumed to be the block of the LFNST coefficients, x=0, …, nLfnstOutSize-1, nLfnstOutSize=(nTbW>=8 && nTbH>= 8)? 48:16.

[0463] Optionally, when predModeIntra is less than or equal to 34, the conversion unit (108) obtains a block (703) of LFNST coefficients using the following command and transmits the block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (10).

[0464] When predModeIntra is greater than 34, the conversion unit (108) obtains a block (703) of LFNST coefficients using the following command and transmits the block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (11).

[0465] Optionally, when predModeIntra is greater than 34, the conversion unit (108) obtains a block (703) of LFNST coefficients using the following command and transmits the block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (10).

[0466] When predModeIntra is less than or equal to 34, the conversion unit (108) obtains a block (703) of LFNST coefficients using the following command and transmits the block (703) of LFNST coefficients in d[x][y] to the quantization unit (109), specifically as shown in Equation (11).

[0467] log2LfnstSize is determined according to the above equation (9).

[0468] Additionally, the inverse quantization unit (110) scales the quantized coefficients and outputs the reconstructed coefficients. The inverse transform unit (111) performs one or more inverse transforms corresponding to the transform of the transform unit (108) and outputs the reconstructed residuals. The second adder (112) calculates the reconstructed CU by adding the reconstructed residuals and the intra-prediction block of the current block from the prediction unit (102). The second adder (112) also transmits its output to the prediction unit (102) to be used as an intra-prediction reference.

[0469] The output of the filtering unit (113) is a decoded picture or sub-picture, and this decoded picture or sub-picture is transmitted to the DPB unit (114). The DPB unit (114) outputs the decoded picture according to timing and control information. Here, the picture stored in the DPB unit (114) may be used as a reference for performing inter-prediction or intra-prediction in the prediction unit (102).

[0470] The entropy coding unit (115) converts the unit parameters (necessary to obtain the decoded picture) and control parameters and additional information from the encoder (100) into a binary representation, and writes this binary representation to a generated bitstream (or "video bitstream") according to the syntax structure of each data unit, specifically as shown in Tables 9A and 9B.

[0471] Using the syntax structure of Table 9A, when the minimum values ​​of the width and height of the transformation block in the coding unit are 8 or greater (i.e., when both the width and height are 8 or greater), the entropy coding unit (115) encodes the lfnst_index of the coding unit using MIP mode. Another selectable condition may be set such that both the width and height are greater than or equal to a first value (e.g., 8) and the sum of the width and height is greater than or equal to a second value (e.g., 16).

[0472] Using the syntax structure of Table 9B, the entropy coding unit (115) encodes the lfnst_index of the coding unit using MIP mode when the mipSizeId of the coding unit is equal to 2. Other selectable conditions can be set as follows. The mipSizeId of the coding unit is equal to one of several values ​​(e.g., 1 and 2).

[0473] FIG. 8 is a flowchart for encoding LFNST parameters provided in an embodiment of the present application. As illustrated in FIG. 8, the process may include the following.

[0474] S801, the entropy coding unit (115) checks the above conditions to determine whether to encode the LFNST parameters.

[0475] S802, the entropy coding unit (115) encodes LFNST parameters using context-based adaptive binary arithmetic coding (CABAC).

[0476] In S801, the entropy coding unit (115) checks and determines the value of the LFNST parameter, e.g., lfnst_index, and then in S802, the value of lfnst_index can be encoded using a CABAC in which the descriptor of Table 9A and Table 9B is "ae(v)".

[0477] In an embodiment of the present application, the encoder (100) may be a computing device having a processor and a storage medium for recording an encoding program. When the processor reads and executes the encoding program, the encoder (100) reads an input image and generates a corresponding bitstream. Additionally, the encoder (100) may be a computing device having one or more chips. A unit implemented as an integrated circuit on a chip has similar functions through connections and data exchange similar to the corresponding unit of FIG. 1.

[0478] An embodiment of the present application provides an encoding method. The prediction parameter of the current block is determined, the prediction parameter includes a prediction mode parameter, and when the prediction mode parameter indicates that an intra prediction value is determined using a Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, adjacent sample values ​​of the current block are obtained, MIP input sample values ​​of the current block are determined according to the adjacent sample values ​​of the current block, MIP prediction values ​​of the chroma component of the current block are determined according to the MIP input sample values, the MIP weighting matrix, and shifting parameters, the MIP prediction values ​​are filtered to determine the intra prediction values ​​of the chroma component of the current block, the prediction residual values ​​of the chroma component of the current block are determined according to the intra prediction values ​​of the chroma component of the current block, a Low-Frequency Non-Separable Transform (LFNST) is performed on the prediction residual values ​​to determine LFNST parameters, and the LFNST parameters are encoded and written as a bitstream. In this way, for MIP mode, not only is encoding performance guaranteed, but complexity is reduced, the storage space required for the encoding process is decreased, and encoding efficiency can be effectively improved. Furthermore, applying LFNST technology to MIP mode prediction can make the LFNST transform more flexible and further enhance encoding efficiency due to the introduction of MIP parameters.

[0479] In another embodiment of the present application, referring to FIG. 9, there is a flowchart of a decoding method provided in an embodiment of the present application. As illustrated in FIG. 9, the method may include the following.

[0480] S901 parses the bitstream to obtain the prediction parameters and LFNST (Low-Frequency Non-Separable Transform) parameters of the current block, and the prediction parameters include prediction mode parameters.

[0481] A picture to be decoded may be divided into multiple picture blocks, and each picture block to be decoded may be referred to as a decoding block. Here, each decoding block may include a first image component, a second image component, and a third image component. The current block is a decoding block in which the prediction of the current first image component, the second image component, or the third image component in the video picture is performed.

[0482] In addition, it should be noted that prediction parameters may include prediction mode parameters, which are used to indicate the prediction mode used by the current block, and that different prediction modes correspond to different prediction mode parameters. Prediction modes generally include inter-prediction modes, traditional intra-prediction modes, and non-traditional intra-prediction modes. Traditional intra-prediction modes may include DC mode, PLANAR mode, angle intra-prediction mode, etc. Non-traditional intra-prediction modes may include MIP mode, CCLM mode, IBC mode, and PLT mode, etc. That is, the encoder selects the optimal prediction mode to encode the current block. In this process, the prediction mode of the current block is determined, and the corresponding prediction mode parameters are obtained; then, the prediction parameters containing the prediction mode parameters are written to the bitstream and transmitted from the encoder to the decoder.

[0483] In this way, the bitstream in the decoder can be parsed to obtain the prediction parameters of the current block, and the prediction mode parameters included in the prediction parameters obtained through parsing can be used to determine whether the current block uses MIP mode.

[0484] S902, if the prediction mode parameter indicates that the intra prediction value is determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, the adjacent sample value of the current block is obtained, and the MIP input sample value of the current block is determined according to the adjacent sample value of the current block.

[0485] With respect to the current block, it should be noted that the embodiment of the present application performs intra-prediction on the chroma component of the current block using MIP mode. In this process, it is first necessary to obtain adjacent sample values ​​of the current block, and then determine the MIP input sample values ​​of the current block based on the adjacent sample values ​​of the current block.

[0486] The adjacent sample value of the current block may include the left adjacent sample value and the upper adjacent sample value of the current block. That is, the MIP input sample value of the current block can be determined based on the left adjacent sample value and the upper adjacent sample value of the current block.

[0487] In some embodiments, determining the MIP input sample value of the current block based on the adjacent sample value of the current block may include the following.

[0488] The block size index value of the current block is determined based on the current block size parameter.

[0489] Downsampling filtering is performed on adjacent sample values ​​of the current block to obtain a first temporary reference value.

[0490] If the block size index value of the current block is within a preset range, the second constant value is determined according to the bit depth of the adjacent sample value of the current block. The value corresponding to index number 0 among the MIP input sample values ​​is set as the difference between the second constant value and the value corresponding to index number 0 among the first temporary reference values. The value corresponding to index number i among the MIP input sample values ​​is set as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where i is an integer greater than 0.

[0491] If the block size index value of the current block is outside the preset range, the value corresponding to index number j among the MIP input sample values ​​is set to the difference between the value corresponding to index number (j+1) among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where j is an integer greater than or equal to 0.

[0492] Additionally, if the block size index value of the current block is within a preset range, the above method may further include the following.

[0493] The second constant value is determined according to the bit depth of the adjacent sample value of the current block. The value corresponding to index number 0 among the MIP input sample values ​​is set as the difference between the value corresponding to index number 0 among the first temporary reference values ​​and the second constant value. The value corresponding to index number i among the MIP input sample values ​​is set as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where i is an integer greater than 0.

[0494] After performing downsampling filtering on adjacent sample values ​​of the current block, a first temporary reference value can be obtained. For the first temporary reference value, specifically, the filtered adjacent sample values ​​can be buffered in a buffer (represented by pTemp). Among the first temporary reference values, the value corresponding to index number 0 is pTemp[0], and among the first temporary reference values, the value corresponding to index number i is pTemp[i].

[0495] In the embodiments of the present application, it should be noted that the prediction parameter may further include a size parameter of the current block in addition to the prediction mode parameter. The size parameter of the current block may include the width (represented by nTbW) and height (represented by nTbH) of the current block. Additionally, the block size index value (i.e., mipSizeId) of the current block can be determined based on the size parameter of the current block.

[0496] Additionally, whether the value of the size parameter of the current block is within a preset range can be determined based on whether the block size index value of the current block (represented by mipSizeId) is within a preset range. Specifically, if mipSizeId=0 or 1, it indicates that the block size index value of the current block is within a preset range, that is, that the value of the size parameter of the current block is within a preset range. If mipSizeId=2, it indicates that the block size index value of the current block is outside a preset range, that is, that the value of the size parameter of the current block is not within a preset range.

[0497] In other words, the MIP input sample value is determined by the buffer (represented by pTemp), the block size index value of the current block (represented by MipSizeId), and the bit depth of the adjacent sample value of the current block (represented by BitDepth). The number of input samples included in the MIP input sample value is related only to the block size index value of the current block, and finally, the value corresponding to index number x among the MIP input sample values ​​(represented by p[x]) can be obtained.

[0498] In addition, in some embodiments, determining a second constant value according to the bit depth of an adjacent sample value of the current block may include the following.

[0499] The second constant value is set to be equal to an integer power of 2, and the exponent of the power is equal to the bit depth of the adjacent sample value of the current block minus 1.

[0500] In addition, in some embodiments, determining a second constant value according to the bit depth of an adjacent sample value of the current block may include the following.

[0501] Binary left shifting is performed on "1" to obtain a second constant value, and the number of bits shifted left is equal to the bit depth of the adjacent sample value of the current block minus 1.

[0502] That is, after obtaining the bit depth (represented as BitDepth) of the adjacent sample value of the current block, the second constant value can be represented as 1<<(BitDepth-1) or 2^(BitDepth-1). In this way, if the value of the size parameter of the current block is within a preset range, the second constant value can be combined to determine the MIP input sample value of the current block.

[0503] In addition, it should be noted that the MIP input samples are matrix vectors used for matrix multiplication operations. The current technical approach is determined by the buffer (represented by pTemp), the type of the current block (i.e., the block size index value of the current block, represented by mipSizeId), the bit depth of the adjacent sample values ​​of the current block (represented by BitDepth), and the number of MIP input samples, and finally, the value corresponding to index number x among the MIP input sample values ​​(represented by p[x]) is obtained.

[0504] In one possible embodiment, when mipSizeId=0 or 1, 1<<(BitDepth-1) minus pTemp[0] is set to p[0]; and when x is not equal to 0, pTemp[x] minus pTemp[0] is set to p[x]. Specifically, as shown in Equation (2).

[0505] In another possible embodiment, when mipSizeId=0 or 1, pTemp[0] minus 1<<(BitDepth-1) is set to p[0]; and when x is not equal to 0, pTemp[x] minus pTemp[0] is set to p[x]. Specifically, as shown in Equation (3).

[0506] In another possible embodiment, when mipSizeId=2, pTemp[x+1] minus pTemp[0] is set to p[x]. Specifically, as shown in Equation (4).

[0507] Additionally, in an embodiment of the present application, the value of p[x] can be obtained by a unified calculation method, and there is no need to determine the value of mipSizeId. In this case, in an embodiment of the present application, 1<<(BitDepth-1)) is added to the end of buffer pTemp as an additional element, p[x] is set to equal pTemp[x+1]-pTemp[0], and x=0, ..., inSize-1.

[0508] In this way, after determining the MIP input sample value of the current block based on the adjacent sample value of the current block, the predicted MIP value of the current block can be determined further.

[0509] The MIP predicted value of the chroma component of the current block is determined based on S903, the MIP input sample value, the MIP weighting matrix, and the shifting parameter.

[0510] The MIP prediction is the predicted value of a partial sample from the chroma component of the current block.

[0511] It should be noted that the shifting parameter may include a shifting offset parameter and a shifting number parameter. In this case, for S903, determining the MIP predicted value of the chroma component of the current block based on the MIP input sample value, the MIP weighting matrix, and the shifting parameter may include the following.

[0512] The product of the sum of the MIP input sample values ​​and the shifting offset parameter is determined based on the value of the shifting offset parameter. The value of the shifting offset parameter is a fixed constant.

[0513] The first constant value is determined according to the value of the shifting number parameter. The value of the shifting number parameter is a fixed constant.

[0514] The value of the first offset is set as the difference between the first constant value and the product above.

[0515] The MIP weighting matrix of the current block is determined based on the prediction parameters.

[0516] The MIP predicted value of the chroma component of the current block is determined according to the MIP weighting matrix, MIP input sample value, shifting number parameter, and first offset.

[0517] The shifting offset parameter is also called the shifting compensation parameter or offset factor and can be denoted by fO. In the embodiments of the present application, the value of the shifting offset parameter may be set as a fixed constant such as 32, 46, 56, 66, etc. The value of the shifting offset parameter may be set to be associated with a shifting offset parameter table, and the value of the shifting offset parameter may be determined through a lookup table, but is not limited thereto.

[0518] The shifting number parameter is also referred to as a shifting factor, number of shifting bits, weighted shifting value, etc., and can be represented as sW, shift, weight shift, etc. In the embodiments of the present application, the shifting number parameter is represented as sW. In the embodiments of the present application, the value of the shifting number parameter may be set as a fixed constant, for example, 5, 6, or 7, etc. The value of the shifting number parameter may also be set to be associated with a shifting number parameter table, and the value of the shifting number parameter may be determined through a lookup table, but is not limited thereto.

[0519] In addition, the first offset can be represented as oW, and the first offset is related to both the shifting number parameter and the shifting offset parameter.

[0520] It should be noted that the prediction parameters may include prediction mode parameters and the size parameters of the current block. If the prediction mode parameters indicate that the chroma component of the current block determines the intra-predicted value using MIP mode, a weight matrix table may be pre-configured and stored in memory or a storage unit. The memory or storage unit may be integrated into the decoder or installed separately. In this way, based on the block size index value (mipSizeId) and the MIP mode index value (modeId) of the current block, the MIP weight matrix (also referred to as the MIP weight matrix or MIP matrix) to be used by the current block can be determined through a lookup table and is denoted as mWeight[x][y].

[0521] In the decoder, it should be noted that the shifting number parameter table may be pre-configured and stored in memory or a storage unit. Here, the memory or storage unit may be integrated into the decoder or installed separately. In the embodiments of the present application, the shifting number parameter (sW) may be determined in several ways as follows.

[0522] In possible embodiments, for different block size index values ​​and different MIP mode index values, the shifting number parameter may be different. In some embodiments, the method may also include the following.

[0523] When determining the intra-predicted value using MIP mode for the chroma component of the current block, the bitstream is parsed to obtain the MIP mode index value of the current block.

[0524] A value corresponding to the MIP mode index value is retrieved from the first preset lookup table according to the MIP mode index value, and the first preset lookup table is used to record the correspondence between the MIP mode index value and the value of the shifting number parameter.

[0525] The retrieved value is confirmed as the value of the shifting number parameter.

[0526] The value of the shifting number parameter can be looked up based on the block size index value (represented by mipSizeId) and the MIP mode index value (modeId) of the current block. For different mipSizeId and modeId in the first preset lookup table of Table 4, the shifting number parameter required for matrix multiplication can be determined through the lookup table.

[0527] However, the decoder side must store Table 4 in memory or a storage unit in the form of a lookup table. However, storage requires a cost, and the same applies to the lookup process. Since the shifting factor of Table 4 is related to both the current block's block size and the MIP mode index value, memory usage increases and computational complexity increases.

[0528] In order to reduce memory usage and computational complexity, the method for determining the shifting factor in the embodiments of the present application can be simplified.

[0529] In other possible embodiments, the value of the shifting number parameter may be set as a fixed constant, which is a fixed constant unrelated to the block size index value and the MIP mode index value. For example, for different block size index values ​​and different MIP mode index values, the value of the shifting number parameter may be set to 5. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting number parameter may be set to 6. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting number parameter may be set to 7. In the embodiments of the present application, preferably, the value of the shifting number parameter is set to 6, but is not limited thereto.

[0530] In another possible embodiment, regarding the value of the shifting number parameter, the method may further include the following.

[0531] The block size index value of the current block is determined based on the current block size parameter.

[0532] The value of the shifting number parameter is determined based on the block size index value of the current block.

[0533] The block size index value of the current block can be determined according to the size parameter of the current block. In some embodiments, determining the block size index value of the current block according to the size parameter of the current block may include the following.

[0534] If both the width and height of the current block are 4, the block size index value of the current block is set to 0.

[0535] If both the width and height of the current block are 8, or if either the width or height of the current block is 4, the block size index value of the current block is set to 1.

[0536] If the width and height of the current block do not satisfy the above conditions, the block size index value of the current block is set to 2.

[0537] In this way, after determining the block size index value of the current block, the value of the shifting number parameter can be determined further according to the block size index value of the current block.

[0538] Optionally, in some embodiments, determining the value of the shifting number parameter according to the block size index value of the current block may include the following.

[0539] When the block size index values ​​are 0, 1, and 2, respectively, the values ​​of the shifting number parameters corresponding to the block size index values ​​of the current block are 5, 6, and 5, respectively.

[0540] Optionally, in some embodiments, determining the value of the shifting number parameter according to the block size index value of the current block may include the following.

[0541] The value of the shifting number parameter is set to be equal to the ratio of the current block width or height and the first preset value corresponding to the current block size index value.

[0542] Here, the first preset value represents the quantity of MIP input sample values ​​obtained from the boundary of the current block. In this case, the above method may further include the following.

[0543] When the block size index values ​​of the current block are 0, 1, and 2, respectively, the first preset values ​​corresponding to the block size index values ​​of the current block are 2, 4, and 4, respectively.

[0544] That is, when the first preset value represents the quantity of MIP input sample values ​​obtained from the boundary of the current block, if the block size index value of the current block is 0, the corresponding first preset value is 2, if the block size index value of the current block is 1, the corresponding first preset value is 4, and if the block size index value of the current block is 2, the corresponding first preset value is 4, and in this way, the value of the shifting number parameter can be determined according to the ratio of the width or height of the current block to the corresponding first preset value.

[0545] Optionally, in some embodiments, determining the value of the shifting number parameter according to the block size index value of the current block may include the following.

[0546] The value of the shifting number parameter is set to be equal to the ratio of the current block width or height and the second preset value corresponding to the current block size index value.

[0547] Here, the second preset value represents the size of the MIP prediction block of the current block obtained by calculating using the MIP weighting matrix directly. In this case, the method may also include the following.

[0548] When the block size index values ​​of the current block are 0, 1, and 2, respectively, the second preset values ​​corresponding to the block size index values ​​of the current block are 4, 4, and 8, respectively.

[0549] That is, when the second preset value represents the size of the MIP prediction block of the current block obtained by calculating directly using the MIP weighting matrix, if the block size index value of the current block is 0, the corresponding second preset value is 4, if the block size index value of the current block is 1, the corresponding second preset value is 4, and if the block size index value of the current block is 2, the corresponding second preset value is 8, and in this way, the value of the shifting number parameter can be determined according to the ratio of the width or height of the current block to the second preset value.

[0550] In another possible embodiment, the shifting number parameter table may be minimized and the value of the shifting number parameter is still determined by a lookup table. Optionally, in some embodiments, determining the value of the shifting number parameter according to the block size index value of the current block may include the following.

[0551] Based on the block size index value, a value corresponding to the block size index value is retrieved from the second preset lookup table. Here, the second preset lookup table is used to record the correspondence between the block size index value and the value of the shifting number parameter.

[0552] The retrieved value is confirmed as the value of the shifting number parameter.

[0553] It must be explained that the value of the shifting number parameter can be looked up based only on the block size index value of the current block (represented by mipSizeId). In the second preset lookup table exemplified in Table 5, each block size index value can correspond to a fixed value. That is, the size of each block or the set of sizes of each block can have a fixed value of the shifting number parameter as shown in Table 5.

[0554] According to Table 5, when the block size index values ​​of the current block are 0, 1, and 2, respectively, the values ​​of the shifting number parameters corresponding to the block size index values ​​are 5, 6, and 5, respectively.

[0555] By simplifying the method for determining the shifting number parameter in this way, the storage of the minimize lookup table can be realized, particularly by minimizing the shifting number parameter table or by fixing the shifting number parameter value. Therefore, the memory occupied to store the shifting factor table in MIP mode can be reduced without increasing computational complexity.

[0556] A shifting offset parameter table can be pre-set in the decoder, and the shifting offset parameter table can be stored in memory or a storage unit. Here, the memory or storage unit may be integrated into the decoder or may be installed separately. In an embodiment of the present application, the shifting offset parameter (fO) can be determined in the following manner.

[0557] In possible embodiments, the shifting offset parameter may also differ depending on the different block size index value and the different MIP mode index value. In some embodiments, the method may also include the following.

[0558] When determining the intra-predicted value using MIP mode for the chroma component of the current block, the bitstream is parsed to determine the MIP mode index value of the current block.

[0559] Depending on the MIP mode index value, a value corresponding to the MIP mode index value is retrieved from a third preset lookup table, and the third preset lookup table is used to record the correspondence between the MIP mode index value and the value of the shifting offset parameter.

[0560] The retrieved value is confirmed as the value of the shifting offset parameter.

[0561] It should be noted that the value of the shifting offset parameter can be looked up based on the block size index value (represented by mipSizeId) and the MIP mode index value (modeId) of the current block. For different mipSizeId and modeId, the shifting offset parameter required for matrix multiplication can be determined through the lookup table, as shown in the third preset lookup table exemplified in Table 6.

[0562] However, on the decoder side, Table 6 must be stored in memory or a storage unit in the form of a lookup table. However, storage requires a cost, and the lookup process likewise requires a cost. Since the value of the shifting offset parameter in Table 6 is related to both the block size index value and the MIP mode index value of the current block, memory usage increases and computational complexity increases.

[0563] In order to reduce memory usage and computational complexity, the method for determining the shifting offset parameter in the embodiments of the present application can be simplified.

[0564] In other possible embodiments, the value of the shifting offset parameter may be set as a fixed constant, which is a fixed constant unrelated to the block size index value and the MIP mode index value. Generally, the range of the fixed constant is 0 to 100. For example, for different block size index values ​​and different MIP mode index values, the value of the shifting offset parameter may be set to 32. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting offset parameter may be set to 46. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting offset parameter may be set to 56. Or, for different block size index values ​​and different MIP mode index values, the value of the shifting offset parameter may be set to 66. In the embodiments of the present application, preferably, the value of the shifting offset parameter is set to 32, but is not limited thereto.

[0565] In another possible embodiment, regarding the value of the shifting offset parameter, the method may further include the following.

[0566] The block size index value of the current block is determined based on the current block size parameter.

[0567] The value of the shifting offset parameter is determined based on the block size index value of the current block.

[0568] The block size index value of the current block can be determined based on the current block size parameter. Then, the value of the shifting offset parameter can be determined further based on the current block size index value.

[0569] Optionally, in some embodiments, determining the value of the shifting offset parameter according to the block size index value of the current block may include the following.

[0570] When the block size index values ​​are 0, 1, and 2, respectively, the values ​​of the shifting offset parameters corresponding to the block size index values ​​of the current block are 34, 23, and 46, respectively.

[0571] Optionally, in some embodiments, the shifting offset parameter table may be minimized and the shifting factor is still determined by a lookup table. Optionally, in some embodiments, determining the value of the shifting offset parameter according to the block size index value of the current block may include the following.

[0572] Based on the block size index value, the value corresponding to the block size index value is retrieved from the fourth preset lookup table. Here, the fourth preset lookup table is used to record the correspondence between the block size index value and the value of the shifting offset parameter.

[0573] The retrieved value is confirmed as the value of the shifting offset parameter.

[0574] It must be explained that the value of the shifting offset parameter can be looked up based only on the current block size index value (represented by mipSizeId). As shown in the fourth preset lookup table exemplified in Table 7, each block size index value can correspond to a fixed value. That is, the size of each block or the set of sizes of each block can have a fixed value of the shifting offset parameter as exemplified in Table 7.

[0575] According to Table 7, when the block size index values ​​of the current block are 0, 1, and 2, respectively, the values ​​of the shifting offset parameters corresponding to the block size index values ​​are 34, 23, and 46, respectively.

[0576] By simplifying the method for determining shifting offset parameters in this way, it is possible to realize the storage of a minimize lookup table, particularly by minimizing the shifting offset parameter table or fixing the shifting offset parameter value. Therefore, the memory occupied to store the shifting offset parameter table in MIP mode can be reduced without increasing computational complexity.

[0577] Thus, after determining the shifting offset parameter (fO) and the shifting number parameter (sW), for the first constant value, optionally, in some embodiments, determining the first constant value according to the value of the shifting number parameter may include the following.

[0578] The first constant value is set to be equal to an integer power of 2, and the exponent of the power is equal to the value of the shifting number parameter minus 1.

[0579] Optionally, in some embodiments, determining the first constant value according to the value of the shifting number parameter may include the following.

[0580] A binary left shift is performed on "1" to obtain a first constant value, and the number of bits shifted to the left is equal to the value of the shifting number parameter minus 1.

[0581] That is, after obtaining the shifting number parameter (sW), the first constant value can be expressed as 1<<(sW-1) or 2^(sW-1). When the value of the shifting number parameter is set to 6, the first constant value is equal to 32.

[0582] Here, if the first offset is denoted as oW, it can be obtained by calculating the product of the sum of the MIP input sample values ​​and the shifting offset parameter according to the shifting offset parameter (fO), i.e., is. The value of oW is It can be set to.

[0583] In this way, the MIP weighting matrix, MIP input sample value, shifting number parameter, and first offset can be obtained in MIP mode, and subsequently, it becomes convenient to determine the MIP prediction value of the current block. Specifically, in some embodiments, determining the MIP prediction value of the current block according to the MIP weighting matrix, MIP input sample value, shifting number parameter, and first offset may include the following.

[0584] Calculate the first weighted sum of the MIP weight matrix and the MIP input sample values.

[0585] Calculate the first weighted sum and the first offset sum.

[0586] Binary right-shifting is performed on the first sum to obtain the first right-shift value, and the number of bits shifted to the right is equal to the value of the shifting number parameter.

[0587] The MIP prediction value of the current block is set to be equal to the sum of the first right shift value and the value corresponding to index number 0 among the first temporary reference values, and the first temporary reference value is obtained by performing downsampling filtering on the adjacent sample value of the current block.

[0588] In MIP mode, the MIP weight matrix (represented by mWeight), shifting number parameter (represented by sW), and shifting offset parameter (represented by fO) can be determined based on the block size index value (represented by mipSizeId) and the MIP mode index value (represented by modeId) of the current block. Then, the MIP input sample value (represented by p[x]), mWeight, sW, and fO are input into matrix multiplication to obtain the MIP prediction value (represented by predMip[x][y]) output from matrix multiplication, and the samples of predMip[x][y] are arranged in a matrix / array form according to predSize×predSize. The formula for calculating predMip[x][y] is as exemplified in Equation (5) or Equation (6).

[0589] S904, filter the MIP prediction values ​​to determine the intra prediction values ​​of the chroma components of the current block.

[0590] It should be noted that the MIP prediction block consists of MIP prediction values. After acquiring the MIP prediction block, the intra prediction value of the current block can be determined by determining whether the size parameter of the MIP prediction block is identical to the size parameter of the current block. Specifically, if the size parameter of the MIP prediction block is identical to the size parameter of the current block based on the determination result, the intra prediction block of the current block is set to be identical to the MIP prediction block, and the MIP prediction block includes the prediction values ​​of all pixel locations within the current block. If the size parameter of the MIP prediction block is different from the size parameter of the current block, the MIP prediction block is filtered to acquire a filtered prediction block, and the filtered prediction block is set as the intra prediction block of the current block. Filtering may include upsampling filtering or low-pass filtering.

[0591] S905, when the LFNST parameter indicates to perform LFNST on the current block, the reconstructed transformation factor block of the current block is determined, and a second transformation factor block is obtained by performing LFNST on at least a portion of the reconstructed transformation factors among the reconstructed transformation factor blocks.

[0592] In addition, it should be noted that not all current blocks are capable of performing LFNST, which implies that LFNST parameters do not necessarily exist in the bitstream. In such cases, certain conditions (such as the minimum value among the size parameters of the current block, the block size index value of the current block, etc.) must be checked to determine whether LFNST parameters exist in the bitstream. Accordingly, in some embodiments, parsing the bitstream to obtain LFNST parameters may include the following.

[0593] Determines whether the LFNST parameter exists in the bitstream.

[0594] If it is confirmed that LFNST parameters exist in the bitstream, the bitstream is parsed to obtain the LFNST parameters.

[0595] That is, it must first be determined whether an LFNST parameter exists in the bitstream, and if the determination result is 'yes', that is, only if an LFNST parameter exists in the bitstream, the step of parsing the bitstream to obtain the LFNST parameter can be performed.

[0596] Optionally, in some embodiments, determining whether an LFNST parameter exists in the bitstream may include the following.

[0597] When determining the intra-predicted value using MIP mode for the chroma component of the current block, the minimum value among the size parameters of the current block is determined.

[0598] Determines whether the LFNST parameter exists in the bitstream based on the minimum value.

[0599] In addition, determining whether an LFNST parameter exists in the bitstream based on the minimum value may include the following.

[0600] If the minimum value is greater than or equal to the first preset threshold, it is determined that the LFNST parameter exists in the bitstream.

[0601] Here, the first preset threshold may be used to represent a preset threshold for evaluating whether to perform LFNST. In an embodiment of the present application, the first preset threshold may be set to 8, and is not specifically limited thereto.

[0602] That is, when performing intra prediction using MIP mode on the chroma component of the current block, the minimum value among the size parameters of the current block can be determined. For example, if the minimum values ​​of width and height are 8 or greater, it is determined that an LFNST parameter exists in the bitstream, and the bitstream can be parsed to obtain an LFNST parameter that is equal to the value of lfnst_index.

[0603] Optionally, in some embodiments, determining whether an LFNST parameter exists in the bitstream may include the following.

[0604] When determining the intra-predicted value using MIP mode for the chroma component of the current block, the block size index value of the current block is determined according to the size parameter of the current block.

[0605] Determines whether the LFNST parameter exists in the bitstream based on the block size index value.

[0606] Additionally, determining whether an LFNST parameter exists in the bitstream based on the block size index value may include the following.

[0607] If the block size index value is equal to the second preset threshold, it is determined that the LFNST parameter exists in the bitstream.

[0608] Here, a second preset threshold may also be used to represent a preset threshold for evaluating whether to perform LFNST. In an embodiment of the present application, the second preset threshold may be set to one of a preset value (e.g., 2) or a plurality of preset values ​​(e.g., 1, 2), but is not specifically limited.

[0609] That is, when performing intra prediction using MIP mode on the chroma component of the current block, the block size index value (mipSizeId) of the current block can be determined based on the size parameter of the current block. For example, when the value of mipSizeId is equal to 2, it is determined that an LFNST parameter exists in the bitstream, and the bitstream can be parsed to obtain an LFNST parameter equal to the value of lfnst_index.

[0610] In some embodiments, parsing a bitstream to obtain LFNST parameters may include the following.

[0611] Parse the bitstream to obtain the value of the LFNST index number.

[0612] It should be noted that the LFNST index number can be represented as lfnst_index, and the value of the LFNST index number is used to determine whether to perform LFNST on the current block. Specifically, in some embodiments, the method may also include the following.

[0613] If the value of the LFNST index number is greater than 0, it is decided to perform LFNST on the current block.

[0614] If the value of the LFNST index number is 0, it is decided not to perform LFNST on the current block.

[0615] After obtaining the value of lfnst_index, if the value of lfnst_index is greater than 0, it is decided to perform LFNST on the current block, and if the value of lfnst_index is 0, it is decided not to perform LFNST on the current block.

[0616] After determining an LFNST parameter equal to the value of lfnst_index, if the value of lfnst_index is greater than 0, it indicates that the LFNST parameter instructs to perform LFNST on the current block. In this case, in some embodiments, when the LFNST parameter instructs to perform LFNST on the current block, determining the reconstructed transformation factor block of the current block may include the following.

[0617] Parse the bitstream to obtain the quantized coefficients of the current block.

[0618] Inverse quantization is performed on the quantized coefficients to obtain the reconstructed transform coefficient block of the current block.

[0619] Specifically, inverse quantization is scaling. In a specific example, obtaining a reconstructed transform coefficient block of the current block by performing inverse quantization on the quantized coefficients is to obtain a reconstructed transform coefficient block of the current block by scaling on the quantized coefficients.

[0620] In this way, when the LFNST parameter indicates that LFNST should be performed on the current block, a second transformation coefficient block can be obtained by performing LFNST on all or part of the reconstructed transformation coefficients among the reconstructed transformation coefficient blocks.

[0621] In addition, it should be noted that if it is determined that LFNST can be performed on the current block, the LFNST transformation kernel (represented as kernel) used in the current block must be determined. In some embodiments, obtaining a second transformation coefficient block by performing LFNST on at least some of the reconstructed transformation coefficients among the reconstructed transformation coefficient blocks includes obtaining a second transformation coefficient block by performing LFNST on at least some of the reconstructed transformation coefficients among the reconstructed transformation coefficient blocks using the LFNST transformation kernel.

[0622] In an embodiment of the present application, LFNST has four sets of transformation kernel candidates, and the four sets of transformation kernel candidates may include set0, set1, set2, and set3. Here, in an embodiment of the present application, the LFNST transformation kernel candidate sets may be determined using MIP parameters, and then an LFNST transformation kernel to be used in the current block is selected from the LFNST transformation kernel candidate sets. Accordingly, in some embodiments, the method may further include the following.

[0623] When determining intra-predicted values ​​using MIP mode for the chroma component of the current block, the MIP parameters are determined from the prediction mode parameters of the current block.

[0624] The set of LFNST transformation kernel candidates is determined based on the MIP parameters.

[0625] The transformation kernel indicated by the LFNST index number in the LFNST transformation kernel candidate set is set as the LFNST transformation kernel used for the current block. The LFNST transformation kernel candidate set includes two or more pre-set LFNST transformation kernels.

[0626] It should be noted that MIP parameters may include at least one of the MIP mode index value (represented by modeId) and the MIP transpose indicator parameter (represented by isTransposed). For the LFNST transform kernel used in the current block, when the value of the MIP transpose indicator parameter indicates that a transpose is performed on the sample input vector used in MIP mode, it is necessary to perform a matrix transpose on the selected transform kernel to obtain the LFNST transform kernel used in the current block.

[0627] In addition, in some embodiments, determining the set of LFNST transformation kernel candidates according to MIP parameters may include the following.

[0628] The value of the LFNST intra-prediction mode index number is determined based on the MIP mode index value.

[0629] Based on the value of the LFNST intra-prediction mode index number, the index value of the LFNST transformation kernel candidate set is determined through the 5th preset lookup table.

[0630] The LFNST transformation kernel candidate set is selected from a plurality of candidate LFNST transformation kernel candidate sets according to the index value of the LFNST transformation kernel candidate set.

[0631] Here, the LFNST intra prediction mode index number can be represented as predModeIntra, and the index value of the LFNST transformation kernel candidate set can be represented as lfnstTrSetIdx.

[0632] The fifth preset lookup table is as shown in Table 10. The value of predModeIntra can be determined based on the MIP mode index value (i.e., the value of modeId). Then, based on the value of predModeIntra, the value of lfnstTrSetIdx can be directly determined through Table 10. That is, the set of LFNST conversion kernel candidates selected for the current block is determined. Here, the value of lfnstTrSetIdx represents the set of conversion kernel candidates used in LFNST. Since the value of modeId can include 0, 1, 2, 3, 4, and 5, the value of predModeIntra is also 0, 1, 2, 3, 4, or 5, and the correspondence with lfnstTrSetIdx is specifically shown in Table 10.

[0633] In a specific embodiment, determining the value of the LFNST intra prediction mode index number according to the MIP mode index value may include setting the value of the LFNST intra prediction mode index number to be the same as the MIP mode index value.

[0634] That is, the embodiment of the present application may set the value of predModeIntra to be the same as the value of modeId, and then directly determine the value of lfnstTrSetIdx through Table 10 according to the value of predModeIntra. That is, determine the selected set of LFNST transformation kernel candidates for the current block. In addition, in another specific embodiment of the present application, it should be noted that the embodiment of the present application may directly map the MIP mode index value to the value of PLANAR mode, and then determine the value of lfnstTrSetIdx using the value of predModeIntra corresponding to PLANAR mode. That is, determine the selected set of LFNST transformation kernel candidates for the current block.

[0635] Additionally, during the process of performing LFNST, the scan order may include a horizontal scan order and a vertical scan order. Here, the scan order is related to the value of the MIP preposition parameter (represented as isTransposed).

[0636] Optionally, in some embodiments, obtaining a second transformation coefficient block by performing LFNST on at least a portion of the reconstructed transformation coefficients among the reconstructed transformation coefficient blocks may include the following.

[0637] When the value of the MIP pre-indicator parameter indicates that pre-processing is performed on the sample input vector used in MIP mode, a second transformation coefficient block is obtained by performing LFNST on at least a portion of the reconstructed transformation coefficients among the reconstructed transformation coefficient blocks according to the vertical scan order.

[0638] When the value of the MIP pre-indicator parameter indicates that pre-processing is not performed on the sample input vector used in MIP mode, a second transformation coefficient block is obtained by performing LFNST on at least a portion of the reconstructed transformation coefficients among the transformation coefficient blocks reconstructed in horizontal scan order.

[0639] Specifically, if the value of isTransposed is equal to 0, a preprocessing is performed on the sample input vector used in MIP mode, and LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block in a horizontal scan order, as specifically shown in Equation (10).

[0640] If the value of isTransposed is equal to 1, LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block in vertical scan order without performing transposition processing on the sample input vector used in MIP mode, specifically as shown in Equation (11).

[0641] The log2LfnstSize is determined according to the above mathematical formula (9).

[0642] Optionally, in some embodiments, obtaining a second transformation coefficient block by performing LFNST on at least a portion of the reconstructed transformation coefficients among the reconstructed transformation coefficient blocks may include the following.

[0643] When the value of the MIP pre-indicator parameter indicates that pre-processing is performed on the sample input vector used in MIP mode, a second transformation coefficient block is obtained by performing LFNST on at least a portion of the reconstructed transformation coefficients among the transformation coefficient blocks reconstructed in horizontal scan order.

[0644] When the value of the MIP prefix indicator parameter indicates that prefix processing is not performed on the sample input vector used in MIP mode, a second transformation factor block is obtained by performing LFNST on at least a portion of the reconstructed transformation factors among the transformation factor blocks reconstructed in vertical scan order.

[0645] Specifically, when the value of isTransposed is 1, a preprocessing is performed on the sample input vector used in MIP mode, and LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block in a horizontal scan order, as specifically shown in the above equation (10).

[0646] When the value of isTransposed is 0, the sample input vector used in MIP mode is not subjected to transposition processing, and LFNST can be performed on at least some of the transformation coefficients in the first transformation coefficient block in vertical scan order, as specifically shown in Equation (11).

[0647] The log2LfnstSize is determined according to the above mathematical formula (9).

[0648] S906, by performing a first transformation on the second transformation coefficient block, a reconstructed residual block of the chroma component of the current block is obtained.

[0649] S907, determines the reconstructed block of the chroma component of the current block based on the intra-predicted value of the chroma component of the current block and the reconstructed residual block.

[0650] It should be noted that the quantized values ​​of the LFNST coefficients can be obtained by parsing the bitstream in the decoder. A reconstructed transform coefficient block is obtained by performing inverse quantization (which may be called "scaling") on the values ​​quantized by the inverse quantization unit. A second transform coefficient block can be obtained by performing an inverse LFNST transform on at least some of the reconstructed transform coefficients in the reconstructed transform coefficient block. Then, the reconstructed residual block of the chroma component of the current block can be recovered through an inverse first transform. Here, the inverse first transform is the inverse transform corresponding to the first transform (or core transform) in the encoder. Since the standard defines only the "inverse transform" of the decoder, the "inverse LFNST transform" may also be referred to as the "LFNST transform" in the standard.

[0651] After recovering the reconstructed residual block of the chroma component of the current block, the reconstructed block of the chroma component of the current block can be finalized by performing an addition process on the intra-predicted value of the chroma component of the current block and the reconstructed residual block.

[0652] Hereinafter, the decoding method of an embodiment of the present application will be described in detail by combining the decoder (200) shown in FIG. 2.

[0653] The input bitstream of the decoder (200) may be a bitstream generated by the encoder (100). The parsing unit (201) parses the input bitstream and obtains the value of a syntax element from the input bitstream. The parsing unit (201) converts the binary representation of the syntax element into a numeric value and transmits the numeric value to the unit of the decoder (200) to obtain one or more decoded pictures. The parsing unit (201) may also parse one or more syntax elements from the input bitstream to render the decoded picture.

[0654] Referring to FIG. 10, this is a flowchart for parsing LFNST parameters provided in an embodiment of the present application. As illustrated in FIG. 10, the process may include the following:

[0655] S1001, the parsing unit (201) checks whether the LFNST parameter exists in the input bitstream.

[0656] It should be noted that the LFNST parameter can be the value of lfnst_index. Here, the example of the syntax structure representing the LFNST parameter may be the same as the example of the syntax structure exemplified in Table 8 above, and may also be the same as the example of the syntax structure exemplified in Tables 9A and 9B above.

[0657] Specifically, when the intra prediction mode of the current block is MIP mode, the parsing unit (201) obtains the coding bit of lfnst_index from the input bitstream in the following way. Optionally, using the syntax structure of Table 9A, when the minimum values ​​of the width and height of the transformed block in the current block are greater than or equal to 8 (i.e., when both the width and height are greater than or equal to 8), the parsing unit (201) reads the lfnst_index bit using MIP mode. The height is greater than or equal to 8. Another optional condition can be set so that the width and height are greater than or equal to a first value (e.g., 8) and the sum of the width and height is greater than or equal to a second value (e.g., 16).

[0658] Optionally, using the syntax structure of Table 9B, when the mipSizeId of the current block is 2, the parsing unit (201) reads the lfnst_index bit using MIP mode. Other optional conditions may be set as follows: The mipSizeId of the current block is equal to one of several values ​​(e.g., 1 and 2).

[0659] S1002, the parsing unit (201) obtains the LFNST parameters by performing adaptive binary arithmetic decoding on the LFNST parameters.

[0660] Here, on the encoder (100) side, the entropy coding unit (115) encodes the LFNST parameter (e.g., the value of lfnst_index) using a CABAC in which the descriptor of Tables 9A and 9B is "ae(v)". Then, on the decoder (200) side, adaptive binary arithmetic decoding is performed through the parsing unit (201) to obtain the value of lfnst_index from the lfnst_index bit.

[0661] The parsing unit (201) transmits to the unit of the decoder (200) one or more variables for acquiring one or more decoded pictures, which are set or determined according to the value of the syntax element and the value of the syntax element. The prediction unit (202) determines the intra prediction block of the current decoding block (e.g., CU). If the inter-decoding mode is indicated to be used to decode the current decoding block, the prediction unit (202) transmits the relevant parameters from the parsing unit (201) to the motion compensation unit (203) to acquire the inter-prediction block. If the intra prediction mode (including the MIP mode indicated based on the MIP mode index value) is indicated to be used to decode the current decoding block, the prediction unit (202) transmits the relevant parameters from the parsing unit (201) to the intra prediction unit (204) to acquire the intra prediction block.

[0662] It should be understood that the current block (or referred to as the “decoding block”) in the embodiments of the present application may be a CU or a partition of a CU (e.g., a conversion block). Specifically, when the MIP mode is indicated to be used to decode the current block, the intra prediction unit (204) acquires an intra prediction block of the current block, and the intra prediction block of the current block includes an intra prediction value of at least one pixel (sample) within the current block.

[0663] Specifically, for the intra prediction unit (204), the step of obtaining an intra prediction block using MIP mode is as follows.

[0664] First, the intra prediction unit (204) obtains one or more reference pixels from adjacent pixels of the current block. For example, it obtains them by performing downsampling on adjacent pixels or by directly extracting them from adjacent pixels.

[0665] Next, the intra prediction unit (204) determines one or more partial prediction pixels corresponding to pixel locations in the current block using the acquired reference pixel, MIP matrix, and shifting parameters. Here, the pixel location may be a preset pixel location within the current block. For example, the pixel location has uniform horizontal and vertical coordinate values. The shifting parameters include a shifting number parameter and a shifting offset parameter, and the shifting parameters are used in the shifting operation during the process of acquiring the intra prediction value of the partial pixel.

[0666] Finally, when a predicted pixel corresponding to some pixels of the current block is obtained, the intra prediction unit (204) must obtain a predicted pixel corresponding to the remaining pixels excluding some pixels of the current block. For example, the intra prediction unit (204) obtains a predicted pixel corresponding to the remaining pixels using an interpolation filter, and the inputs of the interpolation filter are the partial pixels and adjacent pixels.

[0667] As illustrated in FIG. 6, this is a flowchart for obtaining an intra-predicted block using the MIP mode provided in an embodiment of the present application. This procedure can be implemented in a decoder (200), where "current block" refers to a "decoding block."

[0668] In step 601, the intra prediction unit (204) obtains adjacent pixels of the current block, for example, the adjacent pixels are indicated by gray squares adjacent to the current block in step 601 of FIG. 6. The intra prediction unit (204) obtains one or more reference pixels from the adjacent pixels. In the example of step 601 shown in FIG. 6, optionally, the intra prediction unit (204) may calculate the average of two neighboring pixels and use the average as the reference pixel. Optionally, the intra prediction unit (204) selects one for every two neighboring pixels as the reference pixel. For example, in the example of step 601 shown in FIG. 6, the intra prediction unit (204) selects four reference pixels from eight upper adjacent pixels of the current block and selects another four reference pixels from eight left adjacent pixels of the current block.

[0669] The specific process of Step 601 is as follows.

[0670] The intra prediction unit (204) obtains the width and height of the current block from the parsing unit (201), and the width and height are represented by the variables cbWidth and cbHeight. Based on the parameters from the parsing unit (201), the current block is divided into one or more transformation blocks. The variables nTbW and nTbH are set as the width and height of the transformation blocks, respectively. When the MIP mode is used as the intra prediction mode to obtain the intra prediction value of the current block, the intra prediction unit (204) determines the variable represented by the block size index value of the MIP, i.e., mipSizeId.

[0671] Optionally, the intra prediction unit (204) determines the value of mipSizeId as follows.

[0672] - If both nTbW and nTbH are 4, mipSizeId is set to 0.

[0673] - Otherwise, if cbWidth or cbHeight is 4, mipSizeId is set to 1.

[0674] - Otherwise, mipSizeId is set to 2.

[0675] Specifically, when the size parameter of the current block is 8x8 (i.e., when both cbWidth and cbHeight are 8), mipSizeId is set to 2.

[0676] Optionally, the intra prediction unit (204) determines the value of mipSizeId as follows.

[0677] - If both nTbW and nTbH are 4, mipSizeId is set to 0.

[0678] - Otherwise, if cbWidth or cbHeight is 4, or if both cbWidth and cbHeight are 8, mipSizeId is set to 1.

[0679] - Otherwise, mipSizeId is set to 2.

[0680] Specifically, if the size parameter of the current block is 8x8, mipSizeId is set to 1.

[0681] Additionally, the intra prediction unit (204) obtains the values ​​of boundarySize and predSize according to mipSizeId. Specifically, as follows.

[0682] - If mipSizeId is 0, boundarySize is set to 2 and predSize is set to 4.

[0683] - Otherwise, if mipSizeId is 1, boundarySize is set to 4 and predSize is set to 4.

[0684] - Otherwise (when mipSizeId is 2), boundarySize is set to 4 and predSize is set to 8.

[0685] boundarySize represents the quantity of reference pixels obtained from the adjacent upper side reference pixel and the adjacent left side reference pixel of the current block, respectively.

[0686] The intra prediction unit (204) may also obtain reference pixels used to calculate MIP prediction values ​​according to a parameter indicating the order of reference pixels stored in buffer pTemp from the parsing unit (701). The intra prediction unit (204) sets the variable isTransposed to be equal to the parameter from the parsing unit (701) indicating the order of reference pixels stored in buffer pTemp. For example, isTransposed being equal to 0 (or FALSE) indicates that the intra prediction unit (204) first obtains a reference pixel from the upper side adjacent reference pixel of the current block and then obtains a reference pixel from the left side adjacent reference pixel of the current block, and isTransposed being equal to 1 (or TRUE) indicates that the intra prediction unit (204) first obtains a reference pixel from the left side adjacent reference pixel of the current block and then obtains a reference pixel from the upper side adjacent reference pixel of the current block.

[0687] As shown in the above mathematical formula (1), the intra prediction unit (204) obtains the value of the variable inSize to indicate the number of reference pixels used when the MIP mode is used.

[0688] The intra prediction unit (204) calls the following process to obtain a reference pixel group (stored as array p[x], where x is 0, …, inSize-1) using adjacent reference pixels of the current block.

[0689] The intra prediction unit (204) obtains an nTbW reference pixel from an adjacent upper side reference pixel of the current block (e.g., stored in array refT) and obtains an nTbH reference pixel from an adjacent left side reference pixel of the current block (e.g., stored in array refL). The intra prediction unit (204) calls downsampling on refT to obtain a boundarySize reference pixel and stores the boundarySize reference pixel in refT. The intra prediction unit (204) calls downsampling on refL to obtain a boundarySize reference pixel and stores the boundarySize reference pixel in refL.

[0690] The intra prediction unit (204) can obtain the order indicated by isTransposed to put elements among refT and refL into buffer pTemp.

[0691] Optionally, the intra prediction unit (204) obtains p[x], where x=0, … , inSize-1. It is as follows.

[0692] - When mipSizeId is 2, p[x]=pTemp[x+1]-pTemp[0].

[0693] Otherwise (if mipSizeId is less than 2), p[0]=pTemp[0]-(1<<(BitDepth-1)), p[x]=pTemp[x]-pTemp[0].

[0694] BitDepth is the bit depth of the color component of the pixel in the current block. Here, the color component is one of the RGB components, one of the YUV components, or one of the YCbCr components, for example, the Y component, etc.

[0695] Optionally, the intra prediction unit (204) can obtain p[x], where x=0, ..., inSize-1. It is as follows.

[0696] - When mipSizeId is 2, p[x]=pTemp[x+1]-pTemp[0].

[0697] - Otherwise (mipSizeId is less than 2), p[0]=(1<<(BitDepth-1))-pTemp[0], p[x]=pTemp[x]-pTemp[0].

[0698] Optionally, the intra prediction unit (204) may obtain the value of p[x] using a uniform calculation method and does not need to determine the value of mipSizeId. For example, (1<<(BitDepth-1)) is added as an additional element to buffer pTemp, whereby the intra prediction unit (204) calculates p[x] as pTemp[x+1]-pTemp[0].

[0699] In step 602, the intra prediction unit (204) obtains the MIP prediction value of the current block using a reference pixel group and a MIP weighting matrix. The MIP weighting matrix is ​​selected from a predefined group of MIP weighting matrices based on a MIP mode index value (represented as ModeId) corresponding to the MIP mode and a block size index value of the MIP (represented as mipSizeId). The intra prediction unit (204) obtains the value of ModeId from the parsing unit (201).

[0700] The intra prediction unit (204) obtains the MIP prediction value (represented as predMip[x][y]) of a partial prediction pixel corresponding to one or more pixel locations within the current block. In the example of step 602 illustrated in FIG. 6, the partial prediction pixel is a pixel indicated by a gray square in the current block. The input to the prediction module (601) is the reference pixel p[x] obtained in step 601. The prediction module (601) calculates the partial prediction pixel using an MIP weighting matrix and shifting parameters. Here, the shifting parameters include a shifting number parameter and a shifting offset parameter.

[0701] In a possible embodiment, when the prediction module (601) represents a pixel with coordinates (x, y), the predicted pixel is represented as predMip[x][y], and the calculation formula for predMip[x][y] is as shown in Equation (5) and Equation (6).

[0702] In Equation (5) or Equation (6), mWeight[i][j] is an MIP weight matrix. Here, the matrix elements are preset constants or can be adaptively updated using a training method, and the input of the training method is one or more coded pictures or blocks, or a picture from another bitstream provided to the decoder (200) by an external device, or a picture obtained by the parsing unit (201) by parsing a special data unit of an input code stream containing the MIP weight matrix. mWeight[i][j] can be determined according to the MIP mode indicated by one or more corresponding parameters from the parsing unit (201). fO is a shifting offset parameter used to determine oW. sW is a shifting number parameter. p[i] is calculated using a reference pixel, i.e., an MIP input sample value in an embodiment of the present application. pTemp[0] is the first pixel among the reference pixels, that is, represents the value corresponding to index number 0 in the first temporary reference value in the embodiment of the present application. ">>" is a binary right shifting operator defined in VVC.

[0703] The prediction module (601) can determine the values ​​of sW and fO based on the size of the current block and the MIP mode used in the current block. In one example, the prediction module (601) obtains the values ​​of sW and fO using a lookup table.

[0704] Optionally, the prediction module (601) can determine sW according to the size parameter and MIP mode of the current block using Table 4 above.

[0705] Optionally, the prediction module (601) can also determine sW based on the size parameter of the current block using Table 5 above.

[0706] Optionally, the prediction module (601) may set sW directly to a constant value. For example, for blocks and other MIP modes with various size parameters, the prediction module (601) may set sW to 5. Or, for blocks and other MIP modes with various size parameters, the prediction module (601) may set sW to 6. Or, for blocks and other MIP modes with various size parameters, the prediction module (601) may set sW to 7.

[0707] Optionally, the prediction module (601) can determine the fO based on the size parameter of the current block and the MIP mode using Table 6 above.

[0708] Optionally, the prediction module (601) can determine fO based on the size parameter of the current block using Table 7 above.

[0709] Optionally, the prediction module (601) may set fO directly to a constant value (e.g., 0 to 100). For example, for blocks and other MIP modes having various size parameters, the prediction module (601) sets fO to 32. Or the prediction module (601) sets fO to 46. Or the prediction module (601) sets fO to 56. Or the prediction module (601) sets fO to 66.

[0710] The intra prediction unit (204) can perform a clipping operation on the MIP prediction values ​​within predMip. When isTransposed is 1 (or TRUE), the predSize×predSize array predMip[x][y] (x=0, …, predSize-1, y=0, …, predSize-1) is transformed into predTemp[y][x]=predMip[x][y], and predMip=predTemp.

[0711] For example, optionally, when the size parameter of the current block is 8x8 (i.e., when both cbWidth and cbHeight are 8), the intra prediction unit (204) determines mipSizeId to 2 and obtains an 8x8 predMip.

[0712] Optionally, if the size parameter of the current block is 8x8 (i.e., if both cbWidth and cbHeight are 8), the intra prediction unit (204) determines mipSizeId to 1 and obtains a 4x4 predMip.

[0713] Step 603, the intra prediction unit (204) obtains the intra prediction value of the current block (stored in the array as predSamples[x][y], x=0, ..., nTbW-1, y=0, ..., nTbH-1). It is as follows.

[0714] - When the intra prediction unit (204) determines that nTbW is greater than predSize or that nTbH is greater than predSize, the intra prediction unit (204) calls an upsampling process to obtain predSamples using predMip. The intra prediction unit (204) obtains a prediction pixel corresponding to the remaining pixels excluding some pixels in the current block. As illustrated in FIG. 6, the intra prediction unit (204) may use a filtering module (602) to obtain a prediction pixel corresponding to the remaining pixels excluding some pixels in the current block. The input to the filtering module (602) is the pixel indicated by the gray square in step 602. The filtering module (602) may use one or more interpolation filters and uses the input to obtain a prediction pixel corresponding to the remaining pixels excluding some pixels in the current block. For example, the input includes a reference pixel and a partial prediction pixel at one or more pixel locations in the current block. Alternatively, the input includes a partial predicted pixel of one or more pixel locations among neighbor pixels and the current block. Alternatively, the input includes a reference pixel, a neighbor pixel, and a partial predicted pixel of one or more pixel locations among the current block. For example, optionally, when the size of the current block is 8x8 (i.e., both cbWidth and cbHeight are 8), the intra prediction unit (204) determines mipSizeId to 1, and the intra prediction unit (204) applies upsampling to a 4x4 predMip to obtain an 8x8 intra prediction block of the current block.

[0715] - Otherwise, the intra prediction unit (204) sets the intra prediction block of the current block to be the same as the MIP prediction block of the current block. That is, it sets predSamples[x][y] (x=0, …, nTbW-1, y=0, … nTbH-1) to be the same as predMip[x][y]. For example, when the size parameter of the current block is 8x8 (i.e., when both cbWidth and cbHeight are 8), the intra prediction unit (204) obtains predSamples of the current block, and the size is 8x8 (i.e., when both cbWidth and cbHeight are 8).

[0716] In this way, according to the block diagram of the procedure illustrated in FIG. 6, after step 603, the intra prediction unit (204) can obtain an intra prediction block of the current block (i.e., CU), that is, determine an intra prediction value of at least one pixel of the current block.

[0717] The scaling unit (205) has the same function as the inverse quantization unit (110) of the encoder (100). The scaling unit (205) performs a scaling operation on the quantized coefficients (i.e., levels) from the parsing unit (201) to obtain the reconstructed coefficients.

[0718] The conversion unit (206) has the same function as the inverse conversion unit (111) of the encoder (100). The conversion unit (206) obtains a reconstructed residual by performing one or more conversion operations (i.e., the inverse operation of one or more conversion operations performed by the inverse conversion unit (111) of the encoder (100).

[0719] If lfnst_index is not 0, the transformation unit (206) performs a second transformation on the reconstructed coefficients to obtain a second transformation coefficient block. Then, a first transformation, such as an integer transformation designed based on the original DCT, is performed on the second transformation coefficient block to obtain a reconstructed residual block. LFNST is an example of a second transformation.

[0720] Referring to FIG. 11, there is another drawing illustrating a procedure for performing LFNST provided in an embodiment of the present application. In FIG. 11, block (1101) is a reconstructed transformation coefficient block containing reconstructed transformation coefficients.

[0721] Step 1101, the conversion unit (206) performs a secondary conversion LFNST on all or part of the reconstructed conversion coefficients in the block (1101).

[0722] If the intra prediction mode of the current block is MIP mode, the transformation unit (206) selects a set of LFNST transformation kernel candidates according to MIP parameters. The MIP parameters may include at least one of an MIP mode index value (i.e., modeId) and a MIP transpose instruction parameter (i.e., isTransposed).

[0723] The conversion unit (206) sets the value of the variable predModeIntra to be the same as the value of modeId. The conversion unit (206) determines a conversion kernel for performing LFNST on the coefficients of the sub-blocks (11001, 11002, 11003). The size of the sub-blocks may be a preset value, for example, 8x8. The conversion unit (206) determines the index value (i.e., lfnstTrSetIdx) of the LFNST conversion kernel candidate set according to the value of predModeIntra. For block decoding in MIP mode, the conversion unit (206) can obtain the value of lfnstTrSetIdx using the lookup table of Table 10. The conversion unit (206) determines the conversion kernel for performing LFNST as the conversion kernel indicated by lfnst_index among the LFNST conversion kernel candidate set indicated by lfnstTrSetIdx.

[0724] If lfnst_index is not 0, the transformation unit (206) performs LFNST on the transformation block using coefficients from the sub-blocks (11001, 11002, 11003), obtains the LFNST coefficients, and places the LFNST coefficients into the sub-blocks (11011, 1012, 1013) of the block (1102). d[x][y] is assumed to be the block of the first transformation coefficients, x=0, …, nTbW-1, y=0, …, nTbH-1, where nTbW and nTbH are the width and height of the block (1102), respectively. v[x] is assumed to be the block of the LFNST coefficients, x=0, …, nLfnstOutSize-1, nLfnstOutSize=(nTbW>=8 && nTbH>= 8)? It is 48:16.

[0725] Optionally, the conversion unit (206) obtains a block (1102) of conversion coefficients using the following command, specifically as shown in Equation (8). log2LfnstSize is as shown in Equation (9) above.

[0726] Optionally, when isTransposed is equal to 0, the transformation unit (206) obtains a block (1102) of LFNST coefficients using the following command, specifically as shown in Equation (10).

[0727] When isTransposed is equal to 1, the transformation unit (206) obtains a block (1102) of LFNST coefficients using the following command, specifically as shown in Equation (11).

[0728] Optionally, when isTransposed is equal to 1, the transformation unit (206) obtains a block (1102) of LFNST coefficients using the following command, specifically as shown in Equation (10).

[0729] When isTransposed is equal to 0, the transformation unit (206) obtains a block (1102) of LFNST coefficients using the following command, specifically as shown in Equation (11).

[0730] log2LfnstSize is determined according to the above equation (9).

[0731] Additionally, if the intra prediction mode of the current block is a traditional intra prediction mode (i.e., angle intra prediction, DC mode, and PLANAR mode), the conversion unit (206) determines the value of lfnstTrSetIdx according to the mode index value of the traditional intra prediction mode (assigned to predModeIntra) using a lookup table such as Table 11, that is, determines the set of LFNST conversion kernel candidates selected for the current block. The conversion unit (206) determines the conversion kernel for performing LFNST as the conversion kernel indicated by lfnst_index among the set of LFNST conversion kernel candidates indicated by lfnstTrSetIdx.

[0732] If lfnst_index is not 0, the transformation unit (206) performs LFNST on the transformation block using coefficients from the sub-blocks (11001, 11002, 11003), obtains the LFNST coefficients, and places the LFNST coefficients into the sub-blocks (11011, 11012, 11013) of the block (1102). d[x][y] is assumed to be the block of the first transformation coefficients, x=0, …, nTbW-1, y=0, …, nTbH-1, where nTbW and nTbH are the width and height of the block (1102), respectively. v[x] is assumed to be the block of the LFNST coefficients, x=0, …, nLfnstOutSize-1, nLfnstOutSize=(nTbW>=8 && nTbH>= 8)? It is 48:16.

[0733] Optionally, when predModeIntra is less than or equal to 34, the conversion unit (206) obtains a block (1102) of LFNST coefficients using the following command, specifically as shown in Equation (10).

[0734] When predModeIntra is greater than 34, the conversion unit (206) obtains a block (1102) of LFNST coefficients using the following command, specifically as shown in Equation (11).

[0735] Optionally, when predModeIntra is greater than 34, the conversion unit (206) obtains a block (1102) of LFNST coefficients using the following command, specifically as shown in Equation (10).

[0736] When predModeIntra is less than or equal to 34, the conversion unit (206) obtains a block (1102) of LFNST coefficients using the following command, specifically as shown in Equation (11).

[0737] log2LfnstSize is determined according to the above equation (9).

[0738] Step 1102, the conversion unit (206) performs a first conversion (i.e., core conversion), for example, an integer conversion designed based on the original DCT, on the conversion coefficients in the block (1102) to obtain a reconstructed residual block (1103) of the current block.

[0739] Additionally, the adder (207) performs an addition operation on its input (an intra-prediction block from the prediction unit (202) and a reconstructed residual block from the conversion unit (206)) to obtain a reconstructed block of the current block. The reconstructed block is also transmitted to the prediction unit (202) so as to be used as a reference for another block encoded in intra-prediction mode.

[0740] After all CUs within a picture or sub-picture have been reconstructed, the filtering unit (208) performs in-loop filtering on the reconstructed picture or sub-picture. The filtering unit (208) includes one or more filters such as a deblocking filter, a sample adaptive offset filter, an adaptive loop filter, a luma mapping with chroma scaling filter, and a neural network-based filter. Alternatively, when the filtering unit (208) determines that the reconstructed block is not to be used as a reference for decoding another block, the filtering unit (208) performs in-loop filtering on one or more target pixels among the reconstructed blocks.

[0741] The output of the filtering unit (208) is a decoded picture or sub-picture, and the decoded picture or sub-picture is transmitted to the DPB unit (209). The DPB unit (209) outputs the decoded picture according to timing and control information. The picture stored in the DPB unit (209) can also be used as a reference for performing inter-prediction or intra-prediction by the prediction unit (202).

[0742] In an embodiment of the present application, the decoder (200) may be a computing device having a processor and a storage medium for recording a decoding program. When the processor reads and executes the decoding program, the decoder (200) reads the input bitstream and generates a corresponding decoded video. Additionally, the decoder (100) may be a computing device having one or more chips. A unit implemented as an integrated circuit on a chip has similar functions through connections and data exchange similar to the corresponding unit of FIG. 2.

[0743] An embodiment of the present application provides a decoding method. A bitstream is parsed to obtain prediction parameters and LFNST parameters of the current block. The prediction parameters include prediction mode parameters. If the prediction mode parameters indicate that an intra-prediction value is determined using a Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, adjacent sample values ​​of the current block are obtained, and MIP input sample values ​​of the current block are determined according to the adjacent sample values ​​of the current block. MIP prediction values ​​of the chroma component of the current block are determined according to the MIP input sample values, the MIP weighting matrix, and shifting parameters. The intra-prediction value of the chroma component of the current block is determined by filtering the MIP prediction values. If the LFNST parameters indicate that LFNST is performed on the current block, a reconstructed transformation factor block of the current block is determined, and a second transformation factor block is obtained by performing LFNST on at least a portion of the reconstructed transformation factors among the reconstructed transformation factor blocks. By performing a first transformation on the second transformation factor block, a reconstructed residual block of the chroma component of the current block is obtained. Based on the intra-predicted value of the chroma component of the current block and the reconstructed residual block, the reconstructed block of the chroma component of the current block is determined. In this way, for MIP mode, not only is decoding performance guaranteed, but complexity is reduced, the storage space required for the decoding process is reduced, and decoding efficiency can be effectively improved. Furthermore, if LFNST technology is applied to MIP mode prediction, the LFNST transformation becomes more flexible due to the introduction of MIP parameters, and decoding efficiency can be further improved.

[0744] In another embodiment of the present application, based on the same concept of the invention as the embodiment described above, with reference to FIG. 12, a schematic structural diagram of an encoder (120) provided in an embodiment of the present application is illustrated. As shown in FIG. 12, the encoder (120) includes a first determination unit (1201), a first prediction unit (1202), a first conversion unit (1203), and an encoding unit (1204).

[0745] The first confirmation unit (1201) is configured to confirm the prediction parameters of the current block, and the prediction parameters include prediction mode parameters.

[0746] The first confirmation unit (1201) is also configured to obtain adjacent sample values ​​of the current block and to confirm the MIP input sample values ​​of the current block according to the adjacent sample values ​​of the current block when the prediction mode parameter indicates that the intra prediction value is to be confirmed using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block.

[0747] The first prediction unit (1202) is configured to determine the MIP predicted value of the chroma component of the current block according to the MIP input sample value, the MIP weighting matrix, and the shifting parameter, wherein the MIP predicted value is the predicted value of a partial sample of the chroma component of the current block. The first prediction unit is also configured to determine the intra predicted value of the chroma component of the current block by filtering the MIP predicted value.

[0748] The first transformation unit (1203) is configured to determine the predicted residual value of the chroma component of the current block according to the intra-predicted value of the chroma component of the current block, and to determine the LFNST parameters by performing LFNST (Low-Frequency Non-Separable Transform) on the predicted residual value.

[0749] The encoding unit (1204) is configured to encode LFNST parameters and write them to a bitstream.

[0750] In some embodiments, the adjacent sample value of the current block may include the left adjacent sample value of the current block and the upper adjacent sample value of the current block.

[0751] In some embodiments, the shifting parameter includes a shifting offset parameter and a shifting number parameter.

[0752] The first determination unit (1201) is specifically configured to determine the sum of the MIP input sample values ​​and the product of the shifting offset parameter according to the value of the shifting offset parameter, wherein the value of the shifting offset parameter is a fixed constant; to determine the first constant value according to the value of the shifting number parameter, wherein the value of the shifting number parameter is a fixed constant; to set the value of the first offset as the difference between the first constant value and the product; to determine the MIP weighting matrix of the current block according to the prediction parameter; and to determine the MIP prediction value of the chroma component of the current block according to the MIP weighting matrix, the MIP input sample values, the shifting number parameter, and the first offset.

[0753] In some embodiments, the prediction parameter further includes the size parameter of the current block.

[0754] In some embodiments, the first determination unit (1201) also determines the block size index value of the current block according to the size parameter of the current block; obtains a first temporary reference value by performing downsampling filtering on adjacent sample values ​​of the current block; if the block size index value of the current block is within a preset range, determines a second constant value according to the bit depth of adjacent sample values ​​of the current block; sets the value corresponding to index number 0 among the MIP input sample values ​​as the difference between the second constant value and the value corresponding to index number 0 among the first temporary reference values; sets the value corresponding to index number i among the MIP input sample values ​​as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, wherein i is an integer greater than 0; If the block size index value of the current block is outside the preset range, the value corresponding to index number j among the MIP input sample values ​​is configured to be set as the difference between the value corresponding to index number (j+1) among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where j is an integer greater than or equal to 0.

[0755] In some embodiments, the first determination unit (1201) is also configured to determine a second constant value according to the bit depth of an adjacent sample value of the current block when the block size index value of the current block is within a preset range; to set the value corresponding to index number 0 among the MIP input sample values ​​as the difference between the value corresponding to index number 0 among the first temporary reference values ​​and the second constant value; and to set the value corresponding to index number i among the MIP input sample values ​​as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where i is an integer greater than 0.

[0756] In some embodiments, the first determination unit (1201) is also configured to set the block size index value of the current block to 0 when both the width and height of the current block are 4; to set the block size index value of the current block to 1 when both the width and height of the current block are 8, or when one of the width and height of the current block is 4; and to set the block size index value of the current block to 2 when the width and height of the current block do not satisfy the above conditions.

[0757] In some embodiments, the first determination unit (1201) also obtains a first temporary reference value by performing downsampling filtering on adjacent sample values ​​of the current block; determines a second constant value according to the bit depth of adjacent sample values ​​of the current block, and obtains a second temporary reference value by buffering the second constant value to a data unit after the first temporary reference value; and is configured to set the value corresponding to index number j among the MIP input sample values ​​as the difference between the value corresponding to index number (j+1) among the second temporary reference values ​​and the value corresponding to index number 0 among the second temporary reference values, where j is an integer greater than or equal to 0.

[0758] In some embodiments, the first determination unit (1201) is also configured to set the second constant value to an integer power of 2, where the exponent of the power is equal to the bit depth of the adjacent sample value of the current block minus 1.

[0759] In some embodiments, the first determination unit (1201) is also configured to perform binary left shifting on "1" to obtain a second constant value, and the number of left-shifted bits is equal to the bit depth of the adjacent sample value of the current block minus 1.

[0760] In some embodiments, the value of the shifting number parameter is a fixed constant unrelated to the block size index value and the MIP mode index value.

[0761] In some embodiments, the value of the shifting number parameter is set to 6.

[0762] In some embodiments, the value of the shifting offset parameter is a fixed constant unrelated to the block size index value and the MIP mode index value.

[0763] In some embodiments, the value of the shifting offset parameter is set to 32.

[0764] In some embodiments, the first determination unit (1201) is also configured to set the first constant value to an integer power of 2, where the exponent of the power is equal to the value of the shifting number parameter minus 1.

[0765] In some embodiments, the first determination unit (1201) is also configured to perform binary left shifting on "1" to obtain a first constant value, and the number of bits shifted left is equal to the value of the shifting number parameter minus 1.

[0766] In some embodiments, referring to FIG. 12, the encoder (120) may further include a first calculation unit (1205) and is configured to calculate a first weighted sum of the MIP weighting matrix and the MIP input sample values, calculate a first sum of the first weighted sum and the first offset, and perform binary right-shifting on the first sum to obtain a first right-shift value, and the number of bits shifted to the right is equal to the value of the shifting number parameter.

[0767] The first confirmed unit (1201) is also configured to set the MIP prediction value of the chroma component of the current block to be equal to the sum of the first right shift value and the value corresponding to index number 0 among the first temporary reference values, and the first temporary reference value is obtained by performing downsampling filtering on adjacent sample values ​​of the current block.

[0768] In some embodiments, the first transformation unit (1203) is configured to determine the residual block of the current block according to the predicted residual value and to perform a first transformation on the residual block to obtain a first transformation coefficient block.

[0769] The first determination unit (1201) is also configured to determine whether to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block.

[0770] The first conversion unit (1203) is also configured to perform LFNST on at least some of the conversion coefficients in the first conversion coefficient block and determine the LFNST parameters when the confirmed result is yes.

[0771] In some embodiments, the first determination unit (1201) is also configured to determine the minimum value among the size parameters of the current block when determining the intra-predicted value using MIP mode for the chroma component of the current block, and to determine to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block when the minimum value is greater than or equal to the first preset threshold.

[0772] In some embodiments, the LFNST parameter includes an LFNST index number, and when the first determination unit (1201) determines to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block, the value of the LFNST index number is set to greater than 0, and when it determines not to perform LFNST on at least some of the transformation coefficients in the first transformation coefficient block, the value of the LFNST index number is set to 0.

[0773] The encoding unit (1204) is configured to encode the LFNST index number and write it as a bitstream.

[0774] In some embodiments, the LFNST parameter further includes LFNST coefficients. As shown in FIG. 12, the encoder (120) further includes a quantization unit (1206).

[0775] The first conversion unit (1203) is configured to perform LFNST on at least some of the conversion coefficients of the first conversion coefficient block to obtain LFNST coefficients.

[0776] The quantization unit (1206) is configured to quantize the LFNST coefficients to obtain quantization coefficients.

[0777] The encoding unit (1204) is configured to encode quantization coefficients and write them as a bitstream.

[0778] In the embodiments of the present application, it can be understood that a "unit" may be a part of a circuit, a part of a processor, a part of a program, or software, and may, of course, be a module or a non-module. Additionally, each component of the embodiments of the present application may be integrated into a single processing unit, or each unit may physically exist independently, or two or more units may be integrated into a single unit. The integrated unit may be realized in the form of a hardware or software functional module.

[0779] When an integrated unit is implemented in the form of a software function unit and sold or used as a separate product, it may be stored on a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention, or a part contributing to the technical field, or all or part of the technical solution may be implemented in the form of a software product. Such computer software product is stored on a single storage medium and includes a plurality of instructions that enable a computer device (which may be a personal computer, server, or network device) or a processor to execute all or part of the method according to each embodiment of the present invention. The aforementioned storage medium includes a medium capable of storing program code, such as a USB, an external hard drive, a Read-Only Memory (ROM), Random Access Memory (RAM), a disk, or an optical disk.

[0780] An embodiment of the present application provides a computer storage medium applied to an encoder (120). A computer program is stored in the computer storage medium. Any method of the above-described embodiment is realized when the computer program is executed by a first processor.

[0781] Referring to FIG. 13, depending on the configuration of the encoder (120) and the computer storage medium, FIG. 13 is a drawing showing a specific hardware structure of the encoder (120) according to an embodiment of the present application. As shown in FIG. 13, the encoder (120) may include a first communication interface (1301), a first memory (1302), and a first processor (1303). Each component is connected together through a first bus system (1304). The first bus system (1304) is used to realize connection and communication between these components. In addition to the data bus, the first bus system (1304) also includes a power bus, a control bus, and a status signal bus. For clarity, as shown in FIG. 13, the various buses are labeled as the first bus system (1304).

[0782] The first communication interface (1301) is used to transmit and receive signals during the process of transmitting and receiving information with other external network elements.

[0783] The first memory (1302) is used to store a computer program executable by the first processor (1303).

[0784] The first processor (1303) is configured to perform the following when running a computer program.

[0785] The prediction parameters of the current block are determined, and these parameters include prediction mode parameters. If the prediction mode parameters indicate that the intra-predicted values ​​are determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma components of the current block, adjacent sample values ​​of the current block are obtained, and the MIP input sample values ​​of the current block are determined based on these adjacent sample values. The MIP predicted values ​​of the chroma components of the current block are determined based on the MIP input sample values, the MIP weighting matrix, and shifting parameters; the MIP predicted values ​​are the predicted values ​​of some samples within the chroma components of the current block. The intra-predicted values ​​of the chroma components of the current block are determined by filtering the MIP predicted values. The predicted residual values ​​of the chroma components of the current block are determined based on the intra-predicted values ​​of the chroma components of the current block. The Low-Frequency Non-Separable Transform (LFNST) is performed on the predicted residual values ​​to determine the LFNST parameters. The LFNST parameters are encoded and written as a bitstream.

[0786] The first memory (1302) of the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both a volatile memory and a non-volatile memory. The non-volatile memory may be a Read-Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), or a Flash Memory. The volatile memory may be a Random Access Memory (RAM) used as an external high-speed cache. Various forms of RAM may be used, for example but not limited to: Static RAM (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Synchronous-link Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The first memory (1302) of the system and method described in this specification includes any suitable type of memory different from these, but is not limited thereto.

[0787] The first processor (1303) may be an integrated circuit chip having signal processing capabilities. In the course of implementation, each step of the method embodiment described above may be completed by an integrated logic circuit in the form of hardware or an instruction in the form of software of the first processor (1303). The first processor (1303) may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or an individual hardware component. The processor may realize or execute the method, steps, and logic block diagram disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention may be executed and completed directly by a hardware decoding processor, or may be executed and completed by a combination of hardware and software modules of a decoding processor. The software module may be in a storage medium mature in the art, such as random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), or electrically erasable programmable memory, registers, etc. The storage medium is in the first memory (1302). The first processor (1303) reads information from the first memory (1302) and uses the processor's hardware to complete the steps of the method described above.

[0788] It is understood that the embodiments described herein may be realized by hardware, software, firmware, middleware, microcode, or a combination thereof. When realized by hardware, the processing unit may be implemented by one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), DSP Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic unit performing the functions of the present application, or a combination thereof. When realized by software, the technology described herein may be realized by modules (e.g., procedures, functions, etc.) performing the functions described herein. Software code is stored in memory and is also executed by a processor. Memory may be implemented inside or outside the processor.

[0789] Optionally, as another embodiment, the first processor (1303) is used to execute any one of the methods described in the above embodiment when executing a computer program.

[0790] Embodiments of the present application provide an encoder. The encoder may include a first determination unit, a first prediction unit, a first transformation unit, and an encoding unit. In this way, for MIP mode, not only can encoding performance be guaranteed, but complexity can be reduced, storage space required for the encoding process can be reduced, and encoding efficiency can be effectively improved. Furthermore, when LFNST technology is applied to MIP mode prediction, the introduction of MIP parameters can make the LFNST transformation more flexible and further improve encoding efficiency.

[0791] In another embodiment of the present application, based on the same concept of the invention as the embodiment described above, with reference to FIG. 14, a schematic structural diagram of a decoder (140) provided in an embodiment of the present application is illustrated. As shown in FIG. 14, the decoder (140) includes a parsing unit (1401), a second determination unit (1402), a second prediction unit (1403), and a second conversion unit (1404).

[0792] The parsing unit (1401) is configured to parse the bitstream to obtain the prediction parameters and LFNST parameters of the current block, and the prediction parameters include the prediction mode parameters.

[0793] The second confirmation unit (1402) is configured to obtain adjacent sample values ​​of the current block and to confirm the MIP input sample values ​​of the current block according to the adjacent sample values ​​of the current block when the prediction mode parameter indicates that the intra prediction value is to be confirmed using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block.

[0794] The second prediction unit (1403) is configured to determine the MIP prediction value of the chroma component of the current block according to the MIP input sample value, the MIP weighting matrix, and the shifting parameter, and to determine the intra prediction value of the chroma component of the current block by filtering the MIP prediction value, and the MIP prediction value is the prediction value of some samples of the chroma component of the current block.

[0795] The second transformation unit (1404) is configured to determine the reconstructed transformation factor block of the current block when the LFNST parameter indicates to perform LFNST on the current block, obtain a second transformation factor block by performing LFNST on at least a portion of the reconstructed transformation factor blocks, and obtain a reconstructed residual block of the chroma component of the current block by performing a first transformation on the second transformation factor block.

[0796] The second confirmation unit (1402) is also configured to confirm the reconstructed block of the chroma component of the current block according to the intra-predicted value of the chroma component of the current block and the reconstructed residual block.

[0797] In some embodiments, the adjacent sample value of the current block includes the left adjacent sample value of the current block and the upper adjacent sample value of the current block.

[0798] In some embodiments, the shifting parameter includes a shifting offset parameter and a shifting number parameter.

[0799] The second determination unit (1402) is specifically configured to determine the sum of the MIP input sample values ​​and the product of the shifting offset parameter according to the value of the shifting offset parameter, wherein the value of the shifting offset parameter is a fixed constant; to determine a first constant value according to the value of the shifting number parameter, wherein the value of the shifting number parameter is a fixed constant; to set the value of the first offset as the difference between the first constant value and the product; to determine the MIP weighting matrix of the current block according to the prediction parameter; and to determine the MIP prediction value of the chroma component of the current block according to the MIP weighting matrix, the MIP input sample values, the shifting number parameter, and the first offset.

[0800] In some embodiments, the prediction parameter further includes the size parameter of the current block.

[0801] In some embodiments, the second determination unit (1402) also determines the block size index value of the current block according to the size parameter of the current block; obtains a first temporary reference value by performing downsampling filtering on adjacent sample values ​​of the current block; if the block size index value of the current block is within a preset range, determines a second constant value according to the bit depth of adjacent sample values ​​of the current block; sets the value corresponding to index number 0 among the MIP input sample values ​​as the difference between the second constant value and the value corresponding to index number 0 among the first temporary reference values; sets the value corresponding to index number i among the MIP input sample values ​​as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, wherein i is an integer greater than 0; If the block size index value of the current block is outside the preset range, the value corresponding to index number j among the MIP input sample values ​​is configured to be set as the difference between the value corresponding to index number (j+1) among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where j is an integer greater than or equal to 0.

[0802] In some embodiments, the second determination unit (1402) is also configured to determine a second constant value according to the bit depth of an adjacent sample value of the current block when the block size index value of the current block is within a preset range; to set the value corresponding to index number 0 among the MIP input sample values ​​as the difference between the value corresponding to index number 0 among the first temporary reference values ​​and the second constant value; and to set the value corresponding to index number i among the MIP input sample values ​​as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where i is an integer greater than 0.

[0803] In some embodiments, the second determination unit (1402) is also configured to set the block size index value of the current block to 0 when both the width and height of the current block are 4; to set the block size index value of the current block to 1 when both the width and height of the current block are 8, or when either the width or height of the current block is 4; and to set the block size index value of the current block to 2 when the width and height of the current block do not satisfy the above conditions.

[0804] In some embodiments, the second determination unit (1402) also obtains a first temporary reference value by performing downsampling filtering on adjacent sample values ​​of the current block; determines a second constant value according to the bit depth of adjacent sample values ​​of the current block, and obtains a second temporary reference value by buffering the second constant value to a data unit after the first temporary reference value; and is configured to set the value corresponding to index number j among the MIP input sample values ​​as the difference between the value corresponding to index number (j+1) among the second temporary reference values ​​and the value corresponding to index number 0 among the second temporary reference values, where j is an integer greater than or equal to 0.

[0805] In some embodiments, the second determination unit (1402) is also configured to set the second constant value to an integer power of 2, where the exponent of the power is equal to the bit depth of the adjacent sample value of the current block minus 1.

[0806] In some embodiments, the second determination unit (1402) is also configured to obtain a second constant value by performing binary left shifting on "1", and the number of left-shifted bits is equal to the bit depth of the adjacent sample value of the current block minus 1.

[0807] In some embodiments, the value of the shifting number parameter is a fixed constant unrelated to the block size index value and the MIP mode index value.

[0808] In some embodiments, the value of the shifting number parameter is set to 6.

[0809] In some embodiments, the value of the shifting offset parameter is a fixed constant unrelated to the block size index value and the MIP mode index value.

[0810] In some embodiments, the value of the shifting offset parameter is set to 32.

[0811] In some embodiments, the second determination unit (1402) is also configured to set the first constant value to an integer power of 2, where the exponent of the power is equal to the value of the shifting number parameter minus 1.

[0812] In some embodiments, the second determination unit (1402) is also configured to perform binary left shifting on "1" to obtain a first constant value, and the number of bits shifted left is equal to the value of the shifting number parameter minus 1.

[0813] In some embodiments, referring to FIG. 14, the decoder (140) may further include a second calculation unit (1405) and is configured to calculate a first weighted sum of the MIP weighting matrix and the MIP input sample values, calculate a first sum of the first weighted sum and the first offset, and perform binary right-shifting on the first sum to obtain a first right-shift value, and the number of bits shifted to the right is equal to the value of the shifting number parameter.

[0814] The second confirmation unit (1402) is also configured to set the MIP prediction value of the chroma component of the current block to be equal to the sum of the first right shift value and the value corresponding to index number 0 among the first temporary reference values, and the first temporary reference value is obtained by performing downsampling filtering on adjacent sample values ​​of the current block.

[0815] In some embodiments, the second determination unit (1402) is also configured to determine whether an LFNST parameter exists in the bitstream.

[0816] The parsing unit (1401) is also configured to parse the bitstream and obtain the LFNST parameter when it is determined that the LFNST parameter exists in the bitstream.

[0817] In some embodiments, the second determination unit (1402) is also configured to determine the minimum value among the size parameters of the current block when determining the intra-predicted value using MIP mode for the chroma component of the current block, and to determine that an LFNST parameter exists in the bitstream if the minimum value is greater than or equal to the first preset threshold.

[0818] In some embodiments, referring to FIG. 14, the decoder (140) further includes an inverse quantization unit (1406).

[0819] The parsing unit (1401) is also configured to parse the bitstream to obtain the quantized coefficients of the current block when the LFNST parameter indicates to perform LFNST on the current block.

[0820] The inverse quantization unit (1406) is configured to perform inverse quantization on the quantized coefficients to obtain a reconstructed conversion coefficient block of the current block.

[0821] In some embodiments, the inverse quantization unit (1406) is specifically configured to obtain a reconstructed conversion coefficient block of the current block by scaling with respect to the quantized coefficients.

[0822] In some embodiments, the parsing unit (1401) is configured to specifically parse a bitstream to obtain the value of an LFNST index number, and if the value of the LFNST index number is greater than 0, to determine whether to perform LFNST on the current block, and if the value of the LFNST index number is 0, to determine whether to perform LFNST on the current block.

[0823] In the embodiments of the present application, it can be understood that a "unit" may be a part of a circuit, a part of a processor, a part of a program, or software, and may, of course, be a module or a non-module. Additionally, each component of the embodiments of the present application may be integrated into a single processing unit, or each unit may physically exist independently, or two or more units may be integrated into a single unit. The integrated unit may be realized in the form of a hardware or software functional module.

[0824] When an integrated unit is implemented in the form of a software function unit and sold or used as a separate product, it may be stored on a computer-readable storage medium. Based on this understanding, the present embodiment provides a computer storage medium applied to a decoder (140). A computer program is stored on the computer storage medium. Any method of the above-described embodiment is realized when the computer program is executed by a second processor.

[0825] Referring to FIG. 15, depending on the configuration of the decoder (140) and the computer storage medium, FIG. 15 is a diagram showing a specific hardware structure of the decoder (140) according to an embodiment of the present application. As shown in FIG. 15, the decoder (140) may include a second communication interface (1501), a second memory (1502), and a second processor (1503). Each component is connected together through a second bus system (1504). The second bus system (1504) is used to realize connection and communication between these components. In addition to the data bus, the second bus system (1504) also includes a power bus, a control bus, and a status signal bus. For clarity, as shown in FIG. 15, the various buses are labeled as the second bus system (1504).

[0826] The second communication interface (1401) is used to transmit and receive signals during the process of transmitting and receiving information with other external network elements.

[0827] The second memory (1502) is used to store a computer program executable by the second processor (1503).

[0828] The second processor (1503) is configured to execute the following when running a computer program.

[0829] The bitstream is parsed to obtain the prediction parameters and LFNST parameters of the current block, and the prediction parameters include prediction mode parameters. If the prediction mode parameters indicate that the intra prediction values ​​are determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma components of the current block, the adjacent sample values ​​of the current block are obtained, and the MIP input sample values ​​of the current block are determined according to the adjacent sample values ​​of the current block. The MIP prediction values ​​of the chroma components of the current block are determined according to the MIP input sample values, the MIP weighting matrix, and the shifting parameters, and the MIP prediction values ​​are the prediction values ​​of some samples of the chroma components of the current block. The intra prediction values ​​of the chroma components of the current block are determined by filtering the MIP prediction values. If the LFNST parameters indicate that LFNST is performed on the current block, the reconstructed transformation coefficient blocks of the current block are determined, and a second transformation coefficient block is obtained by performing LFNST on at least a portion of the reconstructed transformation coefficients among the reconstructed transformation coefficient blocks. A reconstructed residual block of the chroma component of the current block is obtained by performing a first transformation on the second transformation coefficient block. A reconstructed block of the chroma component of the current block is determined based on the intra-predicted value of the chroma component of the current block and the reconstructed residual block.

[0830] Optionally, as another embodiment, the second processor (1503) is also configured to execute any of the above-described embodiments when executing a computer program.

[0831] The hardware functions of the second memory (1502) and the first memory (1302) are similar, and the hardware functions of the second processor (1503) and the first processor (1303) are similar, so they are not described in detail here.

[0832] Embodiments of the present application provide a decoder. The decoder may include a parsing unit, a second confirmation unit, a second prediction unit, and a second transformation unit. In this way, for MIP modes, not only can decoding performance be guaranteed, but complexity can also be reduced, storage space required for the decoding process can be reduced, and decoding efficiency can be effectively improved. Furthermore, when LFNST technology is applied to MIP mode prediction, the introduction of MIP parameters can make the LFNST transformation more flexible and further improve decoding efficiency.

[0833] In another embodiment of the present application, referring to FIG. 16, FIG. 16 is a schematic diagram illustrating the structure of a transmitting device provided in an embodiment of the present application. As illustrated in FIG. 16, an exemplary transmitting device (1600) is illustrated. An acquisition unit (1601) acquires a video signal and transmits the video signal to an encoder (1602). The acquisition unit (1601) may be a device comprising one or more cameras (including a depth camera). The acquisition unit (1601) may be a device that partially or completely decodes a bitstream to acquire video. The acquisition unit (1601) may also include one or more elements for capturing an audio signal. A particular implementation of the encoder (1602) is the encoder (100) or encoder (120) described in the above-described embodiment, which generates a video bitstream by encoding a video signal as an input video from the acquisition unit (1601). The encoder (1602) may also include one or more audio encoders to encode an audio signal to generate an audio code stream. The storage / transmission unit (1603) receives a video bitstream from the encoder (1602). The storage / transmission unit (1603) may also receive an audio bitstream from the encoder (1602) and compress the video bitstream and the audio bitstream together to form a media file (e.g., an ISO-based media file format) or a transmission stream.

[0834] Optionally, the storage / transmission unit (1603) writes a media file or transmission stream to a storage unit such as a hard disk, DVD disk, cloud, or portable storage device.

[0835] Optionally, the storage / transmission unit (1603) transmits the bitstream to a transmission network such as the Internet, a wired network, a cellular network, a wireless local area network, etc.

[0836] In another embodiment of the present application, referring to FIG. 17, FIG. 17 is a schematic diagram illustrating the structure of a target device provided in an embodiment of the present application. As illustrated in FIG. 17, an exemplary target device (1700) is illustrated. A receiving unit (1701) receives a media file or a transmission stream from a network, or reads a media file or a transmission stream from a storage device. The receiving unit (1701) separates a video bitstream and an audio bitstream from the media file or transmission stream. The receiving unit (1701) may also generate a new video bitstream by extracting the video bitstream. The receiving unit (1701) may also generate a new audio bitstream by extracting the audio bitstream. A decoder (1702) includes one or more video decoders, for example, a specific implementation thereof is the decoder (200) or decoder (140) described in the above-described embodiment.

[0837] The decoder (1702) may also include one or more audio decoders. The decoder (1702) decodes the video bitstream and audio bitstream from the receiving unit (1701) to obtain the decoded video and one or more decoded audio corresponding to one or more channels. The rendering unit (1703) performs operations on the reconstructed video to make it suitable for display. These operations may include one or more of the following operations to improve detection quality: noise reduction, synthesis, color space conversion, upsampling, downsampling, etc. The rendering unit (1703) may also perform operations on the decoded audio to improve the detection quality of the displayed audio signal.

[0838] In another embodiment of the present application, referring to FIG. 18, FIG. 18 is a schematic diagram illustrating the structure of a communication system provided in an embodiment of the present application. As illustrated in FIG. 18, an exemplary communication system (1800) is illustrated. The source device (1801) may be the transmitting device (1600) illustrated in FIG. 16. The output of the storage / transmission unit (1603) is processed by a storage medium / transmission network (1802) to store or transmit a bitstream. The target device (1803) may be the target device (1700) illustrated in FIG. 17. Here, the receiving unit (1701) may obtain a bitstream from the storage medium / transmission network (1802). The receiving unit (1701) may extract a new video bitstream from a media file or a transmission stream. The receiving unit (1701) may also extract a new audio bitstream from a media file or a transmission stream.

[0839] In this application, terms such as "comprising" or variations thereof are intended to cover non-exclusive inclusions, and a process, method, object, or device comprising a series of elements may include not only the listed elements but also other unlisted elements, or may include other elements unique to the process, method, object, or device. Unless further limitations are imposed, it does not exclude the existence of other identical elements in a process, method, object, or device comprising the elements limited by the phrase "...comprising."

[0840] The sequence numbers of the above-described embodiments are not intended to indicate the order of the embodiments, but are used merely for illustrative purposes.

[0841] The methods described in the various method embodiments of the present application can be arbitrarily combined to obtain new method embodiments, provided there are no conflicts.

[0842] Features disclosed in various product embodiments of the present application can be arbitrarily combined to obtain new product embodiments, provided there is no conflict.

[0843] Features disclosed in various method or device embodiments of the present application may be combined at will to obtain new method embodiments or device embodiments, provided there is no conflict.

[0844] The foregoing is merely a specific embodiment of the present invention, and the scope of protection of the present invention is not limited thereto. A person skilled in the art can easily derive modifications or substitutions within the technical scope disclosed in the present invention, and all such modifications or substitutions must be included within the scope of the present invention. Accordingly, the scope of protection of the present application is determined by the claims. Industrial applicability

[0845] In an embodiment of the present application, at the encoder side, after determining the prediction parameters of the current block, if the prediction mode parameter indicates that the intra prediction value is determined using the Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, adjacent sample values ​​of the current block are obtained, MIP input sample values ​​of the current block are determined according to the adjacent sample values ​​of the current block, MIP prediction values ​​of the chroma component of the current block are determined according to the MIP input sample values, the MIP weighting matrix, and shifting parameters, MIP prediction values ​​are filtered to determine the intra prediction values ​​of the chroma component of the current block, prediction residual values ​​of the chroma component of the current block are determined according to the intra prediction values ​​of the chroma component of the current block, Low-Frequency Non-Separable Transform (LFNST) is performed on the prediction residual values ​​to determine LFNST parameters, and the LFNST parameters are encoded and written as a bitstream.At the decoder side, after parsing the bitstream to obtain the prediction parameters and LFNST parameters of the current block, if the prediction mode parameter indicates that the intra prediction value is determined using MIP mode for the chroma component of the current block, the adjacent sample value of the current block is obtained, the MIP input sample value of the current block is determined according to the adjacent sample value of the current block, the MIP prediction value of the chroma component of the current block is determined according to the MIP input sample value, the MIP weighting matrix, and the shifting parameter, the MIP prediction value is filtered to determine the intra prediction value of the chroma component of the current block, and if the LFNST parameter indicates that LFNST is performed on the current block, the reconstructed transform coefficient block of the current block is determined, a second transform coefficient block is obtained by performing LFNST on at least a portion of the reconstructed transform coefficients among the reconstructed transform coefficient block, and the reconstructed residual block of the chroma component of the current block is obtained by performing a first transformation on the second transform coefficient block, and the intra prediction value of the chroma component of the current block and the reconstructed residual block are Accordingly, the reconstructed block of the chroma component of the current block is determined. In this way, for MIP modes, not only can encoding and decoding performance be guaranteed, but complexity can also be reduced, the storage space required for the encoding and decoding processes can be decreased, and encoding and decoding efficiency can be effectively improved. Furthermore, when LFNST technology is applied to MIP mode prediction, the introduction of MIP parameters can make the LFNST transform more flexible and further enhance encoding and decoding efficiency.

Claims

Claim 1 As an encoding method applied to an encoder, the method comprises: determining prediction parameters of a current block—the prediction parameters include prediction mode parameters—and, if the prediction mode parameters indicate that an intra-prediction value is determined using a Matrix-Based Intra Prediction (MIP) mode for the chroma component of the current block, obtaining adjacent sample values ​​of the current block and determining MIP input sample values ​​of the current block according to the adjacent sample values ​​of the current block; determining the product of the sum of the MIP input sample values ​​and a shifting offset parameter—the value of the shifting offset parameter is a fixed constant—and setting the value of a first offset as the difference between a first constant value and the product; determining the MIP weighting matrix of the current block according to the prediction parameters; calculating a first weighted sum of the MIP weighting matrix and the MIP input sample values; calculating a first sum of the first weighted sum and the first offset; and performing binary right shifting on the first sum (binary Obtaining a first right-shift value by performing right-shifting - the number of bits shifted to the right is equal to the value of the shifting number parameter, and the value of the shifting number parameter is a fixed constant - and setting the MIP prediction value of the chroma component of the current block to be equal to the sum of the first right-shift value and the value corresponding to index number 0 among the first temporary reference value - the first temporary reference value is obtained by performing downsampling filtering on adjacent sample values ​​of the current block, and the MIP prediction value is a prediction value of a portion of the samples of the chroma component of the current block - and determining the intra prediction value of the chroma component of the current block by filtering the MIP prediction value, andAn encoding method characterized by including: determining the predicted residual value of the chroma component of the current block according to the intra-predicted value of the chroma component of the current block; determining LFNST parameters by performing LFNST (Low-Frequency Non-Separable Transform) on the predicted residual value; and encoding the LFNST parameters and writing them as a bitstream. Claim 2 In claim 1, the prediction parameter further includes a size parameter of the current block, and determining the MIP input sample value of the current block according to the adjacent sample value of the current block comprises: determining the block size index value of the current block according to the size parameter of the current block; obtaining a first temporary reference value by performing downsampling filtering on the adjacent sample value of the current block; determining a second constant value according to the bit depth of the adjacent sample value of the current block when the block size index value of the current block is within a preset range; setting the value corresponding to index number 0 among the MIP input sample values ​​as the difference between the second constant value and the value corresponding to index number 0 among the first temporary reference values; setting the value corresponding to index number i among the MIP input sample values ​​as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values ​​- i is an integer greater than 0 -; and when the block size index value of the current block deviates from the preset range, the MIP input An encoding method characterized by including setting the value corresponding to index number j among the sample values ​​as the difference between the value corresponding to index number (j+1) among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where j is an integer greater than or equal to 0. Claim 3 An encoding method according to claim 2, wherein determining a second constant value according to the bit depth of an adjacent sample value of the current block includes setting the second constant value to be equal to an integer power of 2, wherein the exponent of the power is equal to the value obtained by subtracting 1 from the bit depth of an adjacent sample value of the current block, or obtaining the second constant value by performing binary left shifting on "1", and wherein the number of left-shifted bits is equal to the bit depth of an adjacent sample value of the current block minus 1. Claim 4 An encoding method according to claim 1, wherein the value of the shifting number parameter is a fixed constant unrelated to the block size index value and the MIP mode index value, the value of the shifting number parameter is set to 6, the value of the shifting offset parameter is a fixed constant unrelated to the block size index value and the MIP mode index value, the value of the shifting offset parameter is set to 32, the first constant value is set to be equal to an integer power of 2, the exponent of the power is equal to the value of the shifting number parameter minus 1, or the first constant value is obtained by performing binary left shifting on "1", and the number of bits shifted to the left is equal to the value of the shifting number parameter minus 1. Claim 5 In claim 1, determining LFNST parameters by performing LFNST (Low-Frequency Non-Separable Transform) on the predicted residual value comprises: performing a first transformation on the predicted residual value of the current block to obtain a first transformation coefficient; determining whether to perform LFNST on at least some of the first transformation coefficients; and, if it is determined to perform LFNST on at least some of the transformation coefficients, performing LFNST on at least some of the first transformation coefficients to determine the LFNST parameters; and determining whether to perform LFNST on at least some of the first transformation coefficients comprises, when determining an intra-predicted value using MIP mode for the chroma component of the current block, determining a minimum value among the size parameters of the current block; and, if the minimum value is greater than or equal to a first preset threshold, determining to perform LFNST on at least some of the first transformation coefficients. A parameter includes an LFNST index number, and determining the LFNST parameter includes setting the value of the LFNST index number to greater than 0 when it is determined to perform LFNST on at least some of the first transformation coefficients, and setting the value of the LFNST index number to 0 when it is determined not to perform LFNST on at least some of the first transformation coefficients, and encoding the LFNST parameter and writing it to a bitstream includes encoding the LFNST index number and writing it to a bitstream, or the LFNST parameter further includes an LFNST coefficient, and determining the LFNST parameter is,An encoding method characterized by including performing LFNST on at least some of the first transformation coefficients to obtain the LFNST coefficients, and encoding and writing the LFNST parameters to a bitstream including quantizing the LFNST coefficients to obtain quantization coefficients and encoding and writing the quantization coefficients to a bitstream. Claim 6 A decoding method applied to a decoder, comprising: parsing a bitstream to obtain prediction parameters and LFNST (Low-Frequency Non-Separable Transform) parameters of a current block - wherein the prediction parameters include prediction mode parameters - and, if the prediction mode parameters indicate that an intra-prediction value is determined using a Matrix-Based Intra Prediction (MIP) mode for a chroma component of the current block, obtaining adjacent sample values ​​of the current block and determining MIP input sample values ​​of the current block according to the adjacent sample values ​​of the current block, and determining the product of the sum of the MIP input sample values ​​and a shifting offset parameter - wherein the value of the shifting offset parameter is a fixed constant - and, setting the value of a first offset as the difference between a first constant value and the product, determining the MIP weighting matrix of the current block according to the prediction parameters, calculating a first weighted sum of the MIP weighting matrix and the MIP input sample values, and the first weighted sum and the Calculating the first sum of the first offset, and obtaining a first right-shift value by performing binary right-shifting on the first sum - the number of bits shifted to the right is equal to the value of the shifting number parameter, and the value of the shifting number parameter is a fixed constant - and setting the MIP prediction value of the chroma component of the current block to be equal to the sum of the first right-shift value and the value corresponding to index number 0 among the first temporary reference values ​​- the first temporary reference value is obtained by performing downsampling filtering on adjacent sample values ​​of the current block, and the MIP prediction value is the prediction value of a portion of the samples of the chroma component of the current block - andA decoding method characterized by comprising: determining an intra-predicted value of a chroma component of the current block by filtering the MIP predicted value; determining a reconstructed transformation coefficient of the current block when the LFNST parameter indicates to perform LFNST on the current block, and obtaining a second transformation coefficient by performing LFNST on at least a portion of the reconstructed transformation coefficients; obtaining a reconstructed residual value of the chroma component of the current block by performing a first transformation on the second transformation coefficient; and determining a reconstructed value of the chroma component of the current block according to the intra-predicted value of the chroma component of the current block and the reconstructed residual value. Claim 7 In claim 6, the prediction parameter further includes a size parameter of the current block, and determining the MIP input sample value of the current block according to the adjacent sample value of the current block comprises: determining the block size index value of the current block according to the size parameter of the current block; obtaining a first temporary reference value by performing downsampling filtering on the adjacent sample value of the current block; determining a second constant value according to the bit depth of the adjacent sample value of the current block when the block size index value of the current block is within a preset range; setting the value corresponding to index number 0 among the MIP input sample values ​​as the difference between the second constant value and the value corresponding to index number 0 among the first temporary reference values; setting the value corresponding to index number i among the MIP input sample values ​​as the difference between the value corresponding to index number i among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values ​​- i is an integer greater than 0 -; and when the block size index value of the current block deviates from the preset range, the MIP input A decoding method characterized by including setting the value corresponding to index number j among the sample values ​​as the difference between the value corresponding to index number (j+1) among the first temporary reference values ​​and the value corresponding to index number 0 among the first temporary reference values, where j is an integer greater than or equal to 0. Claim 8 A decoding method according to claim 7, wherein determining a second constant value according to the bit depth of an adjacent sample value of the current block includes setting the second constant value to be equal to an integer power of 2, wherein the exponent of the power is equal to the value obtained by subtracting 1 from the bit depth of an adjacent sample value of the current block, or obtaining the second constant value by performing binary left shifting on "1", and wherein the number of left-shifted bits is equal to the bit depth of an adjacent sample value of the current block minus 1. Claim 9 A decoding method according to claim 6, wherein the value of the shifting number parameter is a fixed constant unrelated to the block size index value and the MIP mode index value, the value of the shifting number parameter is set to 6, the value of the shifting offset parameter is a fixed constant unrelated to the block size index value and the MIP mode index value, the value of the shifting offset parameter is set to 32, the first constant value is set to be equal to an integer power of 2, and the exponent of the power is equal to the value of the shifting number parameter minus 1, or the first constant value is obtained by performing binary left shifting on "1", and the number of bits shifted to the left is equal to the value of the shifting number parameter minus 1. Claim 10 In claim 6, parsing a bitstream to obtain LFNST parameters comprises determining whether LFNST parameters exist in the bitstream and, when it is determined that LFNST parameters exist in the bitstream, parsing the bitstream to obtain LFNST parameters, or parsing a bitstream to obtain LFNST parameters comprises parsing the bitstream to obtain the value of an LFNST index number, determining to perform LFNST on the current block when the value of the LFNST index number is greater than 0, and determining not to perform LFNST on the current block when the value of the LFNST index number is 0, and determining whether LFNST parameters exist in the bitstream comprises determining the minimum value among the size parameters of the current block when determining an intra-predicted value using MIP mode for the chroma component of the current block, and determining that LFNST parameters exist in the bitstream when the minimum value is greater than or equal to a first preset threshold. Decoding method. Claim 11 A decoding method according to claim 6, wherein when the LFNST parameter indicates to perform LFNST on the current block, determining the reconstructed transformation coefficients of the current block comprises parsing the bitstream to obtain the quantized coefficients of the current block and performing inverse quantization on the quantized coefficients to obtain the reconstructed transformation coefficients of the current block, and performing inverse quantization on the quantized coefficients to obtain the reconstructed transformation coefficients of the current block comprises scaling the quantized coefficients to obtain the reconstructed transformation coefficients of the current block. Claim 12 An encoder comprising a first memory and a first processor, wherein the first memory is configured to store a computer program executable on the first processor, and the first processor is configured to execute a method described in any one of claims 1 to 5 when executing the computer program. Claim 13 A decoder comprising a second memory and a second processor, wherein the second memory is configured to store a computer program executable on the second processor, and the second processor is configured to execute a method described in any one of claims 6 to 11 when executing the computer program. Claim 14 A computer-readable storage medium, wherein a computer program and a bit stream are stored in the computer-readable storage medium, and when the computer program is executed by a processor, the bit stream is generated by implementing an encoding method described in any one of claims 1 to 5. Claim 15 delete Claim 16 delete Claim 17 delete Claim 18 delete Claim 19 delete Claim 20 delete Claim 21 delete Claim 22 delete Claim 23 delete Claim 24 delete Claim 25 delete Claim 26 delete Claim 27 delete Claim 28 delete Claim 29 delete Claim 30 delete Claim 31 delete Claim 32 delete Claim 33 delete Claim 34 delete Claim 35 delete Claim 36 delete Claim 37 delete Claim 38 delete Claim 39 delete Claim 40 delete Claim 41 delete Claim 42 delete Claim 43 delete Claim 44 delete Claim 45 delete Claim 46 delete Claim 47 delete Claim 48 delete

Citation Information

Patent Citations

  • Video decoding method and device, and video encoding method and device

    WO2019172676A1