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

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

Patent Information

Application Number
PCT/CN2025/089026
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2026-10-22

Smart Images

  • Figure CN2025089026_22102026_PF_FP_ABST
    Figure CN2025089026_22102026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in embodiments of the present application are an encoding method, a decoding method, an encoder, a decoder, and a storage medium. The decoding method comprises: determining first cross-component filtering model information; and predicting a current block on the basis of the first cross-component filtering model information, and determining a predicted value of the current block.
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] With the rapid development of multimedia technology, video data has become one of the core carriers of information transmission and interaction, widely used in streaming media services, video conferencing, virtual reality, and other scenarios. However, video data inherently possesses high redundancy, including spatial redundancy (similarity between adjacent pixels), temporal redundancy (content similarity between consecutive frames), and cross-channel redundancy (such as correlation between color components). This results in uncompressed video data requiring enormous storage space and transmission bandwidth. To address this issue, video encoding and decoding technologies achieve efficient compression by removing redundant information. Optimizing the prediction accuracy of predictive coding and reducing bitstream overhead have become key technological directions in the field of video encoding and decoding. Summary of the Invention

[0003] In a first aspect, embodiments of this application provide a decoding method applied to a decoder, the method comprising: determining first cross-component filtering model information; predicting the current block based on the first cross-component filtering model information; and determining the predicted value of the current block.

[0004] Secondly, embodiments of this application provide an encoding method applied to an encoder, the method comprising: determining first cross-component filtering model information; predicting the current block based on the first cross-component filtering model information; and determining the predicted value of the current block.

[0005] Thirdly, embodiments of this application provide an encoder, which includes a first determining unit and a first predicting unit, wherein: the first determining unit is configured to determine first cross-component filtering model information; and the first predicting unit is configured to predict the current block based on the first cross-component filtering model information and determine the predicted value of the current block.

[0006] Fourthly, embodiments of this application provide an encoder, which includes a first memory and a first processor, wherein: the first memory is used to store a computer program that can run on the first processor; and the first processor is used to execute the method described in the second aspect when running the computer program.

[0007] Fifthly, embodiments of this application provide a decoder, which includes a second determining unit and a second predicting unit, wherein: the second determining unit is configured to determine first cross-component filtering model information; the second predicting unit is configured to predict the current block based on the first cross-component filtering model information and determine the predicted value of the current block.

[0008] In a sixth aspect, embodiments of this application provide a decoder, which includes a second memory and a second processor, wherein: the second memory is used to store a computer program that can run on the second processor; and the second processor is used to execute the method described in the first aspect when running the computer program.

[0009] In a seventh aspect, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect or the method described in the second aspect.

[0010] Eighthly, embodiments of this application provide a computer program product, including a computer program or instructions that, when executed by a processor, implement the method described in the first aspect or the method described in the second aspect.

[0011] In a ninth aspect, embodiments of this application provide a computer-readable storage medium having a bitstream stored thereon, the bitstream being generated by performing the steps of the encoding method as described in the second aspect.

[0012] It is understood that in the embodiments of this application, whether at the encoding end or the decoding end, the cross-component filtering model information is used to predict the current block, and the predicted value of the current block is determined based on this; thus, it is beneficial to improve the accuracy of the predicted value of the current block, thereby enhancing the video encoding and decoding performance. Attached Figure Description

[0013] Figure 1 is a block diagram of ALF-CCCM at the decoder end;

[0014] Figure 2 shows the improved ALF-CCCM block diagram at the decoder end;

[0015] Figure 3 shows the positional relationship of the brightness reconstruction values ​​used in each mode of ALF-CCCM;

[0016] Figure 4 is a schematic diagram of a video encoding and decoding network architecture provided in an embodiment of this application;

[0017] Figure 5 is a schematic block diagram of an encoder provided in an embodiment of this application;

[0018] Figure 6 is a schematic block diagram of a decoder system provided in an embodiment of this application;

[0019] Figure 7 is a schematic diagram of the implementation flow of the decoding method provided in the embodiments of this application;

[0020] Figure 8 is a schematic diagram of a further implementation process of step 701 provided in an embodiment of this application;

[0021] Figure 9 is a schematic diagram of the implementation flow of the method for determining the candidate list provided in the embodiments of this application;

[0022] Figure 10 is a schematic diagram of a further implementation process of step 702 provided in an embodiment of this application;

[0023] Figure 11 is a schematic diagram of the implementation flow of the encoding method provided in the embodiment of this application;

[0024] Figure 12 is a schematic diagram of a further implementation process of step 1101 provided in an embodiment of this application;

[0025] Figure 13 is a schematic diagram of the composition structure of the encoder provided in the embodiment of this application;

[0026] Figure 14 is a schematic diagram of the hardware structure of the encoder provided in an embodiment of this application;

[0027] Figure 15 is a schematic diagram of the composition structure of the decoder provided in the embodiment of this application;

[0028] Figure 16 is a schematic diagram of the hardware structure of the decoder provided in an embodiment of this application. Detailed Implementation

[0029] 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.

[0030] 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.

[0031] 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.

[0032] It should also be noted that the descriptions such as "first," "second," and "third" appearing in the embodiments of this application do not have a specific meaning (such as no order, nor do they indicate a special limitation on the number of devices in the embodiments of this application), but are merely for the purpose of clearly describing the embodiments of this application and do not constitute any limitation on the embodiments of this application.

[0033] Before providing a further detailed description of the embodiments of this application, the nouns and terms that may be involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0034] H.266 / Versatile Video Coding (VVC);

[0035] VVC's reference software testing platform (VVC Test Model, VTM);

[0036] Enhanced Compression Model (ECM);

[0037] Joint Video Experts Team (JVET);

[0038] Block Vector (BV);

[0039] Intra Block Copy (IBC);

[0040] Coding Unit (CU);

[0041] Intra Prediction Mode (IPM);

[0042] Coding Tree Unit (CTU);

[0043] Cross component prediction merge mode (CCP Merge); Cross component prediction merge mode can also be described as a merged cross component prediction mode;

[0044] Adaptive loop filter convolutional cross component model (ALF-CCCM) technique in the loop filtering stage;

[0045] Sample Adaptive Offset (SAO) filtering;

[0046] Adaptive Loop Filter (ALF).

[0047] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies or terms of the embodiments of this application are described below. The following relevant technologies or terms are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and all of them fall within the protection scope of the embodiments of this application.

[0048] (1) ALF-CCCM:

[0049] ALF-CCCM is a cross-component filtering mode in the loop filtering stage. It differs from current adaptive loop filters in that it is a cross-component filtering technique where the decoder trains online to obtain the adaptive filter parameters. In related SAO or ALF filters, the adaptive coefficients can be trained by the encoder and transmitted through the bitstream, or they can be pre-trained fixed filter coefficients used by the encoder and decoder. ALF-CCCM, however, relies on the reconstructed luminance and chrominance values ​​from a certain stage of the loop filtering to obtain one or more sets of ALF-CCCM filter coefficients. In another stage of the loop filtering, the reconstructed luminance value is used as the input to the ALF-CCCM filter to generate a compensated chrominance reconstructed value or correction value.

[0050] The ALF-CCCM technology was first proposed in JVET-AJ0173, and its flowchart is shown in Figure 1. In Figure 1, CCCM Filter Derivation and CCCM Filtering are the operations that ALF-CCCM needs to perform, including the CCCM filter coefficient derivation process and the CCCM filter filtering process, respectively. ALF-CCCM uses an optimization algorithm to fit the outputs of the luminance SAO filter and the chrominance SAO filter to obtain one or more sets of adaptive filtering parameters that can obtain the luminance SAO reconstruction to the chrominance SAO reconstruction. Then, after the luminance component is filtered by ALF, the output result of the luminance ALF is input into one or more sets of filters fitted by the SAO output to obtain the chrominance reconstructed value or compensation value, which is used to compensate for the chrominance SAO reconstructed value.

[0051] The advantages of the aforementioned ALF-CCCM are that the ALF luminance compensation process can be used to guide chrominance filtering, and the adaptive filtering coefficients of ALF-CCCM do not need to be transmitted through the bitstream. The disadvantage is that both chrominance ALF and CCALF filtering can only be performed after the ALF luminance and ALF-CCCM filtering are completed, which exacerbates the parallel pressure on the loop filtering stage. In exploratory experiments, ALF-CCCM was further improved as shown in Figure 2.

[0052] In Figure 2, ALF-CCCM still uses the output of ALF brightness as input, generating an effect and correction value that is accumulated on the output of CC-ALF. The advantage of doing this is that, compared with Figure 1, it improves the parallelism to a certain extent.

[0053] In summary, ALF-CCCM obtains a method for fitting luminance compensation values ​​or chrominance reconstruction values ​​by using luminance reconstruction values ​​in the loop filtering stage at the decoding end, based on the luminance and chrominance reconstruction information.

[0054] When using ALF-CCCM in different video formats, it may be necessary to downsample the reconstructed image and reconstructed block of the luminance component to the same size as the reconstructed image and reconstructed block of the chrominance component, based on the relationship between luminance and chrominance, and then perform the process of deriving or implementing ALF-CCCM filtering coefficients.

[0055] In the existing design of ALF-CCCM, if a coding tree unit selects the ALF-CCCM filtering mode, the partitioning method of the current coding tree unit is determined. Based on the selected partition, the CCCM filtering coefficients corresponding to the sub-blocks under each partition are further calculated. In ALF-CCCM, the defined partition can be one of the following: 4x4, 8x2, 2x8, 8x8, 16x16, 32x32, 64x64, or 128x128. Based on the filtering coefficients of each corresponding sub-block, filtering is performed using the derived ALF-CCCM model.

[0056] It should be noted that in the relevant design, the ALF-CCCM of the coding tree unit is discarded after use and the filter coefficient is not saved.

[0057] In the design of ALF-CCCM, a coding tree unit can select one shape from eight defined filter modes to derive coefficients and filters. The bitstream indicates which filter mode from the table below is used and the partitioning method of the coding tree unit. The filter coefficients are not directly indicated in the bitstream and need to be derived by the decoder. The eight filter modes are shown in Table 1 below:

[0058] Table 1

[0059] Models 0 through 7 represent eight filtering modes, as shown in Figure 3.

[0060] center represents the brightness (downsampling) position corresponding to the current chroma filtering position.

[0061] "north" indicates the position above the current chroma filter position's luminance (downsampling) position.

[0062] south indicates the position below the current chroma filter position (downsampled position).

[0063] "west" indicates the position to the left of the current chroma filter position's luminance (downsampling) position.

[0064] "east" indicates the position to the right of the luminance (downsampling) position corresponding to the current chroma filter position.

[0065] north-west indicates the position to the upper left of the brightness (downsampling) position corresponding to the current chroma filtering position.

[0066] north-east indicates the position to the upper right of the brightness (downsampled) position corresponding to the current chroma filter position.

[0067] south-west indicates the position to the lower left of the brightness (downsampling) position corresponding to the current chroma filter position.

[0068] south-east indicates the position to the lower right of the brightness (downsampled) position corresponding to the current chroma filter position.

[0069] nonlinear represents the value obtained by nonlinear calculation of the reconstructed value of the luminance (downsampled) position at the current chroma filtering position.

[0070] bias represents a constant.

[0071] It can be seen that the inputs for the above eight filtering modes are different when deriving the filtering coefficients.

[0072] It should be noted that the filter shapes and partition sizes of the two ALF-CCCM architectures listed above are existing settings. ALF-CCCM should refer more broadly to cross-component filtering techniques used in the loop filtering stage, especially cross-component filtering techniques where the filter coefficients do not need to be transmitted in the bitstream.

[0073] (2) CCP Merge:

[0074] In intra-frame prediction, inter-frame prediction, and IBC each employ cross-component prediction merging techniques. In intra-frame prediction mode, cross-component prediction utilizes the reconstructed luminance and chrominance data in the spatial domain to fit a linear or non-linear model. Then, the luminance reconstruction value of the current block is used as the model input to predict the chrominance block, and the cross-component model used for prediction is saved for reuse in subsequent chrominance block predictions. In inter-frame or IBC prediction modes, cross-component prediction can use luminance and chrominance blocks obtained through motion compensation and block vector compensation to fit a linear or non-linear model. After the luminance block is reconstructed, the luminance reconstruction block is used as the model input to predict the chrominance block, and the cross-component model used for prediction is saved for reuse in subsequent chrominance block predictions.

[0075] The reuse of the aforementioned prediction models is specifically determined in the cross-component prediction merging mode. The cross-component prediction merging mode constructs a merging list by searching for the saved adjacent spatial cross-component prediction models, non-adjacent spatial cross-component prediction models, temporal cross-component prediction models, historically stored cross-component prediction models, and predefined cross-component prediction models for the current chroma block. It then selects the model most suitable for the current chroma block from the merged models for cross-component chroma prediction. Whether in intra-frame, inter-frame, or IBC modes, the cross-component merging mode uses the saved models directly applied to the luma reconstruction block to obtain the predicted value of the chroma block. Sometimes, these predicted values ​​can be further weighted with the prediction results of other prediction modes to obtain the final prediction.

[0076] Similar to ALF-CCCM, due to video format, the luminance and chrominance images may have size differences. Sometimes, cross-component prediction and cross-component merging mode prediction also require downsampling the luminance reconstruction block to align the size of the chrominance block.

[0077] The inventors of this application discovered in their research and analysis that in cross-component prediction merging mode (specifically, but not limited to intra-frame, inter-frame, or IBC type block cross-component prediction merging mode), the cross-component prediction model obtained in the temporal domain is the cross-component prediction model selected by the reference block at several positions defined in the reference image. These cross-component models are the cross-component prediction models used and saved by the reference block in the prediction stage, which does not include the cross-component filtering model used by ALF-CCCM in the filtering process.

[0078] This application provides an encoding / decoding method.

[0079] This application provides an encoding method, namely, determining first cross-component filtering model information; predicting the current block based on the first cross-component filtering model information; and determining the predicted value of the current block. This application also provides a decoding method, namely, determining first cross-component filtering model information; predicting the current block based on the first cross-component filtering model information; and determining the predicted value of the current block.

[0080] It is understandable that, whether at the encoding or decoding end, the information from the cross-component filtering model is used to predict the current block, and the predicted value of the current block is determined based on this. This helps to improve the accuracy of the predicted value of the current block, thereby enhancing the performance of video encoding and decoding.

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

[0082] Figure 4 is a schematic diagram of a video encoding and decoding network architecture provided in an embodiment of this application. As shown in Figure 4, the network architecture includes one or more electronic devices 31 to 3N and a communication network 01, wherein the electronic devices 31 to 3N can perform video interaction through the communication network 01. The electronic devices can be various types of devices with video encoding and decoding capabilities, such as mobile phones, tablets, personal computers, personal digital assistants, navigators, digital phones, video phones, televisions, sensing devices, servers, etc., and this embodiment of the application does not limit the scope of the application.

[0083] This application provides a network architecture for a video encoding / decoding system that includes decoding and encoding methods. The decoder or encoder in this application can be the aforementioned electronic device, or the aforementioned electronic device may include a decoder or encoder. In other words, the electronic device in this application has video encoding / decoding capabilities and generally includes a video encoder (i.e., encoder) and a video decoder (i.e., decoder).

[0084] Figure 5 is a schematic block diagram of an encoder provided in an embodiment of this application. As shown in Figure 5, the encoder 100 may include: a mode selection and control logic unit 101, an intra-frame prediction unit 102, an inter-frame prediction unit 103, a transform and quantization unit 104, an encoding unit 105, an inverse quantization and inverse transform unit 106, a loop filtering unit 107, and a decoded image buffer unit 108, etc. The mode selection and control logic unit 101 is mainly used for encoding mode selection and control logic at the encoding end, such as bit rate control and quantization parameter (QP), etc. The loop filtering unit 107 can implement deblocking filtering, sample adaptive offset (SAO) filtering, and adaptive loop filter (ALF), etc. The encoding unit 105 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC).For the input raw video, 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 104, including transforming the residual information from the pixel domain to the transform domain and quantizing the resulting transform coefficients to further reduce the bit rate. The intra-frame prediction unit 102 is used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame prediction unit 102 is used to determine the intra-frame prediction mode to be used to encode the video coding block. The inter-frame prediction unit 103 (including a motion estimation unit and a motion compensation unit) is used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by the motion estimation unit is a process of generating motion vectors, which can estimate the motion of the video coding block. Then, the motion compensation unit performs motion estimation based on the motion vectors determined by the motion estimation unit 105. Motion compensation is performed; after determining the intra-frame prediction mode, the intra-frame prediction unit 102 is also used to provide the selected intra-frame prediction data to the coding unit 105, and the inter-frame prediction unit 103 also sends the calculated motion vector data to the coding unit 105; in addition, the inverse quantization and inverse transform unit 106 is used to reconstruct the video coding block, reconstructing the residual block in the pixel domain, removing block artifacts through the loop filtering unit 107, and then adding the reconstructed residual block to a predictive block in the frame of the decoding image buffer unit 108 to generate the reconstructed video coding block; the coding unit 105 is used to encode various coding parameters and quantized residual coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode, outputting the video bitstream; and the decoding image buffer unit 108 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 108.

[0085] Furthermore, encoder 100 may be a first memory having a first processor and a computer program for recording. When the first processor reads and runs the computer program, encoder 100 reads the input video and generates a corresponding bitstream. Alternatively, encoder 100 may also be a computing device having one or more chips. These units, implemented as integrated circuits on the chips, have similar connection and data exchange functions to the corresponding units in Figure 5.

[0086] Figure 6 is a schematic block diagram of a decoder system provided in an embodiment of this application. As shown in Figure 6, the decoder 250 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. Here, the input of the decoder 250 is a bitstream representing a compressed version of a video or a still image, and the output of the decoder 250 can be a decoded video composed of a series of images or a decoded still image.

[0087] The decoding unit 201 can perform header information decoding and CABAC decoding, while the filtering unit 205 can perform deblocking filtering and SAO filtering. After the input video signal is encoded, a bitstream of the video signal is output. This bitstream is input into the decoder 250, first passing through the decoding unit 201 to obtain the decoded transform coefficients. These 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 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 this prediction information... The measurement 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-frame 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-frame prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal.

[0088] Furthermore, decoder 250 can be a second memory having a second processor and a computer program for recording. When the first processor reads and runs the computer program, decoder 250 reads the input bitstream and generates the corresponding decoded video. Alternatively, decoder 250 can also be a computing device having one or more chips. These units, implemented as integrated circuits on the chips, have similar connection and data exchange functions to the corresponding units in Figure 6.

[0089] It should also be noted that when the embodiments of this application are applied to the encoder 100, the "current block" specifically refers to the block to be encoded in the video image (which can also be simply referred to as the "encoded block"); when the embodiments of this application are applied to the decoder 250, the "current block" specifically refers to the block to be decoded in the video image (which can also be simply referred to as the "decoded block").

[0090] This application provides a decoding method that is applied to a decoder.

[0091] Figure 7 is a schematic diagram of the implementation flow of the decoding method provided in the embodiment of this application. As shown in Figure 7, the method may include the following steps 701 to 702:

[0092] Step 701: Determine the information of the first cross-component filtering model;

[0093] Step 702: Predict the current block based on the information from the first cross-component filtering model, and determine the predicted value of the current block.

[0094] It is understood that in the embodiments of this application, the current block is predicted using cross-component filtering model information, and the predicted value of the current block is determined based on this; thus, it is beneficial to improve the accuracy of the predicted value of the current block, thereby enhancing the video decoding performance.

[0095] The following sections will describe further optional implementation methods for each of the above steps, as well as related terms.

[0096] Step 701: Determine the information of the first cross-component filtering model.

[0097] It should be noted that the first cross-component filtering model information can also be described as information about the first cross-component filtering model. In some embodiments, the first cross-component filtering model information includes the type and / or model coefficients of the first cross-component filtering model. The model coefficients of the first cross-component filtering model can also be described as model parameters, filter parameters, or filter coefficients, etc. The type of the first cross-component filtering model can also be described as the filter mode. In one possible implementation, the type of the first cross-component filtering model can be one or more of the eight modes shown in Table 1.

[0098] It is understood that the first cross-component filtering model information refers to the information of the cross-component filtering model used in the loop filtering. In the embodiments of this application, the information of the cross-component filtering model used in the loop filtering stage is used in the prediction stage of the current block, that is, the current block is predicted based on the first cross-component filtering model information, thereby determining the predicted value of the current block.

[0099] In this application embodiment, the method for determining the first cross-component filtering model information is not limited. In short, the determined first cross-component filtering model information is used to predict the current block.

[0100] In one possible implementation, as shown in Figure 8, step 701 may further include steps 801 and 802 as follows:

[0101] Step 801: Determine the candidate list for the current block, wherein the candidate model information includes cross-component filtering model information.

[0102] In this embodiment, the candidate list is not limited; in short, the candidate model information in the candidate list includes at least cross-component filtering model information. For example, the candidate list can be a merged mode list. Exemplarily, in some embodiments, when the prediction mode of the current block is a merged cross-component prediction mode (i.e., a cross-component prediction merged mode), the candidate list of the current block is determined, and this candidate list is a merged mode list.

[0103] In this embodiment of the application, the candidate list includes information on one or more cross-component filtering models, that is, the candidate list includes information on one or more cross-component filtering models.

[0104] Further, in some embodiments, step 801 includes: determining a candidate list of the current block based on the list length L; wherein L is greater than 1, or L is equal to 1. In embodiments of this application, the list length L can be predefined or can be the length indicated in the bitstream. That is, the decoding method further includes: parsing the bitstream to determine the value of the sixth syntax element; determining the list length L based on the value of the sixth syntax element; wherein the value of the sixth syntax element is used to indicate the list length of the candidate list.

[0105] Further, in some embodiments, step 801 includes: acquiring at least one cross-component filtering model information; and determining a candidate list for the current block based on the acquired at least one cross-component filtering model information.

[0106] Further, in some embodiments, step 801 includes: acquiring at least one cross-component filtering model information; determining a candidate list for the current block based on the acquired at least one cross-component filtering model information and the list length L; wherein L is greater than 1, or L is equal to 1.

[0107] In this embodiment of the application, the at least one cross-component filtering model information obtained may include: at least one predefined cross-component filtering model information and / or the cross-component filtering model information used by the reference image of the current block during loop filtering.

[0108] Furthermore, in some embodiments, obtaining at least one cross-component filtering model information includes: obtaining cross-component filtering model information used by the reference image of the current block during loop filtering. It should be understood that, in conjunction with one or more of the above embodiments, the cross-component filtering model information in the candidate list includes one or more cross-component filtering model information used by the reference image of the current block during loop filtering; wherein the reference image of the current block has been reconstructed.

[0109] To further improve the accuracy of the predicted values ​​for the current block, for example, in some embodiments, the cross-component filtering model information used by the reference image during loop filtering includes one or more of the following:

[0110] (1) Information on the cross-component filtering model used by the current block as a co-position block on the reference image during loop filtering;

[0111] (2) Information on the cross-component filtering model used by the adjacent blocks of the co-position block during loop filtering; it should be understood that the adjacent blocks of the co-position block can be described as the spatial adjacent blocks of the co-position block;

[0112] (3) Cross-component filtering model information used by the non-adjacent blocks of the co-position block during loop filtering; it should be understood that the non-adjacent blocks of the co-position block can be described as spatial non-adjacent blocks of the co-position block.

[0113] The list of merging modes may include one or more of the cross-component filtering model information described in (1)-(3) above.

[0114] It should be noted that, in the embodiments of this application, the reference image of the current block can be a single image (i.e., a single frame) or multiple images (i.e., multiple frames). In some embodiments, the reference image of the current block includes one or more images from the list of reference images of the current block.

[0115] In the embodiments of this application, the reference image list for the current block may have one or more elements. For example, when the current image is a bidirectional prediction inter-frame, the current block has two reference image lists, one of which includes one or more forward images; the other includes one or more backward images. When the current image is a unidirectional prediction inter-frame, the current block has one reference image list, which includes one or more forward images, or the reference image list includes one or more backward images. It should be understood that the current block is a block within the current image.

[0116] It should be noted that the method for determining the reference image of the current block is not limited in this embodiment. In one possible implementation, the reference image of the current block includes a co-located image of the current image, which is in the reference image list of the current block; wherein, the reference image list of the current block may have one or more elements. The co-located image may be a forward image or a backward image of the current image. In some embodiments, the co-located image refers to the image in the reference image list that is closest to the current image.

[0117] In another possible implementation of determining the reference image, the decoding method further includes: parsing the bitstream to determine the value of a first syntax element; determining the reference image based on the value of the first syntax element and the reference image list; wherein the value of the first syntax element is used to indicate the index of the reference image in the reference image list.

[0118] As mentioned earlier, the candidate list includes at least one or more cross-component filtering model information. In one possible implementation, the candidate list only includes cross-component filtering model information; in another possible implementation, the candidate list includes not only one or more cross-component filtering model information but also one or more cross-component prediction model information. Thus, since the candidate list includes both cross-component prediction model information and cross-component filtering model information, and these information serve as candidate model information for predicting the current block, the cross-component models in the candidate list are richer and more diverse. This is beneficial for obtaining more accurate prediction results when the current block uses cross-component prediction modes, thereby improving the compression performance of the encoder and the decoding performance of the decoder.

[0119] Of course, in another possible implementation, the model information candidates in the candidate list include cross-component filtering model information, and the model information candidates in the candidate list also include cross-component prediction model information and other information candidates. For example, the other information candidates include one or more motion vector information candidates, which include a reference image index and a motion vector (MV). In summary, the model information candidates in the candidate list at least include cross-component filtering model information.

[0120] Further, in some embodiments, step 801 includes: acquiring at least one cross-component filtering model information and at least one cross-component prediction model information; and determining a candidate list for the current block based on the acquired at least one cross-component filtering model information and at least one cross-component prediction model information.

[0121] Further, in some embodiments, step 801 includes: acquiring at least one cross-component filtering model information and at least one cross-component prediction model information; determining a candidate list for the current block based on the acquired at least one cross-component filtering model information and at least one cross-component prediction model information and the list length L; wherein L is greater than 1, or L is equal to 1.

[0122] It should be understood that the cross-component prediction model information can also be described as information about the cross-component prediction model, which includes the type and / or coefficients of the cross-component prediction model. The cross-component prediction model information refers to the information about the cross-component prediction model used in the prediction phase.

[0123] In one possible implementation, the cross-component prediction model information includes one or more of the following:

[0124] (1) Cross-component prediction model information of the adjacent blocks of the current block (i.e., the spatial adjacent blocks of the current block);

[0125] (2) Cross-component prediction model information of the non-adjacent blocks of the current block (i.e., the spatial non-adjacent blocks of the current block);

[0126] (3) Cross-component prediction model information of the current block in the reference image;

[0127] (4) Cross-component prediction model information of the adjacent blocks of the co-position block (i.e., the spatial adjacent blocks of the co-position block);

[0128] (5) Cross-component prediction model information of the non-adjacent blocks of the co-position block (i.e., the spatial non-adjacent blocks of the co-position block);

[0129] (6) Cross-component prediction model information of the first reference block pointed to by the MV of the current block;

[0130] (7) Cross-component prediction model information of the second reference block pointed to by the current block's BV;

[0131] (8) Cross-component prediction model information of the adjacent blocks of the first reference block (i.e., the spatial adjacent blocks of the first reference block);

[0132] (9) Cross-component prediction model information of non-adjacent blocks of the first reference block (i.e., spatial non-adjacent blocks of the first reference block);

[0133] (10) Cross-component prediction model information of the adjacent blocks of the second reference block (i.e., the spatial adjacent blocks of the second reference block);

[0134] (11) Cross-component prediction model information of non-adjacent blocks of the second reference block (i.e., spatial non-adjacent blocks of the second reference block);

[0135] (12) Predefined cross-component prediction model information;

[0136] (13) Historical cross-component prediction model information.

[0137] The candidate list may include one or more of the cross-component prediction model information described in (1)-(13) above.

[0138] It should be noted that, in the embodiments of this application, there is no limitation on the circumstances under which the decoding method described in the embodiments of this application is used. Taking the current block as including both chroma blocks and luma blocks as an example, the decoding method described in the embodiments of this application can be used for the chroma block when the type of the current block is an inter-frame prediction block, an intra-frame prediction block, or an IBC prediction block. Further, in some embodiments, the decoding method described in the embodiments of this application can be used for the chroma block of the current block when the prediction mode of the chroma block of the current block is a cross-component prediction mode (e.g., a merged cross-component prediction mode, i.e., a cross-component prediction merged mode); wherein, the cross-component prediction mode can be a cross-component prediction mode of an inter-frame prediction block, or the cross-component prediction mode can be a cross-component prediction mode of an intra-frame prediction block, or the cross-component prediction mode can also be a cross-component prediction mode of an IBC prediction block.

[0139] It should be noted that, in the embodiments of this application, the type of cross-component prediction mode is not limited; in short, it is sufficient to use the reconstructed value of one component to predict another component. Furthermore, in some embodiments, the cross-component prediction mode is a merged cross-component prediction mode, that is, a cross-component prediction merging mode.

[0140] In one possible implementation, determining the candidate list of the current block includes: determining the candidate list of the current block when the prediction mode of the current block is a cross-component prediction mode.

[0141] Furthermore, in some embodiments, when the prediction mode of the current block is a cross-component prediction mode, determining the candidate list of the current block includes: when the prediction mode of the current block is a merged cross-component prediction mode, determining the candidate list of the current block, wherein the candidate list is a merged mode list.

[0142] Furthermore, in some embodiments, the prediction mode of the current block can be indicated in the bitstream. That is, the decoding method further includes: parsing the bitstream to determine the prediction mode of the current block. Exemplarily, in some embodiments, parsing the bitstream to determine the prediction mode of the current block includes: parsing the bitstream to determine the value of a third syntax element; and determining the prediction mode of the current block based on the value of the third syntax element; wherein the value of the third syntax element is used to indicate the prediction mode of the current block.

[0143] Based on one or more of the above embodiments, further, in some embodiments, as shown in FIG9, determining the candidate list of the current block may include the following steps 901 to 903:

[0144] Step 901: Parse the bitstream and determine the value of the second syntax element;

[0145] The value of the second syntax element is used to indicate whether to obtain cross-component filtering model information from the reference image of the current block; or, the value of the second syntax element is used to indicate whether to use cross-component filtering model information to expand the candidate list (such as the merge mode list); or, the value of the second syntax element is used to indicate whether the candidate list (such as the merge mode list) uses cross-component filtering model information; or, the value of the second syntax element is used to indicate whether to enable saving the model information exported from the loop filtering stage to expand the cross-component candidate list (such as the merge mode list).

[0146] In this embodiment, the position of the value of the second syntax element in the bitstream is not limited, that is, the level of the second syntax element is not limited. The second syntax element can be parsed from SPS, PPS, VPS, APS, picture header, slice header, tile, or CTU. In other words, the second syntax element can be any one of the following levels: SPS (sequence level), PPS, VPS, APS, picture header (image level), slice header (slice level), tile, or CTU.

[0147] Taking the cross-component filtering model, which uses model information derived from ALF-CCCM, as an example, and using the SPS level shown in Table 2 as an example, a more detailed description will be provided:

[0148] Table 2

[0149] Here, sps_alf_cccm_saved_flag is an example of the second syntax element. sps_alf_cccm_saved_flag is used to indicate whether to enable saving the model information exported by ALF-CCCM to expand the list of merging modes across components. When the value of sps_alf_cccm_saved_flag is 1, it means that it is enabled; otherwise, it is 0, which means that it is not enabled. When this syntax element does not exist in the bitstream, it is disabled by default.

[0150] In another possible implementation, as shown in Table 3 below, the flag sps_alf_cccm_saved_flag can also depend on whether the current sequence has ALF-CCCM and merged cross-component prediction mode enabled. When the current sequence has these two tools enabled, the bitstream carries sps_alf_cccm_saved_flag.

[0151] Table 3

[0152] As shown in Table 3 above, sps_alf_cccm_saved_flag can be further distinguished as either saving the cross-component filtering model at all selected ALF-CCCM locations, or saving only the cross-component filtering model at locations where ALF-CCCM is partially selected but the cross-component prediction model is not selected.

[0153] Furthermore, `sps_alf_cccm_saved_flag` indicates whether saving the ALF-CCCM exported model to expand the cross-component merging mode list is enabled. A flag of 0 indicates that it is not enabled; a flag of 1 indicates that information of part of the ALF-CCCM model is saved; and a flag of 2 indicates that information of all ALF-CCCM models is saved. The default value is disabled when this syntax element is not present in the bitstream.

[0154] Step 902: If the value of the second syntax element is equal to the first value or the second value, obtain the cross-component filtering model information.

[0155] In one possible implementation, the value of the second syntax element is equal to 0 or 1. In this implementation, for example, the first value can be 0, indicating that cross-component filtering model information is obtained from the reference image of the current block, or that cross-component filtering model information is used to expand the merging pattern list, or that the merging pattern list uses cross-component filtering model information, or that the model information exported from the loop filtering stage is enabled to expand the cross-component merging pattern list; or, for example, the first value can also be 1, indicating that cross-component filtering model information is obtained from the reference image of the current block, or that cross-component filtering model information is used to expand the merging pattern list, or that the merging pattern list does not use cross-component filtering model information, or that the model information exported from the loop filtering stage is enabled to expand the cross-component merging pattern list.

[0156] In another possible implementation, the value of the second syntax element is equal to 0, 1, or 2; in this implementation, for example, the first value can be 1 and the second value can be 2; or, the first value is 2 and the second value is 1; both the first and second values ​​indicate that cross-component filtering model information is obtained from the reference image of the current block, or both the first and second values ​​indicate that cross-component filtering model information is used to expand the merging mode list, or both the first and second values ​​indicate that the merging mode list uses cross-component filtering model information, or both the first and second values ​​indicate that the model information exported from the loop filtering stage is enabled to expand the cross-component merging mode list;

[0157] In another possible implementation, the first value indicates / represents the cross-component filtering model information for all blocks of the current sequence, current image, or current slice, and the second value indicates / represents the cross-component filtering model information for a portion of the current sequence, current image, or current slice. For example, the first value is 1 and the second value is 2; or, the first value is 2 and the first value is 1. That is, both the first and second values ​​implicitly indicate that cross-component filtering model information is obtained from the reference image of the current block, or that the cross-component filtering model information is used to expand the merging pattern list, or that the merging pattern list uses the cross-component filtering model information, or that the model information derived from the loop filtering stage is enabled to expand the cross-component merging pattern list;

[0158] Step 903: Determine the candidate list for the current block based at least on the acquired cross-component filtering model information.

[0159] Furthermore, in some embodiments, step 903 includes: determining a candidate list for the current block based on the acquired cross-component filtering model information and the acquired cross-component prediction model information.

[0160] It should be understood that, in one or more of the above embodiments, in one implementation, the candidate list of the current block is determined when the prediction mode of the current block is a cross-component prediction mode and the value of the second syntax element is equal to either the first or the second value. In another implementation, the candidate list of the current block is determined when the prediction mode of the current block is a cross-component prediction mode. In yet another implementation, the candidate list of the current block is determined when the value of the second syntax element is equal to either the first or the second value.

[0161] In some embodiments, the decoding method further includes: parsing the bitstream to determine the value of a third syntax element; and parsing the bitstream to determine the value of a fourth syntax element.

[0162] Based on this, the step of parsing the code stream to determine the value of the second syntax element includes: parsing the code stream to determine the value of the second syntax element when the value of the third syntax element is equal to the third value and the value of the fourth syntax element is equal to the fourth value; wherein:

[0163] The third value is used to indicate the prediction mode of the current sequence, current image, or current slice, including cross-component prediction mode;

[0164] The fourth value is used to indicate the loop filtering mode of the current sequence, current image, or current slice, including cross-component filtering mode.

[0165] Furthermore, in some embodiments, the third value is used to indicate that the prediction mode of the current sequence, current image, or current slice includes a merged cross-component prediction mode (i.e., a cross-component prediction merging mode).

[0166] For example, in Table 3 above, in one possible implementation, `sps_alf_cccm_saved_flag` can also depend on whether the current sequence has ALF-CCCM and merged cross-component prediction modes enabled. `sps_alf_cccm_saved_flag` will only be transmitted in the bitstream when both tools are enabled. Here, `sps_ccp_merge_flag` in Table 3 can be understood as an example of a third syntax element, and `sps_alf_cccm_flag` can be understood as an example of a fourth syntax element.

[0167] Step 802: Determine a first model information candidate based on the candidate list; wherein the first model information candidate is used to predict the current block to determine the predicted value of the current block. For example, the first model information candidate includes the first cross-component filtering model information; or, for example, the first model information candidate includes cross-component prediction model information. That is, based on the candidate list, the selected first model information candidate may be cross-component filtering model information or cross-component prediction model information.

[0168] In this embodiment of the application, there is no limitation on the further implementation of step 802. The first model information candidate can be determined based on the indication information in the code stream or based on the template cost.

[0169] That is, in some embodiments, step 802 may further include: parsing the code stream to determine the value of the fifth syntax element; the value of the fifth syntax element is used to indicate the candidate index of model information in the candidate list; and selecting the indicated first model information candidate from the candidate list according to the value of the fifth syntax element.

[0170] It should be noted that, in this embodiment, the candidate list includes one or more model information candidates, which may include cross-component filtering model information, or the one or more model information candidates may include cross-component filtering model information and cross-component prediction model information. In this embodiment, the cross-component filtering model information corresponding to an index in the candidate list is referred to as a model information candidate, and the cross-component prediction model information corresponding to an index in the candidate list is also referred to as a model information candidate.

[0171] Furthermore, it should be noted that in the embodiment where the first indicated model information candidate is determined from the candidate list based on the value of the fifth syntax element, the model information candidates in the candidate list may be sorted according to certain rules. For example, the model information candidates in the candidate list may be arranged in ascending order of template cost, and are the first L or first P model information candidates with the smallest template cost; or, the model information candidates in the candidate list may be arranged in descending order of template cost, and are the first L or first P model information candidates with the largest template cost; where P is less than L, and both P and L are greater than 0. Based on this, the indicated first model information candidate is selected from the candidate list with a certain order of model information candidates according to the model information candidate index indicated by the value of the fifth syntax element. It should be understood that the indicated first model information candidate in the candidate list may correspond to cross-component filtering model information or cross-component prediction model information.

[0172] For example, in one possible implementation, a partially reconstructed region surrounding the current block is used as a template. Model information candidates are then used to make predictions on this template to determine the predicted value of the template. The predicted value of the template is compared with the known reconstructed values ​​of the template to calculate a distortion cost. Model information candidates are then sorted or shortened according to the distortion cost (i.e., template cost) from smallest to largest. Here, the distortion cost can be one or more of the following: Sum of Absolute Errors (SAD), Sum of Squared Errors (SSE), or Sum of Absolute Transform Errors (SATD). In embodiments where the distortion cost is multiple of SAD, SSE, or SATD, the distortion cost can be a weighted sum of at least two of the following errors: SAD, SSE, and SATD.

[0173] In some embodiments, step 802 may further include: determining the template cost of the model information candidates in the candidate list; and selecting the model information candidate with the minimum template cost as the first model information candidate. In this embodiment, a smaller template cost indicates a smaller prediction error for the template.

[0174] For example, in one possible implementation, a partially reconstructed region surrounding the current block is used as a template. Model information candidates are used to predict on this template to determine the predicted value of the template. The predicted value of the template is then compared with the known reconstructed values ​​of the template to calculate the distortion. The model information candidate corresponding to the minimum distortion cost is selected as the first model information candidate. Here, the distortion cost can be one or more of the following: Sum of Absolute Errors (SAD), Sum of Squared Errors (SSE), or Sum of Absolute Transform Errors (SATD). In embodiments where the distortion cost is multiple of SAD, SSE, or SATD, the distortion cost can be a weighted sum of at least two of the following errors: SAD, SSE, and SATD.

[0175] In some other embodiments, step 802 may further include: determining the template cost of the model information candidates in the candidate list; and selecting the model information candidate with the highest template cost as the first model information candidate. In this embodiment, a higher template cost indicates a smaller prediction error for the template.

[0176] Step 702: Predict the current block based on the information from the first cross-component filtering model, and determine the predicted value of the current block.

[0177] In this embodiment, the further implementation of step 702 is not limited. The prediction result of the first cross-component filtering model information for the current block can be directly used as the prediction value of the current block, or the prediction value of the current block can be further determined based on the prediction result of the first cross-component filtering model information for the current block.

[0178] That is, in some embodiments, step 702 may further include: performing cross-component prediction on the current block according to the first cross-component filtering model information to obtain the predicted value of the current block.

[0179] That is, in some other embodiments, as shown in FIG10, step 702 may further include the following steps 1001 to 1003:

[0180] Step 1001: Based on the first cross-component filtering model information, perform cross-component prediction on the current block to obtain the third predicted value of the current block.

[0181] For step 1001 or the above-described method of performing cross-component prediction on the current block based on the first cross-component filtering model information, in some embodiments, it may further include: predicting the chromaticity (e.g., Cr or Cb) of the current block based on the first cross-component filtering model information and the reconstructed luminance block of the current block.

[0182] For step 1001 or the above-described method of performing cross-component prediction on the current block based on the first cross-component filtering model information, in some other embodiments, it may further include: predicting the brightness of the current block based on the first cross-component filtering model information and the reconstructed chromaticity block (such as the reconstructed Cr block or the reconstructed Cb block) of the current block.

[0183] For step 1001 or the above-described step 1001, which involves performing cross-component prediction on the current block based on the first cross-component filtering model information, in some further embodiments, it may include: predicting the second chromaticity of the current block based on the first cross-component filtering model information and the reconstructed block of the first chromaticity of the current block. For example, the first chromaticity is Cr and the second chromaticity is Cb; or, for example, the first chromaticity is Cb and the second chromaticity is Cr.

[0184] Step 1002: Perform non-cross-component prediction on the current block to obtain the fourth prediction value of the current block.

[0185] In this embodiment, the non-cross-component prediction is not limited, and the non-cross-component prediction includes one or more of the following prediction modes: intra-frame prediction mode, inter-frame prediction mode, and IBC prediction mode. When the non-cross-component prediction includes at least two of the intra-frame prediction mode, inter-frame prediction mode, and IBC prediction mode, the fourth prediction value is the weighted sum of the prediction results of these at least two prediction modes for the current block.

[0186] Step 1003: Perform a weighted calculation on the third and fourth predicted values ​​of the current block to determine the predicted value of the current block.

[0187] In one implementation, the predicted value of the current block is the weighted sum of the third predicted value and the fourth predicted value.

[0188] In some embodiments, the decoding method further includes: decoding the bitstream to determine the residual value of the current block; and determining the reconstructed value of the current block based on the residual value of the current block and the predicted value of the current block.

[0189] In some embodiments, the decoding method further includes: caching cross-component filtering model information used by the current block during loop filtering for use by blocks of the image to be decoded during the prediction phase, for example as model information candidates in the candidate list of blocks of the image to be decoded.

[0190] Furthermore, there are no limitations on the implementation of caching the cross-component filtering model information used by the current block during loop filtering. In one implementation, to maximize the diversity of cross-component models in the prediction stage, the corresponding cross-component filtering model information is saved for any block that selects a cross-component filtering model (such as ALF-CCCM). To reduce the storage overhead caused by storing model information, in another implementation, caching the cross-component filtering model information used by the current block during loop filtering includes: caching the cross-component filtering model information used by the current block during loop filtering when the current block does not use a cross-component prediction mode during prediction; or caching the cross-component filtering model information used by the current block during loop filtering when there is no cross-component prediction model information for the current block in the cache.

[0191] In other embodiments, for a current block that uses both a cross-component prediction model (e.g., in the prediction phase) and a cross-component filtering model (e.g., in the loop filtering phase), one can be cached selectively, thereby saving caching overhead. For example, in some embodiments, the decoding method further includes: in another implementation, determining a first prediction error of the cross-component prediction model information of the current block; determining a second prediction error of the cross-component filtering model information of the current block; and caching the model information corresponding to the minimum prediction error between the first prediction error and the second prediction error.

[0192] Further, in some embodiments, determining the first prediction error and the second prediction error includes: obtaining a first prediction value and a second prediction value of the current block; wherein the first prediction value and the second prediction value are obtained by performing cross-component prediction on the current block based on cross-component prediction model information and cross-component filtering model information of the current block, respectively; determining the first prediction error based on the first prediction value and the first reconstructed value output by the current block during loop filtering; and determining the second prediction error based on the second prediction value and the first reconstructed value.

[0193] It should be noted that, in the embodiments of this application, the first reconstructed value is not limited, and the first reconstructed value can be the reconstructed value of the current block based on the output of any filter during the loop filtering stage. Furthermore, the first predicted value, the second predicted value, and the first reconstructed value of the current block are all sample values ​​of the same color component, which can be a luminance component or a chrominance component (such as a Cr component or a Cb component).

[0194] Further, in some other embodiments, determining the first prediction error and the second prediction error includes: performing cross-component prediction on the template of the current block based on the cross-component prediction model information of the current block to determine a fifth prediction value of the template; performing cross-component prediction on the template of the current block based on the cross-component filtering model information of the current block to determine a sixth prediction value of the template; determining the first prediction error based on the fifth prediction value and the second reconstructed value of the template; and determining the second prediction error based on the sixth prediction value and the second reconstructed value of the template.

[0195] It should be noted that, in the embodiments of this application, the second reconstructed value of the template can be a reconstructed value determined in the prediction stage, or a reconstructed value based on the output of any filter in the loop filtering stage. Furthermore, the fifth predicted value, the sixth predicted value, and the second reconstructed value of the template are all sample values ​​of the same color component, which can be a luminance component or a chrominance component (such as a Cr component or a Cb component).

[0196] In this embodiment, cross-component filtering model information can be cached by default, or the cross-component filtering model information can be indicated in the bitstream. In one possible implementation, the decoding method further includes: parsing the bitstream to determine the value of a second syntax element; and determining, based on the value of the second syntax element, whether to cache the cross-component filtering model information used by the current block during loop filtering.

[0197] For example, in some embodiments, the value of the second syntax element is used to indicate whether to cache cross-component filtering model information of the current sequence, the current image, or the current slice.

[0198] For example, in other embodiments, the value of the second syntax element is also used to indicate cross-component filtering model information for caching a portion or all of the current sequence, current image, or current slice.

[0199] This application provides an encoding method applied to an encoder.

[0200] Figure 11 is a schematic diagram of the implementation flow of the encoding method provided in the embodiment of this application; as shown in Figure 11, the method includes the following steps 1101 to 1102:

[0201] Step 1101: Determine the information of the first cross-component filtering model;

[0202] Step 1102: Predict the current block based on the information from the first cross-component filtering model, and determine the predicted value of the current block.

[0203] It is understood that in the embodiments of this application, the current block is predicted using cross-component filtering model information, and the predicted value of the current block is determined based on this. This is beneficial to improving the accuracy of the predicted value of the current block, thereby enhancing video compression performance and improving video coding performance.

[0204] The following sections will describe further optional implementation methods for each of the above steps, as well as related terms.

[0205] Step 1101: Determine the information of the first cross-component filtering model.

[0206] It should be noted that the first cross-component filtering model information can also be described as information about the first cross-component filtering model. In some embodiments, the first cross-component filtering model information includes the type and / or model coefficients of the first cross-component filtering model. The model coefficients of the first cross-component filtering model can also be described as model parameters, filter parameters, or filter coefficients, etc. The type of the first cross-component filtering model can also be described as the filter mode. In one possible implementation, the type of the first cross-component filtering model can be one or more of the eight modes shown in Table 1.

[0207] It is understood that the first cross-component filtering model information refers to the information of the cross-component filtering model used in the loop filtering. In the embodiments of this application, the information of the cross-component filtering model used in the loop filtering stage is used in the prediction stage of the current block, that is, the current block is predicted based on the first cross-component filtering model information, thereby determining the predicted value of the current block.

[0208] In this application embodiment, the method for determining the first cross-component filtering model information is not limited. In short, the determined first cross-component filtering model information is used to predict the current block.

[0209] In some embodiments, as shown in FIG12, step 1101 may include the following steps 1201 and 1202:

[0210] Step 1201: Determine the candidate list for the current block, wherein the candidate model information includes cross-component filtering model information;

[0211] In this embodiment of the application, the candidate list includes information on one or more cross-component filtering models, that is, the candidate list includes information on one or more cross-component filtering models.

[0212] Furthermore, in some embodiments, determining the candidate list of the current block may include: determining the candidate list of the current block according to the list length L; wherein L is greater than 1, or L is equal to 1. In the embodiments of this application, the list length L may be predefined or determined based on a rate-distortion optimization algorithm. For the list length L determined based on the rate-distortion optimization algorithm, in some embodiments, the encoding method further includes: determining the value of a sixth syntax element according to the list length; encoding the value of the sixth syntax element and writing the obtained encoded bits into the bitstream; wherein the value of the sixth syntax element is used to indicate the list length of the candidate list.

[0213] Furthermore, in some embodiments, determining the candidate list of the current block may include: obtaining at least one cross-component filtering model information; and determining the candidate list of the current block based on the obtained at least one cross-component filtering model information.

[0214] Furthermore, in some embodiments, determining the candidate list of the current block may include: acquiring at least one cross-component filtering model information; determining the candidate list of the current block based on the acquired at least one cross-component filtering model information and the list length L; wherein L is greater than 1, or L is equal to 1.

[0215] In this embodiment of the application, the at least one cross-component filtering model information obtained may include at least one predefined cross-component filtering model information and / or the cross-component filtering model information used by the reference image of the current block during loop filtering.

[0216] Furthermore, in some embodiments, obtaining at least one cross-component filtering model information includes: obtaining cross-component filtering model information used by the reference image of the current block during loop filtering. It should be understood that, in conjunction with one or more of the above embodiments, the cross-component filtering model information in the candidate list includes one or more cross-component filtering model information used by the reference image of the current block during loop filtering; wherein the reference image of the current block has been reconstructed.

[0217] To further improve the accuracy of the predicted values ​​for the current block, for example, in some embodiments, the cross-component filtering model information used by the reference image during loop filtering includes one or more of the following:

[0218] (1) Information on the cross-component filtering model used by the current block as a co-position block on the reference image during loop filtering;

[0219] (2) Information on the cross-component filtering model used by the adjacent blocks of the co-position block during loop filtering; it should be understood that the adjacent blocks of the co-position block can be described as the spatial adjacent blocks of the co-position block;

[0220] (3) Cross-component filtering model information used by the non-adjacent blocks of the co-position block during loop filtering; it should be understood that the non-adjacent blocks of the co-position block can be described as spatial non-adjacent blocks of the co-position block.

[0221] The candidate list may include one or more of the cross-component filtering model information described in (1)-(3) above.

[0222] It should be noted that, in the embodiments of this application, the reference image of the current block can be a single image (i.e., a single frame) or multiple images (i.e., multiple frames). In some embodiments, the reference image of the current block includes one or more images from the list of reference images of the current block.

[0223] In the embodiments of this application, the reference image list for the current block may have one or more elements. For example, when the current image is a bidirectional prediction inter-frame, the current block has two reference image lists, one of which includes one or more forward images; the other includes one or more backward images. When the current image is a unidirectional prediction inter-frame, the current block has one reference image list, which includes one or more forward images, or the reference image list includes one or more backward images. It should be understood that the current block is a block within the current image.

[0224] It should be noted that the method for determining the reference image of the current block is not limited in this embodiment. In one possible implementation, the reference image of the current block includes a co-located image of the current image, which is in the reference image list of the current block; wherein, the reference image list of the current block may have one or more elements. The co-located image may be a forward image or a backward image of the current image. In some embodiments, the co-located image refers to the image in the reference image list that is closest to the current image.

[0225] In another possible implementation of determining the reference image, the encoding method further includes: determining the value of a first syntax element based on the index of the reference image in the reference image list; encoding the value of the first syntax element and writing the obtained encoded bits into the bitstream; wherein the value of the first syntax element is used to indicate the index of the reference image in the reference image list.

[0226] In some embodiments, the reference image may be determined from the list of reference images using a rate-distortion optimization algorithm.

[0227] As mentioned earlier, the candidates include at least one or more cross-component filtering model information. In one possible implementation, the candidate list only includes cross-component filtering model information; in another possible implementation, the candidate list includes not only one or more cross-component filtering model information but also one or more cross-component prediction model information. Thus, since the candidate list includes both cross-component prediction model information and cross-component filtering model information, and these information serve as candidates for model information to predict the current block, the cross-component models in the candidate list are richer and more diverse. This is beneficial for obtaining more accurate prediction results when the current block uses cross-component prediction modes (such as cross-component prediction merging modes), thereby improving the encoder's compression performance and saving bitstream overhead.

[0228] Of course, in another possible implementation, the model information candidates in the candidate list include cross-component filtering model information, and the model information candidates in the candidate list also include cross-component prediction model information and other information candidates. For example, the other information candidates include one or more motion vector information candidates, which include a reference image index and a motion vector (MV). In summary, the model information candidates in the candidate list at least include cross-component filtering model information.

[0229] Furthermore, in some embodiments, determining the candidate list of the current block may include: acquiring at least one cross-component filtering model information and at least one cross-component prediction model information; and determining the candidate list of the current block based on the acquired at least one cross-component filtering model information and at least one cross-component prediction model information.

[0230] Further, in some embodiments, determining the candidate list of the current block may include: acquiring at least one cross-component filtering model information and at least one cross-component prediction model information; determining the candidate list of the current block based on the acquired at least one cross-component filtering model information and at least one cross-component prediction model information and the list length L; wherein, L is greater than 1, or L is equal to 1.

[0231] It should be understood that the cross-component prediction model information can also be described as information about the cross-component prediction model, which includes the type and / or coefficients of the cross-component prediction model. The cross-component prediction model information refers to the information about the cross-component prediction model used in the prediction phase.

[0232] In one possible implementation, the cross-component prediction model information includes one or more of the following:

[0233] (1) Cross-component prediction model information of the adjacent blocks of the current block (i.e., the spatial adjacent blocks of the current block);

[0234] (2) Cross-component prediction model information of the non-adjacent blocks of the current block (i.e., the spatial non-adjacent blocks of the current block);

[0235] (3) Cross-component prediction model information of the current block in the reference image;

[0236] (4) Cross-component prediction model information of the adjacent blocks of the co-position block (i.e., the spatial adjacent blocks of the co-position block);

[0237] (5) Cross-component prediction model information of the non-adjacent blocks of the co-position block (i.e., the spatial non-adjacent blocks of the co-position block);

[0238] (6) Cross-component prediction model information of the first reference block pointed to by the MV of the current block;

[0239] (7) Cross-component prediction model information of the second reference block pointed to by the current block's BV;

[0240] (8) Cross-component prediction model information of the adjacent blocks of the first reference block (i.e., the spatial adjacent blocks of the first reference block);

[0241] (9) Cross-component prediction model information of non-adjacent blocks of the first reference block (i.e., spatial non-adjacent blocks of the first reference block);

[0242] (10) Cross-component prediction model information of the adjacent blocks of the second reference block (i.e., the spatial adjacent blocks of the second reference block);

[0243] (11) Cross-component prediction model information of non-adjacent blocks of the second reference block (i.e., spatial non-adjacent blocks of the second reference block);

[0244] (12) Predefined cross-component prediction model information;

[0245] (13) Historical cross-component prediction model information.

[0246] The candidate list may include one or more of the cross-component prediction model information described in (1)-(13) above.

[0247] It should be noted that, in the embodiments of this application, there is no limitation on the circumstances under which the encoding method described in the embodiments of this application is used. Taking the current block as including both chroma blocks and luma blocks as an example, the encoding method described in the embodiments of this application can be used when the type of the current block is an inter-frame prediction block, an intra-frame prediction block, or an IBC prediction block. Further, in some embodiments, the encoding method described in the embodiments of this application can be used on the chroma block of the current block when the prediction mode of the chroma block of the current block is a cross-component prediction mode (such as a merged cross-component prediction mode); wherein, the cross-component prediction mode can be a cross-component prediction mode of an inter-frame prediction block, an intra-frame prediction block, or an IBC prediction block.

[0248] In one possible implementation, determining the candidate list of the current block includes: determining the candidate list of the current block when the prediction mode of the current block is a cross-component prediction mode.

[0249] Furthermore, in some embodiments, determining the candidate list of the current block when the prediction mode of the current block is a cross-component prediction mode includes: determining the candidate list of the current block when the prediction mode of the current block is a merged cross-component prediction mode, wherein the candidate list is a merged mode list.

[0250] Further, in some embodiments, the encoding method further includes: determining the prediction mode of the current block; determining the value of a third syntax element based on the prediction mode of the current block; encoding the value of the third syntax element and writing the obtained encoded bits into the bitstream. For example, in some embodiments, the value of the third syntax element is equal to a third value, which is used to indicate that the prediction mode of the current sequence includes a cross-component prediction mode (such as a merged cross-component prediction mode); or, in another embodiment, the third value is used to indicate that the prediction mode of the current image includes a cross-component prediction mode (such as a merged cross-component prediction mode); or, in yet another embodiment, the third value is used to indicate that the prediction mode of the current slice includes a cross-component prediction mode (such as a merged cross-component prediction mode).

[0251] In one possible implementation, the prediction mode of the current block can be determined by a rate-distortion optimization algorithm.

[0252] Step 1202: Determine a first model information candidate based on the candidate list; wherein the first model information candidate is used to predict the current block to determine the predicted value of the current block. For example, the first model information candidate includes the first cross-component filtering model information; or, for example, the first model information candidate includes cross-component prediction model information. That is, based on the candidate list, the selected first model information candidate may be cross-component filtering model information or cross-component prediction model information.

[0253] In this embodiment, the further implementation of step 1202 is not limited; the first model information candidate can be determined based on template cost or rate-distortion optimization algorithm. For the first model information candidate determined based on template cost, the encoder can indicate the index of the first model information candidate in the candidate list in the bitstream, or it can choose not to indicate it in the bitstream, and instead, the encoder and decoder can use the same method to determine the first model information candidate. For example, step 1202 can further include: determining the template cost of the model information candidate in the candidate list; and selecting the model information candidate corresponding to the minimum template cost as the first model information candidate. In this embodiment, the smaller the template cost, the smaller the prediction error of the template. The decoder also uses the same method to determine the first model information candidate.

[0254] For example, in one possible implementation, a partially reconstructed region surrounding the current block is used as a template. Model information candidates are used to predict on this template to determine the predicted value of the template. The predicted value of the template is then compared with the known reconstructed values ​​of the template to calculate the distortion. The model information candidate corresponding to the minimum distortion cost is selected as the first model information candidate. Here, the distortion cost can be one or more of the following: Sum of Absolute Errors (SAD), Sum of Squared Errors (SSE), or Sum of Absolute Transform Errors (SATD). In embodiments where the distortion cost is multiple of SAD, SSE, or SATD, the distortion cost can be a weighted sum of at least two of the following errors: SAD, SSE, and SATD.

[0255] For example, step 1202 may further include: determining the template cost of the model information candidates in the candidate list; and selecting the model information candidate with the highest template cost as the first model information candidate. In this embodiment, a higher template cost indicates a smaller prediction error for the template. The decoding end also uses the same method to determine the first model information candidate.

[0256] For the first model information candidate determined based on the rate-distortion optimization algorithm, the encoder can indicate the index of the first model information candidate in the candidate list in the bitstream.

[0257] In some embodiments, the encoding method further includes: determining the value of the fifth syntax element based on the model information candidate index of the first model information candidate in the candidate list; encoding the value of the fifth syntax element; and writing the obtained encoded bits into the bitstream.

[0258] It should be noted that, in the embodiments of this application, the candidate list includes one or more model information candidates, which include cross-component filtering model information, or the one or more model information candidates include cross-component filtering model information and cross-component prediction model information. In the embodiments of this application, the cross-component filtering model information corresponding to an index in the candidate list is referred to as a model information candidate, and the cross-component prediction model information corresponding to an index in the candidate list is also referred to as a model information candidate.

[0259] Additionally, it should be noted that the model information candidates in the candidate list can be sorted according to certain rules. For example, the model information candidates in the candidate list can be arranged in ascending order of template cost, and are the first L or first P model information candidates with the smallest template cost; or, the model information candidates in the candidate list can be arranged in descending order of template cost, and are the first L or first P model information candidates with the largest template cost; where P is less than L, and both P and L are greater than 0.

[0260] It should be understood that the first model information candidate indicated by the fifth syntax element may correspond to cross-component filtering model information or cross-component prediction model information in the candidate list.

[0261] For example, in one possible implementation, a partially reconstructed region surrounding the current block is used as a template. Model information candidates are then used to make predictions on this template to determine the predicted value of the template. The predicted value of the template is compared with the known reconstructed values ​​of the template to calculate a distortion cost. Model information candidates are then sorted or shortened according to the distortion cost (i.e., template cost) from smallest to largest. Here, the distortion cost can be one or more of the following: Sum of Absolute Errors (SAD), Sum of Squared Errors (SSE), or Sum of Absolute Transform Errors (SATD). In embodiments where the distortion cost is multiple of SAD, SSE, or SATD, the distortion cost can be a weighted sum of at least two of the following errors: SAD, SSE, and SATD.

[0262] Step 1102: Predict the current block based on the information from the first cross-component filtering model, and determine the predicted value of the current block.

[0263] In this embodiment, the further implementation of step 1102 is not limited. The prediction result of the first cross-component filtering model information for the current block can be directly used as the prediction value of the current block, or the prediction value of the current block can be further determined based on the prediction result of the first cross-component filtering model information for the current block.

[0264] That is, in some embodiments, step 1102 may further include: performing cross-component prediction on the current block according to the first cross-component filtering model information to obtain the predicted value of the current block.

[0265] That is, in some other embodiments, step 1102 may further include: performing cross-component prediction on the current block according to the first cross-component filtering model information to obtain a third predicted value of the current block; performing non-cross-component prediction on the current block to obtain a fourth predicted value of the current block; and performing a weighted operation on the third predicted value and the fourth predicted value of the current block to determine the predicted value of the current block.

[0266] In the two embodiments described above, the step of performing cross-component prediction on the current block based on the first cross-component filtering model information may further include, in some embodiments, predicting the chromaticity (e.g., Cr or Cb) of the current block based on the first cross-component filtering model information and the reconstructed luminance block of the current block.

[0267] In the two embodiments described above, the step of performing cross-component prediction on the current block based on the first cross-component filtering model information may further include, in some other embodiments, predicting the brightness of the current block based on the first cross-component filtering model information and the reconstructed chromaticity block (such as the reconstructed Cr block or the reconstructed Cb block) of the current block.

[0268] In the two embodiments described above, the step of performing cross-component prediction on the current block based on the first cross-component filtering model information may, in some other embodiments, include: predicting the second chromaticity of the current block based on the first cross-component filtering model information and the reconstructed block of the first chromaticity of the current block. For example, the first chromaticity is Cr and the second chromaticity is Cb; or, for example, the first chromaticity is Cb and the second chromaticity is Cr.

[0269] The fourth predicted value of the current block is obtained by performing non-cross-component prediction on the current block as described above.

[0270] In this embodiment, the non-cross-component prediction is not limited, and the non-cross-component prediction includes one or more of the following prediction modes: intra-frame prediction mode, inter-frame prediction mode, and IBC prediction mode. When the non-cross-component prediction includes at least two of the intra-frame prediction mode, inter-frame prediction mode, and IBC prediction mode, the fourth prediction value is the weighted sum of the prediction results of these at least two prediction modes for the current block.

[0271] The weighted operation described above on the third and fourth predicted values ​​of the current block is used to determine the predicted value of the current block.

[0272] In one implementation, the predicted value of the current block is the weighted sum of the third predicted value and the fourth predicted value.

[0273] In some embodiments, the encoding method further includes: determining the residual value of the current block based on the predicted value of the current block and the original value of the current block; and generating a bitstream based on the residual value of the current block.

[0274] In some embodiments, the encoding method further includes: caching cross-component filtering model information used by the current block during loop filtering for use by blocks of the image to be encoded during the prediction stage, for example as model information candidates in a candidate list of blocks of the image to be encoded.

[0275] Furthermore, there are no limitations on the implementation of caching the cross-component filtering model information used by the current block during loop filtering. In one implementation, to maximize the diversity of cross-component models in the prediction stage, the corresponding cross-component filtering model information is saved for any block that selects a cross-component filtering model (such as ALF-CCCM). To reduce the storage overhead caused by storing model information, in another implementation, caching the cross-component filtering model information used by the current block during loop filtering includes: caching the cross-component filtering model information used by the current block during loop filtering when the current block does not use a cross-component prediction mode during prediction; or caching the cross-component filtering model information used by the current block during loop filtering when there is no cross-component prediction model information for the current block in the cache.

[0276] In other embodiments, for a current block that uses both a cross-component prediction model (e.g., in the prediction phase) and a cross-component filtering model (e.g., in the loop filtering phase), one can be cached selectively to save caching overhead. For example, in some embodiments, the encoding method further includes: in another implementation, determining a first prediction error of the cross-component prediction model information of the current block; determining a second prediction error of the cross-component filtering model information of the current block; and caching the model information corresponding to the minimum prediction error between the first prediction error and the second prediction error.

[0277] Further, in some embodiments, determining the first prediction error and the second prediction error includes: obtaining a first prediction value and a second prediction value of the current block; wherein the first prediction value and the second prediction value are obtained by performing cross-component prediction on the current block based on cross-component prediction model information and cross-component filtering model information of the current block, respectively; determining the first prediction error based on the first prediction value and the first reconstructed value output by the current block during loop filtering; and determining the second prediction error based on the second prediction value and the first reconstructed value.

[0278] It should be noted that, in the embodiments of this application, the first reconstructed value is not limited, and the first reconstructed value can be the reconstructed value of the current block based on the output of any filter during the loop filtering stage. Furthermore, the first predicted value, the second predicted value, and the first reconstructed value of the current block are all sample values ​​of the same color component, which can be a luminance component or a chrominance component (such as a Cr component or a Cb component).

[0279] Further, in some other embodiments, determining the first prediction error and the second prediction error includes: performing cross-component prediction on the template of the current block based on the cross-component prediction model information of the current block to determine a fifth prediction value of the template; performing cross-component prediction on the template of the current block based on the cross-component filtering model information of the current block to determine a sixth prediction value of the template; determining the first prediction error based on the fifth prediction value and the second reconstructed value of the template; and determining the second prediction error based on the sixth prediction value and the second reconstructed value of the template.

[0280] It should be noted that, in the embodiments of this application, the second reconstructed value of the template can be a reconstructed value determined in the prediction stage, or a reconstructed value based on the output of any filter in the loop filtering stage. Furthermore, the fifth predicted value, the sixth predicted value, and the second reconstructed value of the template are all sample values ​​of the same color component, which can be a luminance component or a chrominance component (such as a Cr component or a Cb component).

[0281] In this embodiment, cross-component filtering model information can be cached by default, or the code stream can indicate whether to cache cross-component filtering model information. In one possible implementation, the encoding method further includes: determining the value of a second syntax element; encoding the value of the second syntax element and writing the obtained encoded bits into the code stream; wherein the value of the second syntax element is used to indicate whether to cache cross-component filtering model information used in loop filtering.

[0282] For example, in some embodiments, the value of the second syntax element is used to indicate whether to cache cross-component filtering model information of the current sequence, the current image, or the current slice.

[0283] Furthermore, in some embodiments, the value of the second syntax element is also used to indicate cross-component filtering model information for caching a portion or all of the blocks of the current sequence, the current image, or the current slice.

[0284] In one possible implementation, the value of the second syntax element can be determined using a rate-distortion optimization algorithm.

[0285] In some embodiments, the value of the second syntax element is further used to indicate whether to obtain cross-component filtering model information from the reference image of the current block; or, the value of the second syntax element is used to indicate whether to use cross-component filtering model information to expand the candidate list; or, the value of the second syntax element is used to indicate whether the candidate list uses cross-component filtering model information; or, the value of the second syntax element is used to indicate whether to enable saving the model information exported from the loop filtering stage to expand the cross-component candidate list.

[0286] In summary, the value of the second syntax element is used to indicate one or more of the following:

[0287] (1) Whether to cache cross-component filtering model information;

[0288] (2) Whether to cache part of the current image or cache the cross-component filtering model information of all blocks of the current image;

[0289] (3) Whether to use cross-component filtering model information to expand the candidate list.

[0290] The option of whether to use cross-component filtering model information to expand the candidate list can be understood as "whether the candidate list uses cross-component filtering model information", or "whether to enable saving the model information exported from the loop filtering stage to expand the cross-component candidate list".

[0291] In this embodiment, the position of the value of the second syntax element in the bitstream is not limited, that is, the level of the second syntax element is not limited. The second syntax element can be parsed from SPS, PPS, VPS, APS, picture header, slice header, tile, or CTU. In other words, the second syntax element can be any one of the following levels: SPS (sequence level), PPS, VPS, APS, picture header (image level), slice header (slice level), tile, or CTU.

[0292] Taking the cross-component filtering model, which uses model information derived from ALF-CCCM, as an example, and using the SPS level shown in Table 2 as an example, a more detailed description will be provided:

[0293] Table 2

[0294] Here, sps_alf_cccm_saved_flag is an example of the second syntax element. sps_alf_cccm_saved_flag is used to indicate whether to enable saving the model information exported by ALF-CCCM to expand the list of merging modes across components. When the value of sps_alf_cccm_saved_flag is 1, it means that it is enabled; otherwise, it is 0, which means that it is not enabled. When this syntax element does not exist in the bitstream, it is disabled by default.

[0295] In another possible implementation, as shown in Table 3 below, the flag sps_alf_cccm_saved_flag can also depend on whether the current sequence has ALF-CCCM and merged cross-component prediction mode enabled. When the current sequence has these two tools enabled, the bitstream carries sps_alf_cccm_saved_flag.

[0296] Table 3

[0297] As shown in Table 3 above, sps_alf_cccm_saved_flag can be further distinguished as either saving the cross-component filtering model at all selected ALF-CCCM locations, or saving only the cross-component filtering model at locations where ALF-CCCM is partially selected but the cross-component prediction model is not selected.

[0298] Furthermore, `sps_alf_cccm_saved_flag` indicates whether saving the ALF-CCCM exported model to expand the cross-component merging mode list is enabled. A flag of 0 indicates that it is not enabled; a flag of 1 indicates that information of part of the ALF-CCCM model is saved; and a flag of 2 indicates that information of all ALF-CCCM models is saved. The default value is disabled when this syntax element is not present in the bitstream.

[0299] The value of the second syntax element determined by the rate-distortion optimization algorithm may be equal to the first value or the second value.

[0300] In one possible implementation, the value of the second syntax element is either 0 or 1. For example, the first value could be 0, indicating that the decoder needs to obtain cross-component filtering model information from the reference image of the current block, or that the decoder needs to use the cross-component filtering model information to expand the merging mode list, or that the decoder's merging mode list uses the cross-component filtering model information, or that the decoder needs to enable saving the model information exported from the loop filtering stage to expand the cross-component merging mode list. Alternatively, the first value could be 1, indicating that the decoder needs to obtain cross-component filtering model information from the reference image of the current block, or that the decoder needs to use the cross-component filtering model information to expand the merging mode list, or that the decoder's merging mode list uses the cross-component filtering model information, or that the decoder needs to enable saving the model information exported from the loop filtering stage to expand the cross-component merging mode list.

[0301] In another possible implementation, the value of the second syntax element is equal to 0, 1, or 2; in this implementation, for example, the first value can be 1 and the second value can be 2; or, the first value is 2 and the second value is 1; both the first and second values ​​are used to instruct the decoder to obtain cross-component filtering model information from the reference image of the current block, or, both the first and second values ​​are used to instruct the decoder to expand the merging mode list using cross-component filtering model information, or, both the first and second values ​​are used to instruct the decoder to use cross-component filtering model information in the merging mode list, or, both the first and second values ​​are used to instruct the decoder to enable the saving of model information derived from the loop filtering stage to expand the cross-component merging mode list;

[0302] In another possible implementation, the first value indicates / represents the cross-component filtering model information for all blocks of the current sequence, current image, or current slice, and the second value indicates / represents the cross-component filtering model information for a portion of the current sequence, current image, or current slice. For example, the first value is 1 and the second value is 2; or, the first value is 2 and the second value is 1. That is, both the first and second values ​​implicitly indicate that cross-component filtering model information is obtained from the reference image of the current block, or that the cross-component filtering model information is used to expand the merging pattern list, or that the merging pattern list uses the cross-component filtering model information, or that the model information derived from the loop filtering stage is enabled to expand the cross-component merging pattern list.

[0303] As mentioned earlier, in this embodiment, cross-component filtering model information can be cached by default, or the bitstream can indicate whether to cache cross-component filtering model information. In one possible implementation, the encoding method further includes: determining the value of a second syntax element; encoding the value of the second syntax element and writing the obtained encoded bits into the bitstream; wherein the value of the second syntax element is used to indicate whether to cache cross-component filtering model information used in loop filtering.

[0304] Furthermore, in some embodiments, the encoding process of the value of the second syntax element and the writing of the resulting encoded bits into the bitstream includes: encoding the value of the second syntax element and writing the resulting encoded bits into the bitstream when the prediction mode of the current sequence, current image, or current slice includes a cross-component prediction mode (such as a merged cross-component prediction mode) and the loop filtering mode of the current sequence, current image, or current slice includes a cross-component filtering mode. That is, the value of the second syntax element will only be transmitted in the bitstream when the prediction mode of the current sequence, current image, or current slice includes a cross-component prediction mode (such as a merged cross-component prediction mode) and the loop filtering mode of the current sequence, current image, or current slice includes a cross-component filtering mode.

[0305] For example, in Table 3 above, in one possible implementation, `sps_alf_cccm_saved_flag` can also depend on whether the current sequence has ALF-CCCM and merged cross-component prediction modes enabled. `sps_alf_cccm_saved_flag` will only be transmitted in the bitstream when both tools are enabled. Here, `sps_ccp_merge_flag` in Table 3 can be understood as an example of a third syntax element, and `sps_alf_cccm_flag` can be understood as an example of a fourth syntax element.

[0306] In some embodiments, the encoding method further includes: encoding the value of the fourth syntax element and writing the obtained encoded bits into the bitstream; wherein the value of the fourth syntax element is used to indicate the loop filtering mode.

[0307] For example, in some embodiments, the value of the fourth syntax element is equal to a fourth value, which is used to indicate that the loop filtering mode of the current sequence, the current image, or the current slice includes a cross-component filtering mode.

[0308] The above descriptions of the encoding method embodiments are essentially the same as those of the decoding method embodiments, except for the two differences mentioned above, and have similar beneficial effects. For technical details not disclosed in the encoding method embodiments of this application, please refer to the descriptions of the decoding method embodiments of this application for understanding.

[0309] The following examples illustrate possible implementation schemes of the encoding and decoding methods described in one or more of the above embodiments.

[0310] The inventors of this application discovered during their research and analysis that, in the merged cross-component prediction mode, the cross-component prediction model acquired in the temporal domain is the cross-component prediction model selected from reference blocks at several locations defined in the reference image. These cross-component models are the cross-component prediction models used and saved by the reference blocks during the prediction stage, and do not include the cross-component filtering model used by ALF-CCCM during the filtering process. It should be noted that, in the embodiments of this application, the merged cross-component prediction mode can also be described as a cross-component prediction merging mode, which includes, but is not limited to, cross-component prediction merging modes for intra-frame type blocks, inter-frame type blocks, or IBC type blocks.

[0311] In view of this, the following examples illustrate possible implementation schemes of the encoding and decoding methods. The descriptions in sections 1 to 4 below are merely for the purpose of clearly describing the implementation schemes and do not impose any restrictions on the execution order.

[0312] 1. Parse the bitstream and determine the prediction mode. The prediction mode includes the cross-component prediction mode to be merged. If the length of the preset cross-component prediction merging mode list is greater than 1, the index of the cross-component prediction merging mode should be further parsed when the cross-component prediction mode identifier is determined to be true.

[0313] 2. During the current image filtering stage of the loop, the CCCM model (i.e., an example of cross-component filtering model information) in the selected ALF-CCCM block is saved to the cache according to the filtering unit of ALF-CCCM. The filtering unit is NxM, which are specifically 4x4, 8x2, 2x8, 8x8, 16x16, 32x32, 64x64, and 128x128 in the existing ALF-CCCM.

[0314] 3. In subsequent inter-frame prediction frames, when the intra-frame prediction block or inter-frame prediction block in the frame selects the cross-component prediction mode prediction chroma block (CCP Merge), a merge mode list is constructed. The length of the merge mode list is L (L is a positive integer variable or a variable parsed from the bitstream). The L model information candidates in the process of constructing the merge mode list include at least one of spatially adjacent, spatially non-adjacent, temporal, historical, and default cross-component prediction models. When the model information candidates come from a temporal reference frame, the cross-component prediction model saved in the reference frame and the ALF-CCCM filtering model should be obtained from the cache in the temporal reference frame.

[0315] 4. After constructing a merged pattern list of length L, determine the first model information candidate to be applied to the current block prediction based on the merged list index (i.e., the model information candidate index) parsed from the bitstream. Then, predict the chroma of the current block based on the selected first model information candidate. The selected first model information candidate may be a cross-component prediction mode or a cross-component filtering model. The prediction process should include at least one of the following:

[0316] a) Directly use the reconstructed luminance block and the selected cross-component prediction model or cross-component filtering model to obtain the predicted value of the current chrominance block;

[0317] b) The prediction result obtained in a) is weighted with the prediction result determined by at least one of the prediction modes: intra-frame prediction mode, inter-frame prediction mode (MV-based prediction), and IBC prediction mode (BV-based prediction) to obtain the prediction value of the current chroma block.

[0318] ● In some implementations, the merged pattern list constructed in step 3 can be filtered, and the model information candidates in the list of length L can be sorted or further shortened into a merged pattern list of length P based on the sorting results. In step 4, the selected model is determined from the P model information candidates based on the parsed merged list index. The filtering method is template matching technology. By selecting a portion of the reconstructed area around the current block as a template, the model information candidates are used to make predictions on this template area. The prediction results are compared with the known reconstruction results to calculate the distortion cost. The list is sorted or shortened according to the distortion cost from smallest to largest. Here, the distortion cost can be one or more of the following: absolute error and SAD, sum of squared errors and SSE, absolute transformation error and SATD, etc.

[0319] ● In step 3, the temporal reference image used to construct the merged pattern list should be an image from the reference image list. For example, if the current frame is a bidirectional prediction inter-frame, there are two reference images in the reference image list; while if the current frame is a unidirectional prediction inter-frame, there is one reference image in the reference image list. The reference image mentioned here is at least one reference image from all reference lists. In particular, in some embodiments, since the characteristics of the current frame are often similar to those of its temporally close reference frames, the reference frame can be the closest forward or backward frame to the current frame, that is, the reference frame is a co-located image of the current frame.

[0320] ●Since this scheme needs to save more ALF-CCCM cross-component models for cross-component prediction, there will be additional storage overhead. (1) In some implementations, in order to maximize the diversity of models, the corresponding filtering model can be saved for any block where ALF-CCCM is selected; (2) In some implementations, in order to reduce the storage overhead of models, the cross-component filtering model can be saved for positions where the cross-component prediction model is not saved but the cross-component filtering model is selected. (3) In some implementations, an identifier can be transmitted in the bitstream to determine whether to save the ALF-CCCM model for all positions, or save the ALF-CCCM model for some positions, or not save it at all.

[0321] When constructing the merged mode list, the ALF-CCCM model can be determined from the temporal reference frame based on the read identifier. This identifier can be any of the following levels: SPS (sequence level), PPS, VPS, APS, picture header (image level), slice header (slice level), tile, or CTU. Here, we will use the SPS level as an example for a more specific description:

[0322] sps_alf_cccm_saved_flag indicates whether saving the model exported by ALF-CCCM to expand the cross-component merging mode list is enabled. When the flag is 1, it means enabled; otherwise, it is 0, meaning disabled. If this syntax element does not exist in the bitstream, it is disabled by default.

[0323] Sometimes, this flag should also depend on whether the current sequence has ALF-CCCM and cross-component prediction merging mode enabled. The sps_alf_cccm_saved_flag will only be transmitted in the bitstream if the current sequence has these two tools enabled.

[0324] As mentioned above, sometimes sps_alf_cccm_saved_flag can further distinguish whether to save the filtering model that selects all ALF-CCCM positions or only saves the filtering model that selects some ALF-CCCM positions but not the cross-component prediction part.

[0325] The `sps_alf_cccm_saved_flag` flag indicates whether saving ALF-CCCM exported models is enabled to expand the cross-component merging mode list. A flag of 0 indicates that it is not enabled; a flag of 1 indicates that some ALF-CCCM models are saved; and a flag of 2 indicates that all ALF-CCCM models are saved. This flag is disabled by default if it does not exist in the bitstream.

[0326] ● Due to the different implementation methods, the current frame and current position may require storing both the cross-component prediction model and the cross-component filtering model simultaneously, depending on the configuration of sps_alf_cccm_saved_flag. Therefore, when storing the filtering model, a separate area can be allocated for its storage. However, when configured to store the filtering model only at the corresponding position where the prediction mode is not stored, no additional storage needs to be allocated, and the prediction and filtering models can share the same storage area.

[0327] ● In some implementation methods, for the same block or region that selects the cross-component prediction mode in the prediction stage and the ALF-CCCM mode in the filtering stage, the prediction model or the filtering model can be saved in the corresponding block or region by using the prediction and filtering models simultaneously in the current region, generating the chromaticity prediction value from the luminance reconstruction value, and calculating the cost of the prediction value and the actual chromaticity reconstruction value.

[0328] It should be noted that in the above scheme, storing the cross-component prediction model or the cross-component filtering model can also be understood as storing cross-component prediction model information or cross-component filtering model information. The model information includes the model type and / or model coefficients.

[0329] It is understandable that the above scheme provides more cross-component models for the construction of the list of cross-component merging prediction modes (i.e., merging mode list construction). These models are derived from the cross-component loop filtering models selected in the ALF-CCCM stage. Because the cross-component models are richer and more diverse during list construction, more accurate prediction results can be obtained when the current block uses the cross-component merging prediction mode, thereby improving compression performance.

[0330] In some embodiments, when the ALF-CCCM mode is selected in the loop filtering stage, the selected ALF-CCCM model is saved in the cache. The scale of the saved model can be in units of NxM, with the filter model saved once every NxM blocks. N and M are positive integers, and NxM can be equal, such as 4x4 or 8x8. Alternatively, the scale can be related to the preset filter scale selected by ALF-CCCM. For example, under the current settings, the preset filter scales of ALF-CCCM are 4x4, 8x2, 2x8, 8x8, 16x16, 32x32, 64x64, and 128x128.

[0331] In some embodiments, when a merged cross-component prediction mode is selected in the current block, the constructed merged mode list may include ALF-CCCM models stored in the reference frame buffer as candidates for models in the current list.

[0332] In some embodiments, the bitstream may include an identifier indicating whether the technology is enabled.

[0333] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps; or steps from different embodiments may be combined into a new technical solution.

[0334] Based on the same inventive concept as the foregoing embodiments, this application provides an encoder; Figure 13 is a schematic diagram of the composition structure of the encoder provided in this application. As shown in Figure 13, the encoder 130 may include a first determining unit 1301 and a first predicting unit 1302, wherein:

[0335] The first determining unit 1301 is configured to determine the first cross-component filtering model information;

[0336] The first prediction unit 1302 is configured to predict the current block based on the first cross-component filtering model information and determine the predicted value of the current block.

[0337] In some embodiments, determining the first cross-component filtering model information includes: determining a candidate list for the current block, wherein the candidate list includes cross-component filtering model information; and determining a first model information candidate based on the candidate list, wherein the first model information candidate includes the first cross-component filtering model information.

[0338] Furthermore, in some embodiments, the cross-component filtering model information includes cross-component filtering model information used by the reference image of the current block during loop filtering.

[0339] Furthermore, in some embodiments, the cross-component filtering model information used by the reference image during loop filtering includes one or more of the following:

[0340] Information on the cross-component filtering model used by the current block's co-position block on the reference image during loop filtering;

[0341] The cross-component filtering model information used by adjacent blocks of the same block during loop filtering;

[0342] The cross-component filtering model information used by non-adjacent blocks of the same position block during loop filtering.

[0343] In some embodiments, the reference image includes one or more images from the reference image list of the current block.

[0344] For example, in some embodiments, the reference image includes a co-positioned image of the current image, which is in the list of reference images.

[0345] In some embodiments, as shown in FIG13, the encoder 130 further includes an encoding unit 1303; wherein, the first determining unit 1301 is further configured to determine the value of the first syntax element according to the index of the reference image in the reference image list; the encoding unit 1303 is configured to encode the value of the first syntax element and write the obtained encoded bits into the bitstream.

[0346] In some embodiments, the candidate model information in the candidate list may also include cross-component prediction model information.

[0347] In some embodiments, as shown in FIG13, the encoder 130 further includes a first cache unit 1304; wherein, the first cache unit 1304 is configured to cache cross-component filtering model information used by the current block during loop filtering.

[0348] Furthermore, in some embodiments, caching the cross-component filtering model information used by the current block during loop filtering includes: caching the cross-component filtering model information used by the current block during loop filtering when the current block does not use a cross-component prediction mode during prediction; or, caching the cross-component filtering model information used by the current block during loop filtering when the current block does not have cross-component prediction model information in the cache.

[0349] In some embodiments, as shown in FIG13, the encoder 130 further includes an encoding unit 1303; wherein the first determining unit 1301 is further configured to determine the value of a second syntax element; wherein the value of the second syntax element is used to indicate whether to cache cross-component filtering model information used in loop filtering; the encoding unit 1303 is configured to encode the value of the second syntax element and write the obtained encoded bits into the bitstream.

[0350] Furthermore, in some embodiments, the value of the second syntax element is used to indicate whether to cache cross-component filtering model information of the current sequence, the current image, or the current slice.

[0351] Furthermore, in some embodiments, the value of the second syntax element is also used to indicate cross-component filtering model information for caching a portion or all of the current sequence, current image, or current slice.

[0352] In some embodiments, as shown in FIG13, the encoder 130 further includes a first cache unit 1304; wherein, the first determining unit 1301 is further configured to determine a first prediction error of the cross-component prediction model information of the current block; and to determine a second prediction error of the cross-component filtering model information of the current block; the first cache unit 1304 is configured to cache the model information corresponding to the minimum prediction error among the first prediction error and the second prediction error.

[0353] Further, in some embodiments, determining the first prediction error and the second prediction error includes: obtaining a first prediction value and a second prediction value of the current block; wherein the first prediction value and the second prediction value are obtained by performing cross-component prediction on the current block based on cross-component prediction model information and cross-component filtering model information of the current block, respectively; determining the first prediction error based on the first prediction value and the first reconstructed value output by the current block during loop filtering; and determining the second prediction error based on the second prediction value and the first reconstructed value.

[0354] In some embodiments, determining the candidate list of the current block includes: determining the candidate list of the current block when the prediction mode of the current block is a cross-component prediction mode.

[0355] Furthermore, in some embodiments, determining the candidate list of the current block when the prediction mode of the current block is a cross-component prediction mode includes: determining the candidate list of the current block when the prediction mode of the current block is a merged cross-component prediction mode, wherein the candidate list is a merged mode list.

[0356] In some embodiments, as shown in FIG13, the encoder 130 further includes an encoding unit 1303; wherein, the first determining unit 1301 is further configured to determine the prediction mode of the current block; and determine the value of the third syntax element according to the prediction mode of the current block; the encoding unit 1303 is configured to encode the value of the third syntax element and write the obtained encoded bits into the bitstream.

[0357] For example, the value of the third syntax element is equal to the third value, which is used to indicate that the prediction mode of the current sequence, the current image, or the current slice includes a cross-component prediction mode (e.g., the cross-component prediction mode is a merged cross-component prediction mode).

[0358] In some embodiments, encoding the value of the second syntax element and writing the resulting encoded bits into the bitstream includes: encoding the value of the second syntax element and writing the resulting encoded bits into the bitstream when the prediction mode of the current sequence, current image, or current slice includes a cross-component prediction mode and the loop filtering mode of the current sequence, current image, or current slice includes a cross-component filtering mode.

[0359] In some embodiments, as shown in FIG13, the encoder 130 further includes an encoding unit 1303; wherein the encoding unit 1303 is configured to encode the value of the fourth syntax element and write the obtained encoded bits into the bitstream; wherein the value of the fourth syntax element is equal to the fourth value, and the fourth value is used to indicate that the loop filtering mode of the current sequence, the current image or the current slice includes a cross-component filtering mode.

[0360] In some embodiments, as shown in FIG13, the encoder 130 further includes an encoding unit 1303; wherein, the first determining unit 1301 is configured to determine the value of the fifth syntax element according to the model information candidate index in the candidate list of the first model information candidate; the encoding unit 1303 is configured to encode the value of the fifth syntax element and write the obtained encoded bits into the bitstream.

[0361] In some embodiments, predicting the current block based on the first cross-component filtering model information and determining the predicted value of the current block includes: performing cross-component prediction on the current block based on the first cross-component filtering model information to obtain the predicted value of the current block.

[0362] In other embodiments, the step of predicting the current block based on the first cross-component filtering model information and determining the predicted value of the current block includes: performing cross-component prediction on the current block based on the first cross-component filtering model information to obtain a third predicted value of the current block; performing non-cross-component prediction on the current block to obtain a fourth predicted value of the current block; and performing a weighted operation on the third and fourth predicted values ​​of the current block to determine the predicted value of the current block.

[0363] Furthermore, in some embodiments, the step of performing cross-component prediction on the current block based on the first cross-component filtering model information includes: predicting the chromaticity of the current block based on the first cross-component filtering model information and the reconstructed luminance block of the current block.

[0364] In some embodiments, as shown in FIG13, the encoder 130 further includes an encoding unit 1303; wherein, the first determining unit 1301 is further configured to determine the residual value of the current block based on the predicted value of the current block and the original value of the current block; the encoding unit 1303 is configured to generate a bitstream based on the residual value of the current block.

[0365] The description of the encoder embodiments above is similar to the description of the encoding / decoding method embodiments above, and has similar beneficial effects. For technical details not disclosed in the encoder embodiments of this application, please refer to the description of the encoding / decoding method embodiments of this application for understanding.

[0366] Figure 14 is a schematic diagram of the hardware structure of the encoder provided in an embodiment of this application. As shown in Figure 14, the encoder 140 may include: a first communication interface 1401, a first memory 1402, and a first processor 1403; the various components are coupled together through a first bus system 1404. It is understood that the first bus system 1404 is used to realize the connection and communication between these components. In addition to a data bus, the first bus system 1404 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 1404 in Figure 14.

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

[0368] The first memory 1402 is used to store computer programs that can run on the first processor 1403;

[0369] The first processor 1403 is configured to execute the encoding method described in the embodiments of this application when running the computer program.

[0370] It is understood that the first memory 1402 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 1402 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.

[0371] The first processor 1403 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 1403 or by instructions in software form. The first processor 1403 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 1402. The first processor 1403 reads the information in the first memory 1402 and completes the steps of the above method in conjunction with its hardware.

[0372] 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.

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

[0374] Based on the same inventive concept as the foregoing embodiments, FIG15 is a schematic diagram of the composition structure of the decoder provided in the embodiments of this application. As shown in FIG15, the decoder 150 may include a second determining unit 1501 and a second predicting unit 1502, wherein:

[0375] The second determining unit 1501 is configured to determine the first cross-component filtering model information;

[0376] The second prediction unit 1502 is configured to predict the current block based on the first cross-component filtering model information and determine the predicted value of the current block.

[0377] In some embodiments, determining the first cross-component filtering model information includes: determining a candidate list for the current block, wherein the candidate list includes cross-component filtering model information; and determining a first model information candidate based on the candidate list, wherein the first model information candidate includes the first cross-component filtering model information.

[0378] Furthermore, in some embodiments, the cross-component filtering model information includes cross-component filtering model information used by the reference image of the current block during loop filtering.

[0379] Furthermore, in some embodiments, the cross-component filtering model information used by the reference image during loop filtering includes one or more of the following:

[0380] Information on the cross-component filtering model used by the current block's co-position block on the reference image during loop filtering;

[0381] The cross-component filtering model information used by adjacent blocks of the same block during loop filtering;

[0382] The cross-component filtering model information used by non-adjacent blocks of the same position block during loop filtering.

[0383] In some embodiments, the reference image includes one or more images from the reference image list of the current block.

[0384] For example, in some embodiments, the reference image includes a co-positioned image of the current image, which is in the list of reference images.

[0385] In some embodiments, as shown in FIG15, the decoder 150 further includes a decoding unit 1503; wherein, the decoding unit 1503 is configured to parse the bitstream and determine the value of the first syntax element; the second determining unit 1501 is configured to determine the reference image based on the value of the first syntax element and the reference image list.

[0386] In some embodiments, the candidate model information in the candidate list may also include cross-component prediction model information.

[0387] In some embodiments, as shown in FIG15, the decoder 150 further includes a second cache unit 1504; wherein the second cache unit 1504 is configured to cache cross-component filtering model information used by the current block during loop filtering.

[0388] Furthermore, in some embodiments, caching the cross-component filtering model information used by the current block during loop filtering includes: caching the cross-component filtering model information used by the current block during loop filtering when the current block does not use a cross-component prediction mode during prediction; or, caching the cross-component filtering model information used by the current block during loop filtering when the current block does not have cross-component prediction model information in the cache.

[0389] In some embodiments, as shown in FIG15, the decoder 150 further includes a decoding unit 1503; wherein the decoding unit 1503 is configured to parse the bitstream and determine the value of the second syntax element; the second determining unit 1501 is further configured to determine whether to cache the cross-component filtering model information used by the current block in loop filtering based on the value of the second syntax element.

[0390] Furthermore, in some embodiments, the value of the second syntax element is used to indicate whether to cache cross-component filtering model information of the current sequence, the current image, or the current slice.

[0391] Furthermore, in some embodiments, the value of the second syntax element is also used to indicate cross-component filtering model information for caching a portion or all of the current sequence, current image, or current slice.

[0392] In some embodiments, as shown in FIG15, the decoder 150 further includes a second cache unit 1504; wherein the second determining unit 1501 is further configured to determine a first prediction error of the cross-component prediction model information of the current block; and to determine a second prediction error of the cross-component filtering model information of the current block; the second cache unit 1504 is configured to cache the model information corresponding to the minimum prediction error among the first prediction error and the second prediction error.

[0393] Further, in some embodiments, determining the first prediction error and the second prediction error includes: obtaining a first prediction value and a second prediction value of the current block; wherein the first prediction value and the second prediction value are obtained by performing cross-component prediction on the current block based on cross-component prediction model information and cross-component filtering model information of the current block, respectively; determining the first prediction error based on the first prediction value and the first reconstructed value output by the current block during loop filtering; and determining the second prediction error based on the second prediction value and the first reconstructed value.

[0394] In some embodiments, determining the candidate list of the current block includes: determining the candidate list of the current block when the prediction mode of the current block is a cross-component prediction mode.

[0395] Furthermore, in some embodiments, determining the candidate list of the current block when the prediction mode of the current block is a cross-component prediction mode includes: determining the candidate list of the current block when the prediction mode of the current block is a merged cross-component prediction mode, wherein the candidate list is a merged mode list.

[0396] Furthermore, in some embodiments, as shown in FIG15, the decoder 150 further includes a decoding unit 1503; wherein the decoding unit 1503 is configured to parse the bitstream and determine the prediction mode of the current block.

[0397] In some embodiments, determining the candidate list of the current block includes: parsing the bitstream to determine the value of a second syntax element; if the value of the second syntax element is equal to a first value or a second value, obtaining the cross-component filtering model information; and determining the candidate list of the current block based at least on the obtained cross-component filtering model information.

[0398] In some embodiments, the second syntax element is a sequence-level, image-level, or slice-level syntax element.

[0399] Furthermore, in some embodiments, the first value is used to indicate cross-component filtering model information for all blocks of the current sequence, current image, or current slice.

[0400] For example, in some embodiments, the second value is used to indicate cross-component filtering model information for a portion of the current sequence, current image, or current slice.

[0401] In some embodiments, as shown in FIG15, the decoder 150 further includes a decoding unit 1503; wherein the decoding unit 1503 is configured to parse the bitstream to determine the value of the third syntax element; and to parse the bitstream to determine the value of the fourth syntax element.

[0402] In some embodiments, parsing the bitstream to determine the value of the second syntax element includes: parsing the bitstream to determine the value of the second syntax element when the value of the third syntax element is equal to the third value and the value of the fourth syntax element is equal to the fourth value; wherein: the third value is used to indicate that the prediction mode of the current sequence, the current image, or the current slice includes a cross-component prediction mode; the fourth value is used to indicate that the loop filtering mode of the current sequence, the current image, or the current slice includes a cross-component filtering mode. For example, the cross-component prediction mode is a merged cross-component prediction mode.

[0403] In some embodiments, determining the first model information candidate based on the candidate list includes: parsing the code stream to determine the value of a fifth syntax element; the value of the fifth syntax element is used to indicate the index of the model information candidate in the candidate list; and selecting the indicated first model information candidate from the candidate list based on the value of the fifth syntax element.

[0404] In some embodiments, predicting the current block based on the first cross-component filtering model information and determining the predicted value of the current block includes: performing cross-component prediction on the current block based on the first cross-component filtering model information to obtain the predicted value of the current block.

[0405] In other embodiments, the step of predicting the current block based on the first cross-component filtering model information and determining the predicted value of the current block includes: performing cross-component prediction on the current block based on the first cross-component filtering model information to obtain a third predicted value of the current block; performing non-cross-component prediction on the current block to obtain a fourth predicted value of the current block; and performing a weighted operation on the third and fourth predicted values ​​of the current block to determine the predicted value of the current block.

[0406] Furthermore, in some embodiments, the step of performing cross-component prediction on the current block based on the first cross-component filtering model information includes: predicting the chromaticity of the current block based on the first cross-component filtering model information and the reconstructed luminance block of the current block.

[0407] In some embodiments, as shown in FIG15, the decoder 150 further includes a decoding unit 1503; wherein the decoding unit 1503 is configured to parse the bitstream and determine the residual value of the current block; the second determining unit 1501 is further configured to determine the reconstructed value of the current block based on the predicted value of the current block and the residual value of the current block.

[0408] The description of the decoder embodiments above is similar to the description of the encoding / decoding method embodiments above, and has similar beneficial effects. For technical details not disclosed in the decoder embodiments of this application, please refer to the description of the encoding / decoding method embodiments of this application for understanding.

[0409] 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.

[0410] Figure 16 is a schematic diagram of the hardware structure of the decoder provided in an embodiment of this application. As shown in Figure 16, the decoder 160 may include: a second communication interface 1601, a second memory 1602, and a second processor 1603; the various components are coupled together through a second bus system 1604. It is understood that the second bus system 1604 is used to realize the connection and communication between these components. In addition to a data bus, the second bus system 1604 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 1604 in Figure 16.

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

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

[0413] The second processor 1603 is used to execute the decoding method described in the embodiments of this application when running the computer program.

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

[0415] It is understood that the second memory 1602 has similar hardware functions to the first memory 1402, and the second processor 1603 has similar hardware functions to the first processor 1603; details will not be elaborated here.

[0416] This application provides an encoding / decoding system, which may include an encoder and a decoder.

[0417] In this embodiment, the encoder can be any one of the foregoing embodiments, and the decoder can be any one of the foregoing embodiments.

[0418] In some embodiments, this application also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the method as described in any of the foregoing embodiments. Specifically, when executed by a first processor, the computer program implements the encoding method as described in any of the foregoing embodiments, or when executed by a second processor, it implements the decoding method as described in any of the foregoing embodiments.

[0419] In some embodiments, this application also provides a computer program product, including a computer program or instructions. When executed by a processor, the computer program or instructions implement the method as described in any of the foregoing embodiments. Specifically, when executed by a first processor, the computer program or instructions implement the encoding method as described in any of the foregoing embodiments, or when executed by a second processor, they implement the decoding method as described in any of the foregoing embodiments.

[0420] In some embodiments, this application also provides a computer program that, when executed by a processor, implements the method as described in any of the foregoing embodiments. Specifically, when executed by a first processor, the computer program or instructions implement the encoding method as described in any of the foregoing embodiments, or when executed by a second processor, implement the decoding method as described in any of the foregoing embodiments.

[0421] In some embodiments, this application also provides a computer-readable storage medium storing a bitstream thereon. The bitstream is generated by performing the steps of the encoding method as described in any of the foregoing embodiments.

[0422] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0423] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0424] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0425] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0426] In addition, the functional units in the various embodiments of this application 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.

[0427] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion 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.) to execute all or part of the steps of the methods described in the various embodiments of this application. 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.

[0428] 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.

[0429] 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.

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

[0431] 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.

Claims

1. A decoding method applied to a decoder, the method comprising: Determine the information of the first cross-component filtering model; The predicted value of the current block is determined based on the information from the first cross-component filtering model.

2. The method according to claim 1, wherein, The determination of the first cross-component filtering model information includes: Determine the candidate list for the current block, wherein the candidate model information in the candidate list includes cross-component filtering model information; Based on the candidate list, a first model information candidate is determined, which includes the first cross-component filtering model information.

3. The method according to claim 2, wherein, The cross-component filtering model information includes the cross-component filtering model information used by the reference image of the current block during loop filtering.

4. The method according to claim 3, wherein, The cross-component filtering model information used by the reference image during loop filtering includes one or more of the following: Information on the cross-component filtering model used by the current block's co-position block on the reference image during loop filtering; The cross-component filtering model information used by adjacent blocks of the same block during loop filtering; The cross-component filtering model information used by non-adjacent blocks of the same position block during loop filtering.

5. The method according to claim 3 or 4, wherein, The reference image includes one or more images from the reference image list of the current block.

6. The method according to claim 5, wherein, The reference image includes a co-positioned image of the current image, which is in the list of reference images.

7. The method according to claim 5, wherein, The method further includes: Parse the bitstream to determine the value of the first syntax element; The reference image is determined based on the value of the first syntax element and the reference image list.

8. The method according to any one of claims 2-7, wherein, The candidate list also includes cross-component prediction model information.

9. The method according to any one of claims 2-8, wherein, The candidate list is a list of merge patterns.

10. The method according to any one of claims 1-9, wherein, The method further includes: The cross-component filtering model information used by the current block during loop filtering is cached.

11. The method according to claim 10, wherein, The cached cross-component filtering model information used by the current block during loop filtering includes: If the current block does not use a cross-component prediction mode during prediction, cache the cross-component filtering model information used by the current block during loop filtering; or... If the cross-component prediction model information for the current block is not in the cache, the cross-component filtering model information used by the current block during loop filtering is cached.

12. The method according to claim 10 or 11, wherein, The method further includes: Parse the bitstream to determine the value of the second syntax element; Based on the value of the second syntax element, determine whether to cache the cross-component filtering model information used by the current block during loop filtering.

13. The method according to claim 12, wherein, The value of the second syntax element is used to indicate whether to cache the cross-component filtering model information of the current sequence, the current image, or the current slice.

14. The method according to claim 13, wherein, The value of the second syntax element is also used to indicate cross-component filtering model information for caching a portion or all of the current sequence, current image, or current slice.

15. The method according to any one of claims 1-9, wherein, The method further includes: Determine the first prediction error of the cross-component prediction model information of the current block; Determine the second prediction error of the cross-component filtering model information of the current block; Cache the model information corresponding to the minimum prediction error between the first prediction error and the second prediction error.

16. The method according to claim 15, wherein, Determining the first prediction error and the second prediction error includes: Obtain a first predicted value and a second predicted value for the current block; wherein the first predicted value and the second predicted value are obtained by performing cross-component prediction on the current block based on cross-component prediction model information and cross-component filtering model information, respectively; The first prediction error is determined based on the first predicted value and the first reconstructed value output by the current block during the loop filtering process. The second prediction error is determined based on the second predicted value and the first reconstructed value.

17. The method according to any one of claims 2-9, wherein, Determining the candidate list for the current block includes: If the prediction mode of the current block is the cross-component prediction mode, a candidate list for the current block is determined.

18. The method according to claim 17, wherein, When the prediction mode of the current block is a cross-component prediction mode, determining the candidate list of the current block includes: If the prediction mode of the current block is a merged cross-component prediction mode, a candidate list for the current block is determined; wherein the candidate list is a merged mode list.

19. The method according to claim 17 or 18, wherein, The method further includes: parsing the bitstream to determine the prediction mode of the current block.

20. The method according to any one of claims 2-9, 17-19, wherein, Determining the candidate list for the current block includes: Parse the bitstream to determine the value of the second syntax element; If the value of the second syntax element is equal to the first value or the second value, the cross-component filtering model information is obtained; The candidate list for the current block is determined based at least on the acquired cross-component filtering model information.

21. The method according to claim 20, wherein, The second syntax element is a sequence-level, image-level, or slice-level syntax element.

22. The method according to claim 20, wherein, The first value is used to indicate cross-component filtering model information for all blocks of the current sequence, current image, or current slice.

23. The method according to claim 20, wherein, The second value is used to indicate cross-component filtering model information for a portion of the current sequence, current image, or current slice.

24. The method according to claim 12 or 20, wherein, The method further includes: parsing the code stream to determine the value of the third syntax element; and parsing the code stream to determine the value of the fourth syntax element; The parsing of the code stream, determining the value of the second syntax element, includes: If the value of the third syntax element is equal to the third value and the value of the fourth syntax element is equal to the fourth value, the code stream is parsed to determine the value of the second syntax element; wherein: The third value is used to indicate the prediction mode of the current sequence, current image, or current slice, including cross-component prediction mode; The fourth value is used to indicate the loop filtering mode of the current sequence, current image, or current slice, including cross-component filtering mode.

25. The method according to any one of claims 2-9, wherein, The step of determining the first model information candidate based on the candidate list includes: The code stream is parsed to determine the value of the fifth syntax element; the value of the fifth syntax element is used to indicate the candidate index of the model information in the candidate list. Based on the value of the fifth syntax element, the indicated first model information candidate is selected from the candidate list.

26. The method according to any one of claims 1-25, wherein, The step of predicting the current block based on the first cross-component filtering model information and determining the predicted value of the current block includes: Based on the first cross-component filtering model information, cross-component prediction is performed on the current block to obtain the predicted value of the current block.

27. The method according to any one of claims 1-25, wherein, The step of predicting the current block based on the first cross-component filtering model information and determining the predicted value of the current block includes: Based on the first cross-component filtering model information, cross-component prediction is performed on the current block to obtain the third predicted value of the current block; Perform non-cross-component prediction on the current block to obtain the fourth prediction value of the current block; The third and fourth predicted values ​​of the current block are weighted and calculated to determine the predicted value of the current block.

28. The method according to claim 26 or 27, wherein, The step of performing cross-component prediction on the current block based on the first cross-component filtering model information includes: Based on the first cross-component filtering model information and the reconstructed luminance block of the current block, the chromaticity of the current block is predicted.

29. An encoding method applied to an encoder, the method comprising: Determine the information of the first cross-component filtering model; The predicted value of the current block is determined based on the information from the first cross-component filtering model.

30. The method according to claim 29, wherein, The determination of the first cross-component filtering model information includes: Determine the candidate list for the current block, wherein the candidate model information in the candidate list includes cross-component filtering model information; Based on the candidate list, a first model information candidate is determined, which includes the first cross-component filtering model information.

31. The method according to claim 30, wherein, The cross-component filtering model information includes the cross-component filtering model information used by the reference image of the current block during loop filtering.

32. The method according to claim 31, wherein, The cross-component filtering model information used by the reference image during loop filtering includes one or more of the following: Information on the cross-component filtering model used by the current block's co-position block on the reference image during loop filtering; The cross-component filtering model information used by adjacent blocks of the same block during loop filtering; The cross-component filtering model information used by non-adjacent blocks of the same position block during loop filtering.

33. The method according to claim 31 or 32, wherein, The reference image includes one or more images from the reference image list of the current block.

34. The method according to claim 33, wherein, The reference image includes a co-positioned image of the current image, which is in the list of reference images.

35. The method according to claim 33, wherein, The method further includes: The value of the first syntax element is determined based on the index of the reference image in the reference image list; The value of the first syntax element is encoded, and the resulting encoded bits are written into the bitstream.

36. The method according to any one of claims 30-35, wherein, The candidate list also includes cross-component prediction model information.

37. The method according to any one of claims 30-36, wherein, The candidate list is a list of merge patterns.

38. The method according to any one of claims 29-37, wherein, The method further includes: The cross-component filtering model information used by the current block during loop filtering is cached.

39. The method according to claim 38, wherein, The cached cross-component filtering model information used by the current block during loop filtering includes: If the current block does not use a cross-component prediction mode during prediction, cache the cross-component filtering model information used by the current block during loop filtering; or... If the cross-component prediction model information for the current block is not in the cache, the cross-component filtering model information used by the current block during loop filtering is cached.

40. The method according to claim 38 or 39, wherein, The method further includes: Determine the value of the second syntax element; wherein the value of the second syntax element is used to indicate whether to cache the cross-component filtering model information used during loop filtering; The value of the second syntax element is encoded, and the resulting encoded bits are written into the bitstream.

41. The method according to claim 40, wherein, The value of the second syntax element is used to indicate whether to cache the cross-component filtering model information of the current sequence, the current image, or the current slice.

42. The method according to claim 41, wherein, The value of the second syntax element is also used to indicate cross-component filtering model information for caching a portion or all of the current sequence, current image, or current slice.

43. The method according to any one of claims 29-37, wherein, The method further includes: Determine the first prediction error of the cross-component prediction model information of the current block; Determine the second prediction error of the cross-component filtering model information of the current block; Cache the model information corresponding to the minimum prediction error between the first prediction error and the second prediction error.

44. The method according to claim 43, wherein, Determining the first prediction error and the second prediction error includes: Obtain a first predicted value and a second predicted value for the current block; wherein the first predicted value and the second predicted value are obtained by performing cross-component prediction on the current block based on cross-component prediction model information and cross-component filtering model information, respectively; The first prediction error is determined based on the first predicted value and the first reconstructed value output by the current block during the loop filtering process. The second prediction error is determined based on the second predicted value and the first reconstructed value.

45. The method according to any one of claims 30-44, wherein, Determining the candidate list for the current block includes: If the prediction mode of the current block is the cross-component prediction mode, a candidate list for the current block is determined.

46. ​​The method according to claim 45, wherein, When the prediction mode of the current block is a cross-component prediction mode, determining the candidate list of the current block includes: If the prediction mode of the current block is a merged cross-component prediction mode, a candidate list for the current block is determined; wherein the candidate list is a merged mode list.

47. The method according to claim 45 or 46, wherein, The method further includes: Determine the prediction mode for the current block; The value of the third syntax element is determined based on the prediction pattern of the current block; The value of the third syntax element is encoded, and the resulting encoded bits are written into the bitstream.

48. The method according to claim 47, wherein, The value of the third syntax element is equal to the third value, which is used to indicate the prediction mode of the current sequence, the current image, or the current slice, including cross-component prediction modes.

49. The method according to claim 40, wherein, The step of encoding the value of the second syntax element and writing the resulting encoded bits into the bitstream includes: If the prediction mode of the current sequence, current image, or current slice includes a cross-component prediction mode, and the loop filtering mode of the current sequence, current image, or current slice includes a cross-component filtering mode, the value of the second syntax element is encoded, and the resulting encoded bits are written into the bitstream.

50. The method according to claim 49, wherein, The method further includes: The value of the fourth syntax element is encoded, and the resulting encoded bits are written into the bitstream. The fourth syntax element is equal to the fourth value, which indicates the loop filtering mode of the current sequence, the current image, or the current slice, including the cross-component filtering mode.

51. The method according to claim 30, wherein, The method further includes: The value of the fifth syntax element is determined based on the model information candidate index of the first model information candidate in the candidate list; The value of the fifth syntax element is encoded, and the resulting encoded bits are written into the bitstream.

52. The method according to any one of claims 29-51, wherein, The step of predicting the current block based on the first cross-component filtering model information and determining the predicted value of the current block includes: Based on the first cross-component filtering model information, cross-component prediction is performed on the current block to obtain the predicted value of the current block.

53. The method according to any one of claims 29-51, wherein, The step of predicting the current block based on the first cross-component filtering model information and determining the predicted value of the current block includes: Based on the first cross-component filtering model information, cross-component prediction is performed on the current block to obtain the third predicted value of the current block; Perform non-cross-component prediction on the current block to obtain the fourth prediction value of the current block; The third and fourth predicted values ​​of the current block are weighted and calculated to determine the predicted value of the current block.

54. The method according to claim 52 or 53, wherein, The step of performing cross-component prediction on the current block based on the first cross-component filtering model information includes: Based on the first cross-component filtering model information and the reconstructed luminance block of the current block, the chromaticity of the current block is predicted.

55. An encoder, the encoder comprising a first determining unit and a first predicting unit, wherein: The first determining unit is configured to determine the first cross-component filtering model information; The first prediction unit is configured to predict the current block based on the first cross-component filtering model information and determine the predicted value of the current block.

56. An encoder, the encoder comprising a first memory and a first processor, wherein: The first memory is used to store computer programs that can run on the first processor; The first processor is configured to perform the method as described in any one of claims 29 to 54 when running the computer program.

57. A decoder, the decoder comprising a second determining unit and a second predicting unit, wherein: The second determining unit is configured to determine the first cross-component filtering model information; The second prediction unit is configured to predict the current block based on the first cross-component filtering model information and determine the predicted value of the current block.

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

59. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 28, or the method as described in any one of claims 29 to 54.

60. A computer-readable storage medium having a bitstream stored thereon, wherein, The bitstream is generated by performing the steps of the encoding method as described in any one of claims 35, 40, 47-51.