Inter prediction method, apparatus and device based on advanced motion vector representation
By constructing a basic motion information list and using the offset distance and direction list to determine the offset motion vector, the problem of inaccurate deduplication in inter-frame prediction is solved, the accuracy and efficiency of deduplication are improved, and the amount of data processing is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2020-07-30
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, the deduplication process during inter-frame prediction is inaccurate, resulting in a high probability of repetition of basic motion information, which increases the amount of data processing and reduces efficiency.
An inter-frame prediction method based on high-level motion vector representation is adopted. By constructing a basic motion information list, multiple offset motion vectors are determined using offset distance and direction lists. The basic motion vectors are offset, and the offset prediction value is calculated to improve the accuracy of plagiarism detection.
This reduces the probability of repetition of basic motion information, lowers the amount of data computation, and improves the efficiency of inter-frame prediction.
Smart Images

Figure CN112040242B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing technology, and in particular relates to inter-frame prediction methods, apparatus and devices based on high-level motion vector representation. Background Technology
[0002] Video encoding and decoding systems mainly consist of three parts: encoding, transmission, and decoding. Among them, because video images have a large amount of data, the main function of video encoding is to compress video pixel data (RGB, YUV, etc.) into a video bitstream, thereby reducing the amount of video data and achieving the purpose of reducing network bandwidth and storage space during transmission.
[0003] Video coding systems are mainly divided into several parts: video acquisition, prediction, transform quantization, and entropy coding. Prediction is divided into intra-frame prediction and inter-frame prediction, which are used to remove spatial and temporal redundancy in video images, respectively.
[0004] Generally, the luminance and chrominance signal values of pixels in temporally adjacent frames are relatively close and have a strong correlation. Inter-frame prediction uses methods such as motion search to find the closest matching block in the reference frame and records the motion information between the current block and the matching block, such as the motion vector (MV) and the reference frame index. The motion information is encoded and transmitted to the decoder. At the decoder, the decoder only needs to parse the MV of the current block through the corresponding syntax elements to find the matching block and copy the pixel values of the matching block to the current block, which is the inter-frame prediction value of the current block. Summary of the Invention
[0005] The main technical problem addressed in this application is to improve the accuracy of plagiarism detection by providing a prediction method, encoder / decoder, and device based on motion information adjustment.
[0006] To address the aforementioned technical problems, this application adopts the following technical solution: an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block using enhanced deduplication, the basic motion information list including at least one basic motion information; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; and calculating the offset prediction value of the current block using the multiple offset motion information.
[0007] This application also includes a second technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, an offset motion vector determination module, an offset motion information acquisition module, and a calculation module. The construction module is used to construct a basic motion information list for the current block using enhanced deduplication, the basic motion information list including at least one basic motion information. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information.
[0008] This application also includes a third technical solution, an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block, the basic motion information list including at least two basic motion information; calculating new basic motion information using at least two basic motion information and filling it into the basic motion information list; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; and calculating the offset prediction value of the current block using the multiple offset motion information.
[0009] This application also includes a fourth technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, a filling module, an offset motion vector determination module, an offset motion information acquisition module, and a calculation module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least two basic motion information items. The filling module is used to calculate new basic motion information using at least two basic motion information items and fill it into the basic motion information list. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information item using multiple offset motion vectors to obtain multiple offset motion information items. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information items.
[0010] This application also includes a fifth technical solution: an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block based on candidate motion information of the current block, the basic motion information list including at least one basic motion information, the source of candidate motion information including temporal candidate blocks of the current block, the temporal candidate blocks including temporal co-location blocks of at least one sub-block of the current block; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; and calculating the offset prediction value of the current block using the multiple offset motion information.
[0011] This application also includes a sixth technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, an offset motion vector determination module, an offset motion information acquisition module, and a calculation module. The construction module is used to construct a basic motion information list for the current block based on candidate motion information of the current block. The basic motion information list includes at least one basic motion information. The sources of the candidate motion information include temporal candidate blocks of the current block, and the temporal candidate blocks include temporal co-location blocks of at least one sub-block of the current block. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information.
[0012] This application also includes a seventh technical solution: an inter-frame prediction method based on high-level motion vector representation. The method includes: constructing a basic motion information list for the current block based on candidate motion information of the current block, wherein the basic motion information list includes at least one basic motion information and the source of the candidate motion information includes at least one historical motion vector; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; and calculating the offset prediction value of the current block using the multiple offset motion information.
[0013] This application also includes an eighth technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, an offset motion vector determination module, an offset motion information acquisition module, and a calculation module. The construction module is used to construct a basic motion information list for the current block based on candidate motion information of the current block. The basic motion information list includes at least one basic motion information, and the source of the candidate motion information includes at least one historical motion vector. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information.
[0014] This application also includes a ninth technical solution: an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block, the basic motion information list including at least one basic motion information; scaling the basic motion information to a specified precision and filling the basic motion information list with the scaled basic motion information; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; and calculating the offset prediction value of the current block using the multiple offset motion information.
[0015] This application also includes a tenth technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, a filling module, an offset motion vector determination module, an offset motion information acquisition module, and a calculation module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least one basic motion information. The filling module is used to scale the basic motion information to a specified precision and fill the scaled basic motion information into the basic motion information list. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information.
[0016] This application also includes an eleventh technical solution: an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block, the basic motion information list including at least one basic motion information; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; calculating the offset prediction value of the current block using the multiple offset motion information; performing a coarse selection on the multiple offset motion information based on the offset prediction value to obtain a coarse selection result; using the coarse selection result as a starting point, performing motion search according to preset different motion vector accuracies to obtain multiple search prediction values; and selecting the motion information corresponding to the search prediction value with the smallest evaluation index as the high-level motion vector representation motion information of the current block.
[0017] This application also includes a twelfth technical solution: an inter-frame prediction device based on advanced motion vector representation, comprising a construction module, an offset motion vector determination module, an offset motion information acquisition module, a calculation module, a coarse selection module, a search prediction value acquisition module, and an advanced motion vector representation motion information acquisition module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least one basic motion information. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information. The coarse selection module is used to perform coarse selection on the multiple offset motion information based on the offset prediction value to obtain a coarse selection result. The search prediction value acquisition module is used to perform motion search based on the coarse selection result and different preset motion vector accuracies to obtain multiple search prediction values. The advanced motion vector representation motion information acquisition module is used to select the motion information corresponding to the search prediction value with the smallest evaluation index as the advanced motion vector representation motion information of the current block.
[0018] This application also includes a thirteenth technical solution: an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block, the basic motion information list including at least one basic motion information; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; calculating the offset prediction value of the current block using the multiple offset motion information; selecting target motion information from the multiple offset motion information based on the offset prediction value; correcting the motion vectors in the target motion information using multiple corrected motion vectors to obtain multiple corrected motion information; calculating the corrected prediction value of the current block using the multiple corrected motion information; and selecting the motion information corresponding to the corrected prediction value with the smallest evaluation index as the high-level motion vector representation motion information of the current block.
[0019] This application also includes a fourteenth technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, an offset motion vector determination module, an offset motion information acquisition module, a calculation module, a selection module, a correction module, a correction calculation module, and a high-level motion vector representation motion information acquisition module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least one basic motion information. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information. The selection module is used to select target motion information from the multiple offset motion information based on the offset prediction value. The correction module is used to correct the motion vectors in the target motion information using multiple corrected motion vectors to obtain multiple corrected motion information. The correction calculation module is used to calculate the corrected prediction value of the current block using the multiple corrected motion information. The high-level motion vector representation motion information acquisition module is used to select the motion information corresponding to the corrected prediction value with the smallest evaluation index as the high-level motion vector representation motion information of the current block.
[0020] This application also includes a fifteenth technical solution, an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block, the basic motion information list including at least one basic motion information; obtaining multiple initial offset values using an offset distance list; if the motion vector in the basic motion information is a bidirectional motion vector, scaling the initial offset value using the image display order difference to obtain a motion vector offset value; if the motion vector in the basic motion information is unidirectional, using the initial offset value as the motion vector offset value; determining multiple offset motion vectors by combining the motion vector offset value and multiple offset directions in the offset direction list; offsetting the basic motion vector in each basic motion information using the multiple motion vector offset values to obtain multiple offset motion information; and calculating the offset prediction value of the current block using the multiple offset motion information.
[0021] This application also includes a sixteenth technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, an offset initial value acquisition module, a motion vector offset value determination module, an offset motion vector determination module, an offset motion information acquisition module, and a calculation module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least one basic motion information. The offset initial value acquisition module is used to acquire multiple offset initial values using an offset distance list. The motion vector offset value determination module is used to scale the offset initial values to obtain motion vector offset values when the motion vectors in the basic motion information are bidirectional motion vectors, and to use the offset initial values as motion vector offset values when the motion vectors in the basic motion information are unidirectional. The offset motion vector determination module combines the motion vector offset values and multiple offset directions in the offset direction list to determine multiple offset motion vectors. The offset motion information acquisition module uses the multiple motion vector offset values to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information.
[0022] This application also includes a seventeenth technical solution: an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block, the basic motion information list including at least one basic motion information; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; calculating the offset prediction value of the current block using the multiple offset motion information; obtaining the high-level motion vector representation motion information of the current block from the multiple offset motion information based on the offset prediction value; and performing inter-frame filtering on the prediction value corresponding to the high-level motion vector representation motion information.
[0023] This application also includes an eighteenth technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, an offset motion vector determination module, an offset motion information acquisition module, a calculation module, a high-level motion vector representation motion information acquisition module, and a filtering module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least one basic motion information. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information. The high-level motion vector representation motion information acquisition module is used to obtain the high-level motion vector representation motion information of the current block from the multiple offset motion information based on the offset prediction value. The filtering module performs inter-frame filtering on the prediction value corresponding to the high-level motion vector representation motion information.
[0024] This application also includes a nineteenth technical solution: an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block, the basic motion information list including at least one basic motion information; determining multiple offset motion vectors using an offset distance list and an offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; calculating the offset prediction value of the current block using the multiple offset motion information; obtaining the high-level motion vector representation motion information of the current block from the multiple offset motion information based on the offset prediction value; and performing bidirectional gradient correction on the prediction value corresponding to the high-level motion vector representation motion information.
[0025] This application also includes a twentieth technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, an offset motion vector determination module, an offset motion information acquisition module, a calculation module, a high-level motion vector representation motion information acquisition module, and a correction module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least one basic motion information. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information. The high-level motion vector representation motion information acquisition module is used to obtain the high-level motion vector representation motion information of the current block from the multiple offset motion information based on the offset prediction value. The correction module is used to perform bidirectional gradient correction on the prediction value corresponding to the high-level motion vector representation motion information.
[0026] This application also includes a twenty-first technical solution, an inter-frame prediction method based on high-level motion vector representation, comprising: constructing a basic motion information list for the current block, the basic motion information list including at least one basic motion information; determining whether the current frame in which the current block is located satisfies the list update condition; if satisfied, calculating the average value of the offset values of each block in a specified number of prior frames, and using the average value to determine an offset distance list; determining multiple offset motion vectors using the offset distance list and the offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; and calculating the offset prediction value of the current block using the multiple offset motion information.
[0027] This application also includes a twenty-second technical solution: an inter-frame prediction device based on high-level motion vector representation, comprising a construction module, a judgment module, an offset distance list determination module, an offset motion vector determination module, an offset motion information acquisition module, and a calculation module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least one basic motion information. The judgment module is used to determine whether the current frame containing the current block meets the list update conditions. The offset distance list determination module is used, if the list update conditions are met, to calculate the average value of the offset values of each block in a specified number of prior frames, and use the average value to determine the offset distance list. The offset motion vector determination module is used to determine multiple offset motion vectors using the offset distance list and the offset direction list. The offset motion information acquisition module is used to offset the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information.
[0028] This application also includes a twenty-third technical solution: an inter-frame prediction method based on high-level motion vector representation. The method includes: constructing a basic motion information list for the current block, the basic motion information list including at least one basic motion information; comparing the values of motion vectors in the basic motion information in at least one direction with a preset threshold to obtain a comparison result; determining an offset distance list based on the comparison result; determining multiple offset motion vectors using the offset distance list and the offset direction list; offsetting the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; and calculating the offset prediction value of the current block using the multiple offset motion information.
[0029] This application also includes a twenty-fourth technical solution: an inter-frame prediction device based on high-level motion vector representation. The device includes: a construction module, a comparison module, an offset distance list determination module, an offset motion vector determination module, and a calculation module. The construction module is used to construct a basic motion information list for the current block, the basic motion information list including at least one basic motion information. The comparison module is used to compare the values of the motion vectors in the basic motion information in at least one direction with a preset threshold to obtain a comparison result. The offset distance list determination module is used to determine an offset distance list based on the comparison result. The offset motion vector determination module is used to determine multiple offset motion vectors using the offset distance list and the offset direction list. The offset motion information determination module uses the multiple offset motion vectors to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information. The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information.
[0030] This application also includes a twenty-fifth technical solution: an encoder, which includes a processor and a memory connected to the processor, wherein the memory stores a computer program; the processor is used to execute the computer program stored in the memory to implement the above-described method.
[0031] This application also includes a twenty-sixth technical solution: a storage medium storing a computer program, which, when executed, implements the above-described method.
[0032] This application also includes a twenty-seventh technical solution, an electronic device including the encoder described above.
[0033] The beneficial effects of this application are as follows: Unlike the prior art, the inter-frame prediction method of this application adopts an enhanced deduplication mode to deduplicat basic motion information, which can improve the accuracy of deduplication, reduce the probability of repetition of basic motion information caused by omissions, reduce the amount of data processing, and improve efficiency. Attached Figure Description
[0034] Figure 1 This is a flowchart illustrating the first embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0035] Figure 2 This is a flowchart illustrating an embodiment of this application that uses enhanced deduplication to construct a basic motion information list for the current block;
[0036] Figure 3 This is a schematic diagram of an embodiment of the current block and adjacent blocks in this application;
[0037] Figure 4 This is a flowchart illustrating another embodiment of the method used in this application to construct a basic motion information list for the current block using enhanced deduplication.
[0038] Figure 5 This is a flowchart illustrating another embodiment of the method used in this application to construct a basic motion information list for the current block using enhanced deduplication.
[0039] Figure 6 This is a flowchart illustrating another embodiment of this application's method of constructing a basic motion information list for the current block using enhanced deduplication.
[0040] Figure 7A This is a flowchart illustrating an embodiment of the present application for determining whether the image display order of reference frames in two candidate motion information is the same and whether the motion vectors are the same;
[0041] Figure 7B This is a flowchart illustrating another embodiment of the present application for determining whether the image display order of reference frames in two candidate motion information is the same and whether the motion vectors are the same;
[0042] Figure 8 This is a flowchart illustrating the second embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0043] Figure 9 This is a flowchart illustrating the third embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0044] Figure 10 This is a flowchart illustrating the fourth embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0045] Figure 11 This is a flowchart illustrating the fifth embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0046] Figure 12 This is a flowchart illustrating the sixth embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0047] Figure 13 This is a flowchart illustrating the seventh embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0048] Figure 14 This is a schematic diagram illustrating the search for the forward correction motion vector within the search range of the forward first prediction block in this application;
[0049] Figure 15 This is a flowchart illustrating the eighth embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0050] Figure 16 This is a flowchart illustrating the ninth embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0051] Figure 17This is a flowchart illustrating the tenth embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0052] Figure 18 This is a schematic diagram of the BGC in this application;
[0053] Figure 19 This is a flowchart illustrating the eleventh embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0054] Figure 20 This is a flowchart illustrating the twelfth embodiment of the inter-frame prediction method based on high-level motion vector representation in this application;
[0055] Figure 21 This is a schematic diagram of the structure of the first embodiment of the inter-frame prediction device based on high-level motion vector representation of this application;
[0056] Figure 22 This is a schematic diagram of the structure of the second embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0057] Figure 23 This is a schematic diagram of the structure of the third embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0058] Figure 24 This is a schematic diagram of the structure of the fourth embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0059] Figure 25 This is a schematic diagram of the structure of the fifth embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0060] Figure 26 This is a schematic diagram of the structure of the sixth embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0061] Figure 27 This is a schematic diagram of the structure of the seventh embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0062] Figure 28 This is a schematic diagram of the structure of the eighth embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0063] Figure 29 This is a schematic diagram of the structure of the ninth embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0064] Figure 30 This is a schematic diagram of the structure of the tenth embodiment of the inter-frame prediction device based on high-level motion vector representation in this application;
[0065] Figure 31This is a schematic diagram of the structure of the eleventh embodiment of the inter-frame prediction device based on high-level motion vector representation of this application;
[0066] Figure 32 This is a schematic diagram of the structure of the twelfth embodiment of the inter-frame prediction device based on high-level motion vector representation of this application;
[0067] Figure 33 A schematic diagram of the structure of an embodiment of the encoder of this application;
[0068] Figure 34 This is a schematic diagram of the structure of an embodiment of the storage medium of this application;
[0069] Figure 35 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. Detailed Implementation
[0070] To make the purpose, technical solution and effects of this application clearer and more explicit, the following describes this application in further detail with reference to the accompanying drawings and embodiments.
[0071] The terms "first," "second," and "third" used in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0072] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments without conflict.
[0073] This application provides an inter-frame prediction method based on high-level motion vector representation, such as... Figure 1 As shown, it includes:
[0074] S110: Use enhanced deduplication to construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0075] The current block can also be called the current coding block, which is the block that is currently being encoded. In some cases, the coding block can be called a coding unit (CU). The video frame in which the current block is located can be called the current frame.
[0076] The basic motion information is selected from the motion information of the spatial candidate blocks adjacent to the current block, the motion information of the temporal candidate blocks of the current block, zero motion information, etc. The motion information may include motion vectors and reference frame index information (forward reference frame index information and / or backward reference frame index information).
[0077] In this context, the current block has adjacent spatial candidate blocks in multiple angular directions. Both the current block and its adjacent spatial candidate blocks belong to the current frame. The adjacent spatial candidate blocks are located on the encoded side of the current block. For example, when the encoding direction is from left to right and from top to bottom, the adjacent spatial candidate blocks are located on the left and top sides of the current block. The motion information of the adjacent spatial candidate blocks is called the spatial candidate block motion information.
[0078] Temporal motion information refers to the motion information of blocks whose positions are the same as the current block or a sub-block of the current block in a specified reference frame (usually the first frame in the reference list).
[0079] Basic motion information can be duplicated. By enhancing the deduplication process on basic motion information, the accuracy of the deduplication can be improved, and the probability of duplicate basic motion information caused by omissions can be reduced. For example, the enhanced deduplication in this application embodiment may include any one or a combination of several methods such as sampling deduplication, full deduplication, and re-deduplication of basic motion information.
[0080] S120: Use the offset distance list and offset direction list to determine multiple offset motion vectors.
[0081] Specifically, for example, in one embodiment of this application, as shown in Table 1, an offset distance list is provided. The offset distance list includes an offset distance index (Distance IDX) and the offset distance (Pixeldistance) corresponding to the offset distance index. The offset distance is in pixels (pel).
[0082] Table 1 lists the offset distances.
[0083]
[0084] As shown in Table 2, a list of offset directions is provided. Direction IDX represents the offset direction index, which is the direction of the motion vector offset value relative to the starting point.
[0085] Table 2 lists the offset directions.
[0086] x-axis + – N / A N / A y-axis N / A N / A + –
[0087] In this embodiment of the application, the offset distance list (Table 1) includes five offset distances, and the offset direction list includes four offset direction indices.
[0088] S130: Use multiple offset motion vectors to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0089] In this embodiment, the offset motion vector and the base motion vector are related. The amount of offset motion information is equal to the number of offset motion vectors multiplied by the amount of base motion information. The reference frame index in the base motion information corresponds to the reference frame of the aforementioned base motion information.
[0090] When the motion vector in the basic motion information is a unidirectional motion vector, the offset distance used for offsetting is the value amplified four times as shown in Table 1; for the motion vector in the basic motion information being a bidirectional motion vector, please refer to the following examples.
[0091] S140: Calculate the offset prediction value of the current block using multiple offset motion information.
[0092] In this embodiment of the application, multiple offset prediction values can be obtained by using offset motion information to perform motion compensation on the current block.
[0093] The inter-frame prediction method in this application employs enhanced deduplication to check the basic motion information, which can improve the accuracy of deduplication, reduce the probability of duplicate basic motion information caused by omissions, reduce the amount of data processing, and improve efficiency.
[0094] This embodiment is a further extension of S110 above, expanding it to full deduplication. Specifically, enhanced deduplication is used to construct a basic motion information list for the current block, such as... Figure 2 As shown, it includes:
[0095] S210: Sequentially determine whether the candidate motion information of the current block is available. If the candidate motion information is available, then execute S220.
[0096] The current block has multiple adjacent blocks in multiple angular directions. Both the current block and its adjacent blocks belong to the current frame. The adjacent blocks are located on the encoded side of the current block, and the motion information of the adjacent blocks of the current block belongs to the candidate motion information of the current block. For example, in the embodiments of this application, such as Figure 3 As shown, select the current neighboring blocks F, A, D, G and C. The current block has neighboring block F in the lower left corner, neighboring blocks A and D in the upper left corner, and neighboring blocks G and C in the upper right corner. The motion information of the neighboring blocks F, A, D, G and C is called the candidate motion information of the current block.
[0097] Depending on the current block's position, neighboring blocks may be actual blocks within the current frame or blocks that do not exist beyond the current frame boundary. For actual neighboring blocks, they may be encoded or uncoded. The prediction mode used for encoded neighboring blocks can be inter-frame prediction, intra-frame prediction, or Intra Block Copy (IBC), etc. In this application, encoded inter-frame predicted neighboring blocks can be referred to as usable neighboring blocks, and remaining neighboring blocks (e.g., non-existent blocks, uncoded blocks, intra-frame blocks, etc.) are referred to as unusable neighboring blocks.
[0098] Specifically, in this embodiment, availability is first determined based on whether the adjacent block is inside the image, whether it has been encoded, and whether it is intra-frame encoded; if the adjacent block is inside the image, has been encoded, and is not intra-frame encoded, then the motion information of the adjacent block is initially considered available.
[0099] S220: Check for duplicates with all previous candidate motion information. If the duplicate check passes, proceed to S230.
[0100] The candidate motion information is checked for duplicates with the previous candidate motion information only if the candidate motion information is available. If the candidate motion information is unavailable, there is no need to check for duplicates. In this embodiment of the application, by checking the currently available candidate motion information with all the aforementioned candidate motion information, the duplication of basic motion information in the basic motion information list caused by missed checks can be reduced.
[0101] It should be noted that S210 and S220 may occur sequentially or alternately. This application uses the alternation of S210 and S220 as an example, as follows:
[0102] In one embodiment of this application, it is assumed that adjacent blocks F, A, D, G, and C are ordered in the order F->G->C->A->D, and the number of motion information items in the basic motion information list is 2. Therefore, the deduplication process in this embodiment specifically includes:
[0103] (I): Determine the availability of adjacent block F. If adjacent block F is available, the motion information of adjacent block F can be used as basic motion information to fill in the basic motion information list; otherwise, the motion information of adjacent block F is unavailable.
[0104] (II): Determine the availability of adjacent block G. If the motion information of adjacent block F and adjacent block G is available, the availability of subsequent adjacent blocks does not need to be determined; otherwise, proceed to the next step (III).
[0105] (III): Determine the availability of adjacent block C: If adjacent block C is unavailable, set adjacent block C to be unavailable and proceed to the next step; otherwise, if adjacent block C is available, further determination is made:
[0106] Determine if adjacent block G is usable. If it is usable, then determine if adjacent block C is a duplicate of adjacent block G.
[0107] Determine if adjacent block F is usable. If it is usable, then determine if adjacent block C is a duplicate of adjacent block F.
[0108] Condition 1: If adjacent block G is unavailable or available, the motion information of adjacent block C and adjacent block G are not repeated;
[0109] Condition 2: If adjacent block F is unavailable or available, the motion information of adjacent block C and adjacent block F is not repeated.
[0110] If both of the above conditions are met, then the adjacent block C is finally available; otherwise, the adjacent block C is unavailable. If both motion information is available, then the availability of subsequent adjacent blocks does not need to be determined; otherwise, proceed to the next step (IV).
[0111] (IV): Determine the availability of adjacent block A: If adjacent block A is unavailable, set adjacent block A to unavailable and proceed to the next step; otherwise, if adjacent block A is available, further determination is made:
[0112] Determine if adjacent block C is usable; if it is usable, then determine if adjacent block A is a duplicate of adjacent block C.
[0113] Determine if adjacent block G is available; if it is available, then determine if adjacent block A is a duplicate of adjacent block G.
[0114] Determine if adjacent block F is usable; if it is usable, then determine if adjacent block A is a duplicate of adjacent block F.
[0115] Condition 1: If adjacent block C is unavailable or available, the motion information of adjacent block A and adjacent block C is not repeated;
[0116] Condition 2: If adjacent block G is unavailable or available, the motion information of adjacent block A and adjacent block G is not repeated;
[0117] Condition 3: If adjacent block F is unavailable or available, the motion information of adjacent block A and adjacent block F is not repeated.
[0118] If all three conditions above are met, then adjacent block A is finally available; otherwise, adjacent block A is unavailable. If two motion information pieces are available, then the availability of subsequent adjacent blocks does not need to be determined; otherwise, proceed to the next step (V).
[0119] (V): Determine the availability of adjacent block D: If adjacent block D is unavailable, set adjacent block D to unavailable to complete the availability determination; otherwise, if adjacent block D is available, proceed with further determination:
[0120] Determine if adjacent block A is usable; if it is usable, then determine if adjacent block D is a duplicate of adjacent block A.
[0121] Determine if adjacent block C is usable; if it is usable, then determine if adjacent block D is a duplicate of adjacent block C.
[0122] Determine if adjacent block G is available; if it is available, then determine if adjacent block D is a duplicate of adjacent block G.
[0123] Determine if adjacent block F is usable; if it is usable, then determine if adjacent block D is a duplicate of adjacent block F.
[0124] Condition 1: If adjacent block A is unavailable or available, the motion information of adjacent block D and adjacent block A is not repeated;
[0125] Condition 2: If adjacent block C is unavailable or available, the motion information of adjacent block D and adjacent block C is not repeated;
[0126] Condition 3: If adjacent block G is unavailable or available, the motion information of adjacent block D and adjacent block G is not repeated;
[0127] Condition 4: If adjacent block F is unavailable or available, the motion information of adjacent block D and adjacent block F is not repeated.
[0128] If all four conditions above are met, then adjacent block D will eventually be usable; otherwise, adjacent block D will not be usable.
[0129] S230: Fill the candidate motion information into the basic motion information list as basic motion information until the number of basic motion information in the basic motion information list reaches the preset value.
[0130] In the above-mentioned deduplication process, the motion information of adjacent blocks that are available and non-repeating is used as candidate motion information and then filled into the basic motion information list as basic motion information. For example, in this application, the preset value for the number of basic motion information is 2. When two available and non-repeating candidate motion information are found, they are filled into the basic motion information list; if only one available and non-repeating candidate motion information is found, it is filled into the basic motion information list. This application uses a preset value of 2 as an example. In other embodiments, the preset value can also be 3, etc.
[0131] If only one available and unique candidate motion information is found, it is entered into the basic motion information list. If the candidate motion information is the motion information of a spatial candidate block, then step (VI) is executed.
[0132] (VI): Add the motion vector information of the temporal candidate block in Skip or Direct mode to the basic motion information list, and determine whether the motion vector information of the temporal candidate block is duplicated with the motion information of the spatial candidate block.
[0133] If repeated, then (VII): fill the zero motion vector information into the basic motion information list.
[0134] In this embodiment of the application, the zero motion vector information and the motion information of the spatial candidate block can be considered as constituting two non-repeating basic motion information.
[0135] In another embodiment, (VIII) can also be performed: determine whether the zero motion vector information and the motion information of the spatial candidate block are duplicated. If they are duplicated, there is only one basic motion information in the basic motion information list. If they are not duplicated, there is only one basic motion information or two non-duplicate basic motion information in the basic motion information list.
[0136] In another embodiment, the scheme of S110 can be extended to sampling deduplication, where enhanced deduplication in S110 constructs a basic motion information list for the current block, such as... Figure 4 As shown, it includes:
[0137] S310: Sequentially determine whether the candidate motion information of the current block is available. If the candidate motion information is available and comes from the spatial candidate block of the current block, then execute S320.
[0138] The current block has multiple neighboring blocks in multiple angular directions. Both the current block and the neighboring blocks belong to the current frame. The neighboring blocks are located on the encoded side of the current block, and the motion information of the neighboring blocks of the current block belongs to the candidate motion information of the current block. For example, in the embodiment of this application, the current block has a neighboring block F in the lower left corner, neighboring blocks A and D in the upper left corner, and neighboring blocks G and C in the upper right corner. The motion information of the neighboring blocks F, A, D, G, and C is called the candidate motion information of the current block.
[0139] Depending on the current block's position, neighboring blocks may be actual blocks within the current frame or blocks that do not exist beyond the current frame boundary. For actual neighboring blocks, they may be encoded or uncoded. The prediction mode used for encoded neighboring blocks can be inter-frame prediction, intra-frame prediction, or Intra Block Copy (IBC), etc. In this application, encoded inter-frame predicted neighboring blocks can be referred to as usable neighboring blocks, and remaining neighboring blocks (e.g., non-existent blocks, uncoded blocks, intra-frame blocks, etc.) are referred to as unusable neighboring blocks.
[0140] Specifically, in this embodiment, availability is first determined based on whether the adjacent block is inside the image, whether it has been encoded, and whether it is intra-frame encoded; if the adjacent block is inside the image, has been encoded, and is not intra-frame encoded, then the motion information of the adjacent block is initially considered available.
[0141] Specifically, in this embodiment, the candidate motion information includes motion information of spatial candidate blocks from the current block.
[0142] S320: Extract at least one from the candidate motion information of other spatial candidate blocks from the current block for deduplication.
[0143] For example, such as Figure 3 As shown, when selecting motion information of neighboring blocks F, A, D, G, and C as candidate motion information, where the candidate motion information is the motion information of neighboring block G, at least one motion information of neighboring block G can be extracted from other spatial candidate blocks (F, A, D, and C) of the current block for duplication checking. For example, neighboring block C can be extracted, and the motion information of neighboring block C and neighboring block G can be compared. If the motion information of neighboring block C and neighboring block G is duplicated, only one of the motion information of neighboring block C and neighboring block G is selected for duplication checking with the motion information of other neighboring blocks (F, A, and D). If the motion information of neighboring block C and neighboring block G is duplicated, one of the motion information of neighboring block C and neighboring block G is selected for duplication checking with the motion information of other neighboring blocks (F, A, and D), or both the motion information of neighboring block C and neighboring block G are checked for duplication with the motion information of other neighboring blocks (F, A, and D).
[0144] If the plagiarism check passes, then S330: Fill the candidate motion information into the basic motion information list as basic motion information until the number of basic motion information in the basic motion information list reaches the preset value.
[0145] In the above-mentioned deduplication process, the motion information of adjacent blocks that are available and non-repeating is used as candidate motion information and then filled into the basic motion information list as basic motion information. For example, in this application, the preset value for the number of basic motion information is 2. When two available and non-repeating candidate motion information are found, they are filled into the basic motion information list; if only one available and non-repeating candidate motion information is found, it is filled into the basic motion information list. This application uses a preset value of 2 as an example. In other embodiments, the preset value can also be 3, etc.
[0146] As a preferred method, S320 extracts at least one motion information from candidate motion information of other spatial candidate blocks from the current block for deduplication, such as... Figure 5 As shown, it includes:
[0147] S321: Select candidate motion information from other spatial candidate blocks adjacent to the spatial candidate block for deduplication.
[0148] In the embodiments of this application, for example, such as Figure 3As shown, when the motion information of adjacent blocks F, A, D, G, and C is used as candidate motion information, the candidate motion information of the spatial candidate blocks of the current block can be grouped according to their location. For example, adjacent blocks G and C located in the upper right corner can be grouped together, and adjacent blocks A and D located in the upper left corner can be grouped together. This applies when adjacent blocks G, C, A, and D are all available.
[0149] Check the motion information of adjacent blocks G and C for duplicates. If they are duplicated, select one to check the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks. If they are not duplicated, select one of adjacent blocks G or C and check it for duplicates with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks. Alternatively, check the motion information of adjacent blocks G and C for duplicates with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks.
[0150] Check the motion information of adjacent blocks D and A for duplicates. If they are duplicates, select one to check the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks. If they are not duplicates, select one of adjacent blocks D or A and check it for duplicates with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks. Alternatively, check the motion information of adjacent blocks D and A for duplicates with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks.
[0151] For example, when the motion information of adjacent blocks G and C is repeated, or when the motion information of adjacent blocks D and A is repeated, the motion information of adjacent blocks C and D and the motion information of ungrouped block F can be selected, and the motion information of C, D and F can be checked for duplicates according to the existing deduplication method or the deduplication method of the previous embodiment.
[0152] S322: Select candidate motion information from other spatial candidate blocks that are not adjacent to the spatial candidate block for deduplication.
[0153] In this embodiment, if the motion information of adjacent blocks G and C is duplicated, one of them is selected to be duplicated with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks; if they are not duplicated, one of adjacent blocks G or C is selected to be duplicated with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks; or both adjacent blocks G and C are duplicated with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks.
[0154] If the motion information of adjacent blocks D and A is duplicated, then one of them is selected to be duplicated with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks; if they are not duplicated, either adjacent block D or A is selected to be duplicated with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks; or both adjacent blocks D and A are duplicated with the motion information of adjacent blocks selected from other groups or the motion information of ungrouped blocks.
[0155] For example, when the motion information of adjacent blocks G and C is repeated, or when the motion information of adjacent blocks D and A is repeated, the motion information of adjacent blocks C and D and the motion information of ungrouped adjacent block F can be selected, and the motion information of adjacent blocks C, D and F can be checked for duplicates according to the existing deduplication method or the deduplication method of the previous embodiment.
[0156] In another embodiment of this application, Figure 6 This is a specific implementation of constructing a basic motion information list for the current block using enhanced deduplication, such as... Figure 6 As shown, it includes:
[0157] S410: Build a list of basic motion information for the current block.
[0158] In this embodiment, a basic information list is constructed for the current block. This can be done using existing methods, or by employing methods such as sampling deduplication or full deduplication. However, when using existing methods to construct the basic motion information list, if the list includes two basic motion information items, duplicate basic motion information may be missed.
[0159] For example, when constructing a basic motion information list for the current block (CU) and its surrounding neighboring blocks, where F, G, C, A, and D are the neighboring blocks of the current block, the following steps are included:
[0160] (i) The available motion vector information of the first two positions is obtained in the scanning order of F->G->C->A->D as the basic motion vector information of the high-level motion vector representation (UMVE). This process requires determining the availability of motion vectors of adjacent blocks.
[0161] (ii) When determining whether adjacent motion vectors are available, availability is first determined based on whether they are inside the image, whether they are encoded, and whether they are intra-frame encoded. If the adjacent block is inside the image, is encoded, and is not intra-frame encoded, the motion information of the adjacent block is initially considered available.
[0162] (iii) Based on the availability information obtained above, further determine whether adjacent block MVs are duplicated. If they are not duplicated, set them as available and add them to the basic motion information list; otherwise, set them as unavailable. Specifically, this includes:
[0163] (iv) Determine the availability of adjacent block F. If adjacent block F is available, then the motion information of adjacent block F is set to available and can be added to the basic motion information list; otherwise, the motion information of adjacent block F is unavailable, and proceed to the next step (v).
[0164] (v): Determine the availability of adjacent block G: If adjacent block G is unavailable, set adjacent block G to unavailable and proceed to the next step (vi); otherwise, if adjacent block G is available, further determine:
[0165] Next, determine whether the adjacent block F is available. If it is not available, then the adjacent block G is set to available and can be added to the basic motion information list.
[0166] Otherwise, when adjacent block F is available, it is necessary to compare whether the motion information of adjacent block F and adjacent block G is repeated. If they are not repeated, adjacent block G is set to be available; otherwise, adjacent block G is not available.
[0167] (vi): Determine the availability of adjacent block C: If adjacent block C is unavailable, set adjacent block C to unavailable and proceed to the next step (vii); otherwise, if adjacent block C is available, further determination is made:
[0168] Next, determine whether the adjacent block G is available. If it is not available, then the adjacent block C is set to available and can be added to the basic motion information list.
[0169] If adjacent block G is available, it is necessary to compare whether the motion information of adjacent block C and adjacent block G is repeated. If they are not repeated, adjacent block C is set to be available; otherwise, adjacent block C is not available.
[0170] (vii): Determine the availability of adjacent block A: If adjacent block A is unavailable, set adjacent block A to unavailable and proceed to the next step (viii); otherwise, if adjacent block A is available, further determination is made:
[0171] Next, determine whether the adjacent block F is available. If it is not available, then the adjacent block A is set to available and can be added to the basic motion information list.
[0172] If adjacent block F is available, it is necessary to compare whether the motion information of adjacent block A and adjacent block F is repeated. If they are not repeated, adjacent block A is set to be available; otherwise, adjacent block A is not available.
[0173] (viii): Determine the availability of adjacent block D: If adjacent block D is unavailable, set adjacent block D to unavailable to complete the availability determination; otherwise, if adjacent block D is available, proceed with further determination:
[0174] Next, determine whether the adjacent block A is available. If the adjacent block A is not available, initialize the motion information of the adjacent block A as unavailable; otherwise, obtain its motion information and determine whether the motion information of the adjacent block D is duplicated with that of the adjacent block A.
[0175] Next, determine whether the adjacent block G is available. If it is not available, initialize the motion information of the adjacent block G as unavailable; otherwise, obtain its motion information and determine whether the motion information of the adjacent block D is the same as that of the adjacent block G.
[0176] Condition 1: If adjacent block A is unavailable or available, the motion information of adjacent block D and adjacent block A are not repeated;
[0177] Condition 2: If adjacent block G is unavailable or available, the motion information of adjacent block D and adjacent block G is not repeated;
[0178] If both of the above conditions are met, then the adjacent block D will eventually be available; otherwise, the adjacent block D will not be available.
[0179] (ix): If the corresponding block is available and the reference frame index is available, the motion information of the corresponding block is added to the basic motion information list in the order of F->G->C->A->D, and stops when two are added.
[0180] When there are fewer than two available spatial motion vectors in the surrounding area, (x): add the motion vector information of the temporal co-location block of the current block to the basic motion information list.
[0181] Determine whether the motion vector information of the temporal co-block of the current block is duplicated with the spatial motion vector information; if duplicated, fill in zero motion vector information to ensure that two basic motion vectors are filled in the end.
[0182] S420: Perform a duplicate check on the basic motion information in the basic motion information list.
[0183] In this embodiment of the application, duplicate basic motion information is reduced by checking the two basic motion information in the basic motion information list.
[0184] In other embodiments of this application, enhanced deduplication methods such as sampling deduplication, full deduplication, and re-deduplication of basic motion information are employed. Enhanced deduplication constructs a list of basic motion information for the current block, where the current block includes at least two candidate motion information sets. The deduplication process specifically includes:
[0185] The algorithm determines whether the image display order (POC) and motion vectors of two candidate motion information sets are the same, in order to perform deduplication.
[0186] Specifically, such as Figure 7A As shown, the method determines whether two candidate motion information sets are identical by judging whether their image display order (POC) and motion vectors are the same. The two candidate motion information sets include a first candidate motion information set and a second candidate motion information set; the motion information sets include reference frame information and motion vector information, where the reference frame information includes a reference index and the image display order (POC).
[0187] Specifically, the following steps are included:
[0188] S510: Determine whether the reference indices of the reference frames in the direction of the first reference frame in the current frame are the same. If they are different, return "different" directly. If they are the same, proceed to step S520.
[0189] S520: Determine whether the reference index of the first reference frame direction reference frame of the current frame is available. If it is available, and the values of the first candidate motion information and the second candidate motion information in the x and y directions of the first reference frame direction of the current frame are different, then return "different" directly. Otherwise, proceed to step S530.
[0190] S530: Determine whether the reference indices of the reference frames in the direction of the second reference frame in the current frame are the same. If they are not the same, return "different" directly. Otherwise, proceed to step S540.
[0191] S540: Determine whether the reference index of the second reference frame direction reference frame of the current frame is available. If it is available, and the values of the first candidate motion information and the second candidate motion information of the second reference frame direction of the current frame are different in the x and y directions, then return "different" directly. Otherwise, proceed to step S550.
[0192] The above method determines whether the first candidate motion information and the second candidate motion information are duplicated by judging whether the reference index of the reference frame is the same.
[0193] As a further option, when the reference indexes of the reference frames are the same, steps S550-S590 are executed.
[0194] S550: Determine whether the first candidate motion information is available in the first reference frame direction of the current frame, and whether the second candidate motion information is available in the second reference frame direction of the current frame. If the first candidate motion information is not available in the first reference frame direction of the current frame, and the second candidate motion information is not available in the second reference frame direction of the current frame, proceed to step S560. If both the first candidate motion information and the second candidate motion information are available in the first reference frame direction and the second reference frame direction of the current frame, proceed to step S570.
[0195] S560: Determine whether the display order of the first image of the first candidate motion information and the display order of the second image of the second candidate motion information are the same. If yes, proceed to step S580.
[0196] S570: Determine whether the motion vector information of the first candidate motion information in the first reference frame direction of the current frame and the motion vector information of the second candidate motion information in the first reference frame direction of the current frame are the same. If they are the same, proceed to step S590.
[0197] In this embodiment, step S570 specifically includes: determining whether the motion vector information of the first candidate motion information in the first reference direction of the current frame is the same as that of the second candidate motion information in the second reference direction of the current frame, and determining whether the motion vector information of the first candidate motion information in the second reference direction of the current frame is the same as that of the second candidate motion information in the first reference direction of the current frame. If both are the same, proceed to step S590.
[0198] S580: Determine whether the motion vector information of the first candidate motion information in the direction of the second reference frame in the current frame is the same as the motion vector information of the second candidate motion information in the direction of the first reference frame in the current frame. If so, proceed to step S590.
[0199] S590: The first candidate motion information and the second candidate motion information are the same.
[0200] It should be noted that in other embodiments, when determining whether two motion information pieces are the same, the determination can be made by checking whether the reference indices of the reference frames of the two motion information pieces are the same, i.e., executing S510-S540. Alternatively, it is not necessary to check whether the reference indices of the reference frames of the two motion information pieces are the same, i.e., S510-S540 is not executed, and the determination can be made directly by checking whether the image display order (POC) and motion vectors in the candidate motion information pieces are the same, i.e., only S550-S590 is executed.
[0201] In another embodiment, it is determined whether the image display order (POC) and motion vectors in the two candidate motion information are the same. Figure 7B As shown, it specifically includes:
[0202] S550': Determine whether the first candidate motion information is available in the first reference frame direction of the current frame, and whether the second candidate motion information is available in the second reference frame direction of the current frame. If both are available or both are unavailable, proceed to step S560'.
[0203] S560': Determine whether the display order of the first image of the first candidate motion information and the display order of the second image of the second candidate motion information are the same. If yes, proceed to step S580'.
[0204] S580': Determine whether the motion vector information of the first candidate motion information in the direction of the second reference frame in the current frame is the same as the motion vector information of the second candidate motion information in the direction of the first reference frame in the current frame. If so, proceed to step S590'.
[0205] S590': The first candidate motion information and the second candidate motion information are the same.
[0206] In this embodiment of the application, the candidate motion information of the current block includes motion information from the spatial candidate blocks adjacent to the current block.
[0207] like Figure 3 As shown, the adjacent spatial candidate blocks of the current block include:
[0208] The first spatial candidate block (adjacent block F) is adjacent to the bottom left pixel of the current block, and the bottom edge of the first spatial candidate block is on the same straight line as the bottom edge of the current block.
[0209] The second spatial candidate block (adjacent block G) is adjacent to the upper right corner pixel of the current block, and the right side of the second spatial candidate block is on the same straight line as the right side of the current block.
[0210] The third spatial candidate block (adjacent block A) is adjacent to the top left pixel of the current block, and the top edge of the third spatial candidate block is on the same straight line as the top edge of the current block.
[0211] The fourth spatial candidate block (adjacent block C) is adjacent to the top right pixel of the current block, and the left side of the fourth spatial candidate block is on the same straight line as the right side of the current block.
[0212] The fifth spatial candidate block (adjacent block D) is adjacent to the top-left pixel of the current block, and the bottom edge of the fifth spatial candidate block is on the same straight line as the top edge of the current block.
[0213] The embodiments of this application form new spatial candidate blocks of varying numbers by adding new spatial candidate blocks or deleting some existing spatial candidate blocks.
[0214] Specifically, in one embodiment, a sixth spatial candidate block (adjacent block B) and / or a seventh spatial candidate block (adjacent block E) are added; the sixth spatial candidate block is adjacent to the top-left pixel of the current block, and the left side of the sixth spatial candidate block is aligned with the left side of the current block; the seventh spatial candidate block is adjacent to both the first spatial candidate block and the current block, the bottom edge of the seventh spatial candidate block is aligned with the top edge of the first spatial candidate block, and the right side of the seventh spatial candidate block is aligned with the left side of the current block. This ensures that the number of spatial candidate blocks N = 7.
[0215] In another embodiment, the number of spatial candidate blocks adjacent to the current block is reduced by deleting some of the space candidate blocks adjacent to the retaining wall block.
[0216] Specifically, in this embodiment, the fourth spatial candidate block (adjacent block C) and the fifth spatial candidate block (adjacent block D) can be reduced to make the number of spatial candidate blocks N=3. In other embodiments, only the fourth spatial candidate block (adjacent block C) or the fifth spatial candidate block (adjacent block D) can be reduced to make the number of spatial candidate blocks N=4.
[0217] The order of the second number of spatial candidate blocks in the embodiments of this application can be arbitrarily and freely combined. For example, for N=7 spatial candidate blocks, it can be F->G->C->A->D->B->E; or it can be C->D->A->B->E->F->G, etc.
[0218] like Figure 8 As shown, a second embodiment of an inter-frame prediction method based on high-level motion vector representation according to this application includes:
[0219] S610: Construct a list of basic motion information for the current block. The list of basic motion information includes at least two basic motion information items.
[0220] In this embodiment of the application, the basic motion information list constructed by the current block includes two or more basic motion information. The basic motion information list can be constructed using existing deduplication methods or using the enhanced deduplication method of the above embodiments of this application.
[0221] S611: Calculate new basic motion information using at least two basic motion information sets and fill it into the basic motion information list.
[0222] In this embodiment of the application, new basic motion information is obtained by calculating at least two basic motion information, and the new basic motion information does not overlap with the original at least two basic motion information.
[0223] In one specific implementation, the weighted average of at least two basic motion information can be used as the new basic motion information. Alternatively, the filtered result of at least two basic motion information can be used as the new basic motion information. Another approach is to add or weight the filtered results of at least two basic motion information to obtain the new basic motion information. Embodiments of this application can add new basic motion information calculated using any one or more of the above methods.
[0224] At least two basic motion information pieces are filled first during the filling process. The order in which the at least two basic motion information pieces are filled does not matter. The new basic motion information pieces are filled after the at least two basic motion information pieces.
[0225] S620: Use the offset distance list and offset direction list to determine multiple offset motion vectors.
[0226] For further detailed descriptions of the steps in this embodiment, please refer to the preceding embodiments, which will not be repeated here.
[0227] S630: Multiple offset motion vectors are used to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0228] For further detailed descriptions of the steps in this embodiment, please refer to the preceding embodiments, which will not be repeated here.
[0229] S640: Calculate the offset prediction value of the current block using multiple offset motion information.
[0230] This application embodiment increases the capacity of the basic motion information list and improves the accuracy of the offset prediction value by adding new basic motion information to the basic motion information list.
[0231] like Figure 9 As shown, a third embodiment of the inter-frame prediction method based on high-level motion vector representation of this application includes:
[0232] S710: Construct a basic motion information list for the current block based on the candidate motion information of the current block. The basic motion information list includes at least one basic motion information. The source of the candidate motion information includes the temporal candidate blocks of the current block. The temporal candidate blocks include the temporal co-location blocks of at least one sub-block of the current block.
[0233] A temporal candidate block includes a temporal co-occurrence block of at least one sub-block of the current block; that is, a block whose position is the same as that of a sub-block of the current block in a specified reference frame (usually the first frame in the reference list).
[0234] In this embodiment, the temporal co-location block motion information of at least two sub-blocks of the preceding block can be averaged to serve as candidate motion information for the current block, thereby making the obtained candidate motion information for the current block more accurate.
[0235] By adding temporal co-location block motion information of at least one sub-block of the preceding block when constructing the basic motion information, the situation where the basic motion information list is not full can be improved, making the sources of basic motion information for constructing the basic motion information list more extensive.
[0236] S720: Use the offset distance list and offset direction list to determine multiple offset motion vectors.
[0237] For further detailed descriptions of the steps in this embodiment, please refer to the preceding embodiments, which will not be repeated here.
[0238] S730: Multiple offset motion vectors are used to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0239] For further detailed descriptions of the steps in this embodiment, please refer to the preceding embodiments, which will not be repeated here.
[0240] S740: Calculates the offset prediction value of the current block using multiple offset motion information.
[0241] like Figure 10 As shown, a fourth embodiment of the inter-frame prediction method based on high-level motion vector representation of this application includes:
[0242] S810: Construct a basic motion information list for the current block based on the candidate motion information of the current block. The basic motion information list includes at least one basic motion information, and the source of the candidate motion information includes at least one historical motion vector.
[0243] In this embodiment, adding candidate motion vector information when constructing the basic motion information list can broaden the sources of basic motion information in the list. For example, the sources of basic motion information may include motion information of spatial candidate blocks, motion information of temporal candidate blocks, zero motion information, and historical motion information. The motion information of spatial candidate blocks, temporal candidate blocks, zero motion information, and historical motion information can be filled and sorted in any order in the basic motion information list. For example, it could be historical motion information, motion information of spatial candidate blocks, motion information of temporal candidate blocks, and zero motion information; it could also be motion information of temporal candidate blocks, motion information of spatial candidate blocks, historical motion information, and zero motion information; or it could be zero motion information, motion information of spatial candidate blocks, motion information of temporal candidate blocks, and historical motion information.
[0244] S820: Use the offset distance list and offset direction list to determine multiple offset motion vectors.
[0245] S830: Multiple offset motion vectors are used to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0246] S840: Calculates the offset prediction value of the current block using multiple offset motion information.
[0247] like Figure 11 As shown, a fifth embodiment of the inter-frame prediction method based on high-level motion vector representation of this application includes:
[0248] S910: Construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0249] S911: Scale the basic motion information to a specified precision and fill the scaled basic motion information into the basic motion information list.
[0250] In one specific embodiment of this application, a list of basic motion information is constructed by scaling the basic motion information to a specified precision. By shrinking or enlarging a basic motion information, a new basic motion information is formed and added to the list of basic motion information, which can improve the situation where the list of basic motion information is not full. In a specific embodiment, the precision of the motion vector is set as needed. For example, the basic motion information can be scaled to the following precisions {1 / 4, 1 / 2, 1, 2, 4} before being added to the list of basic motion information.
[0251] S920: Use the offset distance list and offset direction list to determine multiple offset motion vectors.
[0252] S930: Multiple offset motion vectors are used to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0253] S940: Calculate the offset prediction value of the current block using multiple offset motion information.
[0254] like Figure 12 As shown, a sixth embodiment of the inter-frame prediction method based on high-level motion vector representation of this application includes:
[0255] S1010: Construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0256] S1020: Determine multiple offset motion vectors using the offset distance list and offset direction list. S1030: Offset the basic motion vectors in each basic motion information using the multiple offset motion vectors to obtain multiple offset motion information.
[0257] S1040: Calculate the offset prediction value of the current block using multiple offset motion information.
[0258] S1050: Based on the offset prediction value, a coarse selection result is obtained by performing a coarse selection on multiple offset motion information.
[0259] In this embodiment of the application, the offset prediction value of each offset motion information is encoded with a fixed precision, such as a fixed 1 / 4 precision, and several optimal results are coarsely selected, such as two optimal results.
[0260] S1060: Starting from the coarse selection result, perform motion search according to different preset motion vector accuracies to obtain multiple search prediction values.
[0261] In one specific embodiment, the best results selected in the coarse selection, such as the two best results, are traversed through several precisions, such as traversing 5 precisions: 1 / 4, 1 / 2, 1, 2, 4, and motion search is performed to obtain multiple search prediction values, which can improve accuracy and reduce distortion.
[0262] S1070: Select the motion information corresponding to the search prediction value with the smallest evaluation index as the high-level motion vector expression motion information of the current block.
[0263] The embodiments of this application can reduce the amount of computation by coarsely selecting multiple offset motion information based on the offset prediction value. Starting from the coarse selection result, motion search is performed according to different preset motion vector accuracies, which can improve the accuracy of motion information prediction.
[0264] like Figure 13 As shown, a seventh embodiment of the inter-frame prediction method based on high-level motion vector representation of this application includes:
[0265] S1110: Construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0266] S1120: Determine multiple offset motion vectors using the offset distance list and offset direction list.
[0267] For details on the specific determination method, please refer to other embodiments in this application.
[0268] S1130: Use multiple offset motion vectors to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0269] S1140: Calculate the offset prediction value of the current block using multiple offset motion information.
[0270] S1150: Select target motion information from multiple offset motion information based on the offset prediction value.
[0271] Motion information includes motion vectors. The motion information may include forward motion information and backward motion information. Forward motion information may include a forward motion vector and a forward reference frame index, and backward motion information may include a backward motion vector and a backward reference frame index. In embodiments of this application, at least one optimal offset motion information can be selected as the target motion information.
[0272] S1160: Use multiple corrected motion vectors to correct the motion vectors in the target motion information to obtain multiple corrected motion information.
[0273] When the image display order of the forward reference frame and the backward reference frame of the current block are the same, the motion vector of the target motion information of the current block can be corrected using the decoding end motion vector correction (DMVR) technique.
[0274] Specifically, in B-frame bidirectional prediction, the first prediction block obtained by forward prediction is used as the basis, and the second prediction block is obtained by backward prediction. Multiple corrected motion vectors of the current block can be searched within the search range of the forward / backward first prediction blocks.
[0275] The search range of the first forward prediction block can be an N*N pixel range centered on the vertex of the first forward prediction block (the point where the top-left pixel is located). During the search, all pixels within the search range can be traversed in a predetermined order, such as traversing all pixels in the raster scan order from left to right and from top to bottom to obtain N. 2 A forward correction motion vector ΔMV1, where ΔMV1 is the motion vector from the vertex to the search pixel, or in other words, ΔMV1 is the motion vector from the first forward prediction block to the second forward prediction block (see the following explanation).
[0276] The search range for the backward first prediction block can be an N*N pixel range centered on the vertex of the backward first prediction block (the point where the bottom right pixel is located). During the search, all pixels within the search range can be traversed in a predetermined order to obtain N. 2 A backward correction motion vector is obtained by traversing all pixels in the raster scan order from right to left and from bottom to top. ΔMV2 is the motion vector from the vertex to the search pixel, or ΔMV1 is the motion vector from the backward first prediction block to the backward second prediction block.
[0277] To simplify the description, combined with Figure 14 The following explanation uses the example of obtaining the forward correction motion vector ΔMV1 within the search range of the first forward prediction block:
[0278] After finding search point C, the first forward prediction block is translated so that vertex A coincides with search point C, resulting in the second forward prediction block. Alternatively, when traversing to point C, a second forward prediction block with the same size as the current block is formed, using point C as its vertex. The predicted value of the second forward prediction block is then calculated. ΔMV1 is the motion vector from vertex A to search point C; or, ΔMV1 is the motion vector from the first forward prediction block containing vertex A to the second forward prediction block containing search point C.
[0279] The forward and backward correction motion vectors for each group are equal in magnitude but opposite in direction.
[0280] The forward motion vector of the current block can be corrected using the forward correction motion vector to obtain the corrected forward motion vector. Similarly, the backward motion vector of the current block can be corrected using the backward correction motion vector to obtain the corrected backward motion vector.
[0281] For example, if the motion vector of the current block is (MV1, MV2), then the corrected motion vector of the current block is (MV1+ΔMV1, MV2+ΔMV2).
[0282] S1170: Calculate the offset prediction value of the current block using multiple corrected motion information.
[0283] The offset prediction value is obtained by motion compensation using offset motion information.
[0284] S1180: Select the motion information corresponding to the offset prediction value with the smallest evaluation index as the high-level motion vector expression motion information of the current block.
[0285] Evaluation metrics may include the Mean Absolute Difference (MAD), Sum of Absolute Errors (SAD), Sum of Squared Errors (SSD), Mean Sum of Squared Errors (MSD), Normalized Product Correlation (NCC), Sequential Similarity Detection (SSDA), or Hadamard Transform (SATD). This application uses the Sum of Absolute Errors (SAD) as an example for illustration.
[0286] Based on the Sum of Absolute Difference (SAD) algorithm, the evaluation index between the forward and backward offset predictions of the current block is obtained. The corrected motion vector information corresponding to the pair of forward and backward offset predictions with the smallest SAD is selected as the high-level motion vector expression motion information of the current block.
[0287] This application also includes an eighth technical solution, such as Figure 15 As shown, the eighth embodiment of an inter-frame prediction method based on high-level motion vector representation of this application includes the following methods:
[0288] S1210: Construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0289] S1220: Obtain multiple initial offset values using the offset distance list. If the motion vector in the basic motion information is a bidirectional motion vector, execute S1221; if the motion vector in the basic motion information is unidirectional, jump to S1222.
[0290] S1221: Calculate the first Picture Order Count (POC) difference and the second POC difference between the current frame and two reference frames. The first POC difference is greater than or equal to the second POC difference. Use the first POC difference to scale the initial offset value to obtain the first offset value, and use the second POC difference to scale the initial offset value to obtain the second offset value. The first offset value is greater than or equal to the initial offset value, and the second offset value is less than or equal to the initial offset value. The first offset value and the second offset value form the motion vector offset value.
[0291] According to the availability of the two-direction MVs of each base MV (umve_base_pmv), different methods are used to calculate the MV offset value (ref_mvd):
[0292] When both two-direction MVs are available, calculate the mv offset value ref_mvd according to the POCs of the corresponding reference frames pointed to by the two MVs. Note that here it is allowed that the two MV directions are different or the same;
[0293] Set the weight corresponding to the MV in the direction with a larger poc difference delta_poc to a fixed value (1 << MV_SCALE_PREC). Here, delta_poc refers to the difference between the poc of the reference frame pointed to by this MV and the poc of the current frame;
[0294] Regarding the calculation of delta_poc:
[0295] delta_poc1 = abs(poc1 - cur_poc);
[0296] delta_poc0 = abs(poc0 - cur_poc);
[0297] Among them, poc0 is the POC of the reference frame pointed to by the MV in the first reference frame list; poc1 is the POC of the reference frame pointed to by the MV in the second reference frame list; cur_poc is the POC of the current frame.
[0298] Among them, MV_SCALE_PREC = 14; set a small weight weight for the MV corresponding to the smaller delta_poc in the other direction; in this way, the calculated MV offset value ref_mvd for the smaller delta_poc is smaller:
[0299] ref_mvd = ref_mvd * weight; where the initial value of ref_mvd is the value obtained by expanding the offset value in Table 1 by 4 times.
[0300] For example:
[0301] If abs(poc1 - cur_poc) >= abs(poc0 - cur_poc), then the weight:
[0302] list0_weight = (1 << MV_SCALE_PREC) / (abs(poc1 - cur_poc)) * abs(poc0 - cur_poc);
[0303] The MV offset value in the first reference frame list direction:
[0304] ref_mvd0 = (list0_weight * ref_mvd0 + (1 << (MV_SCALE_PREC - 1))) >> MV_SCALE_PREC.
[0305] In another embodiment of the present application, the weight corresponding to an MV in a certain direction with a small poc difference delta_poc is set to a fixed value (1 << MV_SCALE_PREC), where delta_poc refers to the difference between the poc of the reference frame pointed to by the MV and the poc of the current frame.
[0306] Regarding the calculation of delta_poc:
[0307] [[ID=1list0_weight=(1< <MV_SCALE_PREC) / (abs(poc1-cur_poc))*abs(poc0-cur_poc);
[0316] First reference frame list direction MV offset value:
[0317] ref_mvd0=(list0_weight*ref_mvd0+(1<<(MV_SCALE_PREC-1)))>>MV_SCALE_PREC.
[0318] In another embodiment, the POC difference can be left unfixed, and neither the small nor large ends of delta_poc can be fixed. Based on the original offset value, the MV offset value with a small delta_poc is scaled, such that the MV offset value is smaller than the original MV offset value; the MV offset value with a large delta_poc is scaled, such that the MV offset value is larger than the original MV offset value.
[0319] Weight:
[0320] List1_weight=(1< <MV_SCALE_PREC) / (abs(poc0-cur_poc))*abs(poc1-cur_poc);
[0321] list0_weight=(1< <MV_SCALE_PREC) / (abs(poc1-cur_poc))*abs(poc0-cur_poc)。
[0322] S1222: Use the initial offset value as the motion vector offset value.
[0323] S1223: Combine the motion vector offset value with multiple offset directions in the offset direction list to determine multiple offset motion vectors;
[0324] S1230: Use multiple motion vector offset values to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information;
[0325] S1240: Calculate the offset prediction value of the current block using multiple offset motion information.
[0326] The solution in this application embodiment can make the weights more accurate and obtain more accurate offset prediction values.
[0327] like Figure 16 As shown, a ninth embodiment of the inter-frame prediction method based on high-level motion vector representation of this application includes:
[0328] S1310: Construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0329] S1320: Use the offset distance list and offset direction list to determine multiple offset motion vectors.
[0330] S1330: Use multiple offset motion vectors to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0331] S1340: Calculate the offset prediction value of the current block using multiple offset motion information;
[0332] S1350: Obtain the high-level motion vector representation of the current block from multiple offset motion information based on the offset prediction value.
[0333] S1360: Performs inter-frame filtering on the predicted values corresponding to the motion information expressed by the high-level motion vector.
[0334] Inter-frame prediction filtering aims to eliminate spatial discontinuities between the predicted block and surrounding pixels caused by inter-frame prediction. There are two modes: InterPF (inter-predict filter) and Enhanced InterPF. These two modes will be described below.
[0335] Inter-frame filtering occurs between the inter-frame prediction and reconstruction processes. An inter-frame prediction filter flag is transmitted in the bitstream, indicating whether inter-frame prediction filtering is used for the current block. If the flag indicates that inter-frame prediction filtering is used, the decoder applies the same filtering method to the inter-frame prediction block after motion compensation; otherwise, the reconstruction process is directly invoked to add the residuals.
[0336] Inter-frame prediction filtering first constructs an intra-frame prediction value using four adjacent reconstructed reference pixels directly above, to the left, to the bottom left, and to the top right of the current pixel. Then, it uses this intra-frame prediction value and the inter-frame prediction value as weights to calculate the final inter-frame prediction value.
[0337] Specifically, it consists of two processes:
[0338] First, the intra-predicted block pred_Q is obtained using the following formula:
[0339] Pred_Q(x,y)=(Pred_V(x,y)+Pred_H(x,y)+1)>>2;
[0340] Pred_V(x,y)=((h-1-y)*Recon(x,-1)+(y+1)*Recon(-1,h)+(h>>1))>>log2(h);
[0341] Pred_H(x,y)=((w-1-x)*Recon(-1,y)+(x+1)*Recon(w,-1)+(w>>1))>>log2(w);
[0342] Where w and h are the width and height of the current block, x and y are the relative coordinates within the current block, and Recon(x,y) is the value of the surrounding reconstructed pixels.
[0343] The final prediction block is obtained by weighting the inter-frame prediction block Pred_inter and the intra-frame prediction block pred_Q in a 5:3 ratio.
[0344] Pred(x,y)=(Pred_inter(x,y)*5+Pred_Q(x,y)*3+4)>>3;
[0345] Pred_inter(x,y) represents the predicted pixel values obtained from inter-frame prediction.
[0346] Enhanced inter-frame prediction filtering (interpf) can be applied to inter-frame prediction to more effectively remove noise and discontinuities after motion compensation.
[0347] In inter-frame prediction filtering, a new 3-tap filter method is added. An inter-frame prediction filter identifier is still used to indicate whether inter-frame prediction filtering is used. Then, an index identifier is needed to indicate the selected filtering method so that the decoding end can decode the filter identifier and the filtering method index to determine the final filtering process.
[0348] Specific filtering methods:
[0349] P'(x,y)=f(x)*P(-1,y)+f(y)*P(x,-1)+(1-f(x)-f(y))*P(x,y);
[0350] in:
[0351] P(x,y) is the predicted value of point (x,y) before filtering and P'(x,y) is the predicted value of point (x,y) after filtering;
[0352] f(x) and f(y) are both filter coefficients obtained from the table below. P(x,-1) is the reference pixel directly above, and P(-1,y) is the reference pixel directly to the left.
[0353] The index syntax and meaning of inter-frame prediction filtering methods are shown in Table 4.
[0354] Table 3. Filtering coefficients.
[0355] 4 24,6,2,0 8 44,25,14,8,4,2,1,1 16 40,27,19,13,9,6,4,3,2,1 32 36,27,21,16,12,9,7,5,4,3 64 52,44,37,31,26,22,18,15,13,11
[0356] Table 4. Inter-frame prediction filter syntax.
[0357]
[0358] like Figure 17 As shown, the tenth embodiment of the inter-frame prediction method based on high-level motion vector representation of this application includes:
[0359] S1410: Construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0360] S1420: Determine multiple offset motion vectors using the offset distance list and offset direction list;
[0361] S1430: Use multiple offset motion vectors to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0362] S1440: Calculate the offset prediction value of the current block using multiple offset motion information.
[0363] S1450: Obtain the high-level motion vector representation of the current block from multiple offset motion information based on the offset prediction value.
[0364] S1460: Perform bidirectional gradient correction on the predicted values corresponding to the motion information expressed by the high-level motion vector.
[0365] Motion compensation is performed on the acquired high-level motion vector to express motion information, and predicted values are obtained. Then, bidirectional gradient correction (BGC) is performed on the predicted values to obtain the best predicted values. Note the syntax related to bidirectional gradient correction: whether BGC is enabled and which method to use for prediction under BGC.
[0366] In bidirectional inter-frame prediction, to obtain the prediction value of the current block from two reference prediction blocks after motion compensation, a bidirectional optical flow (BIO) or a simple weighted average operation is usually performed. However, since the errors of the two reference prediction blocks relative to the pixel values of the current prediction block are randomly differentiated, it is impossible to determine whether it is the average of the two prediction blocks. Therefore, bidirectional gradient correction (BGC) is used.
[0367] There are three main methods for calculating the correction of predicted values, and the specific formulas are as follows:
[0368]
[0369] Where: pred0 represents the direction prediction value of the first reference frame; pred1 represents the direction prediction value of the second reference frame; predBI represents the average value of the direction prediction values of the first and second reference frames, calculated as (pred0+pred1)>>1; k represents the correction intensity, set to a fixed value of 3; IbgFlag is 0 to indicate no gradient correction, and 1 to indicate gradient correction; IbgIdx is 0 to indicate forward gradient correction, and 1 to indicate backward gradient correction; Pred is the corrected prediction value.
[0370] By comparing the costs of these three computational methods, the optimal pattern is selected for encoding, and the syntax marking this pattern is entered into the bitstream. A specific diagram is shown below. Figure 18 As shown, V2 is predBI; V1 is predBI+(pred1-pred0)>>k; V3 is predBI+(pred0–pred1)>>k.
[0371] like Figure 19 As shown, the eleventh embodiment of the inter-frame prediction method based on high-level motion vector representation of this application includes the following methods:
[0372] S1510: Construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0373] S1511: Determine whether the current frame containing the current block meets the list update conditions.
[0374] By determining whether the current frame containing the current block meets the interval of a specified number of frames, for example, if the specified number of frames N = 25, then it is determined whether the interval between the current frame containing the current block and the previous update frame is 25 frames. If it is less than 25 frames, then no update is performed. In other embodiments, the specified number of frames can be set according to the situation.
[0375] If satisfied, then S1521: Calculate the average value of the offset values of each block in the specified number of frames, and use the average value to determine the offset distance list.
[0376] If the interval between the current frame containing the previous block and the previous updated frame meets a specified number of frames, that is, in this embodiment of the application, if the interval between the current frame containing the previous block and the previous updated frame is equal to 25 frames, the offset values of each block within 25 frames are counted and the average value is calculated.
[0377] S1520: Use the offset distance list and offset direction list to determine multiple offset motion vectors.
[0378] S1530: Use multiple offset motion vectors to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0379] S1540: Calculate the offset prediction value of the current block using multiple offset motion information.
[0380] The differences between consecutive frames in a video are generally not significant, especially in surveillance scenarios. Existing technologies update the average statistical offset value for each frame, which is time-consuming. This application's embodiment, by setting a condition that the translation value is updated only once for a specified number of preceding frames, can update images at intervals of that specified number of preceding frames. This reduces the large amount of statistical work caused by updating the statistical offset value for each frame. This application's implementation can effectively reduce the statistical calculation load for inter-frame prediction and improve inter-frame prediction efficiency.
[0381] like Figure 20 As shown, the twelfth embodiment of an inter-frame prediction method based on high-level motion vector representation of this application includes:
[0382] S1610: Construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information.
[0383] S1611: Compare the value of the motion vector in at least one direction in the basic motion information with a preset threshold to obtain a comparison result.
[0384] In this embodiment, the motion vector in the basic motion information has components in both the X and Y directions. For example, in this embodiment, the amplitude in the X direction is compared with a preset threshold. The preset threshold can be set as needed. This embodiment does not limit the value of the preset threshold. Specifically, in one embodiment, the preset threshold is 8. The amplitude of the motion vector in the X direction in the basic motion information is compared with the preset threshold 8 to determine whether the amplitude of the motion vector in the X direction in the basic motion information is greater than the preset threshold 8.
[0385] In other embodiments, the amplitude of the motion vector in the Y direction in the basic motion information can be compared with a preset threshold 8 to obtain a comparison result. Alternatively, the amplitudes of the motion vector in the X and Y directions in the basic motion information can be compared with preset thresholds 8 simultaneously to obtain comparison results.
[0386] More specifically, in the embodiments of this application, the values of the motion vectors of the basic motion information in the X or Y direction can be divided into categories, for example, into a preset number of Q segments (Q>=2). In the above embodiment, it is divided into 2 segments, corresponding to a preset threshold, and each segment corresponds to an offset distance list; in other embodiments, it can also be divided into 3 segments, corresponding to two preset thresholds, and each segment corresponds to an offset distance list.
[0387] S1612: Determine the list of offset distances based on the comparison results.
[0388] For example, in this embodiment of the application, if the magnitude of the motion vector in the X direction in the basic motion information is less than or equal to a preset threshold of 8, then a list with smaller offset values is selected, such as {1 / 4, 1 / 2, 1, 2, 4}.
[0389] If the magnitude of the motion vector in the X direction in the basic motion information is greater than the preset threshold 8, then the list with the larger offset value is selected, such as {1 / 4,1 / 2,1,2,4,8,16,32}.
[0390] Or / and, if the magnitude of the motion vector in the Y direction in the basic motion information is less than or equal to the preset threshold 8, then select the list with the smaller offset value, such as {1 / 4, 1 / 2, 1, 2, 4}.
[0391] If the magnitude of the motion vector in the Y direction in the basic motion information is greater than the preset threshold of 8, then the list with the larger offset value is selected, such as {1 / 4,1 / 2,1,2,4,8,16,32}.
[0392] S1620: Use the offset distance list and offset direction list to determine multiple offset motion vectors.
[0393] S1630: Multiple offset motion vectors are used to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0394] S1640: Calculate the offset prediction value of the current block using multiple offset motion information.
[0395] The embodiments of this application correct the motion vector of the basic motion information by selecting different offset value lists for the magnitude of the motion vector of the basic motion information, which can improve the accuracy of the correction and the accuracy of the prediction value. Furthermore, the inter-frame prediction method of the embodiments of this application does not require additional transmission syntax.
[0396] Figure 21 This is a schematic diagram of the structure of a first embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 21 As shown, the device may include: a construction module 11, an offset motion vector determination module 12, an offset motion information acquisition module 13, and a calculation module 14.
[0397] The construction module 11 is used to construct a basic motion information list for the current block using enhanced deduplication. The basic motion information list includes at least one basic motion information.
[0398] The offset motion vector determination module 12 is used to determine multiple offset motion vectors using the offset distance list and the offset direction list.
[0399] The offset motion information acquisition module 13 is used to offset the basic motion vector in each basic motion information using multiple offset motion vectors to obtain multiple offset motion information.
[0400] The calculation module 14 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0401] Figure 22 This is a schematic diagram of the structure of a second embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 22 As shown, the device may include: a construction module 21, a filling module 25, an offset motion vector determination module 22, an offset motion information acquisition module 23, and a calculation module 24.
[0402] The construction module 21 is used to build a basic motion information list for the current block, which includes at least two basic motion information items.
[0403] The filling module 25 is used to calculate new basic motion information using at least two basic motion information and fill it into the basic motion information list.
[0404] The offset motion vector determination module 22 is used to determine multiple offset motion vectors using the offset distance list and the offset direction list.
[0405] The offset motion information acquisition module 23 is used to offset the basic motion vector in each basic motion information using multiple offset motion vectors to obtain multiple offset motion information.
[0406] The calculation module 24 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0407] Figure 23 This is a schematic diagram of the structure of a third embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 23 As shown, the device may include: a construction module 31, an offset motion vector determination module 32, an offset motion information acquisition module 33, and a calculation module 34.
[0408] The construction module 31 is used to construct a basic motion information list for the current block based on the candidate motion information of the current block. The basic motion information list includes at least one basic motion information. The source of the candidate motion information includes the temporal candidate blocks of the current block. The temporal candidate blocks include the temporal co-location blocks of at least one sub-block of the current block.
[0409] The offset motion vector determination module 32 is used to determine multiple offset motion vectors using the offset distance list and the offset direction list.
[0410] The offset motion information acquisition module 33 is used to offset the basic motion vector in each basic motion information by using multiple offset motion vectors to obtain multiple offset motion information.
[0411] The calculation module 34 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0412] Figure 24 This is a schematic diagram of the structure of a fourth embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 24 As shown, the device may include: a construction module 41, an offset motion vector determination module 42, an offset motion information acquisition module 43, and a calculation module 44.
[0413] The construction module 41 is used to construct a basic motion information list for the current block based on the candidate motion information of the current block. The basic motion information list includes at least one basic motion information, and the source of the candidate motion information includes at least one historical motion vector.
[0414] The offset motion vector determination module 42 is used to determine multiple offset motion vectors using the offset distance list and the offset direction list.
[0415] The offset motion information acquisition module 43 is used to offset the basic motion vector in each basic motion information using multiple offset motion vectors to obtain multiple offset motion information.
[0416] The calculation module 44 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0417] Figure 25 This is a schematic diagram of the fifth embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 25 As shown, the device may include: a construction module 51, a filling module 55, an offset motion vector determination module 52, an offset motion information acquisition module 53, and a calculation module 54.
[0418] The construction module 51 is used to construct a basic motion information list for the current block, which includes at least one basic motion information.
[0419] The fill module 55 is used to scale the basic motion information to a specified precision and fill the scaled basic motion information into the basic motion information list.
[0420] The offset motion vector determination module 52 is used to determine multiple offset motion vectors using the offset distance list and the offset direction list.
[0421] The offset motion information acquisition module 53 is used to offset the basic motion vector in each basic motion information using multiple offset motion vectors to obtain multiple offset motion information.
[0422] The calculation module 54 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0423] Figure 26 This is a schematic diagram of the sixth embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 26 As shown, the device may include: a construction module 61, an offset motion vector determination module 62, an offset motion information acquisition module 63, a calculation module 64, a coarse selection module 65, a search prediction value acquisition module 66, and an advanced motion vector expression motion information acquisition module 67.
[0424] The construction module 61 is used to construct a basic motion information list for the current block, which includes at least one basic motion information.
[0425] The offset motion vector determination module 62 is used to determine multiple offset motion vectors using an offset distance list and an offset direction list.
[0426] The offset motion information acquisition module 63 is used to offset the basic motion vector in each basic motion information using multiple offset motion vectors to obtain multiple offset motion information.
[0427] The calculation module 64 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0428] The coarse selection module 65 is used to perform coarse selection on multiple offset motion information based on the offset prediction value to obtain the coarse selection result.
[0429] The search prediction value acquisition module 66 is used to perform motion search based on preset different motion vector accuracies, starting from the coarse selection results, to obtain multiple search prediction values.
[0430] The advanced motion vector representation motion information acquisition module 67 selects the motion information corresponding to the search prediction value with the smallest evaluation index as the advanced motion vector representation motion information of the current block.
[0431] Figure 27 This is a schematic diagram of the seventh embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 27 As shown, the device may include: a construction module 71, an offset motion vector determination module 72, an offset motion information acquisition module 73, a calculation module 74, a selection module 75, a correction module 76, a correction calculation module 77, and an advanced motion vector expression motion information acquisition module 78.
[0432] The construction module 71 is used to construct a basic motion information list for the current block, which includes at least one basic motion information.
[0433] The offset motion vector determination module 72 is used to determine multiple offset motion vectors using an offset distance list and an offset direction list.
[0434] The offset motion information acquisition module 73 is used to offset the basic motion vector in each basic motion information using multiple offset motion vectors to obtain multiple offset motion information.
[0435] The calculation module 74 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0436] Selection module 75 is used to select target motion information from multiple offset motion information based on offset prediction values.
[0437] The correction module 76 is used to correct the motion vectors in the target motion information using multiple correction motion vectors to obtain multiple correction motion information.
[0438] The correction calculation module 77 is used to calculate the correction prediction value of the current block using multiple correction motion information.
[0439] The advanced motion vector representation motion information acquisition module 78 is used to select the motion information corresponding to the modified prediction value with the smallest evaluation index as the advanced motion vector representation motion information of the current block.
[0440] Figure 28 This is a schematic diagram of the structure of the eighth embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 28 As shown, the device may include: a construction module 81, an offset initial value acquisition module 85, a motion vector offset value determination module 86, an offset motion vector determination module 82, an offset motion information acquisition module 83, and a calculation module 84.
[0441] The construction module 81 is used to build a basic motion information list for the current block, which includes at least one basic motion information.
[0442] The offset initial value acquisition module 85 is used to obtain multiple offset initial values using the offset distance list.
[0443] The motion vector offset value determination module 86 is used to obtain the motion vector offset value by scaling the initial offset value using the image display order difference when the motion vector in the basic motion information is a bidirectional motion vector; and to use the initial offset value as the motion vector offset value when the motion vector in the basic motion information is unidirectional.
[0444] The offset motion vector determination module 82 is used to determine multiple offset motion vectors by combining the motion vector offset value and multiple offset directions in the offset direction list.
[0445] The offset motion information acquisition module 83 is used to offset the basic motion vector in each basic motion information by using multiple motion vector offset values to obtain multiple offset motion information.
[0446] The calculation module 84 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0447] Figure 29 This is a schematic diagram of the ninth embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 29 As shown, the device may include: a construction module 91, an offset motion vector determination module 92, an offset motion information acquisition module 93, a calculation module 94, an advanced motion vector expression motion information acquisition module 95, and a filtering module 96.
[0448] Module 91 is used to build a list of basic motion information for the current block. The list of basic motion information includes at least one piece of basic motion information.
[0449] The offset motion vector determination module 92 is used to determine multiple offset motion vectors using the offset distance list and the offset direction list.
[0450] The offset motion information acquisition module 93 is used to offset the basic motion vector in each basic motion information by using multiple offset motion vectors to obtain multiple offset motion information.
[0451] The calculation module 94 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0452] The advanced motion vector representation motion information acquisition module 95 is used to obtain the advanced motion vector representation motion information of the current block from multiple offset motion information based on the offset prediction value.
[0453] The filtering module 96 is used to perform inter-frame filtering on the predicted values corresponding to the motion information expressed by the high-level motion vector.
[0454] Figure 30 This is a schematic diagram of the tenth embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 30 As shown, the device may include: a construction module 101, an offset motion vector determination module 102, an offset motion information acquisition module 103, a calculation module 104, an advanced motion vector expression motion information acquisition module 105, and a correction module 106.
[0455] The construction module 101 is used to construct a basic motion information list for the current block, which includes at least one basic motion information.
[0456] The offset motion vector determination module 102 is used to determine multiple offset motion vectors using an offset distance list and an offset direction list.
[0457] The offset motion information acquisition module 103 is used to offset the basic motion vector in each basic motion information by using multiple offset motion vectors to obtain multiple offset motion information.
[0458] The calculation module 104 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0459] The advanced motion vector representation motion information acquisition module 105 is used to acquire the advanced motion vector representation motion information of the current block from multiple offset motion information based on the offset prediction value.
[0460] The correction module 105 is used to perform bidirectional gradient correction on the predicted values corresponding to the motion information expressed by the high-level motion vector.
[0461] Figure 31 This is a schematic diagram of the eleventh embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 31 As shown, the device may include: a construction module 111, a judgment module 115, an offset distance list determination module 116, an offset motion vector determination module 112, an offset motion information acquisition module 113, and a calculation module 14.
[0462] The construction module 111 is used to construct a basic motion information list for the current block, which includes at least one basic motion information.
[0463] The judgment module 115 is used to determine whether the current frame containing the current block meets the list update conditions.
[0464] The offset distance list determination module 116 is used to calculate the average value of the offset values of each block in a specified number of frames if the list update condition is met, and to determine the offset distance list using the average value.
[0465] The offset motion vector determination module 112 is used to determine multiple offset motion vectors using an offset distance list and an offset direction list.
[0466] The offset motion information acquisition module 113 is used to offset the basic motion vector in each basic motion information by using multiple offset motion vectors to obtain multiple offset motion information.
[0467] The calculation module 114 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0468] Figure 32 This is a schematic diagram of the structure of the twelfth embodiment of an inter-frame prediction device based on high-level motion vector representation according to this application. Figure 32 As shown, the device may include: a construction module 121, a comparison module 125, an offset distance list determination module 126, an offset motion vector determination module 122, an offset motion information acquisition module 123, and a calculation module 124.
[0469] The construction module 121 is used to construct a basic motion information list for the current block, which includes at least one basic motion information.
[0470] The comparison module 125 is used to compare the value of the motion vector in at least one direction in the basic motion information with a preset threshold to obtain a comparison result.
[0471] The offset distance list determination module 126 is used to determine the offset distance list based on the comparison results.
[0472] The offset motion vector determination module 122 is used to determine multiple offset motion vectors using an offset distance list and an offset direction list.
[0473] The offset motion information determination module 123 uses multiple offset motion vectors to offset the basic motion vectors in each basic motion information to obtain multiple offset motion information.
[0474] The calculation module 124 is used to calculate the offset prediction value of the current block using multiple offset motion information.
[0475] Figure 33 This is a schematic diagram of the structure of an embodiment of the encoder of this application. Figure 33 As shown, the encoder includes a processor 131 and a memory 132 coupled to the processor.
[0476] The memory 132 stores a computer program for implementing the methods of any of the above embodiments; the processor 131 executes the computer program stored in the memory 132 to implement the steps of the above method embodiments. The processor 131 may also be referred to as a CPU (Central Processing Unit). The processor 131 may be an integrated circuit chip with signal processing capabilities. The processor 131 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor may be a microprocessor or any conventional processor.
[0477] Figure 34 This is a schematic diagram of the structure of an embodiment of the storage medium of this application. Figure 34As shown, the storage medium 140 in this embodiment stores a computer program 141, which, when executed, implements the methods provided in the above embodiments of this application. The computer program 141 can be formed into a program file and stored in the storage medium 140 as a software product, enabling a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium 140 includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or terminal devices such as computers, servers, mobile phones, and tablets.
[0478] A schematic diagram of the structure of an embodiment of the electronic device of this application. (See diagram below.) Figure 35 As shown, the electronic device 150 may include, but is not limited to, encoder 151 (the encoder mentioned above), or other encoders capable of implementing the above method steps, without specific limitations here.
[0479] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0480] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. An inter-frame prediction method based on high-level motion vector representation, characterized in that, The method includes: Enhanced deduplication is used to construct a basic motion information list for the current block. The basic motion information list includes at least one basic motion information. The sources of the basic motion information include motion information and zero motion information of temporal candidate blocks of the current block. The temporal candidate blocks include temporal co-located blocks of at least one sub-block of the current block. Multiple offset motion vectors are determined using the offset distance list and the offset direction list; By using the multiple offset motion vectors to offset the basic motion vectors in each of the basic motion information, multiple offset motion information is obtained; The offset prediction value of the current block is calculated using the multiple offset motion information. The step of constructing a basic motion information list for the current block using enhanced deduplication includes: The system sequentially determines whether the candidate motion information for the current block is available; if the candidate motion information is available, it checks for duplicates with all previous candidate motion information; if the duplicate check passes, the candidate motion information is added to the basic motion information list as the basic motion information; or, The system sequentially determines whether the candidate motion information of the current block is available; if the candidate motion information is available and comes from the spatial candidate block of the current block, at least one candidate motion information from other spatial candidate blocks of the current block is extracted for deduplication; if the deduplication is successful, the candidate motion information is added to the basic motion information list as the basic motion information; or, A basic motion information list is constructed for the current block; the basic motion information in the basic motion information list is deduplicated. The method of determining multiple offset motion vectors using an offset distance list and an offset direction list includes: Multiple initial offset values are obtained using the offset distance list; If the motion vector in the basic motion information is a bidirectional motion vector, the initial offset value is scaled using the image display order difference to obtain the motion vector offset value; if the motion vector in the basic motion information is unidirectional, the initial offset value is used as the motion vector offset value. Multiple offset motion vectors are determined by combining the motion vector offset value and multiple offset directions in the offset direction list; Before determining multiple offset motion vectors using the offset distance list and offset direction list, the process includes: The value of the motion vector in the basic motion information in at least one direction is compared with a preset threshold to obtain a comparison result, wherein the value in at least one direction includes the amplitude in at least one direction; The offset distance list is determined based on the comparison results.
2. The method according to claim 1, characterized in that, If the plagiarism check is passed, the candidate motion information is added to the basic motion information list as the basic motion information, including: If the duplicate detection is successful, the candidate motion information is added to the basic motion information list as the basic motion information until the number of basic motion information in the basic motion information list reaches a preset value.
3. The method according to claim 2, characterized in that, The step of extracting at least one motion information from candidate motion information of other spatial candidate blocks from the current block for deduplication includes: Select and check for duplicates of candidate motion information from other spatial candidate blocks adjacent to the stated spatial candidate block; Select candidate motion information from other spatial candidate blocks that are not adjacent to the stated spatial candidate block for deduplication.
4. The method according to any one of claims 2-3, characterized in that, The plagiarism detection includes: Determine whether the image display order of the reference frames in the two candidate motion information is the same and whether the motion vectors are the same.
5. The method according to claim 4, characterized in that, After determining whether the image display order of the reference frames in the two candidate motion information is the same and whether the motion vectors are the same... Includes: wherein the two candidate motion information includes first candidate motion information and second candidate motion information; Determine whether the first candidate motion information is available in the first reference frame direction of the current frame, and whether the second candidate motion information is available in the second reference frame direction of the current frame; If the first candidate motion information is unavailable in the first reference frame direction of the current frame, and the second candidate motion information is unavailable in the second reference frame direction of the current frame, then determine whether the first image display order of the first candidate motion information and the second image display order of the second candidate motion information are the same. If so, determine whether the motion vector information of the first candidate motion information in the second reference frame direction of the current frame is the same as the motion vector information of the second candidate motion information in the first reference frame direction of the current frame; If so, then the first candidate motion information and the second candidate motion information are the same; If the first candidate motion information and the second candidate motion information are both available in the first reference frame direction and the second reference frame direction of the current frame, then determine whether the motion vector information of the first candidate motion information in the first reference frame direction and the first reference frame direction of the current frame is the same as the motion vector information of the second candidate motion information in the first reference frame direction or the first reference frame direction of the current frame. If so, then the first candidate motion information and the second candidate motion information are the same.
6. The method according to claim 4, characterized in that, After determining whether the image display order of the reference frames in the two candidate motion information is the same and whether the motion vectors are the same... Includes: wherein the two candidate motion information includes first candidate motion information and second candidate motion information; Determine whether the first candidate motion information is available in the first reference frame direction of the current frame, and whether the second candidate motion information is available in the second reference frame direction of the current frame; If neither is available or both are unavailable, determine whether the first image display order of the first candidate motion information and the second image display order of the second candidate motion information are the same; If so, determine whether the motion vector information of the first candidate motion information in the second reference frame direction of the current frame is the same as the motion vector information of the second candidate motion information in the first reference frame direction of the current frame; If so, then the first candidate motion information and the second candidate motion information are the same.
7. The method according to claim 1, characterized in that, The method of constructing a basic motion information list for the current block using enhanced deduplication includes: Obtain candidate motion information for the current block, wherein the candidate motion information for the current block includes candidate blocks in the spatial domain adjacent to the current block; Among them, the existing spatial candidate blocks adjacent to the current block include: The first spatial candidate block is adjacent to the bottom left pixel of the current block, and the bottom edge of the first spatial candidate block is on the same straight line as the bottom edge of the current block. The second spatial candidate block is adjacent to the top right pixel of the current block, and the right side of the second spatial candidate block is on the same straight line as the right side of the current block. The third spatial candidate block is adjacent to the top-left pixel of the current block, and the top edge of the third spatial candidate block is on the same straight line as the top edge of the current block. The fourth spatial candidate block is adjacent to the top right pixel of the current block, and the left side of the fourth spatial candidate block is on the same straight line as the right side of the current block. The fifth spatial candidate block is adjacent to the top-left pixel of the current block, and the bottom edge of the fifth spatial candidate block is on the same straight line as the top edge of the current block. A second number of airspace candidate blocks are formed by adding new airspace candidate blocks or deleting some of the original airspace candidate blocks.
8. The method according to claim 7, characterized in that, The method of adding new spatial candidate blocks includes: By adding a sixth spatial candidate block and / or a seventh spatial candidate block; the sixth spatial candidate block is adjacent to the top-left pixel of the current block, and the left side of the sixth spatial candidate block is in line with the left side of the current block; the seventh spatial candidate block is adjacent to the first spatial candidate block and the current block respectively, the bottom edge of the seventh spatial candidate block is in line with the top edge of the first spatial candidate block, and the right side of the seventh spatial candidate block is in line with the left side of the current block.
9. The method according to claim 7, characterized in that, The deletion of some original spatial candidate blocks includes: Reduce the number of fourth and / or fifth spatial domain candidate blocks.
10. The method according to any one of claims 7-9, characterized in that, The order of the spatial candidate blocks in the second number of spatial candidate blocks can be arbitrarily and freely combined.
11. The method according to claim 1, characterized in that, The list of basic motion information includes at least two basic motion information items; The process of constructing a basic motion information list for the current block also includes: New basic motion information is calculated using at least two of the aforementioned basic motion information and then filled into the basic motion information list.
12. The method according to claim 11, characterized in that, The calculation of new basic motion information using at least two of the basic motion information includes: Calculate a weighted average of at least two of the aforementioned basic motion information as the new basic motion information; and / or Calculate the filtered results of at least two of the basic motion information as the new basic motion information.
13. The method according to claim 1, characterized in that, The step of constructing a basic motion information list for the current block, wherein the basic motion information list includes at least one basic motion information, including: Based on the candidate motion information of the current block, a basic motion information list is constructed for the current block. The basic motion information list includes at least one basic motion information. The source of the candidate motion information includes the temporal candidate blocks of the current block. The temporal candidate blocks include the temporal co-location blocks of at least one sub-block of the current block.
14. The method according to claim 1, characterized in that, The step of constructing a basic motion information list for the current block, wherein the basic motion information list includes at least one basic motion information, including: Based on the candidate motion information of the current block, a basic motion information list is constructed for the current block. The basic motion information list includes at least one basic motion information, and the source of the candidate motion information includes at least one historical motion vector.
15. The method according to claim 1, characterized in that, The step of constructing a basic motion information list for the current block, wherein the basic motion information list includes at least one basic motion information, including: The basic motion information is scaled to a specified precision, and the scaled basic motion information is then added to the basic motion information list.
16. The method according to claim 1, characterized in that, After calculating the offset prediction value of the current block using the multiple offset motion information, the method further includes: A coarse selection result is obtained by performing a coarse selection on the plurality of offset motion information based on the offset prediction value; Starting from the coarse selection results, motion search is performed according to different preset motion vector accuracies to obtain multiple search prediction values; The motion information corresponding to the search prediction value with the smallest evaluation index is selected as the high-level motion vector expression motion information of the current block.
17. The method according to claim 1, characterized in that, After calculating the offset prediction value of the current block using the multiple offset motion information, the method further includes: Target motion information is selected from the plurality of offset motion information based on the offset prediction value; Multiple corrected motion vectors are used to correct the motion vectors in the target motion information to obtain multiple corrected motion information; The offset prediction value of the current block is calculated using the multiple offset motion information. The motion information corresponding to the offset prediction value with the smallest evaluation index is selected as the high-level motion vector expression motion information of the current block.
18. The method according to claim 1, characterized in that, The method of determining multiple offset motion vectors using an offset distance list and an offset direction list includes: Obtain multiple initial offset values using the offset distance list; If the motion vector in the basic motion information is a bidirectional motion vector, then calculate the first image display order difference and the second image display order difference between the current frame and two reference frames. The first image display order difference is greater than or equal to the second image display order difference. Use the first image display order difference to scale the initial offset value to obtain a first offset value. Use the second image display order difference to scale the initial offset value to obtain a second offset value. The first offset value is greater than or equal to the initial offset value, and the second offset value is less than or equal to the initial offset value. The first offset value and the second offset value constitute the motion vector offset value. If the motion vector in the basic motion information is unidirectional, then the initial offset value is used as the offset value of the motion vector.
19. The method according to claim 1, characterized in that, After calculating the offset prediction value of the current block using the multiple offset motion information, the process includes: Based on the offset prediction value, the high-level motion vector representation motion information of the current block is obtained from the plurality of offset motion information; Inter-frame filtering is performed on the predicted values corresponding to the motion information expressed by the high-level motion vector.
20. The method according to claim 1, characterized in that, After calculating the offset prediction value of the current block using the multiple offset motion information, the process includes: Based on the offset prediction value, the high-level motion vector representation motion information of the current block is obtained from the plurality of offset motion information; The predicted values corresponding to the motion information expressed by the high-level motion vector are subjected to bidirectional gradient correction.
21. The method according to claim 1, characterized in that, Before determining multiple offset motion vectors using the offset distance list and offset direction list, the process includes: Determine whether the current frame containing the current block satisfies the list update condition; If the conditions are met, the average value of the offset values of each block in the specified number of frames is calculated, and the offset distance list is determined using the average value.
22. An inter-frame prediction device based on high-level motion vector representation, characterized in that, include: A construction module is used to construct a basic motion information list for the current block using enhanced deduplication. The basic motion information list includes at least one basic motion information. The sources of the basic motion information include motion information and zero motion information of temporal candidate blocks of the current block. The temporal candidate blocks include temporal co-occurrence blocks of at least one sub-block of the current block. The offset motion vector determination module is used to determine multiple offset motion vectors using an offset distance list and an offset direction list; The offset motion information acquisition module is used to offset the basic motion vector in each of the basic motion information using the multiple offset motion vectors to obtain multiple offset motion information; The calculation module is used to calculate the offset prediction value of the current block using the multiple offset motion information; The step of constructing a basic motion information list for the current block using enhanced deduplication includes: The system sequentially determines whether the candidate motion information for the current block is available; if the candidate motion information is available, it checks for duplicates with all previous candidate motion information; if the duplicate check passes, the candidate motion information is added to the basic motion information list as the basic motion information; or, The system sequentially determines whether the candidate motion information of the current block is available; if the candidate motion information is available and comes from the spatial candidate block of the current block, at least one candidate motion information from other spatial candidate blocks of the current block is extracted for deduplication; if the deduplication is successful, the candidate motion information is added to the basic motion information list as the basic motion information; or, A basic motion information list is constructed for the current block; the basic motion information in the basic motion information list is deduplicated. The method of determining multiple offset motion vectors using an offset distance list and an offset direction list includes: Multiple initial offset values are obtained using the offset distance list; If the motion vector in the basic motion information is a bidirectional motion vector, the initial offset value is scaled using the image display order difference to obtain the motion vector offset value; if the motion vector in the basic motion information is unidirectional, the initial offset value is used as the motion vector offset value. Multiple offset motion vectors are determined by combining the motion vector offset value and multiple offset directions in the offset direction list; Before determining multiple offset motion vectors using the offset distance list and offset direction list, the process includes: The value of the motion vector in the basic motion information in at least one direction is compared with a preset threshold to obtain a comparison result, wherein the value in at least one direction includes the amplitude in at least one direction; The offset distance list is determined based on the comparison results.
23. An encoder, characterized in that, The encoder includes a processor and a memory connected to the processor, wherein... The memory stores computer programs; The processor is used to execute the computer program stored in the memory to implement the method as described in any one of claims 1-21.
24. A storage medium, characterized in that, The storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1-21.
25. An electronic device, characterized in that, Includes the encoder as described in claim 23.