Bidirectional inter prediction method and apparatus

By deriving reference picture indices and motion vectors based on picture order count relationships, the method addresses the resource and efficiency challenges of bidirectional inter-prediction in video coding, improving transmission efficiency and coding compression.

JP7797439B2Active Publication Date: 2026-01-13HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023076778
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-09-20
Filing Date
2023-05-08
Publication Date
2026-01-13
Estimated Expiration
2039-09-04

AI Technical Summary

Technical Problem

In video coding techniques, bidirectional inter-prediction requires transmitting motion information for each picture block in both directions, leading to a significant consumption of transmission resources and reduced coding compression efficiency.

Method used

A method and apparatus for determining reference picture indices and motion vectors without transmitting them in the bitstream, by deriving these values based on specific conditions and relationships between picture order counts, thereby reducing the need to transmit motion information.

Benefits of technology

This approach conserves transmission resources and enhances coding compression efficiency by minimizing the amount of motion information sent in the bitstream.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007797439000012
    Figure 0007797439000012
  • Figure 0007797439000013
    Figure 0007797439000013
  • Figure 0007797439000014
    Figure 0007797439000014
Patent Text Reader

Abstract

To provide a bi-directional inter prediction method and apparatus for reducing transmission resources and improving coding compression efficiency to some extent, a video encoding device, and a video decoding device.SOLUTION: A method includes the steps of: acquiring a first identifier having a first preset value; determining a reference picture index of a first reference picture list, as a first reference picture index that corresponds to the current block and that is of the first reference picture list; determining a reference picture index of a second reference picture list as a second reference picture index that corresponds to the current block and that is of the second reference picture list; and predicting the current block based on the first reference picture index and the second reference picture index.SELECTED DRAWING: Figure 5A
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] TECHNICAL FIELD Embodiments of the present application relate to the field of video picture coding technology, and in particular to bidirectional inter prediction and apparatus. [Background technology]

[0002] In video coding techniques, the predictive picture block of a current block may be generated based on only one reference picture block (called unidirectional inter-prediction), or the predictive picture block of a current block may be generated based on at least two reference picture blocks (called bidirectional inter-prediction), where the at least two reference picture blocks may be from the same reference picture (frame) or different reference pictures.

[0003] To enable the decoder and encoder to use the same reference picture block, the encoder needs to send motion information of each picture block to the decoder through a bitstream. Typically, the motion information of the current block includes a reference picture index value, a motion vector predictor (MVP) flag, and a motion vector difference (MVD). The decoder can find the correct reference picture block in the selected reference picture based on the reference picture index value, the MVP flag, and the MVD.

[0004] Correspondingly, in bidirectional inter-prediction, the encoder needs to transmit motion information of each picture block in each direction to the decoder, which results in the motion information occupying a relatively large amount of transmission resources, which reduces the effective utilization of transmission resources, transmission rate, and coding compression efficiency. Summary of the Invention [Means for solving the problem]

[0005] Embodiments of the present application provide a bidirectional inter-prediction method and apparatus, a video encoding device, and a video decoding device, for determining a reference picture index of a picture block according to a derivation method during encoding or decoding without transmitting the reference picture index of the picture block in a bitstream, thereby saving transmission resources and improving coding compression efficiency to a certain extent.

[0006] To achieve the aforementioned objectives, the following technical solutions are used in the embodiments of this application.

[0007] According to a first aspect, the present invention provides a bidirectional inter prediction method, the method comprising: determining a reference picture index i1 of a first reference picture list as a first reference picture index of the first reference picture list corresponding to the current block, wherein a picture order count POC corresponding to the reference picture index i1 is smaller than a POC of the current picture, and a difference obtained by subtracting the POC corresponding to the reference picture index i1 from the POC of the current picture is smaller than the POC of the current picture. x is smaller than the difference obtained by subtracting the POC corresponding to the reference picture index i x is any reference picture index other than reference picture index i1 among the reference picture indexes of the first reference picture list, and reference picture index i x the POC corresponding to,is smaller than the POC of the current picture, and, determining a reference picture index i2 of the second reference picture list as a second reference picture index of the second reference picture list corresponding to the current block, wherein the POC corresponding to the reference picture index i2 is greater than the POC of the current picture, and the difference obtained by subtracting the POC corresponding to the reference picture index i2 from the POC of the current picture is less than the POC of the current picture. y is greater than the difference obtained by subtracting the POC corresponding to the reference picture index i y is the 2 is any reference picture index other than reference picture index i2 among the reference picture indexes of the reference picture list of y the POC corresponding to,is greater than the POC of the current picture, and, predicting the current block based on the first reference picture index and the second reference picture index, where the current picture includes the current block.

[0008] It should be understood that the reference picture index in the present invention may also be simply referred to as an index.

[0009] According to a second aspect, the present invention provides a bidirectional inter prediction method, the method comprising: determining a reference picture index i1 of a first reference picture list as a first reference picture index of the first reference picture list corresponding to the current block when a first group of conditions is satisfied, wherein the first group of conditions is satisfied by the following condition 1 and condition 2: Condition 1: The POC corresponding to the reference picture index i1 is less than the POC of the current picture, and Condition 2: The difference obtained by subtracting the POC corresponding to the reference picture index i1 from the POC of the current picture is equal to or less than the POC of the current picture corresponding to the reference picture index i xis smaller than the difference obtained by subtracting the POC corresponding to the reference picture index i x is any reference picture index other than reference picture index i1 among the reference picture indexes of the first reference picture list, and reference picture index i x The POC corresponding to is smaller than the POC of the current picture and determining a reference picture index i2 of the second reference picture list as a second reference picture index of the second reference picture list corresponding to the current block when a second group of conditions is satisfied, wherein the second group of conditions is satisfied by the following conditions 11 and 12: Condition 11: The POC corresponding to the reference picture index i2 is greater than the POC of the current picture, and Condition 12: The difference obtained by subtracting the POC corresponding to the reference picture index i2 from the POC of the current picture is equal to or less than the POC of the current picture corresponding to the reference picture index i y is greater than the difference obtained by subtracting the POC corresponding to the reference picture index i y But, 2 is any reference picture index other than reference picture index i2 among the reference picture indexes of the reference picture list of y The POC corresponding to is greater than the POC of the current picture and predicting the current block based on the first reference picture index and the second reference picture index, where the current picture includes the current block.

[0010] It should be understood that in the embodiment of the present invention, the first group of conditions may include further conditions in addition to Condition 1 and Condition 2, and the second group of conditions may include further conditions in addition to Condition 11 and Condition 12. These conditions include, but are not limited to, optional execution conditions in the prior art or optional execution conditions in standard evolution, and are not exhaustively listed in the embodiment of the present invention.

[0011] According to a third aspect, the present invention provides a bidirectional inter prediction method, the method comprising: determining a reference picture index i1 of the first reference picture list as a first reference picture index of the first reference picture list corresponding to the current block, wherein the POC corresponding to the reference picture index i1 is smaller than the POC of the current picture, and the difference obtained by subtracting the POC corresponding to the reference picture index i1 from the POC of the current picture is smaller than the POC of the current picture. x is smaller than the difference obtained by subtracting the POC corresponding to the reference picture index i x is any reference picture index other than reference picture index i1 among the reference picture indexes of the first reference picture list, and reference picture index i x the POC corresponding to,is smaller than the POC of the current picture, and, determining a reference picture index i2 of the second reference picture list as a second reference picture index of the second reference picture list corresponding to the current block, wherein the POC corresponding to the reference picture index i2 is greater than the POC of the current picture, and the difference obtained by subtracting the POC corresponding to the reference picture index i2 from the POC of the current picture is less than the POC of the current picture. y is greater than the difference obtained by subtracting the POC corresponding to the reference picture index i y is the 2is any reference picture index other than reference picture index i2 among the reference picture indexes of the reference picture list of y the POC corresponding to,is greater than the POC of the current picture, and, When the reference picture index i1 is determined as the first reference picture index of the first reference picture list corresponding to the current block and the reference picture index i2 is determined as the second reference picture index of the second reference picture list corresponding to the current block, predicting the current block based on the first reference picture index and the second reference picture index, wherein the current picture includes the current block.

[0012] According to the first, second, or third aspect of the present invention, in one possible design, the first reference picture list may correspond to a first direction, and the second reference picture list may correspond to a second direction. The first direction and the second direction may be forward and backward, respectively, or may be backward and forward, or both the first direction and the second direction may be forward or backward. The direction may also be understood as a time sequence, and is not limited by the present invention.

[0013] According to the first, second or third aspect of the present invention, in one possible design, the method is used for a decoding device, and correspondingly, the method comprises: The method further includes a step of obtaining a first identifier, wherein the value of the first identifier is a first preset value (which may be, but is not limited to, 1 or 0) used to indicate determining a reference picture index i1 of the first reference picture list as the first reference picture index of the first reference picture list corresponding to the current block, and determining a reference picture index i2 of the second reference picture list as the second reference picture index of the second reference picture list corresponding to the current block.

[0014] Optionally, when the value of the first identifier is a second preset value (which is different from the first preset value and may be, but is not limited to, 0 or 1), the first identifier may indicate that the bitstream needs to be parsed or that another scheme needs to be used to obtain the reference picture index of the current block.

[0015] According to the first, second, or third aspect of the present invention, in one possible design, when the first identifier is a first preset value (which may be, but is not limited to, 1 or 0), the first identifier may be further used to indicate determining a second motion vector differential for the current block based on the first motion vector differential for the current block, and the method may include: obtaining a first motion vector differential for the current block; and obtaining a second motion vector differential for the current block based on the first motion vector differential according to the following formula: mvd_lY=-mvd_lX

[0016] In this specification, mvd_lY represents the second motion vector differential, mvd_lX represents the first motion vector differential, one of the first motion vector differential and the second motion vector differential corresponds to the first reference picture list, and the other of the first motion vector differential and the second motion vector differential corresponds to the second reference picture list.

[0017] Optionally, when the value of the first identifier is a second predetermined value (which is different from the first predetermined value and may be, but is not limited to, 0 or 1), the first identifier may indicate that the bitstream needs to be parsed or that another scheme needs to be used to obtain the first motion vector differential and / or the second motion vector differential of the current block corresponding to the first reference picture list and / or the second reference picture list.

[0018] That is, when the value of the first identifier is a first preset value, the first identifier may indicate that the first motion information and the second motion information may be derived from each other. For example, the second motion information may be derived based on the first motion information, or the first motion information may be derived based on the second motion information. More specifically, the second motion vector may be derived based on the first motion vector, or the first motion vector may be derived based on the second motion vector. The second motion vector differential may be derived based on the first motion vector differential, or the first motion vector differential may be derived based on the second motion vector differential.

[0019] In this case, not all the motion information (such as MVD) needs to be transmitted in the bitstream, which reduces the resources for transmitting the bitstream, thereby improving the bitstream transmission efficiency.

[0020] Furthermore, when the first motion vector is derived based on the second motion vector, or when the second motion vector is derived based on the first motion vector, the first reference picture index and the second reference picture index may be determined through derivation. In other words, the first reference picture index and the second reference picture index may be obtained without parsing the bitstream.

[0021] In conclusion, it can be seen that when the value of the first identifier is a first preset value, the first identifier can be used to indicate that the reference picture index of the current block can be obtained or determined through derivation. Specifically, when the value of the first identifier is the first preset value, the first identifier can be used to indicate that the reference picture index i1 of the first reference picture list is determined as the first reference picture index of the first reference picture list corresponding to the current block, and that the reference picture index i2 of the second reference picture list is determined as the second reference picture index of the second reference picture list corresponding to the current block. In this case, the reference picture indexes may not be transmitted in the bitstream to improve bitstream transmission efficiency.

[0022] Furthermore, when the value of the first identifier is a second preset value, the first identifier may be used to indicate that the first motion vector is not derived based on the second motion vector, or that the second motion vector is not derived based on the first motion vector, in which case the bitstream needs to be parsed to obtain the first reference picture index and the second reference picture index of the current block.

[0023] Furthermore, when the value of the first identifier is a second preset value, the first identifier may be used to indicate that the first motion vector differential is not derived based on the second motion vector differential, or that the second motion vector differential is not derived based on the first motion vector differential, in which case the bitstream needs to be parsed to obtain the first reference picture index and the second reference picture index of the current block.

[0024] According to the first, second or third aspect of the present invention, in one possible design, a method comprises: obtaining a first motion vector predictor and a second motion vector predictor; determining a first motion vector based on the first motion vector predictor and the first motion vector differential; and determining a second motion vector based on the second motion vector predictor and the second motion vector differential.

[0025] The step of predicting the current block based on the first reference picture index and the second reference picture index includes the step of predicting the current block based on the first reference picture index, the second reference picture index, the first reference picture list, the second reference picture list, the first motion vector, and the second motion vector.

[0026] Optionally, in a specific implementation process, the first predicted motion vector and the second predicted motion vector may be obtained through parsing and / or derivation in an embodiment of the present invention, the first motion vector differential and the second motion vector differential may also be obtained through parsing and / or derivation in an embodiment of the present invention, the first reference picture index and the second reference picture index may be determined according to the above-mentioned determination method, and the first reference picture list and the second reference picture list may be obtained from the bitstream or may be constructed. After this motion information is completed, the current block can be predicted. A specific prediction method may be implemented according to conventional techniques.

[0027] According to the above method, an MVD in one direction may be derived based on an MVD in another direction, and a reference picture index may be determined according to a specific rule. In this manner, for two pieces of motion information of the current block, at least one MVD and two reference picture indexes may not need to be transmitted in the bitstream, thereby saving resources for transmitting the bitstream.

[0028] According to the first, second or third aspect of the present invention, in one possible design, before obtaining the first identifier, the method further comprises determining that a predetermined condition is met, the predetermined condition being: The first reference picture list has a first index, the second reference picture list has a second index, and the POC of the current picture is between the POC corresponding to the first index and the POC corresponding to the second index.

[0029] For example, this can be expressed as the following conditions being met: (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0

[0030] In this specification, POC_Cur may represent the POC of the current picture, POC_listX may represent the POC of a reference picture in the first reference picture list, and POC_listY may represent the POC of a reference picture in the second reference picture list.

[0031] In one possible design according to the first, second, or third aspect of the present invention, before obtaining the first identifier, the method further includes determining that a predetermined condition is satisfied, the predetermined condition including that the obtained motion vector residual identifier of the current picture corresponding to the second reference picture list is a third predetermined value, for example, mvd_l1_zero_flag of the current picture is 0.

[0032] According to the first, second, or third aspect of the present invention, in one possible design, when (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0, the picture with the smallest POC difference from the picture in which the block to be processed (i.e., the current block) is located is determined as the first target reference picture in the first reference picture list of the block to be processed, where the POC of the first target reference picture is smaller than the POC of the picture in which the block to be processed is located, and the picture with the smallest POC difference from the picture in which the block to be processed is located is determined as the second target reference picture in the second reference picture list of the block to be processed, where the POC of the second target reference picture is larger than the POC of the picture in which the block to be processed is located. When both the first target reference picture and the second target reference picture exist, the reference picture index of the first target reference picture in the first reference picture list is i1, and the reference picture index of the second target reference picture in the second reference picture list is i2.

[0033] Optionally, when the first target reference picture or the second target reference picture does not exist, a picture having a smallest POC difference from the picture in which the block to be processed is located is determined as a third target reference picture in the first reference picture list of the block to be processed, where the POC of the third target reference picture is greater than the POC of the picture in which the block to be processed is located, and a picture having a smallest POC difference from the picture in which the block to be processed is located is determined as a fourth target reference picture in the second reference picture list of the block to be processed, where the POC of the fourth target reference picture is less than the POC of the picture in which the block to be processed is located. When both the third target reference picture and the fourth target reference picture exist, the index of the fourth target reference picture in the second reference picture list is i2, and the reference picture index of the third target reference picture in the first reference picture list is i1.

[0034] According to a fourth aspect, there is provided a bidirectional inter prediction apparatus, comprising: Determine the reference picture index i1 of the first reference picture list as the first reference picture index of the first reference picture list corresponding to the current block, and determine whether the POC corresponding to the reference picture index i1 is smaller than the POC of the current picture, and whether the difference obtained by subtracting the POC corresponding to the reference picture index i1 from the POC of the current picture is smaller than the POC of the current picture. x is smaller than the difference obtained by subtracting the POC corresponding to the reference picture index i x is any reference picture index other than reference picture index i1 among the reference picture indexes of the first reference picture list, and reference picture index i x the POC corresponding to the reference picture index i2 is smaller than the POC of the current picture; determine the reference picture index i2 of the second reference picture list as the second reference picture index of the second reference picture list corresponding to the current block; and determine that the POC corresponding to the reference picture index i2 is greater than the POC of the current picture; and determine that the difference obtained by subtracting the POC corresponding to the reference picture index i2 from the POC of the current picture is the difference between the POC of the current picture and the reference picture index i y is greater than the difference obtained by subtracting the POC corresponding to the reference picture index i y is the 2 is any reference picture index other than reference picture index i2 among the reference picture indexes of the reference picture list of y a determining unit configured to determine whether the POC corresponding to the current picture is greater than the POC of the current picture; an inter-prediction processing unit configured to predict a current block based on the first reference picture index and the second reference picture index, where the current picture includes the current block; and

[0035] According to a fourth aspect, in one possible design, the apparatus further includes an acquisition unit configured to acquire a first identifier, wherein the value of the first identifier is a first predetermined value, and when the value of the first identifier is the first predetermined value, the first identifier is used to indicate determining a reference picture index i1 of the first reference picture list as a first reference picture index of the first reference picture list corresponding to the current block, and determining a reference picture index i2 of the second reference picture list as a second reference picture index of the second reference picture list corresponding to the current block.

[0036] According to a fourth aspect, in one possible design, when the first identifier is a first predetermined value, the first identifier is further used to indicate that a second motion vector differential of the current block is determined based on a first motion vector differential of the current block, and the acquisition unit is further configured to acquire the first motion vector differential of the current block, and the determination unit is further configured to acquire the second motion vector differential of the current block based on the first motion vector differential according to the following equation: mvd_lY=-mvd_lX

[0037] In this specification, mvd_lY represents the second motion vector differential, mvd_lX represents the first motion vector differential, one of the first motion vector differential and the second motion vector differential belongs to the motion information corresponding to the first reference picture list, and the other of the first motion vector differential and the second motion vector differential belongs to the motion information corresponding to the second reference picture list.

[0038] According to a fourth aspect, in one possible design, the acquisition unit is particularly configured to acquire a first predicted motion vector and a second predicted motion vector, the determination unit is configured to determine the first motion vector based on the first predicted motion vector and the first motion vector differential, and to determine the second motion vector based on the second predicted motion vector and the second motion vector differential, and the inter-prediction processing unit is configured to predict the current block based on the first reference picture index, the second reference picture index, the first reference picture list, the second reference picture list, the first motion vector, and the second motion vector.

[0039] In a specific implementation, the aforementioned units (virtual modules) include, but are not limited to, separate computing modules or the same integrated computing module. The implementation forms are not exhaustive. Different names are used only to distinguish functions and do not unnecessarily limit the structure.

[0040] According to a fifth aspect, the present invention provides a bidirectional inter prediction method, the method comprising: when the auxiliary information of the block to be processed satisfies a preset condition, parsing the bitstream to obtain indication information, the indication information being used to indicate a first motion vector obtaining manner and a second motion vector obtaining manner, the first motion vector being a motion vector pointing to a reference picture in a first reference picture list of the block to be processed, and the second motion vector being a motion vector pointing to a reference picture in a second reference picture list of the block to be processed; determining a first motion vector and a second motion vector based on an acquisition method indicated by the instruction information; and determining a predictor for the block to be processed based on the first motion vector, the second motion vector, the first reference picture index, and the second reference picture index, wherein the first reference picture index is used to indicate a reference picture in a first reference picture list to which the first motion vector points, and the second reference picture index is used to indicate a reference picture in a second reference picture list to which the second motion vector points.

[0041] According to a sixth aspect, the present invention provides a bidirectional inter prediction apparatus, comprising: an acquisition unit configured to parse a bitstream to obtain indication information when auxiliary information of a block to be processed satisfies a predetermined condition, the indication information being used to indicate an acquisition manner of a first motion vector and an acquisition manner of a second motion vector, the first motion vector being a motion vector pointing to a reference picture in a first reference picture list of the block to be processed, and the second motion vector being a motion vector pointing to a reference picture in a second reference picture list of the block to be processed; The image processing apparatus includes: an acquisition unit; and a determination unit configured to determine a first motion vector and a second motion vector based on an acquisition scheme indicated by the instruction information, and to determine a predictor of a block to be processed based on the first motion vector, the second motion vector, the first reference picture index, and the second reference picture index, wherein the first reference picture index is used to indicate a reference picture in a first reference picture list to which the first motion vector points, and the second reference picture index is used to indicate a reference picture in a second reference picture list to which the second motion vector points.

[0042] The fifth and sixth aspects describe a method and an apparatus corresponding to each other. In the following possible designs, only the method is used to describe possible implementation strategies, and the details are not described on the apparatus side.

[0043] According to the fifth or sixth aspect, in one possible design, the indication information includes a first identifier and a fifth identifier, and parsing the bitstream to obtain the indication information includes parsing the bitstream to obtain the first identifier, and parsing the bitstream to obtain the fifth identifier when the first identifier is 0. Correspondingly, determining the first motion vector and the second motion vector based on the acquisition scheme indicated by the indication information includes: when the first identifier is 1, the method includes: parsing the bitstream to obtain a first motion vector predictor index and / or a first motion vector residual; calculating a first motion vector based on the first motion vector predictor index and / or the first motion vector residual; and deriving a second motion vector based on the first motion vector, wherein the first motion vector and the second motion vector are in a predetermined mathematical relationship; When the first identifier is 0 and the fifth identifier is 1, the method includes: parsing the bitstream to obtain a second motion vector predictor index and / or a second motion vector residual; calculating a second motion vector based on the second motion vector predictor index and / or the second motion vector residual; and deriving a first motion vector based on the second motion vector, wherein the first motion vector and the second motion vector are in a predetermined mathematical relationship; or When the first identifier is 0 and the fifth identifier is 0, the method includes the steps of parsing the bitstream to obtain a first predicted motion vector index and / or a first motion vector differential, calculating a first motion vector based on the first predicted motion vector index and / or the first motion vector residual, parsing the bitstream to obtain a second predicted motion vector index and / or a second motion vector residual, and calculating a second motion vector based on the second predicted motion vector index and / or the second motion vector residual.

[0044] According to the fifth or sixth aspect, in one possible design, the instruction information includes a second identifier and a third identifier, and the step of parsing the bitstream to obtain the instruction information includes the step of parsing the bitstream to obtain the second identifier, and when the second identifier is 1, the step of parsing the bitstream to obtain the third identifier. Correspondingly, the step of determining the first motion vector and the second motion vector based on the acquisition manner indicated by the indication information includes, when the second identifier is 0, parsing the bitstream to obtain a first predicted motion vector index and / or a first motion vector residual; calculating the first motion vector based on the first predicted motion vector index and / or the first motion vector residual; parsing the bitstream to obtain a second predicted motion vector index and / or a second motion vector residual; and calculating the second motion vector based on the second predicted motion vector index and / or the second motion vector residual; or, when the second identifier is 1 and the third identifier is the first value, parsing the bitstream to obtain the first predicted motion vector index and / or the first motion vector residual. and a step of calculating a first motion vector based on the first predicted motion vector index and / or the first motion vector residual; and a step of deriving a second motion vector based on the first motion vector, wherein the first motion vector and the second motion vector are in a predetermined mathematical relationship, or when the second identifier is 1 and the third identifier is a second value, the step of parsing the bitstream to obtain a second predicted motion vector index and / or a second motion vector residual, a step of calculating the second motion vector based on the second predicted motion vector index and / or the second motion vector residual; and a step of deriving the first motion vector based on the second motion vector, wherein the first motion vector and the second motion vector are in a predetermined mathematical relationship and the first value is not equal to the second value.

[0045] According to the fifth or sixth aspect, in one possible design, the indication information includes a second identifier, and the step of parsing the bitstream to obtain the indication information includes: Parsing the bitstream to obtain a second identifier.

[0046] Correspondingly, the step of determining the first motion vector and the second motion vector based on the acquisition manner indicated by the instruction information includes: When the second identifier is 0, the method includes: parsing the bitstream to obtain a first motion vector predictor index and / or a first motion vector residual; calculating a first motion vector based on the first motion vector predictor index and / or the first motion vector residual; parsing the bitstream to obtain a second motion vector predictor index and / or a second motion vector residual; and calculating a second motion vector based on the second motion vector predictor index and / or the second motion vector residual; or When the second identifier is 1, the method includes the steps of: parsing the bitstream to obtain a first predicted motion vector index and / or a first motion vector residual; calculating a first motion vector based on the first predicted motion vector index and / or the first motion vector residual; and deriving a second motion vector based on the first motion vector, wherein the first motion vector and the second motion vector are in a predetermined mathematical relationship.

[0047] According to the fifth or sixth aspect, in one possible design, the first motion vector and the second motion vector being in a predetermined mathematical relationship includes the first motion vector and the second motion vector being equal in magnitude and opposite in direction, and / or the first motion vector residual and the second motion vector residual being equal in magnitude and opposite in direction.

[0048] According to the fifth or sixth aspect, in one possible design, the auxiliary information includes the amount of reference pictures of the block to be processed, and the auxiliary information of the block to be processed satisfying a predetermined condition includes the amount of reference pictures of the block to be processed being two or more.

[0049] According to the fifth or sixth aspect, in one possible design, the auxiliary information includes a picture order count (POC) relationship between a picture in which the block to be processed is located and a reference picture of the block to be processed, and the auxiliary information of the block to be processed satisfies a predetermined condition: POC_Cur-POC_listX=POC_listY-POC_Cur Includes:

[0050] In this specification, POC_Cur is the POC of the picture in which the block to be processed is located, POC_listX is the POC of the reference picture of the block to be processed in the first reference picture list, and POC_listY is the POC of the reference picture of the block to be processed in the second reference picture list.

[0051] According to the fifth or sixth aspect, in one possible design, the auxiliary information includes a picture order count (POC) relationship between a picture in which the block to be processed is located and a reference picture of the block to be processed, and the auxiliary information of the block to be processed satisfies a predetermined condition: (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0 Includes:

[0052] In this specification, POC_Cur is the POC of the picture in which the block to be processed is located, POC_listX is the POC of the reference picture of the block to be processed in the first reference picture list, and POC_listY is the POC of the reference picture of the block to be processed in the second reference picture list.

[0053] According to the fifth or sixth aspect, in one possible design, the auxiliary information includes a temporal identifier (Temporal ID) of the picture in which the block to be processed is located, and the auxiliary information of the block to be processed satisfying a predetermined condition includes the temporal identifier of the picture in which the block to be processed is located being greater than or equal to a predetermined value.

[0054] According to the fifth or sixth aspect, in one possible design, the auxiliary information includes a motion vector residual (mvd_l1_zero_flag) identifier of the block to be processed, and the auxiliary information of the block to be processed satisfying a predetermined condition includes the motion vector residual identifier of the block to be processed indicating that the motion vector residual of the block to be processed is 0, and this motion vector residual is a first motion vector residual or a second motion vector residual.

[0055] According to the fifth or sixth aspect, in one possible design, before determining a predictor for the block to be processed, the method may further comprise: determining a first reference picture index and a second reference picture index based on a preset condition satisfied by the auxiliary information when the first motion vector is derived based on the second motion vector, or when the second motion vector is derived based on the first motion vector; or When the first motion vector is not derived based on the second motion vector and the second motion vector is not derived based on the first motion vector, the method further includes parsing the bitstream to obtain a first reference picture index and a second reference picture index.

[0056] According to the fifth or sixth aspect, in one possible design, determining the first and second reference picture indexes includes setting each of the first and second reference picture indexes to a predetermined constant. The predetermined constant may be 0.

[0057] According to the fifth or sixth aspect, in one possible design, when POC_Cur-POC_listX=POC_listY-POC_Cur, determining the first and second reference picture indices may include determining a picture with a minimum POC difference from the picture in which the block to be processed is located as a first target reference picture in the first reference picture list of the block to be processed, where the POC of the first target reference picture is smaller than the POC of the picture in which the block to be processed is located; and determining a second target reference picture index. The method includes searching a second reference picture list of the block to be processed for a reference picture, wherein the POC of the second target reference picture satisfies POC_Cur-POC_1=POC_2-POC_Cur, where POC_1 is the POC of the first target reference picture and POC_2 is the POC of the second target reference picture; and when both the first target reference picture and the second target reference picture exist, setting the first reference picture index to an identifier of the first target reference picture and setting the second reference picture index to an identifier of the second target reference picture.

[0058] According to the fifth or sixth aspect, in one possible design, a method comprises: When the first target reference picture or the second target reference picture does not exist, the method further includes the steps of: determining a picture having the smallest POC difference from the picture in which the block to be processed is located as a third target reference picture in the first reference picture list of the block to be processed, wherein the POC of the third target reference picture is greater than the POC of the picture in which the block to be processed is located; searching the second reference picture list of the block to be processed for a fourth target reference picture, wherein the POC of the fourth target reference picture satisfies POC_Cur-POC_3=POC_4-POC_Cur, where POC_3 is the POC of the third target reference picture and POC_4 is the POC of the fourth target reference picture; and setting the first reference picture index to the identifier of the third target reference picture and the second reference picture index to the identifier of the fourth target reference picture.

[0059] According to the fifth or sixth aspect, in one possible design, when (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0, the step of determining the first reference picture index and the second reference picture index may include: determining a picture with a minimum POC difference from the picture in which the block to be processed is located as a first target reference picture in a first reference picture list of the block to be processed, wherein the POC of the first target reference picture is smaller than the POC of the picture in which the block to be processed is located; determining a picture having a minimum POC difference from the picture in which the block to be processed is located as a second target reference picture in a second reference picture list of the block to be processed, wherein the POC of the second target reference picture is greater than the POC of the picture in which the block to be processed is located; When both the first target reference picture and the second target reference picture exist, setting the first reference picture index to an identifier of the first target reference picture and setting the second reference picture index to an identifier of the second target reference picture.

[0060] According to the fifth or sixth aspect, in one possible design, a method comprises: When the first target reference picture or the second target reference picture does not exist, the method further includes the steps of: determining, as a third target reference picture in the first reference picture list of the block to be processed, a picture having the smallest POC difference from the picture in which the block to be processed is located, wherein the POC of the third target reference picture is greater than the POC of the picture in which the block to be processed is located; determining, as a fourth target reference picture in the second reference picture list of the block to be processed, a picture having the smallest POC difference from the picture in which the block to be processed is located, wherein the POC of the fourth target reference picture is less than the POC of the picture in which the block to be processed is located; and setting the first reference picture index to the identifier of the third target reference picture and setting the second reference picture index to the identifier of the fourth target reference picture.

[0061] According to a seventh aspect, the present invention provides a bidirectional inter prediction method, the method comprising: The method includes the steps of: obtaining a first identifier when at least a syntax element in the bitstream indicates that a second motion vector differential of the current picture needs to be parsed; obtaining a first motion vector differential of the current block; and determining a second motion vector differential of the current block based on the first motion vector differential when the value of the first identifier is a first predetermined value, wherein the first motion vector differential belongs to motion information of the current block in a first direction and the second motion vector differential belongs to motion information of the current block in a second direction, and the first motion vector differential and the second motion vector differential are used to predict the current block.

[0062] According to an eighth aspect, a bidirectional inter-prediction method is provided, the method including: obtaining indication information used to indicate determining second motion information based on first motion information, the first motion information being motion information of a current block in a first direction and the second motion information being motion information of the current block in a second direction; obtaining the first motion information; and determining the second motion information based on the obtained first motion information. In this manner, a prediction sample of the current block can be determined based on the obtained first motion information and the determined second motion information.

[0063] According to the bidirectional inter-prediction method provided in the present application, after the indication information is obtained, the second motion information is determined based on the first motion information. In this manner, the bitstream only needs to include the indication information and the first motion information, and no longer needs to include the second motion information. Compared with the prior art in which the bitstream includes motion information for each picture block in each direction, the bidirectional inter-prediction method provided in the present application substantially reduces the motion information included in the bitstream, and improves the effective utilization of transmission resources, transmission rate, and coding rate.

[0064] Optionally, in one possible implementation of the present application, a method for "determining second motion information based on first motion information" includes the steps of: obtaining an index value of a first reference picture in the first motion information, and determining a picture order count of the first reference picture based on the index value of the first reference picture and a first reference picture list, where the first reference picture is a reference picture of a current block in a first direction, and the index value of the first reference picture is the number of the first reference picture in the first reference picture list; obtaining an index value of a second reference picture, and determining a picture order count of the first reference picture based on the index value of the second reference picture and a first reference picture list; determining a picture order count of a second reference picture based on a second reference picture list, where the second reference picture is a reference picture of the current block in the second direction and the index of the second reference picture is the number of the second reference picture in the second reference picture list; determining a first motion vector based on a first motion vector differential and a first motion vector predictor flag in the first motion information, where the first motion vector is the motion vector of the current block in the first direction; and determining a second motion vector in the second motion information according to the following formula:

[0065]

number

[0066] In this formula, mv_lY represents the second motion vector, POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, POC_listY represents the picture order count of the second reference picture, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current block in the second direction.

[0067] Optionally, in another possible implementation of the present application, a method for "determining second motion information based on first motion information" includes the steps of: obtaining an index value of a first reference picture in the first motion information, and determining a picture order count of the first reference picture based on the index value of the first reference picture and a first reference picture list, where the first reference picture is a reference picture of a current block in a first direction and the index value of the first reference picture is the number of the first reference picture in the first reference picture list; obtaining an index value of a second reference picture, and determining a picture order count of the second reference picture based on the index value of the second reference picture and the second reference picture list, where the second reference picture is a reference picture of a current block in a second direction and the index value of the second reference picture is the number of the second reference picture in the second reference picture list; determining a first motion vector based on the min and a first motion vector predictor flag, where the first motion vector is the motion vector of the current block in a first direction; and determining a second motion vector in the second motion information according to an equation mv_lY=-mv_lX, when the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block, or when the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block, or when the first reference picture and the second reference picture are each forward reference pictures of the current block, or when the first reference picture and the second reference picture are each backward reference pictures of the current block. In this equation, mv_lY represents the second motion vector, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current block in a second direction.

[0068] Optionally, in another possible implementation form of the present application, the method for "determining second motion information based on first motion information" is a step of determining a second motion vector in the second motion information according to the formula mv_lY=-mv_lX, in which mv_lY represents the second motion vector, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current block in the second direction.

[0069] Both "the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block" and "the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block" may be expressed by using the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0, or may be expressed by using POC_listY=2*POC_Cur-POC_listX, which is not particularly limited in this application.

[0070] In addition, both "each of the first reference picture and the second reference picture is a forward reference picture for the current block" and "each of the first reference picture and the second reference picture is a backward reference picture for the current block" may be expressed by using the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)<0.

[0071] Optionally, in another possible implementation of the present application, a method for "determining second motion information based on first motion information" includes the steps of: obtaining an index value of a first reference picture and a first motion vector differential in the first motion information, and determining a picture order count of the first reference picture based on the index value of the first reference picture and a first reference picture list, where the first reference picture is a reference picture of a current block in a first direction, and the index value of the first reference picture is the number of the first reference picture in the first reference picture list; obtaining an index value of a second reference picture, and determining a picture order count of the second reference picture; determining a picture order count of the second reference picture based on an index value of the second reference picture and a second reference picture list; determining a second motion vector predictor based on the index value of the second reference picture and a second motion vector predictor candidate list, where the second motion vector predictor is a motion vector predictor of the current block in a second direction, the second reference picture is a reference picture of the current block in the second direction, and the index value of the second reference picture is a number of the second reference picture in the second reference picture list; determining a second motion vector differential in the second motion information according to the following formula:

[0072]

number

[0073] In the formula, mvd_lY represents the second motion vector differential, POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, POC_listY represents the picture order count of the second reference picture, and mvd_lX represents the first motion vector differential; and determining a second motion vector based on the second predicted motion vector and the second motion vector differential, wherein the second motion vector is the motion vector of the current block in the second direction.

[0074] Optionally, in another possible implementation of the present application, a method for "determining second motion information based on first motion information" includes the steps of: obtaining an index value of a first reference picture and a first motion vector in the first motion information; and determining a picture order count of the first reference picture based on the index value of the first reference picture and a first reference picture list, wherein the first reference picture is a reference picture of a current block in a first direction, and the index value of the first reference picture is a first reference picture in the first reference picture list. a step of obtaining an index value of the second reference picture; determining a picture order count of the second reference picture based on the index value of the second reference picture and the second reference picture list; and determining a second motion vector predictor based on the index value of the second reference picture and the second motion vector predictor candidate list, wherein the second motion vector predictor is a motion vector predictor of a current block in a second direction, and the second reference picture is a reference picture of the current block in the second direction. , the index value of the second reference picture is the number of the second reference picture in the second reference picture list; step; when the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block, or when the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block, or when the first reference picture and the second reference picture are each forward reference pictures of the current block, or when the first reference picture and the second reference picture are When the second reference pictures are each backward reference pictures of the current block, a step of determining a second motion vector differential in the second motion information according to the formula mvd_lY=-mvd_lX, where mvd_lY represents the second motion vector differential and mvd_lX represents the first motion vector differential; and a step of determining a second motion vector based on the second predicted motion vector and the second motion vector differential, where the second motion vector is the motion vector of the current block in the second direction.

[0075] Optionally, in another possible implementation form of the present application, the method for "determining second motion information based on first motion information" includes a step of determining a second motion vector differential in the second motion information according to the formula mvd_lY=-mvd_lX, where mvd_lY represents the second motion vector differential and mvd_lX represents the first motion vector differential, and a step of determining a second motion vector based on the second predicted motion vector and the second motion vector differential, where the second motion vector is the motion vector of the current block in the second direction.

[0076] Similarly, both "the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block" and "the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block" may be expressed by using the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0, or may be expressed by using the formula POC_listY=2*POC_Cur-POC_listX, which is not particularly limited in this application.

[0077] Both "each of the first reference picture and the second reference picture is a forward reference picture for the current block" and "each of the first reference picture and the second reference picture is a backward reference picture for the current block" may be expressed by using the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)<0.

[0078] It may be understood that the bidirectional inter-prediction method provided in the present application may be to determine a second motion vector based on a first motion vector, or to determine a second motion vector differential based on a first motion vector differential and to determine a second motion vector based on the second motion vector differential.

[0079] Optionally, in another possible implementation form of the present application, a method for "obtaining an index value of a second reference picture" includes the steps of: calculating a first picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to the formula POC_listY0=2*POC_Cur-POC_listX, where POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, and POC_listY represents the first picture order count; and determining, when the second reference picture list includes the first picture order count, the number of the reference picture represented by the first picture order count in the second reference picture list as the index value of the second reference picture.

[0080] Optionally, in another possible implementation form of the present application, a method for "obtaining an index value of a second reference picture" includes the steps of: calculating a second picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to the formula (POC_Cur-POC_listX)*(POC_listY0'-POC_Cur)>0, where POC_listY0' represents the second picture order count; and, when the second reference picture list includes the second picture order count, determining the number of the reference picture represented by the second picture order count in the second reference picture list as the index value of the second reference picture.

[0081] Optionally, in another possible implementation form of the present application, the method for "obtaining an index value of a second reference picture" includes the steps of: calculating a third picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to the formula POC_listX≠POC_listY0'' where POC_listY0'' represents the third picture order count; and determining the number of the reference picture represented by the third picture order count in the second reference picture list as the index value of the second reference picture.

[0082] Optionally, in another possible implementation of the present application, a method for "obtaining an index value of a second reference picture" is a step of calculating a first picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to the formula POC_listY0=2*POC_Cur-POC_listX, where POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, and POC_listY represents the first picture order count. When the second reference picture list includes the first picture order count, the number of the reference picture represented by the first picture order count in the second reference picture list is determined as the index value of the second reference picture. When the second reference picture list does not include the first picture order count, the second picture order count is calculated based on the picture order count of the current picture and the picture order count of the first reference picture according to the formula (POC_Cur-POC_listX)*(POC_listY0'-POC_Cur)>0, where POC_listY0' represents the second picture order count. When the second reference picture list includes the second picture order count, the number of the reference picture represented by the second picture order count in the second reference picture list is determined as the index value of the second reference picture. When the second reference picture list does not include a second picture order count, a third picture order count is calculated based on the picture order count of the current picture and the picture order count of the first reference picture according to the formula POC_listX≠POC_listY0″, where POC_listY0″ represents the third picture order count, and the number of the reference picture represented by the third picture order count in the second reference picture list is determined as the index value of the second reference picture.

[0083] Optionally, in another possible implementation of the present application, the method for "obtaining an index value of a second reference picture" is a step of parsing a bitstream to obtain an index value of a second reference picture.

[0084] It can be seen that there may be multiple ways to "obtain the index value of the second reference picture" in this application. The specific way to obtain the index value of the second reference picture needs to be determined or set in advance based on actual requirements.

[0085] According to a ninth aspect, there is provided a bidirectional inter prediction apparatus, the bidirectional inter prediction apparatus including: an obtaining unit and a determining unit.

[0086] Specifically, the obtaining unit is configured to obtain indication information, the indication information being used to indicate determining second motion information based on first motion information, the first motion information being motion information of a current block in a first direction, and the second motion information being motion information of the current block in a second direction, and to obtain the first motion information. The determining unit is configured to determine the second motion information based on the first motion information obtained by the obtaining unit, and determine a predicted sample of the current block based on the first motion information and the second motion information.

[0087] Optionally, in a possible implementation form of the present application, the determining unit obtains an index value of a first reference picture in the first motion information; determines a picture order count of the first reference picture according to the index value of the first reference picture and the first reference picture list, where the first reference picture is a reference picture of the current block in a first direction, and the index value of the first reference picture is a number of the first reference picture in the first reference picture list; obtains an index value of a second reference picture; and determines a picture order count of the first reference picture according to the index value of the first reference picture and the first reference picture list. the second reference picture is a reference picture of the current block in the second direction, and the index value of the second reference picture is the number of the second reference picture in the second reference picture list; determine a first motion vector based on the first motion vector differential and the first motion vector predictor flag in the first motion information, where the first motion vector is the motion vector of the current block in the first direction, and determine a second motion vector in the second motion information according to the following formula:

[0088]

number

[0089] In this specification, mv_lY represents the second motion vector, POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, POC_listY represents the picture order count of the second reference picture, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current block in the second direction.

[0090] Optionally, in another possible implementation form of the present application, the determining unit obtains an index value of a first reference picture in the first motion information, and determines a picture order count of the first reference picture based on the index value of the first reference picture and the first reference picture list, where the first reference picture is a reference picture of a current block in a first direction and the index value of the first reference picture is the number of the first reference picture in the first reference picture list; obtains an index value of a second reference picture, and determines a picture order count of the second reference picture based on the index value of the second reference picture and the second reference picture list, where the second reference picture is a reference picture of the current block in a second direction and the index value of the second reference picture is the number of the second reference picture in the second reference picture list; and determines a picture order count of the first motion vector differential and the first motion vector predicted in the first motion information. The motion vector determining unit is particularly configured to: determine a first motion vector based on the measurement flag; when the first motion vector is the motion vector of the current block in a first direction, and the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block, or when the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block, or when the first reference picture and the second reference picture are each forward reference pictures of the current block, or when the first reference picture and the second reference picture are each backward reference pictures of the current block, determine a second motion vector in the second motion information according to an equation mv_lY=-mv_lX, in which mv_lY represents the second motion vector, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current block in a second direction.

[0091] Optionally, in another possible implementation form of the present application, the determination unit is particularly configured to determine a second motion vector in the second motion information according to the formula mv_lY=-mv_lX, in which mv_lY represents the second motion vector, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current block in the second direction.

[0092] Optionally, in another possible implementation of the present application, the determining unit obtains an index value of a first reference picture and a first motion vector differential in the first motion information; determines a picture order count of the first reference picture according to the index value of the first reference picture and the first reference picture list, where the first reference picture is a reference picture of the current block in a first direction, the index value of the first reference picture is a number of the first reference picture in the first reference picture list; obtains an index value of a second reference picture; determine a picture order count of the second reference picture according to the index value and the second reference picture list; determine a second motion vector predictor according to the index value of the second reference picture and the second motion vector predictor candidate list, where the second motion vector predictor is a motion vector predictor of the current block in the second direction, the second reference picture is a reference picture of the current block in the second direction, and the index value of the second reference picture is a number of the second reference picture in the second reference picture list; and determine a second motion vector differential in the second motion information according to the following formula:

[0093]

number

[0094] It is particularly configured such that mvd_lY represents the second motion vector differential, POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, POC_listY represents the picture order count of the second reference picture, mvd_lX represents the first motion vector differential, and determines a second motion vector based on the second predicted motion vector and the second motion vector differential, and the second motion vector is the motion vector of the current block in the second direction.

[0095] Optionally, in another possible implementation form of the present application, the determining unit obtains an index value of a first reference picture and a first motion vector in the first motion information, and determines a picture order count of the first reference picture based on the index value of the first reference picture and the first reference picture list, where the first reference picture is a reference picture of a current block in a first direction, and the index value of the first reference picture is a number of the first reference picture in the first reference picture list; obtains an index value of a second reference picture, and determines a picture order count of the second reference picture based on the index value of the second reference picture and the second reference picture list, and determines a second predictor motion vector based on the index value of the second reference picture and the second motion vector candidate list, where the second predictor motion vector is a predictor motion vector of a current block in a second direction, and the second reference picture is a reference picture of the current block in the second direction, and the second reference picture is a reference picture of the current block in the second direction, and the second reference picture is a reference picture of the current block in the second direction. the index value of the reference picture is the number of a second reference picture in the second reference picture list, and the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block, or the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block, or the first reference picture and the second reference picture are each forward reference pictures of the current block, or It is particularly configured to: when the first reference picture and the second reference picture are respectively backward reference pictures of the current block, determine a second motion vector differential in the second motion information according to the formula mvd_lY=-mvd_lX, where mvd_lY represents the second motion vector differential and mvd_lX represents the first motion vector differential; determine a second motion vector based on the second predicted motion vector and the second motion vector differential, and the second motion vector is the motion vector of the current block in the second direction.

[0096] Optionally, in another possible implementation form of the present application, the determination unit is particularly configured to determine a second motion vector differential in the second motion information according to the formula mvd_lY=-mvd_lX, where mvd_lY represents the second motion vector differential and mvd_lX represents the first motion vector differential, determine the second motion vector based on the second predicted motion vector and the second motion vector differential, and the second motion vector is the motion vector of the current block in the second direction.

[0097] Optionally, in another possible implementation form of the present application, the obtaining unit is particularly configured to calculate a first picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to the formula POC_listY0=2*POC_Cur-POC_listX, and determine the number of the reference picture represented by the first picture order count in the second reference picture list as the index value of the second reference picture when POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, POC_listY represents the first picture order count, and the second reference picture list includes the first picture order count.

[0098] Optionally, in another possible implementation form of the present application, the acquisition unit is particularly configured to calculate a second picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to the formula (POC_Cur-POC_listX)*(POC_listY0'-POC_Cur)>0, and when POC_listY0' represents the second picture order count and the second reference picture list includes the second picture order count, determine the number of the reference picture represented by the second picture order count in the second reference picture list as the index value of the second reference picture.

[0099] Optionally, in another possible implementation form of the present application, the obtaining unit is particularly configured to calculate a third picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to an equation POC_listX≠POC_listY0″, where POC_listY0″ represents the third picture order count, and determine the number of the reference picture represented by the third picture order count in the second reference picture list as the index value of the second reference picture.

[0100] According to a tenth aspect, a bidirectional inter prediction method is provided. There are multiple implementations for the bidirectional inter prediction method.

[0101] One implementation includes the steps of: parsing a bitstream to obtain a first identifier, the first identifier being used to indicate whether second motion information should be determined based on first motion information, the first motion information being motion information of a current block in a first direction, and the second motion information being motion information of a current block in a second direction; if the value of the first identifier is a first predetermined value, obtaining the first motion information and determining the second motion information based on the first motion information; and determining a predicted sample of the current block based on the first motion information and the second motion information.

[0102] Another implementation form includes the steps of: parsing the bitstream to obtain a second identifier, wherein the second identifier is used to indicate whether motion information of the current block should be calculated by using a motion information derivation algorithm; if the value of the second identifier is a second predetermined value, obtaining a third identifier, wherein the third identifier is used to indicate whether the second motion information should be determined based on the first motion information, wherein the first motion information is motion information of the current block in a first direction and the second motion information is motion information of the current block in a second direction; if the value of the third identifier is a third predetermined value, obtaining the first motion information and determining the second motion information based on the first motion information; and determining a predicted sample of the current block based on the first motion information and the second motion information.

[0103] Another implementation form includes the steps of: parsing the bitstream to obtain a second identifier, wherein the second identifier is used to indicate whether motion information of the current block should be calculated by using a motion information derivation algorithm; obtaining first motion information and determining second motion information based on the first motion information if the value of the second identifier is a second predetermined value, wherein the first motion information is motion information of the current block in a first direction and the second motion information is motion information of the current block in a second direction; and determining a predicted sample of the current block based on the first motion information and the second motion information.

[0104] Another implementation includes the steps of: parsing the bitstream to obtain a fourth identifier, where the fourth identifier is used to indicate whether to calculate motion information of a current block by using a motion information derivation algorithm; and determining, if the value of the fourth identifier is a fourth preset value, an index value of a first reference picture and an index value of a second reference picture based on a first reference picture list and a second reference picture list, where the first reference picture list is a reference picture list of a current block in a first direction, and the second reference picture list is a reference picture list of a current block in a second direction. the first reference picture is a reference picture of the current block in a first direction and the second reference picture is a reference picture of the current block in a second direction; obtaining a first motion vector differential and a first motion vector predictor flag and determining second motion information based on the first motion information, where the first motion information includes an index value of the first reference picture, the first motion vector differential, and the first motion vector predictor flag, and the second motion information is motion information of the current block in the second direction; and determining a predicted sample of the current block based on the first motion information and the second motion information.

[0105] Another implementation form includes the steps of: parsing the bitstream to obtain a first identifier, the first identifier being used to indicate whether second motion information should be determined based on the first motion information, the first motion information being motion information of the current block in a first direction, and the second motion information being motion information of the current block in a second direction; if the value of the first identifier is an eighth preset value, obtaining a fifth identifier, the fifth identifier being used to indicate whether the first motion information should be determined based on the second motion information; if the value of the fifth identifier is a fifth preset value, obtaining the second motion information and determining the first motion information based on the second motion information; and determining a predicted sample of the current block based on the first motion information and the second motion information.

[0106] Another implementation form includes the steps of: parsing the bitstream to obtain a second identifier, wherein the second identifier is used to indicate whether motion information of the current block should be calculated by using a motion information derivation algorithm; if the value of the second identifier is a second preset value, obtaining a third identifier, wherein the third identifier is used to indicate whether the second motion information should be determined based on the first motion information, wherein the first motion information is motion information of the current block in a first direction and the second motion information is motion information of the current block in a second direction; if the value of the third identifier is a sixth preset value, obtaining the second motion information and determining the first motion information based on the second motion information; and determining a predicted sample of the current block based on the first motion information and the second motion information.

[0107] For a specific description of the first to fourth identifiers, please refer to the description below.

[0108] In the bidirectional inter-prediction method provided in the present application, after an identifier is obtained by parsing the bitstream, whether to determine second motion information based on the first motion information is determined based on the value of the identifier. After it is determined that the second motion information needs to be determined based on the first motion information, the first motion information is obtained, and then the second motion information is determined based on the obtained first motion information. In this manner, the bitstream only needs to include the corresponding identifier and the first motion information, and no longer needs to include the second motion information. Compared with the prior art in which the bitstream includes motion information for each picture block in each direction, the bidirectional inter-prediction method provided in the present application substantially reduces the motion information included in the bitstream, improving the effective utilization of transmission resources, transmission rate, and coding rate.

[0109] According to an eleventh aspect, there is provided a bidirectional inter prediction apparatus, the bidirectional inter prediction apparatus including: an obtaining unit and a determining unit.

[0110] Specifically, in one implementation, the acquisition unit is configured to parse the bitstream to obtain a first identifier, the first identifier is used to indicate whether to determine second motion information based on the first motion information, and acquire the first motion information if the first motion information is motion information of a current block in a first direction, the second motion information is motion information of the current block in a second direction, and a value of the first identifier is a first preset value. The determination unit is configured to determine the second motion information based on the first motion information acquired by the acquisition unit, and determine a predicted sample of the current block based on the first motion information and the second motion information.

[0111] In another implementation, the acquisition unit is configured to parse the bitstream to obtain a second identifier, the second identifier is used to indicate whether to calculate motion information of the current block by using a motion information derivation algorithm, and if the value of the second identifier is a second preset value, obtain a third identifier, the third identifier is used to indicate whether to determine the second motion information based on the first motion information, the first motion information is motion information of the current block in a first direction, the second motion information is motion information of the current block in a second direction, and the value of the third identifier is a third preset value. The determination unit is configured to determine the second motion information based on the first motion information acquired by the acquisition unit, and determine a predicted sample of the current block based on the first motion information and the second motion information.

[0112] In another implementation, the acquisition unit is configured to parse the bitstream to obtain a second identifier, the second identifier is used to indicate whether to calculate motion information of the current block by using a motion information derivation algorithm, and acquire the first motion information if the value of the second identifier is a second preset value. The determination unit is configured to determine second motion information based on the first motion information acquired by the acquisition unit, the first motion information being motion information of the current block in a first direction, the second motion information being motion information of the current block in a second direction, and to determine a predicted sample of the current block based on the first motion information and the second motion information.

[0113] In another implementation, the acquisition unit is configured to parse the bitstream to obtain a fourth identifier, and the fourth identifier is used to indicate whether to calculate motion information of the current block by using a motion information derivation algorithm. The determination unit is configured to determine, when the value of the fourth identifier obtained by the acquisition unit is a fourth preset value, an index value of the first reference picture and an index value of the second reference picture based on the first reference picture list and the second reference picture list, where the first reference picture list is a reference picture list of the current block in a first direction, the second reference picture list is a reference picture list of the current block in a second direction, the first reference picture is a reference picture of the current block in the first direction, and the second reference picture is a reference picture of the current block in the second direction. The acquisition unit is further configured to obtain a first motion vector differential and a first motion vector predictor flag. The determination unit is further configured to determine second motion information based on the first motion information, where the first motion information includes an index value of the first reference picture, a first motion vector differential, and a first motion vector predictor flag, and the second motion information is motion information of the current block in a second direction, and to determine a predicted sample of the current block based on the first motion information and the second motion information.

[0114] According to a twelfth aspect, a terminal is provided. The terminal includes one or more processors, a memory, and a communication interface. The memory and the communication interface are coupled to the one or more processors. The memory is configured to store computer program code, and the computer program code includes instructions. When the one or more processors execute the instructions, the terminal performs a method (or a method corresponding to an apparatus) according to any one of the aforementioned aspects and possible implementation forms of the aforementioned aspects.

[0115] According to a thirteenth aspect, there is provided a video decoder, including a non-volatile storage medium and a central processing unit, wherein the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium and executes the executable program to perform a method (or a method corresponding to an apparatus) according to any one of the aforementioned aspects and possible implementations of the aforementioned aspects.

[0116] According to a fourteenth aspect, a decoder is provided. The decoder includes a bidirectional inter-predictor and a reconstruction module. The reconstruction module is configured to determine reconstructed sample values ​​of a current block based on prediction samples obtained by the bidirectional inter-predictor. The bidirectional inter-predictor may implement a method (or a method corresponding to the device) according to any one of the above aspects and possible implementation forms of the above aspects.

[0117] According to a fifteenth aspect, there is provided an encoder, which is capable of performing a method (or a method corresponding to an apparatus) according to any one of the aforementioned aspects and possible implementation forms of the aforementioned aspects, corresponding to or coupled to the aforementioned decoder.

[0118] According to a sixteenth aspect, there is provided a computer-readable storage medium storing instructions that, when executed on the aforementioned terminal, enable the terminal to perform a method (or a method corresponding to an apparatus) according to any one of the aforementioned aspects and possible implementation forms of the aforementioned aspects.

[0119] According to a seventeenth aspect, there is provided a computer program product including instructions, which, when executed on the aforementioned terminal, enable the terminal to perform a bidirectional inter-prediction method according to any one of the aforementioned aspects and possible implementation forms thereof.

[0120] In this application, the name of the bidirectional inter-prediction device does not impose any restrictions on the device or functional module. In actual implementation, the device or functional module may have other names. As long as the function of the device or functional module is similar to the function in this application, the device or functional module falls within the scope of the claims of this application and their equivalent technologies.

[0121] In the specific description of the first to sixteenth aspects and various implementation forms of the first to sixteenth aspects of the present application, free combinations may be implemented as long as they do not violate the laws of nature. In addition, some expressions and effects may also be universal in various solutions. Details will not be described in this specification.

[0122] These and other aspects of the present application will be more succinct and understandable in the following description. [Brief explanation of the drawings]

[0123] [Figure 1] 1 is a schematic structural diagram of a video coding system according to an embodiment of the present application; [Figure 2] 1 is a schematic structural diagram of a video encoder according to an embodiment of the present application; [Figure 3] 1 is a schematic structural diagram of a video decoder according to an embodiment of the present application; [Figure 4] 1 is a schematic flowchart of a bidirectional inter prediction method according to an embodiment of the present application; [Figure 5A] 1 is a schematic flowchart of another bidirectional inter prediction method according to an embodiment of the present application; [Figure 5B] 1 is a schematic structural diagram of a bidirectional inter-prediction device according to an embodiment of the present application; [Figure 5C] FIG. 2 is a schematic structural diagram of another bidirectional inter-prediction device according to an embodiment of the present application; [Figure 6A] FIG. 10 is a schematic structural diagram of yet another bidirectional inter-prediction device according to an embodiment of the present application; [Figure 6B]1 is a schematic structural diagram of a coding device according to an embodiment of the present application; [Figure 7] 31 is a block diagram of an exemplary architecture of a content delivery system 3100 implementing a content distribution service. [Figure 8] FIG. 2 is a block diagram of an exemplary structure of a terminal device. DETAILED DESCRIPTION OF THE INVENTION

[0124] In the specification, claims, and accompanying drawings of this application, terms such as "first," "second," "third," and "fourth" are intended to distinguish between different objects and do not denote a particular order.

[0125] In the embodiments of the present application, words such as "example" or "for example" are used to indicate providing an example, illustration, or explanation. Any embodiment or design manner described in the embodiments of the present application as the word "example" or "for example" should not be described as being preferred or having more advantages than another embodiment or design manner. Indeed, the use of words such as "example" or "for example" is intended to present the relevant concept in a particular manner.

[0126] To facilitate understanding of the embodiments of the present application, relevant elements in the embodiments of the present application are described herein first.

[0127] picture encoding: the process of compressing a sequence of pictures into a bitstream

[0128] Picture decoding: The process of recovering a bitstream into a reconstructed picture according to specific syntax rules and specific processing methods.

[0129] Currently, the video picture encoding process is as follows: the encoder side first divides the original picture into multiple non-overlapping parts, and each part can be used as a picture block. Then, the encoder side performs operations such as prediction, transformation, and quantization on each picture block to obtain a bitstream corresponding to the picture block. Prediction is to obtain a predictive block of a picture block, so that only the difference (also called a residual or residual block) between the picture block and the predictive block of the picture block is coded and transmitted, thereby reducing transmission overhead. Finally, the encoder side transmits the bitstream corresponding to the picture block to the decoder side.

[0130] Correspondingly, after receiving a bitstream, the decoder side performs a video decoding process. Specifically, the decoder side performs operations such as prediction, inverse quantization, and inverse transform on the received bitstream to obtain a reconstructed picture block (or called a picture block after reconstruction). This process is called a picture reconstruction process (or picture reconstruction process). Then, the decoder side collects the reconstructed blocks of all picture blocks in the original picture to obtain a reconstructed picture of the original picture, and plays back the reconstructed picture.

[0131] Existing video picture coding techniques include intra-prediction and inter-prediction. Inter-prediction is a prediction that is accomplished by coding / decoding a picture block by using correlation between a current picture and a reference picture of the current picture. The current picture may have one or more reference pictures. Specifically, a predicted picture block of a current block is generated based on samples in the reference picture of the current block.

[0132] Typically, the predictive picture block of a current block may be generated based on only one reference picture block, or may be generated based on at least two reference picture blocks. Generating the predictive picture block of a current block based on one reference picture block is called unidirectional prediction, while generating the predictive picture block of a current block based on at least two reference picture blocks is called bidirectional inter-prediction. The at least two reference picture blocks in bidirectional inter-prediction may be from the same reference picture or different reference pictures. In other words, the "direction" in this application is a general definition. One direction in this application corresponds to one reference picture block. The first and second directions below correspond to different reference picture blocks. The two reference picture blocks may be included in the forward reference picture / backward reference picture of the current block, or one reference picture block may be included in the forward reference picture of the current block and the other reference picture block may be included in the backward reference picture of the current block. Therefore, it can be understood that the first direction and the second direction correspond to different reference blocks, further correspond to different reference pictures, and further correspond to different reference picture lists (e.g., L0 and / or L1). Both the first direction and the second direction may be forward or backward, or the first direction and the second direction may be forward and backward, respectively, or backward and forward, respectively.

[0133] Optionally, the bidirectional inter prediction may be inter prediction performed by using correlation between a current video picture and a video picture that is coded and played before the current video picture, and correlation between the current video picture and a video picture that is coded before the current video picture and played after the current video picture.

[0134] It may be seen that bidirectional inter-prediction includes inter-prediction in two directions, commonly referred to as forward inter-prediction and backward inter-prediction. Forward inter-prediction may be inter-prediction performed by using correlation between a current video picture and a video picture that is coded and reconstructed before the current video picture. Backward inter-prediction may be inter-prediction performed by using correlation between a current video picture and a video picture that is coded and reconstructed after the current video picture.

[0135] Forward inter prediction corresponds to a forward reference picture list such as L0 (or L1), and backward inter prediction corresponds to a backward reference picture list such as L1 (or L0). The two reference picture lists may contain the same amount of reference pictures or different amounts of reference pictures.

[0136] Motion Compensation (MC) is the process of predicting the current block by using reference picture blocks.

[0137] In most coding frameworks, a video sequence includes a series of pictures, each of which is divided into at least one slice, and each slice is further divided into picture blocks. Video encoding / decoding is performed by picture blocks. The encoding / decoding may be performed row by row, starting from the top-left position of the picture, from left to right and from top to bottom. In this specification, a picture block may be a macroblock (MB) in the video coding standard H.264, or a coding unit (CU) in the High Efficiency Video Coding (HEVC) standard. This is not particularly limited in the embodiments of this application.

[0138] In this application, the picture block being coded / decoded is called the current picture block or current block, and the picture in which the current block is located is called the current picture.

[0139] Typically, the current picture may be a unidirectionally predicted picture (P picture) or a bidirectionally predicted picture (B picture). When the current picture is a P picture, it has one reference picture list. When the current picture is a B picture, it has two reference picture lists, usually called L0 and L1. Each reference picture list contains at least one reference picture used to reconstruct the current picture. The reference pictures are used to provide reference samples for inter prediction for the current picture.

[0140] In a current picture, neighboring picture blocks of the current block (e.g., to the left, above, or right of the current block) may be coded / decoded to obtain a reconstructed picture. The neighboring picture blocks are called reconstructed picture blocks. Information such as the coding mode and reconstructed samples of the reconstructed picture blocks is available.

[0141] A picture that was coded / decoded before the current picture was coded / decoded is called a reconstructed picture.

[0142] A motion vector (MV) is an important parameter in the inter prediction process, which represents the spatial displacement of a coded picture block relative to a current block. Usually, a motion estimation (ME) method such as motion search can be used to obtain the motion vector. In a preliminary inter prediction technique, the encoder side sends the motion vector of the current block in the bitstream so that the decoder side reproduces the predicted sample of the current block to obtain a reconstructed block. To further improve coding efficiency, it is further proposed to differentially code the motion vector by using a reference motion vector, i.e., to code only the motion vector difference (MVD).

[0143] To enable the decoder and encoder to use the same reference picture block, the encoder needs to transmit motion information for each picture block to the decoder through a bitstream. If the encoder directly encodes the motion vector for each picture block, a large amount of transmission resources will be consumed. Because the motion vectors of spatially adjacent picture blocks are strongly correlated, the motion vector of the current block can be predicted based on the motion vectors of adjacent encoded picture blocks. The motion vector obtained through prediction is called MVP, and the difference between the motion vector of the current block and the MVP is called MVD.

[0144] In the video coding standard H.264, multi-reference picture prediction is used in the motion estimation process to improve prediction accuracy. Specifically, a buffer is created to store multiple reconstructed pictures, and all reconstructed pictures in the buffer are searched for the optimal reference picture block for motion compensation to further eliminate temporal redundancy. In the video coding standard H.264, two buffers, reference picture list 0 (reference list 0 / L0) and reference picture list 1 (reference list 1 / L1), are used in inter prediction. The reference picture in which the optimal reference block in each list is located is marked by an index value, i.e., ref_idx_l0 or ref_idx_l1. In each reference picture list, the motion information of the reference picture block includes a reference picture index value (ref_idx_l0 or ref_idx_l1), an MVP flag (or MVP), and an MVD. The decoder side may find the correct reference picture block in the selected reference picture based on the reference picture index value, the MVP flag, and the MVD. It should be understood that in specific applications, the reference picture index value, the MVP flag (or MVP), and / or the MVD may also be collectively referred to as motion information by those skilled in the art. Therefore, the specific meaning of the motion information needs to be interpreted and explained with reference to specific application scenarios, and does not constrain the understanding of the concept.

[0145] Currently, the inter prediction modes frequently used in the HEVC standard are the Advanced Motion Vector Prediction (AMVP) mode, the Merge mode, and the non-transform motion model prediction mode.

[0146] In AMVP mode, the encoder side constructs a motion vector candidate list by using motion information of coded picture blocks spatially or temporally adjacent to the current block, and determines the optimal motion vector in the motion vector candidate list as the MVP of the current block based on the rate-distortion cost. In addition, the encoder side performs motion search in the neighborhood centered on the MVP to obtain the motion vector of the current block. The encoder side sends the index value (i.e., MVP flag), reference picture index value, and MVD of the MVP in the motion vector candidate list to the decoder side.

[0147] In the merge mode, the encoder side constructs a motion information candidate list by using the motion information of coded picture blocks spatially or temporally adjacent to the current block, and determines the most suitable motion information in the motion information candidate list as the motion information of the current block based on the rate-distortion cost, and sends the index value of the position of the most suitable motion information in the motion information candidate list to the decoder side.

[0148] In the non-transform motion model prediction mode, the encoder and decoder use the same motion model to derive the motion information of all sub-blocks of the current block, and then perform motion compensation based on the motion information of all sub-blocks to obtain a predicted picture block. This improves prediction efficiency. The motion models frequently used by the encoder and decoder are the 4-parameter affine model, the 6-parameter affine transformation model, or the 8-parameter bilinear model.

[0149] For example, a four-parameter affine transformation model may be represented by using two sample motion vectors and two sample coordinates relative to the sample at the upper left corner of the current block. In this specification, the samples used to represent the motion model parameters are called control points. If the sample at the upper left corner (0,0) of the current block and the sample at the upper right corner (W,0) of the current block are control points, and the motion vectors of the upper left corner and the upper right corner of the current block are (vx0,vy0) and (vx1,vy1), respectively, the motion information of each sub-block of the current block is obtained according to the following formula (1): In the following formula (1), (x,y) are the coordinates of the sub-block relative to the sample at the upper left corner of the current block, (vx,vy) are the motion vectors of the sub-block, and W is the width of the current block.

[0150]

number

[0151] For example, a six-parameter affine transformation model may be represented by using three motion vectors and three coordinates of the samples relative to the sample at the upper left corner of the current block. If the sample at the upper left corner (0,0) of the current block, the sample at the upper right corner (W,0) of the current block, and the sample at the lower left corner (0,H) of the current block are control points, and the motion vectors of the upper left corner, upper right corner, and lower left corner of the current block are (vx0,vy0), (vx1,vy1), and (vx2,vy2), respectively, the motion information of each sub-block of the current block is obtained according to the following equation (2): In the following equation (2), (x,y) are the coordinates of the sub-block relative to the sample at the upper left corner of the current block, (vx,vy) is the motion vector of the sub-block, and W and H are the width and height of the current block, respectively.

[0152]

number

[0153] For example, an eight-parameter bilinear model can be represented by using four motion vectors and four coordinates of the samples relative to the sample at the upper left corner of the current block. The sample at the upper left corner (0,0) of the current block, the sample at the upper right corner (W,0) of the current block, the sample at the lower left corner (0,H) of the current block, and the sample at the lower right corner (W,H) of the current block are control points. If the motion vectors of the upper left corner, upper right corner, lower left corner, and lower right corner of the current block are (vx0,vy0), (vx1,vy1), (vx2,vy2), and (vx3,vy3), respectively, the motion information of each sub-block of the current block is obtained according to the following equation (3): In the following equation (3), (x,y) are the coordinates of the sub-block relative to the sample at the upper left corner of the current block, (vx,vy) are the motion vectors of the sub-block, and W and H are the width and height of the current block, respectively.

[0154]

number

[0155] In any of the above inter-prediction modes, if the inter-prediction is bidirectional inter-prediction, it can be easily seen that the encoder side needs to transmit motion information of each picture block in each direction to the decoder side. As a result, the motion information occupies a relatively large amount of transmission resources, which reduces the effective utilization of transmission resources, transmission rate, and coding compression efficiency.

[0156] In order to solve the above-mentioned problem, this application provides a bidirectional inter-prediction method.In bidirectional inter-prediction, an encoder side sends the motion information of a current block in a first direction to a decoder side, and after receiving the motion information of the current block in a first direction, the decoder side calculates the motion information of the current block in a second direction based on the motion information of the current block in the first direction.In this manner, the predicted sample of the current block can be calculated based on the motion information of the current block in the first direction and the motion information of the current block in the second direction.

[0157] The bidirectional inter prediction method provided in this application may be performed by a bidirectional inter prediction device, a video coding device, a video codec, or another device having video coding functionality.

[0158] The bidirectional inter-prediction method provided in this application is applicable to a video coding system. In the video coding system, a video encoder and a video decoder are configured to calculate motion information of a current block according to the example of the bidirectional inter-prediction method provided in this application. Specifically, the motion information of the current block in a second direction can be calculated based on the motion information of the current block in a first direction, and thus the predicted sample of the current block is determined based on the motion information of the current block in the first direction and the motion information of the current block in the second direction. In this manner, only the motion information of the current block in the first direction needs to be transmitted between the video encoder and the video decoder. This substantially improves transmission resource utilization and coding compression efficiency.

[0159] FIG. 1 shows the structure of a video coding system. As shown in FIG. 1, the video coding system 1 includes a source device 10 and a destination device 20. The source device 10 generates encoded video data. The source device 10 may also be referred to as a video encoding device or a video encoding device. The destination device 20 may decode the encoded video data generated by the source device 10. The destination device 20 may also be referred to as a video decoding device or a video decoding device. The source device 10 and / or the destination device 20 may include at least one processor and a memory coupled to the at least one processor. The memory may include, but is not limited to, a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, or any other medium that can be configured to store required program code in the form of instructions or data structures that can be accessed by a computer. This is not particularly limited in this application.

[0160] The source device 10 and the destination device 20 may include a variety of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handheld telephone sets such as "smart" phones, television sets, cameras, display devices, digital media players, video game consoles, in-vehicle computers, and similar devices.

[0161] The destination device 20 may receive the encoded video data from the source device 10 through a link 30. The link 30 may include one or more media and / or devices capable of transferring the encoded video data from the source device 10 to the destination device 20. In one example, the link 30 may include one or more communication media that enable the source device 10 to transmit the encoded video data directly to the destination device 20 in real time. In this example, the source device 10 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to the destination device 20. The one or more communication media may include wireless 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 be part of a packet-based network (a local area network, a wide area network, or a global network (e.g., the Internet)). The one or more communication media may include a router, a switch, a base station, or another device that implements communication between the source device 10 and the destination device 20.

[0162] In another example, the encoded video data may be output to storage device 40 through output interface 103. Similarly, the encoded video data may be accessed from storage device 40 through input interface 203. Storage device 40 may include multiple types of locally accessible data storage media, such as Blu-ray® discs, high-density Digital Video Discs (DVDs), Compact Disc Read-Only Memory (CD-ROMs), flash memory, or another suitable digital storage medium configured to store encoded video data.

[0163] In another example, storage device 40 may correspond to a file server or another intermediate storage device that stores encoded video data generated by source device 10. In this example, destination device 20 may obtain the stored video data from storage device 40 through streaming transmission or download. The file server may be any type of server capable of storing encoded video data and transmitting the encoded video data to destination device 20. For example, the file server may include a World Wide Web (WWW) server (e.g., used for websites), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, or a local disk drive.

[0164] Destination device 20 may access the encoded video data through any standard data connection (e.g., an Internet connection). Exemplary types of data connections include wireless channels or wired connections (e.g., cable modems), or combinations thereof, that may be used to access encoded video data stored on a file server. Transmission of the encoded video data from the file server may be a streaming transmission, a download transmission, or a combination thereof.

[0165] The bidirectional inter prediction method in the present application is not limited to wireless application scenarios. For example, the bidirectional inter prediction method in the present application may be used in video coding to support multiple multimedia applications, such as terrestrial television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., over the Internet), encoding video data stored in a data storage medium, decoding video data stored in a data storage medium, or another application. In some examples, the video coding system 1 may be configured to support unidirectional or bidirectional video transmission to support applications such as streaming video transmission, video playback, video broadcasting, and / or video telephony.

[0166] It should be noted that the video coding system 1 shown in FIG. 1 is merely an example of a video coding system and does not limit the video coding system in this application. The bidirectional inter prediction method provided in this application is further applicable to a scenario in which there is no data communication between an encoding device and a decoding device. In another example, the video data to be encoded or the encoded video data may be retrieved from a local memory, transmitted in a streaming manner over a network, etc. The video encoding device may encode the video data to be encoded and store the encoded video data in a memory. The video decoding device may retrieve the encoded video data from the memory and decode the encoded video data.

[0167] 1, source device 10 includes video source 101, video encoder 102, and output interface 103. In some examples, output interface 103 may include a modulator / demodulator (modem) and / or a transmitter. Video source 101 may include a video capture device (e.g., a camera), a video archive containing previously captured video data, a video input interface for receiving video data from a video content provider, and / or a computer graphics system for generating video data, or a combination of the aforementioned video data sources.

[0168] Video encoder 102 may encode video data from video source 101. In some examples, source device 10 transmits the encoded video data directly to destination device 20 through output interface 103. In other examples, the encoded video data may alternatively be stored on storage device 40, so that destination device 20 later accesses the encoded video data for decoding and / or playback.

[0169] 1, destination device 20 includes a display device 201, a video decoder 202, and an input interface 203. In some examples, input interface 203 includes a receiver and / or a modem. Input interface 203 may receive encoded video data over link 30 and / or from storage device 40. Display device 201 may be integrated with destination device 20 or may be disposed external to destination device 20. Typically, display device 201 displays the decoded video data. Display device 201 may include multiple types of display devices, for example, a liquid crystal display, a plasma display, an organic light-emitting diode display, or another type of display device.

[0170] Optionally, the video encoder 102 and the video decoder 202 may be integrated with an audio encoder and an audio decoder, respectively, and may include appropriate multiplexer-demultiplexer units or other hardware and software for encoding both audio and video in a combined data stream or separate data streams.

[0171] The video encoder 102 and the video decoder 202 may include at least one microprocessor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA), discrete logic, hardware, or any combination thereof. When the bidirectional inter-prediction method provided herein is implemented by using software, the instructions used for the software may be stored in a suitable non-volatile computer-readable storage medium, and at least one processor may be used to execute the instructions in the hardware to implement the present application. Any one of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered at least one processor. The video encoder 102 may be included in an encoder, the video decoder 202 may be included in a decoder, or the encoder or decoder may be part of a combined encoder / decoder (codec) in a corresponding device.

[0172] The video encoder 102 and the video decoder 202 in this application may perform operations in accordance with a video compression standard (e.g., HEVC or VVC) or may perform operations in accordance with another industry standard, which is not particularly limited in this application.

[0173] The video encoder 102 is configured to determine motion information of a current block in a first direction and perform bidirectional motion estimation on the current block to calculate motion information of the current block in a second direction based on the motion information of the current block in the first direction. In this manner, the video encoder 102 determines a predictive picture block of the current block based on the motion information of the current block in the first direction and the motion information of the current block in the second direction. Furthermore, the video encoder 102 performs operations such as transform and quantization on a residual between the current block and the predictive picture block of the current block to generate a bitstream and transmits the bitstream to the video decoder 202. The bitstream includes the motion information of the current block in the first direction and indication information used to indicate that the second motion information is determined based on the first motion information. The indication information may be represented by using different identifiers. For a method for representing the indication information, see the description of the subsequent example.

[0174] Optionally, the method of "video encoder 102 calculating motion information of the current block in the second direction based on motion information of the current block in the first direction" may be that video encoder 102 determines a motion vector of the current block in the second direction based on the motion vector of the current block in the first direction, or that video encoder 102 determines a motion vector differential of the current block in the second direction based on the motion vector differential of the current block in the first direction, and determines a motion vector of the current block in the second direction based on the motion vector differential of the current block in the second direction and a predicted motion vector of the current block in the second direction.

[0175] Referring below to FIG. 4, the video decoder 202 may be configured to perform the following steps.

[0176] S400: Obtain a bitstream to obtain instruction information used to determine second motion information based on first motion information, i.e., to indicate deriving and calculating motion information in one direction based on motion information in another direction, and parse the bitstream, wherein the first motion information includes motion information of a current block in a first direction and the second motion information includes motion information of the current block in a second direction, and the first direction is different from the second direction.

[0177] S401: First motion information is acquired.

[0178] S402: Determine second motion information based on the acquired first motion information.

[0179] S403: The video decoder 202 determines a prediction sample of the current block based on the first motion information and the second motion information.

[0180] The method of "video decoder 202 calculating motion information of the current block in the second direction based on motion information of the current block in the first direction" may be that video decoder 202 determines the motion vector of the current block in the second direction based on the motion vector of the current block in the first direction, or that video decoder 202 determines the motion vector differential of the current block in the second direction based on the motion vector differential of the current block in the first direction, and determines the motion vector of the current block in the second direction based on the motion vector differential of the current block in the second direction and the predicted motion vector of the current block in the second direction.

[0181] 2 is a schematic structural diagram of a video encoder 102 according to an embodiment of the present application. As shown in FIG. 2, the video encoder 102 is configured to output video to a post-processing entity 41. The post-processing entity 41 represents an example of a video entity capable of processing encoded video data from the video encoder 102, such as a media-aware network element (MANE) or an integrator / editor. In some cases, the post-processing entity 41 may be an example of a network entity. In some video coding systems, the post-processing entity 41 and the video encoder 102 may be components of separate devices, while in other cases, the functionality described with respect to the post-processing entity 41 may be implemented by the same device that includes the video encoder 102. In one example, the post-processing entity 41 is an example of the storage device 40 of FIG. 1.

[0182] The video encoder 102 may derive and calculate motion information of the current block in a second direction based on the motion information of the current block in a first direction, and further determine a predictive picture block of the current block based on the motion information of the current block in the first direction and the motion information of the current block in the second direction to complete bidirectional inter-predictive encoding.

[0183] 2, video encoder 102 includes a transformer 301, a quantizer 302, an entropy encoder 303, a filter 306, a memory 307, a prediction processing unit 308, and an adder 312. Prediction processing unit 308 includes an intra predictor 309 and an inter predictor 310. To reconstruct picture blocks, video encoder 102 further includes an inverse quantizer 304, an inverse transformer 305, and an adder 311. Filter 306 is defined to represent one or more loop filters, e.g., a deblocking filter, an adaptive loop filter, and a sample adaptive offset filter.

[0184] Memory 307 may store video data encoded by components of video encoder 102. The video data stored in memory 307 may be obtained from video source 101. Memory 307 may be a reference picture memory that stores reference video data used by video encoder 102 to encode video data in intra-coding or inter-coding modes. Memory 307 may be random access memory (dynamic RAM, DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or another type of memory device.

[0185] The video encoder 102 receives video data and stores the video data in a video data memory. A partition unit partitions the video data into several picture blocks, which may be further partitioned into smaller blocks. For example, picture block partitioning based on a quadtree structure or a binary tree structure is performed. The partitioning may further include partitioning into slices, tiles, or other larger units. The video encoder 102 is typically a component for encoding picture blocks in a video slice to be coded. A slice may be partitioned into multiple picture blocks (which may be partitioned into sets of picture blocks called tiles).

[0186] An intra predictor 309 in prediction processing unit 308 may perform intra predictive coding on the current block relative to one or more neighboring picture blocks in the same picture or slice as the current block to eliminate spatial redundancy. An inter predictor 310 in prediction processing unit 308 may perform inter predictive coding on the current block relative to one or more predictive picture blocks in one or more reference pictures to eliminate temporal redundancy.

[0187] The prediction processing unit 308 may provide the obtained intra-coded and inter-coded picture blocks to an adder 312 to generate residual blocks, and provide the residual blocks to an adder 311 to reconstruct coding blocks to be used as reference pictures.

[0188] After prediction processing unit 308 generates a predictive picture block for a current block through inter-prediction and intra-prediction, video encoder 102 generates a residual picture block by subtracting the predictive picture block from the current block to be encoded. Adder 312 represents one or more components that perform this subtraction operation. The residual video data in the residual block may be included in one or more transform units (TUs) and used by transformer 301. Transformer 301 converts the residual video data into residual transform coefficients through a transform, such as a discrete cosine transform (DCT) or a conceptually similar transform. Transformer 301 may convert the residual video data from the sample value domain to a transform domain, e.g., the frequency domain.

[0189] The transformer 301 may send the obtained transform coefficients to the quantizer 302. The quantizer 302 quantizes the transform coefficients to further reduce the bit rate. In some examples, the quantizer 302 may further scan a matrix including the quantized transform coefficients. Alternatively, the entropy encoder 303 may perform the scan.

[0190] After quantization, the entropy encoder 303 performs entropy coding on the quantized transform coefficients. For example, the entropy encoder 303 may perform context-adaptive variable-length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), or another entropy coding method or technique. After the entropy encoder 303 performs entropy coding, the encoded bitstream may be transmitted to the video decoder 202 or archived for later transmission or retrieval by the video decoder 202. The entropy encoder 303 may further perform entropy coding on syntax elements of the current block to be coded.

[0191] The inverse quantizer 304 and the inverse transformer 305 perform inverse quantization and inverse transformation, respectively, to reconstruct residual blocks in a sample domain, e.g., to be later used as reference blocks of a reference picture. The adder 311 adds the reconstructed residual blocks to predictive picture blocks generated by the inter predictor 310 or the intra predictor 309 to generate reconstructed picture blocks. The predictive picture blocks of a picture block may be obtained by performing processing (such as interpolation) on the reference picture blocks of the picture block.

[0192] It should be understood that other structural variations of the video encoder 102 may be used to encode the video stream. For example, for some picture blocks or pictures, the video encoder 102 may directly quantize the residual signal, and correspondingly, processing by the transformer 301 and the inverse transformer 305 is not required. Alternatively, for some picture blocks or pictures, the video encoder 102 does not generate residual data, and correspondingly, processing by the transformer 301, the quantizer 302, the inverse quantizer 304, and the inverse transformer 305 is not required. Alternatively, the video encoder 102 may directly store the reconstructed picture block as a reference block without processing by the filter 306. Alternatively, the quantizer 302 and the inverse quantizer 304 in the video encoder 102 may be combined.

[0193] 3 is a schematic structural diagram of a video decoder 202 according to an embodiment of the present application. As shown in FIG. 3, the video decoder 202 includes an entropy decoder 401, an inverse quantizer 402, an inverse transformer 403, a filter 404, a memory 405, a prediction processing unit 406, and an adder 409. The prediction processing unit 406 includes an intra predictor 407 and an inter predictor 408. In some examples, the video decoder 202 may perform a decoding process that is generally the reverse of the encoding process described with respect to the video encoder 102 of FIG. 2.

[0194] In the decoding process, the video decoder 202 receives a bitstream from the video encoder 102. The video decoder 202 may receive video data from a network entity 42 and, optionally, may further store the video data in a video data memory (not shown). The video data memory may store video data, e.g., an encoded bitstream, to be decoded by components of the video decoder 202. The video data stored in the video data memory may be obtained from a local video source, such as the storage device 40 or a camera, through wired or wireless network communication of the video data or by accessing a physical data storage medium. Although the video data memory is not shown in FIG. 3, the video data memory and the memory 405 may be the same memory or may be separately disposed memories. The video data memory and the memory 405 may each include any one of several types of memory devices, e.g., dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or another type of memory device. In various examples, the video data memory may be integrated onto a chip with other components of the video decoder 202, or may be disposed off-chip relative to those components.

[0195] Network entity 42 may be, for example, a server, a MANE, a video editor / clipper, or another device configured to implement one or more of the techniques described above. Network entity 42 may or may not include a video encoder, e.g., video encoder 102. Network entity 42 may perform some of the techniques described in this application before it sends the bitstream to video decoder 202. In some video decoding systems, network entity 42 and video decoder 202 may be components of separate devices. In other cases, the functionality described with respect to network entity 42 may be implemented by the same device that includes video decoder 202. In some cases, network entity 42 may be an example of storage device 40 of FIG. 1.

[0196] The entropy decoder 401 of the video decoder 202 performs entropy decoding on the bitstream to generate quantized coefficients and some syntax elements. The entropy decoder 401 forwards the syntax elements to the filter 404. The video decoder 202 may receive multiple syntax elements / one syntax element at the video slice level and / or the picture block level. In the present application, in some examples, the syntax element herein may include indication information about the current block, and the indication information is used to indicate that the second motion information should be determined based on the first motion information. In addition, in some examples, the video encoder 102 may transmit a signal to notify a specific syntax element indicating whether the second motion information should be determined based on the first motion information.

[0197] The inverse quantizer 402 performs inverse quantization, i.e., dequantizes, on the quantized transform coefficients provided in the bitstream and decoded by the entropy decoder 401. The inverse quantization process may include determining the degree of quantization to be applied by using quantization parameters calculated by the video encoder 102 for each picture block in the video slice, and similarly determining the degree of inverse quantization to be applied. The inverse transformer 403 applies 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 sample domain.

[0198] After prediction processing unit 406 generates a predictive picture block for the current block or a sub-block of the current block, video decoder 202 adds the residual block from inverse transformer 403 and the corresponding predictive picture block generated by prediction processing unit 406 to obtain a reconstructed block, i.e., a decoded picture block. Adder 409 (also referred to as reconstructor 409) represents a component that performs this addition operation. When necessary, a filter (in or after the decoding loop) may further be used to smooth samples or otherwise improve video quality. Filter 404 may be one or more loop filters, such as a deblocking filter, an adaptive loop filter (ALF), and a sample adaptive offset (SAO) filter.

[0199] It should be understood that other structural variations of the video decoder 202 may be used to decode the bitstream. For example, for some picture blocks or pictures, the entropy decoder 401 of the video decoder 202 does not obtain quantized coefficients through decoding, and correspondingly, processing by the inverse quantizer 402 and the inverse transformer 403 is not required. For example, the inverse quantizer 402 and the inverse transformer 403 in the video decoder 202 may be combined.

[0200] With reference to the video coding system 1 shown in FIG. 1, the video encoder 102 shown in FIG. 2, and the video decoder 202 shown in FIG. 3, the bidirectional inter prediction method provided in the present application will be described in detail below.

[0201] 4 is a schematic flowchart of a bidirectional inter prediction method according to an embodiment of the present application. The method shown in FIG. 4 is performed by a bidirectional inter prediction device. The bidirectional inter prediction device may be the video decoder 202 in FIG. 1. FIG. 4 is explained by using an example in which the bidirectional inter prediction device is the video decoder 202.

[0202] As shown in FIG. 4, the bidirectional inter prediction method in this embodiment of the present application may include the following steps:

[0203] S400: (Video decoder 202) parses the obtained bitstream and obtains the indication information.

[0204] Optionally, video decoder 202 may parse the bitstream and determine, based on values ​​of syntax elements in the bitstream, an inter-prediction mode to be used to perform inter prediction on the current block in the current picture. When the inter-prediction mode is a bidirectional inter-prediction mode, video decoder 202 obtains indication information.

[0205] Video decoder 202 may receive the encoded bitstream transmitted by video encoder 102 or may obtain the encoded bitstream from storage device 40 .

[0206] Optionally, the video decoder 202 in this embodiment of the present application determines an inter-prediction mode used to perform inter prediction on a current block in a current picture based on the value of the syntax element inter_pred_idc. From the above description, it can be seen that inter prediction includes unidirectional inter prediction and bidirectional inter prediction. Optionally, when the value of the syntax element inter_pred_idc is 0, the video decoder 202 may determine that the inter-prediction mode used to perform inter prediction on a current block in a current picture is forward inter prediction. When the value of the syntax element inter_pred_idc is 1, the video decoder 202 may determine that the inter-prediction mode used to perform inter prediction on a current block in a current picture is backward inter prediction. When the value of the syntax element inter_pred_idc is 2, the video decoder 202 may determine that the inter-prediction mode used to perform inter prediction on a current block in a current picture is bidirectional inter prediction.

[0207] Optionally, after determining that the value of the syntax element inter_pred_idc is 2, video decoder 202 obtains indication information used to indicate determining second motion information based on first motion information, where the first motion information is motion information of the current block in a first direction, and the second motion information is motion information of the current block in a second direction, and the first direction is different from the second direction.

[0208] A picture block in the present application may be a basic unit for performing video encoding or video decoding, such as a coding unit (CU), or may be a basic unit for performing a prediction operation, such as a prediction unit (PU), which is not particularly limited in this embodiment of the present application.

[0209] Optionally, the current block in this embodiment of the present application may further include at least one sub-block. Correspondingly, the first motion information may include motion information of each of at least one sub-block of the current block in a first direction, and the second motion information may include motion information of each of at least one sub-block of the current block in a second direction, and indication information may be used to indicate that the motion information of the sub-block in the second direction is determined based on the motion information of the sub-block in the first direction. Optionally, the current block may alternatively be an indivisible sub-block.

[0210] The video decoder 202 may obtain the indication information in multiple ways, including but not limited to the following implementations.

[0211] In a first implementation, the video decoder 202 parses the first identifier. When the value of the first identifier is the first preset value, the video decoder 202 determines to parse the first motion information and calculates the second motion information based on the first motion information. When the value of the first identifier is the eighth preset value, the video decoder 202 parses the bitstream to obtain the fifth identifier. When the value of the fifth identifier is the fifth preset value, the video decoder 202 determines to parse the second motion information and calculates the first motion information based on the second motion information. When the value of the fifth identifier is the ninth preset value, the video decoder 202 obtains the first motion information and the second motion information. For example, when the first preset value, the eighth preset value, the ninth preset value, and the fifth preset value represent true, the first preset value, the eighth preset value, the ninth preset value, and the fifth preset value may each be 1. Alternatively, when the first preset value, the eighth preset value, the ninth preset value, and the fifth preset value represent true, the first preset value, the eighth preset value, the ninth preset value, and the fifth preset value may each be 0. This is not limited in the present application. For example, the first preset value, the eighth preset value, the ninth preset value, and the fifth preset value may be the same or different, for example, each may be either 0 or 1. This is not particularly limited in this embodiment of the present application. Specifically, a first identifier is first obtained. When the first identifier is the first preset value, it indicates that the second motion information can be determined based on the first motion information. When the first identifier is the eighth preset value, it indicates that the second motion information cannot be determined based on the first motion information. In this case, a fifth identifier needs to be obtained.When the fifth identifier is a fifth preset value, it indicates that the first motion information can be determined based on the second motion information. When the fifth identifier is a ninth preset value, it indicates that the first motion information and the second motion information can be obtained through parsing. In this case, the first motion information and the second motion information cannot be derived from each other.

[0212] For example, the first identifier may be mv_derived_flag_l0, the fifth identifier may be mv_derived_flag_l1, the first preset value and the fifth preset value may both be 1, and the eighth preset value and the ninth preset value may both be 0. The video decoder 202 first parses mv_derived_flag_l0. When the value of mv_derived_flag_l0 is 1, the video decoder 202 parses the first motion information and determines second motion information based on the first motion information. When the value of mv_derived_flag_l0 is 0, the video decoder 202 parses mv_derived_flag_l1. When the value of mv_derived_flag_l1 is 1, the video decoder 202 parses the second motion information and calculates first motion information based on the second motion information. When the value of mv_derived_flag_l0 and the value of mv_derived_flag_l1 are both 0, the video decoder 202 parses the first motion information and the second motion information.

[0213] It should be understood that the identifiers and values ​​in this embodiment of the invention are examples only, and that the variety of identifiers and values ​​is not exhaustive or limiting on the invention.

[0214] In a second implementation, the video decoder 202 parses the second identifier. When the value of the second identifier is a second preset value, the video decoder 202 determines to calculate motion information of the current block by using a motion information derivation algorithm. Then, the video decoder 202 parses the third identifier. When the value of the third identifier is a third preset value, the video decoder 202 determines to parse the first motion information and determines second motion information based on the first motion information. In other words, the video decoder 202 obtains instruction information. When the value of the third identifier is a sixth preset value, the video decoder 202 determines to parse the second motion information and calculates first motion information based on the second motion information.

[0215] Specifically, a second identifier is first obtained. When the second identifier is a second preset value, it indicates that one motion information can be derived based on another motion information. Furthermore, a third identifier is obtained. When the value of the third identifier is a third preset value, it indicates that the second motion information can be determined based on the first motion information. When the value of the third identifier is a sixth preset value, it indicates that the first motion information can be determined based on the second motion information.

[0216] For example, the second identifier is derived_mv_flag, the third identifier is derived_mv_direction, the third preset value is 1, and the sixth preset value is 0. The video decoder 202 first parses derived_mv_flag. When the value of derived_mv_flag is 1, the video decoder 202 determines to calculate the motion information of the current block by using a motion information derivation algorithm. When the value of derived_mv_flag is 0, the video decoder 202 parses the first motion information and the second motion information. When the value of derived_mv_direction is 1, the video decoder 202 parses the first motion information and determines the second motion information based on the first motion information. When the value of derived_mv_direction is 0, the video decoder 202 determines to parse the second motion information and calculates the first motion information based on the second motion information.

[0217] In a third implementation, the video decoder 202 parses the second identifier. When the value of the second identifier is a second preset value, the video decoder 202 determines to calculate the motion information of the current block by using a motion information derivation algorithm. Then, the video decoder 202 determines to parse the first motion information based on the preset derivation direction and determines the second motion information based on the first motion information. In other words, the video decoder 202 obtains instruction information. In other words, in this implementation, "determining the second motion information based on the first motion information" is preset. When the value of the second identifier is a seventh preset value, the first motion information and the second motion information are parsed. In other words, in this case, the first motion information and the second motion information cannot be obtained through derivation.

[0218] For example, the second identifier is derived_mv_flag, the second preset value is 1, and the seventh preset value is 0. The video decoder 202 parses derived_mv_flag. When the value of derived_mv_flag is 1, the video decoder 202 determines to calculate motion information of the current block by using a motion information derivation algorithm. Furthermore, the video decoder 202 determines to parse the first motion information and determines second motion information based on the first motion information. When the value of derived_mv_flag is 0, the video decoder 202 parses the first motion information and the second motion information.

[0219] In a fourth implementation, the video decoder 202 parses a fourth identifier (e.g., mv_derived_flag_l0). When the value of the fourth identifier is a fourth preset value, the video decoder 202 determines to calculate motion information of the current block by using a motion information derivation algorithm and calculates a variable derived_ref_num based on the first reference picture list and the second reference picture list. This variable represents the amount of mirrored / linear reference picture pairs that may be formed based on the first reference picture and the second reference picture. When the amount of reference picture pairs is 1, the video decoder 202 directly determines the reference picture index value. Then, the video decoder 202 determines to parse the first motion information based on the preset derivation direction and determines the second motion information based on the first motion information. The first reference picture list is the reference picture list of the current block in the first direction, the second reference picture list is the reference picture list of the current block in the second direction, the first reference picture is the reference picture of the current block in the first direction, and the second reference picture is the reference picture of the current block in the second direction. The reference picture index value in this embodiment of the present application may refer to the number of a reference picture in the corresponding reference picture list.

[0220] For example, the picture order count (POC) of the current picture is 4, the first reference picture list is {2, 0}, and the second reference picture list is {6, 7}. It is assumed that a reference picture in the first reference picture list whose picture order count is 2 (which may be understood as the first reference picture) and a reference picture in the second reference picture list whose picture order count is 6 (which may be understood as the second reference picture list) can be determined to form a reference picture pair (for example, according to the following condition B or condition C). Therefore, it can be seen that the index value of the first reference picture in the first reference picture list and the index value of the second reference picture in the second reference picture list are 0. Specifically, when there is only one reference picture pair, the reference picture pair may be directly used as the target reference picture, and the index of the position corresponding to the target reference picture in the reference picture list is the index of the reference picture. In this case, the index value of the reference picture does not need to be obtained through parsing.

[0221] In one possible specific implementation, the elements in the reference picture list may be several indicators, including but not limited to the picture order count POC of a reference picture. A picture order count may correspond to the index of one particular reference picture and / or its position in the reference picture list, i.e., the reference picture index.

[0222] In one possible specific implementation, the elements in the reference picture list may be pictures (reference pictures). A picture may correspond to a specific POC and the index of the picture's position in the reference picture list, i.e., the reference picture index.

[0223] It is assumed that it is determined (according to condition B or condition C below) that the picture order count of the current picture is 4, the first reference picture list is {2,0}, the second reference picture list is {6,7}, a reference picture in the first reference picture list whose picture order count is 2 (which may be understood as the first reference picture) and a reference picture in the second reference picture list whose picture order count is 6 (which may be understood as the second reference picture) can form a reference picture pair, and a reference picture in the first reference picture list whose picture order count is 0 and a reference picture in the second reference picture list whose picture order count is 7 can also form a reference picture pair. In this case, the video decoder 202 needs to parse the reference picture index values. In other words, when there are multiple pairs of reference pictures, the index values ​​of the reference pictures can be obtained through parsing.

[0224] Furthermore, when determining that the inter prediction mode is a bidirectional inter prediction mode, the video decoder 202 may further determine whether the feature information of the current picture satisfies a predetermined condition (including but not limited to the following conditions A, B, C, D, and / or E). In this manner, when the feature information of the current picture satisfies the predetermined condition, the video decoder 202 obtains the indication information. In other words, the specific process of S400 may alternatively be as follows: When the video decoder 202 determines that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current picture satisfies the predetermined condition, the video decoder 202 obtains the indication information.

[0225] The feature information of the current picture may include, but is not limited to, at least one of a Picture Order Count (POC), a Temporal Level ID (TID), and / or the amount of reference pictures. The bitstream obtained by the video decoder 202 includes a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), a slice header or a slice segment header, and coded picture data. The video decoder 202 then parses the bitstream to obtain the feature information of the current picture.

[0226] Optionally, the pre-set conditions include at least one of the following conditions:

[0227] Condition A: The current block has at least two reference pictures.

[0228] Condition B: The picture order count of the current picture, the picture order count of the first reference picture, and the picture order count of the second reference picture satisfy the following equation: POC_Cur-POC_listX=POC_listY-POC_Cur

[0229] In this specification, POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, and POC_listY represents the picture order count of the second reference picture, where the first reference picture is the reference picture of the current block in the first direction and the second reference picture is the reference picture of the current block in the second direction, and the first reference picture may be in the first reference picture list and the second reference picture may be in the second reference picture list.

[0230] Condition C: The picture order count of the current picture, the picture order count of the first reference picture, and the picture order count of the second reference picture satisfy the following equation: (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0

[0231] In this specification, POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, and POC_listY represents the picture order count of the second reference picture, where the first reference picture is the reference picture of the current block in the first direction, and the second reference picture is the reference picture of the current block in the second direction. It is clear that this formula particularly indicates that the picture order count of the current picture needs to be between the picture order count of the first reference picture and the picture order count of the second reference picture. More specifically, this formula may indicate that one of the first reference picture and the second reference picture is before the current picture in the time series, and the other is after the current picture in the time series.

[0232] Condition D: The TID of the current picture is equal to or greater than a preset value.

[0233] The preset condition in this embodiment of the present application may be preset or may be specified in a parameter set in a higher layer syntax, such as an SPS, a PPS, a slice header, or a slice segment header, which is not particularly limited in this embodiment of the present application.

[0234] Condition E: mvd_l1_zero_flag of the current picture is 0.

[0235] mvd_l1_zero_flag is a flag bit obtained by video decoder 202 through syntax parsing. When mvd_l1_zero_flag is 1, it indicates that the MVD in list 1 does not need to be parsed (mvd_l1_zero_flag equal to 1 indicates that the mvd_coding(x0, y0, 1) syntax structure is not parsed and MvdL1[ x0 ][ y0 ][ compIdx ] is set equal to 0 for compIdx = 0..1. mvd_l1_zero_flag equal to 0 indicates that the mvd_coding(x0, y0, 1) syntax structure is parsed). Specifically, mvd_l1_zero_flag=1 may be used to indicate that the second motion vector differential is 0, and mvd_l1_zero_flag=0 may be used to indicate whether the second motion vector differential needs to be parsed or derived.

[0236] Specifically, for condition B (or condition C), video decoder 202 obtains the picture order count of one reference picture from each of the first reference picture list and the second reference picture list, and determines whether the obtained picture order count of the reference picture and the picture order count of the current picture satisfy condition B or condition C. When condition B (or condition C) is satisfied, the indication information is obtained. It should be understood that video decoder 202 may obtain any reference picture from each of the first reference picture list and the second reference picture list to perform the condition matching.

[0237] Optionally, for condition A, video decoder 202 sets the reference picture index value in the first direction (SymRefIdxX) to 0 and sets the reference picture index value in the second direction (SymRefIdxY) to 0.

[0238] Optionally, for condition B, video decoder 202 searches a first reference picture list for a reference picture whose picture order count is less than the current picture order count and closest to the current picture, where the picture order count of that reference picture or that reference picture may be re-denoted as POC_listX. Then, video decoder 202 searches a second reference picture list for a reference picture that satisfies POC_Cur-POC_listX=POC_listY-POC_Cur, where the picture order count of that reference picture or that reference picture may be re-denoted as POC_listY. If reference pictures POC_listX and POC_listY that satisfy the requirements can be found in this search manner, the reference picture index value in the first direction (SymRefIdxX) is set to the index value of POC_listX in the first reference picture list, and the reference picture index value in the second direction (SymRefIdxY) is set to the index value of POC_listY in the second reference picture list. Optionally, if reference pictures POC_listX and POC_listY that satisfy the requirements cannot be found, video decoder 202 further searches for a reference picture POC_listX whose picture order count is greater than the picture order count of the current picture and closest to the current picture, and video decoder 202 searches a second reference picture list for a reference picture POC_listY that satisfies POC_Cur-POC_listX=POC_listY-POC_Cur. If reference pictures POC_listX and POC_listY that satisfy the requirements can be found in this search manner, the reference picture index value (SymRefIdxX) in the first direction is set to the index value of POC_listX in the first reference picture list, and the reference picture index value (SymRefIdxY) in the second direction is set to the index value of POC_listY in the second reference picture list. The first direction may correspond to a first reference picture list, and the second direction may correspond to a second reference picture list.

[0239] Optionally, for the aforementioned possible conditions, such as condition C, video decoder 202 searches the first reference picture list for a reference picture whose picture order count is less than the picture order count of the current picture and closest to the current picture, and the picture order count of that reference picture may be re-denoted as POC_listX. Then, video decoder 202 searches the second reference picture list for a reference picture whose picture order count is greater than the picture order count of the current picture and closest to the current picture, and the picture order count of that reference picture may be re-denoted as POC_listY. If reference pictures POC_listX and POC_listY that meet the requirements can be found in this search manner, the reference picture index value in the first direction (SymRefIdxX) is set to the index value of POC_listX in the first reference picture list (which may correspond to the reference picture whose POC is POC_listX), and the reference picture index value in the second direction (SymRefIdxY) is set to the index value of POC_listY in the second reference picture list (which may correspond to the reference picture whose POC is POC_listY). Optionally, if reference pictures POC_listX and POC_listY that meet the requirements cannot be found, video decoder 202 further searches for a reference picture POC_listX whose picture order count is greater than the picture order count of the current picture and closest to the current picture, and video decoder 202 searches the second reference picture list for a reference picture POC_listY whose picture order count is less than the picture order count of the current picture and closest to the current picture.If reference pictures POC_listX and POC_listY that meet the requirements can be found using this search method, the reference picture index value in the first direction (SymRefIdxX) is set to the index value of POC_listX in the first reference picture list, and the reference picture index value in the second direction (SymRefIdxY) is set to the reference picture index value of POC_listY in the second reference picture list. The first direction may correspond to the first reference picture list, and the second direction may correspond to the second reference picture list, or vice versa.

[0240] Searching a first reference picture list (e.g., L0) for a reference picture whose picture order count is less than the picture order count of the current picture and closest to the current picture can be expressed syntactically by using the following expression: - DiffPicOrderCnt(currPic,RefPicList[0][i])>0, - DiffPicOrderCnt(currPic,RefPicList[0][i]) <DiffPicOrderCnt(currPic,RefPicList[0][RefIdxSymL0]) RefIdxSymL0 is set to i.

[0241] In the first reference picture list, the reference picture with index RefIdxSymL0 is the reference picture to be found.

[0242] Searching a second reference picture list (e.g., L1) for a reference picture whose picture order count is greater than the picture order count of the current picture and closest to the current picture can be expressed syntactically by using the following expression: - DiffPicOrderCnt(currPic,RefPicList[1][i])<0, - DiffPicOrderCnt(currPic,RefPicList[1][i])>DiffPicOrderCnt(currPic,RefPicList[1][RefIdxSymL1]) RefIdxSymL1 is set to i.

[0243] In the second reference picture list, the reference picture with index RefIdxSymL1 is the reference picture to be found.

[0244] Searching a second reference picture list (e.g., L1) for a reference picture whose picture order count is less than the picture order count of the current picture and closest to the current picture can be expressed syntactically by using the following expression: - DiffPicOrderCnt(currPic,RefPicList[1][i])>0, - DiffPicOrderCnt(currPic,RefPicList[1][i]) <DiffPicOrderCnt(currPic,RefPicList[1][RefIdxSymL1]) RefIdxSymL1 is set to i.

[0245] In the second reference picture list, the reference picture with index RefIdxSymL1 is the reference picture to be found.

[0246] Searching a first reference picture list (e.g., L0) for a reference picture whose picture order count is greater than the picture order count of the current picture and closest to the current picture can be expressed syntactically by using the following expression: - DiffPicOrderCnt(currPic,RefPicList[0][i])<0, - DiffPicOrderCnt(currPic,RefPicList[0][i])>DiffPicOrderCnt(currPic,RefPicList[0][RefIdxSymL0]) RefIdxSymL0 is set to i.

[0247] In the first reference picture list, the reference picture with index RefIdxSymL0 is the reference picture to be found.

[0248] In conclusion, a policy for determining a reference picture (or index) is provided. First, L0 is searched for a reference picture (or index) with the closest forward POC, and then L1 is searched for a reference picture (or index) with the closest backward POC. If one of these reference pictures is not found or if none of these reference pictures is found, L1 may be searched for a reference picture (or index) with the closest forward POC first, and then L0 is searched for a reference picture (or index) with the closest backward POC. "Forward" may indicate that the POC is smaller than the POC of the current picture, i.e., that the particular reference picture is before the current picture in the playback / display sequence, and "backward" may indicate that the POC is larger than the POC of the current picture, i.e., that the particular reference picture is after the current picture in the playback / display sequence.

[0249] In this embodiment of the present application, when it is determined that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current picture satisfies a predetermined condition, the method by which the video decoder 202 obtains the indication information may be the same as that used when it is determined that the inter prediction mode is a bidirectional inter prediction mode.

[0250] Regarding the above description, Table 1 is a syntax table used by the video decoder 202 to obtain the indication information in the first implementation when it is determined that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current picture satisfies a predetermined condition. prediction_unit() is a syntax structure of a prediction picture block and may describe a method for determining the motion information of each sub-block in the current block.

[0251] In Table 1, x0 and y0 represent the horizontal and vertical coordinate offsets of the sub-block within the current block relative to the top-left corner of the current block, respectively, nPbW represents the width of the current block, and nPbH represents the height of the current block. When the value of inter_pred_idc[x0][y0] is PRED_L0, it indicates that the inter prediction for the current sub-block is forward prediction. When the value of inter_pred_idc[x0][y0] is PRED_L1, it indicates that the inter prediction for the current sub-block is backward prediction. When the value of inter_pred_idc[x0][y0] is PRED_BI, it indicates that the inter prediction for the current sub-block is bidirectional prediction.

[0252] For bidirectional inter prediction (i.e., inter_pred_idc[x0][y0] == PRED_BI), if a preset condition(s) is met, mv_derived_flag_l0[x0][y0] is parsed. If the value of mv_derived_flag_l0 is not the first preset value, mv_derived_flag_l1[x0][y0] is parsed. When the value of mv_derived_flag_l0 is the first preset value or the value of mv_derived_flag_l1[x0][y0] is the fifth preset value, motion information of sub-blocks of the current block is determined. Specifically, the reference picture index value ref_idx_l0[x0][y0], motion vector predictor flag mvp_l0_flag[x0][y0], and motion vector differential mvd_coding(x0,y0,0) are determined. Table 1 prediction_unit(x0,y0,nPbW,nPbH){ … / * motion vector coding * / if(slice_type==B) inter_pred_idc[x0][y0] if(inter_pred_idc[x0][y0]==PRED_L0){ if(num_ref_idx_l0_active_minus1>0) ref_idx_l0[x0][y0] mvd_coding(x0,y0,0) mvp_l0_flag[x0][y0] } if(inter_pred_idc[x0][y0]==PRED_L1){ if(num_ref_idx_l1_active_minus1>0) ref_idx_l1[x0][y0] mvd_coding(x0,y0,1) mvp_l1_flag[x0][y0]} if(inter_pred_idc[x0][y0]==PRED_BI){ if(conditions) { mv_derived_flag_l0[x0][y0] if(!mv_derived_flag_l0[x0][y0]){ mv_derived_flag_l1[x0][y0] } if(!mv_derived_flag_l0[x0][y0]){ if(num_ref_idx_l0_active_minus1>0) ref_idx_l0[x0][y0] mvd_coding(x0,y0,0) mvp_l0_flag[x0][y0] } if(!mv_derived_flag_l1[x0][y0]){ if(num_ref_idx_l1_active_minus1>0) ref_idx_l1[x0][y0] mvd_coding(x0,y0,0) mvp_l1_flag[x0][y0] } }

[0253] With respect to the above description, Table 2 is a syntax table used by the video decoder 202 to obtain indication information in the third implementation when it is determined that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current picture satisfies the predetermined condition.

[0254] In Table 2, for bidirectional inter prediction (i.e., inter_pred_idc[x0][y0]==PRED_BI), if the preset condition(s) is / are met, derived_mv_flag_l0[x0][y0] is parsed. If the value of derived_mv_flag[x0][y0] is a second preset value, motion information of a sub-block of the current block is determined. Specifically, the reference picture index value ref_idx_lx[x0][y0], motion vector predictor flag mvp_lx_flag[x0][y0], and motion vector differential mvd_coding(x0,y0,x) are determined. Table 2 prediction_unit(x0,y0,nPbW,nPbH){ … / * motion vector coding * / if(slice_type==B) inter_pred_idc[x0][y0] if(inter_pred_idc[x0][y0]==PRED_L0){ if(num_ref_idx_l0_active_minus1>0) ref_idx_l0[x0][y0] mvd_coding(x0,y0,0) mvp_l0_flag[x0][y0] } if(inter_pred_idc[x0][y0]==PRED_L1){ if(num_ref_idx_l1_active_minus1>0) ref_idx_l1[x0][y0] mvd_coding(x0,y0,1) mvp_l1_flag[x0][y0] } if(inter_pred_idc[x0][y0]==PRED_BI){ if(conditions) { derived_mv_flag[x0][y0] if(derived_mv_flag[x0][y0]){ if(num_ref_idx_lx_active_minus1>0) ref_idx_lx[x0][y0] mvd_coding(x0,y0,x) mvp_lx_flag[x0][y0] }else{ …… } }

[0255] With respect to the above description, Table 3 is a syntax table used by the video decoder 202 to obtain indication information in the fourth implementation when it is determined that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current picture satisfies a predetermined condition.

[0256] In Table 3, for bidirectional inter prediction (i.e., inter_pred_idc[x0][y0]==PRED_BI), if the preset condition(s) is / are met, derived_mv_flag[x0][y0] is parsed. If the value of derived_mv_flag[x0][y0] is the fourth preset value, derived_ref_num is determined, and if the value of derived_ref_num is greater than 1, motion information of a sub-block of the current block is determined. Specifically, the reference picture index value ref_idx_lx[x0][y0], motion vector predictor flag mvp_lx_flag[x0][y0], and motion vector differential mvd_coding(x0,y0,x) are determined. Table 3 prediction_unit(x0,y0,nPbW,nPbH){ … / * motion vector coding * / if(slice_type==B) inter_pred_idc[x0][y0] if(inter_pred_idc[x0][y0]==PRED_L0){ if(num_ref_idx_l0_active_minus1>0) ref_idx_l0[x0][y0] mvd_coding(x0,y0,0) mvp_l0_flag[x0][y0] } if(inter_pred_idc[x0][y0]==PRED_L1){ if(num_ref_idx_l1_active_minus1>0) ref_idx_l1[x0][y0] mvd_coding(x0,y0,1) mvp_l1_flag[x0][y0] } if(inter_pred_idc[x0][y0]==PRED_BI){ if(conditions){ derived_mv_flag[x0][y0] if(derived_mv_flag[x0][y0]){ if(num_ref_idx_lx_active_minus1>0&&derived_ref_num>1) ref_idx_lx[x0][y0] mvd_coding(x0,y0,x) mvp_lx_flag[x0][y0] }else{ …… } }

[0257] The first identifier, the second identifier, the third identifier, and the fourth identifier may all be pre-configured or may be defined in a higher layer syntax, for example, in a parameter set such as an SPS, a PPS, a slice header, or a slice segment header, which is not particularly limited in this embodiment of the present application.

[0258] When the video decoder 202 determines that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current picture satisfies a predetermined condition, the video decoder 202 obtains the indication information, which substantially improves the decoding rate of the video decoder 202 and reduces information redundancy.

[0259] S401: The video decoder 202 obtains first motion information.

[0260] Optionally, the video decoder 202 parses the bitstream to obtain an index value of a first reference picture, a first motion vector predictor flag, and a first motion vector differential, i.e., obtains first motion information. The first motion vector predictor flag is used to indicate an index value of a first predicted motion vector in a first predicted motion vector candidate list, the first predicted motion vector is a predicted motion vector of a current block in a first direction, the first motion vector differential is a difference between the first predicted motion vector and the first motion vector, and the first motion vector is a motion vector of a current block in the first direction.

[0261] Optionally, the reference picture at the first position in the reference picture list is usually the picture closest to the current picture, so the index value ref_lX_idx of the first reference picture may be set to 0 directly.

[0262] Optionally, when the video decoder 202 determines whether to obtain the indication information according to the preset condition B or C, the video decoder 202 may set the index value ref_lX_idx of the first reference picture to a predetermined value SymRefIdxX. For example, when the preset condition B or C is satisfied, the indication information may be obtained, and the index value ref_lX_idx of the first reference picture may be set to a predetermined value SymRefIdxX. X may be 0 or 1.

[0263] Optionally, a first motion vector predictor candidate list is constructed based on the index value of a first reference picture. Specifically, in the process of constructing the first motion vector predictor candidate list, the motion vectors of neighboring decoded picture blocks of a current block are obtained. The picture order count of the first reference picture is determined based on the index value of the first reference picture and the first reference picture list. If the picture order count of the reference picture of the neighboring decoded picture block is different from the picture order count of the first reference picture, the motion vector of the neighboring decoded picture block needs to be scaled to point to the first reference picture, and then added to the first motion vector predictor candidate list.

[0264] In each of the syntax tables shown in Tables 1 through 3, video decoder 202 determines motion information of a sub-block of the current block in a first direction.

[0265] S402: The video decoder 202 determines second motion information based on the first motion information.

[0266] In a first implementation, the method used by the video decoder 202 to determine the second motion information is as follows: the video decoder 202 selects an index value (which may also be simply referred to as an index) of the first reference picture from the first motion information, determines a picture order count of the first reference picture based on the index value of the first reference picture and the first reference picture list, calculates a picture order count of the second reference picture based on the picture order count of the current picture and the picture order count of the first reference picture according to a preset formula, determines an index value of the second reference picture based on the picture order count of the second reference picture and the second reference picture list, and determines the second motion information based on the first motion information and the index of the second reference picture.

[0267] In this specification, the preset formula may be POC_listY=2*POC_Cur-POC_listX, where POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, and POC_listY represents the picture order count of the second reference picture.

[0268] For example, if the picture order count of the current picture is 4, the picture order count of the first reference picture is 2, the second reference picture list is {6, 8}, and the picture order count of the second reference picture is determined to be 6 according to the formula POC_listY=2*POC_Cur-POC_listX, the video decoder 202 determines that the index value ref_lY_idx of the second reference picture is 0.

[0269] Optionally, the preset formula may alternatively be (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0. Note that if the picture order counts of multiple reference pictures in the second reference picture list satisfy this formula, video decoder 202 first selects the reference picture whose abs((POC_listY-POC_Cur)-(POC_Cur-POC_listX)) is the smallest, and then selects the reference picture whose abs(POC_listY-POC_Cur) is the smallest, to determine the index value of the second reference picture. In this specification, abs is an absolute value function.

[0270] For example, if the picture order count of the current picture is 4, the picture order count of the first reference picture is 2, the second reference picture list is {5,7,8}, and it is determined that the picture order count of the second reference picture is 5 according to the formula (POC_Cur-POC_list)*(POC_listY-POC_Cur)>0, the video decoder 202 determines that the index value ref_lY_idx of the second reference picture is 0.

[0271] Optionally, the preset formula may alternatively be POC_listX≠POC_listY. Note that if the picture order counts of multiple reference pictures in the second reference picture list satisfy the formula, video decoder 202 first selects the reference picture with the smallest abs((POC_listY-POC_Cur)-(POC_Cur-POC_listX)), and then selects the reference picture with the smallest abs(POC_listY-POC_Cur) to determine the index value of the second reference picture. In this specification, abs is an absolute value function.

[0272] For example, if the picture order count of the current picture is 4, the picture order count of the first reference picture is 2, the second reference picture list is {3,2,1,0}, and the picture order count of the second reference picture is determined to be 3 according to the equation POC_listX ≠ POC_listY, the video decoder 202 determines that the index value ref_lY_idx of the second reference picture is 0.

[0273] Optionally, the predefined formula or condition can alternatively be: POC_listY0=2*POC_Cur-POC_listX, (POC_Cur-POC_listX)*(POC_listY0'-POC_Cur)>0, and POC listX ≠POC listY0An optional case is that all three conditions need to be met. In this case, the method used by the video decoder 202 to determine the index value of the second reference picture specifically includes the steps of: calculating a first picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to an equation POC_listY0=2*POC_Cur-POC_listX, where POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, and POC_listY0 represents the first picture order count; and determining, as the index value of the second reference picture, the number of the reference picture represented by the first picture order count in the second reference picture list when the second reference picture list includes the first picture order count, or (POC_Cur-POC_listX) when the second reference picture list does not include the first picture order count. Calculate a second picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to (POC_listY0')*(POC_listY0'-POC_Cur)>0, where POC_listY0' represents the second picture order count and the second reference picture list includes the second picture order count, and determine the number of the reference picture represented by the second picture order count in the second reference picture list as an index value of the second reference picture; or is a step of calculating a third picture order count based on the picture order count of the current picture and the picture order count of the first reference picture according to a condition POC_listX≠POC_listY0″ when the second reference picture list does not include the second picture order count, where POC_listY0″ represents the third picture order count, and determining the number of the reference picture represented by the third picture order count in the second reference picture list as the index value of the second reference picture.

[0274] Optionally, the reference picture at the first position in the reference picture list is usually the picture closest to the current picture. Therefore, the index value ref_lY_idx of the second reference picture can be directly set to 0. Setting it to 0 indicates that it points to the first position in the reference picture list.

[0275] Optionally, when the video decoder 202 determines whether to obtain the indication information according to the preset condition B or C, the video decoder 202 may set the index value ref_lY_idx of the second reference picture to a predetermined value SymRefIdxY. For example, when the preset condition B or C is satisfied, the indication information may be obtained, and the index value ref_lY_idx of the second reference picture may be set to the predetermined value SymRefIdxY.

[0276] In a second implementation, the method used by the video decoder 202 to determine the second motion information is as follows: The video decoder 202 parses the bitstream to obtain the index value of the second reference picture, and determines the second motion information based on the index value of the first motion information and the second reference picture. The index value of the second reference picture may be preset or may be specified in a parameter set such as an SPS, a PPS, a slice header, or a slice segment header. This is not particularly limited in this embodiment of the present application.

[0277] It can be seen that in both the first and second implementations, the video decoder 202 determines the second motion information based on the first motion information and the index value of the second reference picture.

[0278] Optionally, video decoder 202 may calculate all motion information of the current block in the second direction, or may calculate motion information of a portion of the current block in the second direction.

[0279] The following describes a process in which the video decoder 202 determines the second motion information based on the first motion information and the index value of the second reference picture.

[0280] Optionally, the method of "the video decoder 202 determining the second motion information based on the index value of the first reference picture" may include the steps of obtaining an index value of the first reference picture in the first motion information and determining a picture order count of the first reference picture based on the index value of the first reference picture and the first reference picture list, obtaining an index value of the second reference picture and determining a picture order count of the second reference picture based on the index value of the second reference picture and the second reference picture list, determining a first motion vector (the motion vector of the current block in the first direction) based on the first motion vector differential and the first motion vector predictor flag in the first motion information, and determining a second motion vector in the second motion information according to the following equation:

[0281]

number

[0282] In this specification, mv_lY represents the second motion vector, POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, POC_listY represents the picture order count of the second reference picture, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current block in the second direction.

[0283] The video decoder 202 constructs a motion information candidate list in the same manner as the encoder constructs a motion information candidate list in AMVP mode or merge mode, and determines a first predicted motion vector in the motion information candidate list based on the first motion vector predictor flag. In this manner, the video decoder 202 may determine the sum of the first predicted motion vector and the first motion vector differential as the first motion vector.

[0284] Optionally, when the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block, or when the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block, or when the first reference picture and the second reference picture are each forward reference pictures of the current block, or when the first reference picture and the second reference picture are each backward reference pictures of the current block, the video decoder 202 may directly set mv_lY=-mv_lX.

[0285] Optionally, video decoder 202 may not determine the above conditions for forward and backward reference pictures, but may directly set mv_lY=-mv_lX.

[0286] For example, both "the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block" and "the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block" may be expressed by using the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0, or may be expressed by using the formula POC_listY=2*POC_Cur-POC_listX. In other words, both formulas may indicate that one of the first and second reference pictures is before the current picture in the time series and the other is after the current picture in the time series.

[0287] Both "the first reference picture and the second reference picture are each forward reference pictures of the current block" and "the first reference picture and the second reference picture are each backward reference pictures of the current block" may be expressed by using the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)<0.

[0288] Optionally, the method for "the video decoder 202 determining second motion information based on the first motion information and the index value of the second reference picture" includes the steps of: obtaining an index value of the first reference picture and a first motion vector differential in the first motion information, and determining a picture order count of the first reference picture based on the index value of the first reference picture and the first reference picture list; obtaining an index value of a second reference picture, and determining a picture order count of the second reference picture based on the index value of the second reference picture and the second reference picture list; and determining a second predicted motion vector based on the index value of the second reference picture and the second motion vector candidate list, where the second predicted motion vector is a predicted motion vector of the current block in a second direction; determining a second motion vector differential in the second motion information according to the following formula:

[0289]

number

[0290] The step may include a step in which mvd_lY represents the second motion vector differential, POC_Cur represents the picture order count of the current picture, POC_listX represents the picture order count of the first reference picture, POC_listY represents the picture order count of the second reference picture, and mvd_lX represents the first motion vector differential, and a step in which a second motion vector is determined based on the second predicted motion vector and the second motion vector differential, wherein the second motion vector is the motion vector of the current block in the second direction.

[0291] Optionally, a second motion vector predictor candidate list is constructed based on the index value of a second reference picture. Specifically, in the process of constructing the second motion vector predictor candidate list, the motion vectors of the neighboring decoded picture blocks of the current block are obtained. The picture order count of the second reference picture is determined based on the index value of the second reference picture and the second reference picture list. If the picture order count of the reference picture of the neighboring decoded picture block is different from the picture order count of the second reference picture, the motion vector of the neighboring decoded picture block needs to be scaled to point to the second reference picture, and then added to the second motion vector predictor candidate list.

[0292] Optionally, when the first reference picture is a forward reference picture of the current block and the second reference picture is a backward reference picture of the current block, or when the first reference picture is a backward reference picture of the current block and the second reference picture is a forward reference picture of the current block, or when the first reference picture and the second reference picture are each forward reference pictures of the current block, or when the first reference picture and the second reference picture are each backward reference pictures of the current block, the video decoder 202 may directly set mvd_lY=-mvd_lX. For example, if (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0, POC_listY=2*POC_Cur-POC_listX, or (POC_Cur-POC_listX)*(POC_listY-POC_Cur)<0, then the video decoder 202 directly sets mvd_lY=-mvd_lX.

[0293] Optionally, video decoder 202 may not determine the above-mentioned conditions for forward and backward reference pictures, but may directly set mvd_lY=-mvd_lX.

[0294] mvd_lY may be obtained, and then a second motion vector may be determined based on the second motion vector predictor and the second motion vector differential. In this manner, the derivation of the second motion vector differential is not related to the picture order count of the reference picture.

[0295] In conclusion, in this embodiment of the present invention, the second motion vector can be derived based on the first motion vector, or the second motion vector differential can be derived based on the first motion vector differential, so that the first motion vector and the second motion vector can be obtained. It should be understood that both the obtaining of the motion vector predictor and the calculation of the motion vector belong to the prior art, and will not be described in detail in this specification.

[0296] S403: The video decoder 202 determines a prediction sample of the current block based on the first motion information and the second motion information.

[0297] Optionally, the video decoder 202 determines a first motion vector and a second motion vector at S402. In this manner, the video decoder 202 may determine a first reference picture block based on the first motion vector, the index value of the first reference picture, and the first reference picture list, and may determine a second reference picture block based on the second motion vector, the index value of the second reference picture, and the second reference picture list. Furthermore, the video decoder 202 may determine a prediction sample of the current block based on the first reference picture block and the second reference picture block. In other words, the video decoder 202 completes the motion compensation process.

[0298] For the method used by the video decoder 202 to determine the predicted sample of the current block based on the first reference picture block and the second reference picture block, refer to any existing method, which is not particularly limited in this embodiment of the present application.

[0299] In the bidirectional inter-prediction method provided in this embodiment of the present application, the video decoder 202 may obtain only first motion information from the encoded bitstream. After obtaining the first motion information, the video decoder 202 calculates second motion information based on the first motion information, and further determines a predicted sample of the current block based on the first motion information and the second motion information. Compared with the prior art method, the method provided in the present application no longer needs to transmit motion information for all picture blocks in all directions. This substantially reduces the amount of motion information transmitted, improving the effective utilization of transmission resources, transmission rate, and coding compression efficiency.

[0300] The bidirectional inter prediction method shown in FIG. 4 is described for a current block, i.e., can be understood as performing inter prediction on the current block based on the AMVP mode.

[0301] It is easy to understand that the bidirectional inter-prediction method provided in this application can also be applied to a non-transform motion model prediction mode, such as a four-parameter affine transformation motion model, a six-parameter affine transformation motion model, or an eight-parameter bilinear motion model. In this scenario, the current block includes at least one sub-block, and the motion information of the current block includes the motion information of each of all the sub-blocks of the current block. The method used by the video decoder 202 to determine the motion information of each sub-block (motion information in the first direction and motion information in the second direction) is similar to the method used by the video decoder 202 to determine the motion information of the current block.

[0302] In the non-transform motion model prediction mode, the video decoder 202 calculates the motion vector of the i-th control point in the second direction based on the motion vector of the i-th control point in the first direction according to the following equation:

[0303]

number

[0304] In this formula, mvi_lY represents the motion vector of the i-th control point in the second direction, mvi_lX represents the motion vector of the i-th control point in the first direction, POC_Cur represents the picture order count of the current picture, POC_listY represents the picture order count of the second reference picture, and POC_listX represents the picture order count of the first reference picture.

[0305] Correspondingly, the video decoder 202 calculates the motion vector differential of the ith control point in the second direction based on the motion vector differential of the ith control point in the first direction according to the following equation:

[0306]

number

[0307] In this formula, mvdi_lY represents the motion vector differential of the i-th control point in the second direction, mvdi_lX represents the motion vector differential of the i-th control point in the first direction, POC_Cur represents the picture order count of the current picture, POC_listY represents the picture order count of the second reference picture, and POC_listX represents the picture order count of the first reference picture.

[0308] In this embodiment of the present application, corresponding to the video decoder 202, the video encoder 102 performs bidirectional motion estimation on a current block to determine motion information of the current block in a first direction, and calculates motion information of the current block in a second direction based on the motion information of the current block in the first direction. In this manner, the video encoder 102 determines a predictive picture block of the current block based on the motion information of the current block in the first direction and the motion information of the current block in the second direction. Then, the video encoder 102 performs operations such as transform and quantization on the residual between the current block and the predictive picture block of the current block to generate a bitstream and transmits the bitstream to the video decoder 202. The bitstream includes the motion information of the current block in the first direction. Furthermore, the bitstream may include indication information used to indicate that motion information in the second direction is calculated based on the motion information in the first direction.

[0309] For the method in which "the video encoder 102 calculates the motion information of the current block in the second direction based on the motion information of the current block in the first direction," please refer to the above description of the method in which "the video decoder 202 determines the second motion information based on the first motion information," i.e., S402. Details will not be described in this application.

[0310] According to the above description, a bidirectional inter-prediction method in the present invention can be obtained. Referring to Figure 5A, the method includes the following steps:

[0311] S500: Obtain a first identifier from a bitstream, where the value of the first identifier is a first preset value (including but not limited to 1 or 0).

[0312] When the value of the first identifier is a first predetermined value, the first identifier may be used to indicate that the reference picture index i1 of the first reference picture list is determined as the first reference picture index of the first reference picture list corresponding to the current block, and that the reference picture index i2 of the second reference picture list is determined as the second reference picture index of the second reference picture list corresponding to the current block.

[0313] In this case, the decoder can obtain the reference picture index without parsing the bitstream, and the reference picture index does not need to be transmitted in the bitstream. It should be understood that S500 can occur before S501. In some examples, S500 may not be used as a necessary condition for S501. This is not a limitation of the present invention.

[0314] S501: Determine a reference picture index i1 of a first reference picture list as a first reference picture index of the first reference picture list corresponding to a current block, and the POC corresponding to the reference picture index i1 is less than the POC of the current picture, and the difference obtained by subtracting the POC corresponding to the reference picture index i1 from the POC of the current picture is less than the POC of the current picture. x is smaller than the difference obtained by subtracting the POC corresponding to the reference picture index i x is any reference picture index other than reference picture index i1 among the reference picture indexes of the first reference picture list, and reference picture index i x The POC corresponding to reference picture index i1 is smaller than the POC of the current picture. Specifically, the POC corresponding to reference picture index i1 is the POC that is closest to and smaller than the POC of the current picture among all POCs in the first reference picture list.

[0315] An example is as follows:

[0316] Example A:

[0317] The POC of the current picture in which the current block is located is 8, and the current picture has two reference picture lists: L0{2,3,5,6} (where 2, 3, 5, and 6 may represent POCs of reference pictures in L0) and L1{9,10,11} (where 9, 10, and 11 may represent POCs of reference pictures in L1).

[0318] For L0, 2, 3, 5, and 6 are all less than 8, but 6 is closer to 8 than 2, 3, and 5. The index of the reference picture corresponding to 6 in L0 is 3 (i.e., the fourth element in the list). Therefore, i1=3.

[0319] Example B:

[0320] The POC of the current picture in which the current block is located is 7, and the current picture has two reference picture lists: L0{9,10,12} (where 9, 10, and 12 may represent POCs of reference pictures in L0) and L1{2,4,5} (where 2, 4, and 5 may represent POCs of reference pictures in L1).

[0321] Optionally, no POC less than 7 is found in L0. In this case, L1 may be searched for a POC less than 7 and closest to 7, and L0 is searched for a POC greater than 7 and closest to 7 (see Example B of S502 for details).

[0322] For L1, 2, 4, and 5 are all less than 7, but 5 is closer to 7 than 2 and 4. The index of the reference picture corresponding to 5 in L0 is 2 (i.e., the third element in the list). Therefore, i1=2.

[0323] Example C:

[0324] The POC of the current picture in which the current block is located is 7, and the current picture has two reference picture lists: L0{2,4,5,8} (where 2, 4, 5, and 8 may represent POCs of reference pictures in L0) and L1{6,9,10} (where 6, 9, and 10 may represent POCs of reference pictures in L1).

[0325] For L0, 2, 4, and 5 are all less than 7, but 5 is closer to 7 than 2 and 4. The index of the reference picture corresponding to 5 in L0 is 2 (i.e., the third element in the list). Therefore, i1=2.

[0326] S502: Determine a reference picture index i2 of a second reference picture list as a second reference picture index of the second reference picture list corresponding to the current block, where the POC corresponding to the reference picture index i2 is greater than the POC of the current picture, and the difference obtained by subtracting the POC corresponding to the reference picture index i2 from the POC of the current picture is less than the POC of the current picture minus the reference picture index i y is greater than the difference obtained by subtracting the POC corresponding to the reference picture index i y is the 2 is any reference picture index other than reference picture index i2 among the reference picture indexes of the reference picture list of y The POC corresponding to reference picture index i2 is greater than the POC of the current picture. Specifically, the POC corresponding to reference picture index i2 is the POC that is closest to and greater than the POC of the current picture among all POCs in the second reference picture list.

[0327] The reference picture list in S501 is still used as an example.

[0328] Example A:

[0329] For L1, 9, 10, and 11 are all greater than 8, but 9 is closer to 8 than 10 and 11. The index of the reference picture corresponding to 9 in L1 is 0 (i.e., the first element in the list). Therefore, i2=0.

[0330] Example B:

[0331] For L0, 9, 10, and 12 are all greater than 7, but 9 is closer to 7 than 10 and 12. The index of the reference picture corresponding to 9 in L0 is 0 (i.e., the first element in the list). Therefore, i2=0.

[0332] Example C:

[0333] The POC of the current picture in which the current block is located is 7, and the current picture has two reference picture lists: L0{2,4,5,8} (where 2, 4, 5, and 8 may represent POCs of reference pictures in L0) and L1{6,9,10} (where 6, 9, and 10 may represent POCs of reference pictures in L1).

[0334] For L1, both 9 and 10 are greater than 7, but 9 is closer to 7 than 10. The index of the reference picture corresponding to 9 in L1 is 1 (i.e., the second element in the list). Therefore, i2=1.

[0335] It should be understood that the order in which S501 and S502 are performed is not limited in this application, and the chronological relationship in the drawings is merely an example.

[0336] It should be understood that in a specific possible implementation, an element in the reference picture list may be some indicator, including but not limited to a picture order count POC of a reference picture. A picture order count may correspond to a specific reference picture and / or an index of the position of the reference picture in the reference picture list, i.e., a reference picture index. In a specific possible implementation, an element in the reference picture list may be a picture (reference picture). A picture may correspond to a specific POC and an index of the position of the picture in the reference picture list, i.e., a reference picture index.

[0337] It should be understood that S501 and S502 provide a method for determining the reference picture index of the current block. Specifically, the bitstream does not need to be parsed, but the reference picture index of the current block is determined according to some constraints. The constraints provided in the present invention are merely illustrative examples and are not limiting. In a specific implementation process, there may be various constraints, or there may be further constraints, for example, some constraints in standard evolution that are not exhaustively listed in the present invention.

[0338] It should be understood that the order of L0 and L1 is not limiting, that is, the order relationship between the first reference picture list and the second reference picture list is not limiting. The first reference picture list may correspond to a first direction, and the second reference picture list may correspond to a second direction. The first direction and the second direction may be forward and backward, respectively, or may be backward and forward, or both the first direction and the second direction may be forward or backward. The direction may be understood as a time sequence, and is not limited in the present invention.

[0339] The present invention further provides a policy for determining a reference picture (or index). First, L0 is searched for a reference picture (or reference picture index i1) with the nearest forward POC, and then L1 is searched for a reference picture (or reference picture index i2) with the nearest backward POC. If one of the reference pictures is not found, or if none of the reference pictures is found, L1 may be searched for a reference picture (or reference picture index i2) with the nearest forward POC first, and then L0 is searched for a reference picture (or reference picture index i1) with the nearest backward POC.

[0340] The first reference picture index and the second reference picture index correspond to the reference pictures in which the best reference block of the current block is located, ie, ref_idx_l0 and ref_idx_l1, or ref_idx_l1 and ref_idx_l0.

[0341] Optionally, for another implementation, please refer to the reference picture index determination method in S400, and the details will not be described again here.

[0342] S503: Predict a current block based on a first reference picture index and a second reference picture index, where the current picture includes the current block.

[0343] Optionally, the method comprises: obtaining a first motion vector predictor and a second motion vector predictor; determining a first motion vector based on the first motion vector predictor and the first motion vector differential; and determining a second motion vector based on the second motion vector predictor and the second motion vector differential.

[0344] Correspondingly, predicting the current block based on the first reference picture index and the second reference picture index may include predicting the current block based on the first reference picture index, the second reference picture index, the first reference picture list, the second reference picture list, the first motion vector, and the second motion vector. In this step, a general prediction method in the prior art may be used.

[0345] In one possible implementation, when the first identifier is a first preset value, the first identifier is further used to indicate that a second motion vector differential of the current block is determined based on the first motion vector differential of the current block. In this case, the second motion vector differential may be derived based on the first motion vector differential, and the second motion vector differential does not need to be transmitted in the bitstream, thereby reducing the bitstream. In this case, the first motion vector differential of the current block may be first obtained, and the second motion vector differential of the current block is obtained based on the first motion vector differential according to the following equation: mvd_lY=-mvd_lX

[0346] In this specification, mvd_lY represents the second motion vector differential, mvd_lX represents the first motion vector differential, one of the first motion vector differential and the second motion vector differential belongs to the motion information corresponding to the first reference picture list, and the other of the first motion vector differential and the second motion vector differential belongs to the motion information corresponding to the second reference picture list.

[0347] In conclusion, according to the bidirectional inter prediction method provided in this application, during bidirectional inter prediction, it is not necessary to transmit motion information of all picture blocks in all directions, but only motion information in a specific direction, which substantially reduces the amount of motion information transmitted, and improves the effective utilization of transmission resources, transmission rate, and coding compression efficiency.

[0348] An embodiment of the present application provides a bidirectional inter prediction device. The bidirectional inter prediction device may be a video decoder. Specifically, the bidirectional inter prediction device is configured to perform the steps performed by the video decoder 202 in the above-mentioned bidirectional inter prediction method. The bidirectional inter prediction device provided in this embodiment of the present application may include modules for corresponding steps.

[0349] In an embodiment of the present application, the bidirectional inter-prediction device may be divided into functional modules based on the above-mentioned method examples. For example, each functional module may be obtained through division based on the corresponding function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in the form of hardware or in the form of a software functional module. In the embodiment of the present application, the division into modules is an example and is merely a logical division of functions. In actual implementation, there may be other division schemes.

[0350] When each functional module is obtained through division based on its corresponding function, Figure 5B is a possible schematic structural diagram of the bidirectional inter-prediction device in the above embodiment. As shown in Figure 5B, the bidirectional inter-prediction device 5 includes an obtaining unit 50 and a determining unit 51.

[0351] The acquisition unit 50 is configured to assist the bidirectional inter-prediction device in performing S400, S401, etc. in the foregoing embodiments and / or other processes of the techniques described herein.

[0352] The determining unit 51 is configured to assist the bidirectional inter-prediction device in performing S402, S403, etc. in the foregoing embodiments and / or other processes of the techniques described herein.

[0353] All relevant contents of the steps in the foregoing method embodiments can be described in the functional descriptions of the corresponding functional modules, so the details will not be described again here.

[0354] Of course, the bidirectional inter prediction device provided in this embodiment of the present application includes, but is not limited to, the aforementioned modules. For example, the bidirectional inter prediction device may further include a storage unit 52.

[0355] Storage unit 52 may be configured to store program codes and data for the bidirectional inter prediction device.

[0356] Corresponding to the method of Figure 5A, in an optional example, the present invention may further provide a bidirectional inter prediction device 5000. Referring to Figure 5C, the device a determining unit 5002 configured to determine a reference picture index i1 of a first reference picture list as a first reference picture index of the first reference picture list corresponding to a current block, wherein a POC corresponding to the reference picture index i1 is smaller than a POC of the current picture, and a difference obtained by subtracting the POC corresponding to the reference picture index i1 from the POC of the current picture is smaller than the POC of the current picture; x is smaller than the difference obtained by subtracting the POC corresponding to the reference picture index i x is any reference picture index other than reference picture index i1 among the reference picture indexes of the first reference picture list, and reference picture index i x The POC corresponding to is smaller than the POC of the current picture, The determining unit 5002 is further configured to determine a reference picture index i2 of the second reference picture list as a second reference picture index of the second reference picture list corresponding to the current block, wherein the POC corresponding to the reference picture index i2 is greater than the POC of the current picture, and a difference obtained by subtracting the POC corresponding to the reference picture index i2 from the POC of the current picture is less than the POC of the current picture. y is greater than the difference obtained by subtracting the POC corresponding to the reference picture index i y is the 2 is any reference picture index other than reference picture index i2 among the reference picture indexes of the reference picture list of ya determining unit 5002, in which the POC corresponding to the current picture is greater than the POC of the current picture; and an inter-prediction processing unit 5003 configured to predict the current block based on the first reference picture index and the second reference picture index, the current picture including the current block.

[0357] Optionally, the apparatus further includes an obtaining unit 5001 configured to obtain a first identifier, where the value of the first identifier is a first predetermined value, and when the value of the first identifier is the first predetermined value, the first identifier is used to indicate determining a reference picture index i1 of the first reference picture list as a first reference picture index of the first reference picture list corresponding to the current block, and determining a reference picture index i2 of the second reference picture list as a second reference picture index of the second reference picture list corresponding to the current block.

[0358] Optionally, when the first identifier is a first preset value, the first identifier is further used to indicate that a second motion vector differential of the current block is determined based on a first motion vector differential of the current block, and the obtaining unit is further configured to obtain the first motion vector differential of the current block, and the determining unit is further configured to obtain the second motion vector differential of the current block based on the first motion vector differential according to the following equation: mvd_lY=-mvd_lX

[0359] In this specification, mvd_lY represents the second motion vector differential, mvd_lX represents the first motion vector differential, one of the first motion vector differential and the second motion vector differential corresponds to the first reference picture list, and the other of the first motion vector differential and the second motion vector differential corresponds to the second reference picture list.

[0360] Optionally, the obtaining unit 5001 is specifically configured to obtain a first predicted motion vector and a second predicted motion vector, the determining unit 5002 is further configured to determine a first motion vector based on the first predicted motion vector and the first motion vector differential, and to determine a second motion vector based on the second predicted motion vector and the second motion vector differential, and correspondingly, the inter-prediction processing unit 5003 is specifically configured to predict a current block based on the first reference picture index, the second reference picture index, the first reference picture list, the second reference picture list, the first motion vector, and the second motion vector.

[0361] The obtaining unit 5001 may be configured to perform the related method referred to in S500 in the above examples and methods that may be used for equivalent substitution. The determining unit 5002 may be configured to perform the related method referred to in S501 and / or S502 in the above examples and methods that may be used for equivalent substitution. The obtaining unit 5001, the determining unit 5002, and the inter-prediction processing unit 5003 may be configured to perform the related method referred to in S503 in the above examples and methods that may be used for equivalent substitution. The obtaining unit 5001, the determining unit 5002, and the inter-prediction processing unit 5003 may be implemented by a processor by invoking corresponding program instructions in a memory.

[0362] It should be understood that the above-mentioned specific method examples, descriptions and descriptions of technical features in the embodiments, and extensions of multiple implementation forms can also be applied to the execution of the corresponding method in the device, and details will not be described in the device embodiments.

[0363] When an integrated unit is used, FIG. 6A is a schematic structural diagram of a bidirectional inter prediction device according to an embodiment of the present application. In FIG. 6A, the bidirectional inter prediction device 6 includes a processing module 60 and a communication module 61. The processing module 60 controls and manages the behavior of the bidirectional inter prediction device, and is configured to, for example, execute the methods or steps performed by the acquisition unit 50 and the determination unit 51, as well as the methods or steps performed by the acquisition unit 5001, the determination unit 5002, and the inter-prediction processing unit 5003, and / or processes of other techniques described herein. The communication module 61 is configured to facilitate interaction between the bidirectional inter prediction device and another device. As shown in FIG. 6A, the bidirectional inter prediction device may further include a storage module 62. The storage module 62 is configured to store program code and data of the bidirectional inter prediction device, for example, to store the content stored by the storage unit 52.

[0364] The processing module 60 may be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an ASIC, an FPGA or another programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The processor or controller may implement or execute various exemplary logic blocks, modules, and circuits described with reference to the disclosed subject matter in this application. The processor may alternatively be a combination of processors that implement computational functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor. The communication module 61 may be a transceiver, RF circuitry, a communication interface, etc. The storage module 62 may be a memory.

[0365] All relevant contents of the scenarios in the above method embodiments can be described in the function descriptions of the corresponding function modules, and the details will not be described again here.

[0366] Both bidirectional inter prediction unit 5 and bidirectional inter prediction unit 6 may perform the aforementioned method (such as, but not limited to, the bidirectional inter prediction method shown in FIG. 4). Bidirectional inter prediction unit 5 and bidirectional inter prediction unit 6 may, in particular, be video decoding devices or other devices with video coding functionality. Bidirectional inter prediction unit 5 and bidirectional inter prediction unit 6 may be configured to perform picture prediction in the decoding process.

[0367] The present application further provides a terminal. The terminal includes one or more processors, a memory, and a communication interface. The memory and the communication interface are coupled to the one or more processors. The memory is configured to store computer program code. The computer program code includes instructions. When the one or more processors execute the instructions, the terminal performs the bidirectional inter prediction method in an embodiment of the present application.

[0368] A terminal herein may be a video display device, a smartphone, a portable computer, or another device capable of processing or playing video.

[0369] The present application further provides a video decoder, including a non-volatile storage medium and a central processing unit, wherein the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium and executes the executable program to perform the bidirectional inter prediction method in an embodiment of the present application.

[0370] The present application further provides a decoder, which includes a bidirectional inter prediction device (bidirectional inter prediction device 5 or bidirectional inter prediction device 6) in an embodiment of the present application and a reconstruction module, which is configured to determine reconstructed sample values ​​of a current block based on prediction samples obtained by the bidirectional inter prediction device.

[0371] Another embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium includes one or more program codes. The one or more programs include instructions. When a processor of a terminal executes the program codes, the terminal performs a bidirectional inter-prediction method shown in the above-mentioned method examples (such as, but not limited to, FIG. 4 or FIG. 5A).

[0372] In another embodiment of the present application, a computer program product is further provided. The computer program product includes computer-executable instructions. The computer-executable instructions are stored in a computer-readable storage medium. At least one processor of a terminal may read the computer-executable instructions from the computer-readable storage medium. The at least one processor executes the computer-executable instructions to enable the terminal to perform the aforementioned methods (such as, but not limited to, the bidirectional inter-prediction method shown in FIG. 4 or FIG. 5A) and methods or steps that may be implemented by the video decoder 202.

[0373] 6B is a simplified block diagram of a device that can be used as either or both of the source device 10 and the destination device 20 of FIG. 1 according to an exemplary embodiment. The device 555 can implement the techniques of the present application. In other words, FIG. 6B is a schematic block diagram of an implementation of an encoding or decoding device (simply referred to as a coding device 555) according to an embodiment of the present application. The coding device 555 may include a processor 510, a memory 530, and a bus system 550. The processor and the memory are connected through 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 may store program code, and the processor may invoke the program code stored in the memory to perform various video picture encoding or decoding methods described in the present application, particularly video encoding or decoding methods in various inter-prediction or intra-prediction modes. To avoid repetition, details will not be described again here.

[0374] The following describes the application of the encoding and decoding methods shown in the above embodiments, and a system using the encoding and decoding methods.

[0375] 7 is a block diagram of a content delivery system 3100 that implements a content distribution service. The content delivery system 3100 includes a capture device 3102, a terminal device 3106, and optionally a display 3126. The capture device 3102 communicates with the terminal device 3106 through a communication link 3104. The communication link may include a communication channel 13. The communication link 3104 includes, but is not limited to, Wi-Fi, Ethernet, a wired connection, a wireless (3G / 4G / 5G) connection, USB, or any type of combination thereof.

[0376] The capture device 3102 may generate data and encode the data according to the encoding method described in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown), which then encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 may include, but is not limited to, a camera, a smartphone or tablet computer, a computer or notebook computer, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 may include the source device 10 described above. When the data includes video, the video encoder 102 included in the capture device 3102 may actually encode the video. When the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually encode the audio. In some practical scenarios, the capture device 3102 delivers the encoded video data and the encoded audio data by multiplexing the encoded video data and the encoded audio data. In another practical scenario, for example, in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 delivers the encoded audio data and the encoded video data separately to the terminal device 3106 .

[0377] In the content delivery system 3100, a terminal device 3106 receives and plays the encoded data. The terminal device 3106 may be a device with data reception and restoration capabilities, such as a smartphone or tablet computer 3108, a computer or notebook computer 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination of the aforementioned devices capable of decoding the encoded data. For example, the terminal device 3106 may include the destination device 20 described above. When the encoded data includes video, the video decoder 202 included in the terminal device is given priority to perform video decoding. When the encoded data includes audio, an audio decoder included in the terminal device is given priority to perform audio decoding.

[0378] For terminal devices with a display, e.g., a smartphone or tablet computer 3108, a computer or notebook computer 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or an in-vehicle device 3124, the terminal device may provide the decoded data to the display of the terminal device. For terminal devices without a display, e.g., an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 is connected to the terminal device to receive and display the decoded data.

[0379] When each device in the system performs encoding or decoding, the picture encoding device or picture decoding device shown in the above embodiments may be used.

[0380] 8 is a diagram of an example structure of the terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol processing unit 3202 analyzes the transport protocol of the stream. The protocol includes, but is not limited to, Real-Time Streaming Protocol (RTSP), Hypertext Transfer Protocol (HTTP), HTTP Live streaming protocol (HLS), MPEG-DASH, Real-time Transport protocol (RTP), Real-Time Messaging Protocol (RTMP), or any combination thereof.

[0381] After processing the stream, the protocol processing unit 3202 generates a stream file. This file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 may split the multiplexed data into encoded audio data and encoded video data. As described above, in another practical scenario, for example, in a video conferencing system, the encoded audio data and encoded video data are not multiplexed. In this case, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without being sent through the demultiplexing unit 3204.

[0382] Demultiplexing is performed to generate a video elementary stream (ES), an audio ES, and optional subtitles. The video decoder 3206 includes the video decoder 202 described in the previous embodiment, decodes the video ES according to the decoding method shown in the previous embodiment to generate video pictures, and supplies such data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio pictures and supplies such data to the synchronization unit 3212. Alternatively, the video pictures may be stored in a buffer (not shown in FIG. 8) before being supplied to the synchronization unit 3212. Similarly, the audio pictures may be stored in a buffer (not shown in FIG. 8) before being supplied to the synchronization unit 3212.

[0383] The synchronization unit 3212 synchronizes the video and audio pictures to provide video / audio for the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information. The information may be syntactically encoded by using timestamps for the presentation of the encoded audio and visual data and timestamps for the transmission of the data stream.

[0384] If subtitles are included in the stream, a subtitle decoder 3210 decodes the subtitles to synchronize them with the video and audio pictures and provides video / audio / subtitles for a video / audio / subtitle display 3216 .

[0385] The present invention is not limited to the above-mentioned system, and the picture encoding device or the picture decoding device in the above-mentioned embodiments may be combined into another system, for example, an automotive system.

[0386] All or part of the above-described embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When a software program is used to implement the embodiments, the embodiments may be fully or partially implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into a computer and executed on the computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part.

[0387] The computer may be a general-purpose computer, a special-purpose computer, a computer network, or another programmable device. Computer instructions may be stored on a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, or digital subscriber line (DSL)) or wireless (e.g., infrared, radio, or microwave) methods. A computer-readable storage medium may be any available medium accessible by a computer or a data storage device, such as a server or data center, that incorporates one or more available media. Available media may be magnetic media (e.g., floppy disks, hard disks, or magnetic tapes), optical media (e.g., DVDs), semiconductor media (e.g., solid-state drives (SSDs)), etc.

[0388] The above description of the implementation form allows those skilled in the art to clearly understand that for convenience and simple description, the division into the above-mentioned functional modules is used as an example for explanation. In actual applications, the above-mentioned functions may be allocated to different functional modules for implementation based on requirements, that is, the internal structure of the device is divided into different functional modules to implement all or part of the above-described functions.

[0389] In some embodiments provided in the present application, it should be understood that the disclosed devices and methods may be implemented in other manners. For example, the described devices are merely examples. For example, the division into modules or units is merely a logical division of functions. In actual implementation, there may be other division schemes. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not implemented. In addition, the shown or discussed mutual couplings or direct couplings or communication connections may be implemented by using some interface. Indirect couplings or communication connections between devices or units may be implemented electronically, mechanically, or in other forms.

[0390] Units described as separate components may or may not be physically separated, and components shown as units may be one or more physical units, i.e., located in one place or distributed across multiple different places. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0391] In addition, the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0392] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a readable storage medium. Based on this understanding, the technical solutions in the embodiments of the present application may be essentially implemented in the form of a software product, or the portion contributing to the prior art or all or part of the technical solutions may be implemented in the form of a software product. The software product is stored in a storage medium and includes some instructions for instructing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to perform all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes any medium capable of storing program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0393] The above description is merely a specific implementation form of the present application and is not intended to limit the protection scope of the present application. Any modifications or replacements within the technical scope disclosed in the present application shall fall within the protection scope of the present application. Therefore, the protection scope of the present application shall depend on the protection scope of the claims. [Explanation of symbols]

[0394] 1. Video Coding System 5. Bidirectional Inter Prediction Device 6. Bidirectional Inter Prediction Device 10 Source Device 20 Destination Device 30 Links 40 Storage device 50 Acquired Units 51 Decision Unit 52 Memory Unit 60 Processing Modules 61 Communication Module 62 Memory Module 101 Video Sources 102 Video Encoder 103 Output Interface 201 Display device 202 Video Decoder 203 Input Interface 301 Converter 302 Quantizer 303 Entropy Encoder 304 Inverse quantizer 305 Inverse Converter 306 Filters 307 Memory 308 Prediction Processing Unit 309 Intra Predictor 310 Inter Predictor 311 Adder 312 Adder 401 Entropy Decoder 402 Inverse quantizer 403 Inverse Converter 404 filter 405 memory 406 Prediction Processing Unit 407 Intra Predictor 408 Inter Predictor 409 Adder 510 processor 530 memory 531 Data 533 Operating Systems 550 Bus System 555 Coding Device 570 Display 3102 Capture Device 3106 Terminal Device 3108 Smartphone / Tablet Computer 3110 Computer / Notebook Computer 3112 NVR / DVR 3114 TV 3116 Set-top Box 3118 Video Conference System 3120 Video Surveillance System 3124 In-Vehicle Devices 3126 Display 3202 Protocol Processing Unit 3204 Demultiplexing Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronous Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display 5000 Bidirectional Inter Prediction Device 5001 Acquired Units 5002 Decision Unit 5003 Inter-prediction processing unit

Claims

1. When (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0 and the first identifier is equal to a first preset value, the reference picture index i of the first reference picture list 1 as a first reference picture index of the first reference picture list corresponding to the current block, 1 is smaller than the POC of the current picture, and the POC of the current picture is 1 The difference obtained by subtracting the POC corresponding to the reference picture index i from the POC of the current picture is x and the difference obtained by subtracting the POC corresponding to the reference picture index i x is the reference picture index i among the reference picture indexes of the first reference picture list 1 any reference picture index other than the reference picture index i x the POC corresponding to the current picture is smaller than the POC of the current picture; When (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0 and the first identifier is equal to the first preset value, the reference picture index i of the second reference picture list 2 as a second reference picture index in the second reference picture list corresponding to the current block, 2 is greater than the POC of the current picture, and the POC of the current picture is 2 The difference obtained by subtracting the POC corresponding to the reference picture index i from the POC of the current picture is y and the difference obtained by subtracting the POC corresponding to the reference picture index i y is the reference picture index i among the reference picture indexes of the second reference picture list 2 any reference picture index other than the reference picture index i y the POC corresponding to the current picture is greater than the POC of the current picture; predicting the current block based on the first reference picture index and the second reference picture index, wherein the current picture comprises the current block; A bidirectional inter prediction method comprising:

2. the first identifier is further used to indicate that a second motion vector differential of the current block is determined based on a first motion vector differential of the current block, and the method includes: obtaining the first motion vector differential of the current block; obtaining the second motion vector differential of the current block based on the first motion vector differential according to the following formula: Furthermore, mvd_lY=-mvd_lX 2. The method of claim 1, wherein mvd_lY represents the second motion vector differential, mvd_lX represents the first motion vector differential, one of the first motion vector differential and the second motion vector differential corresponds to the first reference picture list, and the other of the first motion vector differential and the second motion vector differential corresponds to the second reference picture list.

3. obtaining a first motion vector predictor and a second motion vector predictor; determining a first motion vector based on the first motion vector predictor and the first motion vector differential; determining a second motion vector based on the second motion vector predictor and the second motion vector differential; Furthermore, 3. The method of claim 2, wherein predicting the current block based on the first reference picture index and the second reference picture index comprises predicting the current block based on the first reference picture index, the second reference picture index, the first reference picture list, the second reference picture list, the first motion vector, and the second motion vector.

4. When (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0 and the first identifier is equal to a first preset value, the reference picture index i of the first reference picture list 1 as the first reference picture index of the first reference picture list corresponding to the current block, and the reference picture index i 1 is smaller than the POC of the current picture, and the POC of the current picture is 1 The difference obtained by subtracting the POC corresponding to the reference picture index i from the POC of the current picture is x and the difference obtained by subtracting the POC corresponding to the reference picture index i x is the reference picture index i among the reference picture indexes of the first reference picture list 1 any reference picture index other than the reference picture index i x the POC corresponding to is smaller than the POC of the current picture; When (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0 and the first identifier is equal to the first preset value, the reference picture index i of the second reference picture list 2 as a second reference picture index in the second reference picture list corresponding to the current block, and the reference picture index i 2 is greater than the POC of the current picture, and the POC of the current picture is 2 The difference obtained by subtracting the POC corresponding to the reference picture index i from the POC of the current picture is y and the difference obtained by subtracting the POC corresponding to the reference picture index i y is the reference picture index i among the reference picture indexes of the second reference picture list 2 any reference picture index other than the reference picture index i y the POC corresponding to the current picture is greater than the POC of the current picture; and an inter-prediction processing unit configured to predict the current block based on the first reference picture index and the second reference picture index, wherein the current picture comprises the current block; and A bidirectional inter prediction device comprising:

5. The first identifier is further used to indicate that a second motion vector differential of the current block is determined based on a first motion vector differential of the current block, and the obtaining unit: further configured to obtain the first motion vector differential for the current block; the determining unit is further configured to obtain the second motion vector differential of the current block based on the first motion vector differential according to the following equation: mvd_lY=-mvd_lX 5. The apparatus of claim 4, wherein mvd_lY represents the second motion vector differential, mvd_lX represents the first motion vector differential, one of the first motion vector differential and the second motion vector differential corresponds to the first reference picture list, and the other of the first motion vector differential and the second motion vector differential corresponds to the second reference picture list.

6. The acquisition unit: further configured to obtain a first motion vector predictor and a second motion vector predictor; The decision unit is particularly determining a first motion vector based on the first motion vector predictor and the first motion vector differential; determining a second motion vector based on the second motion vector predictor and the second motion vector differential; further configured as follows:

6. The apparatus of claim 5, wherein the inter-prediction processing unit is specifically configured to predict the current block based on the first reference picture index, the second reference picture index, the first reference picture list, the second reference picture list, the first motion vector, and the second motion vector.

7. an inter-prediction module configured to perform the method of any one of claims 1 to 3; a reconstruction module configured to reconstruct a current block based on the predicted sample values ​​obtained by the inter-prediction module; A video encoding device comprising:

8. an inter-prediction module configured to perform the method of any one of claims 1 to 3; a reconstruction module configured to reconstruct a current block based on the predicted sample values ​​obtained by the inter-prediction module; 1. A video decoding device comprising:

9. 4. A video encoding device comprising a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to perform the method of any one of claims 1 to 3.

10. 4. A video decoding device comprising a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to perform the method of any one of claims 1 to 3.

11. 4. A computer-readable storage medium storing a computer program, the computer program performing the method of any one of claims 1 to 3 when executed on a processor.

12. a terminal, the terminal comprising one or more processors, a memory, and a communication interface; 4. A terminal, wherein the memory and the communication interface are connected to the one or more processors, the terminal communicates with another device through the communication interface, the memory is configured to store computer program code, the computer program code comprising instructions, the one or more processors execute the instructions, and the terminal performs the bidirectional inter prediction method of claim 1 .

Citation Information

Patent Citations

  • Decoding method and coding method

    JP2008154015A

  • Image decoder, image decoding method and image decoding program

    JP2013016935A

  • Method and apparatus for determining reference image for inter prediction

    JP2015516753A