Encoding and decoding method, code stream, encoder, decoder and storage medium
Patent Information
- Application Number
- CN202380097920.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2025-12-12
AI Technical Summary
In the Enhanced Compression Model (ECM) of the H.266/VVC video coding standard, the bit overhead of cross-component prediction mode is large, which leads to a decrease in coding efficiency.
Add a check at the encoding and decoding ends to determine whether the current block is enabled for chroma fusion export mode. Only when chroma fusion export mode is enabled will the value of the first syntax identifier information be encoded and decoded, a parameter candidate list be constructed and the model parameters be determined, and unnecessary bit overhead be reduced.
It effectively saves codewords, improves encoding and decoding efficiency, and enhances chroma prediction performance.
Smart Images

Figure CN121128171A_ABST
Abstract
Description
Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field
[0001] The embodiments of the present application relate to the field of video coding and decoding technology, and in particular to a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium. Background Art
[0002] Based on the reference software test platform of the latest video coding standard H.266 / Versatile Video Coding (VVC), the Joint Video Experts Team (JVET) has proposed a new generation of reference software model, the Enhanced Compression Model (ECM).
[0003] In ECM, the prediction part can include multiple modes, including luma prediction mode and chroma prediction mode. Chroma prediction modes can be divided into two types: cross-component prediction mode and non-cross-component prediction mode. Cross-component prediction mode derivation technology, due to its incomplete considerations, usually results in additional bit overhead, thereby reducing coding efficiency.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium, which can reduce bit overhead and thus improve coding and decoding efficiency.
[0006] The technical solution of the embodiment of the present application can be implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a decoding method, applied to a decoder, the method comprising:
[0008] Determine the mode enable information for the current block;
[0009] If the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, decoding the bitstream and determining the value of the first syntax identification information;
[0010] If the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, decoding the code stream to determine the index identification value of the current block;
[0011] A parameter candidate list of the current block is constructed, and model parameters of the current block are determined according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine a first prediction value of the current block based on the cross-component prediction mode.
[0012] In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:
[0013] Determine the mode enable information for the current block;
[0014] If the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, determining a value of the first syntax identification information;
[0015] If the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, constructing a parameter candidate list for the current block;
[0016] Determine the model parameters of the current block according to the parameter candidate list; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0017] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:
[0018] The index identification value of the current block, the value of the first syntax identification information, the value of the second syntax identification information, the value of the third syntax identification information, the value of the fourth syntax identification information, the value of the fifth syntax identification information, the value of the sixth syntax identification information, the value of the seventh syntax identification information, and the value of the eighth syntax identification information;
[0019] Among them, the first syntax identification information is used to indicate whether the current block uses the chroma fusion derivation mode, the second syntax identification information is used to indicate whether the current block uses the weighted chroma fusion mode, the third syntax identification information is used to indicate whether the current block uses the chroma fusion mode, the fourth syntax identification information is used to indicate whether the current block uses the linear model chroma fusion mode, the fifth syntax identification information is used to indicate whether the current block uses the single linear model chroma fusion mode or the bilinear model chroma fusion mode, the sixth syntax identification information is used to indicate whether the current block uses the non-cross-component prediction mode, the seventh syntax identification information is used to indicate whether the current block uses the cross-component prediction mode, and the eighth syntax identification information is used to indicate whether the current block uses the cross-component derivation mode.
[0020] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first determining unit, wherein:
[0021] A first determining unit is configured to determine mode enabling information of a current block; and if the mode enabling information indicates that the current block uses a weighted chroma fusion mode and the current block enables a chroma fusion derivation mode, determine a value of first syntax identification information;
[0022] The first determination unit is further configured to construct a parameter candidate list for the current block if the first syntax identification information indicates that the current block uses a chroma fusion derivation mode; and determine the model parameters of the current block based on the parameter candidate list; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0023] In a fifth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor, wherein:
[0024] a first memory for storing a computer program capable of running on the first processor;
[0025] The first processor is configured to execute the method according to the second aspect when running a computer program.
[0026] In a sixth aspect, an embodiment of the present application provides a decoder, comprising a second determining unit and a decoding unit, wherein:
[0027] a second determining unit configured to determine mode enabling information of a current block;
[0028] The decoding unit is configured to, if the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the chroma fusion derivation mode is enabled for the current block, decode the bitstream and determine a value of the first syntax identification information; and if the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, decode the bitstream and determine an index identification value of the current block;
[0029] The second determination unit is further configured to construct a parameter candidate list of the current block, and determine the model parameters of the current block according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0030] In a seventh aspect, an embodiment of the present application provides a decoder, comprising a second memory and a second processor, wherein:
[0031] a second memory for storing a computer program capable of running on the second processor;
[0032] The second processor is configured to execute the method according to the first aspect when running a computer program.
[0033] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed, implements the method described in the first aspect or the method described in the second aspect.
[0034] The embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium. At the encoding end, the mode enabling information of the current block is determined; if the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, the value of the first syntax identification information is determined; if the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, a parameter candidate list of the current block is constructed; and according to the parameter candidate list, the model parameters of the current block are determined. At the decoding end, the mode enabling information of the current block is determined; if the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, the code stream is decoded to determine the value of the first syntax identification information; if the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, the code stream is decoded to determine the index identification value of the current block; a parameter candidate list of the current block is constructed, and the model parameters of the current block are determined according to the parameter candidate list and the index identification value. The model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode. In this way, when the current block uses the weighted chroma fusion mode, taking into account the usage rate of the chroma fusion derivation mode, a judgment is added here as to whether the current block enables the chroma fusion derivation mode. Only when the current block enables the chroma fusion derivation mode, it is necessary to encode and decode the value of the first syntax identification information. This can effectively save codewords, avoid the extra bit overhead brought by the first syntax identification information, and thus improve the encoding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] FIG1 is a schematic diagram of a current block and adjacent reconstructed chroma pixels and reconstructed luminance pixels;
[0036] FIG2A is a schematic diagram of a linear model based on the CCLM model;
[0037] FIG2B is a schematic diagram of a linear model based on the CCLM-SLOPE model;
[0038] FIG3 is a schematic diagram of a multi-model based on the MMLM mode;
[0039] FIG4 is a schematic diagram of candidate locations of spatially adjacent blocks;
[0040] FIG5 is a schematic diagram of candidate locations of non-adjacent blocks in a spatial domain;
[0041] FIG6 is a schematic block diagram of an encoder provided in an embodiment of the present application;
[0042] FIG7 is a schematic block diagram of a decoder according to an embodiment of the present application;
[0043] FIG8 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application;
[0044] FIG9 is a flowchart diagram of a decoding method provided in an embodiment of the present application;
[0045] FIG10 is a second flow chart of a decoding method provided in an embodiment of the present application;
[0046] FIG11 is a flowchart diagram 1 of an encoding method provided in an embodiment of the present application;
[0047] FIG12 is a second flow chart of an encoding method provided in an embodiment of the present application;
[0048] FIG13 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0049] FIG14 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;
[0050] FIG15 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0051] FIG16 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;
[0052] FIG17 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0055] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0056] It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0057] With the goal of exploring the next generation of digital video compression technology, a new generation of reference software model, the Enhanced Compression Model (ECM), was developed based on the reference software test platform (VVC Test Model, VTM) of the latest video coding standard H.266 / VVC. Currently, video compression technology is also based on traditional block-based codecs, which can include multiple modules, such as block partitioning, intra-frame prediction, inter-frame prediction, transformation, quantization, entropy coding, loop and post-processing filtering, etc. The embodiments of this application mainly improve the prediction part to enhance the coding performance of ECM.
[0058] Here, the prediction part can include multiple technologies, including luma prediction mode and chroma prediction mode. Taking chroma prediction mode as an example, the relevant syntax of chroma prediction mode is shown in Table 1.
[0059] Table 1
[0060] Among them, for the syntax element cclmModeIdx, the value of cclmModeIdx and the corresponding mode type are shown in Table 2.
[0061] Table 2
[0062] It can be understood that for the Cross-Component Linear Model (CCLM) prediction mode, the central idea of the CCLM prediction mode is to reduce cross-component redundancy and perform cross-component prediction, which mainly uses the reconstructed luminance pixels of the same coding block to construct the predicted value of the chrominance pixel. Its linear relationship is shown in the following formula (1): pred C (i,j)=a·rec L ′(i,j)+b (1)
[0063] Among them, pred C (i, j) represents the chroma prediction pixel of the current block, rec L′(i, j) represents the downsampled reconstructed luminance pixel of the current block; a and b are called linear model parameters (a is a scaling parameter, b is an offset parameter), which can be derived from the adjacent chrominance pixels and luminance pixels. Since the linear model here can be calculated at both the encoding and decoding ends, it does not need to be written into the bitstream. For example, Figure 1 shows a schematic diagram of the current block and the adjacent reconstructed chrominance pixels and reconstructed luminance pixels in the CCLM mode. As shown in Figure 1, the circles filled with grids represent the reference pixels that are adjacent to the current block and have been reconstructed, which may include the left reference pixels and the upper reference pixels. In addition, N represents the side length corresponding to the chrominance component of the current block, and 2N represents the side length corresponding to the luminance component of the current block.
[0064] In addition to using all upper reference pixels and left reference pixels to jointly calculate the parameters of the linear model, there are two other ways to calculate the model parameters, that is, CCLM has two other modes, called CCLM-T and CCLM-L modes, as follows:
[0065] In CCLM-T mode, only the upper reference pixels are used to calculate the linear model parameters;
[0066] In CCLM-L mode, only the reference pixels on the left are used to calculate the linear model parameters.
[0067] In order to further improve the coding efficiency of CCLM, many improvements have been made to CCLM in ECM, including the slope-based CCLM model (CCLM_SLOPE), multi-model linear model (Multi-Model Linear Model, MMLM), convolutional cross-component model (Convolutional Cross-Component Model, CCCM), gradient linear model (Gradient Linear Model, GLM), etc. The following is a brief introduction to some linear models.
[0068] In CCLM_SLOPE, the calculated linear model parameters can be adjusted as follows: a′=a+u,b′=bu*yr (2)
[0069] Here, the updated linear model parameters a' and b' are used to calculate the predicted pixels. Through this improvement, the mapping function is tilted or rotated around the point with a luminance value of yr. Wherein yr is generally the average value of the reference luminance pixels. For example, Figure 2A is a schematic diagram of a linear model based on the CCLM mode, and Figure 2B is a schematic diagram of a linear model based on the CCLM-SLOPE mode. Wherein, the horizontal axis represents the reconstructed luminance information (Y), and the vertical axis represents the chrominance prediction information (Cb / Cr); the model parameters of Figure 2A are a and b, and the model parameters of Figure 2B are a' and b', and the model parameters a' and b' of Figure 2B can be obtained by adjusting the model parameters a and b.
[0070] In CCLM, there is only one linear model between the luminance and chrominance of the same coding block. In MMLM, multiple models can be provided for the same coding block. Adjacent luminance and chrominance pixels are divided into different categories according to the classification threshold, and the pixels in each category are used to calculate different model parameters. For example, Figure 3 is a schematic diagram of a multi-model based on the MMLM mode. As shown in Figure 3, here, adjacent reference pixels are classified according to the classification threshold, and two linear models can be constructed: the model parameters of the first linear model are α1=2, β1=1; the model parameters of the second linear model are α2=1 / 2, β2=-1.
[0071] It should also be understood that in the various cross-component linear model prediction modes described above, all cross-component model parameters (ccmParam) are calculated from adjacent reconstructed luma and chroma pixels. Based on this, a new cross-component prediction mode, Cross-Component Merge (CCMerge), is proposed. In this mode, the ccmParam of the current block is directly inherited from the reconstructed block, rather than being calculated. The flag ccmMrgFlag indicates whether the current block uses cross-component merging mode. If the flag ccmMrgFlag is true, indicating that the current block is in CCMerge mode, a ccmParam list ccmList[NUM_LMC_MERGE_CANDS] is created for the current block. This list is populated with existing ccmParams from spatially adjacent and non-adjacent candidate blocks. By default, the upper limit NUM_LMC_MERGE_CANDS on the number of candidates in this list is 6. If the above process does not fill the list, it can be filled according to preset default parameters. The specific model parameters to be used are indicated by the candidate index cclmMrgIdx.
[0072] In some embodiments, the candidate list is populated as follows:
[0073] Step 1: Spatial neighbor candidates.
[0074] First, the spatial adjacent blocks are checked. The positions of the adjacent blocks can be shown in FIG4 , and the checking order is B1->A1->B0->A0->B2.
[0075] Step 2: Spatial non-adjacent candidates.
[0076] After examining all spatially adjacent blocks, consider spatially non-adjacent blocks. Their positional relationship is shown in Figure 5, where each point represents a non-adjacent block and indicates the top-left corner of that non-adjacent block. Note that the grid in Figure 5 is merely a representation of pixel coordinates and does not represent a specific block division.
[0077] Step 3: Default parameter CCLM candidate.
[0078] If the list is not full, CCLM candidates with default scaling parameters are considered after checking spatially adjacent candidates and non-adjacent candidates, where the default scaling parameters are {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8}.
[0079] For model parameters, the inheritance rules are as follows:
[0080] When inheriting a CCLM candidate, only the scale parameters are inherited. The offset parameters are recalculated.
[0081] When inheriting an MMLM candidate, the scaling parameters and classification thresholds are inherited. The offset parameters are recalculated, but if no adjacent reconstructed pixels are available in the classification, the offset parameters are also inherited directly.
[0082] ●When inheriting a CCCM candidate, all convolution parameters and classification thresholds are inherited.
[0083] ●When inheriting a GLM candidate, if the GLM is in 3-parameter mode, all gradient indices and model parameters are inherited; otherwise, if the GLM is in 2-parameter mode, only the scaling parameters are inherited and the offset parameters need to be recalculated.
[0084] ●When the chroma fusion mode is inherited, the MMLM parameters derived from the cross-component prediction part are inherited as candidates.
[0085] ●When inheriting a CCMerge candidate, the inheritance method depends on the candidate mode it inherits.
[0086] It can also be understood that for the chroma fusion mode, the chroma prediction mode can generally be divided into two types, one is the cross-component prediction mode, and the other is the non-cross-component prediction mode. The non-cross-component prediction mode usually includes the planar mode, the direct current (DC) mode, the horizontal mode, the vertical mode, the decoder side intra mode derivation (DIMD) mode, etc. If the current block adopts the non-cross-component prediction mode, the chroma fusion mode flag needs to be further parsed. The relevant syntax of the chroma fusion mode is shown in Table 3.
[0087] Table 3
[0088] The flag bit for the chroma fusion mode is isChromaFusion. The specific value of isChromaFusion corresponds to different fusion modes, as shown in Table 4.
[0089] Table 4
[0090] Specifically, several situations in which the value of isChromaFusion can be taken are described in detail below.
[0091] When the value of chromaFusionFlag is 0, the value of the flag isChromaFusion is 0, indicating that the chroma fusion mode is not used.
[0092] When the value of chromaFusionFlag is 1 and the value of chromaFusionType is 0, the flag isChromaFusion is 1, indicating that the weighted chroma fusion mode is used. The working principle of this mode is to combine the current non-cross-component prediction mode and a cross-component prediction mode to obtain the final prediction result. The specific prediction process of this mode is as follows: pred=(w0*pred0+w1*pred1+(1<<(shift-1)))>>shift (3)
[0093] Among them, pred0 represents the prediction value of the current non-cross-component prediction mode, pred1 represents the prediction value of the cross-component prediction mode (and the mode defaults to MMLM), and pred is the final prediction result of the current chroma block. The weights w0 and w1 can be determined according to the prediction mode of the adjacent blocks, and w0+w1=4, shift=2. For example, when the left adjacent block and the upper adjacent block are both cross-component prediction modes, {w0,w1}={1,3}; when the left adjacent block and the upper adjacent block are both non-cross-component prediction modes, {w0,w1}={3,1}; in other cases, {w0,w1}={2,2}. And the parameters in the cross-component prediction mode in this case can be inherited.
[0094] When the value of chromaFusionFlag is 1, the value of chromaFusionType is 1, and the value of chromaFusionCclm is 0, the value of the flag isChromaFusion is 2, indicating that the single linear model chroma fusion mode is used.
[0095] When the value of chromaFusionFlag is 1, the value of chromaFusionType is 1, and the value of chromaFusionCclm is 1, the value of the flag isChromaFusion is 3, indicating that the multilinear model chroma fusion mode is used.
[0096] Here, the working principle of the linear model chroma fusion mode is to combine the current non-cross-component prediction mode and the brightness reconstructed pixel value to obtain the final prediction result. The specific prediction process of this mode is as follows: pred C =a·rec′ L +b·pred′ C +c·midValue (4)
[0097] Among them, pred C Represents the final prediction result, rec′ L Represents the reconstructed brightness pixel value, pred′ C Represents the chroma predicted pixel value obtained in non-cross-component prediction mode. midValue is the default value, which can be determined by the bit depth. Generally, when the bit depth is 10, its value is 512. a, b, and c are model parameters. When the isChromaFusion flag is set to 2, it indicates a single linear model, that is, a single set of model parameters. When the isChromaFusion flag is set to 3, it indicates a multilinear model, that is, multiple sets of model parameters. Reference pixels are classified according to the threshold, and each set of model parameters is used for reference pixels of the corresponding classification.
[0098] Furthermore, in the aforementioned chroma fusion mode, a cross-component derivation mode also exists for the case where the chroma fusion mode flag is 1. In this mode, the cross-component model parameters ccmParam of the cross-component prediction part in the chroma fusion mode can be calculated or inherited from the cross-component model parameters of the reconstructed block. Specifically, the relevant syntax elements are shown in Table 5.
[0099] Table 5
[0100] When the isChromaFusion flag is set to 1, the chromaFusionMrgFlag flag is added to indicate whether chroma fusion export mode is used. If the chromaFusionMrgFlag flag is set to 1, the candidate index identifier chromaFusionMrgIdx is parsed to indicate the position of the reference linear model parameters in the candidate list, thereby determining the inherited linear model parameters ccmParam. The relationship between the chromaFusionMrgIdx value and the encoding bin is shown in Table 6.
[0101] Table 6
[0102] Each bin in the index identifier chromaFusionMrgIdx can be context-encoded using a separate context model.
[0103] It should be noted that the candidate list in the chroma fusion export mode is constructed in the same way as the candidate list in the cross-component export mode, which will not be detailed here.
[0104] However, in cross-component model derivation mode, related technologies require a flag bit to be encoded at the coding unit (CU) level to determine whether the current block uses cross-component model derivation mode. When cross-component model derivation mode is not used frequently, it usually results in additional bit overhead, thereby reducing coding efficiency.
[0105] Based on this, an embodiment of the present application provides a coding and decoding method. Whether it is the encoding end or the decoding end, when the current block uses the weighted chroma fusion mode, it is necessary to further determine whether the current block enables the chroma fusion derivation mode; only when the current block enables the chroma fusion derivation mode, it is necessary to encode and decode the value of the first syntax identification information; then, when the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, a parameter candidate list can be constructed, and the model parameters of the current block can be obtained from it according to the index identification value. The model parameters are used to determine the first prediction value of the current block under the cross-component prediction mode. In this way, when the current block uses the weighted chroma fusion mode, considering the usage rate of the chroma fusion derivation mode, a judgment is added here as to whether the current block enables the chroma fusion derivation mode. Only when the current block enables the chroma fusion derivation mode, it is necessary to encode and decode the value of the first syntax identification information; thereby effectively saving codewords, while improving the chroma prediction efficiency, and thus improving the coding and decoding efficiency.
[0106] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0107] Referring to Figure 6, which shows a schematic block diagram of the composition of an encoder provided in an embodiment of the present application. As shown in Figure 6, the encoder 100 may include a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, an encoding unit 109 and a decoded image cache unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC).For the input original video signal, a video coding block can be obtained by dividing the coding tree unit (CTU). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 101, including transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients to further reduce the bit rate; the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block; the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding on the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is the process of generating a motion vector, which can estimate the motion of the video coding block. The motion compensation unit 104 then calculates the motion vector based on the motion vector determined by the motion estimation unit 105. After determining the intra-frame prediction mode, the intra-frame prediction unit 103 is further configured to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109. In addition, the inverse transform and inverse quantization unit 106 is configured to reconstruct the video coding block and reconstruct a residual block in the pixel domain. The reconstructed residual block is subjected to the filter control analysis unit 107 and the filtering unit 108 to remove the block effect artifacts. The reconstructed residual block is then added to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video coding block. The encoding unit 109 is configured to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode, and output the code stream of the video signal. The decoded image buffer unit 110 is configured to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 110 .
[0108] Refer to Figure 7, which shows a block diagram of a decoder provided by an embodiment of the present application. As shown in Figure 7, the decoder 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205 and a decoded image cache unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. After the input video signal is encoded in Figure 6, the code stream of the video signal is output; the code stream is input to the decoder 200, and first passes through the decoding unit 201 to obtain the decoded transform coefficient; the transform coefficient is processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and the data of the previously decoded block from the current frame or picture; the motion compensation unit 204 is to determine the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and use The prediction information is used to generate a predictive block for the video decoding block being decoded; a decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 with the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal passes through the filtering unit 205 to remove blocking artifacts, thereby improving video quality; the decoded video block is then stored in the decoded image buffer unit 206, which stores reference images used for subsequent intra-frame prediction or motion compensation, and is also used for outputting the video signal, thereby obtaining the restored original video signal.
[0109] Furthermore, the embodiment of the present application also provides a network architecture of a coding and decoding system including an encoder and a decoder, wherein FIG8 shows a schematic diagram of a network architecture of a coding and decoding system provided by the embodiment of the present application. As shown in FIG8 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During implementation, the electronic device can be various types of devices with video coding and decoding functions. For example, the electronic device can include a smart phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensing device, a server, etc., which is not specifically limited in the embodiment of the present application. Here, the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.
[0110] It should be noted that the method of the embodiment of the present application is mainly applied to the prediction part shown in Figure 6 and the prediction part shown in Figure 7. In other words, the embodiment of the present application can be applied to both the encoder and the decoder, and can even be applied to both the encoder and the decoder simultaneously, but the embodiment of the present application is not specifically limited to this. In addition, the prediction part here can include the intra-frame prediction part and the inter-frame prediction part.
[0111] It should also be noted that on the encoding side, the "current block" specifically refers to the coding block currently undergoing chroma prediction; on the decoding side, the "current block" specifically refers to the decoding block currently undergoing chroma prediction. Here, the current block can be a coding unit (CU), a coding tree unit (CTU), or even a prediction unit (PU) or a transform unit (TU), without specific limitations here.
[0112] In one embodiment of the present application, referring to FIG9 , a flowchart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG9 , the method may include:
[0113] S901: Determine mode enabling information of the current block.
[0114] S902: If the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, decode the bitstream and determine the value of the first syntax identification information.
[0115] It should be noted that the decoding method of the embodiment of the present application is applied to a decoder. Furthermore, the decoding method may specifically refer to a chroma prediction method. Within the chroma prediction mode, this primarily addresses technical improvements to a chroma fusion mode. More specifically, it may provide a derived mode for the cross-component prediction portion of the chroma fusion mode. To avoid the bit overhead associated with the low utilization of this technology, a determination is added regarding whether the chroma fusion derived mode is enabled for the current block.
[0116] It should also be noted that, in the embodiment of the present application, the mode enable information can be used to determine whether the current block uses the weighted chroma fusion mode and whether the current block enables the chroma fusion derivation mode. Only when the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, is it necessary to decode and determine the value of the first syntax identification information, i.e., the chroma fusion derivation mode needs to be enabled in the current case.
[0117] In some embodiments, determining the mode enabling information of the current block may include:
[0118] Decoding the code stream to determine a value of the second syntax identification information;
[0119] If the second syntax identification information indicates that the current block uses the weighted chroma fusion mode, an enable signal of the current block is determined; wherein the enable signal is used to indicate whether the current block enables the chroma fusion derivation mode.
[0120] It should be noted that in the embodiment of the present application, the second syntax identification information is used to indicate whether the current block uses the weighted chroma fusion mode, and the second syntax identification information can be represented by isChromaFusion. In addition, different values of the second syntax identification information will indicate different modes.
[0121] In some embodiments, the method may further include:
[0122] If the value of the second syntax identification information is the first value, determining that the second syntax identification information indicates that the current block does not use the chroma fusion mode;
[0123] If the value of the second syntax identification information is the second value, determining that the second syntax identification information indicates that the current block uses the weighted chroma fusion mode;
[0124] If the value of the second syntax identification information is the third value, determining that the second syntax identification information indicates that the current block uses the single linear model chrominance fusion mode;
[0125] If the value of the second syntax identification information is the fourth value, it is determined that the second syntax identification information indicates that the current block uses the multi-linear model chrominance fusion mode.
[0126] In an embodiment of the present application, the first value, the second value, the third value, and the fourth value are different. Here, the first value, the second value, the third value, and the fourth value can be in parameter form or in digital form. Specifically, the second syntax identification information here can be a parameter written in the profile or a flag value, which is not specifically limited here. For example, in a specific implementation, the first value can be 0, the second value can be 1, the third value can be 2, and the fourth value can be 3.
[0127] That is, in the embodiment of the present application, if the value of the second syntax identification information is 0, it can be determined that the current block does not use the chroma fusion mode; if the value of the second syntax identification information is 1, it can be determined that the current block uses the weighted chroma fusion mode; if the value of the second syntax identification information is 2 or 3, it can be determined that the current block uses the linear model chroma fusion mode. Among them, if the value of the second syntax identification information is 2, it can be determined that the current block uses the single linear model chroma fusion mode; if the value of the second syntax identification information is 3, it can be determined that the current block uses the multi-linear model chroma fusion mode.
[0128] It should also be noted that, in the embodiment of the present application, for the mode enable information of the current block, if the value of isChroma Fusion is 1, then it is necessary to further determine the enable signal of the current block, wherein the enable signal can be represented by hasChromaFusionFlag(). Only when the enable signal indicates that the chroma fusion derivation mode is enabled for the current block, is it necessary to decode the first syntax identification information; otherwise, if the enable signal indicates that the chroma fusion derivation mode is not enabled for the current block, then it is no longer necessary to decode the first syntax identification information.
[0129] In some embodiments, determining the enable signal of the current block may include: determining the enable signal of the current block according to neighboring block information of the current block.
[0130] In an embodiment of the present application, the enable signal can be determined based on the adjacent block information of the current block, or the enable signal can be determined based on some other information to determine whether the current block enables the chroma fusion derivation mode, which is not specifically limited here.
[0131] Further, taking the adjacent block information of the current block as an example, in some embodiments, determining the enable signal of the current block based on the adjacent block information of the current block may include: determining the pattern information of the adjacent blocks of the current block; and determining the enable signal of the current block based on the pattern information of the adjacent blocks.
[0132] Here, the neighboring blocks may include at least one of the following: at least one left neighboring block located on the left side of the current block, and at least one upper neighboring block located on the upper side of the current block.
[0133] That is, in the embodiment of the present application, the number of adjacent blocks can be 2, or 3, 4, 5, etc., and is not specifically limited here. In addition, among these adjacent blocks, there can be 2 left adjacent blocks and 1 upper adjacent block; or, there can be 1 left adjacent block and 2 upper adjacent blocks; or, there can be 2 left adjacent blocks and 2 upper adjacent blocks, etc.; and the number of left adjacent blocks and upper adjacent blocks can be the same or different, and is not specifically limited here.
[0134] In a specific implementation, there is one left-adjacent block and one right-adjacent block. For example, using FIG5 as an example, the left-adjacent block is block A1 and the top-adjacent block is block B1. Thus, the enable signal for the current block can be determined based on the mode information of blocks A1 and B1.
[0135] In some embodiments, determining the enable signal of the current block based on the mode information of the neighboring blocks may include:
[0136] If at least one of the mode information of the neighboring blocks is a non-inter-component prediction mode, determining that the enable signal is a first value;
[0137] If all the mode information of the neighboring blocks are cross-component prediction modes, the enable signal is determined to be the second value.
[0138] In some embodiments, determining the enable signal of the current block based on the mode information of the neighboring blocks may include:
[0139] If all the mode information of the neighboring blocks are non-inter-component prediction modes, determining that the enable signal is a first value;
[0140] If at least one of the mode information of the neighboring blocks is an inter-component prediction mode, the enable signal is determined to be a second value.
[0141] It should be noted that, in the embodiment of the present application, the mode information of the adjacent blocks can be a cross-component prediction mode or a non-cross-component prediction mode. Taking the adjacent blocks A1 and B1 as an example, the mode information of the adjacent blocks can exist in the following four situations:
[0142] (1) The A1 block is in non-cross-component prediction mode, and the B1 block is in non-cross-component prediction mode.
[0143] (2) The A1 block is in non-inter-component prediction mode, and the B1 block is in inter-component prediction mode.
[0144] (3) The A1 block is in cross-component prediction mode, and the B1 block is in non-cross-component prediction mode.
[0145] (4) The A1 block is in cross-component prediction mode, and the B1 block is in cross-component prediction mode.
[0146] Thus, in an embodiment of the present application, for the enable signal, in a specific implementation method, if at least one of the mode information of the adjacent blocks is a non-cross-component prediction mode, that is, the above-mentioned situation (1) or (2) or (3) is satisfied, then the enable signal can be a first value; if all of the mode information of the adjacent blocks is a cross-component prediction mode, that is, the above-mentioned situation (4) is satisfied, then the enable signal can be a second value.
[0147] For the enable signal, in another specific implementation, if all the mode information of the adjacent blocks is a non-cross-component prediction mode, that is, the above-mentioned situation (1) is satisfied, then the enable signal can be a first value; if at least one of the mode information of the adjacent blocks is a cross-component prediction mode, that is, the above-mentioned situation (2) or (3) or (4) is satisfied, then the enable signal can be a second value.
[0148] Furthermore, in some embodiments, the method may further include:
[0149] If the enable signal is the first value, it is determined that the chroma fusion derivation mode is not enabled for the current block;
[0150] If the enable signal is the second value, it is determined that the chroma fusion derivation mode is enabled for the current block.
[0151] It should be noted that in the embodiments of the present application, the first value and the second value are different. Here, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can be set to true and the second value can be set to false; or, the first value can be set to false and the second value can be set to true; and this is not specifically limited here. For example, in a specific implementation, the first value can be 0 and the second value can be 1.
[0152] It should also be noted that, in the embodiment of the present application, the enable signal can be represented by hasChromaFusionFlag(). Among them, hasChromaFusionFlag() does not need to be written into the code stream, and accordingly, the decoding end does not need to determine the value of hasChromaFusionFlag() by decoding the code stream. Exemplarily, if the mode information of the adjacent blocks meets the above situation (1) or (2) or (3), that is, at least one is a non-cross-component prediction mode, then the returned enable signal can be 0; if the mode information of the adjacent blocks meets the above situation (4), that is, all are cross-component prediction modes, then the returned enable signal can be 1. Alternatively, if the mode information of the adjacent blocks meets the above situation (1), that is, all are non-cross-component prediction modes, then the returned enable signal can be 0; if the mode information of the adjacent blocks meets the above situation (2) or (3) or (4), that is, at least one is a cross-component prediction mode, then the returned enable signal can be 1.
[0153] In some embodiments, the method may further include: if the mode enable information indicates that the current block uses a weighted chroma fusion mode and the current block does not enable a chroma fusion derivation mode, determining the model parameters of the current block based on the reference pixels of the current block; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0154] Furthermore, in some embodiments, the method may further include: if the value of the second syntax identification information is the second value and the enable signal is the first value, determining that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion derivation mode;
[0155] If the value of the second syntax identification information is the second value and the enable signal is the second value, it is determined that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode.
[0156] That is to say, in an embodiment of the present application, if the value of isChromaFusion is 1 and hasChromaFusion Flag() is 0, then it can be determined that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion derivation mode. At this time, the value of the first syntax identification information is no longer decoded, and the model parameters of the current block are directly determined based on the reference pixels of the current block; otherwise, if the value of isChromaFusion is 1 and hasChromaFusion Flag() is also 1, then it can be determined that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode. At this time, it is necessary to decode the value of the first syntax identification information, and subsequently further decode the index identification value of the current block, and then determine the model parameters of the current block.
[0157] In this way, in the cross-component model derivation technology, if the usage rate of the chroma fusion derivation mode is not high, it is possible to adaptively determine whether to enable the chroma fusion derivation mode based on the adjacent block information; only when the chroma fusion derivation mode is enabled for the current block, the value of the first syntax identification information will be further decoded; thereby effectively saving codewords and improving encoding and decoding efficiency.
[0158] S903: If the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, decode the code stream to determine the index identification value of the current block.
[0159] It should be noted that, in the embodiment of the present application, the first syntax identification information is used to indicate whether the current block uses the chroma fusion derivation mode. In some embodiments, the method may further include:
[0160] If the value of the first syntax identification information is the first value, determining that the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode;
[0161] If the value of the first syntax identification information is the second value, it is determined that the first syntax identification information indicates that the current block uses the chroma fusion derivation mode.
[0162] In the embodiment of the present application, the first value and the second value are different. Here, the first value and the second value can be in parameter form or in digital form. Specifically, the first syntax identification information here can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0163] In an embodiment of the present application, the first syntax identification information can be represented by chromaFusionMrgFlag. The first value can be set to 1, and the second value can be set to 0; or, the first value can be set to 0, and the second value can be set to 1; or, the first value can be set to true, and the second value can be set to false; or, the first value can be set to false, and the second value can be set to true; and there is no specific limitation here. For example, in a specific implementation, the first value can be 0, and the second value can be 1.
[0164] That is to say, in an embodiment of the present application, taking the first syntax identification information as a flag as an example, if the value of the decoded chromaFusionMrgFlag is 0, then it can be determined that the current block does not use the chroma fusion derivation mode; if the value of the decoded chromaFusionMrgFlag is 1, then it can be determined that the current block uses the chroma fusion derivation mode.
[0165] Furthermore, in some embodiments, decoding the code stream and determining the value of the first syntax identification information may include: decoding the code stream based on a context model and determining the value of the first syntax identification information.
[0166] In an embodiment of the present application, the first syntax identification information chromaFusionMrgFlag may be determined by context decoding. In a specific implementation, the method may further include: determining a context model based on information about adjacent blocks of the current block.
[0167] In the embodiment of the present application, the neighboring block information of the current block may refer to information such as whether the neighboring block is in cross-component prediction mode. That is, in the weighted chroma fusion mode, different context models can be constructed for encoding / decoding the first syntax flag information chromaFusionMrgFlag based on information such as whether the neighboring block is in cross-component prediction mode.
[0168] It should also be noted that, in this embodiment of the present application, if the first syntax identification information chromaFusionMrgFlag indicates that the current block uses the chroma fusion derivation mode, then the index identification value of the current block needs to be decoded. The index identification value can be used to indicate the index number of a set of candidate model parameters referenced by the current block in the parameter candidate list, that is, the position in the parameter candidate list, so as to further determine the corresponding model parameters in the subsequent step.
[0169] Furthermore, in some embodiments, decoding the code stream and determining the index identification value of the current block may include: decoding the code stream based on a truncated binary code method to determine the index identification value of the current block.
[0170] That is, in the embodiment of the present application, the index identification value can be represented by chromaFusionMrgIdx. Here, the index identification value chromaFusionMrgIdx can be decoded in a truncated binary code manner and can be shared by the two chroma channels Cb / Cr. The correspondence between its value and the binary code (binary data) is shown in the aforementioned Table 6.
[0171] It should also be noted that, in the embodiment of the present application, each bin in the index identification value chromaFusionMrgIdx uses separate context information for context decoding to determine the index identification value of the current block.
[0172] S904: Construct a parameter candidate list of the current block, and determine the model parameters of the current block according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0173] It should be noted that in an embodiment of the present application, if the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, then it is necessary to decode the index identification value of the current block; and then further determine the model parameters of the current block based on the constructed parameter candidate list and the index identification value.
[0174] It should also be noted that, in an embodiment of the present application, if the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode, then in some embodiments, the method may further include: if the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode, then determining the model parameters of the current block based on the reference pixels of the current block; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0175] That is to say, in an embodiment of the present application, if the value of the first syntax identification information chromaFusionMrgFlag is 0, that is, the current block does not use the chroma fusion derivation mode, then there is no need to decode the index identification value of the current block; at this time, the model parameters of the current block can be calculated according to the existing technical solution, and used to generate a chroma prediction value based on the cross-component prediction mode.
[0176] In some embodiments, the method may further include: determining a reference pixel of the current block based on an adjacent area of the current block; wherein the adjacent area of the current block includes at least one of the following: an adjacent area on the left side of the current block and an adjacent area on the top side of the current block.
[0177] It should be noted that, in an embodiment of the present application, the reference pixels of the current block may be obtained based on the left adjacent area of the current block, i.e., the CCLM-L mode, in which case only the left adjacent area of the current block is used to calculate the model parameters; or, the reference pixels of the current block may be obtained based on the upper adjacent area of the current block, i.e., the CCLM-T mode, in which case only the upper adjacent area of the current block is used to calculate the model parameters; or, the reference pixels of the current block may be obtained based on the left adjacent area and the upper adjacent area of the current block, i.e., the CCLM-LT mode, in which case the left adjacent area and the upper adjacent area of the current block are jointly used to calculate the model parameters; no specific limitation is made here.
[0178] It should also be noted that, in the embodiments of the present application, determining the reference pixel of the current block based on the adjacent area of the current block may be performed by filtering the pixels in the adjacent area to determine the reference pixel. In some embodiments, the filtering of the pixels in the adjacent area may be performed based on the pixel positions or the color component intensities, thereby determining the reference pixel of the current block based on the filtered pixels.
[0179] Specifically, in an embodiment of the present application, a first reference pixel set is formed based on pixels in an adjacent area of the current block. This first reference pixel set can then be screened to determine the reference pixel. Here, the number of reference pixels can be N, where N is an integer greater than zero. In other words, N reference pixels can be selected from the pixels in the adjacent area. The value of N can generally be 4, but this is not a specific limitation.
[0180] It should also be noted that in an embodiment of the present application, among the pixels in the adjacent area of the current block, there may be some unimportant pixels (for example, these pixels have poor correlation) or some abnormal pixels. In order to ensure the accuracy of the prediction, these pixels need to be eliminated in order to obtain valid reference pixels.
[0181] In some embodiments, determining the model parameters of the current block based on the reference pixels of the current block may include:
[0182] Determining a reconstructed luminance value and a reconstructed chrominance value of a reference pixel;
[0183] The model parameters are calculated based on the reconstructed luminance value and the reconstructed chrominance value to obtain the model parameters of the current block.
[0184] For example, if the current block does not use the chroma fusion derivation mode, then for the derivation of model parameters, a method for derivation of model parameters based on least squares regression construction is provided. Specifically, the parameters can be derived by minimizing the regression error of the reconstructed luminance value and the reconstructed chroma value of the reference pixels around the current block, as shown in the following formulas:
[0185] Wherein, L(n) represents the reconstructed luminance value of the reference pixel corresponding to the downsampled left adjacent area and the upper adjacent area, C(n) represents the reconstructed chrominance value of the reference pixel corresponding to the left adjacent area and the upper adjacent area, and N is the number of reference pixels.
[0186] It can be understood that in an embodiment of the present application, constructing a parameter candidate list for the current block can include: determining the adjacent blocks of the current block; if at least one block in the adjacent blocks uses a cross-component prediction mode, determining the model parameters of at least one block to obtain at least one set of first candidate model parameters; and filling at least one set of first candidate model parameters into the parameter candidate list.
[0187] It should be noted that, in the embodiment of the present application, adjacent blocks may include: blocks that are spatially adjacent to the current block, and / or blocks that are temporally adjacent to the current block. That is, the adjacent blocks here may be spatially adjacent blocks, or they may be temporally adjacent blocks. Among them, the spatially adjacent blocks are located in the same frame as the current block, and the temporally adjacent blocks are located in different frames from the current block. For example, in the case of inter-frame prediction, the adjacent blocks at this time may refer to temporally adjacent blocks located on the reference frame.
[0188] It should also be noted that, taking spatial adjacency as an example, the positions of adjacent blocks of the current block can be as shown in Figure 4, and the inspection order can be B1->A1->B0->A0->B2, and then at least one set of first candidate model parameters is determined in this order.
[0189] Furthermore, after filling at least one group of first candidate model parameters into the parameter candidate list, if the parameter candidate list is in an unfilled state, then in some embodiments, constructing the parameter candidate list for the current block may also include: determining the non-adjacent blocks of the current block; if at least one block in the non-adjacent blocks uses a cross-component prediction mode, determining the model parameters of at least one block to obtain at least one group of second candidate model parameters; and continuing to fill at least one group of second candidate model parameters into the parameter candidate list.
[0190] It should also be noted that in this embodiment of the present application, the number of candidates in the parameter candidate list is represented by NUM_LMC_MERGE_CANDS. By default, the value of NUM_LMC_MERGE_CANDS is set to 6. If the number of first candidate model parameters is less than 6, it indicates that the parameter candidate list is not full; in this case, it is necessary to determine at least one set of second candidate model parameters based on the non-adjacent blocks of the current block, and then continue to fill the at least one set of second candidate model parameters into the parameter candidate list. For example, the spatial non-adjacent block positions of the current block can be shown in Figure 5.
[0191] Furthermore, after filling at least one set of second candidate model parameters into the parameter candidate list, if the parameter candidate list is in an unfilled state, then in some embodiments, constructing the parameter candidate list of the current block may also include: determining at least one set of third candidate model parameters based on preset parameter information; and continuing to fill at least one set of third candidate model parameters into the parameter candidate list.
[0192] It should be noted that, in the embodiment of the present application, the preset parameter information may include at least a preset value of the first model parameter, and the preset value of the first model parameter is at least one of the following: 0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8.
[0193] It should also be noted that, in the embodiment of the present application, the model parameters of the current block may include a first model parameter and a second model parameter. The first model parameter may be used to indicate a scaling parameter when the current block uses the cross-component prediction mode, and the second model parameter may be used to indicate an offset parameter when the current block uses the cross-component prediction mode.
[0194] That is, after constructing a parameter candidate list based on neighboring blocks and non-neighboring blocks of the current block, if the constructed parameter candidate list is not full, CCLM candidates with default scaling parameters may be considered. The default scaling parameters may be {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8}. It should be noted that these default scaling parameters may be added to the parameter candidate list in the order of 0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, and 3 / 8.
[0195] It is also understandable that in the embodiment of the present application, the cross-component prediction mode may include at least one of the following: CCLM mode, MMLM mode, CCCM mode, GLM mode, chroma fusion mode, and CCMerge mode. In other words, the inherited mode here can be any cross-component prediction mode among CCLM mode, MMLM mode, CCCM mode, GLM mode, chroma fusion mode, and CCMerge mode, and is not specifically limited to this.
[0196] In some embodiments, determining the model parameters of the current block based on the parameter candidate list and the index identification value may include: determining a set of candidate model parameters corresponding to the index identification value in the parameter candidate list; determining the inheritance mode of the current block and the corresponding candidate model parameters based on a set of candidate mode parameters; and determining the model parameters of the current block based on the inheritance mode of the current block and the candidate model parameters.
[0197] Furthermore, in some embodiments, determining the model parameters of the current block according to the inheritance mode of the current block and the candidate model parameters may include:
[0198] If the inheritance mode of the current block is the CCLM mode, determining that the current block inherits the first model parameter among the candidate model parameters;
[0199] If the inheritance mode of the current block is the MMLM mode, determining the first model parameter and the classification threshold among the candidate model parameters inherited by the current block;
[0200] If the inheritance mode of the current block is the CCCM mode, determining the convolution parameters and classification thresholds among the candidate model parameters inherited by the current block;
[0201] If the inheritance mode of the current block is the GLM mode, then when the GLM mode is the three-parameter mode, determine that the current block inherits the gradient index value, the first model parameter, and the second model parameter in the candidate model parameters; or, when the GLM mode is the two-parameter mode, determine that the current block inherits the first model parameter in the candidate model parameters;
[0202] If the inheritance mode of the current block is the chroma fusion mode, then when the chroma fusion mode is the chroma fusion derivation mode, determining the prediction mode inherited by the current block, and determining the model parameters of the current block according to the prediction mode inherited by the current block and the candidate model parameters; or, when the chroma fusion mode is not the chroma fusion derivation mode, determining that the current block uses the MMLM mode, and determining that the current block inherits the first model parameter and the classification threshold among the candidate model parameters;
[0203] If the inheritance mode of the current block is the CCMerge mode, the prediction mode inherited by the current block is determined, and the model parameters of the current block are determined according to the prediction mode inherited by the current block and the candidate model parameters.
[0204] Specifically, in the embodiment of the present application, a cross-component model parameter source is added, which can provide multiple options for the cross-component prediction mode. The inheritance rule can be as follows:
[0205] 1) When inheriting CCLM mode, only the scaling parameters are inherited and the offset parameters are recalculated.
[0206] 2) When inheriting the MMLM mode, the scaling parameters and classification thresholds are inherited, and the offset parameters are recalculated; however, if there are no adjacent reconstructed samples available in the classification, the offset parameters are also inherited directly.
[0207] 3) When inheriting CCCM mode, all convolution parameters and classification thresholds are inherited.
[0208] 4) When inheriting the GLM mode, if the GLM is in 3-parameter mode, all gradient indices and model parameters are inherited; otherwise, if the GLM is in 2-parameter mode, only the scaling parameters are inherited, and the offset parameters need to be recalculated.
[0209] 5) When inheriting the chroma fusion mode,
[0210] If the chroma fusion derivation mode is not used, the MMLM parameters derived from the cross-component prediction part are inherited as candidates;
[0211] If it is a chroma fusion export mode, the inheritance method depends on the candidate mode it inherits.
[0212] 6) When inheriting the CCMerge mode, the inheritance method depends on the candidate mode it inherits.
[0213] It is also understandable that in the embodiments of the present application, the size and construction process of the parameter candidate list can share the rules of the cross-component derivation mode, or a separate set of rules can be used instead of sharing the rules of the cross-component derivation mode, which is not specifically limited here. In this way, after determining the model parameters of the current block according to the above-mentioned inheritance rules, the target prediction value of the current block can be further determined.
[0214] In an embodiment of the present application, if the value of the second syntax identification information isChromaFusion is 1, that is, the current block uses the weighted chroma fusion mode, then for the target prediction value of the current block, in some embodiments, the method further includes:
[0215] determining a first prediction value of a current block based on an inter-component prediction mode;
[0216] determining a second prediction value of the current block based on a non-inter-component prediction mode;
[0217] A target prediction value of the current block is determined according to the first prediction value and the second prediction value.
[0218] It should be noted that in the embodiment of the present application, the first prediction value can be obtained by performing chrominance prediction using a cross-component prediction mode based on the determined model parameters. For example, the cross-component prediction mode here can be a CCLM mode, an MMLM mode, a CCCM mode, etc., which is not specifically limited here.
[0219] It should also be noted that in the embodiment of the present application, the second prediction value can be obtained by using a non-cross-component prediction mode for chrominance prediction. For example, the non-cross-component prediction mode here can be a Planar mode, a DC mode, a DIMD mode, etc., which is not specifically limited here.
[0220] It should also be noted that in the embodiments of the present application, the first prediction value and the second prediction value can be executed in parallel or in series. In addition, when executed in series, the step of determining the first prediction value can be executed first, and then the step of determining the second prediction value; or the step of determining the second prediction value can be executed first, and then the step of determining the first prediction value, which is not specifically limited here.
[0221] Furthermore, in an embodiment of the present application, if the current block uses a weighted chroma fusion mode, then the first prediction value of the cross-component prediction mode and the second prediction value of the non-cross-component prediction mode can be combined to obtain a final target prediction value. In some embodiments, determining the target prediction value of the current block based on the first prediction value and the second prediction value may include:
[0222] determining a first shift factor;
[0223] Determining an offset value of the current block according to the first shift factor;
[0224] A target prediction value of the current block is determined according to the offset value, the first prediction value, and the second prediction value.
[0225] It should be noted that, in the embodiment of the present application, the first shift factor can be represented by shift, and illustratively, the value of shift is set to 2. In addition, the offset value of the current block can be set to 1<<(shift-1).
[0226] In a specific implementation, determining the target prediction value of the current block according to the offset value, the first prediction value, and the second prediction value may include: performing a weighted calculation according to the offset value, the first prediction value, and the second prediction value to determine the target prediction value of the current block.
[0227] In a more specific implementation, determining the target prediction value of the current block based on the offset value, the first prediction value and the second prediction value may include: determining a first weighted value and a second weighted value; performing a weighted calculation based on the first weighted value and the first prediction value and the second weighted value and the second prediction value to determine a third prediction value, and determining a fourth prediction value based on the offset value and the third prediction value; performing a shift calculation on the fourth prediction value according to the first shift factor to determine the target prediction value of the current block.
[0228] It should be noted that, in the embodiment of the present application, the first weighted value can be represented by w0, and the second weighted value can be represented by w1. Among them, w0 and w1 can be determined according to the prediction mode of the adjacent block, and w0+w1=4, shift=2. Exemplarily, when the left adjacent block and the upper adjacent block are both cross-component prediction modes, {w0,w1}={1,3}; when the left adjacent block and the upper adjacent block are both non-cross-component prediction modes, {w0,w1}={3,1}; in other cases, {w0,w1}={2,2}.
[0229] For example, pred0 represents the second prediction value of the current block based on the non-cross-component prediction mode, pred1 represents the first prediction value of the current block based on the cross-component prediction mode, and pred is the final target prediction value of the current block. The specific prediction process of this mode is as follows: pred=(w0*pred0+w1*pred1+(1<<(shift-1)))>>shift (6)
[0230] It is also understandable that in the embodiment of the present application, the value of the second syntax identification information may also be determined based on the third syntax identification information, the fourth syntax identification information, and the fifth syntax identification information. The third syntax identification information may be represented by chromaFusionFlag, the fourth syntax identification information may be represented by chromaFusionType, and the fifth syntax identification information may be represented by chromaFusionCclm.
[0231] In some embodiments, decoding the code stream and determining the value of the second syntax identification information may include:
[0232] Decoding the code stream to determine a value of the third syntax identification information;
[0233] If the third syntax identification information indicates that the current block uses the chroma fusion mode, decoding the code stream to determine the value of the fourth syntax identification information;
[0234] If the fourth syntax identification information indicates that the current block does not use the linear model chrominance fusion mode, the value of the second syntax identification information is determined according to the value of the third syntax identification information and the value of the fourth syntax identification information.
[0235] In a possible embodiment, if the third syntax identification information indicates that the current block does not use the chroma fusion mode, the method may further include: setting the value of the second syntax identification information to be equal to the value of the third syntax identification information.
[0236] In a possible embodiment, if the fourth syntax identification information indicates that the current block does not use the linear model chrominance fusion mode, the method may further include: setting the value of the second syntax identification information to be equal to the sum of the value of the third syntax identification information and the value of the fourth syntax identification information.
[0237] In a possible embodiment, if the fourth syntax identification information indicates that the current block uses a linear model chrominance fusion mode, the method may further include: decoding the code stream to determine the value of the fifth syntax identification information; and determining the value of the second syntax identification information based on the value of the third syntax identification information, the value of the fourth syntax identification information, and the value of the fifth syntax identification information.
[0238] It should be noted that, in the embodiment of the present application, for the decoding of the second syntax identification information, the description of the specific syntax elements can be found in Table 3. Among them, the value of the second syntax identification information isChromaFusion can be equal to the sum of the third syntax identification information chromaFusionFlag, the fourth syntax identification information chromaFusionType and the fifth syntax identification information chromaFusionCclm, as shown in the following formula:
[0239] isChromaFusion=chromaFusionFlag+chromaFusionType+chromaFusionCclm(7)
[0240] It should also be noted that, in the embodiment of the present application, for determining the third grammar identification information, the fourth grammar identification information, and the fifth grammar identification information, in a specific implementation manner, the method may further include:
[0241] If the value of the third syntax identification information is the first value, determining that the third syntax identification information indicates that the current block does not use the chroma fusion mode;
[0242] If the value of the third syntax identification information is the second value, it is determined that the third syntax identification information indicates that the current block uses the chroma fusion mode.
[0243] In another specific implementation, the method may further include:
[0244] If the value of the fourth syntax identification information is the first value, determining that the fourth syntax identification information indicates that the current block does not use the linear model chrominance fusion mode;
[0245] If the value of the fourth syntax identification information is the second value, it is determined that the fourth syntax identification information indicates that the current block uses the linear model chrominance fusion mode.
[0246] In another specific implementation, the method may further include:
[0247] If the value of the fifth syntax identification information is the first value, determining that the fifth syntax identification information indicates that the current block uses the single linear model chrominance fusion mode;
[0248] If the value of the fifth syntax identification information is the second value, it is determined that the fifth syntax identification information indicates that the current block uses the multi-linear model chrominance fusion mode.
[0249] In the embodiment of the present application, the first value and the second value are different. Here, the first value and the second value can be in parameter form or in digital form. Specifically, whether the third syntax identification information, the fourth syntax identification information, or the fifth syntax identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0250] In the embodiment of the present application, the first value can be set to 1 and the second value can be set to 0; or the first value can be set to 0 and the second value can be set to 1; or the first value can be set to true and the second value can be set to false; or the first value can be set to false and the second value can be set to true; and this is not specifically limited here. For example, in a specific implementation, the first value can be 0 and the second value can be 1.
[0251] Exemplarily, if the value of the third syntax identification information chromaFusionFlag is 0, the value of the second syntax identification information isChromaFusion is equal to the value of the third syntax identification information chromaFusionFlag, that is, the value of the second syntax identification information isChromaFusion is 0, indicating that the current block does not use the chroma fusion mode.
[0252] For example, if the value of the third syntax identification information chromaFusionFlag is 1 and the value of the fourth syntax identification information chromaFusionType is 0, then the value of the second syntax identification information isChromaFusion is equal to the sum of the third syntax identification information chromaFusionFlag and the fourth syntax identification information chromaFusionType, that is, the value of the second syntax identification information isChromaFusion is 1, indicating that the current block uses the weighted chroma fusion mode.
[0253] Exemplarily, if the value of the third syntax identification information chromaFusionFlag is 1 and the value of the fourth syntax identification information chromaFusionType is 1, then the value of the second syntax identification information isChromaFusion is equal to the sum of the third syntax identification information chromaFusionFlag, the fourth syntax identification information chromaFusionType and the fifth syntax identification information chromaFusionCclm; if the value of the fifth syntax identification information chromaFusionCclm is 0, the value of the second syntax identification information isChromaFusion is 2, indicating that the current block uses a single linear model chroma fusion mode; if the value of the fifth syntax identification information chromaFusionCclm is 1, the value of the second syntax identification information isChromaFusion is 3, indicating that the current block uses a multi-linear model chroma fusion mode.
[0254] Furthermore, in some embodiments, the method may also include: decoding the code stream, determining the value of the sixth syntax identification information; if the sixth syntax identification information indicates that the current block uses a non-cross-component prediction mode, continuing to perform the step of determining the mode enable information of the current block.
[0255] It should be noted that in the embodiments of the present application, the chroma fusion mode is used as a supplementary solution to the non-cross-component prediction mode. If the current block uses the non-cross-component prediction mode, it is necessary to further determine whether the current block uses the chroma fusion mode and whether the current block enables the chroma fusion derivation mode, and then determine whether the cross-component prediction mode needs to be merged with the non-cross-component prediction mode.
[0256] Furthermore, in some embodiments, the method may also include: decoding the code stream, determining the value of the seventh syntax identification information; if the seventh syntax identification information indicates that the current block uses the cross-component prediction mode, continuing to perform the step of determining the mode enable information of the current block.
[0257] It should be noted that in the embodiments of the present application, the chroma fusion mode can also be used as a supplementary solution to the cross-component prediction mode. If the current block uses the cross-component prediction mode, it is necessary to further determine whether the current block uses the chroma fusion mode and whether the current block enables the chroma fusion derivation mode, and then determine whether the cross-component prediction mode needs to be merged with the non-cross-component prediction mode.
[0258] Furthermore, for the sixth grammar identification information, the method may further include:
[0259] If the value of the sixth syntax identification information is the first value, determining that the sixth syntax identification information indicates that the current block does not use the non-inter-component prediction mode;
[0260] If the value of the sixth syntax identification information is the second value, it is determined that the sixth syntax identification information indicates that the current block uses a non-inter-component prediction mode.
[0261] Furthermore, for the seventh grammar identification information, the method may further include:
[0262] If the value of the seventh syntax identification information is the first value, determining that the seventh syntax identification information indicates that the current block does not use the cross-component prediction mode;
[0263] If the value of the seventh syntax identification information is the second value, it is determined that the seventh syntax identification information indicates that the current block uses the inter-component prediction mode.
[0264] It should be noted that in the embodiment of the present application, the first value and the second value are different. Here, the first value and the second value can be in parameter form or in digital form. Specifically, the sixth syntax identification information or the seventh syntax identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0265] It should also be noted that in the embodiment of the present application, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can also be set to true and the second value can also be set to false; or, the first value can be set to false and the second value can be set to true; no specific limitation is made here.
[0266] In a specific implementation, the first value may be 0, and the second value may be 1. That is, when the chroma fusion mode is used as a supplementary scheme for the non-cross-component prediction mode, if the value of the decoded sixth syntax identification information is 1, it can be determined that the current block uses the non-cross-component prediction mode, and the step of determining the mode enable information of the current block is then continued, that is, whether the current block uses the chroma fusion mode and whether the current block enables the chroma fusion derivation mode. Alternatively, when the chroma fusion mode is used as a supplementary scheme for the cross-component prediction mode, if the value of the decoded seventh syntax identification information is 1, it can be determined that the current block uses the cross-component prediction mode, and the step of determining the mode enable information of the current block is then continued, that is, whether the current block uses the chroma fusion mode and whether the current block enables the chroma fusion derivation mode.
[0267] In addition, in the embodiments of the present application, the present technical solution can be used not only in the chroma fusion derivation mode, but also in the cross-component derivation mode. In some embodiments, referring to FIG10 , the method may include:
[0268] S1001: Determine mode enabling information of the current block.
[0269] S1002: If the mode enabling information indicates that the cross-component derivation mode is enabled for the current block, decode the code stream and determine the value of the eighth syntax identification information.
[0270] S1003: If the eighth syntax identification information indicates that the current block uses the cross-component derivation mode, decode the code stream and determine the index identification value of the current block.
[0271] S1004: Construct a parameter candidate list of the current block, and determine the model parameters of the current block according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0272] It should be noted that, in the embodiment of the present application, determining the mode enable information of the current block may include determining an enable signal for the current block based on information about neighboring blocks of the current block. The enable signal here is the mode enable information of the current block. The enable signal may be determined not only based on neighboring block information but also based on other information to determine whether the cross-component derivation mode is enabled for the current block.
[0273] It should also be noted that, in the embodiment of the present application, the adjacent block information may include adjacent block mode information, and the enabling signal is determined based on the adjacent block mode information. The specific process can be found in the aforementioned content. Furthermore, the construction and inheritance rules of the parameter candidate list can also be found in the aforementioned content and will not be further described here.
[0274] It should also be noted that in this embodiment of the present application, the enable signal does not need to be written into the bitstream. When the current block is in cross-component prediction mode, the mode information of the adjacent blocks can be used to adaptively determine whether the current block is in cross-component derivation mode. Only when the current block is in cross-component derivation mode is the value of the eighth syntax identification information decoded. This adaptive determination scheme can effectively avoid additional bit overhead, thereby improving encoding and decoding efficiency.
[0275] In some embodiments, for the eighth grammar identification information, the method may further include:
[0276] If the value of the eighth syntax identification information is the first value, determining that the eighth syntax identification information indicates that the current block does not use the cross-component derivation mode;
[0277] If the value of the eighth syntax identification information is the second value, it is determined that the eighth syntax identification information indicates that the current block uses the cross-component derivation mode.
[0278] It should be noted that in the embodiment of the present application, the first value and the second value are different. Here, the first value and the second value can be in parameter form or in digital form. Specifically, the eighth syntax identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0279] In a specific implementation, the first value may be 0, and the second value may be 1. That is, when the mode enable information indicates that the cross-component derivation mode is not enabled for the current block, the value of the eighth syntax identification information is no longer decoded, but the model parameters of the current block are directly calculated according to the existing technical solution, specifically, the model parameters of the current block are determined based on the reference pixels of the current block. When the mode enable information indicates that the cross-component derivation mode is enabled for the current block, the value of the eighth syntax identification information needs to be decoded. When the value of the eighth syntax identification information is 1, the index identification value of the current block is further decoded to determine the model parameters of the current block.
[0280] This embodiment provides a decoding method, which first determines the mode enable information of the current block; if the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, then decodes the bitstream and determines the value of the first syntax identifier; if the first syntax identifier indicates that the current block uses the chroma fusion derivation mode, then decodes the bitstream and determines the index identifier value of the current block; then constructs a parameter candidate list for the current block, and determines the model parameters of the current block based on the parameter candidate list and the index identifier value; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode. In this way, when the current block uses the weighted chroma fusion mode, considering the usage rate of the chroma fusion derivation mode, a judgment is added here as to whether the current block enables the chroma fusion derivation mode. Only when the current block enables the chroma fusion derivation mode is it necessary to decode the value of the first syntax identifier information; thereby effectively saving codewords, avoiding the additional bit overhead caused by the first syntax identifier information, and thus improving encoding and decoding efficiency.
[0281] In another embodiment of the present application, referring to FIG11 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. As shown in FIG11 , the method may include:
[0282] S1101: Determine mode enabling information of the current block.
[0283] S1102: If the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, determine the value of the first syntax identification information.
[0284] It should be noted that the encoding method of the embodiment of the present application is applied to an encoder. Furthermore, the encoding method may specifically refer to a chroma prediction method. Within the chroma prediction mode, this primarily addresses technical improvements to a chroma fusion mode. More specifically, it may provide a derivation mode for the cross-component prediction portion of the chroma fusion mode. To avoid the bit overhead associated with the low utilization of this technology, a determination is added regarding whether the chroma fusion derivation mode is enabled for the current block.
[0285] It should also be noted that, in the embodiment of the present application, the mode enable information can be used to determine whether the current block uses the weighted chroma fusion mode and whether the current block enables the chroma fusion derivation mode. Only when the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, is it necessary to determine the value of the first syntax identification information. The first syntax identification information is used to indicate whether the current block uses the chroma fusion derivation mode. That is, if the chroma fusion derivation mode needs to be enabled in the current situation, then it is necessary to further determine whether the current block uses the chroma fusion derivation mode.
[0286] In some embodiments, determining the mode enabling information of the current block may include:
[0287] Determining a value of the second syntax identification information;
[0288] If the second syntax identification information indicates that the current block uses the weighted chroma fusion mode, an enable signal of the current block is determined; wherein the enable signal is used to indicate whether the current block enables the chroma fusion derivation mode.
[0289] It should be noted that in the embodiment of the present application, the second syntax identification information is used to indicate whether the current block uses the weighted chroma fusion mode, and the second syntax identification information can be represented by isChromaFusion. In addition, different values of the second syntax identification information will indicate different modes.
[0290] In some embodiments, determining the value of the second grammar identification information may include:
[0291] If the current block does not use the chroma fusion mode, determining that the value of the second syntax identification information is the first value;
[0292] If the current block uses the weighted chroma fusion mode, determining that the value of the second syntax identification information is a second value;
[0293] If the current block uses the single linear model chrominance fusion mode, determining that the value of the second syntax identification information is a third value;
[0294] If the current block uses the multi-linear model chrominance fusion mode, the value of the second syntax identification information is determined to be a fourth value.
[0295] In an embodiment of the present application, the first value, the second value, the third value, and the fourth value are different. Here, the first value, the second value, the third value, and the fourth value can be in parameter form or in digital form. Specifically, the second syntax identification information here can be a parameter written in the profile or a flag value, which is not specifically limited here. For example, in a specific implementation, the first value can be 0, the second value can be 1, the third value can be 2, and the fourth value can be 3.
[0296] That is, in the embodiment of the present application, if the current block does not use the chroma fusion mode, the value of the second syntax identification information can be determined to be 0; if the current block uses the weighted chroma fusion mode, the value of the second syntax identification information can be determined to be 1; if the current block uses the linear model chroma fusion mode, the value of the second syntax identification information can be determined to be 2 or 3. Among them, if the current block uses the single linear model chroma fusion mode, the value of the second syntax identification information can be determined to be 2; if the current block uses the multi-linear model chroma fusion mode, the value of the second syntax identification information can be determined to be 3.
[0297] Furthermore, in some embodiments, the method may further include: encoding the value of the second syntax identification information, and writing the obtained coded bits into the bitstream.
[0298] It should be noted that, in an embodiment of the present application, the encoding end writes the value of the second syntax identification information into the bitstream, so that the decoding end can directly determine the value of the second syntax identification information by decoding the bitstream, and then determine whether the current block uses the weighted chroma fusion mode.
[0299] It should also be noted that, in the embodiment of the present application, for the mode enable information of the current block, if the value of isChroma Fusion is 1, that is, the current block uses the weighted chroma fusion mode, then it is necessary to further determine the enable signal of the current block, wherein the enable signal can be represented by hasChromaFusionFlag(). Only when the enable signal indicates that the current block enables the chroma fusion derivation mode, it is necessary to determine the value of the first syntax identification information; otherwise, if the enable signal indicates that the current block does not enable the chroma fusion derivation mode, then it is no longer necessary to determine the value of the first syntax identification information.
[0300] In some embodiments, determining the enable signal of the current block may include: determining the enable signal of the current block according to neighboring block information of the current block.
[0301] In an embodiment of the present application, the enable signal can be determined based on the adjacent block information of the current block, or the enable signal can be determined based on some other information to determine whether the current block enables the chroma fusion derivation mode, which is not specifically limited here.
[0302] Further, taking the adjacent block information of the current block as an example, in some embodiments, determining the enable signal of the current block based on the adjacent block information of the current block may include: determining the pattern information of the adjacent blocks of the current block; and determining the enable signal of the current block based on the pattern information of the adjacent blocks.
[0303] Here, the neighboring blocks may include at least one of the following: at least one left neighboring block located on the left side of the current block, and at least one upper neighboring block located on the upper side of the current block.
[0304] That is, in the embodiment of the present application, the number of adjacent blocks can be 2, or 3, 4, 5, etc., and is not specifically limited here. In addition, among these adjacent blocks, there can be 2 left adjacent blocks and 1 upper adjacent block; or, there can be 1 left adjacent block and 2 upper adjacent blocks; or, there can be 2 left adjacent blocks and 2 upper adjacent blocks, etc.; and the number of left adjacent blocks and upper adjacent blocks can be the same or different, and is not specifically limited here.
[0305] In a specific implementation, there is one left-adjacent block and one right-adjacent block. For example, using FIG5 as an example, the left-adjacent block is block A1 and the top-adjacent block is block B1. Thus, the enable signal for the current block can be determined based on the mode information of blocks A1 and B1.
[0306] In some embodiments, determining the enable signal of the current block based on the mode information of the neighboring blocks may include:
[0307] If at least one of the mode information of the neighboring blocks is a non-inter-component prediction mode, determining that the enable signal is a first value;
[0308] If all the mode information of the neighboring blocks are cross-component prediction modes, the enable signal is determined to be the second value.
[0309] In some embodiments, determining the enable signal of the current block based on the mode information of the neighboring blocks may include:
[0310] If all the mode information of the neighboring blocks are non-inter-component prediction modes, determining that the enable signal is a first value;
[0311] If at least one of the mode information of the neighboring blocks is an inter-component prediction mode, the enable signal is determined to be a second value.
[0312] It should be noted that, in the embodiment of the present application, the mode information of the adjacent blocks can be a cross-component prediction mode or a non-cross-component prediction mode. Taking the adjacent blocks A1 and B1 as an example, the mode information of the adjacent blocks can exist in the following four situations:
[0313] (1) The A1 block is in non-cross-component prediction mode, and the B1 block is in non-cross-component prediction mode.
[0314] (2) The A1 block is in non-inter-component prediction mode, and the B1 block is in inter-component prediction mode.
[0315] (3) The A1 block is in cross-component prediction mode, and the B1 block is in non-cross-component prediction mode.
[0316] (4) The A1 block is in cross-component prediction mode, and the B1 block is in cross-component prediction mode.
[0317] Thus, in an embodiment of the present application, for the enable signal, in a specific implementation method, if at least one of the mode information of the adjacent blocks is a non-cross-component prediction mode, that is, the above-mentioned situation (1) or (2) or (3) is satisfied, then the enable signal can be a first value; if all of the mode information of the adjacent blocks is a cross-component prediction mode, that is, the above-mentioned situation (4) is satisfied, then the enable signal can be a second value.
[0318] For the enable signal, in another specific implementation, if all the mode information of the adjacent blocks is a non-cross-component prediction mode, that is, the above-mentioned situation (1) is satisfied, then the enable signal can be a first value; if at least one of the mode information of the adjacent blocks is a cross-component prediction mode, that is, the above-mentioned situation (2) or (3) or (4) is satisfied, then the enable signal can be a second value.
[0319] Furthermore, in some embodiments, the method may further include:
[0320] If the enable signal is the first value, it is determined that the chroma fusion derivation mode is not enabled for the current block;
[0321] If the enable signal is the second value, it is determined that the chroma fusion derivation mode is enabled for the current block.
[0322] It should be noted that in the embodiments of the present application, the first value and the second value are different. Here, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can be set to true and the second value can be set to false; or, the first value can be set to false and the second value can be set to true; and this is not specifically limited here. For example, in a specific implementation, the first value can be 0 and the second value can be 1.
[0323] It should also be noted that, in the embodiment of the present application, the enable signal can be represented by hasChromaFusionFlag(). Among them, hasChromaFusionFlag() does not need to be written into the code stream, and accordingly, the decoding end does not need to determine the value of hasChromaFusionFlag() by decoding the code stream. Exemplarily, if the mode information of the adjacent blocks meets the above situation (1) or (2) or (3), that is, at least one is a non-cross-component prediction mode, then the returned enable signal can be 0; if the mode information of the adjacent blocks meets the above situation (4), that is, all are cross-component prediction modes, then the returned enable signal can be 1. Alternatively, if the mode information of the adjacent blocks meets the above situation (1), that is, all are non-cross-component prediction modes, then the returned enable signal can be 0; if the mode information of the adjacent blocks meets the above situation (2) or (3) or (4), that is, at least one is a cross-component prediction mode, then the returned enable signal can be 1.
[0324] In some embodiments, the method may further include: if the mode enable information indicates that the current block uses a weighted chroma fusion mode and the current block does not enable a chroma fusion derivation mode, determining the model parameters of the current block based on the reference pixels of the current block; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0325] Furthermore, in some embodiments, the method may further include: if the value of the second syntax identification information is the second value and the enable signal is the first value, determining that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion derivation mode;
[0326] If the value of the second syntax identification information is the second value and the enable signal is the second value, it is determined that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode.
[0327] That is to say, in an embodiment of the present application, if the value of isChromaFusion is 1 and hasChromaFusion Flag() is 0, then it can be determined that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion export mode. At this time, there is no need to determine the value of the first syntax identification information, and the model parameters of the current block are directly determined based on the reference pixels of the current block; otherwise, if the value of isChromaFusion is 1 and hasChromaFusion Flag() is also 1, then it can be determined that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion export mode. At this time, it is necessary to continue to determine the value of the first syntax identification information, and subsequently it is necessary to construct a parameter candidate list to determine the model parameters of the current block.
[0328] Furthermore, in some embodiments, for the value of the first syntax identification information, the method may further include:
[0329] If the current block does not use the chroma fusion derivation mode, determining that the value of the first syntax identification information is a first value;
[0330] If the current block uses the chroma fusion derivation mode, the value of the first syntax identification information is determined to be the second value.
[0331] In the embodiment of the present application, the first value and the second value are different. Here, the first value and the second value can be in parameter form or in digital form. Specifically, the first syntax identification information here can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0332] In an embodiment of the present application, the first syntax identification information can be represented by chromaFusionMrgFlag. The first value can be set to 1, and the second value can be set to 0; or, the first value can be set to 0, and the second value can be set to 1; or, the first value can be set to true, and the second value can be set to false; or, the first value can be set to false, and the second value can be set to true; and there is no specific limitation here. For example, in a specific implementation, the first value can be 0, and the second value can be 1.
[0333] That is to say, in an embodiment of the present application, taking the first syntax identification information as a flag as an example, if the current block does not use the chroma fusion export mode, then it can be determined that the value of chromaFusionMrgFlag is 0; if the current block uses the chroma fusion export mode, then it can be determined that the value of chromaFusionMrgFlag is 1.
[0334] In some embodiments, the method may further include: encoding the value of the first syntax identification information, and writing the obtained encoded bits into the bitstream.
[0335] Furthermore, in some embodiments, the method may further include: encoding the value of the first syntax identification information based on the context model, and writing the obtained coded bits into the bitstream.
[0336] In an embodiment of the present application, the first syntax identification information chromaFusionMrgFlag can be written into the bitstream in a context model encoding manner. In a specific implementation manner, the method may further include: determining a context model based on information about adjacent blocks of the current block.
[0337] In the embodiment of the present application, the neighboring block information of the current block may refer to information such as whether the neighboring block is in cross-component prediction mode. That is, in the weighted chroma fusion mode, different context models can be constructed for encoding the first syntax flag information chromaFusionMrgFlag based on information such as whether the neighboring block is in cross-component prediction mode.
[0338] In this way, in cross-component model derivation technology, if the chroma fusion derivation mode is not used frequently, the chroma fusion derivation mode can be adaptively determined based on information from adjacent blocks. Only when chroma fusion derivation mode is enabled for the current block is the value of the first syntax identifier further determined and written into the bitstream. This way, at the decoder, the value of the first syntax identifier only needs to be decoded if chroma fusion derivation mode is enabled for the current block. This effectively saves codewords and improves encoding and decoding efficiency.
[0339] S1103: If the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, construct a parameter candidate list for the current block.
[0340] It should be noted that, in an embodiment of the present application, if the value of the first syntax identification information is 1, that is, the first syntax identification information is used to indicate that the current block uses the chroma fusion derivation mode, then it is necessary to construct a parameter candidate list for the current block; otherwise, if the value of the first syntax identification information is 0, that is, the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode, then it is no longer necessary to construct a parameter candidate list for the current block.
[0341] In some embodiments, constructing a parameter candidate list for the current block may include: determining adjacent blocks of the current block; if at least one of the adjacent blocks uses a cross-component prediction mode, determining the model parameters of the at least one block to obtain at least one set of first candidate model parameters; and filling the at least one set of first candidate model parameters into the parameter candidate list.
[0342] It should be noted that, in the embodiment of the present application, adjacent blocks may include: blocks that are spatially adjacent to the current block, and / or blocks that are temporally adjacent to the current block. That is, the adjacent blocks here may be spatially adjacent blocks, or they may be temporally adjacent blocks. Among them, the spatially adjacent blocks are located in the same frame as the current block, and the temporally adjacent blocks are located in different frames from the current block. For example, in the case of inter-frame prediction, the adjacent blocks at this time may refer to temporally adjacent blocks located on the reference frame.
[0343] It should also be noted that, taking spatial adjacency as an example, the positions of adjacent blocks of the current block can be as shown in Figure 4, and the inspection order can be B1->A1->B0->A0->B2, and then at least one set of first candidate model parameters is determined in this order.
[0344] Furthermore, after filling at least one group of first candidate model parameters into the parameter candidate list, if the parameter candidate list is in an unfilled state, then in some embodiments, constructing the parameter candidate list for the current block may also include: determining the non-adjacent blocks of the current block; if at least one block in the non-adjacent blocks uses a cross-component prediction mode, determining the model parameters of at least one block to obtain at least one group of second candidate model parameters; and continuing to fill at least one group of second candidate model parameters into the parameter candidate list.
[0345] It should also be noted that in this embodiment of the present application, the number of candidates in the parameter candidate list is represented by NUM_LMC_MERGE_CANDS. By default, the value of NUM_LMC_MERGE_CANDS is set to 6. If the number of first candidate model parameters is less than 6, it indicates that the parameter candidate list is not full; in this case, it is necessary to determine at least one set of second candidate model parameters based on the non-adjacent blocks of the current block, and then continue to fill the at least one set of second candidate model parameters into the parameter candidate list. For example, the spatial non-adjacent block positions of the current block can be shown in Figure 5.
[0346] Furthermore, after filling at least one set of second candidate model parameters into the parameter candidate list, if the parameter candidate list is in an unfilled state, then in some embodiments, constructing the parameter candidate list of the current block may also include: determining at least one set of third candidate model parameters based on preset parameter information; and continuing to fill at least one set of third candidate model parameters into the parameter candidate list.
[0347] It should be noted that, in the embodiment of the present application, the preset parameter information may include at least a preset value of the first model parameter, and the preset value of the first model parameter is at least one of the following: 0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8.
[0348] It should also be noted that, in an embodiment of the present application, the first model parameter can be used to indicate the scaling parameter when the current block uses the cross-component prediction mode. That is to say, after constructing the parameter candidate list based on the adjacent blocks and non-adjacent blocks of the current block, if the constructed parameter candidate list is not in a filled state, then a CCLM candidate with a default scaling parameter can be considered. Among them, the default scaling parameter can be {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8}. It should be noted that for these default scaling parameters, they can be added to the parameter candidate list in the order of 0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, and 3 / 8.
[0349] In this way, the construction of the parameter candidate list can be completed, and the parameter candidate list includes NUM_LMC_MERGE_CANDS groups of candidate model parameters, where NUM_LMC_MERGE_CANDS represents the number of candidates included in the parameter candidate list.
[0350] S1104: Determine model parameters of the current block according to the parameter candidate list; wherein the model parameters are used to determine a first prediction value of the current block based on the cross-component prediction mode.
[0351] It should be noted that, in the embodiment of the present application, after the parameter candidate list is constructed, the model parameters of the current block can be determined according to the parameter candidate list. Here, the model parameters of the current block may include a first model parameter and a second model parameter. The first model parameter may be used to indicate a scaling parameter when the current block uses a cross-component prediction mode, and the second model parameter may be used to indicate an offset parameter when the current block uses a cross-component prediction mode.
[0352] In some embodiments, determining the model parameters of the current block according to the parameter candidate list may include:
[0353] Performing cost calculation on at least two groups of candidate model parameters in the parameter candidate list to determine respective cost values of the at least two groups of candidate model parameters;
[0354] A minimum cost value is determined from respective cost values of at least two groups of candidate model parameters, and model parameters of the current block are determined based on the group of candidate model parameters corresponding to the minimum cost value.
[0355] It should also be noted that in the embodiment of the present application, cost calculation is performed separately for at least two groups of candidate model parameters in the parameter candidate list. The cost here can refer to the distortion value, the rate-distortion cost value, or other cost values, which are not specifically limited here.
[0356] For example, taking rate-distortion cost as an example, after determining the cost values of at least two groups of candidate model parameters, the minimum cost value can be selected, and then the model parameters of the current block can be further determined based on the group of candidate model parameters corresponding to the minimum cost value.
[0357] Furthermore, in some embodiments, referring to FIG. 12 , after step S1103 , the method may further include:
[0358] S1201: Determine the index identification value of the current block according to the parameter candidate list; wherein the index identification value is used to indicate the index number of a group of candidate model parameters corresponding to the minimum cost value in the parameter candidate list.
[0359] S1202: Encode the value of the first syntax identification information and the index identification value, and write the obtained coded bits into the bitstream.
[0360] It should be noted that, in an embodiment of the present application, when determining the model parameters of the current block based on a set of candidate model parameters corresponding to the minimum cost value, it is also necessary to determine the index identification value of the current block, wherein the index identification value is used to indicate the index number of the set of candidate model parameters corresponding to the minimum cost value in the parameter candidate list, that is, the position in the parameter candidate list; and the index identification value is encoded, and the obtained encoded bits are written into the bitstream.
[0361] Furthermore, in some embodiments, for the index identification value of the current block, the method may further include: encoding the index identification value based on a truncated binary code method, and writing the obtained encoded bits into the bitstream.
[0362] That is, in this embodiment of the present application, the index identification value can be represented by chromaFusionMrgIdx. Here, the index identification value chromaFusionMrgIdx can be encoded using a truncated binary code and can be shared by the two chroma channels Cb / Cr. The correspondence between its value and the binary code (binary data) is shown in the aforementioned Table 6. In addition, during the encoding process, each bin in the index identification value chromaFusionMrgIdx is context-encoded using separate context information.
[0363] In this way, after the encoder determines the index identification value of the current block and writes it into the bitstream, the decoder can directly determine the index identification value of the current block by decoding the bitstream, and then determine the corresponding model parameters in combination with the constructed parameter candidate list.
[0364] It can be understood that in the embodiments of the present application, for the model parameters of the current block, in some embodiments, determining the model parameters of the current block based on a set of candidate model parameters corresponding to the minimum cost value may include: determining the inheritance mode of the current block and the corresponding candidate model parameters based on a set of candidate mode parameters corresponding to the minimum cost value; determining the model parameters of the current block based on the inheritance mode and candidate model parameters of the current block.
[0365] It should be noted that, in the embodiment of the present application, the cross-component prediction mode may include at least one of the following: CCLM mode, MMLM mode, CCCM mode, GLM mode, chroma fusion mode, and CCMerge mode. In other words, the inherited mode here may be any cross-component prediction mode among CCLM mode, MMLM mode, CCCM mode, GLM mode, chroma fusion mode, and CCMerge mode, and is not specifically limited to this.
[0366] Furthermore, in some embodiments, determining the model parameters of the current block according to the inheritance mode of the current block and the candidate model parameters may include:
[0367] If the inheritance mode of the current block is the CCLM mode, determining that the current block inherits the first model parameter among the candidate model parameters;
[0368] If the inheritance mode of the current block is the MMLM mode, determining the first model parameter and the classification threshold among the candidate model parameters inherited by the current block;
[0369] If the inheritance mode of the current block is the CCCM mode, determining the convolution parameters and classification thresholds among the candidate model parameters inherited by the current block;
[0370] If the inheritance mode of the current block is the GLM mode, then when the GLM mode is the three-parameter mode, determine that the current block inherits the gradient index value, the first model parameter, and the second model parameter in the candidate model parameters; or, when the GLM mode is the two-parameter mode, determine that the current block inherits the first model parameter in the candidate model parameters;
[0371] If the inheritance mode of the current block is the chroma fusion mode, then when the chroma fusion mode is the chroma fusion derivation mode, determining the prediction mode inherited by the current block, and determining the model parameters of the current block according to the prediction mode inherited by the current block and the candidate model parameters; or, when the chroma fusion mode is not the chroma fusion derivation mode, determining that the current block uses the MMLM mode, and determining that the current block inherits the first model parameter and the classification threshold among the candidate model parameters;
[0372] If the inheritance mode of the current block is the CCMerge mode, the prediction mode inherited by the current block is determined, and the model parameters of the current block are determined according to the prediction mode inherited by the current block and the candidate model parameters.
[0373] Specifically, in the embodiment of the present application, a cross-component model parameter source is added, which can provide multiple options for the cross-component prediction mode. The inheritance rule can be as follows:
[0374] 1) When inheriting CCLM mode, only the scaling parameters are inherited and the offset parameters are recalculated.
[0375] 2) When inheriting the MMLM mode, the scaling parameters and classification thresholds are inherited, and the offset parameters are recalculated; however, if there are no adjacent reconstructed samples available in the classification, the offset parameters are also inherited directly.
[0376] 3) When inheriting CCCM mode, all convolution parameters and classification thresholds are inherited.
[0377] 4) When inheriting the GLM mode, if the GLM is in 3-parameter mode, all gradient indices and model parameters are inherited; otherwise, if the GLM is in 2-parameter mode, only the scaling parameters are inherited, and the offset parameters need to be recalculated.
[0378] 5) When inheriting the chroma fusion mode,
[0379] If the chroma fusion derivation mode is not used, the MMLM parameters derived from the cross-component prediction part are inherited as candidates;
[0380] If it is a chroma fusion export mode, the inheritance method depends on the candidate mode it inherits.
[0381] 6) When inheriting the CCMerge mode, the inheritance method depends on the candidate mode it inherits.
[0382] It should also be noted that, in the embodiments of the present application, regarding the size and construction process of the parameter candidate list, the rules of the cross-component derivation mode can be shared, or an independent set of rules can be used instead of sharing the rules of the cross-component derivation mode, which is not specifically limited here. In this way, if the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, then the model parameters of the current block can be determined based on the constructed parameter candidate list and the above-mentioned inheritance rules.
[0383] It can also be understood that in an embodiment of the present application, if the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode, then in some embodiments, the method may also include: if the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode, then determining the model parameters of the current block based on the reference pixels of the current block; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0384] That is to say, in an embodiment of the present application, if the value of the first syntax identification information chromaFusionMrgFlag is 0, that is, the current block does not use the chroma fusion derivation mode, then there is no need to construct a parameter candidate list and determine the index identification value of the current block; at this time, the model parameters of the current block can be calculated according to the existing technical solution, and used to generate a chroma prediction value based on the cross-component prediction mode.
[0385] In some embodiments, the method may further include: determining a reference pixel of the current block based on an adjacent area of the current block; wherein the adjacent area of the current block includes at least one of the following: an adjacent area on the left side of the current block and an adjacent area on the top side of the current block.
[0386] It should be noted that, in an embodiment of the present application, the reference pixels of the current block may be obtained based on the left adjacent area of the current block, i.e., CCLM-L mode, in which case only the left adjacent area of the current block is used to calculate the model parameters; or, the reference pixels of the current block may be obtained based on the upper adjacent area of the current block, i.e., CCLM-T mode, in which case only the upper adjacent area of the current block is used to calculate the model parameters; or, the reference pixels of the current block may be obtained based on the left adjacent area and the upper adjacent area of the current block, i.e., CCLM-LT mode, in which case the left adjacent area and the upper adjacent area of the current block are jointly used to calculate the model parameters; no specific limitation is made here.
[0387] It should also be noted that, in the embodiments of the present application, determining the reference pixel of the current block based on the adjacent area of the current block may be performed by filtering the pixels in the adjacent area to determine the reference pixel. In some embodiments, the filtering of the pixels in the adjacent area may be performed based on the pixel positions or the color component intensities, thereby determining the reference pixel of the current block based on the filtered pixels.
[0388] Specifically, in an embodiment of the present application, a first reference pixel set is formed based on pixels in an adjacent area of the current block; the first reference pixel set can then be screened to determine the reference pixel. Here, the number of reference pixels can be N, where N is an integer greater than zero. In other words, N reference pixels can be selected from the pixels in the adjacent area. The value of N can generally be 4, but this is not a specific limitation.
[0389] It should also be noted that in an embodiment of the present application, among the pixels in the adjacent area of the current block, there may be some unimportant pixels (for example, these pixels have poor correlation) or some abnormal pixels. In order to ensure the accuracy of the prediction, these pixels need to be eliminated in order to obtain valid reference pixels.
[0390] In some embodiments, determining the model parameters of the current block based on the reference pixels of the current block may include:
[0391] Determining a reconstructed luminance value and a reconstructed chrominance value of a reference pixel;
[0392] The model parameters are calculated based on the reconstructed luminance value and the reconstructed chrominance value to obtain the model parameters of the current block.
[0393] For example, if the current block does not use the chroma fusion derivation mode, then for the derivation of model parameters, a method for derivation of model parameters based on least squares regression construction is provided. Specifically, the parameters can be derived by minimizing the regression error of the reconstructed luminance value and the reconstructed chroma value of the reference pixels around the current block, as shown in the following formulas:
[0394] Wherein, L(n) represents the reconstructed luminance value of the reference pixel corresponding to the downsampled left adjacent area and the upper adjacent area, C(n) represents the reconstructed chrominance value of the reference pixel corresponding to the left adjacent area and the upper adjacent area, and N is the number of reference pixels.
[0395] Furthermore, in an embodiment of the present application, after the model parameters of the current block are determined according to the above-mentioned implementation method, the target prediction value of the current block can be further determined.
[0396] In an embodiment of the present application, if the value of the second syntax identification information isChromaFusion is 1, that is, the second syntax identification information indicates that the current block uses the weighted chroma fusion mode, then it is necessary to combine the cross-component prediction mode and the non-cross-component prediction mode to determine the target prediction value of the current block. In some embodiments, the method may further include:
[0397] determining a first prediction value of a current block based on an inter-component prediction mode;
[0398] determining a second prediction value of the current block based on a non-inter-component prediction mode;
[0399] A target prediction value of the current block is determined according to the first prediction value and the second prediction value.
[0400] It should be noted that in the embodiment of the present application, the first prediction value can be obtained by performing chrominance prediction using a cross-component prediction mode based on the determined model parameters. For example, the cross-component prediction mode here can be a CCLM mode, an MMLM mode, a CCCM mode, etc., which is not specifically limited here.
[0401] It should also be noted that in the embodiment of the present application, the second prediction value can be obtained by using a non-cross-component prediction mode for chrominance prediction. For example, the non-cross-component prediction mode here can be a Planar mode, a DC mode, a DIMD mode, etc., which is not specifically limited here.
[0402] Furthermore, in an embodiment of the present application, if the current block uses a weighted chroma fusion mode, then the first prediction value of the cross-component prediction mode and the second prediction value of the non-cross-component prediction mode may be combined to obtain a final target prediction value. Specifically, in some embodiments, determining the target prediction value of the current block based on the first prediction value and the second prediction value may include:
[0403] determining a first shift factor;
[0404] Determining an offset value of the current block according to the first shift factor;
[0405] A target prediction value of the current block is determined according to the offset value, the first prediction value, and the second prediction value.
[0406] It should be noted that, in the embodiment of the present application, the first shift factor can be represented by shift, and illustratively, the value of shift is set to 2. In addition, the offset value of the current block can be set to 1<<(shift-1).
[0407] In a specific implementation, determining the target prediction value of the current block according to the offset value, the first prediction value, and the second prediction value may include: performing a weighted calculation according to the offset value, the first prediction value, and the second prediction value to determine the target prediction value of the current block.
[0408] In a more specific implementation, determining the target prediction value of the current block based on the offset value, the first prediction value and the second prediction value may include: determining a first weighted value and a second weighted value; performing a weighted calculation based on the first weighted value and the first prediction value and the second weighted value and the second prediction value to determine a third prediction value, and determining a fourth prediction value based on the offset value and the third prediction value; performing a shift calculation on the fourth prediction value according to the first shift factor to determine the target prediction value of the current block.
[0409] It should be noted that, in the embodiment of the present application, the first weighted value can be represented by w0, and the second weighted value can be represented by w1. Among them, w0 and w1 can be determined according to the prediction mode of the adjacent block, and w0+w1=4, shift=2. Exemplarily, when the left adjacent block and the upper adjacent block are both cross-component prediction modes, {w0,w1}={1,3}; when the left adjacent block and the upper adjacent block are both non-cross-component prediction modes, {w0,w1}={3,1}; in other cases, {w0,w1}={2,2}.
[0410] For example, pred0 represents the second prediction value of the current block based on the non-cross-component prediction mode, pred1 represents the first prediction value of the current block based on the cross-component prediction mode, and pred is the final target prediction value of the current block. The specific prediction process of this mode is as follows: pred=(w0*pred0+w1*pred1+(1<<(shift-1)))>>shift (9)
[0411] It is also understandable that in the embodiment of the present application, the value of the second syntax identification information may also be determined based on the third syntax identification information, the fourth syntax identification information, and the fifth syntax identification information. The third syntax identification information may be represented by chromaFusionFlag, the fourth syntax identification information may be represented by chromaFusionType, and the fifth syntax identification information may be represented by chromaFusionCclm.
[0412] In some embodiments, determining the value of the second grammar identification information may include:
[0413] Determining a value of the third syntax identification information;
[0414] If the third syntax identification information indicates that the current block uses the chroma fusion mode, determining a value of the fourth syntax identification information;
[0415] If the fourth syntax identification information indicates that the current block does not use the linear model chrominance fusion mode, the value of the second syntax identification information is determined according to the value of the third syntax identification information and the value of the fourth syntax identification information.
[0416] In a possible embodiment, if the third syntax identification information indicates that the current block does not use the chroma fusion mode, the method may further include: setting the value of the second syntax identification information to be equal to the value of the third syntax identification information.
[0417] In a possible embodiment, if the fourth syntax identification information indicates that the current block does not use the linear model chrominance fusion mode, the method may further include: setting the value of the second syntax identification information to be equal to the sum of the value of the third syntax identification information and the value of the fourth syntax identification information.
[0418] In a possible embodiment, if the fourth syntax identification information indicates that the current block uses a linear model chrominance fusion mode, the method may further include: determining the value of the fifth syntax identification information; determining the value of the second syntax identification information based on the value of the third syntax identification information, the value of the fourth syntax identification information and the value of the fifth syntax identification information.
[0419] It should be noted that, in the embodiment of the present application, the value of the second syntax identification information isChromaFusion may be equal to the sum of the third syntax identification information chromaFusionFlag, the fourth syntax identification information chromaFusionType, and the fifth syntax identification information chromaFusionCclm, as shown in the following formula: isChromaFusion = chromaFusionFlag + chromaFusionType + chromaFusionCclm (10)
[0420] It should also be noted that, in the embodiment of the present application, for determining the third grammar identification information, the fourth grammar identification information, and the fifth grammar identification information, in a specific implementation manner, the method may further include:
[0421] If the current block does not use the chroma fusion mode, determining that the value of the third syntax identification information is the first value;
[0422] If the current block uses the chroma fusion mode, the value of the third syntax identification information is determined to be the second value.
[0423] Furthermore, in some embodiments, the method may further include: encoding the value of the third syntax identification information, and writing the obtained coded bits into the bitstream.
[0424] In another specific implementation, the method may further include:
[0425] If the current block does not use the linear model chrominance fusion mode, determining that the value of the fourth syntax identification information is the first value;
[0426] If the current block uses the linear model chrominance fusion mode, the value of the fourth syntax identification information is determined to be the second value.
[0427] Furthermore, in some embodiments, the method may further include: encoding the value of the fourth syntax identification information, and writing the obtained coded bits into the bitstream.
[0428] In another specific implementation, the method may further include:
[0429] If the current block uses the single linear model chrominance fusion mode, determining that the value of the fifth syntax identification information is the first value;
[0430] If the current block uses the multi-linear model chrominance fusion mode, it is determined that the value of the fifth syntax identification information is the second value.
[0431] Furthermore, in some embodiments, the method may further include: encoding the value of the fifth syntax identification information, and writing the obtained coded bits into the bitstream.
[0432] In the embodiment of the present application, the first value and the second value are different. Here, the first value and the second value can be in parameter form or in digital form. Specifically, whether the third syntax identification information, the fourth syntax identification information, or the fifth syntax identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0433] In the embodiment of the present application, the first value can be set to 1 and the second value can be set to 0; or the first value can be set to 0 and the second value can be set to 1; or the first value can be set to true and the second value can be set to false; or the first value can be set to false and the second value can be set to true; and this is not specifically limited here. For example, in a specific implementation, the first value can be 0 and the second value can be 1.
[0434] Exemplarily, if the current block does not use the chroma fusion mode, the value of the third syntax identification information chromaFusion Flag is 0. At this time, the value of the second syntax identification information isChromaFusion is equal to the value of the third syntax identification information chromaFusionFlag, that is, the value of the second syntax identification information isChromaFusion is 0.
[0435] Exemplarily, if the current block uses the weighted chroma fusion mode, the value of the third syntax identification information chroma FusionFlag is 1, and the value of the fourth syntax identification information chromaFusionType is 0. At this time, the value of the second syntax identification information isChromaFusion is equal to the sum of the third syntax identification information chromaFusionFlag and the fourth syntax identification information chromaFusionType, that is, the value of the second syntax identification information isChromaFusion is 1.
[0436] Exemplarily, if the current block uses the single linear model chroma fusion mode, then the value of the third syntax identification information chromaFusionFlag is 1, the value of the fourth syntax identification information chromaFusionType is 1, and the value of the fifth syntax identification information chromaFusionCclm is 0. At this time, the value of the second syntax identification information isChromaFusion is equal to the sum of the third syntax identification information chromaFusionFlag, the fourth syntax identification information chromaFusionType and the fifth syntax identification information chromaFusionCclm, that is, the value of the second syntax identification information isChromaFusion is 2.
[0437] Exemplarily, if the current block uses the multilinear model chroma fusion mode, then the value of the third syntax identification information chromaFusionFlag is 1, the value of the fourth syntax identification information chromaFusionType is 1, and the value of the fifth syntax identification information chromaFusionCclm is 1. At this time, the value of the second syntax identification information isChromaFusion is equal to the sum of the third syntax identification information chromaFusionFlag, the fourth syntax identification information chromaFusionType and the fifth syntax identification information chromaFusionCclm, that is, the value of the second syntax identification information isChromaFusion is 3.
[0438] Furthermore, in some embodiments, the method may further include: determining a value of sixth syntax identification information; if the sixth syntax identification information indicates that the current block uses a non-cross-component prediction mode, continuing to execute the step of determining mode enabling information of the current block.
[0439] It should be noted that in the embodiments of the present application, the chroma fusion mode is used as a supplementary solution to the non-cross-component prediction mode. If the current block uses the non-cross-component prediction mode, it is necessary to further determine whether the current block uses the chroma fusion mode and whether the current block uses the chroma fusion derivation mode, and then determine whether the cross-component prediction mode needs to be fused with the non-cross-component prediction mode.
[0440] Furthermore, in some embodiments, the method may further include: determining a value of seventh syntax identification information; if the seventh syntax identification information indicates that the current block uses an inter-component prediction mode, continuing to execute the step of determining mode enabling information of the current block.
[0441] It should be noted that in the embodiments of the present application, the chroma fusion mode can also be used as a supplementary solution to the cross-component prediction mode. If the current block uses the cross-component prediction mode, it is necessary to further determine whether the current block uses the chroma fusion mode and whether the current block uses the chroma fusion derivation mode, and then determine whether the cross-component prediction mode needs to be merged with the non-cross-component prediction mode.
[0442] Furthermore, for the sixth grammar identification information, the method may further include:
[0443] If the current block does not use the non-inter-component prediction mode, determine that the value of the sixth syntax identification information is the first value;
[0444] If the current block uses a non-inter-component prediction mode, the value of the sixth syntax identification information is determined to be the second value.
[0445] In some embodiments, the method may further include: encoding the value of the sixth syntax identification information, and writing the obtained encoded bits into the bitstream.
[0446] Furthermore, for the seventh grammar identification information, the method may further include:
[0447] If the current block does not use the inter-component prediction mode, determine that the value of the seventh syntax identification information is the first value;
[0448] If the current block uses the inter-component prediction mode, the value of the seventh syntax identification information is determined to be the second value.
[0449] In some embodiments, the method may further include: encoding the value of the seventh syntax identification information, and writing the obtained coded bits into the bitstream.
[0450] It should be noted that in the embodiment of the present application, the first value and the second value are different. Here, the first value and the second value can be in parameter form or in digital form. Specifically, the sixth syntax identification information or the seventh syntax identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0451] It should also be noted that in the embodiment of the present application, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can also be set to true and the second value can also be set to false; or, the first value can be set to false and the second value can be set to true; no specific limitation is made here.
[0452] In a specific implementation, the first value may be 0 and the second value may be 1. That is, when the chroma merge mode is used as a supplementary solution for the non-cross-component prediction mode, the value of the sixth syntax identification information may be written into the bitstream so that the decoder can subsequently determine whether the current block uses the non-cross-component prediction mode by decoding the bitstream. If the value of the sixth syntax identification information is 1, it can be indicated that the current block uses the non-cross-component prediction mode, and the step of determining the mode enable information of the current block, i.e., whether the current block uses the chroma merge mode and whether the chroma merge derivation mode is enabled for the current block, is then continued. Alternatively, when the chroma merge mode is used as a supplementary solution for the cross-component prediction mode, the value of the seventh syntax identification information may be written into the bitstream so that the decoder can subsequently determine whether the current block uses the cross-component prediction mode by decoding the bitstream. If the value of the seventh syntax identification information is 1, it can be indicated that the current block uses the cross-component prediction mode, and the step of determining the mode enable information of the current block, i.e., whether the current block uses the chroma merge mode and whether the chroma merge derivation mode is enabled for the current block, is then continued.
[0453] In addition, in the embodiments of the present application, the present technical solution can be used not only in the chroma fusion derivation mode, but also in the cross-component derivation mode. In some embodiments, the method may further include:
[0454] Determine the mode enable information for the current block;
[0455] If the mode enabling information indicates that the current block enables the cross-component derivation mode, determining a value of the eighth syntax identification information;
[0456] If the eighth syntax identification information indicates that the current block uses the cross-component derivation mode, decoding the code stream to determine the index identification value of the current block;
[0457] A parameter candidate list of the current block is constructed, and model parameters of the current block are determined according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine a first prediction value of the current block based on the cross-component prediction mode.
[0458] It should be noted that, in the embodiment of the present application, determining the mode enable information of the current block may include determining an enable signal for the current block based on information about neighboring blocks of the current block. The enable signal here is the mode enable information of the current block. The enable signal may be determined not only based on neighboring block information but also based on other information to determine whether the cross-component derivation mode is enabled for the current block.
[0459] It should also be noted that, in the embodiment of the present application, the adjacent block information may include adjacent block mode information, and the enabling signal is determined based on the adjacent block mode information. The specific process can be found in the aforementioned content. Furthermore, the construction and inheritance rules of the parameter candidate list can also be found in the aforementioned content and will not be further described here.
[0460] It should also be noted that in the embodiment of the present application, the enable signal here does not need to be written into the bitstream. When the current block is in the cross-component prediction mode, it can be adaptively determined based on the mode information of the adjacent blocks whether the current block enables the cross-component derivation mode; only when the current block enables the cross-component derivation mode, it is necessary to determine the value of the eighth syntax identification information and perform encoding. In this way, the adaptive judgment scheme at the encoding end can effectively avoid additional bit overhead, save codewords, and thus improve encoding efficiency.
[0461] Furthermore, for the eighth grammar identification information, the method may further include:
[0462] If the current block does not use the cross-component derivation mode, determining that the value of the eighth syntax identification information is the first value;
[0463] If the current block uses the cross-component derivation mode, the value of the eighth syntax identification information is determined to be the second value.
[0464] In some embodiments, the method may further include: encoding the value of the eighth syntax identification information, and writing the obtained coded bits into the bitstream.
[0465] It should be noted that in the embodiment of the present application, the first value and the second value are different. Here, the first value and the second value can be in parameter form or in digital form. Specifically, the eighth syntax identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0466] In a specific implementation, the first value may be 0, and the second value may be 1. That is, when the mode enable information indicates that the cross-component derivation mode is not enabled for the current block, the value of the eighth syntax identification information is no longer encoded, but the model parameters of the current block are directly calculated according to the existing technical solution, specifically, the model parameters of the current block are determined based on the reference pixels of the current block. When the mode enable information indicates that the cross-component derivation mode is enabled for the current block, the value of the eighth syntax identification information needs to be encoded, so that when the decoding end decodes the value of the eighth syntax identification information as 1, it needs to further decode the index identification value of the current block, and then determine the model parameters of the current block.
[0467] In an embodiment of the present application, a code stream is further provided. The code stream is generated by bit encoding based on the information to be encoded. The information to be encoded may include at least one of the following:
[0468] The index identifier value of the current block, the value of the first grammar identifier information, the value of the second grammar identifier information, the value of the third grammar identifier information, the value of the fourth grammar identifier information, the value of the fifth grammar identifier information, the value of the sixth grammar identifier information, the value of the seventh grammar identifier information and the value of the eighth grammar identifier information.
[0469] In an embodiment of the present application, the first syntax identification information is used to indicate whether the current block uses a chroma fusion derivation mode, the second syntax identification information is used to indicate whether the current block uses a weighted chroma fusion mode, the third syntax identification information is used to indicate whether the current block uses a chroma fusion mode, the fourth syntax identification information is used to indicate whether the current block uses a linear model chroma fusion mode, the fifth syntax identification information is used to indicate whether the current block uses a single linear model chroma fusion mode or a bilinear model chroma fusion mode, the sixth syntax identification information is used to indicate whether the current block uses a non-cross-component prediction mode, the seventh syntax identification information is used to indicate whether the current block uses a cross-component prediction mode, and the eighth syntax identification information is used to indicate whether the current block uses a cross-component derivation mode.
[0470] In this way, after the encoding end writes the information to be encoded into the bitstream, the decoding end first determines the mode enable information based on the adjacent block information. Only when the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, the value of the first syntax identification information will be determined by decoding the bitstream; then, when the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, the bitstream is further decoded to determine the index identification value of the current block, and then the model parameters of the current block can be determined based on the constructed parameter candidate list.
[0471] This embodiment provides a coding method, which first determines the mode enabling information of the current block; if the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, then determines the value of the first syntax identification information; if the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, then constructs a parameter candidate list of the current block; then determines the model parameters of the current block based on the parameter candidate list; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode. In this way, when the current block uses the weighted chroma fusion mode, considering the usage rate of the chroma fusion derivation mode, a judgment is added here as to whether the current block enables the chroma fusion derivation mode. Only when the current block enables the chroma fusion derivation mode, it is necessary to decode the value of the first syntax identification information at this time; thereby effectively saving codewords, avoiding the extra bit overhead brought by the first syntax identification information, and thus improving the encoding and decoding efficiency.
[0472] In another embodiment of the present application, based on the encoding and decoding method described in the aforementioned embodiment, the embodiment of the present application proposes an adaptive cross-component derivation technology for the derivation mode in the chroma fusion mode. Since the derivation mode of the chroma fusion mode in the related art requires encoding a flag bit chromaFusionMrgFlag at the CU level to indicate whether the current block uses the chroma fusion derivation mode, the embodiment of the present application can determine whether the flag bit of the chroma fusion derivation mode needs to be encoded based on the information of adjacent blocks, thereby selecting to enable or disable the chroma fusion derivation mode during encoding and decoding.
[0473] Specifically, when the isChromaFusion flag of the chroma fusion mode is 1, the chroma fusion mode adopts the weighted chroma fusion mode. Then, the embodiment of the present application determines whether to further use the chroma fusion derivation mode in the weighted chroma fusion mode according to the mode of the adjacent block. The adjacent blocks can include the following four cases:
[0474] (1) The left adjacent block is in non-spanning component mode, and the upper adjacent block is in non-spanning component mode.
[0475] (2) The left adjacent block is in non-cross-component mode, and the right adjacent block is in cross-component mode.
[0476] (3) The left adjacent block is in the cross-component mode, and the right adjacent block is in the non-cross-component mode.
[0477] (4) The left adjacent block is in cross-component mode, and the right adjacent block is in cross-component mode.
[0478] Among them, the cross-component prediction mode can be simply referred to as "cross-component mode", and the non-cross-component prediction mode can be simply referred to as "non-cross-component mode".
[0479] For example, in the reference software ECM, the above-mentioned left adjacent block usually refers to the A1 block in Figure 4, and the upper adjacent block usually refers to the B1 block in Figure 4. Subsequently, only the left adjacent block and the upper adjacent block are used as substitutes, but no specific limitation is made.
[0480] In one implementation, the relevant syntax is shown in Table 7.
[0481] Table 7
[0482] Among them, hasChromaFusionFlag() is used to return a signal indicating whether chroma fusion export mode is enabled based on neighboring block information (this signal is not written to the bitstream). When this signal is 1, the chroma fusion export mode flag is parsed; when this signal is 0, the chroma fusion export mode parsing process is skipped. This solution provides two options for setting this signal value.
[0483] Solution 1: If the adjacent blocks meet the above conditions (1) or (2) or (3), that is, the adjacent blocks are not all in cross-component mode, hasChromaFusionFlag() returns a signal of 0. In this case, there is no need to parse the flag chromaFusionMrgFlag, that is, the chroma fusion export mode is not enabled in the current case. If the adjacent blocks meet the above condition (4), that is, the adjacent blocks are all in cross-component mode, hasChromaFusionFlag() returns a signal of 1. In this case, it is necessary to parse the flag chromaFusionMrgFlag, that is, the chroma fusion export mode is enabled in the current case, and further parse the chroma fusion export mode index to determine the specific inherited parameter model.
[0484] Solution 2: If the adjacent blocks meet the above situation (1), that is, the adjacent blocks are all in non-cross-component mode, hasChromaFusionFlag() returns a signal of 0. At this time, there is no need to parse the flag chromaFusionMrgFlag, that is, the chroma fusion export mode is not enabled in the current situation. If the adjacent blocks meet the above situation (2) or (3) or (4), that is, the adjacent blocks have cross-component mode, hasChromaFusionFlag() returns a signal of 1. At this time, it is necessary to parse the flag chromaFusionMrgFlag, that is, the chroma fusion export mode is enabled in the current situation, and further parse the chroma fusion export mode index to determine the specific inherited parameter model.
[0485] In a specific embodiment, based on the above content, a decoding end embodiment of Solution 1 is as follows:
[0486] The decoder analyzes the chroma fusion mode and finds isChromaFusion to be 1, indicating that the current block uses weighted chroma fusion mode. The decoder then determines if the adjacent blocks use cross-component mode. If the left and upper adjacent blocks of the current block do not all use cross-component mode, the decoder skips analyzing the chroma fusion derivation mode and continues with the subsequent decoding process.
[0487] In another specific embodiment, based on the above content, another decoding end embodiment of Solution 1 is as follows:
[0488] The decoder analyzes the chroma fusion mode and checks if isChromaFusion is 1, indicating that the current block uses weighted chroma fusion mode. It then determines whether the adjacent block uses cross-component mode. If both the left and upper adjacent blocks of the current block use cross-component mode, it continues analyzing the chroma fusion derivation mode flag. Based on the value of this flag, it determines whether to continue analyzing the chroma fusion derivation mode index. The subsequent decoding process is then completed.
[0489] In another specific embodiment, based on the above content, a decoding end embodiment of Solution 2 is as follows:
[0490] The decoder analyzes the chroma fusion mode and finds isChromaFusion to be 1, indicating that the current block uses weighted chroma fusion mode. The decoder then determines whether the adjacent block uses cross-component mode. If neither the left neighbor nor the upper neighbor of the current block uses cross-component mode, the decoder skips analyzing the chroma fusion derivation mode and continues with the subsequent decoding process.
[0491] In another specific embodiment, based on the above content, another decoding end embodiment of Solution 2 is as follows:
[0492] The decoder analyzes the chroma fusion mode and checks if isChromaFusion is 1, indicating that the current block uses weighted chroma fusion mode. The decoder then checks if the adjacent blocks use cross-component mode. If at least one of the left and upper adjacent blocks of the current block uses cross-component mode, the decoder continues to analyze the chroma fusion derivation mode flag. Based on the value of this flag, the decoder determines whether to continue analyzing the chroma fusion derivation mode index. The decoder then completes the subsequent decoding process.
[0493] It should be noted that the adjacent blocks in the above embodiment specifically refer to blocks A1 and B1 in FIG4 , but this is not a specific limitation and may also specifically refer to other adjacent blocks, such as blocks A0 and B0. Furthermore, the adjacent blocks may not be two specific adjacent blocks but may be three or more, and are not specifically limited here.
[0494] Furthermore, in an embodiment of the present application, whether to enable the chroma fusion derivation mode is determined based on some other information. Alternatively, in the weighted chroma fusion mode, different context models are constructed for the coded chroma fusion derivation mode based on information such as whether the adjacent blocks are in cross-component mode. Alternatively, in an embodiment of the present application, the solution of the embodiment of the present application can also be applied to the flag bit of the cross-component derivation mode.
[0495] In other words, in this embodiment of the present application, an adaptive activation scheme for the chroma fusion mode is primarily provided. Under this scheme, when the current block is in weighted chroma fusion mode, the chroma fusion derivation mode can be selected based on information such as whether the adjacent block is in cross-component mode. This adaptive determination scheme effectively avoids additional bit overhead, thereby improving intra-frame prediction efficiency. For example, Table 8 shows the test results of this embodiment of the present application. This demonstrates that this technical solution can improve prediction efficiency, thereby enhancing codec performance.
[0496] Table 8
[0497] In the embodiments of the present application, the specific implementation of the aforementioned embodiments is elaborated in detail through the above embodiments. It can be seen that according to the technical solution of the aforementioned embodiments, due to the cross-component model derivation technology of the related technology, it is necessary to encode a flag bit at the CU level by default to determine whether the current chroma block uses this technology. When the usage rate of this technology is not high, it usually brings additional bit overhead; therefore, by adaptively determining whether to turn on this function based on the adjacent block information, codewords can be effectively saved, thereby improving coding efficiency.
[0498] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see Figure 13, which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in Figure 13, the encoder 130 may include: a first determining unit 1301, wherein:
[0499] The first determining unit 1301 is configured to determine mode enabling information of the current block; and if the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, determine a value of the first syntax identification information;
[0500] The first determination unit 1301 is further configured to construct a parameter candidate list for the current block if the first syntax identification information indicates that the current block uses a chroma fusion derivation mode; and determine the model parameters of the current block based on the parameter candidate list; wherein the model parameters are used to determine a first prediction value of the current block based on a cross-component prediction mode.
[0501] In some embodiments, the first determination unit 1301 is further configured to determine the model parameters of the current block based on the reference pixels of the current block if the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion derivation mode; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0502] In some embodiments, the first determination unit 1301 is further configured to determine the value of the second syntax identification information; and if the second syntax identification information indicates that the current block uses the weighted chroma fusion mode, determine the enable signal of the current block; wherein the enable signal is used to indicate whether the current block enables the chroma fusion derivation mode.
[0503] In some embodiments, the first determining unit 1301 is further configured to determine an enabling signal of the current block according to information of neighboring blocks of the current block.
[0504] In some embodiments, the first determination unit 1301 is further configured to determine the pattern information of the adjacent blocks of the current block; and determine the enable signal of the current block based on the pattern information of the adjacent blocks; wherein the adjacent blocks include at least one of the following: at least one left adjacent block located on the left side of the current block, and at least one upper adjacent block located on the upper side of the current block.
[0505] In some embodiments, the first determination unit 1301 is further configured to determine that the enable signal is a first value if at least one of the mode information of the adjacent blocks is a non-cross-component prediction mode; and to determine that the enable signal is a second value if all of the mode information of the adjacent blocks is a cross-component prediction mode.
[0506] In some embodiments, the first determination unit 1301 is further configured to determine that the enable signal is a first value if all of the mode information of the adjacent blocks is a non-cross-component prediction mode; and to determine that the enable signal is a second value if at least one of the mode information of the adjacent blocks is a cross-component prediction mode.
[0507] In some embodiments, the first determining unit 1301 is further configured to determine that the current block does not enable the chroma fusion derivation mode if the enable signal is a first value; and to determine that the current block enables the chroma fusion derivation mode if the enable signal is a second value.
[0508] In some embodiments, the first determination unit 1301 is further configured to, if the value of the second syntax identification information is the second value and the enable signal is the first value, determine that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion derivation mode; if the value of the second syntax identification information is the second value and the enable signal is the second value, determine that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode.
[0509] In some embodiments, the first determination unit 1301 is further configured to determine the model parameters of the current block based on the reference pixels of the current block if the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0510] In some embodiments, the first determination unit 1301 is further configured to determine the reference pixel of the current block based on the adjacent area of the current block; wherein the adjacent area of the current block includes at least one of the following: the left adjacent area of the current block and the upper adjacent area of the current block.
[0511] In some embodiments, the first determining unit 1301 is further configured to determine a reconstructed luminance value and a reconstructed chrominance value of a reference pixel; and calculate model parameters according to the reconstructed luminance value and the reconstructed chrominance value to obtain model parameters of the current block.
[0512] In some embodiments, the first determination unit 1301 is further configured to determine the adjacent blocks of the current block; if at least one of the adjacent blocks uses a cross-component prediction mode, determine the model parameters of the at least one block to obtain at least one set of first candidate model parameters; and fill at least one set of first candidate model parameters into the parameter candidate list.
[0513] In some embodiments, the neighboring blocks include: blocks that are spatially adjacent to the current block, and / or blocks that are temporally adjacent to the current block.
[0514] In some embodiments, the first determination unit 1301 is further configured to determine the non-adjacent blocks of the current block when the parameter candidate list is in an unfilled state; if at least one block among the non-adjacent blocks uses a cross-component prediction mode, determine the model parameters of the at least one block to obtain at least one set of second candidate model parameters; and continue to fill at least one set of second candidate model parameters into the parameter candidate list.
[0515] In some embodiments, the first determination unit 1301 is further configured to determine at least one set of third candidate model parameters according to preset parameter information when the parameter candidate list is not filled; and continue to fill at least one set of third candidate model parameters into the parameter candidate list.
[0516] In some embodiments, the preset parameter information includes at least a preset value of the first model parameter, and the preset value of the first model parameter is at least one of the following: 0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8.
[0517] In some embodiments, the cross-component prediction mode includes at least one of the following: CCLM mode, MMLM mode, CCCM mode, GLM mode, chroma fusion mode, and CCMerge mode.
[0518] In some embodiments, the first determination unit 1301 is further configured to perform cost calculation on at least two groups of candidate model parameters in the parameter candidate list to determine the cost values of the at least two groups of candidate model parameters; and determine the minimum cost value from the cost values of the at least two groups of candidate model parameters, and determine the model parameters of the current block based on the group of candidate model parameters corresponding to the minimum cost value.
[0519] In some embodiments, referring to FIG. 13 , the encoder 130 further includes an encoding unit 1302 , wherein:
[0520] The first determining unit 1301 is further configured to determine an index identification value of the current block, wherein the index identification value is used to indicate an index number of a group of candidate model parameters corresponding to the minimum cost value in the parameter candidate list;
[0521] The encoding unit 1302 is configured to encode the index identification value and write the obtained encoded bits into the bitstream.
[0522] In some embodiments, the first determination unit 1301 is further configured to determine the inheritance mode and corresponding candidate model parameters of the current block based on a set of candidate mode parameters corresponding to the minimum cost value; and determine the model parameters of the current block based on the inheritance mode and candidate model parameters of the current block.
[0523] In some embodiments, the first determining unit 1301 is further configured to, if the inheritance mode of the current block is the CCLM mode, determine the first model parameter among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the MMLM mode, determine the first model parameter and the classification threshold among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the CCCM mode, determine the convolution parameter and the classification threshold among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the GLM mode, then when the GLM mode is the three-parameter mode, determine the gradient index value, the first model parameter, and the second model parameter among the candidate model parameters inherited by the current block; or, when the GLM mode is the two-parameter mode , determine the first model parameter among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the chroma fusion mode, then when the chroma fusion mode is the chroma fusion derivation mode, determine the prediction mode inherited by the current block, and determine the model parameters of the current block according to the prediction mode inherited by the current block and the candidate model parameters; or, when the chroma fusion mode is not the chroma fusion derivation mode, determine that the current block uses the MMLM mode, and determine the first model parameter and the classification threshold among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the CCMerge mode, determine the prediction mode inherited by the current block, and determine the model parameters of the current block according to the prediction mode inherited by the current block and the candidate model parameters.
[0524] In some embodiments, the model parameters of the current block include a first model parameter and a second model parameter; wherein: the first model parameter is used to indicate a scaling parameter when the current block uses a cross-component prediction mode; the second model parameter is used to indicate an offset parameter when the current block uses a cross-component prediction mode.
[0525] In some embodiments, referring to FIG13 , the encoder 130 may further include a first prediction unit 1303 configured to determine a first prediction value of the current block based on a cross-component prediction mode; determine a second prediction value of the current block based on a non-cross-component prediction mode; and determine a target prediction value of the current block based on the first prediction value and the second prediction value.
[0526] In some embodiments, the encoding unit 1302 is further configured to encode the value of the first syntax identification information and write the obtained coded bits into the bitstream.
[0527] In some embodiments, the encoding unit 1302 is further configured to encode the value of the first syntax identification information based on the context model, and write the obtained coded bits into the bitstream.
[0528] In some embodiments, the first determining unit 1301 is further configured to determine a context model based on information of adjacent blocks of the current block.
[0529] In some embodiments, the first determination unit 1301 is further configured to determine the value of the third grammar identification information; if the third grammar identification information indicates that the current block uses the chroma fusion mode, then determine the value of the fourth grammar identification information; if the fourth grammar identification information indicates that the current block does not use the linear model chroma fusion mode, then determine the value of the second grammar identification information based on the value of the third grammar identification information and the value of the fourth grammar identification information.
[0530] In some embodiments, the first determining unit 1301 is further configured to set the value of the second grammar identification information to be equal to the sum of the value of the third grammar identification information and the value of the fourth grammar identification information.
[0531] In some embodiments, the first determining unit 1301 is further configured to set the value of the second syntax identification information to be equal to the value of the third syntax identification information if the third syntax identification information indicates that the current block does not use the chroma fusion mode.
[0532] In some embodiments, the first determination unit 1301 is further configured to determine the value of the fifth grammar identification information if the fourth grammar identification information indicates that the current block uses a linear model chrominance fusion mode; and determine the value of the second grammar identification information based on the value of the third grammar identification information, the value of the fourth grammar identification information and the value of the fifth grammar identification information.
[0533] In some embodiments, the first determination unit 1301 is further configured to determine that the value of the fifth grammar identification information is the first value if the current block uses a single linear model chroma fusion mode; if the current block uses a multilinear model chroma fusion mode, determine that the value of the fifth grammar identification information is the second value.
[0534] In some embodiments, the encoding unit 1302 is further configured to encode the value of the fifth syntax identification information and write the obtained coded bits into the bitstream.
[0535] In some embodiments, the first determination unit 1301 is further configured to determine that the value of the third syntax identification information is the first value if the current block does not use the chroma fusion mode; if the current block uses the chroma fusion mode, determine that the value of the third syntax identification information is the second value.
[0536] In some embodiments, the encoding unit 1302 is further configured to encode the value of the third syntax identification information and write the obtained coded bits into the bitstream.
[0537] In some embodiments, the first determination unit 1301 is further configured to determine that the value of the fourth grammar identification information is the first value if the current block does not use the linear model chroma fusion mode; if the current block uses the linear model chroma fusion mode, determine that the value of the fourth grammar identification information is the second value.
[0538] In some embodiments, the encoding unit 1302 is further configured to encode the value of the fourth syntax identification information and write the obtained coded bits into the bitstream.
[0539] In some embodiments, the first determination unit 1301 is further configured to determine that the value of the second grammar identification information is a first value if the current block does not use a chroma fusion mode; determine that the value of the second grammar identification information is a second value if the current block uses a weighted chroma fusion mode; determine that the value of the second grammar identification information is a third value if the current block uses a single linear model chroma fusion mode; and determine that the value of the second grammar identification information is a fourth value if the current block uses a multilinear model chroma fusion mode.
[0540] In some embodiments, the first value is 0, the second value is 1, the third value is 2, and the fourth value is 3.
[0541] In some embodiments, the encoding unit 1302 is further configured to encode the value of the second syntax identification information and write the obtained coded bits into the bitstream.
[0542] In some embodiments, the first determination unit 1301 is further configured to determine the value of the sixth syntax identification information; and if the sixth syntax identification information indicates that the current block uses a non-cross-component prediction mode, continue to perform the step of determining the mode enable information of the current block.
[0543] In some embodiments, the encoding unit 1302 is further configured to encode the value of the sixth syntax identification information and write the obtained coded bits into the bitstream.
[0544] In some embodiments, the first determination unit 1301 is further configured to determine the value of the seventh syntax identification information; and if the seventh syntax identification information indicates that the current block uses the cross-component prediction mode, continue to perform the step of determining the mode enable information of the current block.
[0545] In some embodiments, the encoding unit 1302 is further configured to encode the value of the seventh syntax identification information and write the obtained coded bits into the bitstream.
[0546] In some embodiments, the first determination unit 1301 is further configured to determine the mode enable information of the current block; if the mode enable information indicates that the current block enables the cross-component derivation mode, determine the value of the eighth syntax identification information; if the eighth syntax identification information indicates that the current block uses the cross-component derivation mode, decode the code stream to determine the index identification value of the current block; and construct a parameter candidate list for the current block, and determine the model parameters of the current block based on the parameter candidate list and the index identification value; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0547] In some embodiments, the encoding unit 1302 is further configured to encode the value of the eighth syntax identification information and write the obtained coded bits into the bitstream.
[0548] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.
[0549] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0550] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 130. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method described in any one of the aforementioned embodiments.
[0551] Based on the composition of the above-mentioned encoder 130 and the computer-readable storage medium, refer to Figure 14, which shows a specific hardware structure diagram of the encoder 130 provided in an embodiment of the present application. As shown in Figure 14, the encoder 130 may include: a first communication interface 1401, a first memory 1402 and a first processor 1403; each component is coupled together through a first bus system 1404. It can be understood that the first bus system 1404 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 1404 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 1404 in Figure 14. Among them,
[0552] The first communication interface 1401 is used to receive and send signals when sending and receiving information with other external network elements;
[0553] A first memory 1402 is used to store computer programs that can be run on the first processor 1403;
[0554] The first processor 1403 is configured to, when running the computer program, execute:
[0555] Determine the mode enable information for the current block;
[0556] If the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, determining a value of the first syntax identification information;
[0557] If the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, constructing a parameter candidate list for the current block;
[0558] Determine the model parameters of the current block according to the parameter candidate list; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0559] It is understood that the first memory 1402 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can 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 can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 1402 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0560] The first processor 1403 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1403. The above-mentioned first processor 1403 can 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 devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 1402 , and the first processor 1403 reads the information in the first memory 1402 and completes the steps of the above method in combination with its hardware.
[0561] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0562] Optionally, as another embodiment, the first processor 1403 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.
[0563] This embodiment provides an encoder. For the encoder, when the current block uses the weighted chroma fusion mode, considering the usage rate of the chroma fusion derivation mode, a judgment is added here as to whether the current block enables the chroma fusion derivation mode. Only when the current block enables the chroma fusion derivation mode, it is necessary to encode the value of the first syntax identification information; thereby, codewords can be effectively saved, the extra bit overhead brought by the first syntax identification information can be avoided, and the coding efficiency can be improved.
[0564] In yet another embodiment of the present application, based on the same inventive concept as the aforementioned embodiment, see FIG15 , which shows a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application. As shown in FIG15 , the decoder 150 may include: a second determining unit 1501 and a decoding unit 1502, wherein:
[0565] The second determining unit 1501 is configured to determine mode enabling information of the current block;
[0566] The decoding unit 1502 is configured to, if the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the chroma fusion derivation mode is enabled for the current block, decode the bitstream and determine a value of the first syntax identification information; and if the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, decode the bitstream and determine an index identification value for the current block;
[0567] The second determination unit 1501 is further configured to construct a parameter candidate list for the current block, and determine the model parameters of the current block based on the parameter candidate list and the index identification value; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0568] In some embodiments, the second determination unit 1501 is further configured to determine the model parameters of the current block based on the reference pixels of the current block if the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion derivation mode; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0569] In some embodiments, the decoding unit 1502 is further configured to decode the code stream and determine the value of the second syntax identification information;
[0570] The second determining unit 1501 is further configured to determine an enable signal for the current block if the second syntax identification information indicates that the current block uses the weighted chroma fusion mode; wherein the enable signal is used to indicate whether the current block enables the chroma fusion derivation mode.
[0571] In some embodiments, the second determining unit 1501 is further configured to determine an enabling signal of the current block according to information of neighboring blocks of the current block.
[0572] In some embodiments, the second determination unit 1501 is further configured to determine the mode information of the adjacent blocks of the current block; and determine the enable signal of the current block based on the mode information of the adjacent blocks; wherein the adjacent blocks include at least one of the following: at least one left adjacent block located on the left side of the current block, and at least one upper adjacent block located on the upper side of the current block.
[0573] In some embodiments, the second determination unit 1501 is further configured to determine that the enable signal is the first value if at least one of the mode information of the adjacent blocks is a non-cross-component prediction mode; if all of the mode information of the adjacent blocks is a cross-component prediction mode, determine that the enable signal is the second value.
[0574] In some embodiments, the second determination unit 1501 is further configured to determine that the enable signal is the first value if all the mode information of the adjacent blocks is a non-cross-component prediction mode; if at least one of the mode information of the adjacent blocks is a cross-component prediction mode, determine that the enable signal is the second value.
[0575] In some embodiments, the second determining unit 1501 is further configured to determine that the current block does not enable the chroma fusion derivation mode if the enable signal is the first value; and to determine that the current block enables the chroma fusion derivation mode if the enable signal is the second value.
[0576] In some embodiments, the second determination unit 1501 is further configured to, if the value of the second syntax identification information is the second value and the enable signal is the first value, determine that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion derivation mode; if the value of the second syntax identification information is the second value and the enable signal is the second value, determine that the mode enable information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode.
[0577] In some embodiments, the second determination unit 1501 is further configured to determine the model parameters of the current block based on the reference pixels of the current block if the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0578] In some embodiments, the second determination unit 1501 is further configured to determine the reference pixel of the current block based on the adjacent area of the current block; wherein the adjacent area of the current block includes at least one of the following: the left adjacent area of the current block and the upper adjacent area of the current block.
[0579] In some embodiments, the second determining unit 1501 is further configured to determine a reconstructed luminance value and a reconstructed chrominance value of a reference pixel; and calculate model parameters according to the reconstructed luminance value and the reconstructed chrominance value to obtain model parameters of the current block.
[0580] In some embodiments, the second determination unit 1501 is further configured to determine the adjacent blocks of the current block; if at least one of the adjacent blocks uses a cross-component prediction mode, determine the model parameters of the at least one block to obtain at least one set of first candidate model parameters; and fill the at least one set of first candidate model parameters into the parameter candidate list.
[0581] In some embodiments, the neighboring blocks include: blocks that are spatially adjacent to the current block, and / or blocks that are temporally adjacent to the current block.
[0582] In some embodiments, the second determination unit 1501 is further configured to determine the non-adjacent blocks of the current block when the parameter candidate list is in an unfilled state; if at least one block among the non-adjacent blocks uses a cross-component prediction mode, determine the model parameters of the at least one block to obtain at least one set of second candidate model parameters; and continue to fill the at least one set of second candidate model parameters into the parameter candidate list.
[0583] In some embodiments, the second determination unit 1501 is further configured to determine at least one set of third candidate model parameters according to preset parameter information when the parameter candidate list is not filled; and continue to fill at least one set of third candidate model parameters into the parameter candidate list.
[0584] In some embodiments, the preset parameter information includes at least a preset value of the first model parameter, and the preset value of the first model parameter is at least one of the following: 0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8.
[0585] In some embodiments, the cross-component prediction mode includes at least one of the following: CCLM mode, MMLM mode, CCCM mode, GLM mode, chroma fusion mode, and CCMerge mode.
[0586] In some embodiments, the second determination unit 1501 is further configured to determine a set of candidate model parameters corresponding to the index identification value in the parameter candidate list; determine the inheritance mode of the current block and the corresponding candidate model parameters based on a set of candidate mode parameters; and determine the model parameters of the current block based on the inheritance mode of the current block and the candidate model parameters.
[0587] In some embodiments, the second determining unit 1501 is further configured to, if the inheritance mode of the current block is the CCLM mode, determine the first model parameter among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the MMLM mode, determine the first model parameter and the classification threshold among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the CCCM mode, determine the convolution parameter and the classification threshold among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the GLM mode, then when the GLM mode is the three-parameter mode, determine the gradient index value, the first model parameter, and the second model parameter among the candidate model parameters inherited by the current block; or, when the GLM mode is the two-parameter mode , determine the first model parameter among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the chroma fusion mode, then when the chroma fusion mode is the chroma fusion derivation mode, determine the prediction mode inherited by the current block, and determine the model parameters of the current block according to the prediction mode inherited by the current block and the candidate model parameters; or, when the chroma fusion mode is not the chroma fusion derivation mode, determine that the current block uses the MMLM mode, and determine the first model parameter and the classification threshold among the candidate model parameters inherited by the current block; if the inheritance mode of the current block is the CCMerge mode, determine the prediction mode inherited by the current block, and determine the model parameters of the current block according to the prediction mode inherited by the current block and the candidate model parameters.
[0588] In some embodiments, the model parameters of the current block include a first model parameter and a second model parameter; wherein: the first model parameter is used to indicate a scaling parameter when the current block uses a cross-component prediction mode; the second model parameter is used to indicate an offset parameter when the current block uses a cross-component prediction mode.
[0589] In some embodiments, referring to FIG. 15 , the decoder 150 may further include a second prediction unit 1503 configured to determine a first prediction value of the current block based on a cross-component prediction mode; determine a second prediction value of the current block based on a non-cross-component prediction mode; and determine a target prediction value of the current block based on the first prediction value and the second prediction value.
[0590] In some embodiments, the decoding unit 1502 is further configured to decode the code stream based on the context model to determine a value of the first syntax identification information.
[0591] In some embodiments, the second determining unit 1501 is further configured to determine a context model based on information about adjacent blocks of the current block.
[0592] In some embodiments, the decoding unit 1502 is further configured to decode the code stream and determine the value of the third syntax identification information; if the third syntax identification information indicates that the current block uses the chroma fusion mode, then decode the code stream and determine the value of the fourth syntax identification information; if the fourth syntax identification information indicates that the current block does not use the linear model chroma fusion mode, then determine the value of the second syntax identification information based on the value of the third syntax identification information and the value of the fourth syntax identification information.
[0593] In some embodiments, the second determining unit 1501 is further configured to set the value of the second grammar identification information to be equal to the sum of the value of the third grammar identification information and the value of the fourth grammar identification information.
[0594] In some embodiments, the second determining unit 1501 is further configured to set the value of the second syntax identification information to be equal to the value of the third syntax identification information if the third syntax identification information indicates that the current block does not use the chroma fusion mode.
[0595] In some embodiments, the decoding unit 1502 is further configured to decode the bitstream and determine a value of the fifth syntax identification information if the fourth syntax identification information indicates that the current block uses the linear model chroma fusion mode;
[0596] The second determining unit 1501 is further configured to determine a value of the second grammar identification information according to a value of the third grammar identification information, a value of the fourth grammar identification information, and a value of the fifth grammar identification information.
[0597] In some embodiments, the second determination unit 1501 is further configured to, if the value of the fifth grammar identification information is the first value, determine that the fifth grammar identification information indicates that the current block uses a single linear model chroma fusion mode; if the value of the fifth grammar identification information is the second value, determine that the fifth grammar identification information indicates that the current block uses a multi-linear model chroma fusion mode.
[0598] In some embodiments, the second determination unit 1501 is further configured to, if the value of the third syntax identification information is the first value, determine that the third syntax identification information indicates that the current block does not use the chroma fusion mode; if the value of the third syntax identification information is the second value, determine that the third syntax identification information indicates that the current block uses the chroma fusion mode.
[0599] In some embodiments, the second determination unit 1501 is further configured to, if the value of the fourth grammar identification information is the first value, determine that the fourth grammar identification information indicates that the current block does not use the linear model chroma fusion mode; if the value of the fourth grammar identification information is the second value, determine that the fourth grammar identification information indicates that the current block uses the linear model chroma fusion mode.
[0600] In some embodiments, the second determination unit 1501 is further configured to, if the value of the second grammar identification information is the first value, determine that the second grammar identification information indicates that the current block does not use the chroma fusion mode; if the value of the second grammar identification information is the second value, determine that the second grammar identification information indicates that the current block uses the weighted chroma fusion mode; if the value of the second grammar identification information is the third value, determine that the second grammar identification information indicates that the current block uses the single linear model chroma fusion mode; if the value of the second grammar identification information is the fourth value, determine that the second grammar identification information indicates that the current block uses the multi-linear model chroma fusion mode.
[0601] In some embodiments, the first value is 0, the second value is 1, the third value is 2, and the fourth value is 3.
[0602] In some embodiments, the decoding unit 1502 is further configured to decode the code stream, determine the value of the sixth syntax identification information; and if the sixth syntax identification information indicates that the current block uses a non-cross-component prediction mode, continue to perform the step of determining the mode enable information of the current block.
[0603] In some embodiments, the decoding unit 1502 is further configured to decode the code stream, determine the value of the seventh syntax identification information; and if the seventh syntax identification information indicates that the current block uses the cross-component prediction mode, continue to perform the step of determining the mode enable information of the current block.
[0604] In some embodiments, the second determining unit 1501 is further configured to determine mode enabling information of the current block;
[0605] The decoding unit 1502 is further configured to, if the mode enabling information indicates that the current block enables the cross-component derivation mode, decode the codestream and determine the value of the eighth syntax identification information; and if the eighth syntax identification information indicates that the current block uses the cross-component derivation mode, decode the codestream and determine the index identification value of the current block;
[0606] The second determination unit 1501 is further configured to construct a parameter candidate list for the current block, and determine the model parameters of the current block based on the parameter candidate list and the index identification value; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
[0607] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.
[0608] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium for use in decoder 150. The computer-readable storage medium stores a computer program that, when executed by a second processor, implements any of the methods described in the aforementioned embodiments.
[0609] Based on the composition of the above-mentioned decoder 150 and the computer-readable storage medium, refer to Figure 16, which shows a specific hardware structure diagram of the decoder 150 provided in an embodiment of the present application. As shown in Figure 16, the decoder 150 may include: a second communication interface 1601, a second memory 1602 and a second processor 1603; each component is coupled together through a second bus system 1604. It can be understood that the second bus system 1604 is used to realize the connection and communication between these components. In addition to the data bus, the second bus system 1604 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 1604 in Figure 16. Among them,
[0610] The second communication interface 1601 is used to receive and send signals when sending and receiving information with other external network elements;
[0611] The second memory 1602 is used to store computer programs that can be run on the second processor 1603;
[0612] The second processor 1603 is configured to, when running the computer program, execute:
[0613] Determine the mode enable information for the current block;
[0614] If the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode, decoding the bitstream and determining the value of the first syntax identification information;
[0615] If the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, decoding the code stream to determine the index identification value of the current block;
[0616] A parameter candidate list of the current block is constructed, and model parameters of the current block are determined according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine a first prediction value of the current block based on the cross-component prediction mode.
[0617] Optionally, as another embodiment, the second processor 1603 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
[0618] It can be understood that the hardware functions of the second memory 1602 are similar to those of the first memory 1402, and the hardware functions of the second processor 1603 are similar to those of the first processor 1403; they will not be described in detail here.
[0619] This embodiment provides a decoder. For the decoder, when the current block uses the weighted chroma fusion mode, taking into account the usage rate of the chroma fusion derivation mode, a judgment is added here as to whether the current block enables the chroma fusion derivation mode. Only when the current block enables the chroma fusion derivation mode, it is necessary to decode the value of the first syntax identification information. This can effectively save codewords, avoid the extra bit overhead brought by the first syntax identification information, and thus improve the encoding and decoding efficiency.
[0620] In yet another embodiment of the present application, referring to FIG17 , a schematic diagram of the structure of a coding and decoding system provided by an embodiment of the present application is shown. As shown in FIG17 , the coding and decoding system 170 may include an encoder 1701 and a decoder 1702 .
[0621] In the embodiment of the present application, the encoder 1701 may be the encoder described in any one of the aforementioned embodiments, and the decoder 1702 may be the decoder described in any one of the aforementioned embodiments.
[0622] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0623] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0624] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0625] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0626] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0627] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims. Industrial Applicability
[0628] In an embodiment of the present application, whether it is the encoding end or the decoding end, when the current block uses the weighted chroma fusion mode, it is necessary to further determine whether the current block enables the chroma fusion derivation mode; only when the current block enables the chroma fusion derivation mode, it is necessary to encode and decode the value of the first syntax identification information; then when the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, a parameter candidate list can be constructed, and the model parameters of the current block can be obtained from it according to the index identification value. The model parameters are used to determine the first prediction value of the current block under the cross-component prediction mode. In this way, when the current block uses the weighted chroma fusion mode, considering the usage rate of the chroma fusion derivation mode, a judgment is added here as to whether the current block enables the chroma fusion derivation mode. Only when the current block enables the chroma fusion derivation mode, it is necessary to encode and decode the value of the first syntax identification information; thereby effectively saving codewords, while improving the chroma prediction efficiency, and further improving the encoding and decoding efficiency.
Claims
1. A decoding method, applied to a decoder, the method comprising: Determine the mode enable information for the current block; If the mode enabling information indicates that the current block uses a weighted chroma fusion mode and the current block enables a chroma fusion derivation mode, decoding the bitstream to determine a value of the first syntax identification information; If the first syntax identification information indicates that the current block uses the chroma fusion derivation mode, decoding the bitstream to determine the index identification value of the current block; Constructing a parameter candidate list of the current block, and determining the model parameters of the current block according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine a first prediction value of the current block based on a cross-component prediction mode.
2. The method according to claim 1, wherein: The method further comprises: If the mode enabling information indicates that the current block uses a weighted chroma fusion mode and the current block does not enable a chroma fusion derivation mode, the model parameters of the current block are determined based on the reference pixels of the current block; wherein the model parameters are used to determine a first prediction value of the current block based on a cross-component prediction mode.
3. The method according to claim 1, wherein: The determining of mode enabling information of the current block includes: Decoding the code stream to determine a value of the second syntax identification information; If the second syntax identification information indicates that the current block uses the weighted chroma fusion mode, an enable signal of the current block is determined; wherein the enable signal is used to indicate whether the current block enables the chroma fusion derivation mode.
4. The method according to claim 3, wherein: The determining of the enabling signal of the current block comprises: An enabling signal of the current block is determined according to the neighboring block information of the current block.
5. The method according to claim 4, wherein: The step of determining the enabling signal of the current block according to the neighboring block information of the current block includes: Determining mode information of adjacent blocks of the current block; Determining an enable signal of the current block according to the mode information of the adjacent block; The adjacent blocks include at least one of the following: at least one left adjacent block located on the left side of the current block, and at least one upper adjacent block located on the upper side of the current block.
6. The method according to claim 5, wherein: The step of determining the enable signal of the current block according to the mode information of the adjacent block comprises: If at least one of the mode information of the neighboring blocks is a non-cross-component prediction mode, determining that the enabling signal is a first value; If all the mode information of the neighboring blocks are cross-component prediction modes, the enabling signal is determined to be a second value.
7. The method according to claim 5, wherein: The step of determining the enable signal of the current block according to the mode information of the adjacent block comprises: If all the mode information of the neighboring blocks are non-cross-component prediction modes, determining that the enabling signal is a first value; If at least one of the mode information of the neighboring blocks is a cross-component prediction mode, the enabling signal is determined to be a second value.
8. The method according to claim 3, wherein: The method further comprises: If the enabling signal is a first value, determining that the chroma fusion derivation mode is not enabled for the current block; If the enabling signal is a second value, it is determined that the current block enables the chroma fusion derivation mode.
9. The method according to claim 8, wherein: The method further comprises: If the value of the second syntax identification information is the second value and the enabling signal is the first value, determining that the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block does not enable the chroma fusion derivation mode; If the value of the second syntax identification information is a second value and the enable signal is a second value, it is determined that the mode enable information indicates that the current block uses a weighted chroma fusion mode and the current block enables a chroma fusion derivation mode.
10. The method according to claim 1, wherein: The method further comprises: If the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode, the model parameters of the current block are determined based on the reference pixels of the current block; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
11. The method according to claim 2 or 10, wherein: The method further comprises: Determining a reference pixel of the current block according to an adjacent area of the current block; The adjacent area of the current block includes at least one of the following: a left adjacent area of the current block and an upper adjacent area of the current block.
12. The method according to claim 11, wherein: The determining, according to the reference pixels of the current block, the model parameters of the current block comprises: Determining a reconstructed luminance value and a reconstructed chrominance value of the reference pixel; Model parameters are calculated according to the reconstructed brightness value and the reconstructed chrominance value to obtain the model parameters of the current block.
13. The method according to claim 1, wherein: The constructing of the parameter candidate list of the current block comprises: Determining adjacent blocks of the current block; If at least one of the neighboring blocks uses the cross-component prediction mode, determining a model parameter of each of the at least one block to obtain at least one set of first candidate model parameters; The at least one set of first candidate model parameters is filled into the parameter candidate list.
14. The method according to claim 13, wherein: The adjacent blocks include: blocks that are spatially adjacent to the current block, and / or blocks that are temporally adjacent to the current block.
15. The method according to claim 13, wherein: When the parameter candidate list is in an unfilled state, constructing the parameter candidate list of the current block further includes: Determining non-adjacent blocks of the current block; If at least one of the non-adjacent blocks uses the cross-component prediction mode, determining a model parameter of each of the at least one block to obtain at least one set of second candidate model parameters; The at least one set of second candidate model parameters continues to be filled into the parameter candidate list.
16. The method according to claim 15, wherein: When the parameter candidate list is in an unfilled state, constructing the parameter candidate list of the current block further includes: Determining at least one set of third candidate model parameters according to the preset parameter information; The at least one set of third candidate model parameters continues to be filled into the parameter candidate list.
17. The method according to claim 16, wherein: The preset parameter information includes at least a preset value of a first model parameter, and the preset value of the first model parameter is at least one of the following: 0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8.
18. The method according to any one of claims 1 to 17, wherein: The cross-component prediction mode includes at least one of the following: CCLM mode, MMLM mode, CCCM mode, GLM mode, chroma fusion mode and CCMerge mode.
19. The method according to claim 18, wherein: The step of determining the model parameter of the current block according to the parameter candidate list and the index identification value includes: In the parameter candidate list, determine a group of candidate model parameters corresponding to the index identification value; Determining an inheritance mode of the current block and corresponding candidate model parameters according to the set of candidate mode parameters; The model parameters of the current block are determined according to the inheritance mode of the current block and the candidate model parameters.
20. The method according to claim 19, wherein: The determining the model parameters of the current block according to the inheritance mode of the current block and the candidate model parameters includes: If the inheritance mode of the current block is the CCLM mode, determining that the current block inherits the first model parameter among the candidate model parameters; If the inheritance mode of the current block is the MMLM mode, determining that the current block inherits the first model parameter and the classification threshold among the candidate model parameters; If the inheritance mode of the current block is the CCCM mode, determining that the current block inherits the convolution parameters and the classification threshold in the candidate model parameters; If the inheritance mode of the current block is the GLM mode, then when the GLM mode is the three-parameter mode, it is determined that the current block inherits the gradient index value, the first model parameter, and the second model parameter in the candidate model parameters; or, when the GLM mode is the two-parameter mode, it is determined that the current block inherits the first model parameter in the candidate model parameters; If the inheritance mode of the current block is the chroma fusion mode, then when the chroma fusion mode is the chroma fusion derivation mode, determine the prediction mode inherited by the current block, and determine the model parameters of the current block according to the prediction mode inherited by the current block and the candidate model parameters; or, when the chroma fusion mode is not the chroma fusion derivation mode, determine that the current block uses the MMLM mode, and determine that the current block inherits the first model parameter and the classification threshold among the candidate model parameters; If the inheritance mode of the current block is the CCMerge mode, the prediction mode inherited by the current block is determined, and the model parameters of the current block are determined according to the prediction mode inherited by the current block and the candidate model parameters.
21. The method according to claim 1, wherein: The model parameters of the current block include a first model parameter and a second model parameter; wherein: The first model parameter is used to indicate a scaling parameter when the current block uses a cross-component prediction mode; The second model parameter is used to indicate an offset parameter when the current block uses an inter-component prediction mode.
22. The method according to claim 1, wherein: The method further comprises: Determine a first prediction value of the current block based on a cross-component prediction mode; Determine a second prediction value of the current block based on a non-inter-component prediction mode; A target prediction value of the current block is determined according to the first prediction value and the second prediction value.
23. The method according to any one of claims 1 to 22, wherein: The decoding of the code stream to determine the value of the first syntax identification information includes: decoding the code stream based on a context model to determine the value of the first syntax identification information.
24. The method according to claim 23, wherein: The method further comprises: The context model is determined according to the neighboring block information of the current block.
25. The method according to claim 3, wherein: The decoding code stream determines the value of the second syntax identification information, including: Decoding the code stream to determine a value of the third syntax identification information; If the third syntax identification information indicates that the current block uses the chroma fusion mode, decoding the bitstream to determine the value of the fourth syntax identification information; If the fourth syntax identification information indicates that the current block does not use the linear model chrominance fusion mode, the value of the second syntax identification information is determined according to the value of the third syntax identification information and the value of the fourth syntax identification information.
26. The method according to claim 25, wherein: The determining the value of the second grammar identification information according to the value of the third grammar identification information and the value of the fourth grammar identification information includes: The value of the second grammar identification information is set to be equal to the sum of the value of the third grammar identification information and the value of the fourth grammar identification information.
27. The method according to claim 25, wherein: The method further comprises: If the third syntax identification information indicates that the current block does not use the chroma fusion mode, the value of the second syntax identification information is set to be equal to the value of the third syntax identification information.
28. The method according to claim 25, wherein: The method further comprises: If the fourth syntax identification information indicates that the current block uses a linear model chrominance fusion mode, decoding the bitstream to determine a value of the fifth syntax identification information; The value of the second grammar identification information is determined according to the value of the third grammar identification information, the value of the fourth grammar identification information and the value of the fifth grammar identification information.
29. The method according to claim 28, wherein: The method further comprises: If the value of the fifth syntax identification information is the first value, determining that the fifth syntax identification information indicates that the current block uses a single linear model chrominance fusion mode; If the value of the fifth syntax identification information is the second value, it is determined that the fifth syntax identification information indicates that the current block uses a multi-linear model chrominance fusion mode.
30. The method of claim 25, wherein: The method further comprises: If the value of the third syntax identification information is the first value, determining that the third syntax identification information indicates that the current block does not use the chroma fusion mode; If the value of the third syntax identification information is the second value, it is determined that the third syntax identification information indicates that the current block uses a chroma fusion mode.
31. The method of claim 25, wherein: The method further comprises: If the value of the fourth syntax identification information is the first value, determining that the fourth syntax identification information indicates that the current block does not use the linear model chrominance fusion mode; If the value of the fourth syntax identification information is the second value, it is determined that the fourth syntax identification information indicates that the current block uses a linear model chrominance fusion mode.
32. The method of claim 3, wherein: The method further comprises: If the value of the second syntax identification information is the first value, determining that the second syntax identification information indicates that the current block does not use the chroma fusion mode; If the value of the second syntax identification information is a second value, determining that the second syntax identification information indicates that the current block uses a weighted chrominance fusion mode; If the value of the second syntax identification information is the third value, determining that the second syntax identification information indicates that the current block uses a single linear model chrominance fusion mode; If the value of the second syntax identification information is the fourth value, it is determined that the second syntax identification information indicates that the current block uses a multi-linear model chrominance fusion mode.
33. The method of claim 32, wherein: The first value is 0, the second value is 1, the third value is 2, and the fourth value is 3.
34. The method according to any one of claims 1 to 33, wherein: The method further comprises: Decoding the code stream to determine a value of the sixth syntax identification information; If the sixth syntax identification information indicates that the current block uses a non-inter-component prediction mode, the step of determining the mode enabling information of the current block is continued.
35. The method according to any one of claims 1 to 33, wherein: The method further comprises: Decoding the code stream to determine the value of the seventh syntax identification information; If the seventh syntax identification information indicates that the current block uses the inter-component prediction mode, the step of determining the mode enabling information of the current block is continued.
36. The method of claim 1, wherein: The method further comprises: Determine the mode enable information for the current block; If the mode enabling information indicates that the current block enables the cross-component derivation mode, decoding the bitstream to determine a value of the eighth syntax identification information; If the eighth syntax identification information indicates that the current block uses the cross-component derivation mode, decoding the bitstream to determine the index identification value of the current block; Constructing a parameter candidate list of the current block, and determining the model parameters of the current block according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine a first prediction value of the current block based on a cross-component prediction mode.
37. A coding method, applied to an encoder, the method comprising: Determine the mode enable information for the current block; If the mode enabling information indicates that the current block uses a weighted chroma fusion mode and the current block enables a chroma fusion derivation mode, determining a value of the first syntax identification information; If the first syntax identification information indicates that the current block uses a chroma fusion derivation mode, constructing a parameter candidate list of the current block; According to the parameter candidate list, a model parameter of the current block is determined; wherein the model parameter is used to determine a first prediction value of the current block based on a cross-component prediction mode.
38. The method of claim 37, wherein: The method further comprises: If the mode enabling information indicates that the current block uses a weighted chroma fusion mode and the current block does not enable a chroma fusion derivation mode, the model parameters of the current block are determined based on the reference pixels of the current block; wherein the model parameters are used to determine a first prediction value of the current block based on a cross-component prediction mode.
39. The method of claim 37, wherein: The determining of mode enabling information of the current block includes: Determine a value of the second grammar identification information; If the second syntax identification information indicates that the current block uses the weighted chroma fusion mode, an enable signal of the current block is determined; wherein the enable signal is used to indicate whether the current block enables the chroma fusion derivation mode.
40. The method of claim 39, wherein: The determining of the enabling signal of the current block comprises: An enabling signal of the current block is determined according to the neighboring block information of the current block.
41. The method of claim 40, wherein: The step of determining the enabling signal of the current block according to the neighboring block information of the current block includes: Determining mode information of adjacent blocks of the current block; Determining an enable signal of the current block according to the mode information of the adjacent block; The adjacent blocks include at least one of the following: at least one left adjacent block located on the left side of the current block, and at least one upper adjacent block located on the upper side of the current block.
42. The method according to claim 41, wherein: The step of determining the enable signal of the current block according to the mode information of the adjacent block comprises: If at least one of the mode information of the neighboring blocks is a non-cross-component prediction mode, determining that the enabling signal is a first value; If all the mode information of the neighboring blocks are cross-component prediction modes, the enabling signal is determined to be a second value.
43. The method of claim 41, wherein: The step of determining the enable signal of the current block according to the mode information of the adjacent block comprises: If all the mode information of the neighboring blocks are non-cross-component prediction modes, determining that the enabling signal is a first value; If at least one of the mode information of the neighboring blocks is a cross-component prediction mode, the enabling signal is determined to be a second value.
44. The method of claim 39, wherein: The method further comprises: If the enabling signal is a first value, determining that the chroma fusion derivation mode is not enabled for the current block; If the enabling signal is a second value, it is determined that the current block enables the chroma fusion derivation mode.
45. The method of claim 44, wherein: The method further comprises: If the value of the second syntax identification information is the second value and the enable signal is the first value, then determining that the mode enable information indicates The current block uses a weighted chroma fusion mode and the current block does not enable a chroma fusion derivation mode; If the value of the second syntax identification information is a second value and the enable signal is a second value, it is determined that the mode enable information indicates that the current block uses a weighted chroma fusion mode and the current block enables a chroma fusion derivation mode.
46. The method of claim 37, wherein: The method further comprises: If the first syntax identification information indicates that the current block does not use the chroma fusion derivation mode, the model parameters of the current block are determined based on the reference pixels of the current block; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
47. The method of claim 38 or 46, wherein: The method further comprises: Determining a reference pixel of the current block according to an adjacent area of the current block; The adjacent area of the current block includes at least one of the following: a left adjacent area of the current block and an upper adjacent area of the current block.
48. The method of claim 47, wherein: The determining, according to the reference pixels of the current block, the model parameters of the current block comprises: Determining a reconstructed luminance value and a reconstructed chrominance value of the reference pixel; Model parameters are calculated according to the reconstructed brightness value and the reconstructed chrominance value to obtain the model parameters of the current block.
49. The method of claim 37, wherein: The constructing of the parameter candidate list of the current block comprises: Determining adjacent blocks of the current block; If at least one of the neighboring blocks uses the cross-component prediction mode, determining a model parameter of each of the at least one block to obtain at least one set of first candidate model parameters; The at least one set of first candidate model parameters is filled into the parameter candidate list.
50. The method of claim 49, wherein: The adjacent blocks include: blocks that are spatially adjacent to the current block, and / or blocks that are temporally adjacent to the current block.
51. The method of claim 49, wherein: When the parameter candidate list is in an unfilled state, constructing the parameter candidate list of the current block further includes: Determining non-adjacent blocks of the current block; If at least one of the non-adjacent blocks uses the cross-component prediction mode, determining a model parameter of each of the at least one block to obtain at least one set of second candidate model parameters; The at least one set of second candidate model parameters continues to be filled into the parameter candidate list.
52. The method of claim 51, wherein: When the parameter candidate list is in an unfilled state, constructing the parameter candidate list of the current block further includes: Determining at least one set of third candidate model parameters according to the preset parameter information; The at least one set of third candidate model parameters continues to be filled into the parameter candidate list.
53. The method of claim 52, wherein: The preset parameter information includes at least a preset value of a first model parameter, and the preset value of the first model parameter is at least one of the following: 0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8.
54. A method according to any one of claims 37 to 53, wherein: The cross-component prediction mode includes at least one of the following: CCLM mode, MMLM mode, CCCM mode, GLM mode, chroma fusion mode and CCMerge mode.
55. The method of claim 37, wherein: The step of determining the model parameters of the current block according to the parameter candidate list includes: Performing cost calculation on at least two groups of candidate model parameters in the parameter candidate list to determine respective cost values of the at least two groups of candidate model parameters; A minimum cost value is determined from the cost values of the at least two groups of candidate model parameters, and the model parameters of the current block are determined according to a group of candidate model parameters corresponding to the minimum cost value.
56. The method of claim 55, wherein: The method further comprises: Determine an index identification value of the current block, wherein the index identification value is used to indicate an index number of a group of candidate model parameters corresponding to the minimum cost value in the parameter candidate list; The index identification value is encoded, and the obtained encoded bits are written into a bit stream.
57. The method of claim 55, wherein: The determining the model parameters of the current block according to a set of candidate model parameters corresponding to the minimum cost value includes: Determining the inheritance mode of the current block and the corresponding candidate model parameters according to a set of candidate mode parameters corresponding to the minimum cost value; The model parameters of the current block are determined according to the inheritance mode of the current block and the candidate model parameters.
58. The method of claim 57, wherein: The determining the model parameters of the current block according to the inheritance mode of the current block and the candidate model parameters includes: If the inheritance mode of the current block is the CCLM mode, determining that the current block inherits the first model parameter among the candidate model parameters; If the inheritance mode of the current block is the MMLM mode, determining that the current block inherits the first model parameter and the classification threshold among the candidate model parameters; If the inheritance mode of the current block is the CCCM mode, determining that the current block inherits the convolution parameters and the classification threshold in the candidate model parameters; If the inheritance mode of the current block is the GLM mode, then when the GLM mode is the three-parameter mode, it is determined that the current block inherits the gradient index value, the first model parameter, and the second model parameter in the candidate model parameters; or, when the GLM mode is the two-parameter mode, it is determined that the current block inherits the first model parameter in the candidate model parameters; If the inheritance mode of the current block is the chroma fusion mode, then when the chroma fusion mode is the chroma fusion derivation mode, determine the prediction mode inherited by the current block, and determine the model parameters of the current block according to the prediction mode inherited by the current block and the candidate model parameters; or, when the chroma fusion mode is not the chroma fusion derivation mode, determine that the current block uses the MMLM mode, and determine that the current block inherits the first model parameter and the classification threshold among the candidate model parameters; If the inheritance mode of the current block is the CCMerge mode, the prediction mode inherited by the current block is determined, and the model parameters of the current block are determined according to the prediction mode inherited by the current block and the candidate model parameters.
59. The method of claim 37, wherein: The model parameters of the current block include a first model parameter and a second model parameter; wherein: The first model parameter is used to indicate a scaling parameter when the current block uses a cross-component prediction mode; The second model parameter is used to indicate an offset parameter when the current block uses an inter-component prediction mode.
60. The method of claim 37, wherein: The method further comprises: Determine a first prediction value of the current block based on a cross-component prediction mode; Determine a second prediction value of the current block based on a non-inter-component prediction mode; A target prediction value of the current block is determined according to the first prediction value and the second prediction value.
61. The method according to any one of claims 37 to 60, wherein: The method further comprises: The value of the first syntax identification information is encoded, and the obtained encoded bits are written into a bit stream.
62. The method of claim 61, wherein: The method further comprises: The value of the first syntax identification information is encoded based on the context model, and the obtained encoded bits are written into the bitstream.
63. The method of claim 62, wherein: The method further comprises: The context model is determined according to the neighboring block information of the current block.
64. The method of claim 39, wherein: The determining a value of the second grammar identification information includes: Determine a value of the third grammar identification information; If the third syntax identification information indicates that the current block uses a chroma fusion mode, determining a value of the fourth syntax identification information; If the fourth syntax identification information indicates that the current block does not use the linear model chrominance fusion mode, the value of the second syntax identification information is determined according to the value of the third syntax identification information and the value of the fourth syntax identification information.
65. The method of claim 64, wherein: The determining the value of the second grammar identification information according to the value of the third grammar identification information and the value of the fourth grammar identification information includes: The value of the second grammar identification information is set to be equal to the sum of the value of the third grammar identification information and the value of the fourth grammar identification information.
66. The method of claim 64, wherein: The method further comprises: If the third syntax identification information indicates that the current block does not use the chroma fusion mode, the value of the second syntax identification information is set to be equal to the value of the third syntax identification information.
67. The method of claim 64, wherein: The method further comprises: If the fourth syntax identification information indicates that the current block uses a linear model chrominance fusion mode, determining a value of the fifth syntax identification information; The value of the second grammar identification information is determined according to the value of the third grammar identification information, the value of the fourth grammar identification information and the value of the fifth grammar identification information.
68. The method of claim 67, wherein: The determining a value of the fifth grammar identification information includes: If the current block uses a single linear model chrominance fusion mode, determining that the value of the fifth syntax identification information is a first value; If the current block uses the multi-linear model chrominance fusion mode, it is determined that the value of the fifth syntax identification information is the second value.
69. The method of claim 68, wherein: The method further comprises: The value of the fifth syntax identification information is encoded, and the obtained encoded bits are written into a bit stream.
70. The method of claim 64, wherein: The determining a value of the third grammar identification information includes: If the current block does not use the chroma fusion mode, determine that the value of the third syntax identification information is the first value; If the current block uses the chroma fusion mode, it is determined that the value of the third syntax identification information is the second value.
71. The method of claim 70, wherein: The method further comprises: The value of the third syntax identification information is encoded, and the obtained encoded bits are written into a bit stream.
72. The method of claim 64, wherein: The determining a value of the fourth grammar identification information includes: If the current block does not use the linear model chrominance fusion mode, determine that the value of the fourth syntax identification information is the first value; If the current block uses the linear model chrominance fusion mode, it is determined that the value of the fourth syntax identification information is the second value.
73. The method of claim 72, wherein: The method further comprises: The value of the fourth syntax identification information is encoded, and the obtained encoded bits are written into a bit stream.
74. The method of claim 39, wherein: The determining a value of the second grammar identification information includes: If the current block does not use the chroma fusion mode, determine that the value of the second syntax identification information is a first value; If the current block uses a weighted chrominance fusion mode, determining that the value of the second syntax identification information is a second value; If the current block uses a single linear model chrominance fusion mode, determining that the value of the second syntax identification information is a third value; If the current block uses the multi-linear model chrominance fusion mode, it is determined that the value of the second syntax identification information is a fourth value.
75. The method of claim 74, wherein: The first value is 0, the second value is 1, the third value is 2, and the fourth value is 3.
76. The method of claim 39, wherein: The method further comprises: The value of the second syntax identification information is encoded, and the obtained encoded bits are written into a bit stream.
77. The method of any one of claims 37 to 76, wherein: The method further comprises: Determine a value of sixth grammar identification information; If the sixth syntax identification information indicates that the current block uses a non-inter-component prediction mode, the step of determining the mode enabling information of the current block is continued.
78. The method of claim 77, wherein: The method further comprises: The value of the sixth syntax identification information is encoded, and the obtained encoded bits are written into a bit stream.
79. The method of any one of claims 38 to 76, wherein: The method further comprises: Determine a value of the seventh grammar identification information; If the seventh syntax identification information indicates that the current block uses the inter-component prediction mode, the step of determining the mode enabling information of the current block is continued.
80. The method of claim 79, wherein: The method further comprises: The value of the seventh syntax identification information is encoded, and the obtained encoded bits are written into a bit stream.
81. The method of claim 38, wherein: The method further comprises: Determine the mode enable information for the current block; If the mode enabling information indicates that the current block enables the cross-component derivation mode, determining a value of the eighth syntax identification information; If the eighth syntax identification information indicates that the current block uses the cross-component derivation mode, decoding the bitstream to determine the index identification value of the current block; Constructing a parameter candidate list of the current block, and determining the model parameters of the current block according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine a first prediction value of the current block based on a cross-component prediction mode.
82. The method of claim 81, wherein: The method further comprises: The value of the eighth syntax identification information is encoded, and the obtained encoded bits are written into a bit stream.
83. A code stream, wherein The code stream is generated by bit encoding according to the information to be encoded; wherein the information to be encoded includes at least one of the following: The index identification value of the current block, the value of the first grammar identification information, the value of the second grammar identification information, the value of the third grammar identification information, the value of the fourth grammar identification information, the value of the fifth grammar identification information, the value of the sixth grammar identification information, the value of the seventh grammar identification information, and the value of the eighth grammar identification information; Among them, the first syntax identification information is used to indicate whether the current block uses a chroma fusion derivation mode, the second syntax identification information is used to indicate whether the current block uses a weighted chroma fusion mode, the third syntax identification information is used to indicate whether the current block uses a chroma fusion mode, the fourth syntax identification information is used to indicate whether the current block uses a linear model chroma fusion mode, the fifth syntax identification information is used to indicate that the current block uses a single linear model chroma fusion mode or a bilinear model chroma fusion mode, the sixth syntax identification information is used to indicate whether the current block uses a non-cross-component prediction mode, the seventh syntax identification information is used to indicate whether the current block uses a cross-component prediction mode, and the eighth syntax identification information is used to indicate whether the current block uses a cross-component derivation mode Mode.
84. An encoder, comprising a first determining unit, wherein: The first determining unit is configured to determine mode enabling information of the current block; and if the mode enabling information indicates that the current block uses a weighted chroma fusion mode and the current block enables a chroma fusion derivation mode, determining a value of the first syntax identification information; The first determining unit is further configured to construct a parameter candidate list of the current block if the first syntax identification information indicates that the current block uses a chroma fusion derivation mode; And determining the model parameters of the current block according to the parameter candidate list; wherein the model parameters are used to determine the first prediction value of the current block based on the cross-component prediction mode.
85. An encoder, comprising a first memory and a first processor, wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 37 to 82 when running the computer program.
86. A decoder, comprising a second determining unit and a decoding unit, wherein: The second determining unit is configured to determine mode enabling information of the current block; The decoding unit is configured to decode the bitstream and determine the value of the first syntax identification information if the mode enabling information indicates that the current block uses the weighted chroma fusion mode and the current block enables the chroma fusion derivation mode; and decode the bitstream and determine the index identification value of the current block if the first syntax identification information indicates that the current block uses the chroma fusion derivation mode; The second determination unit is further configured to construct a parameter candidate list of the current block, and determine the model parameters of the current block according to the parameter candidate list and the index identification value; wherein the model parameters are used to determine a first prediction value of the current block based on a cross-component prediction mode.
87. A decoder, comprising a second memory and a second processor, wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 1 to 36 when running the computer program.
88. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the method according to any one of claims 1 to 36, or implements the method according to any one of claims 37 to 82.