Method and apparatus for bi-directional inter prediction

By determining second motion information based on first motion information, the method reduces the transmission of motion information in bidirectional inter-prediction, enhancing resource and coding efficiency.

JP2026016413APending Publication Date: 2026-02-03HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2025165682
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-03-29
Filing Date
2025-10-01
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

In bidirectional inter-prediction, the transmission of motion information for each image block in both directions results in a significant consumption of transmission resources, reducing the effective utilization of resources, transmission rate, and coding compression efficiency.

Method used

A method and apparatus for bidirectional inter-prediction that determines second motion information based on first motion information, reducing the need for transmitting second motion information in the bitstream by using indication information and first motion information.

Benefits of technology

This approach effectively reduces the amount of motion information in the bitstream, improving the utilization of transmission resources, transmission rate, and coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026016413000001_ABST
    Figure 2026016413000001_ABST
Patent Text Reader

Abstract

Embodiments of this application relate to the field of video coding technologies, and disclose a bidirectional inter prediction method and apparatus, to improve coding efficiency.SOLUTION: The method includes obtaining indication information, where the indication information is used to indicate to determine second motion information based on first motion information, the first motion information is motion information of a current picture block in a first direction, and the second motion information is motion information of the current picture block in a second direction, obtaining the first motion information, determining the second motion information based on the first motion information, and determining a prediction sample of the current picture block based on the first motion information and the second motion information.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to Chinese Patent Application No. 201810274457.X, entitled "BIDIRECTIONAL INTER PREDICTION METHOD AND APPARATUS," filed with the State Intellectual Property Office of China on March 29, 2018, which is incorporated herein by reference in its entirety.

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

[0003] In video coding techniques, a prediction picture block of a current image block may be generated based on only one reference picture block (referred to as unidirectional inter-prediction), or the prediction picture block of a current image block may be generated based on at least two reference picture blocks (referred to as bidirectional inter-prediction), where the at least two reference picture blocks may be from the same reference frame or different reference frames.

[0004] In order to enable the decoder and the encoder to use the same reference image block, the encoder needs to send motion information of each image block to the decoder in a bitstream. Generally, the motion information of the current image block includes a reference frame index value, a motion vector predictor (MVP) flag, and a motion vector difference (MVD). The decoder may find the correct reference image block in the selected reference frame based on the reference frame index value, the MVP flag, and the MVD.

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

[0006] The embodiments of the present application provide a method and apparatus for bidirectional inter-prediction to solve the problem that motion information occupies a relatively large amount of transmission resources, thereby reducing the effective utilization rate of transmission resources, transmission rate, and coding compression efficiency.

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

[0008] According to a first aspect, a bidirectional inter prediction method is provided, the method including the steps of: obtaining indication information used to instruct determining second motion information based on first motion information, the first motion information being motion information of a current image block in a first direction, and the second motion information being motion information of the current image block in a second direction; obtaining the first motion information; determining the second motion information based on the obtained first motion information; and determining a prediction sample of the current image block based on the obtained first motion information and the determined second motion information.

[0009] The bidirectional inter-prediction method provided in the present application determines second motion information based on first motion information after obtaining indication information. In this manner, the bitstream only needs to include indication information and first motion information, and no longer needs to include second motion information. Compared with the prior art in which the bitstream includes motion information for each image block in each direction, the bidirectional inter-prediction method provided in the present application effectively reduces the motion information included in the bitstream, improving the effective utilization of transmission resources, transmission rate, and coding rate.

[0010] Optionally, in one possible implementation form 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 frame in the first motion information; and determining a sequence number of the first reference frame based on the index value of the first reference frame and a first reference frame list, where the first reference frame in this specification is a reference frame of a current image block in a first direction, and the index value of the first reference frame is the number of the first reference frame in the first reference frame list; obtaining an index value of a second reference frame; determining a sequence number of a second reference frame based on an index value of the reference frame and a second reference frame list, where the second reference frame in this specification is a reference frame of a current image block in a second direction, and the index value of the second reference frame is a number of the second reference frame in the second reference frame 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 a motion vector of the current image block in the first direction; and a formula

number

[0011] In the above formula, mv_lY represents the second motion vector, POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current image block in the second direction.

[0012] Optionally, in another possible implementation form 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 frame in the first motion information, where the first reference frame is a reference frame of a current image block in a first direction and the index value of the first reference frame is a number of the first reference frame in a first reference frame list; obtaining an index value of a second reference frame, where the second reference frame is a reference frame of a current image block in a second direction and the index value of the second reference frame is a number of the second reference frame in a second reference frame list; and obtaining a first motion vector difference in the first motion information. determining a first motion vector based on the first motion vector predictor flag and a first motion vector predictor flag, wherein the first motion vector is a motion vector of the current image block in a first direction; and when the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, mv_lY=-mv_lX deriving a second motion vector in the second motion information according to

[0013] In the above formula, 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 image block in the second direction.

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

[0015] In addition, both "the first reference frame and the second reference frame are each forward reference frames of the current image block" and "the first reference frame and the second reference frame are each backward reference frames of the current image block" may be expressed by using the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)<0.

[0016] POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, and POC_listY represents the sequence number of the second reference frame.

[0017] Optionally, in another possible implementation form 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 frame and a first motion vector differential in the first motion information; and determining a sequence number of the first reference frame based on the index value of the first reference frame and a first reference frame list, where the first reference frame is a reference frame of a current image block in a first direction, and the index value of the first reference frame is the number of the first reference frame in the first reference frame list; a step of obtaining a frame index value of the second reference frame; determining a sequence number of the second reference frame based on the index value of the second reference frame and the second reference frame list; and determining a second predicted motion vector based on the index value of the second reference frame and the second candidate predicted motion vector list, wherein the second predicted motion vector is a predicted motion vector of the current image block in the second direction, the second reference frame is a reference frame of the current image block in the second direction, and the index value of the second reference frame is a number of the second reference frame in the second reference frame list;

number

[0018] Optionally, in another possible implementation form 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 frame and a first motion vector in the first motion information, where the first reference frame is a reference frame of a current image block in a first direction, and the index value of the first reference frame is a number of the first reference frame in a first reference frame list; obtaining an index value of a second reference frame, and determining a second predicted motion vector based on the index value of the second reference frame and a second candidate predicted motion vector list, where the second predicted motion vector is a predicted motion vector of the current image block in a second direction. where the second reference frame is a reference frame of the current image block in the second direction, and the index value of the second reference frame is the number of the second reference frame in the second reference frame list. Step: When the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, the formula mvd_lY=-mvd_lX deriving a second motion vector differential in the second motion information according to In the above formula, mvd_lY represents the second motion vector differential 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, where the second motion vector is the motion vector of the current image block in the second direction.

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

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

[0021] POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, and POC_listY represents the sequence number of the second reference frame.

[0022] It may be understood that the bidirectional inter prediction method provided in the present application may be a step of determining a second motion vector based on a first motion vector, or a step of determining a second motion vector differential based on a first motion vector differential, and a step of determining a second motion vector based on the second motion vector differential.

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

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

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

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

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

[0028] It can be understood that in the present application, there may be multiple methods for "obtaining the index value of the second reference frame", and the specific method used to obtain the index value of the second reference frame needs to be determined or preset based on actual requirements.

[0029] According to a second aspect, there is provided a bidirectional inter prediction apparatus, the bidirectional inter prediction apparatus comprising: an obtaining unit and a determining unit.

[0030] In particular, the acquisition unit is configured to acquire instruction information, the instruction information being used to instruct determining second motion information based on first motion information, the first motion information being motion information of a current image block in a first direction and the second motion information being motion information of the current image block in a second direction, and to acquire the first motion information. The determination unit is configured to determine the second motion information based on the first motion information acquired by the acquisition unit, and to determine a predicted sample of the current image block based on the first motion information and the second motion information.

[0031] Optionally, in one possible implementation form of the present application, the determining unit obtains an index value of a first reference frame in the first motion information, and determines a sequence number of the first reference frame based on the index value of the first reference frame and a first reference frame list, where the first reference frame is a reference frame of a current image block in a first direction, and the index value of the first reference frame is a number of the first reference frame in the first reference frame list; obtains an index value of a second reference frame, and determines a sequence number of the second reference frame based on the index value of the second reference frame and the second reference frame list, where the second reference frame is a reference frame of the current image block in a second direction, and the index value of the second reference frame is a number of the second reference frame in the second reference frame list; determines a first motion vector based on the first motion vector differential and a first motion vector predictor flag in the first motion information, where the first motion vector is a motion vector of the current image block in the first direction, and

number

[0032] In the above formula, mv_lY represents the second motion vector, POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current image block in the second direction.

[0033] Optionally, in another possible implementation form of the present application, the determining unit obtains an index value of a first reference frame in the first motion information, where the first reference frame is a reference frame of the current image block in a first direction, and the index value of the first reference frame is a number of the first reference frame in a first reference frame list; obtain an index value of a second reference frame, where the second reference frame is a reference frame of the current image block in a second direction, and the index value of the second reference frame is a number of the second reference frame in the second reference frame list; and obtain a first motion vector differential and a first motion vector predictor flag in the first motion information. and determining a first motion vector based on: and the first motion vector is a motion vector of the current image block in a first direction, and when the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, mv_lY=-mv_lX The second motion information is particularly configured to derive a second motion vector in the second motion information according to

[0034] In the above formula, 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 image block in the second direction.

[0035] Optionally, in another possible implementation form of the present application, the determining unit obtains an index value of a first reference frame and a first motion vector differential in the first motion information; and determines a sequence number of the first reference frame according to the index value of the first reference frame and a first reference frame list, where the first reference frame is a reference frame of a current image block in a first direction, and the index value of the first reference frame is a number of the first reference frame in the first reference frame list; obtains an index value of a second reference frame; determine a sequence number of a second reference frame according to the index value of the reference frame and the second reference frame list; determine a second predicted motion vector according to the index value of the second reference frame and the second candidate predicted motion vector list, where the second predicted motion vector is a predicted motion vector of a current image block in a second direction, the second reference frame is a reference frame of the current image block in the second direction, the index value of the second reference frame is a number of the second reference frame in the second reference frame list, and the formula

number

[0036] Optionally, in another possible implementation form of the present application, the determining unit obtains an index value of a first reference frame and a first motion vector in the first motion information, where the first reference frame is a reference frame of a current image block in a first direction, and the index value of the first reference frame is a number of the first reference frame in a first reference frame list; obtains an index value of a second reference frame, and determines a second predicted motion vector according to the index value of the second reference frame and the second candidate predicted motion vector list, where the second predicted motion vector is a predicted motion vector of the current image block in a second direction, and the second reference frame is a number of the first reference frame in a first reference frame list; the index value of the second reference frame is the number of the second reference frame in the second reference frame list; when the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, 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 is particularly configured to determine a second motion vector based on the second predicted motion vector and the second motion vector differential, where the second motion vector is a motion vector of the current image block in the second direction.

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

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

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

[0040] According to a third aspect, a bidirectional inter prediction method is provided. The bidirectional inter prediction method can be implemented in several ways.

[0041] One implementation includes the steps of: analyzing a bitstream to obtain a first identifier, the first identifier being used to indicate whether to determine second motion information based on first motion information, the first motion information being motion information of a current image block in a first direction, and the second motion information being motion information of a current image block in a second direction; obtaining the first motion information and determining the second motion information based on the first motion information when the value of the first identifier is a first preset value; and determining a predicted sample of the current image block based on the first motion information and the second motion information.

[0042] Another implementation form includes a step of analyzing the bitstream to obtain a second identifier, where the second identifier is used to indicate whether to calculate motion information of the current image block by using a motion information derivation algorithm; a step of obtaining a third identifier when the value of the second identifier is a second preset value, where the third identifier is used to indicate whether to determine the second motion information based on the first motion information, where the first motion information is motion information of the current image block in a first direction and the second motion information is motion information of the current image block in a second direction; a step of obtaining the first motion information and determining the second motion information based on the first motion information when the value of the third identifier is a third preset value; and a step of determining a predicted sample of the current image block based on the first motion information and the second calculation information.

[0043] Another implementation form includes a step of analyzing the bitstream to obtain a second identifier, where the second identifier is used to indicate whether to calculate motion information for the current image block by using a motion information derivation algorithm; a step of obtaining first motion information when the value of the second identifier is a second preset value, and determining second motion information based on the first motion information, where the first motion information is motion information for the current image block in a first direction and the second motion information is motion information for the current image block in a second direction; and a step of determining a predicted sample for the current image block based on the first motion information and the second motion information.

[0044] Another implementation includes the steps of: parsing the bitstream to obtain a fourth identifier, the fourth identifier being used to indicate whether to calculate motion information of the current image block by using a motion information derivation algorithm; and determining an index value of a first reference frame and an index value of a second reference frame based on a first reference frame list and a second reference frame list when the value of the fourth identifier is a fourth preset value, wherein the first reference frame list is a reference frame list of the current image block in a first direction, and the second reference frame list is a reference frame list of the current image block in a second direction. wherein the first reference frame is a reference frame of the current image block in a first direction and the second reference frame is a reference frame of the current image 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 frame, the first motion vector differential, and the first motion vector predictor flag, and the second motion information is motion information of the current image block in the second direction; and determining a predicted sample of the current image block based on the first motion information and the second motion information.

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

[0046] Another implementation form includes a step of analyzing the bitstream to obtain a second identifier, where the second identifier is used to indicate whether to calculate motion information of the current image block by using a motion information derivation algorithm; a step of obtaining a third identifier if the value of the second identifier is a second preset value, where the third identifier is used to indicate whether to determine the second motion information based on the first motion information, where the first motion information is motion information of the current image block in a first direction and the second motion information is motion information of the current image block in a second direction; a step of obtaining the second motion information if the value of the third identifier is a sixth preset value and determining the first motion information based on the second motion information; and a step of determining a predicted sample of the current image block based on the first motion information and the second calculation information.

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

[0048] In the bidirectional inter-prediction method provided in the present application, an identifier is obtained by analyzing the bitstream, and then whether to determine second motion information based on first motion information is determined based on the value of the identifier. After it is determined that 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 to the prior art in which the bitstream includes motion information for each image block in each direction, the bidirectional inter-prediction method provided in the present application effectively reduces the motion information included in the bitstream, improving the effective utilization of transmission resources, transmission rate, and coding rate.

[0049] According to a fourth aspect, there is provided a bidirectional inter prediction apparatus, the bidirectional inter prediction apparatus comprising: an obtaining unit; and a determining unit.

[0050] In particular, in one implementation, the acquisition unit is configured to analyze the bitstream to obtain a first identifier, the first identifier is used to indicate whether to determine second motion information based on first motion information, the first motion information is motion information of the current image block in a first direction, and the second motion information is motion information of the current image block in a second direction, and to acquire the first motion information when the 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 to determine a predicted sample of the current image block based on the first motion information and the second motion information.

[0051] In another implementation, the acquisition unit is configured to analyze the bitstream to obtain a second identifier, the second identifier being used to indicate whether to calculate motion information of the current image block by using a motion information derivation algorithm, obtain a third identifier when the value of the second identifier is a second preset value, the third identifier being used to indicate whether to determine the second motion information based on the first motion information, the first motion information being motion information of the current image block in a first direction and the second motion information being motion information of the current image block in a second direction, and acquire the first motion information when 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 image block based on the first motion information and the second motion information.

[0052] In another implementation, the acquisition unit is configured to analyze the bitstream to obtain a second identifier, the second identifier being used to indicate whether to calculate motion information of the current image block by using a motion information derivation algorithm, and to acquire the first motion information when 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 image block in a first direction and the second motion information being motion information of the current image block in a second direction, and to determine a predicted sample of the current image block based on the first motion information and the second motion information.

[0053] In another implementation, the acquisition unit is configured to analyze the bitstream to obtain a fourth identifier, where the fourth identifier is used to indicate whether to calculate motion information of the current image block by using a motion information derivation algorithm. The determination unit is configured to determine an index value of the first reference frame and an index value of the second reference frame based on the first reference frame list and the second reference frame list when the value of the fourth identifier obtained by the acquisition unit is a fourth preset value, where the first reference frame list is a reference frame list of the current image block in a first direction, the second reference frame list is a reference frame list of the current image block in a second direction, the first reference frame is a reference frame of the current image block in the first direction, and the second reference frame is a reference frame of the current image 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 a first reference frame, a first motion vector differential, and a first motion vector predictor flag, and the second motion information is motion information of the current image block in a second direction, and to determine a predicted sample of the current image block based on the first motion information and the second motion information.

[0054] According to a fifth 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. The computer program code includes instructions. When the one or more processors execute the instructions, the terminal performs a bidirectional inter prediction method according to the first aspect or any one of possible implementation forms of the first aspect, or performs a bidirectional inter prediction method according to the third aspect or any one of possible implementation forms of the third aspect.

[0055] According to a sixth aspect, there is provided a video decoder, the video decoder comprising: a non-volatile storage medium; and a central processing unit. The non-volatile storage medium stores an executable program. The central processing unit is connected to the non-volatile storage medium and executes the executable program implementing the bidirectional inter prediction method according to the first aspect or any one of the possible implementation forms of the first aspect, or the bidirectional inter prediction method according to the third aspect or any one of the possible implementation forms of the third aspect.

[0056] According to a seventh aspect, there is provided a decoder comprising: the bidirectional inter predictor of the second aspect; and a reconstruction module, wherein the reconstruction module is configured to determine reconstructed sample values ​​of the current image block based on prediction samples obtained by the bidirectional inter predictor; or the decoder comprises the bidirectional inter predictor of the fourth aspect; and a reconstruction module, wherein the reconstruction module is configured to determine reconstructed sample values ​​of the current image block based on prediction samples obtained by the bidirectional inter predictor.

[0057] According to an eighth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions in the fifth aspect are executed on a terminal, the terminal is enabled to perform a bidirectional inter prediction method according to the first aspect or any one of possible implementation forms of the first aspect, or to perform a bidirectional inter prediction method according to the third aspect or any one of possible implementation forms of the third aspect.

[0058] According to a ninth aspect, there is provided a computer program product including instructions, wherein when the computer program product according to the fifth aspect is executed on a terminal, the terminal is enabled to perform the bidirectional inter prediction method according to the first aspect or any one of possible implementation forms of the first aspect, or the bidirectional inter prediction method according to the third aspect or any one of possible implementation forms of the third aspect.

[0059] 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. If the function of the device or functional module is similar to that included in this application, the device or functional module falls within the scope of the claims of this application and its equivalent technology.

[0060] For specific descriptions of the fifth to ninth aspects and implementation forms of the fifth to ninth aspects, please refer to the detailed description of the first aspect and implementation form of the first aspect or the detailed description of the third aspect and implementation form of the third aspect. In addition, for beneficial effects of the fifth to ninth aspects and implementation forms of the fifth to ninth aspects, please refer to the analysis of beneficial effects of the first aspect and implementation form of the first aspect or the analysis of beneficial effects of the third aspect and implementation form of the third aspect. Details will not be described again here.

[0061] These and other aspects of the present application are more briefly and comprehensively described below. [Brief explanation of the drawings]

[0062] [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 5] 1 is a first schematic structural diagram of a bidirectional inter-prediction device according to an embodiment of the present application; [Figure 6] FIG. 2 is a second schematic structural diagram of a bidirectional inter-prediction device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION

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

[0064] In the embodiments of this application, the word "example" or the phrase "for example" is used to provide an example, to illustrate, or to explain. Any embodiment or design scheme described in the embodiments of this application as an "example" or "for example" should not be described as preferred or having more advantages than another embodiment or design scheme. Rather, the use of phrases such as "example" or "for example" is intended to present the relevant concept in a particular way.

[0065] To facilitate understanding of the embodiments of the present application, relevant elements in the embodiments of the present application are described at the beginning of this specification.

[0066] Picture encoding: The process of compressing an image sequence into a bitstream.

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

[0068] Currently, the video encoding process is as follows: First, an encoder divides an original frame into multiple non-overlapping parts, and each part may be used as an image block. Then, the encoder performs operations such as prediction, transformation, and quantization on each image block to obtain a bitstream corresponding to the image block. Prediction is performed to obtain a predicted block of the image block, so that only the difference (also called a residual or residual block) between the image block and the predicted block of the image block is coded and transmitted, thereby reducing transmission overhead. Finally, the encoder sends the bitstream corresponding to the image block to a decoder.

[0069] Correspondingly, after receiving the bitstream, the decoder performs a video decoding process. Specifically, the decoder performs operations such as prediction, inverse quantization, and inverse transform on the received bitstream to obtain reconstructed image blocks (also referred to as reconstructed image blocks). This process is referred to as an image reconstruction process (or image reconstruction processing). Then, the decoder assembles the reconstruction blocks of each image block in the original image to obtain a reconstructed image of the original image, and reproduces the reconstructed image.

[0070] Existing video coding techniques include intra-prediction and inter-prediction. Inter-prediction is a prediction method that uses correlation between a current frame and a reference frame of the current frame to code / decode an image block. The current frame may have one or more reference frames. Specifically, a predicted image block of the current image block is generated based on samples in the reference frame of the current image block.

[0071] Generally, the predicted image block of a current image block may be generated based on only one reference image block, or may be generated based on at least two reference image blocks. Generating the predicted image block of a current image block based on one reference image block is referred to as unidirectional prediction, while generating the predicted image block of a current image block based on at least two reference image blocks is referred to as bidirectional inter-prediction. The at least two reference image blocks in bidirectional inter-prediction may be from the same reference frame or from different reference frames. In other words, the term "direction" in this application is a generalized definition. One direction in this application corresponds to one reference image block. The following first and second directions correspond to different reference image blocks. The two reference image blocks may be included in the forward reference frame / backward reference frame of the current image block, or one reference image block may be included in the forward reference frame of the current image block and the other reference image block may be included in the backward reference frame of the current image block.

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

[0073] 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 is inter-prediction performed by using correlation between a current video frame and a video frame that is coded and played before the current video frame. Backward inter-prediction is inter-prediction performed by using correlation between a current video frame and a video frame that is coded before the current video frame and played after the current video frame.

[0074] Forward inter prediction corresponds to forward reference frame list L0, and backward inter prediction corresponds to backward reference frame list L1. The two reference frame lists may contain the same number of reference frames or different numbers of reference frames.

[0075] Motion Compensation (MC) is the process of predicting a current image block by using reference image blocks.

[0076] 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 image blocks. Video encoding / decoding is performed by image blocks. The encoding / decoding process may be performed row by row, starting from the upper left corner of the image, from left to right and from top to bottom. In this specification, an image 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 the present application.

[0077] In this application, the image block being coded / decoded is referred to as the current image block, and the image in which the current image block is located is referred to as the current frame.

[0078] In general, the current frame may be a unidirectionally predicted frame (P frame) or a bidirectionally predicted frame (B frame). When the current frame is a P frame, it has one reference frame list. When the current frame is a B frame, it has two reference frame lists, which are usually referred to as L0 and L1, respectively. Each reference frame list includes at least one reconstructed frame used as a reference frame for the current frame. The reference frames are used to provide reference samples for inter-prediction of the current frame.

[0079] In the current frame, neighboring image blocks of the current image block (e.g., to the left, above, or right of the current block) may already be coded / decoded, and a reconstructed image is obtained. The neighboring image blocks are referred to as reconstructed image blocks. Information such as the coding mode and reconstructed samples of the reconstructed image block is available.

[0080] A frame that has been coded / decoded before the current frame is coded / decoded is called a reconstructed frame.

[0081] A motion vector (MV) is an important parameter in the inter prediction process and represents the spatial displacement of a coded image block relative to a current image block. Typically, a motion vector may be obtained by using a motion estimation (ME) method such as motion search. In a preliminary inter prediction technique, an encoder transmits the motion vector of a current image block in a bitstream, so that a decoder reproduces a predicted sample of the current image block to obtain a reconstructed block. To further improve coding efficiency, a method for differentially coding a motion vector by using a reference motion vector will be described later. Specifically, only a motion vector difference (MVD) is coded.

[0082] In order to enable the decoder and the encoder to use the same reference image block, the encoder needs to send the motion information of each image block to the decoder in a bitstream. If the encoder directly encodes the motion vector of each image block, a large amount of transmission resources will be consumed. Because the motion vectors of spatially adjacent image blocks have a strong correlation, the motion vector of the current image block can be predicted based on the motion vectors of the encoded adjacent image blocks. The motion vector obtained through prediction is called MVP, and the difference between the motion vector of the current image block and the MVP is called MVD.

[0083] In the video coding standard H.264, multiple reference frame prediction is used in the motion estimation process to improve prediction accuracy. Specifically, a buffer is created to store multiple reconstructed frames, and all reconstructed frames in the buffer are searched for the optimal reference image block for motion compensation, thereby successfully removing temporal redundancy. In the video coding standard H.264, two buffers, namely, reference frame list 0 and reference frame list 1, are used in inter prediction. The reference frame in which the optimal reference block in each list is located is marked with index values, namely, ref_idx_l0 and ref_idx_l1. In each reference frame list, the motion information of the reference image block includes a reference frame index value (ref_idx_l0 or ref_idx_l1), an MVP flag, and an MVD. A decoder may find the correct reference image block in the selected reference frame based on the reference frame index value, the MVP flag, and the MVD.

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

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

[0086] In the merge mode, the encoder constructs a candidate motion information list by using motion information of coded image blocks spatially or temporally adjacent to the current image block, and determines the best motion information in the candidate motion information list as the motion information of the current image block based on the rate-distortion cost. The encoder transmits an index value of the position of the best motion information in the candidate motion information list to the decoder.

[0087] In the non-translational 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 image block, and perform motion compensation based on the motion information of all sub-blocks to obtain a predicted image 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.

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

number

[0089] For example, a six-parameter affine transformation model may be represented by using motion vectors of three samples and the coordinates of the three samples relative to the sample at the upper-left corner of the current image block. If the sample at the upper-left corner (0,0) of the current image block, the sample at the upper-right corner (W,0) of the current image block, and the sample at the lower-left corner (0,H) of the current image block are control points, and the motion vectors of the samples at the upper-left corner, upper-right corner, and lower-left corner of the current image block are (vx0,vy0), (vx1,vy1), and (vx2,vy2), respectively, motion information of each sub-block of the current image 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 image block, (vx,vy) is the motion vector of the sub-block, and W and H are the width and height of the current image block, respectively.

number

[0090] For example, an eight-parameter bilinear model may be represented by using motion vectors of four samples and coordinates of the four samples relative to the sample at the upper-left corner of the current image block. The sample at the upper-left corner (0,0) of the current image block, the sample at the upper-right corner (W,0) of the current image block, the sample at the lower-left corner (0,H) of the current image block, and the sample at the lower-right corner (W,H) of the current image block are control points, and the motion vectors of the samples at the upper-left corner, upper-right corner, lower-left corner, and lower-right corner of the current image block are (vx0,vy0), (vx1,vy1), (vx2,vy2), and (vx3,vy3), respectively. The motion information of each sub-block of the current image 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 image block, (vx,vy) is the motion vector of the sub-block, and W and H are the width and height of the current image block, respectively.

number

[0091] It can be easily seen that in any one of the above inter-prediction modes, if inter-prediction is bidirectional inter-prediction, the encoder needs to send the motion information of each image block in each direction to the decoder.As a result, the motion information occupies a relatively large amount of transmission resources.This reduces the effective utilization rate of transmission resources, transmission rate, and coding compression efficiency.

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

[0093] 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 other device with video coding capabilities.

[0094] The bidirectional inter prediction method provided in this application is applicable to a video coding system. In the video coding system, a video encoder 100 and a video decoder 200 are configured to calculate motion information of a current image block according to the example of the bidirectional inter prediction method provided in this application. In particular, the motion information of the current image block in the second direction is calculated based on the motion information of the current image block in the first direction, so that the predicted sample of the current image block is determined based on the motion information of the current image block in the first direction and the motion information of the current image block in the second direction. In this method, only the motion information of the current image block in the first direction needs to be transmitted between the video encoder 100 and the video encoder 200. This effectively improves the utilization rate of transmission resources and enhances coding compression efficiency.

[0095] FIG. 1 shows the structure of a video coding system 1. 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 may be configured to store required program code in the form of instructions or a data structure accessible by a computer. This is not particularly limited in the present application.

[0096] The source device 10 and the destination device 20 may include a variety of devices, including a desktop computer, a mobile computing device, a notebook (e.g., laptop) computer, a tablet computer, a set-top box, a handheld mobile phone such as a "smart" phone, a television set, a camera, a display device, a digital media player, a video game console, an in-vehicle computer, or similar devices.

[0097] Destination device 20 may receive encoded video data from source device 10 via link 30. Link 30 may comprise one or more media and / or devices capable of transferring encoded video data from source device 10 to destination device 20. In one example, link 30 may include one or more communication media that enable source device 10 to transmit encoded video data directly to destination device 20 in real time. In this example, 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 destination device 20. The one or more communication media may include wireless and / or wired communication media, e.g., radio frequency (RF) spectrum, or one or more physical transmission cables. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication mediums may include a router, a switch, a base station, or another device that implements communication from source device 10 to destination device 20.

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

[0099] 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 that can store encoded video data and transmit the encoded video data to destination device 20. For example, the file server may include a World Wide Web (Web) server (e.g., used for websites), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, and a local disk drive.

[0100] Destination device 20 may access the encoded video data through any standard data connection (e.g., an Internet connection). Examples of types of data connection include a wireless channel or a wired connection (e.g., a cable modem), or a combination thereof, suitable for accessing encoded video data stored on a file server. The encoded video data may be transmitted from the file server in a streaming manner, a download manner, or a combination thereof.

[0101] 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 applied to video coding to support multiple multimedia applications, such as television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., via the Internet), encoding video data stored on a data storage medium, decoding video data stored on a data storage medium, or another application. In some examples, the video coding system 1 may be configured to support one-way or two-way video transmission to support applications such as streaming video transmission, video playback, video broadcasting, and / or video telephony.

[0102] It should be noted that the video coding system 1 shown in FIG. 1 is merely an example of a video coding system and is not intended to limit the video coding system of the present application. The bidirectional inter prediction method provided in the present application may be 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 or transmitted in a streaming format over a network or in a similar manner. 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 also retrieve the encoded video data from the memory and decode the encoded video data.

[0103] 1, source device 10 includes video source 101, video encoder 102, and output interface 103. In some examples, output interface 103 may include a regulator / 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.

[0104] Video encoder 102 may encode video data sourced from video source 101. In some examples, source device 10 transmits the encoded video data directly to destination device 20 via output interface 103. In other examples, the encoded video data may alternatively be stored in storage device 40, such that destination device 20 subsequently accesses the encoded video data for decoding and / or playback.

[0105] 1, destination device 20 includes display device 201, video decoder 202, and input interface 203. In some examples, input interface 203 includes a receiver and / or a modem. Input interface 203 may receive encoded video data via 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, such as a liquid crystal display, a plasma display, an organic light-emitting diode display, or another type of display device.

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

[0107] The video encoder 102 and the video decoder 202 may comprise 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 methods provided herein are implemented using software, the instructions used in 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 hardware to implement the present application. Any one of the foregoing (hardware, software, a combination of hardware and software, and the like) 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.

[0108] 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 another industry standard, which is not particularly limited in this application.

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

[0110] Optionally, the method used by video encoder 102 to calculate the motion information of the current image block in the second direction based on the motion information of the current image block in the first direction may be as follows: video encoder 102 determines the motion vector of the current image block in the second direction based on the motion vector of the current image block in the first direction, or video encoder 102 determines the motion vector differential of the current image block in the second direction based on the motion vector differential of the current image block in the first direction, and determines the motion vector of the current image block in the second direction based on the motion vector differential of the current image block in the second direction and the predicted motion vector of the current image block in the second direction.

[0111] Please refer to the following Figure 4. The video decoder 202 is configured to obtain a bitstream, analyze the bitstream to obtain instruction information used to instruct determining second motion information based on first motion information (S400), in other words, determine to derive and calculate motion information in another direction based on motion information in one direction, the first motion information being the motion information of a current image block in the first direction, and the second motion information being the motion information of the current image block in the second direction, where the first direction and the second direction in this specification are different, obtain the first motion information (S401), determine the second motion information based on the obtained first motion information (S402), and determine a predicted sample of the current image block based on the first motion information and the second motion information (S403).

[0112] The method used by video decoder 202 to calculate the motion information of the current image block in the second direction based on the motion information of the current image block in the first direction may be as follows: video decoder 202 determines the motion vector of the current image block in the second direction based on the motion vector of the current image block in the first direction, or video decoder 202 determines the motion vector differential of the current image block in the second direction based on the motion vector differential of the current image block in the first direction, and determines the motion vector of the current image block in the second direction based on the motion vector differential of the current image block in the second direction and the predicted motion vector of the current image block in the second direction.

[0113] FIG. 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 a splicing / editing device. In some cases, the post-processing entity 41 may be an example of a network entity. In some video encoding systems, the post-processing entity 41 and the video encoder 102 may be components of separate devices. In other cases, the functions described with respect to the post-processing entity 41 may be performed by the same device that includes the video encoder 102. As an example, the post-processing entity 41 is an example of the storage device 40 of FIG. 1.

[0114] The video encoder 102 may derive and calculate motion information of the current image block in a second direction based on the motion information of the current image block in a first direction, and may further determine a predicted image block of the current image block based on the motion information of the current image block in the first direction and the motion information of the current image block in the second direction, thereby further completing bidirectional inter-prediction coding.

[0115] 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 a summer 312. Prediction processing unit 308 includes an intra predictor 309 and an inter predictor 310. To reconstruct image blocks, video encoder 102 further includes an inverse quantizer 304, an inverse transformer 305, and a summer 311. Filter 306 is designated to represent one or more loop filters, e.g., a deblocking filter, an adaptive loop filter, and a sample adaptive offset filter.

[0116] 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- or inter-coding modes. Memory 307 may be dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices.

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

[0118] The intra predictor 309 in prediction processing unit 308 may perform intra predictive coding on the current image block with respect to one or more neighboring image blocks in a frame or slice that are the same as that of the current image block to remove spatial redundancy. The inter predictor 310 in prediction processing unit 308 may perform inter predictive coding on the current image block with respect to one or more predictive image blocks in one or more reference images to remove temporal redundancy.

[0119] The prediction processing unit 308 may provide the obtained intra-coded and inter-coded image blocks to a summer 310 to generate residual blocks, and may provide the residual blocks to a summer 309 to reconstruct coded blocks to be used as reference images.

[0120] After prediction processing unit 308 generates a predicted image block for a current image block through inter-prediction and intra-prediction, video encoder 102 generates a residual image block by subtracting the predicted image block from the current image block to be encoded. Summer 312 represents one or more components that perform this subtraction operation. Residual video data in a residual block may be included in one or more transform units (TUs) and applied to a transformer 301. The 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. The transformer 301 may convert the residual video data from the sample value domain to a transform domain, e.g., the frequency domain.

[0121] 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 containing the quantized transform coefficients. Alternatively, the entropy encoder 303 may perform the scan.

[0122] 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-based 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 subsequent transmission or retrieval by the video decoder 202. The entropy encoder 303 may further perform entropy coding on syntax elements of the current image block to be coded.

[0123] The inverse quantizer 304 and the inverse transformer 305 perform inverse quantization and inverse transformation, respectively, to reconstruct residual blocks in the sample domain, for subsequent use, e.g., as reference blocks of a reference image. The summer 311 adds the reconstructed residual blocks to the predicted image blocks generated by the inter predictor 310 or the intra predictor 309 to generate reconstructed image blocks. The predicted image blocks of an image block can be obtained by processing (such as interpolation) the reference image blocks of the image block.

[0124] 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 image blocks or image frames, the video encoder 102 may directly quantize the residual signal, thereby eliminating the need for processing by the transformer 301 and the inverse transformer 305. Alternatively, for some image blocks or image frames, the video encoder 102 does not generate residual data, thereby eliminating the need for processing by the transformer 301, the quantizer 302, the inverse quantizer 304, and the inverse transformer 305. Alternatively, the video encoder 102 may directly store the reconstructed image block as a reference block, thereby eliminating the need for processing by the filter 306. Alternatively, the quantizer 302 and the inverse quantizer 304 in the video encoder 102 may be combined.

[0125] 3 is a schematic structural diagram of a video decoder 202 according to one 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 a summer 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 roughly the inverse of the encoding process described with respect to the video encoder 102 of FIG. 2.

[0126] During the decoding process, the video decoder 202 receives a bitstream from the video encoder 102. The video decoder 202 may also receive video data from the 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, for example, from the storage device 40 or a local video source, such as a camera, through wired or wireless network communication 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 configured memories. The video data memory and the memory 405 may each be configured by any one of several types of memory devices, for example, 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 on-chip with other components of the video decoder 202, or may be located external to the chip with respect to those components.

[0127] Network entity 42 may be, for example, a server, a MANE, a video editor / splitter, or another similar 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. Before network entity 42 transmits the bitstream to video decoder 202, network entity 42 may implement some of the techniques described herein. 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 performed 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.

[0128] The entropy decoder 401 of the video decoder 202 performs entropy decoding on the bitstream to generate quantized coefficients and several syntax elements. The entropy decoder 401 forwards the syntax elements to the filter 404. The video decoder 202 may receive one or more syntax elements at the video slice level and / or the image block level. In this application, the syntax elements herein may include indication information related to the current image block, and the indication information is used to indicate determining the second motion information based on the first motion information. In addition, in some examples, the video encoder 102 may transmit a signal indicating a specific syntax element indicating whether to determine the second motion information based on the first motion information.

[0129] The inverse quantizer 402 performs inverse quantization, or in other words, dequantizes, on the quantized transform coefficients provided in the bitstream and decoded by the entropy decoder 401. The inverse quantization process may involve determining the degree of quantization to be applied by using quantization parameters calculated by the video encoder 102 for each image block in the video slice, and similarly determining the degree of inverse quantization to be applied. The inverse transformer 403 performs an inverse transform, e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, on the transform coefficients to produce sample-domain residual blocks.

[0130] After prediction processing unit 406 generates a predicted image block for the current image block or a sub-block of the current image block, video decoder 202 sums the residual block from inverse transformer 403 with the corresponding predicted image block generated by prediction processing unit 406 to obtain a reconstructed, i.e., decoded, image block. Summer 409 (also referred to as reconstructor 409) represents the component that performs this summation operation. When necessary, a filter (in or after the decoding loop) may further be used to smooth samples or improve video quality in another manner. 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.

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

[0132] Next, based on 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.

[0133] 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 will be explained by using an example in which the bidirectional inter prediction device is the video decoder 202.

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

[0135] S400: The video decoder 202 analyzes the acquired bitstream and acquires the instruction information.

[0136] Optionally, the video decoder 202 analyzes the bitstream and determines, based on values ​​of syntax elements in the bitstream, an inter-prediction mode to be used to perform inter prediction on the current image block in the current frame. When the inter-prediction mode is a bidirectional inter-prediction mode, the video decoder 202 obtains indication information.

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

[0138] Optionally, the video decoder 202 in this embodiment of the present application determines an inter-prediction mode to be used to perform inter-prediction on the current image block in the current frame based on the value of the syntax element inter_pred_idc. It can be seen from the above description 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 determines that the inter-prediction mode to be used to perform inter-prediction on the current image block in the current frame is forward inter-prediction. When the value of the syntax element inter_pred_idc is 1, the video decoder 202 determines that the inter-prediction mode to be used to perform inter-prediction on the current image block in the current frame is backward inter-prediction. When the value of the syntax element inter_pred_idc is 2, the video decoder 202 determines that the inter-prediction mode to be used to perform inter-prediction on the current image block in the current frame is bidirectional inter-prediction.

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

[0140] An image 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 prediction operations, such as a prediction unit (PU), which is not particularly limited in this embodiment of the present application.

[0141] When an image block is a basic unit for performing video encoding or video decoding, the current image block in this embodiment of the present application includes at least one sub-block, correspondingly, the first motion information includes the motion information of each of the at least one sub-block in the current image block in a first direction, the second motion information includes the motion information of each of the at least one sub-block in the current image block in a second direction, and the indication information is used to indicate determining the motion information of the sub-block in the second direction based on the motion information of the sub-block in the first direction.

[0142] The video decoder 202 may obtain the indication information in multiple ways.

[0143] In a first implementation, the video decoder 202 analyzes a first identifier. When the value of the first identifier is a first preset value, the video decoder 202 determines to analyze 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 first identifier is an eighth preset value, the video decoder 202 analyzes the bitstream to obtain a fifth identifier. When the value of the fifth identifier is a fifth preset value, the video decoder 202 determines to analyze second motion information and calculates first motion information based on the second motion information. When the value of the fifth identifier is a ninth preset value, the video decoder 202 obtains first motion information and second motion information. The first preset value and the fifth preset value may be the same or different. This is not particularly limited in this embodiment of the present application.

[0144] For example, the first identifier is mv_derived_flag_l0, the fifth identifier is mv_derived_flag_l1, the first and fifth preset values ​​are both 1, and the eighth and ninth preset values ​​are both 0. The video decoder 202 first analyzes mv_derived_flag_l0. When the value of mv_derived_flag_l0 is 1, the video decoder 202 analyzes the first motion information and determines the second motion information based on the first motion information. When the value of mv_derived_flag_l0 is 0, the video decoder 202 analyzes mv_derived_flag_l1. When the value of mv_derived_flag_l1 is 1, the video decoder 202 analyzes the second motion information and calculates the 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 analyzes the first motion information and the second motion information.

[0145] In a second implementation, the video decoder 202 analyzes 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 image block by using a motion information derivation algorithm. Then, the video decoder 202 analyzes the third identifier. When the value of the third identifier is a third preset value, the video decoder 202 determines to analyze the first motion information and determines the 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 analyze the second motion information and calculates the first motion information based on the second motion information.

[0146] 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. Video decoder 202 first analyzes derived_mv_flag. When the value of derived_mv_flag is 1, video decoder 202 determines to calculate motion information of the current image block by using a motion information derivation algorithm. When the value of derived_mv_flag is 0, video decoder 202 analyzes the first motion information and the second motion information. When the value of derived_mv_direction is 1, video decoder 202 analyzes 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, video decoder 202 analyzes the second motion information and calculates the first motion information based on the second motion information.

[0147] In a third implementation, the video decoder 202 analyzes 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 image block by using a motion information derivation algorithm. Then, the video decoder 202 determines to analyze 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 video decoder 202 analyzes the first motion information and the second motion information.

[0148] 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 analyzes the derived_mv_flag. When the value of the derived_mv_flag is 1, the video decoder 202 determines to calculate the motion information of the current image block by using a motion information derivation algorithm. Furthermore, the video decoder 202 determines to analyze the first motion information and determines the second motion information based on the first motion information. When the value of the derived_mv_flag is 0, the video decoder 202 analyzes the first motion information and the second motion information.

[0149] In a fourth implementation, the video decoder 202 analyzes 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 image block by using a motion information derivation algorithm and calculates a variable derived_ref_num based on the first reference frame list and the second reference frame list. The variable represents the number of mirrored / linear reference frame pairs that may be formed by the first reference frame and the second reference frame. When the number of reference frame pairs is 1, the video decoder 202 directly determines the reference frame index value. Then, the video decoder 202 determines to analyze 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. The first reference frame list is the reference frame list of the current image block in the first direction, the second reference frame list is the reference frame list of the current image block in the second direction, the first reference frame is the reference frame of the current image block in the first direction, and the second reference frame is the reference frame of the current image block in the second direction. The reference frame index value in this embodiment of the present application is the number of the reference frame in the corresponding reference frame list.

[0150] For example, if the sequence number of the current frame is 4, the first reference frame list is {2, 0}, and the second reference frame list is {6, 7}, and based on the following condition B or condition C, it is determined that the reference frame in the first reference frame list whose sequence number is 2 and the reference frame in the second reference frame list whose sequence number is 6 can constitute a reference frame pair. In this case, the index value of the first reference frame and the index value of the second reference frame are both 0.

[0151] For example, the sequence number of the current frame is 4, the first reference frame list is {2, 0}, and the second reference frame list is {6, 7}. Based on the following condition B or condition C, it is determined that the reference frame whose sequence number is 2 in the first reference frame list and the reference frame whose sequence number is 6 in the second reference frame list can form a reference frame pair, and that the reference frame whose sequence number is 0 in the first reference frame list and the reference frame whose sequence number is 7 in the second reference frame list can also form a reference frame pair. In this case, video decoder 202 needs to analyze the reference frame index values.

[0152] 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 frame satisfies a preset condition. In this manner, when the feature information of the current frame satisfies the preset condition, the video decoder 202 obtains the indication information. Specifically, the process of S401 may be as follows: The video decoder 202 obtains the indication information when it determines that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current frame satisfies a first preset condition.

[0153] The feature information of the current frame includes at least one of a sequence number, a temporal level ID (TID), or the number of reference frames. 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 image data. The video decoder 202 then parses the bitstream to obtain the feature information of the current frame.

[0154] The preset conditions include at least one of the following conditions:

[0155] Condition A: The current image block has at least two reference frames.

[0156] Condition B: The sequence number of the current frame, the sequence number of the first reference frame, and the sequence number of the second reference frame are expressed as follows: POC_Cur-POC_listX=POC_listY-POC_Cur Meet the following.

[0157] In the above formula, POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, the first reference frame is the reference frame of the current image block in the first direction, and the second reference frame is the reference frame of the current image block in the second direction.

[0158] Condition C: The sequence number of the current frame, the sequence number of the first reference frame, and the sequence number of the second reference frame are satisfied by the conditional expression (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0 Meet the following.

[0159] In the above formula, POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, the first reference frame is the reference frame of the current image block in the first direction, and the second reference frame is the reference frame of the current image block in the second direction.

[0160] Condition D: The TID of the current frame is equal to or greater than the preset value.

[0161] The preset conditions in this embodiment of the present application may be preset or may be specified in a parameter set of an upper 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.

[0162] In particular, for condition B (or condition C), video decoder 202 obtains one reference frame sequence number from each of the first reference frame list and the second reference frame list, and determines whether the obtained reference frame sequence number and the sequence number of the current frame satisfy condition B or condition C. The indication information is obtained when condition B (or condition C) is satisfied.

[0163] In this embodiment of the present application, the method used by the video decoder 202 to obtain the indication information when it determines that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current frame satisfies the preset condition is the same as the method used by the video decoder 202 to obtain the indication information when it determines that the inter prediction mode is a bidirectional inter prediction mode.

[0164] Based on the above description, Table 1 is a syntax table used by the video decoder 202 to obtain instruction information in the first implementation when it determines that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current frame satisfies the preset condition. prediction_unit() is a syntax structure of a prediction image block, which describes a method for determining motion information of each sub-block in the current image block.

[0165] In Table 1, x0 and y0 respectively indicate the horizontal and vertical coordinate offsets of the sub-block within the current image block relative to the top-left corner of the current image block, nPbW indicates the width of the current image block, and nPbH indicates the height of the current image block. When the value of inter_pred_idc[x0][y0] is PRED_L0, it indicates that the inter prediction of 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 of 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 of the current sub-block is bidirectional prediction.

[0166] For bidirectional inter prediction (i.e., inter_pred_idc[x0][y0] == PRED_BI), if the preset conditions are met, mv_derived_flag_l0[x0][y0] is analyzed. If the value of mv_derived_flag_l0 is not the first preset value, mv_derived_flag_l1[x0][y0] is analyzed. 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 image block is determined, in particular, the reference frame index value ref_idx_l0[x0][y0], the motion vector predictor flag mvp_l0_flag[x0][y0], and the motion vector differential mvd_coding(x0, y0, 0) are determined. [Table 1]

[0167] Based on the above description, Table 2 is a syntax table used by the video decoder 202 to obtain instruction information by using the third implementation form when it determines that the inter-prediction mode is a bidirectional inter-prediction mode and the feature information of the current frame satisfies the preset condition.

[0168] In Table 2, for bidirectional inter prediction (in other words, inter_pred_idc[x0][y0]==PRED_BI), derived_mv_flag[x0][y0] is analyzed if preset conditions are met. When the value of derived_mv_flag[x0][y0] is a second preset value, motion information of sub-blocks of the current image block is determined, specifically, the reference frame index value ref_idx_lx[x0][y0], the motion vector predictor flag mvp_lx_flag[x0][y0], and the motion vector differential mvd_coding(x0, y0, x) are determined. [Table 2]

[0169] Based on the above description, Table 3 is a syntax table used by the video decoder 202 to obtain the indication information by using the fourth implementation form when it determines that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current frame satisfies the first preset condition.

[0170] In Table 3, for bidirectional inter prediction (in other words, inter_pred_idc[x0][y0]==PRED_BI), derived_mv_flag[x0][y0] is analyzed if preset conditions are met. When the value of derived_mv_flag[x0][y0] is the fourth preset value, derived_ref_num is determined, and when the value of derived_ref_num is greater than 1, motion information of a sub-block within the current image block is determined, specifically, a reference frame index value ref_idx_lx[x0][y0], a motion vector predictor flag mvp_lx_flag[x0][y0], and a motion vector differential mvd_coding(x0, y0, x) are determined. [Table 3]

[0171] The first identifier, the second identifier, the third identifier, and the fourth identifier may all be preset or may be specified in a parameter set of 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.

[0172] The video decoder 202 obtains the indication information when it determines that the inter prediction mode is a bidirectional inter prediction mode and the feature information of the current frame satisfies a first preset condition, which effectively improves the decoding rate of the video decoder 202 and reduces information redundancy.

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

[0174] Optionally, the video decoder 202 parses the bitstream to obtain an index value of a first reference frame, a first motion vector predictor flag, and a first motion vector differential, in other words, obtains first motion information, where the first motion vector predictor flag is used to indicate an index value of a first predicted motion vector in a first candidate motion vector list, the first predicted motion vector is a predicted motion vector of a current image block in a first direction, and the first motion vector differential is a difference between the first predicted motion vector and a first motion vector, and the first motion vector is a motion vector of a current image block in the first direction.

[0175] For each of the syntax tables shown in Tables 1-3, video decoder 202 determines motion information for sub-blocks of the current image block in a first direction.

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

[0177] 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 of a first reference frame from the first motion information, determines a sequence number of the first reference frame based on the index value of the first reference frame and the first reference frame list, calculates a sequence number of a second reference frame based on the sequence number of the current frame and the sequence number of the first reference frame according to a preset formula, determines an index value of the second reference frame based on the sequence number of the second reference frame and the second reference frame list, and determines the second motion information based on the first motion information and the index value of the second reference frame.

[0178] In this specification, the preset formula may be POC_listY=2*POC_Cur-POC_listX, where POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, and POC_listY represents the sequence number of the second reference frame.

[0179] For example, if the sequence number of the current frame is 4, the sequence number of the first reference frame is 2, the second reference frame list is [6, 8], and the sequence number of the second reference frame 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 frame is 0.

[0180] Optionally, the preset formula may alternatively be (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0. Note that if multiple reference frame sequence numbers in the second reference frame list satisfy the formula, video decoder 202 first selects the reference frame with the smallest abs((POC_listY-POC_Cur)-(POC_Cur-POC_listX)), and then selects the reference frame with the smallest abs(POC_listY-POC_Cur) to determine the index value of the second reference frame. abs is an absolute value function.

[0181] For example, if the sequence number of the current frame is 4, the sequence number of the first reference frame is 2, the second reference frame list is [5, 7, 8], and it is determined that the sequence number of the second reference frame is 5 according to the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0, the video decoder 202 determines that the index value ref_lY_idx of the second reference frame is 0.

[0182] Optionally, the preset formula may alternatively be POC_listX≠POC_listY. Note that if multiple reference frame sequence numbers in the second reference frame list satisfy the formula, video decoder 202 first selects the reference frame with the smallest abs((POC_listY-POC_Cur)-(POC_Cur-POC_listX)), and then selects the reference frame with the smallest abs(POC_listY-POC_Cur) to determine the index value of the second reference frame, where abs is an absolute value function.

[0183] For example, if the sequence number of the current frame is 4, the sequence number of the first reference frame is 2, the second reference frame list is [3, 2, 1, 0], and it is determined that the sequence number of the second reference frame is 3 according to the equation POC_listX ≠ POC_listY, then the video decoder 202 determines that the index value ref_lY_idx of the second reference frame is 0.

[0184] Optionally, the preset formula may alternatively be POC_listY0=2*POC_Cur-POC_listX, (POC_Cur-POC_listX)*(POC_listY0'-POC_Cur)>0, and POC_listX≠POC_listY0''.In this case, the method used by video decoder 202 to determine the index value of the second reference frame particularly includes the steps of: calculating a first sequence number based on the sequence number of the current frame and the sequence number of the first reference frame by using the formula POC_listY0=2*POC_Cur-POC_listX, where POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, and POC_listY0 represents the first sequence number; and determining the number of the reference frame represented by the first sequence number in the second reference frame list as the index value of the second reference frame when the second reference frame list includes the first sequence number, or determining (POC_Cur-POC_li) based on the sequence number of the current frame and the sequence number of the first reference frame when the second reference frame list does not include the first sequence number. stX)*(POC_listY0'-POC_Cur)>0, where POC_listY0' represents the second sequence number; and when the second reference frame list includes the second sequence number, determining the number of the reference frame represented by the second sequence number in the second reference frame list as the index value of the second reference frame; or when the second reference frame list does not include the second sequence number, calculating a third sequence number by using the equation POC_listX≠POC_listY0'' based on the sequence number of the current frame and the sequence number of the first reference frame, where POC_listY0'' represents the third sequence number; and determining the number of the reference frame represented by the third sequence number in the second reference frame list as the index value of the second reference frame.

[0185] In the second implementation, the method used by the video decoder 202 to determine the second motion information is as follows: the video decoder 202 analyzes the bitstream to obtain the index value of the second reference frame, and determines the second motion information based on the first motion information and the index value of the second reference frame. The index value of the second reference frame 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.

[0186] 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 frame.

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

[0188] Next, 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 frame will be described.

[0189] Optionally, the method used by the video decoder 202 to determine the second motion information based on the first motion information and the index value of the second reference frame includes the steps of: obtaining the index value of the first reference frame in the first motion information, and determining a sequence number of the first reference frame based on the index value of the first reference frame and the first reference frame list; obtaining the index value of the second reference frame, and determining a sequence number of the second reference frame based on the index value of the second reference frame and the second reference frame list; determining a first motion vector (the motion vector of the current image block in the first direction) based on the first motion vector differential and the first motion vector predictor flag included in the first motion information;

number

[0190] In the above formula, mv_lY represents the second motion vector, POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current image block in the second direction.

[0191] The video decoder 202 constructs the candidate motion information list in the same manner as the encoder constructs the candidate motion information list in AMVP mode or merge mode, and determines the first predicted motion vector in the candidate motion information list based on the first motion vector prediction 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.

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

[0193] For example, "the first reference frame is a forward reference frame of the current image block, and the second reference frame is a backward reference frame of the current image block" and "the first reference frame is a backward reference frame of the current image block, and the second reference frame is a forward reference frame of the current image block" may both be expressed by using the formula (POC_Cur-POC_listX)*(POC_listY-POC_Cur)>0, or by using the formula POC_listY=2*POC_Cur-POC_listX.

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

[0195] Optionally, the method used by the video decoder 202 to determine the second motion information based on the first motion information and the index value of the second reference frame includes the steps of: obtaining the index value of the first reference frame and a first motion vector differential in the first motion information, and determining a sequence number of the first reference frame based on the index value of the first reference frame and the first reference frame list; obtaining the index value of a second reference frame, and determining a sequence number of the second reference frame based on the index value of the second reference frame and the second reference frame list; and determining a second predicted motion vector based on the index value of the second reference frame and the second candidate predicted motion vector list, where the second predicted motion vector is a predicted motion vector of the current image block in a second direction;

number

[0196] Optionally, when the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, the video decoder 202 may directly set mvd_lY=-mvd_lX.

[0197] 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 video decoder 202 directly sets mvd_lY=-mvd_lX.

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

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

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

[0201] 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 image block based on the first motion information and the second motion information. According to the method provided in the present application, the motion information of each image block in all directions no longer needs to be transmitted, which is different from the prior art. This effectively reduces the amount of motion information transmitted, improving the efficient use of transmission resources, transmission rate, and coding compression efficiency.

[0202] The bidirectional inter prediction method shown in FIG. 4 is described for a current image block, that is, it may be understood that inter prediction is performed on the current image block based on the AMVP mode.

[0203] It is easy to understand that the bidirectional inter prediction method provided in this application can also be applied to non-translational motion model prediction modes, 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 image block includes at least one sub-block, and the motion information of the current image block includes the motion information of each of all the sub-blocks of the current image block. The method used by video decoder 202 to determine the motion information of each sub-block (motion information in a first direction and motion information in a second direction) is similar to the method used by video decoder 202 to determine the motion information of the current image block.

[0204] In the non-translational motion model prediction mode, video decoder 202 calculates the equation

number

[0205] In the above 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 sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, and POC_listY represents the sequence number of the second reference frame.

[0206] In response to this, the video decoder 202 calculates the following equation:

number

[0207] In the above 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 sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, and POC_listY represents the sequence number of the second reference frame.

[0208] Compared with the video decoder 202, the video encoder 102 in this embodiment of the present application performs bidirectional motion estimation on a current image block to determine motion information of the current image block in a first direction, and calculates motion information of the current image block in a second direction based on the motion information of the current image block in the first direction. In this method, the video encoder 102 determines a predicted image block of the current image block based on the motion information of the current image block in the first direction and the motion information of the current image block in the second direction. Then, the video encoder 102 performs operations such as transform and quantization on the residue between the current image block and the predicted image block of the current image block, generates a bitstream, and sends the bitstream to the video decoder 202. The bitstream includes the motion information of the current image block in the first direction.

[0209] For the method used by the video encoder 102 to calculate the motion information of the current image block in the second direction based on the motion information of the current image block in the first direction, please refer to the method used by the video decoder 202 to determine the second motion information based on the first motion information, in other words, please refer to the description of S402. The details will not be described again in this application.

[0210] In conclusion, according to the bidirectional inter prediction method provided in this application, during bidirectional inter prediction, it is no longer necessary to transmit motion information of each image block in all directions, but only to transmit motion information in a certain direction, which effectively reduces the amount of motion information to be transmitted, and improves the efficient utilization of transmission resources, transmission rate, and coding compression efficiency.

[0211] An embodiment of the present application provides a bidirectional inter prediction device. The bidirectional inter prediction device may be a video decoder. In particular, 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.

[0212] In an embodiment of the present application, the bidirectional inter-prediction device may be divided into functional modules based on the above-mentioned exemplary method. For example, each functional module may be obtained by 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 an embodiment of the present application, the module division is an example and is merely a logical functional division. In an actual implementation, other division methods may be used.

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

[0214] The acquisition unit 50 is configured to support a bidirectional inter-prediction device that performs steps S400, S401, and similar steps in the above-described embodiments and / or is used in another process of the techniques described herein.

[0215] The determination unit 51 is configured to support a bidirectional inter-prediction device that performs steps S402, S403, and similar steps in the above-described embodiments and / or is used in another process of the techniques described herein.

[0216] All relevant contents of the steps in the foregoing method embodiments may be cited in the descriptions of the corresponding functional modules, and the details will not be described again here.

[0217] Indeed, 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.

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

[0219] When the integration unit is used, FIG. 6 is a schematic structural diagram of a bidirectional inter prediction device provided in an embodiment of the present application. As shown in FIG. 6, the bidirectional inter prediction device 6 includes a processing module 60 and a communication module 61. The processing module 60 controls and manages the operation of the bidirectional inter prediction device, for example, configured to perform steps performed by the acquisition unit 50 and the determination unit 51, and / or to perform other processes of the techniques described herein. The communication module 61 is configured to support interaction between the bidirectional inter prediction device and another device. As shown in FIG. 6, the bidirectional inter prediction device may further include a storage module 62. The storage module 62 is configured to store program codes and data of the bidirectional inter prediction device, for example, to store content stored by the storage unit 52.

[0220] 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 other 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 for implementing computing functions, such as a combination including one or more microprocessors, or a combination of a DSP and a microprocessor. The communication module 61 may be a transceiver, an RF circuit, a communication interface, or the like. The storage module 62 may be a memory.

[0221] All relevant contents of the scenarios in the above method embodiments may be cited in the functional descriptions of the corresponding functional modules, and the details will not be described again here.

[0222] Both the bidirectional inter predictor 5 and the bidirectional inter predictor 6 may perform the bidirectional inter prediction method shown in Figure 4. In particular, the bidirectional inter predictor 5 and the bidirectional inter predictor 6 may be video decoders or other devices with video coding capabilities. The bidirectional inter predictor 5 and the bidirectional inter predictor 6 may be configured to perform image prediction in the decoding process.

[0223] 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 a bidirectional inter prediction method in an embodiment of the present application.

[0224] A terminal in this context may be a video display device, a smartphone, a portable computer, or any other device capable of processing or playing video.

[0225] 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 a bidirectional inter prediction method in an embodiment of the present application.

[0226] 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 image block according to prediction samples obtained by the bidirectional inter prediction device.

[0227] Another embodiment of the present application further provides a computer-readable storage medium, which includes one or more program code fragments. The one or more program code fragments include instructions. When a processor of a terminal executes the program code, the terminal performs the bidirectional inter-prediction method shown in FIG. 4.

[0228] In another embodiment of the present application, a computer program product is further provided. The computer program product comprises 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 steps performed by the video decoder 202 in the bidirectional inter-prediction method shown in FIG. 4.

[0229] 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, these embodiments may be fully or partially implemented in the form of a computer program product. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part.

[0230] The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be recorded on a computer-readable storage medium or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, or digital subscriber line (DSL)) or wireless (e.g., infrared, radio, or microwave) methods. The 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. The available medium may be magnetic (e.g., floppy disk, hard disk, or magnetic tape), optical (e.g., DVD), semiconductor (e.g., solid-state disk (SSD)), or the like.

[0231] The above description of the implementation form allows those skilled in the art to clearly understand that the division of the above functional modules is taken as an example for illustration purposes for the purpose of simple and concise description. In actual applications, the above functions can be allocated and implemented into different functional modules based on requirements, that is, the internal structure of the device is divided into different functional modules to implement all or some of the functions described above.

[0232] 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 device embodiments are merely examples. For example, module or unit divisions are merely logical functional divisions, and actual implementations may involve other divisions. For example, multiple units or components may be combined or integrated into another device, or some features may be omitted or not implemented. In addition, the shown or described mutual couplings or direct couplings or communication connections may be implemented by using some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electrical, mechanical, or other forms.

[0233] The units described as separate parts may or may not be physically separate, and the parts shown as units may be one or more physical units, located in one place or distributed in 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.

[0234] 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.

[0235] When an integrated module 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 essentially be implemented in the form of a software product, or a portion that contributes to the prior art, or all or some 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, a chip, or the like) or a processor to perform all or some of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes media 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.

[0236] The above description is merely a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification or replacement 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 be subject to the protection scope of the claims. [Explanation of symbols]

[0237] 1 Video Encoding System 5. Bidirectional Inter Prediction Device 6. Bidirectional Inter Prediction Device 10 Source Device 20 Destination Device 30 Links 40 Storage device 41 Post-processing entities 42 Network Entities 50 Acquired Units 51 Decision Unit 52 Memory Unit 60 Processing Modules 61 Communication Module 62 Memory Module 100 Video Encoders 101 Video Source 102 Video Encoder 103 Output Interface 140 Output Interface 200 Video Decoder 201 Display device 202 Video Decoder 203 Input Interface 240 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 Total Equipment 312 Total Equipment 401 Entropy Decoder 402 Inverse quantizer 403 Inverse Converter 404 filter 405 memory 406 Prediction Processing Unit 407 Intra Predictor 408 Inter Predictor 409 Summation and Reconstruction

Claims

1. 1. A bidirectional inter prediction method, comprising: obtaining instruction information; obtaining first motion information; determining, when the instruction information is used to instruct determining second motion information based on the first motion information, the second motion information based on the first motion information, wherein the first motion information is motion information of a current image block in a first direction, and the second motion information is motion information of the current image block in a second direction; determining a predicted sample of the current image block based on the first motion information and the second motion information.

2. The step of determining the second motion information based on the first motion information includes: obtaining an index value of a first reference frame in the first motion information, and determining a sequence number of the first reference frame based on the index value of the first reference frame and a first reference frame list, wherein the first reference frame is a reference frame of the current image block in the first direction, and the index value of the first reference frame is a number of the first reference frame in the first reference frame list; obtaining an index value of a second reference frame, and determining a sequence number of the second reference frame based on the index value of the second reference frame and a second reference frame list, where the second reference frame is a reference frame of the current image block in the second direction, and the index value of the second reference frame is a number of the second reference frame in the second reference frame 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, wherein the first motion vector is a motion vector of the current image block in the first direction; formula [Equation 1] deriving a second motion vector in the second motion information according to mv_lY represents the second motion vector, POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, mv_lX represents the first motion vector, and the second motion vector is the motion vector of the current image block in the second direction.

3. The step of determining the second motion information based on the first motion information includes: obtaining an index value of a first reference frame in the first motion information, where the first reference frame is a reference frame of the current image block in the first direction, and the index value of the first reference frame is a number of the first reference frame in a first reference frame list; obtaining an index value of a second reference frame, the second reference frame being a reference frame of the current image block in the second direction, and the index value of the second reference frame being a number of the second reference frame in a second reference frame 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, wherein the first motion vector is a motion vector of the current image block in the first direction; When the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, the formula mv_lY=-mv_lX deriving a second motion vector in the second motion information according to The method of claim 1 , specifically comprising the steps: 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 image block in the second direction.

4. The step of determining the second motion information based on the first motion information includes: obtaining an index value of a first reference frame and a first motion vector differential in the first motion information, and determining a sequence number of the first reference frame based on the index value of the first reference frame and a first reference frame list, wherein the first reference frame is a reference frame of the current image block in the first direction, and the index value of the first reference frame is a number of the first reference frame in the first reference frame list; obtaining an index value of a second reference frame; determining a sequence number of the second reference frame based on the index value of the second reference frame and a second reference frame list; and determining a second predicted motion vector based on the index value of the second reference frame and a second candidate predicted motion vector list, wherein the second predicted motion vector is a predicted motion vector of the current image block in the second direction, the second reference frame is a reference frame of the current image block in the second direction, and the index value of the second reference frame is a number of the second reference frame in the second reference frame list; formula [Equation 2] calculating a second motion vector differential in the second motion information according to mvd_lY represents the second motion vector differential, POC_Cur represents a sequence number of a current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, and mvd_lX represents the first motion vector differential; 2. The method of claim 1, further comprising: 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 image block in the second direction.

5. The step of determining the second motion information based on the first motion information includes: obtaining an index value of a first reference frame and a first motion vector in the first motion information, where the first reference frame is a reference frame of the current image block in the first direction, and the index value of the first reference frame is a number of the first reference frame in a first reference frame list; obtaining an index value of a second reference frame, and determining a second predicted motion vector based on the index value of the second reference frame and a second candidate predicted motion vector list, wherein the second predicted motion vector is a predicted motion vector of the current image block in the second direction, the second reference frame is a reference frame of the current image block in the second direction, and the index value of the second reference frame is a number of the second reference frame in a second reference frame list; When the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, the formula mvd_lY=-mvd_lX calculating a second motion vector differential in the second motion information according to mvd_lY represents the second motion vector differential and mvd_lX represents the first motion vector differential; 2. The method of claim 1, further comprising: 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 image block in the second direction.

6. The step of obtaining an index value of a second reference frame includes: calculating a first sequence number based on the sequence number of the current frame and the sequence number of the first reference frame according to a formula POC_listY0=2*POC_Cur-POC_listX, where POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, and POC_listY0 represents the first sequence number; A method according to any one of claims 2 to 5, particularly comprising a step of determining, when the second reference frame list includes the first sequence number, the number of the reference frame represented by the first sequence number in the second reference frame list as the index value of the second reference frame.

7. The step of obtaining an index value of a second reference frame includes: calculating a second sequence number based on the sequence number of the current frame and the sequence number of the first reference frame according to a formula (POC_Cur-POC_listX)*(POC_listY0'-POC_Cur)>0, where POC_listY0' represents the second sequence number; A method according to any one of claims 2 to 5, particularly comprising a step of determining, when the second reference frame list includes the second sequence number, the number of the reference frame represented by the second sequence number in the second reference frame list as the index value of the second reference frame.

8. The step of obtaining an index value of a second reference frame includes: calculating a third sequence number based on the sequence number of the current frame and the sequence number of the first reference frame according to an equation POC_listX≠POC_listY0″, where POC_listY0″ represents the third sequence number; A method according to any one of claims 2 to 5, particularly comprising a step of determining the number of the reference frame represented by the third sequence number in the second reference frame list as the index value of the second reference frame.

9. 1. A bidirectional inter prediction method, comprising: a step of parsing a bitstream to obtain a first identifier, the first identifier being used to indicate whether to determine second motion information based on first motion information, the first motion information being motion information of a current image block in a first direction, and the second motion information being motion information of the current image block in a second direction; a step of obtaining the first motion information and determining the second motion information based on the first motion information when the value of the first identifier is a first preset value; and a step of determining a predicted sample of the current image block based on the first motion information and the second motion information; or a step of analyzing the bitstream to obtain a second identifier, the second identifier being used to indicate whether to calculate motion information of the current image block by using a motion information derivation algorithm; a step of obtaining a third identifier when the value of the second identifier is a second preset value, the third identifier being used to indicate whether to determine second motion information based on first motion information, the first motion information being motion information of the current image block in a first direction and the second motion information being motion information of the current image block in a second direction; a step of obtaining the first motion information and determining the second motion information based on the first motion information when the value of the third identifier is a third preset value, and determining a predicted sample of the current image block based on the first motion information and the second motion information; or analyzing the bitstream to obtain a second identifier, the second identifier being used to indicate whether to calculate motion information of a current image block by using a motion information derivation algorithm; obtaining first motion information when the value of the second identifier is a second preset value, and determining second motion information based on the first motion information, the first motion information being motion information of the current image block in a first direction, and the second motion information being motion information of the current image block in a second direction; and determining a predicted sample of the current image block based on the first motion information and the second motion information; or a step of parsing a bitstream to obtain a fourth identifier, the fourth identifier being used to indicate whether to calculate motion information of a current image block by using a motion information derivation algorithm; a step of determining an index value of a first reference frame and an index value of a second reference frame based on a first reference frame list and a second reference frame list when the value of the fourth identifier is a fourth preset value, the first reference frame list being a reference frame list of the current image block in a first direction, the second reference frame list being a reference frame list of the current image block in a second direction, and the first reference frame being a reference frame list of the first reference frame; a first reference frame being a reference frame of the current image block in a first direction, and the second reference frame being a reference frame of the current image block in the second direction; obtaining a first motion vector differential and a first motion vector predictor flag, and determining second motion information based on first motion information, wherein the first motion information includes the index value of the first reference frame, the first motion vector differential, and the first motion vector predictor flag, and the second motion information is motion information of the current image block in the second direction; and determining a predicted sample of the current image block based on the first motion information and the second motion information.

10. A bidirectional inter prediction device, an obtaining unit configured to obtain indication information and obtain first movement information; a determination unit configured, when the instruction information is used to instruct determining second motion information based on the first motion information, to determine the second motion information based on the first motion information acquired by the acquisition unit, and to determine a predicted sample of the current image block based on the first motion information and the second motion information, wherein the first motion information is motion information of the current image block in a first direction and the second motion information is motion information of the current image block in a second direction.

11. The decision unit: obtain an index value of a first reference frame in the first motion information; determine a sequence number of the first reference frame according to the index value of the first reference frame and a first reference frame list, where the first reference frame is a reference frame of the current image block in the first direction, and the index value of the first reference frame is a number of the first reference frame in the first reference frame list; obtain an index value of a second reference frame, and determine a sequence number of the second reference frame according to the index value of the second reference frame and a second reference frame list, where the second reference frame is a reference frame of the current image block in the second direction, and the index value of the second reference frame is a number of the second reference frame in the second reference frame 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, wherein the first motion vector is a motion vector of the current image block in the first direction; formula [Equation 3] and deriving a second motion vector in the second motion information according to 11. The apparatus of claim 10, wherein mv_lY represents the second motion vector, POC_Cur represents a sequence number of a current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, mv_lX represents the first motion vector, and the second motion vector is a motion vector of the current image block in the second direction.

12. The decision unit: Obtain an index value of a first reference frame in the first motion information, where the first reference frame is a reference frame of the current image block in the first direction, and the index value of the first reference frame is a number of the first reference frame in a first reference frame list; Obtain an index value of a second reference frame, the second reference frame being a reference frame of the current image block in the second direction, and the index value of the second reference frame being a number of the second reference frame in a second reference frame 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, wherein the first motion vector is a motion vector of the current image block in the first direction; When the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, the formula mv_lY=-mv_lX and particularly configured to calculate a second motion vector in the second motion information according to The apparatus of claim 10 , wherein mv_lY represents the second motion vector and mv_lX represents the first motion vector, the second motion vector being a motion vector of the current image block in the second direction.

13. The decision unit: obtain an index value of a first reference frame and a first motion vector differential in the first motion information; determine a sequence number of the first reference frame according to the index value of the first reference frame and a first reference frame list, where the first reference frame is a reference frame of the current image block in the first direction, and the index value of the first reference frame is a number of the first reference frame in the first reference frame list; obtain an index value of a second reference frame; determine a sequence number of the second reference frame according to the index value of the second reference frame and a second reference frame list; determine a second predicted motion vector according to the index value of the second reference frame and a second candidate predicted motion vector list, wherein the second predicted motion vector is a predicted motion vector of the current image block in the second direction, the second reference frame is a reference frame of the current image block in the second direction, and the index value of the second reference frame is a number of the second reference frame in the second reference frame list; formula [Equation 4] and specifically configured to calculate a second motion vector differential in the second motion information according to mvd_lY represents the second motion vector differential, POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, POC_listY represents the sequence number of the second reference frame, and mvd_lX represents the first motion vector differential; 11. The apparatus of claim 10, further comprising: determining a second motion vector based on the second predicted motion vector and the second motion vector differential, the second motion vector being a motion vector of the current image block in the second direction.

14. The decision unit: obtain an index value of a first reference frame and a first motion vector in the first motion information, the first reference frame being a reference frame of the current image block in the first direction, and the index value of the first reference frame being a number of the first reference frame in a first reference frame list; obtain an index value of a second reference frame; determine a second predicted motion vector based on the index value of the second reference frame and a second candidate predicted motion vector list, where the second predicted motion vector is a predicted motion vector of the current image block in the second direction, the second reference frame is a reference frame of the current image block in the second direction, and the index value of the second reference frame is a number of the second reference frame in a second reference frame list; When the first reference frame is a forward reference frame of the current image block and the second reference frame is a backward reference frame of the current image block, or when the first reference frame is a backward reference frame of the current image block and the second reference frame is a forward reference frame of the current image block, or when the first reference frame and the second reference frame are each forward reference frames of the current image block, or when the first reference frame and the second reference frame are each backward reference frames of the current image block, the formula mvd_lY=-mvd_lX and calculating a second motion vector differential in the second motion information according to mvd_lY represents the second motion vector differential, mvd_lX represents the first motion vector differential, 11. The apparatus of claim 10, specifically configured to: determine a second motion vector based on the second predicted motion vector and the second motion vector differential, wherein the second motion vector is a motion vector of the current image block in the second direction.

15. The acquisition unit: Calculate a first sequence number based on the sequence number of the current frame and the sequence number of the first reference frame according to a formula POC_listY0=2*POC_Cur-POC_listX, where POC_Cur represents the sequence number of the current frame, POC_listX represents the sequence number of the first reference frame, and POC_listY0 represents the first sequence number; An apparatus according to any one of claims 11 to 14, specifically configured to determine the number of the reference frame represented by the first sequence number in the second reference frame list as the index value of the second reference frame when the second reference frame list includes the first sequence number.

16. The acquisition unit: Calculating a second sequence number based on the sequence number of the current frame and the sequence number of the first reference frame according to a formula (POC_Cur-POC_listX)*(POC_listY0'-POC_Cur)>0, where POC_listY0' represents the second sequence number; An apparatus according to any one of claims 11 to 14, specifically configured to determine the number of the reference frame represented by the second sequence number in the second reference frame list as the index value of the second reference frame when the second reference frame list includes the second sequence number.

17. The acquisition unit: Calculating a third sequence number based on the sequence number of the current frame and the sequence number of the first reference frame according to a formula POC_listX≠POC_listY0″, where POC_listY0″ represents the third sequence number; 15. The apparatus according to claim 11, wherein the apparatus is specifically configured to determine the number of the reference frame represented by the third sequence number in the second reference frame list as the index value of the second reference frame.

18. A bidirectional inter prediction device, an acquisition unit that analyzes a bitstream to obtain a first identifier, the first identifier being used to indicate whether to determine second motion information based on first motion information, the first motion information being motion information of a current image block in a first direction and the second motion information being motion information of the current image block in a second direction, and that is configured to acquire the first motion information when a value of the first identifier is a first preset value; and a determination unit that is configured to determine the second motion information based on the first motion information acquired by the acquisition unit, and to determine a predicted sample of the current image block based on the first motion information and the second motion information; or an acquisition unit configured to parse a bitstream to obtain a second identifier, the second identifier being used to indicate whether to calculate motion information of a current image block by using a motion information derivation algorithm, and to obtain a third identifier when a value of the second identifier is a second preset value, the third identifier being used to indicate whether to determine second motion information based on first motion information, the first motion information being motion information of the current image block in a first direction and the second motion information being motion information of the current image block in a second direction, and to obtain the first motion information when a value of the third identifier is a third preset value; and a determination unit configured to determine the second motion information based on the first motion information obtained by the acquisition unit, and to determine a predicted sample of the current image block based on the first motion information and the second motion information; or an acquisition unit configured to analyze a bitstream to obtain a second identifier, the second identifier being used to indicate whether to calculate motion information of a current image block by using a motion information derivation algorithm, and configured to acquire first motion information when a value of the second identifier is a second preset value; and a determination unit 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 image block in a first direction and the second motion information being motion information of the current image block in a second direction, and to determine a prediction sample of the current image block based on the first motion information and the second motion information; or an acquisition unit configured to parse a bitstream to acquire a fourth identifier, the fourth identifier being used to indicate whether to calculate motion information of a current image block by using a motion information derivation algorithm; and a determination unit configured to determine an index value of a first reference frame and an index value of a second reference frame based on a first reference frame list and a second reference frame list when a value of the fourth identifier acquired by the acquisition unit is a fourth preset value, the first reference frame list being a reference frame list of the current image block in a first direction, the second reference frame list being a reference frame list of the current image block in the second direction, and the first reference frame a frame is a reference frame of the current image block in the first direction, and the second reference frame is a reference frame of the current image block in the second direction, the acquisition unit is further configured to acquire a first motion vector differential and a first motion vector predictor flag, the determination unit determines second motion information based on the first motion information, the first motion information including the index value of the first reference frame, the first motion vector differential, and the first motion vector predictor flag, and the second motion information is motion information of the current image block in the second direction, and the determination unit is further configured to determine a predicted sample of the current image block based on the first motion information and the second motion information.

19. A terminal comprising one or more processors, a memory, and a communication interface, The memory and the communication interface are connected to the one or more processors, and the terminal communicates with another device through the communication interface. The memory is configured to store computer program code, the computer program code including instructions, and when the one or more processors execute the instructions, the terminal performs the bidirectional inter prediction method described in any one of claims 1 to 8 or the bidirectional inter prediction method described in claim 9.

20. 10. A computer program product comprising instructions, the computer program product enabling a terminal to perform the bidirectional inter prediction method of claim 1 or the bidirectional inter prediction method of claim 9 when the program product is running on the terminal.

21. 10. A computer-readable storage medium comprising instructions, which, when executed on a terminal, enable the terminal to perform the bidirectional inter prediction method of claim 1 or the bidirectional inter prediction method of claim 9.

22. 10. A video decoder comprising a non-volatile storage medium and a central processing unit, wherein the non-volatile storage medium stores an executable program, the central processing unit is connected to the non-volatile storage medium, and the video decoder performs the bidirectional inter prediction method of any one of claims 1 to 8 or the bidirectional inter prediction method of claim 9 when the central processing unit executes the executable program.

23. 18. A decoder comprising: the bidirectional inter prediction device of claim 10; and a reconstruction module, wherein the reconstruction module is configured to determine reconstructed sample values ​​of a current image block based on prediction samples obtained by the bidirectional inter prediction device; or the decoder comprising: the bidirectional inter prediction device of claim 18; and a reconstruction module, wherein the reconstruction module is configured to determine reconstructed sample values ​​of a current image block based on prediction samples obtained by the bidirectional inter prediction device.

24. 1. A decoding method, the method being applied to bidirectional inter prediction, the method comprising: obtaining a first identifier; obtaining a first motion vector differential for the current image block; and determining a second motion vector differential of the current image block based on the first motion vector differential when the value of the first identifier is a first preset value, wherein the first motion vector differential belongs to motion information of the current image block in a first direction and the second motion vector differential belongs to motion information of the current image block in a second direction.

25. determining a second motion vector differential for the current image block based on the first motion vector differential; formula mvd_lY=-mvd_lX obtaining the second motion vector differential according to 25. The method of claim 24, comprising the step of: mvd_lY representing the second motion vector differential; and mvd_lX representing the first motion vector differential.

26. The method comprises: obtaining a first predicted motion vector and a second predicted motion vector; determining a first motion vector based on the first predicted motion vector and the first motion vector differential; determining a second motion vector based on the second predicted motion vector and the second motion vector differential; determining a prediction sample of the current image block based on the first motion vector and the second motion vector, The method of claim 24 or 25, further comprising: a step in which the first predicted motion vector and the first motion vector correspond to the first direction, and the second predicted motion vector and the second motion vector correspond to the second direction.

27. The current image block includes a first reference frame list in the first direction and a second reference frame list in the second direction, and the step of determining a prediction sample of the current image block based on the first motion vector and the second motion vector includes: obtaining a reference frame index of the first reference frame list and a reference frame index of the second reference frame list; determining a first reference image block based on the reference frame index of the first reference frame list, the first motion vector, and the first reference frame list; Determining a second reference image block based on the reference frame index of the second reference frame list, the second motion vector, and the second reference frame list; The method according to claim 26, further comprising determining a predicted sample of the current image block based on the first reference image block and the second reference image block. **Claim 28** Before the step of obtaining the first identifier, a step of determining that the sequence number of the current frame in which the current image block is located satisfies a preset condition, wherein the preset condition is that the sequence number of the current frame is between the sequence number of the first reference frame and the sequence number of the second reference frame, the first reference frame belongs to the first reference frame list, and the second reference frame belongs to the second reference frame list. The method according to any one of claims 24 to 27, further comprising this step. **Claim 29** The method The method according to any one of claims 24 to 28, further comprising analyzing a bitstream to obtain the second motion vector when the value of the first identifier is a second preset value. [[ID= ​ ​ ​ ​ a determination unit configured to determine a second motion vector differential of the current image block based on the first motion vector differential when the value of the first identifier is a first preset value, wherein the first motion vector differential belongs to motion information of the current image block in a first direction and the second motion vector differential belongs to motion information of the current image block in a second direction.

32. The determination unit is mvd_lY=-mvd_lX and specifically configured to obtain the second motion vector differential according to 32. The apparatus of claim 31, wherein mvd_lY represents the second motion vector differential and mvd_lX represents the first motion vector differential.

33. 33. The apparatus of claim 31, wherein the obtaining unit is particularly configured to obtain a first predicted motion vector and a second predicted motion vector, and the determining unit is particularly configured to determine a first motion vector based on the first predicted motion vector and the first motion vector differential, determine a second motion vector based on the second predicted motion vector and the second motion vector differential, and determine a predicted sample of the current image block based on the first motion vector and the second motion vector, wherein the first predicted motion vector and the first motion vector correspond to the first direction, and the second predicted motion vector and the second motion vector correspond to the second direction.

34. 34. The apparatus of claim 33, wherein the current image block includes a first reference frame list in the first direction and a second reference frame list in the second direction, the acquisition unit is particularly configured to acquire a reference frame index of the first reference frame list and a reference frame index of the second reference frame list, and the determination unit is particularly configured to determine a first reference image block based on the reference frame index of the first reference frame list, the first motion vector, and the first reference frame list, determine a second reference image block based on the reference frame index of the second reference frame list, the second motion vector, and the second reference frame list, and determine the predicted sample of the current image block based on the first reference image block and the second reference image block.

35. 35. The apparatus of claim 31, wherein the acquisition unit is further configured to determine, before acquiring the first identifier, that a sequence number of a current frame in which the current image block is located satisfies a preset condition, the preset condition including the condition that the sequence number of the current frame is between a sequence number of a first reference frame and a sequence number of a second reference frame, the first reference frame belongs to the first reference frame list, and the second reference frame belongs to the second reference frame list.

36. 1. A coding method, the method being applied to bidirectional inter prediction, the method comprising: determining a first motion vector differential for the current image block; determining a first identifier, where when the value of the first identifier is a first preset value, the first identifier is used to indicate that a second motion vector differential of the current image block may be determined based on the first motion vector differential, where the first motion vector differential belongs to motion information of the current image block in a first direction, and the second motion vector differential belongs to motion information of the current image block in a second direction; encoding the first identifier and the first motion vector differential into a bitstream.

37. The second motion vector differential of the current image block can be determined based on the first motion vector differential by the formula mvd_lY=-mvd_lX obtaining the second motion vector differential according to 37. The method of claim 36, comprising the step of: mvd_lY representing the second motion vector differential; and mvd_lX representing the first motion vector differential.

38. said step of determining a first motion vector differential for the current image block comprising: determining a first predicted motion vector and obtaining a first predicted motion vector; 38. A method according to claim 36 or 37, comprising determining the first motion vector differential based on the first motion vector and the first predicted motion vector.

39. The method comprises: obtaining a second predicted motion vector; determining a second motion vector based on the second predicted motion vector and the second motion vector differential; determining a prediction sample of the current image block based on the first motion vector and the second motion vector; 39. The method of claim 38, wherein the first predicted motion vector and the first motion vector correspond to the first direction, and the second predicted motion vector and the second motion vector correspond to the second direction.

40. The current image block includes a first reference frame list in the first direction and a second reference frame list in the second direction, and the step of determining a prediction sample of the current image block based on the first motion vector and the second motion vector includes: obtaining a reference frame index of the first reference frame list and a reference frame index of the second reference frame list; determining a first reference image block based on the reference frame index of the first reference frame list, the first motion vector, and the first reference frame list; determining a second reference image block based on the reference frame index of the second reference frame list, the second motion vector, and the second reference frame list; 40. The method of claim 39, further comprising determining the predicted sample of the current image block based on the first reference image block and the second reference image block.

41. 41. The method of claim 36, further comprising, before the step of encoding the first identifier into a bitstream, a step of determining that a sequence number of a current frame in which the current image block is located satisfies a preset condition, wherein the preset condition includes a condition that the sequence number of the current frame is between a sequence number of a first reference frame and a sequence number of a second reference frame, the first reference frame belongs to the first reference frame list, and the second reference frame belongs to the second reference frame list.

42. 42. The method of claim 36, further comprising determining the second motion vector differential for the current image block when the value of the first identifier is a second preset value, and encoding the second motion vector differential into the bitstream.

43. 41. The method of claim 36, further comprising, before the step of encoding the first identifier into a bitstream, a step of determining that a sequence number of a current frame in which the current image block is located does not satisfy a preset condition, wherein the preset condition includes a condition that the sequence number of the current frame is between a sequence number of a first reference frame and a sequence number of a second reference frame, the first reference frame belongs to the first reference frame list, and the second reference frame belongs to the second reference frame list.

44. A bidirectional inter prediction device, an acquisition unit configured to determine a first motion vector differential for a current image block; a determining unit configured to determine a first identifier, wherein when a value of the first identifier is a first preset value, the first identifier is used to indicate that a second motion vector differential of the current image block may be determined based on the first motion vector differential, wherein the first motion vector differential belongs to motion information of the current image block in a first direction and the second motion vector differential belongs to motion information of the current image block in a second direction; a coding unit configured to code the first identifier and the first motion vector differential into a bitstream.

45. The determination unit is mvd_lY=-mvd_lX and specifically configured to obtain the second motion vector differential according to 45. The apparatus of claim 44, wherein mvd_lY represents the second motion vector differential and mvd_lX represents the first motion vector differential.

46. The acquisition unit: Determine a first predicted motion vector and obtain the first predicted motion vector; 46. ​​Apparatus according to claim 44 or 45, specifically configured to determine the first motion vector differential based on the first motion vector and the first predicted motion vector.

47. the obtaining unit is further configured to obtain a second predicted motion vector; and determine a second motion vector based on the second predicted motion vector and the second motion vector differential; the apparatus further comprises a prediction unit configured to determine a prediction sample of the current image block based on the first motion vector and the second motion vector; 47. The apparatus of claim 46, wherein the first predicted motion vector and the first motion vector correspond to the first direction, and the second predicted motion vector and the second motion vector correspond to the second direction.

48. The current image block includes a first reference frame list in the first direction and a second reference frame list in the second direction, and the prediction unit: Obtaining a reference frame index of the first reference frame list and a reference frame index of the second reference frame list; determining a first reference image block based on the reference frame index of the first reference frame list, the first motion vector, and the first reference frame list; determining a second reference image block based on the reference frame index of the second reference frame list, the second motion vector, and the second reference frame list; 48. The apparatus of claim 47, specifically configured to determine the prediction samples of the current image block based on the first reference image block and the second reference image block.

49. 49. The apparatus of claim 44, further comprising: a determining unit configured to determine, before the encoding unit encodes the first identifier into the bitstream, that a sequence number of a current frame in which the current image block is located satisfies a preset condition, the preset condition including the following conditions: the sequence number of the current frame is between a sequence number of a first reference frame and a sequence number of a second reference frame, the first reference frame belongs to the first reference frame list, and the second reference frame belongs to the second reference frame list.

50. 50. The apparatus of claim 44, wherein the obtaining unit is further configured to: determine the second motion vector differential for the current image block when the value of the first identifier is a second preset value; and encode the second motion vector differential into the bitstream.

51. 49. The apparatus of claim 44, further comprising: a determining unit configured to determine, before the encoding unit encodes the first identifier into the bitstream, that a sequence number of a current frame in which the current image block is located does not satisfy a preset condition, the preset condition including the condition that the sequence number of the current frame is between a sequence number of a first reference frame and a sequence number of a second reference frame, the first reference frame belongs to the first reference frame list, and the second reference frame belongs to the second reference frame list.

52. 44. A storage medium comprising the bitstream generated by using the method of any one of claims 24 to 30 or the bitstream obtained through decoding by using the method of any one of claims 36 to 43.

53. An image processing device comprising a processor, a memory, a communication interface, and a bus, wherein the processor is connected to the memory and the communication interface by using the bus; the memory configured to store instructions; 44. An image processing apparatus, wherein the processor is configured to execute the instructions, and when the processor executes the instructions stored in the memory, the processor is enabled to perform the encoding method of any one of claims 24 to 30 or the decoding method of any one of claims 36 to 43.

Citation Information

Patent Citations

  • Bidirectional prediction method used on the encoding / decoding side of video coding

    JP2007505529A

  • Video encoding device, video decoding device, video encoding method, and video decoding method

    JP2012186762A

  • Image encoder, image encoding method and image encoding program

    JP2013016934A

  • Image encoder, image encoding method and image encoding program

    JP2013106312A

  • Motion information derivation mode determination in video coding

    WO2016160609A1