Method and apparatus for inter prediction and corresponding encoder and decoder
The method and apparatus for inter prediction in video coding enhance efficiency by using motion vector predictors and differences to reduce redundancy, improving the accuracy of video encoding and decoding processes.
Patent Information
- Application Number
- JP2025043063
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-12-29
- Filing Date
- 2025-03-18
- Publication Date
- 2025-11-12
- Estimated Expiration
- 2039-12-25
AI Technical Summary
Existing video coding technologies face challenges in reducing redundancy and improving coding efficiency, particularly in inter prediction processes.
The proposed method and apparatus for inter prediction involve obtaining motion vector predictors and differences, utilizing a set of candidate length and direction information to determine target values for image blocks, enhancing the accuracy and efficiency of video coding.
This approach reduces redundancy and improves coding efficiency by accurately determining motion vector predictors and differences, leading to more efficient video encoding and decoding processes.
Smart Images

Figure 0007768480000009 
Figure 0007768480000010 
Figure 0007768480000011
Abstract
Description
[Technical Field]
[0001] The present invention relates to the field of video coding technology, in particular to a method and apparatus for inter prediction, and a corresponding encoder and decoder. [Background technology]
[0002] Digital video capabilities may be incorporated into a wide variety of devices, including digital televisions, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones (also known as "smartphones"), video conferencing devices, video streaming devices, and the like. Digital video devices implement video compression technologies, such as those described in standards including MPEG-2, MPEG-4, ITU-T H.263, and ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (AVC), video coding standard H.265 / High Efficiency Video Coding (HEVC), and extensions to these standards. Implementing video compression technologies enables video devices to transmit, receive, encode, decode, and / or store digital video information more efficiently.
[0003] Video compression techniques are used to perform spatial (intra-image) prediction and / or temporal (inter-image) prediction to reduce or remove inherent redundancy in video sequences. In block-based video coding, video slices (i.e., video frames or portions of video frames) may be partitioned into image blocks, which are also sometimes referred to as treeblocks, coding units (CUs), and / or coding nodes. Image blocks in intra-coded (I) slices of an image are coded using spatial prediction based on reference samples in neighboring blocks within the same image. For image blocks in inter-coded (P or B) slices of an image, spatial prediction based on reference samples in neighboring blocks within the same image or temporal prediction based on reference samples in another reference image may be used. An image may be referred to as a frame, and a reference image may be referred to as a reference frame. Summary of the Invention
[0004] SUMMARY OF THE INVENTION The embodiments of the present application provide an inter-prediction method and apparatus, and corresponding encoder and decoder, to reduce redundancy in the coding process to a certain extent and improve coding efficiency.
[0005] According to a first aspect, an embodiment of the present application provides an inter prediction method, the method including: obtaining a motion vector predictor for a current image block; obtaining a motion vector difference length index value for the current image block, where the motion vector difference for the current image block is used to indicate a difference between the motion vector predictor and a motion vector target value for the current image block; determining target length information from a set of candidate length information based on the length index value, where the set of candidate length information includes N motion vector difference-only candidate length information, where N is a positive integer greater than 1 and less than 8; obtaining a motion vector difference for the current image block based on the target length information; determining a motion vector target value for the current image block based on the motion vector difference for the current image block and the motion vector predictor for the current image block; and obtaining a predictive block for the current image block based on the motion vector target value for the current image block.
[0006] The set of candidate length information may be preset.
[0007] In relation to the first aspect, in a first possible implementation of the first aspect, the method further includes a step of obtaining a direction index value of a motion vector difference of the current image block, and a step of determining target direction information from M candidate direction information of the motion vector differences based on the direction index value, where M is a positive integer greater than 1, and the step of obtaining a motion vector difference of the current image block based on the target length information includes a step of determining a motion vector difference of the current image block based on the target direction information and the target length information.
[0008] In relation to the first aspect or the first possible implementation of the first aspect, in a second possible implementation of the first aspect, N is four.
[0009] In relation to the second possible implementation of the first aspect, in a third possible implementation of the first aspect, the candidate length information of the N motion vector differences includes at least one of: when the length index value is a first predetermined value, the length indicated by the target length information is 1 / 4 of the pixel length; when the length index value is a second predetermined value, the length indicated by the target length information is half the pixel length; when the length index value is a third predetermined value, the length indicated by the target length information is 1 pixel length; or when the length index value is a fourth predetermined value, the length indicated by the target length information is 2 pixel length. In relation to the first aspect or any one of the above-mentioned possible implementations of the first aspect, in a fourth possible implementation of the first aspect, the step of obtaining a motion vector predictor for the current image block includes a step of constructing a candidate motion information list for the current image block, where the candidate motion information list includes L motion vectors, where L is 1, 3, 4, or 5; a step of obtaining an index value of prediction information of the motion information of the current image block in the candidate motion information list, where the prediction information of the motion information of the current image block includes a motion vector predictor; and a step of obtaining the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list.
[0010] According to a second aspect, an embodiment of the present application provides an inter prediction method, the method including: obtaining a motion vector predictor for a current image block; performing a motion search in an area of a position indicated by the motion vector predictor of the current image block to obtain a motion vector target value for the current image block; and obtaining a motion vector difference length index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, wherein the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the motion vector difference length index value for the current image block is used to indicate one candidate length information item among a predetermined set of candidate length information items, where the set of candidate length information items includes N motion vector difference-only candidate length information items, where N is a positive integer greater than 1 and less than 8.
[0011] In relation to the second aspect, in a first possible implementation of the second aspect, the step of obtaining a motion vector difference length index value for the current image block based on a motion vector target value for the current image block and a motion vector predictor for the current image block includes the steps of obtaining a motion vector difference for the current image block based on the motion vector target value for the current image block and the motion vector predictor for the current image block, and determining a motion vector difference length index value for the current image block and a motion vector difference direction index value for the current image block based on the motion vector difference for the current image block.
[0012] With respect to the second aspect or the first possible implementation of the second aspect, in a second possible implementation of the second aspect, N is four.
[0013] According to a third aspect, an embodiment of the present application provides an inter prediction method, the method including: obtaining a motion vector predictor for a current image block; obtaining a motion vector difference direction index value for the current image block, where the motion vector difference for the current image block is used to indicate a difference between the motion vector predictor and a motion vector target value for the current image block; determining target direction information from a set of candidate direction information based on the direction index value, where the set of candidate direction information includes candidate direction information for M motion vector differences, where M is a positive integer greater than 4; obtaining a motion vector difference for the current image block based on the target direction information; determining a motion vector target value for the current image block based on the motion vector difference for the current block and the motion vector predictor for the current image block; and obtaining a predictive block for the current image block based on the motion vector target value for the current image block.
[0014] In relation to the third aspect, in a first possible implementation of the third aspect, the method further includes a step of obtaining a length index value of a motion vector difference of the current image block, and a step of determining target length information from N candidate length information of motion vector differences based on the length index value, where N is a positive integer greater than 1, and the step of obtaining a motion vector difference of the current image block based on target direction information includes a step of determining a motion vector difference of the current image block based on the target direction information and the target length information.
[0015] In a second possible implementation of the third aspect, relative to the third aspect or the first possible implementation of the third aspect, M is 8.
[0016] In relation to a second possible implementation of the third aspect, in a third possible implementation of the third aspect, the candidate direction information of the M motion vector differences includes at least one of: when the direction index value is a first preset value, the direction indicated by the target direction information is just to the right; when the direction index value is a second preset value, the direction indicated by the target direction information is just to the left; when the direction index value is a third preset value, the direction indicated by the target direction information is just down; when the direction index value is a fourth preset value, the direction indicated by the target direction information is just up; when the direction index value is a fifth preset value, the direction indicated by the target direction information is bottom right; when the direction index value is a sixth preset value, the direction indicated by the target direction information is top right; when the direction index value is a seventh preset value, the direction indicated by the target direction information is bottom left; or when the direction index value is an eighth preset value, the direction indicated by the target direction information is top left.
[0017] In relation to the third aspect or any one of the above-mentioned possible implementations of the third aspect, in a fourth possible implementation of the third aspect, the step of obtaining a motion vector predictor for the current image block includes a step of constructing a candidate motion information list for the current image block, where the candidate motion information list includes L motion vectors, where L is 1, 3, 4, or 5; a step of obtaining an index value of prediction information of the motion information of the current image block in the candidate motion information list, where the prediction information of the motion information of the current image block includes a motion vector predictor; and a step of obtaining the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list.
[0018] According to a fourth aspect, an embodiment of the present application provides an inter prediction method, the method including: obtaining a motion vector predictor for a current image block; performing a motion search in an area of a position indicated by the motion vector predictor of the current image block to obtain a motion vector target value for the current image block; and obtaining an index value of a motion vector difference direction for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, wherein the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, the index value of the motion vector difference direction for the current image block is used to indicate one candidate direction information among a set of predetermined candidate direction information, and the set of candidate length information includes M motion vector difference candidate direction information, where M is a positive integer greater than 4.
[0019] In relation to the fourth aspect, in a first possible implementation of the fourth aspect, the step of obtaining an index value of a motion vector difference direction for the current image block based on a motion vector target value for the current image block and a motion vector predictor for the current image block includes the steps of obtaining a motion vector difference for the current image block based on the motion vector target value for the current image block and the motion vector predictor for the current image block, and determining an index value of a motion vector difference length for the current image block and an index value of a motion vector difference direction for the current image block based on the motion vector difference for the current image block.
[0020] In a second possible implementation of the fourth aspect, relative to the fourth aspect or the first possible implementation of the fourth aspect, M is 8.
[0021] According to a fifth aspect, an embodiment of the present application provides an inter-prediction method, the method including: obtaining a first motion vector predictor for a current image block and a second motion vector predictor for the current image block, where the first motion vector predictor corresponds to a first reference frame and the second motion vector predictor corresponds to a second reference frame; obtaining a first motion vector difference for the current image block, where the first motion vector difference for the current image block is used to indicate a difference between the first motion vector predictor and a first motion vector target value for the current image block, where the first motion vector target value and the first motion vector predictor correspond to the same reference frame; and determining a second motion vector difference for the current image block based on the first motion vector difference, where the second motion vector difference for the current image block is used to indicate a difference between the second motion vector predictor and a second motion vector target value for the current image block, where the second motion vector target value and the second motion vector predictor correspond to the same reference frame. The method includes determining a second motion vector difference when the orientation of the first reference frame relative to the current frame in which the block is located is the same as the orientation of the second reference frame relative to the current frame, or determining a second motion vector difference when the orientation of the first reference frame relative to the current frame in which the current image block is located is opposite to the orientation of the second reference frame relative to the current frame, such that the plus or minus sign of the second motion vector difference is opposite to the plus or minus sign of the first motion vector difference and the absolute value of the second motion vector difference is the same as the absolute value of the first motion vector difference; determining a first motion vector target value for the current image block based on the first motion vector difference and the first motion vector predictor; determining a second motion vector target value for the current image block based on the second motion vector difference and the second motion vector predictor; and obtaining a predictive block for the current image block based on the first motion vector target value and the second motion vector target value.
[0022] According to a sixth aspect, an embodiment of the present application provides an inter prediction device, the device including: a prediction unit configured to obtain a motion vector predictor for a current image block; and an acquisition unit configured to obtain a motion vector difference length index value for the current image block, where the motion vector difference for the current image block is used to indicate a difference between the motion vector predictor and a motion vector target value for the current image block, the prediction unit is further configured to: determine target length information from a set of candidate length information based on the length index value, where the set of candidate length information includes N motion vector difference-only candidate length information, where N is a positive integer greater than 1 and less than 8; obtain a motion vector difference for the current image block based on the target length information; determine a motion vector target value for the current image block based on the motion vector difference for the current image block and the motion vector predictor for the current image block; and obtain a prediction block for the current image block based on the motion vector target value for the current image block.
[0023] In relation to the sixth aspect, in a first possible implementation of the sixth aspect, the acquisition unit is further configured to acquire a direction index value of a motion vector difference of the current image block, and the prediction unit is further configured to determine target direction information from candidate direction information of M motion vector differences based on the direction index value, where M is a positive integer greater than 1, and the prediction unit is configured to determine the motion vector difference of the current image block based on the target direction information and the target length information.
[0024] In a second possible implementation of the sixth aspect, relative to the sixth aspect or the first possible implementation of the sixth aspect, N is four.
[0025] In relation to the second possible implementation of the sixth aspect, in a third possible implementation of the sixth aspect, the candidate length information of the N motion vector differences includes at least one of: when the length index value is a first predetermined value, the length indicated by the target length information is 1 / 4 of the pixel length; when the length index value is a second predetermined value, the length indicated by the target length information is half the pixel length; when the length index value is a third predetermined value, the length indicated by the target length information is 1 pixel length; or when the length index value is a fourth predetermined value, the length indicated by the target length information is 2 pixel length.
[0026] In relation to the sixth aspect or any one of the above-mentioned possible implementations of the sixth aspect, in a fourth possible implementation of the sixth aspect, the prediction unit is configured to: construct a candidate motion information list for a current image block, where the candidate motion information list may include L motion vectors, where L is 1, 3, 4, or 5; obtain an index value of prediction information for the motion information of the current image block in the candidate motion information list, where the prediction information for the motion information of the current image block includes a motion vector predictor; and obtain the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list.
[0027] According to a seventh aspect, an embodiment of the present application provides an inter prediction device, the device including: an acquisition unit configured to acquire a motion vector predictor of a current image block; and a prediction unit configured to perform a motion search in an area of a position indicated by the motion vector predictor of the current image block to acquire a motion vector target value for the current image block, the prediction unit is further configured to acquire a motion vector difference length index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the motion vector difference length index value of the current image block is used to indicate one candidate length information among a predetermined set of candidate length information, where the set of candidate length information includes N motion vector difference-only candidate length information, where N is a positive integer greater than 1 and less than 8.
[0028] In relation to the seventh aspect, in a first possible implementation of the seventh aspect, the prediction unit is configured to obtain a motion vector difference for the current image block based on a motion vector target value of the current image block and a motion vector predictor of the current image block, and to determine an index value for the length of the motion vector difference for the current image block and an index value for the direction of the motion vector difference for the current image block based on the motion vector difference of the current image block.
[0029] In a second possible implementation of the seventh aspect, relative to the seventh aspect or the first possible implementation of the seventh aspect, N is four.
[0030] According to an eighth aspect, an embodiment of the present application provides an inter prediction device, the device including: a prediction unit configured to obtain a motion vector predictor for a current image block; and an acquisition unit configured to obtain a motion vector difference direction index value for the current image block, where the motion vector difference for the current image block is used to indicate a difference between the motion vector predictor and a motion vector target value for the current image block, the prediction unit is further configured to: determine target direction information from a set of candidate direction information based on the direction index value, where the set of candidate direction information includes candidate direction information for M motion vector differences, where M is a positive integer greater than 4; obtain a motion vector difference for the current image block based on the target direction information; determine a motion vector target value for the current image block based on the motion vector difference for the current image block and the motion vector predictor for the current image block; and obtain a prediction block for the current image block based on the motion vector target value for the current image block.
[0031] In relation to the eighth aspect, in a first possible implementation of the eighth aspect, the acquisition unit is further configured to acquire a motion vector difference length index value of the current image block, and the prediction unit is further configured to determine target length information from N motion vector difference candidate length information based on the length index value, where N is a positive integer greater than 1, and the prediction unit is configured to determine the motion vector difference of the current image block based on the target direction information and the target length information.
[0032] In a second possible implementation of the eighth aspect, relative to the eighth aspect or the first possible implementation of the eighth aspect, M is 8.
[0033] In relation to the second possible implementation of the eighth aspect, in a third possible implementation of the eighth aspect, the candidate direction information of the M motion vector differences may include at least one of: when the direction index value is a first preset value, the direction indicated by the target direction information is exactly to the right; when the direction index value is a second preset value, the direction indicated by the target direction information is exactly to the left; when the direction index value is a third preset value, the direction indicated by the target direction information is exactly down; when the direction index value is a fourth preset value, the direction indicated by the target direction information is exactly up; when the direction index value is a fifth preset value, the direction indicated by the target direction information is bottom right; when the direction index value is a sixth preset value, the direction indicated by the target direction information is top right; when the direction index value is a seventh preset value, the direction indicated by the target direction information is bottom left; or when the direction index value is an eighth preset value, the direction indicated by the target direction information is top left.
[0034] In relation to the eighth aspect or any one of the above-mentioned possible implementations of the eighth aspect, in a fourth possible implementation of the eighth aspect, the prediction unit is configured to: construct a candidate motion information list for a current image block, where the candidate motion information list includes L motion vectors, where L is 1, 3, 4, or 5; obtain an index value of prediction information for the motion information of the current image block in the candidate motion information list, where the prediction information for the motion information of the current image block includes a motion vector predictor; and obtain the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list.
[0035] According to a ninth aspect, an embodiment of the present application provides an inter prediction device, including: an acquisition unit configured to acquire a motion vector predictor for a current image block; and a prediction unit configured to perform a motion search in an area of a position indicated by the motion vector predictor of the current image block to acquire a motion vector target value for the current image block, wherein the prediction unit is further configured to acquire, based on the motion vector target value of the current image block and the motion vector predictor of the current image block, an index value of a motion vector difference direction for the current image block, wherein the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the index value of the motion vector difference direction for the current image block is used to indicate one candidate direction information among a predetermined set of candidate direction information, wherein the set of candidate direction information includes M motion vector difference candidate length information, where M is a positive integer greater than 4.
[0036] In relation to the ninth aspect, in a first possible implementation of the ninth aspect, the prediction unit is configured to obtain a motion vector difference for the current image block based on a motion vector target value for the current image block and a motion vector predictor for the current image block, and to determine an index value for the length of the motion vector difference for the current image block and an index value for the direction of the motion vector difference for the current image block based on the motion vector difference for the current image block.
[0037] In a second possible implementation of the ninth aspect, relative to the ninth aspect or the first possible implementation of the ninth aspect, M is 8.
[0038] According to a tenth aspect, an embodiment of the present application provides an inter-prediction device, the device including: an acquisition unit; and a prediction unit; the acquisition unit is configured to acquire a first motion vector predictor for a current image block and a second motion vector predictor for the current image block, where the first motion vector predictor corresponds to a first reference frame and the second motion vector predictor corresponds to a second reference frame; the acquisition unit is further configured to acquire a first motion vector difference for the current image block, where the first motion vector difference for the current image block is used to indicate a difference between the first motion vector predictor and a first motion vector target value for the current image block, where the first motion vector target value and the first motion vector predictor correspond to the same reference frame; and the prediction unit is configured to determine a second motion vector difference for the current image block based on the first motion vector difference, where the second motion vector difference for the current image block is used to indicate a difference between the second motion vector predictor and a second motion vector target value for the current image block, where the second motion vector target value and the second motion vector predictor correspond to the same reference frame. the second motion vector difference corresponds to a reference frame, and is the first motion vector difference if the orientation of the first reference frame relative to the current frame in which the current image block is located is the same as the orientation of the second reference frame relative to the current frame, or the second motion vector difference has a positive or negative sign opposite to the positive or negative sign of the first motion vector difference and an absolute value of the second motion vector difference equal to the absolute value of the first motion vector difference if the orientation of the first reference frame relative to the current frame in which the current image block is located is opposite to the orientation of the second reference frame relative to the current frame; determining a first motion vector target value for the current image block based on the first motion vector difference and the first motion vector predictor; determining a second motion vector target value for the current image block based on the second motion vector difference and the second motion vector predictor; and obtaining a predictive block for the current image block based on the first motion vector target value and the second motion vector target value.
[0039] According to an eleventh aspect, an embodiment of the present application provides a video decoder configured to decode a bitstream to obtain an image block, the video decoder including: an inter prediction device according to the first aspect or any one of the possible implementations of the first aspect, the inter prediction device being configured to obtain a prediction block of a current image block; and a reconstruction module configured to reconstruct the current image block based on the prediction block.
[0040] According to a twelfth aspect, an embodiment of the present application provides a video encoder configured to encode an image block, the video encoder including: an inter prediction apparatus according to the second aspect or any one of possible implementations of the second aspect, the inter prediction apparatus configured to obtain a motion vector difference length index value for the current image block based on a motion vector predictor of the current image block, the motion vector difference length index value for the current image block being used to indicate one candidate length information among a set of predetermined candidate length information; and an entropy encoding module configured to encode the motion vector difference length index value for the current image block into a bitstream.
[0041] According to a thirteenth aspect, an embodiment of the present application provides a video decoder configured to decode a bitstream to obtain an image block, the video decoder including: an inter prediction device according to the third aspect or any one of the possible implementations of the third aspect, the inter prediction device being configured to obtain a prediction block of a current image block; and a reconstruction module configured to reconstruct the current image block based on the prediction block.
[0042] According to a fourteenth aspect, an embodiment of the present application provides a video encoder configured to encode an image block, the video encoder including: an inter-prediction device according to the fourth aspect or any one of possible implementations of the fourth aspect, the inter-prediction device configured to obtain a motion vector difference direction index value for the current image block based on a motion vector predictor of the current image block, the motion vector difference direction index value for the current image block being used to indicate one candidate direction information among a set of predetermined candidate direction information; and an entropy encoding module configured to encode the motion vector difference direction index value for the current image block into a bitstream.
[0043] According to a 15th aspect, an embodiment of the present application provides a video data decoding device, the device including: a memory configured to store video data in the form of a bitstream; and a video decoder according to any one of the 11th, 13th, or 15th aspects, or any one of the 11th, 13th, or 15th aspects.
[0044] According to a sixteenth aspect, an embodiment of the present application provides a video data encoding device, the device including: a memory configured to store video data, the video data including one or more image blocks; and a video encoder according to any one of the twelfth aspect, the fourteenth aspect, or an implementation of the twelfth and fourteenth aspects.
[0045] According to a seventeenth aspect, an embodiment of the present application provides an encoding device, the encoding device including: a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to perform some or all of the steps of any method according to the second aspect, the fourth aspect, or any one of the implementations of the second and fourth aspects.
[0046] According to an eighteenth aspect, an embodiment of the present application provides a decoding device, the decoding device including a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to perform some or all of the steps of any method according to the first aspect, the third aspect, the fifth aspect, or any one of the implementations of the first aspect, the third aspect, and the fifth aspect.
[0047] According to a nineteenth aspect, an embodiment of the present application provides a computer-readable storage medium having stored thereon program code, the program code including instructions used to perform some or all of the steps of a method according to any one of the first to fifth aspects or implementations of the first to fifth aspects.
[0048] According to a twentieth aspect, an embodiment of the present application provides a computer program product which, when run on a computer, causes the computer to perform some or all of the steps of a method according to any one of the first to fifth aspects or implementations of the first to fifth aspects.
[0049] It should be understood that the technical solutions in the second aspect to the tenth aspect of the present application are consistent with the technical solution in the first aspect, and the beneficial effects achieved by the various aspects and corresponding possible implementations are similar, and thus will not be described in detail again. [Brief explanation of the drawings]
[0050] In order to describe the technical solutions in the embodiments of the present invention more clearly, the following describes the accompanying drawings or background in the embodiments of the present invention.
[0051] [Figure 1A] 1 is a block diagram of an example video coding system 10 for implementing an embodiment of the present invention.
[0052] [Figure 1B]1 is a block diagram of an example video coding system 40 for implementing an embodiment of the present invention.
[0053] [Figure 2] 2 is a block diagram of an exemplary structure of an encoder 20 for implementing an embodiment of the present invention.
[0054] [Figure 3] 3 is a block diagram of an exemplary structure of a decoder 30 for implementing an embodiment of the present invention.
[0055] [Figure 4] 4 is a block diagram of an example video coding device 400 for implementing an embodiment of the present invention.
[0056] [Figure 5] FIG. 10 is a block diagram of another example of an encoding or decoding device for implementing an embodiment of the present invention.
[0057] [Figure 6] FIG. 2 is an exemplary block diagram of spatial and temporal proximity blocks that may be used to implement an embodiment of the present invention.
[0058] [Figure 7] 1 is a schematic flowchart of an inter-prediction method for implementing an embodiment of the present invention;
[0059] [Figure 8] 1 is a schematic flowchart of an inter-prediction method for implementing an embodiment of the present invention;
[0060] [Figure 9] 1 is a schematic flowchart of an inter-prediction method for implementing an embodiment of the present invention;
[0061] [Figure 10]1 is a schematic flowchart of an inter-prediction method for implementing an embodiment of the present invention;
[0062] [Figure 11] 1 is a schematic flowchart of an inter-prediction method for implementing an embodiment of the present invention;
[0063] [Figure 12] 1 is a schematic block diagram of an inter-prediction device according to an embodiment of the present invention;
[0064] [Figure 13] 1 is a schematic block diagram of an inter-prediction device according to an embodiment of the present invention;
[0065] [Figure 14] 1 is a schematic block diagram of an inter-prediction device according to an embodiment of the present invention;
[0066] [Figure 15] 1 is a schematic block diagram of an inter-prediction device according to an embodiment of the present invention;
[0067] [Figure 16] 1 is a schematic block diagram of an inter-prediction device according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION
[0068] The following description of embodiments of the present invention will be made with reference to the accompanying drawings in which embodiments of the present invention are described. In the following description, reference is made to the accompanying drawings, which form a part of this disclosure and which show, by way of illustration, certain aspects of embodiments of the present invention or in which embodiments of the present invention may be used. It should be understood that the embodiments of the present invention may be used in other ways and may include structural or logical changes not depicted in the accompanying drawings. Therefore, the following detailed description is not to be taken in a limiting sense, and the scope of the present invention is defined by the appended claims. For example, it should be understood that content disclosed in connection with a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more particular method steps are described, the corresponding device may include one or more units, such as functional units, for performing the described method steps (e.g., one unit that performs those one or more steps, or multiple units that each perform one or more of those steps), even if such one or more units are not explicitly described or illustrated in the accompanying drawings. Additionally, for example, when a particular apparatus is described in terms of one or more units, such as functional units, a corresponding method may include steps used to perform one or more functions of the one or more units (e.g., one step used to perform one or more functions of one or more units, or multiple steps, each used to perform one or more functions of one or more units in the multiple units), even if such one or more of the multiple steps are not explicitly described or illustrated in the accompanying drawings. Furthermore, it should be understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless otherwise specified.
[0069] The technical solutions in the embodiments of the present invention can be applied not only to existing video coding standards (e.g., standards such as H.264 and HEVC), but also to future video coding standards (e.g., the H.266 standard). The terms used in the implementation of the present invention are intended to merely describe specific embodiments of the present invention and are not intended to limit the present invention. The following first briefly describes some concepts that can be used in the embodiments of the present invention.
[0070] Video coding typically refers to the processing of a series of images that make up a video or a video sequence. In the field of video coding, the terms "picture," "frame," and "image" are sometimes used synonymously. Video coding, as used herein, refers to video encoding or video decoding. Video encoding is performed at the source side and typically processes original video images (e.g., by compressing) to reduce the amount of data required to represent the video image for efficient storage and / or transmission. Video decoding is performed at the destination side and typically involves the reverse process compared to an encoder to reconstruct the video image. "Coding" video images in the embodiments should be understood as "encoding" or "decoding" a video sequence. The combination of encoding and decoding components is also referred to as a codec.
[0071] A video sequence includes a series of pictures, each of which is further divided into slices, and each slice is further divided into blocks. Video coding is performed using blocks. Some new video coding standards further extend the concept of a "block." For example, the H.264 standard introduces macroblocks (MBs). Macroblocks may be further divided into prediction blocks (partitions) that can be used for predictive coding. The high-efficiency video coding (HEVC) standard uses basic concepts such as a "coding unit (CU)," a "prediction unit (PU)," and a "transform unit (TU)." Multiple block units are obtained by functional partitioning and described using a new tree-based structure. For example, a CU may be divided into smaller CUs using quadtree partitioning, and these smaller CUs can be further divided to generate a quadtree structure. A CU is the basic unit for dividing and encoding a coding image. PUs and TUs also have a similar tree structure. A PU may correspond to a prediction block and is a basic unit for predictive coding. A CU is further partitioned into PUs according to a partitioning pattern. A TU may correspond to a transform block and is a basic unit for transforming a prediction residual. However, CU, PU, and TU are all essentially concepts of a block (or image block).
[0072] For example, in HEVC, a CTU is partitioned into multiple CUs by using a quadtree structure represented as a coding tree. The decision of whether to encode an image area by using inter-image (temporal) prediction or intra-image (spatial) prediction is made at the CU level. Each CU may be further partitioned into one, two, or four PUs based on the PU partitioning pattern. The same prediction process is applied in one PU, and related information is transmitted to the decoder on a PU-by-PU basis. After obtaining a residual block by applying a prediction process based on the PU partitioning pattern, the CU may be partitioned into multiple transform units (TUs) based on another quadtree structure similar to the coding tree used for the CU. The latest development in video compression technology uses quadtrees and multi-type trees to partition a CTU to obtain multiple CUs. Multi-type trees include binary trees and ternary trees. In the partitioning structure, the CUs may be square or rectangular.
[0073] In this specification, for ease of explanation and understanding, an image block to be coded in a current coded image may be referred to as a current block. For example, in coding, the current block is the block being coded, and in decoding, the current block is the block being decoded. A decoded image block in a reference image used to predict a current block is referred to as a reference block. Specifically, a reference block is a block that provides a reference signal for the current block, and the reference signal represents pixel values in the image block. A block in a reference image that provides a prediction signal for the current block may be referred to as a prediction block. The prediction signal represents pixel values, sample values, or sample signals in the prediction block. For example, after multiple reference blocks are traversed, a best reference block is found. The best reference block provides a prediction for the current block, and this block is referred to as a prediction block. The current block may also be referred to as a current image block.
[0074] In the case of lossless video coding, the original video image can be reconstructed, i.e., the reconstructed video image is of the same quality as the original video image (assuming no transmission or other data loss occurs during storage or transmission). In the case of lossy video coding, further compression is performed, e.g., by quantization, to reduce the amount of data required to represent the video image, and the video image cannot be perfectly reconstructed at the decoder side, i.e., the quality of the reconstructed video image is lower or worse than the quality of the original video image.
[0075] Some H.261 video coding standards are used for "lossy hybrid video codecs" (i.e., spatial and temporal prediction in the sample domain are combined with 2D transform coding to apply quantization in the transform domain). Each image of a video sequence is typically partitioned into a set of non-overlapping blocks, and coding is typically performed at the block level. That is, on the encoder side, video is typically processed, or encoded, at the block (video block) level. For example, spatial (intra-image) and temporal (inter-image) prediction are used to generate a predictive block, which is subtracted from a current block (the block being processed or to be processed) to obtain a residual block, which is then transformed and quantized in the transform domain to reduce (compress) the amount of data to be transmitted. On the decoder side, the inverse process to that of the encoder is applied to the coded or compressed block to reconstruct the current block for representation. Furthermore, the encoder repeats the decoder's processing loop so that the encoder and decoder generate identical predictions (e.g., intra-prediction and inter-prediction) and / or reconstructions to process, i.e., code, subsequent blocks.
[0076] The following describes a system architecture to which an embodiment of the present invention is applied. FIG. 1A is a schematic block diagram of an example of a video coding system 10 to which an embodiment of the present invention is applied. As shown in FIG. 1A, the video coding system 10 may include a source device 12 and a destination device 14. The source device 12 generates encoded video data. Thus, the source device 12 may be referred to as a video encoder. The destination device 14 may decode the encoded video data generated by the source device 12. Thus, the destination device 14 may be referred to as a video decoder. In various implementation solutions, the source device 12, the destination device 14, or both the source device 12 and the destination device 14 may include one or more processors and memory coupled to the one or more processors. As described herein, the memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other computer-accessible medium that can be used to store desired program code in the form of instructions or data structures. The source device 12 and the destination device 14 may include a variety of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, wireless communication devices, and the like.
[0077] 1A depicts source device 12 and destination device 14 as separate devices, a device embodiment may alternatively include both source device 12 and destination device 14, or the functionality of both source device 12 and destination device 14, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such an embodiment, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.
[0078] The communication connection between source device 12 and destination device 14 may be implemented via link 13, and destination device 14 may receive encoded video data from source device 12 via link 13. Link 13 may include one or more media or devices capable of moving encoded video data from source device 12 to destination device 14. In one example, link 13 may include one or more communication media that enable source device 12 to transmit encoded video data directly to destination device 14 in real time. In this example, source device 12 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to destination device 14. The one or more communication media may include wireless communication media and / or wired communication media, e.g., a radio frequency (RF) spectrum, or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, which may be, for example, a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication mediums may include a router, a switch, a base station, or another device that facilitates communication from source device 12 to destination device 14.
[0079] Source device 12 includes an encoder 20. Optionally, source device 12 may further include an image source 16, an image preprocessor 18, and a communication interface 22. In a particular implementation, encoder 20, image source 16, image preprocessor 18, and communication interface 22 may be hardware components within source device 12 or may be software programs within source device 12. A separate description follows.
[0080] Image source 16 may include or be, for example, any type of image capture device configured to capture real-world images and / or any type of device for generating images or comments (in the case of encoding screen content, some text on the screen is also considered part of the encoded image or image), such as a computer graphics processor configured to generate computer-animated images, or any type of device configured to acquire and / or provide real-world or computer-animated images (e.g., screen content or virtual reality (VR) images), and / or any combination thereof (e.g., augmented reality (AR) images). Image source 16 may be a camera for capturing images or a memory for storing images. Image source 16 may also include any type of interface (internal or external) through which previously captured or generated images are stored and / or through which images are acquired or received. If image source 16 is a camera, image source 16 may be, for example, a local camera or a camera integrated into the source device. If the image source 16 is a memory, the image source 16 may be, for example, a local memory or a memory integrated into the source device. If the image source 16 includes an interface, the interface may be, for example, an external interface for receiving images from an external video source. The external video source may be, for example, an external image capture device such as a camera, an external memory, or an external image generation device. The external image generation device may be, for example, an external computer graphics processor, a computer, or a server. The interface may be any type of interface, for example, a wired or wireless interface, or an optical interface, according to any proprietary or standardized interface protocol.
[0081] An image may be considered a two-dimensional array or matrix of picture elements. The picture elements in the array are sometimes called samples. The number of samples in the horizontal and vertical directions (or horizontal and vertical axes) of the array or image defines the size and / or resolution of the image. Three color components are typically used to represent color. For example, an image may be represented as or contain three sample arrays. For example, in an RGB format or color space, an image contains corresponding red, green, and blue sample arrays. However, in video coding, each pixel is typically represented in a luminance / chrominance format or color space. For example, an image in YUV format contains a luminance component, denoted Y (although L is sometimes used instead), and two chrominance components, denoted U and V. The luminance (luma) component Y represents brightness or gray-level intensity (e.g., both are the same in a grayscale image), and the two chrominance (chroma) components U and V represent chrominance or color information components. Correspondingly, an image in YUV format includes a luma sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (U and V). An image in RGB format may be converted or transformed into an image in YUV format, and vice versa. Such a process is also known as color transformation or conversion. If the image is monochrome, the image may include only a luma sample array. In this embodiment of the present invention, the image transmitted by image source 16 to the image processor may also be referred to as original image data 17.
[0082] The image preprocessor 18 is configured to receive the original image data 17 and preprocess the original image data 17 to obtain a preprocessed image 19 or preprocessed image data 19. For example, the preprocessing performed by the image preprocessor 18 may include cropping, color format conversion (e.g., from RGB format to YUV format), color correction, or noise removal.
[0083] The encoder 20 (also referred to as video encoder 20) is configured to receive pre-processed image data 19 and process the pre-processed image data 19 by using an associated prediction mode (such as a prediction mode in the embodiments herein) to provide encoded image data 21. (Further structural details of the encoder 20 are described below with reference to FIG. 2, FIG. 4, or FIG. 5.) In some embodiments, the encoder 20 may be configured to perform various embodiments described below to implement an encoder-side application of the inter-prediction method described in the present invention.
[0084] The communications interface 22 may be configured to receive the encoded image data 21 and transmit the encoded image data 21 to the destination device 14 or any other device (e.g., memory) via the link 13 for storage or direct reconstruction. The any other device may be any device used for decoding or storage. The communications interface 22 may be configured, for example, to package the encoded image data 21 into an appropriate format, e.g., data packets, for transmission via the link 13.
[0085] Destination device 14 includes a decoder 30. Optionally, destination device 14 may further include a communications interface 28, an image post-processor 32, and a display device 34. A separate description follows.
[0086] The communication interface 28 may be configured to receive the encoded image data 21 from the source device 12 or any other source. The any other source may be, for example, a storage device, and the storage device may be, for example, an encoded image data storage device. The communication interface 28 may be configured to transmit or receive the encoded image data 21 via the link 13 between the source device 12 and the destination device 14 or via any type of network. The link 13 may be, for example, a direct wired or wireless connection. The any type of network may be, for example, a wired or wireless network, or any combination thereof, or any type of private or public network, or any combination thereof. The communication interface 28 may be configured, for example, to unpackage data packets transmitted via the communication interface 22 to obtain the encoded image data 21.
[0087] Both communication interface 28 and communication interface 22 may be configured as one-way or two-way communication interfaces, e.g., to send and receive messages to establish connections, acknowledge and exchange communications links and / or any other information related to data transmission, e.g., encoded image data transmission.
[0088] The decoder 30 (also referred to as decoder 30) is configured to receive the coded image data 21 and to provide decoded image data 31 or a decoded image 31 (structural details of the decoder 30 are further described below with reference to Figure 3, Figure 4 or Figure 5). In some embodiments, the decoder 30 may be configured to perform various embodiments described below to implement a decoder-side application of the inter-prediction method described in the present invention.
[0089] The image post-processor 32 is configured to post-process the decoded image data 31 (also referred to as reconstructed image data) to obtain post-processed image data 33. The post-processing performed by the image post-processor 32 may include color format conversion (e.g., from YUV format to RGB format), color correction, cropping, resampling, or any other processing. The image post-processor 32 may further be configured to transmit the post-processed image data 33 to a display device 34.
[0090] Display device 34 is configured to receive the post-processed image data 33 and display the image, for example, to a user or viewer. Display device 34 may be or include any type of display configured to present the reconstructed image, for example, an integrated or external display or monitor. For example, the display may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.
[0091] 1A depicts source device 12 and destination device 14 as separate devices, a device embodiment may alternatively include both source device 12 and destination device 14, or the functionality of both source device 12 and destination device 14, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such an embodiment, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.
[0092] 1A , or the presence and (exact) division of functionality of source device 12 and / or destination device 14, may vary depending on the actual device and application. Source device 12 and destination device 14 may each be any one of a wide range of devices, including any type of handheld or stationary device, e.g., a notebook or laptop computer, a mobile phone, a smartphone, a pad or tablet computer, a video camera, a desktop computer, a set-top box, a television, a camera, an in-vehicle device, a display device, a digital media player, a video game console, a video streaming device (such as a content service server or content distribution server), a broadcast receiving device, or a broadcast transmitting device, and may or may not use any type of operating system.
[0093] Encoder 20 and decoder 30 may each be implemented as any one of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic circuits, hardware, or any combination thereof. Where these techniques are implemented in part using software, a device may store software instructions on a suitable non-transitory computer-readable storage medium and execute these instructions using hardware, such as one or more processors, to perform the techniques of this disclosure. Any one of the foregoing (including hardware, software, combinations of hardware and software, and the like) may be considered one or more processors.
[0094] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the techniques herein may be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between an encoding device and a decoding device. In other examples, data may be retrieved from local memory, streamed over a network, etc. A video encoding device may encode data and store it in memory, and / or a video decoding device may retrieve data from memory and decode it. In some examples, encoding and decoding are performed by devices that do not communicate with each other but simply encode data to memory and / or retrieve data from memory and decode it.
[0095] 1B is an illustrative diagram of an example video coding system 40 including the encoder 20 of FIG. 2 and / or the decoder 30 of FIG. 3, according to an exemplary embodiment. The video coding system 40 may implement a combination of various techniques in embodiments of the present invention. In the implementation shown, the video coding system 40 may include an imaging device 41, the encoder 20, the decoder 30 (and / or a video encoder / decoder implemented by logic 47 of a processing unit 46), an antenna 42, one or more processors 43, one or more memories 44, and / or a display device 45.
[0096] 1B, imaging device 41, antenna 42, processing unit 46, logic circuitry 47, encoder 20, decoder 30, processor 43, memory 44, and / or display device 45 may be in communication with one another. As illustrated, video coding system 40 is shown with encoder 20 and decoder 30, but in different examples, video coding system 40 may include only encoder 20 or only decoder 30.
[0097] In some examples, antenna 42 may be configured to transmit or receive an encoded bitstream of video data. Additionally, in some examples, display device 45 may be configured to present the video data. In some examples, logic circuitry 47 may be implemented by processing unit 46. Processing unit 46 may include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, or the like. Video coding system 40 may also include optional processor 43. Optional processor 43 may also include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, or the like. In some examples, logic circuitry 47 may be implemented by hardware, e.g., dedicated video coding hardware, and processor 43 may be implemented by general-purpose software, an operating system, or the like. Additionally, memory 44 may be any type of memory, such as volatile memory (e.g., static random access memory (SRAM), dynamic random access memory (DRAM)), or non-volatile memory (e.g., flash memory). In a non-limiting example, memory 44 may be implemented by cache memory. In some examples, logic circuitry 47 may access memory 44 (e.g., to implement an image buffer). In other examples, logic circuitry 47 and / or processing unit 46 may include memory (e.g., a cache) to implement an image buffer.
[0098] In some examples, encoder 20 implemented using logic circuitry may include an image buffer (e.g., implemented by processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include encoder 20 implemented using logic circuitry 47 to implement various modules described in connection with FIG. 2 and / or any other encoder system or subsystem described herein. The logic circuitry may be configured to perform various operations described herein.
[0099] In some examples, decoder 30 may be implemented in a similar manner with logic circuitry 47 to implement the various modules described in connection with decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. In some examples, decoder 30 implemented using logic circuitry may include an image buffer (implemented by processing unit 2820 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include decoder 30 implemented using logic circuitry 47 to implement the various modules described in connection with FIG. 3 and / or any other decoder system or subsystem described herein.
[0100] In some examples, antenna 42 may be configured to receive an encoded bitstream of video data. As described, the encoded bitstream may include data related to the video frame coding described herein, indices, index values, mode selection data, or the like, such as data related to coding partitioning (e.g., transform coefficients or quantized transform coefficients, optional indices (as described), and / or data defining the coding partitioning). Video coding system 40 may further include a decoder 30 coupled to antenna 42 and configured to decode the encoded bitstream. Display device 45 is configured to present the video frames.
[0101] It should be understood that in this embodiment of the present invention, for the examples described in connection with encoder 20, decoder 30 may be configured to perform the inverse process. With respect to signaling syntax elements, decoder 30 may be configured to receive and parse such syntax elements and correspondingly decode associated video data. In some examples, encoder 20 may entropy encode syntax elements into an encoded video bitstream. In such examples, decoder 30 may parse such syntax elements and correspondingly decode associated video data.
[0102] It should be noted that the inter prediction method described in the embodiment of the present invention is mainly used in the inter prediction process, which exists in both the encoder 20 and the decoder 30. The encoder 20 / decoder 30 in the embodiment of the present invention may be an encoder / decoder that supports a video standard protocol such as H.263, H.264, HEVV, MPEG-2, MPEG-4, VP8, or VP9, or that supports a next-generation video standard protocol (such as H.266).
[0103] 2 is a schematic / conceptual block diagram of an exemplary encoder 20 configured to implement an embodiment of the present invention. In the example of FIG. 2, the encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy encoding unit 270. The prediction processing unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a mode selection unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not depicted in this figure). The encoder 20 shown in FIG. 2 may also be referred to as a hybrid video codec-based video encoder or a hybrid video encoder.
[0104] For example, the residual calculation unit 204, the transform processing unit 206, the quantization unit 208, the prediction processing unit 260, and the entropy coding unit 270 form a forward signal path of the encoder 20, while for example, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, and the prediction processing unit 260 form a reverse signal path of the encoder. The reverse signal path of the encoder corresponds to the signal path of the decoder (see decoder 30 in FIG. 3).
[0105] Encoder 20 receives, for example, from input 202, an image 201 or an image block 203 of image 201, e.g., a picture of a series of pictures forming a video or a video sequence. Image block 203 may also be referred to as a current image block or an image block to be coded. Image 201 may also be referred to as a current image or a picture to be coded (particularly in video coding, which distinguishes the current image from other pictures (e.g., previously coded and / or decoded pictures in the same video sequence, i.e., the video sequence that also includes the current image)).
[0106] In one embodiment, the encoder 20 may include a partitioning unit (not depicted in FIG. 2 ) configured to partition the image 201 into multiple blocks, such as image block 203. The image 201 is typically partitioned into multiple non-overlapping blocks. The partitioning unit may be configured to use the same block size for all images in the video sequence and a corresponding grid that defines the block size, or to vary the block size between images or subsets or groups of images, and partition each image into multiple corresponding blocks.
[0107] In some examples, prediction processing unit 260 of encoder 20 may be configured to perform any combination of the above partitioning techniques.
[0108] Similar to image 201, image block 203 may also be, or may be considered to be, a two-dimensional array or matrix of samples having sample values, albeit of a smaller size than image 201. That is, image block 203 may include, for example, one sample array (e.g., a luma array for monochrome image 201), three sample arrays (e.g., one luma array and two chroma arrays for color images), or any other number and / or type of array depending on the applied color format. The number of samples in the horizontal and vertical directions (or horizontal and vertical axes) of image block 203 defines the size of image block 203.
[0109] The encoder 20 shown in Figure 2 is configured to block-by-block encode an image 201. For example, the encoder encodes and predicts each image block 203.
[0110] The residual calculation unit 204 is configured to calculate the residual block 205 based on the image block 203 and the prediction block 265 (further details regarding the prediction block 265 are provided below), for example, to obtain the residual block 205 in the sample domain by subtracting the sample values of the prediction block 265 from the sample values of the image block 203 on a sample-by-sample (pixel-by-pixel) basis.
[0111] The transform processing unit 206 is configured to apply a transform, for example a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207, sometimes called transform residual coefficients, represent the residual block 205 in the transform domain.
[0112] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as a transform specified in HEVC / H.265. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by a factor. To respect the norm of the residual block processed by using the forward transform and the inverse transform, an additional scale factor is applied as part of the transform process. The scale factor is typically selected based on some constraints. For example, the scale factor may be a power of two for the shift operation, the bit depth of the transform coefficients, or a trade-off between accuracy and implementation cost. For example, a particular scaling factor may be specified for the inverse transform by the inverse transform processing unit 212 on the decoder side 30 (and, for example, the corresponding inverse transform by the inverse transform processing unit 212 on the encoder side 20), and a corresponding scaling factor may be appropriately specified for the forward transform by the transform processing unit 206 on the encoder side 20.
[0113] The quantization unit 208 is configured to quantize the transform coefficients 207 to obtain quantized transform coefficients 209, for example, by applying scalar quantization or vector quantization. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. In the quantization process, the bit depth associated with some or all of the transform coefficients 207 may be reduced. For example, during quantization, n-bit transform coefficients may be truncated to m-bit transform coefficients, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, in the case of scalar quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step corresponds to finer quantization, and a larger quantization step corresponds to coarser quantization. The applicable quantization step may be indicated by a quantization parameter (QP). The quantization parameter may, for example, be an index of a predefined set of applicable quantization steps. For example, a smaller quantization parameter may correspond to finer quantization (smaller quantization step), and a larger quantization parameter may correspond to coarser quantization (larger quantization step), or vice versa. Quantization may include division by the quantization step and corresponding quantization and / or inverse quantization (e.g., performed by the inverse quantization unit 210), or may include multiplication by the quantization step. In embodiments according to some standards, such as HEVC, the quantization parameter may be used to determine the quantization step. Generally, the quantization step may be calculated based on the quantization parameter using a fixed-point approximation of an equation that includes a division. An additional scaling factor may be introduced in the quantization and dequantization to restore the norm of the residual block, and the norm of the residual block may be modified due to the scale used in the fixed-point approximation of the quantization step and quantization parameter equations. In an example implementation, the scale of the inverse transform and the scale of the dequantization may be combined. Alternatively, customized quantization tables may be used and signaled from the encoder to the decoder, for example in the bitstream.Quantization is a lossy operation, and the loss increases as the quantization step increases.
[0114] The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 to the quantized coefficients to obtain dequantized coefficients 211, e.g., to apply the inverse of the quantization scheme applied by the quantization unit 208 based on or by using the same quantization step as the quantization unit 208. The dequantized coefficients 211, sometimes referred to as dequantized residual coefficients 211, typically correspond to the transform coefficients 207, although they are not identical to the transform coefficients due to loss due to quantization.
[0115] The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, for example, an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transform dequantization block 213 or an inverse transform residual block 213.
[0116] The reconstruction unit 214 (e.g., analog adder 214) is configured to add the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, for example, by adding the sample values of the reconstructed residual block 213 and the sample values of the prediction block 265, to obtain a reconstructed block 215 in the sample domain.
[0117] Optionally, a buffer unit 216 (or "buffer" 216 for short), for example of a line buffer 216, is configured to buffer or store the reconstructed blocks 215 and corresponding sample values, for example for intra-prediction. In other embodiments, the encoder may be configured to use the unfiltered reconstructed blocks and / or the corresponding sample values stored in the buffer unit 216 for any type of estimation and / or prediction, for example, intra-prediction.
[0118] For example, in some embodiments, encoder 20 may be configured such that buffer unit 216 is not only used to store reconstructed blocks 215 for intra prediction unit 254, but also for loop filter unit 220 (not depicted in FIG. 2), and / or such that buffer unit 216 and decoded image buffer unit 230 form one buffer, for example. In other embodiments, filtered blocks 221 and / or blocks or samples from decoded image buffer 230 (neither blocks nor samples are depicted in FIG. 2) are used as input to or the basis for intra prediction unit 254.
[0119] The loop filter unit 220 (simply referred to as “loop filter” 220) is configured to filter the reconstructed block 215 to obtain a filtered block 221 to smooth pixel transitions or improve video quality. The loop filter unit 220 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter, e.g., a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a collaborative filter. While FIG. 2 illustrates the loop filter unit 220 as an in-loop filter, in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221. The decoded image buffer 230 may store the reconstructed coded block after the loop filter unit 220 performs a filtering operation on the reconstructed coded block.
[0120] In one embodiment, the encoder 20 (and correspondingly the loop filter unit 220) may be configured to output the loop filter parameters (such as sample adaptive offset information), for example, directly or after entropy encoding has been performed by the entropy encoding unit 270 or any other entropy encoding unit, so that, for example, the decoder 30 can receive the same loop filter parameters and apply the same loop filter parameters for decoding.
[0121] The decoded picture buffer (DPB) 230 may be a reference picture memory that stores reference image data for use in encoding video data by the encoder 20. The DPB 230 may be formed by any one of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), and resistive RAM (RRAM)), or another type of memory device. The DPB 230 and the buffer 216 may be provided by the same memory device or separate memory devices. In one example, the decoded picture buffer (DPB) 230 is configured to store the filtered blocks 221. The decoded picture buffer 230 may further be configured to store another previously filtered block of the same current picture or a different picture, e.g., a previously reconstructed picture, e.g., the previously reconstructed and filtered block 221, to provide a previously reconstructed, i.e., decoded, complete picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples), e.g., for inter-prediction. In one example, if the reconstructed block 215 is reconstructed without loop filtering, the decoded picture buffer (DPB) 230 is configured to store the reconstructed block 215.
[0122] The prediction processing unit 260, also called the block prediction processing unit 260, is configured to receive or obtain an image block 203 (the current image block 203 of the current image 201) and reconstructed image data, e.g., reference samples of the same (current) image from the buffer 216 and / or reference image data 231 of one or more previously decoded images from the decoded image buffer 230, and to process such data for prediction, i.e., to provide a prediction block 265, which may be an inter prediction block 245 or an intra prediction block 255.
[0123] The mode selection unit 262 may be configured to select the corresponding prediction block 245 or 255 to be used as the prediction block 265 for the calculation of the residual block 205 and the reconstruction of the reconstructed block 215, and / or the prediction mode (e.g., intra prediction mode or inter prediction mode).
[0124] In an embodiment, mode selection unit 262 may be configured to select a prediction mode (e.g., from among prediction modes supported by prediction processing unit 260) that provides the best match or smallest residual (smallest residual means better compression for transmission or storage), provides the smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or considers or balances both. Mode selection unit 262 may be configured to determine the prediction mode based on rate distortion optimization (RDO), i.e., select a prediction mode that provides the smallest rate distortion optimization, or select a prediction mode whose associated rate distortion at least meets a selection criterion for the prediction mode.
[0125] The prediction process (eg, performed by prediction processing unit 260) and mode selection (eg, performed by mode select unit 262) performed by exemplary encoder 20 are described in detail below.
[0126] As noted above, encoder 20 is configured to determine or select a best or optimal prediction mode from a (predetermined) set of prediction modes, which may include, for example, intra-prediction modes and / or inter-prediction modes.
[0127] The set of intra-prediction modes may include 35 different intra-prediction modes, e.g., omni-directional modes such as DC (or average) mode and planar mode, or directional modes such as those defined in H.265, or may include 67 different intra-prediction modes, e.g., omni-directional modes such as DC (or average) mode and planar mode, or directional modes such as those defined in the currently developing H.266.
[0128] In a possible implementation, the set of inter prediction modes depends on available reference images (i.e., at least some decoded images stored in the DPB 230, e.g., as described above) and other inter prediction parameters, such as whether the entire reference image or only a portion of the reference image, e.g., a search window region around the region of the current block, is used to search for the best-matching reference block, and / or whether pixel interpolation, e.g., half-pixel interpolation and / or quarter-pixel interpolation, is applied. The set of inter prediction modes may include, for example, an Advanced Motion Vector Prediction (AMVP) mode and a merge mode. In a particular implementation, the set of inter prediction modes may include an improved control point-based AMVP mode and an improved control point-based merge mode in an embodiment of the present invention. In one example, the intra prediction unit 254 may be configured to perform any combination of the inter prediction techniques described below.
[0129] In addition to the aforementioned prediction modes, in embodiments of the present invention, skip mode and / or direct mode may also be applied.
[0130] The prediction processing unit 260 may further be configured to partition the image block 203 into smaller block partitions or sub-blocks, for example by repeatedly using quad-tree (QT) partitioning, binary-tree (BT) partitioning, triple-tree (TT) partitioning, or any combination thereof, and to perform prediction on each of these block partitions or sub-blocks, for example, where the mode selection includes selecting a tree structure for the partitioned image block 203 and selecting a prediction mode to be applied to each of these block partitions or sub-blocks.
[0131] The inter prediction unit 244 may include a motion estimation (ME) unit (not depicted in FIG. 2 ) and a motion compensation (MC) unit (not depicted in FIG. 2 ). The motion estimation unit is configured to receive or obtain the image block 203 (the current image block 203 of the current image 201) and the decoded image 231, or at least one or more previously reconstructed blocks, e.g., reconstructed blocks of one or more previously decoded other / different images 231, for motion estimation. For example, a video sequence may include the current image and the previously decoded image 31. That is, the current image and the previously decoded image 31 may be part of a series of images forming a video sequence or may form a series of images.
[0132] For example, the motion estimation unit (not depicted in FIG. 2) may be configured to select a reference block from among multiple reference blocks of the same or different images among multiple other images, and to provide the reference image to the motion compensation unit (not depicted in FIG. 2), and / or to provide an offset (spatial offset) between a motion vector (the position (coordinates X and Y) of the reference block) and the position of the current block as an inter-prediction parameter. This offset is also called a motion vector (MV).
[0133] The motion compensation unit is configured to obtain inter prediction parameters and perform inter prediction based on or by using the inter prediction parameters to obtain inter prediction block 245. Motion compensation performed by the motion compensation unit (not depicted in FIG. 2 ) may include extracting or generating a prediction block based on motion / block vectors determined by motion estimation (interpolation may be performed at a sub-sample accuracy level). Interpolation filtering may generate additional pixel samples from known pixel samples, potentially increasing the number of candidate prediction blocks that can be used to code the image block. Upon receiving the motion vector of the PU of the current image block, motion compensation unit 246 may locate the prediction block pointed to by the motion vector in one of multiple reference image lists. Motion compensation unit 246 may further generate syntax elements associated with the block and the video slice for use by video decoder 30 in decoding image blocks of the video slice.
[0134] Specifically, the inter prediction unit 244 may transmit a syntax element to the entropy encoding unit 270, and the syntax element includes inter prediction parameters (e.g., indication information of an inter prediction mode selected for predicting a current block after multiple inter prediction modes are traversed, or at least one of an index value of a motion vector difference length of the current image block and an index value of a motion vector difference direction of the current image block). In a possible application scenario, when there is only one inter prediction mode, the inter prediction parameters may alternatively not be held in the syntax element. In this case, the decoder side 30 may directly perform decoding in a default prediction mode. It can be understood that the inter prediction unit 244 may be configured to perform any combination of inter prediction techniques.
[0135] The intra prediction unit 254 is configured to obtain, e.g., receive, the image block 203 (current image block) and one or more previously reconstructed blocks of the same image, e.g., reconstructed neighboring blocks, for intra estimation. The encoder 20 may, for example, be configured to select an intra prediction mode from among a plurality of (predetermined) intra prediction modes.
[0136] In one embodiment, the encoder 20 may be configured to select an intra-prediction mode according to an optimization criterion, for example, based on the minimum residual (e.g., the intra-prediction mode that provides the predicted block 255 that is most similar to the current image block 203) or the minimum rate distortion.
[0137] The intra prediction unit 254 is further configured to determine the intra-predicted block 255 based on, for example, the intra prediction parameters of the selected intra prediction mode. In any case, after selecting the intra prediction mode for the block, the intra prediction unit 254 is further configured to provide the intra prediction parameters, i.e., information indicative of the selected intra prediction mode for the block, to the entropy encoding unit 270. In some examples, the intra prediction unit 254 may be configured to perform any combination of intra prediction techniques.
[0138] Specifically, the intra prediction unit 254 may transmit a syntax element to the entropy encoding unit 270, and the syntax element includes intra prediction parameters (e.g., indication information of an intra prediction mode selected for predicting a current block after multiple intra prediction modes have been traversed). In a possible application scenario, if there is only one intra prediction mode, the intra prediction parameters may alternatively not be held in the syntax element. In this case, the decoder side 30 may directly perform decoding in a default prediction mode.
[0139] The entropy encoding unit 270 is configured to apply (or bypass) an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context adaptive VLC (CAVLC) scheme, an arithmetic coding scheme, context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique) to one or all of the quantized coefficients 209, the inter-prediction parameters, the intra-prediction parameters, and / or the loop filter parameters to obtain coded image data 21, which may be output via an output 272, for example, in the form of a coded bitstream 21. The coded bitstream may be transmitted to the video decoder 30 or archived for later transmission or retrieval by the video decoder 30. Entropy encoding unit 270 may also be configured to entropy encode another syntax element of the current video slice being encoded.
[0140] Other structural variations of the video encoder 20 may be configured to encode the video stream. For example, a non-transform-based encoder 20 may, for some blocks or frames, directly quantize the residual signal without the transform processing unit 206. In another implementation, the encoder 20 includes a quantization unit 208 and an inverse quantization unit 210 that may be combined into a single unit.
[0141] Specifically, in this embodiment of the present invention, encoder 20 may be configured to implement the inter-prediction methods described in the following embodiments.
[0142] It should be understood that other structural variations of the video encoder 20 may be configured to encode the video stream. For example, for some image blocks or image frames, the video encoder 20 may directly quantize the residual signal without processing by the transform processing unit 206 and, correspondingly, without processing by the inverse transform processing unit 212. Alternatively, for some image blocks or image frames, the video encoder 20 does not generate residual data, and correspondingly, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, and the inverse transform processing unit 212 do not need to perform processing. Alternatively, the video encoder 20 may directly store the reconstructed image block as a reference block without processing by the filter 220. Alternatively, the quantization unit 208 and the inverse quantization unit 210 in the video encoder 20 may be combined together. The loop filter 220 is optional. In the case of lossless compression encoding, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, and the inverse transform processing unit 212 are optional. It should be understood that in different application scenarios, the inter prediction unit 244 and the intra prediction unit 254 may be selectively used.
[0143] 3 is a schematic / conceptual block diagram of an exemplary decoder 30 configured to implement an embodiment of the present invention. Video decoder 30 is configured to receive coded image data (e.g., coded bitstream) 21, e.g., coded by encoder 20, to obtain decoded image 231. In the decoding process, video decoder 30 receives video data, e.g., a coded video bitstream representing image blocks of coded video slices and associated syntax elements, from video encoder 20.
[0144] 3, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., an analog summer 314), a buffer 316, a loop filter 320, a decoded image buffer 330, and a prediction processing unit 360. Prediction processing unit 360 may include an inter prediction unit 344, an intra prediction unit 354, and a mode selection unit 362. In some examples, video decoder 30 may perform a decoding pass that is generally inverse to the encoding pass described in connection with video encoder 20 of FIG.
[0145] Entropy decoding unit 304 is configured to perform entropy decoding on encoded image data 21 to obtain, e.g., quantized coefficients 309 and / or decoded coding parameters (not depicted in FIG. 3 ), e.g., any one or all of (decoded) inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements. Entropy decoding unit 304 is further configured to forward the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to prediction processing unit 360. Video decoder 30 may receive syntax elements at the video slice level and / or the video block level.
[0146] The inverse quantization unit 310 may have the same function as the inverse quantization unit 110. The inverse transform processing unit 312 may have the same function as the inverse transform processing unit 212. The reconstruction unit 314 may have the same function as the reconstruction unit 214. The buffer 316 may have the same function as the buffer 216. The loop filter 320 may have the same function as the loop filter 220. The decoded image buffer 330 may have the same function as the decoded image buffer 230.
[0147] Prediction processing unit 360 may include an inter prediction unit 344 and an intra prediction unit 354. The inter prediction unit 344 may be similar in function to the inter prediction unit 244, and the intra prediction unit 354 may be similar in function to the intra prediction unit 254. Prediction processing unit 360 is typically configured to perform block prediction and / or obtain a prediction block 365 from the coded data 21, and is configured to receive or obtain (explicitly or implicitly) prediction-related parameters (e.g., at least one of a motion vector difference length index value and a motion vector difference direction index value for the current image block) and / or information regarding a selected prediction mode, for example, from entropy decoding unit 304.
[0148] If the video slice is coded as an intra-coded (I) slice, intra prediction unit 354 of prediction processing unit 360 is configured to generate a prediction block 365 for an image block of the current video slice based on a signaled intra prediction mode and data from previously decoded blocks of the current frame or image. If the video frame is coded as an inter-coded (B or P) slice, inter prediction unit 344 (e.g., a motion compensation unit) of prediction processing unit 360 is configured to generate a prediction block 365 for a video block of the current video slice based on a motion vector received from entropy decoding unit 304 and another syntax element (e.g., the syntax element may be at least one of a motion vector difference length index value and a motion vector difference direction index value for the current image block). In the case of inter prediction, the prediction block may be generated from one of multiple reference images in a reference image list. Video decoder 30 may construct reference frame lists, referred to as List 0 and List 1, by using a default construction technique based on the reference images stored in DPB 330.
[0149] Prediction processing unit 360 is configured to determine prediction information for video blocks of the current video slice by analyzing motion vectors and / or other syntax elements, and is configured to use the prediction information to generate a predictive block for the current video block being decoded. In an example of the present disclosure, prediction processing unit 360 uses several received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) for encoding video blocks in the video slice, an inter-prediction slice type (e.g., B slice, P slice, or GPB slice), construction information for one or more of the slice's reference image list, a motion vector for each inter-coded video block in the slice, an inter-prediction state for each inter-coded video block in the slice, and other information to decode the video blocks in the current video slice. In another example of the present disclosure, syntax elements received from the bitstream by video decoder 30 include syntax elements in one or more of an adaptive parameter set (APS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header.
[0150] Inverse quantization unit 310 may be configured to inverse quantize (i.e., dequantize) the quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 304. The inverse quantization process may include using quantization parameters calculated by video encoder 20 for each video block in a video slice to determine the degree of quantization to be applied, as well as the degree of inverse quantization to be applied.
[0151] Inverse transform processing unit 312 is configured to apply an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to produce residual blocks in the pixel domain.
[0152] The reconstruction unit 314 (e.g., analog adder 314) is configured to add the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365, for example, by adding the sample values of the reconstructed residual block 313 and the sample values of the prediction block 365, to obtain a reconstructed block 315 in the sample domain.
[0153] Loop filter unit 320 (during or after the coding loop) is configured to filter reconstructed block 315 to obtain filtered block 321 to smooth pixel transitions or improve video quality. In an example, loop filter unit 320 may be configured to perform any combination of the filtering techniques described below. Loop filter unit 320 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter, e.g., a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a collaborative filter. Although loop filter unit 320 is shown in FIG. 3 as an in-loop filter, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.
[0154] The decoded video blocks 321 in a given frame or picture are then stored in a decoded picture buffer 330, which stores reference pictures used for subsequent motion compensation.
[0155] The decoder 30 is arranged to output, for example, the decoded image 31 via an output 332 for presentation to or viewing by a user.
[0156] Other variations of the video decoder 30 may be configured to decode the compressed bitstream. For example, the decoder 30 may generate an output video stream without the loop filter unit 320. For example, a non-transform-based decoder 30 may directly inverse quantize the residual signal for some blocks or frames without the inverse transform processing unit 312. In another implementation, the video decoder 30 includes the inverse quantization unit 310 and the inverse transform processing unit 312, which may be combined into a single unit.
[0157] Specifically, in this embodiment of the present invention, decoder 30 is configured to implement the inter-prediction methods described in the following embodiments.
[0158] It should be understood that other structural variations of the video decoder 30 may be configured to decode an encoded video bitstream. For example, the video decoder 30 may generate an output video stream without the processing performed by the filter 320. Alternatively, for some image blocks or image frames, the entropy decoding unit 304 of the video decoder 30 does not obtain quantized coefficients by decoding, and the inverse quantization unit 310 and the inverse transform processing unit 312 do not need to perform processing correspondingly. The loop filter 320 is optional. In the case of lossless compression, the inverse quantization unit 310 and the inverse transform processing unit 312 are optional. It should be understood that inter prediction units and intra prediction units may be selectively used in different application scenarios.
[0159] It should be understood that in the encoder 20 and decoder 30 of the present application, the processing result of one step can be further processed before being output to the next step, for example, after a step such as interpolation filtering, motion vector derivation, or loop filtering, a further operation such as clipping or shifting is performed on the processing result of the corresponding step.
[0160] For example, the motion vectors of the control points of the current image block or the motion vectors of sub-blocks of the current image block derived from the motion vectors of neighboring affine coding blocks may be further processed. This application is not limited thereto. For example, the value of the motion vector may be restricted within a specific bit width range. Assuming that the allowed bit width of the motion vector is bitDepth, the value range of the motion vector is from -2^(bitDepth-1) to 2^(bitDepth-1)-1, where the symbol "^" represents exponentiation. If bitDepth is 16, the value range is from -32768 to 32767. If bitDepth is 18, the value range is from -131072 to 131071. In another example, the value of the motion vector (e.g., the motion vector MV of four 4x4 sub-blocks in an 8x8 image block) may be restricted so that the maximum difference between the integer parts of the MVs of the four 4x4 sub-blocks does not exceed N pixels, for example, 1 pixel.
[0161] To constrain the motion vectors within a particular bit width, the following two methods may be used.
[0162] Method 1: The overflow most significant bit of the motion vector is removed. ux=(vx+2 bitDepth )%2 bitDepth vx=(ux>=2 bitDepth-1 )?(ux-2 bitDepth ):ux uy=(vy+2 bitDepth )%2 bitDepth vy=(uy>=2 bitDepth-1 )?(uy-2 bitDepth ):uy
[0163] vx represents the horizontal component of the motion vector of an image block or a sub-block of an image block; vy represents the vertical component of the motion vector of an image block or a sub-block of an image block; ux and uy are intermediate values; bitDepth represents the bit depth.
[0164] For example, the value of vx is -32769, and 32767 is derived according to the formula above. Values are stored in a computer in two's complement notation, and the two's complement representation of -32769 is 1, 0111, 1111, 1111, 1111 (17 bits), and the processing performed by the computer discards the most significant bits due to overflow. Therefore, the value of vx is 0111, 1111, 1111, 1111, or 32767. This value matches the result derived by processing according to the formula.
[0165] Method 2: Clipping is performed on the motion vectors as shown in the following equation: vx=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vx) vy=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vy)
[0166] vx represents the horizontal component of the motion vector of an image block or a sub-block of an image block. vy represents the vertical component of the motion vector of an image block or a sub-block of an image block. x, y, and z correspond to the three input values of the MV clamping process Clip3. Clip3 is defined to indicate clipping of the value of z to the range [x,y].
number
[0167] 4 is a schematic structural diagram of a video coding device 400 (e.g., video encoding device 400 or video decoding device 400) according to an embodiment of the present invention. Video coding device 400 is suitable for implementing embodiments described herein. In an embodiment, video coding device 400 may be a video decoder (e.g., decoder 30 of FIG. 1A) or a video encoder (e.g., encoder 20 of FIG. 1A). In another embodiment, video coding device 400 may be one or more components of decoder 30 of FIG. 1A or encoder 20 of FIG. 1A.
[0168] Video coding device 400 includes an ingress port 410 and a receiving unit (Rx) 420 configured to receive data, a processor, logic unit, or central processing unit (CPU) 430 configured to process the data, a transmitting unit (Tx) 440 and an egress port 450 configured to transmit the data, and a memory 460 configured to store the data. Video coding device 400 may further include optical / electrical and electrical / optical (EO) components coupled to ingress port 410, receiving unit 420, transmitting unit 440, and egress port 450 for optical or electrical signals to enter and exit.
[0169] The processor 430 is implemented using hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. The processor 430 communicates with the ingress port 410, the receiving unit 420, the transmitting unit 440, the egress port 450, and the memory 460. The processor 430 includes a coding module 470 (e.g., the encoding module 470 or the decoding module 470). The encoding / decoding module 470 implements the embodiments disclosed herein and implements the inter-prediction method provided in the embodiments of the present invention. For example, the encoding / decoding module 470 implements, processes, or provides various coding operations. Thus, the inclusion of the encoding / decoding module 470 provides substantial improvements to the functionality of the video coding device 400 and affects the transformation of the video coding device 400 into different states. Alternatively, the encoding / decoding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0170] Memory 460 may include one or more disks, tape drives, and solid-state drives, and may be used to store programs when they are selectively executed and as an overflow data storage device for storing instructions and data read during execution of the programs. Memory 460 may be volatile and / or non-volatile, and may be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random access memory (SRAM).
[0171] 5 is a simplified block diagram of an apparatus 500 that may be used as either or both of the source device 12 and the destination device 14 of FIG. 1A according to an exemplary embodiment. The apparatus 500 may implement the techniques of the present application. That is, FIG. 5 is a schematic block diagram of an implementation of an encoding or decoding device (coding device 500 for short) according to an embodiment of the present application. The coding device 500 may include a processor 510, a memory 530, and a bus system 550. The processor and the memory are connected via the bus system. The memory is configured to store instructions. The processor is configured to execute the instructions stored in the memory. The memory of the coding device stores program code. The processor can invoke the program code stored in the memory to perform the video encoding or decoding methods described herein, particularly various novel inter-prediction methods. To avoid repetition, details will not be repeated here.
[0172] In this embodiment of the present application, the processor 510 may be a Central Processing Unit (abbreviated "CPU"), or the processor 510 may be another general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. The general-purpose processor may be a microprocessor or any conventional processor or the like.
[0173] The memory 530 may include a read-only memory (ROM) device or a random access memory (RAM) device. Alternatively, any other suitable type of storage device may be used as the memory 530. The memory 530 may include code and data 531 that the processor 510 accesses by using the bus 550. The memory 530 may further include an operating system 533 and application programs 535. The application programs 535 include at least one program that enables the processor 510 to perform the video encoding or video decoding methods described herein (particularly the inter-prediction methods described herein). For example, the application programs 535 may include applications 1 through N, and further include a video encoding or video decoding application (video coding application for short) that performs the video encoding or video decoding methods described herein.
[0174] The bus system 550 may include not only a data bus, but also a power bus, a control bus, a status signal bus, and the like, although for clarity of explanation, various types of buses in this figure are represented as bus system 550.
[0175] Optionally, coding device 500 may further include one or more output devices, such as a display 570. In one example, display 570 may be a touch-sensitive display that combines a display with a touch-sensitive unit operable to sense touch input. Display 570 may be connected to processor 510 via bus 550.
[0176] The solution in the embodiment of the present application will be described in detail below.
[0177] Inter prediction in the video encoding or decoding method performed by inter prediction unit 244, inter prediction unit 344, encoder 20, decoder 30, video coding device 400, or coding device 500 includes determining motion information. Specifically, the motion information may be determined by a motion estimation unit, and the motion information may include at least one type of reference image information and motion vector information. The reference image information may include at least one of unidirectional / bidirectional prediction information (bidirectional prediction means that two reference blocks are needed to determine a predictive block of a current image block, and in bidirectional prediction, two groups of motion information are needed to determine the two reference blocks), information about a reference image list, and a reference image index corresponding to the reference image list. The motion vector information may include a motion vector, which indicates a position offset in the horizontal and vertical directions. The motion vector information may further include a motion vector difference (MVD). The determination of the motion information and the determination of the predictive block may include one of the following modes:
[0178] In AMVP mode, the encoder first builds a candidate motion vector list based on the motion vectors of blocks (e.g., but not limited to, coded blocks) spatially or temporally adjacent to the current block, and then determines a motion vector predictor (MVP) motion vector for the current block from the candidate motion vector list by calculating bitrate distortion. The encoder then transfers the index value of the selected motion vector predictor in the candidate motion vector list and the index value of a reference frame (also called a reference image) to the decoder. Furthermore, the encoder performs a motion search in the MVP-centered neighborhood to obtain a better motion vector (also called a motion vector target value) for the current block. The encoder then transfers the motion vector difference between the MVP and the best motion vector to the decoder. The decoder side first constructs a candidate motion vector list by using motion vectors of blocks spatially or temporally adjacent to the current block (for example, but not limited to, a decoded block), obtains a motion vector predictor based on the candidate motion vector list and the obtained index value of the motion vector predictor in the candidate motion vector list, obtains a better motion vector based on the obtained difference between the MVP and the better motion vector, and obtains a predicted block of the current block based on the better motion vector and a reference frame obtained based on the index value of the reference frame. Note that if there is one candidate in the candidate motion vector list, the index value of the selected motion vector predictor in the candidate motion vector list may not be transmitted.
[0179] The encoder side may be source device 12, video coding system 40, encoder 20, video coding device 400, or coding device 500. The decoder side may be destination device 14, video coding system 40, decoder 30, video coding device 400, or coding device 500. The index value of the motion vector predictor in the candidate motion vector list and the index value of the reference frame (the reference frame may also be called a reference image) may be syntax elements used for transmission in the above description.
[0180] In merge mode, the encoder first constructs a candidate motion information list based on the motion information of spatially or temporally neighboring blocks (e.g., but not limited to, coded blocks) of the current block, determines the best motion information from the candidate motion information list as the motion information of the current block by calculating the rate distortion, and transfers the index value (referred to as a merge index, which also applies to the following description) of the best motion information from the candidate motion information list to the decoder. Figure 6 shows the spatial and temporal candidate motion information of the current block. The spatial candidate motion information is the motion information of five spatially neighboring blocks (A0, A1, B0, B1, and B2). If neighboring blocks are unavailable or an intra-coding mode is used, the spatial candidate motion information is not added to the candidate motion information list. The temporal candidate motion information of the current block is obtained by scaling the MV of the co-located blocks in the reference frame based on the picture order count (POC) of the reference frame and the current frame. First, it is determined whether a block at position T0 in the reference frame is available. If the block is unavailable, a block at position T1 is selected. The decoder side first constructs a candidate motion information list based on motion information of blocks (e.g., but not limited to, decoded blocks) spatially or temporally adjacent to the current block, where the motion information in the motion information list includes a motion vector and an index value of the reference frame. The decoder side then obtains the best motion information based on the candidate motion information list and the index value of the position of the best motion information in the candidate motion information list, and obtains a prediction block for the current block based on the best motion information. Note that if there is only one candidate in the candidate motion information list, the index value of the position of the best motion information in the candidate motion information list may not be transmitted.
[0181] In the present embodiment, the candidate motion information list is constructed based on the motion information of blocks spatially or temporally adjacent to the current block, but is not limited thereto. The candidate motion information list may be constructed or refined by using at least one of motion information of spatially adjacent blocks, motion information of temporally adjacent blocks, pairwise average merging candidates, history-based merging candidates, and zero motion vector merging candidates. For a detailed description of the construction process, please refer to JVET-L1001-v6. The present embodiment is not limited thereto.
[0182] In the merge mode with motion vector difference (MMVD), MVD transmission based on the merge mode is added. Specifically, the encoder side further performs a motion search in a nearby area around the best motion information in the candidate motion information list to obtain a better motion vector (sometimes called a motion vector target value) for the current block, and then transmits the difference between the better motion vector and the motion vector included in the best motion information in the candidate motion information list to the decoder side. After obtaining the best motion information, the decoder side further obtains a better motion vector based on the difference and the motion vector included in the best motion information in the candidate motion information list, and then obtains a prediction block for the current block based on the better motion vector and a reference frame indicated by the index value of the reference frame included in the best motion information in the candidate motion information list.
[0183] The MMVD mode is a mode that adds MVD transmission based on the skip mode. Compared with the merge mode, the skip mode can be understood as residual information between the predicted block of the current block and the original block of the current block. Similarly, based on the skip mode, the encoder side further performs a motion search in a nearby area around the best motion information in the candidate motion information list to obtain a better motion vector for the current block, and the encoder side transmits the difference (motion vector difference) between the better motion vector and the motion vector included in the best motion information in the candidate motion information list to the decoder side. After obtaining the best motion information, the decoder side further obtains a better motion vector based on the difference and the motion vector included in the best motion information in the candidate motion information list, and then obtains a predicted block of the current block based on the better motion vector and a reference frame indicated by the index value of the reference frame included in the best motion information in the candidate motion information list. For a description of the skip mode, please refer to existing H.266 drafts (working drafts, for example, JVET-L1001-v6). Details will not be described again here.
[0184] In the MMVD mode, multiple merge candidates in the VVC are used. One or more of these merge candidates are selected, and then the MV expansion formula is performed based on the selected candidate or candidates. The MV expansion formula is implemented by using a simplified identification method. The identification method includes identifying the starting point of the MV, the motion step, and the motion direction. By using the existing merge candidate list, the selected candidate may be MRG_TYPE_DEFAULT_N mode. Based on the selected candidate, the initial position of the MV is determined. The base candidate IDX (Table 1) indicates the specific candidate selected as the best candidate in the candidate list. [Table 1]
[0185] The basic candidate IDX indicates the index value of the position of the best motion information in the candidate motion information list. The Nth MVP indicates that the Nth item in the candidate motion information list is an MVP.
[0186] When an MVD is transmitted, offset values such as x and y may be transmitted, the length of the MVD and the direction of the MVD may be transmitted, or an index value for the length of the MVD (indicating a distance from 1 / 4 pixel to 32 pixel) and an index value for the direction of the MVD (up, down, left, or right) may be transmitted.
[0187] The MVD length index value is used to indicate the length of the MVD. A correspondence relationship between the MVD length index value (Distance IDX) and the MVD length (Pixel distance) may be preset, and the correspondence relationship may be shown in Table 2. [Table 2]
[0188] The MVD direction index value is used to indicate the direction of the MVD. A correspondence between the MVD direction index value (Direction IDX) and the MVD direction (x-axis or y-axis) may be preset, and the correspondence may be shown in Table 3. [Table 3]
[0189] In Table 3, if the value of the y-axis is N / A, it may indicate that the direction of the MVD is independent of the direction of the y-axis, and if the value of the x-axis is N / A, it may indicate that the direction of the MVD is independent of the direction of the x-axis.
[0190] In the decoding process, the MMVD flag (mmvd_flag, used to indicate whether the current block is decoded in MMVD mode) is parsed after the skip flag (cu_skip_flag, used to indicate whether the current block is decoded in skip mode) or the merge flag (merge_flag, used to indicate whether the current block is decoded in merge mode). If the skip flag or the merge flag is true, the value of the MMVD flag needs to be parsed. If the MMVD flag is true, other flag values corresponding to the MMVD need to be encoded or decoded.
[0191] Furthermore, in a bidirectional inter-prediction (also called bidirectional prediction) scenario, the decoder side or the encoder side may decode or encode MVD information of only one direction, and the MVD information of the other direction may be obtained based on the MVD information of one direction. A specific process may be as follows:
[0192] Specifically, whether the reference frame corresponding to the MVD in one direction and the reference frame corresponding to the MVD in the other direction are in the same direction or in opposite directions may be determined based on the POC value of the frame in which the current block is located and the POC values of the reference frames in these two directions. For example, if the plus or minus sign of a first difference obtained by subtracting the POC value of the reference frame in one direction from the POC value of the frame in which the current block is located is the same as the plus or minus sign of a second difference obtained by subtracting the POC value of the reference frame in the other direction from the POC value of the frame in which the current block is located, the reference frame corresponding to the MVD in one direction and the reference frame corresponding to the MVD in the other direction are in the same direction. Otherwise, if the plus or minus sign of the first difference obtained by subtracting the POC value of the reference frame in one direction from the POC value of the frame in which the current block is located is opposite to the plus or minus sign of the second difference obtained by subtracting the POC value of the reference frame in the other direction from the POC value of the frame in which the current block is located, the reference frame corresponding to the MVD in one direction and the reference frame corresponding to the MVD in the other direction are in different directions.
[0193] Note that the orientation of the reference frame may be the orientation of the reference frame relative to the orientation of the current frame (the frame in which the current block is located), or the orientation of the current frame relative to the orientation of the reference frame. In a specific implementation process, whether the reference frame corresponding to the MVD in one direction and the reference frame corresponding to the MVD in the other direction are in the same direction or opposite directions may be determined based on a difference obtained by subtracting the POC value of the current frame from the POC value of the current frame, or may be determined based on a difference obtained by subtracting the POC value of the current frame from the POC value of the reference frame.
[0194] When the reference frame corresponding to the MVD in one direction and the reference frame corresponding to the MVD in the other direction are in the same direction, the sign of the MVD in the other direction is the same as the sign of the MVD in one direction. For example, when the MVD in one direction is (x, y), the MVD in the other direction is (x, y). Specifically, the MVD in one direction may be obtained based on the index value of the length of the MVD in one direction and the index value of the direction of the MVD in one direction.
[0195] Alternatively, if the reference frame corresponding to the MVD in one direction and the reference frame corresponding to the MVD in the other direction are in different directions, the sign of the MVD in the other direction is opposite to the sign of the MVD in one direction, e.g., if the MVD in one direction is (x, y), then the MVD in the other direction is (-x, -y).
[0196] The MVD in the other direction is scaled based on the MVD in one direction, the first POC difference, and the second POC difference to obtain a better MVD in the other direction. The first POC difference is the difference between the POC value of the frame in which the current block is located and the POC value of the reference frame corresponding to the MVD in one direction, and the second POC difference is the difference between the POC value of the frame in which the current block is located and the POC value of the reference frame corresponding to the MVD in the other direction. For a specific description of the scaling method, please refer to existing H.266 drafts (working drafts, for example, JVET-L1001-v6). Details will not be described here.
[0197] The above-mentioned MVD solution can be further optimized. For example, index values with relatively large pixel distance values are rarely used, and the MVD direction values can only indicate four directions. In a specific process, step (3) of scaling the MVD of one direction based on the MVD of the other direction, the first POC difference, and the second POC difference to obtain a better MVD of the other direction is complicated. Therefore, the embodiments of the present invention provide a series of improved solutions.
[0198] 7 is a schematic flowchart of an inter-prediction method according to an embodiment of the present invention. The method may be performed by destination device 14, video coding system 40, decoder 30, video coding device 400, or coding device 500. The method may be specifically performed by video decoder 30, or specifically performed by entropy decoding unit 304 and prediction processing unit 360 (or, for example, inter-prediction unit 344 within prediction processing unit 360). The method may include the following steps.
[0199] S701: Obtain a motion vector predictor for the current image block.
[0200] In a specific implementation process, the step of obtaining a motion vector predictor for a current image block may include: constructing a candidate motion information list for the current image block, where the candidate motion information list includes L motion vectors, where L is 1, 3, 4, or 5; obtaining an index value of prediction information of the motion information of the current image block in the candidate motion information list, where the prediction information of the motion information of the current image block includes a motion vector predictor; and obtaining the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list. The candidate motion information list for the current image block may be a merge candidate motion information list. Correspondingly, the inter prediction method provided in this embodiment of the present invention may be applied to MMVD mode.
[0201] The index values in the candidate motion information list may be variable-length coded index values. For example, if L is 3, 1 may be used to indicate the first item in the candidate motion information list, 01 may be used to indicate the second item in the candidate motion information list, and 00 may be used to indicate the third item in the candidate motion information list. Alternatively, if L is 4, 1 may be used to indicate the first item in the candidate motion information list, 01 may be used to indicate the second item in the candidate motion information list, 001 may be used to indicate the third item in the candidate motion information list, and 000 may be used to indicate the fourth item in the candidate motion information list. Others may be inferred by analogy.
[0202] For the manner of obtaining a motion vector predictor by constructing a candidate motion information list for the current image block, please refer to the above description of modes such as AMVP mode, merge mode, MMVD mode or skip mode, and the details will not be described again here.
[0203] S702: Obtain an index value of the length of the motion vector difference of the current image block. The motion vector difference of the current image block is used to indicate the difference between the motion vector predictor and the motion vector target value of the current image block.
[0204] The motion vector difference length index value may be used to indicate one candidate length information within a set of candidate length information.
[0205] The set of candidate length information may include at least two pieces of candidate length information, or may include one piece of candidate length information.
[0206] One candidate length information may be used to indicate the length of one motion vector difference, and the candidate length information may be a length value or information used to derive a length value. The length may be expressed by using Euclidean distance, or may include the absolute value of component x and the absolute value of component y of the motion vector difference. Of course, the length may alternatively be expressed by using another norm, and this is not a limitation here.
[0207] Note that since the motion vectors are a two-dimensional array, the motion vector differences may be represented by using a two-dimensional array. If the motion vectors are a three-dimensional array, the motion vector differences may be represented by a three-dimensional array.
[0208] S703: Determine target length information from a set of candidate length information based on the length index value, where the set of candidate length information includes N candidate length information of only motion vector differences, where N is a positive integer greater than 1 and less than 8.
[0209] N may be 4. In some possible implementations, different length index values may indicate different lengths. For example, the candidate length information of the N motion vector differences includes at least one of the following: when the length index value is a first preset value, the length indicated by the target length information is 1 / 4 of the pixel length; when the length index value is a second preset value, the length indicated by the target length information is half the pixel length; when the length index value is a third preset value, the length indicated by the target length information is 1 pixel length; or when the length index value is a fourth preset value, the length indicated by the target length information is 2 pixel length. Note that the first to fourth preset values may not be sequential, are independent of each other, and are merely used to distinguish different preset values. Of course, the first to fourth preset values may alternatively be sequential or have a sequence attribute. In some possible implementations, the correspondence between the length index values and the MVD lengths may be shown in Table 4. [Table 4]
[0210] "Pel" is synonymous with "pixel." For example, 1 / 4 pel means 1 / 4 the length of a pixel. For a similar explanation, see the explanation in Table 2.
[0211] MmvdDistance represents a value for obtaining the length of the MVD. For example, the value of the length of the MVD can be obtained by shifting MmvdDistance to the right by 2 bits.
[0212] S704: Obtain the motion vector difference of the current image block according to the target length information.
[0213] The method may further include a step of obtaining a direction index value of a motion vector difference of the current image block, and a step of determining target direction information from M candidate direction information of the motion vector differences based on the direction index value, where M is a positive integer greater than 1.
[0214] The candidate direction information of the M motion vector differences may be M candidate direction information.
[0215] The motion vector difference direction index value may be used to indicate one candidate direction information among the M motion vector difference candidate direction information.
[0216] One candidate direction information may be used to indicate the direction of one motion vector difference. Specifically, the candidate direction information may be a sign indicating a plus or minus sign, and the sign may be the sign of component x of the motion vector difference, or the sign of component y of the motion vector difference, or the sign of component x and the sign of component y of the motion vector. Alternatively, the candidate direction information may be information used to derive the sign.
[0217] In a particular implementation process, obtaining a motion vector difference for the current image block based on the target length information may include determining a motion vector difference for the current image block based on the target direction information and the target length information.
[0218] S705: Determine a motion vector target value of the current image block based on the motion vector difference of the current image block and the motion vector predictor of the current image block.
[0219] In some possible implementations, the sum of the motion vector difference of the current image block and the motion vector predictor of the current image block may be used as the motion vector target value for the current image block.
[0220] S706: Obtain a predicted block of the current image block according to the motion vector target value of the current image block.
[0221] For details of inter prediction, please refer to the above description, and the details will not be described again here.
[0222] 8 is a schematic flowchart of an inter-prediction method according to an embodiment of the present invention. The method may be performed by source device 12, video coding system 40, encoder 20, video coding device 400, or coding device 500. Specifically, the method may be performed by prediction processing unit 260 in encoder 30 (or, for example, inter-prediction unit 244 in prediction processing unit 260). The method may include the following steps.
[0223] S801: Obtain a motion vector predictor for the current image block.
[0224] The process can be found in the previous description of AMVP mode, merge mode, MMVD mode, or skip mode, and will not be repeated in detail here.
[0225] S802: Perform a motion search in the region of the position indicated by the motion vector predictor of the current image block to obtain a motion vector target value of the current image block.
[0226] S803: Obtain a motion vector difference length index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block. The motion vector difference of the current image block is used to indicate the difference between the motion vector predictor and the motion vector target value of the current image block, and the motion vector difference length index value for the current image block is used to indicate one candidate length information item in a preset set of candidate length information items, where the set of candidate length information items includes N motion vector difference-only candidate length information items, where N is a positive integer greater than 1 and less than 8.
[0227] The step of obtaining a motion vector difference length index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block may include the steps of obtaining a motion vector difference for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, and determining a motion vector difference length index value and a motion vector difference direction index value for the current image block based on the motion vector difference of the current image block.
[0228] N may be 4.
[0229] Figure 8 describes an encoder-side method that corresponds to the decoder-side method described in Figure 7. For related descriptions, please refer to Figure 7 or the related descriptions above, and the details will not be repeated here.
[0230] 9 is a schematic flowchart of an inter-prediction method according to an embodiment of the present invention. The method may be performed by destination device 14, video coding system 40, decoder 30, video coding device 400, or coding device 500. The method may be specifically performed by video decoder 30, or specifically performed by entropy decoding unit 304 and prediction processing unit 360 (or, for example, inter-prediction unit 344 within prediction processing unit 360). The method may include the following steps.
[0231] S901: Obtain a motion vector predictor for the current image block.
[0232] In a specific implementation process, the step of obtaining a motion vector predictor for a current image block may include: constructing a candidate motion information list for the current image block, where the candidate motion information list includes L motion vectors, where L is 1, 3, 4, or 5; obtaining an index value of prediction information of the motion information of the current image block in the candidate motion information list, where the prediction information of the motion information of the current image block includes a motion vector predictor; and obtaining the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list. The candidate motion information list for the current image block may be a merge candidate motion information list. Correspondingly, the inter prediction method provided in this embodiment of the present invention may be applied to MMVD mode.
[0233] For the manner of obtaining a motion vector predictor by constructing a candidate motion information list for the current image block, please refer to the above description of modes such as AMVP mode, merge mode, MMVD mode or skip mode, and the details will not be described again here.
[0234] S902: Obtain an index value of the motion vector difference direction of the current image block. The motion vector difference of the current image block is used to indicate the difference between the motion vector predictor and the motion vector target value of the current image block.
[0235] The index value of the direction of the motion vector difference may be used to indicate one candidate direction information within a set of candidate direction information.
[0236] The set of candidate direction information may include at least two pieces of candidate direction information, or may include one piece of candidate direction information.
[0237] One candidate direction information may be used to indicate the direction of one motion vector difference. Specifically, the candidate direction information may be a sign indicating a plus or minus sign, and the sign may be the sign of component x of the motion vector difference, or the sign of component y of the motion vector difference, or the sign of component x and the sign of component y of the motion vector. Alternatively, the candidate direction information may be information used to derive the sign.
[0238] Note that since the motion vectors are a two-dimensional array, the motion vector differences may be represented by using a two-dimensional array. If the motion vectors are a three-dimensional array, the motion vector differences may be represented by a three-dimensional array.
[0239] S903: Determine target direction information from a set of candidate direction information based on a direction index value, where the set of candidate direction information includes candidate direction information of M motion vector differences, where M is a positive integer greater than 4.
[0240] M may be 8. In some possible implementations, different direction index values may indicate different directions. For example, the candidate direction information of the M motion vector differences may include at least one of: when the direction index value is a first preset value, the direction indicated by the target direction information is just right; when the direction index value is a second preset value, the direction indicated by the target direction information is just left; when the direction index value is a third preset value, the direction indicated by the target direction information is just down; when the direction index value is a fourth preset value, the direction indicated by the target direction information is just up; when the direction index value is a fifth preset value, the direction indicated by the target direction information is down-right; when the direction index value is a sixth preset value, the direction indicated by the target direction information is up-right; when the direction index value is a seventh preset value, the direction indicated by the target direction information is down-left; or when the direction index value is an eighth preset value, the direction indicated by the target direction information is up-left. It should be noted that the first to eighth preset values may not be sequential, are independent of each other, and are merely used to distinguish different preset values. Of course, the first to eighth preset values may alternatively be sequential or have a sequence attribute.
[0241] In some possible implementations, the correspondence between the direction index values and the MVD directions may be shown in Table 5, Table 6, or Table 7. [Table 5] [Table 6] [Table 7]
[0242] In Table 5, when the x-axis value is "+", it may indicate that the direction of the MVD is the positive direction of the x-axis. When the y-axis value is "+", it may indicate that the direction of the MVD is the positive direction of the y-axis. When the x-axis value is "-", it may indicate that the direction of the MVD is the negative direction of the x-axis. When the y-axis value is "-", it may indicate that the direction of the MVD is the negative direction of the y-axis. When the x-axis value is N / A, it may indicate that the direction of the MVD is independent of the direction of the x-axis. When the y-axis value is N / A, it may indicate that the direction of the MVD is independent of the direction of the y-axis. When both the x-axis value and the y-axis value are "+", it may indicate that the direction of the MVD whose projection is in the x-axis direction is positive, and the direction of the MVD whose projection is in the y-axis direction is also positive. When the x-axis value and the y-axis value are both "-", it may indicate that the direction of the MVD whose projection is in the x-axis direction is negative, and the direction of the MVD whose projection is in the y-axis direction is also negative. When the x-axis value is "+" and the y-axis value is "-", it may indicate that the direction of the MVD whose projection is in the x-axis direction is positive, and the direction of the MVD whose projection is in the y-axis direction is negative. When the x-axis value is "-" and the y-axis value is "+", it may indicate that the direction of the MVD whose projection is in the x-axis direction is negative, and the direction of the MVD whose projection is in the y-axis direction is positive. The positive direction of the x-axis may indicate the leftward direction, and the positive direction of the y-axis may indicate the downward direction.
[0243] In Table 6 or Table 7, the x-axis may represent the sign coefficient of component x of the MVD, where the product of the sign coefficient of component x of the MVD and the absolute value of component x is component x of the MVD. The y-axis may represent the sign coefficient of component y of the MVD, where the product of the sign coefficient of component y and the absolute value of component y is component y of the MVD.
[0244] S904: Obtain the motion vector difference of the current image block according to the target direction information.
[0245] The method may further include obtaining a motion vector difference length index value of the current image block, and determining target length information from N motion vector difference candidate length information based on the length index value, where N is a positive integer greater than 1.
[0246] The candidate length information of the N motion vector differences may be a set of candidate length information in the embodiment of Figure 7, specifically, a set of candidate length information provided in Table 4. For descriptions of the motion vector difference lengths, motion vector difference length index values, candidate length information, and motion vector differences, please refer to Figure 7 or the above description, and details will not be repeated here.
[0247] In a particular implementation process, obtaining a motion vector difference for the current image block based on the target direction information may include determining a motion vector difference for the current image block based on the target direction information and the target length information.
[0248] S905: Determine a motion vector target value of the current image block based on the motion vector difference of the current image block and the motion vector predictor of the current image block.
[0249] In some possible implementations, the sum of the motion vector difference of the current image block and the motion vector predictor of the current image block may be used as the motion vector target value for the current image block.
[0250] S906: Obtain a predicted block of the current image block according to the motion vector target value of the current image block.
[0251] For details of inter prediction, please refer to the above description, and the details will not be described again here.
[0252] 9, which are similar to those in FIG. 7 and the above description, please refer to FIG. 7 and the above description, and the details will not be described again here.
[0253] 10 is a schematic flowchart of an inter-prediction method according to an embodiment of the present invention. The method may be performed by source device 12, video coding system 40, encoder 20, video coding device 400, or coding device 500. Specifically, the method may be performed by prediction processing unit 260 in encoder 30 (or, for example, inter-prediction unit 244 in prediction processing unit 260). The method may include the following steps.
[0254] S1001: Obtain a motion vector predictor for the current image block.
[0255] The process can be found in the previous description of AMVP mode, merge mode, MMVD mode, or skip mode, and will not be repeated in detail here.
[0256] S1002: Perform a motion search in the region of the position indicated by the motion vector predictor of the current image block to obtain a motion vector target value for the current image block.
[0257] S1003: obtain a motion vector difference direction index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block. The motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the motion vector difference direction index value of the current image block is used to indicate one candidate direction information in a preset set of candidate direction information, where the set of candidate direction information includes M motion vector difference candidate length information, where M is a positive integer greater than 4.
[0258] The step of obtaining a motion vector difference direction index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block may include the steps of obtaining a motion vector difference for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, and determining a motion vector difference length index value and a motion vector difference direction index value for the current image block based on the motion vector difference of the current image block.
[0259] M may be 8.
[0260] Figure 10 describes an encoder-side method that corresponds to the decoder-side method described in Figure 9. For related descriptions, please refer to Figure 9 or the related descriptions above, and the details will not be repeated here.
[0261] 11 is a schematic flowchart of an inter-prediction method according to an embodiment of the present invention. The method may be performed by destination device 14, video coding system 40, decoder 30, video coding device 400, or coding device 500. The method may be specifically performed by video decoder 30, or specifically performed by entropy decoding unit 304 and prediction processing unit 360 (or, for example, inter-prediction unit 344 within prediction processing unit 360). The method may include the following steps.
[0262] S1101: Obtain a first motion vector predictor for a current image block and a second motion vector predictor for the current image block, where the first motion vector predictor corresponds to a first reference frame and the second motion vector predictor corresponds to a second reference frame.
[0263] S1102: Obtain a first motion vector difference of a current image block. The first motion vector difference of the current image block is used to indicate a difference between a first motion vector predictor and a first motion vector target value of the current image block, and the first motion vector target value and the first motion vector predictor correspond to the same reference frame.
[0264] S1103: Determine a second motion vector difference for the current image block based on the first motion vector difference. The second motion vector difference for the current image block is used to indicate a difference between a second motion vector predictor and a second motion vector target value for the current image block, where the second motion vector target value and the second motion vector predictor correspond to the same reference frame, and the second motion vector difference is the first motion vector difference if the direction of the first reference frame relative to the current frame in which the current image block is located is the same as the direction of the second reference frame relative to the current frame, or the plus or minus sign of the second motion vector difference is opposite to the plus or minus sign of the first motion vector difference, and the absolute value of the second motion vector difference is the same as the absolute value of the first motion vector difference if the direction of the first reference frame relative to the current frame in which the current image block is located is opposite to the direction of the second reference frame relative to the current frame.
[0265] S1104: Determine a first motion vector target value for the current image block based on the first motion vector difference and the first motion vector predictor.
[0266] The first motion vector target value may be the sum of the first motion vector difference and the first motion vector predictor.
[0267] S1105: Determine a second motion vector target value for the current image block based on the second motion vector difference and the second motion vector predictor.
[0268] The second motion vector target value may be the sum of the second motion vector difference and the second motion vector predictor.
[0269] S1106: Obtain a prediction block of the current image block according to the first motion vector target value and the second motion vector target value.
[0270] 11, which is similar to the above description, please refer to the above description, and the details will not be described again here.
[0271] Based on the same inventive concept as the above-described method, an embodiment of the present invention further provides an inter prediction apparatus 1200, as shown in FIG. 12 . The inter prediction apparatus 1200 may be the destination device 14, the video coding system 40, the decoder 30, the video coding device 400, or the coding device 500, or may be a component of the destination device 14, the video coding system 40, the decoder 30, the video coding device 400, or the coding device 500. Alternatively, the inter prediction apparatus 1200 may include the entropy decoding unit 304 and the prediction processing unit 360 (or, for example, the inter prediction unit 344 within the prediction processing unit 360). The inter prediction apparatus 1200 includes an acquisition unit 1201 and a prediction unit 1202. The acquisition unit 1201 and the prediction unit 1202 may be implemented using software. For example, the acquisition unit 1201 and the prediction unit 1202 may be software modules, or the acquisition unit 1201 and the prediction unit 1202 may be a processor and a memory that executes instructions. Alternatively, the acquisition unit 1201 and the prediction unit 1202 may be implemented by using hardware, for example, the acquisition unit 1201 and the prediction unit 1202 may be modules in a chip.
[0272] The prediction unit 1202 may be configured to obtain a motion vector predictor for the current image block.
[0273] The obtaining unit 1201 may be configured to obtain an index value of a motion vector difference length of a current image block. The motion vector difference of the current image block is used to indicate a difference between a motion vector predictor and a motion vector target value of the current image block.
[0274] In some possible implementations, the obtaining unit 1201 may include an entropy decoding unit 304 configured to obtain an index value of a length of a motion vector difference of a current image block or obtain an index value of a direction of a motion vector difference of a current image block. The prediction unit 1202 may include a prediction unit 360, and specifically may include an inter prediction unit 344.
[0275] The prediction unit 1202 may further be configured to: determine target length information from a set of candidate length information based on the length index value, where the set of candidate length information includes N motion vector difference-only candidate length information, where N is a positive integer greater than 1 and less than 8; obtain a motion vector difference for the current image block based on the target length information; determine a motion vector target value for the current image block based on the motion vector difference and the motion vector predictor of the current image block; and obtain a predicted block for the current image block based on the motion vector target value of the current image block.
[0276] The obtaining unit 1201 may be further configured to obtain a direction index value of the motion vector difference of the current image block. Correspondingly, the prediction unit 1202 may be further configured to determine target direction information from the M candidate direction information of the motion vector differences based on the direction index value, where M is a positive integer greater than 1. After the target direction information is obtained, the prediction unit 1202 may be configured to determine a motion vector difference of the current image block based on the target direction information and the target length information.
[0277] N may be, for example, 4. In some possible implementations, the candidate length information of the N motion vector differences may include at least one of: when the length index value is a first preset value, the length indicated by the target length information is 1 / 4 of a pixel length; when the length index value is a second preset value, the length indicated by the target length information is half of a pixel length; when the length index value is a third preset value, the length indicated by the target length information is 1 pixel length; or when the length index value is a fourth preset value, the length indicated by the target length information is 2 pixel length.
[0278] The prediction unit 1202 may be configured to: construct a candidate motion information list for a current image block, where the candidate motion information list may include L motion vectors, where L is 1, 3, 4, or 5; obtain an index value of prediction information for the motion information of the current image block in the candidate motion information list, where the prediction information for the motion information of the current image block includes a motion vector predictor; and obtain the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list.
[0279] Specifically, it can be understood that the functions of the units of the inter prediction device 1200 in this embodiment can be implemented according to the method in the above-mentioned inter prediction method embodiment. For the specific implementation process, please refer to the relevant description in the above-mentioned method embodiment. Details will not be described again here.
[0280] Based on the same inventive concept as the above-described method, an embodiment of the present invention further provides an inter prediction apparatus 1300, as shown in FIG. 13 . The inter prediction apparatus 1300 may be a source device 12, a video coding system 40, an encoder 20, a video coding device 400, or a coding device 500, or may be a component of the source device 12, the video coding system 40, the encoder 20, the video coding device 400, or the coding device 500. Alternatively, the inter prediction apparatus 1300 may include a prediction processing unit 260 (or, for example, an inter prediction unit 244 within the prediction processing unit 260). The inter prediction apparatus 1300 includes an acquisition unit 1301 and a prediction unit 1302. The acquisition unit 1301 and the prediction unit 1302 may be implemented using software. For example, the acquisition unit 1301 and the prediction unit 1302 may be software modules, or the acquisition unit 1301 and the prediction unit 1302 may be a processor and a memory that executes instructions. Alternatively, the acquisition unit 1301 and the prediction unit 1302 may be implemented by using hardware. For example, the acquisition unit 1301 and the prediction unit 1302 may be modules in a chip.
[0281] The obtaining unit 1301 may be configured to obtain a motion vector predictor of a current image block.
[0282] The prediction unit 1302 may be configured to perform a motion search in a region of a position indicated by the motion vector predictor of the current image block to obtain a motion vector target value for the current image block.
[0283] In some possible implementations, the acquisition unit 1301 and the prediction unit 1302 may be used as an implementation of the prediction processing unit 260.
[0284] The prediction unit 1302 may be further configured to obtain a motion vector difference length index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, where the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the motion vector difference length index value of the current image block is used to indicate one candidate length information among a predetermined set of candidate length information, where the set of candidate length information includes N motion vector difference-only candidate length information, where N is a positive integer greater than 1 and less than 8.
[0285] The prediction unit 1302 may be configured to obtain a motion vector difference for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, and to determine a motion vector difference length index value and a motion vector difference direction index value for the current image block based on the motion vector difference of the current image block.
[0286] N may be, for example, 4.
[0287] Specifically, it can be understood that the functions of the units of the inter prediction device 1300 in this embodiment can be implemented according to the methods in the above-mentioned method embodiments. For the specific implementation process, please refer to the relevant descriptions in the above-mentioned method embodiments. Details will not be described again here.
[0288] Based on the same inventive concept as the above-described method, an embodiment of the present invention further provides an inter prediction apparatus 1400, as shown in FIG. 14. The inter prediction apparatus 1400 may be the destination device 14, the video coding system 40, the decoder 30, the video coding device 400, or the coding device 500, or may be a component of the destination device 14, the video coding system 40, the decoder 30, the video coding device 400, or the coding device 500. Alternatively, the inter prediction apparatus 1400 may include the entropy decoding unit 304 and the prediction processing unit 360 (or, for example, the inter prediction unit 344 within the prediction processing unit 360). The inter prediction apparatus 1400 includes an acquisition unit 1401 and a prediction unit 1402. The acquisition unit 1401 and the prediction unit 1402 may be implemented using software. For example, the acquisition unit 1401 and the prediction unit 1402 may be software modules, or the acquisition unit 1401 and the prediction unit 1402 may be a processor and a memory that executes instructions. Alternatively, the acquisition unit 1401 and the prediction unit 1402 may be implemented by using hardware. For example, the acquisition unit 1401 and the prediction unit 1402 may be modules in a chip.
[0289] The prediction unit 1402 may be configured to obtain a motion vector predictor for the current image block.
[0290] The obtaining unit 1401 may be configured to obtain an index value of a motion vector difference direction of a current image block. The motion vector difference of the current image block is used to indicate a difference between a motion vector predictor and a motion vector target value of the current image block.
[0291] In some possible implementations, the obtaining unit 1401 may include an entropy decoding unit 304 configured to obtain an index value of a length of a motion vector difference of a current image block or obtain an index value of a direction of a motion vector difference of a current image block. The prediction unit 1402 may include a prediction unit 360, and specifically may include an inter prediction unit 344.
[0292] The prediction unit 1402 may further be configured to: determine target direction information from a set of candidate direction information based on the direction index value, where the set of candidate direction information includes candidate direction information of M motion vector differences, where M is a positive integer greater than 4; obtain a motion vector difference for a current image block based on the target direction information; determine a motion vector target value for the current image block based on the motion vector difference for the current image block and the motion vector predictor for the current image block; and obtain a predicted block for the current image block based on the motion vector target value for the current image block.
[0293] The obtaining unit 1401 may be further configured to obtain a motion vector difference length index value of the current image block. Correspondingly, the prediction unit 1402 may be further configured to determine target length information from N motion vector difference candidate length information based on the length index value, where N is a positive integer greater than 1. After the target length information is obtained, the prediction unit 1402 may be configured to determine a motion vector difference of the current image block based on the target direction information and the target length information.
[0294] M may be, for example, 8. In some possible implementations, the candidate direction information of the M motion vector differences may include at least one of: when the direction index value is a first preset value, the direction indicated by the target direction information is just right; when the direction index value is a second preset value, the direction indicated by the target direction information is just left; when the direction index value is a third preset value, the direction indicated by the target direction information is just down; when the direction index value is a fourth preset value, the direction indicated by the target direction information is just up; when the direction index value is a fifth preset value, the direction indicated by the target direction information is down-right; when the direction index value is a sixth preset value, the direction indicated by the target direction information is up-right; when the direction index value is a seventh preset value, the direction indicated by the target direction information is down-left; or when the direction index value is an eighth preset value, the direction indicated by the target direction information is up-left.
[0295] The prediction unit 1402 may be configured to: construct a candidate motion information list for a current image block, where the candidate motion information list may include L motion vectors, where L is 1, 3, 4, or 5; obtain an index value of prediction information for the motion information of the current image block in the candidate motion information list, where the prediction information for the motion information of the current image block includes a motion vector predictor; and obtain the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list.
[0296] Specifically, it can be understood that the functions of the units of the inter prediction device 1400 in this embodiment can be implemented according to the method in the above-mentioned inter prediction method embodiment. For the specific implementation process, please refer to the relevant description in the above-mentioned method embodiment. Details will not be described again here.
[0297] Based on the same inventive concept as the above-described method, an embodiment of the present invention further provides an inter prediction apparatus 1500, as shown in FIG. 15 . The inter prediction apparatus 1500 may be a source device 12, a video coding system 40, an encoder 20, a video coding device 400, or a coding device 500, or may be a component of the source device 12, the video coding system 40, the encoder 20, the video coding device 400, or the coding device 500. Alternatively, the inter prediction apparatus 1500 may include a prediction processing unit 260 (or, for example, an inter prediction unit 244 within the prediction processing unit 260). The inter prediction apparatus 1500 includes an acquisition unit 1501 and a prediction unit 1502. The acquisition unit 1501 and the prediction unit 1502 may be implemented using software. For example, the acquisition unit 1501 and the prediction unit 1502 may be software modules, or the acquisition unit 1501 and the prediction unit 1502 may be a processor and a memory that executes instructions. Alternatively, the acquisition unit 1501 and the prediction unit 1502 may be implemented by using hardware. For example, the acquisition unit 1501 and the prediction unit 1502 may be modules in a chip.
[0298] The obtaining unit 1501 may be configured to obtain a motion vector predictor of a current image block.
[0299] The prediction unit 1502 may be configured to perform a motion search in a region of a position indicated by the motion vector predictor of the current image block to obtain a motion vector target value for the current image block.
[0300] In some possible implementations, the acquisition unit 1501 and the prediction unit 1502 may be used as an implementation of the prediction processing unit 260.
[0301] The prediction unit 1502 may be further configured to obtain, based on the motion vector target value of the current image block and the motion vector predictor of the current image block, an index value of a motion vector difference direction of the current image block, where the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the index value of the motion vector difference direction of the current image block is used to indicate one candidate direction information among a predetermined set of candidate direction information, where the set of candidate direction information includes M motion vector difference candidate length information, where M is a positive integer greater than 4.
[0302] The prediction unit 1502 may be configured to obtain a motion vector difference for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, and to determine a motion vector difference length index value and a motion vector difference direction index value for the current image block based on the motion vector difference of the current image block.
[0303] M may be, for example, 8.
[0304] Specifically, it can be understood that the functions of the units of the inter prediction device 1500 in this embodiment can be implemented according to the methods in the above-mentioned method embodiments. For the specific implementation process, please refer to the relevant descriptions in the above-mentioned method embodiments. Details will not be described again here.
[0305] Based on the same inventive concept as the above-described method, an embodiment of the present invention further provides an inter prediction apparatus 1600, as shown in FIG. 16 . The inter prediction apparatus 1600 may be the destination device 14, the video coding system 40, the decoder 30, the video coding device 400, or the coding device 500, or may be a component of the destination device 14, the video coding system 40, the decoder 30, the video coding device 400, or the coding device 500. Alternatively, the inter prediction apparatus 1600 may include the entropy decoding unit 304 and the prediction processing unit 360 (or, for example, the inter prediction unit 344 within the prediction processing unit 360). The inter prediction apparatus 1600 includes an acquisition unit 1601 and a prediction unit 1602. The acquisition unit 1601 and the prediction unit 1602 may be implemented using software. For example, the acquisition unit 1601 and the prediction unit 1602 may be software modules, or the acquisition unit 1601 and the prediction unit 1602 may be a processor and a memory that executes instructions. Alternatively, the acquisition unit 1601 and the prediction unit 1602 may be implemented by using hardware. For example, the acquisition unit 1601 and the prediction unit 1602 may be modules in a chip.
[0306] The obtaining unit 1601 may be configured to obtain a first motion vector predictor for a current image block and a second motion vector predictor for the current image block, where the first motion vector predictor corresponds to a first reference frame and the second motion vector predictor corresponds to a second reference frame.
[0307] The obtaining unit 1601 may be further configured to obtain a first motion vector difference of a current image block, where the first motion vector difference of the current image block is used to indicate a difference between a first motion vector predictor and a first motion vector target value of the current image block, and the first motion vector target value and the first motion vector predictor correspond to the same reference frame.
[0308] The prediction unit 1602 is for determining a second motion vector difference of a current image block based on the first motion vector difference, wherein the second motion vector difference of the current image block is used to indicate a difference between a second motion vector predictor and a second motion vector target value of the current image block, and the second motion vector target value and the second motion vector predictor correspond to the same reference frame, and the second motion vector difference is determined to be the first motion vector difference if the direction of the first reference frame relative to the current frame in which the current image block is located is the same as the direction of the second reference frame relative to the current frame, or the direction of the first reference frame relative to the current frame in which the current image block is located is the same as the direction of the second reference frame relative to the current frame. The image processing unit may be configured to: determine, when a direction of the second reference frame relative to the current image block is opposite to that of the second reference frame relative to the current image block, whether the plus or minus sign of the second motion vector difference is opposite to that of the first motion vector difference and whether the absolute value of the second motion vector difference is the same as that of the first motion vector difference; determine, based on the first motion vector difference and the first motion vector predictor, a first motion vector target value for the current image block; determine, based on the second motion vector difference and the second motion vector predictor, a second motion vector target value for the current image block; and obtain, based on the first motion vector target value and the second motion vector target value, a predicted block for the current image block.
[0309] In some possible implementations, the acquisition unit 1601 and the prediction unit 1602 may be used as an implementation of the prediction processing unit 360.
[0310] Specifically, it can be understood that the functions of the units of the inter prediction device 1600 in this embodiment can be implemented according to the method in the above-mentioned inter prediction method embodiment. For the specific implementation process, please refer to the relevant description in the above-mentioned method embodiment. Details will not be described again here.
[0311] Those skilled in the art will understand that the functionality described in connection with the various exemplary logical blocks, modules, and algorithm steps disclosed and described herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality described in connection with these exemplary logical blocks, modules, and steps can be stored on or transmitted over a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which correspond to tangible media such as data storage media, or communication media, which include any medium that facilitates transfer of a computer program from one place to another (e.g., according to a communication protocol). Thus, computer-readable media can generally correspond to (1) non-transitory tangible computer-readable storage media or (2) communication media, such as a signal or carrier. Data storage media can be any available medium accessible by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementing the techniques described herein. A computer program product can include computer-readable media.
[0312] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other compact disk storage, magnetic disk storage, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. In addition, any connection is strictly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or another remote source via coaxial cable, fiber optic, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included within the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals, or other transitory media, but actually refer to non-transitory tangible storage media. As used herein, disk and disc include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), and Blu-ray discs. A disk typically reproduces data magnetically, and a disc typically reproduces data optically with a laser. Combinations of the above should also be included within the scope of computer-readable media.
[0313] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term "processor," as used herein, may refer to any one of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described with reference to the exemplary logic blocks, modules, and stages described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. Additionally, these techniques may be implemented entirely in one or more circuits or logic elements.
[0314] The techniques of the present application may be implemented in a variety of apparatuses or devices, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described herein to emphasize functional aspects of apparatuses configured to perform the disclosed techniques, but these are not necessarily implemented by different hardware units. In practice, as noted above, the various units may be combined into a codec hardware unit along with appropriate software and / or firmware, or may be provided by interoperable hardware units (including one or more processors as described above).
[0315] In the above-mentioned embodiments, the description of each embodiment has a focus, and for the parts not described in detail in one embodiment, please refer to the related descriptions in other embodiments.
[0316] The above description is merely a specific implementation of the present application and is not intended to limit the scope of protection of the present application. Any variations or replacements that can be easily conceived by those skilled in the art within the technical scope disclosed in the present application shall be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. [Other possible items] (Item 1) 1. A method for inter prediction, comprising: obtaining a motion vector predictor for the current image block; obtaining a motion vector difference length index value for the current image block, the motion vector difference of the current image block being used to indicate a difference between the motion vector predictor and a motion vector target value of the current image block; determining target length information from a set of candidate length information based on the index value of the length, the set of candidate length information including N candidate length information of only motion vector differences, where N is a positive integer greater than 1 and less than 8; obtaining the motion vector difference of the current image block based on the target length information; determining the motion vector target value for the current image block based on the motion vector difference for the current image block and the motion vector predictor for the current image block; obtaining a predicted block of the current image block based on the motion vector target value of the current image block; A method for providing the above. (Item 2) The above method is obtaining an index value of the direction of the motion vector difference of the current image block; determining target direction information from candidate direction information of M motion vector differences based on the index value of the direction, where M is a positive integer greater than 1; Further provided with The step of obtaining the motion vector difference of the current image block based on the target length information comprises: determining the motion vector difference of the current image block based on the target direction information and the target length information; having The method according to item 1. (Item 3) 3. The method of claim 1 or 2, wherein N is 4. (Item 4) The candidate length information of the N motion vector differences is When the index value of the length is a first preset value, the length indicated by the target length information is 1 / 4 of a pixel length; When the index value of the length is a second preset value, the length indicated by the target length information is half of a pixel length; When the index value of the length is a third preset value, the length indicated by the target length information is one pixel long; or When the index value of the length is a fourth preset value, the length indicated by the target length information is 2 pixels long. Item 4. The method according to item 3, comprising at least one of the following: (Item 5) The step of obtaining a motion vector predictor for the current image block comprises: constructing a candidate motion information list for the current image block, the candidate motion information list including L motion vectors, where L is 1, 3, 4, or 5; obtaining an index value of prediction information of motion information of the current image block in the candidate motion information list, where the prediction information of the motion information of the current image block includes the motion vector predictor; obtaining the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list; 5. The method according to any one of items 1 to 4, comprising: (Item 6) 1. A method for inter prediction, comprising: obtaining a motion vector predictor for the current image block; performing a motion search in a region of the current image block at a position indicated by the motion vector predictor to obtain a motion vector target value for the current image block; obtaining an index value of a motion vector difference length of the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, wherein the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the index value of the length of the motion vector difference of the current image block is used to indicate one candidate length information item within a preset set of candidate length information items, where the set of candidate length information items includes N motion vector difference-only candidate length information items, where N is a positive integer greater than 1 and less than 8; A method for providing the above. (Item 7) The step of obtaining a motion vector difference length index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block comprises: obtaining the motion vector difference of the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block; determining, based on the motion vector difference of the current image block, the index value of the length of the motion vector difference of the current image block and the index value of the direction of the motion vector difference of the current image block; having The method according to item 6. (Item 8) 8. The method of claim 6 or 7, wherein N is 4. (Item 9) 1. A method for inter prediction, comprising: obtaining a motion vector predictor for the current image block; obtaining an index value of a motion vector difference direction of the current image block, the motion vector difference of the current image block being used to indicate a difference between the motion vector predictor and a motion vector target value of the current image block; determining target direction information from a set of candidate direction information based on the index value of the direction, the set of candidate direction information including candidate direction information of M motion vector differences, where M is a positive integer greater than 4; obtaining the motion vector difference of the current image block based on the target direction information; determining the motion vector target value for the current image block based on the motion vector difference for the current image block and the motion vector predictor for the current image block; obtaining a predicted block of the current image block based on the motion vector target value of the current image block; A method for providing the above. (Item 10) The above method is obtaining an index value of the length of the motion vector difference of the current image block; determining target length information from N candidate length information of motion vector differences based on the index value of the length, where N is a positive integer greater than 1; Further provided with The step of obtaining the motion vector difference of the current image block based on the target direction information comprises: determining the motion vector difference of the current image block based on the target direction information and the target length information; having Item 9. The method according to item 9. (Item 11) 11. The method of claim 9 or 10, wherein M is 8. (Item 12) The candidate direction information of the M motion vector differences is When the index value of the direction is a first preset value, the direction indicated by the target direction information is just right; When the index value of the direction is a second preset value, the direction indicated by the target direction information is just left; When the index value of the direction is a third preset value, the direction indicated by the target direction information is just downward; When the index value of the direction is a fourth preset value, the direction indicated by the target direction information is just up; When the index value of the direction is a fifth preset value, the direction indicated by the target direction information is bottom right; When the index value of the direction is a sixth preset value, the direction indicated by the target direction information is upper right; When the index value of the direction is a seventh preset value, the direction indicated by the target direction information is lower left; or When the index value of the direction is an eighth preset value, the direction indicated by the target direction information is upper left. Item 12. The method according to item 11, comprising at least one of: (Item 13) The step of obtaining a motion vector predictor for the current image block comprises: constructing a candidate motion information list for the current image block, the candidate motion information list including L motion vectors, where L is 1, 3, 4, or 5; obtaining an index value of prediction information of motion information of the current image block in the candidate motion information list, where the prediction information of the motion information of the current image block includes the motion vector predictor; obtaining the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list; 13. The method according to any one of items 9 to 12, comprising: (Item 14) 1. A method for inter prediction, comprising: obtaining a motion vector predictor for the current image block; performing a motion search in a region of the current image block at a position indicated by the motion vector predictor to obtain a motion vector target value for the current image block; obtaining an index value of a direction of a motion vector difference of the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block, wherein the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the index value of the direction of the motion vector difference of the current image block is used to indicate one candidate direction information among a preset set of candidate direction information, the set of candidate direction information including M motion vector difference candidate length information, where M is a positive integer greater than 4; A method for providing the above. (Item 15) The step of obtaining a motion vector difference length index value for the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block comprises: obtaining the motion vector difference of the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block; determining, based on the motion vector difference of the current image block, the index value of the length of the motion vector difference of the current image block and the index value of the direction of the motion vector difference of the current image block; having Item 15. The method according to item 14. (Item 16) 16. The method of claim 14 or 15, wherein M is 8. (Item 17) 1. A method for inter prediction, comprising: obtaining a first motion vector predictor for a current image block and a second motion vector predictor for the current image block, the first motion vector predictor corresponding to a first reference frame and the second motion vector predictor corresponding to a second reference frame; obtaining a first motion vector difference for the current image block, the first motion vector difference for the current image block being used to indicate a difference between the first motion vector predictor and a first motion vector target value for the current image block, the first motion vector target value and the first motion vector predictor corresponding to the same reference frame; determining a second motion vector difference of the current image block based on the first motion vector difference, wherein the second motion vector difference of the current image block is used to indicate a difference between the second motion vector predictor and a second motion vector target value of the current image block, the second motion vector target value and the second motion vector predictor correspond to the same reference frame, and the second motion vector difference is the first motion vector difference if the direction of the first reference frame relative to the current frame in which the current image block is located is the same as the direction of the second reference frame relative to the current frame, or the plus or minus sign of the second motion vector difference is opposite to the plus or minus sign of the first motion vector difference and the absolute value of the second motion vector difference is the same as the absolute value of the first motion vector difference if the direction of the first reference frame relative to the current frame in which the current image block is located is opposite to the direction of the second reference frame relative to the current frame; determining the first motion vector target value for the current image block based on the first motion vector difference and the first motion vector predictor; determining the second motion vector target value for the current image block based on the second motion vector difference and the second motion vector predictor; obtaining a predicted block of the current image block based on the first motion vector target value and the second motion vector target value; A method for providing the above. (Item 18) An apparatus for inter prediction, the apparatus comprising: a prediction unit configured to obtain a motion vector predictor for a current image block; an acquisition unit configured to acquire a motion vector difference length index value of the current image block, wherein the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and a motion vector target value of the current image block; Equipped with The prediction unit further comprises: determining target length information from a set of candidate length information based on the index value of the length, the set of candidate length information including N motion vector difference-only candidate length information, where N is a positive integer greater than 1 and less than 8; obtaining the motion vector difference of the current image block based on the target length information; determining the motion vector target value for the current image block based on the motion vector difference for the current image block and the motion vector predictor for the current image block; obtaining a predicted block of the current image block according to the motion vector target value of the current image block; configured to: Device. (Item 19) The obtaining unit is further configured to obtain an index value of the direction of the motion vector difference of the current image block; the prediction unit is further configured to determine target direction information from candidate direction information of M motion vector differences based on the index value of the direction, where M is a positive integer greater than 1; the prediction unit is configured to determine the motion vector difference of the current image block based on the target direction information and the target length information. Item 19. The device according to item 18. (Item 20) 20. The apparatus of item 18 or 19, wherein N is 4. (Item 21) The candidate length information of the N motion vector differences is When the index value of the length is a first preset value, the length indicated by the target length information is 1 / 4 of a pixel length; When the index value of the length is a second preset value, the length indicated by the target length information is half of a pixel length; When the index value of the length is a third preset value, the length indicated by the target length information is one pixel long; or When the index value of the length is a fourth preset value, the length indicated by the target length information is 2 pixels long. 21. The device according to item 20, comprising at least one of: (Item 22) The prediction unit is constructing a candidate motion information list for the current image block, where the candidate motion information list includes L motion vectors, where L is 1, 3, 4, or 5; Obtaining an index value of prediction information of motion information of the current image block in the candidate motion information list, where the prediction information of the motion information of the current image block includes the motion vector predictor; obtaining the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list; 22. The apparatus of any one of items 18 to 21, configured to perform (Item 23) An apparatus for inter prediction, the apparatus comprising: an obtaining unit configured to obtain a motion vector predictor for a current image block; a prediction unit configured to perform a motion search in a region of the current image block at a position indicated by the motion vector predictor to obtain a motion vector target value for the current image block; Equipped with The prediction unit is further configured to obtain, based on the motion vector target value of the current image block and the motion vector predictor of the current image block, an index value of a motion vector difference length of the current image block, wherein the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the index value of the length of the motion vector difference of the current image block is used to indicate one candidate length information item in a predetermined set of candidate length information items, where the set of candidate length information items includes N motion vector difference-only candidate length information items, where N is a positive integer greater than 1 and less than 8. Device. (Item 24) The prediction unit is Obtaining the motion vector difference of the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block; and determining an index value for the length of the motion vector difference of the current image block and an index value for the direction of the motion vector difference of the current image block based on the motion vector difference of the current image block; Item 24. The device according to item 23, configured as follows: (Item 25) 25. The apparatus of item 23 or 24, wherein N is 4. (Item 26) An apparatus for inter prediction, the apparatus comprising: a prediction unit configured to obtain a motion vector predictor for a current image block; an acquisition unit configured to acquire an index value of a direction of a motion vector difference of the current image block, the motion vector difference of the current image block being used to indicate a difference between the motion vector predictor and a motion vector target value of the current image block; Equipped with The prediction unit is further configured to: determine target direction information from a set of candidate direction information based on the index value of the direction, where the set of candidate direction information includes candidate direction information of M motion vector differences, where M is a positive integer greater than 4; obtain the motion vector difference of the current image block based on the target direction information; determine the motion vector target value of the current image block based on the motion vector difference of the current image block and the motion vector predictor of the current image block; and obtain a predicted block of the current image block based on the motion vector target value of the current image block. Device. (Item 27) The obtaining unit is further configured to obtain an index value of the length of the motion vector difference of the current image block; The prediction unit is further configured to determine target length information from N candidate length information of motion vector differences based on the index value of the length, where N is a positive integer greater than 1; The prediction unit is determining the motion vector difference of the current image block based on the target direction information and the target length information; It is configured as follows: Item 27. The device according to item 26. (Item 28) 28. The device of item 26 or 27, wherein M is 8. (Item 29) The candidate direction information of the M motion vector differences is When the index value of the direction is a first preset value, the direction indicated by the target direction information is just right; When the index value of the direction is a second preset value, the direction indicated by the target direction information is just left; When the index value of the direction is a third preset value, the direction indicated by the target direction information is just downward; When the index value of the direction is a fourth preset value, the direction indicated by the target direction information is just up; When the index value of the direction is a fifth preset value, the direction indicated by the target direction information is bottom right; When the index value of the direction is a sixth preset value, the direction indicated by the target direction information is upper right; When the index value of the direction is a seventh preset value, the direction indicated by the target direction information is lower left; or When the index value of the direction is an eighth preset value, the direction indicated by the target direction information is upper left. Item 29. The device according to item 28, comprising at least one of: (Item 30) The prediction unit is constructing a candidate motion information list for the current image block, where the candidate motion information list includes L motion vectors, where L is 1, 3, 4, or 5; Obtaining an index value of prediction information of motion information of the current image block in the candidate motion information list, where the prediction information of the motion information of the current image block includes the motion vector predictor; obtaining the motion vector predictor based on the candidate motion information list and the index value of the motion information of the current image block in the candidate motion information list; 30. The apparatus of any one of items 26 to 29, configured to perform (Item 31) An apparatus for inter prediction, the apparatus comprising: an obtaining unit configured to obtain a motion vector predictor for a current image block; a prediction unit configured to perform a motion search in a region of the current image block at a position indicated by the motion vector predictor to obtain a motion vector target value for the current image block; Equipped with The prediction unit is further configured to obtain, based on the motion vector target value of the current image block and the motion vector predictor of the current image block, an index value of a motion vector difference direction of the current image block, wherein the motion vector difference of the current image block is used to indicate a difference between the motion vector predictor and the motion vector target value of the current image block, and the index value of the motion vector difference direction of the current image block is used to indicate one candidate direction information among a predetermined set of candidate direction information, wherein the set of candidate direction information includes M motion vector difference candidate length information, where M is a positive integer greater than 4. Device. (Item 32) The prediction unit is Obtaining the motion vector difference of the current image block based on the motion vector target value of the current image block and the motion vector predictor of the current image block; and determining an index value for the length of the motion vector difference of the current image block and an index value for the direction of the motion vector difference of the current image block based on the motion vector difference of the current image block; Item 32. The device according to item 31, configured as follows: (Item 33) 33. The device of item 31 or 32, wherein M is 8. (Item 34) An apparatus for inter prediction, comprising: an acquisition unit; and a prediction unit, the obtaining unit is configured to obtain a first motion vector predictor for a current image block and a second motion vector predictor for the current image block, where the first motion vector predictor corresponds to a first reference frame and the second motion vector predictor corresponds to a second reference frame; The acquisition unit is further configured to acquire a first motion vector difference of the current image block, where the first motion vector difference of the current image block is used to indicate a difference between the first motion vector predictor and a first motion vector target value of the current image block, and the first motion vector target value and the first motion vector predictor correspond to the same reference frame; The prediction unit determines a second motion vector difference of the current image block based on the first motion vector difference, where the second motion vector difference of the current image block is used to indicate a difference between the second motion vector predictor and a second motion vector target value of the current image block, the second motion vector target value and the second motion vector predictor correspond to a same reference frame, and when an orientation of the first reference frame relative to the current frame in which the current image block is located is the same as an orientation of the second reference frame relative to the current frame, the second motion vector difference is the first motion vector difference or the orientation of the first reference frame relative to the current frame in which the current image block is located is the same as an orientation of the second reference frame relative to the current frame. determining, when the direction of the second reference frame relative to the current image block is opposite to the direction of the second reference frame relative to the current image block, a plus or minus sign of the second motion vector difference is opposite to a plus or minus sign of the first motion vector difference and an absolute value of the second motion vector difference is the same as an absolute value of the first motion vector difference; determining the first motion vector target value for the current image block based on the first motion vector difference and the first motion vector predictor; determining the second motion vector target value for the current image block based on the second motion vector difference and the second motion vector predictor; and obtaining a predictive block for the current image block based on the first motion vector target value and the second motion vector target value. Device. (Item 35) 1. A video decoder configured to decode a bitstream to obtain an image block, comprising: 23. An inter prediction device according to any one of items 18 to 22, configured to obtain a prediction block of a current image block; a reconstruction module configured to reconstruct the current image block based on the predicted block; A video decoder comprising: (Item 36) 1. A video encoder configured to encode an image block, comprising: 26. The inter prediction device according to any one of items 23 to 25, wherein the inter prediction device is configured to obtain an index value of a length of a motion vector difference of a current image block based on a motion vector predictor of the current image block, and the index value of the length of the motion vector difference of the current image block is used to indicate one candidate length information among a set of predetermined candidate length information; an entropy encoding module configured to encode the index value of the length of the motion vector difference of the current image block into a bitstream; A video encoder comprising: (Item 37) 1. A video decoder configured to decode a bitstream to obtain an image block, comprising: 31. An inter prediction device according to any one of items 26 to 30, configured to obtain a prediction block of a current image block; a reconstruction module configured to reconstruct the current image block based on the predicted block; A video decoder comprising: (Item 38) 1. A video encoder configured to encode an image block, comprising: 34. An inter prediction device according to any one of items 31 to 33, wherein the inter prediction device is configured to obtain an index value of a direction of a motion vector difference of a current image block based on a motion vector predictor of the current image block, and the index value of the direction of the motion vector difference of the current image block is used to indicate one candidate direction information among a set of predetermined candidate direction information; an entropy encoding module configured to encode the index value of the direction of the motion vector difference of the current image block into a bitstream; A video encoder comprising: (Item 39) A video coding device comprising a non-volatile memory and a processor coupled to each other, wherein the processor invokes program code stored in the memory to execute the method described in any one of items 1 to 17.
Claims
1. 1. An encoding method performed by an encoder, said method comprising: obtaining a first motion vector predictor for a current image block and a second motion vector predictor for the current image block, the first motion vector predictor corresponding to a first reference frame and the second motion vector predictor corresponding to a second reference frame; obtaining a first motion vector difference for the current image block, wherein the first motion vector difference for the current image block indicates a difference between the first motion vector predictor and a first motion vector target value for the current image block, the first motion vector target value and the first motion vector predictor correspond to a same reference frame, the first motion vector difference is used to determine a second motion vector difference for the current image block, the second motion vector difference indicates a difference between the second motion vector predictor and a second motion vector target value for the current image block, the second motion vector target value and the second motion vector predictor correspond to the same reference frame, and the second motion vector difference is the first motion vector difference if an orientation of the first reference frame relative to a current frame in which the current image block is located is the same as an orientation of the second reference frame relative to the current frame; obtaining an index value of a length of the first motion vector difference and an index value of a direction of the first motion vector difference; encoding the index value of the length of the first motion vector difference and the index value of the direction of the first motion vector difference into a bitstream; A method comprising:
2. The method of claim 1 , wherein the index value of the length of the first motion vector difference of the current image block is used to indicate one candidate length information among a preset set of candidate length information.
3. The method of claim 1 , wherein the index value of the direction of the first motion vector difference of the current image block is used to indicate one candidate direction information among a preset set of candidate direction information.
4. A decoding method performed by a decoder, said method comprising: obtaining an index value of a length of a first motion vector difference of a current image block and an index value of a direction of the first motion vector difference by analyzing the bitstream; obtaining a first motion vector predictor for the current image block and a second motion vector predictor for the current image block, the first motion vector predictor corresponding to a first reference frame and the second motion vector predictor corresponding to a second reference frame; obtaining the first motion vector difference according to the index value of the length of the first motion vector difference and the index value of the direction of the first motion vector difference, wherein the first motion vector difference of the current image block indicates a difference between the first motion vector predictor and a first motion vector target value of the current image block, and the first motion vector target value and the first motion vector predictor correspond to the same reference frame; determining a second motion vector difference of the current image block based on the first motion vector difference, wherein the second motion vector difference of the current image block indicates a difference between the second motion vector predictor and a second motion vector target value of the current image block, the second motion vector target value and the second motion vector predictor correspond to the same reference frame, and the second motion vector difference is the first motion vector difference if an orientation of the first reference frame with respect to a current frame in which the current image block is located is the same as an orientation of the second reference frame with respect to the current frame; determining the first motion vector target value for the current image block based on the first motion vector difference and the first motion vector predictor; determining the second motion vector target value for the current image block based on the second motion vector difference and the second motion vector predictor; obtaining a prediction block of the current image block based on the first motion vector target value and the second motion vector target value; A method comprising:
5. The method of claim 4 , wherein the index value of the length of the first motion vector difference of the current image block is used to indicate one candidate length information among a preset set of candidate length information.
6. The method of claim 4 , wherein the index value of the direction of the first motion vector difference of the current image block is used to indicate one candidate direction information among a preset set of candidate direction information.
7. at least one processor; a memory coupled to said at least one processor and storing instructions that, when executed by said at least one processor, cause said at least one processor to perform the method of any one of claims 1 to 3; An encoding device comprising:
8. at least one processor; a memory coupled to said at least one processor and storing instructions that, when executed by said at least one processor, cause said at least one processor to perform the method of any one of claims 4 to 6; A decoding device comprising:
9. A computer program product which, when executed on a computer or a processor, enables said computer or said processor to carry out the method according to any one of claims 1 to 6.
10. 1. A method for storing an encoded bitstream of video data, said method comprising: receiving the bitstream, the bitstream having a length index value of a first motion vector difference and a direction index value of the first motion vector difference of a current image block, the length index value of the first motion vector difference and the direction index value of the first motion vector difference being used to determine the first motion vector difference, the first motion vector difference indicating a difference between a first motion vector predictor and a first motion vector target value of the current image block, the first motion vector target value and the first motion vector predictor corresponding to the same reference frame, and the first motion vector difference being used to determine the first motion vector difference of the current image block; and receiving a second motion vector difference for the current image block, the second motion vector difference indicating a difference between a second motion vector predictor and a second motion vector target value for the current image block, the second motion vector difference indicating a difference between a second motion vector predictor and a second motion vector target value for the current image block, the second motion vector predictor corresponding to a same reference frame, the first motion vector predictor corresponding to a first reference frame, the second motion vector predictor corresponding to a second reference frame, and the second motion vector difference being the first motion vector difference if an orientation of the first reference frame relative to a current frame in which the current image block is located is the same as an orientation of the second reference frame relative to the current frame; storing the bitstream on a storage medium; A method comprising:
11. 1. A method for transmitting an encoded bitstream of video data, said method comprising: obtaining the bitstream, the bitstream having a length index value of a first motion vector difference and a direction index value of the first motion vector difference of a current image block, the length index value of the first motion vector difference and the direction index value of the first motion vector difference being used to determine the first motion vector difference, the first motion vector difference indicating a difference between a first motion vector predictor and a first motion vector target value of the current image block, the first motion vector target value and the first motion vector predictor corresponding to the same reference frame, and the first motion vector difference being a difference between the first motion vector predictor and a first motion vector target value of the current image block; and determining a second motion vector difference for the current image block, the second motion vector difference indicating a difference between a second motion vector predictor and a second motion vector target value for the current image block, the second motion vector difference indicating a difference between a second motion vector predictor and a second motion vector target value for the current image block, the second motion vector predictor corresponding to a same reference frame, the first motion vector predictor corresponding to a first reference frame, the second motion vector predictor corresponding to a second reference frame, and the second motion vector difference being the first motion vector difference if an orientation of the first reference frame relative to a current frame in which the current image block is located is the same as an orientation of the second reference frame relative to the current frame; transmitting the bitstream; A method comprising:
Citation Information
Patent Citations
Video encoding device and video decoding device using high-precision skip encoding and method thereof
US20170339425A1
Method for encoding and decoding motion information and device for encoding and decoding motion information
WO2019054736A1
Systems and methods for performing motion vector prediction for video coding using motion vector predictor origins
WO2019151093A1
Encoding method and device thereof, and decoding method and device thereof
WO2019168244A1
Coding device, decoding device, coding method, and decoding method
WO2020017367A1