Coding method, decoding method, encoder, decoder, and storage medium
By saving the target cross-component model parameters of the chroma block on the encoding and decoding ends, the problem that cross-component model information cannot be used by subsequent blocks is solved, and the encoding and decoding efficiency is improved.
Patent Information
- Application Number
- PCT/CN2024/071233
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-07-17
AI Technical Summary
In the existing video encoding technology, the cross-component model information of the current block cannot be fully utilized by the subsequent blocks, resulting in insufficiency of encoding and decoding.
The target cross-component model parameters of the current chromaticity block are saved on the encoding and decoding ends for subsequent block inheritance and use, and the encoding and decoding efficiency is improved through adaptive prediction operations.
By saving cross-component model parameters, subsequent blocks can perform adaptive predictions without additional bit consumption, improving the encoding and decoding efficiency.
Smart Images

Figure CN2024071233_17072025_PF_FP_ABST
Abstract
Description
Coding and decoding method, 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 specifically to a coding and decoding method, an encoder, a decoder, and a storage medium. Background Art
[0002] Cross-component prediction is a video coding technique that uses reconstructed luma pixels to construct predicted chroma pixel values based on the correlation between components in the same coding block. Cross-component prediction modes include the Cross-Component Linear Model (CCLM), Convolutional Cross-Component Model (CCCM), Gradient and Location-based CCCM (GLCCCM), cross-component prediction filtering mode, and derived cross-component prediction mode.
[0003] The derived cross-component prediction mode uses the cross-component models of other reconstructed blocks to derive the optimal cross-component model for the current block and perform cross-component prediction on the current block. However, when using the derived cross-component prediction mode in the actual encoding process, some model information of the current block cannot be fully utilized by subsequent blocks to be encoded or decoded. Consequently, the improved prediction accuracy brought by the derived cross-component prediction mode cannot be fully utilized, affecting encoding and decoding efficiency.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a coding and decoding method, an encoder, a decoder, and a storage medium, which can improve coding and decoding efficiency by saving the target cross-component model parameters of the current chroma block for inheritance and use by subsequent chroma blocks.
[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] In a case where the prediction parameter indicates that the current chroma block uses a first cross-component prediction mode, determining a candidate cross-component model for the current chroma block, wherein the candidate cross-component model comprises one or more cross-component models, and each cross-component model comprises one or more cross-component model parameters;
[0009] Determining a target cross-component model for the current chroma block from the candidate cross-component models;
[0010] Determining target cross-component model parameters of the current chroma block according to one or more cross-component model parameters included in the target cross-component model;
[0011] The target cross-component model parameters are saved.
[0012] In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:
[0013] Determine a candidate cross-component model for the current chroma block, wherein the candidate cross-component model comprises one or more cross-component models, and each cross-component model comprises one or more cross-component model parameters;
[0014] Determining a target cross-component model for the current chroma block from the candidate cross-component models;
[0015] Determining a prediction value of the current chroma block according to one or more cross-component model parameters included in the target cross-component model;
[0016] When it is determined according to the prediction value that the current chroma block uses a first cross-component prediction mode, a target cross-component model parameter of the current chroma block is saved, wherein the target cross-component model is determined according to one or more cross-component model parameters included in the target cross-component model.
[0017] In a third aspect, an embodiment of the present application provides an encoder, comprising a first determination unit, a first prediction unit, and a first storage unit; wherein:
[0018] The first determining unit is configured to determine a candidate cross-component model of the current chroma block, wherein the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters;
[0019] The first determining unit is further configured to determine a target cross-component model for the current chroma block from the candidate cross-component models;
[0020] The first prediction unit is configured to determine a prediction value of the current chroma block according to one or more cross-component model parameters included in the target cross-component model;
[0021] The first storage unit is configured to save the target cross-component model parameters of the current chroma block when it is determined that the current chroma block uses a first cross-component prediction mode based on the prediction value, wherein the target cross-component model is determined based on one or more cross-component model parameters of the target cross-component model.
[0022] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor; wherein,
[0023] a first memory for storing a computer program capable of running on the first processor;
[0024] The first processor is configured to execute the method according to the second aspect when running a computer program.
[0025] In a fifth aspect, an embodiment of the present application provides a decoder, comprising a decoding unit, a second determining unit, and a second storage unit; wherein:
[0026] The decoding unit is configured to decode the code stream and determine the prediction parameters of the current chroma block;
[0027] The second determining unit is configured to determine, when the prediction parameter indicates that the current chroma block uses the first cross-component prediction mode, a candidate cross-component model for the current chroma block, wherein the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters;
[0028] The second determining unit is further configured to determine a target cross-component model for the current chroma block from the candidate cross-component models; and determine target cross-component model parameters for the current chroma block according to one or more cross-component model parameters included in the target cross-component model;
[0029] The second storage unit is configured to store the target cross-component model parameters.
[0030] In a sixth aspect, an embodiment of the present application provides a decoder, the 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 a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a code stream generated by the encoding method as described.
[0034] 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.
[0035] The embodiments of the present application provide a coding and decoding method, an encoder, a decoder, and a storage medium. Whether at the decoding end or the encoding end, when the current chroma block uses the first cross-component prediction mode, the target cross-component model of the current chroma block is determined from the candidate cross-component models; the target cross-component model parameters of the current chroma block are determined based on one or more cross-component model parameters included in the target cross-component model; and the target cross-component model parameters are saved. In this way, by saving the target cross-component model parameters of the current chroma block for inheritance and use by subsequent chroma blocks, there is no need to introduce additional bit consumption, and adaptive prediction operations can be performed based on the inherited parameters, thereby improving coding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] FIG1 is a block diagram of an encoder according to an embodiment of the present application;
[0038] FIG2 is a block diagram of a decoder according to an embodiment of the present application;
[0039] FIG3 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application;
[0040] FIG4 is a schematic diagram of a current block and adjacent reconstructed chroma pixels and reconstructed luminance pixels in a CCLM mode provided by an embodiment of the present application;
[0041] FIG5A is a schematic diagram of linear model parameters in a CCLM mode provided in an embodiment of the present application;
[0042] FIG5B is a schematic diagram of a method for adjusting linear model parameters in a CCLM_SLOPE mode provided in an embodiment of the present application;
[0043] FIG6 is a schematic diagram of calculating multiple linear models for pixel classification in an MMLM mode provided in an embodiment of the present application;
[0044] FIG7 is a schematic diagram of a filter shape provided in an embodiment of the present application;
[0045] FIG8 is a schematic diagram of a CCCM mode chrominance reference template area provided in an embodiment of the present application;
[0046] FIG9 is a schematic diagram of spatial input pixels of a GLCCCM mode provided in an embodiment of the present application;
[0047] FIG10 is a schematic diagram of a spatially adjacent candidate position provided in an embodiment of the present application;
[0048] FIG11 is a schematic diagram of non-adjacent candidate locations in a spatial domain provided by an embodiment of the present application;
[0049] FIG12 is a schematic diagram of a 3×3 low-pass filter provided in an embodiment of the present application;
[0050] FIG13 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;
[0051] FIG14 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0052] FIG15 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0053] FIG16 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;
[0054] FIG17 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0055] FIG18 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;
[0056] FIG19 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The following will describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] In video images, a coding block (CB) is generally represented by a first image component, a second image component, and a third image component. These three image components are a luminance component, a blue chrominance component, and a red chrominance component. Specifically, the luminance component is typically represented by the symbol Y, the blue chrominance component is typically represented by the symbols Cb or U, and the red chrominance component is typically represented by the symbols Cr or V. Thus, video images can be represented in either the YCbCr or YUV format.
[0062] Before further explaining the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained first. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:
[0063] Moving Picture Experts Group (MPEG)
[0064] International Standardization Organization (ISO)
[0065] International Electrotechnical Commission (IEC)
[0066] Joint Video Experts Team (JVET)
[0067] Alliance for Open Media (AOM)
[0068] Next-generation video coding standard H.266 / Versatile Video Coding (VVC)
[0069] VVC Test Model (VTM)
[0070] Audio Video Standard (AVS)
[0071] AVS High-Performance Model (HPM)
[0072] Digital video compression technology is understood to primarily compress massive amounts of digital video data for easier transmission and storage. With the surge in Internet video usage and increasing demand for higher-quality video, while existing digital video compression standards can conserve significant video data, there remains a need for improved digital video compression technologies to reduce bandwidth and traffic pressures associated with digital video transmission.
[0073] With the purpose of exploring the next generation of digital video compression technology, a new generation of reference software model ECM is developed based on the reference software VTM of the latest video coding standard H.266 / VVC. Existing video compression technology is also a traditional codec based on blocks. Referring to Figure 1, it shows a schematic block diagram of the composition of an encoder provided by an embodiment of the present application. As shown in Figure 1, the encoder (specifically a "video 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 of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is the process of generating motion vectors, The motion vector can estimate the motion of the video coding block, and then the motion compensation unit 104 performs motion compensation 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 also used to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated and determined motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block and reconstruct the residual block in the pixel domain. The reconstructed residual block is controlled by the filter. The analysis unit 107 and filtering unit 108 remove blocking artifacts and then add the reconstructed residual block to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video coding block. The coding unit 109 is used 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, outputting the bitstream of the video signal. The decoded image buffer unit 110 is used to store the reconstructed video coding block for prediction reference. As video image encoding progresses, new reconstructed video coding blocks are continuously generated and stored in the decoded image buffer unit 110.
[0074] Referring to Figure 2, which shows a schematic block diagram of a decoder provided in an embodiment of the present application, as shown in Figure 2, the decoder (specifically, a "video 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 buffer unit 206. 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 as shown in FIG1 , a 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 coefficients; the transform coefficients are 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 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses 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.
[0075] Furthermore, an embodiment of the present application also provides a network architecture of a coding and decoding system including an encoder and a decoder, wherein FIG3 shows a schematic diagram of a network architecture of a coding and decoding system provided by an embodiment of the present application. As shown in FIG3 , 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 are not specifically limited here. In addition, the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.
[0076] It should be noted that the method of the embodiment of the present application is mainly applied to the intra-frame prediction unit 103 shown in Figure 1 and the intra-frame prediction unit 203 shown in Figure 2. 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 at the same time, but the embodiment of the present application is not specifically limited thereto.
[0077] It should also be noted that, when applied to the intra-frame prediction unit 103, the "current block" specifically refers to the coding block currently to be intra-frame predicted; when applied to the intra-frame prediction unit 203, the "current block" specifically refers to the decoding block currently to be intra-frame predicted.
[0078] Intra-frame prediction includes multiple technologies, including a luma intra-frame prediction mode and a chroma intra-frame prediction mode. The embodiment of the present application aims to improve a cross-component prediction mode in the chroma intra-frame prediction mode.
[0079] The relevant syntax of the cross-component prediction mode is shown in Table 1:
[0080] Table 1
[0081] 1.1 Cross-component prediction mode
[0082] a) Cross-component prediction linear model CCLM
[0083] 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 roughly as shown in the following formula (1): C (i,j)=a·rec L ′(i,j)+b (1)
[0084] where pred c (i, j) represents the chroma prediction pixel of the current CU, rec L '(i, j) represents the downsampled reconstructed luma pixel of the current CU. a and b are called linear model parameters (a is the scaling parameter, b is the offset parameter), which are derived from the adjacent chroma and luma pixels. Since the linear model can be calculated at the codec end, it does not need to be written into the bitstream. Figure 4 shows an example of the current block and the adjacent reconstructed chroma and luma pixels in CCLM mode.
[0085] In addition to using all the upper reference pixels and the 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.
[0086] In CCLM-T mode, only the upper reference pixels are used to calculate the linear model parameters.
[0087] In CCLM-L mode, only the left reference pixels are used to calculate the linear model parameters.
[0088] To further improve the coding efficiency of CCLM, many improvements have been made to CCLM in ECM, including CCLM_SLOPE, MMLM, CCCM, etc. Some of these improvements are briefly introduced below.
[0089] In CCLM_SLOPE, the calculated linear model parameters can be adjusted as follows: a′=a+u,b′=bu*yr
[0090] The updated linear model parameters a′ and b′ are used to calculate the predicted pixel. This improvement tilts or rotates the mapping function around the point with luminance value yr, where yr is typically the average of the reference luminance samples. Figure 5A shows a schematic diagram of linear model parameters in CCLM mode, and Figure 5B shows a schematic diagram of how the linear model parameters are adjusted in CCLM_SLOPE mode.
[0091] In CCLM, only one linear model is used for the luma and chroma components of the same CU. In MMLM, multiple models can be provided for the same CU. Adjacent luma and chroma pixels are divided into different categories based on a classification threshold, and pixels in each category are used to calculate different model parameters. Figure 6 shows an example of computing multiple linear models for pixel classification in the MMLM model.
[0092] b) Convolutional cross-component prediction mode CCCM
[0093] In CCCM mode, the predicted pixel is obtained through a set of convolution filters. The 7-tap convolution filter usually contains 5 spatial components, a nonlinear term and a bias term. The pixel value is generated as shown in the following formula (2): C (x,y)=c0C+c1N+c2S+c3E+c4W+c5P+c6B (2)
[0094] The spatial components of this filter are shown in Figure 7.
[0095] Where C represents the corresponding brightness pixel, and N, S, W, and E represent the pixels above, below, left, and right of the corresponding pixel, respectively.
[0096] The nonlinear term P is expressed as a power of 2 of the center luminance sample C, scaled to the sample value range of the content.
[0097] P=(C*C+midVal)>>bitDepth
[0098] The bias term is set to the middle of the chroma values.
[0099] B=midVal
[0100] Where bitDepth represents the bit depth, and the value of midVal is determined according to the bit depth value. For example, when the bit depth is 10, the value of midVal is 512.
[0101] The convolution filter parameters are also derived from adjacent reconstructed pixels. Unlike CCLM, the reference template area of CCCM is shown in Figure 8. The reference area typically contains the reconstructed pixels in 6 rows and 6 columns surrounding the current block, as well as an extension area in the upper right and lower left corners. The outer circle represents the spatial component extension used in the convolution filter. The filter coefficients are calculated by minimizing the mean square error (MSE) between the predicted and reconstructed chrominance samples in the reference area. This MSE minimization is achieved by calculating the autocorrelation matrix of the luminance input and the cross-correlation vector between the luminance input and the chrominance output.
[0102] There are many derivative variations of the cross-component derivation mode based on the convolutional model, including the convolutional cross-component prediction mode based on gradient and location information (Gradient and location based CCCM, GLCCCM).
[0103] The GLCCCM mode refers to the gradient information and the position information of the current pixel when deriving the cross-component model, as shown in formula (3) pred C (x,y)=c0C+c1G y +c2G x +c3Y+c4X+c5P+c6B (3)
[0104] Among them G y and G x It represents the gradient in the vertical and horizontal directions and is calculated as follows. The input pixel values are shown in Figure 9.
[0105] Gy=(2N+NW+NE)–(2S+SW+SE)
[0106] Gx=(2W+NW+SW)–(2E+NE+SE)
[0107] Y and X represent the vertical and horizontal coordinates of the current pixel, and P and B are consistent with the original CCCM scheme.
[0108] Similar to CCLM, CCCM can choose to use different reference region shapes, that is, there are CCCM-T and CCCM-L modes. Similarly, CCCM can also choose to use multiple parameter models, that is, there is MM-CCCM mode. In this mode, the current input sample determines the specific convolution filter used according to the threshold to obtain the final predicted pixel value.
[0109] 1.2 Cross-component export mode
[0110] In the various cross-component linear model prediction modes introduced in 1.1, all linear model parameters (ccmParam) are calculated from adjacent reconstructed luma and chroma pixels. Based on this, a new cross-component prediction mode, called cross-component derivation mode (CCMerge), is proposed. In this mode, the ccmParam of the current coding block is directly inherited from the reconstructed block, rather than being calculated. The flag ccmMrgFlag indicates whether the current block uses cross-component derivation mode. If 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 coding blocks and the history information list. By default, the existing list has an upper limit of 12 candidates (NUM_LMC_MERGE_CANDS). If the above process does not fill the list, it is filled according to the preset default parameters. The candidate index ccmMrgIdx indicates the specific parameters to be used.
[0111] The candidate list is populated as follows:
[0112] 1. Spatial adjacent candidates
[0113] First, the spatial adjacent blocks are checked. The positions of the adjacent blocks are shown in Figure 10, and the checking order is B1->A1->B0->A0->B2.
[0114] 2. Spatial non-adjacent candidates
[0115] After checking all spatially adjacent candidates, spatially non-adjacent candidates are considered, and their positional relationship is shown in Figure 11.
[0116] 3. Parameter Candidates Based on Historical Information
[0117] A history-based table is maintained to contain the most recently used ccmParams, and the table is reset at the beginning of each CTU row. If the current list is not full after including spatially adjacent and non-adjacent candidates, the ccmParams in the history-based table are added to the list.
[0118] 4. Default Parameters CCLM Candidate
[0119] If the list is not filled, then after checking spatially adjacent and non-adjacent candidates, CCLM candidates with default scaling parameters are considered. The default scaling parameters are {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8}. If CCLM type candidates exist in the previous construction process, the scaling parameters of the first CCLM type candidate added (here a first represents) is adjusted and added to the candidate list, in which case the scaling parameters are {0,a first +{1 / 8,-1 / 8,2 / 8,-2 / 8,3 / 8,-3 / 8,4 / 8,-4 / 8,5 / 8,-5 / 8,6 / 8}}
[0120] The inheritance rules for parameters are as follows:
[0121] When inheriting a CCLM candidate, only the scale parameters are inherited. The offset parameters are recalculated.
[0122] When inheriting an MMLM candidate, the scaling parameters and classification thresholds are inherited. The offset parameters are recalculated, but if no adjacent reconstructed samples are available in the classification, the offset parameters are also inherited directly.
[0123] When inheriting a CCCM candidate, all convolution parameters and classification thresholds are inherited.
[0124] 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.
[0125] When the chroma fusion mode is inherited, the MMLM parameters derived from the cross-component prediction part are inherited as candidates.
[0126] When inheriting a CCMerge candidate, the inheritance method depends on the candidate mode it inherits from.
[0127] 1.3 Multi-model cross-component prediction mode filtering
[0128] The cross-component prediction mode introduced in 1.1 includes a multi-model mode that provides multiple models for the same CU. The specific cross-component model used is then determined based on the relationship between the reference pixel and the threshold to generate the final prediction value. Because adjacent pixels may have uneven predictions due to the use of different cross-component models, a 3x3 low-pass filter, as shown in Figure 12, is implemented for the multi-model cross-component prediction mode. This filter is applied to the prediction samples generated by the cross-component prediction mode. For pixels at the boundaries of the prediction samples, the filtering process may involve neighboring reconstructed pixels. For pixels within the prediction sample, the filtering process only involves the predicted pixels within the sample. For non-existent pixels, internal predicted pixels are used as padding, depending on the situation. This mode, when the conditions for the multi-model cross-component prediction mode are met, encodes a flag bit, ccInsideFilter, to indicate whether to use this mode. If the ccInsideFilter value is 1, filtering is performed on the predicted pixel values; if the ccInsideFilter value is 0, filtering is not performed on the predicted pixel values.
[0129] 1.4 Decoding side derives cross-component prediction
[0130] There are many types of cross-component prediction modes currently, and more flags are needed to indicate the specific cross-component prediction model type, template type, or sub-mode used by the current block. Decoding-side derived cross-component prediction mode proposes a new cross-component prediction mode, which uses a flag decoderDerivedCcpMode to indicate whether to use this technology. If this technology is used, a cross-component model list is constructed at the decoding end, which will be uniformly referred to as the decoding-side derived cross-component model list and represented by DDList. The list contains some preset cross-component model types, such as CCCM and GLCCCM. At the same time, if conditions permit, these cross-component model types include whether to use a single model or multiple models, and whether to use prediction filtering technology. These cross-component models can be derived from the surrounding reconstructed pixels according to their original mode scheme, or obtained from the candidate list under the cross-component derivation mode, that is, borrowing the cross-component models of other decoded blocks; then the template costs of the cross-component models in the cross-component model list derived by the decoding end on the reference template are calculated in turn (the reference template here is usually composed of the reconstructed pixels in one row and one column adjacent to the current block, and the template cost usually refers to the error between the predicted value obtained by the current mode acting on the template and the original reconstructed value), and they are combined in pairs to calculate the template cost under weighted fusion; finally, the scheme with the smallest template cost is selected as the prediction scheme for the current block, and the cross-component prediction model with the smallest template cost is selected as the cross-component prediction model of the current block for reference by other blocks.
[0131] However, when the cross-component prediction mode is used in the actual encoding process, some model information of the current block cannot be fully utilized by the subsequent blocks to be encoded or decoded, and the improvement in prediction accuracy brought by the derived cross-component prediction mode cannot be fully utilized, affecting the encoding and decoding efficiency.
[0132] Based on this, the embodiment of the present application provides a coding method
[0133] To facilitate understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be combined arbitrarily with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application. The embodiments of the present application include at least part of the following contents.
[0134] In one embodiment of the present application, referring to FIG13 , a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG13 , the method may include:
[0135] S1301: Decode the code stream and determine the prediction parameters of the current chroma block;
[0136] It should be noted that the prediction parameter is used to indicate whether to use the first cross-component prediction mode to perform cross-component prediction on the current chroma block. If the prediction parameter is used to indicate the use of the first cross-component prediction mode to perform cross-component prediction on the current chroma block, the subsequent prediction method steps of the embodiment of the present application are performed; if the prediction parameter is used to indicate not to use the first cross-component prediction mode to perform cross-component prediction on the current chroma block, other prediction modes are used for prediction. Exemplarily, when the prediction parameter value is 1, it is determined to use the first cross-component prediction mode; when the prediction parameter value is 0, it is determined not to use the first cross-component prediction mode.
[0137] The first cross-component prediction mode can be a template-based cross-component model derivation mode. Specifically, in the first cross-component prediction mode, the candidate cross-component model is applied to the reference template of the current chroma block, and a target cross-component model is selected based on the template cost to predict the current chroma block and serve as a reference for other blocks.
[0138] In some embodiments, the first cross-component prediction mode may specifically be a decoding-side derived cross-component prediction (DDCCP) mode, a cross-component derivation (CCMerge) mode, or the like.
[0139] S1302: When the prediction parameter indicates that the current chroma block uses the first cross-component prediction mode, determine a candidate cross-component model for the current chroma block, where the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters.
[0140] In some embodiments, the candidate cross-component model comprises at least one of the following: one or more preset cross-component models, one or more cross-component models in the cross-component derivation mode candidate list of the current chroma block.
[0141] The one or more preset cross-component models may include at least one of the following: one or more models in CCLM mode, one or more models in CCCM mode, one or more models in GLCCM mode, etc. In some embodiments, the one or more preset cross-component models are determined based on historical information.
[0142] The cross-component derivation mode candidate list can be established based on the cross-component model of the reconstructed reference block of the current chrominance block. The list is filled with existing cross-component model parameters from spatially adjacent and spatially non-adjacent reconstructed reference blocks and the historical information list. By default, the existing list has an upper limit of 12 for the number of candidates, NUM_LMC_MERGE_CANDS. When the above process does not fill the list, it is filled according to the preset default parameters. Some or all of the cross-component models in the cross-component derivation mode candidate list are used as candidate cross-component models for the current block. Exemplarily, the candidate cross-component model is determined from the cross-component derivation mode candidate list according to a specific mode type and / or a specific model type.
[0143] In some embodiments, one or more cross-component model parameters may include one of the following: a cross-component prediction mode type, a cross-component model type, a model parameter, and a prediction filter flag. The cross-component prediction mode may include CCLM, CCCM, GLCCM, etc. The cross-component model type may include a single model and a multi-model. The model parameters correspond to the cross-component mode type and model type, such as scaling parameters, offset parameters, convolution parameters, and classification thresholds of a linear model. The prediction filter flag is used to indicate whether filtering is performed on the predicted value during the current chroma block prediction process.
[0144] S1303: Determine a target cross-component model for the current chroma block from the candidate cross-component models;
[0145] In some embodiments, the code stream is decoded to determine the index value of the target cross-component model; based on the index value of the target cross-component model, the target cross-component model of the current chroma block is determined from the candidate cross-component models. That is, when it is determined to use the first cross-component prediction mode, the target cross-component model can be determined by the index value idx. Further, the target cross-component model parameters of the current chroma block are determined based on the cross-component model parameters corresponding to DDList[idx].
[0146] In other embodiments, based on the template of the current chroma block, the predicted cost value of the candidate cross-component model is determined; based on the predicted cost value, the target cross-component model of the current chroma block is determined. Here, the predicted cost value can be understood as the template cost value, including but not limited to the sum of absolute errors (SAD), the sum of transformed absolute errors (SATD), the sum of squared differences (SSE), the mean absolute difference (MAD), the mean absolute error (MAE), the mean squared error (MSE), etc. The candidate cross-component models are re-sorted based on the predicted cost value. The smaller the predicted cost value, the higher the sorting position. One or more cross-component models are selected based on the template cost value. In other words, the target cross-component model includes one or more cross-component models, and "multiple" indicates two or more.
[0147] Exemplarily, based on the template of the current chroma block, the prediction cost value of the candidate cross-component model is determined, including: using one cross-component model and / or at least two cross-component models in the candidate cross-component models to predict the template of the current chroma block, and determining the first predicted sample value of the template of the current chroma block; determining the prediction cost value of one or at least two cross-component models based on the first reconstructed sample value and the first predicted sample value of the template of the current chroma block.
[0148] It should be noted that each cross-component model in the candidate cross-component model can be applied to the reference template of the current chroma block for prediction to obtain the first predicted sample value of the template of the current chroma block. If the current chroma block allows weighted fusion prediction, the candidate cross-component models can also be combined in pairs to apply weighted fusion prediction to the reference template of the current chroma block to obtain the first predicted sample value of the template of the current chroma block. Three or more combinations can also be applied to the reference template of the current chroma block for weighted fusion prediction to obtain the first predicted sample value of the template of the current chroma block.
[0149] Exemplarily, determining the target cross-component model of the current chroma block based on the predicted cost value includes: determining a first cross-component model corresponding to the minimum predicted cost value based on the predicted cost values of one or at least two cross-component models; determining not to perform weighted fusion prediction on the current chroma block based on the fusion identifier of the first cross-component model, and determining to predict the current chroma block based on the first cross-component model; determining to perform weighted fusion prediction on the current chroma block based on the fusion identifier of the first cross-component model, determining a second cross-component model, and performing weighted fusion prediction on the current chroma block based on the first cross-component model and the second cross-component model, wherein the second cross-component model includes one or more cross-component models. In other words, the candidate cross-component models are reordered based on the predicted cost value of the template, and the target cross-component model can be directly determined based on the reordered list without introducing additional bit consumption.
[0150] Exemplarily, determining a target cross-component model for the current chroma block based on the predicted cost value includes: reordering candidate cross-component models based on the predicted cost value to obtain a reordered cross-component model list; and selecting the target cross-component model from the reordered cross-component model list based on an index value of the target cross-component model. Models with smaller template cost values after reordering have smaller index values, and encoding this index value can save bitrate.
[0151] In some embodiments, the method further includes: determining a predicted value of the current chroma block based on one or more cross-component model parameters included in the target cross-component model; and determining a reconstructed value of the current chroma block based on the predicted value.
[0152] Exemplarily, the current chroma block is predicted according to the first cross-component model to obtain a first prediction value; if the prediction filter identifier of the first cross-component model indicates filtering processing, the first prediction value is filtered to obtain a prediction value of the current chroma block.
[0153] Exemplarily, the current chroma block is predicted according to the first cross-component model to obtain a first prediction value; the current chroma block is predicted according to the second cross-component model to obtain a second prediction value; if the prediction filter flag of the first cross-component model indicates filtering, the first prediction value is filtered to obtain the prediction value of the first cross-component model; if the prediction filter flag of the second cross-component model indicates filtering, the second prediction value is filtered to obtain the prediction value of the second cross-component model; the prediction value of the first cross-component model and the prediction value of the second cross-component model are weighted and fused to obtain the prediction value of the current chroma block. The weighting coefficient can be determined according to the prediction cost value of each cross-component model, or can be a fixed weighting coefficient or an average value.
[0154] S1304: Determine target cross-component model parameters of the current chroma block according to one or more cross-component model parameters included in the target cross-component model;
[0155] The target cross-component model parameters may include one or more cross-component model parameters, and may be derived according to the one or more cross-component model parameters included in the target cross-component model.
[0156] In some embodiments, the target cross-component model parameters include a target prediction filter identifier. The target prediction filter identifier is used to indicate whether the predicted value is filtered during the current chroma block prediction process. Exemplarily, the target prediction filter identifier can be represented as ccInsideFilter. If the ccInsideFilter value is 1, it means that the predicted value needs to be filtered; if the ccInsideFilter value is 0, it means that the predicted value does not need to be filtered. In the first cross-component prediction mode, by inheriting the prediction filter identifier of the reconstructed block, the prediction block can be adaptively filtered without introducing additional bit consumption, thereby improving coding efficiency.
[0157] In some embodiments, the target prediction filter flag of the current chroma block is determined according to the prediction filter flag of the target cross-component model, wherein the prediction filter flag of the target cross-component model indicates whether to perform filtering processing on the prediction value when using the target cross-component model.
[0158] Exemplarily, the target cross-component model includes a first cross-component model, and the target prediction filter identifier of the current chroma block is determined based on the prediction filter identifier of the target cross-component model, including: using the prediction filter identifier of the first cross-component model as the target prediction filter identifier. The first cross-component model can be the optimal cross-component model among the candidate cross-component models. In some embodiments, the prediction filter identifier of the optimal cross-component model is directly used as the target prediction filter identifier of the current chroma block. In other embodiments, in the first cross-component prediction mode, and without weighted fusion, the prediction filter identifier of the optimal cross-component model is used as the target prediction filter identifier of the current chroma block.
[0159] Exemplarily, the target cross-component model includes a first cross-component model and a second cross-component model, that is, two or more cross-component models can be determined from the candidate cross-component models based on the template cost, and then the current chroma block is weightedly fused according to the two or more cross-component models to obtain a predicted value.
[0160] Correspondingly, the target prediction filter identifier of the current chroma block is determined according to the prediction filter identifier of the target cross-component model, including: the prediction filter identifier of the first cross-component model is the first value, and the prediction filter identifier of the second cross-component model is the first value, and the target prediction filter identifier is determined to be the first value; or, the prediction filter identifier of the first cross-component model is the first value, or the prediction filter identifier of the second cross-component model is the first value, and the target prediction filter identifier is determined to be the first value.
[0161] Exemplarily, the first value may be 1, which indicates that the predicted value is filtered. In the first cross-component prediction mode, weighted fusion is performed, and the prediction filter identifier of the current chroma block is determined based on the prediction filter identifiers of the two cross-component models that are weighted fused. In some embodiments, the prediction filter identifier of the current chroma block is set to 1 only when both the prediction filter identifiers of the two cross-component models are 1. In other embodiments, if one of the prediction filter identifiers of the two cross-component models is 1, the value of the prediction filter identifier of the current chroma block can be set to 1.
[0162] For example, the first value may be 0, indicating that no filtering is performed on the prediction value. The prediction filter flags of both cross-component models are 0, and the value of the prediction filter flag of the current chroma block is set to 0. In other embodiments, if one of the prediction filter flags of the two cross-component models is 0, the value of the prediction filter flag of the current chroma block may be set to 0.
[0163] S1305: Save target cross-component model parameters.
[0164] In some embodiments, the current block has a specific storage space (represented by curCand in the embodiments of the present application) for storing the cross-component model parameters of the current block for subsequent use. Exemplarily, when the target cross-component model parameters include a target prediction filter identifier, the target cross-component filter identifier ccInsideFilter of the current chroma block is stored in curCand, which can be represented by curCand.ccInsideFilter for subsequent use.
[0165] In some embodiments, the target cross-component model parameters further include at least one of a cross-component prediction mode type, a cross-component model type, model parameters, etc., which are also stored in a specific storage space of the current block.
[0166] During the decoding process, the block to be decoded can obtain the cross-component model parameters of the corresponding block from the cross-component model parameter storage space of the reconstructed block. The prediction filter identifier in the cross-component prediction parameters can also be inherited when the current block uses the first cross-component prediction mode, just like the cross-component model parameters. If the current block uses the first cross-component prediction mode, the prediction filter identifier ccInsideFilter and other parameters of the current block are stored in curCand. ccInsideFilter can be represented by curCand.ccInsideFilter for subsequent use to improve decoding efficiency.
[0167] For example, taking the first cross-component prediction mode as an example, a decoding process is specifically as follows:
[0168] If the decoder determines that the current chroma block uses the decoder-derived cross-component prediction mode, the decoder obtains the cross-component model list DDList based on the derivation process of the mode. The size of the list is numDdccpModes, and its specific value is constructed during the derivation process. Idx represents the index, and its value is between 0 and numDdccpModes-1. DDList[idx] can indicate that the corresponding cross-component model information in the list is found according to the index. The cross-component model information includes the cross-component mode type (CCLM, CCCM, GLCCCM, etc.), model type (single model or multiple models), cross-component model parameters (model parameters corresponding to the cross-component mode type), prediction filter flag (whether filtering is performed after prediction), fusion flag (whether weighted fusion with the prediction results of other models), and template cost (the cost of the current model acting on the template). After reordering the template cost values, the smaller the index value, the smaller the template cost value. Therefore, the cross-component model represented by DDlist[0] has the smallest template cost value. Then, according to DDlist[0].isFusion, it is determined whether weighted fusion is required. If weighted fusion is not required, the cross-component model represented by DDlist[0] is used for prediction. If weighted fusion is required, the cross-component models represented by DDlist[0] and DDlist[1] are used for prediction and then weighted fusion is performed. Each model processes the predicted value according to the prediction filter identifier in the current model. After the prediction process is completed, the value of ccInsideFilter of the current block is set according to the prediction filter identifier in DDlist[0]. That is, if the prediction filter identifier in DDlist[0] is 1, the value of ccInsideFilter is set to 1; if the prediction filter identifier in DDlist[0] is 0, the value of ccInsideFilter is set to 0. It is stored in the cross-component model structure curCand of the current block, that is, curCand.ccInsideFilter, for subsequent use. During the decoding process, the block to be decoded can obtain the cross-component model parameters of the corresponding block from the cross-component model parameter storage space of the decoded block, making full use of the improvement in prediction accuracy brought by the prediction filtering technology.
[0169] In yet another embodiment of the present application, referring to FIG14 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. As shown in FIG14 , the method may include:
[0170] S1401: Determine a candidate cross-component model for a current chroma block, where the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters;
[0171] In some embodiments, when the current chroma block allows the use of the first cross-component prediction mode for cross-component prediction, a candidate cross-component model of the current chroma block is determined. The syntax elements used to indicate whether the current chroma block allows the use of the first cross-component prediction mode for cross-component prediction may include at least one of the following: coding tree unit level syntax elements, image level syntax elements, sequence level syntax elements, etc. If allowed, the encoding end uses the first cross-component prediction mode provided in the embodiment of the present application to predict and reconstruct the current chroma block, and compares the prediction cost value with the prediction cost value of other prediction modes to determine whether to use the first cross-component prediction mode.
[0172] The first cross-component prediction mode can be a template-based cross-component model derivation mode. Specifically, in the first cross-component prediction mode, the candidate cross-component model is applied to the reference template of the current chroma block, and a target cross-component model is selected based on the template cost to predict the current chroma block and serve as a reference for other blocks.
[0173] In some embodiments, the first cross-component prediction mode may specifically be a decoding-side derived cross-component prediction (DDCCP) mode, a cross-component derivation (CCMerge) mode, or the like.
[0174] S1402: Determine a target cross-component model for the current chroma block from candidate cross-component models;
[0175] In some embodiments, the candidate cross-component models are traversed to determine the target cross-component model of the current chroma block. Accordingly, the method further includes: encoding the index value of the target cross-component model when determining that the current chroma block uses the first cross-component prediction mode based on the prediction value. That is, the candidate cross-component models are traversed, and if the RDO cost value of the current chroma block is the optimal cost value when one or more cross-component models among the candidate cross-component models are used for cross-component prediction, the index value of the target cross-component model is encoded, so that the decoding end can determine the target cross-component prediction mode based on the index value.
[0176] In other embodiments, based on the template of the current chroma block, the predicted cost value of the candidate cross-component model is determined; based on the predicted cost value, the target cross-component model of the current chroma block is determined. Here, the predicted cost value can be understood as the template cost value, including but not limited to the sum of absolute errors (SAD), the sum of transformed absolute errors (SATD), the sum of squared differences (SSE), the mean absolute difference (MAD), the mean absolute error (MAE), the mean squared error (MSE), etc. The candidate cross-component models are re-sorted based on the predicted cost value. The smaller the predicted cost value, the higher the sorting position. One or more cross-component models are selected based on the template cost value. In other words, the target cross-component model includes one or more cross-component models, and "multiple" indicates two or more.
[0177] Exemplarily, based on the template of the current chroma block, the prediction cost value of the candidate cross-component model is determined, including: using one cross-component model and / or at least two cross-component models in the candidate cross-component models to predict the template of the current chroma block, and determining the first predicted sample value of the template of the current chroma block; determining the prediction cost value of one or at least two cross-component models based on the first reconstructed sample value and the first predicted sample value of the template of the current chroma block.
[0178] It should be noted that each cross-component model in the candidate cross-component model can be applied to the reference template of the current chroma block for prediction to obtain the first predicted sample value of the template of the current chroma block. If the current chroma block allows weighted fusion prediction, the candidate cross-component models can also be combined in pairs to apply weighted fusion prediction to the reference template of the current chroma block to obtain the first predicted sample value of the template of the current chroma block. Three or more combinations can also be applied to the reference template of the current chroma block for weighted fusion prediction to obtain the first predicted sample value of the template of the current chroma block.
[0179] Exemplarily, determining the target cross-component model of the current chroma block based on the predicted cost value includes: determining a first cross-component model corresponding to the minimum predicted cost value based on the predicted cost values of one or at least two cross-component models; determining not to perform weighted fusion prediction on the current chroma block based on the fusion identifier of the first cross-component model, and determining to predict the current chroma block based on the first cross-component model; determining to perform weighted fusion prediction on the current chroma block based on the fusion identifier of the first cross-component model, determining a second cross-component model, and performing weighted fusion prediction on the current chroma block based on the first cross-component model and the second cross-component model, wherein the second cross-component model includes one or more cross-component models. In other words, the candidate cross-component models are reordered based on the predicted cost value of the template, and the target cross-component model can be directly determined based on the reordered list without introducing additional bit consumption.
[0180] Exemplarily, determining a target cross-component model for a current chroma block based on a predicted cost value includes: reordering candidate cross-component models based on the predicted cost value to obtain a reordered list of cross-component models; determining an index value of a target cross-component model from the reordered list of cross-component models; and encoding the index value of the target cross-component model. Models with smaller template cost values after reordering have smaller index values, and encoding this index value can save bitrate.
[0181] In some embodiments, the method further includes: determining a predicted value of the current chroma block based on one or more cross-component model parameters included in the target cross-component model; and determining a reconstructed value of the current chroma block based on the predicted value.
[0182] Correspondingly, the current chroma block is predicted according to the first cross-component model to obtain a first prediction value; if the prediction filter identifier of the first cross-component model indicates filtering processing, the first prediction value is filtered to obtain a prediction value of the current chroma block.
[0183] Accordingly, the current chroma block is predicted according to the first cross-component model to obtain a first prediction value; the current chroma block is predicted according to the second cross-component model to obtain a second prediction value; if the prediction filter flag of the first cross-component model indicates filtering, the first prediction value is filtered to obtain the prediction value of the first cross-component model; if the prediction filter flag of the second cross-component model indicates filtering, the second prediction value is filtered to obtain the prediction value of the second cross-component model; the prediction value of the first cross-component model and the prediction value of the second cross-component model are weighted and fused to obtain the prediction value of the current chroma block. The weighting coefficient can be determined according to the prediction cost value of each cross-component model, or can be a fixed weighting coefficient or an average value.
[0184] S1403: Determine a prediction value of the current chroma block according to one or more cross-component model parameters included in the target cross-component model;
[0185] In some embodiments, the method further includes: determining a reconstruction value of the current chroma block based on the prediction value; determining a prediction cost value of the first cross-component prediction mode based on the reconstruction value and the original value of the current chroma block; determining that the current chroma block uses the first cross-component prediction mode when the prediction cost value of the first cross-component prediction mode is the minimum prediction cost value of the current chroma block; and determining that the current chroma block does not use the first cross-component prediction mode when the prediction cost value of the first cross-component prediction mode is not the minimum prediction cost value of the current chroma block.
[0186] Here, the prediction cost value can be understood as a prediction cost value when the current chroma block uses the first cross-component prediction mode, including but not limited to rate-distortion cost (RDO), sum of absolute difference (SAD), transform sum of absolute difference (SATD), sum of squared differences (SSE), mean absolute difference (MAD), mean absolute error (MAE), mean squared error (MSE), etc. The encoder determines the optimal prediction mode for the current chroma block by comparing the prediction cost values of the current chroma block under multiple prediction modes.
[0187] In some embodiments, the method further comprises: determining target cross-component model parameters of the current chroma block according to one or more cross-component model parameters included in the target cross-component model.
[0188] The target cross-component model parameters may include one or more cross-component model parameters, and may be derived according to the one or more cross-component model parameters included in the target cross-component model.
[0189] In some embodiments, the target cross-component model parameters include a target prediction filter flag. The target prediction filter flag is used to indicate whether the prediction value is filtered during the current chroma block prediction process. Exemplarily, the target prediction filter flag can be represented by ccInsideFilter. If the ccInsideFilter value is 1, it indicates that the prediction value needs to be filtered; if the ccInsideFilter value is 0, it indicates that the prediction value does not need to be filtered.
[0190] In some embodiments, the method further comprises: determining a target prediction filter flag for the current chroma block based on a prediction filter flag of the target cross-component model, wherein the prediction filter flag of the target cross-component model indicates whether to perform filtering on the prediction value when using the target cross-component model.
[0191] Exemplarily, the target cross-component model includes a first cross-component model, and the target prediction filter identifier of the current chroma block is determined based on the prediction filter identifier of the target cross-component model, including: using the prediction filter identifier of the first cross-component model as the target prediction filter identifier. The first cross-component model can be the optimal cross-component model among the candidate cross-component models. In some embodiments, the prediction filter identifier of the optimal cross-component model is directly used as the target prediction filter identifier of the current chroma block. In other embodiments, in the first cross-component prediction mode, and without weighted fusion, the prediction filter identifier of the optimal cross-component model is used as the target prediction filter identifier of the current chroma block.
[0192] Exemplarily, the target cross-component model includes a first cross-component model and a second cross-component model, that is, two or more cross-component models can be determined from the candidate cross-component models based on the template cost, and then the current chroma block is weightedly fused according to the two or more cross-component models to obtain a predicted value.
[0193] Correspondingly, the target prediction filter identifier of the current chroma block is determined according to the prediction filter identifier of the target cross-component model, including: the prediction filter identifier of the first cross-component model is the first value, and the prediction filter identifier of the second cross-component model is the first value, and the target prediction filter identifier is determined to be the first value; or, the prediction filter identifier of the first cross-component model is the first value, or the prediction filter identifier of the second cross-component model is the first value, and the target prediction filter identifier is determined to be the first value.
[0194] Exemplarily, the first value may be 1, which indicates that the predicted value is filtered. In the first cross-component prediction mode, weighted fusion is performed, and the prediction filter identifier of the current chroma block is determined based on the prediction filter identifiers of the two cross-component models that are weighted fused. In some embodiments, the prediction filter identifier of the current chroma block is set to 1 only when both the prediction filter identifiers of the two cross-component models are 1. In other embodiments, if one of the prediction filter identifiers of the two cross-component models is 1, the value of the prediction filter identifier of the current chroma block can be set to 1.
[0195] For example, the first value may be 0, indicating that no filtering is performed on the prediction value. The prediction filter flags of both cross-component models are 0, and the value of the prediction filter flag of the current chroma block is set to 0. In other embodiments, if one of the prediction filter flags of the two cross-component models is 0, the value of the prediction filter flag of the current chroma block may be set to 0.
[0196] S1404: When it is determined according to the prediction value that the current chroma block uses the first cross-component prediction mode, save the target cross-component model parameters of the current chroma block, wherein the target cross-component model is determined according to one or more cross-component model parameters included in the target cross-component model.
[0197] In some embodiments, the current block has a specific storage space (represented by curCand in the embodiments of the present application) for storing the cross-component model parameters of the current block for subsequent use. Exemplarily, when the target cross-component model parameters include a target prediction filter identifier, the target cross-component filter identifier ccInsideFilter of the current chroma block is stored in curCand, which can be represented by curCand.ccInsideFilter for subsequent use.
[0198] In some embodiments, the target cross-component model parameters further include at least one of a cross-component prediction mode type, a cross-component model type, model parameters, etc., which are also stored in a specific storage space of the current block.
[0199] During the encoding process, the block to be encoded can obtain the cross-component model parameters of the corresponding block from the cross-component model parameter storage space of the reconstructed block. The prediction filter identifier in the cross-component prediction parameters can also be inherited when the current block uses the first cross-component prediction mode, just like the cross-component model parameters. If the current block uses the first cross-component prediction mode, the prediction filter identifier ccInsideFilter and other parameters of the current block are stored in curCand. ccInsideFilter can be represented by curCand.ccInsideFilter for subsequent use to improve encoding efficiency.
[0200] In some embodiments, the method further includes: determining a prediction parameter for the current chroma block, when determining that the current chroma block uses the first cross-component prediction mode based on the prediction value, wherein the prediction parameter is used to indicate that the current chroma block uses the first cross-component prediction mode; encoding the prediction parameter, and writing the resulting coded bits into a bitstream for reading by a decoder. Exemplarily, when the prediction parameter takes a value of 1, it is determined that the first cross-component prediction mode is used, and when the prediction parameter takes a value of 0, it is determined that the first cross-component prediction mode is not used.
[0201] In some embodiments, the prediction parameter is encoded when the prediction parameter value is 1, and is not encoded when the prediction parameter value is 0. In practical applications, if the prediction parameter is not encoded, the decoding end may determine that the prediction parameter value is a default value.
[0202] For example, taking the first cross-component prediction mode as an example, the decoding end derives the cross-component prediction mode, and an encoding process is specifically as follows:
[0203] When the encoder attempts to use the decoder to derive the cross-component mode for the current chroma block, it obtains the decoder's cross-component model list DDList based on the derivation process of the mode. The size of this list is numDdccpModes, and the cross-component model with the best template cost value, that is, DDList[0]. Then, according to DDlist[0].isFusion, it is determined whether weighted fusion is required. If weighted fusion is not required, the cross-component model represented by DDlist[0] is used for prediction. If weighted fusion is required, the cross-component models represented by DDlist[0] and DDlist[1] are used for prediction and then weighted fusion is performed. Each model processes the prediction value accordingly based on the prediction filter identifier in the current model to obtain the prediction value of the cross-component mode derived by the decoding end, performs RDO calculation based on the prediction value, and determines the RDO cost value of the cross-component mode derived by the decoding end; and compares the RDO cost value of the current mode with the optimal cost value. If the RDO cost value of the current mode is smaller than the optimal cost value, the flag bit decoderDerivedCcpMode of the current mode is set to 1, and the value of the prediction filter identifier in DDList[0] is set to the value of the prediction filter identifier ccInsideFlag of the current chroma block. The value of ccInsideFlag is also saved in curCand.ccInsideFlag for subsequent use. During the encoding process, the block to be encoded can obtain the cross-component model parameters of the corresponding block from the cross-component model parameter storage space of the encoded block, making full use of the improvement in prediction accuracy brought by the prediction filtering technology.
[0204] The above scheme is to set the value of the prediction filter identifier ccInsideFlag of the current chroma block according to the value of the prediction filter identifier in DDList[0]. In other embodiments, when the cross-component prediction mode is derived at the decoding end and weighted fusion is required, the value of the prediction filter identifier ccInsideFlag of the current chroma block is determined according to the value of the two candidate prediction filter identifiers of the weighted fusion. For example, the value of ccInsideFlag of the current block is set to 1 only when both candidate prediction filter identifiers are 1. Another scheme is to set the value of ccInsideFlag of the current block to 1 when one of the two candidate prediction filter identifiers is 1.
[0205] Furthermore, the technical solution provided in the embodiment of the present application was performance tested. The performance test results of the cross-component prediction technology derived by the original decoding end are shown in Table 2. The performance test results of the cross-component prediction technology derived by the decoding end provided in the embodiment of the present application are shown in Table 3. The performance comparison of the present application and the original solution is shown in Table 4.
[0206] Table 2
[0207] Table 3
[0208] Table 4
[0209] As can be seen from Table 3, when the cross-component prediction mode is derived at the decoding end, the prediction filter flag of the current block is saved for inheritance by subsequent chroma blocks without introducing additional bit consumption. Adaptive prediction operations can be performed based on the inherited parameters, thereby improving encoding and decoding efficiency.
[0210] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see FIG15 , which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in FIG15 , the encoder 150 may include a first determination unit 1501, a first prediction unit 1502, and a first storage unit 1503; wherein,
[0211] A first determining unit 1501 is configured to determine a candidate cross-component model of a current chroma block, wherein the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters;
[0212] The first determining unit 1501 is further configured to determine a target cross-component model for the current chroma block from the candidate cross-component models;
[0213] A first prediction unit 1502 is configured to determine a prediction value of a current chroma block according to one or more cross-component model parameters included in a target cross-component model;
[0214] The first storage unit 1503 is configured to save the target cross-component model parameters of the current chroma block when it is determined based on the prediction value that the current chroma block uses the first cross-component prediction mode, wherein the target cross-component model is determined based on one or more cross-component model parameters of the target cross-component model.
[0215] The first prediction unit 1502 is configured to determine a prediction parameter of the current chroma block when it is determined according to the prediction value that the current chroma block uses the first inter-component prediction mode, wherein the prediction parameter is used to indicate that the current chroma block uses the first inter-component prediction mode;
[0216] In some embodiments, the encoder 150 may further include an encoding unit configured to encode the prediction parameters and write the obtained encoded bits into a bitstream.
[0217] It can be understood that each functional unit of the encoder also executes the encoding method of any one of the aforementioned embodiments.
[0218] 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.
[0219] 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 of this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0220] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 150. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method of any one of the aforementioned embodiments.
[0221] An embodiment of the present application provides a computer-readable storage medium, which stores a code stream generated by the encoding method.
[0222] Based on the composition of the encoder 150 and the computer-readable storage medium, refer to Figure 16, which shows a specific hardware structure diagram of the encoder 150 provided in an embodiment of the present application. As shown in Figure 16, the encoder 150 may include: a first communication interface 1601, a first memory 1602 and a first processor 1603; each component is coupled together through a first bus system 1604. It can be understood that the first bus system 1604 is used to achieve connection and communication between these components. In addition to the data bus, the first 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 first bus system 1604 in Figure 16. Among them,
[0223] The first communication interface 1601 is used to receive and send signals when sending and receiving information with other external network elements;
[0224] A first memory 1602 is used to store computer programs that can be run on the first processor 1603;
[0225] The first processor 1603 is configured to, when running the computer program, execute:
[0226] Determine a candidate cross-component model for the current chroma block, wherein the candidate cross-component model comprises one or more cross-component models, and each cross-component model comprises one or more cross-component model parameters;
[0227] Determine a target cross-component model for the current chroma block from the candidate cross-component models;
[0228] Determine a prediction value for a current chroma block based on one or more cross-component model parameters included in the target cross-component model;
[0229] When it is determined according to the prediction value that the current chroma block uses the first cross-component prediction mode, the target cross-component model parameters of the current chroma block are saved, wherein the target cross-component model is determined according to one or more cross-component model parameters included in the target cross-component model.
[0230] It is understood that the first memory 1602 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 1602 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0231] The first processor 1603 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 1603. The above-mentioned first processor 1603 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 1602 , and the first processor 1603 reads the information in the first memory 1602 and completes the steps of the above method in combination with its hardware.
[0232] It is understood that the embodiments described herein can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSP devices, DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions of the present application or a combination thereof. For software implementation, the technology of the present application can be implemented by a module (such as a process, a function, etc.) that performs the functions of 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.
[0233] Optionally, as another embodiment, the first processor 1603 is further configured to execute any one of the methods in the foregoing embodiments when running a computer program.
[0234] This embodiment provides an encoder in which the target cross-component model parameters of the current chroma block are saved for inheritance by subsequent chroma blocks without introducing additional bit consumption. Adaptive prediction operations can be performed based on the inherited parameters, thereby improving coding efficiency.
[0235] In another embodiment of the present application, based on the same inventive concept as the above embodiment, refer to FIG17 , which shows a schematic diagram of the structure of a decoder 170 provided in an embodiment of the present application. As shown in FIG17 , the decoder 170 may include: a decoding unit 1701, a second determining unit 1702, and a second storage unit 1703; wherein,
[0236] The decoding unit 1701 is configured to decode the code stream and determine the prediction parameters of the current chroma block;
[0237] A second determining unit 1702 is configured to determine a candidate cross-component model for the current chroma block when the prediction parameter indicates that the current chroma block uses the first cross-component prediction mode, wherein the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters;
[0238] The second determining unit 1702 is further configured to determine a target cross-component model for the current chroma block from the candidate cross-component models; determine target cross-component model parameters for the current chroma block according to one or more cross-component model parameters included in the target cross-component model;
[0239] The second storage unit 1703 is configured to store target cross-component model parameters.
[0240] It can be understood that each functional unit of the decoder also executes the decoding method of any one of the aforementioned embodiments.
[0241] Based on the composition of the decoder 170 and the computer-readable storage medium, refer to Figure 18, which shows a specific hardware structure diagram of the decoder 170 provided in an embodiment of the present application. As shown in Figure 18, the decoder 170 may include: a second communication interface 1801, a second memory 1802 and a second processor 1803; each component is coupled together through a second bus system 1804. It can be understood that the second bus system 1804 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 1804 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 1804 in Figure 18. Among them,
[0242] The second communication interface 1801 is used to receive and send signals when sending and receiving information with other external network elements;
[0243] The second memory 1802 is used to store computer programs that can be run on the second processor 1803;
[0244] The second processor 1803 is configured to, when running the computer program, execute:
[0245] Decode the code stream and determine the prediction parameters of the current chroma block;
[0246] When the prediction parameter indicates that the current chroma block uses the first cross-component prediction mode, determining a candidate cross-component model for the current chroma block, wherein the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters;
[0247] Determine a target cross-component model for the current chroma block from the candidate cross-component models;
[0248] Determine target cross-component model parameters for the current chroma block according to one or more cross-component model parameters included in the target cross-component model;
[0249] Save target cross-component model parameters.
[0250] Optionally, as another embodiment, the second processor 1803 is further configured to execute any one of the methods in the foregoing embodiments when running the computer program.
[0251] It can be understood that the hardware functions of the second memory 1802 are similar to those of the first memory 1602, and the hardware functions of the second processor 1803 are similar to those of the first processor 1603; they will not be described in detail here.
[0252] This embodiment provides a decoder in which the target cross-component model parameters of the current chroma block are saved for inheritance by subsequent chroma blocks without introducing additional bit consumption. Adaptive prediction operations can be performed based on the inherited parameters, thereby improving decoding efficiency.
[0253] In yet another embodiment of the present application, referring to FIG19 , 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 FIG19 , the coding and decoding system 190 may include an encoder 1901 and a decoder 1902 .
[0254] In the embodiment of the present application, the encoder 1901 may be the encoder described in any one of the aforementioned embodiments, and the decoder 1902 may be the decoder described in any one of the aforementioned embodiments.
[0255] 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.
[0256] 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.
[0257] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new method embodiments. The features disclosed in the several product embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new product embodiments. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new method embodiments or device embodiments.
[0258] 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
[0259] In an embodiment of the present application, a coding and decoding method, an encoder, a decoder, and a storage medium are provided. Whether at the decoding end or the encoding end, when the current chroma block uses the first cross-component prediction mode, a target cross-component model of the current chroma block is determined from candidate cross-component models; the target cross-component model parameters of the current chroma block are determined based on one or more cross-component model parameters included in the target cross-component model; and the target cross-component model parameters are saved. In this way, by saving the target cross-component model parameters of the current chroma block for inheritance and use by subsequent chroma blocks, there is no need to introduce additional bit consumption, and adaptive prediction operations can be performed based on the inherited parameters, thereby improving coding and decoding efficiency.
Claims
1. A decoding method, applied to a decoder, the method comprising: Decoding a bitstream to determine prediction parameters of a current chrominance block; When the prediction parameters indicate that the current chrominance block uses a first cross-component prediction mode, determining a candidate cross-component model for the current chrominance block, wherein the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters; Determining a target cross-component model for the current chrominance block from the candidate cross-component models; Determining target cross-component model parameters for the current chrominance block according to one or more cross-component model parameters included in the target cross-component model; Saving the target cross-component model parameters.
2. The method according to claim 1, wherein, The target cross-component model parameters include a target prediction filtering identifier.
3. The method according to claim 2, wherein The determining the target cross-component model parameters for the current chrominance block according to one or more cross-component model parameters included in the target cross-component model includes: Determining the target prediction filtering identifier of the current chrominance block according to the prediction filtering identifier of the target cross-component model.
4. The method according to claim 2, wherein The target cross-component model includes a first cross-component model, and the determining the target prediction filtering identifier of the current chrominance block according to the prediction filtering identifier of the target cross-component model includes: Using the prediction filtering identifier of the first cross-component model as the target prediction filtering identifier.
5. The method according to claim 2, wherein, The target cross-component model includes a first cross-component model and a second cross-component model, and the determining the target prediction filtering identifier of the current chrominance block according to the prediction filtering identifier of the target cross-component model includes: When the prediction filtering identifier of the first cross-component model is a first value and the prediction filtering identifier of the second cross-component model is the first value, determining the target prediction filtering identifier as the first value; Or, when the prediction filtering identifier of the first cross-component model is the first value or the prediction filtering identifier of the second cross-component model is the first value, determining the target prediction filtering identifier as the first value.
6. The method according to claim 2, wherein The target cross-component model parameters further include at least one of a cross-component prediction mode type, a cross-component model type, and model parameters.
7. The method according to any one of claims 1 to 6, wherein, The candidate cross-component model includes at least one of the following: one or more preset cross-component models, and one or more cross-component models in a cross-component derivation mode candidate list of the current chrominance block.
8. The method according to any one of claims 1 to 7, wherein, The determining the target cross-component model for the current chrominance block from the candidate cross-component models includes: Decoding a bitstream to determine an index value of the target cross-component model; Determining the target cross-component model for the current chrominance block from the candidate cross-component models according to the index value of the target cross-component model.
9. The method according to any one of claims 1 to 7, wherein, The determining the target cross-component model for the current chrominance block from the candidate cross-component models includes: Determining a prediction cost value of the candidate cross-component model based on a template of the current chrominance block; Determining the target cross-component model for the current chrominance block according to the prediction cost value.
10. The method according to claim 9, wherein, The determining the prediction cost value of the candidate cross-component model based on a template of the current chrominance block includes: Predict the template of the current chrominance block using one cross-component model and / or at least two cross-component models in the candidate cross-component models, and determine the first predicted sample value of the template of the current chrominance block; Determine the prediction cost value of the one or at least two cross-component models according to the first reconstructed sample value and the first predicted sample value of the template of the current chrominance block; Said determining the target cross-component model of the current chrominance block according to the prediction cost value includes: Determine the first cross-component model corresponding to the minimum prediction cost value according to the prediction cost values of the one or at least two cross-component models; If it is determined according to the fusion identifier of the first cross-component model that weighted fusion prediction is not performed on the current chrominance block, determine according to Predict the current chrominance block using the first cross-component model; If it is determined according to the fusion identifier of the first cross-component model that weighted fusion prediction is to be performed on the current chrominance block, determine a second cross-component model, and perform weighted fusion prediction on the current chrominance block according to the first cross-component model and the second cross-component model, where the second cross-component model includes one or more cross-component models.
11. The method according to claim 1, wherein, The method further includes: Determine the predicted value of the current chrominance block according to one or more cross-component model parameters included in the target cross-component model; Determine the reconstructed value of the current chrominance block according to the predicted value.
12. An encoding method applied to an encoder, the method includes: Determine candidate cross-component models of the current chrominance block, where the candidate cross-component models include one or more cross-component models, and each cross-component model includes one or more cross-component model parameters; Determine the target cross-component model of the current chrominance block from the candidate cross-component models; Determine the predicted value of the current chrominance block according to one or more cross-component model parameters included in the target cross-component model; When it is determined according to the predicted value that the current chrominance block uses the first cross-component prediction mode, save the target cross-component model parameters of the current chrominance block, where the target cross-component model is determined according to one or more cross-component model parameters included in the target cross-component model.
13. The method according to claim 12, wherein The method further includes: When it is determined according to the predicted value that the current chrominance block uses the first cross-component prediction mode, determine the prediction parameter of the current chrominance block, where the prediction parameter is used to indicate that the current chrominance block uses the first cross-component prediction mode; Encode the prediction parameter and write the obtained encoded bits into the code stream.
14. The method according to claim 12 or 13, wherein The method further includes: Determine the reconstructed value of the current chrominance block according to the predicted value; Determine the prediction cost value of the first cross-component prediction mode according to the reconstructed value and the original value of the current chrominance block; When the prediction cost value of the first cross-component prediction mode is the minimum prediction cost value of the current chrominance block, determine that the current chrominance block uses the first cross-component prediction mode; When the prediction cost value of the first cross-component prediction mode is not the minimum prediction cost value of the current chrominance block, determine that the current chrominance block does not use the first cross-component prediction mode.
15. According to the method of claim 12, wherein The target cross-component model parameters include a target prediction filtering identifier.
16. The method according to claim 15, wherein, The method further includes: Determining the target prediction filtering identifier of the current chrominance block according to the prediction filtering identifier of the target cross-component model.
17. The method according to claim 16, wherein, The target cross-component model includes a first cross-component model. Determining the target prediction filtering identifier of the current chrominance block according to the prediction filtering identifier of the target cross-component model includes: Using the prediction filtering identifier of the first cross-component model as the target prediction filtering identifier.
18. The method according to claim 16, wherein, The target cross-component model includes a first cross-component model and a second cross-component model. Determining the target prediction filtering identifier of the current chrominance block according to the prediction filtering identifier of the target cross-component model includes: When the prediction filtering identifier of the first cross-component model is a first value and the prediction filtering identifier of the second cross-component model is the first value, determining that the target prediction filtering identifier is the first value; Or, when the prediction filtering identifier of the first cross-component model is the first value or the prediction filtering identifier of the second cross-component model is the first value, determining that the target prediction filtering identifier is the first value.
19. The method according to claim 16, wherein The target cross-component model parameters further include at least one of a cross-component prediction mode type, a cross-component model type, and model parameters.
20. The method according to any one of claims 12 to 19, wherein The candidate cross-component models include at least one of the following: one or more preset cross-component models, and one or more cross-component models in the cross-component derivation mode candidate list of the current chrominance block.
21. The method according to any one of claims 12 to 20, wherein Determining the target cross-component model of the current chrominance block from the candidate cross-component models includes: Traversing the candidate cross-component models to determine the target cross-component model of the current chrominance block; The method further includes: Encoding the index value of the target cross-component model when it is determined according to the predicted value that the current chrominance block uses a first cross-component prediction mode.
22. The method according to any one of claims 12 to 20, wherein, Determining the target cross-component model of the current chrominance block from the candidate cross-component models includes: Determining the prediction cost value of the candidate cross-component models based on the template of the current chrominance block; Determining the target cross-component model of the current chrominance block according to the prediction cost value.
23. The method according to claim 22, wherein, Determining the prediction cost value of the candidate cross-component models based on the template of the current chrominance block includes: Using one cross-component model and / or at least two cross-component models in the candidate cross-component models to predict the template of the current chrominance block to determine a first predicted sample value of the template of the current chrominance block; Determining the prediction cost value of the one or at least two cross-component models according to the first reconstructed sample value and the first predicted sample value of the template of the current chrominance block; Determining the target cross-component model of the current chrominance block according to the prediction cost value includes: Determining a first cross-component model corresponding to the minimum prediction cost value according to the prediction cost value of the one or at least two cross-component models; When it is determined according to the fusion identifier of the first cross-component model that weighted fusion prediction is not performed on the current chrominance block, determining to perform prediction on the current chrominance block according to the first cross-component model; Determine weighted fusion prediction for the current chrominance block according to the fusion identifier of the first cross-component model, determine the second cross-component model, and perform weighted fusion prediction on the current chrominance block according to the first cross-component model and the second cross-component model, where the second cross-component model includes one or more cross-component models.
24. An encoder, comprising a first determination unit, a first prediction unit, and a first storage unit; wherein: The first determination unit is configured to determine a candidate cross-component model for the current chrominance block, where the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters; The first determination unit is further configured to determine the target cross-component model for the current chrominance block from the candidate cross-component models; The first prediction unit is configured to determine the predicted value of the current chrominance block according to one or more cross-component model parameters included in the target cross-component model; The first storage unit is configured to save the target cross-component model parameters of the current chrominance block when it is determined that the current chrominance block uses the first cross-component prediction mode according to the predicted value, where the target cross-component model is determined according to one or more cross-component model parameters of the target cross-component model.
25. An encoder, comprising a first memory and a first processor; wherein: The first memory is used to store a computer program that can run on the first processor; The first processor is used to execute the method according to any one of claims 12 to 23 when running the computer program.
26. A decoder, comprising a decoding unit, a second determination unit, and a second storage unit; wherein: The decoding unit is configured to decode the code stream and determine the prediction parameters of the current chrominance block; The second determination unit is configured to determine a candidate cross-component model for the current chrominance block when the prediction parameters indicate that the current chrominance block uses the first cross-component prediction mode, where the candidate cross-component model includes one or more cross-component models, and each cross-component model includes one or more cross-component model parameters; The second determination unit is further configured to determine the target cross-component model for the current chrominance block from the candidate cross-component models; determine the target cross-component model parameters of the current chrominance block according to one or more cross-component model parameters included in the target cross-component model; The second storage unit is configured to save the target cross-component model parameters.
27. A decoder, comprising a second memory and a second processor; wherein: The second memory is used to store a computer program that can run on the second processor; The second processor is used to execute the method according to any one of claims 1 to 11 when running the computer program.
28. A computer-readable storage medium, wherein, The computer-readable storage medium stores the code stream generated by the encoding method according to any one of claims 12 to 23.
29. 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 described in any one of claims 1 to 11, or implements the method described in any one of claims 12 to 23.
Citation Information
Patent Citations
Usage for history-based affine parameters
CN113039802A
Shifting on affine parameters
CN113170159A
Image decoding and encoding method, storage medium, and data transmission method
CN116939201A
Shelf structure for wheelchair
KR1020250024314A
Linear model chroma intra prediction for video coding
US20180077426A1