Inter-frame prediction method and terminal
The inter-frame prediction method addresses inaccurate boundary pixel point predictions in video encoding and decoding by determining predicted values based on motion information and difference values, improving efficiency by considering motion differences between adjacent blocks.
Patent Information
- Application Number
- JP2024535913
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-03-10
- Filing Date
- 2022-12-13
- Publication Date
- 2026-01-14
- Estimated Expiration
- 2042-12-13
AI Technical Summary
Inaccurate correction of boundary pixel point prediction values in video encoding and decoding processes using overlapped block motion compensation (OBMC) reduces the efficiency of video encoding and decoding.
An inter-frame prediction method that determines first and second predicted values based on motion information of adjacent image blocks, and uses target information including difference values to correct boundary pixel point predictions, considering the motion difference between image blocks.
Improves the accuracy of boundary pixel point predictions, enhancing the efficiency of video encoding and decoding by fully considering the motion difference between adjacent image blocks.
Smart Images

Figure 0007799066000031 
Figure 0007799066000032 
Figure 0007799066000033
Abstract
Description
[Technical Field]
[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application claims priority from Chinese Patent Application No. 202111566761.X filed in China on December 20, 2021, and from Chinese Patent Application No. 202210233750.8 filed in China on March 10, 2022, the entire contents of which are incorporated herein by reference.
[0002] The present application relates to the technical field of video encoding and decoding, and more particularly to an inter-frame prediction method and terminal. [Background technology]
[0003] Currently, in the video encoding and decoding process, if the boundary of an image block does not match the contour of the image block, an inter-frame prediction process can be performed on the image block using overlapped block motion compensation (OBMC) to correct the predicted values corresponding to the boundary pixel points of the image block. In OBMC technology, a weighting process is performed on the predicted values obtained using the motion information of the image block and the motion information of the adjacent image blocks, and then the predicted values of the boundary pixel points are corrected.
[0004] However, in the process of correcting the boundary pixel point prediction value based on the OBMC technique, the corrected boundary pixel point prediction value is likely to be inaccurate, which further reduces the efficiency of video encoding and decoding. Summary of the Invention [Problem to be solved by the invention]
[0005] The embodiments of the present application provide an inter-frame prediction method and a terminal capable of solving the technical problem that correction of boundary pixel point prediction values is inaccurate, further reducing the efficiency of video encoding and decoding. [Means for solving the problem]
[0006] In the first aspect, obtaining first motion information of a first image block and second motion information of a second image block, wherein the first image block is adjacent to the second image block; determining a first predicted value and a second predicted value corresponding to each pixel point in a first pixel region associated with the first image block, wherein the first predicted value is determined based on the first motion information and position information of the first pixel region, and the second predicted value is determined based on the second motion information and position information of the first pixel region; determining a target predicted value corresponding to each pixel point in a second pixel region of the first image block based on target information, the target information including a first difference value and a second difference value, the first difference value being a difference value determined based on a reconstructed value of each pixel point in the first pixel region and the first predicted value, and the second difference value being a second difference value determined based on the reconstructed value of each pixel point in the first pixel region and the second predicted value; 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.
[0007] In a second aspect, an acquisition module for acquiring first motion information of a first image block and second motion information of a second image block, wherein the first image block is adjacent to the second image block; a first determination module for determining a first predicted value and a second predicted value corresponding to each pixel point in a first pixel region associated with the first image block, wherein the first predicted value is determined based on the first motion information and position information of the first pixel region, and the second predicted value is determined based on the second motion information and position information of the first pixel region; a second determination module for determining a target predicted value corresponding to each pixel point in a second pixel region of the first image block based on target information, wherein the target information includes a first difference value and a second difference value, the first difference value being a difference value determined based on a reconstructed value of each pixel point in the first pixel region and the first predicted value, and the second difference value being a second difference value determined based on the reconstructed value of each pixel point in the first pixel region and the second predicted value; 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.
[0008] In a third aspect, there is provided a terminal including a processor and a memory, wherein the memory stores programs or commands executable by the processor, and when the programs or commands are executed by the processor, the steps of the method according to the first aspect are realized.
[0009] In a fourth aspect, there is provided a readable storage medium having stored thereon a program or commands which, when executed by a processor, implements the steps of the method according to the first aspect.
[0010] In a fifth aspect, there is provided a chip including a processor and a communication interface, the communication interface and the processor being coupled together, the processor being used to execute a program or command to implement the method of the first aspect.
[0011] In a sixth aspect, there is provided a computer program / program product stored on a storage medium and executed by at least one processor to implement the steps of the method according to the first aspect. [Effects of the Invention]
[0012] In an embodiment of the present application, first motion information for a first image block and second motion information for a second image block are obtained, and first and second predicted values corresponding to each pixel point in a first pixel region associated with the first image block are determined. Then, target predicted values corresponding to each pixel point in a second pixel region of the first image block are determined based on target information. In an embodiment of the present application, the first predicted value and second predicted value are determined based on the first motion information for the first image block and the second predicted value are determined based on the second motion information for the second image block. Target predicted values for boundary pixel points are further determined based on the target information. Here, the target information includes a first difference value and a second difference value, and the magnitude relationship between the first difference value and the second difference value can indicate the motion difference between the first and second image blocks. This fully considers the motion difference between the first and second image blocks during modification of the boundary pixel point predicted values, thereby improving the accuracy of the modified boundary pixel point predicted values and further enhancing the efficiency of video encoding and decoding. [Brief explanation of the drawings]
[0013] [Figure 1] 1 is a schematic diagram (part 1) of an application scenario of a conventional inter-frame prediction method. [Figure 2] 1 is a schematic diagram (part 2) of an application scenario of a conventional inter-frame prediction method. [Figure 3] 1 is a flowchart of an inter-frame prediction method provided in an embodiment of the present application; [Figure 4] FIG. 1 is a schematic diagram (part 1) of an application scenario of the inter-frame prediction method provided in the embodiment of the present application. [Figure 5] FIG. 2 is a schematic diagram (part 2) of an application scenario of the inter-frame prediction method provided in the embodiment of the present application. [Figure 6] FIG. 3 is a schematic diagram (part 3) of an application scenario of the inter-frame prediction method provided in the embodiment of the present application. [Figure 7] FIG. 4 is a schematic diagram (part 4) of an application scenario of the inter-frame prediction method provided in the embodiments of the present application. [Figure 8]FIG. 5 is a schematic diagram (part 5) of an application scenario of the inter-frame prediction method provided in the embodiments of the present application. [Figure 9] FIG. 6 is a schematic diagram (part 6) of an application scenario of the inter-frame prediction method provided in the embodiments of the present application. [Figure 10] FIG. 1 is a structural diagram of an inter-frame prediction device provided in an embodiment of the present application; [Figure 11] FIG. 1 is a structural diagram of a communication device provided in an embodiment of the present application; [Figure 12] FIG. 2 is a hardware structure schematic diagram of a terminal provided in an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION
[0014] The technical solutions in the embodiments of the present application will be clearly explained below with reference to the drawings in the embodiments of the present application. Of course, the described embodiments are only a part of the embodiments of the present application, not all of the embodiments. 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.
[0015] 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. Terms used in this manner may be interchanged where appropriate, so that the embodiments of this application can be practiced in an order other than that shown or described herein. Furthermore, objects distinguished by "first" and "second" generally belong to a single category, and the number of objects is not limited. For example, it should be understood that the first object may be one or more. 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.
[0016] 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 devices or user equipment (UE), and examples of the terminals include mobile phones, tablet personal computers, laptop computers (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 (VUE), pedestrian user equipment (PUE), smart homes (home devices with wireless communication functions, such as refrigerators, televisions, washing machines, or furniture), game consoles, personal computers (PUE), etc. The wearable device may be a terminal device such as a smart computer (PC), an automated teller machine, or a kiosk, and the wearable device may be a smart watch, a smart wristband, a smart earphone, smart glasses, smart jewelry (smart bangle, smart bracelet, smart ring, smart necklace, smart anklet bangle, smart anklet, etc.), a smart wrist strap, smart wear, etc. It should be noted that the specific type of terminal is not limited in the embodiments of the present application.
[0017] For ease of understanding, some of the contents relating to the embodiments of the present application will be described below.
[0018] When the boundary of an image block and the contour of a current image block do not match, the motion of the pixel points on the boundary of the current image block may be consistent with the current image block or with the adjacent image block. The predicted values of the boundary pixel points determined based on the motion information of the current image block are significantly different from the true predicted values, which further reduces the efficiency of video encoding and decoding. Here, the current image block may be a block to be coded, and the adjacent image block may be a coded block, or the current image block may be a block to be decoded, and the adjacent image block may be a decoded block.
[0019] Currently, the above technical problem can be solved by modifying the predicted values of the boundary pixel points of the current image block using OBMC technology. Here, OBMC technology is an inter-frame prediction method. The OBMC technology will be specifically described as follows.
[0020] In the first case, the inter-frame prediction mode of each pixel point in the current block is the same.
[0021] In this case, if the neighboring image block is in inter-frame prediction mode instead of intra block copy mode and the motion mode of the neighboring image block does not match the motion mode of the current image block, the motion information of the neighboring image block is obtained. Here, referring to Figure 1, the neighboring image block may be the image block adjacent to the upper side of the current image block or the image block adjacent to the left side of the current image block.
[0022] Here, if any one of the following conditions 1, 2, and 3 is satisfied, it can be determined that the motion mode of the adjacent image block and the motion mode of the current image block do not match.
[0023] 1. The prediction direction of the adjacent image block is different from that of the current image block.
[0024] 2. The adjacent image block has the same prediction direction as the current image block, but the prediction direction points to a different reference frame.
[0025] 3. The prediction direction of the adjacent 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 adjacent image block is different from that of the current image block.
[0026] After obtaining the motion information of the neighboring 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 neighboring image block, and the predicted values of the boundary pixel points of the current image block are corrected using the first predicted value and the second predicted value.
[0027] Specifically, when the current image block is a luminance sub-block, the first predicted value and the second predicted value are weighted and added using the following equation to obtain the corrected predicted value of the boundary pixel point.
number
number
number
number
[0028] In the formula, i represents the column coordinate of the boundary pixel point in the current image block, j represents the row coordinate of the boundary pixel point in the current image block, Pixel1 represents the first predicted value of the boundary pixel point, Pixel2 represents the second predicted value of the boundary pixel point, and NewPixel represents the modified predicted value of the boundary pixel point.
[0029] If the current image block is a chrominance sub-block, the first predicted value and the second predicted value are weighted and added according to the following equation to obtain the corrected predicted value of the boundary pixel point.
number
[0030] where NewPixel represents the modified predicted value of the boundary pixel point.
[0031] It should be understood that the application scenario corresponding to the above formula is a scenario in which the pixel area of the boundary pixel point is 4 rows or 4 columns, and in other application scenarios, the pixel area of the boundary pixel point is not specifically limited.
[0032] In the second case, the current image block is a coding block and the inter-frame prediction mode is the affine mode, or the current image block is a decoding block and the inter-frame prediction mode is the motion vector modification mode.
[0033] In this case, the motion information of four adjacent image blocks, namely, upper, lower, left and right adjacent to the current image block, is obtained. Here, please refer to FIG. 2, which shows the positional relationship between the adjacent image blocks and the current image block in the above case.
[0034] 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 when the current image block and the adjacent image block satisfy any one of the following conditions 1, 2, and 3:
[0035] 1. The prediction direction of the adjacent image block is different from that of the current image block.
[0036] 2. The adjacent image block has the same prediction direction as the current image block, but the prediction direction points to a different reference frame.
[0037] 3. The prediction direction of the adjacent image block is the same as that of the current image block, and the prediction direction points to the same reference frame, but the absolute value of the difference value between the motion vector of the adjacent image block and the motion vector of the current image block is greater than a preset threshold.
[0038] The predicted values of the boundary pixel points of the current image block are corrected using the first and second predicted values. Specifically, the first and second predicted values are weighted and added using the following formula to obtain the corrected predicted values of the boundary pixel points.
number
number
[0039] where i represents the column coordinate of the boundary pixel point in the current image block, j represents the row coordinate of the boundary pixel point in the current image block, subNewPixel represents the corrected predicted value of the boundary pixel point, and subPixel2 L , subPixel2 R , subPixel2 T and subPixel2 B where x represents a second predicted value determined based on motion information of the neighboring image block, width represents the number of columns of the neighboring image block, height represents the number of rows of the neighboring image block, and w represents a preset weight combination, where the weight combination corresponding to the current image block being a luminance block is different from the weight combination corresponding to the current image block being a chrominance block.
[0040] It should be understood that the application scenario corresponding to the above formula is a scenario in which the pixel area of the boundary pixel point is 4 rows or 4 columns, and in other application scenarios, the pixel area of the boundary pixel point is not specifically limited.
[0041] In the above process of correcting the boundary pixel point prediction value using the OBMC technique, the difference between the motion mode of the current image block and the motion mode of the adjacent image block is not taken into consideration, which results in the corrected boundary pixel point prediction value being inaccurate and further reduces the efficiency of video encoding and decoding.
[0042] In view of the above, how to improve the accuracy of the corrected boundary pixel point prediction value and further increase the efficiency of video encoding and decoding is a technical problem that needs to be solved.
[0043] In order to solve the above-mentioned technical problems, the embodiments of the present application provide an inter-frame prediction method. Hereinafter, the inter-frame prediction method provided in the embodiments of the present application will be described in detail with reference to the drawings according to several embodiments and their application scenarios.
[0044] Please refer to Figure 3, which is a flowchart of the inter-frame prediction method provided in this application. The inter-frame prediction coding method provided in this embodiment includes the following steps S101, S102 and S103.
[0045] In S101, first motion information of a first image block and second motion information of a second image block are obtained.
[0046] The first image block is an image block to be coded, and the second image block is a coded image block adjacent to the first image block, or the first image block is an image block to be decoded, and the second image block is a decoded image block adjacent to the first image block. The first image block is in an inter-frame prediction mode, and the first and second image blocks satisfy any one of the following conditions 1, 2, and 3:
[0047] 1. The first image block has a different prediction direction from the second image block.
[0048] 2. The first image block has the same prediction direction as the second image block, but the prediction directions point to different reference frames.
[0049] 3. The first image block has the same prediction direction as 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 that of the second image block.
[0050] 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.
[0051] At S102, a first predicted value and a second predicted value corresponding to each pixel point in a first pixel region associated with the first image block are determined.
[0052] The first pixel region may be adjacent to the first image block, and may be a portion of a pixel region in the second image block. For example, if the second image block is an upper image block adjacent to the first image block, and the first pixel region is an upper pixel region of the first image block, the first pixel region is a portion of a pixel region in the second image block. The first pixel region does not have to be a portion of a pixel region in the second image block.
[0053] It should be understood that the motion information includes a prediction direction, reference frame information, and a motion vector. In this step, a first reference pixel point is determined based on the first motion information, and the first reference pixel point is located at a reconstructed pixel point in the first reference frame that is located at the same position as the first pixel region, and a reconstructed value of the pixel point in the first reference frame indicated by the first motion vector is determined as a first predicted value based on the first reference pixel point. A second reference pixel point is determined based on the second motion information, and the second reference pixel point is located at a reconstructed pixel point in the second reference frame that is located at the same position as the first pixel region, and a reconstructed value of the pixel point in the second reference frame indicated by the second motion vector is determined as a second predicted value based on the second reference pixel point.
[0054] In S103, a target predicted value corresponding to each pixel point in the second pixel region of the first image block is determined based on the target information.
[0055] The target information includes a first difference value and a second difference value, where the first difference value is determined based on the reconstructed value and the first predicted value of each pixel point in the first pixel region, and the second difference value is determined based on the reconstructed value and the second predicted value of each pixel point in the first pixel region. Optionally, the first difference value may be a sum of absolute values of difference values between the first predicted value and the reconstructed value of each pixel point, and the second difference value may be a sum of absolute values of difference values between the second predicted value and the reconstructed value of each pixel point. Here, the first difference value is for indicating a motion mode of the first image block, and the second difference value is for indicating a motion mode of the second image block.
[0056] The second pixel region is a portion 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 ease of understanding, please refer to Figure 4, which shows the position of the second pixel region when the first pixel region is located above the first image block, and Figure 5, which shows the position of the second pixel region when the first pixel region is located to the left of the first image block. That is, in one possible embodiment, the first pixel region in the second image block is adjacent to the second pixel region in the first image block.
[0057] In this step, the first difference value and the second difference value corresponding to the first pixel region can be used to determine the target predicted value of each boundary pixel point, and specific technical solutions are described in the following examples. It should be understood that the target predicted value is the corrected predicted value of the boundary pixel point.
[0058] In another embodiment, the inter-frame prediction method provided in the embodiment of the present application can also be used to generate boundary pixel point prediction values for each sub-block within a coding block or a decoding block. In such an embodiment, see Figure 6, in which the first pixel region is the reconstructed pixels adjacent to the upper side of the coding block corresponding to the column in which the sub-block is located, or Figure 7, in which the first pixel region is the reconstructed pixels adjacent to the left side of the coding block corresponding to the row in which the sub-block is located.
[0059] The performance of video encoding using the inter-frame prediction method provided in the embodiments of the present application is higher than that of video encoding using the conventional inter-frame prediction method. Please refer to Table 1 to easily understand the technical effects brought by the present application.
[0060] [Table 1]
[0061] The test sequences in Table 1 were obtained by comparing the video encoding using the inter-frame prediction method provided in the embodiments of the present application with the video encoding using a conventional inter-frame prediction method. The Y-channel BD-Rate, U-channel BD-Rate, and V-channel BD-Rate are parameters for evaluating the video encoding performance. A negative BD-Rate indicates higher video encoding performance, and the higher the absolute value of the corresponding BD-Rate, the greater the gain in video encoding performance. Table 1 shows that the video encoding performance using the inter-frame prediction method provided in the embodiments of the present application is higher than that using the conventional inter-frame prediction method.
[0062] In an embodiment of the present application, first motion information for a first image block and second motion information for a second image block are obtained, and first and second predicted values corresponding to each pixel point in a first pixel region associated with the first image block are determined. Then, target predicted values corresponding to each pixel point in a second pixel region of the first image block are determined based on target information. In an embodiment of the present application, the first predicted value and second predicted value are determined based on the first motion information for the first image block and the second predicted value are determined based on the second motion information for the second image block. Target predicted values for boundary pixel points are further determined based on the target information. Here, the target information includes a first difference value and a second difference value, and the magnitude relationship between the first difference value and the second difference value can indicate the motion difference between the first and second image blocks. This fully considers the motion difference between the first and second image blocks during modification of the boundary pixel point predicted values, thereby improving the accuracy of the modified boundary pixel point predicted values and further enhancing the efficiency of video encoding and decoding.
[0063] Optionally, the target information further includes a third difference value, the third difference value being a difference value corresponding to the first pixel region determined based on the first predicted value and the second predicted value. For specific technical solutions for determining the third difference value, please refer to the following examples.
[0064] Optionally, the first pixel region comprises: an encoded or decoded pixel region consisting of M1 rows and N1 columns adjacent to the upper side of the first image block; a coded or decoded pixel region consisting of M2 rows and N2 columns adjacent to the left of the first image block; Here, M1, M2, N1, and N2 are all positive integers.
[0065] In one alternative embodiment, the first pixel region is a coded or decoded pixel region consisting of M1 rows and N1 columns adjacent to the upper side of the first image block. For ease of understanding, refer to Figure 8, and in the scenario shown in Figure 8, the first pixel region is a coded or decoded pixel region consisting of 1 row and 8 columns adjacent to the upper side of the first image block.
[0066] In another alternative embodiment, the first pixel region is a coded or decoded pixel region consisting of M2 rows and N2 columns adjacent to the left side of the first image block. For ease of understanding, refer to Figure 9, and in the scenario shown in Figure 9, the first pixel region is a coded or decoded pixel region consisting of 8 rows and 1 column adjacent to the left side of the first image block.
[0067] 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 upper side of the first image block, and an encoded or decoded pixel region consisting of a portion of pixel points adjacent to the left side of the first image block, in which case the first pixel region is "L" shaped.
[0068] In this embodiment, the first pixel region may be a portion of the pixel region adjacent to the upper side of the first image block, a portion of the pixel region adjacent to the left side of the first image block, or a portion of the pixel region adjacent to the upper side and a portion of the pixel region adjacent to the left side of the first image block, thereby fully considering the motion difference between the first image block and each of the image blocks adjacent to the first image block, and improving the accuracy of the modified boundary pixel point prediction value.
[0069] Optionally, the step of determining a target predicted value corresponding to each pixel point in a second pixel region of the first image block based on target information further comprises: determining a target weight value combination based on the target information; and performing a weighted addition process on the third predicted value and the fourth predicted value corresponding to each pixel point in the second pixel region based on the target weight value combination to obtain a target predicted value corresponding to each pixel point in the second pixel region.
[0070] The target weight value combination includes at least one weight set, the weight set including first and second weight values, where the first weight value corresponds to a third predicted value for each pixel point in the second pixel region, the second weight value corresponds to a fourth predicted value for each pixel point in the second pixel region, 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.
[0071] Specifically, the motion information includes a prediction direction, reference frame information, and a motion vector. A first reference frame is determined based on the first prediction direction and the first reference frame information in the first motion information, where the first reference frame is a previously coded or decoded frame. A position in the first reference frame indicated by the first motion vector is determined, and a reconstructed value of a pixel point corresponding to the position is determined as a third predicted value. A second reference frame is determined based on the second prediction direction and the second reference frame information in the second motion information, where the second reference frame is a previously coded or decoded frame. A position in the second reference frame indicated by the second motion vector is determined, and a reconstructed value of a pixel point corresponding to the position is determined as a fourth predicted value.
[0072] In this embodiment, after the target weight value combination is determined, a weighted addition process is performed on the third predicted value and the fourth predicted value corresponding to each pixel point in the second pixel region using the following formula, thereby obtaining a target predicted value corresponding to each pixel point in the second pixel region.
number
number
number
[0073] In the formula, Pixel represents the target predicted value, w11 represents the first weight value, w12 represents the second weight value, Pixel3 represents the third predicted value, and Pixel4 represents the fourth predicted value.
[0074] The following will specifically explain how to determine the target weight combination.
[0075] Optionally, the step of determining a target weight combination based on the target information further comprises: determining a first weight value combination as the target weight value combination when the first difference value is greater than the second difference value and / or the third difference value; determining a second weight value combination as the target weight value combination when the third difference value is smaller than the first difference value and the second difference value, or determining the target weight value combination based on the first difference value and the second difference value; determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value and the third difference value; determining a fourth predicted value of each pixel point in the second pixel region as a target predicted value when the second difference value is smaller than the third difference value and the first difference value.
[0076] It should be understood that the target weight value combination is related to the magnitude relationship between the first difference value, the second difference value, and the third difference value.
[0077] In one alternative embodiment, when the first difference value is greater than the second difference value and / or the third difference value, i.e., when the first difference value is not the minimum value, a predetermined first weight value combination can be determined as the target weight value combination.
[0078] In one alternative embodiment, when the third difference value is smaller than the first difference value and the second difference value, i.e., when the third difference value is the minimum value, the predetermined second weight value combination can be determined as the target weight value combination.
[0079] It should be understood that this embodiment does not limit the magnitude relationship between the weight values included in the first weight value combination and the weight values included in the second weight value combination.
[0080] If the first image block is a luminance block, the second pixel region includes four rows, and each row has eight pixel points, the first weight value combination may be the same as the fifth weight value combination below. If the first image block is a chrominance block, the second pixel region includes one row, and the row has four pixel points, the first weight value combination may be the same as the sixth weight value combination below.
[0081] It should be understood that the above is only an example of the first weight value combination due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the first weight value combination.
[0082] If the first image block is a luminance block, the second pixel region includes two rows, and each row has eight pixel points, the second weight value combination may be the seventh weight value combination below. If the first image block is a chrominance block, the second pixel region includes one row, and the row has four pixel points, the second weight value combination may be the eighth weight value combination below.
[0083] It should be understood that the above is only an example of the second weight value combination due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the second weight value combination.
[0084] In one alternative embodiment, if the first difference value is smaller than the second difference value and the third difference value, i.e., the first difference value is the minimum value, it is determined that the motion mode of the boundary pixel point is closer to the first image block, and in this case, the third predicted value of the boundary pixel point is determined as the target predicted value.
[0085] In one alternative embodiment, if the second difference value is smaller than the first difference value and the third difference value, i.e., the second difference value is the minimum value, it is determined that the motion mode of the boundary pixel point is closer to the second image block, and in this case, the fourth predicted value of the boundary pixel point is determined as the target predicted value.
[0086] In this embodiment, different weight combinations are determined based on the magnitude relationship between the first differential value, the second differential value, and the third differential value, and the magnitude relationship can reflect the motion difference between the first image block and the second image block, so that the motion difference between the first image block and the second image block is fully taken into consideration in the process of modifying the boundary pixel point prediction value using the weight combinations, thereby improving the accuracy of the modified boundary pixel point prediction value and further increasing the efficiency of video encoding and decoding.
[0087] Optionally, the step of determining the target weight value combination based on the first difference value and the second difference value further comprises: determining a third weight value combination as the target weight value combination when the third difference value is smaller than the first difference value and the second difference value, and when the first difference value is smaller than the second difference value; and determining a fourth weight value combination as the target weight value combination when the third difference value is smaller than the first difference value and the second difference value and the first difference value is greater than or equal to the second difference value.
[0088] In this embodiment, when the third difference value is the minimum value, the target weight value combination can also be determined based on the magnitude relationship between the first difference value and the second difference value.
[0089] As one possible embodiment, when the third difference value is smaller than the first difference value and the second difference value, and the first difference value is smaller than the second difference value, i.e., the third difference value is the smallest and the second difference value is the largest, the predetermined third weight value combination can be determined as the target weight value combination.
[0090] As another optional embodiment, when the third difference value is smaller than the first difference value and the second difference value, and the first difference value is greater than or equal to the second difference value, a predetermined fourth weight value combination can be determined as the target weight value combination.
[0091] If the first image block is a luminance block, the second pixel region includes two rows, and each row has eight pixel points, the third weight value combination may be the same as the twelfth weight value combination below. If the first image block is a chrominance block, the second pixel region includes one row, and the row has four pixel points, the third weight value combination may be the same as the thirteenth weight value combination below.
[0092] It should be understood that the above only takes the third weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the third weight value combination.
[0093] If the first image block is a luminance block, the second pixel region includes two rows, and each row has eight pixel points, the fourth weight value combination may be the same as the fourteenth weight value combination below. If the first image block is a chrominance block, the second pixel region includes one row, and the row has four pixel points, the fourth weight value combination may be the same as the fifteenth weight value combination below.
[0094] It should be understood that the above only takes the fourth weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the fourth weight value combination.
[0095] It should be understood that in this embodiment, there is no limitation on the magnitude relationship between the weight values included in the third weight value combination and the weight values included in the fourth weight value combination.
[0096] In this embodiment, different weight combinations are determined based on the magnitude relationship between the first differential value, the second differential value, and the third differential value, and the magnitude relationship can reflect the motion difference between the first image block and the second image block, so that the motion difference between the first image block and the second image block is fully taken into consideration in the process of modifying the boundary pixel point prediction value using the weight combinations, thereby improving the accuracy of the modified boundary pixel point prediction value and further increasing the efficiency of video encoding and decoding.
[0097] Optionally, the target information further includes a type of the first image block, and the step of determining a target weight value combination based on the target information includes: determining a fifth weight value combination as the target weight value combination when the type of the first image block is a luminance block and the first difference value is greater than the second difference value and / or the third difference value; determining a sixth weight value combination as the target weight value combination when the type of the first image block is a color difference block and the first difference value is greater than the second difference value and / or the third difference value; determining a seventh weight value combination as the target weight value combination when the type of the first image block is a luminance block and the third difference value is smaller than the first difference value and the second difference value; and determining an eighth weight value combination as the target weight value combination when the type of the first image block is a color difference block and the third difference value is smaller than the first difference value and the second difference value.
[0098] In this embodiment, different target weight value combinations can also be set based on the type corresponding to the first image block.
[0099] In one alternative embodiment, if the type of the first image block is a luminance block and the first difference value is not the minimum value, a fifth preset weight combination is determined as the target weight combination, where, for example, if the video sequence image format is 4:2:0, the area of the chrominance block is 1 / 4 of the area of the luminance block, and for example, if the size of the luminance block of the first image is 8×8, the size of the chrominance block of the first image is 4×4.
[0100] For example, if the second pixel area is at the upper boundary of the first image block, and the second pixel area of the luminance block of the first image includes four rows, and each row has eight pixel points, the fifth weight value combination may be as follows:
number
number
number
number
[0101] It should be understood that the above only takes the fifth weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the fifth weight value combination.
[0102] If the type of the first image block is a chrominance block and the first difference value is not the minimum value, a sixth preset weight value combination is determined as the target weight value combination.
[0103] For example, if the second pixel region of the chrominance block of the first image includes one row, and there are four pixel points in the row, the sixth weight value combination may be:
number
[0104] It should be understood that the above only takes the sixth weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the values included in the sixth weight value combination.
[0105] It should be understood that the number of weight values in the weight value combinations corresponding to the chrominance blocks may be smaller than the number of weight values in the weight value combinations corresponding to the luminance blocks, or may be equal to or greater than the number of weight values in the weight value combinations corresponding to the luminance blocks, and this specification does not specifically limit the number of weight values in the weight value combinations corresponding to the chrominance blocks. The weight values in the weight value combinations corresponding to the luminance blocks may be a portion of the weight values in the weight value combinations corresponding to the luminance blocks, or may be other numerical values, and this specification does not specifically limit the number of weight values in the weight value combinations corresponding to the chrominance blocks.
[0106] As another alternative embodiment, when the type of the first image block is a luminance block and the third difference value is the smallest value, a seventh preset weight value combination is determined as the target weight value combination.
[0107] For example, if the second pixel region of the luminance block of the first image includes two rows, and each row has eight pixel points, the seventh weight value combination may be:
number
number
[0108] It should be understood that the above only takes the seventh weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the seventh weight value combination.
[0109] If the type of the first image block is a chrominance block and the third difference value is the smallest value, a preset eighth weight value combination is determined as the target weight value combination.
[0110] For example, if the second pixel region of the chrominance block of the first image includes one row, and there are four pixel points in the row, the eighth weight value combination may be:
number
[0111] It should be understood that the above only takes the eighth weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the eighth weight value combination.
[0112] In another embodiment, when the type of the first image block is a luminance block, the third difference value is the minimum value, and the first difference value is smaller than the second difference value, the predetermined 12th weight value combination can be determined as the target weight value combination.
[0113] For example, if the second pixel region of the luminance block of the first image includes two rows, and each row has eight pixel points, the twelfth weight value combination may be:
number
number
[0114] It should be understood that the above only takes the 12th weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the 12th weight value combination.
[0115] When the type of the first image block is a color difference block, the third difference value is the smallest value, and the first difference value is smaller than the second difference value, the preset 13th weight value combination can be determined as the target weight value combination.
[0116] For example, if the second pixel region of the chrominance block of the first image includes one row, and there are four pixel points in the row, the thirteenth weight value combination may be:
number
[0117] It should be understood that the above only takes the 13th weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the values included in the 13th weight value combination.
[0118] In another embodiment, when the type of the first image block is a luminance block, the third difference value is the minimum value, and the first difference value is greater than or equal to the second difference value, the preset 14th weight value combination can be determined as the target weight value combination.
[0119] For example, if the second pixel region of the luminance block of the first image includes two rows, and each row has eight pixel points, the fourteenth weight value combination may be:
number
number
number
[0120] It should be understood that the above only takes the 14th weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the 14th weight value combination.
[0121] When the type of the first image block is a color difference block, the third difference value is the smallest value, and the first difference value is greater than or equal to the second difference value, the preset 15th weight value combination can be determined as the target weight value combination.
[0122] For example, if the second pixel region of the chrominance block of the first image includes one row, and there are four pixel points in the row, the fifteenth weight value combination may be:
number
[0123] It should be understood that the above only takes the 15th weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the 15th weight value combination.
[0124] In another embodiment, the target weight value combinations corresponding to different types of first image blocks may be the same, that is, the fifth weight value combination may be the same as the sixth weight value combination, and the seventh weight value combination may be the same as the eighth weight value combination.
[0125] In this embodiment, different weight combinations are determined based on the magnitude relationship between the first differential value, the second differential value, and the third differential value, and the magnitude relationship can reflect the motion difference between the first image block and the second image block, so that the motion difference between the first image block and the second image block is fully taken into consideration in the process of modifying the boundary pixel point prediction value using the weight combinations, thereby improving the accuracy of the modified boundary pixel point prediction value and further increasing the efficiency of video encoding and decoding.
[0126] The following describes in detail the technical solution for determining the third difference value corresponding to each pixel point in the first pixel region.
[0127] Optionally, the method further comprises: performing a weighted addition process on the first predicted value and the second predicted value corresponding to each pixel point within the first pixel region to obtain a fifth predicted value for each pixel point; determining a third difference value corresponding to the first pixel region based on the fifth predicted value of each pixel point and the reconstructed value corresponding to each pixel point.
[0128] In this embodiment, for one pixel point in the first pixel region, a weighted addition process is performed on the first predicted value and the second predicted value of the pixel point using the following formula to obtain a fifth predicted value of the pixel point.
number
number
number
[0129] In the formula, Pixel5 represents the fifth predicted value, w11 and w12 represent weight combinations, and optionally, w11 is 26 and w12 is 6, Pixel1 represents the first predicted value, and Pixel2 represents the second predicted value.
[0130] After calculating the fifth predicted value, a third difference value corresponding to each pixel point is determined based on the fifth predicted value and the reconstructed value. For specific technical solutions, please refer to the following examples.
[0131] Optionally, the step of determining a third difference value corresponding to the first pixel region based on a fifth predicted value of each pixel point and a reconstructed value corresponding to each pixel point further comprises: determining a sum of target absolute values corresponding to each pixel point in the first pixel region as the third difference value; or determining an average value of target absolute values corresponding to each pixel point in the first pixel region as the third difference value.
[0132] In this embodiment, as one possible embodiment, for any pixel point within the first pixel region, the absolute value of the difference value between the fifth predicted value and the reconstructed value for that pixel point is calculated, and the absolute value is determined as a target absolute value corresponding to that pixel point; further, the sum of the target absolute values corresponding to each pixel point is determined as a third difference value corresponding to the first pixel region.
[0133] In another alternative embodiment, the average value of the target absolute values corresponding to each pixel point is determined as the third difference value corresponding to the first pixel region.
[0134] In an embodiment of the present application, the target weight value combination may be determined based only on the first difference value and the second difference value.
[0135] Optionally, the step of determining a target weight combination based on the target information further comprises: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; and determining a ninth weight value combination as the target weight value combination when the first difference value is equal to or greater than the second difference value.
[0136] In this embodiment, if the first difference value is smaller than the second difference value, it is determined that the motion mode of the boundary pixel point is closer to the first image block, and in this case, the third predicted value of the boundary pixel point is determined as the target predicted value.
[0137] If the first difference value is equal to or greater than the second difference value, a preset ninth weight value combination can be determined as the target weight value combination.
[0138] Optionally, taking the example where the second pixel region is at the upper boundary of the first image block and the first image block is a luminance block, if the second pixel region of the first image block includes four rows and each row has eight pixel points, the ninth weight value combination may be the same as the fifth weight value combination.
[0139] Optionally, taking the example where the second pixel region is at the upper boundary of the first image block and the first image block is a color difference block, if the second pixel region of the first image block includes one row and there are four pixel points in the row, the ninth weight value combination may be the same as the sixth weight value combination.
[0140] It should be understood that the above only takes the ninth weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the ninth weight value combination.
[0141] In this embodiment, different weight combinations are determined based on the magnitude relationship between the first and second differential values, and the magnitude relationship can reflect the motion difference between the first and second image blocks, so that the motion difference between the first and second image blocks is fully taken into consideration in the process of modifying the boundary pixel point prediction value using the weight combinations, thereby improving the accuracy of the modified boundary pixel point prediction value and further increasing the efficiency of video encoding and decoding.
[0142] Optionally, the step of determining a target weight combination based on the target information further comprises: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; and determining the target weight value combination based on the first and second difference values when the first difference value is equal to or greater than the second difference value.
[0143] In this embodiment, if the first difference value is smaller than the second difference value, it is determined that the motion mode of the boundary pixel point is closer to the first image block, and in this case, the third predicted value of the boundary pixel point is determined as the target predicted value.
[0144] If the first difference value is equal to or greater than the second difference value, a target weight combination can be determined based on the first difference value and the second difference value. For specific technical solutions for determining the target weight combination based on the first difference value and the second difference value, please refer to the following examples.
[0145] In this embodiment, different weight combinations are determined based on the magnitude relationship between the first and second differential values, and the magnitude relationship can reflect the motion difference between the first and second image blocks, so that the motion difference between the first and second image blocks is fully taken into consideration in the process of modifying the boundary pixel point prediction value using the weight combinations, thereby improving the accuracy of the modified boundary pixel point prediction value and further increasing the efficiency of video encoding and decoding.
[0146] Optionally, the step of determining the target weight value combination based on the first difference value and the second difference value further comprises: a step of determining a tenth weight value combination as the target weight value combination when a calculation result between the first difference value and the second difference value is equal to or less than a first threshold value, the first threshold value being a non-negative number; and determining an eleventh weight value combination as the target weight value combination when the calculation result between the first difference value and the second difference value is greater than a first threshold value.
[0147] In this embodiment, a first difference value and a second difference value can be calculated according to a preset formula to obtain a calculation result, which is also called a relationship parameter and indicates the difference between the first difference value and the second difference value. In this embodiment, a first threshold is further set in advance, which is a non-negative number, and optionally, the first threshold is 0. If the calculation result is equal to or less than the first threshold, a preset tenth weight value combination can be determined as a target weight value combination.
[0148] Optionally, for example, if the second pixel region is at the upper boundary of the first image block and the first image block is a luminance block, and the second pixel region of the first image block includes four rows and each row has eight pixel points, the tenth weight value combination may be the same as the fifth weight value combination.
[0149] Optionally, taking the example where the second pixel area is at the upper boundary of the first image block and the first image block is a chrominance block, if the second pixel area of the first image block includes one row and there are four pixel points in the row, the above-mentioned tenth weight value combination may be as follows:
number
[0150] It should be understood that the above only takes the tenth weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the tenth weight value combination.
[0151] If the calculation result is greater than the first threshold, the preset eleventh weight value combination can be determined as the target weight value combination.
[0152] Optionally, taking the example where the second pixel region is at the upper boundary of the first image block and the first image block is a luminance block, if the second pixel region of the first image block includes four rows and each row has eight pixel points, the eleventh weight value combination may be the same as the seventh weight value combination.
[0153] Optionally, for example, when the second pixel region is at the upper boundary of the first image block and the first image block is a color difference block, if the second pixel region of the first image block includes one row and there are four pixel points in the row, the 11th weight value combination may be the same as the 8th weight value combination.
[0154] It should be understood that the above only takes the 11th weight value combination as an example due to the need to describe the technical solution in detail, and the present specification does not limit the numerical values included in the 11th weight value combination.
[0155] Optionally, the step of determining a target weight combination based on the target information further comprises: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; determining a ninth weight value combination as the target weight value combination when the first difference value is equal to the second difference value; If the first difference value is greater than the second difference value, determining the target weight value combination based on the first difference value and the second difference value.
[0156] In this embodiment, if the first difference value is smaller than the second difference value, it is determined that the motion mode of the boundary pixel point is closer to the first image block, and in this case, the third predicted value of the boundary pixel point is determined as the target predicted value.
[0157] If the first difference value is equal to the second difference value, a preset ninth weight value combination can be determined as the target weight value combination. If the first difference value is greater than the second difference value, the target weight value combination can be determined based on the first difference value and the second difference value.
[0158] In this embodiment, different weight combinations are determined based on the magnitude relationship between the first and second differential values, and the magnitude relationship can reflect the motion difference between the first and second image blocks, so that the motion difference between the first and second image blocks is fully taken into consideration in the process of modifying the boundary pixel point prediction value using the weight combinations, thereby improving the accuracy of the modified boundary pixel point prediction value and further increasing the efficiency of video encoding and decoding.
[0159] Optionally, the step of determining the target weight value combination based on the first difference value and the second difference value further comprises: determining a tenth weight value combination as the target weight value combination when a calculation result between the first difference value and the second difference value is smaller than a second threshold value; and determining an eleventh weight value combination as the target weight value combination when the calculation result between the first difference value and the second difference value is equal to or greater than a second threshold value.
[0160] In this embodiment, the first difference value and the second difference value can be calculated according to a preset formula to obtain a calculation result, which is also referred to as a relational parameter. In this embodiment, a second threshold is further set in advance, and the second threshold may be the same as the first threshold. If the calculation result is smaller than the second threshold, a preset tenth weight value combination can be determined as the target weight value combination. As described above, if the first image block is a luminance block, the tenth weight value combination may be the same as the fifth weight value combination.
[0161] If the calculation result is equal to or greater than the second threshold, a preset eleventh weight value combination may be determined as the target weight value combination. As described above, if the first image block is a luminance block, the eleventh weight value combination may be the same as the seventh weight value combination, and if the first image block is a chrominance block, the eleventh weight value combination may be the same as the eighth weight value combination.
[0162] Optionally, the step of determining a target weight combination based on the target information further comprises: calculating the first difference value and the second difference value according to a predetermined calculation formula to obtain a calculation result; and determining the target weight combination based on the calculation result.
[0163] In this embodiment, the first and second differential values can be calculated directly according to a preset formula to obtain a calculation result. Here, the formula may be subtraction or division. That is, the calculation result may be the result of subtraction between the first and second differential values, the result of division between the first and second differential values, or another type of calculation method, and is not specifically limited in this embodiment.
[0164] After the calculation results are obtained, a target weight value combination is determined based on the calculation results.
[0165] In this embodiment, different weight combinations are determined based on the calculation results between the first and second differential values, and the magnitude relationship can reflect the motion difference between the first and second image blocks, so that the motion difference between the first and second image blocks is fully taken into consideration in the process of modifying the boundary pixel point prediction value using the weight combinations, thereby improving the accuracy of the modified boundary pixel point prediction value and further increasing the efficiency of video encoding and decoding.
[0166] Optionally, the step of determining the target weight combination based on the calculation result comprises: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the calculation result is equal to or less than a third threshold; determining a ninth weight value combination as the target weight value combination when the calculation result is equal to or greater than a fourth threshold; determining a tenth weight value combination as the target weight value combination when the calculation result is greater than a third threshold value and equal to or less than a fifth threshold value; and determining an eleventh weight value combination as the target weight value combination when the calculation result is greater than a fifth threshold value and less than a fourth threshold value.
[0167] In this embodiment, a third threshold, a fourth threshold, and a fifth threshold are set in advance, and the third threshold, the fourth threshold, and the fifth threshold are all non-negative numbers, and the third threshold is smaller than the fifth threshold, and the fifth threshold is smaller than the fourth threshold.
[0168] If the calculation result is equal to or smaller than the third threshold, the third predicted value of the boundary pixel point is determined as the target predicted value.
[0169] If the calculation result is equal to or greater than the fourth threshold, a preset ninth weight value combination is determined as the target weight value combination. As described above, if the first image block is a luminance block, the ninth weight value combination may be the same as the fifth weight value combination, and if the first image block is a chrominance block, the ninth weight value combination may be the same as the sixth weight value combination.
[0170] If the calculation result is greater than the third threshold and less than or equal to the fifth threshold, a preset tenth weight value combination is determined as the target weight value combination. As described above, if the first image block is a luminance block, the tenth weight value combination may be the same as the fifth weight value combination.
[0171] If the calculation result is greater than the fifth threshold and less than or equal to the fourth threshold, a preset eleventh weight value combination is determined as the target weight value combination. As described above, if the first image block is a luminance block, the eleventh weight value combination may be the same as the seventh weight value combination, and if the first image block is a chrominance block, the eleventh weight value combination may be the same as the eighth weight value combination.
[0172] The inter-frame prediction method provided in the embodiments of the present application may be executed by 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 taking the inter-frame prediction method executed by the inter-frame prediction device as an example.
[0173] As shown in FIG. 10, the inter-frame prediction device 1000 an obtaining module 1001 for obtaining first motion information of a first image block and second motion information of a second image block; a first determination module 1002 for determining a first predicted value and a second predicted value corresponding to each pixel point in a first pixel region associated with the first image block; a second determination module 1004 for determining, based on the target information, a target prediction value corresponding to each pixel point in a second pixel region of the first image block.
[0174] Optionally, the third determination module 1004: a determination unit for determining a target weight combination based on the target information; a processing unit for performing a weighted addition process on the third predicted value and the fourth predicted value corresponding to each pixel point in the second pixel region based on the target weight value combination, to obtain a target predicted value corresponding to each pixel point in the second pixel region.
[0175] Optionally, the determining unit specifically: determining a first weight value combination as the target weight value combination when the first difference value is greater than the second difference value and / or the third difference value; determining a second weight value combination as the target weight value combination when the third difference value is smaller than the first difference value and the second difference value, or determining the target weight value combination based on the first difference value and the second difference value; determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value and the third difference value; and determining a fourth predicted value of each pixel point in the second pixel region as a target predicted value when the second difference value is smaller than the third difference value and the first difference value.
[0176] Optionally, the determining unit may further specifically: determining a third weight value combination as the target weight value combination when the third difference value is smaller than the first difference value and the second difference value, and when the first difference value is smaller than the second difference value; and determining a fourth weight value combination as the target weight value combination when the third difference value is smaller than the first difference value and the second difference value and the first difference value is greater than or equal to the second difference value.
[0177] Optionally, the determining unit may further specifically: determining a fifth weight value combination as the target weight value combination when the type of the first image block is a luminance block and the first difference value is greater than the second difference value and / or the third difference value; determining a sixth weight value combination as the target weight value combination when the type of the first image block is a color difference block and the first difference value is greater than the second difference value and / or the third difference value; determining a seventh weight value combination as the target weight value combination when the type of the first image block is a luminance block and the third difference value is smaller than the first difference value and the second difference value; and determining an eighth weight value combination as the target weight value combination when the type of the first image block is a chrominance block and the third difference value is smaller than the first difference value and the second difference value.
[0178] Optionally, the inter-frame prediction device 1000 further includes a third determination module, wherein the third determination module: performing a weighted addition process on the first predicted value and the second predicted value corresponding to each pixel point within the first pixel region to obtain a fifth predicted value for each pixel point; determining a third difference value corresponding to the first pixel region based on the fifth predicted value of each pixel point and the reconstructed value corresponding to each pixel point.
[0179] Optionally, the third determination module may further specifically: determining a sum of target absolute values corresponding to each pixel point in the first pixel region as the third difference value; or The step of determining the average value of the target absolute values corresponding to the pixel points in the first pixel region as the third difference value is used.
[0180] Optionally, the determining unit may further specifically: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; and determining a ninth weight value combination as the target weight value combination when the first difference value is equal to or greater than the second difference value.
[0181] Optionally, the determining unit may further specifically: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; and when the first difference value is equal to or greater than the second difference value, determining the target weight value combination based on the first difference value and the second difference value.
[0182] Optionally, the determining unit may further specifically: determining a tenth weight value combination as the target weight value combination when a calculation result between the first difference value and the second difference value is equal to or less than a first threshold value; and determining an eleventh weight value combination as the target weight value combination when the calculation result between the first difference value and the second difference value is greater than a first threshold value.
[0183] Optionally, the determining unit may further specifically: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; determining a ninth weight value combination as the target weight value combination when the first difference value is equal to the second difference value; and when the first difference value is greater than the second difference value, determining the target weight value combination based on the first difference value and the second difference value.
[0184] Optionally, the determining unit may further specifically: determining a tenth weight value combination as the target weight value combination when a calculation result between the first difference value and the second difference value is smaller than a second threshold value; and determining an eleventh weight value combination as the target weight value combination when the calculation result between the first difference value and the second difference value is equal to or greater than a second threshold value.
[0185] Optionally, the determining unit may further specifically: calculating the first difference value and the second difference value according to a predetermined calculation formula to obtain a calculation result; and determining the target weight combination based on the calculation result.
[0186] Optionally, the determining unit may further specifically: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the calculation result is equal to or less than a third threshold; determining a ninth weight value combination as the target weight value combination when the calculation result is equal to or greater than a fourth threshold; determining a tenth weight value combination as the target weight value combination when the calculation result is greater than a third threshold value and equal to or less than a fifth threshold value; and determining an eleventh weight value combination as the target weight value combination when the calculation result is greater than a fifth threshold value and less than a fourth threshold value.
[0187] In an embodiment of the present application, a first predicted value and a second predicted value are determined, the first predicted value being determined based on first motion information of a first image block, the second predicted value being determined based on second motion information of a second image block, and a target predicted value of a boundary pixel point being determined based on target information. Here, the target information includes a first difference value and a second difference value, and a magnitude relationship between the first difference value and the second difference value can indicate a motion difference between the first image block and the second image block. This fully takes into account the motion difference between the first image block and the second image block during modification of the boundary pixel point predicted value, thereby improving the accuracy of the modified boundary pixel point predicted value and further enhancing the efficiency of video encoding and decoding.
[0188] The inter-frame prediction device provided in the embodiment of the present application can implement each process implemented by the embodiment of the method of Fig. 3 and achieve the same technical effect, and detailed description will be omitted here to avoid duplication.
[0189] The inter-frame prediction device in the embodiments of the present application may be an electronic device, for example, an electronic device having 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., and is not specifically limited in the embodiments of the present application.
[0190] Optionally, as shown in Fig. 11, an embodiment of the present application further provides a communication device 1100. The communication device 1100 includes a processor 1101 and a memory 1102, and the memory 1102 stores programs or commands executable by the processor 1101. For example, when the communication device 1100 is a terminal, when the programs or commands are executed by the processor 1101, each step of the embodiment of the inter-frame prediction method described above can be realized, and similar technical effects can be achieved.
[0191] An embodiment of the present application further provides a terminal, the terminal including a processor and a communication interface, the processor: obtaining first motion information of a first image block and second motion information of a second image block; determining a first predicted value and a second predicted value corresponding to each pixel point within a first pixel region associated with the first image block; and determining a target predicted value corresponding to each pixel point in the second pixel region of the first image block based on the target information.
[0192] The terminal embodiment corresponds to the above-mentioned terminal-side method embodiment, and each implementation process and embodiment of the above-mentioned method embodiment can be applied to the terminal embodiment, and the same technical effects can be achieved. Specifically, Figure 12 is a hardware structure schematic diagram of the terminal implementing the embodiment of the present application.
[0193] The terminal 1200 includes components such as, but not limited to, a radio frequency unit 1201, a network module 1202, an audio output unit 1203, an input unit 1204, a sensor 1205, a display unit 1206, a user input unit 1207, an interface unit 1208, a memory 1209, and a processor 1210.
[0194] Those skilled in the art will understand that the terminal 1200 may further include a power source (e.g., a battery) for powering each component, and that the power source may be logically connected to the processor 1210 through 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. 12 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, and detailed description thereof will be omitted here.
[0195] It should be understood that in the embodiment of the present application, the input unit 1204 may include a graphics processing unit (GPU) 12041 for processing image data of still or video images captured by an image capture device (e.g., a camera) in a video capture mode or an image capture mode, and a microphone 12042. The display unit 1206 may include a display panel 12061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1207 includes at least one of a touch panel 12071 and other input devices 12072. The touch panel 12071 is also called a touch screen. The touch panel 12071 may include two parts: a touch detection device and a touch controller. The other input devices 12072 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.
[0196] In the embodiment of the present application, the radio frequency unit 1201 may receive downlink data from the network side device and then transmit the data to the processor 1210 for processing, and may also transmit uplink data to the network side device. Typically, the radio frequency unit 1201 includes, but is not limited to, an antenna, an amplifier, a receiver / transmitter, a coupler, a low-noise amplifier, a duplexer, etc.
[0197] The memory 1209 can be used to store software programs or commands and various data. The memory 1209 may mainly include a first storage area for storing programs or commands and a second storage area for storing data. The first storage area can store an operating system, an application program or commands required for at least one function (e.g., audio playback function, image playback function, etc.), etc. The memory 1209 can include volatile memory or nonvolatile memory, or both volatile memory and nonvolatile memory. The nonvolatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. 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 1209 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
[0198] The processor 1210 may include one or more processing units, and optionally, an application processor that mainly processes operations related to an operating system, a user interface, application programs, etc., and a modem processor that mainly processes wireless communication signals, such as a baseband processor, are integrated into the processor 1210. It is understandable that the modem processor does not have to be integrated into the processor 1210.
[0199] Here, the processor 1210: obtaining first motion information of a first image block and second motion information of a second image block; determining a first predicted value and a second predicted value corresponding to each pixel point within a first pixel region associated with the first image block; and determining a target predicted value corresponding to each pixel point in the second pixel region of the first image block based on the target information.
[0200] In an embodiment of the present application, a first predicted value and a second predicted value are determined, the first predicted value being determined based on first motion information of a first image block, the second predicted value being determined based on second motion information of a second image block, and a target predicted value of a boundary pixel point being determined based on target information. Here, the target information includes a first difference value and a second difference value, and a magnitude relationship between the first difference value and the second difference value can indicate a motion difference between the first image block and the second image block. This fully takes into account the motion difference between the first image block and the second image block during modification of the boundary pixel point predicted value, thereby improving the accuracy of the modified boundary pixel point predicted value and further enhancing the efficiency of video encoding and decoding.
[0201] 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.
[0202] Here, 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.
[0203] The embodiments of the present application further provide a chip, which includes a processor and a communication interface, and the communication interface and the processor are coupled together, and the processor is used to execute programs or commands to realize each process of the embodiments of the inter-frame prediction method, and can achieve similar technical effects. To avoid repetition, detailed descriptions are omitted here.
[0204] 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 systems on chips, and the like.
[0205] The embodiments of the present application further provide a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement each process of the embodiments of the inter-frame prediction method described above, and can achieve the same technical effects. To avoid repetition, detailed descriptions are omitted here.
[0206] 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 stated 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 methods 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.
[0207] From the above description of the 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. Of course, hardware implementation is also possible, but in many cases the former is a more preferred embodiment. Based on this view, the technical solutions of the present application can be essentially or in part contributed to the prior art can be 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, computer, server, air conditioner, network side device, etc.) to execute the methods described in each embodiment of the present application.
[0208] 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 first motion information of a first image block and second motion information of a second image block, the first image block being adjacent to the second image block; determining a first predicted value and a second predicted value corresponding to each pixel point in a first pixel region adjacent to the first image block, wherein the first predicted value is determined based on the first motion information and position information of the first pixel region, and the second predicted value is determined based on the second motion information and position information of the first pixel region; determining a target predicted value corresponding to each pixel point in a second pixel region of the first image block based on target information, the target information including a first difference value and a second difference value, the first difference value being a difference value determined based on a reconstructed value of each pixel point in the first pixel region and the first predicted value, and the second difference value being a difference value determined based on a reconstructed value of each pixel point in the first pixel region and the second predicted value; The 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.
2. The inter-frame prediction method of claim 1 , wherein the target information further includes a third difference value corresponding to the first pixel region, the third difference value being determined based on the first predicted value and the second predicted value.
3. The first pixel region is an encoded or decoded pixel region consisting of M1 rows and N1 columns adjacent to the upper side of the first image block; a coded or decoded pixel region consisting of M2 rows and N2 columns adjacent to the left of the first image block; 3. The inter-frame prediction method according to claim 1, wherein M1, M2, N1, and N2 are all positive integers.
4. determining a target predicted value corresponding to each pixel point in a second pixel region of the first image block based on target information, determining a target weight value combination based on the target information, the target weight value combination including at least one weight set, the weight set including a first weight value and a second weight value, the first weight value corresponding to a third predicted value of each pixel point in the second pixel region, the second weight value corresponding to a fourth predicted value of each pixel point in the second pixel region, the third predicted value being determined based on the first motion information, and the fourth predicted value being determined based on the second motion information; and performing a weighted addition process on the third predicted value and the fourth predicted value corresponding to each pixel point in the second pixel region based on the target weight value combination to obtain a target predicted value corresponding to each pixel point in the second pixel region.
5. The step of determining a target weight value combination based on the target information includes: determining a first weight value combination as the target weight value combination when the first difference value is greater than the second difference value and / or the third difference value; determining a second weight value combination as the target weight value combination when the third difference value is smaller than the first difference value and the second difference value, or determining the target weight value combination based on the first difference value and the second difference value; determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value and the third difference value; and determining a fourth predicted value of each pixel point in the second pixel region as a target predicted value when the second difference value is smaller than the third difference value and the first difference value.
6. The target information further includes a type of the first image block, and the step of determining a target weight value combination based on the target information includes: determining a fifth weight value combination as the target weight value combination when the type of the first image block is a luminance block and the first difference value is greater than the second difference value and / or the third difference value; determining a sixth weight value combination as the target weight value combination when the type of the first image block is a color difference block and the first difference value is greater than the second difference value and / or the third difference value; determining a seventh weight value combination as the target weight value combination when the type of the first image block is a luminance block and the third difference value is smaller than the first difference value and the second difference value; and determining an eighth weight value combination as the target weight value combination when the type of the first image block is a chrominance block and the third difference value is smaller than the first difference value and the second difference value.
7. performing a weighted addition process on the first predicted value and the second predicted value corresponding to each pixel point within the first pixel region to obtain a fifth predicted value for each pixel point; 3. The inter-frame prediction method according to claim 2, further comprising: determining a third difference value corresponding to the first pixel region based on the fifth predicted value of each pixel point and the reconstructed value corresponding to each pixel point.
8. determining a third difference value corresponding to the first pixel region based on a fifth predicted value of each pixel point and a reconstructed value corresponding to each pixel point, determining a sum of target absolute values corresponding to each pixel point in the first pixel region as the third difference value, wherein the target absolute value is an absolute value of a difference value between a fifth predicted value and a reconstructed value for each pixel point in the first pixel region; or The inter-frame prediction method according to claim 7 , further comprising the step of determining an average value of target absolute values corresponding to each pixel point in the first pixel region as the third difference value.
9. The step of determining a target weight value combination based on the target information includes: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; The inter-frame prediction method according to claim 4 , further comprising: determining a ninth weight value combination as the target weight value combination when the first difference value is equal to or greater than the second difference value.
10. The step of determining a target weight value combination based on the target information includes: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; 5. The inter-frame prediction method according to claim 4, further comprising: a step of determining the target weight value combination based on a calculation result between the first difference value and the second difference value when the first difference value is equal to or greater than the second difference value, the calculation result being intended to indicate a difference between the first difference value and the second difference value.
11. The step of determining the target weight value combination based on a calculation result between the first difference value and the second difference value includes: a step of determining a tenth weight value combination as the target weight value combination when a calculation result between the first difference value and the second difference value is equal to or less than a first threshold value, the first threshold value being a non-negative number; The inter-frame prediction method according to claim 10, further comprising: determining an eleventh weight value combination as the target weight value combination when a calculation result between the first difference value and the second difference value is greater than a first threshold value.
12. The step of determining a target weight value combination based on the target information includes: determining a third predicted value of each pixel point in the second pixel region as a target predicted value when the first difference value is smaller than the second difference value; determining a ninth weight value combination as the target weight value combination when the first difference value is equal to the second difference value; 5. The inter-frame prediction method according to claim 4, further comprising: a step of determining the target weight value combination based on a calculation result between the first difference value and the second difference value when the first difference value is greater than the second difference value, the calculation result being for indicating a difference between the first difference value and the second difference value.
13. The step of determining a target weight value combination based on the target information includes: calculating the first difference value and the second difference value to obtain a calculation result, the calculation result being for indicating a difference between the first difference value and the second difference value; The inter-frame prediction method according to claim 4 , further comprising: determining the target weight combination based on the calculation result.
14. A terminal including a processor and a memory, wherein the memory stores a program or command executable by the processor, and when the program or command is executed by the processor, the steps of the inter-frame prediction method according to claim 1 are realized.
15. A readable storage medium storing a program or commands that, when executed by a processor, implements the steps of the inter-frame prediction method according to claim 1.
Citation Information
Patent Citations
Video coding device and video decoding device
JP2020145486A
Adaptive inter prediction
WO2017035831A1
Encoding device, decoding device, encoding method, and decoding method
WO2019124191A1
Encoding device, decoding device, encoding method, and decoding method
WO2020213677A1