Bidirectional inter prediction method and device

By having the decoder determine motion information in one direction based on the encoder's transmission in the other direction, the method reduces transmission resource usage and enhances coding efficiency in bidirectional inter prediction.

JP2024149497AActive Publication Date: 2024-10-18HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2024111033
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-03-29
Filing Date
2024-07-10
Publication Date
2024-10-18
Estimated Expiration
2039-01-11

AI Technical Summary

Technical Problem

Bidirectional inter prediction in video coding requires transmitting motion information for each image block in both directions, leading to excessive use of transmission resources and reduced coding compression efficiency.

Method used

A method where the encoder sends motion information in one direction, and the decoder determines the motion information in the other direction based on the received information, reducing the need for transmitting both sets of motion information.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024149497000001_ABST
    Figure 2024149497000001_ABST
Patent Text Reader

Abstract

To relate to the field of video picture coding technologies, and disclose a bidirectional inter prediction method and apparatus, to improve coding efficiency.SOLUTION: Ae method includes the steps of: obtaining indication information, the indication information being used to indicate to determine second motion information based on first motion information, the first motion information being motion information of a current picture block in a first direction, and the second motion information being 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 prediction samples 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 the People's Republic of China on March 29, 2018, the entirety of which is incorporated herein by reference.

[0002] FIELD OF THE DISCLOSURE The 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 technology, 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 the motion information of each image block to the decoder in the 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 send 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, which reduces the effective utilization rate of the transmission resources, the transmission rate, and the 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] In order to achieve the aforementioned objectives, the following technical solutions are used in the embodiments of this application.

[0008] According to a first aspect, a bidirectional inter prediction method is provided, the method includes: 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 a 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 this application determines the second motion information based on the first motion information after obtaining the indication information.In this method, the bitstream only needs to include the indication information and the first motion information, and no longer needs to include the second motion information.Compared with the prior art in which the bitstream includes the motion information of each image block in each direction, the bidirectional inter-prediction method provided in this application effectively reduces the motion information included in the bitstream, and improves 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 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 a second reference frame based on a reference frame index value 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

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 an index value of 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, the first motion vector being 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 a step of 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. This is not particularly limited in this 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 a number of the first reference frame in the first reference frame list; obtaining a sequence number of the second reference frame based on an index value of the second reference frame and the second reference frame list; 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 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 a number of the second reference frame in the second reference frame list. step 2, 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. This 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 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.

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

[0025] 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 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 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" is a step of calculating a first sequence number based on a sequence number of a current frame and a sequence number of a 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. 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, a 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 a second reference frame.

[0028] It can be seen that in this application, there may be multiple methods for "obtaining an index value of a second reference frame". 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, a bidirectional inter prediction apparatus is provided. The bidirectional inter prediction apparatus includes an obtaining unit and a determining unit.

[0030] In particular, the acquisition unit is configured to acquire instruction information, where the instruction information is used for instructing to determine second motion information based on first motion information, where 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 a 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 determine a prediction 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 the first reference frame list, 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 the first reference frame list; obtain 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; determine a first motion vector based on the first motion vector differential and the first motion vector predictor flag in the first motion information, where the first motion vector is 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 a 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 a first reference frame in a first reference frame list; obtains 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 a second reference frame in a second reference frame list; and obtains 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, 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 vector is derived in accordance with the second motion information.

[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 the current image block in a first direction, 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 first reference frame according to the index value of the first reference frame and a first reference frame list. 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, 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, 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; obtain an index value of a second reference frame, and 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 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 a 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 wherein 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 specifically 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 an equation 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 specifically 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 specifically 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 may be implemented in a number of ways.

[0041] One implementation includes the steps of: parsing the bitstream to obtain a first identifier, the first identifier being 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 the first motion information and determining the second motion information based on the first motion information if 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 of 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 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 a step of determining a predicted sample of 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, 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; 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 a value of the fourth identifier 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, 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, 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; 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 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 second motion information and determining the first motion information based on the second motion information when the value of the third identifier is a sixth 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.

[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, after an identifier is obtained by analyzing a bitstream, whether to determine the second motion information based on the first motion information is determined based on the value of the identifier. After it is determined that the second motion information needs to be determined based on the first motion information, the first motion information is obtained, and then the second motion information is determined based on the obtained first motion information. In this manner, the bitstream only needs to include the corresponding identifier and the first motion information, and no longer needs to include the second motion information. Compared with the prior art in which the bitstream includes the motion information of 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, and improves the effective utilization of transmission resources, transmission rate, and coding rate.

[0049] According to a fourth aspect, a bidirectional inter prediction apparatus is provided. The bidirectional inter prediction apparatus includes an obtaining unit and a determining unit.

[0050] In particular, in one implementation, the acquisition unit is configured to parse the bitstream to obtain a first identifier, the first identifier is used to indicate whether to determine second motion information based on the first motion information, the first motion information is configured to be motion information of the current image block in a first direction and the second motion information is configured to be motion information of the current image block in a second direction, and to acquire the first motion information when a value of the first identifier is a first preset value. The determination unit is configured to determine the second motion information based on the first motion information acquired by the acquisition unit, and determine a prediction 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 a 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 the motion information of the current image block in a first direction and the second motion information being the motion information of the current image block in a second direction, and obtain the first motion information when a 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 prediction 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 configured to be used to indicate whether to calculate motion information of the current image block by using a motion information derivation algorithm, and configured 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 prediction 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, and the fourth identifier is used to indicate whether to calculate the 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, 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 the 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 prediction 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 the possible implementation forms of the first aspect, or performs a bidirectional inter prediction method according to the third aspect or any one of the possible implementation forms of the third aspect.

[0055] According to a sixth aspect, a video decoder is provided, 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 bi-directional inter prediction method according to the first aspect or any one of the possible implementations of the first aspect, or the bi-directional inter prediction method according to the third aspect or any one of the possible implementations of the third aspect.

[0056] According to a seventh aspect, a decoder is provided, comprising: a bidirectional inter predictor according to the second aspect; and a reconstruction module, the reconstruction module being configured to determine reconstructed sample values ​​of a current image block based on prediction samples obtained by the bidirectional inter predictor; or a bidirectional inter predictor according to the fourth aspect; and a reconstruction module, the reconstruction module being configured to determine reconstructed sample values ​​of a 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 the possible implementation forms of the first aspect, or to perform a bidirectional inter-prediction method according to the third aspect or any one of the possible implementation forms of the third aspect.

[0058] According to a ninth aspect, a computer program product including instructions is provided. When the computer program product according to the fifth aspect is executed on a terminal, the terminal is enabled to perform a bidirectional inter prediction method according to the first aspect or any one of the possible implementation forms of the first aspect, or to perform a bidirectional inter prediction method according to the third aspect or any one of the 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 function module. In actual implementation, the device or function module may have other names. If the function of the device or function module is similar to that included in this application, the device or function module falls within the scope of the claims of this application and its equivalent technology.

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

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

[0062] [Figure 1] FIG. 1 is a schematic structural diagram of a video coding system according to an embodiment of the present application; [Diagram 2] FIG. 2 is a schematic structural diagram of a video encoder according to an embodiment of the present application; [Diagram 3] FIG. 2 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; [Diagram 5] FIG. 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 PREFERRED EMBODIMENTS

[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 the present application, the word "example" or the phrase "for example" is used to give an example, to illustrate, or to explain. Any embodiment or design scheme described in the embodiments of the present application as an "example" or "for example" should not be described as preferred or having more advantages over 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, the 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, and prediction is performed to obtain a prediction block of the image block, so that only the difference (or referred to as a residual or a residual block) between the image block and the prediction block of the image block is coded and transmitted, which can reduce transmission overhead. Finally, the encoder sends the bitstream corresponding to the image block to the decoder.

[0069] Correspondingly, the decoder performs a video decoding process after receiving the bitstream. Specifically, the decoder performs operations such as prediction, inverse quantization, and inverse transform on the received bitstream to obtain a reconstructed image block (or referred to as a reconstructed image block). This process is called 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 that is completed by coding / decoding an image block using correlation between a current frame and a reference frame of the current frame. The current frame may have one or more reference frames. Specifically, a predicted image block of a current image block is generated based on samples in a reference frame of the current image block.

[0071] In general, the predicted image block of the current image block may be generated based on only one reference image block, or the predicted image block of the current image block may be generated based on at least two reference image blocks. Generating the predicted image block of the current image block based on one reference image block is referred to as unidirectional prediction, and generating the predicted image block of the 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 "direction" in this application is a generalized definition. One direction in this application corresponds to one reference image block. The next first direction and second direction 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 correlation between a current video frame and a video frame that is encoded and played before the current video frame, and correlation between the current video frame and a video frame that is encoded before the current video frame and played after the current video frame.

[0073] It may be seen that bidirectional inter prediction includes two-directional inter prediction, usually 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 encoded 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 encoded before the current video frame and played after the current video frame.

[0074] The forward inter prediction corresponds to the forward reference frame list L0, and the backward inter prediction corresponds to the 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 top-left corner of the image, from left to right and from top to bottom. In this specification, an image block may be a macro block (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, the current frame has one reference frame list. When the current frame is a B frame, the current frame 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 that is 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, the 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 called reconstructed image blocks. Information such as the coding mode and reconstructed samples of the reconstructed image block are available.

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

[0081] A motion vector (MV) is an important parameter in the inter prediction process, which represents the spatial displacement of a coded image block with respect to a current image block. Usually, 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 a motion vector of a current image block in a bitstream, so that a decoder reproduces a prediction sample of the current image block to obtain a reconstructed block. To further improve the coding efficiency, a method for differentially coding a motion vector by using a reference motion vector will be described later, and 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. Since 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 an optimal reference image block for motion compensation, thereby successfully removing temporal redundancy. In the video coding standard H.264, two buffers are used in inter prediction, namely, reference frame list 0 and reference frame list 1. The reference frame in which the optimal reference block in each list is located is marked with an index value, 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. 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.

[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 the AMVP mode, the encoder constructs a candidate motion vector list by using motion vectors of coded image blocks that are spatially or temporally adjacent to the current image block, and determines an optimal 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 in 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 the decoder derive the motion information of all sub-blocks of the current image block by using the same motion model, 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 the decoder are the four-parameter affine model, the six-parameter affine transformation model, or the eight-parameter bilinear model.

[0088] For example, a four-parameter affine transformation model may be represented by using motion vectors of two samples and coordinates of the two samples relative to the sample at the top 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 top left corner (0,0) of the current image block and the sample at the top right corner (W,0) of the current image block are control points, and the motion vectors of the samples at the top left corner and top right corner 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 formula (1). In the following formula (1), (x,y) are the coordinates of the sub-block relative to the sample at the top left corner of the current image block, (vx,vy) are the motion vectors 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 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, the motion information of each sub-block of the current image block is obtained according to the following formula (2): In the following formula (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) are the motion vectors 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. 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, 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), (vx3,vy3), respectively, the motion information of each sub-block of the current image block is obtained according to the following formula (3): In the following formula (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) are the motion vectors 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, when 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 problem, the present application provides a bidirectional inter prediction method. In bidirectional inter prediction, an encoder sends the 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 the motion information of the current image block in a second direction according to the motion information of the current image block in the first direction. In this method, the prediction sample of the current image block may be calculated according to 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 methods provided in this application may be performed by a bidirectional inter prediction device, a video coding device, a video codec, or other device having 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, the video encoder 100 and the video decoder 200 are configured to calculate the 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 prediction 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 the 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 data structures 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] The destination device 20 may receive the encoded video data from the source device 10 via a link 30. The link 30 may comprise one or more media and / or devices capable of transferring the encoded video data from the source device 10 to the destination device 20. In one example, the link 30 may include one or more communication media that enable the source device 10 to transmit the encoded video data directly to the destination device 20 in real time. In this example, the source device 10 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to the destination device 20. The one or more communication media may include wireless and / or wired communication media, e.g., the 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, e.g., a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication mediums may include routers, switches, base stations, or other devices that implement communication from the source device 10 to the 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 the encoded video data.

[0099] In another example, the storage device 40 may correspond to a file server or another intermediate storage device that stores the encoded video data generated by the source device 10. In this example, the destination device 20 may obtain the stored video data from the storage device 40 through streaming transmission or download. The file server may be any type of server capable of storing the encoded video data and transmitting the encoded video data to the 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 connections include wireless channels or wired connections (e.g., cable modem), or combinations 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 in a data storage medium, decoding video data stored in a data storage medium, or another application. In some examples, the video coding system 1 may be configured to support 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 does not 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 where there is no data communication between the encoding device and the 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 manner or similar manner over a network. 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 a video source 101, a video encoder 102, and an 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] In the example of Figure 1, the destination device 20 includes a display device 201, a video decoder 202, and an input interface 203. In some examples, the input interface 203 includes a receiver and / or a modem. The input interface 203 may receive encoded video data via the link 30 and / or from the storage device 40. The display device 201 may be integrated with the destination device 20 or may be disposed external to the destination device 20. Typically, the display device 201 displays the decoded video data. The display device 201 may include multiple types of display devices, for example, a liquid crystal display, a plasma display, an organic light emitting diode display, or another type of display device.

[0106] Optionally, the video encoder 102 and the 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, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), discrete logic, hardware, or any combination thereof. When the bidirectional inter prediction method provided in the present application is implemented by 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, and 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 according to 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 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, 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 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, please refer to 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 a 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 a 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 a 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 a predicted motion vector of the current image block in the second direction.

[0111] Please refer to the following FIG. 4. The video decoder 202 is configured to obtain a bitstream, analyze the bitstream to obtain instruction information used to instruct to determine 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 a certain direction, the first motion information is the motion information of a current image block in a first direction, and the second motion information is the motion information of a current image block in a second direction, the first direction and the second direction in this specification are different, obtain first motion information (S401), determine second motion information based on the obtained first motion information (S402), and determine a prediction sample of the current image block based on the first motion information and the second motion information (S403).

[0112] The method used by the 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: the video decoder 202 determines a 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 the video decoder 202 determines a 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 a 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 a 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 that can process the encoded video data from the video encoder 102, e.g., 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 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 comprises 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 comprises an intra predictor 309 and an inter predictor 310. To reconstruct image blocks, video encoder 102 further comprises 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] The memory 307 may store video data encoded by components of the video encoder 102. The video data stored in the memory 307 may be obtained from the video source 101. The memory 307 may be a reference picture memory that stores reference video data used by the video encoder 102 to encode the video data in intra- or inter-coding modes. The 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 a number of 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. The partitioning may further include dividing into slices, tiles, or other larger units. The video encoder 102 is typically a component for encoding image blocks in a video slice to be encoded. A slice may be partitioned into a number of image blocks (and into sets of image blocks called tiles).

[0118] An 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. An 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 a residual block, and provide the residual block to a summer 309 to reconstruct a coded block to be used as a reference image.

[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. The residual video data in the 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 a quantizer 302. The quantizer 302 quantizes the transform coefficients to further reduce the bit rate. In some examples, the quantizer 302 may further scan a matrix including the quantized transform coefficients. Alternatively, the entropy encoder 303 may perform the scan.

[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 the entropy coding, the encoded bitstream may be transmitted to the video decoder 202 or archived for subsequent transmission or subsequent 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 encoded.

[0123] The inverse quantizer 304 and the inverse transformer 305 perform inverse quantization and inverse transformation, respectively, to reconstruct a residual block in the sample domain, e.g., for subsequent use as a reference block of a reference image. The summer 311 adds the reconstructed residual block to a predicted image block generated by the inter predictor 310 or the intra predictor 309 to generate a reconstructed image block. The predicted image block of an image block can be obtained by processing (such as interpolation) a reference image block 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, and correspondingly, no processing by the transformer 301 and the inverse transformer 305 is required. Alternatively, for some image blocks or image frames, the video encoder 102 does not generate residual data, and correspondingly, no processing by the transformer 301, the quantizer 302, the inverse quantizer 304, and the inverse transformer 305 is required. Alternatively, the video encoder 102 may directly store the reconstructed image block as a reference block, and correspondingly, no processing by the filter 306 is required. 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 an embodiment of the present application. As shown in FIG. 3, the video decoder 202 includes an entropy decoder 401, an inverse quantizer 402, an inverse transformer 403, a filter 404, a memory 405, a prediction processing unit 406, and 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 reverse of the encoding process described with respect to the video encoder 102 of FIG. 2.

[0126] In the decoding process, the video decoder 202 receives a bitstream from the video encoder 102. The video decoder 202 may receive video data from the network entity 42 and may optionally 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 the 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 / splicer, 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, for example, video encoder 102. Before network entity 42 transmits the bitstream to video decoder 202, network entity 42 may implement some of the techniques described in this application. In some video decoding systems, network entity 42 and video decoder 202 may be components of separate devices. In other cases, the functions 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 some 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 a video slice level and / or an image block level. In the present application, the syntax elements herein may include indication information related to a 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 send a signal to indicate a particular 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, inverse quantizes, on the quantized transform coefficients provided in the bitstream and decoded by the entropy decoder 401. The inverse quantization process may include determining the degree of quantization to be applied by using a quantization parameter calculated by the video encoder 102 for each image block in a 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 the prediction processing unit 406 generates a predicted image block for the current image block or a predicted image block for a sub-block of the current image block, the video decoder 202 sums the residual block from the inverse transformer 403 and the corresponding predicted image block generated by the prediction processing unit 406 to obtain a reconstructed block, i.e., a decoded image block. The summer 409 (also referred to as the reconstructor 409) represents a component that performs this summation operation. When necessary, a filter (in the decoding loop or after the decoding loop) may be further used to smooth the samples or the video quality may be improved in another manner. The filter 404 may be one or more loop filters, for example, 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 is 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 obtained bitstream and obtains the indication information.

[0136] Optionally, the video decoder 202 parses the bitstream and determines, based on a value of a syntax element 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 the indication information.

[0137] The video decoder 202 may receive the encoded bitstream transmitted by the 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 used to perform inter prediction on a current image block in a current frame based on a 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 used to perform inter prediction on a current image block in a 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 used to perform inter prediction on a current image block in a 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 used to perform inter prediction on a current image block in a 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 indication information used to indicate determining second motion information based on the first motion information, where the first motion information is the motion information of the current image block in a first direction, and the second motion information is the motion information of the current image block in a second direction, and the first direction and the second direction are different.

[0140] The 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 operation, 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 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 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 in a number of ways.

[0143] In the first implementation form, the video decoder 202 analyzes the first identifier. When the value of the first identifier is a first preset value, the video decoder 202 decides 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 the indication 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 decides to analyze the second motion information, and calculates the 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 the first motion information and the 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 preset value and the fifth preset value are both 1, and the eighth preset value and the ninth preset value 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 form, 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 the 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 the indication 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. The video decoder 202 first analyzes derived_mv_flag. When the value of derived_mv_flag is 1, the video decoder 202 determines to calculate the motion information of the current image block by using a motion information derivation algorithm. When the value of derived_mv_flag is 0, the video decoder 202 analyzes the first motion information and the second motion information. When the value of derived_mv_direction 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 derived_mv_direction is 0, the 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 form, 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 the 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 the instruction information. In other words, in this implementation form, "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 derived_mv_flag. When the value of derived_mv_flag is 1, the video decoder 202 determines to calculate the motion information of the current image block by using a motion information derivation algorithm. Further, 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 derived_mv_flag is 0, the video decoder 202 analyzes the first motion information and the second motion information.

[0149] In a fourth implementation form, 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 the 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 constituted 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 the indication information. 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, and 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 reference frame index value in this embodiment of the present application is the number of a reference frame in the corresponding reference frame list.

[0150] 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}, and based on the following condition B or condition C, it is determined that a reference frame whose sequence number in the first reference frame list is 2 and a reference frame whose sequence number in the second reference frame list is 6 may 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}, and 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 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 value.

[0152] In addition, 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 particularly as follows: The video decoder 202 obtains the indication information when determining 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 a 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 encoded image data. Then, the video decoder 202 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 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 expressed as (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 greater than or equal to 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 a higher layer syntax, such as an SPS, a PPS, a slice header, or a slice segment header, etc. This 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 a preset condition. prediction_unit() is a syntax structure of a prediction image block, which describes a method for determining the 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 in 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 the 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 instruction 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 the 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 in a 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, 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 a first direction.

[0175] For each of the syntax tables shown in Tables 1-3, video decoder 202 determines motion information of sub-blocks of a 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 form, 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 according to the index value of the first reference frame and the first reference frame list, calculates a sequence number of a second reference frame according to the sequence number of a 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 according to the sequence number of the second reference frame and the second reference frame list, and determines the second motion information according to 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 the sequence number of the second reference frame is determined to be 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 the 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 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; 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 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 does not include the first sequence number based on the sequence number of the current frame and the sequence number of the first reference frame (POC_Cur-POC_listX). and when the second reference frame list includes the second sequence number, determining a number of a reference frame represented by the second sequence number in the second reference frame list as an 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 an 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 a number of a reference frame represented by the third sequence number in the second reference frame list as an 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, for example, SPS, PPS, slice header, 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 only 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 an 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 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 the second reference frame list; determining a first motion vector (the motion vector of the current image block in the first direction) based on a first motion vector differential and a 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 a candidate motion information list in the same manner as the encoder constructs a candidate motion information list in the AMVP mode or the merge mode, and determines a 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 represented 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 an 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 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 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, the 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, the video decoder 202 determines a first motion vector and a second motion vector at S402. In this manner, the video decoder 202 may determine a first reference 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 prediction 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 a motion compensation process.

[0200] For 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, 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 only obtain 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 prediction 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 transmitted motion information, and improves the efficient utilization of transmission resources, the transmission rate, and the coding compression efficiency.

[0202] It may be understood that the bidirectional inter prediction method illustrated in FIG. 4 is described for a current image block, that is, 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 is also applicable to a non-translational motion model prediction mode, for example, 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 the 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 the video decoder 202 to determine the motion information of the current image block.

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

number

[0205] In the above equation, 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 uses the formula

number

[0207] In the above equation, 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 the motion information of the current image block in a first direction, and calculates the 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 residual 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, the motion information of each image block in all directions no longer needs to be transmitted, but only the motion information in a certain direction needs to be transmitted, which effectively reduces the amount of transmitted motion information, 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 steps performed by the video decoder 202 in the above 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 the embodiment of the present application, the bidirectional inter-prediction device may be divided into functional modules according to the above-mentioned method example. 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 software functional module. In the embodiment of the present application, the module division is an example, and is merely a logical function division. In the actual implementation, another division method may be used.

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

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

[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-mentioned embodiments, and / or is used in another process of the techniques described in this specification.

[0216] All the relevant contents of the steps in the foregoing method embodiments may be cited in the description 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] 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 the bidirectional inter prediction device provided in the 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 is configured to control and manage the operation of the bidirectional inter prediction device, for example, to perform the steps performed by the acquisition unit 50 and the decision unit 51, and / or to perform another process of the technology described herein. The communication module 61 is configured to support the 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 the program code and data of the bidirectional inter prediction device, for example, to store the 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 the 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 prediction device 5 and the bidirectional inter prediction device 6 may perform the bidirectional inter prediction method shown in Fig. 4. In particular, the bidirectional inter prediction device 5 and the bidirectional inter prediction device 6 may be a video decoder or other device having video coding functionality. The bidirectional inter prediction device 5 and the bidirectional inter prediction device 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, the non-volatile storage medium storing an executable program, the central processing unit being connected to the non-volatile storage medium and executing 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 a reconstructed sample value of a current image block according to a prediction sample obtained by the bidirectional inter prediction device.

[0227] Another embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium 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 executes 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 the 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-mentioned 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 in a wired (e.g., coaxial cable, fiber optic, or digital subscriber line (DSL)) or wireless (e.g., infrared, radio, or microwave) manner. 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, incorporating one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a DVD), a semiconductor medium (e.g., a 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 for the purpose of simple and concise description. In actual application, 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 apparatus and method may be implemented in other ways. For example, the described apparatus embodiments are merely examples. For example, the module or unit division is merely a logical function division, and may be other divisions in actual implementation. For example, multiple units or components may be combined or integrated in another apparatus, or some features may be ignored 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 apparatuses 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 location or distributed in different locations. 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 of the units may exist physically alone, or two or more units may be integrated into one unit. The integrated units may be implemented in the form of hardware or in the form of software functional units.

[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 be essentially implemented in the form of a software product, or the part that contributes to the prior art, or all or some of the technical solutions. The software product is stored in a storage medium and comprises some instructions for instructing a device (which may be a single-chip microcomputer, chip, or the like) or a processor to execute all or some of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes a medium capable of storing program code, such as a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

[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 Storage Unit 60 Processing Module 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 Totalizer 312 Totalizer 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 the second motion information based on the first motion information when the instruction information is used to instruct determining 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 prediction 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 further comprises: 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 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, the first motion vector being a motion vector of the current image block in the first direction; formula [0010] deriving a second motion vector in the second motion information according to 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 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 further comprises: obtaining an index value of a first reference frame 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; 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, 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, the first motion vector being 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, and mv_lX represents the first motion vector, the second motion vector being 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 further comprises: 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 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, 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 the second reference frame list; formula [0025] 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, the second motion vector being 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 further comprises: obtaining 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; 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 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, the second motion vector being 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 a 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 a value of the first identifier is a first preset value; and a step of determining a prediction 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 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; a step of obtaining 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; a step of obtaining the first motion information and determining the second motion information based on the first motion information when a 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 motion information; or a step of parsing 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; a step of obtaining first motion information when a 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 the motion information of the current image block in a first direction, and the second motion information being the motion information of the current image block in a second direction; and a step of determining a prediction 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 a 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 an index value of the first reference frame.

11. A bidirectional inter prediction method comprising: a step of: 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 a step of 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 acquisition unit configured to acquire indication information and acquire first movement information; a determination unit configured to determine the second motion information based on the first motion information acquired by the acquisition unit when the instruction information is used to instruct determining second motion information based on the first motion information, and to determine a prediction 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 is Obtain an index value of a first reference frame in the first motion information, and 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, the first motion vector being a motion vector of the current image block in the first direction; formula [0030] 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 is Obtain an index value of a first reference frame 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, the second reference frame being a reference frame of the current image block in the second direction, 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, the first motion vector being 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 calculating 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 is Obtain an index value of a first reference frame and a first motion vector difference in the first motion information, and 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 based on the index value of the second reference frame and a second reference frame list; determine a second predicted motion vector based on the index value of the second reference frame and a second candidate predicted motion vector list, the second predicted motion vector being a predicted motion vector of the current image block in the second direction, 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 the second reference frame list; formula [0045] 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 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, 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 is 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, and 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 Calculate 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; 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, the second motion vector being a motion vector of the current image block in the second direction.

15. The acquisition unit includes: 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, 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.

16. The acquisition unit includes: 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 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, 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.

17. The acquisition unit includes: 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 a formula POC_listX≠POC_listY0'', where POC_listY0'' represents the third sequence number; 15. An apparatus according to any one of claims 11 to 14, specifically configured to determine as the index value of the second reference frame the number of the reference frame represented by the third sequence number in the second reference frame list.

18. A bidirectional inter prediction device, an acquisition unit configured to analyze 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 to acquire the first motion information if a value of the first identifier is a first preset value; and a determination unit 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 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 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 if 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 The present invention provides an image processing method and apparatus comprising: an acquisition unit configured to analyze 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 list being a reference frame list of the current image block in a second direction. a first reference frame being a reference frame of the current image block in the first direction and a second reference frame being a reference frame of the current image block in the second direction, the acquisition unit being further configured to acquire a first motion vector differential and a first motion vector predictor flag, the determination unit determining 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, the second motion information being motion information of the current image block in the second direction, and a determination unit 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, and 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 being enabled to execute the bidirectional inter prediction method according to any one of claims 1 to 8 or to execute the bidirectional inter prediction method according to claim 9 when the program product is running on a terminal.

21. 10. A computer-readable storage medium comprising instructions, the instructions being executed on a terminal to 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, the non-volatile storage medium storing an executable program, the central processing unit being connected to the non-volatile storage medium, and the video decoder performing the bidirectional inter prediction method according to any one of claims 1 to 8 or the bidirectional inter prediction method according to claim 9 when the central processing unit executes the executable program.

23. A decoder comprising the bidirectional inter prediction device of any one of claims 10 to 17 and a reconstruction module, the reconstruction module being 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, the reconstruction module being 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 the steps of: 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 represents the second motion vector differential; and mvd_lX represents 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: the first predicted motion vector and the first motion vector corresponding to the first direction, and the second predicted motion vector and the second motion vector corresponding 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; and determining the prediction sample of the current image block based on the first reference image block and the second reference image block.

28. 28. A method according to any one of claims 24 to 27, further comprising, prior to the step of obtaining a first identifier, a step of determining that a sequence number of a current frame in which the current image block is located satisfies a preset condition, the preset condition including 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 belonging to the first reference frame list, and the second reference frame belonging to the second reference frame list.

29. The method comprises:

29. The method of any one of claims 24 to 28, further comprising the step of parsing a bitstream to obtain the second motion vector when the value of the first identifier is a second preset value.

30. 30. The method of claim 29, further comprising, prior to the step of obtaining a first identifier, a step of determining that the sequence number of the current frame in which the current image block is located does not satisfy the preset conditions, the preset conditions including a condition 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 belonging to the first reference frame list, and the second reference frame belonging to the second reference frame list.

31. A bidirectional inter prediction device, an acquisition unit configured to acquire a first identifier and acquire a first motion vector differential of a current image block; a determination unit configured to determine a second motion vector differential of the current image block based on the first motion vector differential when a value of the first identifier is a first preset value, the first motion vector differential belonging to motion information of the current image block in a first direction and the second motion vector differential belonging to motion information of the current image block in a second direction.

32. The determining unit is represented by the formula 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 or 32, 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. 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 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 belonging to the first reference frame list, and the second reference frame belonging to the second reference frame list.

36. 1. A coding method, the method being applied to bidirectional inter prediction, the method comprising the steps of: determining a first motion vector differential for a current image block; determining a first identifier, where 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, the first motion vector differential belonging to motion information of the current image block in a first direction, and the second motion vector differential belonging to motion information of the current image block in a second direction; and encoding said first identifier and said first motion vector differential into a bitstream.

37. The second motion vector differential of the current image block may be determined based on the first motion vector differential according to 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 represents the second motion vector differential; and mvd_lX represents the first motion vector differential.

38. The step of determining a first motion vector differential for a current image block comprises: determining a first predicted motion vector to obtain 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 prediction sample of the current image block based on the first reference image block and the second reference image block.

41. 41. A method according to any one of claims 36 to 40, further comprising, prior to 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, the preset condition including 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 belonging to the first reference frame list, and the second reference frame belonging to the second reference frame list.

42. 42. A method according to any one of claims 36 to 41, 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. A method according to any one of claims 36 to 40, further comprising, prior to 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, the preset condition including 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 belonging to the first reference frame list, and the second reference frame belonging 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, where 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, 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; a coding unit configured to code the first identifier and the first motion vector differential into a bitstream.

45. The determining unit is represented by the formula 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 includes: Determining a first predicted motion vector and obtaining the first predicted motion vector; 46. ​​An apparatus according to claim 44 or 45, specifically configured for determining 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 sample 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 determination unit configured to determine that a sequence number of a current frame in which the current image block is located satisfies a preset condition before the encoding unit encodes the first identifier into the bitstream, the preset condition including 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 belonging to the first reference frame list, and the second reference frame belonging to the second reference frame list.

50. 50. The apparatus of claim 44, wherein the acquisition unit is further configured to: determine a 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 determination unit configured to determine that before the encoding unit encodes the first identifier into the bitstream, 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 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 belonging to the first reference frame list, and the second reference frame belonging to the second reference frame list.

52. 5. 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 apparatus comprising a processor, a memory, a communication interface, and a bus, the processor being connected to the memory and the communication interface by using the bus; The memory is configured to store instructions; 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