Encoding / Decoding Method, Codestream, Encoder, Decoder, and Storage Medium
By determining model parameters based on color component values in the predicted block, the method addresses inaccuracies in inter prediction, improving chroma prediction accuracy and reducing code rate for enhanced encoding and decoding efficiency.
Patent Information
- Application Number
- JP2025521216
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-10-12
- Publication Date
- 2025-10-22
AI Technical Summary
Existing video encoding and decoding technologies face inaccuracies in inter prediction due to the inability of current weighted prediction methods to adapt to local characteristics of color components within a block, leading to inefficient encoding and decoding.
A method that determines prediction parameters for a current block, calculates model parameters based on first and second color component values in a predicted block, and applies these parameters to improve chroma prediction accuracy and reduce code rate, enhancing the overall encoding and decoding efficiency.
Improves the accuracy of inter-chroma prediction and reduces the code rate, thereby enhancing the performance of encoding and decoding processes.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to the technical field of video encoding and decoding, and more particularly to an encoding and decoding method, a codestream, an encoder, a decoder, and a storage medium. [Background technology]
[0002] In the inter prediction process, motion compensation may be divided into unidirectional motion compensation and bidirectional motion compensation according to the slice type. Here, for a current block, a matching block for the current block is determined from reference image List0 and / or reference image List1 according to motion vector information, and then weighted prediction is performed according to the determined matching block to obtain an inter prediction block for the current block.
[0003] In the related art, a weighted prediction is performed using a certain weighting factor for a matching block determined by reference image List0 and / or reference image List1 to determine an inter-predicted block for the current block. However, the weighting factor of such a weighted prediction method cannot adapt to the local characteristics of different sampling points within the current block, which makes the prediction of the current block inaccurate and reduces the efficiency of encoding and decoding.
[0004] The embodiments of the present application provide an encoding / decoding method, a code stream, an encoder, a decoder, and a storage medium, which can improve the accuracy of inter-color prediction and save the code rate, as well as further improve the efficiency of encoding / decoding, and ultimately improve the performance of encoding / decoding.
[0005] The technical solution of the present embodiment may be realized as follows.
[0006] In a first aspect, embodiments of the present invention provide a decoding method, the method comprising:
[0007] decoding the codestream and determining prediction parameters for the current block;
[0008] determining a first prediction block of the current block according to the prediction parameters;
[0009] determining model parameters according to the first color component values and the second color component values in the first predicted block;
[0010] determining a reference sample value of a first color component sampling point of the current block; and determining a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters;
[0011] determining reconstructed values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block.
[0012] In a second aspect, embodiments of the present invention provide an encoding method, the method comprising:
[0013] determining prediction parameters for the current block;
[0014] determining a first prediction block of the current block according to the prediction parameters;
[0015] determining model parameters according to the first color component values and the second color component values in the first predicted block;
[0016] determining a reference sample value of a first color component sampling point of the current block; and determining a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters;
[0017] determining predicted difference values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block.
[0018] In a third aspect, the present embodiment provides a codestream, the codestream being generated by bit coding according to information to be coded, the information to be coded being:
[0019] The information includes at least one of a predicted difference value of a second color component sampling point of the current block, a prediction parameter of the current block, the number of coefficients of the target filter, the shape of the target filter, the value of the filter shape parameter, first block category identification information of the current block, and second block category identification information of the current block.
[0020] In a fourth aspect, embodiments of the present invention provide an encoder, the encoder comprising a first decision unit and a first prediction unit;
[0021] The first determining unit is configured to determine prediction parameters of a current block, and determine a first prediction block of the current block according to the prediction parameters;
[0022] the first determining unit is further configured to determine model parameters according to the first color component value and the second color component value in the first prediction block;
[0023] The first prediction unit is configured to determine reference sample values of first color component sampling points of the current block, and determine predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters;
[0024] The first determining unit is further configured to determine, according to the predicted value of the second color component sampling point of the current block, a predicted difference value of the second color component sampling point of the current block.
[0025] In a fifth aspect, embodiments of the present invention provide an encoder, the encoder comprising: a first memory and a first processor;
[0026] the first memory is adapted to store a computer program executable on the first processor;
[0027] The first processor, when executing the computer program, is used to carry out the method according to the second aspect.
[0028] In a sixth aspect, the present embodiment provides a decoder, the decoder comprising: a decoding unit, a second determining unit, and a second predicting unit;
[0029] a decoding unit configured to decode the codestream and determine prediction parameters for a current block;
[0030] the second determining unit is configured to determine a first predicted block of the current block according to the prediction parameters, and determine model parameters according to the first color component value and the second color component value in the first predicted block;
[0031] The second prediction unit is configured to determine reference sample values of first color component sampling points of the current block, and determine predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters;
[0032] The second determining unit is further configured to determine, according to the predicted value of the second color component sampling point of the current block, a reconstructed value of the second color component sampling point of the current block.
[0033] In a seventh aspect, embodiments of the present invention provide a decoder, the decoder comprising a second memory and a second processor;
[0034] the second memory is used to store a computer program executable on the second processor;
[0035] The second processor, when executing a computer program, is used to carry out the method according to the first aspect.
[0036] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored therein, the computer program, when executed, realizing the method described in the first aspect or the method described in the second aspect.
[0037] In the present embodiment, an encoding / decoding method, a codestream, an encoder, a decoder, and a storage medium are provided, in which whether the encoding side or the decoding side determines prediction parameters for a current block, determines a first predicted block of the current block according to the prediction parameters, determines model parameters according to first and second color component values in the first predicted block, determines reference sample values for the first color component sampling points of the current block, and determines predicted values for the second color component sampling points of the current block according to the reference sample values for the first color component sampling points of the current block and the model parameters. In this way, the encoding side can determine predicted difference values for the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block, and the decoding side can determine reconstructed values for the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block. That is, model parameters are determined according to the first and second color component values in the first predicted block, and the model parameters fully represent the correlation between luma and chroma in the predicted block. The correlation is then applied to the existing luma information of the current block to perform chroma prediction, thereby improving the accuracy of inter-chroma prediction and reducing the code rate. At the same time, the efficiency of encoding and decoding can be improved, thereby improving the performance of encoding and decoding. [Brief explanation of the drawings]
[0038] [Figure 1] FIG. 1 is a flowchart illustrating unidirectional prediction. [Figure 2] FIG. 1 is a flowchart illustrating bidirectional prediction. [Figure 3] FIG. 10 is a flowchart illustrating weighted prediction. [Figure 4] FIG. 10 is a flowchart illustrating another weighted prediction method. [Figure 5A] FIG. 1 is a block diagram showing the configuration of an encoder according to an embodiment of the present invention. [Figure 5B] FIG. 2 is a block diagram showing the configuration of a decoder according to an embodiment of the present invention. [Figure 6] FIG. 1 is a diagram illustrating a network architecture of an encoding / decoding system according to an embodiment of the present invention. [Figure 7] FIG. 1 is a flowchart illustrating a decoding method according to an embodiment of the present invention. [Figure 8] FIG. 2 is a flowchart and block diagram of a decoding method according to an embodiment of the present invention. [Figure 9] FIG. 1 is a flowchart illustrating an encoding method according to an embodiment of the present invention. [Figure 10] FIG. 1 is a flowchart showing CP-CCCM prediction according to an embodiment of the present invention. [Figure 11] FIG. 10 is a flowchart showing another CP-CCCM prediction according to an embodiment of the present invention. [Figure 12] FIG. 1 is a diagram illustrating a configuration of a filter according to an embodiment of the present invention. [Figure 13A] FIG. 2 is a diagram illustrating a configuration of filter coefficients according to an embodiment of the present invention. [Figure 13B] FIG. 10 is a diagram showing the configuration of a chrominance prediction pixel according to an embodiment of the present invention. [Figure 14] FIG. 1 is a flowchart showing a CP-CCCM unidirectional prediction process according to an embodiment of the present invention. [Figure 15] FIG. 1 is a flowchart showing a CP-CCCM bidirectional prediction process according to an embodiment of the present invention. [Figure 16] FIG. 1 is a diagram illustrating a configuration of an encoder according to an embodiment of the present invention. [Figure 17]FIG. 2 is a diagram illustrating a specific hardware structure of an encoder according to an embodiment of the present invention. [Figure 18] FIG. 2 is a diagram illustrating the configuration of a decoder according to an embodiment of the present invention. [Figure 19] FIG. 2 is a diagram illustrating a specific hardware structure of a decoder according to an embodiment of the present invention. [Figure 20] FIG. 1 is a diagram showing the configuration of an encoding / decoding system according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0039] In order to provide a more detailed understanding of the features and technical contents of the present embodiment, the implementation of the present embodiment will be described in detail below with reference to the accompanying drawings. However, the accompanying drawings are for reference and explanation purposes only and are not intended to limit the present embodiment.
[0040] Unless otherwise defined, all technical and scientific terms used herein are the same as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for the purpose of describing the present application examples only and is not intended to be limiting of the present application.
[0041] In the following description, "some embodiments" may describe a subset of all possible embodiments; however, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with one another if there are no conflicts. It should also be noted that the terms "first, second, third" and "third" used in the present disclosure are merely used to distinguish between similar objects and do not imply a particular order of objects. It is understood that the present disclosure may be performed in an order other than that shown or described herein, with the terms "first, second, third" interchangeable where permitted to imply a particular order or priority.
[0042] In a video image, a coding block (CB) is generally characterized using a first color component, a second color component, and a third color component, where these three color components are one luminance component, one blue chrominance component, and one red chrominance component, respectively. Specifically, the luminance component is usually represented using the symbol Y, the blue color component is usually represented using the symbol Cb or U, and the red color component is usually represented using the symbol Cr or V. Thus, a video image may be represented using a YCbCr format or a YUV format.
[0043] It is understood that in current video image or video encoding and decoding processes, cross-component prediction techniques mainly include a cross-component linear model (CCLM) prediction mode and a multi-directional linear model (MDLM) prediction mode. Whether the model factors derived according to the CCLM prediction mode or the MDLM prediction mode are model factors, the corresponding prediction models can realize prediction between color components, such as from the first color component to the second color component, from the second color component to the first color component, from the first color component to the third color component, from the third color component to the first color component, from the second color component to the third color component, or from the third color component to the second color component.
[0044] JPEG2024077520000001.jpg39169
[0045] JPEG2024077520000002.jpg48169
[0046] In the inter prediction process, motion compensation may be divided into unidirectional motion compensation and bidirectional motion compensation according to slice type. Then, a matching block of the current block is determined from the List0 reference image or the List1 reference image according to motion vector (MV) information, and a prediction block of the current block is determined according to the matching block. Here, the matching block may also be called a "compensation block."
[0047] When performing unidirectional prediction (i.e., List0 prediction or List1 prediction), a matching block is determined from the List0 reference image or List1 reference image, and weighting is performed on the matching block to obtain an inter-predicted block for the current block. Here, the processes of chrominance weighted prediction and luma weighted prediction are similar. Taking chrominance weighted prediction as an example, as shown in FIG. 1, the process may include:
[0048] S101, obtain the forward motion vector or backward motion vector of the current block.
[0049] S102, determining a forward chromaticity matching block or a backward chromaticity matching block;
[0050] S103, weighted prediction is performed on the forward chromaticity matching block or the backward chromaticity matching block.
[0051] S104, the chrominance prediction block of the current block is determined.
[0052] When performing bidirectional prediction, a List0 matching block is determined from the List0 reference image, a List1 matching block is determined from the List1 reference image, and then weighted prediction is performed on the List0 matching block and the List1 matching block to obtain an inter-predicted block for the current block. Here, the processes of chrominance weighted prediction and luma weighted prediction are similar. Taking chrominance weighted prediction as an example, as shown in Figure 2, the process may include:
[0053] S201, obtain the forward motion vector of the current block.
[0054] S202, a forward chromaticity matching block is determined.
[0055] S203, obtain the backward motion vector of the current block.
[0056] S204, a backward chromaticity matching block is determined.
[0057] S205: weighted prediction is performed on the forward chromaticity matching block and the backward chromaticity matching block.
[0058] S206, the chrominance prediction block of the current block is determined.
[0059] The current block may be a current coding unit (CU), a current transform unit (TU), a current prediction unit (PU), a current coding block (CB), etc., but the present embodiment is not particularly limited thereto.
[0060] In H.266 / VVC, the weighted prediction (WP) algorithm mainly includes a default weighted prediction (Default WP) algorithm, an explicit weighted prediction (Explicit WP) algorithm, and a bi-prediction with CU-level weights (BCW) algorithm. The following describes the related technologies for each of these weighted prediction algorithms.
[0061] The data processing process of inter weighted prediction is as follows.
[0062] Weighted prediction input: current block coordinate information (xCb, yCb), width nCbW and height nCbH, predicted blocks predSamplesL0 and predSamplesL1, prediction list usage identification predFlagL0 and predFlagL1, reference image index refIdxL0 and refIdxL1, BCW weight index bcwIdx, color component index cIdx.
[0063] Weighted prediction output: (nCbW) × (nCbH) prediction block pbSamples.
[0064] In order to effectively improve the predictive coding effect of progressive video sequences in the weighted prediction process, VVC uses an inter-weighted prediction method, in which one weight and one offset value are used for the prediction blocks predSamplesL0 and predSamplesL1 of the current image after unidirectional or bidirectional motion compensation to obtain the final inter-predicted value of the current image, thereby achieving the purpose of correcting the motion compensated prediction pixels in the P image or B image. VVC provides two weighted prediction algorithms: default weighted prediction and explicit weighted prediction. For the current block of bidirectional prediction, VVC may use BCW to determine the weight coefficients of the weighted prediction. For example, the BCW presets five candidate weight coefficients, and determines the weight coefficients of the BCW according to the value of the weight coefficient index number.
[0065] (1) Considering that the default weighting prediction process and the BCW prediction process have the same data processing steps, the default weighting prediction process and the BCW prediction process may use the same weighting prediction process. As shown in Figure 3, the process may include:
[0066] In step S301, it is determined whether predFlagL0=1 and predFlagL1=0.
[0067] S302, obtain a final inter-prediction value based on the first calculation model.
[0068] In step S303, it is determined whether predFlagL0=0 and predFlagL1=1.
[0069] S304, obtaining a final inter-prediction value based on the second calculation model.
[0070] In step S305, it is determined whether predFlagL0=1 and predFlagL1=1.
[0071] Regarding S301, if the determination result is "YES", execute S302, that is, obtain the final inter-predicted value based on the first calculation model; if the determination result is "NO", execute S303, that is, further determine whether predFlagL0=0 and predFlagL1=1. Regarding S303, if the determination result is "YES", execute S304, that is, obtain the final inter-predicted value based on the second calculation model; if the determination result is "NO", execute S305, that is, further determine whether predFlagL0=1 and predFlagL1=1.
[0072] In step S306, it is determined whether bcwIdx=0 or ciip_flag[xCb][yCb]=1.
[0073] S307, obtain a final inter-prediction value based on the third calculation model.
[0074] S308: It is determined whether bcwIdx is not 0 and whether ciip_flag[xCb][yCb]=0.
[0075] In step S309, a final inter-predicted value is obtained based on the first weight value w0, the second weight value w1, and the fourth calculation model.
[0076] It should be noted that, if the determination result of S305 is "YES", S306 is executed, that is, it is further determined whether bcwIdx=0 or ciip_flag[xCb][yCb]=1. If the determination result of S306 is "YES", S307 is executed, that is, a final inter-predicted value is obtained based on a third calculation model. If the determination result of S306 is "NO", S308 is executed, that is, it is further determined whether bcwIdx is not 0 and ciip_flag[xCb][yCb]=0. In this case, if the determination result is still "YES", S309 may be executed, that is, a final inter-predicted value is obtained based on the first weight value w0, the second weight value w1, and the fourth calculation model.
[0077] In this embodiment, the default weighted prediction process may be divided into three cases depending on the use of the reference list.
[0078] JPEG2024077520000003.jpg28169
[0079] JPEG2024077520000004.jpg18169
[0080] JPEG2024077520000005.jpg27169
[0081] JPEG2024077520000006.jpg18169
[0082] JPEG2024077520000007.jpg28169
[0083] JPEG2024077520000008.jpg26165
[0084] JPEG2024077520000009.jpg59169
[0085] JPEG2024077520000010.jpg18165
[0086] JPEG2024077520000011.jpg18165
[0087] JPEG2024077520000012.jpg19165
[0088] JPEG2024077520000013.jpg19165
[0089] In this embodiment, the BCW prediction process may be specifically performed by using BCW to determine the weighting coefficients of the weighted prediction. BCW presets five candidate weighting coefficients, and determines the weighting coefficients of BCW according to the value of the weighting coefficient index number. The data processing process is as follows:
[0090] If bcwIdx (i.e., BCW weighting coefficient index number) is 0 or ciip_flag is 1, the predicted pixel pbSamples[x][y] may be calculated using a third calculation model, and the third calculation model is as shown in the above equation (3).
[0091] JPEG2024077520000014.jpg60168
[0092] JPEG2024077520000015.jpg26168
[0093] Here, the value of offset3 is set to 1<<(shift1+2).
[0094] (2) For the explicit weighting prediction process, in this case the cfg is closed by default, and as shown in Figure 4, the process may include:
[0095] S401: Obtain several variables w0, w1, o0, o1 according to conditions.
[0096] In this embodiment, first, it is determined whether the current block is a luminance component. If the current block is a luminance component, log2Wd=LumaLog2WeightDenom+shift1, where:
[0097] If predFlagL0=1, then w0=LumaWeightL0[refIdxL0] and o0=LumaOffsetL0[refIdxL0]<<(bitDepth-8);
[0098] If predFlagL1=1, then w1=LumaWeightL1[refIdxL1] and o1=LumaOffsetL1[refIdxL1]<<(bitDepth-8).
[0099] If the current block is a chrominance component, then log2Wd=ChromaLog2WeightDenom+shift1, where:
[0100] If predFlagL0=1, then w0=ChromaWeightL0[refIdxL0][cIdx-1], and o0=ChromaOffsetL0[refIdxL0][cIdx-1]<<(bitDepth-8),
[0101] If predFlagL1=1, then w1=ChromaWeightL1[refIdxL1][cIdx-1] and o1=ChromaOffsetL1[refIdxL1][cIdx-1]<<(bitDepth-8).
[0102] In step S402, weighting calculations are performed using these variables w0, w1, o0, and o1 to obtain final inter-predicted values.
[0103] In the present embodiment, for determining the final inter-prediction value, the steps may specifically include:
[0104] In step S403, it is determined whether predFlagL0=1 and predFlagL1=0.
[0105] S404, obtaining a final inter-prediction value based on the fifth calculation model.
[0106] In step S405, it is determined whether predFlagL0=0 and predFlagL1=1.
[0107] S406, obtaining a final inter-prediction value based on the sixth calculation model.
[0108] In step S407, it is determined whether predFlagL0=1 and predFlagL1=1.
[0109] S408, obtain a final inter-prediction value based on the seventh calculation model.
[0110] If the determination result in S403 is "YES", execute S404, that is, obtain the final inter-predicted value based on the fifth calculation model; if the determination result is "NO", execute S405 to further determine whether predFlagL0=0 and predFlagL1=1. If the determination result in S405 is "YES", execute S406, that is, obtain the final inter-predicted value based on the sixth calculation model; if the determination result is "NO", execute S407 to further determine whether predFlagL0=1 and predFlagL1=1; in this case, if the determination result is still "YES", execute S408, that is, obtain the final inter-predicted value based on the seventh calculation model.
[0111] Note that for explicit weighted prediction, weighting correction needs to be performed on predSamplesL0[x][y] and predSamplesL1[x][y] with certain weights and offsets during the motion compensation process. Similarly, explicit weighted prediction may be processed in three cases depending on the use of the reference list.
[0112] JPEG2024077520000016.jpg29168
[0113] JPEG2024077520000017.jpg27168
[0114] JPEG2024077520000018.jpg29168
[0115] JPEG2024077520000019.jpg27168
[0116] JPEG2024077520000020.jpg29168
[0117] JPEG2024077520000021.jpg28168
[0118] where w0 and w1 represent the weight values, and o0 and o1 represent the corresponding offset amounts. On the decoding side, the values of these four variables may be determined directly by decoding the codestream.
[0119] In the related art, a current chrominance weighted prediction method performs weighted fusion using a certain weighting factor on predicted values of the List0 predicted block and the List1 predicted block to determine a chrominance inter-predicted value of a current block. Therefore, the weighting factor of such a chrominance weighted prediction method cannot adapt to local features at different sampling points of the chrominance components within the current block, which results in inaccurate prediction of the chrominance components of the current block by the weighted prediction method in the related art, and reduced coding efficiency.
[0120] Based on this, an embodiment of the present application provides an encoding / decoding method, which determines prediction parameters for a current block, determines a first predicted block of the current block according to the prediction parameters, and then determines model parameters according to a first color component value and a second color component value of the first predicted block. The model parameters fully represent the correlation between luma and chroma in the predicted block, and then performs chroma prediction by applying the correlation to the existing luma information of the current block, thereby improving the accuracy of inter-chroma prediction and reducing the code rate. At the same time, the efficiency of encoding / decoding can be improved, and ultimately the performance of encoding / decoding can be improved.
[0121] Each embodiment of the present invention will be described in detail below with reference to the drawings.
[0122] 5A is a block diagram illustrating the configuration of an encoder according to an embodiment of the present invention. As shown in FIG. 5A, an encoder (specifically, a "video encoder") 50 may include a transform and quantization unit 501, an intra estimation unit 502, an intra prediction unit 503, an inter prediction unit 504, a motion estimation unit 505, an inverse transform and inverse quantization unit 506, a filter control analysis unit 507, a filter unit 508, an encoding unit 509, and a decoded image cache unit 510. Here, the filter unit 508 may implement a deblocking filter and a Sample Adaptive Offset (SAO) filter, and the encoding unit 509 may implement header information encoding and context-based adaptive binary arithmetic coding (CABAC). For an input original video signal, a video coding block can be obtained by dividing a coding tree unit (CTU). Then, the transform and quantization unit 101 performs transformation on the video coding block using residual pixel information obtained after intra prediction or inter prediction, including converting the residual information from the pixel domain to the transform domain, and quantizes the resulting transform coefficients to further reduce the bit rate. The intra estimation unit 502 and the intra prediction unit 503 are used to perform intra prediction on the video coding block. Specifically, the intra estimation unit 502 and the intra prediction unit 503 are used to determine an intra prediction target mode for encoding the video coding block. The inter prediction unit 504 and the motion estimation unit 505 are used to provide temporal prediction information by performing inter prediction coding on one or more blocks of one or more reference frames of the received video coding block.The motion estimation performed by the motion estimation unit 505 is a process of generating a motion vector, which can estimate the motion of the video coding block. Then, the inter prediction unit 504 performs motion compensation based on the motion vector determined by the motion estimation unit 505. Therefore, the inter prediction unit 504 may also be called a motion compensation unit. After determining the intra prediction mode, the intra prediction unit 503 is further used to provide selected intra prediction data to the encoding unit 509, and the motion estimation unit 505 also sends the calculated and determined motion vector data to the encoding unit 509. The inverse transform and inverse quantization unit 506 is also used to reconstruct the video coding block, reconstructing a residual block in the pixel domain. The reconstructed residual block has block effect artifacts removed by the filter control analysis unit 507 and the filter unit 508. The reconstructed residual block is then added to a prediction block in a frame of the decoded image cache unit 510 to generate a reconstructed video coding block. The coding unit 509 is used to code various coding parameters and quantized transform coefficients, and in a CABAC-based coding algorithm, context content may be based on neighboring coding blocks, and may be used to code information indicating a determined intra-prediction mode and output a codestream of the video signal. The decoded picture cache unit 510 is used to store reconstructed video coding blocks and is used for prediction reference. As the coding of a video image progresses, new reconstructed video coding blocks continue to be generated, and any of these reconstructed video coding blocks are stored in the decoded picture cache unit 510.
[0123] Referring to FIG. 5B, a block diagram of a decoder according to an embodiment of the present invention is shown. As shown in FIG. 5B, a decoder (specifically, a "video decoder") 60 includes a decoding unit 601, an inverse transform and inverse quantization unit 602, an intra prediction unit 603, an inter prediction unit 604, a filter unit 605, and a decoded image cache unit 606. The decoding unit 601 can perform header information decoding and CABAC decoding, and the filter unit 605 can perform a deblocking filter and an SAO filter. An input video signal undergoes the encoding process of FIG. 5A, and then outputs a code stream of the video signal. The code stream is input to the decoder 60 and first passes through the decoding unit 601 to obtain decoded transform coefficients. The transform coefficients are then processed by the inverse transform and inverse quantization unit 602 to generate residual blocks in the pixel domain. The intra prediction unit 603 may be used to generate prediction data for a current video decoded block based on the determined intra prediction mode and data from a previously decoded block from the current frame or picture. The inter prediction unit 604 determines prediction information for the video decoded block by analyzing motion vectors and other related syntax elements, and uses the prediction information to generate a prediction block for the video decoded block being decoded. A decoded video block is formed by adding the residual block from the inverse transform and inverse quantization unit 602 to the corresponding prediction block generated by the intra prediction unit 603 or the inter prediction unit 604. The decoded video signal may be filtered by a filter unit 605 to remove block effect artifacts and improve video quality. The decoded video block is then stored in a decoded image cache unit 606, which stores reference images for subsequent intra prediction or motion compensation and is also used to output a video signal, i.e., a reconstructed original video signal.
[0124] The present embodiment also provides a network architecture for an encoding / decoding system including an encoder and a decoder. FIG. 6 illustrates the network architecture of an encoding / decoding system according to the present embodiment. As illustrated in FIG. 6, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01. Here, the electronic devices 13 to 1N may perform video interaction via the communication network 01. The electronic devices may be devices with various types of video encoding / decoding functions during implementation. For example, the electronic devices may include smartphones, tablet computers, personal computers, personal data assistants, navigators, digital telephones, video telephones, televisions, sensing devices, servers, etc., but the present embodiment is not limited thereto. Here, the decoder or encoder described in the present embodiment may be any of the above electronic devices.
[0125] It should be noted that the method of the present embodiment is mainly applied to the inter prediction unit 504 shown in Fig. 5A and the inter prediction unit 604 shown in Fig. 5B. That is, the present embodiment may be applied to an encoder, a decoder, or both an encoder and a decoder, but the present embodiment is not particularly limited.
[0126] In addition, Inter Prediction Unit When applied to the 504 portion, the "current block" specifically refers to the coded block currently being subjected to inter prediction, and when applied to the inter prediction unit 604 portion, the "current block" specifically refers to the decoded block currently being subjected to inter prediction. In paragraph 1, the present application provides a decoding method, the method comprising: decoding the codestream and determining prediction parameters for the current block; determining a first prediction block of the current block according to the prediction parameters; determining model parameters according to first and second color component values in the first predicted block; determining a reference sample value of a first color component sampling point of the current block; and determining a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters; determining reconstructed values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block; Includes. In the second term, based on the first term, the prediction parameters are including a motion vector, a reference image index, and an inter-prediction identification parameter; The inter-prediction identification parameter indicates a prediction method to be used to decode the current block, and the prediction method includes List0 prediction, List1 prediction, and bidirectional prediction. In paragraph 3, based on paragraph 2, the method comprises: The inter-prediction identification parameter may further include indicating that a prediction scheme used to decode the current block is bi-directional prediction. In paragraph 4, based on paragraph 2, the method further comprises: The method further includes determining a List0 predicted block of the current block and a List1 predicted block of the current block according to the prediction parameters. In paragraph 5, based on paragraph 4, the method comprises: The first predicted block is a List0 predicted block of the current block, or The first predicted block is a List1 predicted block of the current block, or The method further includes the step of: the first predicted block being a List0 predicted block of the current block and a List1 predicted block of the current block. In paragraph 6, the step of determining model parameters according to the first color component value and the second color component value in the first prediction block based on paragraph 5 includes: The model parameters include coefficients of a target filter. In paragraph 7, based on paragraph 6, the method comprises: The method further includes determining coefficients of the target filter according to first and second color component values in the first predicted block. In clause 8, based on clause 6, the method further includes a step in which the coefficients of the target filter are coefficients used by the target filter when a first error between output values after the second color component value in the first predicted block and the first color component value in the first predicted block are processed by the target filter satisfies a first condition. In paragraph 9, based on paragraph 8, the method comprises: The first condition further includes a step in which the first error is minimum. In paragraph 10, based on paragraph 8, the method comprises: The first condition further includes the first error being within a first preset threshold range. In paragraph 11, based on paragraph 8, the method comprises: The first condition further includes a step in which the amount of change in the first error is within a second preset threshold range. In paragraph 12, the step of determining coefficients of the target filter according to a first color component value and a second color component value in the first prediction block based on paragraph 7 includes: determining an autocorrelation parameter in response to a first color component value in the first predicted block; determining a cross-correlation parameter according to a first color component value and a second color component value in the first predicted block; determining coefficients of the target filter in response to the autocorrelation parameters and the cross-correlation parameters; Includes. In paragraph 13, based on paragraph 6, the method comprises: The method further includes the step of: the number of coefficients of the target filter is equal to a first preset constant value. In paragraph 14, based on paragraph 6, the method comprises: The method further includes decoding the codestream to determine the number of coefficients of the target filter. In paragraph 15, based on paragraph 14, the method comprises: determining first identification information of a block category of the current block; determining the number of coefficients of the target filter according to first block category identification information of the current block; Further includes: In paragraph 16, based on paragraph 6, the method comprises: The target filter may be a one-dimensional or two-dimensional filter of a predetermined shape. In paragraph 17, based on paragraph 6, the method comprises: The method further includes decoding the codestream and determining the shape of the target filter. In paragraph 18, based on paragraph 17, the method comprises: The method further includes determining values of filter shape parameters, said filter shape parameters indicating the shape of said target filter. In paragraph 19, based on paragraph 18, the method comprises: determining second identification information of the block category of the current block; determining a value of the filter shape parameter according to second block category identification information of the current block; Further includes: In paragraph 20, the step of determining the reference sample value of the first color component sampling point of the current block according to paragraph 1 includes: The method includes determining reference sample values of the first color component sampling points of the current block according to the reconstruction values of the first color component sampling points of the current block. In paragraph 21, based on paragraph 20, the method comprises: The method further includes determining a reconstruction value of a first color component sampling point of the current block according to a first color component value in the first predicted block. In paragraph 22, the step of determining a reconstructed value of a first color component sampling point of the current block according to paragraph 21 includes: The method includes determining a reconstruction value of a first color component sampling point of the current block according to a first color component value in a List0 predicted block of the current block and a first color component value in a List1 predicted block of the current block. In paragraph 23, the step of determining the reference sample value of the first color component sampling point of the current block according to paragraph 1 includes: determining a predicted value of a first color component sampling point of the current block according to a first color component value in the first predicted block; determining a reference sample value of the first color component sampling point of the current block according to the predicted value of the first color component sampling point of the current block; Includes. In paragraph 24, the step of determining a predicted value of a first color component sampling point of the current block according to paragraph 23 includes: The method includes determining a predicted value of a first color component sampling point of the current block according to a first color component value of a List0 predicted block of the current block and a first color component value of a List1 predicted block of the current block. In paragraph 25, based on paragraph 24, the method comprises: determining a List0 weighting factor for a List0 predicted block of the current block and a List1 weighting factor for a List1 predicted block of the current block; determining a weighted sum of a first color component value in the List0 predicted block of the current block and a first color component value in the List1 predicted block of the current block according to the List0 weighting coefficient and the List1 weighting coefficient; determining a predicted value of a first color component sampling point of the current block according to the weighted sum; Further includes: In paragraph 26, the step of determining a predicted value of a second color component sampling point of the current block according to paragraph 6, according to the reference sample value of the first color component sampling point of the current block and the model parameters, comprises: determining a first input value of the target filter according to a reference sample value of a first color component sampling point of the current block; determining a first output value of the target filter based on the first input value and the model parameters; determining a predicted value of a second color component sampling point of the current block based on the first output value; Includes. In paragraph 27, the step of determining a first input value of the target filter according to the reference sample value of the first color component sampling point of the current block based on paragraph 26 includes: The method includes performing a first filtering process on a reference sample value of a first color component sampling point of the current block to determine the first input value. In paragraph 28, based on paragraph 27, the method comprises: The first filtering process further includes a step of using at least one of a low-pass filter and a down-sampling filter. In paragraph 29, based on paragraph 27, the method comprises: The first filtering process further includes setting the first input value equal to a reference sample value of a first color component sampling point of the current block. In paragraph 30, the step of determining a predicted value of a second color component sampling point of the current block based on the first output value based on paragraph 26 includes: performing a second filtering process on the first output value to determine a second output value; determining a predicted value of a second color component sampling point of the current block based on the second output value; Further includes: In paragraph 31, based on paragraph 30, the method comprises: The second filtering process further includes a step of using at least one of a low-pass filter and an up-sampling filter. In paragraph 32, based on paragraph 30, the method comprises: The second filtering process further includes setting the second output value equal to the first output value. In paragraph 33, based on paragraph 30, the method comprises: The method further includes the step of: obtaining the first output value including predicted values of some second color component sampling points of the current block. In clause 34, the step of determining a predicted value of a second color component sampling point of the current block based on the second output value according to clause 30 includes: The method includes performing a first process on the second output value to obtain a predicted value of a second color component sampling point of the current block. In paragraph 35, based on paragraph 34, the method comprises: The first process further includes a step of a clip operation for limiting the second output value to within a preset numerical range. In paragraph 36, the step of determining a predicted value of a second color component sampling point of the current block based on the first output value according to paragraph 26 includes: The method further includes performing an addition operation according to the first output value and the first offset value to determine a predicted value of a second color component sampling point of the current block. In paragraph 37, based on paragraph 36, the method comprises: setting the first offset value equal to a predetermined constant value, or The method further includes setting the first offset value equal to a value in a preset mapping relationship of the first input value. In paragraph 38, based on paragraph 1, the method comprises: determining a predicted difference value of a first color component sampling point of the current block; determining a reference sample value of the first color component sampling point of the current block according to a predicted difference value of the first color component sampling point of the current block; Further includes: In paragraph 39, based on paragraph 38, the method comprises: determining a first color component residual value and a second color component residual value in the first predicted block; determining model parameters according to the first color component residual value and the second color component residual value of the first predicted block; further comprising Accordingly, determining predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters includes: determining an initial predicted difference value of a second color component sampling point of the current block according to the predicted difference value of a first color component sampling point of the current block and the model parameters; determining an initial predicted value of a second color component sampling point of the current block according to the first predicted block; determining a predicted value of a second color component sampling point of the current block according to the initial predicted difference value and the initial predicted value of the second color component sampling point of the current block; Includes. In clause 40, the step of determining the reconstructed values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block based on any one of clauses 1 to 39 includes: decoding the codestream to determine a predicted residual value of a second color component sampling point of the current block; determining a reconstructed value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block and the predicted difference value of the second color component sampling point of the current block; Includes. In paragraph 41, the present application provides an encoding method, the method comprising: determining prediction parameters for the current block; determining a first prediction block of the current block according to the prediction parameters; determining model parameters according to first and second color component values in the first predicted block; determining a reference sample value of a first color component sampling point of the current block; and determining a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters; determining a predicted difference value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block; Includes. In clause 42, the step of determining a predicted difference value of the second color component sampling point of the current block according to clause 41 includes: determining an initial value of a second color component sampling point of the current block; determining a predicted difference value of the second color component sampling point of the current block according to the initial value of the second color component sampling point of the current block and the predicted value of the second color component sampling point of the current block; Includes. In paragraph 43, the method according to paragraph 41 or 42 comprises: The method further includes encoding the predicted difference values of the second color component sampling points of the current block, and writing the resulting encoded bits into a codestream. In paragraph 44, based on paragraph 41, the method comprises: The method further includes the step of encoding the prediction parameters and writing the resulting coded bits into a codestream. In paragraph 45, based on paragraph 41, the prediction parameters include a motion vector, a reference image index, and an inter-prediction identification parameter; The inter-prediction identification parameter indicates a prediction method to be used to encode the current block, and the prediction methods include List0 prediction, List1 prediction, and bidirectional prediction. In paragraph 46, based on paragraph 45, the method comprises: The inter-prediction identification parameter may further include indicating that a prediction scheme used to encode the current block is bi-directional prediction. In paragraph 47, based on paragraph 45, the method comprises: The method further includes determining a List0 predicted block of the current block and a List1 predicted block of the current block according to the prediction parameters. In paragraph 48, based on paragraph 47, the method comprises: The first predicted block is a List0 predicted block of the current block, or The first predicted block is a List1 predicted block of the current block, or The method further includes the step of: the first predicted block being a List0 predicted block of the current block and a List1 predicted block of the current block. In clause 49, the step of determining model parameters according to the first color component value and the second color component value in the first prediction block based on clause 48 includes: The model parameters include coefficients of a target filter. In paragraph 50, based on paragraph 49, the method comprises: The method further includes determining coefficients of the target filter according to first and second color component values in the first predicted block. In paragraph 51, based on paragraph 49, the method comprises: The method further includes a step in which the coefficients of the target filter are coefficients to be used by the target filter when a first error between output values after the second color component value in the first predicted block and the first color component value in the first predicted block are processed by the target filter satisfies a first condition. In paragraph 52, based on paragraph 51, the method comprises: The first condition further includes a step in which the first error is minimum. In paragraph 53, based on paragraph 51, the method comprises: The first condition further includes the first error being within a first preset threshold range. In paragraph 54, based on paragraph 51, the method comprises: The first condition further includes a step in which the amount of change in the first error is within a second preset threshold range. In clause 55, the step of determining coefficients of the target filter according to a first color component value and a second color component value in the first prediction block based on clause 50 includes: determining an autocorrelation parameter in response to a first color component value in the first predicted block; determining a cross-correlation parameter according to a first color component value and a second color component value in the first predicted block; determining coefficients of the target filter in response to the autocorrelation parameters and the cross-correlation parameters; Includes. In paragraph 56, based on paragraph 49, the method comprises: The method further includes determining the number of coefficients of the target filter. In paragraph 57, based on paragraph 56, the method comprises: The method further includes the step of encoding a number of coefficients of the target filter and writing the resulting encoded bits into a codestream. In clause 58, the step of determining the number of coefficients of the target filter based on clause 56 comprises: The number of coefficients of the target filter includes a step equal to a first preset constant value. In clause 59, the step of determining the number of coefficients of the target filter based on clause 56 includes: determining first identification information of a block category of the current block; determining the number of coefficients of the target filter according to first block category identification information of the current block; Includes. In paragraph 60, based on paragraph 59, the method comprises: The method further includes the step of encoding the first block category identification information of the current block and writing the resulting encoded bits into a codestream. In paragraph 61, based on paragraph 49, the method comprises: The target filter may be a one-dimensional or two-dimensional filter of a predetermined shape. In paragraph 62, based on paragraph 49, the method comprises: The method further includes determining the shape of the target filter. In paragraph 63, based on paragraph 62, the method comprises: The method further includes the step of encoding the shape of the target filter and writing the resulting encoded bits into a codestream. In paragraph 64, the step of determining the shape of the target filter based on paragraph 62 includes: The step of determining values of filter shape parameters, said filter shape parameters indicating the shape of said target filter, is included. In paragraph 65, based on paragraph 64, the method comprises: determining second identification information of the block category of the current block; determining a value of the filter shape parameter according to second block category identification information of the current block; Further includes: In paragraph 66, based on paragraph 64, the method comprises: The method further includes encoding the values of the filter shape parameters and writing the resulting coded bits into a codestream. In paragraph 67, based on paragraph 65, the method comprises: The method further includes the step of encoding the second block category identification information of the current block and writing the resulting encoded bits into a codestream. In clause 68, the step of determining the reference sample value of the first color component sampling point of the current block according to clause 41 includes: The method includes determining reference sample values of the first color component sampling points of the current block according to the reconstruction values of the first color component sampling points of the current block. In paragraph 69, based on paragraph 68, the method comprises: The method further includes determining a reconstruction value of a first color component sampling point of the current block according to a first color component value in the first predicted block. In clause 70, the step of determining a reconstruction value of a first color component sampling point of the current block according to clause 69 includes: The method includes determining a reconstruction value of a first color component sampling point of the current block according to a first color component value in a List0 predicted block of the current block and a first color component value in a List1 predicted block of the current block. In clause 71, the step of determining the reference sample value of the first color component sampling point of the current block according to clause 41 includes: determining a predicted value of a first color component sampling point of the current block according to a first color component value in the first predicted block; determining a reference sample value of the first color component sampling point of the current block according to the predicted value of the first color component sampling point of the current block; Includes. In clause 72, according to clause 71, the step of determining a predicted value of a first color component sampling point of the current block according to a first color component value in the first predicted block includes: The method includes determining a predicted value of a first color component sampling point of the current block according to a first color component value of a List0 predicted block of the current block and a first color component value of a List1 predicted block of the current block. In paragraph 73, based on paragraph 72, the method comprises: determining a List0 weighting factor for a List0 predicted block of the current block and a List1 weighting factor for a List1 predicted block of the current block; determining a weighted sum of a first color component value in the List0 predicted block of the current block and a first color component value in the List1 predicted block of the current block according to the List0 weighting coefficient and the List1 weighting coefficient; determining a predicted value of a first color component sampling point of the current block according to the weighted sum; Further includes: In clause 74, according to clause 49, determining a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters includes: determining a first input value of the target filter according to a reference sample value of a first color component sampling point of the current block; determining a first output value of the target filter based on the first input value and the model parameters; determining a predicted value of a second color component sampling point of the current block based on the first output value; Includes. In clause 75, the step of determining a first input value of the target filter according to the reference sample value of the first color component sampling point of the current block based on clause 74 includes: The method includes performing a first filtering process on a reference sample value of a first color component sampling point of the current block to determine the first input value. In paragraph 76, based on paragraph 75, the method comprises: The first filtering process further includes a step of using at least one of a low-pass filter and a down-sampling filter. In paragraph 77, based on paragraph 75, the method comprises: The first filtering process further includes setting the first input value equal to a reference sample value of a first color component sampling point of the current block. In clause 78, the step of determining a predicted value of a second color component sampling point of the current block based on the first output value according to clause 74 includes: performing a second filtering process on the first output value to determine a second output value; determining a predicted value of a second color component sampling point of the current block based on the second output value; Further includes: In paragraph 79, based on paragraph 78, the method comprises: The second filtering process further includes a step of using at least one of a low-pass filter and an up-sampling filter. In paragraph 80, based on paragraph 78, the method comprises: The second filtering process further includes setting the second output value equal to the first output value. In paragraph 81, based on paragraph 78, the method comprises: The method further includes the step of: obtaining the first output value including predicted values of some second color component sampling points of the current block. In clause 82, the step of determining a predicted value of a second color component sampling point of the current block based on the second output value according to clause 78 includes: The method includes performing a first process on the second output value to obtain a predicted value of a second color component sampling point of the current block. In paragraph 83, based on paragraph 82, the method comprises: The first process further includes a step of a clip operation for limiting the second output value to within a preset numerical range. In clause 84, the step of determining a predicted value of a second color component sampling point of the current block based on the first output value according to clause 74 includes: The method further includes performing an addition operation according to the first output value and the first offset value to determine a predicted value of a second color component sampling point of the current block. In paragraph 85, based on paragraph 84, the method comprises: setting the first offset value equal to a predetermined constant value, or The method further includes setting the first offset value equal to a value in a preset mapping relationship of the first input value. In paragraph 86, the method according to any one of paragraphs 41 to 85 comprises: determining a predicted difference value of a first color component sampling point of the current block; determining a reference sample value of the first color component sampling point of the current block according to a predicted difference value of the first color component sampling point of the current block; Further includes: In paragraph 87, based on paragraph 86, the method comprises: determining a first color component residual value and a second color component residual value in the first predicted block; determining model parameters according to the first color component residual value and the second color component residual value of the first predicted block; further comprising Accordingly, determining predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters includes: determining an initial predicted difference value of a second color component sampling point of the current block according to the predicted difference value of a first color component sampling point of the current block and the model parameters; determining an initial predicted value of a second color component sampling point of the current block according to the first predicted block; determining a predicted value of a second color component sampling point of the current block according to the initial predicted difference value and the initial predicted value of the second color component sampling point of the current block; Includes. In paragraph 88, the application provides a codestream, the codestream is generated by bit coding in accordance with information to be coded, The encoding target information includes at least one of a prediction difference value of a second color component sampling point of the current block, a prediction parameter of the current block, the number of coefficients of a target filter, the shape of the target filter, the value of a filter shape parameter, first block category identification information of the current block, and second block category identification information of the current block. In paragraph 89, the present application provides an encoder, the encoder comprising: a first determination unit and a first prediction unit; The first determining unit is configured to determine prediction parameters of a current block, and determine a first prediction block of the current block according to the prediction parameters; The first determining unit is further configured to determine model parameters according to first color component values and second color component values in the first prediction block; the first prediction unit is configured to determine reference sample values of first color component sampling points of the current block; and determine predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters; The first determining unit is further configured to determine, according to the predicted value of the second color component sampling point of the current block, a predicted difference value of the second color component sampling point of the current block. In paragraph 90, the present application provides an encoder, the encoder comprises a first memory and a first processor; the first memory is used to store a computer program executable on the first processor; The first processor, when executing the computer program, is adapted to carry out the method of any of claims 41 to 87.
[0127] In one embodiment of the present application, referring to Figure 7, a flowchart of a decoding method according to an embodiment of the present application is shown. As shown in Figure 7, the method may include:
[0128] S701, the codestream is decoded to determine the prediction parameters of the current block.
[0129] The decoding method of the present embodiment is applied to a decoder. Specifically, the decoding method may refer to an inter-prediction method, more specifically, an inter-chrominance prediction method. In the inter-prediction process, a Chroma Prediction based on Convolutional Cross-Component Model (CP-CCCM) technology is proposed to improve the accuracy of chrominance prediction.
[0130] In this embodiment, a video image may be divided into multiple decoded blocks, and each decoded block may include a first color component, a second color component, and a third color component, and the current block in this embodiment refers to the decoded block in the video image that is currently the target of inter prediction.
[0131] Here, if the first color component of the current block needs to be predicted and the first color component is a luma component, the current block may also be called a luma block, or if the second color component of the current block needs to be predicted and the second color component is a chroma component, the current block may also be called a chroma block.
[0132] In this embodiment, it is necessary to first determine the prediction parameters of the current block. On the decoding side, the prediction parameters may be obtained directly by decoding the codestream. In some embodiments, the prediction parameters may include a motion vector, a reference image index, and an inter-prediction identification parameter.
[0133] Here, the reference image index indicates whether the reference image used for the current block is List 0 or List 1. The inter prediction identification parameter indicates the prediction method used to decode the current block, and the prediction methods may include List 0 prediction, List 1 prediction, and bidirectional prediction.
[0134] It is understood that in this embodiment, List0 represents reference image list 0, which may also be called forward reference images, and List1 represents reference image list 1, which may also be called backward reference images.
[0135] For List0 prediction, the value of the flag bit for performing inter prediction using reference image list 0 is equal to 1, while the value of the flag bit for performing inter prediction using reference image list 1 is equal to 0. For example, forward prediction.
[0136] For List1 prediction, the value of the flag bit for performing inter prediction using reference image list 0 is equal to 0, and at the same time, the value of the flag bit for performing inter prediction using reference image list 1 is equal to 1. For example, backward prediction.
[0137] For bidirectional prediction, the value of the flag bit for performing inter prediction using reference picture list 0 is equal to 1, and at the same time, the value of the flag bit for performing inter prediction using reference picture list 1 is equal to 1. For example, forward prediction and backward prediction.
[0138] In this embodiment, the inter-prediction identification parameter may indicate that the prediction scheme used to decode the current block is bi-directional prediction.
[0139] Exemplarily, if the current block uses bidirectional prediction, the inter-prediction identification parameter may indicate that the prediction scheme used to decode the current block is bidirectional prediction. Otherwise, if the current block uses List0 prediction or List1 prediction, the inter-prediction identification parameter may indicate that the prediction scheme used to decode the current block is unidirectional prediction. Here, the prediction method used by the current block is set according to actual conditions, and the embodiment of the present application is not particularly limited thereto.
[0140] Exemplarily, the reference image index may be represented by inter_pred_idc, and the prediction list usage identification information may be represented by predFlagLX. When X=0, i.e., predFlagL0=1, unidirectional prediction may be performed using reference image List0. When X=1, i.e., predFlagL1=1, unidirectional prediction may be performed using reference image List1. When predFlagL0=1 and predFlagL1=1, bidirectional prediction may be performed using reference image List0 and reference image List1. That is, the embodiment of the present application may extend the prediction direction issue from determining it according to inter_pred_idc in the related art to determining it according to predFlagLX, which is more realistic. This is because, in modes such as merge and skip, whether to adopt unidirectional prediction or bidirectional prediction for a current block is determined depending on whether a merge candidate (mergeCand) is unidirectional or bidirectional.
[0141] S702, determining a first predicted block of the current block according to the prediction parameters;
[0142] In some embodiments, a first prediction block of a current block, such as a List0 prediction block and a List1 prediction block, may be determined according to information such as a decoded motion vector, a reference image index, an inter-prediction identification parameter, etc. Therefore, in some embodiments, the method may further include determining a List0 prediction block of the current block and a List1 prediction block of the current block according to the prediction parameters.
[0143] For example, if the prediction parameters include a motion vector, a first prediction block of the current block may be determined according to the motion vector. Here, if the prediction parameters include a first motion vector (e.g., a forward motion vector), a List0 prediction block of the current block may be determined according to the first motion vector, and / or if the prediction parameters include a second motion vector (e.g., a backward motion vector), a List1 prediction block of the current block may be determined according to the second motion vector.
[0144] That is, the List0 prediction block is selected from List 1 The List0 prediction block may be determined from the List1 reference picture according to the second motion vector, and the List0 prediction block may be determined from the List1 reference picture according to the second motion vector.
[0145] In a specific embodiment, , th The first predicted block is the List0 predicted block of the current block, or the first predicted block is the List1 predicted block of the current block, or the first predicted block is the List0 predicted block of the current block and the List1 predicted block of the current block. do.
[0146] In addition, for unidirectional prediction, the first prediction block may be the List0 prediction block of the current block, i.e., the aforementioned forward matching block, or the first prediction block may be the List1 prediction block of the current block, i.e., the aforementioned backward matching block.
[0147] It should be noted that, for bidirectional prediction, the first predicted block may be the List0 predicted block of the current block and the List1 predicted block of the current block. In this case, the predicted value of bidirectional prediction is predBI=w0×predList0+w1×predList1, where w0 and w1 represent the weight value of weighting.
[0148] It is understood that in the present embodiment, the value of the reference image index is correlated with the block category identification information (represented by cpcccmSizeId) of the current block. In some embodiments, the method may further include determining the block category identification information of the current block, and determining the value of the reference image index according to the block category identification information of the current block.
[0149] It is also understood that in this embodiment, determining the block category identification information of the current block may be determined by decoding the codestream or may be determined according to the dimension parameters of the current block.
[0150] Illustratively, when the value of cpcccmSizeId is equal to 0, the value of the reference image index is determined to be 1, when the value of cpcccmSizeId is equal to 1, the value of the reference image index is determined to be 0, and when the value of cpcccmSizeId is equal to 2, the value of the reference image index is determined to be 2. Alternatively, when the value of cpcccmSizeId is equal to 0, the value of the reference image index is determined to be 0, when the value of cpcccmSizeId is equal to 1, the value of the reference image index is determined to be 0, and when cpcccmSizeId is equal to 2, the value of the reference image index is determined to be 0.
[0151] In a specific embodiment, a first predicted block of the current block may also be determined according to a value of a reference image index. Accordingly, the method may further include: determining that the first predicted block is a List0 predicted block of the current block when the value of the reference image index is a first value; or determining that the first predicted block is a List1 predicted block of the current block when the value of the reference image index is a second value; or determining that the first predicted block is a List0 predicted block of the current block and a List1 predicted block of the current block when the value of the reference image index is a third value.
[0152] Exemplarily, the reference image index may be represented by inter_pred_idc. Assuming that the first, second, and third values are set to 0, 1, and 2, respectively, when the value of inter_pred_idc is 0, the first predictive block may be a List0 predictive block, when the value of inter_pred_idc is 1, the first predictive block may be a List1 predictive block, and when the value of inter_pred_idc is 2, the first predictive block may be a List0 predictive block and a List1 predictive block.
[0153] S703, determining model parameters according to the first color component value and the second color component value in the first prediction block.
[0154] In this embodiment, after determining a first predicted block of the current block, first and second color component values of the first predicted block may be obtained, where the first and second color component values are both reconstruction information, and model parameters may be calculated according to the first and second color component values of the first predicted block.
[0155] In some embodiments, model parameters may be determined in response to the first and second color component values in the first predicted block, where the model parameters may include coefficients of the target filter. Thus, in some embodiments, the method may include determining coefficients of the target filter in response to the first and second color component values in the first predicted block.
[0156] In a specific embodiment, the coefficients of the target filter may be determined by solving an optimization problem. Accordingly, the method may further include a step in which the coefficients of the target filter are coefficients used by the target filter when a first error between output values of the second color component value in the first prediction block and the first color component value in the first prediction block after the target filter processes them satisfies a first condition.
[0157] Regarding the first error satisfying the first condition, it is understood that in one possible implementation, the first condition is that the first error is minimal, or in another possible implementation, the first condition is that the first error is within a first preset threshold range, or in yet another possible implementation, the first condition is that the change in the first error is within a second preset threshold range.
[0158] It is also understood that the first preset threshold range and the second preset threshold range are both measurement standards preset by the decoding side for determining whether the first error satisfies the first condition. The first error here may be a mean square error (MSE), a sum of squared errors (SSE), a sum of absolute differences (SAD), a sum of absolute transformed differences (SATD) after Hadamard transform, or a mean absolute error (MAE), but the embodiment of the present application is not particularly limited thereto.
[0159] In this embodiment, the first color component value in the first predicted block may refer to the luma reconstructed value in the first predicted block, where it may be denoted as refrecY[i] for the luma reconstructed value of pixel i, and the second color component value in the first predicted block may refer to the chroma reconstructed value in the first predicted block, where it may be denoted as refrecC[i] for the chroma reconstructed value of pixel i.
[0160] JPEG2024077520000022.jpg29168
[0161] JPEG2024077520000023.jpg27168
[0162] where i=0,1,2,…,predSizeW×predSizeH-1, refpredC[i] represents the chromaticity value predicted by CP-CCCM, and c n represents the coefficient of the target filter, n represents the coefficient number, and n=0, 1, . . . , nTap-1, where nTap is the number of coefficients of the target filter.
[0163] Furthermore, the coefficients of the target filter are derived by minimizing the MSE, and the process is specifically as follows:
[0164] JPEG2024077520000024.jpg20167
[0165] JPEG2024077520000025.jpg20167
[0166] JPEG2024077520000026.jpg19167
[0167] JPEG2024077520000027.jpg8106
[0168] JPEG2024077520000028.jpg20146
[0169] In another specific embodiment, the step of determining the coefficients of the target filter according to the first color component value and the second color component value in the first prediction block may include:
[0170] An autocorrelation parameter is determined according to a first color component value in the first predicted block.
[0171] A cross-correlation parameter is determined according to the first color component value and the second color component value in the first prediction block.
[0172] The coefficients of the target filter are determined according to the autocorrelation and cross-correlation parameters.
[0173] JPEG2024077520000029.jpg29167
[0174] JPEG2024077520000030.jpg58167
[0175] JPEG2024077520000031.jpg28169
[0176] JPEG2024077520000032.jpg39108
[0177] JPEG2024077520000033.jpg30167
[0178] JPEG2024077520000034.jpg3663
[0179] JPEG2024077520000035.jpg19166
[0180] JPEG2024077520000036.jpg3769
[0181] According to the determined first predicted block (reference block region), Equation (15) is expanded into a matrix form as shown in Equation (18). By solving the set of linear equations shown in Equation (18), a set of target filter coefficients can be obtained, which minimizes the MSE between the desired output after filtering, i.e., the chrominance values predicted by CP-CCCM and the chrominance reconstructed values of the desired output, i.e., the Wiener filter coefficients, and the set of Wiener filter coefficients is a set of target filter coefficients for the current block.
[0182] In the process of solving the set of linear equations, first, the autocorrelation parameters of the luminance reconstructed sample refRecY in the first prediction block are calculated, then the cross-correlation parameters between the luminance reconstructed sample refRecY and the chrominance reconstructed sample refRecC in the first prediction block are calculated, and then the autocorrelation parameters are subjected to Cholesky decomposition or LDL decomposition. Finally, each target filter coefficient c is calculated by reverse recursion. n are calculated sequentially.
[0183] In this embodiment, it is also necessary to determine the number of coefficients of the target filter and the shape of the target filter for the target filter, where the number of coefficients of the target filter and the shape of the target filter can be preset fixed values or can be directly determined by decoding the codestream.
[0184] In some embodiments, the number of coefficients of the target filter ,eye The number of coefficients of the standard filter is equal to the first preset constant value. stomach.
[0185] In some embodiments, the method may further include the step of decoding the codestream to determine the number of coefficients of the target filter.
[0186] In some embodiments, for the number of coefficients of the target filter, the method may further include determining a first block category identification information of the current block, and determining the number of coefficients of the target filter according to the first block category identification information of the current block.
[0187] The number of coefficients of the target filter may be expressed as nTap. The value is , 4, 5, 6, 7, 8, 9, etc., but is not particularly limited.
[0188] The number of coefficients of the target filter may be referred to as the number of target filter taps, where the number of coefficients of the target filter may be a preset constant value, may be determined by decoding the codestream, or may be determined according to the first block category identification information of the current block.
[0189] Illustratively, if the value of the block category first identification information is equal to 0, the value of nTap is determined to be 3, if the value of the block category first identification information is equal to 1, the value of nTap is determined to be 5, and if the value of the block category first identification information is equal to 2, the value of nTap is determined to be 9. Alternatively, if the value of the block category first identification information is equal to 0, the value of nTap is determined to be 4, if the value of the block category first identification information is equal to 1, the value of nTap is determined to be 7, and if the value of the block category first identification information is equal to 2, the value of nTap is determined to be 9.
[0190] In some embodiments, the shape of the target filter ,eye The target filter is a one-dimensional or two-dimensional filter of a preset shape. do.
[0191] In some embodiments, for the shape of the target filter, the method may further include decoding the codestream and determining the shape of the target filter.
[0192] In some embodiments, for the shape of the target filter, the method may further comprise determining values of filter shape parameters, where the filter shape parameters indicate the shape of the target filter.
[0193] In some embodiments, for the shape of the target filter, the method may further include determining a second block category identification information of the current block, and determining a value of a filter shape parameter according to the second block category identification information of the current block.
[0194] The filter shape parameter may be represented by FilterIdx, which is used to indicate the shape of the target filter. For example, the shape of the target filter may be, but is not limited to, a diamond, a rectangle, a cross, a bar, or even a one-dimensional filter or a two-dimensional filter.
[0195] Illustratively, if the value of FilterIdx is equal to 0, the shape of the target filter is determined to be a diamond, if the value of FilterIdx is equal to 1, the shape of the target filter is determined to be a cross, and if the value of FilterIdx is equal to 2, the shape of the target filter is determined to be a rectangle.
[0196] The shape of the target filter may be a preset shape, may be determined by decoding the codestream, or may be determined according to the second identification information of the block category of the current block.
[0197] Exemplarily, when the value of the block category second identification information is equal to 0, the value of FilterIdx is determined to be 2, when the value of the block category second identification information is equal to 1, the value of FilterIdx is determined to be 1, and when the value of the block category second identification information is equal to 2, the value of FilterIdx is determined to be 0. Alternatively, when the value of the block category second identification information is equal to 0, the value of FilterIdx is determined to be 1, when the value of the block category second identification information is equal to 1, the value of FilterIdx is determined to be 2, and when the value of the block category second identification information is equal to 2, the value of FilterIdx is determined to be 0.
[0198] It is understood that in this embodiment, the second block category identification information may be the same as or different from the first block category identification information. For example, in a specific embodiment, the first block category identification information may be the same as the second block category identification information, that is, one identification information may be used to simultaneously indicate the number of coefficients of the target filter and the shape of the target filter.
[0199] Also, it is understood that the block category identification information, block category first identification information, and block category second identification information described in the embodiments of the present application are all the same. That is, one piece of identification information (represented by cpcccmSizeId) may be used, and the value of cpcccmSizeId may simultaneously indicate the reference image index inter_pred_idc, the number of coefficients nTap of the target filter, and the shape FilterIdx of the target filter.
[0200] In the embodiments of the present application, regarding the value of cpcccmSizeId, it may be to decode the code stream to determine the value of cpcccmSizeId, or to determine the value of cpcccmSizeId according to the dimension parameters of the current block. Here, the dimension parameters of the current block may include the width (represented by nTbW) and the height (represented by nTbH).
[0201] Exemplarily, when the dimension parameters of the current block satisfy min(nTbW,nTbH)<=8, the value of cpcccmSizeId is determined to be 0. When the dimension parameters of the current block satisfy 8<min(nTbW,nTbH)<=32, the value of cpcccmSizeId is determined to be 1. When the dimension parameters of the current block satisfy min(nTbW,nTbH)>32, the value of cpcccmSizeId is determined to be 2.
[0202] Exemplarily, when the dimension parameters of the current block satisfy min(nTbW,nTbH)<=64, the value of cpcccmSizeId is determined to be 0. When the dimension parameters of the current block satisfy 64<min(nTbW,nTbH)<=256, the value of cpcccmSizeId is determined to be 1. When the dimension parameters of the current block satisfy min(nTbW,nTbH)>256, the value of cpcccmSizeId is determined to be 2.
[0203] S704: determine a reference sample value of the first color component sampling point of the current block; and determine a predicted value of the second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters.
[0204] In this embodiment, it is necessary to determine the reference sample values of the first color component sampling points of the current block before determining the predicted values of the second color component sampling points of the current block.
[0205] In some embodiments, determining the reference sample value of the first color component sampling point of the current block may include determining the reference sample value of the first color component sampling point of the current block according to the reconstructed value of the first color component sampling point of the current block.
[0206] In a specific embodiment, the method may further include determining a reconstruction value of a first color component sampling point of the current block according to a first color component value in the first predicted block.
[0207] In this embodiment, for unidirectional prediction, the step of determining a reconstructed value of a first color component sampling point of the current block according to a first color component value in a first predicted block may include a step of determining a reconstructed value of a first color component sampling point of the current block according to a first color component value in a List0 predicted block of the current block, or a step of determining a reconstructed value of a first color component sampling point of the current block according to a first color component value in a List1 predicted block of the current block.
[0208] In an embodiment of the present application, for bidirectional prediction, the step of determining a reconstructed value of a first color component sampling point of a current block according to a first color component value in a first predicted block may include the step of determining a reconstructed value of a first color component sampling point of a current block according to a first color component value in a List0 predicted block of the current block and a first color component value in a List1 predicted block of the current block.
[0209] In another specific embodiment, the method may further include determining the reconstructed value of the first color component sampling point of the current block according to a decoded image cache unit (Buffer), that is, on the decoding side, the reconstructed value of the first color component sampling point of the current block may be directly obtained from the decoded image cache unit (Buffer).
[0210] In some embodiments, the method may further include performing a filtering process on the reconstructed values of the first color component sampling points of the current block to determine filter reconstructed values of the first color component sampling points of the current block, and determining reference sample values of the first color component sampling points of the current block according to the filter reconstructed values of the first color component sampling points of the current block.
[0211] In the present embodiment, the reconstructed value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block, and the filter reconstructed value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block, but this is not particularly limited.
[0212] In some embodiments, the step of determining the reference sample value of the first color component sampling point of the current block may include the steps of determining a predicted value of the first color component sampling point of the current block according to the first color component value in the first predicted block, and determining the reference sample value of the first color component sampling point of the current block according to the predicted value of the first color component sampling point of the current block.
[0213] In this embodiment, for unidirectional prediction, the step of determining a predicted value of the first color component sampling point of the current block according to the first color component value in the first prediction block may include the step of determining a predicted value of the first color component sampling point of the current block according to the first color component value in the List0 prediction block of the current block, or determining a predicted value of the first color component sampling point of the current block according to the first color component value in the List1 prediction block of the current block.
[0214] Here, taking List0 predicted block as an example, specifically, the predicted value of the first color component sampling point of the current block is determined according to the first color component value of the List0 predicted block of the current block, and then the predicted value of the first color component sampling point of the current block is used as the reference sample value of the first color component sampling point of the current block.In addition, the processing process of List1 predicted block is similar and will not be repeated here.
[0215] In an embodiment of the present application, for bidirectional prediction, the step of determining a predicted value of a first color component sampling point of a current block according to a first color component value in a first prediction block may include the step of determining a predicted value of a first color component sampling point of a current block according to a first color component value in a List0 prediction block of the current block and a first color component value in a List1 prediction block of the current block.
[0216] In a specific embodiment, the method may further include determining a List0 weighting coefficient of the List0 predicted block of the current block and a List1 weighting coefficient of the List1 predicted block of the current block; determining a weighted sum of a first color component value in the List0 predicted block of the current block and a first color component value in the List1 predicted block of the current block according to the List0 weighting coefficient and the List1 weighting coefficient; and determining a predicted value of a first color component sampling point of the current block according to the weighted sum.
[0217] Here, taking the List0 prediction block and the List1 prediction block as examples, specifically, a weighted sum is calculated for the first color component value in the List0 prediction block and the first color component value in the List1 prediction block according to the List0 weighting coefficient and the List1 weighting coefficient, to determine the predicted value of the first color component sampling point of the current block, and then the predicted value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block.
[0218] In some embodiments, the method may further include performing a filtering process on the predicted value of the first color component sampling point of the current block, determining a filtered predicted value of the first color component sampling point of the current block, and determining a reference sample value of the first color component sampling point of the current block according to the filtered predicted value of the first color component sampling point of the current block.
[0219] In this embodiment, the predicted value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block, or the filtered predicted value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block, but this is not particularly limited.
[0220] Furthermore, in the present embodiment, assuming that the first color component is a luminance component and the second color component is a chromaticity component, it is understood that the filtering process here may be a low-pass filter, a downsampling filter, etc., thereby making the resolution of the first color component after filtering the same as the resolution of the second color component.
[0221] Furthermore, after determining the reference sample values of the first color component sampling points of the current block, they may be used to determine predicted values of the second color component sampling points of the current block. Therefore, in some embodiments, determining predicted values of the second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters may include determining first input values of the target filter based on the reference sample values of the first color component sampling points of the current block, determining first output values of the target filter based on the first input values and the model parameters, and determining predicted values of the second color component sampling points of the current block based on the first output values.
[0222] In addition, in the present embodiment, after determining the reference sample value of the first color component sampling point of the current block, in some embodiments, the method may further include a step of performing a first filtering process on the reference sample value of the first color component sampling point of the current block to determine a first input value.
[0223] It is understood that in the present embodiment, the first filtering process may include at least one of a low-pass filter and a down-sampling filter. Exemplarily, the down-sampling filter may make the resolution of the first color component after filtering the same as the resolution of the second color component.
[0224] It is also understood that in this embodiment, the first filtering process sets the first input value equal to the reference sample value of the first color component sampling point of the current block.
[0225] In this case, the reference sample value of the first color component sampling point of the current block may be directly used as the first input value of the target filter, or the filtered value of the first color component sampling point of the current block may be used as the first input value. For example, the reconstructed value of the first color component sampling point of the current block may be used as the first input value, or the reconstructed filter value of the first color component sampling point of the current block may be used as the first input value, or the predicted value of the first color component sampling point of the current block may be used as the first input value, or the predicted filter value of the first color component sampling point of the current block may be used as the first input value. However, the present embodiment is not particularly limited.
[0226] JPEG2024077520000037.jpg27169
[0227] JPEG2024077520000038.jpg1990
[0228] JPEG2024077520000039.jpg39167
[0229] JPEG2024077520000040.jpg2096
[0230] where n = 0, 1, ..., nTap-1, i = 0, 1, ..., predSizeW-1, and j = 0, 1, ..., predSizeH-1. A second prediction block may also be determined according to the first output value, with the width of the second prediction block being predSizeW and the height of the second prediction block being predSizeH.
[0231] In this embodiment, after determining the first output value of the target filter based on the first input value and the model parameters, if the first output value (i.e., the second predicted block) includes the predicted values of all the second color component sampling points of the current block, the first output value can be directly used as the predicted value of the second color component sampling points of the current block.If the first output value (i.e., the second predicted block) includes the predicted values of some of the second color component sampling points of the current block, it is also necessary to perform a correlation process on the first output value before using it as the predicted value of the second color component sampling points of the current block.
[0232] In some embodiments, determining a predicted value of a second color component sampling point of the current block based on the first output value may include performing a second filtering operation on the first output value to determine a second output value, and determining a predicted value of the second color component sampling point of the current block based on the second output value.
[0233] It is understood that in this embodiment, the second filtering process may include at least one of a low-pass filter and an up-sampling filter. Illustratively, the dimension parameters of the second prediction block after up-sampling filtering are the same as the dimension parameters of the current block.
[0234] It is also understood that in this embodiment, the second filtering process sets the second output value equal to the first output value.
[0235] In some embodiments, a correlation process may be performed on the second output values to limit the obtained second output values to within a predetermined numerical range. In some embodiments, determining the predicted values of the second color component sampling points of the current block based on the second output values may include performing a first process on the second output values to obtain the predicted values of the second color component sampling points of the current block.
[0236] It is understood that in this embodiment, the first process is a clipping operation for limiting the second output value to within a preset numerical range.
[0237] JPEG2024077520000041.jpg47168
[0238] JPEG2024077520000042.jpg10110
[0239] JPEG2024077520000043.jpg19166
[0240] JPEG2024077520000044.jpg18166
[0241] In this way, after performing the correction process on the second output value, it can be ensured that the predicted values of all the second color component sampling points in the current block are all within the range of 0 to (1 << BitDepth) - 1.
[0242] In addition, in the embodiments of the present application, after determining the first output value according to the target filter, the predicted value of the second color component sampling point of the current block may be determined by adding the first offset value (represented by bias) to the target filter.
[0243] In some embodiments, the step of determining the predicted value of the second color component sampling point of the current block based on the first output value may include performing an addition operation according to the first output value and the first offset value to determine the predicted value of the second color component sampling point of the current block.
[0244] In a specific embodiment, the first offset value is set equal to a preset constant value, or the first offset value is set equal to the value in the preset mapping relationship of the first input value.
[0245] JPEG2024077520000045.jpg69168
[0246] JPEG2024077520000046.jpg2095
[0247] JPEG2024077520000047.jpg19166
[0248] JPEG2024077520000048.jpg19109
[0249] JPEG2024077520000049.jpg966
[0250] JPEG2024077520000050.jpg89167
[0251] In addition, in the present embodiment, it is understood that bias does not need to include a coefficient term involved in the calculation of the filter coefficient, for example, bias = Constant. Here, Constant may be a constant such as Constant = 1 << (BitDepth - 1), a numerical value related to the luminance pixel value at the same luminance position (i, j) such as Constant = f(FilterY[i][j]), or a numerical value related to the luminance pixel value corresponding to a tap in the target filter other than the same luminance position (i, j) such as Constant = f(FilterY[k][l]). Meanwhile, Constant = f(FilterY[i][j]) or Constant = f(FilterY[k][l]) may be a linear mapping relationship or a nonlinear mapping relationship, but is not particularly limited here.
[0252] JPEG2024077520000051.jpg38167
[0253] In a possible implementation, the step of performing a correlation process on the predicted values of the second color component sampling points of the current block may include a step of performing a filter enhancement process on the predicted values of the second color component sampling points of the current block.
[0254] JPEG2024077520000052.jpg39167
[0255] JPEG2024077520000053.jpg19167
[0256] In another possible implementation, the step of performing a correlation process on the predicted value of the second color component sampling point of the current block may include a step of determining a compensation value of the second color component sampling point of the current block according to a reference sample value of an adjacent area of the current block, and performing a correction process on the predicted value of the second color component sampling point of the current block according to the compensation value.
[0257] For example, to further improve prediction accuracy in the CP-CCCM mode, a position correlation correction process may be performed on the predicted values. For example, a chromaticity compensation value is calculated for each second-color component sampling point of a prediction target using a reference pixel that is spatially close, the second-color component sampling point of the current block is corrected using the chromaticity compensation value, and a final predicted value of the second-color component sampling point is determined according to the corrected predicted value.
[0258] In yet another possible implementation, the step of performing a correlation process on the predicted values of the second color component sampling points of the current block may include the steps of performing a prediction process on the second color component sampling points of the current block according to at least one prediction mode, determining at least one initial predicted value of the second color component sampling points of the current block, and performing a weighted fusion process according to the at least one initial predicted value and the predicted values of the second color component sampling points of the current block.
[0259] For example, in order to further improve the prediction accuracy under the CP-CCCM mode, a weighted fusion may be performed on the chromaticity prediction value calculated by the original chromaticity weighted prediction and the chromaticity prediction value calculated by the CP-CCCM mode, and the fusion result may be used as the final prediction value.
[0260] Illustratively, to improve the predictive performance of the CP-CCCM model, a neural network may be used to correct the predicted output of the CP-CCCM model to obtain a final predicted value.
[0261] S705, determining the reconstructed values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block;
[0262] In some embodiments, after obtaining the predicted values of the second color component sampling points of the current block, the reconstructed values of the second color component sampling points of the current block may be further restored. In some embodiments, determining the reconstructed values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block may include:
[0263] The codestream is decoded to determine the predicted residual value of the second color component sampling point of the current block.
[0264] A reconstructed value of the second color component sampling point of the current block is determined according to the predicted value of the second color component sampling point of the current block and the predicted difference value of the second color component sampling point of the current block.
[0265] In a specific embodiment, the step of determining the reconstructed values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block and the predicted differential values of the second color component sampling points of the current block may include performing an addition operation on the predicted values of the second color component sampling points of the current block and the predicted differential values of the second color component sampling points of the current block to determine the reconstructed values of the second color component sampling points of the current block.
[0266] For example, taking the chrominance component as an example, the chrominance prediction difference value of the current block may be obtained by decoding the code stream, and then an addition operation may be performed on the chrominance prediction value and the chrominance prediction difference value to obtain the chrominance reconstruction value of the current block.
[0267] In some embodiments, the method may further include a step of analyzing the codestream, determining prediction mode identification information for the current block, and if the prediction mode identification information indicates that the current block is to undergo weighted prediction using a model based on convolutional cross-components, performing a step of determining a prediction block for the current block according to motion information.
[0268] In a specific embodiment, the method may further include a step of determining that the current block performs weighted prediction using a model based on convolutional cross-components when the value of the prediction mode identification information is a fourth value, and / or a step of determining that the current block performs weighted prediction without using a model based on convolutional cross-components when the value of the prediction mode identification information is a fifth value.
[0269] In this embodiment, the fourth value and the fifth value are different from each other, and the fourth value and the fifth value may be in a parameter format or a numerical format. Specifically, the prediction mode identification information may be a parameter written in a profile or may be a value of a single flag, but is not particularly limited thereto.
[0270] For example, for the fourth value and the fifth value, the fourth value may be set to 1 and the fifth value may be set to 0, or the fourth value may also be set to true and the fifth value may also be set to false, but this is not particularly limited here.
[0271] In this embodiment, the convolutional cross-component model performs chrominance prediction using the CP-CCCM mode. Here, determining whether the current block performs chrominance prediction using the CP-CCCM mode to determine the final inter chrominance prediction value may be determined according to certain conditions, but is not limited to the following four methods. For example, these four methods are as follows:
[0272] Method 1: Determine whether to use CP-CCCM mode by comparing the reconstructed luminance of the first predicted block and the luminance difference of the current block, such as SAD, MSE, SATD, or SSE (or corresponding information of the luminance residual of the current block), with a threshold T_Distortion1.
[0273] Method 2: Based on the fact that Method 1 satisfies the use of CP-CCCM mode, the distortion between the chrominance reconstruction value of the first predicted block and its CP-CCCM mode chrominance prediction value, such as SAD, MSE, SATD, or SSE, and a threshold T_Distortion2 are used to determine whether the current block uses the CP-CCCM mode chrominance prediction value to replace the original inter-weighted chrominance prediction value.
[0274] Method 3: The calculated target filter coefficients are used as the filter template of the current block to obtain the CP-CCCM predicted value of the template. Then, the template of the first predicted block is obtained and weighted prediction is performed to obtain the weighted template predicted value. The weighted template predicted value and the CP-CCCM chroma predicted value of the template are used to calculate distortions such as SAD, MSE, SATD, or SSE for the reconstructed chroma of the current block, and it is determined whether to use the CP-CCCM chroma predicted value of the current block to replace the weighted chroma predicted value of the current block.
[0275] Method 4: The encoding side may transmit one flag to indicate whether to use the CP-CCCM mode chrominance prediction value of the current block to replace the weighted chrominance prediction value of the current block, and then the decoding side analyzes the flag to determine whether to use the CP-CCCM mode chrominance prediction value of the current block to replace the weighted chrominance prediction value of the current block.
[0276] An embodiment of the present application provides a decoding method, which includes: decoding a codestream; determining prediction parameters for a current block; determining a first predicted block of the current block according to the prediction parameters; determining model parameters according to first and second color component values in the first predicted block; determining reference sample values for the first color component sampling points of the current block; determining predicted values for the second color component sampling points of the current block according to the reference sample values for the first color component sampling points of the current block and the model parameters; and determining reconstructed values for the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block. In this way, the model parameters are determined according to the first and second color component values in the first predicted block, and the model parameters fully represent the correlation between luma and chroma in the predicted block, and chroma prediction is performed by applying the correlation to existing luma information of the current block, thereby improving the accuracy of inter-chroma prediction, improving the efficiency of encoding and decoding, and ultimately improving the performance of encoding and decoding.
[0277] In another embodiment of the present application, based on the decoding method described in the previous embodiment, the reference sample value of the first color component sampling point of the current block may be determined according to the reconstructed value of the first color component sampling point of the current block or the predicted value of the first color component sampling point of the current block, or may be determined according to the predicted difference value of the first color component sampling point of the current block. In this case, the model parameters may be adaptively determined according to the first color component residual value and the second color component residual value of the first predicted block.
[0278] In some embodiments, the method may further include determining a prediction difference value of a first color component sampling point of the current block, determining a reference sample value of the first color component sampling point of the current block according to the prediction difference value of the first color component sampling point of the current block, determining a first color component residual value and a second color component residual value in the first predicted block, and determining model parameters according to the first color component residual value and the second color component residual value in the first predicted block.
[0279] Accordingly, in some embodiments, the step of determining predicted values of the second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters may include the steps of: determining initial predicted differential values of the second color component sampling points of the current block according to the predicted differential values of the first color component sampling points of the current block and the model parameters; determining initial predicted values of the second color component sampling points of the current block according to the first predicted block; and determining predicted values of the second color component sampling points of the current block according to the initial predicted differential values and the initial predicted values of the second color component sampling points of the current block.
[0280] Specifically, assuming that the first color component is a luma component and the second color component is a chroma component, model parameters may be determined according to the luma residual value and the chroma residual value of the first predicted block, and the model parameters may reflect the correspondence between the luma residual and the chroma residual. Next, after determining the luma prediction difference value of the current block, an initial chroma prediction difference value of the current block may be determined according to the model parameters and the luma prediction difference value of the current block. Then, an inter-prediction process may be performed according to the first predicted block to determine an initial chroma prediction value of the current block. An addition operation may be performed on the initial chroma prediction value of the current block and the initial chroma prediction difference value of the current block to obtain a final chroma prediction value of the current block.
[0281] It is understood that in this embodiment, for the first color component residual values and second color component residual values in the first prediction block, an additional decoding cache unit (Buffer) is also required to cache the luma residual values and chroma residual values in the first prediction block.
[0282] In addition, in the present embodiment, when determining the model parameters, not only the first color component value and the second color component value in the first prediction block may be used, but also the first color component residual value and the second color component residual value in the first prediction block may be used, or the first color component residual value and the second color component residual value after filtering in the first prediction block may be used, or even the first color component residual value and the second color component value in the first prediction block may be used, but it is understood that this is not particularly limited here.
[0283] In a specific embodiment, referring to FIG. 8, a flowchart block diagram of a decoding method according to an embodiment of the present application is shown. As shown in FIG. 8, the flowchart block diagram may include a model parameter generation unit 801, a target filter 802, and a post-processing unit 803. Here, for the model parameter generation unit 801, the input is input information and the output is model parameters. For the target filter 802, the model parameters are the filter parameters of the target filter 802, the input is model input value, and the output is model output value. If the post-processing unit 803 is not present, the model output value is a chrominance prediction value. If the post-processing unit 803 is present, correlation processing needs to be performed on the model output value to obtain the chrominance prediction value.
[0284] In this embodiment, the first predicted block is a matching block in the reference frame and may be represented by pic(xCb-mvX, yCb-mvY, t-refIdxLX). The current block is a block to be decoded in the current frame and may be represented by pic(xCb, yCb, t), where mvX represents the motion vector of the x-coordinate axis, mvY represents the motion vector of the y-coordinate axis, and refIdxLX represents the time domain information between the current frame and the reference frame.
[0285] In the present embodiment, in the cross-component prediction of the current block, the reconstructed pixel information of the first predicted block is not directly used as the chromaticity predicted value of the current block, but the chromaticity predicted value of the current block is determined by performing chromaticity prediction using the reconstructed pixel information of the first predicted block as auxiliary information.
[0286] Regarding the input information, the input information may be luma reconstruction information and chroma reconstruction information of the first prediction block, or may be filtered luma reconstruction information and / or filtered chroma reconstruction information of the first prediction block. Furthermore, the input information may be luma reconstructed residual information and chroma reconstructed residual information of the first prediction block, or may be filtered luma reconstructed residual information and / or filtered chroma reconstructed residual information of the first prediction block. Furthermore, the input information may be luma reconstructed residual information and chroma reconstructed information of the first prediction block, or may be filtered luma reconstructed residual information and / or filtered chroma reconstructed residual information of the first prediction block, but the present embodiment is not particularly limited thereto. Note that an additional decoding cache unit (Buffer) is required to cache both the luma reconstructed residual information and the chroma reconstructed residual information of the first prediction block.
[0287] Regarding the model input value, the model input value is the reference sample value of the first color component sampling point of the current block in the above embodiment. Here, the model input value may be the luma component value of the first predicted block, or the luma component value after filtering of the first predicted block. In this case, if the post-processing unit 803 is not present, the model output value is the chroma predicted value of the current block. If the post-processing unit 803 is present, the model output value is the initial chroma predicted value of the current block, and then a correlation process (e.g., a clip operation) is performed on the initial chroma predicted value to obtain the chroma predicted value of the current block.
[0288] Also, the model input value may be the luma reconstruction value of the current block, or the filtered luma reconstruction value of the current block. In this case, if the post-processing unit 803 is not present, the model output value is the chroma prediction value of the current block. If the post-processing unit 803 is present, the model output value is the initial chroma prediction value of the current block. Then, after performing a correlation operation (for example, a clip operation) on the initial chroma prediction value, the chroma prediction value of the current block is obtained.
[0289] Furthermore, the model input value may be a luma prediction difference value of the current block, or a filtered luma prediction difference value of the current block. In this case, if the post-processing unit 803 is not present, the model output value is a chroma prediction value of the current block. If the post-processing unit 803 is present, the model output value is an initial chroma prediction value of the current block. Then, a correlation process (e.g., a clip operation) is performed on the initial chroma prediction value to obtain a chroma prediction value of the current block. Alternatively, if the post-processing unit 803 is present, the model output value may also be an initial chroma prediction difference value predResidualChroma(xCb, yCb) of the current block. Then, the chroma prediction value of the current block is determined according to the initial chroma prediction value determined by the first prediction block + the initial chroma prediction difference value. In this case, the chroma reconstruction value may be obtained according to the initial chroma prediction value determined by the first prediction block + the initial chroma prediction difference value + the chroma prediction difference value of the decoded code stream. Alternatively, if the post-processing unit 803 is present, the model output value may further be the initial chrominance prediction difference value predResidualChroma(xCb, yCb) of the current block. Then, the chrominance prediction value of the current block is determined according to the initial chrominance prediction value determined by the first prediction block+the initial chrominance prediction difference value after filtering. In this case, the chrominance reconstruction value may be obtained according to the initial chrominance prediction value determined by the first prediction block+the initial chrominance prediction difference value after filtering+the chrominance prediction difference value of the decoded code stream.
[0290] It should be noted that the chromaticity prediction method of the present embodiment is not generally applicable to unidirectional prediction (including forward prediction or backward prediction). Here, for unidirectional prediction, chromaticity prediction may be performed directly using the reconstructed chromaticity information of the first predicted block.
[0291] This embodiment provides a decoding method. As can be seen from the specific implementation of the above embodiment, model parameters are determined according to the first color component value and the second color component value in the first prediction block, and the model parameters fully represent the correlation between luma and chroma in the prediction block. The correlation is applied to the existing luma information of the current block to perform chroma prediction, thereby improving the accuracy of inter-chroma prediction, improving the efficiency of encoding and decoding, and ultimately improving the performance of encoding and decoding.
[0292] In another embodiment of the present application, referring to Figure 9, a flowchart of an encoding method according to an embodiment of the present application is shown. As shown in Figure 9, the method may include:
[0293] S901, determining prediction parameters of the current block.
[0294] The encoding method of the present embodiment is applied to an encoder. Specifically, the encoding method may refer to an inter-prediction method, more specifically, an inter-chrominance prediction method. In the inter-prediction process, a technique based on CP-CCCM is proposed to improve the accuracy of chrominance prediction.
[0295] In this embodiment, a video image may be divided into multiple coding blocks, and each coding block may include a first color component, a second color component, and a third color component, and the current block in this embodiment refers to the coding block of the video image that is currently the target of inter prediction.
[0296] Note that in this embodiment, prediction parameters of the current block need to be determined first, and in some embodiments, the prediction parameters may include a motion vector, a reference image index, and an inter-prediction identification parameter.
[0297] Here, the reference image index indicates whether the reference image used for the current block is List0 or List1. The inter prediction identification parameter indicates whether the current block is encoding The prediction method may include List0 prediction, List1 prediction, and bidirectional prediction.
[0298] It is understood that in this embodiment, List0 represents reference image list 0, which may also be called forward reference images, and List1 represents reference image list 1, which may also be called backward reference images.
[0299] It is also understood that in this embodiment, the inter prediction identification parameter indicates that the prediction scheme used to encode the current block is bidirectional prediction.
[0300] Exemplarily, if the current block uses bidirectional prediction, the inter-prediction identification parameter may indicate that the prediction scheme used to encode the current block is bidirectional prediction. Otherwise, if the current block uses List0 prediction or List1 prediction, the inter-prediction identification parameter may indicate that the prediction scheme used to encode the current block is unidirectional prediction. Here, the prediction method used by the current block is set according to actual conditions, and the embodiment of the present application is not particularly limited thereto.
[0301] Exemplarily, the reference image index may be represented by inter_pred_idc, and the prediction list usage identification information may be represented by predFlagLX. When X=0, i.e., predFlagL0=1, unidirectional prediction may be performed using reference image List0. When X=1, i.e., predFlagL1=1, unidirectional prediction may be performed using reference image List1. When predFlagL0=1 and predFlagL1=1, bidirectional prediction may be performed using reference image List0 and reference image List1.
[0302] In some embodiments, the method may further include encoding the prediction parameters and writing the resulting coded bits into a codestream.
[0303] It is understood that in this embodiment, the encoding side may encode the prediction parameters, write them into the codestream, and then transmit them to the decoding side. In this way, the decoding side may obtain prediction parameters such as motion vectors, reference image indexes, and inter-prediction identification parameters by decoding the codestream.
[0304] S902, determining a first predicted block of the current block according to the prediction parameters.
[0305] In some embodiments, a first prediction block of the current block, such as a List0 prediction block and a List1 prediction block, may be determined according to information such as the obtained motion vector, the reference image index, and the inter-prediction identification parameter, etc. Therefore, in some embodiments, the method may further include determining a List0 prediction block of the current block and a List1 prediction block of the current block according to the prediction parameters.
[0306] In a specific embodiment, , th The first predicted block is the List0 predicted block of the current block, or the first predicted block is the List1 predicted block of the current block, or the first predicted block is the List0 predicted block of the current block and the List1 predicted block of the current block. do.
[0307] In addition, for unidirectional prediction, the first prediction block may be the List0 prediction block of the current block, i.e., the aforementioned forward matching block, or the first prediction block may be the List1 prediction block of the current block, i.e., the aforementioned backward matching block.
[0308] It should be noted that, for bidirectional prediction, the first predicted block may be the List0 predicted block of the current block and the List1 predicted block of the current block. In this case, the predicted value of bidirectional prediction is predBI=w0×predList0+w1×predList1, where w0 and w1 represent the weight value of weighting.
[0309] In a possible implementation, if the prediction parameters include a motion vector, a first prediction block of the current block may be determined according to the motion vector. Here, if the prediction parameters include a first motion vector (e.g., a forward motion vector), a List0 prediction block of the current block may be determined according to the first motion vector, and / or if the prediction parameters include a second motion vector (e.g., a backward motion vector), a List1 prediction block of the current block may be determined according to the second motion vector.
[0310] In another possible implementation manner, when the prediction parameters include a reference image index, the first predicted block of the current block may also be determined according to the value of the reference image index, where if the value of the reference image index is a first value, the first predicted block is determined to be the List0 predicted block of the current block, or if the value of the reference image index is a second value, the first predicted block is determined to be the List1 predicted block of the current block, or if the value of the reference image index is a third value, the first predicted block is determined to be the List0 predicted block of the current block and the List1 predicted block of the current block.
[0311] Exemplarily, the reference image index may be represented by inter_pred_idc. Assuming that the first, second, and third values are set to 0, 1, and 2, respectively, when the value of inter_pred_idc is 0, the first predictive block may be a List0 predictive block, when the value of inter_pred_idc is 1, the first predictive block may be a List1 predictive block, and when the value of inter_pred_idc is 2, the first predictive block may be a List0 predictive block and a List1 predictive block.
[0312] Furthermore, in some embodiments, the value of the reference image index may be determined according to the block category identification information of the current block, which is correlated with the dimension parameters of the current block, where in some embodiments, the method may further include determining the block category identification information of the current block according to the dimension parameters of the current block, encoding the block category identification information of the current block, and writing the obtained encoded bits into the codestream.
[0313] In this way, the encoding side can encode the block category identification information of the current block, write it into the codestream, and then transmit it to the decoding side. In this way, the decoding side can obtain the block category identification information of the current block by decoding the codestream, and then determine the value of inter_pred_idc according to the block category identification information of the current block, and ultimately determine the first prediction block.
[0314] S903, determining model parameters according to the first color component value and the second color component value in the first prediction block.
[0315] In this embodiment, after determining a first predicted block of the current block, first and second color component values of the first predicted block may be obtained, where the first and second color component values are both reconstruction information, and model parameters may be calculated according to the first and second color component values of the first predicted block.
[0316] In some embodiments, model parameters may be determined in response to the first and second color component values in the first predicted block, where the model parameters may include coefficients of the target filter. Thus, in some embodiments, the method may include determining coefficients of the target filter in response to the first and second color component values in the first predicted block.
[0317] In a specific embodiment, the coefficients of the target filter may be determined by solving an optimization problem. Accordingly, the method may further include a step in which the coefficients of the target filter are coefficients used by the target filter when a first error between output values of the second color component value in the first prediction block and the first color component value in the first prediction block after the target filter processes them satisfies a first condition.
[0318] Regarding the first error satisfying the first condition, it is understood that in one possible implementation, the first condition is that the first error is minimal, or in another possible implementation, the first condition is that the first error is within a first preset threshold range, or in yet another possible implementation, the first condition is that the change in the first error is within a second preset threshold range.
[0319] In another specific embodiment, the step of determining the coefficients of the target filter according to the first color component values and the second color component values in the first predicted block may include the steps of determining autocorrelation parameters according to the first color component values in the first predicted block, determining cross-correlation parameters according to the first color component values and the second color component values in the first predicted block, and determining the coefficients of the target filter according to the autocorrelation parameters and the cross-correlation parameters.
[0320] In this way, according to the determined first prediction block (reference block area), by solving the set of linear equations shown in the above equation (18), a set of target filter coefficients can be obtained, which minimizes the MSE between the desired output after filtering, i.e., the chromaticity values predicted by CP-CCCM and the chromaticity reconstruction values of the desired output, i.e., the Wiener filter coefficients, and the set of Wiener filter coefficients is a set of target filter coefficients for the current block.
[0321] In the process of solving the set of linear equations, first, the autocorrelation parameters of the luminance reconstructed sample refRecY in the first prediction block are calculated, then the cross-correlation parameters between the luminance reconstructed sample refRecY and the chrominance reconstructed sample refRecC in the first prediction block are calculated, and then the autocorrelation parameters are subjected to Cholesky decomposition or LDL decomposition. Finally, each target filter coefficient c is calculated by reverse recursion. n are calculated sequentially.
[0322] In the present embodiment, it is also necessary to determine the number of coefficients of the target filter and the shape of the target filter for the target filter, where the number of coefficients of the target filter and the shape of the target filter may be preset fixed values or may be correlated with the dimension parameters of the current block.
[0323] In some embodiments, the method may further comprise determining the number of coefficients of the target filter.
[0324] In this embodiment, the number of coefficients of the target filter may be equal to a first preset constant value.
[0325] In some embodiments, the method may further include determining a first identification information of a block category of the current block, and determining a number of coefficients of the target filter according to the first identification information of the block category of the current block.
[0326] In some embodiments, the method may further include encoding the number of coefficients of the target filter and writing the resulting coded bits into the codestream, or in some embodiments, the method may further include encoding the first block category identification information of the current block and writing the resulting coded bits into the codestream.
[0327] The number of coefficients of the target filter may be represented by nTap. For example, the value of nTap may be 4, 5, 6, 7, 8, 9, etc., but is not particularly limited.
[0328] The number of coefficients of the target filter may be referred to as the number of target filter taps. Here, the number of coefficients of the target filter may be a preset constant value or may be determined according to the first block category identification information of the current block, but is not limited thereto.
[0329] In some embodiments, for the shape of the target filter, the method may further include determining the shape of the target filter.
[0330] In this embodiment, the target filter may be a one-dimensional or two-dimensional filter of a pre-defined shape.
[0331] In some embodiments, the method may further include determining values of filter shape parameters, where the filter shape parameters indicate the shape of the target filter.
[0332] In some embodiments, the method may further include determining a block category second identification information of the current block, and determining a value of the filter shape parameter according to the block category second identification information of the current block.
[0333] In some embodiments, the method may further include encoding the shape of the target filter and writing the resulting coded bits into the codestream, or in some embodiments, the method may further include encoding values of filter shape parameters and writing the resulting coded bits into the codestream, or in some embodiments, the method may further include encoding second block category identification information of the current block and writing the resulting coded bits into the codestream.
[0334] The filter shape parameter may be represented by FilterIdx, which is used to indicate the shape of the target filter. For example, the shape of the target filter may be, but is not limited to, a diamond, a rectangle, a cross, a bar, or even a one-dimensional filter or a two-dimensional filter.
[0335] Illustratively, if the value of FilterIdx is equal to 0, the shape of the target filter is determined to be a diamond, if the value of FilterIdx is equal to 1, the shape of the target filter is determined to be a cross, and if the value of FilterIdx is equal to 2, the shape of the target filter is determined to be a rectangle.
[0336] The shape of the target filter may be a preset shape or may be determined according to the second block category identification information of the current block, but is not particularly limited thereto.
[0337] It is understood that in this embodiment, the second block category identification information may be the same as or different from the first block category identification information. For example, in a specific embodiment, the first block category identification information may be the same as the second block category identification information, that is, one identification information may be used to simultaneously indicate the number of coefficients of the target filter and the shape of the target filter.
[0338] It is also understood that the block category identification information, block category first identification information, and block category second identification information described in the present embodiment may all be the same, i.e., one identification information (represented by cpcccmSizeId) may be used, and the value of cpcccmSizeId may simultaneously indicate the reference image index inter_pred_idc, the number of coefficients nTap of the target filter, and the shape FilterIdx of the target filter.
[0339] In the embodiment of the present application, for the value of cpcccmSizeId, the value of cpcccmSizeId may be determined according to the dimension parameters of the current block. Here, the dimension parameters of the current block may include the width (represented by nTbW) and the height (represented by nTbH).
[0340] Exemplarily, when the dimension parameters of the current block satisfy min(nTbW,nTbH)<=8, the value of cpcccmSizeId is determined to be 0; when the dimension parameters of the current block satisfy 8<min(nTbW,nTbH)<=32, the value of cpcccmSizeId is determined to be 1; when the dimension parameters of the current block satisfy min(nTbW,nTbH)>32, the value of cpcccmSizeId is determined to be 2.
[0341] Exemplarily, when the dimension parameters of the current block satisfy min(nTbW,nTbH)<=64, the value of cpcccmSizeId is determined to be 0; when the dimension parameters of the current block satisfy 64<min(nTbW,nTbH)<=256, the value of cpcccmSizeId is determined to be 1; when the dimension parameters of the current block satisfy min(nTbW,nTbH)>256, the value of cpcccmSizeId is determined to be 2.
[0342] In some embodiments, in order to increase the processing speed on the decoding side, the method may further include the step of encoding the value of cpcccmSizeId and writing the obtained encoded bits into the code stream. In this way, after the code stream is transmitted from the encoding side to the decoding side, the decoding side can directly determine the value of cpcccmSizeId by decoding the code stream, and then determine the number of coefficients of the target filter and the shape of the target filter, etc., and construct the target filter.
[0343] S904: determine a reference sample value of the first color component sampling point of the current block; and determine a predicted value of the second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters.
[0344] In this embodiment, it is necessary to determine the reference sample values of the first color component sampling points of the current block before determining the predicted values of the second color component sampling points of the current block.
[0345] In some embodiments, determining the reference sample value of the first color component sampling point of the current block may include determining the reference sample value of the first color component sampling point of the current block according to the reconstructed value of the first color component sampling point of the current block.
[0346] In a specific embodiment, the method may further include determining a reconstruction value of a first color component sampling point of the current block according to a first color component value in the first predicted block.
[0347] In this embodiment, for unidirectional prediction, the step of determining a reconstructed value of a first color component sampling point of the current block according to a first color component value in a first predicted block may include a step of determining a reconstructed value of a first color component sampling point of the current block according to a first color component value in a List0 predicted block of the current block, or a step of determining a reconstructed value of a first color component sampling point of the current block according to a first color component value in a List1 predicted block of the current block.
[0348] Here, regarding the reconstructed value of the first color component sampling point of the current block, taking the List0 predicted block as an example, specifically, a predicted value of the first color component sampling point of the current block is determined according to the first color component value in the List0 predicted block of the current block, and then a predicted differential value of the first color component sampling point of the current block is determined according to the original value and predicted value of the first color component sampling point of the current block, and quantization and inverse quantization processes are performed on the predicted differential value of the first color component sampling point of the current block to determine a reconstructed differential value of the first color component sampling point of the current block, and finally, a reconstructed value of the first color component sampling point of the current block is determined according to the reconstructed differential value and predicted value of the first color component sampling point of the current block.
[0349] In an embodiment of the present application, for bidirectional prediction, the step of determining a reconstructed value of a first color component sampling point of a current block according to a first color component value in a first predicted block may include the step of determining a reconstructed value of a first color component sampling point of a current block according to a first color component value in a List0 predicted block of the current block and a first color component value in a List1 predicted block of the current block.
[0350] Here, regarding the reconstructed value of the first color component sampling point of the current block, taking the List0 predicted block and the List1 predicted block as examples, specifically, a weighted sum calculation is performed on the first color component value in the List0 predicted block and the first color component value in the List1 predicted block according to the List0 weighting coefficient and the List1 weighting coefficient to determine the predicted value of the first color component sampling point of the current block, and then a predicted differential value of the first color component sampling point of the current block is determined according to the original value and predicted value of the first color component sampling point of the current block, quantization and inverse quantization processes are performed on the predicted differential value of the first color component sampling point of the current block to determine the reconstructed differential value of the first color component sampling point of the current block, and the reconstructed value of the first color component sampling point of the current block is determined according to the reconstructed differential value and predicted value of the first color component sampling point of the current block.
[0351] In this embodiment, after determining the reconstructed value of the first color component sampling point of the current block, it is necessary to store it in the decoded image cache unit (Buffer). In this way, on the decoding side, the reconstructed value of the first color component sampling point of the current block may be directly obtained from the decoded image cache unit (Buffer).
[0352] In some embodiments, the method may further include performing a filtering process on the reconstructed values of the first color component sampling points of the current block to determine filter reconstructed values of the first color component sampling points of the current block, and determining reference sample values of the first color component sampling points of the current block according to the filter reconstructed values of the first color component sampling points of the current block.
[0353] In the present embodiment, the reconstructed value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block, and the filter reconstructed value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block, but this is not particularly limited.
[0354] In some embodiments, the step of determining the reference sample value of the first color component sampling point of the current block may include the steps of determining a predicted value of the first color component sampling point of the current block according to the first color component value in the first predicted block, and determining the reference sample value of the first color component sampling point of the current block according to the predicted value of the first color component sampling point of the current block.
[0355] In this embodiment, for unidirectional prediction, the step of determining a predicted value of the first color component sampling point of the current block according to the first color component value in the first prediction block may include the step of determining a predicted value of the first color component sampling point of the current block according to the first color component value in the List0 prediction block of the current block, or determining a predicted value of the first color component sampling point of the current block according to the first color component value in the List1 prediction block of the current block.
[0356] In an embodiment of the present application, for bidirectional prediction, the step of determining a predicted value of a first color component sampling point of a current block according to a first color component value in a first prediction block may include the step of determining a predicted value of a first color component sampling point of a current block according to a first color component value in a List0 prediction block of the current block and a first color component value in a List1 prediction block of the current block.
[0357] In a specific embodiment, the method may further include determining a List0 weighting coefficient of the List0 predicted block of the current block and a List1 weighting coefficient of the List1 predicted block of the current block; determining a weighted sum of a first color component value in the List0 predicted block of the current block and a first color component value in the List1 predicted block of the current block according to the List0 weighting coefficient and the List1 weighting coefficient; and determining a predicted value of a first color component sampling point of the current block according to the weighted sum.
[0358] Here, taking the List0 prediction block and the List1 prediction block as examples, specifically, a weighted sum is calculated for the first color component value in the List0 prediction block and the first color component value in the List1 prediction block according to the List0 weighting coefficient and the List1 weighting coefficient, to determine the predicted value of the first color component sampling point of the current block, and then the predicted value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block.
[0359] In some embodiments, the method may further include performing a filtering process on the predicted value of the first color component sampling point of the current block, determining a filtered predicted value of the first color component sampling point of the current block, and determining a reference sample value of the first color component sampling point of the current block according to the filtered predicted value of the first color component sampling point of the current block.
[0360] In this embodiment, the predicted value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block, or the filtered predicted value of the first color component sampling point of the current block may be used as the reference sample value of the first color component sampling point of the current block, but this is not particularly limited.
[0361] Furthermore, in the present embodiment, assuming that the first color component is a luminance component and the second color component is a chromaticity component, it is understood that the filtering process here may be a low-pass filter, a downsampling filter, etc., thereby making the resolution of the first color component after filtering the same as the resolution of the second color component.
[0362] Furthermore, after determining the reference sample values of the first color component sampling points of the current block, they may be used to determine predicted values of the second color component sampling points of the current block. Therefore, in some embodiments, determining predicted values of the second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters may include determining first input values of the target filter based on the reference sample values of the first color component sampling points of the current block, determining first output values of the target filter based on the first input values and the model parameters, and determining predicted values of the second color component sampling points of the current block based on the first output values.
[0363] In addition, in the present embodiment, after determining the reference sample value of the first color component sampling point of the current block, in some embodiments, the method may further include a step of performing a first filtering process on the reference sample value of the first color component sampling point of the current block to determine a first input value.
[0364] It is understood that in the present embodiment, the first filtering process may include at least one of a low-pass filter and a down-sampling filter.
[0365] It is also understood that in this embodiment, the first filtering process sets the first input value equal to the reference sample value of the first color component sampling point of the current block.
[0366] In this case, the reference sample value of the first color component sampling point of the current block may be directly used as the first input value of the target filter, or the filtered value of the first color component sampling point of the current block may be used as the first input value. For example, the reconstructed value of the first color component sampling point of the current block may be used as the first input value, or the reconstructed filter value of the first color component sampling point of the current block may be used as the first input value, or the predicted value of the first color component sampling point of the current block may be used as the first input value, or the predicted filter value of the first color component sampling point of the current block may be used as the first input value. However, the present embodiment is not particularly limited.
[0367] In this embodiment, after determining the first output value of the target filter based on the first input value and the model parameters, if the first output value includes the predicted values of all the second color component sampling points of the current block, the first output value can be directly used as the predicted value of the second color component sampling points of the current block.If the first output value includes the predicted values of some of the second color component sampling points of the current block, the first output value must be subjected to a correlation process before being used as the predicted value of the second color component sampling points of the current block.
[0368] In some embodiments, determining a predicted value of a second color component sampling point of the current block based on the first output value may include performing a second filtering operation on the first output value to determine a second output value, and determining a predicted value of the second color component sampling point of the current block based on the second output value.
[0369] It is understood that in the present embodiment, the second filtering process may include at least one of a low-pass filter and an up-sampling filter.
[0370] It is also understood that in this embodiment, the second filtering process sets the second output value equal to the first output value.
[0371] In some embodiments, a correlation process may be performed on the second output values to limit the obtained second output values to within a predetermined numerical range. In some embodiments, determining the predicted values of the second color component sampling points of the current block based on the second output values may include performing a first process on the second output values to obtain the predicted values of the second color component sampling points of the current block.
[0372] It is understood that in this embodiment, the first process is a clipping operation for limiting the second output value to within a preset numerical range.
[0373] JPEG2024077520000054.jpg60167
[0374] In addition, in this embodiment, after determining the first output value according to the target filter, the predicted value of the second color component sampling point of the current block may be determined by adding a first offset value (represented by bias) to the target filter.
[0375] In some embodiments, determining a predicted value of the second color component sampling point of the current block based on the first output value may include performing an addition operation according to the first output value and the first offset value to determine a predicted value of the second color component sampling point of the current block.
[0376] In a specific embodiment, the first offset value is set equal to a preset constant value, or the first offset value is set equal to a value in a preset mapping relationship of the first input value.
[0377] JPEG2024077520000055.jpg79167
[0378] JPEG2024077520000056.jpg90167
[0379] In addition, in the present embodiment, it is understood that bias does not need to include a coefficient term involved in the calculation of the filter coefficient, for example, bias = Constant. Here, Constant may be a constant such as Constant = 1 << (BitDepth - 1), a numerical value related to the luminance pixel value at the same luminance position (i, j) such as Constant = f(FilterY[i][j]), or a numerical value related to the luminance pixel value corresponding to a tap in the target filter other than the same luminance position (i, j) such as Constant = f(FilterY[k][l]). Meanwhile, Constant = f(FilterY[i][j]) or Constant = f(FilterY[k][l]) may be a linear mapping relationship or a nonlinear mapping relationship, but is not particularly limited here.
[0380] JPEG2024077520000057.jpg39167
[0381] In a possible implementation, the step of performing a correlation process on the predicted values of the second color component sampling points of the current block may include a step of performing a filter enhancement process on the predicted values of the second color component sampling points of the current block.
[0382] In another possible implementation, the step of performing a correlation process on the predicted value of the second color component sampling point of the current block may include a step of determining a compensation value of the second color component sampling point of the current block according to a reference sample value of an adjacent area of the current block, and performing a correction process on the predicted value of the second color component sampling point of the current block according to the compensation value.
[0383] In yet another possible implementation, the step of performing a correlation process on the predicted values of the second color component sampling points of the current block may include the steps of performing a prediction process on the second color component sampling points of the current block according to at least one prediction mode, determining at least one initial predicted value of the second color component sampling points of the current block, and performing a weighted fusion process according to the at least one initial predicted value and the predicted values of the second color component sampling points of the current block.
[0384] In addition, to improve the prediction performance of the CP-CCCM mode, the prediction process may be performed on the predicted value of the second color component sampling point of the current block, and the prediction output of the CP-CCCM model may be further corrected using a neural network to obtain the final predicted value.
[0385] It is also understood that in this embodiment, the reference sample value of the first color component sampling point of the current block may be determined according to the reconstructed value of the first color component sampling point of the current block or the predicted value of the first color component sampling point of the current block, or may be determined according to the predicted difference value of the first color component sampling point of the current block. In this case, the model parameters may be adaptively determined according to the first color component residual value and the second color component residual value of the first predicted block.
[0386] In some embodiments, the method may further include determining a prediction difference value of a first color component sampling point of the current block, determining a reference sample value of the first color component sampling point of the current block according to the prediction difference value of the first color component sampling point of the current block, determining a first color component residual value and a second color component residual value in the first predicted block, and determining model parameters according to the first color component residual value and the second color component residual value in the first predicted block.
[0387] Accordingly, in some embodiments, the step of determining predicted values of the second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters may include the steps of: determining initial predicted differential values of the second color component sampling points of the current block according to the predicted differential values of the first color component sampling points of the current block and the model parameters; determining initial predicted values of the second color component sampling points of the current block according to the first predicted block; and determining predicted values of the second color component sampling points of the current block according to the initial predicted differential values and the initial predicted values of the second color component sampling points of the current block.
[0388] It is understood that in this embodiment, for the first color component residual value and the second color component residual value in the first prediction block, an additional decoding cache unit (Buffer) is required to cache the luma residual value and the chroma residual value in the first prediction block.
[0389] In addition, in the present embodiment, when determining the model parameters, not only the first color component value and the second color component value in the first prediction block may be used, but also the first color component residual value and the second color component residual value in the first prediction block may be used, or the first color component residual value and the second color component residual value after filtering in the first prediction block may be used, or even the first color component residual value and the second color component value in the first prediction block may be used, but it is understood that this is not particularly limited here.
[0390] S905: determining a predicted difference value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block;
[0391] In some embodiments, the predicted differential values of the second color component sampling points of the current block may be calculated after the predicted values of the second color component sampling points of the current block are obtained. In some embodiments, determining the predicted differential values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block may include determining initial values of the second color component sampling points of the current block, and determining the predicted differential values of the second color component sampling points of the current block according to the initial values of the second color component sampling points of the current block and the predicted values of the second color component sampling points of the current block.
[0392] In a specific embodiment, the step of determining the predicted difference values of the second color component sampling points of the current block according to the initial values of the second color component sampling points of the current block and the predicted values of the second color component sampling points of the current block may include the step of performing a subtraction operation on the initial values of the second color component sampling points of the current block and the predicted values of the second color component sampling points of the current block to determine the predicted difference values of the second color component sampling points of the current block.
[0393] Additionally, in some embodiments, the method may further include encoding the predicted difference values of the second color component sampling points of the current block and writing the resulting encoded bits into the codestream.
[0394] In this way, the encoding side may encode the predicted difference values of the second color component sampling points of the current block, write them into the code stream, and then transmit them to the decoding side. In this way, the decoding side may obtain the predicted difference values of the second color component sampling points of the current block by decoding the code stream, and thus restore the reconstructed values of the second color component sampling points of the current block.
[0395] In some embodiments, the method may further include a step of determining prediction mode identification information for the current block, and if the prediction mode identification information indicates that the current block is to undergo weighted prediction using a model based on convolutional cross-components, performing a step of determining a prediction block for the current block according to motion information.
[0396] In a specific embodiment, the method may further include:
[0397] If the current block is subjected to weighted prediction using a model based on convolutional cross-components, the value of the prediction mode identification information is determined to be the fourth value.
[0398] When the current block is subjected to weighted prediction without using a model based on convolutional cross-components, the value of the prediction mode identification information is the fifth value.
[0399] In this embodiment, the fourth value and the fifth value are different from each other, and the fourth value and the fifth value may be in a parameter format or a numerical format. Specifically, the prediction mode identification information may be a parameter written in a profile or may be a value of a single flag, but is not particularly limited thereto.
[0400] For example, for the fourth value and the fifth value, the fourth value may be set to 1 and the fifth value may be set to 0, or the fourth value may also be set to true and the fifth value may also be set to false, but this is not particularly limited here.
[0401] In this embodiment, determining whether the current block performs chroma prediction using the CP-CCCM mode, and then determining the final inter chroma prediction value may be determined according to certain conditions, but is not limited to the following four methods. For example, these four methods are as follows:
[0402] Method 1: Determine whether to use CP-CCCM mode by comparing the reconstructed luminance of the first predicted block and the luminance difference of the current block, such as SAD, MSE, SATD, or SSE (or corresponding information of the luminance residual of the current block), with a threshold T_Distortion1.
[0403] Method 2: Based on the fact that Method 1 satisfies the use of CP-CCCM mode, the distortion between the chrominance reconstruction value of the first predicted block and its CP-CCCM mode chrominance prediction value, such as SAD, MSE, SATD, or SSE, and a threshold T_Distortion2 are used to determine whether the current block uses the CP-CCCM mode chrominance prediction value to replace the original inter-weighted chrominance prediction value.
[0404] Method 3: The calculated filter coefficients of the target filter are used as the filter template of the current block to obtain a CP-CCCM predicted value of the template. Then, the template of the first predicted block is obtained and weighted prediction is performed to obtain a weighted template predicted value. The weighted template predicted value and the CP-CCCM chroma predicted value of the template are used to calculate distortions such as SAD, MSE, SATD, or SSE for the reconstructed chroma of the current block, and it is determined whether to use the CP-CCCM chroma predicted value of the current block to replace the weighted chroma predicted value of the current block.
[0405] Method 4: The encoding side may transmit one flag to indicate whether to use the CP-CCCM mode chrominance prediction value of the current block to replace the weighted chrominance prediction value of the current block, so that the decoding side can then analyze the flag to determine whether to use the CP-CCCM mode chrominance prediction value of the current block to replace the weighted chrominance prediction value of the current block.
[0406] An embodiment of the present application provides an encoding method, which includes determining prediction parameters for a current block, determining a first predicted block of the current block according to the prediction parameters, determining model parameters according to first and second color component values in the first predicted block, determining reference sample values of first color component sampling points of the current block, determining predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters, and determining predicted difference values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block. In this way, the model parameters are determined according to the first and second color component values of the first predicted block, and the model parameters fully represent the correlation between luma and chroma in the predicted block, and chroma prediction is performed by applying the correlation to existing luma information of the current block, thereby improving the accuracy of inter-chroma prediction, improving the efficiency of encoding and decoding, and ultimately improving the performance of encoding and decoding.
[0407] In still another embodiment of the present application, the embodiment of the present application further provides a codestream, which is generated by bit encoding according to information to be encoded, where the information to be encoded is:
[0408] The information includes at least one of a predicted difference value of a second color component sampling point of the current block, a prediction parameter of the current block, the number of coefficients of the target filter, the shape of the target filter, the value of the filter shape parameter, first block category identification information of the current block, and second block category identification information of the current block.
[0409] In this embodiment, after the prediction difference values of the second color component sampling points of the current block are transmitted from the encoding side to the decoding side, the decoding side obtains the prediction difference values of the second color component sampling points by decoding, and then obtains the prediction parameters of the current block by decoding, thereby determining the prediction values of the second color component sampling points, and restoring the reconstructed values of the second color component sampling points of the current block according to the prediction values of the second color component sampling points and the prediction difference values of the second color component sampling points.
[0410] In another embodiment of the present application, based on the encoding and decoding methods described in the previous embodiments, in the inter-prediction process, the matching block information of the current block is coded reconstruction information, and at the same time, the weighted prediction information of the current block is also known, including whether the reference image list is valid, the reference image index, the color component index, etc. This embodiment of the present application proposes a CP-CCCM technology using the matching block information and the weighted prediction information.
[0411] In this embodiment, the input of the CP-CCCM is the position of the chrominance sampling point of the current block in the image (xTbCmp, yTbCmp), the width of the current block nTbW, and the height of the current block nTbH. The output of the CP-CCCM is the chrominance predicted value of the current block predSamples[x][y], where x = 0, 1, ..., nTbW-1 and y = 0, 1, ..., nTbH-1. Here, the prediction process of the CP-CCCM technique may include steps such as determining core parameters of the CP-CCCM mode, obtaining input information, chrominance prediction based on a convolutional cross-component model, and a post-processing process. Through the above steps, the chrominance predicted value of the current block can be obtained.
[0412] In a specific embodiment, refer to Figure 10, which is a flowchart of CP-CCCM prediction according to an embodiment of the present application. As shown in Figure 10, the process may include:
[0413] S1001, determining the core parameters of the CP-CCCM mode.
[0414] In addition, in S1001, determining the core parameters related to the CP-CCCM mode may be, for example, obtaining or inferring the core parameters of the CP-CCCM mode by configuration or a certain method. For example, the decoding side obtains the core parameters of the CP-CCCM mode from the codestream.
[0415] Here, the determination of the core parameters includes, but is not limited to, a reference image (inter_pred_idc) used by the CP-CCCM mode, the number of convolution filter taps (nTap) based on the convolution cross-component model, the convolution filter shape (FilterIdx) based on the convolution cross-component model, and the number of chrominance predicted pixel outputs (predCpcccm) based on the convolution cross-component model (arranged in predSizeW×predSizeH). Here, the number of chrominance predicted pixel outputs (predCpcccm) based on the convolution cross-component model may be related to the dimension parameters of the current block (e.g., predSizeW is equal to nTbW and predSizeH is equal to nTbH, or predSizeW is equal to nTbW / 4 and predSizeH is equal to nTbH / 4). Here, FilterIdx represents the filter shape, for example, if the filter shape is a diamond, FilterIdx is 0, if the filter shape is a cross, FilterIdx is 1, if the filter shape is a rectangle, FilterIdx is 2, etc. Also, inter_pred_idc may be used to represent whether the current block uses a reference image in List0, a reference image in List1, or bidirectional prediction. Here, if inter_pred_idc is 0, the reference image in List0 is used, if inter_pred_idc is 1, the reference image in List1 is used, if inter_pred_idc is 2, the reference images in List0 and List1 are used, and if inter_pred_idc is not present, the reference image in List0 is used.
[0416] The determination of CP-CCCM core parameters is affected by block size, block content, or the number of pixels in a block under certain conditions. For example,
[0417] During the encoding process, if the block sizes applied by the CP-CCCM mode vary significantly, or if the block contents vary significantly, or if the number of pixels in the blocks varies significantly, the current block may be classified according to its block size, block contents, or number of pixels in the block, and parameters may be determined according to different categories. That is, the reference image (inter_pred_idc) used by the CP-CCCM, the number of convolution filter taps (nTap), the convolution filter shape (FilterIdx), or the number of chrominance prediction outputs (predCpcccm) based on the convolution cross-component model (arranged as predSizeW×predSizeH) may be determined according to the classification category. Note that predSizeW and predSizeH may be the same or different.
[0418] To better explain the core parameters of the CP-CCCM mode, two simple classifications are presented as examples.
[0419] Classification Example 1: The CP-CCCM mode may classify the current block according to its width and height, and indicate the type of the current block with cpcccmSizeId. For different types of blocks, the reference image (inter_pred_idc), the number of convolution filter taps (nTap), the convolution filter shape (FilterIdx), or the number of chromaticity prediction outputs (predCpcccm) based on the convolution cross-component model (arranged in predSizeW × predSizeH) used by the CP-CCCM mode may be determined according to the type of the current block. Here, an example divided into three categories will be described.
[0420] According to the current block width and height, the current block is divided into three categories. The reference image (inter_pred_idc), the number of convolutional filter taps (nTap), the convolutional filter shape (FilterIdx), and the number of chrominance prediction outputs (predCpcccm) based on the convolutional cross-component model used by different categories may be set the same or differently. nTbW is the width of the current block, nTbH is the height of the current block, and the definition of the current block type cpcccmSizeId is as follows.
[0421] · When the current block is such that min(nTbW,nTbH)<=8, cpcccmSizeId = 0. The reference image (inter_pred_idc) to be used is List1, the number of convolutional filter taps (nTap) is 3, the convolutional filter shape (FilterIdx) is 2, and the chrominance prediction based on the convolutional cross-component model outputs nTbH×nTbW chrominance prediction values.
[0422] · When the current block is such that 8<min(nTbW,nTbH)<=32, cpcccmSizeId = 1. The reference image (inter_pred_idc) to be used is List0, the number of convolutional filter taps (nTap) is 5, the convolutional filter shape (FilterIdx) is 1, and the chrominance prediction based on the convolutional cross-component model outputs nTbH×nTbW chrominance prediction values.
[0423] · When the current block is such that min(nTbW,nTbH)>32, cpcccmSizeId = 2. The reference images (inter_pred_idc) to be used are List0 and List1, the number of convolutional filter taps (nTap) is 9, the convolutional filter shape (FilterIdx) is 0, and the chrominance prediction based on the convolutional cross-component model outputs nTbH×nTbW chrominance prediction values.
[0424] The quantitative relationships of the above core parameters are represented in tabular form as shown in Table 1.
[0425] [Table 1]
[0426] Classification Example 2: The CP-CCCM mode may classify the current block according to the number of pixels in the current block, and the type of the current block may be represented by cpcccmSizeId. For different types of blocks, the reference image (inter_pred_idc), the number of convolution filter taps (nTap), the convolution filter shape (FilterIdx), or the number of chromaticity prediction outputs (predCpcccm) based on the convolution cross-component model (arranged in predSizeW × predSizeH) used by the CP-CCCM mode may be determined according to the type of the current block. Here, an example divided into three categories will be described.
[0427] The current block is divided into three categories according to the number of pixels in the current block. The reference image (inter_pred_idc), the number of convolution filter taps (nTap), the convolution filter shape (FilterIdx), and the number of chromaticity prediction outputs based on the convolution cross-component model (predCpcccm) used by different categories may be set to the same or different. nTbW is the width of the current block, nTbH is the height of the current block, and the definition of the type cpcccmSizeId of the current block is as follows:
[0428] If the current block is (nTbW × nTbH) <= 64, cpcccmSizeId = 0. The reference image (inter_pred_idc) used is List0, the number of convolution filter taps (nTap) is 4, the convolution filter shape (FilterIdx) is 2, and chrominance prediction based on the convolution cross-component model outputs nTbH × nTbW chrominance predicted values.
[0429] If the current block is 64<(nTbW×nTbH)<=256, then cpcccmSizeId=1. The reference image (inter_pred_idc) used is List0, the number of convolution filter taps (nTap) is 7, the convolution filter shape (FilterIdx) is 1, and chrominance prediction based on the convolution cross-component model outputs nTbH / 2×nTbW / 2 chrominance predicted values.
[0430] If the current block is (nTbW × nTbH) > 256, cpcccmSizeId = 2. The reference image (inter_pred_idc) used is List0, the number of convolution filter taps (nTap) is 9, the convolution filter shape (FilterIdx) is 0, and chrominance prediction based on the convolution cross-component model outputs nTbH / 4 × nTbW / 4 chrominance predicted values.
[0431] The quantitative relationships of the above core parameters are presented in tabular form as shown in Table 2.
[0432] [Table 2]
[0433] S1002, determining input information according to the core parameters, where the input information includes matching block information of the current block and luminance prediction information of the current block.
[0434] Note that, in step S1002, when predicting a current block, the MV information of the current block is known, and a matching block may be searched for in the corresponding reference image using the MV information of the current block and the core parameter inter_pred_idc. When inter_pred_idc is 2, the matching block obtained in the List0 reference image includes a reconstructed luma block refRecY0 and a reconstructed chroma block refRecC0, and the matching block obtained in the List1 reference image includes a reconstructed luma block refRecY1 and a reconstructed chroma block refRecC1. When inter_pred_idc is 0, the matching block obtained in the List0 reference image includes only a reconstructed luma block refRecY0 and a reconstructed chroma block refRecC0. When inter_pred_idc is 1, the matching block obtained in the List1 reference image includes only a reconstructed luma block refRecY1 and a reconstructed chroma block refRecC1. At the same time, the weighted prediction information (i.e., luminance prediction information) of the current block is also known, and weighted prediction can be performed on the reconstructed luminance blocks refRecY0 and / or refRecY1 of the matching block based on the weighted information, and the predicted luminance block currPredY of the current block can be obtained as the existing luminance information of the current block.
[0435] Also, refRecY0, refRecC0, refRecY1, refRecC1, or currPredY may be preprocessed under certain conditions and then used as chromaticity prediction input based on a convolutional cross-component model.
[0436] For example, to improve the quality of the input information, refRecY0, refRecC0, refRecY1, or refRecC 1 , or currPredY may perform different filter enhancement operations.
[0437] For example, if the resolution of the chrominance component and the luminance component do not match, refRecY0 or refRecC1 , or refRecY1, or refRecC0, or curPredY may be subjected to operations such as upsampling filters / downsampling filters to facilitate subsequent chromaticity prediction calculations.
[0438] In this embodiment, the determined input information may include matching block information determined according to inter_pred_idc, such as reconstructed luma block refRecY0, reconstructed chroma block refRecC0, and / or reconstructed luma block refRecY1, reconstructed chroma block refRecC1 (after preprocessing operation if refRecY0, refRecC0, refRecY1, and refRecC1 need to be preprocessed), and luma prediction information currPredY of the current block obtained according to weight information and reconstructed luma block refRecY0 and / or refRecY1 of the matching block (after preprocessing operation if refRecY0 and refRecY1 need to be preprocessed).
[0439] S1003: Performing chromaticity prediction calculation based on a convolutional cross-component model according to the determined input information, and determining a chromaticity prediction value of the current block.
[0440] JPEG2024077520000060.jpg60168
[0441] Note that step S1003 may include an operation of determining convolution filter tap coefficients, then performing weighted prediction according to the tap coefficients, and obtaining a chrominance prediction value based on a convolution cross-component model. Here, the process of determining the convolution filter tap coefficients mainly includes determining reconstructed luma information and reconstructed chroma information of a matching block for calculating filter coefficients, and calculating the filter coefficients using the reconstructed luma information and reconstructed chroma information of the matching block.
[0442] In some embodiments, for S1003, as shown in FIG. 11, the step may specifically include:
[0443] S1101: Determine reference information for calculating filter coefficients.
[0444] The filter coefficients here are the coefficients of the target filter in the above-mentioned embodiment, and may also be referred to as the number of filter taps. One type of filter can be determined according to the core parameters (number of filter taps nTap and filter shape FilterIdx) determined in the CP-CCCM mode. For example, the filter is one in which nTap is 5 and filter shape FilterIdx is 1. See FIG. 12 for the filter.
[0445] Here, after obtaining the number of filter taps and shape information according to the core parameters, filter coefficients must be calculated using refRecY0 and refRecC0 or refRecY1 and refRecC1, and each current block calculates one set of filter coefficients. If inter_pred_idc is 0, filter coefficients are calculated using only refRecY0 and refRecC0. If inter_pred_idc is 1, filter coefficients are calculated using only refRecY1 and refRecC1. If inter_pred_idc is 2, filter coefficients may be calculated according to refRecY0 and refRecC0, or refRecY1 and refRecC1. For example, a distortion metric such as SAD, SATD, or MSE between refRecY0 or refRecY1 and currPredY may be compared to determine whether to calculate filter coefficients using refRecY0 and refRecC0 or refRecY1 and refRecC1, where smaller distortion is more likely to be used in calculating filter coefficients. Alternatively, weight information (e.g., BCW weight information) of the forward matching block and the backward matching block may be compared to determine whether to calculate filter coefficients. Alternatively, distortions such as SAD, SATD, or MSE between an adjacent template of the forward matching block and an adjacent template of the backward matching block and the current block template may be compared to determine whether to calculate filter coefficients, where larger distortion is less likely to be used in calculating filter coefficients. However, the present embodiment is not limited thereto.
[0446] In this way, the reference information for calculating the filter coefficients, specifically the luma reconstruction information refRecY and chroma reconstruction information refRecC of the matching block, can be determined.
[0447] S1102, calculate a filter coefficient according to the reference information.
[0448] After obtaining the reference information for calculating the filter coefficients, the reference information may include reference luma information and reference chroma information. Here, the reference information may be reconstructed information or may be derived based on the reconstructed information. Taking the reference information as reconstructed information as an example, in this case, after obtaining the reference information (including luma reconstructed information refRecY and chroma reconstructed information refRecC), a set of filter coefficients may be derived as shown in the above equation (12) by minimizing the MSE between the chroma reconstructed value and the chroma value predicted by CP-CCCM.
[0449] Here, the specific process of deriving the filter coefficients by minimizing the MSE is described in the above equations (13) to (19), and will not be repeated here. Specifically, a set of filter coefficients can be obtained by solving the set of linear equations shown in equation (18), and the desired output after filtering, i.e., the chromaticity value predicted by CP-CCCM and the desired output, can be calculated. chromaticity Reconstruction Market price The MSE between the luminance reconstruction information refRecY and the chrominance reconstruction information refRecC is minimized, that is, the Wiener filter coefficients are the set of Wiener filter coefficients of the current block. In addition, in the process of solving the set of linear equations, the autocorrelation matrix of the luminance reconstruction information refRecY is first calculated, then the cross-correlation vector between the luminance reconstruction information refRecY and the chrominance reconstruction information refRecC is calculated, and then the autocorrelation matrix is subjected to Cholesky decomposition or LDL decomposition. Finally, each target filter coefficient c is calculated by reverse recursion. n are calculated sequentially.
[0450] S1103, calculate a chrominance prediction value of the current block according to the filter coefficients.
[0451] JPEG2024077520000061.jpg70168
[0452] JPEG2024077520000062.jpg91168
[0453] In a specific embodiment, the calculation process of the chromaticity prediction value is as follows.
[0454] JPEG2024077520000063.jpg40168
[0455] JPEG2024077520000064.jpg2874
[0456] where n=0, 1, ..., nTap-1, i=0, ..., predSizeW-1, j=0, ..., predSizeH-1, and if k=i and l=j, it is the current colocated pixel, i.e., colocatedY[i][j]=FilterY[k][l].
[0457] For k=i=0,...,predSizeW-1 and l=j=0,...,predSizeH-1, FilterY[k][l]=currpredY[k][l].
[0458] JPEG2024077520000065.jpg18166
[0459] JPEG2024077520000066.jpg1996
[0460] In a possible implementation, when inter_pred_idc is 0 or 1, CP-CCCM mode unidirectional prediction is performed, and the unidirectional prediction process is as shown in FIG. 14, which may include the following steps:
[0461] S1401, obtain the forward motion vector or backward motion vector of the current block.
[0462] S1402, determining a forward or backward luminance matching block, and determining a forward or backward chromaticity matching block.
[0463] S1403: Determine the filter coefficients.
[0464] S1404: A luminance prediction block of the current block is determined.
[0465] In step S1405, a chromaticity prediction value of the current block is determined by performing CP-CCCM prediction.
[0466] Another possible implementation is when inter_pred_idc is 2, then bidirectional prediction in CP-CCCM mode is performed, and twin The direction prediction process is shown in FIG. 15, and the process may include the following:
[0467] S1501, obtain the forward motion vector of the current block.
[0468] S1502, a forward luminance matching block is determined, and a forward chromaticity matching block is determined.
[0469] S1503: Obtain the backward motion vector of the current block.
[0470] S1504: determine a rear luminance matching block and a rear chromaticity matching block;
[0471] S1505: Determine the filter coefficients.
[0472] S1506: A luminance prediction block of the current block is determined.
[0473] In step S1507, a chromaticity prediction value of the current block is determined by performing CP-CCCM prediction.
[0474] S1104: A correction operation is performed on the chromaticity prediction value of the current block.
[0475] In this embodiment, the chromaticity prediction value needs to be limited to a predetermined numerical range, and if the chromaticity prediction value exceeds the predetermined numerical range, a corresponding correction operation needs to be performed, for example, as follows:
[0476] JPEG2024077520000067.jpg19164
[0477] JPEG2024077520000068.jpg11129
[0478] JPEG2024077520000069.jpg18166
[0479] Here, BitDepth is the bit depth required for chrominance pixel values, ensuring that all chrominance prediction values in predCpcccm are within the range of 0 to (1 << BitDepth) - 1.
[0480] JPEG2024077520000070.jpg9122
[0481] JPEG2024077520000071.jpg19167
[0482] JPEG2024·77520000072.jpg8135
[0483] JPEG2024077520000073.jpg2987
[0484] [[ID=3·0]]S1004. Perform a post - processing operation on the chrominance prediction value of the current block to determine the target chrominance prediction value of the current block.
[0485] Note that the chrominance prediction output predCpcccm based on the convolutional cross - component model needs to be the final target chrominance prediction value predSamples after post - processing under certain conditions; otherwise, the final target chrominance prediction value predSamples is predCpcccm.
[0486] Exemplarily, among the CP - CCCM core parameters, if predSizeW is not equal to the width nTbW of the current block, or predSizeH is not equal to the height nTbH of the current block, an upsampling operation or a downsampling operation needs to be performed on predCpcccm to obtain the final target chrominance prediction value predSamples.
[0487] For example, to improve the chromaticity prediction quality of CP-CCCM, filter enhancement may be performed on predCpcccm as the final target chromaticity prediction value predSamples.
[0488] For example, in order to further improve the accuracy of the CP-CCCM predicted value, a weighted fusion may be performed on the chromaticity predicted value calculated by the original chromaticity weighted prediction and the chromaticity predicted value predCpcccm calculated by CP-CCCM, and the fusion result may be used as the final target chromaticity predicted value predSamples.
[0489] For example, to improve the CP-CCCM prediction performance, a neural network may be used to correct the predicted output predCpcccm of the CP-CCCM.
[0490] It is also understood that in this embodiment, the acquired input information includes the reconstructed luminance and reconstructed chrominance of the List0 matching block or the List1 matching block for calculating the filter coefficients, and the existing luminance information of the current block, where the existing luminance information of the current block is the weighted luminance value currPredY of the forward matching block and / or the backward matching block.
[0491] Here, the present embodiment may replace the weighted luma value with the existing luma reconstruction value currecY of the current block, i.e., first reconstruct and store the luma pixels, and then use the stored luma reconstruction information of the current block for chroma prediction of the current block. Alternatively, the present embodiment may use the reconstructed luma refRecTemplateY and reconstructed chroma refRecTemplateC of the neighboring template of the List0 matching block or the List1 matching block as input information for calculating the filter coefficients.
[0492] JPEG2024077520000074.jpg69168
[0493] JPEG2024077520000075.jpg90168
[0494] Furthermore, bias does not need to include a coefficient term involved in the calculation of the filter coefficient, e.g., bias = Constant. Here, Constant may be a constant such as Constant = 1 << (BitDepth - 1), a numerical value related to the luminance pixel value at the same luminance position (i, j) such as Constant = f(FilterY[i][j]), or a numerical value related to the luminance pixel value corresponding to a tap in the filter template other than the same luminance position (i, j) such as Constant = f(FilterY[k][l]). Meanwhile, Constant = f(FilterY[i][j]) or Constant = f(FilterY[k][l]) may be a linear mapping relationship or a nonlinear mapping relationship, but is not particularly limited here.
[0495] As can be seen from the specific implementation of the above embodiment, this embodiment proposes a new inter-color prediction technique, CP-CCCM, which uses matching block information of the current block to obtain filter coefficients and applies them to the existing luma information of the current block to perform chroma prediction. CP-CCCM fully utilizes the luma information and chroma information of the matching block of the current block to calculate filter coefficients, and the filter coefficients fully represent the correlation between luma and chroma of the matching block. CP-CCCM also fully utilizes the existing luma information of the current block to perform chroma prediction by applying the filter coefficients, which can represent the correlation between luma and chroma, to the existing luma information of the current block. In this way, the filter coefficients are determined according to the reconstructed luminance and chrominance information of the matching block. Here, the filter coefficients are obtained by minimizing the MSE between the predicted chrominance (actual chrominance output = filter coefficient × reconstructed luminance) and the reconstructed chrominance (desired output) of the matching block. This fully expresses the correlation between the reconstructed luminance and chrominance of the matching block, and this correlation is applied to the existing luminance information of the current block to perform chrominance prediction, thereby improving the accuracy of inter-chrominance prediction to a certain extent, thereby improving the efficiency of encoding and decoding, and ultimately improving the performance of encoding and decoding.
[0496] In yet another embodiment of the present application, based on the same inventive idea as the previous embodiment, refer to Fig. 16, which shows the structural structure of an encoder 160 according to this embodiment. As shown in Fig. 16, the encoder 160 may include a first determination unit 1601 and a first prediction unit 1602, where:
[0497] The first determining unit 1601 is configured to determine prediction parameters of a current block, and determine a first prediction block of the current block according to the prediction parameters.
[0498] The first determining unit 1601 is further configured to determine model parameters according to the first color component value and the second color component value in the first prediction block.
[0499] The first prediction unit 1602 is configured to determine a reference sample value of a first color component sampling point of the current block, and determine a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters.
[0500] The first determining unit 1601 is further configured to determine, according to the predicted value of the second color component sampling point of the current block, a predicted difference value of the second color component sampling point of the current block.
[0501] In some embodiments, the method is further configured to determine initial values of second color component sampling points of the current block, and determine predicted difference values of the second color component sampling points of the current block according to the initial values of the second color component sampling points of the current block and the predicted values of the second color component sampling points of the current block.
[0502] In some embodiments, referring to FIG. 16, the encoder 160 may further comprise an encoding unit 1603 configured to encode the predicted difference values of the second color component sampling points of the current block and write the resulting encoded bits into the codestream.
[0503] In some embodiments, the encoding unit 1603 is further configured to encode the prediction parameters and write the resulting coded bits into a codestream.
[0504] In some embodiments, the prediction parameters include a motion vector, a reference image index, and an inter-prediction identification parameter, where the inter-prediction identification parameter indicates a prediction scheme used to encode the current block, and the prediction schemes include List0 prediction, List1 prediction, and bidirectional prediction.
[0505] In some embodiments, the inter-prediction identification parameter indicates that the prediction scheme used to code the current block is bi-prediction.
[0506] In some embodiments, the first determining unit 1601 is further configured to determine a List0 predicted block of the current block and a List1 predicted block of the current block according to the prediction parameters.
[0507] In some embodiments, the first determining unit 1601 is further configured such that the first predictive block is a List0 predictive block of the current block, or the first predictive block is a List1 predictive block of the current block, or the first predictive block is a List0 predictive block of the current block and a List1 predictive block of the current block.
[0508] In some embodiments, the first determining unit 1601 is further configured such that the model parameters include coefficients of the target filter.
[0509] In some embodiments, the first determining unit 1601 is further configured to determine coefficients of the target filter according to the first color component value and the second color component value in the first prediction block.
[0510] In some embodiments, the first determination unit 1601 is further configured such that the coefficients of the target filter are the coefficients to be used by the target filter if a first error between output values after the second color component value in the first predicted block and the first color component value in the first predicted block are processed by the target filter satisfies a first condition.
[0511] In some embodiments, the first determining unit 1601 is further configured such that the first condition is that the first error is minimum.
[0512] In some embodiments, the first determining unit 1601 is further configured such that the first condition is that the first error is within a first preset threshold range.
[0513] In some embodiments, the first determining unit 1601 is further configured such that the first condition is that the variation of the first error is within a second preset threshold range.
[0514] In some embodiments, the first determination unit 1601 is further configured to determine autocorrelation parameters according to the first color component values in the first predicted block, determine cross-correlation parameters according to the first color component values and the second color component values in the first predicted block, and determine coefficients of a target filter according to the autocorrelation parameters and the cross-correlation parameters.
[0515] In some embodiments, the first determining unit 1601 is further configured to determine the number of coefficients of the target filter.
[0516] In some embodiments, the encoding unit 1603 is further configured to encode a number of coefficients of the target filter and write the resulting coded bits into the codestream.
[0517] In some embodiments, the first determining unit 1601 is further configured to set the number of coefficients of the target filter equal to a first preset constant value.
[0518] In some embodiments, the first determining unit 1601 is further configured to determine a block category first identification information of the current block, and determine the number of coefficients of the target filter according to the block category first identification information of the current block.
[0519] In some embodiments, the encoding unit 1603 is further configured to encode the block category first identification information of the current block and write the resulting encoded bits into the codestream.
[0520] In some embodiments, the first determining unit 1601 is further configured such that the target filter is a one-dimensional filter or a two-dimensional filter of a preset shape.
[0521] In some embodiments, the first determining unit 1601 is further configured to determine the shape of the target filter.
[0522] In some embodiments, the encoding unit 1603 is further configured to encode the shape of the target filter and write the resulting coded bits into the codestream.
[0523] In some embodiments, the first determining unit 1601 is further configured to determine a value of a filter shape parameter, where the filter shape parameter indicates a shape of the target filter.
[0524] In some embodiments, the first determining unit 1601 is further configured to determine block category second identification information of the current block, and determine the value of the filter shape parameter according to the block category second identification information of the current block.
[0525] In some embodiments, encoding unit 1603 is further configured to encode the values of the filter shape parameters and write the resulting coded bits into the codestream.
[0526] In some embodiments, the encoding unit 1603 is further configured to encode the block category second identification information of the current block and write the resulting coded bits into the codestream.
[0527] In some embodiments, the first determining unit 1601 is further configured to determine, according to the reconstructed value of the first color component sampling point of the current block, a reference sample value of the first color component sampling point of the current block.
[0528] In some embodiments, the first determining unit 1601 is further configured to determine, according to the first color component value in the first predicted block, a reconstructed value of the first color component sampling point of the current block.
[0529] In some embodiments, the first determination unit 1601 is further configured to determine a reconstructed value of a first color component sampling point of the current block according to the first color component value in the List0 predicted block of the current block and the first color component value in the List1 predicted block of the current block.
[0530] In some embodiments, the first determination unit 1601 is further configured to determine a predicted value of the first color component sampling point of the current block according to the first color component value in the first predicted block, and to determine a reference sample value of the first color component sampling point of the current block according to the predicted value of the first color component sampling point of the current block.
[0531] In some embodiments, the first determination unit 1601 is further configured to determine a predicted value of the first color component sampling point of the current block according to the first color component value in the List0 predicted block of the current block and the first color component value in the List1 predicted block of the current block.
[0532] In some embodiments, the first determination unit 1601 is further configured to determine a List0 weighting coefficient of the List0 predicted block of the current block and a List1 weighting coefficient of the List1 predicted block of the current block, determine a weighted sum of the first color component value in the List0 predicted block of the current block and the first color component value in the List1 predicted block of the current block according to the List0 weighting coefficient and the List1 weighting coefficient, and determine a predicted value of the first color component sampling point of the current block according to the weighted sum.
[0533] In some embodiments, the first determining unit 1601 is further configured to determine a first input value of the target filter based on the reference sample value of the first color component sampling point of the current block.
[0534] The first prediction unit 1602 is further configured to determine a first output value of the target filter based on the first input value and the model parameters, and to determine a predicted value of a second color component sampling point of the current block based on the first output value.
[0535] In some embodiments, referring to FIG. 16, the encoder 160 may further comprise a first filter unit 1604 configured to perform a first filtering operation on the reference sample value of the first color component sampling point of the current block to determine a first input value.
[0536] In some embodiments, the first filter unit 1604 is further configured such that the first filtering process includes at least one of a low-pass filter, a down-sampling filter.
[0537] In some embodiments, the first filter unit 1604 is further configured such that the first filtering operation sets the first input value equal to the reference sample value of the first color component sampling point of the current block.
[0538] In some embodiments, the first filter unit 1604 is further configured to perform a second filtering operation on the first output value to determine a second output value, and to determine a predicted value of a second color component sampling point of the current block based on the second output value.
[0539] In some embodiments, the first filter unit 1604 is further configured such that the second filtering process includes at least one of a low-pass filter and an up-sampling filter.
[0540] In some embodiments, the first filter unit 1604 is further configured such that the second filtering process sets the second output value equal to the first output value.
[0541] In some embodiments, the first determining unit 1601 is further configured such that the first output values include predicted values of some second color component sampling points of the current block.
[0542] In some embodiments, the first prediction unit 1602 is further configured to perform a first operation on the second output value to obtain a predicted value of the second color component sampling point of the current block.
[0543] In some embodiments, the first prediction unit 1602 is further configured such that the first operation is a clip operation for restricting the second output value to within a preset numerical range.
[0544] In some embodiments, the first prediction unit 1602 is further configured to perform an addition operation according to the first output value and the first offset value to determine a predicted value of the second color component sampling point of the current block.
[0545] In some embodiments, the first determining unit 1601 is further configured to set the first offset value equal to a predetermined constant value, or set the first offset value equal to a value in a predetermined mapping relationship of the first input value.
[0546] In some embodiments, the first determination unit 1601 is further configured to determine a predicted difference value of a first color component sampling point of the current block, and determine a reference sample value of the first color component sampling point of the current block according to the predicted difference value of the first color component sampling point of the current block.
[0547] In some embodiments, the first determination unit 1601 is further configured to determine a first color component residual value and a second color component residual value in the first predicted block, and determine the model parameters according to the first color component residual value and the second color component residual value in the first predicted block.
[0548] The first prediction unit 1602 is further configured to determine initial prediction difference values of second color component sampling points of the current block according to the prediction difference values of the first color component sampling points of the current block and the model parameters, determine initial prediction values of the second color component sampling points of the current block according to the first prediction block, and determine prediction values of the second color component sampling points of the current block according to the initial prediction difference values and the initial prediction values of the second color component sampling points of the current block.
[0549] In the present embodiment, it is understood that a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and may of course be a module or a non-module. Furthermore, each component in the present embodiment may be integrated into one processing unit, each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be realized in the form of hardware or in the form of a software functional module.
[0550] If the integrated unit is implemented in the form of a software functional module rather than being sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the essential aspects of the technical solution of this embodiment, or the parts that contribute to existing technology, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium, and the storage medium includes instructions for causing a computer device (such as a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the method described in this embodiment. The storage medium includes various media capable of storing program code, such as a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0551] Therefore, an embodiment of the present application provides a computer-readable storage medium applied to the encoder 160, which stores a computer program, and when the computer program is executed by the first processor, realizes the method described in any of the above embodiments.
[0552] Based on the configuration of the encoder 160 and the computer-readable storage medium, reference is made to FIG. 17, which illustrates a specific hardware structure of the encoder 160 according to an embodiment of the present application. As shown in FIG. 17, the encoder 160 may include a first communication interface 1701, a first memory 1702, and a first processor 1703. Each assembly is coupled via a first bus system 1704. It is understood that the first bus system 1704 is used to realize connection communication between these assemblies. The first bus system 1704 includes a data bus as well as a power bus, a control bus, and a status signal bus. However, for clarity, various buses are referred to as the first bus system 1704 in FIG. 17. Here,
[0553] The first communication interface 1701 is used for receiving and transmitting signals in the process of transmitting and receiving information to and from other external network elements.
[0554] The first memory 1702 is used to store a computer program executable on the first processor 1703 .
[0555] When the computer program is executed, the first processor 1703
[0556] The present invention is used to perform the following: determining prediction parameters for a current block; determining a first predicted block of the current block according to the prediction parameters; determining model parameters according to the first color component values and the second color component values in the first predicted block; determining reference sample values of the first color component sampling points of the current block; determining predicted values of the second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters; and determining predicted difference values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block.
[0557] It is understood that first memory 1702 in this embodiment may be volatile memory, nonvolatile memory, or both volatile and nonvolatile memory. Here, nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. By way of example, and not limitation, many types of RAM can be used, 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 (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synch link dynamic random access memory (SLDRAM), and direct Rambus random access memory (DR RAM). The first memory 1702 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0558] The first processor 1703 may be an integrated circuit chip having a signal processing function. In the implementation process, each step of the above method may be completed by a hardware integrated logic circuit or software instructions in the first processor 1703. The first processor 1703 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware assembly. Each method, step, and logic block diagram disclosed in the embodiments of the present application may be realized or executed. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in this field, such as a random memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register, etc. The storage medium is located in the first memory 1702, and the first processor 1703 reads the information in the first memory 1702 and completes the steps of the above method in combination with its hardware.
[0559] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processor devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof. For a software implementation, the techniques described herein may be implemented by modules (e.g., processes, functions, etc.) for performing the functions described herein. The software code may be stored in memory and executed by the processor. The memory may be implemented within the processor or external to the processor.
[0560] Optionally, as another embodiment, the first processor 1703 is further configured to perform the method according to any of the previous embodiments when executing the computer program.
[0561] This embodiment provides an encoder, which determines model parameters according to the first and second color component values of a first prediction block, and the model parameters fully represent the correlation between luma and chroma in the prediction block. The correlation is applied to the existing luma information of the current block to perform chroma prediction, thereby improving the accuracy of inter-chroma prediction and reducing the code rate. At the same time, the efficiency of encoding and decoding can be improved, and ultimately the performance of encoding and decoding can be improved.
[0562] In yet another embodiment of the present application, based on the same inventive idea as the above embodiment, referring to Figure 18, there is shown a diagram illustrating the configuration of a decoder 180 according to this embodiment. As shown in Figure 18, the decoder 180 may include a decoding unit 1801, a second determination unit 1802, and a second prediction unit 1803, where:
[0563] The decoding unit 1801 is configured to decode the codestream and determine prediction parameters for the current block.
[0564] The second determining unit 1802 is configured to determine a first predicted block of the current block according to the prediction parameters, and determine model parameters according to the first color component value and the second color component value in the first predicted block.
[0565] The second prediction unit 1803 is configured to determine a reference sample value of a first color component sampling point of the current block, and determine a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters.
[0566] The second determining unit 1802 is further configured to determine, according to the predicted value of the second color component sampling point of the current block, a reconstructed value of the second color component sampling point of the current block.
[0567] In some embodiments, the prediction parameters include a motion vector, a reference image index, and an inter-prediction identification parameter, where the inter-prediction identification parameter indicates a prediction scheme used to decode the current block, and the prediction schemes include List0 prediction, List1 prediction, and bidirectional prediction.
[0568] In some embodiments, the inter-prediction identification parameter indicates that the prediction scheme used to decode the current block is bi-prediction.
[0569] In some embodiments, the second determining unit 1802 is further configured to determine a List0 predicted block of the current block and a List1 predicted block of the current block according to the prediction parameters.
[0570] In some embodiments, the second determining unit 1802 is further configured such that the first predictive block is a List0 predictive block of the current block, or the first predictive block is a List1 predictive block of the current block, or the first predictive block is a List0 predictive block of the current block and a List1 predictive block of the current block.
[0571] In some embodiments, the second determining unit 1802 is further configured such that the model parameters include coefficients of the target filter.
[0572] In some embodiments, the second determining unit 1802 is further configured to determine coefficients of the target filter according to the first color component value and the second color component value in the first prediction block.
[0573] In some embodiments, the second determination unit 1802 is further configured to determine that the coefficients of the target filter are the coefficients to be used by the target filter if a first error between output values after the second color component value in the first predicted block and the first color component value in the first predicted block are processed by the target filter satisfies a first condition.
[0574] In some embodiments, the second determining unit 1802 is further configured such that the first condition is that the first error is minimum.
[0575] In some embodiments, the second determining unit 1802 is further configured such that the first condition is that the first error is within a first preset threshold range.
[0576] In some embodiments, the second determining unit 1802 is further configured such that the first condition is that the variation of the first error is within a second preset threshold range.
[0577] In some embodiments, the second determination unit 1802 is further configured to determine autocorrelation parameters according to the first color component values in the first predicted block, determine cross-correlation parameters according to the first color component values and the second color component values in the first predicted block, and determine coefficients of a target filter according to the autocorrelation parameters and the cross-correlation parameters.
[0578] In some embodiments, the second determining unit 1802 is further configured to cause the number of coefficients of the target filter to be equal to a first preset constant value.
[0579] In some embodiments, the decoding unit 1801 is further configured to decode the codestream and determine the number of coefficients of the target filter.
[0580] In some embodiments, the second determining unit 1802 is further configured to determine a first identification information of a block category of the current block, and determine the number of coefficients of the target filter according to the first identification information of the block category of the current block.
[0581] In some embodiments, the second determining unit 1802 is further configured such that the target filter is a one-dimensional filter or a two-dimensional filter of a preset shape.
[0582] In some embodiments, the decoding unit 1801 is further configured to decode the codestream and determine the shape of the target filter.
[0583] In some embodiments, the second determining unit 1802 is further configured to determine a value of a filter shape parameter, where the filter shape parameter indicates a shape of the target filter.
[0584] In some embodiments, the second determining unit 1802 is further configured to determine a block category second identification information of the current block, and determine the value of the filter shape parameter according to the block category second identification information of the current block.
[0585] In some embodiments, the second determining unit 1802 is further configured to determine, according to the reconstructed value of the first color component sampling point of the current block, a reference sample value of the first color component sampling point of the current block.
[0586] In some embodiments, the second determining unit 1802 is further configured to determine a reconstructed value of a first color component sampling point of the current block according to the first color component value in the first predicted block.
[0587] In some embodiments, the second determination unit 1802 is further configured to determine a reconstructed value of the first color component sampling point of the current block according to the first color component value in the List0 predicted block of the current block and the first color component value in the List1 predicted block of the current block.
[0588] In some embodiments, the second determination unit 1802 is further configured to determine a predicted value of the first color component sampling point of the current block according to the first color component value in the first predicted block, and to determine a reference sample value of the first color component sampling point of the current block according to the predicted value of the first color component sampling point of the current block.
[0589] In some embodiments, the second determination unit 1802 is further configured to determine a predicted value of the first color component sampling point of the current block according to the first color component value in the List0 predicted block of the current block and the first color component value in the List1 predicted block of the current block.
[0590] In some embodiments, the second determination unit 1802 is further configured to determine a List0 weighting coefficient of the List0 predicted block of the current block and a List1 weighting coefficient of the List1 predicted block of the current block, determine a weighted sum of the first color component value in the List0 predicted block of the current block and the first color component value in the List1 predicted block of the current block according to the List0 weighting coefficient and the List1 weighting coefficient, and determine a predicted value of the first color component sampling point of the current block according to the weighted sum.
[0591] In some embodiments, the second determining unit 1802 is further configured to determine a first input value of the target filter based on the reference sample value of the first color component sampling point of the current block.
[0592] The second prediction unit 1803 is further configured to determine a first output value of the target filter based on the first input value and the model parameters, and to determine a predicted value of a second color component sampling point of the current block based on the first output value.
[0593] In some embodiments, referring to FIG. 18, the decoder 180 may further comprise a second filter unit 1804 configured to perform a first filtering operation on the reference sample value of the first color component sampling point of the current block to determine a first input value.
[0594] In some embodiments, the second filter unit 1804 is further configured such that the first filtering process includes at least one of a low-pass filter, a down-sampling filter.
[0595] In some embodiments, the second filter unit 1804 is further configured such that the first filtering operation sets the first input value equal to the reference sample value of the first color component sampling point of the current block.
[0596] In some embodiments, the second filter unit 1804 is further configured to perform a second filtering operation on the first output value to determine a second output value, and to determine a predicted value of a second color component sampling point of the current block based on the second output value.
[0597] In some embodiments, the second filter unit 1804 is further configured such that the second filtering process includes at least one of a low-pass filter, an up-sampling filter.
[0598] In some embodiments, the second filter unit 1804 is further configured such that the second filtering process sets the second output value equal to the first output value.
[0599] In some embodiments, the second determining unit 1802 is further configured such that the first output values include predicted values of some second color component sampling points of the current block.
[0600] In some embodiments, the second prediction unit 1803 is further configured to perform a first operation on the second output value to obtain a predicted value of the second color component sampling point of the current block.
[0601] In some embodiments, the second prediction unit 1803 is further configured such that the first processing is a clip operation for restricting the second output value to within a preset numerical range.
[0602] In some embodiments, the second prediction unit 1803 is further configured to perform an addition operation according to the first output value and the first offset value to determine a predicted value of the second color component sampling point of the current block.
[0603] In some embodiments, the second determining unit 1802 is further configured to set the first offset value equal to a predetermined constant value, or to set the first offset value equal to a value in a predetermined mapping relationship of the first input value.
[0604] In some embodiments, the second determination unit 1802 is further configured to determine a predicted difference value of a first color component sampling point of the current block, and determine a reference sample value of the first color component sampling point of the current block according to the predicted difference value of the first color component sampling point of the current block.
[0605] In some embodiments, the second determination unit 1802 is further configured to determine a first color component residual value and a second color component residual value in the first predicted block, and determine the model parameters according to the first color component residual value and the second color component residual value in the first predicted block.
[0606] The second prediction unit 1803 is further configured to determine initial prediction difference values of second color component sampling points of the current block according to the prediction difference values of the first color component sampling points of the current block and the model parameters, determine initial prediction values of the second color component sampling points of the current block according to the first prediction block, and determine prediction values of the second color component sampling points of the current block according to the initial prediction difference values and the initial prediction values of the second color component sampling points of the current block.
[0607] In some embodiments, the decoding unit 1801 is further configured to decode the codestream and determine predicted difference values of the second color component sampling points of the current block.
[0608] The second determination unit 1802 is further configured to determine a reconstructed value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block and the predicted difference value of the second color component sampling point of the current block.
[0609] In this embodiment, it is understood that a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and may of course be a module or a non-module. Furthermore, each component in this embodiment may be integrated into one processing unit, each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be realized in the form of hardware or in the form of a software functional module.
[0610] When the integrated unit is implemented in the form of a software functional module rather than being sold or used as an independent product, it may be stored in a single computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium applied to the decoder 180, in which a computer program is stored, and when the computer program is executed by the second processor, the method according to any of the previous embodiments is realized.
[0611] Based on the configuration of the decoder 180 and the computer-readable storage medium, reference is made to FIG. 19, which illustrates a specific hardware structure of the decoder 180 according to an embodiment of the present application. As shown in FIG. 19, the decoder 180 may include a second communication interface 1901, a second memory 1902, and a second processor 1903. Each assembly is coupled via a second bus system 1904. It is understood that the second bus system 1904 is used to realize the connection communication between these assemblies. The second bus system 1904 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for clarity, various buses are referred to as the second bus system 1904 in FIG. 19. Here,
[0612] The second communication interface 1901 is used for receiving and transmitting signals in the process of transmitting and receiving information to and from other external network elements.
[0613] The second memory 1902 is used to store a computer program executable on the second processor 1903 .
[0614] When the computer program is executed, the second processor 1903
[0615] The code stream is decoded, prediction parameters for a current block are determined, a first prediction block for the current block is determined according to the prediction parameters, model parameters are determined according to first color component values and second color component values in the first prediction block, reference sample values for the first color component sampling points of the current block are determined, predicted values for the second color component sampling points of the current block are determined according to the reference sample values for the first color component sampling points of the current block and the model parameters, and reconstructed values for the second color component sampling points of the current block are determined according to the predicted values for the second color component sampling points of the current block.
[0616] Optionally, as another embodiment, the second processor 1903 is further configured to perform the method according to any of the previous embodiments when executing the computer program.
[0617] It is understood that the hardware functions of the second memory 1902 and the first memory 1702 are similar, and the hardware functions of the second processor 1903 and the first processor 1703 are similar, and will not be repeated here.
[0618] This embodiment provides a decoder, which determines model parameters according to the first and second color component values of a first prediction block, and the model parameters fully represent the correlation between luma and chroma in the prediction block. The correlation is applied to the existing luma information of a current block to perform chroma prediction, thereby improving the accuracy of inter-chroma prediction and reducing the code rate. At the same time, the efficiency of encoding and decoding can be improved, and ultimately the performance of encoding and decoding can be improved.
[0619] In yet another embodiment of the present application, referring to Fig. 20, there is shown a diagram illustrating a configuration of an encoding / decoding system according to an embodiment of the present application. As shown in Fig. 20, an encoding / decoding system 200 may include an encoder 2001 and a decoder 2002.
[0620] In this embodiment, the encoder 2001 may be the encoder according to any of the previous embodiments, and the decoder 2002 may be the decoder according to any of the previous embodiments.
[0621] It should be noted that, as used herein, the terms "comprises," "includes," or any other variation thereof, are intended to include a non-exclusive inclusion, whereby a process, method, article, or apparatus comprising a list of elements includes not only those elements, but also other elements not expressly listed or inherent in such process, method, article, or apparatus. Absent further limitations, an element qualified by "comprising one of..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0622] The numbers of the above embodiments are for illustrative purposes only and do not represent the superiority or inferiority of the embodiments.
[0623] The methods disclosed in the several method embodiments provided by this application can be arbitrarily combined to obtain new method embodiments, provided there are no conflicts.
[0624] The features disclosed in the several product embodiments provided by this application may be combined in any manner to obtain new product embodiments, provided there are no conflicts.
[0625] Features disclosed in several method or apparatus embodiments provided by this application may be combined in any manner to obtain new method or apparatus embodiments, provided there are no conflicts.
[0626] The above is merely a specific embodiment of the present application, and the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be easily thought of by a person skilled in the art within the technical scope of the present application are intended to be embraced within the technical scope of the present application. Therefore, the scope of protection of the present application shall be governed by the scope described in the claims. [Industrial Applicability]
[0627] In this embodiment, whether on the encoding side or the decoding side, after determining prediction parameters for a current block, a first predicted block of the current block is determined according to the prediction parameters, model parameters are determined according to the first and second color component values of the first predicted block, reference sample values of the first color component sampling points of the current block are determined, and predicted values of the second color component sampling points of the current block are determined according to the reference sample values of the first color component sampling points of the current block and the model parameters. In this way, the encoding side can determine predicted difference values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block, and the decoding side can determine reconstructed values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block. That is, model parameters are determined according to the first and second color component values in the first predicted block, and the model parameters fully represent the correlation between luma and chroma in the predicted block. The correlation is then applied to the existing luma information of the current block to perform chroma prediction, thereby improving the accuracy of inter-chroma prediction and reducing the code rate. At the same time, the efficiency of encoding and decoding can be improved, thereby improving the performance of encoding and decoding.
Claims
1. 1. A decoding method comprising: decoding the codestream and determining prediction parameters for the current block; determining a first prediction block of the current block according to the prediction parameters; determining model parameters according to first and second color component values in the first predicted block; determining a reference sample value of a first color component sampling point of the current block; and determining a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters; determining reconstructed values of the second color component sampling points of the current block according to the predicted values of the second color component sampling points of the current block; Including, Decryption method.
2. The prediction parameters are: including a motion vector, a reference image index, and an inter-prediction identification parameter; The inter-prediction identification parameter indicates a prediction method to be used to decode the current block, and the prediction method includes List0 prediction, List1 prediction, and bidirectional prediction; The method comprises: The method further includes determining a List0 predicted block of the current block and a List1 predicted block of the current block according to the prediction parameters; The method comprises: The first predicted block is a List0 predicted block of the current block, or The first predicted block is a List1 predicted block of the current block, or The first predicted block may be a List0 predicted block of the current block and a List1 predicted block of the current block. The method of claim 1.
3. The model parameters include coefficients of a target filter, The method comprises: determining coefficients of the target filter according to first and second color component values in the first predicted block; The method of claim 2.
4. the coefficients of the target filter are coefficients to be used by the target filter when a first error between output values after a second color component value in the first prediction block and a first color component value in the first prediction block are processed by the target filter satisfies a first condition; The method of claim 3.
5. The first condition is that the first error is minimum, or, the first condition is that the first error is within a first preset threshold range; or, The first condition is that the change amount of the first error is within a second preset threshold range. The method of claim 4.
6. The step of determining coefficients of the target filter according to first color component values and second color component values in the first prediction block includes: determining an autocorrelation parameter in response to a first color component value in the first predicted block; determining a cross-correlation parameter in response to a first color component value and a second color component value in the first predicted block; determining coefficients of the target filter in response to the autocorrelation parameters and the cross-correlation parameters; Including, The method of claim 3.
7. The method comprises: The number of coefficients of the target filter is equal to a first preset constant value; or, further comprising the step of decoding the codestream to determine the number of coefficients of the target filter; or, The target filter may be a one-dimensional filter or a two-dimensional filter of a predetermined shape; or, further comprising the step of decoding the codestream and determining the shape of the target filter. The method of claim 3.
8. The step of determining the reference sample value of the first color component sampling point of the current block includes: determining a reference sample value of the first color component sampling point of the current block according to the reconstruction value of the first color component sampling point of the current block; The method comprises: determining a reconstruction value of a first color component sampling point of the current block according to a first color component value in the first predicted block; determining a reconstructed value of a first color component sampling point of the current block according to a first color component value of the first predicted block, determining a reconstruction value of a first color component sampling point of the current block according to a first color component value in a List0 predicted block of the current block and a first color component value in a List1 predicted block of the current block; The method of claim 1.
9. The step of determining the reference sample value of the first color component sampling point of the current block includes: determining a predicted value of a first color component sampling point of the current block according to a first color component value in the first predicted block; determining a reference sample value of the first color component sampling point of the current block according to the predicted value of the first color component sampling point of the current block; Including, determining a predicted value of a first color component sampling point of the current block according to a first color component value of the first predicted block, determining a predicted value of a first color component sampling point of the current block according to a first color component value of a List0 predicted block of the current block and a first color component value of a List1 predicted block of the current block; The method of claim 1.
10. The method comprises: determining a List0 weighting factor of a List0 predicted block of the current block and a List1 weighting factor of a List1 predicted block of the current block; determining a weighted sum of a first color component value in the List0 predicted block of the current block and a first color component value in the List1 predicted block of the current block according to the List0 weighting coefficient and the List1 weighting coefficient; determining a predicted value of a first color component sampling point of the current block according to the weighted sum; further comprising:
10. The method of claim 9.
11. determining predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters, determining a first input value of the target filter based on a reference sample value of a first color component sampling point of the current block; determining a first output value of the target filter based on the first input value and the model parameters; determining a predicted value of a second color component sampling point of the current block based on the first output value; Including, The method of claim 3.
12. determining a first input value of the target filter according to a reference sample value of a first color component sampling point of the current block, performing a first filtering process on a reference sample value of a first color component sampling point of the current block to determine the first input value; The method comprises: the first filtering process further includes a step of using at least one of a low-pass filter and a down-sampling filter; or, the first filtering process further comprises setting the first input value equal to a reference sample value of a first color component sampling point of the current block; The method of claim 11.
13. determining a predicted value of a second color component sampling point of the current block based on the first output value, performing a second filtering process on the first output value to determine a second output value; determining a predicted value of a second color component sampling point of the current block based on the second output value; Including, The method comprises: the second filtering process further includes a step of using at least one of a low-pass filter and an up-sampling filter; or, the second filtering process further includes setting the second output value equal to the first output value; or, The first output value may further include predicted values of some second color component sampling points of the current block; determining a predicted value of a second color component sampling point of the current block based on the second output value, performing a first process on the second output value to obtain a predicted value of a second color component sampling point of the current block; the first processing is a clip operation for limiting the second output value to a value within a predetermined numerical range; The method of claim 11.
14. The method comprises: determining a predicted difference value of a first color component sampling point of the current block; determining a reference sample value of the first color component sampling point of the current block according to a predicted difference value of the first color component sampling point of the current block; further comprising: The method of claim 1.
15. The method comprises: determining a first color component residual value and a second color component residual value for the first predicted block; determining model parameters according to the first color component residual value and the second color component residual value of the first predicted block; further comprising Accordingly, determining predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters includes: determining an initial predicted difference value of a second color component sampling point of the current block according to the predicted difference value of a first color component sampling point of the current block and the model parameters; determining an initial predicted value of a second color component sampling point of the current block according to the first predicted block; determining a predicted value of a second color component sampling point of the current block according to the initial predicted difference value and the initial predicted value of the second color component sampling point of the current block; Including, 15. The method of claim 14.
16. determining a reconstructed value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block, decoding the codestream to determine a predicted residual value of a second color component sampling point of the current block; determining a reconstructed value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block and the predicted difference value of the second color component sampling point of the current block; Including, The method of claim 1.
17. 1. An encoding method comprising: determining prediction parameters for the current block; determining a first prediction block of the current block according to the prediction parameters; determining model parameters according to first and second color component values in the first predicted block; determining a reference sample value of a first color component sampling point of the current block; and determining a predicted value of a second color component sampling point of the current block according to the reference sample value of the first color component sampling point of the current block and the model parameters; determining a predicted difference value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block; Including, Encoding method.
18. 1. An encoder comprising: the encoder comprises a first decision unit and a first prediction unit; The first determining unit is configured to determine prediction parameters of a current block, and determine a first prediction block of the current block according to the prediction parameters; The first determining unit is further configured to determine model parameters according to first color component values and second color component values in the first prediction block; the first prediction unit is configured to determine reference sample values of first color component sampling points of the current block; and determine predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters; the first determining unit is further configured to determine a predicted difference value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block; Encoder.
19. a decoder, the decoder comprising a decoding unit, a second determination unit, and a second prediction unit; the decoding unit is configured to decode the codestream and determine prediction parameters for a current block; the second determination unit is configured to determine a first prediction block of the current block according to the prediction parameters, and determine model parameters according to first and second color component values in the first prediction block; the second prediction unit is configured to determine reference sample values of first color component sampling points of the current block; and determine predicted values of second color component sampling points of the current block according to the reference sample values of the first color component sampling points of the current block and the model parameters; the second determining unit is further configured to determine a reconstructed value of the second color component sampling point of the current block according to the predicted value of the second color component sampling point of the current block. decoder.
20. A computer-readable storage medium having a computer program stored therein, the computer program implementing the method of any one of claims 1 to 16 or the method of claim 17 when executed. A computer-readable storage medium.