Video encoding and decoding methods, apparatus, devices, systems, and storage media

By filtering chroma prediction values and using inherited filtering identifiers, the solution addresses inefficiencies in cross-component prediction, enhancing encoding efficiency and accuracy in video encoding and decoding processes.

JP2026521776APending Publication Date: 2026-07-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2023-07-03
Publication Date
2026-07-01

Smart Images

  • Figure 2026521776000001_ABST
    Figure 2026521776000001_ABST
Patent Text Reader

Abstract

This application provides a video encoding / decoding method, apparatus, device, system, and storage medium. When predicting the current chroma block using a cross-component prediction mode, the cross-component prediction model parameters and filtering identifier of the current chroma block are determined. The filtering identifier of the current chroma block is determined based on the filtering identifiers of the encoded and decoded image blocks surrounding the current chroma block. Based on the cross-component prediction model parameters, a cross-component prediction is performed on the current chroma block to obtain a first predicted value for the current chroma block. Then, a second predicted value for the current chroma block is determined based on the filtering identifier of the current chroma block and the first predicted value. In other words, this application improves the accuracy of cross-component prediction and enhances encoding / decoding performance by filtering the chroma prediction value obtained by the cross-component prediction mode. Furthermore, the filtering identifier of the current chroma block is obtained by inheriting the filtering identifiers of the encoded and decoded blocks, eliminating the need to introduce additional bit consumption to indicate the filtering identifier, thereby saving codewords and improving encoding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video encoding and decoding technologies, and particularly to a video encoding and decoding method, apparatus, device, system, and storage medium.

Background Art

[0002] Digital video technology can be incorporated into multiple video devices such as digital TVs, smartphones, computers, e-book readers, and video players. With the development of video technology, the amount of data contained in video data is relatively large. To facilitate the transmission of video data, video compression technology is being carried out in video devices to enable more efficient transmission or storage of video data. Since there is temporal redundancy or spatial redundancy in video, the redundancy in video can be eliminated or reduced by prediction to improve the compression efficiency. In cross-component prediction, prediction of the chroma component can be performed based on the reconstructed value of the luminance component. However, the chroma prediction values obtained in some cross-component prediction modes do not have an ideal prediction effect.

Summary of the Invention

Means for Solving the Problems

[0003] Embodiments of this application provide a video encoding and decoding method, apparatus, device, system, and storage medium that improve the cross-component prediction effect of chroma by filtering the chroma prediction values obtained by cross-component prediction, and improve the encoding efficiency without introducing additional bit consumption to indicate the filtering identifier by inheriting the filtering identifier of the reconstructed block for the filtering identifier of the current chroma block.

[0004] In a first aspect, this application provides a video decoding method, which is applied to a decoder, If it is determined that the prediction mode of the current chroma block is a cross-component prediction mode, the step is to determine the cross-component prediction model parameters and the filtering identifier of the current chroma block, wherein the cross-component prediction model parameters are the model parameters used when the current chroma block makes predictions using the cross-component prediction mode, and the filtering identifier of the current chroma block is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block, and the filtering identifier is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. The steps include performing cross-component prediction on the current chroma block based on the cross-component prediction model parameters and obtaining a first predicted value for the current chroma block, The process includes the step of determining a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value.

[0005] In a second embodiment, the embodiments of this application provide a video encoding method that is applied to an encoder. If it is determined that the prediction mode of the current chroma block is a cross-component prediction mode, the step is to determine the cross-component prediction model parameters and the filtering identifier of the current chroma block, wherein the cross-component prediction model parameters are the model parameters used when the current chroma block makes predictions using the cross-component prediction mode, and the filtering identifier of the current chroma block is determined based on the filtering identifiers of the encoded image blocks surrounding the current chroma block, and the filtering identifier is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. The steps include performing cross-component prediction on the current chroma block based on the cross-component prediction model parameters and obtaining a first predicted value for the current chroma block, The process includes the step of determining a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value.

[0006] In a third embodiment, the application provides a video decoding device used to carry out the methods in the first embodiment or any other embodiment, specifically the device including a functional unit used to carry out the methods in the first embodiment or any other embodiment.

[0007] In a fourth embodiment, the present application provides a video encoding apparatus used to carry out the methods in the second embodiment or any other embodiment, specifically the apparatus including a functional unit used to carry out the methods in the second embodiment or any other embodiment.

[0008] In a fifth embodiment, the application provides a video decoder comprising a processor and memory. The memory is used to store a computer program, and the processor is used to call and execute the computer program stored in the memory and to perform the methods of the first embodiment or each of the other embodiments.

[0009] In a sixth embodiment, the application provides a video encoder comprising a processor and memory. The memory is used to store a computer program, and the processor is used to call and execute the computer program stored in the memory and to perform the methods in the second embodiment or each of the other embodiments.

[0010] In a seventh embodiment, the application provides a video encoding and decoding system comprising a video encoder and a video decoder. The video decoder is used to carry out the method in the first embodiment or any other embodiment described above, and the video encoder is used to carry out the method in the second embodiment or any other embodiment described above.

[0011] In the eighth embodiment, the application provides a chip used to implement the method in any one of the first to second embodiments or any other embodiment described above. Specifically, the chip comprises a processor used to call and execute a computer program from memory, and a device equipped with the chip enables the implementation of the method in any one of the first to second embodiments or any other embodiment described above.

[0012] In the ninth embodiment, the present application is used to provide a computer program product that stores a computer program causing a computer to execute any one of the first to second embodiments or any other method in each of the embodiments described above.

[0013] In the tenth embodiment, the application provides a computer program product comprising computer program instructions that cause a computer to execute any one of the first to second embodiments or any other method in each of the embodiments described above.

[0014] In the eleventh embodiment, the application provides a computer program that, when executed on a computer, causes the computer to perform any one of the first to second embodiments or any other method in each of the embodiments described above. Based on the above proposed technology, the encoding / decoding side, when making a prediction for the current chroma block using a cross-component prediction mode, determines the cross-component prediction model parameters and the filtering identifier of the current chroma block. The filtering identifier of the current chroma block is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block and is used to indicate whether or not to filter the predicted value obtained based on the cross-component prediction mode. Next, a cross-component prediction is made for the current chroma block based on the cross-component prediction model parameters to obtain a first predicted value for the current chroma block. Furthermore, a second predicted value for the current chroma block is determined based on the filtering identifier and the first predicted value of the current chroma block. In other words, the embodiment of this application improves the prediction effect of cross-component prediction and improves encoding / decoding performance by predicting the first predicted value obtained by an arbitrary cross-component prediction mode. In addition, in the embodiment of this application, the filtering identifier of the current chroma block is obtained by inheriting the filtering identifier of the reconstructed block, eliminating the need to introduce additional bit consumption to indicate the filtering identifier, saving codewords, and improving encoding efficiency. [Brief explanation of the drawing]

[0015] [Figure 1] This is a schematic block diagram of a video encoding / decoding system according to an embodiment of the present application. [Figure 2] This is a schematic block diagram of a video encoder according to an embodiment of the present application. [Figure 3] This is a schematic block diagram of a video decoder according to an embodiment of the present application. [Figure 4A] This is a schematic diagram of intranet prediction. [Figure 4B] This is a schematic diagram of intranet prediction. [Figure 5A] This is a schematic diagram of intranet prediction. [Figure 5B] Schematic diagram of intra prediction. [Figure 5C] Schematic diagram of intra prediction. [Figure 5D] Schematic diagram of intra prediction. [Figure 5E] Schematic diagram of intra prediction. [Figure 5F] Schematic diagram of intra prediction. [Figure 5G] Schematic diagram of intra prediction. [Figure 5H] Schematic diagram of intra prediction. [Figure 5I] Schematic diagram of intra prediction. [Figure 6A] Schematic diagram of CCLM prediction. [Figure 6B] Schematic diagram of CCLM prediction. [Figure 6C] Schematic diagram of CCLM_SLOPE mode. [Figure 6D] Exemplary diagram of MMLM mode. [Figure 6E] Schematic diagram of convolutional filter. [Figure 6F] Schematic diagram of chroma reference template area in CCCM mode. [Figure 7A] Schematic diagram of spatial adjacent candidate positions. [Figure 7B] Schematic diagram of spatial non - adjacent candidate positions. [Figure 7C] Schematic diagram of 3×3 low - pass filter. [Figure 8] Flowchart of the video decoding method provided by an embodiment of the present application. [Figure 9] Flowchart of the prediction method provided by an embodiment of the present application. [Figure 10] Schematic block diagram of the video decoding device provided by an embodiment of the present application. [Figure 11] Schematic block diagram of the video encoding device provided by an embodiment of the present application. [Figure 12] Schematic block diagram of the electronic device provided by the examples of the present application. [Figure 13] This is a schematic block diagram of a video encoding and decoding system provided by an embodiment of this application. [Modes for carrying out the invention]

[0016] This application is applicable to fields such as image encoding and decoding, video encoding and decoding, hardware video encoding and decoding, dedicated circuit video encoding and decoding, and real-time video encoding and decoding. For example, the technical proposal of this application can be combined with audio video coding standards (AVS: Audio video coding standardArd) such as the H.264 / Audio video coding (AVC) standard, the H.265 / high efficiency video coding (HEVC) standard, and the H.266 / versatile video coding (VVC) standard. Alternatively, the proposed techniques of this application may be used in conjunction with proprietary or industry standards that incorporate ITU-TH.261, ISO / IEC MPEG-1 VisuAl, ITU-TH.262 or ISO / IEC MPEG-2 VisuAl, ITU-TH.263, ISO / IEC MPEG-4 VisuAl, and ITU-TH.264 (also known as ISO / IEC MPEG-4 AVC) standards and include Scalable Video Coding (SVC) and Multiview Video Coding (MVC) extensions. It should be understood that the proposed techniques of this application are not limited to any of the encoding / decoding standards or techniques of any determination.

[0017] To facilitate understanding, the video encoding and decoding system according to the embodiment of this application will first be described with reference to Figure 1.

[0018] Figure 1 is a schematic block diagram of a video encoding / decoding system according to an embodiment of the present application. Note that Figure 1 is merely illustrative, and the video encoding / decoding system of the embodiment of the present application includes, but is not limited to, the components shown in Figure 1. As shown in Figure 1, the video encoding / decoding system 100 includes an encoder 110 and a decoder 120. The encoder is used to encode (may be understood as compressing) video data to generate a bitstream and transmit that bitstream to the decoder. The decoder decodes the bitstream generated by the encoder's encoding to obtain the decoded video data.

[0019] The encoder 110 in the embodiments of this application may be understood as a device having a video encoding function, and the decoder 120 may be understood as a device having a video decoding function. That is, in the embodiments of this application, the encoder 110 and decoder 120 are provided in a wide range of devices, such as smartphones, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, top-of-the-line boxes, televisions, cameras, display devices, digital media players, video game consoles, and in-vehicle computers.

[0020] In some embodiments, the encoder 110 can transmit encoded video data (e.g., a bitstream) to the decoder 120 via channel 130. Channel 130 may comprise one or more media and / or devices capable of transmitting encoded video data from the encoder 110 to the decoder 120.

[0021] In one embodiment, channel 130 comprises one or more communication media, such that encoder 110 directly transmits encoded video data to decoder 120 in real time. In this embodiment, encoder 110 can modulate the encoded video data according to a communication standard and transmit the modulated video data to decoder 120. The communication media includes, for example, a wireless communication medium such as a radio frequency spectrum. Optionally, the communication media includes a wired communication medium such as one or more physical transmission lines.

[0022] In another embodiment, channel 130 may include a storage server capable of storing video data encoded by encoder 110. In this embodiment, decoder 120 can download the encoded video data stored from the storage server. Optionally, the storage server can store the encoded video data and transmit this encoded video data to decoder 120, such as a web server (e.g., for a website) or a File Transfer Protocol (FTP) server.

[0023] In some embodiments, the encoder 110 comprises a video encoder 112 and an output interface 113. The output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.

[0024] In some embodiments, the encoder 110 may further include a video source 111 in addition to the video encoder 112 and the output interface 113.

[0025] The video source 111 may comprise at least one of a video acquisition device (e.g., a video camera), a video archive, a video input interface, and a computer graphics system, the video input interface being used to receive video data from a video content provider, and the computer graphics system being used to generate video data.

[0026] The video encoder 112 encodes video data from the video source 111 to generate a bitstream. The video data may include one or more pictures or sequences of pictures. The bitstream contains encoding information for the pictures or sequences of pictures in bitstream format. The encoding information may include encoded image data and related data. The related data may include sequence parameter sets (SPS), picture parameter sets (PPS), and other syntax structures. The SPS may include parameters applied to one or more sequences. The PPS may include parameters applied to one or more pictures. A syntax structure is a set of zero or more syntax elements arranged in a specified order within a bitstream.

[0027] The video encoder 112 transmits the encoded video data directly to the decoder 120 via the output interface 113. The encoded video data may be stored on a storage medium or storage server, as can be read by the decoder 120.

[0028] In some embodiments, the decoder 120 comprises an input interface 121 and a video decoder 122.

[0029] In some embodiments, the decoder 120 may further include a display device 123 in addition to the input interface 121 and the video decoder 122.

[0030] The input interface 121 includes a receiver and / or modem. The input interface 121 can receive encoded video data via channel 130.

[0031] The video decoder 122 is used to decode the encoded video data, obtain the decoded video data, and transmit the decoded video data to the display device 123.

[0032] The display device 123 displays the decoded video data. The display device 123 may be integrated with the decoder 120 or may be located outside the decoder 120. The display device 123 may include various types of display devices, such as liquid crystal displays (LCDs), plasma displays, organic light-emitting diode (OLED) displays, and other types of display devices.

[0033] Figure 1 is merely an embodiment, and the technical proposal of the embodiment described in this application is not limited to Figure 1. For example, the technology described in this application can also be applied to one-sided video encoding or one-sided video decoding.

[0034] The following describes a video coding framework according to an embodiment of this application.

[0035] Figure 2 is a schematic block diagram of a video encoder according to an embodiment of the present application. It should be understood that the video encoder 200 may be used to perform lossy compression on an image, or it may be used to perform lossless compression on an image. Lossless compression may be visually lossless compression or mathematically lossless compression.

[0036] The video encoder 200 can be applied to image data in luminance and chroma (YCbCr, YUV) formats. For example, the YUV ratio may be 4:2:0, 4:2:2, or 4:4:4. Here, Y represents brightness (Luma), Cb (U) represents blue chroma, Cr (V) represents red chroma, and U and V represent chroma, used to describe color and saturation contrast. For example, in color formats, 4:2:0 indicates that there are four luminance components and two chroma components (YYYYCbCr) for every four pixels, 4:2:2 indicates that there are four luminance components and four chroma components (YYYYCbCrCbCr) for every four pixels, and 4:4:4 indicates full pixel display (YYYYCbCrCbCrCbCrCbCr).

[0037] For example, the video encoder 200 reads video data and partitions the image of each frame in the video data into multiple coding tree units (CTUs). In some examples, CTUs are also called "tree blocks," "largest coding units" (LCUs), or "coding tree blocks" (CTBs). Each CTU can be associated with a pixel block of the same size in the image. Each pixel can correspond to one lumen sample and two chroma samples. Therefore, each CTU can be associated with one lumen sample block and two chroma sample blocks. The size of a single CTU can be, for example, 128x128, 64x64, or 32x32. A single CTU is further partitioned into multiple coding units (CUs) for encoding, and the CUs can be rectangular or square blocks. CU is further partitioned into prediction units (PU) and transformation units (TU), separating coding, prediction, and transformation for greater flexibility during processing. In one example, CTU is partitioned into CUs using a quadtree method, and CU is then partitioned into TUs and PUs using a quadtree method.

[0038] The video encoder and video decoder can accommodate various PU sizes. Assuming a specific CU size is 2N×2N, the video encoder and video decoder can accommodate 2N×2N or N×N PU sizes and be used for intra-prediction, and can accommodate symmetric PUs of 2N×2N, 2N×N, N×2N, N×N, or similar sizes and be used for inter-prediction. The video encoder and video decoder can further accommodate asymmetric PUs of 2N×nU, 2N×nD, nL×2N, and nR×2N and be used for inter-prediction.

[0039] In some embodiments, as shown in Figure 2, the video encoder 200 may include a prediction unit 210, a residual unit 220, a transform / quantization unit 230, an inverse transform / quantization unit 240, a reconstruction unit 250, a loop filtering unit 260, a decoded image buffer 270, and an entropy coding unit 280. The video encoder 200 may also include more, fewer, or different functional assemblies.

[0040] Optionally, in this application, the current block may be called the current coding unit (CU) or the current prediction unit (PU), etc. The prediction block may be called the prediction image block or image prediction block, and the reconstructed image block may be called the reconstruction block or image reconstructed image block.

[0041] In some embodiments, the prediction unit 210 comprises an inter-prediction unit 211 and an intra-prediction unit 212. Because there is a strong correlation between adjacent pixels within a single frame in video, video encoding and decoding techniques use intra-prediction methods to eliminate spatial redundancy between adjacent pixels. Because there is a high degree of similarity between adjacent frames in video, video encoding and decoding techniques use inter-prediction methods to eliminate temporal redundancy between adjacent frames and improve encoding efficiency.

[0042] The interprediction unit 211 can be used for interprediction, including motion estimation and motion compensation, and can reference image information from different frames. Interprediction eliminates temporal redundancy by detecting reference blocks from reference frames using motion information and generating prediction blocks based on the reference blocks. The frames used for interprediction may be P frames and / or B frames, where P frames refer to forward prediction frames and B frames refer to bidirectional prediction frames. Interprediction detects reference blocks from reference frames using motion information and generates prediction blocks based on the reference blocks. Motion information includes a list of reference frames in which the reference frames are located, a reference frame index, and a motion vector. The motion vector may be either an integer pixel or a fractional pixel. If the motion vector is a fractional pixel, interpolation filtering must be used in the reference frame to create the necessary fractional pixel blocks. Here, the integer or fractional pixel blocks detected in the reference frame based on the motion vector are called reference blocks. Some techniques use the reference blocks directly as prediction blocks, while others reprocess the reference blocks to generate prediction blocks. Reprocessing a reference block to generate a prediction block is understood as treating the reference block as a prediction block and generating a new prediction block by processing it.

[0043] The intra-prediction unit 212 predicts pixel information within the current code image block by referring only to image information from the same frame, thereby eliminating spatial redundancy. The frame used for intra-prediction may be an I-frame.

[0044] Intra-prediction has multiple prediction modes. Taking the H-series of international digital video coding standards as an example, the H.264 / AVC standard has eight angular prediction modes and one non-angular prediction mode, while the H.265 / HEVC standard expands this to 33 angular prediction modes and two non-angular prediction modes. HEVC uses Planar mode, DC, and 33 angular modes, for a total of 35 prediction modes. VVC uses Planar mode, DC, and 65 angular modes, for a total of 67 prediction modes.

[0045] Furthermore, the increase in angle modes leads to more accurate intra-prediction, better meeting the needs of high-resolution and ultra-high-resolution digital video development.

[0046] The residual unit 220 can generate residual blocks of the CU based on the pixel blocks of the CU and the predicted blocks of the PU of the CU. For example, the residual unit 220 can generate residual blocks of the CU such that each sample in the residual block has a value equal to the difference between the sample in the pixel block of the CU and the corresponding sample in the predicted block of the PU of the CU.

[0047] The conversion / quantization unit 230 can quantize the conversion coefficients. The conversion / quantization unit 230 can quantize the conversion coefficients associated with the TU of the CU based on the quantization parameter (QP) value associated with the CU. The video encoder 200 can adjust the degree of quantization applied to the conversion coefficients associated with the CU by adjusting the QP value associated with the CU.

[0048] The inverse transformation / quantization unit 240 can reconstruct residual blocks from the quantized transformation coefficients by applying inverse quantization and inverse transformation to the quantized transformation coefficients, respectively.

[0049] The reconstruction unit 250 can generate reconstructed image blocks associated with the TU by adding the reconstructed residual block samples to the corresponding samples of one or more prediction blocks generated by the prediction unit 210. By reconstructing the sample blocks of each TU in the CU in this way, the video encoder 200 can reconstruct the pixel blocks of the CU.

[0050] The loop filtering unit 260 is used to process inversely transformed and inversely quantized pixels to correct distortion information and provide a better reference for subsequent encoded pixels. For example, deblocking filtering can be performed to reduce the blocking effect of pixel blocks associated with the CU.

[0051] In some embodiments, the loop filtering unit 260 comprises a deblocking filtering unit and a sample self-adaptive offset / self-adaptive loop filtering (SAO / ALF) unit, where the deblocking filtering unit is used to remove blocking effects and the SAO / ALF unit is used to remove ringing effects.

[0052] The decoded image buffer 270 may store the reconstructed pixel blocks. The inter-prediction unit 211 can perform inter-prediction on a PU of another image using the reference image containing the reconstructed pixel blocks. Furthermore, the intra-prediction unit 212 can perform intra-prediction on other PUs in the same image as the CU using the reconstructed pixel blocks in the decoded image buffer 270.

[0053] The entropy coding unit 280 can receive quantized transformation coefficients from the transformation / quantization unit 230. The entropy coding unit 280 can perform one or more entropy coding operations on the quantized transformation coefficients to generate entropy-coded data.

[0054] Figure 3 is a schematic block diagram of a video decoder according to an embodiment of this application.

[0055] As shown in Figure 3, the video decoder 300 comprises an entropy decoding unit 310, a prediction unit 320, an inverse quantization / conversion unit 330, a reconstruction unit 340, a loop filtering unit 350, and a decoded image buffer 360. The video decoder 300 may have more, fewer, or different functional assemblies.

[0056] The video decoder 300 can receive a bitstream. The entropy decoding unit 310 can analyze the bitstream and extract syntax elements from it. As part of the bitstream analysis, the entropy decoding unit 310 can analyze the entropy-coded syntax elements within the bitstream. The prediction unit 320, the inverse quantization / conversion unit 330, the reconstruction unit 340, and the loop filtering unit 350 can decode the video data according to the syntax elements extracted from the bitstream, i.e., generate the decoded video data.

[0057] In some embodiments, the prediction unit 320 comprises an intra-prediction unit 322 and an inter-prediction unit 321.

[0058] The intra-prediction unit 322 can perform intra-prediction to generate prediction blocks for the PU. The intra-prediction unit 322 can generate prediction blocks for the PU based on spatially adjacent pixel blocks for the PU using an intra-prediction mode. The intra-prediction unit 322 can also determine the intra-prediction mode for the PU according to one or more syntax elements analyzed from the bitstream.

[0059] The interprediction unit 321 can construct a first reference image list (list 0) and a second reference image list (list 1) according to the syntax elements analyzed from the bitstream. Furthermore, if the PU is encoded using interprediction, the entropy decode unit 310 can analyze the motion information of the PU. The interprediction unit 321 can determine one or more reference blocks of the PU according to the motion information of the PU. The interprediction unit 321 can generate prediction blocks of the PU according to one or more reference blocks of the PU.

[0060] The inverse quantization / conversion unit 330 can inverse quantize (i.e., dequantize) the conversion coefficients associated with the TU. The inverse quantization / conversion unit 330 can determine the degree of quantization using the QP value associated with the CU of the TU.

[0061] After inverse quantization of the transformation coefficients, the inverse quantization / transformation unit 330 can apply one or more inverse transforms to the inversely quantized transformation coefficients to generate residual blocks associated with the TU. The reconstruction unit 340 reconstructs the pixel blocks of the CU using the residual blocks associated with the TU of the CU and the predicted blocks of the PU of the CU. For example, the reconstruction unit 340 can reconstruct the pixel blocks of the CU by adding samples from the residual blocks to the corresponding samples in the predicted blocks, thereby obtaining the reconstructed image blocks. The loop filtering unit 350 can perform a deblocking filtering operation to reduce blocking artifacts in pixel blocks associated with the CU.

[0062] The video decoder 300 can store the reconstructed image of the CU in the decoded image buffer 360. The video decoder 300 can use the reconstructed image in the decoded image buffer 360 as a reference image for subsequent predictions, or it can send the reconstructed image to a display device for presentation.

[0063] The basic flow of video encoding and decoding is as follows: On the encoding side, the frame image is partitioned into blocks. For the current block, the prediction unit 210 generates a predicted block of the current block using intra-prediction or inter-prediction. The residual unit 220 can calculate a residual block, i.e., the difference between the predicted block and the original block of the current block, based on the predicted block and the original block of the current block. This residual block is also called residual information. This residual block is then processed by processes such as transformation and quantization by the transformation / quantization unit 230 to remove information that is difficult for the human eye to perceive, thereby eliminating visual redundancy. Optionally, the residual block before transformation and quantization by the transformation / quantization unit 230 may be called a time-domain residual block, and the time-domain residual block after transformation and quantization by the transformation / quantization unit 230 may be called a frequency residual block or frequency-domain residual block. The entropy coding unit 280 can receive quantized transformation coefficients output from the transformation / quantization unit 230, perform entropy coding on these quantized transformation coefficients, and output a bitstream. For example, the entropy coding unit 280 can remove character redundancy based on the target context model and the probability information of the binary bitstream.

[0064] On the decoding side, the entropy decoding unit 310 analyzes the bitstream and obtains prediction information, quantization coefficient matrix, etc., for the current block. Based on the prediction information, the prediction unit 320 generates a predicted block for the current block using intra-prediction or inter-prediction. The inverse quantization / transformation unit 330 uses the quantization coefficient matrix obtained from the bitstream to perform inverse quantization and inverse transform on the quantization coefficient matrix and obtain the residual block. The reconstruction unit 340 adds the predicted block and the residual block to obtain the reconstructed block. The reconstructed block constitutes the reconstructed image. The loop filtering unit 350 performs loop filtering on the reconstructed image based on the image or block and obtains the decoded image. On the encoding side, similar operations to those on the decoding side are required to obtain the decoded image. This decoded image is also called the reconstructed image, and the reconstructed image is used as a reference frame for inter-prediction of subsequent frames.

[0065] Furthermore, block partitioning information determined on the encoding side, as well as mode information or parameter information such as prediction, transformation, quantization, entropy coding, and loop filtering, are included in the bitstream as needed. The decoding side analyzes the bitstream and performs analysis according to existing information to determine the same block partitioning information, prediction, transformation, quantization, entropy coding, and loop filtering mode information or parameter information as the encoding side, thereby ensuring that the decoded image obtained on the encoding side is the same as the decoded image obtained on the decoding side.

[0066] The above is a basic flow of a video encoder / decoder in a block-based hybrid coding framework. As technology advances, some modules or steps of this framework or flow may be optimized. This application is applicable to, but not limited to, the basic flow of a video encoder / decoder in a block-based hybrid coding framework.

[0067] In the embodiments of this application, the current block may be the current coding unit (CU) or the current prediction unit (PU), etc. Due to the need for parallel processing, the image is partitioned into slices, etc., and slices within the same image can be processed in parallel. In other words, there is no data dependency between slices. "Frame" is a commonly used term, and is generally understood to mean one image. In this application, the frame can also be replaced with an image or a slice, etc.

[0068] Intra prediction typically uses both angular and non-angular modes to predict the current encoding block and acquire the predicted block. Rate distortion information is calculated based on the predicted block and the original block, the optimal prediction mode for the current coding unit is selected, and then this prediction mode is transmitted to the decoding side via the bitstream. On the decoding side, the prediction mode is analyzed, the predicted image of the current decoded block is predicted and acquired, and the reconstructed image can be obtained by superimposing it with the residual pixels transmitted via the bitstream. In the intra prediction method, the current block is predicted using the encoded and decoded reconstructed pixels surrounding the current block as reference pixels. Figure 4A is a schematic diagram of intra prediction. As shown in Figure 4A, the size of the current block is 4x4, and the pixels in the leftmost row and the topmost column of the current block are the reference pixels of the current block. In intra prediction, these reference pixels are used to predict the current block. All of these reference pixels may be obtainable, that is, all are encoded and decoded. However, some may not be obtainable; for example, if the current block is at the far left of the entire frame, the reference pixels to the left of the current block are not obtainable. Alternatively, when encoding / decoding the current block, the lower left portion of the current block may not have been encoded / decoded yet, and therefore the reference pixels for the lower left portion are also unavailable. If the reference pixels are unavailable, they may or may not be filled using available reference pixels or determination values / methods.

[0069] Figure 4B is a schematic diagram of intra-prediction. As shown in Figure 4B, the multiple reference line (MRL) intra-prediction method can improve encoding and decoding efficiency by using more reference pixels. For example, four reference rows / columns are used as reference pixels for the current block.

[0070] Furthermore, intraprediction has multiple prediction modes. Figures 5A to 5I are schematic diagrams of intraprediction. As shown in Figures 5A to 5I, when performing intraprediction on a 4x4 block in H.264, there are mainly nine modes. Here, Mode 0, shown in Figure 5A, copies the upper pixels of the current block vertically to the current block as the predicted value; Mode 1, shown in Figure 5B, copies the left reference pixels of the current block horizontally to the current block as the predicted value; Mode 2 DC, shown in Figure 5C, uses the average of eight points A to D and I to L as the predicted value for all points; and Modes 3 to 8, shown in Figures 5D to 5I, copy the reference pixels to the corresponding positions in the current block at the angle of determination. Since some positions in the current block cannot exactly correspond to the reference pixels, it may be necessary to use a weighted average of the reference pixels or a fraction of the interpolated reference pixels.

[0071] In the field of video coding, "component" is a technical term. Generally, it refers to the three components Y, Cb, and Cr (or Y, U, V). Y represents luminance information, while Cb and Cr represent chroma information. In H.266, the encoding of the luminance component is completed and the reconstructed value of the luminance component is obtained before predictive encoding of the chroma component of the color unit (CU). To eliminate redundancy between different color channels, a cross-component prediction mode has been proposed. The concept is to predict the chroma block currently to be predicted using the reconstructed luminance block. For prediction, it is necessary to construct a linear or nonlinear relationship between luminance and chroma based on the reconstructed luminance and chroma pixel values.

[0072] In some embodiments, the cross-component intra-prediction mode includes, but is not limited to, the cross-component linear model (CCLM), the convolutional cross-component model (CCCM), the gradient linear model (GLM), and the cross-component prediction merge mode (CCP Merge Mode).

[0073] Table 1 shows, as an example, the relevant syntax for chroma prediction modes. [Table 1] JPEG2026521776000003.jpg44145

[0074] Table 2 shows the values ​​of cclmModeIdx in Table 1 above and the corresponding mode types. [Table 2]

[0075] The following explains cross-component linear model prediction (CCLM).

[0076] CCLM is a method of calculating chroma prediction pixel values ​​based on the luminance reconstruction values ​​of pixels to be predicted, by referring to the linear relationship between the luminance reconstruction values ​​and chroma reconstruction values ​​of a reference pixel. For example, as shown in Figure 6A, in the case of the YUV420 standard, the luminance component maintains the same spatial resolution as the chroma component through downsampling, and cross-component prediction model parameters are calculated based on the luminance and chroma of the reference pixel, and the chroma prediction value is calculated using the luminance reconstruction value. For example, the linear relationship is approximately as shown in equation (1). JPEG2026521776000005.jpg22168 Here, pred c (i,j) represents the chroma prediction pixels of the current CU, and rec L '(i,j) represents the downsampled reconstructed luminance pixels of the current CU, where a and b are called cross-component prediction model parameters, where a is the scaling parameter and b is the offset parameter, which are calculated and derived from adjacent chroma pixels and luminance pixels. The linear model here can be calculated on the encoding / decoding side, so it does not need to be written to the bitstream. Exemplary, Figure 6B is a schematic diagram of the current block in CCLM mode with adjacent reconstructed chroma pixels and reconstructed luminance pixels. In addition to jointly calculating the parameters of the linear model using all top and left reference pixels, there are two other methods for calculating the model parameters. That is, CCLM has two more modes called CCLM-T mode and CCLM-L mode. In CCLM-T mode, only the top reference pixel is used to calculate the cross-component predictive model parameters. In CCLM-L mode, only the leftmost reference pixel is used to calculate the cross-component predictive model parameters. To further improve the encoding efficiency of CCLM, numerous improvements to CCLM, such as CCLM_SLOPE, MMLM, and CCCM, have been made in ECM. Some of these improvements are briefly described below. CCLM_SLOPE allows you to adjust the cross-component prediction model parameters obtained through calculation. The adjustment method is as shown in equation (2). The predicted pixels for JPEG2026521776000006.jpg22168 are calculated using updated cross-component prediction model parameters a' and b'. This improvement causes the mapping function to tilt or rotate around a point where the luminance value is yr, as shown in Figure 6C, where yr is typically the mean value of the reference luminance samples. In CCLM, there is only one linear model between the luminance and chroma of the same CU. In MMLM, multiple models can be provided for the same CU. Adjacent luminance and chroma pixels are distinguished into different categories according to a classification threshold, and pixels in each category are used to calculate different model parameters. Figure 6D shows an example of calculating multiple linear models for each pixel classification in MMLM mode. Another major type of cross-component prediction model is the convolutional cross-component model (CCCM). The concepts of CCCM and CCLM techniques are similar. CCCM also predicts chroma pixels by reconstructing luminance components. However, instead of simply deriving α and β, CCCM derives a set of convolutional filtering coefficients, through which it obtains the predicted pixels. CCCM can also derive two sets of convolutional filtering coefficients from a single block. Similarly, which set of convolutional filtering coefficients is used is controlled by a threshold. In one example, the convolutional filter used in CCCM is a 7-tap filter, consisting of a 5-tap cross filter, one nonlinear term, and one bias term. As shown in Figure 6E, the input to the 5-tap cross filter consists of a center (C) luminance sample (a downsampled luminance sample at the position corresponding to the current chroma prediction position), an above (North) luminance sample, a below (South) luminance sample, a left (West) luminance sample, and a right (E) luminance sample. JPEG2026521776000007.jpg49168 Here, pred c (i,j) represents the chroma prediction pixels of the current CU, CNSew is the luminance input sample of the cross filter shown in Figure 6E, P is the nonlinear term, and B is the bias term. The nonlinear term P is determined by the luminance input sample C at the central position and the bit depth of the pixel value of the current prediction block. For example, the nonlinear term P is expressed as the square of the central luminance sample C and scaled to the range of sample values ​​of the content according to the ratio. Exemplarily, the nonlinear term P is determined by the following equation (4): JPEG2026521776000008.jpg61170 Bias term B is set to the median of the chroma values. In one example, B = mid Val. For instance, if the pixel precision of the current prediction block is 10 bits, then B = 512. In one example, as shown in Figure 6F, the reference region typically includes a 6x6 grid of reconstructed pixels around the current chroma block, along with extended regions in the upper right and lower left. The gray areas represent the extended portions of the spatial components used in the convolutional filter. The filtering coefficient is calculated by minimizing the MSE between the predicted chroma samples and the reconstructed chroma samples within the reference region. MSE minimization is also achieved by calculating the autocorrelation matrix of the luminance input and the cross-correlation vector between the luminance input and the chroma output. The calculation process for minimizing the mean squared error is as follows: Step 1: Obtain the autocorrelation matrix of the luminance input samples and the cross-correlation vector between the luminance input samples and the chroma output samples. Step 2: The autocorrelation matrix is ​​decomposed by LDL, and the final filtering coefficients are obtained by back substitution. In calculating the autocorrelation matrix, the numerical values ​​of the luminance input samples used are relatively large, so relatively high precision is required in calculating the convolution filtering coefficients. Therefore, in CCCM, the input luminance samples and output chroma samples must be subtracted from the corresponding offset values ​​offset Luma, offset Cb, and offset Cr. The CCCM input is as follows, since the luminance reconstruction value and chroma prediction value outside the upper left corner of the current prediction block are used as biases. C'=C-offsetLuma N'=N-offsetLuma S'=S-offsetLuma E'=E-offsetLuma W'=W-offsetLuma P'=nonLinear(C') B=mid Value=1<<(bitDepth-1) The chroma prediction value is calculated using the following equation (7). JPEG2026521776000011.jpg36153 Here, offsetChroma is the offset of the Cb component and the Cr component, respectively. CCCM also accommodates the fact that a single block can have two sets of filtering coefficients simultaneously. Similar to MMLM, it uses a set of coefficients based, for example, on threshold control. Since the CCCM filtering coefficients c0...c6, and the possible threshold values ​​and the second set of parameters are derived, there is no need to analyze them from the bitstream. There are several derivative variations of cross-component prediction models based on convolutional models, including GLM. GLM is an intrachromic cross-component prediction tool in the YUV4:2:0 standard. In the ECM (Reference Software for further improving codec performance, based on the VTM-10.0 reference software and integrating various new tools), GLM includes both two-parameter and three-parameter models. Similar to CCLM, CCCM allows the selection of different reference region shapes; that is, there are CCCM-T mode and CCCM-L mode. Similarly, CCCM allows the selection of multiple parameter models; that is, there is MM-CCCM mode. In this mode, the current input sample determines which convolutional filter to use based on a threshold to obtain the final predicted pixel value.

[0077] Cross-component prediction merge mode (CCP merge mode) In each of the cross-component linear model prediction modes described above, all cross-component prediction model parameters (CCP model parameters) are calculated using adjacent reconstructed luminance pixels and reconstructed chroma pixels. Based on this, a technique called the cross-component prediction merge mode has been proposed as a new cross-component prediction mode. In this mode, the cross-component prediction model parameters of the current encoding block can be directly inherited from the reconstructed block without being calculated. An identifier indicates whether the cross-component prediction merge mode is used for the current block. If this identifier is true, i.e., the current block is in cross-component prediction merge mode, a cross-component prediction model parameter list ccmList[NUM_LMC_MERGE_CANDS] is created for the current block, and this list is populated with existing cross-component prediction model parameters from spatially adjacent encoding blocks, spatially non-adjacent encoding blocks, and the history information list. By default, the upper limit of the number of candidates NUM_LMC_MERGE_CANDS in the current list is 12. In the above process, if the list is not completely filled, the list is filled according to the pre-configured default parameters. The candidate index indicates the specific parameters to be used. The method for filling in the candidate list is as follows: 1. Spatial adjacency candidates First, check the spatially adjacent blocks. The positions of the adjacent blocks are shown in Figure 7A, and the checking order is B1->A1->B0->A0->B2. 2. Spatially non-adjacent candidates After all spatially adjacent candidates have been checked, spatially non-adjacent candidates are considered. Their spatial relationships are shown in Figure 7B. 3. Parameter candidates based on historical information The table is maintained based on historical information to include recently used cross-component predictive model parameters. The table is reset at the beginning of each CTU row. If the current list is not completely filled after including spatially adjacent and non-adjacent candidates, cross-component predictive model parameters from the historical table are added to the list. 4. Default parameters for CCLM candidates If the list is not completely filled, after checking for spatially adjacent and non-adjacent candidates, CCLM candidates with default scaling parameters are considered. The default scaling parameters are {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8}. If CCLM type candidates exist in the previous construction process, the scaling parameters of the first added CCLM type candidate (here a) are considered. first The (notation) is adjusted and added to the candidate list. In this case, the scaling parameter is {0,a first The result is +{1 / 8,-1 / 8,2 / 8,-2 / 8,3 / 8,-3 / 8,4 / 8,-4 / 8,5 / 8,-5 / 8,6 / 8}}.

[0078] The parameter inheritance rules are as follows: When inheriting a CCLM candidate, only the scaling parameter is inherited. The offset parameter is recalculated. When inheriting MMLM candidates, scaling parameters and classification thresholds are inherited. Offset parameters are recalculated, but if there are no adjacent reconstructed samples available for classification, the offset parameters are also inherited directly. When inheriting a CCCM candidate, all convolution parameters and classification thresholds are inherited. When inheriting a GLM candidate, if the GLM is in 3-parameter mode, all gradient indices and model parameters are inherited. Otherwise, if the GLM is in 2-parameter mode, only the scaling parameter is inherited, and the offset parameter needs to be recalculated. When inheriting the chroma fusion mode, the MMLM parameters derived in the cross-component prediction section are inherited as candidates. When inheriting a CCP merge mode candidate, the inheritance method is determined by the candidate mode being inherited.

[0079] Multi-model cross-component prediction mode filtering The cross-component prediction mode described above includes a multi-model mode that provides multiple models for the same CU and then determines which cross-component model to use based on the relationship between the reference pixel and the threshold to obtain the final predicted value. Because adjacent pixels use different cross-component models, the final predicted value may not be sufficiently smooth. Therefore, a 3x3 low-pass filter, as shown in Figure 7C, is provided for the multi-model cross-component prediction mode. This filter acts on the predicted samples generated by the cross-component prediction mode. For pixels at the boundary of a predicted sample, the filtering process may involve surrounding adjacent reconstructed pixels. For pixels within a predicted sample, the filtering process only involves the internal predicted pixels. Non-existent pixels are filled in using internal predicted pixels as per the specific situation. This mode is indicated by encoding a single identifier, ccInsideFilter, in a multi-model cross-component prediction mode that satisfies the conditions. A ccInsideFilter value of 1 indicates that the predicted pixel values ​​need to be filtered, and a ccInsideFilter value of 0 indicates that the predicted pixel values ​​do not need to be filtered.

[0080] Chroma Fusion Mode Generally, chroma prediction modes are divided into two types: cross-component prediction modes and non-cross-component prediction modes. Non-cross-component prediction modes typically include modes such as Planar, DC, horizontal, vertical, and DIMD. If the current block employs a non-cross-component prediction mode, further analysis of the chroma fusion mode identifier is required. The relevant syntax for chroma fusion modes is shown in Table 3. [Table 3] In Table 3 above, isChromaFusion is the identifier for the chroma fusion mode. Table 4 shows the correspondence between the isChromaFusion value and the fusion mode. [Table 4]

[0081] Specifically, if the value of chromaFusionFlag is 0, the value of the identifier isChromaFusion will be 0, indicating that chroma fusion mode will not be used. When the chromaFusionFlag value is 1 and the chromaFusionType value is 0, the value of the identifier isChromaFusion becomes 1, indicating that the weighted chroma fusion mode is to be used. The operating principle of this mode is to combine the current non-cross-component prediction mode and the cross-component prediction mode to obtain the final prediction result. Exemplary examples of how they are combined are shown in equation (8). JPEG2026521776000014.jpg10166 Here, pred0 represents the predicted value in the current non-cross-component prediction mode, and pred1 represents the predicted value in the cross-component prediction mode. In one example, the cross-component prediction mode is set to MMLM by default, and pred is the final prediction result of the current chroma block. The weights w0 and w1 are determined according to the prediction mode of the adjacent blocks, with w0+w1=4 and shift=2. If both the left adjacent block and the upper adjacent block are in cross-component prediction mode, then {w0, w1}={1, 3}. If both the left adjacent block and the upper adjacent block are in non-cross-component prediction mode, then {w0, w1}={3, 1}. Otherwise, then {w0, w1}={2, 2}. In this case, the parameters in cross-component prediction mode can be inherited.

[0082] If the chromaFusionFlag value is 1, the chromaFusionType value is 1, and the chromaFusionCclm value is 0, the value of the identifier isChromaFusion will be 2, indicating that the single linear model chroma fusion mode is being used. If the chromaFusionFlag value is 1, the chromaFusionType value is 1, and the chromaFusionCclm value is 1, the value of the identifier isChromaFusion will be 3, indicating that the multilinear model chroma fusion mode is being used.

[0083] The operating principle of the linear model chroma fusion mode is to obtain the final prediction result by combining the current non-cross-component prediction mode with the luminance reconstruction pixel values. Exemplarily, the combination is as shown in equation (9). JPEG2026521776000015.jpg86169

[0084] Chroma fusion derivation mode In the chroma fusion mode described above, a cross-component prediction merge mode also exists when the chroma fusion mode identifier is 1. In this mode, the cross-component prediction model parameters for the cross-component prediction portion in the chroma fusion mode can be either obtained by calculation or inherited from the cross-component prediction model parameters of the reconstructed block. Here, the candidate list in the chroma fusion derivation mode and the candidate list in the cross-component prediction merge mode have the same configuration. Table 5 shows, as an example, the relevant syntax elements. [Table 5] As shown in Table 5, if the value of the identifier isChromaFusion is 1, the identifier chromaFusionMrgFlag is added to indicate whether or not the chroma fusion derivation mode is used. If the identifier chromaFusionMrgFlag is 1, the candidate index identifier chromaFusionMrgIdx is parsed to indicate the position of the referenced cross-component predictive model parameter in the candidate list, thereby determining the inherited cross-component predictive model parameter. For illustrative purposes, the relationship between the chromaFusionMrgIdx value and the encoding bin is shown in Table 6. [Table 6]

[0085] Each bin in the index identifier in Table 6 above is context-encoded using a separate context.

[0086] Current multi-model cross-component prediction filtering techniques only work in the conventional cross-component prediction mode, which typically uses identifiers to specify the particular cross-component prediction mode. This technique has not been implemented in the cross-component prediction merge mode, and therefore its filtering capabilities are not fully realized. The cross-component prediction method described above can predict the chroma component using the luminance component, but it has problems such as inaccurate predictions or undesirable prediction effects during the prediction process. The above proposed a multi-model cross-component prediction filtering technique, but this filtering technique only works in the conventional multi-model cross-component prediction mode, and because this multi-model cross-component prediction filtering technique instructs the decoding side from the encoding side via the bitstream to filter information, bitstream resources are wasted, affecting encoding performance. To solve the above technical problems, an embodiment of this application determines the cross-component prediction model parameters and filtering identifier of the current chroma block when predicting the current chroma block using a cross-component prediction mode. The filtering identifier of the current chroma block is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block and is used to indicate whether or not to filter the predicted value obtained based on the cross-component prediction mode. Next, the current chroma block is cross-component predicted based on the cross-component prediction model parameters, and a first predicted value of the current chroma block is obtained. Furthermore, a second predicted value of the current chroma block is determined based on the filtering identifier and the first predicted value of the current chroma block. In other words, an embodiment of this application improves the accuracy of cross-component prediction and improves encoding and decoding performance by filtering not only the chroma predicted value obtained by the multi-model cross-component prediction mode, but also the chroma predicted value obtained by other cross-component prediction modes (e.g., cross-component prediction merge mode, chroma fusion derivation mode, etc.). Furthermore, in the embodiments of this application, the filtering identifier of the current chroma block is obtained by inheriting the filtering identifiers of the encoded and decoded blocks, eliminating the need to introduce additional bit consumption to indicate the filtering identifier, thereby saving codewords and improving encoding efficiency.

[0087] The following describes the video decoding method provided in the embodiment of this application, using Figure 8 as an example of the decoding side.

[0088] Figure 8 is a flowchart of a video decoding method provided by one embodiment of the present application. The embodiment of the present application is applied to the video decoder shown in Figures 1 and 3. As shown in Figure 8, the method of the embodiment of the present application includes the following:

[0089] In S101, if it is determined that the prediction mode for the current chroma block is the cross-component prediction mode, the cross-component prediction model parameters and filtering identifiers for the current chroma block are determined. In the embodiments of this application, when the decoding side decodes the current block, first, predictive decoding is performed on the luminance component of the current block to obtain the luminance reconstruction value of the current block. Next, predictive decoding is performed on the chroma component of the current block. In the embodiments of this application, the chroma component of the current block is recorded as the current chroma block. Before performing predictive decoding on the current chroma block, the prediction mode for the current chroma block is determined. The embodiments of this application do not limit the specific method for determining the prediction mode of the current chromablock. In one example, the default prediction mode is determined as the prediction mode for the current chroma block. That is, in the embodiments of this invention, both the encoding and decoding sides use the default prediction mode to predict the current chroma block. For example, both the encoding and decoding sides default to the cross-component prediction mode for the current chroma block. In one example, the encoding side determines the prediction mode with the lowest cost from several candidate prediction modes and sets it as the prediction mode for the current chroma block. Simultaneously, the encoding side encodes the prediction mode instruction information into a bitstream, for example, the mode index of the prediction mode into the bitstream. At this point, the decoding side obtains the prediction mode for the current chroma block by decoding the bitstream. From the above, it can be seen that cross-component prediction modes include CCLM, CCCM, GLM, CCMerge, chroma fusion derivation modes, and others. If the cross-component prediction mode employed by the decoding side is either CCMerge mode or chroma fusion derivation mode, the decoding side needs to construct a list to determine the prediction mode of the current chroma block. Based on this, in some cases, the decoding side cannot directly determine the prediction mode of the current chroma block by decoding the bitstream. For example, if the bitstream is decoded and the CCMerge mode is obtained, the decoding side needs to construct a list of cross-component prediction modes and determine the specific cross-component prediction mode of the current chroma block from that list. Therefore, in the embodiments of this application, for the sake of explanation, the prediction mode obtained by decoding the bitstream is recorded as the first prediction mode. At this time, the decoding side decodes the bitstream to obtain the first prediction mode and then determines the prediction mode of the current chroma block based on the first prediction mode. In other words, in the embodiments of this application, for the sake of explanation, the encoding side records the prediction mode on which the bitstream is written as the first prediction mode. In this way, the decoding side can directly obtain the first prediction mode by decoding the bitstream. For example, the decoding side decodes the bitstream to obtain a prediction mode index and determines the first prediction mode based on the prediction mode index. Alternatively, the decoding side decodes the bitstream to obtain an enable identifier for at least one prediction mode and further determines the first prediction mode based on the enable identifier for that at least one prediction mode. For example, if the decoding side decodes the bitstream and obtains that the CCCM mode enable identifier is 1, it indicates that the CCCM mode is being used, and in this case, the first prediction mode is determined to be the CCCM mode. Alternatively, if the decoding side decodes the bitstream and obtains that the CCMerge mode enable identifier is 1, it indicates that the CCMerge mode is being used, and in this case, the first prediction mode is determined to be the CCMerge mode. If the first prediction mode is determined to be the CCMerge mode or the chroma fusion derivation mode, a candidate list is constructed, and a cross-component prediction mode for the current chroma block determination is selected from the candidate list. For a specific process, please refer to the description of the embodiment above. In the embodiments of this application, when it is determined that the current chroma block will be predicted using the cross-component prediction mode, the cross-component prediction model parameters and filtering identifiers for the current chroma block are determined. Here, the cross-component prediction model parameters are the model parameters that the current chromablock uses when making predictions using the cross-component prediction mode. For example, these are a and b in equation (1) above. Here, the filtering identifier is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. For example, if the filtering identifier is set to true, that is, if the value of the filtering identifier is 1, it indicates that the predicted values ​​obtained based on the cross-component prediction mode will be filtered. As another example, if the filtering identifier is set to false, that is, if the value of the filtering identifier is 0, it indicates that the predicted values ​​obtained based on the cross-component prediction mode will not be filtered. In the embodiments of this application, the filtering identifier of the current chroma block is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block. That is, in the embodiments of this application, the filtering identifier of the current chroma block is determined by inheriting the filtering identifiers of the encoded and decoded blocks, so that the encoding side does not need to introduce additional bit consumption to indicate the filtering identifier, saving codewords and improving encoding efficiency. The following describes the process by which the decoding side determines the cross-component prediction model parameters and filtering identifiers for the current chroma block. From the above, it can be seen that the cross-component prediction mode includes modes such as CCLM, CCCM, GLM, CCMerge, and chroma fusion derivation mode. In some embodiments, if the current chroma block's cross-component prediction mode is CCLM, CCCM, GLM, or other modes, the decoding side can computationally determine the current chroma block's cross-component prediction model parameters. The computation process is described above and is omitted here. The filtering identifier of the current chroma block is determined by the decoding side based on the filtering identifiers of the decoded image blocks surrounding the current chroma block; that is, the decoding side inherits the filtering identifiers of the decoded image blocks as the filtering identifier of the current chroma block. In some embodiments, if the current chroma block's cross-component prediction mode is CCMerge or chroma fusion derivation mode, the decoding side can derive the current chroma block's cross-component prediction model parameters based on the cross-component prediction model parameters of the decoded image blocks surrounding the current chroma block, and derive the current chroma block's filtering coefficients based on the filtering coefficients of the decoded image blocks surrounding the current chroma block. As can be seen from the above, in some cases, the decoding side determining the filtering coefficients and cross-component prediction model parameters for the current chroma block is a separate step and can be determined independently. In some cases, the decoding side can determine the filtering coefficients and cross-component prediction model parameters for the current chroma block simultaneously. For example, if the cross-component prediction mode for the current chroma block is a derivation mode such as CCMerge or chroma fusion derivation mode, the decoding side can synchronously derive the filtering coefficients and cross-component prediction model parameters for the current chroma block. As can be seen from the above description, in the embodiments of this application, in one case, the process for determining the current chroma block cross-component predictive model parameters and the process for determining the current chroma block filtering identifier may be the same process, that is, the current chroma block cross-component predictive model parameters and filtering identifier are determined together. In another case, the process for determining the current chroma block cross-component predictive model parameters and the process for determining the current chroma block filtering identifier are two independent processes, that is, the current chroma block cross-component predictive model parameters and filtering identifier are determined separately. These two cases will be described below. In Case 1, both the cross-component prediction model parameters and the filtering identifier of the current chroma block are determined. That is, in the embodiments of this application, the cross-component prediction model parameters and the filtering identifier are bound together. Once the cross-component prediction model parameters of the current chroma block are determined, the filtering identifier bound to the cross-component prediction model parameters of the current chroma block is determined as the filtering identifier of the current chroma block. Alternatively, as can be understood, in this embodiment, the current chroma block can inherit not only the cross-component prediction model parameters of other decoded image blocks, but also the filtering identifiers of the decoded image blocks. For example, the current chroma block inherits the cross-component prediction model parameters of the surrounding decoded image block 1, while also inheriting the filtering identifier of that image block 1. In this way, the decoding side determines the cross-component prediction model parameters of the current chroma block and the filtering identifier of the current chroma block at the same time, saving computational resources on the decoding side and improving decoding efficiency. Based on this, the determination of the cross-component prediction model parameters and filtering identifiers for the current chroma block in S101 above includes the following step S101-A.

[0090] In S101-A, the cross-component prediction model parameters and filtering identifiers for the current chroma block are determined based on the cross-component prediction information of the decoded image blocks surrounding the current chroma block. Here, the cross-component prediction information includes the cross-component prediction model parameters and filtering identifiers for the decoded image blocks. In Case 1, the cross-component prediction information of the decoded image blocks surrounding the current chroma block includes the cross-component prediction model parameters used by the decoded image block during cross-component prediction, and the filtering identifier of the decoded image block, the filtering identifier of the decoded image block is used to indicate whether or not to filter the predicted values ​​obtained by the cross-component prediction of the decoded image block. In one example, Table 7 shows the cross-component prediction information for decoded image blocks surrounding the current chroma block. [Table 7] As can be seen from Table 7 above, the cross-component prediction information for each decoded image block includes the cross-component prediction model parameters used by that decoded image block and the filtering identifier of that decoded image block. In this way, the decoding side can determine the cross-component prediction model parameters and filtering identifier of the current chroma block based on the cross-component prediction information of the decoded image blocks surrounding the current chroma block. For example, the cross-component prediction model parameters of a certain decoded image block among the decoded image blocks surrounding the current chroma block can be determined as the cross-component prediction model parameters of the current chroma block, and the filtering identifier of that decoded image block can be determined as the filtering identifier of the current chroma block. In embodiments of this application, the decoding side includes, but is not limited to, several methods for determining the cross-component prediction model parameters and filtering identifiers of the current chroma block based on cross-component prediction information of decoded image blocks surrounding the current chroma block. In Method 1, the decoding side, by default, determines the cross-component prediction model parameters of a decoded image block surrounding the current chroma block, for example, a first decoded image block, as the cross-component prediction model parameters of the current chroma block, and also determines the filtering identifier of the first decoded image block as the filtering identifier of the current chroma block. The embodiments of this application do not limit the specific type of the first decoded image block. For example, the first decoded image block is a decoded image block adjacent to the left of the current chroma block, a decoded image block adjacent to the upper left corner, or a decoded image block adjacent to the top. In Method 2, the decoding side, by default, determines the cross-component predictive model parameters of a decoded image block surrounding the current chroma block, for example, a first decoded image block, as the cross-component predictive model parameters of the current chroma block. The decoding side then, by default, determines the filtering identifier of another decoded image block surrounding the current chroma block, for example, a second decoded image block, as the filtering identifier of the current chroma block. The embodiments of this application do not limit the specific types of the first decoded image block and the second decoded image block. For example, the first decoded image block and the second decoded image block may be a decoded image block adjacent to the left of the current chroma block, a decoded image block adjacent to the upper left corner, or a decoded image block adjacent to the top, and may be different from the first and second decoded image blocks. For example, the first decoded image block is the decoded image block adjacent to the left of the current chroma block, and the second decoded image block is the decoded image block adjacent to the above of the current chroma block. In method 3, the decoding side determines the cross-component prediction model parameters and filtering identifiers of the current chroma block through the following steps S101-A1 to S101-A3. In S101-A1, a first candidate list is constructed based on the cross-component prediction information of the decoded image blocks surrounding the current chroma block. The first candidate list contains multiple groups of candidate cross-component prediction information, and each group of cross-component prediction information contains one group of candidate cross-component prediction model parameters and one candidate filtering identifier.

[0091] In S101-A2, the first cross-component prediction information is selected from the candidate cross-component prediction information of multiple groups included in the first candidate list.

[0092] In S101-A3, the cross-component prediction model parameters and filtering identifiers for the current chroma block are determined based on the first cross-component prediction information.

[0093] In this embodiment, the cross-component prediction information of a decoded image block includes the cross-component prediction model parameters and filtering identifier of the decoded image block. Therefore, the decoding side constructs a first candidate list based on the cross-component prediction information of decoded image blocks surrounding the current chroma block. This first candidate list includes multiple groups of candidate cross-component prediction information, each group containing one group of candidate cross-component prediction model parameters and one candidate filtering identifier. Next, the decoding side selects one group of candidate cross-component prediction information from the multiple groups of candidate cross-component prediction information included in the constructed first candidate list and records it as the first cross-component prediction information. In this way, the decoding side can determine the cross-component prediction model parameters and filtering identifier of the current chroma block based on the selected first cross-component prediction information. Furthermore, since the cross-component prediction model parameters and filtering identifier of the current chroma block are determined simultaneously, the determination speed of the cross-component prediction model parameters and filtering identifier of the current chroma block is improved, and decoding efficiency is improved without improving the prediction effect.

[0094] In some embodiments, to facilitate the management of cross-component prediction information, in embodiments of the present application, the cross-component prediction information of a decoded image block is stored in the same memory space as the decoded image block, for example, in a first memory space curCand, i.e., the cross-component prediction model parameters and filtering identifiers of the same decoded image block are stored in the same memory space as the decoded image block. For example, cross-component prediction information for a decoded image block is stored as shown in Table 8. [Table 8]

[0095] In some embodiments, the cross-component prediction information for the decoded image block includes, in addition to the cross-component prediction model parameters and filtering identifiers, the cross-component prediction mode information for the decoded image block. Exemplarily, the cross-component prediction mode information for the decoded image block is also stored in the first memory space of the decoded image block. In this case, the cross-component prediction information for the decoded image block is stored as shown in Table 9. [Table 9]

[0096] In the embodiment of this application, when cross-component prediction information (e.g., cross-component prediction model parameters, filtering identifiers) of a decoded image block is stored in the first memory space curCand of the decoded image block, when the decoding side executes S101-A1, the cross-component prediction information for each decoded image block is obtained from the first memory space of each decoded image block of the current chroma block, enabling rapid acquisition of the cross-component prediction information of the decoded image block. Furthermore, a first candidate list is constructed based on the rapidly acquired cross-component prediction information of the decoded image block, improving the speed of constructing the first candidate list.

[0097] The following describes the process of constructing a first candidate list based on cross-component prediction information of decoded image blocks surrounding the current chroma block. The embodiments of this application do not limit the specific type of decoded image block surrounding the current chroma block. In some embodiments, the decoded image blocks surrounding the current chroma block include at least one of the decoded images above, to the left, upper left, lower left, and upper right of the current chroma block. For example, the decoded image blocks surrounding the current chroma block include only the decoded image blocks above the current chroma block. As another example, the decoded image blocks surrounding the current chroma block include only the decoded image blocks to the left of the current chroma block. As another example, the decoded image blocks surrounding the current chroma block include only the decoded image blocks to the left and bottom left of the current chroma block. As another example, the decoded image blocks surrounding the current chroma block include only the decoded image blocks to the left and upper left of the current chroma block. As another example, the decoded image blocks surrounding the current chroma block include only the decoded image blocks to the left, bottom left, and top left of the current chroma block. As another example, the decoded image blocks surrounding the current chroma block include only the decoded image blocks above and to the upper left of the current chroma block. As another example, the decoded image blocks surrounding the current chroma block include only the decoded image blocks above and to the upper right of the current chroma block. As another example, the decoded image blocks surrounding the current chroma block include only the decoded image blocks above, to the upper left, and to the upper right of the current chroma block. In this way, the decoding side adds the cross-component prediction information of at least one decoded image block to the first candidate list.

[0098] In some embodiments, S101-A1 above includes the following steps.

[0099] In S101-A11, cross-component prediction information for spatially adjacent blocks of the current chroma block is added to the first candidate list according to the first preset order. In this embodiment, the decoded image blocks surrounding the current chroma block include the spatially adjacent blocks of the current chroma block. Exemplarily, the spatially adjacent blocks of the current chroma block include the decoded image blocks at five locations A0, A1, B0, B1, and B2 around the current chroma block, as shown in Figure 7A. In some embodiments, the spatially adjacent blocks of the current chroma block may include more or fewer spatially adjacent blocks than those shown in Figure 7A, or spatially adjacent blocks that are not exactly identical to those shown in Figure 7A. The embodiments of this application are not limited thereto. For ease of explanation, the spatially adjacent blocks shown in Figure 7A are used as an example. In this embodiment, the decoding side adds cross-component prediction information for spatially adjacent blocks of the current chroma block one by one to the first candidate list according to a first preset order until the length of the first candidate list reaches a preset length. Here, the length of the first candidate list may be understood as the number of cross-component prediction information items contained in the first candidate list. If the number of cross-component prediction information items contained in the first candidate list reaches a preset first number, no further cross-component prediction information is added to the first candidate list. The embodiments of this application do not limit the first preset sequence. For example, if the spatially adjacent blocks of the current chroma block are shown in Figure 7A, the first preset order described above may be B1→A1→B0→A0→B2. In other words, the decoding side sequentially accesses the spatially adjacent blocks at positions B1, A1, B0, A0, and B2. If the spatially adjacent blocks at these positions employ the cross-component intra-prediction mode, the cross-component prediction information for the spatially adjacent blocks is sequentially stored in the first candidate list. Exemplarily, the order in which the cross-component prediction information is stored in the first candidate list may coincide with the order in which the above positions are accessed.

[0100] In some embodiments, the decoded image blocks surrounding the current chroma block further include spatially non-adjacent blocks of the current chroma block. Based on the steps above, the decoding side adds cross-component prediction information for spatially adjacent blocks of the current chroma block to a first candidate list. If the number of cross-component predictions in the first candidate list is less than the first preset number, i.e., the length of the first candidate list is shorter than a preset length, the decoding side adds cross-component prediction information for spatially non-adjacent blocks of the current chroma block to the first candidate list according to a second preset order. The spatially non-adjacent blocks of the current chroma block include decoded image blocks located in several non-adjacent positions above, to the upper left, upper right, left, and lower left of the current chroma block. Exemplary, the spatially non-adjacent blocks of the current chroma block include decoded image blocks located at 60 positions around the current chroma block, as shown in Figure 7B. In some embodiments, the spatially non-adjacent blocks of the current chroma block may include more or fewer spatially non-adjacent blocks than those shown in Figure 7B, or spatially non-adjacent blocks that are not exactly identical to those shown in Figure 7B. The embodiments of this application are not limited thereto. For ease of explanation, the spatially non-adjacent blocks shown in Figure 7B will be used as an example. In this embodiment, after the decoding side adds the cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list based on the above steps, if the number of cross-component prediction information entries in the first candidate list is less than the number of first presets, the decoding side adds the cross-component prediction information of spatially non-adjacent blocks of the current chroma block to the first candidate list one by one according to the second preset order until the number of cross-component prediction information entries in the first candidate list is equal to the number of first presets.

[0101] In some embodiments, after the decoding side adds the cross-component prediction information for spatially adjacent and spatially non-adjacent blocks of the current chroma block to the first candidate list, if the number of cross-component predictions in the first candidate list is still less than the first preset number, the decoding side adds the cross-component predictions recently used by the decoding side to the first candidate list until the number of cross-component predictions in the first candidate list is equal to the first preset number. In the embodiments of this application, the decoding side maintains a table based on historical information, which includes cross-component prediction information recently used by the decoding side. Thus, after the decoding side adds cross-component prediction information for spatially adjacent and spatially non-adjacent blocks of the current chroma block to a first candidate list, if the number of cross-component prediction information entries in the first candidate list is still less than the first preset number, the decoding side selects one or more recently used cross-component prediction information entries from this historical information-based table and adds them to the first candidate list.

[0102] In some embodiments, if the decoding side adds recently used cross-component prediction information to a first candidate list, but the number of cross-component prediction information entries in the first candidate list is still less than the first preset number, the embodiments of this application further include the following steps. In Step 1, the decoding side obtains at least one set of default cross-component predictive model parameters.

[0103] In step 2, for the i-th group of cross-component prediction model parameters in at least one group of cross-component prediction model parameters, the filtering identifier corresponding to the i-th group of cross-component prediction model parameters is determined, and the i-th group of cross-component prediction model parameters and the filtering identifier corresponding to the i-th group of cross-component prediction model parameters are combined to form the i-th group of cross-component prediction information, where i is a positive integer. The embodiments of this application include several default cross-component predictive model parameters, such as default CCLM cross-component predictive model parameters. The default cross-component predictive model parameters only include the cross-component predictive model parameters themselves, and do not include filtering identifiers. Therefore, the decoding side needs to determine the filtering identifiers corresponding to each group of cross-component predictive model parameters in at least one group of cross-component predictive model parameters. Here, since the process for determining the filtering identifiers corresponding to each group of cross-component predictive model parameters in at least one group of cross-component predictive model parameters is consistent, for the sake of explanation, we will use the example of determining the filtering identifiers corresponding to the i-th group of cross-component predictive model parameters. The embodiments of this application do not limit the specific method by which the decoding side determines the filtering identifier corresponding to the i-th group of cross-component prediction model parameters. In one example, the decoding side determines the default value as the value of the filtering identifier corresponding to the i-th group cross-component prediction model parameter. This default value may be a first or second numerical value. For example, the decoding side determines that the value of the filtering identifier corresponding to the i-th group of cross-component prediction model parameters is a first value (e.g., 1) used to instruct the system to filter the predicted values ​​obtained by the cross-component prediction mode. As another example, the decoding side determines that the value of the filtering identifier corresponding to the i-th group of cross-component prediction model parameters is a second value (e.g., 0) used to instruct the system not to filter the predicted values ​​obtained by the cross-component prediction mode. Based on the steps described above, the decoding side can determine the filtering identifiers that correspond to each group of cross-component predictive model parameters in at least one set of cross-component predictive model parameters. Next, the cross-component predictive model parameters in at least one set of cross-component predictive model parameters, along with the filtering identifiers that correspond to those parameters, are determined as a group of cross-component predictive information, and at least one group of cross-component predictive information is obtained.

[0104] In step 3, at least one group of determined cross-component prediction information is added to the first candidate list.

[0105] Based on the steps above, the decoding side determines a first candidate list and then performs step S101-A2 above to select a first cross-component prediction information from the multiple groups of candidate cross-component prediction information included in the first candidate list.

[0106] The embodiments of this application do not limit the specific method by which the decoding side selects the first cross-component prediction information from multiple groups of candidate cross-component prediction information included in the first candidate list. In one possible implementation, both the encoding and decoding sides, by default, determine a set of candidate cross-component prediction information from among multiple sets of candidate cross-component prediction information included in the first candidate list as the first cross-component prediction information. For example, by default, the first or second set of candidate cross-component prediction information included in the first candidate list is determined as the first cross-component prediction information. In one possible implementation, the encoding side selects a first cross-component prediction information from a first candidate list, and then writes the index of this first cross-component prediction information in the first candidate list to the bitstream. In this way, the decoding side obtains the index of the first cross-component prediction information by decoding the bitstream, and then selects the first cross-component prediction information from the first candidate list constructed above, based on the index of the first cross-component prediction information.

[0107] Based on the steps described above, the decoding side selects a first cross-component prediction from multiple groups of candidate cross-component prediction information included in the first candidate list, and then performs the steps S101-A3 described above. As can be seen from the above, the first cross-component prediction information in the embodiment of this application includes a group of cross-component prediction model parameters and one filtering identifier. Based on this, S101-A3 above includes at least the following implementations.

[0108] In Method 1, the decoding side directly determines the cross-component prediction model parameters included in the first cross-component prediction information as the cross-component prediction model parameters of the current chroma block, and also determines the filtering identifier included in the first cross-component prediction information as the filtering identifier of the current chroma block.

[0109] In Method 2, the decoding side modifies the cross-component prediction model parameters included in the first cross-component prediction information and determines the modified cross-component prediction model parameters as the cross-component prediction model parameters for the current chroma block. At the same time, it determines the filtering identifier included in the first cross-component prediction information as the filtering identifier for the current chroma block.

[0110] In some embodiments, if the cross-component predictive model parameters and filtering identifiers for the same image block are stored in the first memory space of that image block, the decoding side determines the cross-component predictive model parameters and filtering identifiers for the current chroma block based on the above steps, and then stores the cross-component predictive model parameters and filtering identifiers for the current chroma block in the first memory space of the current chroma block, so that subsequent chroma blocks can use them to determine the cross-component predictive model parameters and filtering identifiers.

[0111] The embodiments of this application do not limit the specific representation of the filtering identifier of the current chromablock. In one example, the field curCand.ccInsideFilter is used to indicate the filtering identifier.

[0112] The above describes the process by which the decoding side synchronously determines the cross-component prediction model parameters and filtering identifiers for the current chroma block in Case 1.

[0113] In Case 2, the decoding side determines the cross-component predictive model parameters and filtering identifiers for the current chroma block, respectively. In this case, S101 above includes the following steps S101-B1 and S101-B2.

[0114] In S101-B1, the cross-component prediction model parameters for the current chroma block are determined.

[0115] In S101-B2, the filtering identifier of the current chroma block is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block.

[0116] In this Case 2, the decoding side has the steps of determining the cross-component predictive model parameters of the current chroma block and determining the filtering identifier of the current chroma block. Here, the decoding side may first determine the cross-component predictive model parameters of the current chroma block and then determine the filtering identifier of the current chroma block. Alternatively, the decoding side may first determine the filtering identifier of the current chroma block and then determine the cross-component predictive model parameters of the current chroma block. Alternatively, the decoding side may determine the cross-component predictive model parameters and the filtering identifier of the current chroma block in parallel, and the embodiments of this application are not limited thereto.

[0117] Here, the methods for determining the current chromablock cross-component prediction model parameters in S101-B1 include, but are not limited to, the following:

[0118] In Method 1, the encoding side writes the cross-component prediction model parameters of the current chroma block to the bitstream. In this way, the decoding side can obtain the cross-component prediction model parameters of the current chroma block by decoding the bitstream.

[0119] In Method 2, the decoding side calculates the cross-component prediction model parameters of the current chroma block based on the decoded reference pixels surrounding the current chroma block and their corresponding luminance components. For a detailed calculation process, please refer to the description of the relevant embodiments above.

[0120] In method 3, the decoding side inherits the cross-component prediction model parameters of the decoded image block and uses them as the cross-component prediction model parameters of the current chroma block.

[0121] Specifically, the decoding side constructs a list of candidate cross-component predictive model parameters in the same way as constructing the first candidate list described above. For example, the decoding side adds the cross-component predictive model parameters of the spatially adjacent blocks of the current chroma block, the cross-component predictive model parameters of the spatially non-adjacent blocks of the current chroma block, the recently used cross-component predictive model parameters, and the default cross-component predictive model parameters to the list of candidate cross-component predictive model parameters in a predetermined order until the length of the list of candidate cross-component predictive model parameters reaches a predetermined length. Next, the decoding side decodes the bitstream to obtain the index of the current chroma block's cross-component predictive model parameter in the cross-component predictive model parameter candidate list, and based on this index, determines the cross-component predictive model parameter of the current chroma block from the constructed list of candidate cross-component predictive model parameters.

[0122] The following describes the process by which the decoding side determines the filtering identifier of the current chroma block. In S101-B2 above, the method for determining the filtering identifier of the current chroma block based on the filtering identifiers of the decoded image blocks surrounding the current chroma block includes, but is not limited to, the following:

[0123] In Method 1, the decoding side, by default, determines the filtering identifier of a decoded image block surrounding the current chroma block as the filtering identifier of the current chroma block. For example, the decoding side, by default, determines the filtering identifier of a decoded image block above the current chroma block as the filtering identifier of the current chroma block. As another example, the decoding side, by default, determines the filtering identifier of a decoded image block to the left of the current chroma block as the filtering identifier of the current chroma block. As yet another example, the decoding side, by default, determines the filtering identifier of a decoded image block in the upper left corner of the current chroma block as the filtering identifier of the current chroma block. As yet another example, the decoding side, by default, determines the filtering identifier of a decoded image block in the upper right corner of the current chroma block as the filtering identifier of the current chroma block.

[0124] In method 2, the above S101-B2 includes the following steps S101-B21 and S101-B22. In S101-B21, a second candidate list is constructed based on the filtering identifiers of the decoded image blocks surrounding the current chroma block. The second candidate list contains multiple candidate filtering identifiers. In S101-B22, one candidate filtering identifier is selected from the second candidate list and determined to be the filtering identifier for the current chroma block.

[0125] In method 2, the decoding side can construct a second candidate list based on the filtering identifiers of the decoded image blocks surrounding the current chroma block. This second candidate list can be understood as a candidate filtering identifier list, and the decoding side selects the filtering identifier for the current chroma block from the candidate filtering identifiers included in this second candidate list.

[0126] The following describes the process by which the decoding side constructs a second candidate list based on the filtering identifiers of the decoded image blocks surrounding the current chroma block. The embodiments of this application do not limit the specific type of decoded image block surrounding the current chroma block. In some embodiments, the decoded image blocks surrounding the current chroma block include at least one of the decoded images above, to the left, upper left, lower left, and upper right of the current chroma block. Thus, the decoding side adds the filtering identifier of this at least one decoded image block to the second candidate list.

[0127] In some embodiments, S101-B21 above includes the following steps.

[0128] In S101-B211, the filtering identifiers of the spatially adjacent blocks of the current chroma block are added to the second candidate list according to the third preset order. In this embodiment, the decoded image blocks surrounding the current chroma block include the spatially adjacent blocks of the current chroma block. Exemplarily, the spatially adjacent blocks of the current chroma block include the decoded image blocks at five positions A0, A1, B0, B1, and B2 around the current chroma block, as shown in Figure 7A. In some embodiments, the spatially adjacent blocks of the current chroma block may include more or fewer spatially adjacent blocks than those shown in Figure 7A, or spatially adjacent blocks that are not at exactly the same positions as those shown in Figure 7A. The embodiments of this application are not limited thereto. For ease of explanation, the spatially adjacent blocks shown in Figure 7A will be used as an example. In this embodiment, the decoding side adds filtering identifiers of spatially adjacent blocks of the current chroma block one by one to the second candidate list according to the third preset order until the length of the second candidate list reaches a preset length. In other words, if the number of filtering identifiers in the second candidate list reaches the second preset number, no further filtering identifiers are added to the second candidate list. The embodiments of this application do not limit the second preset order. For example, if the spatially adjacent blocks of the current chroma block are as shown in Figure 7A, the second preset order would be B1→A1→B0→A0→B2. In other words, the decoding side sequentially accesses the spatially adjacent blocks at the positions B1→A1→B0→A0→B2. If the spatially adjacent blocks at these positions employ the cross-component intra prediction mode, the filtering identifiers of the spatially adjacent blocks are sequentially stored in the second candidate list. Exemplarily, the order in which the filtering identifiers are stored in the second candidate list may coincide with the order in which the positions are accessed.

[0129] In some embodiments, the decoded image blocks surrounding the current chroma block further include spatially non-adjacent blocks of the current chroma block. Based on the steps above, the decoding side adds filtering identifiers of spatially adjacent blocks of the current chroma block to a second candidate list. If the number of filtering identifiers in this second candidate list is less than the second preset number, i.e., the length of the second candidate list is shorter than a preset length, the decoding side adds filtering identifiers of spatially non-adjacent blocks of the current chroma block to the second candidate list according to a fourth preset order. Spatially non-adjacent blocks of the current chroma block include decoded image blocks located at several non-adjacent positions above, to the upper left, upper right, left, and lower left of the current chroma block.

[0130] Exemplary, the spatially non-adjacent blocks of the current chroma block include decoded image blocks at 60 locations around the current chroma block, as shown in Figure 7B. In some embodiments, the spatially non-adjacent blocks of the current chroma block may include more or fewer spatially non-adjacent blocks than those shown in Figure 7B, or spatially non-adjacent blocks that are not at exactly the same locations as those shown in Figure 7B. The embodiments of this application are not limited thereto. For ease of explanation, the spatially non-adjacent blocks shown in Figure 7B are used as an example. In this embodiment, after the decoding side adds the filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list based on the above steps, if the number of filtering identifiers in this second candidate list is less than the second preset number, the decoding side adds the filtering identifiers of spatially non-adjacent blocks of the current chroma block one by one to the second candidate list according to the fourth preset order until the number of filtering identifiers in the second candidate list is equal to the second preset number.

[0131] In some embodiments, after the decoding side adds the filtering identifiers of the spatially adjacent and spatially non-adjacent blocks of the current chroma block to a second candidate list, if the number of filtering identifiers in this second candidate list is still less than the second preset number, the decoding side adds the filtering identifiers recently used by the decoding side to the second candidate list. In other words, in embodiments of the present application, the decoding side can maintain a table for storing the filtering identifiers recently used by the decoding side. Thus, when constructing the second candidate list, the filtering identifiers recently used by the decoding side can be retrieved from this table and added to the second candidate list.

[0132] In some embodiments, the decoding side adds the most recently used filtering identifier to a second candidate list. If the number of filtering identifiers in this second candidate list is less than the second preset number, the decoding side adds a default filtering identifier to the second candidate list. The embodiments of this application do not limit the specific value of the default filtering identifier, which is determined on a case-by-case basis.

[0133] Based on the steps above, the decoding side determines a second candidate list, and then performs steps S101-B22 above to select one candidate filtering identifier from the second candidate list and determine it as the filtering identifier for the current chroma block.

[0134] The embodiments of this application do not limit the specific method by which the decoding side selects the filtering identifier of the current chroma block from a second candidate list.

[0135] In one possible implementation, both the encoding and decoding sides, by default, determine one of the candidate filtering identifiers included in this second candidate list as the filtering identifier for the current chroma block. For example, by default, the first or second filtering identifier included in this second candidate list is determined as the filtering identifier for the current chroma block.

[0136] In one possible implementation, the encoding side selects the filtering identifier for the current chroma block from a second candidate list, and then writes the index of this current chroma block's filtering identifier in the second candidate list to the bitstream. In this way, the decoding side obtains the filtering identifier index by decoding the bitstream, and then, based on this filtering identifier index, selects the filtering identifier for the current chroma block from the constructed second candidate list.

[0137] The above describes the process in Case 2 where the decoding side determines the cross-component prediction model parameters and filtering identifiers for the current chroma block.

[0138] The decoding side determines the cross-component prediction model parameters and filtering identifiers of the current chroma block based on the methods shown in Case 1 and Case 2 above, and then performs the following step S102.

[0139] In S102, cross-component prediction is performed on the current chroma block based on the cross-component prediction model parameters, and the first predicted value for the current chroma block is obtained. In the embodiments of this application, for the sake of explanation, the predicted value of the current chroma block obtained based on the cross-component intra-prediction mode is recorded as the first predicted value of the current chroma block. In the embodiments of this application, if the cross-component prediction mode and cross-component prediction model parameters employed by the current chromablock are different, the specific method for determining the first predicted value of the current chromablock will also be different.

[0140] In some embodiments, if the cross-component intra-prediction mode currently employed by the chromablock is CCLM mode, the determined cross-component prediction model parameters are the model parameters corresponding to CCLM mode. In this case, the decoding side substitutes the determined cross-component prediction model parameters into equation (1) above and performs calculations to determine the first preset value of the current chromablock.

[0141] In some embodiments, if the cross-component intra-prediction mode currently employed by the chromablock is CCCM mode, the determined cross-component prediction model parameters are those of a model corresponding to CCCM mode. In this case, the decoding side substitutes the determined cross-component prediction model parameters into equation (3) or equation (4) to determine the first preset value of the current chromablock.

[0142] In some embodiments, the decoding side determines a first predicted value for each of the two chroma components of the current chroma block. That is, for the i-th chroma component of the current chroma block, the decoding side determines the first predicted value of the current chroma block under the i-th chroma component based on the determined cross-component prediction model parameters. For example, the decoding side determines the first predicted value of the current chroma block under the first chroma component (component Cb or U) based on the determined cross-component prediction model parameters, and the decoding side also determines the first predicted value of the current chroma block under the second chroma component (component Cr or V) based on the determined cross-component prediction model parameters.

[0143] The decoding side determines the first predicted value of the current chroma block based on S102 above, and then executes S103 below.

[0144] In S103, the second predicted value for the current chroma block is determined based on the filtering identifier and the first predicted value for the current chroma block.

[0145] Based on the steps above, the decoding side determines the filtering identifier and first predicted value of the current chroma block, then decides whether or not to filter the first predicted value based on the filtering identifier of the current chroma block, and obtains the second predicted value of the current block. For example, if the filtering identifier of the current chroma block determined above instructs the decoding side to filter the first predicted value of the current chroma block, the decoding side uses a filter to filter this first predicted value and obtains the filtered predicted value. For ease of explanation, this filtered predicted value is recorded as the third predicted value of the current block. For example, the filter shown in Figure 7C is used to filter the first predicted value of the current block. For example, if the filtering identifier of the current chroma block indicates that the first predicted value should not be filtered, the first predicted value is determined to be the third predicted value of the current block. Finally, the second predicted value for the current chroma block is obtained based on the third predicted value for the current chroma block. For example, if the current chroma block prediction mode is cross-component prediction merge mode, the third predicted value of the current chroma block is directly determined as the second predicted value of the current chroma block. For example, if the current chroma block prediction mode is chroma fusion derivation mode, the decoding side determines the fourth predicted value of the current chroma block based on the non-cross-component prediction mode, and then obtains the second predicted value of the current chroma block based on the third and fourth predicted values ​​of the current chroma block.

[0146] In the video decoding method provided by the embodiments of this application, the decoding side determines the cross-component prediction model parameters and filtering identifier of the current chroma block when predicting the current chroma block using a cross-component prediction mode. This filtering identifier of the current chroma block is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block and is used to indicate whether or not to filter the predicted value obtained based on the cross-component prediction mode. Next, the current chroma block is cross-component predicted based on the cross-component prediction model parameters to obtain a first predicted value for the current chroma block. Furthermore, a second predicted value for the current chroma block is determined based on the filtering identifier of the current chroma block and the first predicted value. In other words, the embodiments of this application improve the prediction effect of cross-component prediction and improve encoding and decoding performance by predicting any first predicted value obtained by any cross-component prediction mode. Furthermore, in the embodiments of this application, the filtering identifier of the current chroma block is obtained by inheriting the filtering identifiers of the encoded and decoded blocks, eliminating the need to introduce additional bit consumption to indicate the filtering identifier, saving codewords and improving encoding efficiency.

[0147] The above section explained the prediction method of this application using the decoding side as an example; however, the following section will explain the prediction method of this application using the encoding side as an example.

[0148] Figure 9 is a flowchart of a prediction method provided by one embodiment of the present application, the embodiment of the present application is applied to the video encoder shown in Figures 1 and 2. As shown in Figure 9, the method of the embodiment of the present application includes the following:

[0149] In S201, if it is determined that the prediction mode for the current chroma block is the cross-component prediction mode, the cross-component prediction model parameters and filtering identifiers for the current chroma block are determined. In the embodiment of this application, when encoding the current block, the encoding side first performs predictive encoding on the luminance component of the current block to obtain the luminance reconstruction value of the current block. Next, predictive encoding is performed on the chroma component of the current block. In the embodiments of this application, the chroma component of the current block is recorded as the current chroma block. Before performing predictive encoding on the current chroma block, the prediction mode for the current chroma block is determined first.

[0150] The embodiments of this application do not limit the specific method for determining the prediction mode of the current chromablock.

[0151] In one example, the default prediction mode is determined as the prediction mode for the current chroma block. That is, in the embodiments of this application, both the encoding and decoding sides use the default prediction mode to predict the current chroma block. For example, both the encoding and decoding sides default to setting the prediction mode for the current chroma block to the cross-component prediction mode. In one example, the encoding side selects the prediction mode with the lowest cost from among several candidate prediction modes as the prediction mode for the current chroma block.

[0152] As can be seen from the above, cross-component prediction modes include CCLM, CCCM, GLM, CCMerge, and chroma fusion derivation modes.

[0153] If the cross-component prediction mode adopted by the encoding side is either CCMerge mode or chroma fusion derivation mode, the encoding side further needs to construct a list and determine the prediction mode of the current chroma block. For example, if the prediction mode of the current chroma block is CCMerge mode, the encoding side needs to construct a list of cross-component prediction modes and determine the specific cross-component prediction mode of the current chroma block from this list. Therefore, in the embodiment of this application, the encoding side first determines a first prediction mode and then determines the prediction mode of the current chroma block based on the first prediction mode. If the first prediction mode is determined to be either the CCMerge mode or the chroma fusion derivation mode, a candidate list is constructed, and a specific cross-component prediction mode for the current chroma block is selected from the candidate list. For details of the specific process, please refer to the description of the embodiment above. In some embodiments, the encoding side writes the determined current chroma block prediction mode to the bitstream, and the decoding side can obtain the current chroma block prediction mode by decoding the bitstream. For example, the encoding side writes the index of the current chroma block prediction mode to the bitstream. In another example, the encoding side writes the enable identifier of the current chroma block prediction mode to the bitstream. For example, if the current chroma block prediction mode is CCCM mode, the enable identifier for CCCM mode is set to 1 and written to the bitstream. Or, if the current chroma block prediction mode is CCMerg, the enable identifier for CCMerg is set to 1 and written to the bitstream. In the embodiments of this application, when it is determined that the current chroma block will predict the current chroma block using a cross-component prediction mode, the cross-component prediction model parameters and filtering identifiers of the current chroma block are identified. Here, the cross-component prediction model parameters are the model parameters used when the current chroma block makes predictions using the cross-component prediction mode. For example, these are a and b in equation (1) above. Here, the filtering identifier is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. For example, if the filtering identifier is set to true, that is, if the value of the filtering identifier is 1, it indicates that the predicted values ​​obtained based on the cross-component prediction mode will be filtered. As another example, if the filtering identifier is set to false, that is, if the value of the filtering identifier is 0, it indicates that the predicted values ​​obtained based on the cross-component prediction mode will not be filtered.

[0154] In the embodiments of this application, the filtering identifier of the current chroma block is determined based on the filtering identifiers of the encoded image blocks surrounding the current chroma block. That is, in the embodiments of this application, the filtering identifier of the current chroma block is determined by inheriting the filtering identifiers of the encoded and decoded blocks, so that the encoding side does not need to introduce additional bit consumption to indicate the filtering identifier, saving codewords and improving encoding efficiency.

[0155] The following describes the process by which the encoding side determines the cross-component prediction model parameters and filtering identifiers for the current chroma block.

[0156] As can be seen from the above, cross-component prediction modes include modes such as CCLM, CCCM, GLM, CCMerge, and chroma fusion derivation mode.

[0157] In some embodiments, if the current chroma block's cross-component prediction mode is a mode such as CCLM, CCCM, or GLM, the encoding side can calculate the current chroma block's cross-component prediction model parameters. The calculation process is omitted here as it can be found in the above description. The filtering identifier of the current chroma block is determined by the encoding side based on the filtering identifiers of the encoded image blocks surrounding the current chroma block. In other words, the encoding side inherits the filtering identifiers of the encoded image blocks and uses them as the filtering identifier of the current chroma block.

[0158] In some embodiments, if the current chroma block's cross-component prediction mode is a derivation mode such as CCMerge or chroma fusion derivation mode, the encoding side can derive the current chroma block's cross-component prediction model parameters based on the cross-component prediction model parameters of the encoded image blocks surrounding the current chroma block, and can also derive the current chroma block's filtering coefficients based on the filtering coefficients of the encoded image blocks surrounding the current chroma block.

[0159] As can be seen from the above, in some cases, determining the filtering coefficients and cross-component prediction model parameters of the current chroma block by the encoding side is a separate step and can be determined independently. In some cases, the encoding side can determine the filtering coefficients and cross-component prediction model parameters of the current chroma block simultaneously. For example, if the cross-component prediction mode of the current chroma block is a derivation mode such as CCMerge or chroma fusion derivation mode, the encoding side can synchronously derive the filtering coefficients and cross-component prediction model parameters of the current chroma block.

[0160] As can be seen from the above description, in the embodiments of this application, in one case, the process for determining the current chroma block cross-component predictive model parameters and the process for determining the current chroma block filtering identifier may be the same process, that is, the current chroma block cross-component predictive model parameters and filtering identifier are determined together. In another case, the process for determining the current chroma block cross-component predictive model parameters and the process for determining the current chroma block filtering identifier are two independent processes, that is, the current chroma block cross-component predictive model parameters and filtering identifier are determined separately. These two cases will be described below.

[0161] In Case 1, both the cross-component prediction model parameters and the filtering identifier of the current chroma block are determined. That is, in the embodiments of this application, the cross-component prediction model parameters and the filtering identifier are bound. Once the cross-component prediction model parameters of the current chroma block are determined, the filtering identifier bound to the cross-component prediction model parameters of the current chroma block is determined as the filtering identifier of the current chroma block. Alternatively, as can be understood, in this embodiment, the current chroma block can inherit not only the cross-component prediction model parameters of other encoded image blocks, but also the filtering identifiers of encoded image blocks. For example, the current chroma block inherits the cross-component prediction model parameters of the surrounding encoded image block 1, while also inheriting the filtering identifier of that image block 1. In this way, the encoding side determines the current chroma block's cross-component prediction model parameters and the current chroma block's filtering identifier simultaneously, saving computational resources and improving decoding efficiency.

[0162] Based on this, the determination of the cross-component predictive model parameters and filtering identifiers for the current chroma block in S201 above includes the following step S201-A.

[0163] In S201-A, the cross-component prediction model parameters and filtering identifiers for the current chroma block are determined based on the cross-component prediction information of the encoded image blocks surrounding the current chroma block. Here, the cross-component prediction information includes the cross-component prediction model parameters and filtering identifiers for the encoded image blocks. In Case 1, the cross-component prediction information for the encoded image blocks surrounding the current chroma block includes the cross-component prediction model parameters used by the encoded image block during cross-component prediction, and the filtering identifier of the encoded image block, the filtering identifier of the encoded image block is used to indicate whether or not to filter the predicted values ​​obtained by the cross-component prediction of the encoded image block. In one example, Table 7 shows cross-component prediction information for encoded image blocks surrounding the current chroma block. As can be seen from Table 7 above, the cross-component prediction information for each encoded image block includes the cross-component prediction model parameters used by that encoded image block and the filtering identifier for that encoded image block. In this way, the encoding side can determine the cross-component prediction model parameters and filtering identifier for the current chroma block based on the cross-component prediction information of the encoded image blocks surrounding the current chroma block. For example, the cross-component prediction model parameters of a certain encoded image block among the encoded image blocks surrounding the current chroma block can be determined as the cross-component prediction model parameters for the current chroma block, and the filtering identifier of that encoded image block can be determined as the filtering identifier for the current chroma block. In embodiments of this application, the encoding side includes, but is not limited to, several methods for determining the cross-component prediction model parameters and filtering identifiers of the current chroma block based on cross-component prediction information of encoded image blocks surrounding the current chroma block. In Method 1, the encoding side, by default, determines the cross-component prediction model parameters of an encoded image block surrounding the current chroma block, for example, a first encoded image block, as the cross-component prediction model parameters of the current chroma block, and also determines the filtering identifier of the first encoded image block as the filtering identifier of the current chroma block. The embodiments of this application do not limit the specific type of the first encoded image block. For example, the first encoded image block is an encoded image block adjacent to the left of the current chroma block, an encoded image block adjacent to the upper left corner, or an encoded image block adjacent to the top. In Method 2, the encoding side, by default, determines the cross-component prediction model parameters of an encoded image block surrounding the current chroma block, for example, a first encoded image block, as the cross-component prediction model parameters of the current chroma block. The encoding side then, by default, determines the filtering identifier of another encoded image block surrounding the current chroma block, for example, a second encoded image block, as the filtering identifier of the current chroma block. The embodiments of this application do not limit the specific types of the first encoded image block and the second encoded image block. For example, the first encoded image block and the second encoded image block are encoded image blocks adjacent to the left of the current chroma block, adjacent to the upper left corner, or adjacent to the top of the current chroma block, and are different from the first and second encoded image blocks. For example, the first encoded image block is an encoded image block adjacent to the left of the current chroma block, and the second encoded image block is an encoded image block adjacent to the top of the current chroma block. In Method 3, the encoding side determines the cross-component prediction model parameters and filtering identifiers for the current chroma block through the following steps S201-A1 to S201-A3. In S201-A1, a first candidate list is constructed based on cross-component prediction information of encoded image blocks surrounding the current chroma block. The first candidate list contains multiple groups of candidate cross-component prediction information, and each group of cross-component prediction information contains one group of candidate cross-component prediction model parameters and one candidate filtering identifier.

[0164] In S201-A2, the first cross-component prediction information is selected from the candidate cross-component prediction information of multiple groups included in the first candidate list.

[0165] In S201-A3, the cross-component prediction model parameters and filtering identifiers for the current chroma block are determined based on the first cross-component prediction information.

[0166] In this embodiment, the cross-component prediction information of an encoded image block includes the cross-component prediction model parameters and filtering identifier of the encoded image block. Therefore, the encoding side constructs a first candidate list based on the cross-component prediction information of encoded image blocks surrounding the current chroma block. This first candidate list includes multiple groups of candidate cross-component prediction information, each group containing one group of candidate cross-component prediction model parameters and one candidate filtering identifier. Next, the encoding side selects one group of candidate cross-component prediction information from the multiple groups of candidate cross-component prediction information included in the constructed first candidate list and records it as the first cross-component prediction information. In this way, the encoding side can determine the cross-component prediction model parameters and filtering identifier of the current chroma block based on the selected first cross-component prediction information. Furthermore, since the cross-component prediction model parameters and filtering identifier of the current chroma block are determined simultaneously, the determination speed of the cross-component prediction model parameters and filtering identifier of the current chroma block is improved, thereby improving encoding efficiency without improving prediction effectiveness.

[0167] In some embodiments, to facilitate the management of cross-component prediction information, in embodiments of the present application, the cross-component prediction information of an encoded image block is stored in the same memory space as the encoded image block, for example, in a first memory space curCand, i.e., the cross-component prediction model parameters and filtering identifiers of the same encoded image block are stored in the same memory space as the encoded image block. For example, cross-component prediction information for an encoded image block is stored as shown in Table 8. In some embodiments, the cross-component prediction information for the encoded image block includes, in addition to the cross-component prediction model parameters and filtering identifiers, the cross-component prediction mode information for the encoded image block. Exemplarily, the cross-component prediction mode information for the encoded image block is also stored in the first memory space of the encoded image block. In this case, the cross-component prediction information for the encoded image block is stored as shown in Table 9. In the embodiment of this application, when cross-component prediction information (e.g., cross-component prediction model parameters, filtering identifiers) of an encoded image block is stored in the first memory space curCand of the encoded image block, when the encoding side executes S201-A1, the cross-component prediction information for each encoded image block is obtained from the first memory space of each encoded image block in the current chroma block, enabling rapid acquisition of the cross-component prediction information of the encoded image block. Furthermore, a first candidate list is constructed based on the rapidly acquired cross-component prediction information of the encoded image block, improving the speed of constructing the first candidate list.

[0168] The following describes the process of constructing a first candidate list based on cross-component prediction information of encoded image blocks surrounding the current chroma block.

[0169] The embodiments of this application do not limit the specific type of encoded image block surrounding the current chroma block.

[0170] In some embodiments, the encoded image blocks surrounding the current chroma block include at least one of the encoded images above, to the left, upper left, lower left, and upper right of the current chroma block. For example, the encoded image blocks surrounding the current chroma block include only the encoded image blocks above the current chroma block. As another example, the encoded image blocks surrounding the current chroma block include only the encoded image blocks to the left of the current chroma block. As another example, the encoded image blocks surrounding the current chroma block include only the encoded image blocks to the left and bottom left of the current chroma block. As another example, the encoded image blocks surrounding the current chroma block include only the encoded image blocks to the left and above-left of the current chroma block. As another example, the encoded image blocks surrounding the current chroma block include only the encoded image blocks to the left, bottom left, and top left of the current chroma block. As another example, the encoded image blocks surrounding the current chroma block include only the encoded image blocks above and to the upper left of the current chroma block. As another example, the encoded image blocks surrounding the current chroma block include only the encoded image blocks above and to the upper right of the current chroma block. As another example, the encoded image blocks surrounding the current chroma block include only the encoded image blocks above, to the upper left, and to the upper right of the current chroma block. In this way, the encoding side adds the cross-component prediction information of at least one encoded image block to the first candidate list.

[0171] In some embodiments, S201-A1 above includes the following steps.

[0172] In S201-A11, cross-component prediction information for spatially adjacent blocks of the current chroma block is added to the first candidate list according to the first preset order. In this embodiment, the encoded image blocks surrounding the current chroma block include the spatially adjacent blocks of the current chroma block. Exemplary, the spatially adjacent blocks of the current chroma block include the encoded image blocks at five positions A0, A1, B0, B1, and B2 around the current chroma block, as shown in Figure 7A. In some embodiments, the spatially adjacent blocks of the current chroma block may include more or fewer spatially adjacent blocks than those shown in Figure 7A, or spatially adjacent blocks that are not exactly identical to those shown in Figure 7A. The embodiments of this application are not limited thereto. For ease of explanation, the spatially adjacent blocks shown in Figure 7A are used as an example. In this embodiment, the encoding side adds cross-component prediction information for spatially adjacent blocks of the current chroma block one by one to the first candidate list according to a first preset order until the length of the first candidate list reaches a preset length. Here, the length of the first candidate list may be understood as the number of cross-component prediction information items included in the first candidate list. If the number of cross-component prediction information items included in the first candidate list reaches a preset first number, no further cross-component prediction information is added to the first candidate list. The embodiments of this application do not limit the first preset sequence. For example, if the spatially adjacent blocks of the current chroma block are shown in Figure 7A, the first preset order described above may be B1→A1→B0→A0→B2. In other words, the encoding side sequentially accesses the spatially adjacent blocks at positions B1, A1, B0, A0, and B2. If the spatially adjacent blocks at these positions employ the cross-component intra prediction mode, the cross-component prediction information for the spatially adjacent blocks is sequentially stored in the first candidate list. Exemplarily, the order in which the cross-component prediction information is stored in the first candidate list may coincide with the order in which the above positions are accessed.

[0173] In some embodiments, the encoded image blocks surrounding the current chroma block further include spatially non-adjacent blocks of the current chroma block. Based on the above steps, the encoding side adds cross-component prediction information for spatially adjacent blocks of the current chroma block to a first candidate list. If the number of cross-component predictions in the first candidate list is less than the first preset number, i.e., the length of the first candidate list is shorter than a preset length, the encoding side adds cross-component prediction information for spatially non-adjacent blocks of the current chroma block to the first candidate list according to a second preset order. The spatially non-adjacent blocks of the current chroma block include encoded image blocks located above, to the upper left, upper right, left, and lower left of the current chroma block in several non-adjacent positions. Exemplary, the spatially non-adjacent blocks of the current chroma block include encoded image blocks located at 60 positions around the current chroma block, as shown in Figure 7B. In some embodiments, the spatially non-adjacent blocks of the current chroma block may include more or fewer spatially non-adjacent blocks than those shown in Figure 7B, or spatially non-adjacent blocks that are not exactly identical to those shown in Figure 7B. The embodiments of this application are not limited thereto. For ease of explanation, the spatially non-adjacent blocks shown in Figure 7B will be used as an example. In this embodiment, after the encoding side adds the cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list based on the above steps, if the number of cross-component prediction information entries in the first candidate list is less than the number of first presets, the encoding side adds the cross-component prediction information of spatially non-adjacent blocks of the current chroma block to the first candidate list one by one according to the second preset order until the number of cross-component prediction information entries in the first candidate list is equal to the number of first presets.

[0174] In some embodiments, after the encoding side adds cross-component prediction information for spatially adjacent and spatially non-adjacent blocks of the current chroma block to a first candidate list, if the number of cross-component predictions in the first candidate list is still less than the first preset number, the encoding side adds recently used cross-component predictions to the first candidate list until the number of cross-component predictions in the first candidate list is equal to the first preset number. In the embodiments of this application, the encoding side maintains a table based on historical information, which includes cross-component prediction information recently used by the encoding side. Thus, after the encoding side adds cross-component prediction information for spatially adjacent and spatially non-adjacent blocks of the current chroma block to a first candidate list, if the number of cross-component prediction information entries in the first candidate list is still less than the first preset number, the encoding side selects one or more recently used cross-component prediction information entries from this historical information-based table and adds them to the first candidate list.

[0175] In some embodiments, if the number of cross-component predictions included in the first candidate list is still less than the first preset number after the encoding side has added the cross-component predictions recently used by the encoding side to the first candidate list, the embodiments of this application further include the following steps. In Step 1, the encoding side obtains at least one set of default cross-component predictive model parameters. In step 2, for the i-th group of cross-component prediction model parameters in at least one group of cross-component prediction model parameters, the filtering identifier corresponding to the i-th group of cross-component prediction model parameters is determined, and the i-th group of cross-component prediction model parameters and the filtering identifier corresponding to the i-th group of cross-component prediction model parameters are combined to form the i-th group of cross-component prediction information, where i is a positive integer. The embodiments of this application include several default cross-component predictive model parameters, such as default CCLM cross-component predictive model parameters. The default cross-component predictive model parameters include only the cross-component predictive model parameters themselves, and do not include filtering identifiers. Therefore, the encoding side needs to determine the filtering identifiers that each group of cross-component predictive model parameters in at least one group of cross-component predictive model parameters corresponds to. Here, since the process for determining the filtering identifiers that each group of cross-component predictive model parameters in at least one group of cross-component predictive model parameters corresponds to is consistent, for the sake of explanation, we will use the example of determining the filtering identifiers that the i-th group of cross-component predictive model parameters corresponds to. The embodiments of this application do not limit the specific method by which the encoding side determines the filtering identifier corresponding to the i-th group cross-component prediction model parameter. In one example, the encoding side determines the default value as the value of the filtering identifier corresponding to the i-th group cross-component prediction model parameter. This default value may be a first or second numerical value. For example, the encoding side determines that the value of the filtering identifier corresponding to the i-th group of cross-component prediction model parameters is a first value (e.g., 1) used to instruct the system to filter the predicted values ​​obtained by the cross-component prediction mode. As another example, the encoding side determines that the value of the filtering identifier corresponding to the i-th group of cross-component prediction model parameters is a second value (e.g., 0) used to instruct the system not to filter the predicted values ​​obtained by the cross-component prediction mode. Based on the steps described above, the encoding side can determine the filtering identifiers that correspond to each group of cross-component predictive model parameters in at least one set of cross-component predictive model parameters. Next, the cross-component predictive model parameters in at least one set of cross-component predictive model parameters, along with the filtering identifiers that correspond to those parameters, are determined as a group of cross-component predictive information, and at least one group of cross-component predictive information is obtained. In step 4, at least one group of determined cross-component prediction information is added to the first candidate list.

[0176] Based on the steps above, the encoding side determines a first candidate list and then executes step S201-A2 above to select a first cross-component prediction information from multiple groups of candidate cross-component prediction information included in the first candidate list.

[0177] The embodiments of this application do not limit the specific method by which the encoding side selects the first cross-component prediction information from multiple groups of candidate cross-component prediction information included in the first candidate list.

[0178] In one possible implementation, both the encoding side and the encoding side default to determining a set of candidate cross-component prediction information from among multiple sets of candidate cross-component prediction information included in the first candidate list as the first cross-component prediction information. For example, by default, the first or second set of candidate cross-component prediction information included in the first candidate list is determined as the first cross-component prediction information.

[0179] In one possible implementation, the encoding side determines the initial cost for each of the multiple candidate cross-component prediction information groups included in the first candidate list when performing cross-component prediction on the current chroma block, and based on the initial cost, the encoding side selects the first cross-component prediction information from the multiple candidate cross-component prediction information groups included in the first candidate list.

[0180] Specifically, for each candidate cross-component prediction information of multiple groups included in the first candidate list, a cross-component prediction is performed on the current chroma block using the cross-component prediction model parameters included in the candidate cross-component prediction information, and a predicted value 1 for the current chroma block is obtained. Next, a filtering identifier included in the candidate cross-component prediction information is used to determine whether or not to filter the predicted value 1. If the filtering identifier indicates that filtering is necessary, the predicted value 1 is filtered to obtain a predicted value 2. If the filtering identifier indicates that filtering is not necessary, the predicted value 1 is not filtered and a predicted value 2 is obtained. Based on the predicted value 2 and the true value of the current chroma block, the first cost corresponding to the candidate cross-component prediction information is determined. By referring to this method, the first cost corresponding to each group of candidate cross-component prediction information in multiple groups included in the first candidate list can be determined, and the first cross-component prediction information can be selected from the multiple groups of candidate cross-component prediction information included in the first candidate list based on the first cost corresponding to each group of candidate cross-component prediction information. For example, among the candidate cross-component prediction information of multiple groups included in the first candidate list, the candidate cross-component prediction information with the smallest first cost is determined to be the first cross-component prediction information.

[0181] In some embodiments, the encoding side selects a first cross-component prediction information from a first candidate list and then writes the index of the first cross-component prediction information in the first candidate list to the bitstream. In this way, the decoding side obtains the index of the first cross-component prediction information by decoding the bitstream, and then selects the first cross-component prediction information from the constructed first candidate list based on the index of the first cross-component prediction information.

[0182] Based on the steps described above, the encoding side selects a first cross-component prediction from multiple groups of candidate cross-component prediction information included in the first candidate list, and then performs the steps S201-A3 described above. As can be seen from the above, the first cross-component prediction information in the embodiment of this application includes a group of cross-component prediction model parameters and one filtering identifier. Based on this, S201-A3 above includes at least the following implementations.

[0183] In Method 1, the encoding side directly determines the cross-component prediction model parameters included in the first cross-component prediction information as the cross-component prediction model parameters of the current chroma block, and also determines the filtering identifier included in the first cross-component prediction information as the filtering identifier of the current chroma block.

[0184] In Method 2, the encoding side modifies the cross-component prediction model parameters included in the first cross-component prediction information and determines the modified cross-component prediction model parameters as the cross-component prediction model parameters for the current chroma block. At the same time, the filtering identifier included in the first cross-component prediction information is determined as the filtering identifier for the current chroma block.

[0185] In some embodiments, if the cross-component predictive model parameters and filtering identifiers for the same image block are stored in the first memory space of that image block, the encoding side determines the cross-component predictive model parameters and filtering identifiers for the current chroma block based on the above steps, and then stores the cross-component predictive model parameters and filtering identifiers for the current chroma block in the first memory space of the current chroma block, so that subsequent chroma blocks can use them to determine the cross-component predictive model parameters and filtering identifiers.

[0186] The embodiments of this application do not limit the specific representation of the filtering identifier of the current chromablock. In one example, the field curCand.ccInsideFilter is used to indicate the filtering identifier.

[0187] The above describes the process by which the encoding side synchronously determines the cross-component prediction model parameters and filtering identifiers for the current chroma block in Case 1.

[0188] In Case 2, the encoding side determines the cross-component prediction model parameters and filtering identifiers for the current chroma block, respectively. In this case, S201 above includes the following steps S201-B1 and S201-B2.

[0189] In S201-B1, the cross-component prediction model parameters for the current chromablock are determined.

[0190] In S201-B2, the filtering identifier of the current chroma block is determined based on the filtering identifiers of the encoded image blocks surrounding the current chroma block.

[0191] In this Case 2, the encoding side performs two steps: determining the cross-component prediction model parameters for the current chroma block and determining the filtering identifier for the current chroma block. Here, the encoding side may first determine the cross-component prediction model parameters for the current chroma block and then determine the filtering identifier for the current chroma block. Alternatively, the encoding side may first determine the filtering identifier for the current chroma block and then determine the cross-component prediction model parameters for the current chroma block. Alternatively, the encoding side may determine the cross-component prediction model parameters and the filtering identifier for the current chroma block in parallel, and the embodiments of this application are not limited thereto.

[0192] Here, the methods for determining the current chromablock cross-component predictive model parameters in S201-B1 include, but are not limited to, the following: In Method 1, the encoding side calculates the cross-component prediction model parameters of the current chroma block based on the encoded reference pixels surrounding the current chroma block and their corresponding luminance components. For specific calculation processes, please refer to the description of the relevant embodiments above. In method 2, the encoding side inherits the cross-component prediction model parameters of the encoded image block and uses them as the cross-component prediction model parameters of the current chroma block. Specifically, the encoding side constructs a cross-component prediction model parameter candidate list in the same way as constructing the above first candidate list. For example, until the length of the cross-component prediction model parameter candidate list reaches a preset length, the encoding side adds, in a preset order, the cross-component prediction model parameters of the spatially adjacent blocks of the current chroma block at that time, the cross-component prediction model parameters of the spatially non-adjacent blocks of the current chroma block, the recently used cross-component prediction model parameters, and the default cross-component prediction model parameters to the cross-component prediction model parameter candidate list in sequence. Next, a cross-component prediction model parameter is selected from the cross-component prediction model parameter candidate list and used as the cross-component prediction model parameter of the current chroma block. For example, the cross-component prediction model parameter with the minimum cost in the cross-component prediction model parameter candidate list is determined as the cross-component prediction model parameter of the current chroma block.

[0193] In some embodiments, the encoding side writes the index of the cross-component prediction model parameter of the current chroma block in the cross-component prediction model parameter candidate list into the bit stream.

[0194] Hereinafter, the process by which the encoding side determines the filtering identifier of the current chroma block will be described.

[0195] In the above S201-B2, the method of determining the filtering identifier of the current chroma block based on the filtering identifiers of the encoded image blocks around the current chroma block includes, but is not limited to, the following. In Method 1, the encoding side, by default, determines the filtering identifier of an encoded image block surrounding the current chroma block as the filtering identifier of the current chroma block. For example, the encoding side, by default, determines the filtering identifier of an encoded image block above the current chroma block as the filtering identifier of the current chroma block. As another example, the encoding side, by default, determines the filtering identifier of an encoded image block to the left of the current chroma block as the filtering identifier of the current chroma block. As yet another example, the encoding side, by default, determines the filtering identifier of an encoded image block in the upper left corner of the current chroma block as the filtering identifier of the current chroma block. As yet another example, the encoding side, by default, determines the filtering identifier of an encoded image block in the upper right corner of the current chroma block as the filtering identifier of the current chroma block. In Method 2, the above S201-B2 includes the following steps S201-B21 and S201-B22. S201-B21 constructs a second candidate list based on the filtering identifiers of the encoded image blocks surrounding the current chroma block. The second candidate list contains multiple candidate filtering identifiers. In S201-B22, one candidate filtering identifier is selected from the second candidate list and determined to be the filtering identifier for the current chroma block. In method 2, the encoding side can construct a second candidate list based on the filtering identifiers of the encoded image blocks surrounding the current chroma block. This second candidate list may be understood as a candidate filtering identifier list, and the encoding side selects the filtering identifier for the current chroma block from the candidate filtering identifiers included in this second candidate list.

[0196] The following describes the process by which the encoding side constructs a second candidate list based on the filtering identifiers of the encoded image blocks surrounding the current chroma block. The embodiments of this application do not limit the specific type of encoded image block surrounding the current chroma block.

[0197] In some embodiments, the encoded image blocks surrounding the current chroma block include at least one of the encoded images above, to the left, upper left, lower left, and upper right of the current chroma block. Thus, the encoding side adds the filtering identifier of this at least one encoded image block to the second candidate list.

[0198] In some embodiments, S101-B21 above includes the following steps.

[0199] In S201-B211, the filtering identifiers of the spatially adjacent blocks of the current chroma block are added to the second candidate list according to the third preset order. In this embodiment, the encoded image blocks surrounding the current chroma block include the spatially adjacent blocks of the current chroma block. Exemplary, the spatially adjacent blocks of the current chroma block include the encoded image blocks at five positions A0, A1, B0, B1, and B2 around the current chroma block, as shown in Figure 7A. In some embodiments, the spatially adjacent blocks of the current chroma block may include more or fewer spatially adjacent blocks than those shown in Figure 7A, or spatially adjacent blocks that are not at exactly the same positions as those shown in Figure 7A. The embodiments of this application are not limited thereto. For ease of explanation, the spatially adjacent blocks shown in Figure 7A will be used as an example. In this embodiment, the encoding side adds filtering identifiers of spatially adjacent blocks of the current chroma block one by one to the second candidate list according to the third preset order, until the length of the second candidate list reaches a preset length. In other words, if the number of filtering identifiers in the second candidate list reaches the second preset number, no further filtering identifiers are added to the second candidate list. The embodiments of this application do not limit the second preset order. For example, if the spatially adjacent blocks of the current chroma block are as shown in Figure 7A, the second preset order would be B1→A1→B0→A0→B2. In other words, the encoding side sequentially accesses the spatially adjacent blocks at the positions B1→A1→B0→A0→B2. If the spatially adjacent blocks at these positions employ the cross-component intra prediction mode, the filtering identifiers of the spatially adjacent blocks are sequentially stored in the second candidate list. Exemplarily, the order in which the filtering identifiers are stored in the second candidate list may coincide with the order in which the positions are accessed.

[0200] In some embodiments, the encoded image blocks surrounding the current chroma block further include spatially non-adjacent blocks of the current chroma block. Based on the above steps, the encoding side adds filtering identifiers of spatially adjacent blocks of the current chroma block to a second candidate list. If the number of filtering identifiers in this second candidate list is less than the second preset number, i.e., the length of the second candidate list is shorter than a preset length, the encoding side adds filtering identifiers of spatially non-adjacent blocks of the current chroma block to the second candidate list according to a fourth preset order. Spatially non-adjacent blocks of the current chroma block include encoded image blocks located at several non-adjacent positions above, to the upper left, upper right, left, and lower left of the current chroma block. Exemplary, the spatially non-adjacent blocks of the current chroma block include encoded image blocks at 60 locations around the current chroma block, as shown in Figure 7B. In some embodiments, the spatially non-adjacent blocks of the current chroma block may include more or fewer spatially non-adjacent blocks than those shown in Figure 7B, or spatially non-adjacent blocks that are not at exactly the same locations as those shown in Figure 7B. The embodiments of this application are not limited thereto. For ease of explanation, the spatially non-adjacent blocks shown in Figure 7B are used as an example. In this embodiment, after the encoding side adds the filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list based on the above steps, if the number of filtering identifiers in this second candidate list is less than the second preset number, the encoding side adds the filtering identifiers of spatially non-adjacent blocks of the current chroma block one by one to the second candidate list according to the fourth preset order until the number of filtering identifiers in the second candidate list is equal to the second preset number.

[0201] In some embodiments, after the encoding side adds the filtering identifiers of the spatially adjacent and spatially non-adjacent blocks of the current chroma block to a second candidate list, if the number of filtering identifiers in this second candidate list is still less than the second preset number, the encoding side adds the filtering identifiers recently used by the encoding side to the second candidate list. In other words, in embodiments of the present application, the encoding side can maintain a table for storing the filtering identifiers recently used by the encoding side. Thus, when constructing the second candidate list, the encoding side can retrieve the filtering identifiers recently used by the encoding side from this table and add them to the second candidate list.

[0202] In some embodiments, the encoding side adds the most recently used filtering identifier to a second candidate list. If the number of filtering identifiers in this second candidate list is less than the second preset number, the encoding side adds a default filtering identifier to the second candidate list. The embodiments of this application do not limit the specific value of the default filtering identifier, which is determined on a case-by-case basis.

[0203] Based on the steps above, the encoding side determines a second candidate list, then performs step S201-B22 above to select one candidate filtering identifier from the second candidate list and determines it as the filtering identifier for the current chroma block. The embodiments of this application do not limit the specific method by which the encoding side selects the filtering identifier of the current chroma block from a second candidate list.

[0204] In one possible implementation, both the encoding and encoding sides default to determining one of the candidate filtering identifiers from the group of candidate filtering identifiers included in this second candidate list as the filtering identifier for the current chroma block. For example, by default, they might determine the first or second filtering identifier included in this second candidate list as the filtering identifier for the current chroma block.

[0205] In one possible embodiment, the encoding side determines a second cost when filtering the first predicted value of the current chroma block based on a plurality of candidate filtering identifiers included in a second candidate list, and based on the second cost, selects one candidate filtering identifier from the plurality of candidate filtering identifiers included in the second candidate list and determines it as the filtering identifier for the current chroma block.

[0206] Specifically, first, the predicted value 1 for the current chroma block is determined based on the cross-component prediction model parameters of the current chroma block. Next, for each candidate filtering identifier among the multiple candidate filtering identifiers included in the second candidate list, it is determined whether or not to filter this predicted value 1 using that candidate filtering identifier. If the candidate filtering identifier indicates that filtering is necessary, the predicted value 1 is filtered to obtain predicted value 2. If the candidate filtering identifier indicates that filtering is not necessary, predicted value 1 is not filtered and predicted value 2 is obtained. Based on the predicted value 2 and the true value of the current chroma block, the second cost corresponding to the candidate filtering identifier is determined. By referring to this method, the second cost corresponding to each candidate filtering identifier among the multiple candidate filtering identifiers included in the second candidate list can be determined, and based on the second cost corresponding to each candidate filtering identifier, one candidate filtering identifier can be selected from the multiple candidate filtering identifiers included in the second candidate list and determined as the filtering identifier for the current chroma block. For example, the candidate filtering identifier with the smallest second cost among the multiple candidate filtering identifiers included in the second candidate list is determined as the filtering identifier for the current chroma block.

[0207] In some implementations, the encoding side selects the filtering identifier for the current chroma block from a second candidate list, and then writes the index of this current chroma block's filtering identifier in the second candidate list to the bitstream. In this way, the decoding side obtains the filtering identifier index by encoding the bitstream, and then, based on this filtering identifier index, selects the filtering identifier for the current chroma block from the constructed second candidate list.

[0208] In the above content, in Case 2, the process by which the encoding side determines the cross-component prediction model parameters and filtering identifiers of the current chroma block was described respectively. Based on the methods shown in Case 1 and Case 2 above, after determining the cross-component prediction model parameters and filtering identifiers of the current chroma block, the encoding side executes the following step S202.

[0209] In S202, cross-component prediction is performed on the current chroma block based on the cross-component prediction model parameters, and a first predicted value of the current chroma block is obtained. In the embodiments of the present application, for the sake of convenience of description, the predicted value of the current chroma block obtained based on the cross-component intra prediction mode is recorded as the first predicted value of the current chroma block. In the embodiments of the present application, when the cross-component prediction mode and cross-component prediction model parameters adopted by the current chroma block are different, the specific method for determining the first predicted value of the current chroma block is also different.

[0210] In some embodiments, when the cross-component intra prediction mode adopted by the current chroma block is the CCLM mode, the determined cross-component prediction model parameters are the model parameters corresponding to the CCLM mode. At this time, the encoding side substitutes the determined cross-component prediction model parameters into the above formula (1) for calculation to determine the first preset value of the current chroma block.

[0211] In some embodiments, if the cross-component intra-prediction mode currently employed by the chromablock is CCCM mode, the determined cross-component prediction model parameters are those of a model corresponding to CCCM mode. In this case, the encoding side substitutes the determined cross-component prediction model parameters into equation (3) or equation (4) to determine the first preset value of the current chromablock.

[0212] In some embodiments, the encoding side determines a first predicted value for each of the two chroma components of the current chroma block. That is, for the i-th chroma component of the current chroma block, the encoding side determines the first predicted value of the current chroma block under the i-th chroma component based on the determined cross-component prediction model parameters. For example, the encoding side determines the first predicted value of the current chroma block under the first chroma component (Cb or U component) based on the determined cross-component prediction model parameters, and also determines the first predicted value of the current chroma block under the second chroma component (Cr or V component) based on the determined cross-component prediction model parameters.

[0213] The encoding side determines the first predicted value of the current chroma block based on S202 above, and then executes S203 below.

[0214] In S203, the second predicted value for the current chroma block is determined based on the filtering identifier and the first predicted value for the current chroma block.

[0215] Based on the steps above, the encoding side determines the filtering identifier and first predicted value of the current chroma block, then decides whether or not to filter the first predicted value based on the filtering identifier of the current chroma block, and obtains the second predicted value of the current block.

[0216] For example, if the filtering identifier of the current chroma block determined above instructs the encoding side to filter the first predicted value of the current chroma block, the encoding side uses a filter to filter this first predicted value and obtains the filtered predicted value. For ease of explanation, this filtered predicted value is recorded as the third predicted value of the current block. For example, the filter shown in Figure 7C is used to filter the first predicted value of the current block. For example, if the filtering identifier of the current chroma block indicates that the first predicted value should not be filtered, the first predicted value is determined to be the third predicted value of the current block. Finally, the second predicted value for the current chroma block is obtained based on the third predicted value for the current chroma block. For example, if the current chroma block prediction mode is cross-component prediction merge mode, the third predicted value of the current chroma block is directly determined as the second predicted value of the current chroma block. For example, if the current chroma block prediction mode is chroma fusion derivation mode, the encoding side determines the fourth predicted value of the current chroma block based on the non-cross-component prediction mode, and then obtains the second predicted value of the current chroma block based on the third and fourth predicted values ​​of the current chroma block.

[0217] In the video encoding method provided by the embodiments of this application, the encoding side determines the cross-component prediction model parameters and filtering identifier of the current chroma block when predicting the current chroma block using a cross-component prediction mode. This filtering identifier of the current chroma block is determined based on the filtering identifiers of the encoded image blocks surrounding the current chroma block and is used to indicate whether or not to filter the predicted value obtained based on the cross-component prediction mode. Next, the current chroma block is cross-component predicted based on the cross-component prediction model parameters to obtain a first predicted value for the current chroma block. Furthermore, a second predicted value for the current chroma block is determined based on the filtering identifier of the current chroma block and the first predicted value. In other words, the embodiments of this application improve the prediction effect of cross-component prediction and improve encoding / decoding performance by predicting any first predicted value obtained by any cross-component prediction mode. Furthermore, in the embodiments of this application, the filtering identifier of the current chroma block is obtained by inheriting the filtering identifiers of the encoded and decoded blocks, eliminating the need to introduce additional bit consumption to indicate the filtering identifier, thereby saving codewords and improving encoding efficiency.

[0218] It should be understood that Figures 8 and 9 are merely examples of this application and should not be interpreted as limiting this application. The above describes preferred embodiments of the present application in detail in conjunction with the attached drawings, but the present application is not limited to the specific details of the above embodiments. Within the scope of the technical idea of ​​the present application, various simple modifications can be made to the technical proposal of the present application, and all such simple modifications are included within the scope of protection of the present application. For example, each specific technical feature described in the above specific embodiments can be combined in any suitable manner, as long as they do not contradict each other. To avoid unnecessary redundancy, the present application does not describe any further possible combinations. Also, for example, different embodiments of the present application can be combined in any way, and as long as they do not contradict the spirit of the present application, they should also be considered as being disclosed in the present application. Furthermore, it should be understood that in the various embodiments of the methods of this application, the magnitude of the number of each process does not indicate the order of execution. The execution order of each process should be determined by its function and internal logic and does not imply any limitation on the implementation processes of the embodiments of this application. Also, in the embodiments of this application, the term "and / or" simply describes the relationship between related objects, indicating that there are three possible relationships. Specifically, A and / or B can represent three situations: A existing alone, A and B existing simultaneously, or B existing alone. In addition, the letter " / " in this application usually indicates that the preceding and succeeding related objects are in an "or" relationship.

[0219] The embodiments of the method of this application have been described in detail above with reference to Figures 8 to 9. Below, embodiments of the apparatus of this application will be described in detail with reference to Figures 10 to 13.

[0220] Figure 10 is a schematic block diagram of a video decoding device provided by one embodiment of the present application. The video decoding device 10 is applied to the video decoder described above.

[0221] As shown in Figure 10, the video decoding device 10 is If it is determined that the prediction mode of the current chroma block is the cross-component prediction mode, the parameter determination unit 11 is used to determine the cross-component prediction model parameters of the current chroma block, which are model parameters used when the current chroma block makes predictions using the cross-component prediction mode, and the filtering identifier of the current chroma block, which is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block and is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. A prediction unit 12 is used to perform cross-component prediction on the current chroma block based on the cross-component prediction model parameters and to obtain a first predicted value for the current chroma block. The system includes a filtering unit 13 used to determine a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value.

[0222] In some embodiments, the parameter determination unit 11 is specifically used to determine the cross-component predictive model parameters and filtering identifiers of the current chroma block based on cross-component predictive information, which includes the cross-component predictive model parameters and filtering identifiers of the decoded image blocks surrounding the current chroma block.

[0223] In some embodiments, the parameter determination unit 11 specifically constructs a first candidate list containing multiple groups of candidate cross-component prediction information based on cross-component prediction information of decoded image blocks surrounding the current chroma block, each group of cross-component prediction information containing one group of candidate cross-component prediction model parameters and one candidate filtering identifier, and is used to select a first cross-component prediction information from the multiple groups of candidate cross-component prediction information contained in the first candidate list, and to determine the cross-component prediction model parameters and filtering identifier of the current chroma block based on the first cross-component prediction information.

[0224] In some embodiments, the decoded image block includes spatially adjacent blocks of the current chroma block, and the parameter determination unit 11 is specifically used to add cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list in a first preset order.

[0225] In some embodiments, after adding the cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list, if the number of cross-component prediction information entries in the first candidate list is less than the first preset number, the parameter determination unit 11 is used to add the cross-component prediction information of spatially non-adjacent blocks of the current chroma block to the first candidate list in the order of the second preset.

[0226] In some embodiments, after adding the cross-component prediction information of spatially adjacent and spatially non-adjacent blocks of the current chroma block to the first candidate list, if the number of cross-component prediction information entries in the first candidate list is less than the first preset number, the parameter determination unit 11 is used to add recently used cross-component prediction information to the first candidate list.

[0227] In some embodiments, after adding the recently used cross-component prediction information to the first candidate list, if the number of cross-component prediction information items in the first candidate list is less than the first preset number, the parameter determination unit 11 obtains at least one group of default cross-component prediction model parameters, determines the filtering identifier corresponding to the i-th group of cross-component prediction model parameters in the at least one group of cross-component prediction model parameters, combines the i-th group of cross-component prediction model parameters and the filtering identifier corresponding to the i-th group of cross-component prediction model parameters as the i-th group of cross-component prediction information, where i is a positive integer, and is used to add the determined at least one group of cross-component prediction information to the first candidate list.

[0228] In some embodiments, the parameter determination unit 11 specifically determines a default value, which is either a first or second value, as the value of the filtering identifier corresponding to the i-th group cross-component prediction model parameter, where the first value is used to indicate that filtering is performed on the predicted values ​​obtained by the cross-component prediction mode, and the second value is used to indicate that filtering is not performed on the predicted values ​​obtained by the cross-component prediction mode.

[0229] In some embodiments, the parameter determination unit 11 is specifically used to decode the bitstream to obtain an index of the first cross-component prediction information, and to select the first cross-component prediction information from the first candidate list based on the index of the first cross-component prediction information.

[0230] In some embodiments, the parameter determination unit 11 is specifically used to determine the cross-component prediction model parameters included in the first cross-component prediction information as the cross-component prediction model parameters of the current chroma block, and to determine the filtering identifier included in the first cross-component prediction information as the filtering identifier of the current chroma block.

[0231] In some embodiments, the cross-component prediction information of the decoded image block is stored in a first storage space of the decoded image block, and the parameter determination unit 11 is used specifically to retrieve the cross-component prediction information of the decoded image block from the first storage space of the decoded image block and to construct the first candidate list based on the cross-component prediction information of the decoded image block.

[0232] In some embodiments, the parameter determination unit 11 is used to determine the cross-component predictive model parameters and filtering identifiers of the current chroma block, and then to store the cross-component predictive model parameters and filtering identifiers of the current chroma block in a first memory space of the current chroma block.

[0233] In some embodiments, the parameter determination unit 11 is specifically used to determine the cross-component prediction model parameters of the current chroma block and to determine the filtering identifier of the current chroma block based on the filtering identifiers of the decoded image blocks surrounding the current chroma block.

[0234] In some embodiments, the parameter determination unit 11 is used to construct a second candidate list containing multiple candidate filtering identifiers based on the filtering identifiers of the decoded image blocks surrounding the current chroma block, and to select one candidate filtering identifier from the second candidate list and determine it as the filtering identifier for the current chroma block.

[0235] In some embodiments, the decoded image block includes spatially adjacent blocks of the current chroma block, and the parameter determination unit 11 is specifically used to add filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list according to a third preset order.

[0236] In some embodiments, when adding filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list, if the number of filtering identifiers in the second candidate list is less than the second preset number, the parameter determination unit 11 is used to add filtering identifiers of spatially non-adjacent blocks of the current chroma block to the second candidate list according to the fourth preset order.

[0237] In some embodiments, after adding the filtering identifiers of the spatially adjacent and spatially non-adjacent blocks of the current chroma block to the second candidate list, if the number of filtering identifiers in the second candidate list is less than the second preset number, the parameter determination unit 11 is used to add recently used filtering identifiers to the second candidate list.

[0238] In some embodiments, after adding the recently used filtering identifier to the second candidate list, if the number of filtering identifiers in the second candidate list is less than the second preset number, the parameter determination unit 11 is used to add a default filtering identifier to the second candidate list.

[0239] In some embodiments, the parameter determination unit 11 is used to decode the bitstream to obtain a filtering identifier index and, based on the filtering identifier index, to determine the filtering identifier of the current chroma block from a plurality of candidate filtering identifiers included in the second candidate list.

[0240] In some embodiments, the cross-component prediction mode includes a cross-component prediction merge mode or a chroma fusion derivation mode.

[0241] In some embodiments, the filtering unit 13 is used to obtain a third predicted value for the current block by filtering the first predicted value through a filter when the filtering identifier for the current chroma block instructs it to filter the first predicted value, and to determine the first predicted value as the third predicted value for the current block and obtain a second predicted value for the current block based on the third predicted value for the current block when the filtering identifier for the current chroma block instructs it not to filter the first predicted value.

[0242] In some embodiments, the filtering unit 13 is specifically used to determine the third predicted value as the second predicted value when the prediction mode is a cross-component prediction merge mode.

[0243] In some embodiments, the filtering unit 13 is specifically used to determine a fourth predicted value for the current chroma block based on a non-cross-component prediction mode when the prediction mode is a chroma fusion derivation mode, and to obtain the second predicted value based on the third and fourth predicted values.

[0244] It should be understood that embodiments of the apparatus and embodiments of the method are interchangeable, and similar descriptions can refer to embodiments of the method. To avoid redundancy, the explanation is omitted here. Specifically, the apparatus 10 shown in Figure 10 can perform the decoding-side decoding method of the embodiments of this application, and the aforementioned and other operations and / or functions of each unit within the apparatus 10 are for performing the corresponding flows in each method, such as the decoding-side decoding method described above. For brevity, the explanation is omitted here.

[0245] Figure 11 is a schematic block diagram of a video encoding device provided by an embodiment of this application, and this video encoding device is applied to the encoder described above.

[0246] As shown in Figure 11, this video encoding device 20 is If it is determined that the prediction mode of the current chroma block is the cross-component prediction mode, the parameter determination unit 21 determines the cross-component prediction model parameters of the current chroma block, which are model parameters used when the current chroma block makes predictions using the cross-component prediction mode, and the filtering identifier of the current chroma block, which is determined based on the filtering identifiers of the encoded image blocks surrounding the current chroma block and is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. A prediction unit 22 performs cross-component prediction on the current chroma block based on the cross-component prediction model parameters and obtains a first predicted value for the current chroma block. The system includes a filtering unit 23 that determines a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value.

[0247] In some embodiments, the parameter determination unit 21 is specifically used to determine the cross-component prediction model parameters and filtering identifiers of the current chroma block based on cross-component prediction information, which includes the cross-component prediction model parameters and filtering identifiers of the encoded image blocks surrounding the current chroma block.

[0248] In some embodiments, the parameter determination unit 21 specifically constructs a first candidate list containing multiple groups of candidate cross-component prediction information based on cross-component prediction information of encoded image blocks surrounding the current chroma block, each group of candidate cross-component prediction information containing one candidate cross-component prediction model parameter and one candidate filtering identifier, and is used to select a first cross-component prediction information from the multiple groups of candidate cross-component prediction information contained in the first candidate list, and to determine the cross-component prediction model parameter and filtering identifier of the current chroma block based on the first cross-component prediction information.

[0249] In some embodiments, the encoded image block includes spatially adjacent blocks of the current chroma block, and the parameter determination unit 21 is specifically used to add cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list in a first preset order.

[0250] In some embodiments, after adding the cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list, if the number of cross-component prediction information entries in the first candidate list is less than the first preset number, the parameter determination unit 21 is used to add the cross-component prediction information of spatially non-adjacent blocks of the current chroma block to the first candidate list in the order of the second preset.

[0251] In some embodiments, after adding the cross-component prediction information of spatially adjacent and spatially non-adjacent blocks of the current chroma block to the first candidate list, if the number of cross-component prediction information entries in the first candidate list is less than the first preset number, the parameter determination unit 21 is also used to add recently used cross-component prediction information to the first candidate list.

[0252] In some embodiments, after adding the recently used cross-component prediction information to the first candidate list, if the number of cross-component prediction information items in the first candidate list is less than the first preset number, the parameter determination unit 21 obtains at least one group of default cross-component prediction model parameters, determines the filtering identifier corresponding to the i-th group of cross-component prediction model parameters in the at least one group of cross-component prediction model parameters, combines the i-th group of cross-component prediction model parameters and the filtering identifier corresponding to the i-th group of cross-component prediction model parameters as the i-th group of cross-component prediction information, where i is a positive integer, and is used to add the determined at least one group of cross-component prediction information to the first candidate list.

[0253] In some embodiments, the parameter determination unit 21 specifically determines a default value, which is either a first or second value, as the value of the filtering identifier corresponding to the i-th group of cross-component prediction model parameters, wherein the first value indicates that the i-th filtering identifier instructs to filter the predicted values ​​obtained by the cross-component prediction mode, and the second value indicates that the i-th filtering identifier instructs not to filter the predicted values ​​obtained by the cross-component prediction mode.

[0254] In some embodiments, the parameter determination unit 21 is specifically used to determine a first cost for each of the multiple groups of candidate cross-component prediction information included in the first candidate list when performing cross-component prediction on the current chroma block, and to select a first cross-component prediction information from the multiple groups of candidate cross-component prediction information included in the first candidate list based on the first cost.

[0255] In some embodiments, the parameter determination unit 21 is used to write the index of the first cross-component prediction information to a bitstream.

[0256] In some embodiments, the parameter determination unit 21 is specifically used to determine candidate cross-component prediction model parameters included in the first cross-component prediction information as the cross-component prediction model parameters of the current chroma block, and to determine candidate filtering identifiers included in the first cross-component prediction information as the filtering identifiers of the current chroma block.

[0257] In some embodiments, the cross-component prediction information of the encoded image block is stored in a first storage space of the encoded image block, and the parameter determination unit 21 is used specifically to retrieve the cross-component prediction information of the encoded image block from the first storage space of the encoded image block and to construct the first candidate list based on the cross-component prediction information of the encoded image block.

[0258] In some embodiments, after determining the cross-component predictive model parameters and filtering identifiers of the current chroma block, the parameter determination unit 21 is used to store the cross-component predictive model parameters and filtering identifiers of the current chroma block in the first memory space of the current chroma block.

[0259] In some embodiments, the parameter determination unit 21 is specifically used to determine the cross-component prediction model parameters of the current chroma block and to determine the filtering identifier of the current chroma block based on the filtering identifiers of the encoded image blocks surrounding the current chroma block.

[0260] In some embodiments, the parameter determination unit 21 is used to construct a second candidate list containing multiple candidate filtering identifiers based on the filtering identifiers of encoded image blocks surrounding the current chroma block, and to select one candidate filtering identifier from the second candidate list and determine it as the filtering identifier for the current chroma block.

[0261] In some embodiments, the encoded image block includes spatially adjacent blocks of the current chroma block, and the parameter determination unit 21 is specifically used to add filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list according to a third preset order.

[0262] In some embodiments, when adding filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list, if the number of filtering identifiers in the second candidate list is less than the second preset number, the parameter determination unit 21 is used to add filtering identifiers of spatially non-adjacent blocks of the current chroma block to the second candidate list according to the fourth preset order.

[0263] In some embodiments, after adding the filtering identifiers of the spatially adjacent and spatially non-adjacent blocks of the current chroma block to the second candidate list, if the number of filtering identifiers in the second candidate list is less than the second preset number, the parameter determination unit 21 uses recently used filtering identifiers to add to the second candidate list.

[0264] In some embodiments, after adding the recently used filtering identifier to the second candidate list, if the number of filtering identifiers in the second candidate list is less than the second preset number, the parameter determination unit 21 is used to add a default filtering identifier to the second candidate list.

[0265] In some embodiments, the parameter determination unit 21 is used to determine a second cost for filtering the first predicted value of the current chroma block based on a plurality of candidate filtering identifiers included in the second candidate list, and to select one candidate filtering identifier from the plurality of candidate filtering identifiers included in the second candidate list based on the second cost, and to determine it as the filtering identifier for the current chroma block.

[0266] In some embodiments, the parameter determination unit 21 is used to write the index of the filtering identifier of the current chroma block to the bitstream.

[0267] In some embodiments, the cross-component prediction mode includes a cross-component prediction merge mode or a chroma fusion derivation mode.

[0268] In some embodiments, the filtering unit 23 is used to obtain a third predicted value for the current block by filtering the first predicted value through a filter when the filtering identifier for the current chroma block instructs it to filter the first predicted value, and to determine the first predicted value as the third predicted value for the current block and obtain a second predicted value for the current block based on the third predicted value for the current block when the filtering identifier for the current chroma block instructs it not to filter the first predicted value.

[0269] In some embodiments, the filtering unit 23 is specifically used to determine the third predicted value as the second predicted value when the prediction mode is a cross-component prediction merge mode.

[0270] In some embodiments, the filtering unit 23 is specifically used to determine a fourth predicted value for the current chroma block based on a non-cross-component prediction mode when the prediction mode is a chroma fusion derivation mode, and to obtain the second predicted value based on the third and fourth predicted values.

[0271] It should be understood that embodiments of the apparatus and embodiments of the method are interchangeable, and similar descriptions can refer to embodiments of the method. To avoid redundancy, the explanation is omitted here. Specifically, the apparatus 20 shown in Figure 11 can perform the encoding-side encoding method of the embodiments of this application, and the aforementioned and other operations and / or functions of each unit within the apparatus 20 are for performing the corresponding flows in each method, such as the encoding-side encoding method described above. For brevity, the explanation is omitted here.

[0272] The above description, in conjunction with the attached drawings, describes the apparatus and system of the embodiment of this application from the perspective of functional units. It should be understood that the functional units can be implemented in hardware form, in software form as instructions, or in combination of hardware and software units. Specifically, each step of the embodiment of the method in the embodiment of this application can be performed by hardware-integrated logic circuits and / or software-form instructions within a processor. Each step of the method disclosed in the embodiment of this application is reflected either directly as being performed by a hardware decoding processor or as being performed by a combination of hardware and software units within a decoding processor. Optionally, the software units may be located in storage media common in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, and registers. The storage media is located in memory, and the processor reads the information in memory and, in combination with its hardware, completes the steps of the embodiment of the method described above.

[0273] Figure 12 is a schematic block diagram of an electronic device provided in an embodiment of this application.

[0274] As shown in Figure 12, the electronic device 30 may be a video encoder or video decoder as described in the embodiment of this application. The electronic device 30 is The system comprises a memory 33 and a processor 32, the memory 33 storing a computer program 34 and transmitting the program code 34 to the processor 32. In other words, the processor 32 can call and execute the computer program 34 from the memory 33 and carry out the method in the embodiment of this application.

[0275] For example, the processor 32 is used to execute the steps of the method 200 in accordance with instructions in the computer program 34.

[0276] In some embodiments of this application, the processor 32 includes, but is not limited to, the following: These include general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0277] In some embodiments of this application, the memory 33 includes, but is not limited to, the following: Volatile memory and / or non-volatile memory. Here, non-volatile memory is read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory is random access memory (RAM) that functions as external cache memory. Many types of RAM are available, not as an example but as an example, including static random access memory (Static RAM, SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronously connected dynamic random access memory (Synchlink DRAM, SLDRAM), and direct rambus random access memory (Direct Rambus RAM, DR RAM).

[0278] In some embodiments of this application, the computer program 34 is partitioned into one or more units, which are stored in the memory 33 and executed by the processor 32 to complete the method provided by this application. These one or more units may be a series of computer program instruction segments that can perform a specific function, which are used to describe the execution process of the computer program 34 in the electronic device 30.

[0279] As shown in Figure 12, the electronic device 30 is The system further includes a transceiver 33 that can be connected to the processor 32 or the memory 33.

[0280] Here, the processor 32 can control the transceiver 33 to communicate with other devices. Specifically, it can transmit information or data to other devices or receive information or data transmitted from other devices. The transceiver 33 may include a transmitter and a receiver. The transceiver 33 may also include an antenna, which may be one or multiple.

[0281] It should be understood that each assembly within the electronic device 30 is connected via a bus system, which includes a data bus, as well as a power bus, a control bus, and a status signal bus.

[0282] Figure 13 is a schematic block diagram of a video encoding and decoding system provided in an embodiment of this application.

[0283] As shown in Figure 13, the video encoding / decoding system 40 comprises a video encoder 41 and a video decoder 42, the video encoder 41 is used to perform the video encoding method according to the embodiment of this application, and the video decoder 42 is used to perform the video decoding method according to the embodiment of this application.

[0284] The present application also provides a computer storage medium on which a computer program is stored, and when this computer program is executed by a computer, the computer performs the method of the embodiment of the above method. In other words, embodiments of the present application also provide a computer program product including instructions, and when these instructions are executed by a computer, the computer performs the method of the embodiment of the above method.

[0285] This application also provides a bitstream generated according to the encoding method described above.

[0286] When implemented using software, it may be implemented in whole or in part in the form of a computer program product. This computer program product includes one or more computer instructions. When this computer program instruction is loaded into a computer and executed, a process or function according to the embodiments of this application is generated in whole or in part. This computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. This computer instruction may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, this computer instruction may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired method (such as coaxial cable, fiber optic cable, or digital subscriber line (DSL)) or by a wireless method (such as infrared, radio, or microwave). This computer-readable storage medium may be any available medium accessible by a computer, or a data storage device such as an integrated server or data center with one or more available media. These available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid state disks (SSDs)).

[0287] Those skilled in the art will understand that each example unit and algorithmic step described in the embodiments disclosed in this application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software will depend on the specific application and design constraints of the proposed technology. Those skilled in the art may implement the functions described using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.

[0288] It should be understood that the systems, devices, and methods disclosed in some embodiments provided in this application can be implemented in other ways. For example, the embodiments of the apparatus described above are merely illustrative, and the unit partitioning is merely logical functional partitioning; in actual implementation, other partitioning methods are possible, such as combining multiple units or assemblies, integrating them into another system, or ignoring or not performing some functions. Another point is that the mutual coupling, direct coupling, or communication connection illustrated or described may also be indirect coupling or communication connection via some interface, device, or unit, and may be electrical, mechanical, or otherwise.

[0289] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. In other words, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the objectives of the technical proposal of this embodiment. For example, each functional unit in each embodiment of this application may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0290] The above description is merely a specific embodiment of the present application. The scope of protection of this application is not limited thereto, and any changes or substitutions that a person skilled in the art could easily conceive of within the scope of the technical information disclosed herein should be included within the scope of protection. Therefore, the scope of protection of this application is based on the scope of protection of the claims.

Claims

1. A video decoding method, If it is determined that the prediction mode of the current chroma block is a cross-component prediction mode, the step is to determine the cross-component prediction model parameters and the filtering identifier of the current chroma block, wherein the cross-component prediction model parameters are the model parameters used when the current chroma block makes predictions using the cross-component prediction mode, and the filtering identifier of the current chroma block is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block, and the filtering identifier is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. The steps include performing cross-component prediction on the current chroma block based on the cross-component prediction model parameters and obtaining a first predicted value for the current chroma block, The process includes the step of determining a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value. Video decoding methods.

2. The step of determining the cross-component prediction model parameters of the current chroma block and the filtering identifier of the current chroma block is: The method according to claim 1, comprising the step of determining cross-component prediction model parameters and filtering identifiers for the current chroma block based on cross-component prediction information of decoded image blocks surrounding the current chroma block, wherein the cross-component prediction information includes cross-component prediction model parameters and filtering identifiers for the decoded image blocks.

3. The step of determining the cross-component prediction model parameters and filtering identifiers of the current chroma block based on the cross-component prediction information of the decoded image blocks surrounding the current chroma block is: A step of constructing a first candidate list containing multiple groups of candidate cross-component prediction information based on the cross-component prediction information of decoded image blocks surrounding the current chroma block, wherein each group of cross-component prediction information includes one group of candidate cross-component prediction model parameters and one candidate filtering identifier. The steps include selecting a first cross-component prediction information from multiple groups of candidate cross-component prediction information included in the first candidate list, The method according to claim 2, comprising the step of determining the cross-component prediction model parameters and filtering identifier of the current chroma block based on the first cross-component prediction information.

4. The decoded image block includes spatially adjacent blocks of the current chroma block, and the step of constructing a first candidate list based on cross-component prediction information of the decoded image block is: The method according to claim 3, further comprising the step of adding cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list in accordance with a first preset order.

5. If, after adding the cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list, the number of cross-component prediction information entries in the first candidate list is less than the number of first presets, the method The method according to claim 4, further comprising the step of adding cross-component prediction information of spatially non-adjacent blocks of the current chroma block to the first candidate list in accordance with a second preset order.

6. After adding the cross-component prediction information of spatially adjacent and spatially non-adjacent blocks of the current chroma block to the first candidate list, if the number of cross-component prediction information entries in the first candidate list is less than the number of first presets, the method The method according to claim 5, further comprising the step of adding recently used cross-component prediction information to the first candidate list.

7. If, after adding the recently used cross-component prediction information to the first candidate list, the number of cross-component prediction information entries in the first candidate list is less than the first preset number, the method The steps include obtaining at least one set of default cross-component predictive model parameters, A step of determining a filtering identifier corresponding to the i-th group of cross-component prediction model parameters in the at least one group of cross-component prediction model parameters, and combining the i-th group of cross-component prediction model parameters and the filtering identifier corresponding to the i-th group of cross-component prediction model parameters as cross-component prediction information for the i-th group, wherein i is a positive integer; The method according to claim 6, further comprising the step of adding at least one determined group of cross-component prediction information to the first candidate list.

8. The step of determining the filtering identifier corresponding to the i-th group cross-component prediction model parameters is: The method according to claim 7, further comprising the step of determining a default value which is a first value or a second value as the value of a filtering identifier corresponding to the i-th group cross-component prediction model parameter, wherein the first value indicates that filtering is performed on the predicted values ​​obtained by the cross-component prediction mode, and the second value indicates that filtering is not performed on the predicted values ​​obtained by the cross-component prediction mode.

9. The step of selecting the first cross-component prediction information from the first candidate list is: The steps include: decoding the bitstream to obtain an index of the first cross-component prediction information, The method according to claim 3, further comprising the step of selecting the first cross-component prediction information from the first candidate list based on an index of the first cross-component prediction information.

10. The step of determining the cross-component prediction model parameters and filtering identifier of the current chroma block based on the first cross-component prediction information is: The steps include determining the cross-component prediction model parameters included in the first cross-component prediction information as the cross-component prediction model parameters of the current chroma block, The method according to claim 3, further comprising the step of determining a filtering identifier included in the first cross-component prediction information as the filtering identifier of the current chroma block.

11. The cross-component prediction information of the decoded image block is stored in a first memory space of the decoded image block, and the step of constructing a first candidate list based on the cross-component prediction information of the decoded image blocks surrounding the current chroma block is: The steps include obtaining cross-component prediction information of the decoded image block from the first storage space of the decoded image block, The method according to claim 3, comprising the step of constructing the first candidate list based on cross-component prediction information of the decoded image block.

12. After determining the cross-component prediction model parameters and filtering identifiers of the current chroma block, the method proceeds as follows: The method according to claim 3, further comprising the step of storing the cross-component prediction model parameters and filtering identifiers of the current chroma block in a first storage space of the current chroma block.

13. The step of determining the cross-component prediction model parameters and filtering identifiers of the current chroma block is as follows: The steps include determining the cross-component predictive model parameters of the current chromablock, The method according to claim 1, comprising the step of determining a filtering identifier for the current chroma block based on the filtering identifiers of the decoded image blocks surrounding the current chroma block.

14. The step of determining the filtering identifier of the current chroma block based on the filtering identifiers of the decoded image blocks surrounding the current chroma block is: The steps include constructing a second candidate list containing multiple candidate filtering identifiers based on the filtering identifiers of the decoded image blocks surrounding the current chroma block, The method according to claim 13, comprising the step of selecting one candidate filtering identifier from the second candidate list and determining it as the filtering identifier for the current chroma block.

15. The decoded image block includes spatially adjacent blocks of the current chroma block, and the step of constructing a second candidate list based on the filtering identifiers of the decoded image blocks surrounding the current chroma block is: The method according to claim 14, further comprising the step of adding the filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list in accordance with a third preset order.

16. When adding the filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list, if the number of filtering identifiers included in the second candidate list is less than the second preset number, the method The method according to claim 15, further comprising the step of adding filtering identifiers of spatially non-adjacent blocks of the current chroma block to the second candidate list in accordance with a fourth preset order.

17. After adding the filtering identifiers of the spatially adjacent and spatially non-adjacent blocks of the current chroma block to the second candidate list, if the number of filtering identifiers included in the second candidate list is less than the second preset number, the method The method according to claim 16, further comprising the step of adding recently used filtering identifiers to the second candidate list.

18. After adding the recently used filtering identifier to the second candidate list, if the number of filtering identifiers included in the second candidate list is less than the second preset number, the method The method according to claim 17, further comprising the step of adding a default filtering identifier to the second candidate list.

19. The step of selecting one candidate filtering identifier from the second candidate list and determining it as the filtering identifier for the current chroma block is: The steps include: decoding the bitstream to obtain a filtering identifier index, The method according to claim 14, comprising the step of determining the filtering identifier of the current chroma block from a plurality of candidate filtering identifiers included in the second candidate list based on the filtering identifier index.

20. The method according to claim 1, wherein the cross-component prediction mode includes a cross-component prediction merge mode or a chroma fusion derivation mode.

21. The step of determining a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value is: If the filtering identifier of the current chroma block instructs filtering to be performed on the first predicted value, the step of filtering the first predicted value through the filter to obtain the third predicted value of the current block, If the filtering identifier of the current chroma block instructs that no filtering be performed on the first predicted value, the first predicted value is determined to be the third predicted value of the current block. The method according to claim 20, comprising the step of obtaining a second predicted value for the current block based on a third predicted value for the current block.

22. The step of obtaining the second predicted value of the current block based on the third predicted value of the current block is: The method according to claim 21, further comprising the step of determining the third predicted value as the second predicted value when the prediction mode is a cross-component prediction merge mode.

23. The step of obtaining the second predicted value of the current block based on the third predicted value of the current block is: When the prediction mode is a chroma fusion derivation mode, the steps include determining the fourth predicted value of the current chroma block based on a non-cross-component prediction mode, The method according to claim 21, comprising the step of obtaining the second predicted value based on the third predicted value and the fourth predicted value.

24. A video encoding method, If it is determined that the prediction mode of the current chroma block is a cross-component prediction mode, the step of determining the cross-component prediction model parameters and filtering identifier of the current chroma block, wherein the cross-component prediction model parameters are the model parameters used when the current chroma block makes predictions using the cross-component prediction mode, and the filtering identifier of the current chroma block is determined based on the filtering identifiers of the encoded image blocks surrounding the current chroma block, wherein the filtering identifier is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. The steps include performing cross-component prediction on the current chroma block based on the cross-component prediction model parameters and obtaining a first predicted value for the current chroma block, The process includes the step of determining a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value. Video encoding methods.

25. The step of determining the current chromablock cross-component prediction model parameters and filtering identifiers is: The method according to claim 24, comprising the step of determining cross-component prediction model parameters and filtering identifiers for the current chroma block based on cross-component prediction information of encoded image blocks surrounding the current chroma block, wherein the cross-component prediction information includes cross-component prediction model parameters and filtering identifiers for the encoded image blocks.

26. The step of determining the cross-component prediction model parameters and filtering identifier of the current chroma block based on the cross-component prediction information of the encoded image blocks surrounding the current chroma block is: A step of constructing a first candidate list containing multiple groups of candidate cross-component prediction information based on cross-component prediction information of encoded image blocks surrounding the current chroma block, wherein each group of candidate cross-component prediction information includes one candidate cross-component prediction model parameter and one candidate filtering identifier. The steps include selecting a first cross-component prediction information from multiple groups of candidate cross-component prediction information included in the first candidate list, The method according to claim 25, comprising the step of determining the cross-component prediction model parameters and filtering identifier of the current chroma block based on the first cross-component prediction information.

27. The encoded image block includes spatially adjacent blocks of the current chroma block, and the step of constructing a first candidate list based on cross-component prediction information of the encoded image block is: The method according to claim 26, further comprising the step of adding cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list in accordance with a first preset order.

28. If, after adding the cross-component prediction information of spatially adjacent blocks of the current chroma block to the first candidate list, the number of cross-component prediction information entries in the first candidate list is less than the number of first presets, the method The method according to claim 27, further comprising the step of adding cross-component prediction information of spatially non-adjacent blocks of the current chroma block to the first candidate list in accordance with a second preset order.

29. After adding the cross-component prediction information of spatially adjacent and spatially non-adjacent blocks of the current chroma block to the first candidate list, if the number of cross-component prediction information entries in the first candidate list is less than the number of first presets, the method The method according to claim 28, further comprising the step of adding recently used cross-component prediction information to the first candidate list.

30. If, after adding the recently used cross-component prediction information to the first candidate list, the number of cross-component prediction information entries in the first candidate list is less than the first preset number, the method The steps include obtaining at least one set of default cross-component predictive model parameters, A step of determining a filtering identifier corresponding to the i-th group of cross-component prediction model parameters in the at least one group of cross-component prediction model parameters, and combining the i-th group of cross-component prediction model parameters and the filtering identifier corresponding to the i-th group of cross-component prediction model parameters as cross-component prediction information for the i-th group, wherein i is a positive integer; The method according to claim 29, further comprising the step of adding at least one determined group of cross-component prediction information to the first candidate list.

31. The step of determining the filtering identifier corresponding to the i-th group cross-component prediction model parameters is: The method according to claim 30, comprising the step of determining a default value which is a first or second value as the value of the filtering identifier corresponding to the i-th group of cross-component prediction model parameters, wherein the first value indicates that the i-th filtering identifier instructs to filter the predicted values ​​obtained by the cross-component prediction mode, and the second value indicates that the i-th filtering identifier instructs not to filter the predicted values ​​obtained by the cross-component prediction mode.

32. The step of selecting the first cross-component prediction information from the first candidate list is: The steps include determining a first cost for performing cross-component prediction on the current chroma block for each of the multiple groups of candidate cross-component prediction information included in the first candidate list, The method according to claim 26, comprising the step of selecting a first cross-component prediction information from a plurality of groups of candidate cross-component prediction information included in the first candidate list, based on the first cost.

33. The aforementioned method, The method according to claim 32, further comprising the step of writing the index of the first cross-component prediction information to a bitstream.

34. The step of determining the cross-component prediction model parameters and filtering identifier of the current chroma block based on the first cross-component prediction information is: The steps include determining the candidate cross-component prediction model parameters included in the first cross-component prediction information as the cross-component prediction model parameters of the current chroma block, The method according to claim 26, further comprising the step of determining a candidate filtering identifier included in the first cross-component prediction information as the filtering identifier of the current chroma block.

35. The cross-component prediction information of the encoded image block is stored in the first storage space of the encoded image block, and the step of constructing a first candidate list based on the cross-component prediction information of the encoded image blocks surrounding the current chroma block is: The steps include obtaining cross-component prediction information of the encoded image block from a first storage space of the encoded image block, The method according to claim 26, comprising the step of constructing the first candidate list based on cross-component prediction information of the encoded image blocks.

36. After determining the cross-component prediction model parameters and filtering identifiers of the current chroma block, the method proceeds as follows: The method according to claim 26, further comprising the step of storing the current chromablock's cross-component prediction model parameters and filtering identifier in the first storage space of the current chromablock.

37. The step of determining the current chroma block cross-component prediction model parameters and the filtering identifier of the current chroma block is: The steps include determining the cross-component predictive model parameters of the current chromablock, The method according to claim 24, comprising the step of determining a filtering identifier for the current chroma block based on the filtering identifiers of encoded image blocks surrounding the current chroma block.

38. The step of determining the filtering identifier of the current chroma block based on the filtering identifiers of the encoded image blocks surrounding the current chroma block is: The steps include constructing a second candidate list containing multiple candidate filtering identifiers based on the filtering identifiers of the encoded image blocks surrounding the current chroma block, The method according to claim 37, further comprising the step of selecting one candidate filtering identifier from the second candidate list and determining it as the filtering identifier for the current chroma block.

39. The steps include constructing a second candidate list based on filtering identifiers of encoded image blocks surrounding the current chroma block, wherein the encoded image block includes spatially adjacent blocks of the current chroma block, The method according to claim 38, further comprising the step of adding filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list in accordance with a third preset order.

40. When adding the filtering identifiers of spatially adjacent blocks of the current chroma block to the second candidate list, if the number of filtering identifiers included in the second candidate list is less than the second preset number, the method The method according to claim 39, further comprising the step of adding filtering identifiers of spatially non-adjacent blocks of the current chroma block to the second candidate list in a fourth preset order.

41. After adding the filtering identifiers of the spatially adjacent and spatially non-adjacent blocks of the current chroma block to the second candidate list, if the number of filtering identifiers included in the second candidate list is less than the second preset number, the method The method according to claim 40, further comprising the step of adding recently used filtering identifiers to the second candidate list.

42. After adding the recently used filtering identifier to the second candidate list, if the number of filtering identifiers included in the second candidate list is less than the second preset number, the method The method according to claim 41, further comprising the step of adding a default filtering identifier to the second candidate list.

43. The step of selecting one candidate filtering identifier from the second candidate list and determining it as the filtering identifier for the current chroma block is: The steps include determining a second cost for filtering the first predicted value of the current chroma block based on a plurality of candidate filtering identifiers included in the second candidate list, The method according to claim 38, further comprising the step of selecting one candidate filtering identifier from a plurality of candidate filtering identifiers included in the second candidate list based on the second cost and determining it as the filtering identifier for the current chroma block.

44. The aforementioned method, The method according to claim 43, further comprising the step of writing an index of the filtering identifier of the current chroma block to a bitstream.

45. The method according to claim 24, wherein the cross-component prediction mode includes a cross-component prediction merge mode or a chroma fusion derivation mode.

46. The step of determining a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value is: If the filtering identifier of the current chroma block instructs filtering to be performed on the first predicted value, the step of filtering the first predicted value through the filter to obtain the third predicted value of the current block, If the filtering identifier of the current chroma block instructs that no filtering be performed on the first predicted value, the first predicted value is determined to be the third predicted value of the current block. The method according to claim 45, further comprising the step of obtaining a second predicted value for the current block based on a third predicted value for the current block.

47. The step of obtaining the second predicted value of the current block based on the third predicted value of the current block is: The method according to claim 46, further comprising the step of determining the third predicted value as the second predicted value when the prediction mode is a cross-component prediction merge mode.

48. The step of obtaining the second predicted value of the current block based on the third predicted value of the current block is: When the prediction mode is a chroma fusion derivation mode, the steps include determining the fourth predicted value of the current chroma block based on a non-cross-component prediction mode, The method according to claim 47, further comprising the step of obtaining the second predicted value based on the third predicted value and the fourth predicted value.

49. A video decoding device, A parameter determination unit that determines the cross-component prediction model parameters and the filtering identifier of the current chroma block when it is determined that the prediction mode of the current chroma block is a cross-component prediction mode, wherein the cross-component prediction model parameters are model parameters used when the current chroma block makes predictions using the cross-component prediction mode, and the filtering identifier of the current chroma block is determined based on the filtering identifiers of the decoded image blocks surrounding the current chroma block, wherein the filtering identifier is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. A prediction unit used to perform cross-component prediction on the current chroma block based on the cross-component prediction model parameters and to obtain a first predicted value for the current chroma block, A filtering unit used to determine a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value, comprising: Video decoding device.

50. A video encoding device, A parameter determination unit that determines the cross-component prediction model parameters and the filtering identifier of the current chroma block when it is determined that the prediction mode of the current chroma block is a cross-component prediction mode, wherein the cross-component prediction model parameters are model parameters used when the current chroma block makes predictions using the cross-component prediction mode, and the filtering identifier of the current chroma block is determined based on the filtering identifiers of the encoded image blocks surrounding the current chroma block, and the filtering identifier is used to indicate whether or not to filter the predicted values ​​obtained based on the cross-component prediction mode. A prediction unit used to perform cross-component prediction on the current chroma block based on the cross-component prediction model parameters and to obtain a first predicted value for the current chroma block, A filtering unit used to determine a second predicted value for the current chroma block based on the filtering identifier of the current chroma block and the first predicted value, comprising: Video encoding device.

51. It is an electronic device, The aforementioned electronic device comprises a processor and memory, The aforementioned memory is used to store computer programs. The processor is used to call and execute a computer program stored in the memory in order to implement the method described in any one of claims 1 to 23 or 24 to 48. Electronic devices.

52. A video encoding and decoding system, The aforementioned video encoding / decoding system comprises a video encoder and a video decoder, The video decoder is used to realize the method according to any one of claims 1 to 23. The video encoder is used to implement the method according to any one of claims 24 to 48. Video encoding and decoding system.

53. A computer-readable storage medium, The aforementioned computer-readable storage medium is used to store computer programs. The computer program causes the computer to perform the method described in any one of claims 1 to 23 or 24 to 48. A computer-readable storage medium.