Angle mode inter-frame prediction method, encoder and storage medium
By constructing candidate neighbor block lists and motion information latch checks, determining the effective angle direction, optimizing the angle mode inter-frame prediction method, solving the problem of large computing overhead in the prior art, and improving coding efficiency.
Patent Information
- Application Number
- CN202410968886.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-20
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-07-20
AI Technical Summary
The existing angular mode inter-frame prediction method has high computational overhead, resulting in inefficiency.
By constructing a list of candidate neighbor blocks, setting motion information, performing motion information duplication to determine the effective angle direction, and using the motion information in the effective angle direction to calculate the predicted value, reducing unnecessary calculation steps.
Reduces calculation overhead, improves coding efficiency, and reduces resource consumption.
Smart Images

Figure CN119031144A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video coding technology, and in particular to an angle mode inter-frame prediction method, an encoder and a storage medium. Background Art
[0002] Video encoding technology can be used to compress videos to reduce the amount of video data, reduce network bandwidth during video transmission, and reduce storage space. Among them, video encoding modes can include inter-frame prediction mode and intra-frame prediction mode prediction.
[0003] Taking the inter-frame prediction mode as an example, the inter-frame prediction uses a lot of highly correlated redundant information in the reference frame to predict the information of the current frame. Among them, the inter-frame prediction mode can be divided into many types, such as the inter-frame motion vector angle prediction mode (MVAP, Motion Vector Angle Prediction), the temporal motion vector prediction mode, the spatial motion vector prediction mode, the historical motion vector motion mode, etc.
[0004] Taking the inter-frame motion vector angle prediction mode as an example, the inter-frame motion vector angle prediction mode can also be called angle mode inter-frame prediction. The so-called inter-frame motion vector angle prediction is to use the motion information of the neighboring blocks in multiple angle directions of the current block (the block to be predicted in the current frame) as the motion information of the current block, and calculate the rate-distortion cost of the current block when the motion information of the neighboring blocks in different angle directions is used as the motion information of the current block, and finally use the motion information of the neighboring blocks in the angle direction with the smallest rate-distortion cost as the motion information of the current block, and then obtain the prediction value of the current block through the motion information of the current block.
[0005] However, the existing angle mode inter-frame prediction requires high computational overhead. Summary of the invention
[0006] The present application provides an angle mode inter-frame prediction method, an encoder and a storage medium, which can solve the problem of high computational overhead required for existing angle mode inter-frame prediction.
[0007] To solve the above technical problems, a technical solution adopted in the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for a current block, the candidate neighbor block list comprising neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for unavailable neighbor blocks; performing motion information duplication check on neighbor blocks in each angle direction, and the angle direction through which the duplication is checked is the valid angle direction; using the motion information of the reference block of the unavailable neighbor block in the valid angle direction to modify the motion information of the unavailable neighbor block in the valid angle direction; and respectively using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.
[0008] To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the effective angle direction; a modification module, used to modify the motion information of the unavailable neighbor blocks in the effective angle direction by using the motion information of the reference block of the unavailable neighbor blocks in the effective angle direction; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and / or unavailable neighbor blocks in each effective angle direction respectively.
[0009] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; if the time domain co-located block of the unavailable neighbor block is available, the motion information of the unavailable neighbor block is set using the motion information of the time domain co-located block, otherwise the initial value is set to the motion information of the unavailable neighbor block; the neighbor blocks in each angle direction are checked for duplication of motion information, and the angle direction through duplication checking is the valid angle direction; the motion information of the available neighbor block whose motion information is the initial value is modified using the motion information of the reference block of the unavailable neighbor block whose motion information is the initial value; and the prediction value of the current block is calculated using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction respectively.
[0010] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for the unavailable neighbor block using the motion information of the time domain co-located block when the time domain co-located block of the unavailable neighbor block is available, and used to set the initial value to the motion information of the unavailable neighbor block when the time domain co-located block of the unavailable neighbor block is unavailable; a duplicate checking module, used to check the motion information of the neighbor blocks in each angle direction for duplicate checking, and the angle direction through which the duplicate checking is performed is the valid angle direction; a modification module, used to modify the motion information of the available neighbor block whose motion information is the initial value using the motion information of the reference block of the unavailable neighbor block whose motion information is the initial value; a calculation module, used to calculate the prediction value of the current block using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction respectively.
[0011] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; selecting at least one pair of neighbor blocks in each angle direction according to the size of the current block to perform motion information duplication check, and the angle direction through duplication check is the valid angle direction; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the available neighbor block; and respectively using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.
[0012] To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes the neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to select at least one pair of neighbor blocks in each angle direction according to the size of the current block to check the motion information for duplicate checking, and the angle direction through which the duplicate checking is performed is the effective angle direction; a modification module, used to modify the motion information of the available neighbor blocks by using the motion information of the reference block of the unavailable neighbor blocks; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each effective angle direction respectively.
[0013] To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, the angle direction through which the duplication check is performed is a valid angle direction, wherein if the angle direction satisfies the first condition, at least one duplication check is added; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and respectively using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.
[0014] To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, the angle direction through which the duplicate checking is performed is a valid angle direction, wherein if the angle direction satisfies the first condition, at least one duplicate checking is added; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction respectively.
[0015] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including the neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, the angle direction through which the duplication check is performed is the valid angle direction, wherein if at least two of the horizontal, vertical and horizontal upward duplication check results meet the second condition, then at least one horizontal upward duplication check is reduced; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.
[0016] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, the angle direction through which the duplicate checking is performed is a valid angle direction, wherein if at least two of the horizontal, vertical and horizontal upward duplicate checking results meet the second condition, at least one horizontal upward duplicate checking is reduced; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction respectively.
[0017] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list comprising neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, the angle direction for duplication check being a valid angle direction, the duplication check comprising determining whether the image sequence index of the reference frame of at least one pair of selected neighbor blocks is the same and whether the motion is the same; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and calculating the prediction value of the current block using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction respectively.
[0018] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, the angle direction of the duplicate checking is a valid angle direction, and the duplicate checking includes determining whether the image sequence index of the reference frame of at least one pair of selected neighbor blocks is the same and whether the motion is the same; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction respectively.
[0019] To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, and the angle direction through which the duplication check is performed is the effective angle direction; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; the current block is divided into multiple sub-blocks, and motion compensation is performed using the motion information of the corresponding neighbor block of each sub-block in the effective angle direction to obtain a prediction value of each sub-block, and the prediction values of all sub-blocks constitute the prediction value of the current block, wherein the motion information of at least two corresponding neighbor blocks is used when performing motion compensation on the sub-block in at least one effective angle direction.
[0020] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the effective angle direction; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to perform motion compensation by using the motion information of the corresponding neighbor blocks of each sub-block in the effective angle direction when the current block is divided into multiple sub-blocks, to obtain the prediction value of each sub-block, the prediction values of all sub-blocks constitute the prediction value of the current block, wherein the motion information of at least two of the corresponding neighbor blocks is used when the sub-block is motion compensated in at least one effective angle direction.
[0021] To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; checking for duplicate motion information of the neighbor blocks in each angle direction, and the angle direction through the duplicate checking is the valid angle direction; filling the valid angle direction into the angle mode list to obtain the angle mode index of the valid angle direction; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and using the motion information of the available and / or unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.
[0022] To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction checked for duplicates is the valid angle direction; a filling module, used to fill the valid angle direction into the angle mode list to obtain the angle mode index of the valid angle direction; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available and / or unavailable neighbor blocks in each valid angle direction respectively.
[0023] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; checking for duplicate motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the valid angle direction; determining the order of each valid angle direction using the texture direction of the current block; filling the valid angle directions into the mode list in order; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and calculating the prediction value of the current block using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction respectively.
[0024] To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction through the duplicate checking is the valid angle direction; a determination module, used to determine the order of each valid angle direction using the texture direction of the current block; a filling module, used to fill the valid angle directions into the mode list in order; a modification module, used to modify the motion information of the unavailable neighbor block using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block using the motion information of the available neighbor blocks and / or the unavailable neighbor blocks in each valid angle direction respectively.
[0025] In order to solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, the angle direction of the duplication check is the effective angle direction; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; the current block is divided into multiple sub-blocks, and each sub-block is used in the effective angle direction to modify the motion information of the unavailable neighbor block; The motion information of the corresponding neighboring block is obtained to obtain the motion information of each sub-block, where the motion information includes a motion vector; the first prediction value of each sub-block is corrected by using multiple corrected motion vectors to obtain multiple second prediction values of each sub-block, where the first prediction value is obtained by motion compensation using the motion information; the corrected motion vector corresponding to the second prediction value with the smallest evaluation index is selected for each sub-block as the final corrected motion vector of the sub-block; the final corrected motion vectors of all sub-blocks are used for correction to obtain the corrected motion vector; the prediction value of each sub-block is obtained by using the motion information including the corrected motion vector, and the prediction values of all sub-blocks constitute the prediction value of the current block.
[0026] In order to solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, which includes: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the effective angle direction; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a first calculation module, used to, when the current block is divided into multiple sub-blocks, respectively use each sub-block in the effective angle direction to calculate the motion information of the unavailable neighbor block; The invention relates to a method for obtaining the motion information of each sub-block by using the motion information of the corresponding neighboring block in the degree direction, wherein the motion information includes a motion vector; a first correction module, which is used to respectively correct the first prediction value of each sub-block by using multiple corrected motion vectors to obtain multiple second prediction values of each sub-block, wherein the first prediction value is obtained by motion compensation using the motion information; a selection module, which is used to respectively select the corrected motion vector corresponding to the second prediction value with the smallest evaluation index for each sub-block as the final corrected motion vector of the sub-block; a second correction module, which is used to perform correction using the final corrected motion vectors of all sub-blocks to obtain the corrected motion vector; and a second calculation module, which is used to obtain the prediction value of each sub-block by using the motion information including the corrected motion vector, wherein the prediction values of all sub-blocks constitute the prediction value of the current block.
[0027] To solve the above technical problems, another technical solution adopted in the present application is: to provide an encoder, which includes a processor and a memory connected to the processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the above method.
[0028] In order to solve the above technical problem, another technical solution adopted by the present application is: providing a storage medium storing program instructions, which can implement the above method when executed.
[0029] Through the above method, the present application can only modify the motion information of the unavailable neighboring blocks in the valid angle direction after obtaining the valid angle direction through duplication checking. Compared with the method of modifying the unavailable neighboring blocks in each angle direction to fill the motion information, the computational overhead can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flowchart of the first embodiment of the angle mode inter-frame prediction method of the present application;
[0031] Figure 2 Schematic diagram of neighboring blocks of the current block in five angle directions;
[0032] Figure 3 It is a flowchart of the second embodiment of the angle mode inter-frame prediction method of the present application;
[0033] Figure 4 is a flowchart of a third embodiment of the angle mode inter-frame prediction method of the present application;
[0034] Figure 5 is a flowchart of a fourth embodiment of the angle mode inter-frame prediction method of the present application;
[0035] Figure 6 is a flowchart of a fifth embodiment of the angle mode inter-frame prediction method of the present application;
[0036] Figure 7 is a flowchart of a sixth embodiment of the angle mode inter-frame prediction method of the present application;
[0037] Figure 8 yes Figure 7 The specific process diagram of S630;
[0038] Fig. 9 This is a schematic diagram of the present application selecting a first number of neighboring blocks in the direction corresponding to the width and the height for duplication checking;
[0039] Fig.10 This is a schematic diagram of the present application selecting a second number of neighboring blocks in the direction corresponding to the width and the height for duplication checking;
[0040] Fig.11 is a flowchart of a seventh embodiment of the angle mode inter-frame prediction method of the present application;
[0041] Fig.12 This is a schematic diagram of adding a duplicate check under the first condition of this application;
[0042] Fig.13 This is another schematic diagram of adding a duplicate check under the first condition of this application;
[0043] Fig.14 This is another schematic diagram of adding a duplicate check to the first condition of this application;
[0044] Fig.15 This is another schematic diagram of adding a duplicate check under the first condition of this application;
[0045] Fig.16 is a flowchart of an eighth embodiment of the angle mode inter-frame prediction method of the present application;
[0046] Fig.17 This is a schematic diagram of reducing one duplicate check under the second condition of this application;
[0047] Fig.18This is another schematic diagram of reducing one duplicate check under the second condition of this application;
[0048] Fig.19 This is another schematic diagram of reducing one duplicate check under the second condition of this application;
[0049] Fig. 20 is a flowchart of a ninth embodiment of the angle mode inter-frame prediction method of the present application;
[0050] Fig.21 is a flowchart of the tenth embodiment of the angle mode inter-frame prediction method of the present application;
[0051] Fig. 22 Schematic diagram of calculating the motion vector of the first sub-block using two neighboring blocks in the horizontal and vertical directions of the present application;
[0052] Fig.23 is a flowchart of the eleventh embodiment of the angle mode inter-frame prediction method of the present application;
[0053] Fig.24 is a flowchart of the twelfth embodiment of the angle mode inter-frame prediction method of the present application;
[0054] Fig.25 yes Fig.24 The specific process diagram of S1240;
[0055] Fig.26 is a flowchart of the thirteenth embodiment of the angle mode inter-frame prediction method of the present application;
[0056] Fig. 27 yes Fig.26 The specific process diagram of S1306;
[0057] Fig.28 It is a schematic diagram of searching for a forward corrected motion vector within a search range of a forward first prediction block in the present application;
[0058] Fig.29 It is a structural diagram of a first embodiment of an angle mode inter-frame prediction device of the present application;
[0059] Fig.30 It is a structural diagram of a second embodiment of an angle mode inter-frame prediction device of the present application;
[0060] Fig.31 It is a structural diagram of a third embodiment of an angle mode inter-frame prediction device of the present application;
[0061] Fig.32 It is a structural diagram of a fourth embodiment of an angle mode inter-frame prediction device of the present application;
[0062] Fig.33It is a structural diagram of a fifth embodiment of an angle mode inter-frame prediction device of the present application;
[0063] Fig.34 It is a structural diagram of a sixth embodiment of an angle mode inter-frame prediction device of the present application;
[0064] Fig.35 It is a structural diagram of a seventh embodiment of an angle mode inter-frame prediction device of the present application;
[0065] Fig.36 It is a structural diagram of an eighth embodiment of an angle mode inter-frame prediction device of the present application;
[0066] Fig.37 It is a structural diagram of a ninth embodiment of an angle mode inter-frame prediction device of the present application;
[0067] Fig.38 is a structural diagram of a tenth embodiment of an angle mode inter-frame prediction device of the present application;
[0068] Fig.39 It is a structural schematic diagram of an embodiment of an encoder of the present application;
[0069] Fig.40 It is a structural schematic diagram of an embodiment of a storage medium of the present application;
[0070] Fig.41 It is a structural schematic diagram of an embodiment of the electronic device of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0072] The terms "first", "second", and "third" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first", "second", and "third" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0073] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments without conflict.
[0074] Figure 1 is a flowchart of the first embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment may include:
[0075] S110: Construct a candidate neighbor block list for the current block.
[0076] The current block may also be referred to as the current coding block, that is, the block currently to be coded. In some cases, the coding block may be referred to as a coding unit (CU). The video frame in which the current block is located may be referred to as the current frame.
[0077] The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions. The current block and the neighbor block both belong to the current frame, and the neighbor block is 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 neighbor block is located on the left and top of the current block. Referring to the concept of angle mode in intra-frame prediction, the current block can be projected to the encoded side at each angle direction to determine the neighbor block. Neighbor blocks in different angular directions may be repeated. The size of all neighbor blocks can be the same and smaller than the size of the current block.
[0078] According to the position of the current block, the neighboring block may be a real block in the current frame, or a non-existent block beyond the boundary of the current frame; for the real neighboring block, it may be a coded block or an uncoded block; the prediction mode adopted by the coded neighboring block may be inter-frame prediction, intra-frame prediction or intra-frame block copy (IBC), etc. In this application, the coded inter-frame predicted neighboring blocks may be referred to as available neighboring blocks, and the remaining neighboring blocks (such as non-existent blocks, uncoded blocks, intra-frame blocks, etc.) may be referred to as unavailable neighboring blocks.
[0079] Optionally, the multiple angle directions include at least two of horizontal, vertical, horizontal upward, horizontal downward, and vertical rightward. Figure 2 The following describes the situation including five directions (horizontal, vertical, horizontal upward, horizontal downward, and vertical right):
[0080] Figure 2A1 to A2 are the neighboring blocks of the current block in five angular directions. N B1 to B2 are the neighboring blocks in the horizontal direction of the current block, which can be called horizontal neighboring blocks; N is the neighboring block in the vertical direction of the current block, which can be called the vertical neighboring block; E is the neighboring block in the horizontal upward direction of the current block, which can be called the horizontal upward neighboring block; C1~C N The neighboring blocks in the horizontal downward direction of the current block can be called horizontal downward neighboring blocks; D1~D N The neighboring blocks in the vertical right direction of the current block can be called vertical right neighboring blocks. According to the projection results of the current block in various angular directions, the neighboring blocks of the current block in the horizontal angle direction 0 include at least part of the horizontal neighboring blocks, the neighboring blocks in the vertical direction 1 include at least part of the vertical neighboring blocks, the neighboring blocks in the horizontal upward direction 2 include horizontal upward neighboring blocks, at least part of the horizontal neighboring blocks and at least part of the vertical neighboring blocks, the neighboring blocks in the horizontal downward direction 3 include at least part of the horizontal neighboring blocks and at least part of the horizontal downward neighboring blocks, and the neighboring blocks in the vertical right direction 4 include at least part of the vertical neighboring blocks and at least part of the vertical right neighboring blocks. In this case, the candidate neighboring block list constructed for the current block can be {C1~C N , A1~A N , E, B1~B N , D1~D N}, in the candidate neighbor block list of the current block, in addition to recording the number / identity of each neighbor block, the motion information of the neighbor block is also recorded. The motion information may include motion vector and reference frame index information (forward reference frame index information and / or backward reference frame index information).
[0081] S120: Setting motion information for the unavailable neighboring blocks.
[0082] Since the available neighboring blocks have motion information and the unavailable neighboring blocks do not have motion information, it is necessary to set motion information for the unavailable neighboring blocks.
[0083] In a specific implementation, the initial value (motion vector is 0, forward / backward reference frame index is -1) can be directly set as the motion information of the unavailable neighboring block, wherein, if the reference frame index of the neighboring block is -1, it means that the reference frame of the neighboring block does not exist.
[0084] In another specific implementation, motion information may be set for the unavailable neighboring block based on motion information of the temporal co-located block of the current unavailable neighboring block. For the specific implementation process, please refer to the following embodiments. The temporal co-located block is a co-located block of the current unavailable neighboring block in a reference frame of the reference frame list of the current frame, for example, a co-located block in the first reference frame (reference frame index is 0).
[0085] S130: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.
[0086] For specific methods of checking for duplicate content, please refer to the following examples.
[0087] S140: Using the motion information of the reference block of the unavailable neighboring block in the effective angle direction, modify the motion information of the unavailable neighboring block in the effective angle direction.
[0088] The reference block may be a previous neighboring block of the unavailable neighboring block, or a subsequent neighboring block of the unavailable neighboring block, or a time-domain co-located block of the unavailable neighboring block, etc.
[0089] S150: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and / or the unavailable neighboring blocks in each valid angle direction respectively.
[0090] The current block can be divided into multiple sub-blocks. Referring to the concept of intra-frame prediction, for each valid angle direction, the motion information of each sub-block can be determined according to the motion information of the corresponding neighboring block in the direction, and then the motion information is used to perform motion compensation on the sub-block to obtain the prediction value of the sub-block. The prediction values of all sub-blocks constitute the prediction value of the current block. After obtaining the prediction value of the current block, the rate-distortion cost can also be calculated based on the prediction value and the original value of the current block. Performing the above process for each valid angle direction can obtain the prediction values and rate-distortion costs of all valid angle directions.
[0091] The corresponding neighboring block of a sub-block in an effective angle direction refers to the neighboring block determined by projecting the sub-block onto the encoded side of the current block according to the effective angle direction.
[0092] If the current valid angle direction includes available neighboring blocks and unavailable neighboring blocks, the motion information of the neighboring blocks includes the motion information of the available neighboring blocks and the motion information of the unavailable neighboring blocks; if the current valid angle direction only includes available neighboring blocks, the motion information of the neighboring blocks includes the motion information of the available neighboring blocks; if the current valid angle direction only includes unavailable neighboring blocks, the motion information of the neighboring blocks includes the motion information of the unavailable neighboring blocks.
[0093] In this embodiment, after the valid angle direction is obtained through duplication checking, only the motion information of the unavailable neighboring blocks in the valid angle direction is modified. Compared with the method of modifying the motion information of the unavailable neighboring blocks in each angle direction, the computational overhead can be reduced.
[0094] Figure 3 is a flow chart of the second embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Figure 3The process sequence shown is limited. This embodiment is a further extension of the above S140. Figure 3 As shown, this embodiment may include:
[0095] S210: Sort the neighboring blocks in the effective angle direction according to the modification order.
[0096] Neighboring blocks in different angles may be repeated. When sorting, they are not sorted independently according to each valid angle direction, but all neighboring blocks in valid angle directions are collected, the repeated parts are removed, and sorted according to their relative positions to the current block. The modification order can be clockwise, counterclockwise, etc.
[0097] It should be noted that the sorting order of the neighboring blocks in the effective angle direction is the same as the sorting order of the neighboring blocks in the candidate neighboring block list.
[0098] S220: Determine whether the first neighboring block after sorting is an unavailable neighboring block.
[0099] The first neighbor block after sorting the neighbor blocks in the effective angle direction may be different from the first neighbor block in the candidate list.
[0100] If yes, execute S230.
[0101] S230: Modify the motion information of the first neighboring block by using the motion information of the previous neighboring block and / or the next neighboring block of the sorted first neighboring block in the candidate neighboring block list.
[0102] In a specific implementation, if the previous neighboring block of the first neighboring block is an available neighboring block, the motion information of the first neighboring block is modified using the motion information of the previous neighboring block of the first neighboring block; otherwise, the motion information of the first neighboring block is set to an initial value.
[0103] In another specific implementation, if the next neighboring block of the first neighboring block is an available neighboring block, the motion information of the first neighboring block is modified using the motion information of the next neighboring block of the first neighboring block, otherwise the motion information of the first neighboring block is set to an initial value.
[0104] In another specific implementation, if the previous neighboring block of the first neighboring block is an available neighboring block, the motion information of the first neighboring block is modified by using the motion information of the previous neighboring block of the first neighboring block, otherwise, it is determined whether the next neighboring block of the first neighboring block is an available neighboring block, and if so, the motion information of the first neighboring block is modified by using the motion information of the next neighboring block of the first neighboring block, otherwise, the motion information of the first neighboring block is set to an initial value; or
[0105] In another specific implementation, if the previous neighboring block and the next neighboring block of the first neighboring block are both available neighboring blocks, the motion information of the first neighboring block is modified using the weighted average of the motion information of the previous neighboring block and the next neighboring block of the first neighboring block; if one of the previous neighboring block and the next neighboring block of the first neighboring block is an available neighboring block, the motion information of the first neighboring block is modified using the motion information of the available neighboring block in the previous neighboring block and the next neighboring block; if the previous neighboring block and the next neighboring block of the first neighboring block are both unavailable neighboring blocks, the motion information of the first neighboring block is set to an initial value.
[0106] In this embodiment, different motion information modification strategies are adopted for the first neighboring block according to whether the first neighboring block after sorting the neighboring blocks in the effective angle direction is an unavailable neighboring block, thereby improving the encoding accuracy.
[0107] Figure 4 is a flowchart of the third embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Figure 4 The process sequence shown is limited. This embodiment is a further extension of the above S140. Figure 4 As shown, this embodiment may include:
[0108] S310: Sort the neighboring blocks in the effective angle direction according to the modification order.
[0109] S320: Determine whether the first neighboring block after sorting is an unavailable neighboring block.
[0110] If yes, execute S330.
[0111] S330: Determine whether the time-domain co-located block of the first neighboring block is available.
[0112] Optionally, the frame where the time-domain co-located block of the first neighboring block is located is a reference frame in the reference frame list of the current block, and the position and size of the time-domain co-located block in the reference frame are exactly the same as the position and size of the first neighboring block in the current frame.
[0113] Whether the time-domain co-located block is available can be understood as whether the time-domain co-located block has motion information, or can be understood as whether the time-domain co-located block adopts inter-frame prediction coding.
[0114] If yes, execute S340.
[0115] S340: Modify the motion information of the first neighboring block using the motion information of the time-domain co-located block of the first neighboring block.
[0116] For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.
[0117] In this embodiment, different motion information modification strategies are adopted for the first neighboring block according to whether the first neighboring block after sorting the neighboring blocks in the effective angle direction is an unavailable neighboring block, thereby improving the encoding accuracy.
[0118] Figure 5 is a flowchart of the fourth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Figure 5 The process sequence shown is limited. This embodiment is a further extension of the above S120. Figure 5 As shown, this embodiment may include:
[0119] S410: Determine whether the time-domain co-located block of the unavailable neighboring block is available.
[0120] If yes, execute S420; if no, execute S430.
[0121] S420: Using the motion information of the time-domain co-located block to set motion information for the unavailable neighboring block.
[0122] In a specific implementation, the motion information of the time-domain co-located block may be used as the motion information of the unavailable neighboring block.
[0123] In another specific implementation, the forward motion information of the unavailable neighboring block may be set to the forward motion information or backward motion information of the forward co-located block, and the backward motion information of the unavailable neighboring block may be set to the backward motion information or forward motion information of the backward co-located block. The frame where the forward co-located block is located is the reference frame in the forward reference frame list of the current block, and the frame where the backward co-located block is located is the reference frame in the backward reference frame list of the current block.
[0124] When a forward reference frame of the forward co-located block exists, the forward motion information of the unavailable neighboring block can be set as the forward motion information of the forward co-located block; or, when a backward reference frame of the forward co-located block exists, the forward motion information of the unavailable neighboring block can be set as the backward motion information of the forward co-located block.
[0125] When a backward reference frame of a backward co-located block exists, the backward motion information of the unavailable neighboring block can be set as the backward motion information of the backward co-located block; or, when a forward reference frame of the backward co-located block exists, the backward motion information of the unavailable neighboring block can be set as the forward motion information of the backward co-located block.
[0126] In yet another specific implementation, the forward motion information or the backward motion information of the temporal co-located block may be scaled according to the image sequence index difference and used as the forward motion information and the backward motion information of the unavailable neighboring block.
[0127] It is understandable that each frame of image has a corresponding picture order index (POC, Picture Order Count), which can represent the order in which the images are played. The formula for scaling according to the difference in the picture order index can be as follows:
[0128] scale_MV=MV / t0*t1,
[0129] t1=POC0-POC1,
[0130] t0=POC2-POC3,
[0131] Among them, scale_MV is the forward / backward motion information of the currently unavailable neighboring block, and MV is the forward / backward motion information of the co-located block in the time domain.
[0132] When the current frame is a B frame (bidirectional difference frame), it is necessary to calculate the forward motion information and backward motion information of the currently unavailable neighboring blocks.
[0133] If scale_MV is the forward motion information of the currently unavailable neighboring block, t1 is the difference (distance) between POC1 of the current frame and POC0 of the forward reference frame of the current frame, and t0 is the difference between POC2 of the frame where the temporal co-located block is located and POC3 of the forward / backward reference frame of the temporal co-located block.
[0134] If scale_MV is the backward motion information of the currently unavailable neighboring block, t1 is the difference between POC1 of the current frame and POC0 of the backward reference frame of the current frame, and t0 is the difference between POC2 of the frame where the temporal co-located block is located and POC3 of the forward / backward reference frame of the temporal co-located block.
[0135] When the current frame is a P frame (one-way difference frame), only the forward motion information of the currently unavailable neighboring block needs to be calculated. t1 is the difference between POC1 of the current frame and POC0 of the reference frame of the current frame, and t0 is the difference between POC2 of the frame where the temporal co-located block is located and POC3 of the forward / backward reference frame of the temporal co-located block.
[0136] S430: Setting the initial value to the motion information of the unavailable neighboring block.
[0137] As mentioned above, the initial value of the motion vector is set to 0, and the motion information of the reference frame index is set to -1.
[0138] Through the implementation of this embodiment, when the time domain co-located block of the unavailable neighboring block is available, the motion information of the unavailable neighboring block can be set based on the time domain co-located block, and when the time domain co-located block of the unavailable neighboring block is unavailable, the motion information of the unavailable neighboring block is considered to be set to the initial value. Compared with the method of directly setting the motion information of the unavailable neighboring block to the initial value, the error caused by the motion information set for the unavailable neighboring block can be reduced, and the accuracy of encoding can be improved.
[0139] Figure 6 is a flowchart of the fifth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Figure 6 The process sequence shown is limited. Figure 6 As shown, this embodiment may include:
[0140] S510: Construct a candidate neighbor block list for the current block.
[0141] The candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0142] S520: Determine whether the time-domain co-located block of the unavailable neighboring block is available.
[0143] The frame where the time domain co-located block is located is the first reference frame in the reference frame list of the current block.
[0144] If yes, execute S530; if no, execute S540.
[0145] S530: Use the motion information of the time-domain co-located block to set motion information for the unavailable neighboring block.
[0146] In a specific implementation, the motion information of the time-domain co-located block may be used as the motion information of the unavailable neighboring block.
[0147] In another specific implementation, the forward motion information of the unavailable neighboring block may be set to the forward motion information or backward motion information of the forward co-located block, and the backward motion information of the unavailable neighboring block may be set to the backward motion information or forward motion information of the backward co-located block. The frame where the forward co-located block is located is the reference frame in the forward reference frame list of the current block, and the frame where the backward co-located block is located is the reference frame in the backward reference frame list of the current block.
[0148] In yet another specific implementation, the forward motion information or the backward motion information of the temporal co-located block is scaled according to the image sequence index difference and used as the forward motion information and the backward motion information of the unavailable neighboring block.
[0149] After executing S530, jump to S550.
[0150] S540: Setting the initial value to the motion information of the unavailable neighboring block.
[0151] After executing S540, jump to S550.
[0152] S550: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0153] S560: Using the motion information of the reference block of the unavailable neighboring block whose motion information is the initial value, modify the motion information of the available neighboring block whose motion information is the initial value.
[0154] For specific modification methods, please refer to other embodiments in this application.
[0155] S570: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and the unavailable neighboring blocks in each valid angle direction respectively.
[0156] For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.
[0157] In the present embodiment, when it is determined that the time-domain co-located block of the unavailable neighboring block is available, the motion information of the unavailable neighboring block is configured using the motion information of the time-domain co-located block. When it is determined that the time-domain co-located block of the unavailable neighboring block is unavailable, the motion information of the unavailable neighboring block is set to the initial value. Compared with the method of directly setting the motion information of the unavailable neighboring block to the initial value, the error caused by the motion information configuration for the unavailable neighboring block can be reduced. Furthermore, after the motion information of the neighboring blocks in each angular direction is checked for duplication to obtain the valid angular direction, only the motion information of the unavailable neighboring block whose motion information is the initial value is modified. Compared with the method of directly modifying the motion information of each unavailable neighboring block, the computational overhead required to modify the motion information of the unavailable neighboring block can be reduced.
[0158] Figure 7 is a flowchart of the sixth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Figure 7 The process sequence shown is limited. Figure 7 As shown, this embodiment may include:
[0159] S610: Construct a candidate neighbor block list for the current block.
[0160] The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0161] S620: Set motion information for the unavailable neighboring block.
[0162] S630: Select at least one pair of neighboring blocks in each angular direction according to the size of the current block to perform motion information duplication check, and the angular direction that passes the duplication check is a valid angular direction.
[0163] Optionally, the selected neighboring blocks in the same angular direction are arranged at equal distances. Of course, in other implementations, the neighboring blocks in the same angular direction may also be selected in other ways (such as randomly).
[0164] Generally speaking, the accuracy of the effective angle direction obtained from the duplicate check depends on the number of duplicate checks, the size of the current block, etc. Among them, when the size is consistent, the more duplicate checks are performed in each angle direction of the current block, the more accurate the effective angle direction obtained from the duplicate check result. When the number of duplicate checks is consistent, the effective angle direction of the current block with a smaller size is more accurate than that of the current block with a larger size.
[0165] To this end, for a current block that is too large in size, the number of neighboring blocks selected in each angle direction can be increased, that is, the number of duplicate checks can be increased. Figure 8 , the specific implementation process may include:
[0166] S631: Determine whether the width / height of the current block is greater than a first threshold.
[0167] A current block whose width / height is greater than the first threshold may be regarded as a current block of relatively large size, and a current block whose width / height is less than or equal to the first threshold may be regarded as a current block of relatively small size. For example, the first threshold may be set to 32.
[0168] If yes, execute S632; if no, execute S633.
[0169] S632: Select a first number of neighboring blocks in the direction corresponding to the width / height to perform duplication checking.
[0170] If the width is greater than the first threshold, a first number of neighboring blocks are selected in the direction corresponding to the width for duplication checking; if the height is greater than the first threshold, a first number of neighboring blocks are selected in the direction corresponding to the height for duplication checking. The direction corresponding to the width includes vertical and / or vertical to the right, and the direction corresponding to the height includes horizontal and / or horizontal downward.
[0171] Combination Fig. 9 An example is given for the case where both the width and the height are greater than the first threshold (32) (the current block size is 64×64).
[0172] like Fig. 9 As shown in FIG. 1 , four adjacent blocks with equal distances are selected in the direction corresponding to the width (vertical and vertical to the right) for duplication checking. Among them, the adjacent blocks B1 to B 2N Select B1, B K , B 2K and B3K , N = 64, K = N / 4, the neighboring blocks D1 to D N Select D1, D K , D 2K and D 3K , so the neighboring blocks that need to be checked for duplication in the width corresponding direction include (B1,B K )、(B K ,B 2K )、(B 2K ,B 3K )、(B 3K ,D1)、(D1,D K ) and (D K ,D 2K ).
[0173] Select 4 equally spaced neighboring blocks in the direction corresponding to the height (horizontally and horizontally downward) for duplication checking. N Select A1, A K , A 2K and A 3K , the neighboring blocks C1 to C in the horizontal downward direction N Select C1, C K , C 2K and C 3K , so the neighboring blocks that need to be checked for duplication in the direction of high correspondence include (A1, A K )、(A K ,A 2K )、(A 2K ,A 3K )、(A 3K ,C1)、(C1,C K )、(C K ,C 2K ) and (C 2K ,C 3K ).
[0174] In addition, the neighboring block pairs that need to be checked for duplication in the horizontal upward direction include (A1, E) and (E, B1).
[0175] S633: Select a second number of neighboring blocks in the direction corresponding to the width / height to check for duplication.
[0176] The first number is greater than the second number, and the second number is greater than 1.
[0177] Combination Fig.10 An example is given for the case where both the width and the height are equal to the first threshold (32) (the current block size is 32×32).
[0178] like Fig.10As shown in FIG. 1 , two adjacent blocks with equal distances are selected in the direction corresponding to the width (vertical and vertical to the right) for duplication checking. Among them, the adjacent blocks B1 to B2 in the vertical direction are N Select B1 and B K , N = 32, K = N / 2, the neighboring blocks D1 to D N Select D1 and D K , so the neighboring blocks that need to be checked for duplication in the width corresponding direction include (B1,B K )、(B K ,D1) and (D1,D K ).
[0179] Select two neighboring blocks in the direction corresponding to the height (horizontally and horizontally downward) for duplication checking. N Select A1 and A K , the neighboring blocks C1 to C in the horizontal downward direction N Select C1 and C K , so the neighboring blocks that need to be checked for duplication in the direction of high correspondence include (A1, A K )、(A K ,C1) and (C1,C K ).
[0180] In addition, the neighboring block pairs that need to be checked for duplication in the horizontal upward direction include (A1, E) and (E, B1).
[0181] S640: Modify the motion information of the available neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0182] The motion information of the unavailable neighboring blocks in the valid direction may be modified only, or the motion information of the unavailable neighboring blocks in all directions may be modified.
[0183] S650: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and / or the unavailable neighboring blocks in each valid angle direction respectively.
[0184] For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.
[0185] In this embodiment, the number of neighboring blocks selected for duplication checking in each angular direction is determined based on the size of the current block. Compared with the method of selecting the same number of neighboring blocks for duplication checking in each angular direction for current blocks of all sizes, the final selected effective angular direction can be more accurate.
[0186] Fig.11 is a flowchart of the seventh embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Fig.11 The process sequence shown is limited. Fig.11 As shown, this embodiment may include:
[0187] S710: Construct a candidate neighbor block list for the current block.
[0188] The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0189] S720: Set motion information for the unavailable neighboring block.
[0190] S730: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.
[0191] If the angle direction meets the first condition, at least one duplicate check is added.
[0192] In a specific implementation, the first condition may be that the horizontal and / or vertical directions fail to pass the plagiarism check. If the horizontal and / or vertical directions fail to pass the plagiarism check, at least one additional plagiarism check is performed.
[0193] Taking adding a duplicate check as an example, the neighboring blocks include N horizontal neighboring blocks located in the horizontal direction of the current block and N vertical neighboring blocks located in the vertical direction of the current block. The duplicate check added in the horizontal direction is the duplicate check between the Kth and Nth horizontal neighboring blocks sorted from top to bottom, and the duplicate check added in the vertical direction is the duplicate check between the Kth and Nth vertical neighboring blocks sorted from left to right. K=N / i, i is the number of horizontal neighboring blocks or vertical neighboring blocks selected in the completed duplicate check.
[0194] In one specific embodiment, i can be 2.
[0195] Combination Fig.12 Examples are given for situations where the horizontal and vertical directions fail to pass the duplicate check. Fig.12 As shown, the horizontal neighboring block pair (A1, A K ) does not pass the duplicate check, then add one more pair of adjacent blocks in the horizontal direction (A K ,A N ) for duplicate checking; the adjacent blocks in the vertical direction (B1,B K ) failed to pass the duplicate check, which adds one pair of adjacent blocks in the vertical direction (B K ,B N ) for plagiarism check.
[0196] If the duplicate check fails in the horizontal and / or vertical directions, at least one additional duplicate check is performed, so that a valid angle direction can be selected based on the results of multiple duplicate checks, thereby improving the accuracy of the duplicate check and further improving the accuracy of the valid angle direction finally selected.
[0197] In another specific embodiment, the first condition may be that the angle direction is horizontally downward or vertically rightward. If the angle direction is horizontally downward or vertically rightward, at least one duplicate check is added.
[0198] Since the neighboring blocks in the horizontal downward and vertical right directions are not completely checked for plagiarism during the plagiarism checking process, in order to improve the accuracy of the plagiarism checking, at least one plagiarism check can be added in the horizontal downward and vertical right directions.
[0199] Optionally, the neighboring blocks include N horizontal neighboring blocks located in the horizontal direction of the current block and N vertical neighboring blocks located in the vertical direction of the current block. The plagiarism check increased in the horizontal downward direction is the plagiarism check between two horizontal neighboring blocks, and the plagiarism check increased in the vertical rightward direction is the plagiarism check between two vertical neighboring blocks.
[0200] Taking adding a plagiarism check as an example, the plagiarism check added in the horizontal downward direction is the plagiarism check between the 3rd and Kth horizontal neighboring blocks sorted from top to bottom, and the plagiarism check added in the vertical rightward direction is the plagiarism check between the 3rd and Kth vertical neighboring blocks sorted from left to right. K=N / i, i is the number of horizontal / vertical neighboring blocks selected in the horizontal / vertical direction plagiarism check.
[0201] Combination Fig.13 For example, Fig.13 As shown, the number of adjacent blocks (A3, A K ) is checked for plagiarism, and the adjacent block pair (B3,B K ) for plagiarism check.
[0202] In another specific implementation, the first condition may be that the duplicate checking result of the angle direction that failed the duplicate checking includes that the reference frames of a pair of adjacent blocks do not exist. If the duplicate checking result of the angle direction that failed the duplicate checking includes that the reference frames of a pair of adjacent blocks do not exist, at least one duplicate checking is added for the angle direction that failed the duplicate checking.
[0203] Among them, the serial numbers of at least one pair of neighboring blocks that do not exist in any reference frame can be shifted, and each pair of neighboring blocks after the shift still belongs to an angle direction that has not passed the duplication check, which is different from the serial numbers of a pair of neighboring blocks that do not exist in any reference frame. The motion information of at least one pair of neighboring blocks after the shift is checked for duplication.
[0204] Combination Fig.14 For example, Fig.14 As shown, the adjacent block pair (A1, A K ) does not exist, the sequence numbers of the two neighboring blocks in the neighboring block pair are shifted one position in the same direction to obtain the neighboring block pair (A2, A K+1 ), then (A2,A K+1 ) to check for duplicate sports information.
[0205] And / or, a pair of neighboring blocks in which no reference frame exists and which are located in a direction away from the current block may be selected for motion information duplication checking.
[0206] Combination Fig.15 For example, Fig.15 As shown, the adjacent block pair (A1, A K ) does not exist, the neighboring blocks in the neighboring block pair (a1, a2) are composed of the neighboring blocks in the direction away from the current block. K ) to check for duplicate sports information.
[0207] S740: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0208] S750: Calculate the prediction value of the current block by using the motion information of the available neighboring blocks and / or unavailable neighboring blocks in each of the effective angle directions respectively.
[0209] For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.
[0210] In this embodiment, when checking for duplicate motion information of neighboring blocks, if the angle direction satisfies the first condition, adding at least one duplication check can make the duplication check result more accurate, and thus the obtained effective angle direction more accurate.
[0211] Fig.16 is a flowchart of the eighth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Fig.16 The process sequence shown is limited. Fig.16 As shown, this embodiment may include:
[0212] S810: Construct a candidate neighbor block list for the current block.
[0213] The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0214] S820: Set motion information for the unavailable neighboring block.
[0215] S830: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.
[0216] If at least two of the horizontal, vertical and horizontal upward plagiarism checking results meet the second condition, then at least one horizontal upward plagiarism check is reduced.
[0217] Optionally, the horizontal upward plagiarism check includes a first plagiarism check and a second plagiarism check, the first plagiarism check is to check the motion information between the horizontal upward neighboring block and the first horizontal neighboring block, and the second plagiarism check is to check the motion information between the horizontal upward neighboring block and the first vertical neighboring block. The horizontal upward neighboring block is located in the horizontal upward direction of the current block, the first horizontal neighboring block is located in the horizontal direction of the current block and adjacent to the horizontal upward neighboring block, and the first vertical neighboring block is located in the vertical direction of the current block and adjacent to the horizontal upward neighboring block.
[0218] If at least two of the horizontal, vertical, and horizontal-upward duplicate checking results meet the second condition, reducing at least one horizontal-upward duplicate checking includes:
[0219] In a specific implementation, the second condition may be: both horizontal and vertical are valid angle directions.
[0220] If both horizontal and vertical are valid angle directions, there is no need to check for duplication in horizontal upward direction and horizontal upward direction can be determined as a valid angle direction.
[0221] Combination Fig.17 For example, Fig.17 As shown, (A1,A K ) is a pair of neighboring blocks in the horizontal direction that are checked for duplication through motion information, (B1,B K ) is a pair of neighboring blocks in the vertical direction that pass the motion information duplication check, that is, the horizontal and vertical directions are both valid angle directions, so there is no need to perform motion information duplication check on the horizontally upward neighboring block pairs (A1, E) and (E, B1).
[0222] In another specific implementation, the second condition may be: horizontal is a valid angle direction and one of the first and second plagiarism checks is valid.
[0223] If horizontal is a valid angle direction and one of the first and second plagiarism checks is valid, there is no need to perform the other of the first and second plagiarism checks and it is determined that horizontal upward is a valid angle direction.
[0224] Combination Fig.18 For example, Fig.18 As shown, the horizontal neighboring block pair (A1, A K ) passes the motion information duplication check, that is, the horizontal direction is valid, and the neighboring block pair (E, B1) in the horizontal upward direction passes the motion information duplication check, that is, the second duplication check result is valid, then there is no need to perform motion information duplication check on the neighboring block pair (A1, E) in the horizontal upward direction, that is, there is no need to perform the first duplication check, and it can be determined that the horizontal upward direction is a valid angle direction.
[0225] In another specific implementation, the second condition may be: vertical is a valid angle direction and one of the first and second plagiarism checks is valid.
[0226] If vertical is a valid angle direction and one of the first and second plagiarism checks is valid, there is no need to perform the other of the first and second plagiarism checks and it is determined that horizontal upward is a valid angle direction.
[0227] Combination Fig.19 For example, Fig.19 As shown, the adjacent block pair in the vertical direction (B1,B K ) passes the motion information duplication check, that is, the vertical direction is valid, and the neighboring block pair (A1, E) in the horizontal upward direction passes the motion information duplication check, that is, the result of the first duplication check is valid, then there is no need to perform motion information duplication check on the neighboring block pair (E, B1) in the horizontal upward direction, that is, there is no need to perform the second duplication check, and it can be determined that the horizontal upward direction is a valid angle direction.
[0228] S840: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0229] S850: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and / or unavailable neighboring blocks in each valid angle direction respectively.
[0230] For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.
[0231] In this embodiment, when checking for plagiarism on neighboring blocks, if at least two of the horizontal, vertical and horizontal upward plagiarism checking results meet the second condition, at least one horizontal upward plagiarism check is reduced. Compared with the method of checking for plagiarism twice for each horizontal upward, the computational overhead required in the plagiarism checking process can be reduced.
[0232] Fig. 20 is a flowchart of the ninth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Fig. 20 The process sequence shown is limited. Fig. 20 As shown, this embodiment may include:
[0233] S910: Construct a candidate neighbor block list for the current block.
[0234] The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0235] S920: Set motion information for the unavailable neighboring block.
[0236] S930: Check the motion information of neighboring blocks in each angular direction for duplication, and the angular direction for duplication checking is a valid angular direction. The duplication checking includes determining whether the image sequence indexes of the reference frames of at least one pair of selected neighboring blocks are the same and whether the motion vectors are the same.
[0237] When the image sequence index and motion vector of the reference frame of the neighboring block pair in an angle direction are the same, the angle direction is determined to be invalid.
[0238] In addition, the duplicate checking may also include determining whether the reference frame index of at least one pair of selected neighboring blocks is the same. When the duplicate checking includes determining whether the reference frame index, the motion vector and the image order index of the reference frame are the same, the determination order of the three may not be limited.
[0239] The following takes the example of first determining the reference frame index and motion vector, and then determining whether the image order index of the reference frame is the same, to illustrate the process of checking for duplicates of two neighboring blocks Nei_b1 and Nei_b2 in an angle direction:
[0240] (i) Determine whether the forward reference frame and the backward reference frame of Nei_b1 exist (whether the reference frame index is greater than or equal to 0). If one of them exists, proceed to (ii); otherwise, determine that the angle direction is invalid.
[0241] (ii) Determine whether the forward reference frame and backward reference frame of Nei_b2 exist. If one of them exists, proceed to (iii); otherwise, determine that the angle direction is invalid.
[0242] (iii) Determine whether the forward reference frame indexes of Nei_b1 and Nei_b2 are the same. If they are the same, proceed to (iv); otherwise, determine that the angle direction is invalid.
[0243] (iv) Determine whether the forward reference frame of Nei_b1 exists and whether the forward reference motion vectors of Nei_b1 and Nei_b2 are the same. If they exist and are not the same, determine that this angle direction is valid, otherwise proceed to (v).
[0244] (v) Determine whether the backward reference frame indexes of Nei_b1 and Nei_b2 are the same. If they are the same, proceed to (vi). Otherwise, determine that this angle direction is valid.
[0245] (vi) Determine whether the backward reference frame of Nei_b1 exists and whether the backward reference motion vectors of Nei_b1 and Nei_b2 are the same. If they exist and are not the same, determine that this angle direction is valid, otherwise proceed to (vii).
[0246] (vii) Determine whether the image order indexes of the reference frames of Nei_b1 and Nei_b2 are the same. If they are the same, determine that the angle direction is invalid; otherwise, determine that the angle direction is valid.
[0247] For reference frames with the same image sequence index, their reference frame indexes in the forward reference frame index list and / or backward reference frame index list of different neighboring blocks may be different. Therefore, if the judgment is only based on the reference frame index and the motion vector, there may be a situation where the reference frame indexes in the motion information of two neighboring blocks are different, so that the corresponding angle direction is judged to be valid. However, the image sequence indexes of the reference frames of the two neighboring blocks are the same, and the motion vectors are also the same. In fact, the motion information of the two neighboring blocks is the same, and the corresponding angle direction should be invalid. Therefore, it is possible to increase the judgment of whether the image sequence indexes of the reference frames are the same during the duplicate checking process, which can improve the accuracy of the judgment result.
[0248] S940: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0249] S950: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and / or unavailable neighboring blocks in each valid angle direction respectively.
[0250] For other detailed descriptions of the steps of this embodiment, please refer to other embodiments in this application and will not be repeated here.
[0251] In this embodiment, the process of checking for duplicate motion information in neighboring blocks includes determining whether the image sequence indexes of the reference frames of at least one pair of selected neighboring blocks are the same and whether the motion vectors are the same. Only when the image sequence indexes of the reference frames are the same and the motion vectors are the same, is it determined that the angle direction is invalid, thereby making the determination result more accurate.
[0252] Fig.21 is a flowchart of the tenth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Fig.21 The process sequence shown is limited. Fig.21 As shown, this embodiment may include:
[0253] S1010: Construct a candidate neighbor block list for the current block.
[0254] The candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0255] S1020: Set motion information for the unavailable neighboring block.
[0256] S1030: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.
[0257] S1040: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0258] S1050: The current block is divided into a plurality of sub-blocks, and motion compensation is performed using motion information of a corresponding neighboring block of each sub-block in a valid angle direction to obtain a prediction value of each sub-block.
[0259] The prediction values of all sub-blocks constitute the prediction value of the current block, wherein the motion information of at least two corresponding neighboring blocks is used when performing motion compensation on the sub-blocks in at least one valid angular direction.
[0260] In a specific embodiment, the current block is divided into multiple first sub-blocks of a first size, each first sub-block is composed of multiple second sub-blocks of a second size, and in at least one effective angle direction, the motion vector of at least one first sub-block is a weighted average of motion vectors of at least two corresponding neighboring blocks.
[0261] Optionally, the first size is 8*8 and the second size is 4*4.
[0262] Combination Fig. 22 The method for calculating the motion vector of a first sub-block (with a size of 8*8) in the horizontal and vertical directions is described.
[0263] The two corresponding horizontal neighboring blocks (A K-1 and A K ) as the motion vector of the first sub-block in the horizontal direction. The specific calculation formula may be as follows:
[0264]
[0265] Wherein, MV_Hor is the motion vector of the first sub-block in the horizontal direction, MV(A k ) is A K The motion vector, MV(A k-1 ) is A k-1 motion vector.
[0266] The two corresponding vertical neighboring blocks (B K-1 and B K ) as the motion vector of the first sub-block in the vertical direction. The specific calculation formula may be as follows:
[0267]
[0268] Wherein, MV_Ver is the motion vector of the first sub-block in the horizontal direction, MV(B k ) is B k The motion vector, MV(B k-1 ) is B k-1 motion vector.
[0269] When calculating the motion vector of the first sub-block, the above manner of calculating the motion vector of the first sub-block in the vertical and horizontal directions is also applicable when calculating the motion vector of the first sub-block in other directions.
[0270] For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.
[0271] In this embodiment, motion information of at least two corresponding neighboring blocks is used when performing motion compensation for the first sub-block in the effective angle direction. Compared with the method of performing motion compensation for the first sub-block using only the motion information of one corresponding neighboring block, a more accurate prediction value of the first sub-block can be obtained, thereby improving the encoding accuracy.
[0272] Fig.23 FIG. 1 is a flow chart of the eleventh embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Fig.23 The process sequence shown is limited. Fig.23 As shown, this embodiment may include:
[0273] S1110: Construct a candidate neighbor block list for the current block.
[0274] The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0275] S1120: Set motion information for the unavailable neighboring block.
[0276] S1130: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.
[0277] S1140: Fill the valid angle direction into the angle mode list to obtain the angle mode index of the valid angle direction.
[0278] When the angle mode inter prediction and other inter prediction modes are put into one mode index list, the index value range of the angle mode index in the mode index list is 4-8.
[0279] A separate mode list (i.e., angle mode list) can be set for the valid angles selected by the angle mode inter-frame prediction. After the valid angle direction selected by the angle mode inter-frame prediction is filled into the angle mode list, the value range of the obtained angle mode index is 0 to 4. Compared with the direction sharing a mode index list with other modes, less bit overhead is required in the subsequent encoding process. In addition, after the angle mode index is separated, the number of indexes in the shared mode list can be reduced.
[0280] S1150: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0281] In addition, after obtaining the prediction value of the current block, it can also include:
[0282] S1160: Calculate the prediction value and rate-distortion cost of the current block using the motion information of the neighboring blocks in each valid angle direction.
[0283] After calculating the prediction value and rate distortion cost of the current block, the rate distortion cost can be optimized together with other inter-frame modes to select the best inter-frame prediction mode to encode the current block. Therefore, based on this embodiment, the following steps can also be included:
[0284] S1170: Encode the current block to obtain a code stream of the current block.
[0285] The bitstream of the current block includes an angle mode flag, and the angle mode flag is used to indicate whether the current block adopts angle mode inter-frame prediction.
[0286] For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.
[0287] Since the mode list corresponding to the selected inter-frame prediction mode needs to be encoded during the encoding process, in this embodiment, an independent angle mode list is set for angle mode inter-frame prediction, which can reduce the number of index lists in the original mode list, thereby reducing the length of the mode list that needs to be encoded during the encoding process and reducing the bit overhead (code rate) required during the encoding process.
[0288] Fig.24 is a flowchart of the twelfth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Fig.24 The process sequence shown is limited. Fig.24 As shown, this embodiment may include:
[0289] S1210: Construct a candidate neighbor block list for the current block.
[0290] The candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0291] S1220: Set motion information for the unavailable neighboring block.
[0292] S1230: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0293] S1240: Determine the order of each valid angle direction using the texture direction of the current block.
[0294] The order of the effective angle directions can be determined based on the gradient direction of the current block from the reference pixel. Fig.25 , S1240 may specifically include:
[0295] S1241: Calculate the gradient direction of the reference pixel of the current block using a gradient operator.
[0296] The reference pixel may be a reference pixel of the current block in the intra prediction mode. The reference pixel is located on the coded side (e.g., left and top) of the current block. The gradient operator may be, but is not limited to, Roberts, Prewitt, Sobel, Laplace, Canny operator, etc. The Sobel operator and Laplace operator are used as examples for explanation below:
[0297] (1) The formula for calculating the gradient direction of the reference pixel of the current block using the Sobel operator can be as follows:
[0298] S x =-a1f(x-1,y-1)-a2f(x-1,y)-a3f(x-1,y+1)+a1f(x+1,y-1)+a2f(x+1,y)+a3f(x+1,y+1)
[0299] S y =-a1f(x-1,y+1)-a2f(x,y+1)-a3f(x+1,y+1)+a1f(x-1,y-1)+a2f(x,y-1)+a3f(x+1,y-1)
[0300]
[0301] (2) The formula for calculating the gradient direction of the reference pixel of the current block using the Laplacian operator can be as follows:
[0302] S x =a1(f(x-1,y)+f(x+1,y))-a2f(x,y)
[0303] Sy =a1(f(x,y-1)+f(x,y+1))-a2f(x,y)
[0304]
[0305] Among them, a1, a2 and a3 are constants, f(x, y) is the pixel value of the reference pixel, S x is the horizontal gradient of the reference pixel, S y is the vertical gradient of the reference pixel, and Angle is the gradient direction of the reference pixel.
[0306] S1242: Count the number of reference pixels whose gradient directions fall within the angle range centered on each valid angle direction.
[0307] The angle range may be determined according to actual needs. For example, the angle range centered on the horizontal direction may be 0°±15°, the angle range centered on the vertical direction may be 90°±15°, the angle range centered on the horizontal upward direction may be 135°±15°, the angle range centered on the horizontal downward direction may be -135°±15°, and the angle range centered on the vertical right direction may be 45°±15°.
[0308] S1243: Sort the valid angle directions in descending order of the number of reference pixels.
[0309] The valid angle directions are sorted in descending order according to the number of reference pixels falling within the angle range.
[0310] S1250: Fill the valid angle directions into the mode list in order.
[0311] S1260: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0312] S1270: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and / or unavailable neighboring blocks in each valid angle direction respectively.
[0313] For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.
[0314] In this embodiment, on the basis of selecting effective angle directions from multiple angle directions through the duplication checking process, the order of each effective angle direction is further determined according to the texture direction, that is, the number of reference pixels in the current block whose gradient direction falls within the angle range centered on each effective angle direction is counted, and the effective angle directions are sorted in descending order according to the number of reference pixels that fall within. Since the effective angle direction with a larger number of corresponding reference pixels is closer to the texture direction of the current block, the effective angle directions are filled into the pattern list in order, so that the effective angle direction close to the texture direction of the current block is ranked higher in the pattern list, and is easier to be selected during the encoding process, thereby improving the accuracy of the encoding and reducing the bit rate required for the encoding process.
[0315] Fig.26 is a flowchart of the thirteenth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment does not use Fig.25 The process sequence shown is limited. Fig.26 As shown, this embodiment may include:
[0316] S1301: Construct a candidate neighbor block list for the current block.
[0317] The candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
[0318] S1302: Set motion information for unavailable neighboring blocks.
[0319] S1303: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0320] S1304: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0321] S1305: The current block is divided into a plurality of sub-blocks, and the motion information of each sub-block is obtained by using the motion information of the corresponding neighboring block of each sub-block in the effective angle direction.
[0322] The motion information includes a motion vector. The motion information may include forward motion information and backward motion information, the forward motion information may include a forward motion vector and a forward reference frame index, and the backward motion information may include a backward motion vector and a backward reference frame index.
[0323] Each piece of motion information of the current sub-block may be obtained by using the motion information of the corresponding neighboring block of the current sub-block in each effective angle direction.
[0324] S1306: Correct the first prediction value of each sub-block using the multiple corrected motion vectors respectively to obtain multiple second prediction values of each sub-block.
[0325] The first prediction value is obtained by performing motion compensation using the motion information.
[0326] When the image order index of the forward reference frame of the current block is the same as the image order index of the backward reference frame, the first prediction value of each sub-block can be modified by using the decoding end motion vector refinement (DMVR) technology to obtain multiple second prediction values of each sub-block. The details are as follows:
[0327] refer to Fig. 27 , S1306 may include the following sub-steps:
[0328] S13061: Use the multiple corrected motion vectors to correct the motion vector of each sub-block respectively, to obtain multiple corrected motion vectors of each sub-block.
[0329] The first prediction value may also be referred to as a first prediction pixel value, and each motion information of the current sub-block may be used to perform compensation to obtain the corresponding first prediction value. The first prediction value may include a forward first prediction value and a backward first prediction value, the forward first prediction value may be obtained by performing motion compensation using the forward motion information, and the backward first prediction value may be obtained by performing motion compensation using the backward motion information.
[0330] The block corresponding to the forward first prediction value of the current sub-block may be called the forward first prediction block, and the block corresponding to the backward first prediction value of the current sub-block may be called the backward first prediction block. In other words, the block pointed to by the forward motion information of the current sub-block may be called the forward first prediction block, and the block pointed to by the backward motion information of the current sub-block may be called the backward first prediction block.
[0331] Multiple modified motion vectors of each sub-block can be searched within the search range of the forward / backward first prediction block.
[0332] The search range of the forward first prediction block can be an N*N pixel range centered on the vertex (the point where the upper left corner pixel is located) of the forward first prediction block. When searching, all pixel points in the search range can be traversed in a predetermined order, for example, all pixel points are traversed in a raster scanning order from left to right and from top to bottom to obtain N 2 A forward corrected motion vector ΔMV1, where ΔMV1 is the motion vector from the vertex pointing to the search pixel point, or in other words, ΔMV1 is the motion vector from the forward first prediction block to the forward second prediction block (refer to the following description).
[0333] The search range of the backward first prediction block can be an N*N pixel range centered on the vertex (the point where the lower right corner pixel is located) of the backward first prediction block. When searching, all pixel points in the search range can be traversed in a predetermined order to obtain N 2 A backward corrected motion vector is obtained by traversing all pixels in a raster scanning order from right to left and from bottom to top, and obtaining multiple backward corrected motion vectors ΔMV2, where ΔMV2 is a motion vector whose vertex points to the search pixel, or in other words, ΔMV1 is a motion vector from the backward first prediction block to the backward second prediction block.
[0334] To simplify the description, Fig.28 Take the example of searching for the forward modified motion vector ΔMV1 in the search range of the forward first prediction block as an example to illustrate:
[0335] After finding the search point C, the forward first prediction block is translated so that the vertex A coincides with the search point C to obtain the forward second prediction block. In other words, when traversing to point C, a forward second prediction block with the same size as the sub-block is formed with point C as the vertex, and the prediction value of the forward second prediction block is calculated. ΔMV1 is the motion vector from vertex A to search point C, or ΔMV1 is the motion vector from the forward first prediction block where vertex A is located to the forward second prediction block where search point C is located.
[0336] Each group of corresponding forward correction motion vectors and backward correction motion vectors are equal in magnitude and opposite in direction.
[0337] The forward corrected motion vector may be used to correct the forward motion vector of the sub-block to obtain a corrected forward motion vector, and the backward corrected motion vector may be used to correct the backward motion vector of the sub-block to obtain a corrected backward motion vector.
[0338] For example, the motion vector of the sub-block is (MV1, MV2), and the corrected motion vector of the sub-block is (MV1+ΔMV1, MV2+ΔMV2).
[0339] S13062: Perform motion compensation on each sub-block using multiple pieces of motion information including the corrected motion vector to obtain multiple second prediction values for each sub-block.
[0340] The second prediction value may be a pixel value of the second prediction block pointed to by the motion information including the modified motion vector.
[0341] S1307: Select, for each sub-block, a corrected motion vector corresponding to the second prediction value with the smallest evaluation index as the final corrected motion vector of the sub-block.
[0342] The N of the sub-blocks can be obtained based on the Sum of Absolute Difference (SAD) algorithm. 2 For the evaluation index (SAD) between the forward second prediction value and the backward second prediction value, a pair of corrected motion vectors corresponding to the forward second prediction value and the backward second prediction value with the smallest SAD is selected as the final corrected motion vector of the sub-block.
[0343] S1308: Perform correction using the final corrected motion vectors of all sub-blocks to obtain corrected motion vectors.
[0344] S1309: Obtain the prediction value of each sub-block using the corrected motion vector, and the prediction values of all sub-blocks constitute the prediction value of the current block.
[0345] The predicted value of the sub-block is calculated using the modified motion vector, and the predicted value of the sub-block may be an average of the forward predicted value and the backward predicted value.
[0346] For other detailed descriptions of the steps of this embodiment, please refer to other embodiments and will not be repeated here.
[0347] In this embodiment, before performing motion compensation on the motion information of the current block to obtain a prediction value, the motion vector of the current block is first corrected using the DMWR technology, which can improve the accuracy of the prediction.
[0348] It should be noted that the embodiments of the present application can be combined under the premise of not conflicting with each other.
[0349] Fig.29 1 is a schematic diagram of the structure of a first embodiment of an angle mode inter-frame prediction device of the present application. Fig.29 As shown, the device may include: a construction module 11, a setting module 12, a duplicate checking module 13, a modification module 14 and a calculation module 15.
[0350] Among them, the construction module 11 can be used to construct a candidate neighbor block list for the current block, and the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0351] The setting module 12 may be configured to set motion information for unavailable neighboring blocks.
[0352] The duplication checking module 13 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0353] The modification module 14 is used to modify the motion information of the unavailable neighboring block in the effective angle direction by using the motion information of the reference block of the unavailable neighboring block in the effective angle direction.
[0354] The calculation module 15 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and / or unavailable neighboring blocks in each effective angle direction.
[0355] Fig.30 2 is a schematic diagram of the structure of a second embodiment of an angle mode inter-frame prediction device of the present application. Fig.30 As shown, the device may include: a construction module 21, a setting module 22, a duplicate checking module 23, a modification module 24 and a calculation module 25. The construction module 21 may be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0356] The setting module 22 can be used to set motion information for the unavailable neighboring block using the motion information of the time domain co-located block when the time domain co-located block of the unavailable neighboring block is available, and to set an initial value to the motion information of the unavailable neighboring block when the time domain co-located block of the unavailable neighboring block is unavailable.
[0357] The duplication checking module 23 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0358] The modification module 24 may be configured to modify the motion information of the available neighboring block whose motion information is the initial value by using the motion information of the reference block of the unavailable neighboring block whose motion information is the initial value.
[0359] The calculation module 25 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and / or unavailable neighboring blocks in each effective angle direction.
[0360] Fig.31 1 is a schematic diagram of the structure of a third embodiment of an angle mode inter-frame prediction device of the present application. Fig.31 As shown, the device may include: a construction module 31, a setting module 32, a duplicate checking module 33, a modification module 34 and a calculation module 35.
[0361] The construction module 31 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0362] The setting module 32 may be configured to set motion information for unavailable neighboring blocks.
[0363] The duplication checking module 33 is used to select at least one pair of neighboring blocks in each angular direction according to the size of the current block to perform motion information duplication checking, and the angular direction that passes the duplication checking is a valid angular direction.
[0364] The modification module 34 may be configured to modify the motion information of the available neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0365] The calculation module 35 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and / or unavailable neighboring blocks in each effective angle direction.
[0366] Fig.32 1 is a schematic diagram of the structure of a fourth embodiment of an angle mode inter-frame prediction device of the present application. Fig.32 As shown, the device may include: a construction module 41, a setting module 42, a duplicate checking module 43, a modification module 44 and a calculation module 45.
[0367] The construction module 41 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0368] The setting module 42 may be configured to set motion information for unavailable neighboring blocks.
[0369] The duplication checking module 43 can be used to check the motion information duplication of neighboring blocks in each angular direction. The angular direction that passes the duplication check is a valid angular direction. If the angular direction satisfies the first condition, at least one duplication check is added.
[0370] The modification module 44 may be used to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;
[0371] The calculation module 45 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and / or unavailable neighboring blocks in each effective angle direction.
[0372] Fig.33 1 is a schematic diagram of the structure of a fifth embodiment of an angle mode inter-frame prediction device of the present application. Fig.33 As shown, the device may include: a construction module 51, a setting module 52, a duplicate checking module 53, a modification module 54 and a calculation module 55.
[0373] The construction module 51 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0374] The setting module 52 may be configured to set motion information for unavailable neighboring blocks.
[0375] The duplication checking module 53 can be used to check the motion information of neighboring blocks in each angular direction. The angular direction of the duplication check is the valid angular direction. If at least two of the horizontal, vertical and horizontal upward duplication checking results meet the second condition, at least one horizontal upward duplication check is reduced.
[0376] The modification module 54 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0377] The calculation module 55 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and / or unavailable neighboring blocks in each effective angle direction.
[0378] Fig.34 1 is a schematic diagram of the structure of a sixth embodiment of an angle mode inter-frame prediction device of the present application. Fig.34 As shown, the device may include: a construction module 61, a setting module 62, a duplicate checking module 63, a modification module 64 and a calculation module 65.
[0379] The construction module 61 is used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0380] The setting module 62 may be configured to set motion information for unavailable neighboring blocks.
[0381] The duplication checking module 63 can be used to check the motion information of neighboring blocks in each angular direction. The angular direction of the duplication check is a valid angular direction. The duplication check includes determining whether the image sequence index of the reference frame of at least one pair of selected neighboring blocks is the same and whether the motion is the same.
[0382] The modification module 64 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0383] The calculation module 65 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and / or unavailable neighboring blocks in each effective angle direction.
[0384] Fig.35 2 is a schematic diagram of the structure of the seventh embodiment of an angle mode inter-frame prediction device of the present application. Fig.35 As shown, the device may include: a construction module 71, a setting module 72, a duplicate checking module 73, a modification module 74 and a calculation module 75.
[0385] The construction module 71 is used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0386] The setting module 72 may be configured to set motion information for unavailable neighboring blocks.
[0387] The duplication checking module 73 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0388] The modification module 74 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0389] The calculation module 75 can be used to perform motion compensation using the motion information of the corresponding neighboring blocks of each sub-block in the effective angle direction when the current block is divided into multiple sub-blocks, so as to obtain a prediction value of each sub-block, and the prediction values of all sub-blocks constitute the prediction value of the current block, wherein the motion information of at least two corresponding neighboring blocks is used when performing motion compensation for the sub-block in at least one effective angle direction.
[0390] Fig.36 1 is a schematic diagram of the structure of an eighth embodiment of an angle mode inter-frame prediction device of the present application. Fig.36 As shown, the device may include: a construction module 81, a setting module 82, a duplicate checking module 83, a filling module 84, a modification module 85 and a calculation module 86.
[0391] The construction module 81 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0392] The setting module 82 may be configured to set motion information for unavailable neighboring blocks.
[0393] The duplication checking module 83 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0394] The filling module 84 can be used to fill the valid angle direction into the angle mode list to obtain the angle mode index of the valid angle direction.
[0395] The modification module 85 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0396] The calculation module 86 may be configured to calculate a prediction value of the current block using motion information of available and / or unavailable neighboring blocks in each valid angular direction.
[0397] Fig.37 1 is a schematic diagram of the structure of the ninth embodiment of an angle mode inter-frame prediction device of the present application. Fig.37 As shown, the device may include: a construction module 91, a setting module 92, a duplicate checking module 93, a determination module 94, a filling module 95, a modification module 96 and a calculation module 97.
[0398] The construction module 91 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0399] The setting module 92 may be configured to set motion information for unavailable neighboring blocks.
[0400] The duplication checking module 93 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0401] The determination module 94 may be configured to determine the order of the valid angular directions using the texture direction of the current block.
[0402] The filling module 95 can be used to fill the valid angular directions into the mode list in sequence.
[0403] The modification module 96 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0404] The calculation module 97 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and / or unavailable neighboring blocks in each effective angle direction.
[0405] Fig.38 1 is a schematic diagram of the structure of the tenth embodiment of an angle mode inter-frame prediction device of the present application. Fig.38 As shown, the device may include: a construction module 101, a setting module 102, a duplicate checking module 103, a modification module 104, a first calculation module 105, a first correction module 106, a selection module 107, a second correction module 108 and a second calculation module 109.
[0406] The construction module 101 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
[0407] The setting module 102 may be configured to set motion information for unavailable neighboring blocks.
[0408] The duplication checking module 103 may be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.
[0409] The modification module 104 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.
[0410] The first calculation module 105 can be used to obtain motion information of each sub-block by using motion information of a corresponding neighboring block of each sub-block in a valid angle direction when the current block is divided into multiple sub-blocks, where the motion information includes a motion vector.
[0411] The first correction module 106 can be used to correct the first prediction value of each sub-block using multiple correction motion vectors to obtain multiple second prediction values of each sub-block, where the first prediction value is obtained by performing motion compensation using motion information.
[0412] The selection module 107 may be used to select, for each sub-block, a modified motion vector corresponding to the second prediction value with the smallest evaluation index as the final modified motion vector of the sub-block;
[0413] The second correction module 108 may be used to perform correction using the final corrected motion vectors of all sub-blocks to obtain corrected motion vectors.
[0414] The second calculation module 109 may be configured to obtain a prediction value of each sub-block using the motion information including the modified motion vector, and the prediction values of all the sub-blocks constitute a prediction value of the current block.
[0415] Fig.39 Schematic diagram of the structure of an embodiment of the encoder of the present application. Fig.39 As shown, the encoder includes a processor 111 and a memory 112 coupled to the processor.
[0416] The memory 112 stores program instructions for implementing the method of any of the above embodiments; the processor 111 is used to execute the program instructions stored in the memory 112 to implement the steps of the above method embodiments. The processor 111 may also be called a CPU (Central Processing Unit). The processor 111 may be an integrated circuit chip with signal processing capabilities. The processor 111 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, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0417] Fig.40Schematic diagram of the structure of an embodiment of the storage medium of the present application. Fig.40 As shown, the storage medium 120 of the embodiment of the present application stores a program instruction 121, and the program instruction 121 implements the method provided by the above embodiment of the present application when executed. Among them, the program instruction 121 can form a program file and be stored in the above storage medium 120 in the form of a software product, so that a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) executes all or part of the steps of each implementation method of the present application. The aforementioned storage medium 1400 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-ONly Memory), a random access memory (RAM, RandomAccess Memory), a disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, and a tablet.
[0418] Fig.41 A schematic diagram of the structure of an embodiment of an electronic device of the present application. Fig.41 As shown, the electronic device 130 may include, but is not limited to, an encoder 131 (the encoder 121 mentioned above), and may also be other encoders capable of implementing the above method steps, which is not specifically limited here.
[0419] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0420] In addition, each functional unit in each embodiment of the present 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 above integrated unit can be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the description and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. An angle mode inter-frame prediction method, characterized in that: include: Constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein available neighbor blocks are the neighbor blocks that have been encoded and adopt inter-frame prediction, and the remaining neighbor blocks are unavailable neighbor blocks; Performing motion information duplication check on the neighboring blocks in each angular direction, and the angular directions that have passed the duplication check are valid angular directions; Using the motion information of the reference block of the unavailable neighboring block, the motion information of the unavailable neighboring block is set; The prediction value of the current block is calculated using motion information of available neighboring blocks and / or unavailable neighboring blocks in the effective angle direction.
2. The method according to claim 1, characterized in that The checking for duplicate motion information of the neighboring blocks in each angular direction comprises: At least one pair of the neighboring blocks is selected in each angular direction according to the size of the current block to perform motion information duplication checking.
3. The method according to claim 1, characterized in that: After checking the motion information duplication of the neighboring blocks in each angle direction, the following steps are further included: Fill the effective angle direction into the angle mode list to obtain the angle mode index of the effective angle direction.
4. The method according to claim 3, characterized in that The angle mode index ranges from 0 to 4.
5. The method according to claim 3, characterized in that: The code stream of the current block includes an angle mode flag, and the angle mode flag is used to indicate whether the current block adopts the angle mode inter-frame prediction.
6. The method according to claim 1, characterized in that Calculating the prediction value of the current block by using the motion information of the available neighboring blocks and / or the unavailable neighboring blocks in the effective angle direction, comprising: The current block is divided into multiple sub-blocks, and motion compensation is performed using the motion information of the corresponding neighboring block of each sub-block in the effective angle direction to obtain a prediction value of each sub-block. The prediction values of all sub-blocks of the current block constitute the prediction value of the current block.
7. The method according to claim 6, characterized in that The method of performing motion compensation by using the motion information of the corresponding neighboring block of each sub-block in the effective angle direction to obtain the prediction value of each sub-block includes: The first prediction value of each sub-block is corrected by using multiple corrected motion vectors to obtain multiple second prediction values of each sub-block; the first prediction value of each sub-block is obtained by performing motion compensation using motion information of each sub-block, and the motion information of each sub-block is obtained by using motion information of a corresponding neighboring block of each sub-block in a valid angle direction; Determine a final corrected motion vector for each sub-block based on the corrected motion vector corresponding to the second prediction value with the smallest evaluation index of each sub-block; Using the final corrected motion vector of each sub-block for correction, a corrected motion vector is obtained; The predicted value of each sub-block is determined using the modified motion vector.
8. The method according to claim 7, characterized in that The corrected motion vector includes a forward corrected motion vector and a backward corrected motion vector, the second prediction value includes a forward second prediction value and a backward second prediction value, the forward second prediction value is a pixel value of a second prediction block pointed to by motion information including the corrected forward motion vector, the corrected forward motion vector is obtained by correcting a forward motion vector of a sub-block using the forward corrected motion vector, the backward second prediction value is a pixel value of a second prediction block pointed to by motion information including the corrected backward motion vector, and the corrected backward motion vector is obtained by correcting a backward motion vector of a sub-block using the backward corrected motion vector; The method of taking the modified motion vector corresponding to the second prediction value having the smallest evaluation index of each sub-block as the final modified motion vector of each sub-block includes: Based on the absolute error sum algorithm, obtaining an evaluation index between the forward second prediction value and the backward second prediction value of each modified motion vector of each sub-block; Based on the modified motion vectors corresponding to a pair of forward second prediction values and backward second prediction values with the smallest evaluation index, a final modified motion vector of the sub-block is determined.
9. The method according to claim 8, characterized in that Each group of corresponding forward correction motion vectors and backward correction motion vectors are equal in magnitude and opposite in direction; and / or, The prediction value of the sub-block is the average of the forward prediction value and the backward prediction value of the sub-block.
10. The method according to claim 1, characterized in that The reference block of the unavailable neighboring block includes a previous neighboring block, a next neighboring block or a time-domain co-located block of the unavailable neighboring block.
11. The method according to claim 1, characterized in that: The duplication check includes determining whether the reference frame indexes of at least one pair of selected neighboring blocks are the same.
12. The method according to claim 1, characterized in that The sizes of all the neighboring blocks are the same and smaller than the size of the current block; and / or the neighboring blocks are located on the left side or the upper side of the current block.
13. The method according to any one of claims 1 to 12, characterized in that The multiple angular directions include at least two of horizontal, vertical, horizontal upward, horizontal downward, and vertical rightward.
14. An angle mode inter-frame prediction device, characterized in that: include: A construction module, configured to construct a candidate neighbor block list for the current block, wherein the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein available neighbor blocks are the encoded neighbor blocks using inter-frame prediction, and the remaining neighbor blocks are unavailable neighbor blocks; A duplication checking module is used to check the motion information of the neighboring blocks in each angular direction, and the angular directions that have passed the duplication check are valid angular directions; A modification module, used for setting the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; A calculation module is used to calculate the prediction value of the current block by using the motion information of the available neighboring blocks and / or the unavailable neighboring blocks in the effective angle direction.
15. An encoder, characterized in that: The encoder includes a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is configured to execute program instructions stored in the memory to implement the method according to any one of claims 1 to 13.
16. A storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 13 is implemented.
17. An electronic device, characterized in that: Comprising an encoder as claimed in claim 15.
Citation Information
Patent Citations
Motion information exporting method and device in video coding and decoding
CN103024378A
Intra-prediction method, and encoder and decoder using same
CN103621079A
Dynamic reference motion vector coding mode
US20170223350A1
Method and apparatus for coefficient induced intra prediction in image coding system
US20180343455A1
Position dependent intra prediction combination extended with angular modes
WO2019195283A1
