Prediction method, apparatus, and device

CN122994487APending Publication Date: 2026-10-27VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510532908.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]然而,基于固定的下采样滤波器对色度预测块进行下采样无法保证亮度分量的预测块的准确性

Benefits of technology

[0109]在本申请实施例中,所述下采样滤波器的参数根据至少一个第一样本点和至少一个第二样本点确定;所述第一样本点为所述目标图像块相邻的第一已重建区域内第一分量的样本点,或所述第一样本点为基于所述目标图像块相邻的第一已重建区域内第一分量的样本点确定的第二分量的样本点;所述第二样本点为所述第一已重建区域内的第二分量的样本点。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122994487A_ABST
    Figure CN122994487A_ABST
Patent Text Reader

Abstract

The application discloses a prediction method, device and equipment, and belongs to the technical field of coding. The prediction method of the application embodiment comprises the following steps: obtaining a first prediction block of a second component of a target image block based on a reconstructed block of a first component of the target image block; obtaining a second prediction block of the second component of the target image block based on the first prediction block and a down-sampling filter; wherein the parameters of the down-sampling filter are determined according to at least one first sample point and at least one second sample point; the first sample point is a sample point of the first component in a first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample point of the first component in the first reconstructed region adjacent to the target image block; and the second sample point is a sample point of the second component in the first reconstructed region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of encoding and decoding technology, specifically relating to a prediction method, apparatus, and device. Background Technology

[0002] Two-Step Cross-component Prediction Mode (TSCPM) is an inter-component prediction technique that removes redundancy between components by exploring the linear relationships between them. TSCPM consists of two steps: First, based on the linear relationships between components, temporary chroma prediction blocks at the same locations are generated from the luma blocks. Then, the temporary chroma prediction blocks are downsampled using a fixed downsampling filter to obtain the final chroma prediction value.

[0003] However, downsampling the chroma prediction block based on a fixed downsampling filter cannot guarantee the accuracy of the luminance component prediction block. Summary of the Invention

[0004] This application provides a prediction method, apparatus, and device that can improve the prediction accuracy of prediction blocks.

[0005] Firstly, a prediction method is provided, the method being executed by a decoding end or an encoding end, the method comprising:

[0006] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0007] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0008] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0009] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0010] The second sample point is a sample point of the second component within the first reconstructed region.

[0011] Secondly, a method for transmitting a bitstream is provided, including:

[0012] Receive or transmit the bitstream obtained based on the second prediction block, which is obtained according to the following prediction method:

[0013] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0014] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0015] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0016] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0017] The second sample point is a sample point of the second component within the first reconstructed region.

[0018] Optionally, the bitstream includes information for indicating the first reconstructed region.

[0019] Optionally, the bitstream includes information indicating the type of the downsampling filter.

[0020] Optionally, the bitstream includes first indication information; wherein the first indication information is used to indicate that the parameters of the downsampling filter are preset parameters, or the first indication information is used to indicate that the parameters of the downsampling filter are determined based on the at least one first sample point and the at least one second sample point.

[0021] Optionally, the first indication information is associated with at least one of the following: parameter set, stripe, slice group, slice, codec tree unit (CTU) row, CTU, coding unit (CU), prediction unit (PU).

[0022] Thirdly, an encoding method is provided, including:

[0023] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0024] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0025] Generate a bitstream based on the second prediction block;

[0026] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0027] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0028] The second sample point is a sample point of the second component within the first reconstructed region.

[0029] Fourthly, a decoding method is provided, including:

[0030] Obtain the bitstream.

[0031] Based on the reconstructed block of the first component of the target image block determined from the bitstream, a first predicted block of the second component of the target image block is obtained;

[0032] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0033] The reconstructed block of the second component of the target image block is obtained based on the second prediction block;

[0034] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0035] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0036] The second sample point is a sample point of the second component within the first reconstructed region.

[0037] Fifthly, a prediction device is provided, comprising:

[0038] The first processing module is used to obtain a first prediction block of the second component of the target image block based on the reconstruction block of the first component of the target image block;

[0039] The second processing module is used to obtain a second prediction block of the second component of the target image block based on the first prediction block and the downsampling filter;

[0040] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0041] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0042] The second sample point is a sample point of the second component within the first reconstructed region.

[0043] In a sixth aspect, a prediction apparatus is provided, the apparatus being configured to perform the steps of the method described in the first aspect.

[0044] Seventhly, a code stream transmission device is provided, comprising:

[0045] A receiving module or a sending module, wherein the receiving module is configured to receive the bitstream obtained based on the second prediction block, and the sending module is configured to send the bitstream obtained based on the second prediction block, wherein the second prediction block is obtained according to the following prediction method:

[0046] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0047] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0048] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0049] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0050] The second sample point is a sample point of the second component within the first reconstructed region.

[0051] Optionally, the bitstream includes information for indicating the first reconstructed region.

[0052] Optionally, the bitstream includes information indicating the type of the downsampling filter.

[0053] Optionally, the bitstream includes first indication information; wherein the first indication information is used to indicate that the parameters of the downsampling filter are preset parameters, or the first indication information is used to indicate that the parameters of the downsampling filter are determined based on the at least one first sample point and the at least one second sample point.

[0054] Optionally, the first indication information is associated with at least one of the following: parameter set, stripe, slice group, slice, codec tree unit (CTU) row, CTU, coding unit (CU), prediction unit (PU).

[0055] Eighthly, a code stream transmission apparatus is provided, the apparatus being configured to perform the steps of the method described in the second aspect.

[0056] Ninthly, an encoding device is provided, comprising:

[0057] The first processing module is used to obtain a first prediction block of the second component of the target image block based on the reconstruction block of the first component of the target image block;

[0058] The second processing module is used to obtain a second prediction block of the second component of the target image block based on the first prediction block and the downsampling filter;

[0059] The third processing module is used to generate a code stream based on the second prediction block;

[0060] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0061] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0062] The second sample point is a sample point of the second component within the first reconstructed region.

[0063] In a tenth aspect, an encoding apparatus is provided, the apparatus being configured to perform the steps of the method described in the third aspect.

[0064] Eleventhly, a decoding device is provided, comprising:

[0065] The receiving module is used to acquire the bitstream;

[0066] A first processing module is configured to obtain a first prediction block of the second component of the target image block based on a reconstructed block of a first component of the target image block determined from the bitstream.

[0067] The second processing module is used to obtain a second prediction block of the second component of the target image block based on the first prediction block and the downsampling filter;

[0068] The third processing module is used to obtain the reconstruction block of the second component of the target image block based on the second prediction block;

[0069] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0070] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0071] The second sample point is a sample point of the second component within the first reconstructed region.

[0072] In a twelfth aspect, a decoding apparatus is provided, the apparatus being configured to perform the steps of the method described in the fourth aspect.

[0073] In a thirteenth aspect, an electronic device is provided, the terminal including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing steps of the prediction method as described in the first aspect, or steps of the code stream transmission method as described in the second aspect, or steps of the encoding method as described in the third aspect, or steps of the decoding method as described in the fourth aspect.

[0074] In a fourteenth aspect, an electronic device is provided, including a processor and a communication interface, wherein the processor is used for:

[0075] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0076] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0077] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0078] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0079] The second sample point is a sample point of the second component within the first reconstructed region.

[0080] In a fifteenth aspect, an electronic device is provided, including a processor and a communication interface, wherein the processor is used for:

[0081] Receive or transmit the bitstream obtained based on the second prediction block, which is obtained according to the following prediction method:

[0082] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0083] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0084] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0085] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0086] The second sample point is a sample point of the second component within the first reconstructed region.

[0087] In a sixteenth aspect, an electronic device is provided, including a processor and a communication interface, wherein the processor is used for:

[0088] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0089] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0090] Generate a bitstream based on the second prediction block;

[0091] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0092] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0093] The second sample point is a sample point of the second component within the first reconstructed region.

[0094] In a seventeenth aspect, an electronic device is provided, including a processor and a communication interface, wherein the processor is used for:

[0095] Obtain the bitstream;

[0096] Based on the reconstructed block of the first component of the target image block determined from the bitstream, a first predicted block of the second component of the target image block is obtained;

[0097] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0098] The reconstructed block of the second component of the target image block is obtained based on the second prediction block;

[0099] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0100] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0101] The second sample point is a sample point of the second component within the first reconstructed region.

[0102] Eighteenthly, an electronic device is provided, comprising: a memory configured to store video data, and processing circuitry configured to implement the steps of the prediction method as described in the first aspect, or the steps of the bitstream transmission method as described in the second aspect, or the steps of the encoding method as described in the third aspect, or the steps of the decoding method as described in the fourth aspect.

[0103] In the nineteenth aspect, a bitstream is provided, which is obtained by the prediction method as described in the first aspect, or transmitted by the bitstream transmission method as described in the second aspect, or obtained by the steps of the encoding method as described in the third aspect, or decoded by the steps of the decoding method as described in the fourth aspect.

[0104] In a twentieth aspect, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the prediction method as described in the first aspect, or the steps of the code stream transmission method as described in the second aspect, or the steps of the encoding method as described in the third aspect, or the steps of the decoding method as described in the fourth aspect.

[0105] In a twentieth aspect, a readable storage medium is provided on which a bitstream is stored, the bitstream being obtained according to the prediction method described in the first aspect, or the bitstream being transmitted according to the bitstream transmission method described in the second aspect, or the bitstream being obtained according to the steps of the encoding method described in the third aspect, or the bitstream being decoded according to the steps of the decoding method described in the sixth or fifth aspect.

[0106] In a twentieth aspect, a coding / decoding system is provided, comprising: an encoding end device and a decoding end device, wherein the encoding end device can be used to perform the steps of the prediction method as described in the first aspect, or to perform the steps of the code stream transmission method as described in the second aspect, or to perform the steps of the encoding method as described in the third aspect; and the decoding end device can be used to perform the prediction steps of the method as described in the first aspect, or to perform the code stream transmission method as described in the second aspect, or to perform the steps of the decoding method as described in the fourth aspect.

[0107] In a twentieth aspect, a chip is provided, the chip including a processor and a communication interface coupled to the processor, the processor being configured to run a program or instructions to implement the steps of the prediction method as described in the first aspect, or the steps of the code stream transmission method as described in the second aspect, or the steps of the encoding method as described in the third aspect, or the steps of the decoding method as described in the fourth aspect.

[0108] In a twentieth aspect, a computer program / program product is provided, which is stored in a storage medium and is executed by at least one processor to implement the steps of the prediction method as described in the first aspect, or the steps of the code stream transmission method as described in the second aspect, or the steps of the encoding method as described in the third aspect, or the steps of the decoding method as described in the fourth aspect.

[0109] In this embodiment of the application, the parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point; the first sample point is a sample point of a first component in a first reconstructed region adjacent to the target image block, or the first sample point is a sample point of a second component determined based on the sample points of the first component in a first reconstructed region adjacent to the target image block; the second sample point is a sample point of the second component in the first reconstructed region.

[0110] Compared with the scheme of obtaining the second prediction block based on the first prediction block and a fixed downsampling filter, the beneficial effects of this embodiment are analyzed as follows:

[0111] If the first sample point is a sample point of the first component within the first reconstructed region adjacent to the target image block, since the sample points of the first component within the first reconstructed region are easy to obtain, and the relationship between the sample points of the first component within the first reconstructed region and the second sample point can reflect the texture characteristics of the second component of the target image block to a certain extent, it can not only reduce the determination complexity of the parameters of the downsampling filter, thereby reducing the prediction complexity of the second prediction block, but also enable the downsampling filter to adapt to the texture characteristics of the target image block and downsample the first prediction block, thereby improving the downsampling performance of the downsampling filter and the prediction accuracy of the second prediction block.

[0112] If the first sample point is a sample point of the second component determined based on sample points of the first component in the first reconstructed region adjacent to the target image block, since the sample point of the second component determined based on sample points of the first component in the first reconstructed region adjacent to the target image block can reflect the texture characteristics of the second component of the target image block more accurately than the sample points of the first component in the first reconstructed region, the downsampling filter can adapt to the texture characteristics of the second component of the target image block as much as possible, downsample the first prediction block, and thus improve the downsampling performance of the downsampling filter as much as possible and improve the prediction accuracy of the second prediction block as much as possible.

[0113] It should be noted that in related technologies, the encoding or decoding end can directly obtain the predicted block of the second component of the target image block based on the reconstructed block of the first component and the cross-component model. That is, the encoding or decoding end does not need to obtain the first predicted block, but instead downsamples the reconstructed block based on a downsampling filter to obtain the second predicted block. The parameters of the cross-component model can be determined based on the sample points of the first and second components within the adjacent reconstructed regions of the target image block. Compared with this scheme, the beneficial effects of this embodiment are analyzed as follows:

[0114] If the first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, since the first prediction block can reflect the texture characteristics of the second component of the target image block more accurately than the reconstructed block, the prediction accuracy of the second prediction block can be improved by obtaining the second prediction block based on the first prediction block and the downsampling filter.

[0115] If the first sample point is a sample point of the second component determined based on sample points of the first component within a first reconstructed region adjacent to the target image patch, since the first prediction block can reflect the texture characteristics of the second component of the target image patch more accurately than the reconstructed block, obtaining the second prediction block based on the first prediction block and the downsampling filter can improve the prediction accuracy of the second prediction block. Furthermore, since the sample points of the second component determined by sample points of the first component within a first reconstructed region adjacent to the target image patch can reflect the texture characteristics of the second component of the target image patch more accurately than sample points of the first component within the first reconstructed region, the downsampling filter can adapt as much as possible to the texture characteristics of the second component of the target image patch when downsampling the first prediction block, thereby maximizing the downsampling performance of the downsampling filter and maximizing the prediction accuracy of the second prediction block. Attached Figure Description

[0116] Figure 1 This is a schematic diagram of the encoding / decoding system provided in the embodiments of this application.

[0117] Figure 2 This is a schematic diagram of the encoder provided in the embodiments of this application.

[0118] Figure 3 This is a schematic diagram of the decoder provided in the embodiments of this application.

[0119] Figure 4 This is a schematic diagram illustrating the principle of TSCPM provided in the embodiments of this application.

[0120] Figure 5 This is a schematic flowchart of the prediction method provided in the embodiments of this application.

[0121] Figure 6 This is an example of the first reconstructed region provided in the embodiments of this application.

[0122] Figure 7 This is an example of multiple sample points in the first prediction block provided in the embodiments of this application.

[0123] Figure 8 This is a schematic block diagram of a prediction device provided in an embodiment of this application.

[0124] Figure 9 This is a schematic block diagram of an electronic device provided in an embodiment of this application.

[0125] Figure 10 This is a schematic diagram of the hardware structure of a terminal provided in an embodiment of this application. Detailed Implementation

[0126] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0127] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, the first object can be one or more. Furthermore, "or" in this application indicates at least one of the connected objects. For example, the scope of protection for "A or B" covers at least three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. In addition, the terms "A and / or B," "at least one of A and B," and "at least one of A or B" also cover at least the above three scenarios. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0128] Figure 1 This is a schematic diagram of the encoding / decoding system 10 provided in an embodiment of this application. The technical solution of this application embodiment relates to encoding and decoding (CODEC) video data (including encoding or decoding). The video data includes original unencoded video, encoded video, decoded (e.g., reconstructed) video, or syntax elements, etc.

[0129] like Figure 1 As shown, the encoding / decoding system 10 includes a source device 100, which provides encoded video data to be decoded and displayed by the destination device 110. Specifically, the source device 100 provides video data to the destination device 110 via a communication medium 120. The source device 100 and the destination device 110 may include any one or more of the following: desktop computer, laptop computer, tablet computer, set-top box, mobile phone, wearable device (e.g., smartwatch or wearable camera), television, camera, display device, in-vehicle device, virtual reality (VR) device, augmented reality (AR) device, mixed reality (MR) device, digital media player, video game console, video conferencing equipment, video streaming equipment, broadcast receiver equipment, broadcast transmitter equipment, spacecraft, aircraft, robot, satellite, etc.

[0130] exist Figure 1In this example, source device 100 includes a data source 101, a memory 102, an encoder 200, and an output interface 104. Destination device 110 includes an input interface 111, a decoder 300, a memory 113, and a display device 114. Source device 100 represents an example of a video encoding device, while destination device 110 represents an example of a video decoding device. In other examples, source device 100 and destination device 110 may not include... Figure 1 Some components, or may include Figure 1 Other components besides the source device 100. For example, the source device 100 can receive video data from an external data source (such as an external camera). Similarly, the destination device 110 can interface with an external display device, without including an integrated display device. Furthermore, the memory 102 and memory 113 can be external memories.

[0131] Although Figure 1 Source device 100 and destination device 110 are illustrated as separate devices, but in some examples, they may also be integrated into a single device. In such embodiments, the same hardware or software, or separate hardware or software, or any combination thereof, may be used to implement the functionality corresponding to source device 100 and destination device 110.

[0132] In some examples, source device 100 and destination device 110 can perform unidirectional or bidirectional video transmission. If it is bidirectional video transmission, source device 100 and destination device 110 can operate in a substantially symmetrical manner, that is, each of source device 100 and destination device 110 includes an encoder and a decoder.

[0133] Data source 101 represents the source of video data (i.e., raw, unencoded video data) and provides encoder 200 with a series of images containing video data, which encoder 200 encodes. Data source 101 of source device 100 may include a video acquisition device (such as a video camera), a video archive containing previously acquired raw video, or a video feed interface for receiving video from a video content provider. Alternatively, data source 101 may generate computer graphics-based data as source video, or combine live video, archived video, and computer-generated video. In these cases, encoder 200 encodes the acquired, pre-acquired, or computer-generated video data. Encoder 200 may rearrange the images from the received order (sometimes referred to as the "display order") according to the encoded order. Encoder 200 may generate a bitstream including the encoded video data. Source device 100 may then output the encoded video data to communication medium 120 via output interface 104 for reception or retrieval, for example, by input interface 111 of destination device 110.

[0134] The memory 102 of the source device 100 and the memory 113 of the destination device 110 represent general-purpose memory. In some examples, memory 102 may store raw video data from data source 101, and memory 113 may store decoded video data from decoder 300. Additionally or alternatively, memories 102 and 113 may respectively store software instructions executable by, for example, encoder 200 and decoder 300. Although memories 102 and 113 are shown separately from encoder 200 and decoder 300 in this example, it should be understood that encoder 200 and decoder 300 may also include internal memory for functionally similar or equivalent purposes. If encoder 200 and decoder 300 are deployed on the same hardware device, memories 102 and 113 may be the same memory. Furthermore, memories 102 and 113 may store, for example, encoded video data output from encoder 200 and input to decoder 300. In some examples, portions of memories 102 and 113 may be allocated as one or more video buffers, for example, to store raw, decoded, or encoded video data.

[0135] In some examples, source device 100 can output encoded data from output interface 104 to memory 113. Similarly, destination device 110 can access encoded data from memory 113 via input interface 111. Memory 113 or memory 102 can include any of a variety of distributed or locally accessed data storage media, such as hard drives, Blu-ray discs, digital versatile discs (DVDs), compact disc read-only memory (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0136] Output interface 104 may include any type of medium or device capable of transmitting encoded video data from source device 100 to destination device 110. For example, output interface 104 may include a transmitter or transceiver, such as an antenna, configured to transmit encoded video data directly from source device 100 to destination device 110 in real time. The encoded video data may be modulated according to the communication standards of a wireless communication protocol and transmitted to destination device 110.

[0137] Communication medium 120 may include transient media, such as wireless broadcasting or wired network transmission. For example, communication medium 120 may include radio frequency (RF) spectrum or one or more physical transmission lines (e.g., cables). Communication medium 120 may form part of a packet-based network (such as a local area network, a wide area network, or a global network such as the Internet). Communication medium 120 may also take the form of a storage medium (e.g., a non-transitory storage medium), such as a hard disk, flash drive, compact disc, digital video disc, Blu-ray disc, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0138] In some implementations, the communication medium 120 may include a router, switch, base station, or any other device that can be used to facilitate communication from source device 100 to destination device 110. For example, a server (not shown) may receive encoded video from source device 100 and provide the encoded video data to destination device 110, for example, via network transmission. The server may include (e.g., a web server for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or File Delivery Over Unidirectional Transport (FLUTE) protocol), a Content Delivery Network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Services (MBMS) or Evolved Multimedia Broadcast Multicast Service (eMBMS) server, or a Network-attached Storage (NAS) device, etc. The server can implement one or more HTTP streaming protocols, such as MPEG Media Transport (MMT), Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), or Real Time Streaming Protocol (RTSP).

[0139] Destination device 110 can access encoded video data from a server, for example via a wireless channel (e.g., Wireless Fidelity (WIFI) connection) or a wired connection (e.g., Digital Subscriber Line (DSL), Cable Modem, etc.) for accessing encoded video data stored on the server.

[0140] Output interface 104 and input interface 111 can represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to the Institute of Electrical and Electronics Engineers (IEEE) 802.11 or IEEE 802.15 standard (e.g., ZigBee™ transmission mode), Bluetooth standard, or other physical components. In the example where output interface 104 and input interface 111 include wireless components, output interface 104 and input interface 111 can be configured to operate according to WIFI, Ethernet, cellular networks (such as 4G (4... th Generation 4G mobile communication networks, Long Term Evolution (LTE), Advanced LTE, and 5G (5G) mobile communication networks. th Generation 5G mobile communication network, sixth generation (6G) th Generation 6G mobile communication networks, etc., are used to transmit data, such as encoded video data.

[0141] The technology provided in this application can be applied to support video encoding and decoding in one or more multimedia applications such as video conferencing, over-the-air television broadcasting, cable television transmission, satellite television transmission, internet streaming video transmission, digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0142] Destination device 110 receives an encoded video bitstream from communication medium 120 via its input interface 111. The encoded video bitstream may include syntax elements and encoded data units (e.g., sequences, image groups, images, slices, blocks, etc.), where the syntax elements are used to decode the encoded data units to obtain decoded video data. Display device 114 displays the decoded video data to the user. Display device 114 may include a cathode ray tube (CRT), liquid crystal display (LCD), plasma display, organic light-emitting diode (OLED) display, or other types of display devices.

[0143] The encoder 200 and decoder 300 can be implemented as one or more of various processing circuits, which may include microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. When the technology is implemented wholly or partially in software, the device may store instructions for the software in a suitable non-transitory computer-readable storage medium and use one or more processors to execute the instructions in hardware to perform the technology provided in the embodiments of this application.

[0144] The encoder 200 and decoder 300 can process based on the following video codec standards: H.263, H.264, H.265 (also known as High Efficiency Video Coding, HEVC), H.266 (also known as Versatile Video Coding, VVC), Moving Picture Experts Group 2 (MPEG-2), MPEG-4, VP8, VP9, ​​Alliance for Open Media Video 1 (AV1), Audio Video Coding Standard 1 (AVS1), AVS2, AVS3, or next-generation video standard protocols. This application does not specifically limit the implementation of these protocols.

[0145] Typically, encoder 200 and decoder 300 can perform block-based encoding and decoding of images. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used during encoding or decoding). For example, a block can include a two-dimensional matrix of samples of luminance or chrominance data. For example, encoder 200 and decoder 300 can encode and decode video data represented in YUV format, where "Y" represents luminance (or Luma), and "U" and "V" are the two components of chrominance (or Chroma), with "U" representing the blue chrominance component (Cb) and "V" representing the red chrominance component (Cr).

[0146] See Figure 2 The figure is a schematic diagram of the structure of the encoder 200 provided in an embodiment of this application. The encoder 200 can be... Figure 1 Encoder 200 in. In Figure 2 In the example, encoder 200 includes memory 201, encoding parameter determination unit 210, residual generation unit 202, transform processing unit 203, quantization unit 204, inverse quantization unit 205, inverse transform processing unit 206, reconstruction unit 207, filter unit 208, decoded picture buffer (DPB) 209, and entropy encoding unit 220.

[0147] Memory 201 can store video data to be encoded; for example, encoder 200 can retrieve the data from the encoder. Figure 1 The data source 104 shown receives and stores video data. In some examples, the memory 201 may be on the same chip as other components of the encoder 200 (e.g., ...). Figure 2 (As shown), they can also be independent of the chip in which these components are located.

[0148] The coding parameter determination unit 210 includes a mode selection unit 211, an inter-frame prediction unit 212, and an intra-frame prediction unit 213. The inter-frame prediction unit 212 is used to obtain a first prediction block for the current block using an inter-frame prediction mode. The intra-frame prediction unit 213 is used to obtain a second prediction block for the current block using an intra-frame prediction mode. The mode selection unit 211 is used to obtain a target prediction block based on the first and second prediction blocks and determine the final prediction mode. Furthermore, the coding parameter determination unit 210 may also include other functional units, such as functional units for determining the partitioning method of coding units (CUs), functional units for determining the transformation type of the residual data of the CUs, or functional units for determining the quantization parameters of the residual data of the CUs.

[0149] For ease of description and understanding, in the embodiments of this application, the CU to be processed in the current image is referred to as the current CU, and the image block to be processed in the current CU is referred to as the current block or the image block to be processed. For example, in encoding, it refers to the block currently being encoded; in decoding, it refers to the block currently being decoded.

[0150] Inter-frame prediction unit 212 may include a motion estimation unit and a motion compensation unit. For inter-frame prediction of the current block, the motion estimation unit may perform a motion search to identify one or more matching reference blocks in one or more reference pictures (e.g., one or more previously encoded / decoded pictures stored in DPB 209).

[0151] The motion estimation unit can generate one or more motion vectors (MVs) representing the position of a reference block in a reference image relative to the position of the current block in the current image. The motion compensation unit can then use interpolation to obtain a predicted value with the precision indicated by the motion vectors.

[0152] The encoding parameter determination unit 210 can provide the target prediction block to the residual generation unit 202. The residual generation unit 202 receives the raw uncoded video data of the current block from the memory 201 and calculates the residual between the current block and the target prediction block to obtain the residual block. In some examples, the function of the residual generation unit 202 can be implemented using one or more subtractor circuits that perform binary subtraction.

[0153] As an example, the encoding parameter determination unit 210 can provide the entropy encoding unit 220 with syntax elements representing encoding parameters for encoding. The encoding parameters include one or more of the following: the partitioning method of the CU, the final prediction mode, the transformation type of the residual data of the CU, or the quantization parameters of the residual data of the CU.

[0154] The transformation processing unit 203 transforms the residual block output by the residual generation unit 202 to obtain a transform coefficient block. This transformation may include Discrete Cosine Transform (DCT), integer transformation, direction transformation, or Karhunen-Loeve Transform (KL Transform). In some examples, the encoder 200 may not include the transformation processing unit 203.

[0155] Quantization unit 204 can quantize the transform coefficients in the transform coefficient block according to the quantization parameter (QP) value associated with the current block to generate a quantized transform coefficient block.

[0156] The inverse quantization unit 205 and the inverse transform processing unit 206 can perform inverse quantization and inverse transform on the transform coefficient block, respectively, to obtain the reconstructed residual block. The reconstruction unit 207 can generate a reconstructed block corresponding to the current block based on the reconstructed residual block and the target prediction block generated by the coding parameter determination unit 210.

[0157] Filter unit 208 can perform one or more filter operations on the reconstructed block. For example, filter unit 208 can be a deblocking filter (DBF), an adaptive loop filter (ALF), a sample adaptive offset (SAO) filter, etc. In some examples, encoder 200 may not include filter unit 208.

[0158] Encoder 200 stores the reconstructed image obtained from the reconstructed blocks in DPB 209. For example, in an example where the operation of filter unit 208 is not required, reconstruction unit 207 can store the reconstructed blocks in DPB 209. In an example where the operation of filter unit 208 is required, filter unit 208 can store the filtered reconstructed blocks in DPB 209. Inter-frame prediction unit 212 retrieves the reconstructed image from DPB 209 to perform inter-frame prediction on blocks of subsequent images to be encoded. In some examples, DPB 209 can be replaced with other types of memory.

[0159] Entropy coding unit 220 can entropy code the syntax elements of other components in encoder 200 to output encoded video data. For example, entropy coding unit 220 can entropy code the quantized transform coefficient block from quantization unit 204. As another example, entropy coding unit 220 can entropy code the syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from coding parameter determination unit 210.

[0160] Understandable Figure 2 The composition of the encoder 200 described is merely illustrative and does not constitute a limitation on the embodiments of this application.

[0161] Figure 3 This is a schematic diagram of the structure of the decoder 300 provided in the embodiments of this application. The decoder 300 can be... Figure 1 The decoder 300 is described. Figure 3In the example, the decoder 300 includes a Coded Picture Buffer (CPB) 301, an entropy decoding unit 302, a prediction processing unit 310, an inverse quantization unit 303, an inverse transform processing unit 304, a reconstruction unit 305, a filter unit 306, and a DPB 307.

[0162] The entropy decoding unit 302 can receive encoded video data from the CPB 301 and perform entropy decoding on the video data to obtain syntax elements. The syntax elements indicate encoding parameters, including one or more of the following: CU partitioning method, final prediction mode, transformation type of CU residual data, or quantization parameters of CU residual data.

[0163] When the syntax element includes the final prediction mode, the prediction processing unit 310 obtains the final prediction mode. If the final prediction mode is an inter-frame prediction mode, the prediction block of the current CU can be obtained through the inter-frame prediction unit 311 of the prediction processing unit 310; if the final prediction mode is an intra-frame prediction mode, the prediction block of the current CU can be obtained through the intra-frame prediction unit 312 of the prediction processing unit 310. In some examples, the prediction processing unit 310 may also include a unit for performing prediction functions according to other prediction modes.

[0164] CPB 301 can be obtained from, for example Figure 1 The communication medium 120 shown acquires and stores encoded video data. DPB 307 is used to store decoded images. Optionally, CPB 301 and DPB 307 can be replaced with other types of memory; this application does not impose specific limitations. In some examples, CPB 301 can be on the same chip as other components of the decoder 300 (as shown), or it can be on a separate chip from those components.

[0165] Decoder 300 can perform reconstruction operations on each block individually. Entropy decoding unit 302 can entropy decode the syntax elements and transform information (e.g., QP or transform mode indication) of the quantized transform coefficients to obtain the quantized transform coefficients. Dequantization unit 303 dequantizes the quantized transform coefficients to obtain a transform coefficient block including the transform coefficients. Inverse transform processing unit 304 performs an inverse transform on the transform coefficient block to generate a residual block corresponding to the current block; this inverse transform is the reverse operation of the above transform.

[0166] Reconstruction unit 305 can reconstruct the current block based on the prediction block and the residual block. For example, reconstruction unit 305 can add samples from the residual block to the corresponding samples from the prediction block to reconstruct the current block.

[0167] Filter unit 306 can perform one or more filter operations on the reconstructed block. For example, the type of filter unit 306 can be referenced to the type of filter unit 208, and will not be described again here. In some examples, the operations of filter unit 306 can be skipped.

[0168] Decoder 300 can store the reconstructed image obtained from the reconstructed blocks in DPB 307. For example, in an example where filter unit 306 is not operated, reconstruction unit 305 can store the reconstructed blocks in DPB 307. In an example where filter unit 306 is operated, filter unit 306 can store the filtered reconstructed blocks in DPB 307. Decoder 300 can output the decoded image (e.g., decoded video) from DPB 307 for use with a display device (such as...). Figure 1 The subsequent presentation of the display device 114).

[0169] To facilitate understanding of the solution proposed in this application, the relevant content involved in this application will be explained below.

[0170] (1) TSCPM.

[0171] TSCPM is an inter-component prediction technique that removes redundancy between components by exploring the linear relationships between them. TSCPM is performed in two steps, as follows: Figure 4 As shown. First, a reconstruction block of the luminance component at the same location (such as...) is used. Figure 4 As shown in (a) in the figure, temporary chromaticity prediction blocks of the same size are generated using parameters α and β (e.g., ...). Figure 4 As shown in (b) in the figure), the second step is to downsample to obtain the prediction block of the chromaticity component (as shown in the figure). Figure 4 (as shown in (c)).

[0172] Specifically, based on the availability of adjacent sample points, three cases were divided to obtain four available sample point pairs. α and β were calculated using the four available sample point pairs. After obtaining α and β, a temporary chromaticity prediction block was obtained through the reconstruction block of the luminance component based on the linear relationship between luminance and chromaticity.

[0173] Assume the size of the luminance prediction block is M×N and the size of the chrominance prediction block is K×L, for example, M=2K, N=2L. Figure 4 The process shown can be implemented using the following syntax:

[0174]

[0175] Where I represents the luminance value matrix of the compensated sample points in the image where the current CU is located, i.e., the reconstructed block of the luminance component, and I[x][y] represents the luminance value of the sample point located at (x, y) in the reconstructed block of the luminance component. predChroma[x][y] represents the temporary chromaticity value of the sample point located at (x, y) in the temporary chromaticity block. predMatrix[x][y] represents the chromaticity value of the sample point located at (x, y) in the prediction block of the chromaticity component.

[0176] When selecting 4 pairs of available sample points, the availability of the upper and left sample points needs to be considered, which can be divided into the following 3 cases:

[0177] 1. If both the top and left sample points of the current CU are available, then two sample point pairs are selected from the top and two sample point pairs are selected from the left.

[0178] 2. If only the top side of the current CU is available, then all 4 sample point pairs are selected from the top side, and the selected position widths are: 0 / 4, 1 / 4, 2 / 4, 3 / 4.

[0179] 3. If only the left sample point is available in the current CU, then all 4 sample point pairs are selected from the left, and the selected positions are: 0 / 4, 1 / 4, 2 / 4, 3 / 4 of the height.

[0180] For scenario 1 above, two enhancement modes are proposed: TwoStep Cross-component Prediction Mode Top (TSCPM_T) and TwoStep Cross-component Prediction Mode Left (TSCPM_L).

[0181] For TSCPM_T, the four sample point pairs only come from the top side.

[0182] For TSCPM_L, the four sample point pairs only come from the left side.

[0183] For example, the corresponding TSCPM mode can be determined based on the intra-frame chroma prediction mode (5-8), and then sample points can be selected. There are 4 TSCPM modes in the AVS3 standard, and the correspondence between the intra-frame chroma prediction mode (5-8) and the TSCPM mode is shown in Table 1.

[0184] Table 1

[0185] 5 Intra_Chroma_TSCPM 6 Intra_Chroma_TSCPM_LT 7 Intra_Chroma_TSCPM_L 8 Intra_Chroma_TSCPM_T

[0186] For example, in intra-frame chroma prediction mode 5, the i-th sample point pair in the four sample point pairs includes the luminance component value x[i] and the chroma component value y[i], i = 0 to 3. The luminance component value x[i] is the result obtained after weighted averaging of the luminance component sample points.

[0187] For example, r[i] (i = 0 ~ M) is the top row of luminance component sample points of the current CU, c[j] (j = 0 ~ N) is the left column of luminance component sample points of the current CU, row[i] (i = 1 ~ K) represents the top row of chrominance component sample points of the current CU, and col[j] (j = 1 ~ L) represents the left column of chrominance component sample points of the current CU. If both row[i] (i = 1 ~ K) and col[j] (j = 1 ~ L) are available, the luminance component value x[i] and the chrominance component value y[i] can be determined using the following syntax:

[0188]

[0189] Where posA0 represents the position index of the first sample point in the row of luminance component sample points above the current CU, posL0 represents the position index of the first sample point in the column of luminance component sample points to the left of the current CU, posA1 represents the position index of the second sample point in the row of luminance component sample points above the current CU, and posL1 represents the position index of the second sample point in the column of luminance component sample points to the left of the current CU.

[0190] After obtaining the luminance component values ​​x[i] (i = 0~3) and chrominance component values ​​y[i] (i = 0~3), the linear model coefficients α and β can be determined based on these values. Specifically, the two pairs of sample points with larger luminance component values ​​x[i] (i = 0~3) are grouped into one group, and the two pairs of sample points with smaller luminance component values ​​x[i] (i = 0~3) are grouped into another group. The average of the two luminance component values ​​and the chrominance component values ​​for each group of sample points is calculated, yielding two pairs of luminance component mean values ​​and chrominance component mean values. A straight line is then determined using these two pairs of mean values ​​to obtain α and β. For example, α and β can be obtained using the following syntax:

[0191] minIndex[2] = {0, 2}

[0192] maxIndex[2] = {1, 3}

[0193] if(x[minIndex[0]]>x[minIndex[1]]){

[0194] Exchange(minIndex[0],minIndex[1])

[0195] }

[0196] if(x[maxIndex[0]]>x[maxIndex[1]]){

[0197] Exchange(maxIndex[0],maxIndex[1])

[0198] }

[0199] if(x[minIndex[0]]>x[maxIndex[1]]){

[0200] Exchange(minIndex[0],maxIndex[0])

[0201] Exchange(minIndex[1],maxIndex[1])

[0202] }

[0203] if(x[minIndex[1]]>x[maxIndex[0]]){

[0204] Exchange(minIndex[1],maxIndex[0])

[0205] }

[0206] xMin=(x[minIndex[0]]+x[minIndex[1]]+1)>>1

[0207] yMin=(y[minIndex[0]]+y[minIndex[1]]+1)>>1

[0208] xMax=(x[maxIndex[0]]+x[maxIndex[1]]+1)>>1

[0209] yMax=(y[maxIndex[0]]+y[maxIndex[1]]+1)>>1

[0210] diffX=xMax–xMin

[0211] diffY=yMax–yMin

[0212] if(diffX>64){

[0213] shift=(BitDepth>8)?BitDepth–6:2

[0214] add=1<<(shift–1)

[0215] α=(diffY*TscpmTable[((diffX+add)>>shift)-1]+add)>>shift

[0216] β=yMin–((α*xMin)>>iShiftX)

[0217] }

[0218]

[0219] For details on TscpmTable, please refer to Table 2.

[0220] Table 2

[0221] index TscpmTable index TscpmTable index TscpmTable index TscpmTable 0 65536 16 3855 32 1985 48 1337 1 32768 17 3640 33 1927 49 1310 2 21845 18 3449 34 1872 50 1285 3 16384 19 3276 35 1820 51 1260 4 13107 20 3120 36 1771 52 1236 5 10922 21 2978 37 1724 53 1213 6 9362 22 2849 38 1680 54 1191 7 8192 23 2730 39 1638 55 1170 8 7281 24 2621 40 1598 56 1149 9 6553 25 2520 41 1560 57 1129 10 5957 26 2427 42 1524 58 1110 11 5461 27 2340 43 1489 59 1092 12 5041 28 2259 44 1456 60 1074 13 4681 29 2184 45 1424 61 1057 14 4369 30 2114 46 1394 62 1040 15 4096 31 2048 47 1365 63 1024

[0222] I represents the value matrix of the luminance sample points of the compensated sample points in the image where the current UC is located. r[i] and c[j] (i = 0 to 2M, j = 0 to 2N) are luminance reference sample points, and row[i] and col[i] (i = 0 to 2K, j = 0 to 2L) are chrominance reference sample points.

[0223] The video encoding and video decoding methods provided in this application are described below with reference to the accompanying drawings. The video encoding method provided in this application can be executed by an encoding end, for example... Figure 1 or Figure 2 The encoder 200 shown. Alternatively, the video decoding method provided in this embodiment can be executed by the decoding end, for example... Figure 1 or Figure 3 The decoder 300 is described above. The encoding and decoding ends can be implemented by software, hardware, or a combination thereof. When implemented by hardware, the encoding end can be referred to as an encoding device or a video encoding device, and the decoding end can be referred to as a decoding device or a video decoding device.

[0224] It should be understood that the sample points involved in this application may be referred to as samples, pixels, or pixel points, etc. The downsampling filters involved in this application may be referred to as models, downsampling models, etc. This application does not make specific limitations in this regard.

[0225] Figure 5 This is a schematic flowchart of the prediction method 400 provided in an embodiment of this application. It should be understood that the method 400 can be executed by either the encoding end or the decoding end; for example, the method 400 can be executed by… Figure 1 or Figure 2 The encoder 200 shown is executed, and the method 400 described above can be performed by... Figure 1 or Figure 3 The decoder 300 is executed.

[0226] like Figure 5 As shown, the prediction method 400 may include some or all of the following:

[0227] S401, based on the reconstruction block of the first component of the target image block, obtain the first prediction block of the second component of the target image block.

[0228] For example, the target image block may be referred to as an image block to be processed, a processing unit, a current image block, or a current unit. The target image block may be at least one of an image block to be encoded and an image block to be decoded. The image block to be encoded may be referred to as an encoding unit, such as a CU to be encoded. The image block to be decoded may be referred to as a decoding unit, such as a CU to be decoded. When the prediction method is performed by the decoding end, the target image block may be the image block to be decoded. When the prediction method is performed by the encoding end, the target image block may be the image block to be encoded.

[0229] For example, the size of the reconstructed block is the same as the size of the first predicted block.

[0230] For example, the first component is a luminance component, and the second component is a chrominance component. For instance, the first component is a luminance component, and the second component is a chrominance component U. Or, the first component is a luminance component, and the second component is a chrominance component V.

[0231] S401, based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained. The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point; the first sample point is a sample point of the first component within a first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component within the first reconstructed region adjacent to the target image block; the second sample point is a sample point of the second component within the first reconstructed region.

[0232] For example, the second prediction block can be obtained by downsampling the first prediction block using the downsampling filter.

[0233] For example, the at least one first sample point and the at least one second sample point can correspond one-to-one or be multiple games. For instance, the number of the at least one first sample point is 5, 6 or other values, and the number of the at least one first sample point is 1.

[0234] For example, the first reconstructed region may include any reconstructed region in the image to which the target image patch belongs.

[0235] For example, the first prediction block and the second prediction block have different sizes. For instance, the width of the first prediction block is greater than the width of the second prediction block, and / or the height of the first prediction block is greater than the height of the second prediction block.

[0236] The statement in this application that "the parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point" can be understood or equivalently replaced as follows: the parameters of the downsampling filter are trained based on at least one first sample point and at least one second sample point, or the downsampling filter is a filter capable of downsampling at least one first sample point into at least one second sample point, or the downsampling filter is determined based on a first template and a second template. Wherein, the first template includes the at least one first sample point, and the second template includes the at least one second sample point.

[0237] Compared with the scheme of obtaining the second prediction block based on the first prediction block and a fixed downsampling filter, the beneficial effects of this embodiment are analyzed as follows:

[0238] If the first sample point is a sample point of the first component within the first reconstructed region adjacent to the target image block, since the sample points of the first component within the first reconstructed region are easy to obtain, and the relationship between the sample points of the first component within the first reconstructed region and the second sample point can reflect the texture characteristics of the second component of the target image block to a certain extent, it can not only reduce the determination complexity of the parameters of the downsampling filter, thereby reducing the prediction complexity of the second prediction block, but also enable the downsampling filter to adapt to the texture characteristics of the target image block and downsample the first prediction block, thereby improving the downsampling performance of the downsampling filter and the prediction accuracy of the second prediction block.

[0239] If the first sample point is a sample point of the second component determined based on sample points of the first component in the first reconstructed region adjacent to the target image block, since the sample point of the second component determined based on sample points of the first component in the first reconstructed region adjacent to the target image block can reflect the texture characteristics of the second component of the target image block more accurately than the sample points of the first component in the first reconstructed region, the downsampling filter can adapt to the texture characteristics of the second component of the target image block as much as possible, downsample the first prediction block, and thus improve the downsampling performance of the downsampling filter as much as possible and improve the prediction accuracy of the second prediction block as much as possible.

[0240] It should be noted that in related technologies, the encoding or decoding end can directly obtain the second prediction block based on the reconstructed block of the first component of the target image block and the downsampling filter. That is, the encoding or decoding end does not need to obtain the first prediction block, but instead downsamples the reconstructed block based on the downsampling filter to obtain the second prediction block. The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point; the first sample point is a sample point of the first component within a first reconstructed region adjacent to the target image block, and the second sample point is a sample point of the second component within the first reconstructed region. Compared with this scheme, the beneficial effects of this embodiment are analyzed as follows:

[0241] If the first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, since the first prediction block can reflect the texture characteristics of the second component of the target image block more accurately than the reconstructed block, the prediction accuracy of the second prediction block can be improved by obtaining the second prediction block based on the first prediction block and the downsampling filter.

[0242] If the first sample point is a sample point of the second component determined based on sample points of the first component within a first reconstructed region adjacent to the target image patch, since the first prediction block can reflect the texture characteristics of the second component of the target image patch more accurately than the reconstructed block, obtaining the second prediction block based on the first prediction block and the downsampling filter can improve the prediction accuracy of the second prediction block. Furthermore, since the sample points of the second component determined by sample points of the first component within a first reconstructed region adjacent to the target image patch can reflect the texture characteristics of the second component of the target image patch more accurately than sample points of the first component within the first reconstructed region, the downsampling filter can adapt as much as possible to the texture characteristics of the second component of the target image patch when downsampling the first prediction block, thereby maximizing the downsampling performance of the downsampling filter and maximizing the prediction accuracy of the second prediction block.

[0243] Based on the above analysis, the beneficial effects of Scheme 1 and Scheme 2 provided in this application relative to Scheme 3 and Scheme 4 will be explained below with reference to Table 3.

[0244] Option 1: The first sample point is a sample point of the first component within the first reconstructed region adjacent to the target image block.

[0245] Option 2: The first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0246] Scheme 3: Obtain the second prediction block based on the first prediction block and a fixed downsampling filter.

[0247] Option 4: A predicted block for the second component of the target image patch is obtained based on the reconstructed block of the first component and the cross-component model. That is, instead of obtaining the first predicted block, the second predicted block is obtained by downsampling the reconstructed block using a downsampling filter. The parameters of the cross-component model can be determined based on sample points of the first and second components within adjacent reconstructed regions of the target image patch.

[0248] Table 3

[0249]

[0250] The test results of the proposed solution are explained below with reference to Table 4.

[0251] Table 4

[0252]

[0253] As shown in Table 4, TGM and MC are video test sequences. EncT represents encoding time, and DecT represents decoding time. The test configuration is full-frame intra-frame configuration. Y represents luminance (Luma), Cb(U) represents blue chroma, and Cr(V) represents red chroma. The values ​​in the table are BD-rate; a negative BD-rate indicates a performance improvement, and a larger absolute value indicates a greater performance improvement. As can be seen from Table 4, using the prediction method provided in this application, under general test conditions, it brings gains of 1.68% / 6.00% / 6.99% to the Y / U / V components of TGM, and 0.28% / 3.16% / 5.13% to the Y / U / V components of MC, respectively, thus improving encoding and decoding performance.

[0254] It should be noted that this application does not specifically limit the method for determining the parameters of the downsampling filter. For example, the parameters of the downsampling filter can be derived using conventional filter parameter derivation methods.

[0255] For example, the filter parameters can be determined by calculating the autocorrelation matrix of the first sample point and the cross-correlation vector between the first and second sample points, and then minimizing the mean squared error (MSE) based on the autocorrelation matrix and cross-correlation vector. The autocorrelation matrix is ​​decomposed using LDL decomposition, and the final filter parameters are calculated using a back-substitution method. For example, when implementing this using the least squares method, it is possible to find a vector x such that ||Ax-b||. 2 Minimize, where A is the autocorrelation matrix and b is the cross-correlation vector.

[0256] The process of solving the expression Ax = b using the LDL decomposition method can generally include:

[0257] 1. Multiply both sides of the equation by the transpose of matrix A, A T Ax = A T b.

[0258] 2. Regarding A T A decomposition yields LDL T x = A T b; where L is a lower triangular matrix, D is a diagonal matrix, and L T It is the transpose of L.

[0259] 3. Solve for LY = A T b obtains Y.

[0260] 4. Solve DL T x = Y yields vector x, which represents the linear relationship between the input matrix A and the output vector Y, thus providing the filter parameters.

[0261] In some embodiments, the first sample point is a sample point of the second component determined based on sample points of the first component in a first reconstructed region adjacent to the target image block, including: the first sample point is a sample point of the second component determined based on sample points of the first component in the first reconstructed region and a first mapping relationship, wherein the first mapping relationship is determined based on the sample values ​​of the sample points of the first component and the sample points of the second component in a position-associated second reconstructed region adjacent to the target image block.

[0262] The location association involved in this application can be understood as an association or correspondence at location. For example, assuming that the number of sample points of the first component in the second reconstructed region is n times the number of sample points of the second component in the second reconstructed region, where n > 1, then the sample point of the second component in the second reconstructed region associated with the sample point of the first component located at (x, y) is the sample point of the second component located at (x / n, y / n). For example, when n = 2, the sample point of the second component in the second reconstructed region associated with the sample point of the first component located at (x, y) is the sample point of the second component located at (x / 2, y / 2).

[0263] It should be understood that the method for determining the first mapping relationship can refer to the method described above for obtaining... Figure 4 The method for determining the linear model coefficients α and β of the temporary chromaticity prediction block shown in (b) is not specifically limited here to avoid repetition.

[0264] In this embodiment, since the sample values ​​of the first component and the second component of the sample points in the second reconstructed region adjacent to the target image block can reflect the relationship between the reconstructed block and the first predicted block, the first mapping relationship can be determined based on the sample values ​​of the first component and the second component of the sample points in the second reconstructed region adjacent to the target image block. Therefore, when the first sample point is determined based on the first mapping relationship, the prediction accuracy of the first sample point can be improved.

[0265] In some embodiments, the first mapping relationship is determined based on sample points of the second component at a first location within the second reconstructed region and one of the following:

[0266] The sample value of the sample point of the first component at the associated position of the first position;

[0267] The value is obtained by weighting the sample values ​​of the sample points of the first component at multiple associated locations of the first position.

[0268] It should be understood that when the first mapping relationship is determined based on the value obtained by weighting the sample values ​​of the sample points of the second component at the first position in the second reconstructed area and the sample points of the first component at multiple associated positions of the first position, the specific determination method can refer to the syntax for determining the luminance component value x[i] mentioned above. To avoid repetition, no specific limitation is made here.

[0269] In this embodiment, when the first mapping relationship is based on the sample values ​​of the sample points of the second component at the first location within the second reconstructed region and the sample points of the first component at associated locations of the first location, the determination complexity of the first mapping relationship can be reduced. When the first mapping relationship is determined based on the weighted value obtained by weighting the sample values ​​of the sample points of the second component at the first location within the second reconstructed region and the sample points of the first component at multiple associated locations of the first location, the accuracy of the first mapping relationship can be increased by increasing the sample value of a single sample point of the first component, thereby improving the prediction accuracy of the first sample point.

[0270] In some embodiments, the second reconstructed region is the same as the first reconstructed region.

[0271] In this embodiment, when the second reconstructed region is the same as the first reconstructed region, the number of reconstructed regions that need to be determined can be reduced, which can not only reduce the complexity of determining the first mapping relationship, but also improve the encoding and decoding efficiency.

[0272] In some embodiments, the first reconstructed region includes at least one of the following:

[0273] 1. The reconstructed region located above the target image block.

[0274] Optionally, the reconstructed region located above the target image patch includes: sample points located above the target image patch, for example, sample points located directly above the target image patch. Alternatively, the reconstructed region located above the target image patch includes: at least one row / column of sample points located above the target image patch, for example, at least one consecutive row / column of sample points located above the target image patch.

[0275] Optionally, the reconstructed region located above the target image block may or may not be adjacent to the target image block.

[0276] For example, the reconstructed region located above the target image patch can be as follows: Figure 6 Region 2, shown, is adjacent to the target image block.

[0277] The reconstructed region located above the target image block as described in this application may also be referred to as the upper reconstructed region of the target image block, the upper reconstructed sample point region of the target image block, or the region composed of adjacent upper reconstructed sample points of the target image block, etc.

[0278] 2. The reconstructed area located on the upper left side of the target image block.

[0279] Optionally, the reconstructed region located on the upper left side of the target image patch includes: sample points located on the upper left side of the target image patch. Or the reconstructed region located on the upper left side of the target image patch includes: at least one row / column of sample points located on the upper left side of the target image patch, for example, at least one consecutive row / column of sample points located on the upper left side of the target image patch.

[0280] Optionally, the reconstructed region located on the upper left side of the target image block may be adjacent to or not adjacent to the reconstructed region located on the upper side of the target image block.

[0281] For example, the reconstructed region located on the upper left side of the target image patch can be as follows: Figure 6 Region 1 shown, which is located above the reconstructed region (e.g., as shown in the image), Figure 6 The area shown in section 2) is adjacent.

[0282] The reconstructed region located on the upper left side of the target image block as described in this application may also be referred to as the upper left reconstructed region of the target image block, the upper left reconstructed sample point region of the target image block, or the region composed of adjacent upper left reconstructed sample points of the target image block, etc.

[0283] 3. The reconstructed area located on the upper right side of the target image block.

[0284] Optionally, the reconstructed region located on the upper right side of the target image patch includes: sample points located on the upper right side of the target image patch. Or the reconstructed region located on the upper right side of the target image patch includes: at least one row / column of sample points located on the upper right side of the target image patch, for example, at least one consecutive row / column of sample points located on the upper right side of the target image patch.

[0285] Optionally, the reconstructed region located on the upper right side of the target image block may be adjacent to or not adjacent to the reconstructed region located on the upper side of the target image block.

[0286] For example, the reconstructed region located on the upper right side of the target image patch can be as follows: Figure 6 Region 3 shown, which is located above the reconstructed region (e.g., as shown in the image), Figure 6 The area shown in section 2) is adjacent.

[0287] The reconstructed region located on the upper right side of the target image block as described in this application may also be referred to as the upper right reconstructed region of the target image block, the upper right reconstructed sample point region of the target image block, or the region composed of adjacent upper right reconstructed sample points of the target image block, etc.

[0288] 4. The reconstructed area located to the left of the target image block.

[0289] Optionally, the reconstructed region located to the left of the target image patch includes: sample points located to the left of the target image patch, such as sample points located directly to the left of the target image patch. Or, the reconstructed region located to the left of the target image patch includes: at least one row / column of sample points located to the left of the target image patch, such as at least one consecutive row / column of sample points located to the left of the target image patch.

[0290] Optionally, the reconstructed region located to the left of the target image block may or may not be adjacent to the target image block.

[0291] For example, the reconstructed region located to the left of the target image patch can be as follows: Figure 6 Region 4, shown, is adjacent to the target image block.

[0292] The reconstructed region located to the left of the target image block as described in this application may also be referred to as the left reconstructed region of the target image block, the left reconstructed sample point region of the target image block, or the region composed of adjacent reconstructed sample points to the left of the target image block.

[0293] 5. The reconstructed area located on the lower left side of the target image block.

[0294] Optionally, the reconstructed region located on the lower left side of the target image patch includes: sample points located on the lower left side of the target image patch. Or, the reconstructed region located on the lower left side of the target image patch includes: at least one row / column of sample points located on the lower left side of the target image patch, for example, at least one consecutive row / column of sample points located on the lower left side of the target image patch.

[0295] Optionally, the reconstructed region located on the lower left side of the target image block may be adjacent to or not adjacent to the reconstructed region located on the left side of the target image block.

[0296] For example, the reconstructed region located on the lower left side of the target image patch can be as follows: Figure 6 Region 5 shown, which is adjacent to the reconstructed region located to the left of the target image patch (e.g., Figure 6 The area shown in section 4) is adjacent.

[0297] The reconstructed region located on the lower left side of the target image block as described in this application may also be referred to as the lower left reconstructed region of the target image block, the lower left reconstructed sample point region of the target image block, or the region composed of adjacent reconstructed sample points on the lower left side of the target image block.

[0298] In this embodiment, by distinguishing the reconstructed regions included in the first reconstructed region, the first reconstructed region can be a reconstructed region applicable to different needs or different prediction modes, which can improve the reference value of the first reconstructed region, thereby improving the downsampling performance of the downsampling filter and the prediction accuracy of the second prediction block.

[0299] In some embodiments, the method 200 further includes:

[0300] The first reconstructed region is determined based on the prediction pattern of the second component of the target image patch.

[0301] In this embodiment, the first reconstructed region is determined based on the prediction mode of the second component of the target image block, so that the first reconstructed region can be a reconstructed region adapted to the prediction mode of the second component of the target image block, which can improve the reference value of the first reconstructed region, thereby improving the downsampling performance of the downsampling filter and the prediction accuracy of the second prediction block.

[0302] In some embodiments, determining the first reconstructed region based on the prediction pattern of the second component of the target image patch includes at least one of the following:

[0303] 1. When the prediction mode of the second component of the target image patch is Intra Chroma Two Step Cross-component Prediction Mode (Intra_Chroma_TSCPM) or Intra Chroma Two Step Cross-component Prediction Mode Left Top (Intra_Chroma_TSCPM_LT), the first reconstructed region is determined to include at least one of the following: a reconstructed region located above the target image patch, a reconstructed region located to the left of the target image patch, a reconstructed region located to the upper left of the target image patch, a reconstructed region located to the upper right of the target image patch, or a reconstructed region located to the lower left of the target image patch.

[0304] For example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM or Intra_Chroma_TSCPM_LT, the first reconstructed region includes a reconstructed region located above the target image patch and a reconstructed region located to the left of the target image patch. Optionally, the first reconstructed region further includes at least one of the following: a reconstructed region located to the upper left of the target image patch, a reconstructed region located to the upper right of the target image patch, and a reconstructed region located to the lower left of the target image patch.

[0305] For example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM based on the downsampling filter or Intra_Chroma_TSCPM_LT based on the downsampling filter, the first reconstructed region includes a reconstructed region located above the target image patch and a reconstructed region located to the left of the target image patch. Optionally, the first reconstructed region further includes at least one of the following: a reconstructed region located to the upper left of the target image patch, a reconstructed region located to the upper right of the target image patch, and a reconstructed region located to the lower left of the target image patch.

[0306] The Intra_Chroma_TSCPM based on the downsampling filter described in this application can be referred to as:

[0307] Intra Chroma Refined Two Step Cross-component Prediction Mode (Intra_Chroma_RTSCPM) or other terms.

[0308] The Intra_Chroma_TSCPM_LT based on the downsampling filter described in this application can be referred to as:

[0309] Intra Chroma Refined TwoStep Cross-component Prediction Mode Left Top (Intra_Chroma_RTSCPM_LT) or other terms.

[0310] As an example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM or Intra_Chroma_TSCPM_LT, the first reconstructed region includes, for example, Figure 6 Regions 2 and 4 are shown. Optionally, the first reconstructed region may further include at least one of the following: Figure 6 Area 1 shown, as Figure 6 Area 3 shown, such as Figure 6 Area 5 is shown.

[0311] 2. When the prediction mode of the second component of the target image block is Intra Chroma Two Step Cross-component Prediction Mode Top (Intra_Chroma_TSCPM_T), the first reconstructed region is determined to include at least one of the following: a reconstructed region located on the top side of the target image block, a reconstructed region located on the upper left side of the target image block, or a reconstructed region located on the upper right side of the target image block.

[0312] For example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM_T, the first reconstructed region includes the reconstructed region located on the upper side of the target image patch. Optionally, the first reconstructed region also includes at least one of the following: a reconstructed region located on the upper left side of the target image patch, or a reconstructed region located on the upper right side of the target image patch.

[0313] For example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM_T based on the downsampling filter, the first reconstructed region includes the reconstructed region located on the upper side of the target image patch. Optionally, the first reconstructed region also includes at least one of the following: a reconstructed region located on the upper left side of the target image patch, or a reconstructed region located on the upper right side of the target image patch.

[0314] The Intra_Chroma_TSCPM_T based on the downsampling filter described in this application can be referred to as:

[0315] Intra Chroma Refined Two Step Cross-component Prediction Mode Top (Intra_Chroma_RTSCPM_T) or other terms.

[0316] As an example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM_T, the first reconstructed region includes, for example, Figure 6 Region 2 is shown. Optionally, the first reconstructed region may further include at least one of the following: Figure 6 Area 1 shown, as Figure 6 Area 3 is shown.

[0317] 3. When the prediction mode of the second component of the target image block is Intra Chroma Two Step Cross-component Prediction Mode Left (Intra_Chroma_TSCPM_L), the first reconstructed region is determined to include at least one of the following: a reconstructed region located on the left side of the target image block, a reconstructed region located on the upper left side of the target image block, or a reconstructed region located on the lower left side of the target image block.

[0318] For example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM_L, the first reconstructed region includes the reconstructed region located to the left of the target image patch. Optionally, the first reconstructed region also includes at least one of the following: a reconstructed region located to the upper left of the target image patch, or a reconstructed region located to the lower left of the target image patch.

[0319] For example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM_L, the first reconstructed region includes the reconstructed region located to the left of the target image patch. Optionally, the first reconstructed region also includes at least one of the following: a reconstructed region located to the upper left of the target image patch, or a reconstructed region located to the lower left of the target image patch.

[0320] The Intra_Chroma_TSCPM_L based on the downsampling filter described in this application can be referred to as:

[0321] Intra Chroma Refined Two Step Cross-component Prediction Mode Left (Intra_Chroma_RTSCPM_L) or other terms.

[0322] As an example, when the prediction mode of the second component of the target image patch is Intra_Chroma_TSCPM_L, the first reconstructed region includes areas located as follows: Figure 6 Region 4 is shown. Optionally, the first reconstructed region may further include at least one of the following: Figure 6 Area 1 shown, as Figure 6 Area 5 is shown.

[0323] In this embodiment, the reconstructed regions included in the first reconstructed region are distinguished by the prediction mode of the second component of the target image block, so that the first reconstructed region can be a reconstructed region that adapts to the prediction mode of the second component of the target image block, which can improve the reference value of the first reconstructed region, thereby improving the downsampling performance of the downsampling filter and the prediction accuracy of the second prediction block.

[0324] In some embodiments, the first reconstructed region is transmitted via a bitstream through a protocol agreement or information indicating the first reconstructed region. Optionally, the information of the first reconstructed region may be an identifier or index of the first reconstructed region. Optionally, the information of the first reconstructed region includes: information of the reconstructed regions included in the first reconstructed region, for example, specifically, it may be an identifier or index of the reconstructed regions included in the first reconstructed region.

[0325] For example, the reconstructed areas included in the first reconstructed area are transmitted via a code stream, either by agreement of the protocol or by information indicating the reconstructed areas included in the first reconstructed area.

[0326] In this embodiment, when the first reconstructed region is agreed upon through a protocol, the amount of information that needs to be transmitted through the bitstream can be reduced, thereby saving bitstream transmission overhead. When the information used to indicate the first reconstructed region is transmitted through the bitstream, the first reconstructed region can be flexibly indicated in the bitstream, thereby improving encoding and decoding flexibility.

[0327] In some embodiments, S402 includes:

[0328] Based on the downsampling filter, the sample values ​​of multiple sample points in the first prediction block are downsampled to obtain the sample value of a fourth sample point in the second prediction block whose position is associated with the position of a third sample point among the multiple sample points;

[0329] The parameters of the downsampling filter include at least one of the following:

[0330] The weight of the sample value of each of the plurality of sample points;

[0331] The weight of the difference between the sample value of each of the plurality of sample points and the first offset value;

[0332] The weight of the square of the sample value of the third sample point;

[0333] The weight of the value obtained by adding the first offset value to the square of the sample value of the third sample point;

[0334] The weight of the value obtained after weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points;

[0335] The weight of the value obtained after weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points;

[0336] The weight of the sample value obtained after weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points;

[0337] The weight of the sample value obtained after weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points;

[0338] The weights of the values ​​obtained after weighting the sample values ​​of the multiple sample points;

[0339] The weights of the squares of the sample values ​​obtained after weighted processing of the multiple sample points;

[0340] The weight of the first bias, which is used to adjust at least one of the following: the value obtained after weighting the sample values ​​of the plurality of sample points, and the value obtained after weighting the plurality of differences corresponding to the plurality of sample points; wherein the plurality of differences include the difference between the sample value of each of the plurality of sample points and the first offset. For example, the first bias can be determined based on the bit depth of the third sample point. Optionally, the first bias can be the median of the bit depth of the third sample point. For example, if the bit depth of the third sample point is 10 bits, the first bias can be 512. Furthermore, if the bit depth of the third sample point is 8 bits, the first bias can be 128.

[0341] The first offset value is determined based on the sample values ​​of the at least one first sample point. For example, the first offset value may be the maximum, minimum, average, weighted average, or mode of the sample values ​​of the at least one first sample point, etc., and this application does not specifically limit it in this regard.

[0342] For example, after obtaining the sample value of the fourth sample point, the sample value of the fourth sample point can be scaled or cropped to its effective range. Optionally, the effective range of the sample value of the fourth sample point is determined according to the bit depth of the fourth sample point. For example, if the bit depth of the fourth sample point is 10 bits, then the effective range of the sample value of the fourth sample point is 0 to 1023.

[0343] For example, the plurality of sample points includes at least one of the following:

[0344] The third sample point;

[0345] The sample value of the sample point located above the third sample point;

[0346] The sample value of the sample point located to the upper left of the third sample point;

[0347] The sample value of the sample point located to the upper right of the third sample point;

[0348] The sample value of the sample point located to the left of the third sample point;

[0349] The sample value of the sample point located below the third sample point;

[0350] The sample value of the sample point located to the lower left of the third sample point;

[0351] The sample value of the sample point located to the lower right of the third sample point.

[0352] As an example, such as Figure 7 As shown, C represents the sample value of the third sample point; N represents the sample value of the sample point located above the third sample point among the plurality of sample points; S represents the sample value of the sample point located below the third sample point among the plurality of sample points; W represents the sample value of the sample point located to the left of the third sample point among the plurality of sample points; E represents the sample value of the sample point located to the right of the third sample point among the plurality of sample points; NW represents the sample value of the sample point located to the upper left of the third sample point among the plurality of sample points; NE represents the sample value of the sample point located to the upper right of the third sample point among the plurality of sample points; SW represents the sample value of the sample point located to the lower left of the third sample point among the plurality of sample points; and SE represents the sample value of the sample point located to the lower right of the third sample point among the plurality of sample points.

[0353] The parameters of the downsampling filter include at least one of the following:

[0354] like Figure 7 The weights of C, W, E, N, S, NW, NE, SW, and SE are shown.

[0355] like Figure 7 The weights of the differences between C and the first offset value, W and the first offset value, E and the first offset value, N and the first offset value, S and the first offset value, NW and the first offset value, NE and the first offset value, SW and the first offset value, and SE and the first offset value are shown below.

[0356] The weight of the square of C;

[0357] The weight of the value obtained by adding the first offset value to the square of C;

[0358] The weights of the values ​​obtained after weighting N and W;

[0359] The weights of the values ​​obtained after weighting N and E;

[0360] The weights of the values ​​obtained after weighting S and W;

[0361] The weights of the values ​​obtained after weighting S and E;

[0362] The weights of the values ​​obtained after weighting C, W, E, N, and S;

[0363] The weights of the squares of the values ​​obtained after weighting C, W, E, N, and S;

[0364] The weight of the first bias.

[0365] In this embodiment, by distinguishing the parameters of the downsampling filter, parameters suitable for the target image block can be selected, thereby constructing the downsampling filter suitable for the target image block. This not only improves the flexibility of the downsampling filter, but also maximizes the downsampling performance of the downsampling filter and maximizes the prediction accuracy of the second prediction block.

[0366] In some embodiments, the coordinates of the third sample point are (x, y); wherein, the coordinates of the sample points other than the third sample point among the plurality of sample points include: (x, y-1), (x, y+1), (x-1, y) and (x+1, y), or, the coordinates of the sample points other than the third sample point among the plurality of sample points include: (x-1, y), (x+1, y), (x-1, y+1), (x, y+1) and (x+1, y+1).

[0367] For example, if the size of the first prediction block is n times the size of the second prediction block, then the coordinates of the third sample are (x, y), and the coordinates of the fourth sample are (x / n, y / n). For instance, when n = 2, the coordinates of the third sample are (x, y), and the coordinates of the fourth sample are (x / 2, y / 2).

[0368] As an example, such as Figure 7 As shown, the sample points with coordinates (x,y-1), (x,y+1), (x-1,y) and (x+1,y) are the sample points with sample values ​​N, S, W and E respectively, and the sample points with coordinates (x-1,y), (x+1,y), (x-1,y+1), (x,y+1) and (x+1,y+1)W, E, SW and SE respectively.

[0369] In this embodiment, by distinguishing the multiple sample points, the multiple sample points suitable for the target image block can be selected to determine the fourth sample point. This not only improves the downsampling flexibility of the downsampling filter, but also maximizes the downsampling performance of the downsampling filter and maximizes the prediction accuracy of the second prediction block.

[0370] In some embodiments, the downsampling filter includes any of the following types:

[0371] L″ = L′;

[0372] L″=L′+α β ·β;

[0373] L″=L′+O2;

[0374] L″=L′+O2+α β ·β;

[0375] Wherein, L″ represents the sample value of the fourth sample point; O2 represents the second offset, which is determined based on the sample values ​​of the at least one second sample point. For example, the second offset can be the maximum, minimum, average, weighted average, or mode of the sample values ​​of the at least one second sample point, etc., and this application does not specifically limit this; β represents the first bias, α β The weight L′ representing the first bias includes any of the following:

[0376]

[0377] L′=w0·v0+w1·v1+w2·v2+w3·v3+w4·v4;

[0378] L′=w0·v0+w1·v1+w2·v2+w3·v3+w4·v4+w5·v0 2 ;

[0379] Among them, L i This represents the sample value of the i-th sample point among the plurality of sample points;

[0380] α i This represents the weight of the sample value of the i-th sample point among the plurality of sample points;

[0381] k represents the difference between the number of the plurality of sample points and 1;

[0382] O1 represents the first offset;

[0383] L p This represents the sample value of the third sample point;

[0384] α k The weight represents the square of the sample value of the third sample point;

[0385] B represents the bit depth of the sample value of the third sample point;

[0386] v0 represents the value obtained after weighting the sample values ​​of the multiple sample points; w0 represents the weight of v0;

[0387] v1 represents the value obtained by weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; w1 represents the weight of v1.

[0388] v2 represents the value obtained by weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; w2 represents the weight of v2;

[0389] v3 represents the value obtained by weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; w3 represents the weight of v3;

[0390] v4 represents the value obtained by weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; w4 represents the weight of v4.

[0391] w5 indicates v0 2 The weight.

[0392] As an example, such as Figure 7 As shown, It can be implemented as follows:

[0393] L′=α0·C+α1·W+α2·E+α3·SW+α4·S+α5·SE.

[0394] As an example, such as Figure 7 As shown, L′=w0·v0+w1·v1+w2·v2+w3·v3+w4·v4 can be realized as:

[0395]

[0396] For example, the downsampling filter may be implemented as at least one of the following:

[0397] Filter 1:

[0398] L″=α0·C+α1·W+α2·E+α3·SW+α4·S+α5·SE.

[0399] Filter 2:

[0400] L″=α0·C+α1·W+α2·E+α3·SW+α4·S+α5·SE+O2.

[0401] Filter 3:

[0402] L″=α0·C+α1·W+α2·E+α3·SW+α4·S+α5·SE+α β ·β.

[0403] Filter 4:

[0404] L″=α0·C+α1·W+α2·E+α3·SW+α4·S+α5·SE+O2+α β ·b.

[0405] filter5:

[0406] L″=α0·(C-O1)+α1·(W-O1)+α2·(E-O1)+α3·(SW-O1)+α4·(S-O1)+α5·(SE-O1).

[0407] filter6:

[0408] L″=α0·(C-O1)+α1·(W-O1)+α2·(E-O1)+α3·(SW-O1)+α4·(S-O1)+α5·(SE-O1)+O2.

[0409] filter7:

[0410] L″=α0·(C-O1)+α1·(W-O1)+α2·(E-O1)+α3·(SW-O1)+α4·(S-O1)+α5·(SE-O1)+α β ·b.

[0411] filter8:

[0412] L″=α0·(C-O1)+α1·(W-O1)+α2·(E-O1)+α3·(SW-O1)+α4·(S-O1)+α5·(SE-O1)+O2+α β ·b.

[0413] filter9:

[0414]

[0415] filter10:

[0416]

[0417] filter11:

[0418]

[0419] filter12:

[0420]

[0421] filter13:

[0422]

[0423] In this embodiment, by distinguishing the structure of the downsampling filter, a filter structure suitable for the target image block can be selected to downsample the first prediction block. This not only improves the flexibility of the downsampling filter, but also maximizes the downsampling performance of the downsampling filter and maximizes the prediction accuracy of the second prediction block.

[0424] In some embodiments, the type of the downsampling filter is determined by a protocol agreement, or by information indicating the type of the downsampling filter being transmitted via a bitstream, or by the decoding end and the encoding end sampling in the same way.

[0425] For example, the type of the downsampling filter refers to the type associated with the parameters of the downsampling filter. As an example, the type of the downsampling filter may include any one of the filters 1 to 11 mentioned above.

[0426] For example, the information used to indicate the type of the downsampling filter includes the identifier of the downsampling filter or other information, wherein the identifier of the downsampling filter is also referred to as the index of the downsampling filter. As an example, the identifiers of filter 1 to filter 11 mentioned above can be 0 to 10 or 1 to 11, respectively.

[0427] In this embodiment, when the type of the downsampling filter is determined by a protocol agreement or by the same sampling method used by the decoding and encoding ends, the amount of information that needs to be transmitted through the bitstream can be reduced, thereby saving bitstream transmission overhead. When information indicating the type of the downsampling filter is transmitted through the bitstream, the type of the downsampling filter can be flexibly indicated in the bitstream, thereby improving encoding and decoding flexibility.

[0428] In some embodiments, the method for determining the parameters of the downsampling filter is agreed upon through a protocol or transmitted through a bitstream with first indication information; wherein, the first indication information is used to indicate that the parameters of the downsampling filter are preset parameters, or the first indication information is used to indicate that the parameters of the downsampling filter are determined based on the at least one first sample point and the at least one second sample point.

[0429] For example, the method for determining the parameters of the downsampling filter includes at least one of the following: a method for determining predefined parameters (e.g., parameters agreed upon in a protocol) as the parameters of the downsampling filter, and a method for determining the parameters of the downsampling filter based on the at least one first sample point and the at least one second sample point.

[0430] For example, the first indication information can be a Boolean variable. For instance, when the first indication information is a first value, it is used to indicate that the parameters of the downsampling filter are preset parameters; when the first indication information is a second value, it is used to indicate that the parameters of the downsampling filter are determined based on the at least one first sample point and the at least one second sample point. For example, the first value is 0 and the second value is 1, or the first value is 1 and the second value is 0.

[0431] In this embodiment, when the method for determining the parameters of the downsampling filter is agreed upon through a protocol, the amount of information that needs to be transmitted through the bitstream can be reduced, thereby saving bitstream transmission overhead. When transmitting the first indication information through the bitstream, the method for determining the parameters of the downsampling filter can be flexibly indicated in the bitstream, thereby improving encoding and decoding flexibility.

[0432] In some embodiments, the first indication information is associated with at least one of the following: parameter set, strip, slice group, slice, CTU line, CTU, CU, PU.

[0433] For example, the encoder may indicate that the parameters of the downsampling filter are preset parameters at a granularity of at least one of parameter set, strip, sheet group, sheet, CTU line, CTU, CU and PU, or determine the parameters of the downsampling filter based on at least one first sample point and at least one second sample point.

[0434] In this embodiment, by distinguishing the levels associated with the first indication information, the encoding end can select the most suitable level to transmit the first indication information according to the characteristics of the video content, thereby optimizing encoding efficiency and decoding performance. For example, if it applies to the entire video sequence, the indication information can be transmitted in the parameter set; however, if it differs in different areas of the video frame, the first indication information can be transmitted at a finer-grained level such as strip, slice group, slice, CTU line, CTU, CU, or PU.

[0435] In some embodiments, S401 includes:

[0436] The first predicted block is obtained based on the reconstructed block of the first component and the second mapping relationship of the target image block; wherein, the second mapping relationship is determined according to the sample values ​​of the sample points of the first component and the sample points of the second component in the adjacent third reconstructed region of the target image block.

[0437] For example, the method for determining the second mapping relationship can refer to the method described above for obtaining... Figure 4 The method for determining the linear model coefficients α and β of the temporary chromaticity prediction block shown in (b) is not specifically limited here to avoid repetition.

[0438] In this embodiment, since the sample values ​​of the first component and the second component of the sample points in the third reconstructed region adjacent to the target image block can reflect the relationship between the reconstructed block and the first prediction block, the third mapping relationship can be determined based on the sample values ​​of the first component and the second component of the sample points in the third reconstructed region, and then the prediction accuracy of the first prediction block can be improved based on the second mapping relationship.

[0439] In some embodiments, the third reconstructed region is the same as the second reconstructed region adjacent to the target image block; or the second mapping relationship is the same as the first mapping relationship, wherein the first mapping relationship is determined based on the sample values ​​of the sample points of the first component and the sample points of the second component that are associated with the location in the second reconstructed region adjacent to the target image block.

[0440] In this embodiment, when the third reconstructed region and the second reconstructed region adjacent to the target image block are the same, or when the second mapping relationship and the first mapping relationship are the same, the method used to obtain... Figure 4 The linear model coefficients α and β of the temporary chromaticity prediction block shown in (b) are directly used as the first mapping relationship, which can reduce the determination complexity of the first mapping relationship.

[0441] The 400 method provided in this application can be executed by a prediction device. As an example, the device can be an electronic device or a component within an electronic device, such as a chip or circuit. This application uses the example of a prediction device executing a prediction method to illustrate the prediction device provided in this application.

[0442] Figure 8 This is a schematic block diagram of a prediction device 500 provided in an embodiment of this application.

[0443] The first processing module 501 is used to obtain a first prediction block of the second component of the target image block based on the reconstruction block of the first component of the target image block;

[0444] The second processing module 502 is used to obtain a second prediction block of the second component of the target image block based on the first prediction block and the downsampling filter;

[0445] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0446] The first sample point is a sample point of the first component within a first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component within a first reconstructed region adjacent to the target image block.

[0447] The second sample point is a sample point of the second component within the first reconstructed region.

[0448] In some embodiments, the first sample point is a sample point of the second component determined based on sample points of the first component within a first reconstructed region adjacent to the target image patch, including:

[0449] The first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region and the first mapping relationship, wherein the first mapping relationship is determined based on the sample values ​​of the sample points of the first component and the sample points of the second component in the adjacent second reconstructed regions of the target image block.

[0450] In some embodiments, the first mapping relationship is determined based on sample points of the second component at a first location within the second reconstructed region and one of the following:

[0451] The sample value of the sample point of the first component at the associated position of the first position;

[0452] The value is obtained by weighting the sample values ​​of the sample points of the first component at multiple associated locations of the first position.

[0453] In some embodiments, the second reconstructed region is the same as the first reconstructed region.

[0454] In some embodiments, the first reconstructed region includes at least one of the following:

[0455] The reconstructed area located above the target image block;

[0456] The reconstructed region located on the upper left side of the target image block;

[0457] The reconstructed region located on the upper right side of the target image block;

[0458] The reconstructed region located to the left of the target image block;

[0459] The reconstructed area located on the lower left side of the target image block.

[0460] In some embodiments, the second processing module 502 is further configured to:

[0461] The first reconstructed region is determined based on the prediction pattern of the second component of the target image patch.

[0462] In some embodiments, the second processing module 502 is specifically configured to perform at least one of the following:

[0463] When the prediction mode of the second component of the target image block is Intra_Chroma_TSCPM or Intra_Chroma_TSCPM_LT (upper left side), the first reconstructed region is determined to include at least one of the following: a reconstructed region located on the upper side of the target image block, a reconstructed region located on the left side of the target image block, a reconstructed region located on the upper left side of the target image block, a reconstructed region located on the upper right side of the target image block, or a reconstructed region located on the lower left side of the target image block.

[0464] When the prediction mode of the second component of the target image block is the upper side of the intra-chroma two-step cross-component prediction mode Intra_Chroma_TSCPM_T, the first reconstructed region is determined to include at least one of the following: the reconstructed region located on the upper side of the target image block, the reconstructed region located on the upper left side of the target image block, and the reconstructed region located on the upper right side of the target image block.

[0465] When the prediction mode of the second component of the target image block is the Intra_Chroma_TSCPM_L two-step cross-component prediction mode, the first reconstructed region is determined to include at least one of the following: a reconstructed region located on the left side of the target image block, a reconstructed region located on the upper left side of the target image block, or a reconstructed region located on the lower left side of the target image block.

[0466] In some embodiments, the first reconstructed region is transmitted via a code stream by a protocol agreement or by information used to indicate the first reconstructed region.

[0467] In some embodiments, the second processing module 502 is specifically used for:

[0468] Based on the downsampling filter, the sample values ​​of multiple sample points in the first prediction block are downsampled to obtain the sample value of a fourth sample point in the second prediction block whose position is associated with the position of a third sample point among the multiple sample points;

[0469] The parameters of the downsampling filter include at least one of the following:

[0470] The weight of the sample value of each of the plurality of sample points;

[0471] The weight of the difference between the sample value of each of the plurality of sample points and the first offset value;

[0472] The weight of the square of the sample value of the third sample point;

[0473] The weight of the value obtained by adding the first offset value to the square of the sample value of the third sample point;

[0474] The weight of the value obtained after weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points;

[0475] The weight of the value obtained after weighting the sample value of the sample point above the third sample point and the sample value of the sample point to the right of the third sample point among the plurality of sample points;

[0476] The weight of the sample value obtained after weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points;

[0477] The weight of the sample value obtained after weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points;

[0478] The weights of the values ​​obtained after weighting the sample values ​​of the multiple sample points;

[0479] The weights of the squares of the sample values ​​obtained after weighted processing of the multiple sample points;

[0480] The weight of the first bias, wherein the first bias is used to adjust at least one of the following: the value obtained after weighting the sample values ​​of the plurality of sample points, and the value obtained after weighting the plurality of differences corresponding to the plurality of sample points; wherein the plurality of differences include the difference between the sample value of each of the plurality of sample points and the first bias.

[0481] The first offset value is determined based on the sample value of the at least one first sample point.

[0482] In some embodiments, the coordinates of the third sample point are (x, y); wherein, the coordinates of the sample points other than the third sample point among the plurality of sample points include: (x, y-1), (x, y+1), (x-1, y) and (x+1, y), or, the coordinates of the sample points other than the third sample point among the plurality of sample points include: (x-1, y), (x+1, y), (x-1, y+1), (x, y+1) and (x+1, y+1).

[0483] In some embodiments, the downsampling filter includes any of the following types:

[0484] L″ = L′;

[0485] L″=L′+α β ·β;

[0486] L″=L′+O2;

[0487] L″=L′+O2+α β ·β;

[0488] Wherein, L″ represents the sample value of the fourth sample point; O2 represents the second offset, which is determined based on the sample values ​​of the at least one second sample point; β represents the first bias, and α β The weight L′ representing the first bias includes any of the following:

[0489]

[0490] L′=w0·v0+w1·v1+w2·v2+w3·v3+w4·v4;

[0491] L′=w0·v0+w1·v1+w2·v2+w3·v3+w4·v4+w5·v0 2 ;

[0492] Among them, L i This represents the sample value of the i-th sample point among the plurality of sample points;

[0493] α i This represents the weight of the sample value of the i-th sample point among the plurality of sample points;

[0494] k represents the difference between the number of the plurality of sample points and 1;

[0495] O1 represents the first offset;

[0496] L p This represents the sample value of the third sample point;

[0497] α kThe weight represents the square of the sample value of the third sample point;

[0498] B represents the bit depth of the sample value of the third sample point;

[0499] v0 represents the value obtained after weighting the sample values ​​of the multiple sample points; w0 represents the weight of v0;

[0500] v1 represents the value obtained by weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; w1 represents the weight of v1.

[0501] v2 represents the value obtained by weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; w2 represents the weight of v2;

[0502] v3 represents the value obtained by weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; w3 represents the weight of v3;

[0503] v4 represents the value obtained by weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; w4 represents the weight of v4.

[0504] w5 indicates v0 3 The weight.

[0505] In some embodiments, the type of the downsampling filter is determined by a protocol agreement, or by information indicating the type of the downsampling filter being transmitted via a bitstream, or by the decoding end and the encoding end sampling in the same way.

[0506] In some embodiments, the method for determining the parameters of the downsampling filter is agreed upon through a protocol or by transmitting first indication information through a code stream;

[0507] Wherein, the first indication information is used to indicate that the parameters of the downsampling filter are preset parameters, or the first indication information is used to indicate that the parameters of the downsampling filter are determined based on the at least one first sample point and the at least one second sample point.

[0508] In some embodiments, the first indication information is associated with at least one of the following: parameter set, stripe, slice group, slice, codec tree unit (CTU) row, CTU, coding unit (CU), prediction unit (PU).

[0509] In some embodiments, the size of the reconstructed block is equal to the size of the first predicted block.

[0510] In some embodiments, the first processing module 501 is specifically used for:

[0511] The first predicted block is obtained based on the reconstructed block of the first component and the second mapping relationship of the target image block; wherein, the second mapping relationship is determined according to the sample values ​​of the sample points of the first component and the sample points of the second component in the adjacent third reconstructed region of the target image block.

[0512] In some embodiments, the third reconstructed region is the same as the second reconstructed region adjacent to the target image patch; or

[0513] The second mapping relationship is the same as the first mapping relationship. The first mapping relationship is determined based on the sample values ​​of the first component and the sample values ​​of the second component of the sample points in the second reconstructed region adjacent to the target image block.

[0514] This application also provides a bitstream transmission method, specifically, which can receive or send a bitstream obtained based on a second prediction block. For example, the encoding end obtains the bitstream based on the second prediction block and sends the bitstream to the decoding end. In other words, the decoding end receives the bitstream obtained based on the second prediction block from the encoding end.

[0515] The second prediction block is obtained according to the following prediction method:

[0516] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0517] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0518] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0519] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0520] The second sample point is a sample point of the second component within the first reconstructed region.

[0521] Specifically, the encoding end obtains a first prediction block of the second component of the target image block based on the reconstructed block of the first component of the target image block; obtains a second prediction block of the second component of the target image block based on the first prediction block and a downsampling filter; and generates a bitstream based on the second prediction block. For example, the encoding end can obtain a residual block of the second component of the target image block based on the second prediction block and the original block of the second component of the target image block, and then encode the residual block of the second component of the target image block to obtain the bitstream. After generating the bitstream, the encoding end sends the bitstream to the decoding end. Correspondingly, the decoding end receives the bitstream, obtains a first prediction block of the second component of the target image block based on the reconstructed block of the first component of the target image block determined from the bitstream (for example, decoding the bitstream to obtain a residual block of the first component of the target image block, and obtaining a reconstructed block of the first component of the target image block based on the residual block of the first component of the target image block and the prediction block of the first component of the target image block), obtains a second prediction block of the second component of the target image block, obtains a second prediction block of the second component of the target image block based on the first prediction block and a downsampling filter, and obtains a reconstructed block of the second component of the target image block based on the second prediction block. For example, the bitstream is decoded to obtain the residual block of the second component of the target image block, and the reconstructed block of the second component of the target image block is obtained based on the second prediction block and the residual block of the second component of the target image block.

[0522] It should be understood that the method by which the encoding end or the decoding end obtains the first prediction block based on the reconstructed block, and the method by which the encoding end or the decoding end obtains the second prediction block based on the first prediction block and the downsampling filter, can refer to the relevant content described above. To avoid repetition, it will not be repeated here.

[0523] In some embodiments, the bitstream includes information indicating the first reconstructed region. Optionally, the information of the first reconstructed region may be an identifier or index of the first reconstructed region. Optionally, the information of the first reconstructed region includes: information of the reconstructed regions included in the first reconstructed region, for example, specifically, it may be an identifier or index of the reconstructed regions included in the first reconstructed region.

[0524] In some embodiments, the bitstream includes information indicating the type of the downsampling filter.

[0525] For example, the type of the downsampling filter refers to the type associated with the parameters of the downsampling filter. As an example, the type of the downsampling filter may include any one of the filters 1 to 11 mentioned above.

[0526] For example, the information used to indicate the type of the downsampling filter includes the identifier of the downsampling filter or other information, wherein the identifier of the downsampling filter is also referred to as the index of the downsampling filter. As an example, the identifiers of filter 1 to filter 11 mentioned above can be 0 to 10 or 1 to 11, respectively.

[0527] In some embodiments, the bitstream includes first indication information; wherein the first indication information is used to indicate that the parameters of the downsampling filter are preset parameters, or the first indication information is used to indicate that the parameters of the downsampling filter are determined based on the at least one first sample point and the at least one second sample point.

[0528] For example, the first indication information can be a Boolean variable. For instance, when the first indication information is a first value, it is used to indicate that the parameters of the downsampling filter are preset parameters; when the first indication information is a second value, it is used to indicate that the parameters of the downsampling filter are determined based on the at least one first sample point and the at least one second sample point. For example, the first value is 0 and the second value is 1, or the first value is 1 and the second value is 0.

[0529] In some embodiments, the first indication information is associated with at least one of the following: parameter set, stripe, slice group, slice, codec tree unit (CTU) row, CTU, coding unit (CU), prediction unit (PU).

[0530] For example, the encoder may indicate the parameters of the downsampling filter as preset parameters or determined based on the at least one of parameter set, strip, sheet group, sheet, CTU line, CTU, CU and PU as granularity.

[0531] In this embodiment, by distinguishing the levels associated with the first indication information, the encoding end can select the most suitable level to transmit the first indication information according to the characteristics of the video content, thereby optimizing encoding efficiency and decoding performance. For example, if it applies to the entire video sequence, the indication information can be transmitted in the parameter set; however, if it differs in different areas of the video frame, the first indication information can be transmitted at a finer-grained level such as strip, slice group, slice, CTU line, CTU, CU, or PU.

[0532] This application also provides an encoding method, including:

[0533] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0534] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0535] Generate a bitstream based on the second prediction block;

[0536] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0537] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0538] The second sample point is a sample point of the second component within the first reconstructed region.

[0539] It should be understood that the method by which the encoder obtains the first prediction block based on the reconstructed block, the method by which the encoder obtains the second prediction block based on the first prediction block and the downsampling filter, and the specific content carried in the bitstream can be referred to the relevant content described above. To avoid repetition, they will not be repeated here.

[0540] This application also provides a decoding method, including:

[0541] Obtain the bitstream.

[0542] Based on the reconstructed block of the first component of the target image block determined from the bitstream, a first predicted block of the second component of the target image block is obtained;

[0543] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0544] The reconstructed block of the second component of the target image block is obtained based on the second prediction block;

[0545] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0546] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0547] The second sample point is a sample point of the second component within the first reconstructed region.

[0548] It should be understood that the method by which the decoding end obtains the first prediction block based on the reconstructed block, the method by which the decoding end obtains the second prediction block based on the first prediction block and the downsampling filter, and the specific content carried in the bitstream can be referred to the relevant content described above. To avoid repetition, they will not be repeated here.

[0549] The prediction device provided in this application embodiment can achieve... Figure 5 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.

[0550] like Figure 8 As shown, this application embodiment also provides an electronic device 600, including a processor 601 and a memory 602. The memory 602 stores a program or instructions that can run on the processor 601. For example, when the electronic device 600 is an encoding device, the program or instructions executed by the processor 601 implement the various steps of the prediction method embodiment described above, and achieve the same technical effect. When the electronic device 600 is a decoding device, the program or instructions executed by the processor 601 implement the various steps of the prediction method embodiment described above, and achieve the same technical effect. To avoid repetition, this will not be repeated here. Optionally, the memory 602 may be... Figure 1 The processor 601 can implement the memory 102 or memory 113 in the illustrated embodiment. Figure 1-3 The functions of the encoder 200 or decoder 300 in the illustrated embodiment.

[0551] This application also provides an electronic device, including: a memory configured to store video data; and a processing circuit configured to implement the steps of the prediction method embodiments described above. Optionally, the memory may be... Figure 1 The processing circuitry of memory 102 or memory 113 in the illustrated embodiment can implement... Figure 1-3 The functions of the encoder 200 or decoder 300 in the illustrated embodiment.

[0552] This application embodiment also provides an electronic device, including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement, for example... Figure 5 The steps in the method embodiment shown are illustrated. This device embodiment corresponds to the above method embodiment, and all implementation processes and methods of the above method embodiments can be applied to this terminal embodiment and achieve the same technical effect.

[0553] The processor or processing circuit in this application embodiment may include general-purpose processors, special-purpose processors, etc., such as central processing units (CPUs), microprocessors, digital signal processors (DSPs), artificial intelligence (AI) processors, graphics processing units (GPUs), application-specific integrated circuits (ASICs), network processors (NPs), field-programmable gate arrays (FPGAs), or other programmable logic devices, gate circuits, transistors, discrete hardware components, etc. The communication interface in this application embodiment may include transceivers, pins, circuits, buses, etc.

[0554] The aforementioned electronic devices can be terminals or other devices besides terminals, such as servers, network attached storage (NAS), etc.

[0555] Among them, the terminal can also be called user equipment (UE), which can be a mobile phone, tablet computer, laptop computer, notebook computer, personal digital assistant (PDA), handheld computer, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR), virtual reality (VR) device, mixed reality (MR) device, robot, wearable device, flight vehicle, vehicle user equipment (VUE), shipborne equipment, pedestrian user equipment (PUE), smart home (home devices with wireless communication functions, such as refrigerators, televisions, washing machines or furniture, etc.), game console, personal computer (PC), ATM or self-service machine, etc. Wearable devices include: smartwatches, smart bracelets, smart earphones, smart glasses, smart jewelry (smart bracelets, smart chains, smart rings, smart necklaces, smart anklets, smart anklets, etc.), smart wristbands, smart clothing, etc. Among these, in-vehicle devices can also be referred to as in-vehicle terminals, in-vehicle controllers, in-vehicle modules, in-vehicle components, in-vehicle chips, or in-vehicle units, etc. It should be noted that the embodiments in this application do not limit the specific type of terminal.

[0556] A server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server. A cloud server can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), or cloud computing services based on big data and artificial intelligence platforms.

[0557] For example, the aforementioned electronic devices may include, but are not limited to, those described above. Figure 1 The type of source device 100 or destination device 110 shown.

[0558] Taking electronic devices as terminals as an example, Figure 10A schematic diagram of the hardware structure of a terminal to implement an embodiment of this application.

[0559] The terminal 700 includes, but is not limited to, at least some of the following components: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, and processor 710.

[0560] Those skilled in the art will understand that the terminal 700 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 710 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The terminal structure shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0561] It should be understood that, in this embodiment, the input unit 704 may include a graphics processor 7041 and a microphone 7042. The graphics processor 7041 processes image data of still images or videos obtained by an image acquisition device (such as a camera) in video acquisition mode or image acquisition mode, or it may process the obtained point cloud data. The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.

[0562] In this embodiment, after receiving downlink data from the network-side device, the radio frequency unit 701 can transmit it to the processor 710 for processing; in addition, the radio frequency unit 701 can send uplink data to the network-side device. Typically, the radio frequency unit 701 includes, but is not limited to, antennas, amplifiers, transceivers, couplers, low-noise amplifiers, duplexers, etc.

[0563] The memory 709 can be used to store software programs or instructions, as well as various data. The memory 709 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 709 may include volatile memory or non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 709 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0564] Processor 710 may include one or more processing units; optionally, processor 710 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 710.

[0565] The processor 710 is used for:

[0566] Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained;

[0567] Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained;

[0568] The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point;

[0569] The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block.

[0570] The second sample point is a sample point of the second component within the first reconstructed region.

[0571] It is understood that the implementation process of each implementation method mentioned in this embodiment can refer to the relevant description of method embodiment 400 and achieve the same or corresponding technical effects. To avoid repetition, it will not be described again here.

[0572] In this embodiment of the application, the parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point; the first sample point is a sample point of a first component in a first reconstructed region adjacent to the target image block, or the first sample point is a sample point of a second component determined based on the sample points of the first component in a first reconstructed region adjacent to the target image block; the second sample point is a sample point of the second component in the first reconstructed region.

[0573] Compared with the scheme of obtaining the second prediction block based on the first prediction block and a fixed downsampling filter, the beneficial effects of this embodiment are analyzed as follows:

[0574] If the first sample point is a sample point of the first component within the first reconstructed region adjacent to the target image block, since the sample points of the first component within the first reconstructed region are easy to obtain, and the relationship between the sample points of the first component within the first reconstructed region and the second sample point can reflect the texture characteristics of the second component of the target image block to a certain extent, it can not only reduce the determination complexity of the parameters of the downsampling filter, thereby reducing the prediction complexity of the second prediction block, but also enable the downsampling filter to adapt to the texture characteristics of the target image block and downsample the first prediction block, thereby improving the downsampling performance of the downsampling filter and the prediction accuracy of the second prediction block.

[0575] If the first sample point is a sample point of the second component determined based on sample points of the first component in the first reconstructed region adjacent to the target image block, since the sample point of the second component determined based on sample points of the first component in the first reconstructed region adjacent to the target image block can reflect the texture characteristics of the second component of the target image block more accurately than the sample points of the first component in the first reconstructed region, the downsampling filter can adapt to the texture characteristics of the second component of the target image block as much as possible, downsample the first prediction block, and thus improve the downsampling performance of the downsampling filter as much as possible and improve the prediction accuracy of the second prediction block as much as possible.

[0576] It should be noted that in some implementations, the encoding or decoding end can directly obtain the second prediction block based on the reconstructed block of the first component of the target image block and the downsampling filter. That is, the encoding or decoding end does not need to obtain the first prediction block, but instead downsamples the reconstructed block based on the downsampling filter to obtain the second prediction block. The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point; the first sample point is a sample point of the first component within a first reconstructed region adjacent to the target image block, and the second sample point is a sample point of the second component within the first reconstructed region. Compared with this scheme, the beneficial effects of this embodiment are analyzed as follows:

[0577] If the first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, since the first prediction block can reflect the texture characteristics of the second component of the target image block more accurately than the reconstructed block, the prediction accuracy of the second prediction block can be improved by obtaining the second prediction block based on the first prediction block and the downsampling filter.

[0578] If the first sample point is a sample point of the second component determined based on sample points of the first component within a first reconstructed region adjacent to the target image patch, since the first prediction block can reflect the texture characteristics of the second component of the target image patch more accurately than the reconstructed block, obtaining the second prediction block based on the first prediction block and the downsampling filter can improve the prediction accuracy of the second prediction block. Furthermore, since the sample points of the second component determined by sample points of the first component within a first reconstructed region adjacent to the target image patch can reflect the texture characteristics of the second component of the target image patch more accurately than sample points of the first component within the first reconstructed region, the downsampling filter can adapt as much as possible to the texture characteristics of the second component of the target image patch when downsampling the first prediction block, thereby maximizing the downsampling performance of the downsampling filter and maximizing the prediction accuracy of the second prediction block.

[0579] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described prediction method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0580] The processor mentioned above is the processor in the terminal described in the above embodiments. The readable storage medium includes computer-readable storage media, such as ROM, RAM, magnetic disk, or optical disk. In some examples, the readable storage medium may be a non-transient readable storage medium.

[0581] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above prediction method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0582] It should be understood that the chips mentioned in the embodiments of this application may include system-on-a-chip (also known as system chip, chip system, or system-on-a-chip) or discrete display chips, etc.

[0583] This application also provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described prediction method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0584] This application also provides an encoding / decoding system, including an encoding end device and a decoding end device. The encoding end device can be used to perform the steps of the prediction method described above, and the decoding end device can be used to perform the steps of the prediction method described above.

[0585] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0586] From the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of computer software products plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.), and the computer software product includes several instructions to enable the encoding end or decoding end to execute the methods described in the various embodiments of this application.

[0587] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other implementations under the guidance of this application without departing from the spirit and scope of the claims. All of these implementations are within the protection scope of this application.

Claims

1. A prediction method, characterized in that, The method is executed by either the decoding end or the encoding end, and the method includes: Based on the reconstructed block of the first component of the target image block, the first predicted block of the second component of the target image block is obtained; Based on the first prediction block and the downsampling filter, a second prediction block of the second component of the target image block is obtained; The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point; The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block. The second sample point is a sample point of the second component within the first reconstructed region.

2. The method according to claim 1, characterized in that, The first sample point is a sample point of the second component determined based on sample points of the first component within the first reconstructed region adjacent to the target image patch, including: The first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region and the first mapping relationship, wherein the first mapping relationship is determined based on the sample values ​​of the sample points of the first component and the sample points of the second component in the adjacent second reconstructed regions of the target image block.

3. The method according to claim 2, characterized in that, The first mapping relationship is determined based on sample points of the second component at a first location within the second reconstructed region and one of the following: The sample value of the sample point of the first component at the associated position of the first position; The value is obtained by weighting the sample values ​​of the sample points of the first component at multiple associated locations of the first position.

4. The method according to claim 2 or 3, characterized in that, The second reconstructed region is the same as the first reconstructed region.

5. The method according to any one of claims 1 to 4, characterized in that, The first reconstructed area includes at least one of the following: The reconstructed area located above the target image block; The reconstructed region located on the upper left side of the target image block; The reconstructed region located on the upper right side of the target image block; The reconstructed region located to the left of the target image block; The reconstructed area located on the lower left side of the target image block.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: The first reconstructed region is determined based on the prediction pattern of the second component of the target image patch.

7. The method according to claim 6, characterized in that, The prediction pattern based on the second component of the target image patch determines the first reconstructed region, including at least one of the following: When the prediction mode of the second component of the target image block is Intra_Chroma_TSCPM or Intra_Chroma_TSCPM_LT (upper left side), the first reconstructed region is determined to include at least one of the following: a reconstructed region located on the upper side of the target image block, a reconstructed region located on the left side of the target image block, a reconstructed region located on the upper left side of the target image block, a reconstructed region located on the upper right side of the target image block, or a reconstructed region located on the lower left side of the target image block. When the prediction mode of the second component of the target image block is the upper side of the intra-chroma two-step cross-component prediction mode Intra_Chroma_TSCPM_T, the first reconstructed region is determined to include at least one of the following: the reconstructed region located on the upper side of the target image block, the reconstructed region located on the upper left side of the target image block, and the reconstructed region located on the upper right side of the target image block. When the prediction mode of the second component of the target image block is the Intra_Chroma_TSCPM_L two-step cross-component prediction mode on the left, the first reconstructed region is determined to include at least one of the following: a reconstructed region located on the left side of the target image block, a reconstructed region located on the upper left side of the target image block, or a reconstructed region located on the lower left side of the target image block.

8. The method according to any one of claims 1 to 5, characterized in that, The first reconstructed region is transmitted via a code stream, either through a protocol agreement or by means of information indicating the first reconstructed region.

9. The method according to any one of claims 1 to 8, characterized in that, The second prediction block, which obtains the second component of the target image block based on the first prediction block and the downsampling filter, includes: Based on the downsampling filter, the sample values ​​of multiple sample points in the first prediction block are downsampled to obtain the sample value of a fourth sample point in the second prediction block whose position is associated with the position of a third sample point among the multiple sample points; The parameters of the downsampling filter include at least one of the following: The weight of the sample value of each of the plurality of sample points; The weight of the difference between the sample value of each of the plurality of sample points and the first offset value; The weight of the square of the sample value of the third sample point; The weight of the value obtained by adding the first offset value to the square of the sample value of the third sample point; The weight of the value obtained after weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; The weight of the value obtained after weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; The weight of the sample value obtained after weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; The weight of the sample value obtained after weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; The weights of the values ​​obtained after weighting the sample values ​​of the multiple sample points; The weights of the squares of the sample values ​​obtained after weighted processing of the multiple sample points; The weight of the first bias, wherein the first bias is used to adjust at least one of the following: the value obtained after weighting the sample values ​​of the plurality of sample points, and the value obtained after weighting the plurality of differences corresponding to the plurality of sample points; wherein the plurality of differences include the difference between the sample value of each of the plurality of sample points and the first bias. The first offset value is determined based on the sample value of the at least one first sample point.

10. The method according to claim 9, characterized in that, The coordinates of the third sample point are (x, y); wherein, the coordinates of the sample points other than the third sample point among the plurality of sample points include: (x, y-1), (x, y+1), (x-1, y) and (x+1, y), or, the coordinates of the sample points other than the third sample point among the plurality of sample points include: (x-1, y), (x+1, y), (x-1, y+1), (x, y+1) and (x+1, y+1).

11. The method according to claim 9 or 10, characterized in that, The downsampling filter type includes any of the following: L″ = L′; L″=L′+α β ·b; L ′′ =L ′ +O2; L″=L′+O2+α β ·b; Wherein, L″ represents the sample value of the fourth sample point; O2 represents the second offset, which is determined based on the sample values ​​of the at least one second sample point; β represents the first bias, and α β L represents the weight of the first bias. ′ Includes any of the following: L′=w0·v0+w1·v1+w2·v2+w3·v3+w4·v4; L′=w0·v0+w1·v1+w2·2+w3·v3+w4·v4+w5·v0 2 ; Among them, L i This represents the sample value of the i-th sample point among the plurality of sample points; α i This represents the weight of the sample value of the i-th sample point among the plurality of sample points; k represents the difference between the number of the plurality of sample points and 1; O1 represents the first offset; L p This represents the sample value of the third sample point; α k The weight represents the square of the sample value of the third sample point; B represents the bit depth of the sample value of the third sample point; v0 represents the value obtained after weighting the sample values ​​of the multiple sample points; w0 represents the weight of v0; v1 represents the value obtained by weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; w1 represents the weight of v1. v2 represents the value obtained by weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; w2 represents the weight of v2; v3 represents the value obtained by weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; w3 represents the weight of v3. v4 represents the value obtained by weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; w4 represents the weight of v4. w5 indicates v0 2 The weight.

12. The method according to any one of claims 1 to 11, characterized in that, The type of the downsampling filter is determined by a protocol, or by information indicating the type of the downsampling filter being transmitted through the bitstream, or by the decoding end and the encoding end using the same sampling method.

13. The method according to any one of claims 1 to 12, characterized in that, The method for determining the parameters of the downsampling filter is agreed upon through a protocol or by transmitting first indication information through a code stream. Wherein, the first indication information is used to indicate that the parameters of the downsampling filter are preset parameters, or the first indication information is used to indicate that the parameters of the downsampling filter are determined based on the at least one first sample point and the at least one second sample point.

14. The method according to claim 13, characterized in that, The first indication information is associated with at least one of the following: parameter set, stripe, slice group, slice, codec tree unit (CTU) row, CTU, coding unit (CU), prediction unit (PU).

15. The method according to any one of claims 1 to 14, characterized in that, The size of the reconstructed block is equal to the size of the first predicted block.

16. The method according to any one of claims 1 to 15, characterized in that, The first prediction block of the second component of the target image block, obtained from the reconstructed block based on the first component of the target image block, includes: The first predicted block is obtained based on the reconstructed block of the first component and the second mapping relationship of the target image block; wherein, the second mapping relationship is determined according to the sample values ​​of the sample points of the first component and the sample points of the second component in the adjacent third reconstructed region of the target image block.

17. The method according to claim 16, characterized in that, The third reconstructed region is the same as the second reconstructed region adjacent to the target image block; or The second mapping relationship is the same as the first mapping relationship. The first mapping relationship is determined based on the sample values ​​of the first component and the sample values ​​of the second component of the sample points in the second reconstructed region adjacent to the target image block.

18. A prediction device, characterized in that, include: The first processing module is used to obtain a first prediction block of the second component of the target image block based on the reconstruction block of the first component of the target image block; The second processing module is used to obtain a second prediction block of the second component of the target image block based on the first prediction block and the downsampling filter; The parameters of the downsampling filter are determined based on at least one first sample point and at least one second sample point; The first sample point is a sample point of the first component in the first reconstructed region adjacent to the target image block, or the first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region adjacent to the target image block. The second sample point is a sample point of the second component within the first reconstructed region.

19. The apparatus according to claim 18, characterized in that, The first sample point is a sample point of the second component determined based on sample points of the first component within the first reconstructed region adjacent to the target image patch, including: The first sample point is a sample point of the second component determined based on the sample points of the first component in the first reconstructed region and the first mapping relationship, wherein the first mapping relationship is determined based on the sample values ​​of the sample points of the first component and the sample points of the second component in the adjacent second reconstructed regions of the target image block.

20. The apparatus according to claim 18 or 19, characterized in that, The first reconstructed area includes at least one of the following: The reconstructed area located above the target image block; The reconstructed region located on the upper left side of the target image block; The reconstructed region located on the upper right side of the target image block; The reconstructed region located to the left of the target image block; The reconstructed area located on the lower left side of the target image block.

21. The apparatus according to any one of claims 18 to 20, characterized in that, The second processing module is also used for: The first reconstructed region is determined based on the prediction pattern of the second component of the target image patch.

22. The apparatus according to any one of claims 18 to 21, characterized in that, The first reconstructed region is transmitted via a code stream, either through a protocol agreement or by means of information indicating the first reconstructed region.

23. The apparatus according to any one of claims 18 to 22, characterized in that, The second processing module is specifically used for: Based on the downsampling filter, the sample values ​​of multiple sample points in the first prediction block are downsampled to obtain the sample value of a fourth sample point in the second prediction block whose position is associated with the position of a third sample point among the multiple sample points; The parameters of the downsampling filter include at least one of the following: The weight of the sample value of each of the plurality of sample points; The weight of the difference between the sample value of each of the plurality of sample points and the first offset value; The weight of the square of the sample value of the third sample point; The weight of the value obtained by adding the first offset value to the square of the sample value of the third sample point; The weight of the value obtained after weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; The weight of the value obtained after weighting the sample value of the sample point located above the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; The weight of the sample value obtained after weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the left of the third sample point among the plurality of sample points; The weight of the sample value obtained after weighting the sample value of the sample point located below the third sample point among the plurality of sample points and the sample value of the sample point located to the right of the third sample point among the plurality of sample points; The weights of the values ​​obtained after weighting the sample values ​​of the multiple sample points; The weights of the squares of the sample values ​​obtained after weighted processing of the multiple sample points; The weight of the first bias, wherein the first bias is used to adjust at least one of the following: the value obtained after weighting the sample values ​​of the plurality of sample points, and the value obtained after weighting the plurality of differences corresponding to the plurality of sample points; wherein the plurality of differences include the difference between the sample value of each of the plurality of sample points and the first bias. The first offset value is determined based on the sample value of the at least one first sample point.

24. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the prediction method as described in any one of claims 1 to 17.

25. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the prediction method as described in any one of claims 1 to 17.

26. A readable storage medium, characterized in that, The readable storage medium stores a bitstream, which is obtained based on a second prediction block, which is obtained according to the steps of the prediction method as described in any one of claims 1 to 17.

27. A chip, characterized in that, The chip includes a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the prediction method as described in any one of claims 1 to 17.