Interframe prediction method and terminal
The inter-frame prediction method corrects boundary pixel point predictions by considering motion differences between adjacent image blocks, addressing inaccuracies and enhancing video encoding and decoding efficiency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-25
AI Technical Summary
The correction of predicted values for boundary pixel points in video encoding and decoding using overlapped block motion compensation (OBMC) is often inaccurate, leading to decreased efficiency.
An inter-frame prediction method that involves determining first and second predicted values based on motion information of adjacent image blocks, and using target information including difference values to correct boundary pixel points, considering the motion difference between these blocks.
Improves the accuracy of boundary pixel point predictions and enhances the efficiency of video encoding and decoding by adequately accounting for motion differences between image blocks.
Smart Images

Figure 2026053645000001_ABST
Abstract
Description
Technical Field
[0001] (Cross - reference to related applications) This application claims the priority of Chinese Patent Application No. 202111566761.X filed in China on December 20, 2021, and the priority of Chinese Patent Application No. 202210233750.8 filed in China on March 10, 2022, and all of their contents are incorporated herein by reference.
[0002] This application belongs to the technical field of video encoding and decoding, and specifically relates to an inter - frame prediction method and a terminal.
Background Art
[0003] Currently, in the process of video encoding and decoding, when the boundary of an image block does not match the contour of the image block, an inter - frame prediction process is performed on the image block by the method of overlapped block motion compensation (OBMC), and the predicted value corresponding to the boundary pixel point of the image block can be corrected. In OBMC technology, weighting processing is performed on the predicted value obtained using the motion information of the image block and the predicted value obtained using the motion information of adjacent image blocks, and further the predicted value of the boundary pixel point is corrected.
[0004] However, in the process of correcting the predicted value of the boundary pixel point based on OBMC technology, the corrected predicted value of the boundary pixel point is likely to be inaccurate, and furthermore, the efficiency of video encoding and decoding decreases.
Summary of the Invention
Problems to be Solved by the Invention
[0005] Embodiments of this application provide an inter - frame prediction method and a terminal that can solve the technical problems that the correction of the predicted value of the boundary pixel point is inaccurate and the efficiency of video encoding and decoding decreases.
Means for Solving the Problems
[0006] In the first mode, A step of 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 step of 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 the position information of the first pixel region, and the second predicted value is determined based on the second motion information and the position information of the first pixel region. A 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, wherein the target information includes a first difference value and a second difference value, the first difference value is a difference value determined based on the reconstructed value of each pixel point in the first pixel region and the first predicted value, and the second difference value is 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 interframe prediction method in which the first image block is an image block to be encoded and the second image block is an encoded 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 the second embodiment, 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 acquisition module of 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 the position information of the first pixel region, and the second predicted value is determined based on the second motion information and the 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 the 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 interframe prediction device in which the first image block is an image block to be encoded and the second image block is an encoded 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 embodiment, a terminal is provided that includes a processor and 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 method described in the first embodiment are realized.
[0009] In a fourth embodiment, a readable storage medium is provided which stores a program or command that, when executed by a processor, realizes a step of the method described in the first embodiment.
[0010] In a fifth embodiment, a chip is provided that includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor executes a program or command to implement the method described in the first embodiment.
[0011] In a sixth embodiment, a computer program / program product is provided which is stored in a storage medium and executed by at least one processor to perform the steps of the method described in the first embodiment. [Effects of the Invention]
[0012] In the embodiments of this application, first motion information of a first image block and second motion information of a second image block are acquired, first and second predicted values corresponding to each pixel point in a first pixel region associated with the first image block are determined, and 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 the embodiments of this application, first and second predicted values are determined, the first predicted value is determined based on the first motion information of the first image block, the second predicted value is determined based on the second motion information of the second image block, and further, target predicted values for boundary pixel points are determined based on target information. Here, the target information includes first difference values and second difference values, and the magnitude relationship between the first difference value and the second difference value can indicate the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first and second image blocks during the correction of boundary pixel point predicted values, improving the accuracy of the corrected boundary pixel point predicted values and further increasing the efficiency of video coding and decoding. [Brief explanation of the drawing]
[0013] [Figure 1] This is a schematic diagram (part 1) of an application scenario for a conventional inter-frame prediction method. [Figure 2] This is a schematic diagram (part 2) of an application scenario for a conventional inter-frame prediction method. [Figure 3] This is a flowchart of the interframe prediction method provided in the embodiment of this application. [Figure 4] This is a schematic diagram (1) of an application scenario for the interframe prediction method provided in the embodiment of this application. [Figure 5] This is a schematic diagram (part 2) of an application scenario for the interframe prediction method provided in the embodiment of this application. [Figure 6] This is a schematic diagram (part 3) of an application scenario for the interframe prediction method provided in the embodiment of this application. [Figure 7] This is a schematic diagram (part 4) of an application scenario for the interframe prediction method provided in the embodiment of this application. [Figure 8]Schematic diagram (Part 5) of an application scenario of the inter-frame prediction method provided in an embodiment of the present application. [Figure 9] Schematic diagram (Part 6) of an application scenario of the inter-frame prediction method provided in an embodiment of the present application. [Figure 10] Structural diagram of an inter-frame prediction device provided in an embodiment of the present application. [Figure 11] Structural diagram of a communication device provided in an embodiment of the present application. [Figure 12] Schematic diagram of the hardware structure of a terminal provided in an embodiment of the present application.
Embodiments for Carrying Out the Invention
[0014] In the following, while referring to the drawings in the embodiments of the present application, the technical solution means in the embodiments of the present application will be clearly described. Of course, the described embodiments are part of the embodiments of the present application, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments in the present application shall fall within the protection scope of the present application.
[0015] Terms such as "first", "second", etc. in the specification and claims of the present application are not for explaining a specific order or sequence, but for distinguishing similar objects. When appropriately used, such terms may be replaced with each other so that the embodiments of the present application can be implemented in an order other than that illustrated or described in this specification. And the objects distinguished by "first" and "second" usually belong to one category, and the number of objects is not limited. For example, it should be understood that the first object may be one or more. Also, in the specification and claims, "and / or" represents at least one of the connected objects, and the symbol " / " generally represents that the related objects before and after are in an "or" relationship.
[0016] The attribute decoding device corresponding to the interframe prediction method in the embodiments of this application may be a terminal. The terminal may also be called a terminal device or user equipment (UE), and the terminal may be a mobile phone, tablet personal computer, laptop computer (also called a notebook computer), personal digital assistant (PDA), personal information terminal, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device or vehicle user equipment (VUE), pedestrian user equipment (PUE), smart home (home appliances with wireless communication functions, such as refrigerators, televisions, washing machines or furniture), game console, personal computer (personal The terminal equipment may be a computer (PC), an ATM or kiosk, and the wearable device includes smartwatches, smart wristbands, smart earphones, smart glasses, smart jewelry (smart bangles, smart bracelets, smart rings, smart necklaces, smart anklet bangles, smart anklets, etc.), smart wrist straps, smart wear, etc. It should be noted that the specific type of terminal is not limited in the embodiments of this application.
[0017] For ease of understanding, some of the details relating to the embodiments of this application are described below.
[0018] When the boundary of an image block does not match the contour of the current image block, the movement of the pixel points at the boundary of the current image block may match that of the current image block, or it may match that of an adjacent image block. The predicted value of the boundary pixel points determined based on the movement information of the current image block will differ significantly from the true predicted value, further reducing the efficiency of video encoding and decoding. Here, the current image block may be the block to be encoded, and the adjacent image block may be an already encoded block, or the current image block may be the block to be decoded, and the adjacent image block may be a decoded block.
[0019] Currently, the above technical challenges can be solved by correcting the predicted values of boundary pixel points of the current image block using OBMC technology. Here, OBMC technology is an inter-frame prediction method. OBMC technology will be explained in detail as follows.
[0020] In the first case, the inter-frame prediction mode for each pixel point in the current block is the same.
[0021] In this case, motion information for the adjacent image block is acquired when the adjacent image block is in inter-frame prediction mode rather than intra-block copy mode, and the motion mode of the adjacent image block does not match the motion mode of the current image block. Referring to Figure 1, the adjacent image block may be an image block adjacent to the above the current image block, or an image block adjacent to the left of the current image block.
[0022] Here, if any one of the following conditions 1, 2, or 3 is met, it can be determined that the motion mode of the adjacent image block does not match the motion mode of the current image block.
[0023] 1. The prediction direction of adjacent image blocks differs from that of the current image block.
[0024] 2. Adjacent image blocks have the same prediction direction as the current image block, but the reference frame pointed to by the prediction direction is different.
[0025] 3. Adjacent image blocks have the same prediction direction as the current image block and the same reference frame pointed to by the prediction direction, but the motion vector of the adjacent image block is different from that of the current image block.
[0026] After obtaining motion information for adjacent image blocks, a first predicted value is obtained based on the motion information of the current image block, and then a second predicted value is obtained based on the motion information of adjacent image blocks. Using the above first and second predicted values, the predicted values of the boundary pixel points of the current image block are corrected.
[0027] Specifically, if the current image block is a luminance subblock, the first and second predicted values can be weighted and added together using the following formula to obtain the corrected predicted value for boundary pixels.
number
number
number
number
[0028] In the formula, i represents the column coordinates of the boundary pixel point in the current image block, j represents the row coordinates 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 corrected predicted value of the boundary pixel point.
[0029] If the current image block is a chromaticity subblock, the first and second predicted values can be weighted and added together using the following formula to obtain the corrected predicted value for boundary pixels.
number
[0030] In the formula, NewPixel represents the predicted value after correction of boundary pixel points.
[0031] The application scenario corresponding to the above formula is one where the pixel region of the boundary pixel point is 4 rows or 4 columns. It should be understood that in other application scenarios, the pixel region of the boundary pixel point is not specifically limited.
[0032] In the second case, the current image block is an encoded block and the interframe prediction mode is affine mode, or the current image block is a decoded block and the interframe prediction mode is motion vector correction mode.
[0033] In this case, the movement information of the four adjacent image blocks—the ones above, below, to the left, and to the right of the current image block—is acquired. Please refer to Figure 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 if the current image block and the adjacent image block satisfy one of the following conditions 1, 2, or 3.
[0035] 1. The prediction direction of adjacent image blocks differs from that of the current image block.
[0036] 2. Adjacent image blocks have the same prediction direction as the current image block, but the reference frame pointed to by the prediction direction is different.
[0037] 3. Adjacent image blocks have the same prediction direction as the current image block and the same reference frame pointed to by the prediction direction, but the absolute value of the difference between the motion vector of the adjacent image block and the motion vector of the current image block is greater than a 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 described above. Specifically, a weighted addition process is performed on the first and second predicted values using the following formula to obtain the corrected predicted values of the boundary pixel points.
number
number
[0039] In the formula, i represents the column coordinates of the boundary pixel point in the current image block, j represents the row coordinates of the boundary pixel point in the current image block, subNewPixel represents the corrected predicted value of the boundary pixel point, and subPixel2 L subPixel 2 R subPixel 2 T and subPixel2 B represents a second predicted value determined based on the motion information of adjacent image blocks, width represents the number of columns of adjacent image blocks, height represents the number of rows of adjacent image blocks, and w represents a pre-set weight combination. Here, the weight combination corresponding when the current image block is a luminance block is different from the weight combination corresponding when the current image block is a chrominance block.
[0040] The application scenario corresponding to the above formula is one where the pixel region of the boundary pixel point is 4 rows or 4 columns. It should be understood that in other application scenarios, the pixel region of the boundary pixel point is not specifically limited.
[0041] In the above process of correcting boundary pixel point predictions using OBMC technology, the difference between the motion mode of the current image block and the motion mode of adjacent image blocks is not taken into consideration, resulting in inaccurate boundary pixel point predictions after correction, and further reducing the efficiency of video coding and decoding.
[0042] Due to the circumstances described above, improving the accuracy of the corrected boundary pixel point predictions and further enhancing the efficiency of video encoding and decoding are technical challenges that must be addressed.
[0043] To address the aforementioned technical challenges, embodiments of this application provide an interframe prediction method. The interframe prediction method provided in embodiments of this application will be described in detail below with reference to the drawings, through several embodiments and their application scenarios.
[0044] Please refer to Figure 3, which is a flowchart of the interframe prediction method provided in this application. The interframe prediction coding method provided in this embodiment includes the following steps S101, S102, and S103.
[0045] In S101, the first motion information of the first image block and the second motion information of the second image block are acquired.
[0046] The first image block described above is the image block to be encoded, and the second image block described above is an encoded image block adjacent to the first image block, or the first image block is the image block to be decoded, and the second image block described above is a decoded image block adjacent to the first image block. The first image block described above is in interframe prediction mode, and the first image block and the second image block satisfy one of the following conditions 1, 2, or 3.
[0047] 1. The prediction direction of the first image block is different from that of the second image block.
[0048] 2. The first image block has the same prediction direction as the second image block, but the reference frame indicated by the prediction direction is different.
[0049] 3. The first image block has the same prediction direction as the second image block, and the reference frame pointed to by the prediction direction is the same, 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 conditions, the first motion information of the first image block and the second motion information of the second image block are obtained.
[0051] In S102, a first predicted value and a second predicted value corresponding to each pixel point within the first pixel region associated with the first image block are determined.
[0052] The first pixel region described above is adjacent to the first image block, and may also be a part of the 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, then the first pixel region is a part of the pixel region in the second image block. The first pixel region does not have to be a part of the pixel region in the second image block.
[0053] It should be understood that motion information includes the predicted direction, reference frame information, and motion vectors. In this step, a first reference pixel point is determined based on the first motion information, and this first reference pixel point is located at a reconstructed pixel point in the same position as the first pixel region within the first reference frame. Furthermore, the reconstructed value of the pixel point in the first reference frame pointed to by the first motion vector can be determined as the first predicted value based on the first reference pixel point. A second reference pixel point is determined based on the second motion information, and this second reference pixel point is located at a reconstructed pixel point in the same position as the first pixel region within the second reference frame. Furthermore, the reconstructed value of the pixel point in the second reference frame pointed to by the second motion vector can be determined as the second predicted value based on the second reference pixel point.
[0054] In S103, based on the target information, the target predicted value corresponding to each pixel point in the second pixel region of the first image block is determined.
[0055] The above target information includes a first difference value and a second difference value, where the first difference value is the difference value 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 the second difference value determined based on the reconstructed value and the second predicted value of each pixel point in the first pixel region. Selectively, the first difference value may be the sum of the absolute values of the difference between the first predicted value and the reconstructed value of each pixel point, and the second difference value may be the sum of the absolute values of the difference between the second predicted value and the reconstructed value of each pixel point. Here, the first difference value is for indicating the motion mode of the first image block, and the second difference value is for indicating the motion mode of the second image block.
[0056] The second pixel region described above is a portion of the pixel region in the first image block, and each pixel point within 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 above the first image block, and Figure 5, which shows the position of the second pixel region when the first pixel region is to the left of the first image block. In other words, 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 target predicted value for each boundary pixel point can be determined using the first and second difference values corresponding to the first pixel region. For specific technical solutions, please refer to the embodiments described later. It should be understood that the above target predicted value is the corrected predicted value of the boundary pixel point.
[0058] In other embodiments, the interframe prediction method provided in the embodiments of this application may also be used to generate boundary pixel point prediction values for each subblock within an encoded block or a decoded block. In such embodiments, see Figure 6, where the first pixel region is a reconstructed pixel adjacent to the upper side of the encoded block corresponding to the column in which the subblock is located, or Figure 7, where the first pixel region is a reconstructed pixel adjacent to the left side of the encoded block corresponding to the row in which the subblock is located.
[0059] The video coding performance using the interframe prediction method provided in the embodiments of this application is higher than that of conventional interframe prediction methods for video coding. Please refer to Table 1 for a clearer understanding of the technical benefits of this application.
[0060] [Table 1]
[0061] The test sequences in Table 1 are obtained by comparing encoding using the inter-frame prediction method provided in the embodiment of this application with 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 encoding performance. A negative BD-Rate indicates high encoding performance, and the higher the absolute value of the numerical value corresponding to BD-Rate, the greater the gain due to encoding performance. From Table 1, it can be seen that the performance of video encoding using the inter-frame prediction method provided in the embodiment of this application is higher than the performance of video encoding using a conventional inter-frame prediction method.
[0062] In the embodiments of this application, first motion information of a first image block and second motion information of a second image block are acquired, first and second predicted values corresponding to each pixel point in a first pixel region associated with the first image block are determined, and 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 the embodiments of this application, first and second predicted values are determined, the first predicted value is determined based on the first motion information of the first image block, the second predicted value is determined based on the second motion information of the second image block, and further, target predicted values for boundary pixel points are determined based on target information. Here, the target information includes first difference values and second difference values, and the magnitude relationship between the first difference value and the second difference value can indicate the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first and second image blocks during the correction of boundary pixel point predicted values, improving the accuracy of the corrected boundary pixel point predicted values and further increasing the efficiency of video coding and decoding.
[0063] Selectively, 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 and second predicted values. For specific technical solutions for determining the third difference value, please refer to the embodiments described later.
[0064] Selectively, the first pixel region is, It is an encoded or decoded pixel region consisting of M1 rows and N1 columns adjacent to the upper side of the first image block, At least one of the following conditions is met: the first image block is an encoded or decoded pixel region consisting of M2 rows and N2 columns adjacent to the left side of the first image block, Here, M1, M2, N1, and N2 are all positive integers.
[0065] In one possible embodiment, 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. For ease of understanding, refer to Figure 8, in the scenario shown in Figure 8, the first pixel region is an encoded or decoded pixel region consisting of 1 row and 8 columns adjacent to the upper side of the first image block.
[0066] In another optional embodiment, the first pixel region is an encoded or decoded pixel region consisting of M2 rows and N2 columns adjacent to the left of the first image block. For ease of understanding, refer to Figure 9, in the scenario shown in Figure 9, the first pixel region is an encoded or decoded pixel region consisting of 8 rows and 1 column adjacent to the left of the first image block.
[0067] In another optional embodiment, the first pixel region may be an encoded or decoded pixel region consisting of some pixel points adjacent to the upper side of the first image block, and an encoded or decoded pixel region consisting of some pixel points adjacent to the left side of the first image block, in which case the first pixel region will be "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. This allows for sufficient consideration of the movement differences between the first image block and each image block adjacent to the first image block, thereby improving the accuracy of the corrected boundary pixel point prediction value.
[0069] The step of selectively determining a target predicted value corresponding to each pixel point in the second pixel region of the first image block, based on target information, The steps include determining a combination of target weight values based on the aforementioned target information, The process includes the step of performing a weighted addition process on the third and fourth predicted values corresponding to each pixel point in the second pixel region based on the aforementioned target weight value combination to obtain a target predicted value corresponding to each pixel point in the second pixel region.
[0070] The above target weight value combination includes at least one weight set, which includes a first weight value and a second weight value. Here, the first weight value corresponds to a third predicted value for each pixel point in the second pixel region, and 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 first motion information, and the fourth predicted value is determined based on second motion information.
[0071] Specifically, motion information includes a prediction direction, reference frame information, and a motion vector. Based on the first prediction direction and first reference frame information in the first motion information, a first reference frame is determined, which is either an encoded or decoded frame. The position indicated by the first motion vector in the first reference frame is determined, and the reconstructed value of the pixel point corresponding to that position can be determined as a third prediction value. Based on the second prediction direction and second reference frame information in the second motion information, a second reference frame is determined, which is either an encoded or decoded frame. The position indicated by the second motion vector in the second reference frame is determined, and the reconstructed value of the pixel point corresponding to that position can be determined as a fourth prediction value.
[0072] In this embodiment, after determining the target weight value combination, a weighted addition process is performed on the third and fourth predicted values corresponding to each pixel point in the second pixel region using the following formula to obtain the 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 section will specifically explain how to determine the target weight combination.
[0075] The step of selectively determining a combination of target weight values based on the target information is: The steps include determining the 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, If the third difference value is smaller than the first difference value and the second difference value, determine the second weight value combination as the target weight value combination, or determine the target weight value combination based on the first difference value and the second difference value. If the first difference value is smaller than the second difference value and the third difference value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. The method includes the step of determining a fourth predicted value for each pixel point in the second pixel region as a target predicted value if 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 combination is related to the relative magnitudes of the first, second, and third difference values.
[0077] In one selective embodiment, if the first difference value is greater than the second difference value and / or the third difference value, i.e., the first difference value is not the minimum value, a preset first weight value combination can be determined as the target weight value combination.
[0078] In one selective embodiment, if the third difference value is smaller than the first difference value and the second difference value, i.e., the third difference value is the minimum value, a preset second weight value combination can be determined as the target weight value combination.
[0079] In this embodiment, it should be understood that the relationship between the weight values included in the first weight value combination and the weight values included in the second weight value combination is not limited.
[0080] If the first image block is a luminance block and the second pixel region contains 4 rows with 8 pixel points in each row, the first weight value combination may be the same as the fifth weight value combination described below. If the first image block is a chrominance block and the second pixel region contains 1 row with 4 pixel points in that row, the first weight value combination may be the same as the sixth weight value combination described below.
[0081] The above uses the first weight value combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the first weight value combination.
[0082] If the first image block is a luminance block and the second pixel region contains two rows with eight pixel points in each row, the second weight value combination may be the same as the seventh weight value combination described below. If the first image block is a chrominance block and the second pixel region contains one row with four pixel points in that row, the second weight value combination may be the same as the eighth weight value combination described below.
[0083] The above uses the second weight value combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the second weight value combination.
[0084] In one selective 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, then 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 selective 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, then 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 value combinations are determined based on the relative magnitudes of the first difference value, the second difference value, and the third difference value, and these relative magnitudes can reflect the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the process of correcting boundary pixel point predictions using weight value combinations, thereby improving the accuracy of the corrected boundary pixel point predictions and further enhancing the efficiency of video encoding and decoding.
[0087] The step of selectively determining the target weight value combination based on the first difference value and the second difference value is: The steps include determining the 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 the first difference value is smaller than the second difference value, The process includes the step of determining a fourth weight value combination as the target weight value combination if 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, if the third difference value is the minimum value, the target weight value combination can also be determined based on the relative magnitudes of the first difference value and the second difference value.
[0089] In one selectable embodiment, when the third difference value is smaller than the first and second difference values, and the first difference value is smaller than the second difference value, i.e., the third difference value is the minimum and the second difference value is the maximum, a preset third weight value combination can be determined as the target weight value combination.
[0090] In another selectable embodiment, if the third difference value is smaller than the first and second difference values, and the first difference value is greater than or equal to the second difference value, a preset fourth weight value combination can be determined as the target weight value combination.
[0091] If the first image block is a luminance block and the second pixel region contains two rows with eight pixel points in each row, the third weight value combination may be the same as the twelfth weight value combination described below. If the first image block is a chrominance block and the second pixel region contains one row with four pixel points in that row, the third weight value combination may be the same as the thirteenth weight value combination described below.
[0092] The above uses the third weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the third weight combination.
[0093] If the first image block is a luminance block and the second pixel region contains two rows with eight pixel points in each row, the fourth weight value combination may be the same as the fourteenth weight value combination described below. If the first image block is a chrominance block and the second pixel region contains one row with four pixel points in that row, the fourth weight value combination may be the same as the fifteenth weight value combination described below.
[0094] The above uses the fourth weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the fourth weight combination.
[0095] In this embodiment, it should be understood that the relationship between the weight values included in the third weight value combination and the weight values included in the fourth weight value combination is not limited.
[0096] In this embodiment, different weight value combinations are determined based on the relative magnitudes of the first difference value, the second difference value, and the third difference value, and these relative magnitudes can reflect the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the process of correcting boundary pixel point predictions using weight value combinations, thereby improving the accuracy of the corrected boundary pixel point predictions and further enhancing the efficiency of video encoding and decoding.
[0097] Selectively, the target information further includes the type of the first image block, and the step of determining a target weight value combination based on the target information is: The steps include 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, The steps include 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, The steps include determining the 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, The process includes the step of 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 combinations of target weight values can also be set based on the type corresponding to the first image block.
[0099] In one selectable embodiment, if the type of the first image block is a luminance block and the first difference value is not the minimum value, a preset fifth weight value combination is determined as the target weight value combination. For example, if the video sequence image format is 4:2:0, the area of the chrominance block is one-quarter of the area of the luminance block, and if the size of the luminance block in the first image is 8x8, then the size of the chrominance block in the first image is 4x4.
[0100] Taking the example that the second pixel region is at the upper boundary of the first image block, and that the second pixel region of the luminance block of the first image contains 4 rows and each row has 8 pixel points, the above fifth weight value combination may be as follows.
number
number
number
number
[0101] The above uses the fifth weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the fifth weight combination.
[0102] If the type of the first image block is a color difference block and the first difference value is not the minimum value, a pre-set sixth weight value combination is determined as the target weight value combination.
[0103] For example, if the second pixel region of the color difference block of the first image contains one row and there are four pixel points in that row, the sixth weight value combination may be as follows.
number
[0104] The above uses the sixth weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the sixth weight combination.
[0105] The number of weights in the weight value combinations corresponding to color difference blocks may be less than or equal to the number of weights in the weight value combinations corresponding to luminance blocks, and this specification does not specifically limit them. The weights in the weight value combinations corresponding to color difference blocks may be a part of the weights in the weight value combinations corresponding to luminance blocks, or they may be other numerical values, and this specification does not specifically limit them.
[0106] In another selectable embodiment, when the type of the first image block is a luminance block and the third difference value is the minimum value, a preset seventh 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 contains two rows and each row has eight pixel points, the seventh weight value combination may be as follows.
number
number
[0108] The above uses the seventh weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the seventh weight combination.
[0109] If the type of the first image block is a color difference block and the third difference value is the minimum value, a pre-set eighth weight value combination is determined as the target weight value combination.
[0110] For example, if the second pixel region of the color difference block of the first image contains one row and there are four pixel points in that row, the eighth weight value combination may be as follows.
number
[0111] The above uses the eighth weight combination as an example simply because it is necessary to explain the technical solution in detail. It should be understood that this specification does not limit the numerical values included in the eighth weight combination.
[0112] In other embodiments, 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, a preset 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 contains two rows and each row has eight pixel points, the above 12th weight value combination may be as follows.
number
number
[0114] The above uses the 12th weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the 12th weight combination.
[0115] If the type of the first image block is a color difference block, the third difference value is the minimum value, and the first difference value is smaller than the second difference value, then a pre-set 13th weight value combination can be determined as the target weight value combination.
[0116] For example, if the second pixel region of the color difference block of the first image contains one row and there are four pixel points in that row, the above 13th weight value combination may be as follows.
number
[0117] The above uses the 13th weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the 13th weight combination.
[0118] In other embodiments, if 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, a 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 contains two rows and each row has eight pixel points, the above 14th weight value combination may be as follows.
number
number
number
[0120] The above uses the 14th weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the 14th weight combination.
[0121] If the type of the first image block is a color difference block, the third difference value is the minimum value, and the first difference value is greater than or equal to the second difference value, then a pre-set 15th weight value combination can be determined as the target weight value combination.
[0122] For example, if the second pixel region of the color difference block of the first image contains one row and there are four pixel points in that row, the above 15th weight value combination may be as follows.
number
[0123] The above uses the 15th weight value combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the 15th weight value combination.
[0124] In other embodiments, 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 value combinations are determined based on the relative magnitudes of the first difference value, the second difference value, and the third difference value, and these relative magnitudes can reflect the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the process of correcting boundary pixel point predictions using weight value combinations, thereby improving the accuracy of the corrected boundary pixel point predictions and further enhancing 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 within the first pixel region.
[0127] Selectively, the method further, The steps include performing a weighted addition process on the first and second predicted values corresponding to each pixel point within the first pixel region to obtain a fifth predicted value for each pixel point, The process includes the step of determining a third difference value corresponding to the first pixel region based on a fifth predicted value for each pixel point and a reconstruction value corresponding to each pixel point.
[0128] In this embodiment, for one pixel point within the first pixel region, a weighted addition process is performed on the first and second predicted values of the pixel point using the following formula to obtain a fifth predicted value for the pixel point.
number
number
number
[0129] In the formula, Pixel5 represents the fifth predicted value, w11 and w12 represent weight combinations, selectively 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, the third difference value corresponding to the first pixel region is determined based on the fifth predicted value and the reconstructed value corresponding to each pixel point. For specific technical solutions, please refer to the embodiments described later.
[0131] The step of selectively determining a third difference value corresponding to the first pixel region based on a fifth predicted value for each pixel point and a reconstruction value corresponding to each pixel point is: The step of determining the sum of the target absolute values corresponding to each pixel point in the first pixel region as the third difference value, or The process includes the step of determining the average value of the target absolute values corresponding to each pixel point within the first pixel region as the third difference value.
[0132] In this embodiment, as one selectable embodiment, for any one pixel point within the first pixel region, the absolute value of the difference between the fifth predicted value and the reconstructed value of that pixel point is calculated, and this absolute value is determined as the target absolute value corresponding to that pixel point. Furthermore, the sum of the target absolute values corresponding to each pixel point is determined as the third difference value corresponding to the first pixel region.
[0133] In another selectable 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 the embodiments of this application, the target weight value combination can also be determined based only on the first difference value and the second difference value.
[0135] The step of selectively determining a combination of target weight values based on the target information is: If the first difference value is smaller than the second difference value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. The process includes the step of determining the ninth weight value combination as the target weight value combination if the first difference value is greater than or equal to 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 that of 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 greater than or equal to the second difference value, the pre-set ninth weight value combination can be determined as the target weight value combination.
[0138] Selectively, taking as an example that the second pixel region is located 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 contains 4 rows and each row has 8 pixel points, then the ninth weight value combination may be the same as the fifth weight value combination.
[0139] Selectively, taking as an example that the second pixel region is located 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 contains one row and that row contains four pixel points, then the ninth weight value combination may be the same as the sixth weight value combination.
[0140] The above uses the ninth weight combination as an example simply because it is necessary to explain the technical solution in detail. It should be understood that this specification does not limit the numerical values included in the ninth weight combination.
[0141] In this embodiment, different weight value combinations are determined based on the relative magnitudes between the first difference value and the second difference value, and this relative magnitude can reflect the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the process of correcting boundary pixel point predictions using weight value combinations, thereby improving the accuracy of the corrected boundary pixel point predictions and further enhancing the efficiency of video encoding and decoding.
[0142] The step of selectively determining a combination of target weight values based on the target information is: If the first difference value is smaller than the second difference value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. The method includes the step of determining the target weight value combination based on the first difference value and the second difference value if the first difference value is greater than or equal to 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 that of 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 greater than or equal to the second difference value, the target weight value combination can be determined based on the first and second difference values. For specific technical solutions for determining the target weight value combination based on the first and second difference values, please refer to the embodiments described later.
[0145] In this embodiment, different weight value combinations are determined based on the relative magnitudes between the first difference value and the second difference value, and this relative magnitude can reflect the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the process of correcting boundary pixel point predictions using weight value combinations, thereby improving the accuracy of the corrected boundary pixel point predictions and further enhancing the efficiency of video encoding and decoding.
[0146] The step of selectively determining the target weight value combination based on the first difference value and the second difference value is: A step in which, if the calculation result between the first difference value and the second difference value is less than or equal to the first threshold, the tenth weight value combination is determined as the target weight value combination, wherein the first threshold is a non-negative number, The process includes the step of determining an eleventh weight value combination as the target weight value combination if the calculation result between the first difference value and the second difference value is greater than the first threshold.
[0147] In this embodiment, the first difference value and the second difference value can be calculated according to a pre-set calculation formula to obtain the calculation result, which is also called a relational parameter, and the calculation result is used to show the difference between the first difference value and the second difference value. In this embodiment, a first threshold value is also set in advance, and the first threshold value is a non-negative number, and selectively, the first threshold value is 0. If the calculation result is less than or equal to the first threshold value, a pre-set 10th weight value combination can be determined as the target weight value combination.
[0148] Selectively, taking as an example that the second pixel region is located 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 contains four rows and each row has eight pixel points, then the tenth weight value combination may be the same as the fifth weight value combination.
[0149] Selectively, taking as an example that the second pixel region is located 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 contains one row and that row has four pixel points, then the above 10th weight value combination may be as follows.
number
[0150] The above uses the 10th weight value combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the 10th weight value combination.
[0151] If the calculation result is greater than the first threshold, a pre-set 11th weight value combination can be determined as the target weight value combination.
[0152] Selectively, taking as an example that the second pixel region is located 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 contains 4 rows and each row has 8 pixel points, then the 11th weight value combination may be the same as the 7th weight value combination.
[0153] Selectively, taking as an example that the second pixel region is located 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 contains one row and there are four pixel points in that row, then the 11th weight value combination may be the same as the 8th weight value combination.
[0154] The above uses the 11th weight combination as an example only because it is necessary to explain the technical solution in detail, and it should be understood that this specification does not limit the numerical values included in the 11th weight combination.
[0155] The step of selectively determining a combination of target weight values based on the target information is: If the first difference value is smaller than the second difference value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. The step of determining the ninth weight value combination as the target weight value combination when the first difference value is equal to the second difference value, The method includes the step of determining the target weight value combination based on the first difference value and the second difference value if the first difference value is greater than 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 that of 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 predetermined 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 and second difference values.
[0158] In this embodiment, different weight value combinations are determined based on the relative magnitudes between the first difference value and the second difference value, and this relative magnitude can reflect the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the process of correcting boundary pixel point predictions using weight value combinations, thereby improving the accuracy of the corrected boundary pixel point predictions and further enhancing the efficiency of video encoding and decoding.
[0159] The step of selectively determining the target weight value combination based on the first difference value and the second difference value is: The steps include determining the tenth weight value combination as the target weight value combination when the calculation result between the first difference value and the second difference value is smaller than the second threshold, The process includes the step of determining the 11th weight value combination as the target weight value combination if the calculation result between the first difference value and the second difference value is greater than or equal to the second threshold.
[0160] In this embodiment, the first difference value and the second difference value can be calculated according to a pre-set calculation formula to obtain the calculation result, and the above calculation result is also called a relational parameter. In this embodiment, a second threshold is further set in advance, and the above second threshold may be the same as the first threshold. If the calculation result is smaller than the second threshold, a pre-set 10th weight value combination can be determined as the target weight value combination. As described above, when the first image block is a luminance block, the above 10th weight value combination may be the same as the 5th weight value combination.
[0161] If the calculation result is equal to or greater than the second threshold, a pre-set 11th 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 11th weight value combination may be the same as the 7th weight value combination, and if the first image block is a chrominance block, the 11th weight value combination may be the same as the 8th weight value combination.
[0162] The step of selectively determining a combination of target weight values based on the target information is: The steps include: calculating the first difference value and the second difference value according to a pre-set calculation formula to obtain the calculation result; The process includes the step of determining the target weight value combination based on the calculation results.
[0163] In this embodiment, the first difference value and the second difference value can be calculated directly according to a predetermined calculation formula to obtain the calculation result. Here, the calculation formula may be subtraction or division. In other words, the calculation result may be the result of subtraction between the first difference value and the second difference value, or the result of division between the first difference value and the second difference value, or it may be any other type of calculation method, and this embodiment is not specifically limited to it.
[0164] After obtaining the calculation results, the target weight value combination is determined based on those results.
[0165] In this embodiment, different weight value combinations are determined based on the calculation results between the first difference value and the second difference value, and the magnitude relationship can reflect the motion difference between the first image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the process of correcting the boundary pixel point prediction value using the weight value combination, thereby improving the accuracy of the corrected boundary pixel point prediction value and further enhancing the efficiency of video encoding and decoding.
[0166] The step of selectively determining the target weight value combination based on the calculation results is: If the calculation result is less than or equal to the third threshold, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. If the calculation result is greater than or equal to the fourth threshold, the ninth weight value combination is determined as the target weight value combination. If the calculation result is greater than the third threshold and less than or equal to the fifth threshold, the step of determining the tenth weight value combination as the target weight value combination, The method includes the step of determining the 11th weight value combination as the target weight value combination if the calculation result is greater than the 5th threshold and less than the 4th threshold.
[0167] In this embodiment, a third threshold, a fourth threshold, and a fifth threshold are set in advance, and all of the third, fourth, and fifth thresholds are non-negative numbers, with the third threshold being smaller than the fifth threshold and the fifth threshold being smaller than the fourth threshold.
[0168] If the calculation result is below the third threshold, the third predicted value for the boundary pixel point is determined as the target predicted value.
[0169] If the calculation result is greater than or equal to the fourth threshold, the pre-set 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, the pre-set 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, the pre-set 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 interframe prediction method provided in the embodiments of this application may be implemented by an interframe prediction device. In the embodiments of this application, the interframe prediction device provided in the embodiments of this application will be described as an example in which the interframe prediction device executes the interframe prediction method.
[0173] As shown in Figure 10, the interframe prediction device 1000 is An acquisition module 1001 for acquiring first motion information of the first image block and second motion information of the 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, The system includes a second determination module 1004 for determining a target predicted value corresponding to each pixel point in the second pixel region of the first image block based on target information.
[0174] Selectively, the third decision module 1004, A decision unit for determining a combination of target weight values based on the aforementioned target information, The system includes a processing unit that performs weighted addition on the third and fourth predicted values corresponding to each pixel point in the second pixel region based on the aforementioned target weight value combination, in order to obtain a target predicted value corresponding to each pixel point in the second pixel region.
[0175] Selectively, the decision unit specifically, The steps include determining the 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, If the third difference value is smaller than the first difference value and the second difference value, determine the second weight value combination as the target weight value combination, or determine the target weight value combination based on the first difference value and the second difference value. If the first difference value is smaller than the second difference value and the third difference value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. This is used in the step of determining a fourth predicted value for 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] Selectively, the decision unit further specifically: The steps include determining the 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 the first difference value is smaller than the second difference value, This is used in the step of determining the 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] Selectively, the decision unit further specifically: The steps include 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, The steps include 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, The steps include determining the 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, This is used in the step of determining the 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.
[0178] Selectively, the interframe prediction device 1000 further includes a third decision module, the third decision module is The steps include performing a weighted addition process on the first and second predicted values corresponding to each pixel point within the first pixel region to obtain a fifth predicted value for each pixel point, This is used in the step of determining a third difference value corresponding to the first pixel region based on the fifth predicted value of each pixel point and the reconstruction value corresponding to each pixel point.
[0179] Selectively, the third decision module further specifically: The step of determining the sum of the target absolute values corresponding to each pixel point in the first pixel region as the third difference value, or This is used in the step of determining the average value of the target absolute values corresponding to each pixel point within the first pixel region as the third difference value.
[0180] Selectively, the decision unit further specifically: If the first difference value is smaller than the second difference value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. This is used in the step of determining the ninth weight value combination as the target weight value combination when the first difference value is greater than or equal to the second difference value.
[0181] Selectively, the decision unit further specifically: If the first difference value is smaller than the second difference value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. This is used in the step of determining the target weight value combination based on the first difference value and the second difference value when the first difference value is greater than or equal to the second difference value.
[0182] Selectively, the decision unit further specifically: If the calculation result between the first difference value and the second difference value is less than or equal to the first threshold, the step of determining the tenth weight value combination as the target weight value combination, This is used in the step of determining the 11th 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 the first threshold.
[0183] Selectively, the decision unit further specifically: If the first difference value is smaller than the second difference value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. The step of determining the ninth weight value combination as the target weight value combination when the first difference value is equal to the second difference value, This is used in the step of determining the target weight value combination based on the first difference value and the second difference value when the first difference value is greater than the second difference value.
[0184] Selectively, the decision unit further specifically: The steps include determining the tenth weight value combination as the target weight value combination when the calculation result between the first difference value and the second difference value is smaller than the second threshold, This is used in the step of determining the 11th 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 or equal to the second threshold.
[0185] Selectively, the decision unit further specifically: The steps include: calculating the first difference value and the second difference value according to a pre-set calculation formula to obtain the calculation result; This is used in the step of determining the target weight value combination based on the calculation results.
[0186] Selectively, the decision unit further specifically: If the calculation result is less than or equal to the third threshold, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. If the calculation result is greater than or equal to the fourth threshold, the ninth weight value combination is determined as the target weight value combination. If the calculation result is greater than the third threshold and less than or equal to the fifth threshold, the step of determining the tenth weight value combination as the target weight value combination, This is used in the step of determining the 11th weight value combination as the target weight value combination when the calculation result is greater than the 5th threshold and less than the 4th threshold.
[0187] In the embodiment of this application, a first predicted value and a second predicted value are determined, the first predicted value is determined based on first motion information of the first image block, the second predicted value is determined based on second motion information of the second image block, and further, a target predicted value of the boundary pixel point is determined based on 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 image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the correction of the boundary pixel point predicted value, thereby improving the accuracy of the corrected boundary pixel point predicted value and further increasing the efficiency of video encoding and decoding.
[0188] The interframe prediction device provided in the embodiment of this application can implement each process realized by the embodiment of the method shown in Figure 3 and achieve similar technical effects. To avoid redundancy, a detailed explanation is omitted here.
[0189] The interframe prediction device in the embodiments of this 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. Exemplarily, a terminal may include, but is not limited to, the types of terminals listed above, and other devices may be a server, network-attached storage (NAS), etc., and are not specifically limited in the embodiments of this application.
[0190] Selectively, as shown in Figure 11, embodiments of this application further provide a communication device 1100, which includes a processor 1101 and a memory 1102, the memory 1102 storing a program or command executable by the processor 1101. For example, if the communication device 1100 is a terminal, when the program or command is executed by the processor 1101, each step of the embodiment of the interframe prediction method described above can be realized and similar technical effects can be achieved.
[0191] Embodiments of this application further provide a terminal, which includes a processor and a communication interface, the processor being An operation to acquire the first motion information of the first image block and the second motion information of the second image block, An operation to determine a first predicted value and a second predicted value corresponding to each pixel point in the first pixel region associated with the first image block, This is used to perform the operation of determining a target predicted value corresponding to each pixel point in the second pixel region of the first image block based on target information.
[0192] The embodiment of the terminal corresponds to the embodiment of the terminal-side method described above, and each implementation process and embodiment of the embodiment of the method described above can be applied to the embodiment of the terminal and achieve similar technical effects. Specifically, Figure 12 is a schematic diagram of the hardware structure of a terminal realizing the embodiment of this application.
[0193] The terminal 1200 includes, but is not limited to, components such as a high-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 supply (e.g., a battery) to power each component, and that the power supply is logically connected to the processor 1210 by a power management system, and that the power management system can further implement functions such as charge / discharge management and power consumption management. The terminal structure shown in Figure 12 is not limiting to terminals, and the terminal may include more or fewer components than shown, or combinations of some components, or different component arrangements, and a detailed explanation is omitted here.
[0195] In the embodiments of this application, it should be understood that the input unit 1204 may include a graphics processing unit (GPU) 12041 and a microphone 12042, which process still images or video image data acquired by an image capture device (e.g., a camera) in video capture mode or image capture mode. The display unit 1206 may include a display panel 12061, which may be in the form of a liquid crystal display, organic light-emitting diodes, etc. 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 touchscreen. The touch panel 12071 may include two parts: a touch detection device and a touch controller. 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, or an operating lever, and a detailed description is omitted here.
[0196] In the embodiments of this application, the high-frequency unit 1201 may receive downlink data from network-side equipment and then transmit it to the processor 1210 for processing, or the high-frequency unit 1201 may transmit uplink data to network-side equipment. Typically, the high-frequency unit 1201 includes, but is not limited to, an antenna, amplifier, transmitter / receiver, coupler, low-noise amplifier, duplexer, etc.
[0197] Memory 1209 can be used to store software programs or commands and various data. 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 of which can store an operating system, an application program or command necessary for at least one function (e.g., audio playback function, image playback function, etc.). Memory 1209 may also include volatile memory or non-volatile memory, or both volatile and non-volatile memory. Among these, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), or flash memory. The 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). The memory 1209 in the embodiments of this application includes, but is not limited to, these memories and any other suitable type of memory.
[0198] The processor 1210 may include one or more processing units, and optionally, the processor 1210 may integrate an application processor that primarily handles operations related to the operating system, user interface, and application programs, and a modem processor that primarily handles wireless communication signals, such as a baseband processor. It is understood that the above-mentioned modem processor does not necessarily have to be integrated into the processor 1210.
[0199] Here, processor 1210, An operation to acquire the first motion information of the first image block and the second motion information of the second image block, An operation to determine a first predicted value and a second predicted value corresponding to each pixel point in the first pixel region associated with the first image block, This is used to perform the operation of determining a target predicted value corresponding to each pixel point in the second pixel region of the first image block based on target information.
[0200] In the embodiment of this application, a first predicted value and a second predicted value are determined, the first predicted value is determined based on first motion information of the first image block, the second predicted value is determined based on second motion information of the second image block, and further, a target predicted value of the boundary pixel point is determined based on 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 image block and the second image block. This allows for sufficient consideration of the motion difference between the first image block and the second image block during the correction of the boundary pixel point predicted value, thereby improving the accuracy of the corrected boundary pixel point predicted value and further increasing the efficiency of video encoding and decoding.
[0201] Embodiments of this application further provide a readable storage medium. The readable storage medium stores a program or command, and when the program or command is executed by a processor, each process of the embodiment of the interframe prediction method described above is realized, and similar technical effects can be achieved. To avoid redundancy, a detailed explanation is omitted here.
[0202] Here, the processor is the processor in the terminal described in the above embodiment. The readable storage medium includes, for example, 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] Embodiments of this application further provide a chip comprising a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to execute a program or command and implement each process of the embodiment of the interframe prediction method described above, and can achieve similar technical effects. To avoid redundancy, a detailed explanation is omitted here.
[0204] It should be understood that the chips referred to in the embodiments of this application may further be called system-level chips, system chips, chip systems, or system-on-a-chip, etc.
[0205] Embodiments of this application further provide computer programs / program products. These computer programs / program products are stored in a storage medium and are executed by at least one processor to implement each process of the embodiments of the interframe prediction method described above, and can achieve similar technical effects. To avoid redundancy, a detailed explanation is omitted here.
[0206] It should be noted that, in this specification, the terms “including,” “consisting of,” or any other variation thereof are intended to include non-exclusive inclusion, thereby meaning that a process, method, article, or apparatus containing a set of elements includes not only those elements but also other elements not explicitly stated, or elements specific to such process, method, article, or apparatus. Unless otherwise specified, an element limited by the phrase “including one…” does not preclude the existence of other identical elements in a process, method, article, or apparatus containing that element. It should also be noted that the scope of methods and apparatus in embodiments of this application is not limited to performing functions in the order illustrated or discussed, but may include performing functions substantially simultaneously or in reverse order depending on the function. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Also, features described by reference to one example may be combined in another example.
[0207] From the above description of the embodiments, it will be clear to those skilled in the art that the methods of the above embodiments can be implemented in the form of a combination of software and a necessary common hardware platform. Of course, they may also be implemented in hardware, but in many cases the former is a more preferred embodiment. Based on this view, the technical solutions of the present application can be implemented 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 number of commands that cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network-side device, etc.) to execute the methods of each embodiment of the present application.
[0208] Although embodiments of this application have been described above with reference to the drawings, this application is not limited to the above-described specific embodiments. The above-described specific embodiments are merely illustrative and not limiting. Many forms that a person skilled in the art could make based on the suggestions of this application without departing from the spirit of this application and the scope of protection of the claims are all within the scope of protection of this application.
Claims
1. A step of 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 step of 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 the position information of the pixel point in the first pixel region, and the second predicted value is determined based on the second motion information and the position information of the pixel point in the first pixel region. A 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, wherein the target information includes a first value and a second value, the first value is determined based on the difference between the reconstructed value and the first predicted value of each pixel point in the first pixel region, and the second value is determined based on the difference between the reconstructed value and the second predicted value of each pixel point in the first pixel region, The first image block is the image block to be encoded, and the second image block is the encoded image block, or the first image block is the image block to be decoded, and the second image block is the decoded image block. An inter-frame prediction method wherein the first pixel region includes at least a portion of the pixel region in the second image block, and the second pixel region includes at least a portion of the pixel region in the first image block.
2. The interframe prediction method according to claim 1, wherein the target information further includes a third value corresponding to the first pixel region, which is determined based on the difference between the first predicted value and the second predicted value.
3. The first pixel region is, It is an encoded or decoded pixel region consisting of M1 rows and N1 columns adjacent to the upper side of the first image block, It satisfies one of the following conditions: it is an encoded or decoded pixel region consisting of M2 rows and N2 columns adjacent to the left side of the first image block, The interframe prediction method according to claim 1, wherein M1, M2, N1, and N2 are all positive integers.
4. The step of determining a target predicted value corresponding to each pixel point in the second pixel region of the first image block based on target information is: A step of determining a target weight value combination based on the target information, wherein the target weight value combination includes at least one weight set, the weight set includes a first weight value and a second weight value, 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. The interframe prediction method according to claim 2, comprising the step of performing a weighted addition process on the third and fourth predicted values corresponding to each pixel point in the second pixel region based on the aforementioned combination of target weight values to obtain a target predicted value corresponding to each pixel point in the second pixel region.
5. The step of determining a combination of target weight values based on the aforementioned target information is: The interframe prediction method according to claim 4, comprising the step of determining the first weight value combination as the target weight value combination when the first value is greater than the second value and / or third value.
6. The step of determining a combination of target weight values based on the aforementioned target information is: The interframe prediction method according to claim 4, comprising the step of determining a second weight value combination as the target weight value combination when the third value is smaller than the first value and the second value.
7. If the first value is smaller than the second and third values, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value, or If the second value is smaller than the third value and the first value, the fourth predicted value for each pixel point in the second pixel region is determined as the target predicted value. The interframe prediction method according to claim 2, comprising the steps of determining the third predicted value based on the first motion information and determining the fourth predicted value based on the second motion information.
8. The target information further includes the type of the first image block, and the step of determining a target weight value combination based on the target information is: The steps include 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 value is greater than the second value and / or third value, The interframe prediction method according to claim 4, comprising the step of 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 value is greater than the second value and / or third value.
9. The target information further includes the type of the first image block, and the step of determining a target weight value combination based on the target information is: The steps include determining the 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 value is smaller than the first value and the second value, The interframe prediction method according to claim 4, comprising the step of 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 value is smaller than the first value and the second value.
10. The steps include performing a weighted addition process on the first and second predicted values corresponding to each pixel point within the first pixel region to obtain a fifth predicted value for each pixel point, The interframe prediction method according to claim 2, further comprising the step of determining a third value corresponding to the first pixel region based on a fifth predicted value for each of the aforementioned pixel points and a reconstruction value corresponding to each of the aforementioned pixel points.
11. The step of determining a third value corresponding to the first pixel region based on the fifth predicted value of each pixel point and the reconstruction value corresponding to each pixel point is as follows: A step of determining the third value as the sum of the target absolute values corresponding to each pixel point in the first pixel region, wherein the target absolute value is the absolute value between the fifth predicted value and the reconstructed value for each pixel point in the first pixel region, or The interframe prediction method according to claim 10, comprising the step of determining the average value of the target absolute values corresponding to each pixel point in the first pixel region as the third value.
12. The step of determining a combination of target weight values based on the aforementioned target information is: If the first value is smaller than the second value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. The interframe prediction method according to claim 4, comprising the step of determining a ninth weight value combination as the target weight value combination when the first value is equal to or greater than the second value.
13. The step of determining a combination of target weight values based on the aforementioned target information is: If the first value is smaller than the second value, the third predicted value for each pixel point in the second pixel region is determined as the target predicted value. The interframe prediction method according to claim 4, comprising the step of determining the target weight value combination based on a calculation result between the first value and the second value when the first value is greater than or equal to the second value, wherein the calculation result is for indicating the difference between the first value and the second value.
14. A terminal comprising a processor and 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 interframe prediction method described in any one of claims 1 to 13 are realized.
15. A computer-readable storage medium storing a program or command that, when executed by a processor, implements the steps of the interframe prediction method described in any one of claims 1 to 13.
Citation Information
Patent Citations
Video coding device and video decoding device
JP2020145486A
Constraint for template matching in decoder side motion derivation and refinement
US20200021833A1
Overlapped block motion compensation
US20210185353A1
Adaptive inter prediction
WO2017035831A1
Encoding device, decoding device, encoding method, and decoding method
WO2019124191A1