Coding method, decoding method, coder, decoder, and storage medium

WO2026199243A1PCT designated stage Publication Date: 2026-10-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/085098
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2026-10-01

Smart Images

  • Figure CN2025085098_01102026_PF_FP_ABST
    Figure CN2025085098_01102026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in embodiments of the present application are a coding method and a decoding method. When an inter-frame convolutional cross-component linear model is used for the current block, a reconstructed value and a predicted value of a first image component reference sample of the current sample are determined; and on the basis of the reconstructed value and the predicted value of the first image component reference sample, a predicted value of a second image component of the current sample is determined.
Need to check novelty before this filing date? Find Prior Art

Description

Encoding / decoding methods, encoders, decoders, and storage media Technical Field

[0001] This application relates to the field of video encoding and decoding technology, and in particular to an encoding and decoding method, encoder, decoder, and storage medium. Background Technology

[0002] As people's demands for video display quality have increased, high-resolution video, such as HD and UHD, has emerged. However, high-resolution video typically contains more information, thus requiring more bandwidth. To reduce bandwidth requirements, video coding standards involving video compression have been introduced.

[0003] Inter-convolutional cross-component models (Inter CCCMs) can be used to predict chroma samples. However, common inter-convolutional cross-component prediction techniques are not suitable for predicting all samples, reducing prediction accuracy and affecting encoding / decoding performance. Summary of the Invention

[0004] This application provides an encoding / decoding method, encoder, decoder, and storage medium, which can improve the accuracy of prediction and enhance encoding / decoding performance.

[0005] The technical solution of this application embodiment can be implemented as follows:

[0006] In a first aspect, embodiments of this application provide a decoding method applied to a decoder, the method comprising:

[0007] When using an inter-frame convolutional cross-component linear model in the current block, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample for the current sample.

[0008] Based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined.

[0009] Secondly, embodiments of this application provide an encoding method applied to an encoder, the method comprising:

[0010] When using an inter-frame convolutional cross-component linear model in the current block, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample for the current sample.

[0011] Based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined.

[0012] Thirdly, embodiments of this application provide an encoder, the encoder including...

[0013] The first determining part is configured to, when the inter-frame convolutional cross-component linear model is used in the current block, determine the reconstructed value and the predicted value of the first image component reference sample of the current sample; and determine the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample.

[0014] Fourthly, embodiments of this application provide an encoder, which includes a first memory and a first processor; wherein,

[0015] A first memory for storing computer programs that can run on a first processor;

[0016] A first processor is configured to execute the method described in the second aspect when running the computer program.

[0017] Fifthly, embodiments of this application provide a decoder, which includes:

[0018] The second determining part is configured to, when the inter-frame convolutional cross-component linear model is used in the current block, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample; and determine the predicted value of the second image component of the current sample based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample.

[0019] Sixthly, embodiments of this application provide a decoder, which includes a second memory and a second processor; wherein,

[0020] The second memory is used to store computer programs that can run on the second processor;

[0021] A second processor is configured to execute the method described in the first aspect when running the computer program.

[0022] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by at least one processor, implements the method described in the first aspect or the method described in the second aspect.

[0023] Eighthly, embodiments of this application provide a computer-readable storage medium for storing a bitstream generated by the encoding method described in the second aspect.

[0024] This application provides an encoding / decoding method, encoder, decoder, and storage medium. When the current block uses an inter-frame convolutional cross-component linear model, the method determines the reconstructed value and predicted value of a first image component reference sample for the current sample; based on the reconstructed value and predicted value of the first image component reference sample, the method determines the predicted value of a second image component for the current sample. In other words, in this application's embodiments, for an encoding block using an inter-frame convolutional cross-component linear model, the prediction method for predicting the second image component of the current sample can be determined based on the reconstructed value and predicted value of the first image component reference sample. That is, the prediction process for the second image component of the current sample can be adjusted according to the relationship between the reconstructed value and predicted value of the first image component reference sample, thereby improving prediction accuracy and enhancing encoding / decoding performance. Attached Figure Description

[0025] Figure 1 is a schematic diagram of a convolution filter proposed in an embodiment of this application;

[0026] Figure 2 is a schematic diagram of the CCCM mode chromaticity reference template area proposed in an embodiment of this application;

[0027] Figure 3 is a schematic diagram of the inter-frame convolution cross-component prediction process proposed in the embodiments of this application;

[0028] Figure 4 is a schematic diagram of the correspondence between luminance samples and chromaticity samples proposed in the embodiments of this application;

[0029] Figure 5 is a system block diagram of an encoder proposed in an embodiment of this application;

[0030] Figure 6 is a system block diagram of a decoder proposed in an embodiment of this application;

[0031] Figure 7 is a flowchart illustrating a decoding method provided in an embodiment of this application;

[0032] Figure 8 is a schematic diagram of the correspondence between the current sample and the reference sample proposed in the embodiments of this application;

[0033] Figure 9 is a flowchart illustrating an encoding method provided in an embodiment of this application;

[0034] Figure 10 is a schematic diagram of the composition structure of an encoder proposed in an embodiment of this application;

[0035] Figure 11 is a schematic diagram of the specific hardware structure of an encoder proposed in an embodiment of this application;

[0036] Figure 12 is a schematic diagram of the composition structure of a decoder proposed in an embodiment of this application;

[0037] Figure 13 is a schematic diagram of the specific hardware structure of a decoder proposed in an embodiment of this application;

[0038] Figure 14 is a schematic diagram of the composition structure of an encoding / decoding system proposed in an embodiment of this application. Detailed Implementation

[0039] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0041] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0042] It should also be noted that the terms "first, second, and third" used in the embodiments of this application are only used to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0043] In video images, a first color component, a second color component, and a third color component are generally used to represent a coding block (CB). These three color components are a luma component, a blue chroma component, and a red chroma component, respectively. Specifically, the luma component is usually represented by the symbol Y, the blue chroma component is usually represented by the symbol Cb or U, and the red chroma component is usually represented by the symbol Cr or V. Thus, video images can be represented in YCbCr format or YUV format.

[0044] Video codec standards can employ a block-based hybrid coding framework. Specifically, each image in the video is divided into largest coding units (LCUs) or coding tree units (CTUs) of the same size (e.g., 128x128, 64x64, etc.). Each LCU or CTU can be further subdivided into rectangular coding units (CUs) according to rules. Coding units may also be further divided into prediction units (PUs), transform units (TUs), etc.

[0045] Specifically, the hybrid coding framework includes a prediction module 11, a transform and quantization module 12, an entropy coding module 13, an inverse quantization and inverse transform module 14, a loop filtering module 15, and a decoded image buffer module 16. The prediction module 11 may include an intra-frame prediction module 11a and an inter-frame prediction module 11b. The inter-frame prediction module 11b may include a motion estimation module and a motion compensation module. Because there is a strong correlation between adjacent pixels in an image of a video, intra-frame prediction is used in video coding and decoding technology to eliminate spatial redundancy between adjacent pixels. Furthermore, because there is a strong similarity between adjacent images in a video, inter-image prediction is used in video coding and decoding technology to eliminate temporal redundancy between adjacent images, thereby improving coding efficiency.

[0046] Furthermore, the transformation converts the predicted image patch to the frequency domain, redistributing energy. Combined with quantization, information insensitive to the human eye can be removed, thus eliminating visual redundancy. Entropy coding can eliminate character redundancy based on the current context model and the probability information of the binary code stream.

[0047] The basic workflow of a video codec is as follows: At the encoding end, after reading a black-and-white or color image, it is divided into blocks. Intra-frame prediction or inter-frame prediction is used on the current block to generate a prediction block. The original block of the current block is subtracted from the prediction block to obtain a residual block. The residual block is transformed and quantized to obtain a quantization coefficient matrix. The quantization coefficient matrix is ​​entropy encoded and output to the bitstream. At the decoding end, intra-frame prediction or inter-frame prediction is used on the current block to generate a prediction block. On the other hand, the bitstream is parsed to obtain the quantization coefficient matrix. The quantization coefficient matrix is ​​inverse quantized and inverse transformed to obtain a residual block. The prediction block and the residual block are added to obtain a reconstructed block. The reconstructed blocks form a reconstructed image. Based on the image or based on the blocks, loop filtering is performed on the reconstructed image to obtain the decoded image.

[0048] The encoding end requires similar operations to the decoding end to obtain the decoded image. The decoded image can be used as a reference image for inter-frame prediction of subsequent images.

[0049] The block partitioning information, prediction, transform, quantization, entropy coding, loop filtering, and other mode or parameter information determined at the encoding end need to be written into the bitstream if necessary. The decoding end determines the same block partitioning information, prediction, transform, quantization, entropy coding, loop filtering, and other mode or parameter information as the encoding end by parsing the bitstream and analyzing the existing information, thereby ensuring that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end.

[0050] During prediction, the current block can be divided into prediction units, and during transformation, it can be divided into transformation units. The division of prediction units and transformation units can be different. The above is the basic flow of a video codec under a block-based hybrid coding framework. With the development of technology, some modules or steps of this framework or flow may be optimized. The embodiments of this application are applicable to the basic flow of a video codec under this block-based hybrid coding framework, but are not limited to this framework and flow.

[0051] Furthermore, in this embodiment, the current block (CB) can be the current block, the current prediction unit, or the current transformation unit, etc. Due to the need for parallel processing, an image can be divided into slices, etc. Slices within the same image can be processed in parallel, meaning they have no data dependency. A "frame" is a commonly used term, generally understood as an image. In this embodiment, the term "frame" can also be replaced with an image or a slice, etc.

[0052] In other words, a frame can also be understood as an image, picture, or slice to be encoded. The current frame can also be called the current picture, and the reference frame can be called the reference picture. In another interpretation, if the current picture has only one slice, then the current frame or current picture is also the current slice.

[0053] The following section provides a detailed introduction to several prediction techniques related to this technology.

[0054] 1. Convolutional Cross-Component Model (CCCM)

[0055] Intra-frame prediction includes a convolutional cross-component prediction mode, in which predicted samples are obtained through a set of convolutional filters. The 7-tap convolutional filter typically contains 5 spatial components, a nonlinear term, and a bias term. The predicted value pred for sample (i, j) is... C The generation of (i, j) can be referenced by the following formula: pred C (i, j)=c0C+c1N+c2S+c3E+c4W+c5P+c6B (1)

[0056] Where c0, c1, c2, c3, c4, c5, and c6 are the filter coefficients of the convolution filter, C, N, S, W, and E represent different brightness samples, P represents the nonlinear term, and B represents the bias term.

[0057] As shown in Figure 1, C represents the corresponding brightness sample, i.e., the center brightness sample, and N, S, W, and E represent the samples above, below, to the left, and to the right of the corresponding sample, respectively.

[0058] The nonlinear term P can be expressed as the square of the center brightness sample C, scaled proportionally to the range of sample values ​​for the content, such as P = (C × C + midVal) >> bitDepth.

[0059] The bias term B can be set to the midpoint of the chromaticity value, for example, B = midVal.

[0060] Here, bitDepth represents the bit depth, and the value of midVal is determined based on the bit depth value. For example, when the bit depth is 10, the value of midVal is 512.

[0061] The parameters (filter coefficients) of the convolutional filter are obtained from neighboring reconstructed samples. As shown in Figure 2, the reference region typically includes 6 rows and 6 columns of reconstructed samples surrounding the current block, as well as extended regions to the upper right and lower left. The gray area represents the spatial component extension used in the convolutional filter. The filter coefficients are calculated by minimizing the mean-square error (MSE) between the predicted chroma samples and the reconstructed chroma samples in the reference region. MSE minimization is achieved by calculating the autocorrelation matrix of the luminance input and the cross-correlation vector between the luminance input and the chroma output.

[0062] 2. Inter-component Convolutional Model (Inter CCCM)

[0063] Inter-convolutional cross-component prediction (ICCCM) evolved from intra-convolutional cross-component prediction (ICCCM). When the current coding unit is in inter-prediction or intra-block copy (IBC) mode, InterCCCM can be used to predict chroma samples. The reference samples used to obtain the parameters of the convolutional filters in InterCCCM are different from those in IntraCCCM. InterCCCM uses the motion vector (MV) obtained from the inter-prediction mode of the current coding unit or the block vector (BV) obtained from the intra-block copy mode to generate luminance and chroma prediction blocks through motion compensation. Then, a set of convolutional filters is derived using the luminance and chroma prediction blocks as reference samples. The derived filters are then applied to the reconstructed luminance block and weighted and fused with the chroma prediction block to generate the final chroma prediction block.

[0064] As shown in Figure 3, for the luminance component (Y), the luminance prediction value (predY) is added to the luminance residual value (resY) to obtain the luminance reconstruction value, thus reconstructing the Y component. For the first chrominance component (Cb), the filter coefficients between the Y component and the Cb component can be derived from the luminance prediction value (predY) and the first chrominance prediction value (predCb). Based on the luminance reconstruction value and the filter coefficients between the Y component and the Cb component, the Cb compensation prediction value can be determined. The two are then weighted and fused to obtain the final Cb chrominance prediction value, which is then added to the Cb chrominance residual value (resCb) to reconstruct the Cb component. Similarly, for the second chromaticity component (Cr), the filter coefficients between the Y component and the Cr component can be derived from the luminance prediction value (predY) and the second chromaticity prediction value (predCr). The Cr compensation prediction value can be determined based on the luminance reconstruction value and the filter coefficients between the Y component and the Cr component. The two are then weighted and fused to obtain the final Cr chromaticity prediction value. Finally, it is added to the Cr chromaticity residual value (resCr) to reconstruct the Cr component.

[0065] Here, predY, predCb, and predCr can be understood as the original prediction samples generated by the current coding unit using the corresponding inter-frame prediction mode or intra-frame block copy mode, resY, resCb, and resCr are the residuals, and Y, Cb, and Cr are the reconstructed samples. During the weighted fusion process, the prediction samples generated by the filter use a weighting value of 0.75, while the original chroma prediction samples use a weighting value of 0.25.

[0066] One implementation is an 8-tap filter derived from Inter CCCM, which consists of 6 spatial luminance samples, a nonlinear term, and a bias term. The selection of luminance samples is shown in Figure 4, where C represents the corresponding chrominance sample, and L0, L1, L2, L3, L4, and L5 correspond to the 6 luminance samples closest to C. Taking sampling format 420 as an example, let the coordinate position of C be (x, y), then the coordinate positions of L0, L1, L2, L3, L4, L5 are (2x, 2y), (2x-1, 2y), (2x+1, 2y), (2x, 2y+1), (2x-1, 2y+1), (2x+1, 2y+1). Usually, the predicted value of C, predChromaVal, is calculated from the brightness reconstruction value of the corresponding position according to the following formula: predChromaVal=c0×recL0+c1×recL1+c2×recL2+c3×recL3+c4×recL4+c5×recL5 +c6×nonlinear((recL0+recL3+1)>>1)+c7×B (2)

[0067] Where c0, c1, c2, c3, c4, c5, c6, and c7 are the filter coefficients of the convolution filter, C, N, S, W, and E represent different luminance samples, nonlinear((recL0+recL3+1)) represents the nonlinear term, and B represents the bias term. The bias term B is set to the median value of the chrominance, midVal. The value of midVal is determined according to the bit depth. For example, when the bit depth is 10, the value of midVal is 512.

[0068] The current method used in the weighted fusion process of inter-frame convolutional cross-component prediction is relatively simple. Regardless of the situation, the filtered value and the original prediction value are weighted and fused according to a fixed weight value. However, some samples in the current coding unit may have already generated relatively accurate prediction samples through inter-frame prediction mode or intra-frame block copy mode, which is not suitable for this method of convolutional cross-component prediction.

[0069] This shows that common inter-frame convolutional cross-component prediction techniques are not suitable for predicting all samples, reducing prediction accuracy and affecting encoding and decoding performance.

[0070] Based on this, embodiments of this application provide an encoding / decoding method, encoder, decoder, and storage medium. When the current block uses an inter-frame convolutional cross-component linear model, the reconstructed value and predicted value of the first image component reference sample of the current sample are determined. Based on the reconstructed value and predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined. In other words, in embodiments of this application, for an encoding block using an inter-frame convolutional cross-component linear model, the prediction method for predicting the second image component of the current sample can be determined based on the reconstructed value and predicted value of the first image component reference sample. That is, the prediction process for the second image component of the current sample can be adjusted according to the relationship between the reconstructed value and predicted value of the first image component reference sample, thereby improving prediction accuracy and enhancing encoding / decoding performance.

[0071] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0072] Referring to Figure 5, it shows an example of a system block diagram of an encoder provided in an embodiment of this application. As shown in Figure 5, the encoder 100 may include a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control and analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoded image buffer unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC).For the input raw video signal, a video coding block can be obtained by partitioning it through a Coding Tree Unit (CTU). Then, the residual sample information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 101, including transforming the residual information from the sample domain to the transform domain and quantizing the resulting transform coefficients to further reduce the bit rate. The intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block. The motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide time prediction information. The motion estimation performed by the motion estimation unit 105 is a process of generating motion vectors, which can estimate the motion of the video coding block. Then, the motion compensation unit 104 is used to perform the motion estimation based on the motion vectors determined by the motion estimation unit 105. The motion compensation is performed. After determining the intra-prediction mode, the intra-prediction unit 103 is also used to provide the selected intra-prediction data to the coding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the coding unit 109. In addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block, reconstruct the residual block in the sample domain, and remove the block artifacts by the filter control analysis unit 107 and the filtering unit 108. Then, the reconstructed residual block is added to a predictive block in the frame of the decoding image buffer unit 110 to generate the reconstructed video coding block. The coding unit 109 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-prediction mode and output the bitstream of the video signal. The decoding image buffer unit 110 is used to store the reconstructed video coding block for prediction reference. As video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoding image buffer unit 110.

[0073] Referring to Figure 6, it shows an example of a system block diagram of a decoder provided in an embodiment of this application. As shown in Figure 6, the decoder 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image buffer unit 206, etc. The decoding unit 201 can perform header information decoding and CABAC decoding, and the filtering unit 205 can perform deblocking filtering and SAO filtering. After the input video signal undergoes the encoding processing shown in Figure 14, the bitstream of the video signal is output. This bitstream is input into the decoder 200, first passing through the decoding unit 201 to obtain the decoded transform coefficients. The transform coefficients are then processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the sample domain. The intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from previously decoded blocks in the current frame or image. The motion compensation unit 204 determines the prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and uses... The prediction information is used to generate a predictive block of the video block being decoded; the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 with the corresponding predictive block generated by the intra-prediction unit 203 or the motion compensation unit 204; the decoded video signal is passed through the filtering unit 205 to remove block artifacts, which can improve video quality; then the decoded video block is stored in the decoding image buffer unit 206, which stores reference images for subsequent intra-prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal.

[0074] In the embodiments of this application, a network architecture for a video encoding / decoding system including decoding and encoding methods is provided. The decoder or encoder in these embodiments can be the aforementioned electronic device. That is, the electronic device in these embodiments has video encoding / decoding capabilities and generally includes a video encoder (i.e., encoder) and a video decoder (i.e., decoder).

[0075] It should also be noted that the embodiments of this application can be applied to encoders, decoders, or even both encoders and decoders.

[0076] It should also be noted that when the embodiments of this application are applied to an encoder, "current block" specifically refers to the encoded block to be predicted; when the embodiments of this application are applied to a decoder, "current block" specifically refers to the decoded block to be predicted.

[0077] In one embodiment of this application, FIG7 is a flowchart illustrating a decoding method provided in this application embodiment. As shown in FIG7, the decoding method of the decoder may include:

[0078] Step 101: When using the inter-frame convolutional cross-component linear model in the current block, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample.

[0079] It should be noted that, in the embodiments of this application, the decoding method is applied to the decoder. Specifically, based on the composition structure of the decoder 200, the decoding method in the embodiments of this application can mainly include an inter-frame convolution cross-component prediction method, which can improve encoding and decoding performance.

[0080] In embodiments of this application, the current block can be an image block to be decoded in the current image.

[0081] In the embodiments of this application, it can be determined first whether the current block uses the inter-frame convolution cross-component linear model, that is, it can be determined first whether the current block uses the inter-frame convolution cross-component prediction method for prediction.

[0082] In the embodiments of this application, syntax element identification information used to indicate whether the current block uses the inter-frame convolution cross-component linear model can be determined, thereby further determining whether the current block uses the inter-frame convolution cross-component linear model based on the syntax element identification information.

[0083] In some embodiments, the syntax element identification information used to indicate whether the current block uses the Inter-Convolutional Cross-Component Linear Model (Inter CCCM) can be determined by decoding the bitstream.

[0084] In other words, in this embodiment of the application, some indication information in the form of syntax elements or flags can be written into the bitstream. In this way, by parsing the values ​​of the syntax elements in the bitstream, the relevant decoding information of the current block can be determined, such as whether the current block uses Inter CCCM.

[0085] In some examples, a flag at the TU level, such as tu.interCccm, can be used to indicate whether the current block uses an inter-convolutional cross-component linear model. Specifically, if tu.interCccm is set to the first value, the current block uses Inter CCCM for decoding; if tu.interCccm is set to the second value, the current block does not use Inter CCCM for decoding.

[0086] For example, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to true and the second value can be set to false.

[0087] In some embodiments, syntax element identification information indicating whether the current block uses the inter-frame convolution cross-component linear model can also be directly derived at the decoding end. For example, if the luma block has no residual, it can be determined that the inter-frame convolution cross-component linear model is not used, that is, the derived syntax element identification information indicates that the current block does not use the inter-frame convolution cross-component linear model.

[0088] In embodiments of this application, if it is determined that the current block uses an inter-frame convolutional cross-component linear model, then the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample can be further determined.

[0089] In the embodiments of this application, the current sample can be understood as the sample to be predicted in the current block. Specifically, the current sample can be understood as a sample of the image component to be predicted in the current block.

[0090] In some embodiments, for the current block using an inter-frame convolutional cross-component linear model, the current sample can be understood as the chroma sample to be predicted.

[0091] In embodiments of this application, the first image component can be a luminance component, typically represented by the symbol Y. The second image component can be a chrominance component, which may include a blue chrominance component (typically represented by the symbols Cb or U) or a red chrominance component (typically represented by the symbols Cr or V).

[0092] In some embodiments, the first image component reference sample of the current sample may include the luminance component reference sample corresponding to the current sample.

[0093] For example, in some embodiments, the first image component reference sample of the current sample can be the K nearest reconstructed luminance samples to the current sample. Here, K is an integer greater than 0.

[0094] For example, as shown in Figure 8, C represents the current sample, C is the chromaticity sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, and L11 correspond to the 11 luminance samples closest to C. Taking sampling format 420 as an example, let the coordinate position of C be (x, y), then the coordinate positions of L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11 are (2x, 2y), (2x-1, 2y), (2x+1, 2y), (2x, 2y+1), (2x-1, 2y+1), (2x+1, 2y+1), (2x, 2y-1), (2x-1, 2y-1), (2x+1, 2y-1), (2x-2, 2y-1), (2x-2, 2y), (2x-2, 2y+1).

[0095] In the embodiments of this application, the reconstructed value and the predicted value of the first image component reference sample can be obtained, and then the predicted value of the second image component of the current sample can be further determined based on the reconstructed value and the predicted value of the first image component reference sample.

[0096] In some embodiments, the reconstructed value of the first image component reference sample can be the luminance component reference sample of the current sample, that is, the final luminance reconstruction result after reconstruction is completed.

[0097] In some embodiments, the predicted value of the first image component reference sample can be the predicted brightness value of the brightness component reference sample of the current sample. This predicted brightness value can be the initial predicted brightness value of the brightness component of the brightness component reference sample obtained through inter-frame prediction or intra-frame block copying.

[0098] Step 102: Based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample, determine the predicted value of the second image component of the current sample.

[0099] In embodiments of this application, if the current block uses an inter-frame convolutional cross-component linear model, then after determining the reconstructed value and the predicted value of the first image component reference sample of the current sample, it is possible to select whether the current sample uses an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample.

[0100] It is understood that, in the embodiments of this application, during the prediction of the second image component of the current sample, it can be first determined whether the current sample meets the conditions for using the inter-frame convolution cross-component linear model. Specifically, the determination of whether the current sample meets the conditions for using the inter-frame convolution cross-component linear model can be based on the reconstructed value and the predicted value of the first image component reference sample.

[0101] In the embodiments of this application, determining whether the current sample meets the conditions for using the inter-frame convolution cross-component linear model can be understood as determining whether the predicted value of the second image component of the current sample is determined by fusing the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample.

[0102] In other words, in the embodiments of this application, the predicted value of the second image component of the current sample can be determined by fusing the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample.

[0103] In the embodiments of this application, the first predicted value of the second image component of the current sample can be understood as the initial predicted value of the chromaticity component of the current sample obtained by inter-frame prediction or intra-frame block copying.

[0104] In the embodiments of this application, the second predicted value of the second image component of the current sample can be understood as the compensated predicted value of the chromaticity component of the current sample obtained by the inter-frame convolution cross-component linear model.

[0105] In the embodiments of this application, the predicted value of the second image component of the current sample can be understood as the predicted value of the chromaticity component of the current sample.

[0106] In the embodiments of this application, when determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample, if it is determined that the current sample does not use the inter-frame convolution cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample can be determined based on the first predicted value of the second image component of the current sample.

[0107] In some embodiments, it can be determined whether the current sample uses an inter-frame convolution cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample. If it is determined that the current sample does not use an inter-frame convolution cross-component linear model, then it is considered that the chroma prediction value of the current sample can be obtained directly through inter-frame prediction, and / or the chroma prediction value of the current sample can be obtained directly through intra-frame block copying. Therefore, it is possible to select the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample.

[0108] In the embodiments of this application, when determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample, if the current sample is determined to use an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined based on the first predicted value and the second predicted value of the second image component of the current sample.

[0109] In some embodiments, it can be determined whether the current sample uses an inter-frame convolution cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample. If it is determined that the current sample uses an inter-frame convolution cross-component linear model, then it can be further selected to fuse the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample to finally determine the predicted value of the second image component of the current sample.

[0110] In the embodiments of this application, when determining whether the current sample uses the inter-frame convolution cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, if the reconstructed value and the predicted value of the first sample are the same, it is determined that the current sample does not use the inter-frame convolution cross-component linear model; if the reconstructed value and the predicted value of the first image component reference sample are different, it is determined that the current sample uses the inter-frame convolution cross-component linear model.

[0111] In the embodiments of this application, the first sample may be at least one sample in the first image component reference sample, and the number of the first sample is not specifically limited in this application.

[0112] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, and L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0 is the first sample.

[0113] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, and L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0 and L3 are the first samples.

[0114] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0, L1, L2, L3, L4, L5 are the first samples.

[0115] For example, in some embodiments, determining the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample may include determining the predicted value of the first sample and the reconstructed value of the first sample, as well as the reconstructed values ​​of other first image component reference samples besides the first sample.

[0116] In the embodiments of this application, after determining the reconstructed value and the predicted value of the first sample, the reconstructed value and the predicted value of the first sample can be compared. If the reconstructed value and the predicted value of the first sample are the same, then the prediction result of the first sample can be considered to be relatively accurate. Furthermore, the prediction result of the current sample can also be considered to be relatively accurate. Therefore, it is not necessary to use the compensation prediction value obtained by the inter-frame convolution cross-component linear model for further fusion processing, so that it can be determined that the current sample does not use the inter-frame convolution cross-component linear model.

[0117] In the embodiments of this application, after determining the reconstructed value and the predicted value of the first sample, the reconstructed value and the predicted value of the first sample can be compared. If the reconstructed value and the predicted value of the first sample are different, it can be considered that the accuracy of the prediction result of the first sample is not ideal, and thus it can be considered that the prediction result of the current sample is also inaccurate. Therefore, the compensated prediction value obtained by the inter-frame convolution cross-component linear model can be used for further fusion processing to determine that the current sample uses the inter-frame convolution cross-component linear model.

[0118] In embodiments of this application, if the reconstructed value and the predicted value of each sample in at least one first sample are the same, it is determined that the reconstructed value and the predicted value of the first sample are the same; if the reconstructed value and the predicted value of any one of the at least one first sample are different, it is determined that the reconstructed value and the predicted value of the first sample are different.

[0119] In other words, in the embodiments of this application, when comparing the reconstructed value and the predicted value of the first sample, if the reconstructed value and the predicted value of each first sample are the same, then the reconstructed value and the predicted value of the first sample can be considered to be the same; correspondingly, if there is any first sample whose predicted value and the reconstructed value are different, then the reconstructed value and the predicted value of the first sample can be considered to be different.

[0120] In some embodiments, another possible implementation is to determine a first number of first samples whose predicted values ​​are the same as their reconstructed values, and a second number of first samples whose predicted values ​​are different from their reconstructed values. If the first number is less than the second number, that is, more samples in the first sample have predicted values ​​that are different from their reconstructed values, then the reconstructed value of the first sample and the predicted value of the first sample can be considered different. If the first number is greater than the second number, that is, more samples in the first sample have predicted values ​​that are the same as their reconstructed values, then the reconstructed value of the first sample and the predicted value of the first sample can be considered the same. If the first number is equal to the second number, that is, the number of samples in the first sample whose predicted values ​​are the same as their reconstructed values ​​and the number of samples whose predicted values ​​are different from their reconstructed values ​​are the same, then the reconstructed value of the first sample and the predicted value of the first sample can be considered the same, or the reconstructed value of the first sample and the predicted value of the first sample can be considered different.

[0121] In embodiments of this application, a first mean is determined based on the reconstructed value of at least one first sample; a second mean is determined based on the predicted value of at least one first sample; if the first mean and the second mean are the same, the reconstructed value of the first sample and the predicted value of the first sample are determined to be the same; if the first mean and the second mean are different, the reconstructed value of the first sample and the predicted value of the first sample are determined to be different.

[0122] In other words, in the embodiments of this application, when comparing the reconstructed value of the first sample with the predicted value of the first sample, the mean of the reconstructed value of at least one first sample can be calculated to determine the corresponding first mean; at the same time, the mean of the predicted value of at least one first sample can be calculated to determine the corresponding second mean. If the first mean and the second mean are the same, then the reconstructed value of the first sample and the predicted value of the first sample can be considered the same; correspondingly, if the first mean and the second mean are different, then the reconstructed value of the first sample and the predicted value of the first sample can be considered different.

[0123] For example, in some embodiments, assuming C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, and L11 are the luminance component reference samples (first image component reference samples) of the current sample, where L0 and L3 are the first samples. Here, recL0 represents the reconstructed value of L0, recL3 represents the reconstructed value of L3, predOriL0 represents the predicted value of L0, and predOriL3 represents the predicted value of L3. Then, it can be determined whether (recL0 + recL3 + 1) >> 1 == (predOriL0 + predOriL3 + 1) >> 1 holds true. If it holds true, it can be determined that the reconstructed value of the first sample and the predicted value of the first sample are the same; if it does not hold true, it can be determined that the reconstructed value of the first sample and the predicted value of the first sample are different.

[0124] In embodiments of this application, for at least one first sample in the first image component reference samples, the difference between the reconstructed value of the first sample and the predicted value of the first sample can be determined; if the difference is less than or equal to a first threshold, it is determined that the current sample does not use the inter-frame convolution cross-component linear model; if the difference is greater than the first threshold, it is determined that the current sample uses the inter-frame convolution cross-component linear model.

[0125] In other words, in the embodiments of this application, when comparing the reconstructed value of the first sample and the predicted value of the first sample, a difference operation can be performed on the reconstructed value and the predicted value of at least one first sample to obtain the difference result, and then the difference result can be compared with the first threshold to further determine whether the current sample uses the inter-frame convolution cross-component linear model.

[0126] In some embodiments, when determining the difference between the reconstructed value and the predicted value of at least one first sample, the difference between the reconstructed value and the predicted value of each first sample can be calculated to obtain the difference (or absolute value of the difference) of each first sample. Then, the differences (or absolute values ​​of the differences) of all at least one first sample are summed to finally obtain the difference between the reconstructed value and the predicted value of at least one first sample.

[0127] In some embodiments, when determining the difference between the reconstructed value and the predicted value of at least one first sample, the mean of the reconstructed value of at least one first sample can be calculated to determine the corresponding first mean; at the same time, the mean of the predicted value of at least one first sample can be calculated to determine the corresponding second mean, and then the difference is calculated based on the first mean and the second mean to finally obtain the difference between the reconstructed value and the predicted value of at least one first sample.

[0128] In other words, in the embodiments of this application, the specific calculation method for the difference between the reconstructed value and the predicted value of at least one first sample is not limited.

[0129] In embodiments of this application, a first threshold can be preset. The determination of the first threshold depends on the specific calculation method of the difference between the reconstructed value and the predicted value of at least one first sample. That is, the corresponding first threshold can be different when different methods are used to calculate the difference. This application does not specifically limit the specific value of the first threshold.

[0130] In the embodiments of this application, the difference between the reconstructed value and the predicted value of at least one first sample can be used to determine the accuracy of the prediction result of the first sample, or in other words, the difference between the reconstructed value and the predicted value of at least one first sample can be used to determine the accuracy of the prediction result of the current sample. Specifically, if the difference is less than or equal to a first threshold, the prediction result of the first sample is considered relatively accurate, and consequently, the prediction result of the current sample is also considered relatively accurate. Therefore, the compensated prediction value obtained through the inter-frame convolution cross-component linear model can be omitted for further fusion processing, thus determining that the current sample does not use the inter-frame convolution cross-component linear model. If the difference is greater than the first threshold, the accuracy of the prediction result of the first sample is considered unsatisfactory, and consequently, the prediction result of the current sample is also considered inaccurate. Therefore, the compensated prediction value obtained through the inter-frame convolution cross-component linear model can be used for further fusion processing, thus determining that the current sample uses the inter-frame convolution cross-component linear model.

[0131] In embodiments of this application, for at least one first sample in the first image component reference samples, the ratio between the reconstructed value of the first sample and the predicted value of the first sample can be determined; if the ratio is less than or equal to a second threshold, it is determined that the current sample does not use the inter-frame convolution cross-component linear model; if the ratio is greater than the second threshold, it is determined that the current sample uses the inter-frame convolution cross-component linear model.

[0132] In other words, in the embodiments of this application, when comparing the reconstructed value of the first sample and the predicted value of the first sample, a ratio calculation can be performed on the reconstructed value and the predicted value of at least one first sample to obtain the ratio result, and then the current sample is further determined to use the inter-frame convolution cross-component linear model by comparing the ratio result with the second threshold.

[0133] In some embodiments, when determining the ratio between the reconstructed value and the predicted value of at least one first sample, the ratio of the reconstructed value to the predicted value of each first sample can be calculated to obtain the ratio of each first sample. Then, the ratios (or absolute values ​​of the ratios) of all at least one first sample are summed to finally obtain the ratio between the reconstructed value and the predicted value of at least one first sample.

[0134] In some embodiments, when determining the ratio between the reconstructed value and the predicted value of at least one first sample, the mean of the reconstructed value of at least one first sample can be calculated to determine the corresponding first mean; at the same time, the mean of the predicted value of at least one first sample can be calculated to determine the corresponding second mean, and then the ratio is calculated based on the first mean and the second mean to finally obtain the ratio between the reconstructed value and the predicted value of at least one first sample.

[0135] In other words, in the embodiments of this application, the specific calculation method for the ratio between the reconstructed value and the predicted value of at least one first sample is not limited.

[0136] In embodiments of this application, a second threshold can be preset. The determination of the second threshold depends on the specific calculation method of the ratio between the reconstructed value and the predicted value of at least one first sample. That is, the corresponding second threshold can be different when different methods are used to calculate the ratio. This application does not specifically limit the specific value of the second threshold.

[0137] In the embodiments of this application, the ratio between the reconstructed value and the predicted value of at least one first sample can be used to determine the accuracy of the prediction result of the first sample, or in other words, the ratio between the reconstructed value and the predicted value of at least one first sample can be used to determine the accuracy of the prediction result of the current sample. Specifically, if the ratio is less than or equal to a second threshold, the prediction result of the first sample is considered relatively accurate, and consequently, the prediction result of the current sample is also considered relatively accurate. Therefore, the compensated prediction value obtained through the inter-frame convolution cross-component linear model can be omitted for further fusion processing, thus determining that the current sample does not use the inter-frame convolution cross-component linear model. If the ratio is greater than the second threshold, the accuracy of the prediction result of the first sample is considered unsatisfactory, and consequently, the prediction result of the current sample is also considered inaccurate. Therefore, the compensated prediction value obtained through the inter-frame convolution cross-component linear model can be used for further fusion processing, thus determining that the current sample uses the inter-frame convolution cross-component linear model.

[0138] In the embodiments of this application, if it is determined that the current sample does not use the inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, then the predicted value of the second image component of the current sample can be further determined based on the first predicted value of the second image component of the current sample.

[0139] In other words, in the embodiments of this application, if the prediction result of the current sample is relatively accurate based on the reconstructed value and the predicted value of the first image component reference sample, then the prediction value of the second image component of the current sample can be determined directly based on the initial predicted value of the second image component of the current sample.

[0140] In some embodiments, when determining the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample, the first predicted value of the second image component of the current sample can be directly determined as the predicted value of the second image component of the current sample. For example, the initial predicted value of the chroma component of the current sample obtained by inter-frame prediction or intra-frame block copying can be directly determined as the predicted value of the chroma component of the current sample.

[0141] In the embodiments of this application, if it is determined that the current sample uses an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, then the predicted value of the second image component of the current sample can be determined by combining the first predicted value of the second image component and the second predicted value of the second image component.

[0142] In other words, in the embodiments of this application, if the prediction result of the current sample derived from the reconstructed value and the predicted value of the first image component reference sample is inaccurate, then an inter-frame convolutional cross-component linear model can be selected, that is, the first predicted value of the second image component and the second predicted value of the second image component of the current sample are selected to be fused to determine the predicted value of the second image component of the current sample.

[0143] For example, in some embodiments, when obtaining the first predicted value of the second image component of the current sample, a reference sample of the current sample may be determined in a reference image of the current image based on the motion vector of the current block; then, the first predicted value of the second image component of the current sample is determined based on the reconstructed value of the second image component of the reference sample of the current sample.

[0144] For example, in some embodiments, when obtaining the first predicted value of the second image component of the current sample, it is also possible to select a reference sample of the current sample in the current image based on the block vector of the current block; and then determine the first predicted value of the second image component of the current sample based on the reconstructed value of the second image component of the reference sample of the current sample.

[0145] For example, in some embodiments, when obtaining the second predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample can be determined based on the filter coefficients of the current block and the reconstructed value of the second sample.

[0146] In the embodiments of this application, the filter coefficients of the current block are the filter coefficients of the convolution filter used when the current block performs prediction using the inter-frame convolution cross-component linear model.

[0147] In the embodiments of this application, the second sample can be at least one sample from the first image component reference samples, and the number of second samples is not specifically limited in this application. The number of filter coefficients, the number of taps in the convolution filter, and the number of second samples are the same.

[0148] In some embodiments, the first sample and the second sample may be the same or different, and this application does not impose specific limitations.

[0149] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0 is the first sample, and L0, L1, L2, L3, L4, L5 are the second samples.

[0150] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0, L1, L2, L3, L4, L5 are the first samples, and L0, L1, L2, L3, L4, L5 are the second samples.

[0151] For example, in some embodiments, determining the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample may include determining the predicted value of the first sample, the reconstructed value of the first sample, and the reconstructed value of the second sample.

[0152] In some embodiments, when determining the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample, the predicted value of the second image component of the current sample can be determined based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the first weight corresponding to the first predicted value, and the second weight corresponding to the second predicted value.

[0153] In the embodiments of this application, the relationship between the first weight and the second weight is not specifically limited. The first weight may be greater than the second weight, or the first weight may be equal to the second weight, or the first weight may be less than the second weight.

[0154] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C(x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C Given (x, y), with first weight P1 and second weight P2, the predicted value of the second image component of the current sample can be determined using the following formula, i.e., the predicted value of the chromaticity component of the current sample (x, y) is predOut. C (x, y): predOut C (x, y) = P2 × predCCCM C (x, y) + P1×predOri C (x, y) (3)

[0155] In some embodiments, the sum of the first weight and the second weight can be 1.

[0156] In some embodiments, the second weight can be three times the first weight, that is, in the process of fusing the first predicted value of the second image component and the second predicted value of the second image component of the current sample, the first weight used for the first predicted value is one-third of the second weight used for the second predicted value.

[0157] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C For (x, y), with a first weight of 0.25 and a second weight of 0.75, the predicted value of the second image component of the current sample can be determined using the following formula, which is to determine the predicted value of the chromaticity component of the current sample (x, y), predOut. C (x, y): predOut C (x, y) = (3 × predCCCM) C (x, y) + predOri C (x, y) + 2) >> 2 (4)

[0158] In embodiments of this application, if the current block uses an inter-frame convolutional cross-component linear model, then after determining the reconstructed value and the predicted value of the first image component reference sample of the current sample, it is also possible to further determine how the weights of the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample are adjusted and allocated in the fusion process based on the reconstructed value and the predicted value of the first image component reference sample.

[0159] In other words, in the embodiments of this application, the weights corresponding to the first predicted value of the second image component of the current sample and the weights corresponding to the second predicted value of the second image component of the current sample can be adjusted based on the reconstructed value and the predicted value of the first image component reference sample.

[0160] In the embodiments of this application, when determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample, if the reconstructed value and the predicted value of the first image component reference sample satisfy a preset condition, a third weight corresponding to the first predicted value of the second image component of the current sample and a fourth weight corresponding to the second predicted value of the second image component of the current sample are determined; then, based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the third weight, and the fourth weight, the predicted value of the second image component of the current sample is determined.

[0161] In the embodiments of this application, the relationship between the third weight and the fourth weight is not specifically limited. The third weight may be greater than the fourth weight, or the third weight may be equal to the fourth weight, or the third weight may be less than the fourth weight.

[0162] In embodiments of this application, the preset conditions may include one or more of the following: the reconstructed value of the first sample is the same as the predicted value of the first sample; the difference between the reconstructed value of the first sample and the predicted value of the first sample is less than or equal to a first threshold; the ratio between the reconstructed value of the first sample and the predicted value of the first sample is less than or equal to a second threshold.

[0163] In the embodiments of this application, the first sample may be at least one sample in the first image component reference sample, and the number of the first sample is not specifically limited in this application.

[0164] In the embodiments of this application, preset conditions can be used to determine the accuracy of the prediction result of the first sample, or in other words, preset conditions can be used to determine the accuracy of the prediction result of the current sample.

[0165] For example, in some embodiments, if the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample meet preset conditions, it can be considered that the prediction result of the first sample is relatively accurate, and thus it can be considered that the prediction result of the current sample is also relatively accurate. Therefore, it is possible to increase the weight ratio of the initial prediction value and decrease the weight ratio of the compensation prediction value, that is, the third weight corresponding to the first predicted value of the second image component of the current sample is greater than or equal to the fourth weight corresponding to the second predicted value of the second image component of the current sample.

[0166] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C Given (x, y), with the third weight P3 and the fourth weight P4, the predicted value of the second image component of the current sample can be determined using the following formula, i.e., the predicted value of the chromaticity component of the current sample (x, y) is predOut. C (x, y): predOut C (x, y) = P4 × predCCCM C (x, y) + P3×predOri C (x, y) (5)

[0167] In some embodiments, the sum of the third weight and the fourth weight can be 1.

[0168] In some embodiments, the third weight can be three times the fourth weight, that is, in the process of fusing the first predicted value of the second image component and the second predicted value of the second image component of the current sample, the three weights used for the first predicted value are three times the fourth weights used for the second predicted value.

[0169] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C For (x, y), with a third weight of 0.75 and a fourth weight of 0.25, the predicted value of the second image component of the current sample can be determined using the following formula, which is to determine the predicted value of the chromaticity component of the current sample (x, y), predOut.C (x, y): predOut C (x, y) = (predCCCM) C (x, y) + 3 × predOri C (x, y) + 2) >> 2 (6)

[0170] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C For (x, y), with the third weight set to 1 and the fourth weight set to 0, the predicted value of the second image component of the current sample can be determined using the following formula, which is to determine the predicted value of the chromaticity component of the current sample (x, y) as predOut. C (x, y): predOut C (x, y) = predOri C (x, y) (7)

[0171] In the embodiments of this application, when determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample, if the reconstructed value and the predicted value of the first image component reference sample do not meet the preset conditions, the predicted value of the second image component of the current sample can be determined based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the first weight corresponding to the first predicted value, and the second weight corresponding to the second predicted value; wherein, the second weight is 3 times the first weight.

[0172] For example, in some embodiments, if the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample do not meet the preset conditions, it can be considered that the accuracy of the prediction result of the first sample is not ideal, and thus it can be considered that the prediction result of the current sample is also inaccurate. Therefore, it is possible to reduce the weight ratio of the initial prediction value and increase the weight ratio of the compensation prediction value. For example, the first weight corresponding to the first predicted value of the second image component of the current sample is one-third of the second weight corresponding to the second predicted value of the second image component of the current sample.

[0173] In the embodiments of this application, the first weight corresponding to the first predicted value and the second weight corresponding to the second predicted value determined when the preset conditions are not met, and the third weight corresponding to the first predicted value and the fourth weight corresponding to the second predicted value determined when the preset conditions are met, may not be exactly the same. For example, the first weight and the third weight may be different, and / or the second weight and the fourth weight may be different.

[0174] Therefore, the decoding method proposed in this application can adjust the prediction process of the inter-frame convolutional cross-component prediction mode. One implementation is to determine whether the current sample uses the inter-frame convolutional cross-component prediction model (whether the inter-frame convolutional cross-component prediction mode) based on the predicted and reconstructed values ​​of the luminance sample (luminance component reference sample) corresponding to the current sample. Another implementation is to adjust the weight values ​​in the fusion process of the current sample using the inter-frame convolutional cross-component prediction model (whether the inter-frame convolutional cross-component prediction mode) based on the predicted and reconstructed values ​​of the luminance sample (luminance component reference sample) corresponding to the current sample.

[0175] In summary, the decoding method proposed in this application includes an improved scheme for inter-frame convolutional cross-component prediction technology, which can be applied in inter-frame cross-component prediction derivation mode. During the prediction process, this scheme determines whether the predicted value generated at the current position in the original inter-frame prediction mode or intra-frame block copy mode is sufficiently accurate based on the relationship between the original predicted value and the reconstructed value of the luminance at the corresponding position of the chroma sample to be predicted. For example, when the original predicted value and the reconstructed value of luminance are equal, it can be determined that the original prediction scheme can already obtain a relatively accurate predicted value, and there is no need to further correct the predicted value through cross-component methods, so as not to affect the accuracy of the original prediction method, thereby improving prediction accuracy and enhancing coding performance.

[0176] For example, the decoding method proposed in the embodiments of this application was tested and verified, and the test results are shown in Table 1 and Table 2.

[0177] Table 1

[0178] Table 2

[0179] This application provides a decoding method that, when the current block uses an inter-frame convolutional cross-component linear model, determines the reconstructed value and the predicted value of the first image component reference sample of the current sample; based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined. In other words, in the embodiments of this application, for a coding block using an inter-frame convolutional cross-component linear model, the prediction method for predicting the second image component of the current sample can be determined according to the reconstructed value and the predicted value of the first image component reference sample. That is, the prediction process for the second image component of the current sample can be adjusted according to the relationship between the reconstructed value and the predicted value of the first image component reference sample, thereby improving the prediction accuracy and enhancing encoding / decoding performance.

[0180] In one embodiment of this application, FIG9 is a flowchart illustrating an encoding method provided in this application embodiment. As shown in FIG9, the encoding method of the encoder may include:

[0181] Step 201: When using the inter-frame convolutional cross-component linear model in the current block, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample.

[0182] It should be noted that, in the embodiments of this application, the encoding method is applied to an encoder. Specifically, based on the composition structure of the encoder 100, the encoding method in the embodiments of this application can mainly include an inter-frame convolution cross-component prediction method, which can improve encoding and decoding performance.

[0183] In embodiments of this application, the current block can be an image block to be encoded in the current image.

[0184] In the embodiments of this application, it can be determined first whether the current block uses the inter-frame convolution cross-component linear model, that is, it can be determined first whether the current block uses the inter-frame convolution cross-component prediction method for prediction.

[0185] In the embodiments of this application, syntax element identification information used to indicate whether the current block uses the inter-frame convolution cross-component linear model can be determined, thereby further determining whether the current block uses the inter-frame convolution cross-component linear model based on the syntax element identification information.

[0186] In some embodiments, syntax element identification information indicating whether the current block uses the Inter-Convolutional Cross-Component Linear Model (Inter CCCM) can be transmitted in the bitstream.

[0187] In other words, in this embodiment of the application, some instruction information in the form of syntax elements or flags can be written into the code stream. In this way, by using the values ​​of the syntax elements in the code stream, the relevant information of the current block can be determined, such as whether the current block uses Inter CCCM.

[0188] In some examples, a flag at the TU level, such as tu.interCccm, can be used to indicate whether the current block uses an inter-convolutional cross-component linear model. Specifically, if tu.interCccm is set to the first value, the current block is encoded using Inter CCCM; if tu.interCccm is set to the second value, the current block is not encoded using Inter CCCM.

[0189] For example, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to true and the second value can be set to false.

[0190] In some embodiments, syntax element identification information indicating whether the current block uses the inter-frame convolution cross-component linear model can be directly derived at the encoding end. For example, if the luma block has no residual, it can be determined that the inter-frame convolution cross-component linear model is not used; that is, the derived syntax element identification information indicates that the current block does not use the inter-frame convolution cross-component linear model.

[0191] In embodiments of this application, if it is determined that the current block uses an inter-frame convolutional cross-component linear model, then the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample can be further determined.

[0192] In the embodiments of this application, the current sample can be understood as the sample to be predicted in the current block. Specifically, the current sample can be understood as a sample of the image component to be predicted in the current block.

[0193] In some embodiments, for the current block using an inter-frame convolutional cross-component linear model, the current sample can be understood as the chroma sample to be predicted.

[0194] In embodiments of this application, the first image component can be a luminance component, typically represented by the symbol Y. The second image component can be a chrominance component, which may include a blue chrominance component (typically represented by the symbols Cb or U) or a red chrominance component (typically represented by the symbols Cr or V).

[0195] In some embodiments, the first image component reference sample of the current sample may include the luminance component reference sample corresponding to the current sample.

[0196] For example, in some embodiments, the first image component reference sample of the current sample can be the K nearest reconstructed luminance samples to the current sample. Here, K is an integer greater than 0.

[0197] For example, as shown in Figure 8, C represents the current sample, C is the chromaticity sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, and L11 correspond to the 11 luminance samples closest to C. Taking sampling format 420 as an example, let the coordinate position of C be (x, y), then the coordinate positions of L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11 are (2x, 2y), (2x-1, 2y), (2x+1, 2y), (2x, 2y+1), (2x-1, 2y+1), (2x+1, 2y+1), (2x, 2y-1), (2x-1, 2y-1), (2x+1, 2y-1), (2x-2, 2y-1), (2x-2, 2y), (2x-2, 2y+1).

[0198] In the embodiments of this application, the reconstructed value and the predicted value of the first image component reference sample can be obtained, and then the predicted value of the second image component of the current sample can be further determined based on the reconstructed value and the predicted value of the first image component reference sample.

[0199] In some embodiments, the reconstructed value of the first image component reference sample can be the luminance component reference sample of the current sample, that is, the final luminance reconstruction result after reconstruction is completed.

[0200] In some embodiments, the predicted value of the first image component reference sample can be the predicted brightness value of the brightness component reference sample of the current sample. This predicted brightness value can be the initial predicted brightness value of the brightness component of the brightness component reference sample obtained through inter-frame prediction or intra-frame block copying.

[0201] Step 202: Based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample, determine the predicted value of the second image component of the current sample.

[0202] In embodiments of this application, if the current block uses an inter-frame convolutional cross-component linear model, then after determining the reconstructed value and the predicted value of the first image component reference sample of the current sample, it is possible to select whether the current sample uses an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample.

[0203] It is understood that, in the embodiments of this application, during the prediction of the second image component of the current sample, it can be first determined whether the current sample meets the conditions for using the inter-frame convolution cross-component linear model. Specifically, the determination of whether the current sample meets the conditions for using the inter-frame convolution cross-component linear model can be based on the reconstructed value and the predicted value of the first image component reference sample.

[0204] In the embodiments of this application, determining whether the current sample meets the conditions for using the inter-frame convolution cross-component linear model can be understood as determining whether the predicted value of the second image component of the current sample is determined by fusing the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample.

[0205] In other words, in the embodiments of this application, the predicted value of the second image component of the current sample can be determined by fusing the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample.

[0206] In the embodiments of this application, the first predicted value of the second image component of the current sample can be understood as the initial predicted value of the chromaticity component of the current sample obtained by inter-frame prediction or intra-frame block copying.

[0207] In the embodiments of this application, the second predicted value of the second image component of the current sample can be understood as the compensated predicted value of the chromaticity component of the current sample obtained by the inter-frame convolution cross-component linear model.

[0208] In the embodiments of this application, the predicted value of the second image component of the current sample can be understood as the predicted value of the chromaticity component of the current sample.

[0209] In the embodiments of this application, when determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample, if it is determined that the current sample does not use the inter-frame convolution cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample can be determined based on the first predicted value of the second image component of the current sample.

[0210] In some embodiments, it can be determined whether the current sample uses an inter-frame convolution cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample. If it is determined that the current sample does not use an inter-frame convolution cross-component linear model, then it is considered that the chroma prediction value of the current sample can be obtained directly through inter-frame prediction, and / or the chroma prediction value of the current sample can be obtained directly through intra-frame block copying. Therefore, it is possible to select the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample.

[0211] In the embodiments of this application, when determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample, if the current sample is determined to use an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined based on the first predicted value and the second predicted value of the second image component of the current sample.

[0212] In some embodiments, it can be determined whether the current sample uses an inter-frame convolution cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample. If it is determined that the current sample uses an inter-frame convolution cross-component linear model, then it can be further selected to fuse the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample to finally determine the predicted value of the second image component of the current sample.

[0213] In the embodiments of this application, when determining whether the current sample uses the inter-frame convolution cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, if the reconstructed value and the predicted value of the first sample are the same, it is determined that the current sample does not use the inter-frame convolution cross-component linear model; if the reconstructed value and the predicted value of the first image component reference sample are different, it is determined that the current sample uses the inter-frame convolution cross-component linear model.

[0214] In the embodiments of this application, the first sample may be at least one sample in the first image component reference sample, and the number of the first sample is not specifically limited in this application.

[0215] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, and L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0 is the first sample.

[0216] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, and L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0 and L3 are the first samples.

[0217] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0, L1, L2, L3, L4, L5 are the first samples.

[0218] For example, in some embodiments, determining the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample may include determining the predicted value of the first sample and the reconstructed value of the first sample, as well as the reconstructed values ​​of other first image component reference samples besides the first sample.

[0219] In the embodiments of this application, after determining the reconstructed value and the predicted value of the first sample, the reconstructed value and the predicted value of the first sample can be compared. If the reconstructed value and the predicted value of the first sample are the same, then the prediction result of the first sample can be considered to be relatively accurate. Furthermore, the prediction result of the current sample can also be considered to be relatively accurate. Therefore, it is not necessary to use the compensation prediction value obtained by the inter-frame convolution cross-component linear model for further fusion processing, so that it can be determined that the current sample does not use the inter-frame convolution cross-component linear model.

[0220] In the embodiments of this application, after determining the reconstructed value and the predicted value of the first sample, the reconstructed value and the predicted value of the first sample can be compared. If the reconstructed value and the predicted value of the first sample are different, it can be considered that the accuracy of the prediction result of the first sample is not ideal, and thus it can be considered that the prediction result of the current sample is also inaccurate. Therefore, the compensated prediction value obtained by the inter-frame convolution cross-component linear model can be used for further fusion processing to determine that the current sample uses the inter-frame convolution cross-component linear model.

[0221] In embodiments of this application, if the reconstructed value and the predicted value of each sample in at least one first sample are the same, it is determined that the reconstructed value and the predicted value of the first sample are the same; if the reconstructed value and the predicted value of any one of the at least one first sample are different, it is determined that the reconstructed value and the predicted value of the first sample are different.

[0222] In other words, in the embodiments of this application, when comparing the reconstructed value and the predicted value of the first sample, if the reconstructed value and the predicted value of each first sample are the same, then the reconstructed value and the predicted value of the first sample can be considered to be the same; correspondingly, if there is any first sample whose predicted value and the reconstructed value are different, then the reconstructed value and the predicted value of the first sample can be considered to be different.

[0223] In some embodiments, another possible implementation is to determine a first number of first samples whose predicted values ​​are the same as their reconstructed values, and a second number of first samples whose predicted values ​​are different from their reconstructed values. If the first number is less than the second number, that is, more samples in the first sample have predicted values ​​that are different from their reconstructed values, then the reconstructed value of the first sample and the predicted value of the first sample can be considered different. If the first number is greater than the second number, that is, more samples in the first sample have predicted values ​​that are the same as their reconstructed values, then the reconstructed value of the first sample and the predicted value of the first sample can be considered the same. If the first number is equal to the second number, that is, the number of samples in the first sample whose predicted values ​​are the same as their reconstructed values ​​and the number of samples whose predicted values ​​are different from their reconstructed values ​​are the same, then the reconstructed value of the first sample and the predicted value of the first sample can be considered the same, or the reconstructed value of the first sample and the predicted value of the first sample can be considered different.

[0224] In embodiments of this application, a first mean is determined based on the reconstructed value of at least one first sample; a second mean is determined based on the predicted value of at least one first sample; if the first mean and the second mean are the same, the reconstructed value of the first sample and the predicted value of the first sample are determined to be the same; if the first mean and the second mean are different, the reconstructed value of the first sample and the predicted value of the first sample are determined to be different.

[0225] In other words, in the embodiments of this application, when comparing the reconstructed value of the first sample with the predicted value of the first sample, the mean of the reconstructed value of at least one first sample can be calculated to determine the corresponding first mean; at the same time, the mean of the predicted value of at least one first sample can be calculated to determine the corresponding second mean. If the first mean and the second mean are the same, then the reconstructed value of the first sample and the predicted value of the first sample can be considered the same; correspondingly, if the first mean and the second mean are different, then the reconstructed value of the first sample and the predicted value of the first sample can be considered different.

[0226] For example, in some embodiments, assuming C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, and L11 are the luminance component reference samples (first image component reference samples) of the current sample, where L0 and L3 are the first samples. Here, recL0 represents the reconstructed value of L0, recL3 represents the reconstructed value of L3, predOriL0 represents the predicted value of L0, and predOriL3 represents the predicted value of L3. Then, it can be determined whether (recL0 + recL3 + 1) >> 1 == (predOriL0 + predOriL3 + 1) >> 1 holds true. If it holds true, it can be determined that the reconstructed value of the first sample and the predicted value of the first sample are the same; if it does not hold true, it can be determined that the reconstructed value of the first sample and the predicted value of the first sample are different.

[0227] In embodiments of this application, for at least one first sample in the first image component reference samples, the difference between the reconstructed value of the first sample and the predicted value of the first sample can be determined; if the difference is less than or equal to a first threshold, it is determined that the current sample does not use the inter-frame convolution cross-component linear model; if the difference is greater than the first threshold, it is determined that the current sample uses the inter-frame convolution cross-component linear model.

[0228] In other words, in the embodiments of this application, when comparing the reconstructed value of the first sample and the predicted value of the first sample, a difference operation can be performed on the reconstructed value and the predicted value of at least one first sample to obtain the difference result, and then the difference result can be compared with the first threshold to further determine whether the current sample uses the inter-frame convolution cross-component linear model.

[0229] In some embodiments, when determining the difference between the reconstructed value and the predicted value of at least one first sample, the difference between the reconstructed value and the predicted value of each first sample can be calculated to obtain the difference (or absolute value of the difference) of each first sample. Then, the differences (or absolute values ​​of the differences) of all at least one first sample are summed to finally obtain the difference between the reconstructed value and the predicted value of at least one first sample.

[0230] In some embodiments, when determining the difference between the reconstructed value and the predicted value of at least one first sample, the mean of the reconstructed value of at least one first sample can be calculated to determine the corresponding first mean; at the same time, the mean of the predicted value of at least one first sample can be calculated to determine the corresponding second mean, and then the difference is calculated based on the first mean and the second mean to finally obtain the difference between the reconstructed value and the predicted value of at least one first sample.

[0231] In other words, in the embodiments of this application, the specific calculation method for the difference between the reconstructed value and the predicted value of at least one first sample is not limited.

[0232] In embodiments of this application, a first threshold can be preset. The determination of the first threshold depends on the specific calculation method of the difference between the reconstructed value and the predicted value of at least one first sample. That is, the corresponding first threshold can be different when different methods are used to calculate the difference. This application does not specifically limit the specific value of the first threshold.

[0233] In the embodiments of this application, the difference between the reconstructed value and the predicted value of at least one first sample can be used to determine the accuracy of the prediction result of the first sample, or in other words, the difference between the reconstructed value and the predicted value of at least one first sample can be used to determine the accuracy of the prediction result of the current sample. Specifically, if the difference is less than or equal to a first threshold, the prediction result of the first sample is considered relatively accurate, and consequently, the prediction result of the current sample is also considered relatively accurate. Therefore, the compensated prediction value obtained through the inter-frame convolution cross-component linear model can be omitted for further fusion processing, thus determining that the current sample does not use the inter-frame convolution cross-component linear model. If the difference is greater than the first threshold, the accuracy of the prediction result of the first sample is considered unsatisfactory, and consequently, the prediction result of the current sample is also considered inaccurate. Therefore, the compensated prediction value obtained through the inter-frame convolution cross-component linear model can be used for further fusion processing, thus determining that the current sample uses the inter-frame convolution cross-component linear model.

[0234] In embodiments of this application, for at least one first sample in the first image component reference samples, the ratio between the reconstructed value of the first sample and the predicted value of the first sample can be determined; if the ratio is less than or equal to a second threshold, it is determined that the current sample does not use the inter-frame convolution cross-component linear model; if the ratio is greater than the second threshold, it is determined that the current sample uses the inter-frame convolution cross-component linear model.

[0235] In other words, in the embodiments of this application, when comparing the reconstructed value of the first sample and the predicted value of the first sample, a ratio calculation can be performed on the reconstructed value and the predicted value of at least one first sample to obtain the ratio result, and then the current sample is further determined to use the inter-frame convolution cross-component linear model by comparing the ratio result with the second threshold.

[0236] In some embodiments, when determining the ratio between the reconstructed value and the predicted value of at least one first sample, the ratio of the reconstructed value to the predicted value of each first sample can be calculated to obtain the ratio of each first sample. Then, the ratios (or absolute values ​​of the ratios) of all at least one first sample are summed to finally obtain the ratio between the reconstructed value and the predicted value of at least one first sample.

[0237] In some embodiments, when determining the ratio between the reconstructed value and the predicted value of at least one first sample, the mean of the reconstructed value of at least one first sample can be calculated to determine the corresponding first mean; at the same time, the mean of the predicted value of at least one first sample can be calculated to determine the corresponding second mean, and then the ratio is calculated based on the first mean and the second mean to finally obtain the ratio between the reconstructed value and the predicted value of at least one first sample.

[0238] In other words, in the embodiments of this application, the specific calculation method for the ratio between the reconstructed value and the predicted value of at least one first sample is not limited.

[0239] In embodiments of this application, a second threshold can be preset. The determination of the second threshold depends on the specific calculation method of the ratio between the reconstructed value and the predicted value of at least one first sample. That is, the corresponding second threshold can be different when different methods are used to calculate the ratio. This application does not specifically limit the specific value of the second threshold.

[0240] In the embodiments of this application, the ratio between the reconstructed value and the predicted value of at least one first sample can be used to determine the accuracy of the prediction result of the first sample, or in other words, the ratio between the reconstructed value and the predicted value of at least one first sample can be used to determine the accuracy of the prediction result of the current sample. Specifically, if the ratio is less than or equal to a second threshold, the prediction result of the first sample is considered relatively accurate, and consequently, the prediction result of the current sample is also considered relatively accurate. Therefore, the compensated prediction value obtained through the inter-frame convolution cross-component linear model can be omitted for further fusion processing, thus determining that the current sample does not use the inter-frame convolution cross-component linear model. If the ratio is greater than the second threshold, the accuracy of the prediction result of the first sample is considered unsatisfactory, and consequently, the prediction result of the current sample is also considered inaccurate. Therefore, the compensated prediction value obtained through the inter-frame convolution cross-component linear model can be used for further fusion processing, thus determining that the current sample uses the inter-frame convolution cross-component linear model.

[0241] In the embodiments of this application, if it is determined that the current sample does not use the inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, then the predicted value of the second image component of the current sample can be further determined based on the first predicted value of the second image component of the current sample.

[0242] In other words, in the embodiments of this application, if the prediction result of the current sample is relatively accurate based on the reconstructed value and the predicted value of the first image component reference sample, then the prediction value of the second image component of the current sample can be determined directly based on the initial predicted value of the second image component of the current sample.

[0243] In some embodiments, when determining the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample, the first predicted value of the second image component of the current sample can be directly determined as the predicted value of the second image component of the current sample. For example, the initial predicted value of the chroma component of the current sample obtained by inter-frame prediction or intra-frame block copying can be directly determined as the predicted value of the chroma component of the current sample.

[0244] In the embodiments of this application, if it is determined that the current sample uses an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, then the predicted value of the second image component of the current sample can be determined by combining the first predicted value of the second image component and the second predicted value of the second image component.

[0245] In other words, in the embodiments of this application, if the prediction result of the current sample derived from the reconstructed value and the predicted value of the first image component reference sample is inaccurate, then an inter-frame convolutional cross-component linear model can be selected, that is, the first predicted value of the second image component and the second predicted value of the second image component of the current sample are selected to be fused to determine the predicted value of the second image component of the current sample.

[0246] For example, in some embodiments, when obtaining the first predicted value of the second image component of the current sample, a reference sample of the current sample may be determined in a reference image of the current image based on the motion vector of the current block; then, the first predicted value of the second image component of the current sample is determined based on the reconstructed value of the second image component of the reference sample of the current sample.

[0247] For example, in some embodiments, when obtaining the first predicted value of the second image component of the current sample, it is also possible to select a reference sample of the current sample in the current image based on the block vector of the current block; and then determine the first predicted value of the second image component of the current sample based on the reconstructed value of the second image component of the reference sample of the current sample.

[0248] For example, in some embodiments, when obtaining the second predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample can be determined based on the filter coefficients of the current block and the reconstructed value of the second sample.

[0249] In the embodiments of this application, the filter coefficients of the current block are the filter coefficients of the convolution filter used when the current block performs prediction using the inter-frame convolution cross-component linear model.

[0250] In the embodiments of this application, the second sample can be at least one sample from the first image component reference samples, and the number of second samples is not specifically limited in this application. The number of filter coefficients, the number of taps in the convolution filter, and the number of second samples are the same.

[0251] In some embodiments, the first sample and the second sample may be the same or different, and this application does not impose specific limitations.

[0252] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0 is the first sample, and L0, L1, L2, L3, L4, L5 are the second samples.

[0253] For example, in some embodiments, it is assumed that C represents the current sample, and L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11 are the luminance component reference samples (first image component reference samples) of the current sample, wherein L0, L1, L2, L3, L4, L5 are the first samples, and L0, L1, L2, L3, L4, L5 are the second samples.

[0254] For example, in some embodiments, determining the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample may include determining the predicted value of the first sample, the reconstructed value of the first sample, and the reconstructed value of the second sample.

[0255] In some embodiments, when determining the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample, the predicted value of the second image component of the current sample can be determined based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the first weight corresponding to the first predicted value, and the second weight corresponding to the second predicted value.

[0256] In the embodiments of this application, the relationship between the first weight and the second weight is not specifically limited. The first weight may be greater than the second weight, or the first weight may be equal to the second weight, or the first weight may be less than the second weight.

[0257] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C Given (x, y), with first weight P1 and second weight P2, the predicted value of the second image component of the current sample can be determined using the following formula, i.e., the predicted value of the chromaticity component of the current sample (x, y) is predOut. C (x, y): predOut C (x, y) = P2 × predCCCM C (x, y) + P1×predOri C (x, y) (3)

[0258] In some embodiments, the sum of the first weight and the second weight can be 1.

[0259] In some embodiments, the second weight can be three times the first weight, that is, in the process of fusing the first predicted value of the second image component and the second predicted value of the second image component of the current sample, the first weight used for the first predicted value is one-third of the second weight used for the second predicted value.

[0260] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. CFor (x, y), with a first weight of 0.25 and a second weight of 0.75, the predicted value of the second image component of the current sample can be determined using the following formula, which is to determine the predicted value of the chromaticity component of the current sample (x, y), predOut. C (x, y): predOut C (x, y) = (3 × predCCCM) C (x, y) + predOri C (x, y) + 2) >> 2 (4)

[0261] In embodiments of this application, if the current block uses an inter-frame convolutional cross-component linear model, then after determining the reconstructed value and the predicted value of the first image component reference sample of the current sample, it is also possible to further determine how the weights of the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample are adjusted and allocated in the fusion process based on the reconstructed value and the predicted value of the first image component reference sample.

[0262] In other words, in the embodiments of this application, the weights corresponding to the first predicted value of the second image component of the current sample and the weights corresponding to the second predicted value of the second image component of the current sample can be adjusted based on the reconstructed value and the predicted value of the first image component reference sample.

[0263] In the embodiments of this application, when determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample, if the reconstructed value and the predicted value of the first image component reference sample satisfy a preset condition, a third weight corresponding to the first predicted value of the second image component of the current sample and a fourth weight corresponding to the second predicted value of the second image component of the current sample are determined; then, based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the third weight, and the fourth weight, the predicted value of the second image component of the current sample is determined.

[0264] In the embodiments of this application, the relationship between the third weight and the fourth weight is not specifically limited. The third weight may be greater than the fourth weight, or the third weight may be equal to the fourth weight, or the third weight may be less than the fourth weight.

[0265] In embodiments of this application, the preset conditions may include one or more of the following: the reconstructed value of the first sample is the same as the predicted value of the first sample; the difference between the reconstructed value of the first sample and the predicted value of the first sample is less than or equal to a first threshold; the ratio between the reconstructed value of the first sample and the predicted value of the first sample is less than or equal to a second threshold.

[0266] In the embodiments of this application, the first sample may be at least one sample in the first image component reference sample, and the number of the first sample is not specifically limited in this application.

[0267] In the embodiments of this application, preset conditions can be used to determine the accuracy of the prediction result of the first sample, or in other words, preset conditions can be used to determine the accuracy of the prediction result of the current sample.

[0268] For example, in some embodiments, if the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample meet preset conditions, it can be considered that the prediction result of the first sample is relatively accurate, and thus it can be considered that the prediction result of the current sample is also relatively accurate. Therefore, it is possible to increase the weight ratio of the initial prediction value and decrease the weight ratio of the compensation prediction value, that is, the third weight corresponding to the first predicted value of the second image component of the current sample is greater than or equal to the fourth weight corresponding to the second predicted value of the second image component of the current sample.

[0269] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C Given (x, y), with the third weight P3 and the fourth weight P4, the predicted value of the second image component of the current sample can be determined using the following formula, i.e., the predicted value of the chromaticity component of the current sample (x, y) is predOut. C (x, y): predOut C (x, y) = P4 × predCCCM C (x, y) + P3×predOri C (x, y) (5)

[0270] In some embodiments, the sum of the third weight and the fourth weight can be 1.

[0271] In some embodiments, the third weight can be four times the fourth weight, that is, in the process of fusing the first predicted value of the second image component and the second predicted value of the second image component of the current sample, the three weights used for the first predicted value are four times the fourth weights used for the second predicted value.

[0272] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C For (x, y), with a third weight of 0.8 and a fourth weight of 0.2, the predicted value of the second image component of the current sample can be determined using the following formula, i.e., the predicted value of the chromaticity component of the current sample (x, y) is predOut. C (x, y): predOut C (x, y) = 0.2 × predCCCM C (x, y) + 0.8 × predOri C (x, y) (8)

[0273] For example, in some embodiments, the first predicted value of the second image component of the current sample, i.e., the initial predicted value of the chromaticity component of the current sample (x, y), is denoted as predOri. C (x, y), the second predicted value of the second image component of the current sample, that is, the compensated predicted value of the chroma component obtained by the inter-frame convolution cross-component prediction model for the current sample (x, y), denoted as predCCCM. C For (x, y), with the third weight set to 1 and the fourth weight set to 0, the predicted value of the second image component of the current sample can be determined using the following formula, which is to determine the predicted value of the chromaticity component of the current sample (x, y) as predOut. C (x, y): predOut C (x, y) = predOri C (x, y) (7)

[0274] In the embodiments of this application, when determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample, if the reconstructed value and the predicted value of the first image component reference sample do not meet the preset conditions, the predicted value of the second image component of the current sample can be determined based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the first weight corresponding to the first predicted value, and the second weight corresponding to the second predicted value; wherein, the second weight is 3 times the first weight.

[0275] For example, in some embodiments, if the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample do not meet the preset conditions, it can be considered that the accuracy of the prediction result of the first sample is not ideal, and thus it can be considered that the prediction result of the current sample is also inaccurate. Therefore, it is possible to reduce the weight ratio of the initial prediction value and increase the weight ratio of the compensation prediction value. For example, the first weight corresponding to the first predicted value of the second image component of the current sample is one-third of the second weight corresponding to the second predicted value of the second image component of the current sample.

[0276] In the embodiments of this application, the first weight corresponding to the first predicted value and the second weight corresponding to the second predicted value determined when the preset conditions are not met, and the third weight corresponding to the first predicted value and the fourth weight corresponding to the second predicted value determined when the preset conditions are met, may not be exactly the same. For example, the first weight and the third weight may be different, and / or the second weight and the fourth weight may be different.

[0277] Therefore, the encoding method proposed in this application can adjust the prediction process of the inter-frame convolutional cross-component prediction mode. One implementation is to determine whether the current sample uses the inter-frame convolutional cross-component prediction model (whether the inter-frame convolutional cross-component prediction mode) based on the predicted and reconstructed values ​​of the luminance sample (luminance component reference sample) corresponding to the current sample. Another implementation is to adjust the weight values ​​in the fusion process of the current sample using the inter-frame convolutional cross-component prediction model (whether the inter-frame convolutional cross-component prediction mode) based on the predicted and reconstructed values ​​of the luminance sample (luminance component reference sample) corresponding to the current sample.

[0278] In summary, the encoding method proposed in this application includes an improved scheme for inter-frame convolutional cross-component prediction technology, which can be applied in inter-frame cross-component prediction derivation mode. During the prediction process, this scheme determines whether the predicted value generated at the current position in the original inter-frame prediction mode or intra-frame block copy mode is sufficiently accurate based on the relationship between the original predicted value and the reconstructed value of the luminance at the corresponding position of the chroma sample to be predicted. For example, when the original predicted value and the reconstructed value of luminance are equal, it can be determined that the original prediction scheme can already obtain a relatively accurate predicted value, and there is no need to further correct the predicted value through cross-component methods, so as not to affect the accuracy of the original prediction method, thereby improving prediction accuracy and enhancing encoding performance.

[0279] For example, the encoding method proposed in the embodiments of this application was tested and verified, and the test results are shown in Table 1 and Table 2.

[0280] This application provides an encoding method that, when the current block uses an inter-frame convolutional cross-component linear model, determines the reconstructed value and the predicted value of the first image component reference sample of the current sample; based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined. In other words, in the embodiments of this application, for an encoding block using an inter-frame convolutional cross-component linear model, the prediction method for predicting the second image component of the current sample can be determined according to the reconstructed value and the predicted value of the first image component reference sample. That is, the prediction process for the second image component of the current sample can be adjusted according to the relationship between the reconstructed value and the predicted value of the first image component reference sample, thereby improving the prediction accuracy and enhancing encoding / decoding performance.

[0281] Based on the above embodiments, this application provides an encoding / decoding method that may include an inter-frame convolutional cross-component prediction scheme. Specifically, based on the relationship between the predicted value and the reconstructed value (rebuilt value) of the luminance sample (first image component reference sample) at the corresponding position of the chroma sample to be predicted (current sample), certain conditions (such as preset conditions) are set, and the method determines whether the current sample should use convolutional cross-component prediction based on these conditions. Alternatively, the method adjusts the weights of the fusion processing used by the current sample during convolutional cross-component prediction based on these conditions. This solves the problem in related technologies where the relatively simple weighted fusion method of inter-frame convolutional cross-component prediction cannot adapt to all chroma samples to be predicted.

[0282] The encoding / decoding method proposed in this application can adjust the prediction process of inter-frame convolution cross-component prediction mode. The following example, using a first image component as the luminance component and a second image component as the chrominance component, illustrates the encoding / decoding method proposed in this application.

[0283] For example, one implementation is to determine whether the current sample uses the inter-frame convolution cross-component prediction model (whether the inter-frame convolution cross-component prediction mode) based on the predicted value and the reconstructed value of the luminance sample (luminance component reference sample) corresponding to the current sample.

[0284] In some embodiments, the prediction process for the inter-frame convolution cross-component prediction mode has been adjusted. The prediction process for the inter-frame convolution cross-component prediction mode is shown in the following formula: predOut C (x, y) = (3 × predCCCM) C (x, y) + predOri C (x, y) + 2) >> 2 (4)

[0285] Among them, predOut C (x, y) represents the final predicted value of the chromaticity sample at coordinates (x, y), predOri C (x, y) represents the raw prediction value generated by the chrominance sample at coordinates (x, y) through the inter-frame prediction mode or intra-frame block copy mode of the current coding unit (current block), predCCCM C (x, y) represents the predicted value generated by convolution across components from the chromaticity sample at coordinates (x, y). C (x, y) and predCCCM C (x, y) are obtained through weighted calculation to get predOut C (x, y). Where, predCCCM C The weight corresponding to (x, y) is 0.75, predOri C The weight corresponding to (x, y) is 0.25.

[0286] In the embodiments of this application, if the predicted value and reconstructed value of the luminance component reference sample meet condition P (preset condition), then it can be determined that the current sample does not use the inter-frame convolution cross-component prediction model; if the predicted value and reconstructed value of the luminance component reference sample do not meet condition P (preset condition), then it can be determined that the current sample uses the inter-frame convolution cross-component prediction model.

[0287] For example, in some embodiments, assuming the first samples are L0 and L3, the condition P is set as (recL0+recL3+1)>>1==(predOriL0+predOriL3+1)>>1. When condition P is satisfied, the final predicted value is predOut. C (x, y) is directly derived from the original value to predOri C (x, y). When condition P is not met, the final predicted value is predOut.C The calculation method for (x, y) remains unchanged, still based on predOri C (x, y) and predCCCM C The result is obtained by weighted calculation of (x, y). That is, predOut. C The calculation method for (x, y) is as follows:

[0288] In other words, in some embodiments, the value of tu.interCccm for the current chroma coding unit (current block) is 1, meaning that the current block uses inter-frame convolutional cross-component prediction mode to derive a set of convolutional filters through the prediction blocks of luma and chroma, and obtains the data used to generate predOut. C The relevant information for (x, y) includes the original predicted brightness value corresponding to that position, denoted as predOriL0 and predOriL3, and the reconstructed brightness value, denoted as recL0, recL1, recL2, recL3, recL4, and recL5. The condition P is set to whether the original predicted brightness value represented by the nonlinear term is the same as the reconstructed brightness value, i.e., (recL0 + recL3 + 1) >> 1 == (predOriL0 + predOriL3 + 1) >> 1. If they are equal, i.e., P is true, then the final prediction value is calculated directly using the original predicted value without going through a convolution filter, i.e., predOut. C (x, y) = predOri C (x, y). If the two are not equal, i.e., P is false, then the final predicted value needs to be calculated by a convolutional filter and weighted and fused with the original predicted value, i.e., predOut. C (x, y) = (3 × predCCCM) C (x, y) + predOri C (x, y)+2)>>2.

[0289] For example, another implementation is to adjust the weight values ​​of the current sample during the fusion process using the inter-frame convolution cross-component prediction model (whether or not the inter-frame convolution cross-component prediction mode is used) based on the predicted and reconstructed values ​​of the luminance sample (luminance component reference sample) corresponding to the current sample.

[0290] In the embodiments of this application, based on whether the predicted value and the reconstructed value of the luminance component reference sample meet condition P (preset condition), the predCCCM is further set. C The weights and predOri corresponding to (x, y) C The weights corresponding to (x, y).

[0291] For example, in some embodiments, assuming the first samples are L0 and L3, the condition P is set to recL0 = predOriL0 and recL3 = predOriL3. When condition P is satisfied, predCCCM C The weight corresponding to (x, y) is determined to be 0.25, predOri C The weight corresponding to (x, y) is determined to be 0.75; when condition P is not met, predCCCM C The weight corresponding to (x, y) is 0.75, predOri C The weight corresponding to (x, y) is 0.25. That is, predOut C The calculation method for (x, y) is as follows:

[0292] In other words, in some embodiments, the value of tu.interCccm for the current chroma coding unit (current block) is 1, meaning that the current block uses inter-frame convolutional cross-component prediction mode to derive a set of convolutional filters through the prediction blocks of luma and chroma, and obtains the data used to generate predOut. C The relevant information for (x, y) includes the original predicted brightness values ​​corresponding to that location, denoted as predOriL0 and predOriL3, and the reconstructed brightness values, denoted as recL0, recL1, recL2, recL3, recL4, and recL5. The condition P is set to recL0 = predOriL0 and recL3 = predOriL3. If condition P is satisfied (i.e., P is true), the weight of the initial predicted values ​​is increased, while the weight of the compensated predicted values ​​is decreased; that is, predCCCM is set. C The weight corresponding to (x, y) is determined to be 0.25, predOri C The weight corresponding to (x, y) is determined to be 0.75; if condition P is not met, i.e., P is false, then the weight ratio of the initial predicted value is reduced, while the weight ratio of the compensated predicted value is increased, i.e., predCCCM is set. C The weight corresponding to (x, y) is determined to be 0.75, predOri C The weight corresponding to (x, y) is determined to be 0.25.

[0293] Therefore, the encoding / decoding method proposed in this application includes an improved scheme for inter-frame convolutional cross-component prediction technology, which can be applied in inter-frame cross-component prediction derivation mode. During the prediction process, this scheme determines whether the predicted value generated at the current position in the original inter-frame prediction mode or intra-frame block copy mode is sufficiently accurate based on the relationship between the original predicted value and the reconstructed value of the luminance at the corresponding position of the chroma sample to be predicted. For example, when the original predicted value and the reconstructed value of luminance are equal, it can be determined that the original prediction scheme can already obtain a relatively accurate predicted value, and there is no need to further correct the predicted value through cross-component methods, so as not to affect the accuracy of the original prediction method, thereby improving prediction accuracy and enhancing coding performance.

[0294] In summary, the decoding method proposed in this application can adjust the prediction process of the inter-frame convolutional cross-component prediction mode. One implementation involves determining whether the current sample uses the inter-frame convolutional cross-component prediction model (whether the inter-frame convolutional cross-component prediction mode) based on the predicted and reconstructed values ​​of the luminance sample (luminance component reference sample) corresponding to the current sample. Another implementation involves adjusting the weight values ​​during the fusion process of using the inter-frame convolutional cross-component prediction model (whether the inter-frame convolutional cross-component prediction mode) for the current sample based on the predicted and reconstructed values ​​of the luminance sample (luminance component reference sample) corresponding to the current sample.

[0295] For example, the encoding method proposed in the embodiments of this application was tested and verified, and the test results are shown in Table 1 and Table 2.

[0296] This application provides an encoding / decoding method. When the current block uses an inter-frame convolutional cross-component linear model, the method determines the reconstructed value and predicted value of the first image component reference sample of the current sample; based on the reconstructed value and predicted value of the first image component reference sample, the method determines the predicted value of the second image component of the current sample. In other words, in this application's embodiments, for an encoding block using an inter-frame convolutional cross-component linear model, the prediction method for predicting the second image component of the current sample can be determined based on the reconstructed value and predicted value of the first image component reference sample. That is, the prediction process for the second image component of the current sample can be adjusted according to the relationship between the reconstructed value and predicted value of the first image component reference sample, thereby improving prediction accuracy and enhancing encoding / decoding performance.

[0297] Based on the above embodiments, in another embodiment of this application, based on the same inventive concept as the foregoing embodiments, FIG10 is a schematic diagram of the composition structure of an encoder provided in an embodiment of this application. As shown in FIG10, the encoder 100 may include a first determining portion 1101, wherein:

[0298] The first determining part 1101 is configured to, when using an inter-frame convolutional cross-component linear model in the current block, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample; and determine the predicted value of the second image component of the current sample based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample.

[0299] Understandably, in the embodiments of this application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or as a software functional module.

[0300] If the integrated unit is implemented as a software functional module and not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0301] Therefore, this application provides a computer-readable storage medium applied to an encoder 100, the computer-readable storage medium storing a computer program that, when executed by a first processor, implements the method described in any of the foregoing embodiments.

[0302] Based on the composition of the encoder 100 described above and the computer-readable storage medium, Figure 11 is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of this application. As shown in Figure 11, the encoder 100 may include: a first communication interface 1201, a first memory 1202, and a first processor 1203; the various components are coupled together through a first bus system 1204. It can be understood that the first bus system 1204 is used to realize the connection and communication between these components. In addition to a data bus, the first bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the first bus system 1204 in the figure.

[0303] The first communication interface 1201 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

[0304] The first memory 1202 is used to store computer programs that can run on the first processor 1203;

[0305] The first processor 1203 is configured to, when running the computer program, perform the following: when the current block uses an inter-frame convolutional cross-component linear model, determine the reconstructed value and the predicted value of the first image component reference sample of the current sample; and based on the reconstructed value and the predicted value of the first image component reference sample, determine the predicted value of the second image component of the current sample.

[0306] It is understood that the first memory 1202 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can 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. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 1202 of the system and method described in this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0307] The first processor 1203 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the first processor 1203 or by instructions in software form. The first processor 1203 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 devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the first memory 1202. The first processor 1203 reads the information in the first memory 1202 and completes the steps of the above method in conjunction with its hardware.

[0308] It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0309] Alternatively, as another embodiment, the first processor 1203 is further configured to execute the method described in any of the foregoing embodiments when running the computer program.

[0310] In another embodiment of this application, based on the same inventive concept as the foregoing embodiments, FIG12 is a schematic diagram of the composition structure of a decoder provided in an embodiment of this application. As shown in FIG12, the decoder 200 may include a second determining part 2101, wherein:

[0311] The second determining part 2101 is configured to, when the current block uses an inter-frame convolutional cross-component linear model, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample; and determine the predicted value of the second image component of the current sample based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample.

[0312] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0313] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium applied to the decoder 200. This computer-readable storage medium stores a computer program, which, when executed by a second processor, implements the method described in any of the foregoing embodiments.

[0314] Based on the composition of the decoder 200 and the computer-readable storage medium described above, Figure 13 is a schematic diagram of the specific hardware structure of a decoder provided in an embodiment of this application. As shown in Figure 13, the decoder 200 may include: a second communication interface 2201, a second memory 2202, and a second processor 2203; the various components are coupled together through a second bus system 2204. It is understood that the second bus system 2204 is used to realize the connection and communication between these components. In addition to a data bus, the second bus system 2204 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the second bus system 2204 in the figure.

[0315] The second communication interface 2201 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

[0316] The second memory 2202 is used to store computer programs that can run on the second processor 2203;

[0317] The second processor 2203 is configured to, when running the computer program, perform the following: determining the reconstructed value and the predicted value of the first image component reference sample of the current sample when the current block uses an inter-frame convolutional cross-component linear model; and determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample.

[0318] Alternatively, as another embodiment, the second processor 2203 is also configured to perform the method described in any of the foregoing embodiments when running the computer program.

[0319] It is understood that the second memory 2202 has similar hardware functions to the first memory 1202, and the second processor 2203 has similar hardware functions to the first processor 1203; details will not be elaborated here.

[0320] In another embodiment of this application, FIG14 is a schematic diagram of the composition structure of an encoding and decoding system provided in an embodiment of this application. As shown in FIG14, the encoding and decoding system 300 may include an encoder 100 and a decoder 200.

[0321] In the embodiments of this application, the encoder 100 may be any one of the encoders described in the foregoing embodiments, and the decoder 200 may be any one of the decoders described in the foregoing embodiments.

[0322] Furthermore, this embodiment provides a computer-readable storage medium for storing a bitstream generated by any of the encoding methods in the foregoing embodiments.

[0323] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0324] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0325] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0326] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0327] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0328] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims. Industrial applicability

[0329] This application provides an encoding / decoding method, encoder, decoder, and storage medium. When the current block uses an inter-frame convolutional cross-component linear model, the method determines the reconstructed value and predicted value of a first image component reference sample for the current sample; based on the reconstructed value and predicted value of the first image component reference sample, the method determines the predicted value of a second image component for the current sample. In other words, in this application's embodiments, for an encoding block using an inter-frame convolutional cross-component linear model, the prediction method for predicting the second image component of the current sample can be determined based on the reconstructed value and predicted value of the first image component reference sample. That is, the prediction process for the second image component of the current sample can be adjusted according to the relationship between the reconstructed value and predicted value of the first image component reference sample, thereby improving prediction accuracy and enhancing encoding / decoding performance.

Claims

1. A decoding method applied to a decoder, the method comprising: When the current block uses an inter-frame convolutional cross-component linear model, the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample are determined. Based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined.

2. The method according to claim 1, wherein, Determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample includes: If it is determined that the current sample does not use an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined based on the first predicted value of the second image component of the current sample.

3. The method according to claim 1, wherein, Determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample includes: When it is determined that the current sample uses an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined based on the first predicted value and the second predicted value of the second image component of the current sample.

4. The method according to any one of claims 1 to 3, wherein, The method further includes: If the reconstructed value of the first sample is the same as the predicted value of the first sample, it is determined that the current sample does not use the inter-frame convolutional cross-component linear model; wherein, the first sample is at least one sample in the first image component reference sample; If the reconstructed value of the first image component reference sample is different from the predicted value of the first image component reference sample, it is determined that the current sample uses an inter-frame convolutional cross-component linear model.

5. The method according to claim 4, wherein, The method further includes: If the reconstructed value and the predicted value of each sample in at least one of the first samples are the same, then the reconstructed value and the predicted value of the first sample are determined to be the same. If the reconstructed value and the predicted value of at least one of the first samples are different, it is determined that the reconstructed value and the predicted value of the first sample are different.

6. The method according to claim 4, wherein, The method further includes: A first mean is determined based on the reconstructed value of at least one of the first samples; The second mean is determined based on the predicted value of at least one of the first samples; If the first mean and the second mean are the same, it is determined that the reconstructed value of the first sample and the predicted value of the first sample are the same. If the first mean and the second mean are different, it is determined that the reconstructed value of the first sample is different from the predicted value of the first sample.

7. The method according to any one of claims 1 to 3, wherein, The method further includes: Determine the difference between the reconstructed value of the first sample and the predicted value of the first sample; wherein the first sample is at least one sample in the first image component reference samples; If the difference result is less than or equal to the first threshold, it is determined that the current sample does not use the inter-frame convolutional cross-component linear model; If the difference result is greater than a first threshold, it is determined that the current sample uses an inter-frame convolutional cross-component linear model.

8. The method according to any one of claims 1 to 3, wherein, The method further includes: Determine the ratio between the reconstructed value of the first sample and the predicted value of the first sample; wherein the first sample is at least one sample in the first image component reference samples; If the ratio is less than or equal to the second threshold, it is determined that the current sample does not use the inter-frame convolutional cross-component linear model. If the ratio result is greater than the second threshold, it is determined that the current sample uses an inter-frame convolutional cross-component linear model.

9. The method according to any one of claims 1 to 8, wherein, The method further includes: Based on the motion vector of the current block, a reference sample of the current sample is determined in a reference image of the current image; Based on the reconstructed value of the second image component of the reference sample of the current sample, a first predicted value of the second image component of the current sample is determined.

10. The method according to any one of claims 1 to 8, wherein, The method further includes: Based on the block vector of the current block, determine the reference sample of the current sample in the current image; Based on the reconstructed value of the second image component of the reference sample of the current sample, a first predicted value of the second image component of the current sample is determined.

11. The method according to any one of claims 1 to 10, wherein, The method further includes: Based on the filter coefficients of the current block and the reconstructed value of the second sample, a second predicted value of the second image component of the current sample is determined; wherein the second sample is at least one sample in the reference sample of the first image component.

12. The method according to any one of claims 2 to 11, wherein, Determining the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample includes: The first predicted value of the second image component of the current sample is determined as the predicted value of the second image component of the current sample.

13. The method according to any one of claims 3 to 11, wherein, Determining the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample includes: The predicted value of the second image component of the current sample is determined based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the first weight corresponding to the first predicted value, and the second weight corresponding to the second predicted value.

14. The method according to any one of claims 1 to 13, wherein, Determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample includes: If the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample meet the preset conditions, determine the third weight corresponding to the first predicted value of the second image component of the current sample and the fourth weight corresponding to the second predicted value of the second image component of the current sample. Based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the third weight, and the fourth weight, the predicted value of the second image component of the current sample is determined. The preset conditions include one or more of the following: The reconstructed value of the first sample is the same as the predicted value of the first sample; the first sample is at least one sample in the first image component reference sample; The difference between the reconstructed value of the first sample and the predicted value of the first sample is less than or equal to the first threshold. The ratio between the reconstructed value of the first sample and the predicted value of the first sample is less than or equal to the second threshold.

15. The method according to claim 14, wherein, The method further includes: If the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample do not meet the preset conditions, the predicted value of the second image component of the current sample is determined based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the first weight corresponding to the first predicted value, and the second weight corresponding to the second predicted value.

16. An encoding method applied to an encoder, the method comprising: When the current block uses an inter-frame convolutional cross-component linear model, the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample are determined. Based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined.

17. The method according to claim 16, wherein, Determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample includes: If it is determined that the current sample does not use an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined based on the first predicted value of the second image component of the current sample.

18. The method according to claim 16, wherein, Determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample includes: When it is determined that the current sample uses an inter-frame convolutional cross-component linear model based on the reconstructed value and the predicted value of the first image component reference sample, the predicted value of the second image component of the current sample is determined based on the first predicted value and the second predicted value of the second image component of the current sample.

19. The method according to any one of claims 16 to 18, wherein, The method further includes: If the reconstructed value of the first sample is the same as the predicted value of the first sample, it is determined that the current sample does not use the inter-frame convolutional cross-component linear model; wherein, the first sample is at least one sample in the first image component reference sample; If the reconstructed value of the first image component reference sample is different from the predicted value of the first image component reference sample, it is determined that the current sample uses an inter-frame convolutional cross-component linear model.

20. The method according to claim 19, wherein, The method further includes: If the reconstructed value and the predicted value of each sample in at least one of the first samples are the same, then the reconstructed value and the predicted value of the first sample are determined to be the same. If the reconstructed value and the predicted value of at least one of the first samples are different, it is determined that the reconstructed value and the predicted value of the first sample are different.

21. The method according to claim 19, wherein, The method further includes: A first mean is determined based on the reconstructed value of at least one of the first samples; The second mean is determined based on the predicted value of at least one of the first samples; If the first mean and the second mean are the same, it is determined that the reconstructed value of the first sample and the predicted value of the first sample are the same. If the first mean and the second mean are different, it is determined that the reconstructed value of the first sample is different from the predicted value of the first sample.

22. The method according to any one of claims 16 to 18, wherein, The method further includes: Determine the difference between the reconstructed value of the first sample and the predicted value of the first sample; wherein the first sample is at least one sample in the first image component reference samples; If the difference result is less than or equal to the first threshold, it is determined that the current sample does not use the inter-frame convolutional cross-component linear model; If the difference result is greater than a first threshold, it is determined that the current sample uses an inter-frame convolutional cross-component linear model.

23. The method according to any one of claims 16 to 18, wherein, The method further includes: Determine the ratio between the reconstructed value of the first sample and the predicted value of the first sample; wherein the first sample is at least one sample in the first image component reference samples; If the ratio is less than or equal to the second threshold, it is determined that the current sample does not use the inter-frame convolutional cross-component linear model. If the ratio result is greater than the second threshold, it is determined that the current sample uses an inter-frame convolutional cross-component linear model.

24. The method according to any one of claims 16 to 23, wherein, The method further includes: Based on the motion vector of the current block, a reference sample of the current sample is determined in a reference image of the current image; Based on the reconstructed value of the second image component of the reference sample of the current sample, a first predicted value of the second image component of the current sample is determined.

25. The method according to any one of claims 16 to 23, wherein, The method further includes: Based on the block vector of the current block, determine the reference sample of the current sample in the current image; Based on the reconstructed value of the second image component of the reference sample of the current sample, a first predicted value of the second image component of the current sample is determined.

26. The method according to any one of claims 16 to 25, wherein, The method further includes: Based on the filter coefficients of the current block and the reconstructed value of the second sample, a second predicted value of the second image component of the current sample is determined; wherein the second sample is at least one sample in the reference sample of the first image component.

27. The method according to any one of claims 17 to 26, wherein, Determining the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample includes: The first predicted value of the second image component of the current sample is determined as the predicted value of the second image component of the current sample.

28. The method according to any one of claims 18 to 26, wherein, Determining the predicted value of the second image component of the current sample based on the first predicted value of the second image component of the current sample and the second predicted value of the second image component of the current sample includes: The predicted value of the second image component of the current sample is determined based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the first weight corresponding to the first predicted value, and the second weight corresponding to the second predicted value.

29. The method according to any one of claims 16 to 28, wherein, Determining the predicted value of the second image component of the current sample based on the reconstructed value and the predicted value of the first image component reference sample includes: If the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample meet the preset conditions, determine the third weight corresponding to the first predicted value of the second image component of the current sample and the fourth weight corresponding to the second predicted value of the second image component of the current sample. Based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the third weight, and the fourth weight, the predicted value of the second image component of the current sample is determined. The preset conditions include one or more of the following: The reconstructed value of the first sample is the same as the predicted value of the first sample; the first sample is at least one sample in the first image component reference sample; The difference between the reconstructed value of the first sample and the predicted value of the first sample is less than or equal to the first threshold. The ratio between the reconstructed value of the first sample and the predicted value of the first sample is less than or equal to the second threshold.

30. The method according to claim 29, wherein, The method further includes: If the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample do not meet the preset conditions, the predicted value of the second image component of the current sample is determined based on the first predicted value of the second image component of the current sample, the second predicted value of the second image component of the current sample, the first weight corresponding to the first predicted value, and the second weight corresponding to the second predicted value.

31. An encoder, wherein, The encoder includes: The first determining part is configured to, when the current block uses an inter-frame convolutional cross-component linear model, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample; and based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample, determine the predicted value of the second image component of the current sample.

32. An encoder, wherein, The encoder includes: a first memory and a first processor; wherein, A first memory for storing computer programs that can run on a first processor; A first processor is configured to, while running the computer program, perform the method as described in any one of claims 16 to 30.

33. A decoder, wherein, The decoder includes: The second determining part is configured to, when the current block uses an inter-frame convolutional cross-component linear model, determine the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample of the current sample; and based on the reconstructed value of the first image component reference sample and the predicted value of the first image component reference sample, determine the predicted value of the second image component of the current sample.

34. A decoder, wherein, The decoder includes: a second memory and a second processor; wherein... The second memory is used to store computer programs that can run on the second processor; A second processor is configured to perform the method as described in any one of claims 1 to 15 when running the computer program.

35. A computer-readable storage medium storing a computer program that, when executed, implements the decoding method as described in any one of claims 1 to 15, or the encoding method as described in any one of claims 16 to 30.

36. A computer-readable storage medium for storing a bitstream generated by the encoding method of any one of claims 16 to 30.