Inter-frame prediction method and terminal
The inter-frame prediction method addresses inaccurate boundary pixel point corrections by applying distinct prediction modes to each image block, improving video encoding and decoding efficiency.
Patent Information
- Application Number
- JP2024560798
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-04-15
- Filing Date
- 2023-04-13
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2043-04-13
AI Technical Summary
The use of a single prediction value derivation mode for all image blocks in video encoding and decoding leads to inaccurate correction of boundary pixel points, reducing video encoding and decoding efficiency.
An inter-frame prediction method that determines unique prediction value derivation modes for each image block based on its specific motion information, using adjacent blocks' motion information to enhance accuracy and efficiency.
Improves the accuracy of prediction values for boundary pixel points, thereby enhancing the efficiency of video encoding and decoding processes.
Smart Images

Figure 0007813909000001 
Figure 0007813909000002 
Figure 0007813909000003
Abstract
Description
[Technical Field]
[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application claims priority from Chinese Patent Application No. 202210400128.1 filed in China on April 15, 2022, the entire contents of which are incorporated herein by reference.
[0002] The present application belongs to the technical field of video encoding and decoding, and specifically relates to an inter-frame prediction method and a terminal. [Background technology]
[0003] Currently, in the video encoding and decoding process, the predicted values of the boundary pixel points of the image blocks are corrected by performing inter-frame prediction using the same predicted value derivation mode for all image blocks in the image frame to be encoded or decoded.
[0004] However, since the motion information of boundary pixel points of different image blocks may differ, if the same prediction value derivation mode is used for all image blocks in an image frame, the predicted values of boundary pixel points after correction may not be accurate, and the video encoding / decoding efficiency may be further reduced. Summary of the Invention
[0005] The embodiments of the present application provide an inter-frame prediction method and a terminal that can solve the technical problem of reduced video encoding and decoding efficiency due to the inability to accurately correct predicted values of boundary pixel points.
[0006] In the first aspect, obtaining target information; and performing inter-frame prediction on each of the first image blocks; Here, the present invention provides an inter-frame prediction method, wherein the current image frame is an image frame to be coded and the first image block is an image block to be coded, or the current image frame is an image frame to be decoded and the first image block is an image block to be decoded.
[0007] In a second aspect, obtaining first motion information of a first image block and second motion information of a second image block adjacent to the first image block; determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information; determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value for each pixel point; The inter-frame prediction method is provided, wherein the first image block is an image block to be coded and the second image block is a coded image block, or the first image block is an image block to be decoded and the second image block is a decoded image block.
[0008] In a third aspect, an acquiring module for acquiring target information including a prediction value derivation mode corresponding to a target image frame and / or a prediction value derivation mode corresponding to each first image block in the target image frame; a processing module for performing inter-frame prediction on each of the first image blocks based on the target information; The present invention provides an inter-frame prediction device, wherein the current image frame is an image frame to be encoded and the first image block is an image block to be encoded, or the current image frame is an image frame to be decoded and the first image block is an image block to be decoded.
[0009] In a fourth aspect, an obtaining module for obtaining first motion information of a first image block and second motion information of a second image block adjacent to the first image block; a first determination module for determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; a second determination module for determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information; a third determination module for determining a target predicted value for each pixel point in a second pixel region of the first image block according to the predicted value of each pixel point; The present invention provides an inter-frame prediction device, wherein the first image block is an image block to be coded and the second image block is a coded image block, or the first image block is an image block to be decoded and the second image block is a decoded image block.
[0010] In a fifth aspect, there is provided a terminal including a processor and a memory, wherein a program or command executable by the processor is stored in the memory, and when the program or command is executed by the processor, steps of the method according to the first aspect are realized, or steps of the method according to the second aspect are realized.
[0011] In a sixth aspect, there is provided a readable storage medium having stored thereon a program or command that, when executed by a processor, causes the steps of the method according to the first aspect to be realized or the steps of the method according to the second aspect to be realized.
[0012] In a seventh aspect, there is provided a chip comprising a coupled processor and a communication interface, the processor being adapted to execute a program or command to implement the method of the first aspect or to implement steps of the method of the second aspect.
[0013] In an eighth aspect, there is provided a computer program / program product that is stored on a storage medium and that, when executed by at least one processor, performs the steps of the method according to the first aspect or performs the steps of the method according to the second aspect.
[0014] In an embodiment of the present application, target information including a prediction value derivation mode corresponding to a target image frame and / or a prediction value derivation mode corresponding to each first image block in the target image frame is obtained, and inter-frame prediction is performed for each first image block based on the target information, that is, for any first image block in one target image frame, inter-frame prediction is performed using the prediction value derivation mode corresponding to the first image block, thereby improving the accuracy of the prediction value obtained after inter-frame prediction of the image block and further improving the efficiency of video encoding and decoding. [Brief explanation of the drawings]
[0015] [Figure 1] 1 is a flowchart of one inter-frame prediction method provided in an embodiment of the present application. [Figure 2] FIG. 1 is a schematic diagram (part 1) of an application scenario of one inter-frame prediction method provided in an embodiment of the present application. [Figure 3] FIG. 2 is a schematic diagram (part 2) of an application scenario of one inter-frame prediction method provided in an embodiment of the present application. [Figure 4] FIG. 3 is a schematic diagram (part 3) of an application scenario of one inter-frame prediction method provided in an embodiment of the present application. [Figure 5] FIG. 4 is a schematic diagram (part 4) of an application scenario of one inter-frame prediction method provided in an embodiment of the present application. [Figure 6] FIG. 5 is a schematic diagram (part 5) of an application scenario of one inter-frame prediction method provided in an embodiment of the present application. [Figure 7] 1 is a schematic diagram (part 1) of an application scenario of a related inter-frame prediction method. [Figure 8] 1 is a schematic diagram (part 2) of an application scenario of a related inter-frame prediction method. [Figure 9] 1 is a flowchart of another inter-frame prediction method provided in an embodiment of the present application; [Figure 10]FIG. 1 is a schematic diagram (part 1) of an application scenario of another inter-frame prediction method provided in an embodiment of the present application. [Figure 11] FIG. 2 is a schematic diagram (part 2) of an application scenario of another inter-frame prediction method provided in an embodiment of the present application. [Figure 12] 1 is a structural diagram of an inter-frame prediction device provided in an embodiment of the present application; [Figure 13] FIG. 1 is a structural diagram of another inter-frame prediction device provided in an embodiment of the present application; [Figure 14] FIG. 1 is a structural diagram of a communication device provided in an embodiment of the present application; [Figure 15] FIG. 2 is a hardware structural schematic diagram of a terminal provided in an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION
[0016] Hereinafter, the technical solutions in the embodiments of the present application will be clearly explained with reference to the drawings in the embodiments of the present application, and it should be understood that the described embodiments are only a part of the embodiments of the present application, not all of the embodiments, and all other embodiments obtained by those skilled in the art based on the embodiments in the present application fall within the scope of protection of the present application.
[0017] The terms "first," "second," etc., used in the specification and claims of this application are not intended to describe a particular order or chronology, but rather to distinguish between similar objects. It should be understood that terms used in this manner may be interchanged where appropriate so that the embodiments of this application can be implemented in orders other than those illustrated or described herein. It should also be understood that the objects distinguished by "first" and "second" generally refer to one type and do not limit the number of objects; for example, the first object may be one or multiple. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the " / " symbol generally indicates that the related objects before and after are in an "or" relationship.
[0018] The attribute decoding devices corresponding to the inter-frame prediction method in the embodiments of the present application may be terminals, which may be called terminal equipment or user equipment (UE), and may be terminal-side devices such as mobile phones, tablet personal computers (TPCs), laptop computers (LCs), also called notebook computers, personal digital assistants (PDAs), personal digital assistants, netbooks, ultra-mobile personal computers (UMPCs), mobile internet devices (MIDs), augmented reality (AR) / virtual reality (VR) devices, robots, wearable devices or vehicle user equipment (VUEs), pedestrian user equipment (PUEs), smart homes (home devices with wireless communication functions such as refrigerators, televisions, washing machines, or furniture), game consoles, personal computers (PCs), automated teller machines, or kiosks. Wearable devices include smart watches, smart wristbands, smart earphones, smart glasses, smart jewelry (smart bangles, smart bracelets, smart rings, smart necklaces, smart anklet bangles, smart anklets, etc.), smart wrist straps, smart wear, etc. It should be noted that the embodiments of the present application are not limited to a specific type of terminal.
[0019] The embodiments of the present application provide an inter-frame prediction method. The following describes in detail the inter-frame prediction method provided in the embodiments of the present application according to several embodiments and their application scenarios with reference to the drawings.
[0020] 1, which is a flowchart of the inter-frame prediction method provided by the present application, the inter-frame prediction method provided in this embodiment includes the following steps S101 to S102.
[0021] In S101, target information is acquired.
[0022] The inter-frame prediction method provided in this embodiment can be applied to the encoding end or the decoding end, and in order to explain the technical solution in detail, the inter-frame prediction method will be described later as an example of applying it to the decoding end.
[0023] In this step, the decoding end obtains target information from the bitstream, the target information including a prediction value derivation mode corresponding to a target image frame and / or a prediction value derivation mode corresponding to each first image block in the target image frame, where the target image frame is an image frame to be coded and the first image block is an image block to be coded, or the target image frame is an image frame to be decoded and the first image block is an image block to be decoded. Optionally, a first enable flag corresponding to the target image frame may be set to indicate a prediction value derivation mode corresponding to the target image frame, and a second enable flag corresponding to the first image block may be set to indicate a prediction value derivation mode corresponding to the first image block.
[0024] At S102, inter-frame prediction is performed on each first image block based on the target information.
[0025] In this step, after obtaining the target information, a prediction value derivation mode corresponding to each first image block in the target image frame can be determined based on the target information.
[0026] In one alternative embodiment, the prediction value derivation mode corresponding to each first image block in the current image frame is determined based on a first enable flag corresponding to the current image frame, and in this case, the prediction value derivation mode corresponding to each first image block is the same.
[0027] In another optional embodiment, a prediction value derivation mode corresponding to each first image block is determined based on a first enable flag corresponding to the current image frame and a second enable flag corresponding to each first image block.
[0028] In another optional embodiment, the prediction value derivation mode corresponding to each first image block is determined based on a second enable flag corresponding to each first image block.
[0029] It is understood that for specific technical solutions for determining the prediction value derivation mode corresponding to each first image block in the target image frame based on the target information, please refer to the following embodiments.
[0030] In this step, after determining the prediction value derivation mode corresponding to each first image block, inter-frame prediction is performed for each first image block using the prediction value derivation mode corresponding to the first image block, thereby obtaining the target prediction value of the first image block.
[0031] In an embodiment of the present application, target information including a prediction value derivation mode corresponding to a target image frame and / or a prediction value derivation mode corresponding to each first image block in the target image frame is obtained, and inter-frame prediction is performed for each first image block based on the target information, that is, for any first image block in one target image frame, inter-frame prediction is performed using the prediction value derivation mode corresponding to the first image block, thereby improving the accuracy of the prediction value obtained after inter-frame prediction of the image block and further improving the efficiency of video encoding and decoding.
[0032] In the following, it will be specifically described how to perform inter-frame prediction for each first image block based on the target information when the target information includes a prediction value derivation mode corresponding to the target image frame.
[0033] Optionally, the step of performing inter-frame prediction for each of the first image blocks based on the target information includes: When the prediction value derivation mode corresponding to the target image frame is a first derivation mode, determining the prediction value derivation mode corresponding to each first image block in the target image frame as a first derivation mode, and performing inter-frame prediction on each first image block according to the first derivation mode; When the prediction value derivation mode corresponding to the target image frame is the second derivation mode, determining the inter-frame prediction value derivation mode of each first image block in the target image frame to be the second derivation mode, and performing inter-frame prediction on each of the first image blocks in the second derivation mode; and if the prediction value derivation mode corresponding to the target image frame is a third derivation mode, determining the inter-frame prediction value derivation mode of each first image block in the target image frame to be the third derivation mode, and performing inter-frame prediction on each first image block using the third derivation mode.
[0034] In this embodiment, the prediction value derivation mode corresponding to each first image block in the current image frame can be determined based only on the prediction value derivation mode corresponding to the current image frame, that is, the first enable flag.
[0035] In this embodiment, if the prediction value derivation mode corresponding to the target image frame is the first derivation mode, the prediction value derivation mode corresponding to each first image block is determined to be the first derivation mode; if the prediction value derivation mode corresponding to the target image frame is the second derivation mode, the prediction value derivation mode corresponding to each first image block is determined to be the second derivation mode; and if the prediction value derivation mode corresponding to the target image frame is the third derivation mode, the prediction value derivation mode corresponding to each first image block is determined to be the third derivation mode.
[0036] In this embodiment, after determining the prediction value derivation mode corresponding to each first image block, inter-frame prediction is performed on the first image block according to the determined prediction value derivation mode.
[0037] For example, when the first enable flag is 0, it represents the first derivation mode, when the first enable flag is 1, it represents the second derivation mode, and when the first enable flag is 2, it represents the third derivation mode. In such a case, when the first enable flag corresponding to the target image frame is 0, the prediction value derivation mode corresponding to each first image block is determined to be the first derivation mode, when the first enable flag corresponding to the target image frame is 1, the prediction value derivation mode corresponding to each first image block is determined to be the second derivation mode, and when the first enable flag corresponding to the target image frame is 2, the prediction value derivation mode corresponding to each first image block is determined to be the third derivation mode.
[0038] For example, the first enable flag is set to indicate the third derivation mode when it is 0, and to indicate the first derivation mode when it is 1. In such a case, when the first enable flag corresponding to the target image frame is 0, the prediction value derivation mode corresponding to each first image block is determined to be the third derivation mode, and when the first enable flag corresponding to the target image frame is 1, the prediction value derivation mode corresponding to each first image block is determined to be the first derivation mode.
[0039] Here, the first derivation mode is a prediction value derivation mode determined based on motion information corresponding to each first image block, position information corresponding to each first image block, and motion information corresponding to adjacent blocks of each first image block. Specifically, for a detailed definition of the first derivation mode, please refer to the subsequent examples.
[0040] Here, the second derivation mode is a prediction value derivation mode determined based on motion information corresponding to each first image block, a predetermined pixel region corresponding to each first image block, and motion information corresponding to neighboring blocks of each first image block. The second derivation mode differs from the first derivation mode in that the pixel region applied in the second derivation mode is a predetermined pixel region, while the pixel region applied in the first derivation mode is a pixel region determined based on position information corresponding to the first image block and motion information of neighboring blocks, and / or position information corresponding to the first image block and motion information of the first image block, and this will not be described in detail here.
[0041] Here, the third derivation mode is a prediction value derivation mode determined based on motion information corresponding to each first image block, and the motion information of neighboring blocks is not applied to the third derivation mode. The third derivation mode is a non-overlapped block motion compensation (OBMC) technology. For a specific definition of OBMC, please refer to the following examples.
[0042] It is understood that when an area containing sharp texture in an image, such as a text area in an image, is inter-frame predicted using OBMC, the texture may become blurred, further degrading image quality. Therefore, for a first image block located in an area containing sharp texture, the prediction value derivation mode corresponding to the first image block is determined to be the third derivation mode, i.e., the OBMC technique is not used for inter-frame prediction of the first image block, thereby avoiding the texture becoming blurred after inter-frame prediction and further improving image quality.
[0043] In the following, we will specifically explain how to perform inter-frame prediction for each first image block in a target image frame based on the target information when the target information includes a prediction value derivation mode corresponding to each first image block in the target image frame.
[0044] Optionally, the step of performing inter-frame prediction for each first image block in the current image frame based on the current information includes: When a prediction value derivation mode corresponding to any first image block is a first derivation mode, performing inter-frame prediction on the first image block in the first derivation mode; When a prediction value derivation mode corresponding to any first image block is a second derivation mode, performing inter-frame prediction on the first image block in the second derivation mode; and if a prediction value derivation mode corresponding to any of the first image blocks is a third derivation mode, performing inter-frame prediction on the first image block in the third derivation mode.
[0045] In this embodiment, the prediction value derivation mode corresponding to each first image block in the target image frame can be determined based only on the prediction value derivation mode corresponding to each first image block in the target image frame, i.e., the second enable flag.
[0046] In this embodiment, if the prediction value derivation mode corresponding to the first image block is the first derivation mode, the prediction value derivation mode corresponding to the first image block is determined to be the first derivation mode; if the prediction value derivation mode corresponding to the first image block is the second derivation mode, the prediction value derivation mode corresponding to the first image block is determined to be the second derivation mode; if the prediction value derivation mode corresponding to the first image block is the third derivation mode, the prediction value derivation mode corresponding to the first image block is determined to be the third derivation mode.
[0047] In this embodiment, after determining the prediction value derivation mode corresponding to each first image block, inter-frame prediction is performed on the first image block according to the determined prediction value derivation mode.
[0048] For example, when the second enable flag is 0, it represents the first derivation mode, when the second enable flag is 1, it represents the second derivation mode, and when the second enable flag is 2, it represents the third derivation mode. In such a case, when the second enable flag corresponding to a first image block is 0, the prediction value derivation mode corresponding to the first image block is determined to be the first derivation mode, when the second enable flag corresponding to the first image block is 1, the prediction value derivation mode corresponding to the first image block is determined to be the second derivation mode, and when the second enable flag corresponding to the first image block is 2, the prediction value derivation mode corresponding to the first image block is determined to be the third derivation mode.
[0049] For example, the second enable flag is set to indicate the third derivation mode when it is 0, and to indicate the first derivation mode when it is 1. In such a case, when the second enable flag corresponding to a first image block is set to 0, the prediction value derivation mode corresponding to the first image block is determined to be the third derivation mode, and when the second enable flag corresponding to the first image block is set to 1, the prediction value derivation mode corresponding to the first image block is determined to be the first derivation mode.
[0050] For example, the second enable flag is set to indicate the first derivation mode when it is 0, and to indicate the second derivation mode when it is 1. In such a case, when the second enable flag corresponding to a first image block is 0, the prediction value derivation mode corresponding to the first image block is determined to be the first derivation mode, and when the second enable flag corresponding to the first image block is 1, the prediction value derivation mode corresponding to the first image block is determined to be the third derivation mode.
[0051] In this embodiment, a prediction value derivation mode corresponding to each first image block is obtained, and inter-frame prediction is performed for each first image block based on the prediction value derivation mode corresponding to each first image block.This makes it possible to perform inter-frame prediction for all first image blocks included in one image block using multiple types of prediction value derivation modes, thereby making the method of performing inter-frame prediction for image blocks more flexible and improving the accuracy of the prediction values of the image blocks.
[0052] Optionally, the step of performing inter-frame prediction for each first image block in the current image frame based on the current information includes: When the prediction value derivation mode corresponding to the target image frame is a third derivation mode, performing inter-frame prediction on each of the first image blocks in the third derivation mode; and if the prediction value derivation mode corresponding to the target image frame is not the third derivation mode, performing inter-frame prediction on each of the first image blocks based on the prediction value derivation mode corresponding to each of the first image blocks in the target image frame.
[0053] In this embodiment, the prediction value derivation mode corresponding to each first image block can be determined based on the prediction value derivation mode corresponding to the target image frame and the prediction value derivation mode corresponding to each first image block in the target image frame, that is, the prediction value derivation mode corresponding to each first image block in the target image frame can be determined based on the first enable flag and the second enable flag.
[0054] In this embodiment, if the prediction value derivation mode corresponding to the target image frame is the third derivation mode, the prediction value derivation mode of each first image block in the target image frame is determined to be the third derivation mode; if the prediction value derivation mode corresponding to the target image frame is not the third derivation mode, the prediction value derivation mode corresponding to each first image block in the target image frame is obtained, and thereby the prediction value derivation mode corresponding to each first image block is determined.
[0055] In this embodiment, after determining the prediction value derivation mode corresponding to each first image block, inter-frame prediction is performed on the first image block according to the determined prediction value derivation mode.
[0056] For example, the first enable flag is set to 0 to indicate the third derivation mode, the first enable flag is set to 1 to indicate not the third derivation mode, the second enable flag is set to 0 to indicate the first derivation mode, the second enable flag is set to 1 to indicate the second derivation mode, and the third enable flag is set to 2 to indicate the third derivation mode. In such a case, when the first enable flag is set to 0, the prediction value derivation mode corresponding to each first image block in the target image frame is determined to be the third derivation mode, when the first enable flag is set to 1 and the second enable flag is set to 0, the prediction value derivation mode corresponding to each first image block is determined to be the first derivation mode, and when the first enable flag is set to 1 and the second enable flag is set to 1, the prediction value derivation mode corresponding to each first image block is determined to be the second derivation mode.
[0057] For example, when the first enable flag is 0, it represents the third derivation mode, when the first enable flag is 1, it represents not the third derivation mode, when the second enable flag is 0, it represents the third derivation mode, and when the second enable flag is 1, it represents the first derivation mode. In such a case, when the first enable flag is 0, the prediction value derivation mode corresponding to each first image block in the target image frame is determined to be the third derivation mode, when the first enable flag is 1 and the second enable flag is 0, the prediction value derivation mode corresponding to each first image block is determined to be the third derivation mode, and when the first enable flag is 1 and the second enable flag is 1, the prediction value derivation mode corresponding to each first image block is determined to be the first derivation mode.
[0058] In this embodiment, first, a prediction value derivation mode corresponding to the target image frame is determined. If the prediction value derivation mode corresponding to the target image frame is not the third derivation mode, a second enable flag corresponding to each first image block is further obtained, thereby reducing the bitstream in the inter-frame prediction process.
[0059] Optionally, when a prediction value derivation mode corresponding to each first image block in a target image frame is a first derivation mode, the step of performing inter-frame prediction on each first image block based on the target information includes: obtaining first motion information of a first image block and second motion information of a second image block; determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information; and determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value for each pixel point.
[0060] The first image block is an image block to be coded, and the second image block is an image block that has been coded and is adjacent to the first image block, or the first image block is an image block to be decoded, and the second image block is an image block that has been decoded and is adjacent to the first image block. The first image block and the second image block satisfy any one of the following conditions:
[0061] 1. The prediction direction of the first image block is different from the prediction direction of the second image block.
[0062] 2. The prediction direction of the first image block is the same as the prediction direction of the second image block, but the prediction directions point to different reference frames.
[0063] 3. The prediction direction of the first image block is the same as the prediction direction of the second image block, and the prediction directions point to the same reference frame, but the motion vector of the first image block is different from the motion vector of the second image block.
[0064] In this step, if the first image block and the second image block satisfy the above condition, the first motion information of the first image block and the second motion information of the second image block are obtained.
[0065] The motion information includes a prediction direction and a motion vector. In this step, based on the position of the first image block, prediction is performed using the motion vector and the prediction direction to obtain at least one first pixel region associated with the first image block. As shown in Figure 2, the first pixel region may be an upper rectangular region within the first image block, or as shown in Figure 3, the first pixel region may be a rectangular region adjacent to the top edge of the first image block, or as shown in Figure 4, the first pixel region may be a rectangular region adjacent to the left edge of the first image block, or the first pixel region may be a rectangular region at the left edge of the first image block.
[0066] In this step, after determining the first pixel region, a predicted value of each pixel point in the first pixel region is determined based on the first motion information and the second motion information. For specific technical solutions for determining the predicted value of each pixel point in the first pixel region, please refer to the following embodiments. It should be understood that each pixel point in the first pixel region includes at least two predicted values, one of which is determined based on the first motion information and the other of which is determined based on the second motion information.
[0067] The second pixel region is a part of a pixel region in the first image block, and each pixel point in the second pixel region is also called a boundary pixel point. For easy understanding, please refer to Figure 5, which shows the position of the second pixel region when the first pixel region is an upper rectangular region within the first image block or a rectangular region adjacent to the top edge of the first image block, and Figure 6, which shows the position of the second pixel region when the first pixel region is a rectangular region on the left edge within the first image block or a rectangular region adjacent to the left edge of the first image block.
[0068] In this step, after determining the predicted value of each pixel point in the first pixel region, the target predicted value of each pixel point in the second pixel region is determined based on the predicted value of each pixel point. For specific technical solutions, please refer to the subsequent examples.
[0069] In an embodiment of the present application, first motion information of a first image block and second motion information of a second image block are obtained, at least one first pixel region associated with the first image block is determined based on the position information of the first image block and the first motion information, a predicted value of each pixel point in the first pixel region is determined based on the first motion information and the second motion information, and a target predicted value of each pixel point in a second pixel region of the first image block is determined based on the predicted value of each pixel point. In an embodiment of the present application, by determining the predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information, the process of correcting the boundary pixel point predicted value fully takes into account the motion difference between the first image block and the second image block, thereby improving the accuracy of the corrected boundary pixel point predicted value and further improving the efficiency of video encoding and decoding.
[0070] Optionally, the step of determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information includes: determining, for any first pixel point in the first sub-pixel region, a reconstructed value of a first reference pixel point in a first reference frame corresponding to the first pixel point as a first predicted value of the first pixel point; determining a reconstructed value of a second reference pixel point in a second reference frame corresponding to the first pixel point as a second predicted value of the first pixel point.
[0071] In this embodiment, the first pixel region includes a first sub-pixel region, which is an upper rectangular region within the first image block, or a rectangular region on the left edge within the first image block, or a rectangular region adjacent to the top edge of the first image block, or a rectangular region adjacent to the left edge of the first image block, or a rectangular region consisting of pixel points adjacent to the top edge of the first image block and upper pixel points within the first image block, or a rectangular region consisting of pixel points adjacent to the left edge of the first image block and pixel points on the left edge within the first image block. In this embodiment, the pixel points included in the first sub-pixel region are called first sub-pixel points.
[0072] The motion information includes a prediction direction, reference frame information, and a motion vector. In this embodiment, a first reference pixel point, which is a reconstructed pixel point in the first reference frame and the first reference frame at the same position as the first sub-pixel region, is determined based on the first motion vector and the first reference frame information. Furthermore, based on the first reference pixel point, a reconstructed value of the pixel point in the first reference frame indicated by the first motion vector can be determined as a first predicted value in accordance with the first prediction direction.
[0073] Based on the second motion vector and the second reference frame information, a second reference pixel point is determined, which is a reconstructed pixel point in the second reference frame and the second reference frame at the same position as the first sub-pixel area, and further based on the second reference pixel point, the reconstructed value of the pixel point in the second reference frame indicated by the second motion vector can be determined as a second predicted value according to the second prediction direction.
[0074] Optionally, the step of determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value of each pixel point includes: calculating a first difference value between a first predicted value and a second predicted value corresponding to each first pixel point in the first sub-pixel region; When the first difference value is greater than a first predetermined threshold, determining a target predicted value of each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information; and if the first difference value is equal to or less than a first predetermined threshold, performing a weighted sum of the third predicted value and the fourth predicted value of each pixel point in the second pixel region based on a predetermined first weight value combination to obtain a target predicted value of each pixel point in the second pixel region.
[0075] In this embodiment, after obtaining the first predicted value and the second predicted value of each first pixel point, a first difference value between the first predicted value and the second predicted value is calculated. Optionally, the first difference value may be the absolute value of the difference between the first predicted value and the second predicted value, the average value between the first predicted value and the second predicted value, the variance between the first predicted value and the second predicted value, or the mean square deviation between the first predicted value and the second predicted value, but is not specifically limited here.
[0076] In this embodiment, each pixel point in the second pixel region includes a third predicted value and a fourth predicted value, where the third predicted value is determined based on the first motion information and the fourth predicted value is determined based on the second motion information. It should be understood that the method for determining the third predicted value is the same as the method for determining the first predicted value in the above embodiment, and the method for determining the fourth predicted value is the same as the method for determining the second predicted value in the above embodiment, and will not be repeated here.
[0077] In this embodiment, a first predetermined threshold is also preset. After obtaining the first difference value, the magnitude relationship between the first difference value and the first predetermined threshold is compared for each first pixel point. If the first difference value is greater than the first predetermined threshold, a target predicted value for each pixel point in the second pixel region is determined based on the position information of the pixel point and the first motion information of the pixel point. Specifically, the pixel point is set as a motion starting point, and the motion starting point is offset based on the first motion vector and the first prediction direction in the first motion information to determine a pixel point after the offset processing. Here, the pixel point after the offset processing is located in a first reference frame, and the reconstructed value of the pixel point after the offset processing is determined as the target predicted value of the pixel point. It should be understood that if the first pixel region is located within the first image block, the first predicted value of each first pixel point in the first pixel region is determined as the target predicted value of the pixel point corresponding to the first pixel point in the second pixel region.
[0078] If the first difference value is equal to or less than a first predetermined threshold, a target predicted value for each pixel point in the second pixel region is obtained by performing a weighted sum of the third predicted value and the fourth predicted value for each pixel point in the second pixel region using a first weight value combination. It should be understood that the first weight value combination includes at least one weight group including a first weight value and a second weight value, where the first weight value corresponds to the third predicted value and the second weight value corresponds to the fourth predicted value.
[0079] Specifically, the target predicted value of each pixel point in the second pixel region can be calculated by the following formula: shift=log2(w11+w12) offset=(w11+w12) / 2 Pixel(i,j)=(w11×Pixel3(i,j)+w12×Pixel4(i,j)+offset)≫shift In the formula, Pixel indicates the target predicted value, w11 indicates the first weight value, w12 indicates the second weight value, Pixel3 indicates the third predicted value, and Pixel4 indicates the fourth predicted value.
[0080] It should be understood that the first image block may be a luminance block or a chrominance block, and the corresponding first weight value combination when the first image block is a luminance block may be different from the corresponding first weight value combination when the first image block is a chrominance block.
[0081] Optionally, the step of determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information includes: determining, for any second pixel point in the second sub-pixel region, a reconstructed value of a third reference pixel point in a third reference frame corresponding to the second pixel point as a fifth predicted value of the second pixel point; determining a reconstruction value of a fourth reference pixel point in a fourth reference frame corresponding to the second pixel point as a sixth predicted value of the second pixel point; determining, for any third pixel point in the third sub-pixel region, a reconstructed value of a fifth reference pixel point in a fifth reference frame corresponding to the third pixel point as a seventh predicted value of the third pixel point; determining a reconstructed value of a sixth reference pixel point in a sixth reference frame corresponding to the third pixel point as an eighth predicted value of the third pixel point.
[0082] In this embodiment, the first pixel region includes a second sub-pixel region and a third sub-pixel region, the second sub-pixel region being an upper rectangular region within the first image block or a rectangular region on the left edge of the first image block, and the third sub-pixel region being a rectangular region adjacent to the upper edge of the first image block or a rectangular region adjacent to the left edge of the first image block. In this embodiment, a pixel point included in the second sub-pixel region is called a second pixel point, and a pixel point included in the third sub-pixel region is called a third pixel point.
[0083] As described above, the first motion information includes a first prediction direction, first reference frame information, and a first motion vector. In this embodiment, a third reference frame and a third reference pixel point are determined based on the first motion information. Furthermore, based on the third reference pixel point, a reconstructed value of the pixel point in the third reference frame indicated by the first motion vector can be determined as a fifth predicted value according to the first prediction direction. It can be understood that the specific technical solution for determining the fifth predicted value of the second pixel point in this embodiment is the same as the technical solution for determining the first predicted value of the first pixel point described above, and will not be repeated here.
[0084] As mentioned above, the second motion information includes a second prediction direction, second reference frame information, and a second motion vector. In this embodiment, a fourth reference frame and a fourth reference pixel point are determined based on the second motion information. Furthermore, based on the fourth reference pixel point, a reconstructed value of the pixel point in the fourth reference frame indicated by the second motion vector can be determined as a sixth predicted value according to the second prediction direction. It can be understood that the specific technical solution for determining the sixth predicted value of the second pixel point in this embodiment is the same as the technical solution for determining the second predicted value of the second pixel point described above, and will not be repeated here.
[0085] In this embodiment, the seventh predicted value of the third pixel point can be determined using the same technical solution as that used to determine the fifth predicted value of the second pixel point described above, and will not be described again here.
[0086] In this embodiment, the same technical solution as that for determining the sixth predicted value of the second pixel point described above can be used to determine the eighth predicted value of the third pixel point, and the description will not be repeated here.
[0087] Optionally, the step of determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value of each pixel point includes: determining a second difference value and a third difference value for each target pixel point based on the fifth predicted value, the sixth predicted value, the seventh predicted value, and the eighth predicted value; determining a target predicted value for each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information when the second difference value and the third difference value satisfy a predetermined condition; and if the second difference value and the third difference value do not satisfy a predetermined condition, performing a weighted sum of the ninth predicted value and the tenth predicted value of each pixel point in the second pixel region based on a predetermined second weight value combination to obtain a target predicted value of each pixel point in the second pixel region.
[0088] In this embodiment, after obtaining the fifth and sixth predicted values for each second pixel point and the seventh and eighth predicted values for each third pixel point, the second and third differential values of the target pixel point can be determined. If the target pixel points include the second and third pixel points, the second and third differential values of the second pixel point and the third differential values of the third pixel point can be determined. For specific technical solutions for determining the second and third differential values of the target pixel point, please refer to the subsequent embodiments.
[0089] It should be understood that each pixel point in the second pixel region includes a ninth predicted value and a tenth predicted value, of which the ninth predicted value is determined based on the first motion information, and the tenth predicted value is determined based on the second motion information. As can be understood, the method for determining the ninth predicted value is the same as the method for determining the first predicted value in the above embodiment, and the method for determining the tenth predicted value is the same as the method for determining the second predicted value in the above embodiment, and therefore will not be repeated here.
[0090] In this embodiment, a predetermined condition is preset, and when the second difference value and the third difference value meet the predetermined condition, it indicates that the motion pattern of the boundary pixel point in the first image block tends to match with the first image block, and in this case, for each pixel point in the second pixel region, the target predicted value of the pixel point is determined according to the position information of the pixel point and the first motion information. For specific embodiments, please refer to the above embodiments, and the description will not be repeated here.
[0091] If the second and third difference values do not satisfy the predetermined condition, the second weight value combination is used to weightedly sum the ninth and tenth predicted values for each pixel point in the second pixel region to obtain a target predicted value for each pixel point in the second pixel region. It should be understood that the second weight value combination includes at least one weight group including a third weight value and a fourth weight value, where the third weight value corresponds to the ninth predicted value and the fourth weight value corresponds to the tenth predicted value. Optionally, the second weight value combination may be the same as the first weight value combination.
[0092] The specific embodiment of the weighted sum processing is the same as the embodiment of weighted sum processing of the third predicted value and the fourth predicted value according to the first weight value combination described above, and will not be described again here.
[0093] Optionally, the step of determining a second difference value and a third difference value based on the fifth predicted value, the sixth predicted value, the seventh predicted value, and the eighth predicted value includes: determining a difference value between the fifth predicted value and the sixth predicted value as a second difference value, and determining a difference value between the seventh predicted value and the eighth predicted value as a third difference value, or The method includes determining a difference value between the fifth predicted value and the seventh predicted value as a second difference value, and determining a difference value between the sixth predicted value and the eighth predicted value as a third difference value.
[0094] In an alternative embodiment, the difference between the fifth predicted value and the sixth predicted value is determined as the second difference value, and the difference between the seventh predicted value and the eighth predicted value is determined as the third difference value.
[0095] In such an embodiment, the second difference value may be the absolute value of the difference between the fifth predicted value and the sixth predicted value, or the average value between the fifth predicted value and the sixth predicted value, or the variance between the fifth predicted value and the sixth predicted value, or the mean square deviation between the fifth predicted value and the sixth predicted value, and is not specifically limited here.
[0096] The third difference value may be the absolute value of the difference between the seventh predicted value and the eighth predicted value, or the average value of the seventh predicted value and the eighth predicted value, or the variance of the seventh predicted value and the eighth predicted value, or the mean square deviation of the seventh predicted value and the eighth predicted value, and is not specifically limited here.
[0097] In another optional embodiment, the difference between the fifth predicted value and the seventh predicted value is determined as the second difference value, and the difference between the sixth predicted value and the eighth predicted value is determined as the third difference value.
[0098] In such an embodiment, the second difference value may be the absolute value of the difference between the fifth predicted value and the seventh predicted value, or the average value between the fifth predicted value and the seventh predicted value, or the variance between the fifth predicted value and the seventh predicted value, or the mean square deviation between the fifth predicted value and the seventh predicted value, and is not specifically limited here.
[0099] The third difference value may be the absolute value of the difference between the sixth predicted value and the eighth predicted value, or the average value of the sixth predicted value and the eighth predicted value, or the variance of the sixth predicted value and the eighth predicted value, or the mean square deviation of the sixth predicted value and the eighth predicted value, and is not specifically limited here.
[0100] Optionally, the predetermined condition is: The second difference value is smaller than the third difference value; a ratio value between the second difference value and the third difference value is less than a second predetermined threshold value; a ratio value between the third difference value and the second difference value is less than a second predetermined threshold value; the second difference value is greater than a third predetermined threshold value, and the ratio value between the second difference value and the third difference value is less than the second predetermined threshold value; the second difference value is greater than a third predetermined threshold value, and the ratio between the third difference value and the second difference value is less than the second predetermined threshold value.
[0101] In one embodiment of this embodiment, the second difference value is first compared with a third predetermined threshold value, and if the second difference value is greater than the third predetermined threshold value, the ratio of the second difference value to the third difference value is further compared with the second predetermined threshold value, or the ratio of the third difference value to the second difference value is further compared with the second predetermined threshold value. By first comparing the second difference value with the third predetermined threshold value, the motion difference between the first image block and the second image block can be more fully taken into account in the process of correcting the boundary pixel point prediction value.
[0102] Optionally, the first pixel region comprises: The first pixel region is an encoded or decoded pixel region consisting of M1 rows and N1 columns of pixels adjacent to the top edge of the first image block; The first pixel region is an encoded or decoded pixel region consisting of M2 rows and N2 columns of pixels adjacent to the left edge of the first image block; The first pixel area is an uncoded or undecoded pixel area consisting of M3 rows and N3 columns of pixels located in the upper part of the first image block; The first pixel area is an uncoded or undecoded pixel area consisting of M4 rows and N4 columns of pixels located on the left edge of the first image block; The first pixel region is a pixel region of M5 rows and N5 columns, consisting of an encoded or decoded pixel region adjacent to the upper edge of the first image block and an unencoded or undecoded pixel region at the upper part inside the first image block; the first pixel region is a pixel region of M6 rows and N6 columns consisting of an encoded or decoded pixel region adjacent to the left edge of the first image block and an unencoded or undecoded pixel region on the left edge inside the first image block; Here, M1, M2, M3, M4, M5, M6, N1, N2, N3, N4, N5, and N6 are all positive integers.
[0103] In one alternative embodiment, the first pixel region is an uncoded or undecoded pixel region consisting of M3 rows and N3 columns in the upper part of the first image block. For easy understanding, refer to Figure 2, and in the scenario shown in Figure 2, the first pixel region is a rectangular region consisting of 1 row and 3 columns of pixels in the upper part of the first image block.
[0104] In another optional embodiment, the first pixel region is an encoded or decoded pixel region of M1 rows and N1 columns adjacent to the top edge of the first image block. For ease of understanding, refer to Figure 3, and in the scenario shown in Figure 3, the first pixel region is a rectangular region of 1 row and 3 columns of pixels adjacent to the top edge within the first image block.
[0105] In another alternative embodiment, the first pixel region is an encoded or decoded pixel region of M2 rows and N2 columns adjacent to the left edge of the first image block. For ease of understanding, refer to Figure 4, and in the scenario shown in Figure 4, the first pixel region is a rectangular region of 3 rows and 1 column adjacent to the left edge within the first image block.
[0106] As another optional embodiment, the first pixel region may be an encoded or decoded pixel region consisting of a portion of pixel points adjacent to the top edge of the first image block and an encoded or decoded pixel region consisting of a portion of pixel points adjacent to the left edge of the first image block, in which case the first pixel region has an "L" shape.
[0107] In this embodiment, by limiting the positional relationship between the first pixel region and the first image block, the difference in movement between the first image block and each image block adjacent to the first image block is fully taken into consideration, thereby improving the accuracy of the boundary pixel point prediction value after correction.
[0108] The embodiments of the present application further provide an inter-frame prediction method. Below, the inter-frame prediction method provided in the embodiments of the present application will be described in detail through several embodiments and their application scenarios with reference to the drawings. For easy understanding, only some of the contents related to the embodiments of the present application will be described below.
[0109] When an image block boundary does not fit the contour of a current image block, the motion pattern of the boundary pixel points of the current image block may match either the current image block or the adjacent image block. Since the predicted values of the boundary pixel points determined based on the motion information of the current image block are significantly different from the actual predicted values, the video encoding and decoding efficiency decreases. Here, the current image block may be a block to be encoded, and the adjacent image block may be a block that has already been encoded, or the current image block may be a block to be decoded, and the adjacent image block may be a block that has already been decoded.
[0110] Currently, the above technical problem can be solved by using OBMC technology to correct the predicted values of the boundary pixel points of the current image block, where OBMC technology is an inter-frame prediction method. The OBMC technology will be described in detail below.
[0111] In the first situation, the inter-frame prediction mode of each pixel point in the current block is the same.
[0112] In this situation, if the neighboring image block is in inter-frame prediction mode instead of intra block copy mode and the motion pattern of the neighboring image block does not match the motion pattern of the current image block, obtain the motion information of the neighboring image block. Here, referring to Figure 7, the neighboring image block may be the image block adjacent to the top edge of the current image block or the image block adjacent to the left edge of the current image block.
[0113] Here, if any one of the following conditions is met, it can be determined that the motion pattern of the adjacent image block does not match the motion pattern of the current image block.
[0114] 1. The prediction direction of the adjacent image block is different from the prediction direction of the current image block.
[0115] 2. The prediction direction of the adjacent image block is the same as that of the current image block, but the prediction directions point to different reference frames.
[0116] 3. The prediction direction of the neighboring image block is the same as that of the current image block, and the prediction direction points to the same reference frame, but the motion vector of the neighboring image block is different from that of the current image block.
[0117] After obtaining the motion information of the adjacent image block, a first predicted value is obtained based on the motion information of the current image block, and a second predicted value is obtained based on the motion information of the adjacent image block, and the predicted values of the boundary pixels of the current image block are corrected by the first predicted value and the second predicted value.
[0118] Specifically, if the current image block is a luminance sub-block, the first predicted value and the second predicted value are weighted and summed according to the following formula to obtain a predicted value after boundary pixel point correction: NewPixel(i,j)=(26×Pixel1(i,j)+6×Pixel2(i,j)+16)≫5 NewPixel(i,j)=(7×Pixel1(i,j)+Pixel2(i,j)+4)≫3 NewPixel(i,j)=(15×Pixel1(i,j)+Pixel2(i,j)+8)≫4 NewPixel(i,j)=(31×Pixel1(i,j)+Pixel2(i,j)+16)≫5 In the formula, i indicates the column coordinate of the boundary pixel point in the current image block, j indicates the row coordinate of the boundary pixel point in the current image block, Pixel1 indicates the first predicted value of the boundary pixel point, Pixel2 indicates the second predicted value of the boundary pixel point, and NewPixel indicates the predicted value after correction of the boundary pixel point.
[0119] If the current image block is a chrominance sub-block, the first predicted value and the second predicted value are weighted and summed according to the following formula to obtain a predicted value after boundary pixel point correction: NewPixel(i,j)=(26×Pixel1(i,j)+6×Pixel2(i,j)+16)≫5 In the formula, NewPixel indicates the predicted value after boundary pixel point correction.
[0120] In the application scenario corresponding to the above formula, the pixel area of the boundary pixel point is four rows or four columns, but it should be understood that in other application scenarios, the pixel area of the boundary pixel point is not specifically limited.
[0121] In the second situation, the current image block is a coded block and the inter-frame prediction mode is the affine mode, or the current image block is a decoded block and the inter-frame prediction mode is the motion vector compensation mode.
[0122] In this situation, the motion information of the four adjacent image blocks, namely, the top, bottom, left and right edges of the current image block, is obtained. Here, refer to FIG. 8, which shows the positional relationship between the adjacent image blocks and the current image block under the above situation.
[0123] A first predicted value is obtained based on the motion information of the current image block, and a second predicted value is obtained based on the motion information of the adjacent image block if the current image block and the adjacent image block satisfy any one of the following conditions:
[0124] 1. The prediction direction of the adjacent image block is different from the prediction direction of the current image block.
[0125] 2. The prediction direction of the adjacent image block is the same as that of the current image block, but the prediction directions point to different reference frames.
[0126] 3. The prediction direction of the adjacent image block is the same as that of the current image block, and the reference frame indicated by the prediction direction is the same, but the absolute value of the difference between the motion vector of the adjacent image block and the motion vector of the current image block is greater than a predetermined threshold.
[0127] The predicted values of the boundary pixels of the current image block are corrected by the first predicted value and the second predicted value. Specifically, the first predicted value and the second predicted value are weighted and summed according to the following formula to obtain the corrected predicted values of the boundary pixels: rem_w(i,j)=(32-w(i)-w(width-i)-w(j)-w(height-j)) subNewPixel(i,j)=(subPixel2 L (i,j)×w(i)+subPixel2 R (i,j)×w(width-1-i)+subPixel2 T (i,j)×w(j)+subPixel2 B (i,j)×w(height-1-j)+subPixel1×rem_w(i,j)+16)≫5 In the formula, i indicates the column coordinate of the boundary pixel point in the current image block, j indicates the row coordinate of the boundary pixel point in the current image block, subNewPixel indicates the predicted value of the boundary pixel point after correction, and subPixel2 L , subPixel2 R , subPixel2 T and subPixel2 B where ∇ denotes a second predicted value determined based on motion information of the neighboring image block, ∇ width denotes the number of columns of the neighboring image block, ∇ height denotes the number of rows of the neighboring image block, and ∇ w denotes a predetermined weight combination, where the corresponding weight combination when the current image block is a luma block is different from the corresponding weight combination when the current image block is a chroma block.
[0128] In the application scenario corresponding to the above formula, the pixel area of the boundary pixel point is four rows or four columns, but it should be understood that in other application scenarios, the pixel area of the boundary pixel point is not specifically limited.
[0129] In the process of correcting the boundary pixel point prediction value using the above-mentioned OBMC technology, the difference between the motion pattern of the current image block and the motion pattern of the adjacent image block is not taken into consideration. As a result, the corrected boundary pixel point prediction value is inaccurate, and the video encoding and decoding efficiency is further reduced.
[0130] In view of the above situation, how to improve the accuracy of the boundary pixel point prediction values after correction and further improve the video encoding / decoding efficiency has become a technical issue that needs to be resolved.
[0131] To solve the above-mentioned possible technical problems, an embodiment of the present application provides an inter-frame prediction method, and please refer to Figure 9, which is a flowchart of another inter-frame prediction method provided by the present application. The another inter-frame prediction method provided in this embodiment includes the following steps S901 to S904.
[0132] In S901, first motion information of a first image block and second motion information of a second image block are obtained.
[0133] At S902, at least one first pixel region associated with the first image block is determined based on the position information of the first image block and the first motion information.
[0134] In S903, a predicted value of each pixel point in the first pixel region is determined based on the first motion information and the second motion information.
[0135] In S904, a target predicted value of each pixel point in the second pixel region of the first image block is determined based on the predicted value of each pixel point.
[0136] It should be understood that in other embodiments, the inter-frame prediction method provided in the embodiments of the present application can also be used to generate predicted values of boundary pixel points of each sub-block within a coding block or a decoding block. In such an embodiment, referring to Figure 10, the sub-block shown in Figure 10 may be understood as the first image block in this embodiment, and this sub-block is located at the bottom right inside the coding block or the decoding block. Referring to Figure 11, the sub-block shown in Figure 11 may be understood as the first image block in this embodiment, and this sub-block is located at the center of the coding block or the decoding block.
[0137] In an embodiment of the present application, first motion information of a first image block and second motion information of a second image block are obtained, at least one first pixel region associated with the first image block is determined based on the position information of the first image block and the first motion information, a predicted value of each pixel point in the first pixel region is determined based on the first motion information and the second motion information, and a target predicted value of each pixel point in a second pixel region of the first image block is determined based on the predicted value of each pixel point. In an embodiment of the present application, by determining the predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information, the process of correcting the boundary pixel point predicted value fully takes into account the motion difference between the first image block and the second image block, thereby improving the accuracy of the corrected boundary pixel point predicted value and further improving the efficiency of video encoding and decoding.
[0138] Optionally, the first pixel region includes a first sub-pixel region, and the first sub-pixel region is a portion of a pixel region of the first image block, or a portion of a pixel region of the second image block, or a region consisting of a portion of a pixel region of the first image block and a portion of a pixel region of the second image block.
[0139] The step of determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information includes: determining, for any first pixel point in the first sub-pixel region, a reconstructed value of a first reference pixel point in a first reference frame corresponding to the first pixel point as a first predicted value of the first pixel point; determining a reconstructed value of a second reference pixel point in a second reference frame corresponding to the first pixel point as a second predicted value of the first pixel point; Here, the first reference frame is determined based on the first motion information, and the second reference frame is determined based on the second motion information.
[0140] Optionally, the step of determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value of each pixel point includes: calculating a first difference value between a first predicted value and a second predicted value corresponding to each first pixel point in the first sub-pixel region; When the first difference value is greater than a first predetermined threshold, determining a target predicted value of each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information; and when the first difference value is equal to or less than a first predetermined threshold, performing a weighted sum of the third predicted value and the fourth predicted value of each pixel point in the second pixel region based on a predetermined first weight value combination to obtain a target predicted value of each pixel point in the second pixel region; Here, the first weight value combination includes at least one weight group including a first weight value and a second weight value, the first weight value corresponds to the third predicted value, the second weight value corresponds to the fourth predicted value, the third predicted value is determined based on the first motion information, and the fourth predicted value is determined based on the second motion information.
[0141] Optionally, the first pixel region includes a second sub-pixel region and a third sub-pixel region, the second sub-pixel region being a part of the pixel region of the first image block, and the third sub-pixel region being a part of the pixel region of the second image block.
[0142] The step of determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information includes: determining, for any second pixel point in the second sub-pixel region, a reconstructed value of a third reference pixel point in a third reference frame corresponding to the second pixel point as a fifth predicted value of the second pixel point; determining a reconstruction value of a fourth reference pixel point in a fourth reference frame corresponding to the second pixel point as a sixth predicted value of the second pixel point; determining, for any third pixel point in the third sub-pixel region, a reconstructed value of a fifth reference pixel point in a fifth reference frame corresponding to the third pixel point as a seventh predicted value of the third pixel point; determining a reconstructed value of a sixth reference pixel point in a sixth reference frame corresponding to the third pixel point as an eighth predicted value of the third pixel point; Here, the third reference frame and the fifth reference frame are determined based on the first motion information, and the fourth reference frame and the sixth reference frame are determined based on the second motion information.
[0143] Optionally, the step of determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value of each pixel point includes: determining a second difference value and a third difference value for each target pixel point based on the fifth predicted value, the sixth predicted value, the seventh predicted value, and the eighth predicted value, wherein the target pixel points include a second pixel point and a third pixel point; determining a target predicted value for each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information when the second difference value and the third difference value satisfy a predetermined condition; and when the second difference value and the third difference value do not satisfy a predetermined condition, performing a weighted sum of the ninth predicted value and the tenth predicted value of each pixel point in the second pixel region based on a predetermined second weight value combination to obtain a target predicted value of each pixel point in the second pixel region; Here, the second weight value combination includes at least one weight group including a third weight value and a fourth weight value, the third weight value corresponds to the ninth predicted value, the fourth weight value corresponds to the tenth predicted value, the ninth predicted value is determined based on the first motion information, and the tenth predicted value is determined based on the second motion information.
[0144] Optionally, the step of determining a second difference value and a third difference value based on the fifth predicted value, the sixth predicted value, the seventh predicted value, and the eighth predicted value includes: determining a difference value between the fifth predicted value and the sixth predicted value as a second difference value, and determining a difference value between the seventh predicted value and the eighth predicted value as a third difference value, or The method includes determining a difference value between the fifth predicted value and the seventh predicted value as a second difference value, and determining a difference value between the sixth predicted value and the eighth predicted value as a third difference value.
[0145] In the inter-frame prediction method provided in the embodiments of the present application, the execution entity may be an inter-frame prediction device. In the embodiments of the present application, the inter-frame prediction device provided in the embodiments of the present application will be described by taking the execution of the inter-frame prediction method by the inter-frame prediction device as an example.
[0146] As shown in FIG. 12, an inter-frame prediction device 1200 an acquisition module 1201 for acquiring target information; and a processing module 1202 for performing inter-frame prediction on each first image block based on the target information.
[0147] Optionally, the processing module 1202 specifically: When the prediction value derivation mode corresponding to the target image frame is a first derivation mode, determining the prediction value derivation mode corresponding to each first image block in the target image frame as a first derivation mode, and performing inter-frame prediction on each first image block in the first derivation mode; When the prediction value derivation mode corresponding to the target image frame is a second derivation mode, determining an inter-frame prediction value derivation mode for each first image block in the target image frame to be the second derivation mode, and performing inter-frame prediction on each first image block in the second derivation mode; When the prediction value derivation mode corresponding to the target image frame is the third derivation mode, the inter-frame prediction value derivation mode of each first image block in the target image frame is determined to be the third derivation mode, and inter-frame prediction is performed on each first image block using the third derivation mode.
[0148] Optionally, the processing module 1202 specifically: When a prediction value derivation mode corresponding to any first image block is a first derivation mode, performing inter-frame prediction on the first image block in the first derivation mode; When a prediction value derivation mode corresponding to any one of the first image blocks is a second derivation mode, performing inter-frame prediction on the first image block in the second derivation mode; When the prediction value derivation mode corresponding to any one of the first image blocks is the third derivation mode, the third derivation mode is also used to perform inter-frame prediction on the first image block in the third derivation mode.
[0149] Optionally, the processing module 1202 specifically: When a prediction value derivation mode corresponding to the target image frame is a third derivation mode, performing inter-frame prediction on each of the first image blocks in the third derivation mode; If the prediction value derivation mode corresponding to the target image frame is not the third derivation mode, the prediction value derivation mode corresponding to each first image block in the target image frame is determined based on the prediction value derivation mode corresponding to each first image block in the target image frame, and inter-frame prediction is performed on each first image block.
[0150] Optionally, the processing module 1202 specifically: obtaining first motion information of a first image block and second motion information of a second image block; determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; determining a predicted value for each pixel point in the first pixel region based on the first motion information and the second motion information; and determining a target predicted value for each pixel point in the second pixel region of the first image block based on the predicted value for each pixel point.
[0151] Optionally, the processing module 1202 specifically: determining, for any first pixel point in the first sub-pixel region, a reconstructed value of a first reference pixel point in a first reference frame corresponding to the first pixel point as a first predicted value of the first pixel point; and determining a reconstructed value of a second reference pixel point in a second reference frame corresponding to the first pixel point as a second predicted value of the first pixel point.
[0152] Optionally, the processing module 1202 specifically: calculating a first difference value between a first predicted value and a second predicted value corresponding to each first pixel point in the first sub-pixel region; When the first difference value is greater than a first predetermined threshold, determining a target predicted value of each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information; If the first difference value is equal to or less than a first predetermined threshold, a weighted sum of the third predicted value and the fourth predicted value of each pixel point in the second pixel region is performed based on a predetermined first weight value combination to obtain a target predicted value of each pixel point in the second pixel region.
[0153] Optionally, the processing module 1202 specifically: determining, for any second pixel point in the second sub-pixel region, a reconstructed value of a third reference pixel point in a third reference frame corresponding to the second pixel point as a fifth predicted value of the second pixel point; determining a reconstruction value of a fourth reference pixel point in a fourth reference frame corresponding to the second pixel point as a sixth predicted value of the second pixel point; determining, for any third pixel point in the third sub-pixel region, a reconstructed value of a fifth reference pixel point in a fifth reference frame corresponding to the third pixel point as a seventh predicted value of the third pixel point; and determining a reconstructed value of a sixth reference pixel point in a sixth reference frame corresponding to the third pixel point as an eighth predicted value of the third pixel point.
[0154] Optionally, the processing module 1202 specifically: determining a second difference value and a third difference value for each target pixel point based on the fifth predicted value, the sixth predicted value, the seventh predicted value, and the eighth predicted value; When the second difference value and the third difference value satisfy a predetermined condition, determining a target predicted value of each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information; If the second difference value and the third difference value do not satisfy a predetermined condition, a weighted sum of the ninth predicted value and the tenth predicted value of each pixel point in the second pixel region is performed based on a predetermined second weight value combination to obtain a target predicted value of each pixel point in the second pixel region.
[0155] Optionally, the processing module 1202 specifically: determining a difference value between the fifth predicted value and the sixth predicted value as a second difference value, and determining a difference value between the seventh predicted value and the eighth predicted value as a third difference value, or The difference value between the fifth predicted value and the seventh predicted value is determined as a second difference value, and the difference value between the sixth predicted value and the eighth predicted value is also determined as a third difference value.
[0156] In an embodiment of the present application, target information including a prediction value derivation mode corresponding to a target image frame and / or a prediction value derivation mode corresponding to each first image block in the target image frame is obtained, and inter-frame prediction is performed for each first image block based on the target information, that is, for any first image block in one target image frame, inter-frame prediction is performed using the prediction value derivation mode corresponding to the first image block, thereby improving the accuracy of the prediction value obtained after inter-frame prediction of the image block and further improving the efficiency of video encoding and decoding.
[0157] The inter-frame prediction device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 1 and achieve the same technical effect, and detailed description will be omitted here to avoid duplication.
[0158] The embodiments of the present application further provide an inter-frame prediction method, which may be performed by an inter-frame prediction device. In the embodiments of the present application, the inter-frame prediction method is performed by an inter-frame prediction device as an example, and the inter-frame prediction device provided in the embodiments of the present application will be described.
[0159] As shown in FIG. 13, an inter-frame prediction device 1300 an obtaining module 1301 for obtaining first motion information of a first image block and second motion information of a second image block; a first determination module 1302 for determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; a second determination module 1303 for determining a predicted value of each pixel point in the first pixel region according to the first motion information and the second motion information; and a third determination module 1304 for determining a target predicted value for each pixel point in the second pixel region of the first image block based on the predicted value for each pixel point.
[0160] Optionally, the second determination module 1303 specifically determines: determining, for any first pixel point in the first sub-pixel region, a reconstructed value of a first reference pixel point in a first reference frame corresponding to the first pixel point as a first predicted value of the first pixel point; determining a reconstructed value of a second reference pixel point in a second reference frame corresponding to the first pixel point as a second predicted value of the first pixel point.
[0161] Optionally, the third determination module 1304 specifically determines: calculating a first difference value between a first predicted value and a second predicted value corresponding to each first pixel point in the first sub-pixel region; When the first difference value is greater than a first predetermined threshold, determining a target predicted value of each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information; If the first difference value is equal to or less than a first predetermined threshold, a weighted sum of the third predicted value and the fourth predicted value of each pixel point in the second pixel region is performed based on a predetermined first weight value combination to obtain a target predicted value of each pixel point in the second pixel region.
[0162] Optionally, the second determination module 1303 specifically determines: determining, for any second pixel point in the second sub-pixel region, a reconstructed value of a third reference pixel point in a third reference frame corresponding to the second pixel point as a fifth predicted value of the second pixel point; determining a reconstruction value of a fourth reference pixel point in a fourth reference frame corresponding to the second pixel point as a sixth predicted value of the second pixel point; determining, for any third pixel point in the third sub-pixel region, a reconstructed value of a fifth reference pixel point in a fifth reference frame corresponding to the third pixel point as a seventh predicted value of the third pixel point; and determining a reconstructed value of a sixth reference pixel point in a sixth reference frame corresponding to the third pixel point as an eighth predicted value of the third pixel point.
[0163] Optionally, the third determination module 1304 specifically determines: determining a second difference value and a third difference value for each target pixel point based on the fifth predicted value, the sixth predicted value, the seventh predicted value, and the eighth predicted value; When the second difference value and the third difference value satisfy a predetermined condition, determining a target predicted value of each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information; If the second difference value and the third difference value do not satisfy a predetermined condition, a weighted sum of the ninth predicted value and the tenth predicted value of each pixel point in the second pixel region is performed based on a predetermined second weight value combination to obtain a target predicted value of each pixel point in the second pixel region.
[0164] Optionally, the third determination module 1304 specifically determines: determining a difference value between the fifth predicted value and the sixth predicted value as a second difference value, and determining a difference value between the seventh predicted value and the eighth predicted value as a third difference value, or The difference value between the fifth predicted value and the seventh predicted value is determined as a second difference value, and the difference value between the sixth predicted value and the eighth predicted value is also determined as a third difference value.
[0165] In an embodiment of the present application, first motion information of a first image block and second motion information of a second image block are obtained, at least one first pixel region associated with the first image block is determined based on the position information of the first image block and the first motion information, a predicted value of each pixel point in the first pixel region is determined based on the first motion information and the second motion information, and a target predicted value of each pixel point in a second pixel region of the first image block is determined based on the predicted value of each pixel point. In an embodiment of the present application, by determining the predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information, the process of correcting the boundary pixel point predicted value fully takes into account the motion difference between the first image block and the second image block, thereby improving the accuracy of the corrected boundary pixel point predicted value and further improving the efficiency of video encoding and decoding.
[0166] The inter-frame prediction device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 7 and achieve the same technical effect. To avoid duplication, detailed description will be omitted here.
[0167] The inter-frame prediction device in the embodiments of the present application may be an electronic device, for example, an electronic device with an operating system, or a component of an electronic device, for example, an integrated circuit or a chip. The electronic device may be a terminal or other device other than a terminal. Exemplarily, the terminal may include, but is not limited to, the types of terminals listed above, and the other device may be a server, a network-attached storage (NAS), etc. In the embodiments of the present application, there is no specific limitation.
[0168] Optionally, as shown in Fig. 14, an embodiment of the present application further provides a communication device 1400. The communication device 1400 includes a processor 1401 and a memory 1402, and the memory 1402 stores programs or commands executable by the processor 1401. For example, when the communication device 1400 is a terminal, when the programs or commands are executed by the processor 1401, each step of the embodiment of the inter-frame prediction method described above is realized, and the same technical effect can be achieved.
[0169] An embodiment of the present application further provides a terminal, the terminal including a processor and a communication interface, the processor: An operation to obtain target information; and performing an inter-frame prediction operation on each first image block based on the target information.
[0170] Alternatively, the processor may: obtaining first motion information of a first image block and second motion information of a second image block; determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information; and determining a target predicted value for each pixel point in the second pixel region of the first image block based on the predicted value for each pixel point.
[0171] The terminal embodiment corresponds to the method embodiment on the terminal side, and the implementation processes and realization modes of the method embodiments can be applied to the terminal embodiment, and the same technical effects can be achieved. Specifically, Figure 15 is a schematic diagram of the hardware structure of the terminal implementing the embodiment of this application.
[0172] The terminal 1500 includes components such as, but not limited to, a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, and a processor 1510.
[0173] As will be understood by those skilled in the art, the terminal 1500 may further include a power source (e.g., a battery) for powering each component, and the power source may be logically connected to the processor 1510 via a power management system, which may further realize functions such as charge / discharge management and power consumption management. The structure of the terminal shown in FIG. 15 is not intended to limit the terminal, and the terminal may include more or fewer components than those shown, or a combination of some components, or a different component arrangement. Detailed description thereof will be omitted here.
[0174] It should be understood that in the embodiment of the present application, the input unit 1504 may include a graphics processing unit (GPU) 15041 for processing image data of static or video images acquired by an image acquisition device (e.g., a camera) in a video acquisition mode or an image acquisition mode, and a microphone 15042. The display unit 1506 may include a display panel 15061, which may be arranged in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1507 includes at least one of a touch panel 15071 and other input devices 15072. The touch panel 15071 is also called a touch screen. The touch panel 15071 may include two parts: a touch detection device and a touch controller. The other input devices 15072 may include, but are not limited to, a physical keyboard, function buttons (e.g., volume control buttons, switch buttons, etc.), a trackball, a mouse, and a control lever, and detailed descriptions thereof will be omitted here.
[0175] In the embodiment of the present application, the radio frequency unit 1501 can receive downlink data from the network side device and then transmit the data to the processor 1510 for processing. The radio frequency unit 1501 can transmit uplink data to the network side device. Typically, the radio frequency unit 1501 includes, but is not limited to, an antenna, an amplifier, a receiver / transmitter, a coupler, a low-noise amplifier, a duplexer, etc.
[0176] The memory 1509 can be used to store software programs or commands and various data. The memory 1509 may mainly include a first storage area for storing programs or commands, which can store an operating system, applications or commands required for at least one function (e.g., audio playback function, image playback function, etc.), and a second storage area for storing data. The memory 1509 may include volatile memory or nonvolatile memory, or may include both volatile memory and nonvolatile memory. Among them, the nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), 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), synch link dynamic random access memory (SLDRAM), and direct Rambus random access memory (DRRAM). Memory 1509 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
[0177] The processor 1510 may include one or more processing units, and may optionally integrate an application processor that mainly processes operations related to an operating system, a user interface, applications, etc., and a modem processor that mainly processes wireless communication signals, such as a baseband processor, in the processor 1510. It is understood that the modem processor need not be integrated into the processor 1510.
[0178] The processor 1510 An operation to obtain target information; and performing an inter-frame prediction operation on each first image block based on the target information.
[0179] Alternatively, the processor 1510 may: obtaining first motion information of a first image block and second motion information of a second image block; determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information; and determining a target predicted value for each pixel point in the second pixel region of the first image block based on the predicted value for each pixel point.
[0180] The embodiments of the present application further provide a readable storage medium, which stores a program or command, and when the program or command is executed by a processor, the processes of the above-mentioned inter-frame prediction method embodiment are realized and the same technical effects can be achieved. To avoid repetition, detailed descriptions are omitted here.
[0181] Wherein, the processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a computer read only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0182] The embodiments of the present application further provide a chip, which includes a processor and a communication interface coupled thereto, and the processor is used to execute programs or commands to realize the processes of the embodiments of the inter-frame prediction method, and can achieve the same technical effects. To avoid repetition, detailed descriptions are omitted here.
[0183] It should be understood that the chips referred to in the embodiments of this application may also be referred to as system level chips, system chips, chip systems, or system-on-chips, etc.
[0184] The embodiments of the present application further provide a computer program / program product, which is stored in a storage medium and can be executed by at least one processor to implement the processes of the above-mentioned inter-frame prediction method embodiments and achieve the same technical effects. To avoid repetition, detailed descriptions are omitted here.
[0185] It should be noted that, as used herein, the terms "comprise," "consist," or any other variation thereof, are intended to include a non-exclusive inclusion, whereby a process, method, article, or apparatus comprising a set of elements includes not only those elements but also other elements not expressly specified or inherent in such process, method, article, or apparatus. Unless otherwise specified, elements qualified by the phrase "comprise..." do not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element. It should also 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 include performing functions substantially simultaneously or in the reverse order, depending on such functionality. For example, the described method may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with reference to one example may be combined in other examples.
[0186] From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be realized in the form of a combination of software and a necessary common hardware platform, and of course, they can also be realized by hardware, but in many cases the former is a more preferred embodiment. Based on this view, the technical solutions of the present application can be substantially embodied in the form of a computer software product, which is stored in a storage medium (e.g., ROM / RAM, magnetic disk, optical disk) and includes a plurality of commands that cause a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0187] Although the examples of the present application have been described above with reference to the drawings, the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative and not limiting. Based on the suggestions of the present application, many forms that a person skilled in the art can make without departing from the spirit of the present application and the scope of protection of the claims are all within the scope of protection of the present application.
Claims
1. obtaining target information including a prediction value derivation mode corresponding to a target image frame and / or a prediction value derivation mode corresponding to each first image block in the target image frame; performing inter-frame prediction on each of the first image blocks based on the target information; the current image frame is an image frame to be encoded and the first image block is an image block to be encoded, or the current image frame is an image frame to be decoded and the first image block is an image block to be decoded; the target information includes a prediction value derivation mode corresponding to a target image frame and a prediction value derivation mode corresponding to each first image block in the target image frame; The step of performing inter-frame prediction on each first image block in the target image frame based on the target information includes: When a prediction value derivation mode corresponding to the target image frame is a third derivation mode, performing inter-frame prediction on each of the first image blocks using the third derivation mode, the third derivation mode being a prediction value derivation mode determined based on motion information corresponding to each of the first image blocks; and if the prediction value derivation mode corresponding to the target image frame is not the third derivation mode, performing inter-frame prediction on each of the first image blocks based on the prediction value derivation mode corresponding to each of the first image blocks in the target image frame.
2. When the first derivation mode is a prediction value derivation mode determined based on motion information corresponding to each first image block, position information corresponding to each of the first image blocks, and motion information corresponding to adjacent blocks of each of the first image blocks, and the prediction value derivation mode corresponding to the target image frame is not the third derivation mode, and the prediction value derivation mode corresponding to each of the first image blocks in the target image frame is the first derivation mode, the step of performing inter-frame prediction for each of the first image blocks based on the prediction value derivation mode corresponding to each of the first image blocks in the target image frame comprises: obtaining first motion information of a first image block and second motion information of a second image block adjacent to the first image block; determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; determining a predicted value for each pixel point in the first pixel region based on the first motion information and the second motion information; determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value for each pixel point; 2. The method of claim 1, wherein the first image block is an image block to be coded and the second image block is a coded image block, or the first image block is an image block to be decoded and the second image block is a decoded image block.
3. the first pixel region includes a first sub-pixel region, and the first sub-pixel region is a part of a pixel region of the first image block, or a part of a pixel region of the second image block, or a region consisting of a part of a pixel region of the first image block and a part of a pixel region of the second image block; The step of determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information includes: determining, for any first pixel point in the first sub-pixel region, a reconstructed value of a first reference pixel point in a first reference frame corresponding to the first pixel point as a first predicted value of the first pixel point; determining a reconstructed value of a second reference pixel point in a second reference frame corresponding to the first pixel point as a second predicted value of the first pixel point; The method of claim 2 , wherein the first reference frame is determined based on the first motion information and the second reference frame is determined based on the second motion information.
4. The step of determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value of each pixel point includes: calculating a first difference value between a first predicted value and a second predicted value corresponding to each first pixel point in the first sub-pixel region; determining a target predicted value for each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information when the first difference value is greater than a first predetermined threshold; and when the first difference value is equal to or less than a first predetermined threshold, performing a weighted sum of the third predicted value and the fourth predicted value for each pixel point in the second pixel region based on a predetermined first weight value combination to obtain a target predicted value for each pixel point in the second pixel region; 4. The method of claim 3, wherein the first weight value combination includes at least one weight group including a first weight value and a second weight value, the first weight value corresponding to the third predicted value, the second weight value corresponding to the fourth predicted value, the third predicted value determined based on the first motion information, and the fourth predicted value determined based on the second motion information.
5. the first pixel region includes a second sub-pixel region and a third sub-pixel region, the second sub-pixel region is a part of a pixel region of the first image block, and the third sub-pixel region is a part of a pixel region of the second image block; The step of determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information includes: determining, for any second pixel point in the second sub-pixel region, a reconstructed value of a third reference pixel point in a third reference frame corresponding to the second pixel point as a fifth predicted value of the second pixel point; determining a reconstructed value of a fourth reference pixel point in a fourth reference frame corresponding to the second pixel point as a sixth predicted value of the second pixel point; determining, for any third pixel point in the third sub-pixel region, a reconstructed value of a fifth reference pixel point in a fifth reference frame corresponding to the third pixel point as a seventh predicted value of the third pixel point; determining a reconstructed value of a sixth reference pixel point in a sixth reference frame corresponding to the third pixel point as an eighth predicted value of the third pixel point; 3. The method of claim 2, wherein the third reference frame and the fifth reference frame are determined based on the first motion information, and the fourth reference frame and the sixth reference frame are determined based on the second motion information.
6. The first pixel region is the first pixel region is an encoded or decoded pixel region consisting of M1 rows and N1 columns of pixels adjacent to the top edge of the first image block; the first pixel region is an encoded or decoded pixel region consisting of M2 rows and N2 columns of pixels adjacent to the left edge of the first image block; the first pixel region is an uncoded or undecoded pixel region consisting of M3 rows and N3 columns of pixels located in the upper part of the first image block; The first pixel region is an uncoded or undecoded pixel region consisting of M4 rows and N4 columns of pixels located on the left edge of the first image block; The first pixel region is a pixel region of M5 rows and N5 columns, which is composed of an encoded or decoded pixel region adjacent to the upper edge of the first image block and an unencoded or undecoded pixel region at the upper part inside the first image block; the first pixel region is a pixel region of M6 rows and N6 columns, consisting of an encoded or decoded pixel region adjacent to the left edge of the first image block and an unencoded or undecoded pixel region on the left edge inside the first image block; 3. The method of claim 2, wherein M1, M2, M3, M4, M5, M6, N1, N2, N3, N4, N5, and N6 are all positive integers.
7. obtaining first motion information of a first image block and second motion information of a second image block adjacent to the first image block; determining at least one first pixel region associated with the first image block based on position information of the first image block and the first motion information; determining a predicted value for each pixel point in the first pixel region based on the first motion information and the second motion information; determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value for each pixel point; An inter-frame prediction method, wherein the first image block is an image block to be coded and the second image block is a coded image block, or the first image block is an image block to be decoded and the second image block is a decoded image block.
8. the first pixel region includes a first sub-pixel region, and the first sub-pixel region is a part of a pixel region of the first image block, or a part of a pixel region of the second image block, or a region consisting of a part of a pixel region of the first image block and a part of a pixel region of the second image block; The step of determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information includes: determining, for any first pixel point in the first sub-pixel region, a reconstructed value of a first reference pixel point in a first reference frame corresponding to the first pixel point as a first predicted value of the first pixel point; determining a reconstructed value of a second reference pixel point in a second reference frame corresponding to the first pixel point as a second predicted value of the first pixel point; The method of claim 7 , wherein the first reference frame is determined based on the first motion information and the second reference frame is determined based on the second motion information.
9. The step of determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value of each pixel point includes: calculating a first difference value between a first predicted value and a second predicted value corresponding to each first pixel point in the first sub-pixel region; determining a target predicted value for each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information when the first difference value is greater than a first predetermined threshold; and when the first difference value is equal to or less than a first predetermined threshold, performing a weighted sum of the third predicted value and the fourth predicted value for each pixel point in the second pixel region based on a predetermined first weight value combination to obtain a target predicted value for each pixel point in the second pixel region; 9. The method of claim 8, wherein the first weight value combination includes at least one weight group including a first weight value and a second weight value, the first weight value corresponding to the third predicted value, the second weight value corresponding to the fourth predicted value, the third predicted value determined based on the first motion information, and the fourth predicted value determined based on the second motion information.
10. the first pixel region includes a second sub-pixel region and a third sub-pixel region, the second sub-pixel region is a part of a pixel region of the first image block, and the third sub-pixel region is a part of a pixel region of the second image block; The step of determining a predicted value of each pixel point in the first pixel region based on the first motion information and the second motion information includes: determining, for any second pixel point in the second sub-pixel region, a reconstructed value of a third reference pixel point in a third reference frame corresponding to the second pixel point as a fifth predicted value of the second pixel point; determining a reconstructed value of a fourth reference pixel point in a fourth reference frame corresponding to the second pixel point as a sixth predicted value of the second pixel point; determining, for any third pixel point in the third sub-pixel region, a reconstructed value of a fifth reference pixel point in a fifth reference frame corresponding to the third pixel point as a seventh predicted value of the third pixel point; determining a reconstructed value of a sixth reference pixel point in a sixth reference frame corresponding to the third pixel point as an eighth predicted value of the third pixel point; 8. The method of claim 7, wherein the third reference frame and the fifth reference frame are determined based on the first motion information, and the fourth reference frame and the sixth reference frame are determined based on the second motion information.
11. The step of determining a target predicted value for each pixel point in a second pixel region of the first image block based on the predicted value of each pixel point includes: determining a second difference value and a third difference value for each target pixel point based on the fifth predicted value, the sixth predicted value, the seventh predicted value, and the eighth predicted value, wherein the target pixel points include a second pixel point and a third pixel point; determining a target predicted value for each pixel point in the second pixel region based on position information of each pixel point in the second pixel region and the first motion information when the second difference value and the third difference value satisfy a predetermined condition; and if the second difference value and the third difference value do not satisfy a predetermined condition, performing a weighted sum of the ninth predicted value and the tenth predicted value of each pixel point in the second pixel region based on a predetermined second weight value combination to obtain a target predicted value for each pixel point in the second pixel region; 11. The method of claim 10, wherein the second weight value combination includes at least one weight group including a third weight value and a fourth weight value, the third weight value corresponding to the ninth predicted value, the fourth weight value corresponding to the tenth predicted value, the ninth predicted value being determined based on the first motion information, and the tenth predicted value being determined based on the second motion information.
12. The first pixel region is the first pixel region is an encoded or decoded pixel region consisting of M1 rows and N1 columns of pixels adjacent to the top edge of the first image block; the first pixel region is an encoded or decoded pixel region consisting of M2 rows and N2 columns of pixels adjacent to the left edge of the first image block; the first pixel region is an uncoded or undecoded pixel region consisting of M3 rows and N3 columns of pixels located in the upper part of the first image block; The first pixel region is an uncoded or undecoded pixel region consisting of M4 rows and N4 columns of pixels located on the left edge of the first image block; The first pixel region is a pixel region of M5 rows and N5 columns, which is composed of an encoded or decoded pixel region adjacent to the upper edge of the first image block and an unencoded or undecoded pixel region at the upper part inside the first image block; the first pixel region is a pixel region of M6 rows and N6 columns consisting of an encoded or decoded pixel region adjacent to the left edge of the first image block and an unencoded or undecoded pixel region on the left edge inside the first image block; 8. The method of claim 7, wherein M1, M2, M3, M4, M5, M6, N1, N2, N3, N4, N5, and N6 are all positive integers.
13. A terminal including a processor and a memory, wherein a program or command executable by the processor is stored in the memory, and when the program or command is executed by the processor, steps of the inter-frame prediction method according to any one of claims 1 to 6 are realized, or steps of the inter-frame prediction method according to any one of claims 7 to 12 are realized.
14. A readable storage medium storing a program or command that, when executed by a processor, causes the steps of the inter-frame prediction method of any one of claims 1 to 6 to be realized, or the steps of the inter-frame prediction method of any one of claims 7 to 12 to be realized.
Citation Information
Patent Citations
Inter frame prediction method and device and codec for video images
EP3672249A1
Adaptive overlapped block motion compensation
JP2016184936A
Coding device, decoding device, coding method, and decoding method
JP2022017201A
Image decoding device, image decoding method, and program
JP2022162484A
Image coding method and image decoding method
US20160323577A1