Method and device for encoding / decoding motion vector information

Through variable-precision motion vector technology and motion vector prediction based on historical information, combined with multi-type index value binarization, the problem of a large proportion of motion vector information is solved and the video coding efficiency and compression performance are improved.

CN118540495APending Publication Date: 2024-08-23BEIJING SAMSUNG TELECOM R&D CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410634446.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2019-01-04
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In existing video coding technology, the proportion of motion vector information in the code stream is too large, and the existing binarization method is inefficient. Especially in VVC or AVS3, the probability distribution of motion information index values ​​​​is not suitable for truncating unary codes. Binarization.

Method used

Introducing variable-precision motion vector technology, combined with motion vector prediction based on historical information, and determining the final motion vector prediction and difference through the correspondence between motion vector accuracy and motion vector prediction, and using multi-type index value binarization to improve coding efficiency.

Benefits of technology

Effectively reduce the motion vector difference, improve coding performance, improve video coding compression efficiency, optimize the binarization method of motion information index values, and adapt to the new probability distribution of motion information index values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540495A
    Figure CN118540495A
Patent Text Reader

Abstract

The invention provides a motion vector information coding method, which comprises the following steps of: aiming at each motion vector precision, coding motion vector information based on a corresponding relationship between at least part of motion vector precision in a variable-precision motion vector precision list and motion vector prediction in a motion vector prediction list based on historical information, the corresponding motion vector prediction is determined; determining a combination of a final motion vector precision and a motion vector prediction, and determining a final prediction vector difference based on the determined final motion vector prediction; and at least encoding the final motion vector prediction precision information and the final motion vector difference information in a code stream.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese invention patent application with the application date of January 4, 2019, application number 201910011266.9, and invention name “Method and device for encoding / decoding motion vector information”. Technical Field

[0002] The present invention relates to the technical field of video encoding / decoding, and more specifically, to a method for corresponding motion vector accuracy and motion vector prediction, and a method and device for encoding / decoding motion vector information based on the method. Background Art

[0003] In natural videos, there is a high degree of similarity between images. Therefore, in order to remove information redundancy between images during video compression, inter-frame prediction is often performed. The so-called inter-frame prediction is to use the already encoded image to predict the current image to be encoded, and then pass the prediction error to the decoder. Compared with directly transmitting the content of the current image, the amount of information in the prediction error is much smaller, thus achieving the purpose of compression. In fact, when performing inter-frame prediction, the encoder needs to find a reference block that matches each image block as much as possible in the previously encoded reference image, so as to minimize the prediction error. The position difference between the current block and the reference block is called a motion vector, and the motion vector information also needs to be transmitted in the bitstream so that the decoder can know which block is the reference block of the current block.

[0004] Therefore, although the inter-frame prediction technology reduces the pixel information transmitted in the bitstream, it increases the new information that needs to be transmitted. With the development of prediction technology, the prediction error is getting smaller and smaller, so the proportion of motion vector information in the bitstream is getting larger and larger. Therefore, the motion vector information also needs to be compressed. The current method is to predict the motion vector and write the difference between the motion vector prediction and the motion vector into the bitstream. This difference is called the motion vector difference. The size of the motion vector difference is much smaller than the size of the original motion vector, which plays a role in compressing the motion vector information.

[0005] The motion vector of the current block can be predicted. A motion vector prediction method uses the correlation of motion vectors in space to conditionally judge and calculate the motion vectors of several surrounding blocks to obtain a unique motion vector prediction, which we call unique motion vector prediction technology. Experts in the field of video coding have also proposed advanced motion vector prediction technology. This technology uses the correlation of motion vectors in space and time to establish a spatial candidate list and a temporal candidate list respectively, and then select the optimal motion vector prediction from the candidate list. The spatial candidate list requires the motion vector or the scale of the motion vector of the surrounding blocks of the current block, and the temporal candidate list requires the scale of the motion vector of the block corresponding to the reference block position in the adjacent encoded image. The encoder selects the optimal motion vector prediction from the spatial and temporal candidate lists and writes its index into the bitstream.

[0006] In recent years, a motion vector prediction technology based on historical information has emerged, referred to as HMVP. This technology establishes and maintains a motion vector list of a certain length, which is a first-in-first-out queue or a first-in-first-out queue with (guaranteed non-repetition) restrictions. The encoder also writes the index of the optimal motion vector prediction into the bitstream. The motion vector prediction technology based on historical information increases the number of motion vector prediction candidates, thereby helping to improve encoding performance.

[0007] In terms of improving the efficiency of inter-frame prediction, in order to obtain a reference block that better matches the current block, current codecs all use sub-pixel inter-frame prediction, which means that the position of the reference block in the reference image is not necessarily an integer pixel, but can also be a sub-pixel. In order to support sub-pixel reference blocks, the accuracy of the motion vector must also be sub-pixel, and then the motion vector difference is also sub-pixel accurate. In this way, on the one hand, the use of reference blocks at sub-pixel positions improves the efficiency of inter-frame prediction and reduces the prediction error. On the other hand, the use of sub-pixel accurate motion vector differences increases the number of bits required for transmitting motion vector information in the bitstream.

[0008] In order to balance this contradiction, experts in the field of video coding have proposed variable precision motion vector technology. The so-called variable precision motion vector technology means that the precision of the motion vector difference transmitted in the bitstream and the motion vector used in actual encoding and decoding is not fixed, and different image blocks can use different motion vector precisions. In this way, some large motion vector differences can be represented by motion vector differences with low pixel precision to reduce transmission bits.

[0009] The implementation method of variable precision motion vector technology is as follows: the encoder selects the motion vector precision according to the situation of the current image block, and then transmits the index of the precision value used in the bit stream.

[0010] In this way, the index of motion vector prediction and the index of motion vector precision need to be written into the bitstream. Some experts have proposed a method in which a motion vector precision corresponds to a motion vector prediction at a specific position in the spatial or temporal domain. We call it the variable precision motion vector technology of spatiotemporal motion vector prediction binding. For example, the first motion vector precision corresponds to the motion vector prediction obtained from its left neighboring block. This reduces the transmission of motion vector prediction indexes in the bitstream and further improves the coding efficiency.

[0011] The latest international video coding standard VVC and the latest domestic video coding standard AVS3 both use HMVP technology in inter-frame skip mode and inter-frame direct mode coding. This technology expands the candidate motion information list in the case of inter-frame skip mode and direct mode, that is, the motion information that the encoder has used (called historical motion information) is added to the candidate motion information list, and the encoder can obtain more motion information for prediction. At the same time, in VVC or AVS3, these motion information extended to the candidate motion information list also need to be identified by index values, so that the index value can be used to determine which motion information in the candidate motion information list is used in the intra-frame skip mode or intra-frame direct mode.

[0012] Problems existing in the above prior art

[0013] Although advanced motion vector prediction and motion vector prediction based on historical information provide multiple motion vector prediction candidates, they need to transmit the motion vector prediction index value in the bitstream. Although the variable precision motion vector technology of spatiotemporal motion vector prediction binding saves the need to transmit the motion vector prediction index value in the bitstream, it only uses motion vector prediction of temporally and spatially adjacent blocks, which has certain limitations.

[0014] On the other hand, the coding efficiency of the motion information index value in the candidate motion information list in VVC or AVS3 is not high, which is mainly reflected in the binarization of the motion information index value. The existing standards all use the binarization method of truncated unary code. After adopting the HMVP coding technology, as the number of motion information in the candidate motion information list increases, the probability distribution of the motion information index value no longer satisfies the distribution that the probability value decreases as the motion information index value increases, so a new binarization method is needed. Summary of the invention

[0015] Technical Solution

[0016] In order to solve the above-mentioned problems existing in the prior art, in the first aspect of the present application, a method for encoding motion vector information is provided, including: for each motion vector precision, determining the corresponding motion vector prediction based on the correspondence between the motion vector precision in the variable-precision motion vector precision list at least partially corresponding to the motion vector prediction in the motion vector prediction list based on historical information; determining a final combination of motion vector precision and motion vector prediction, and determining a final prediction vector difference based on the determined final motion vector prediction; and encoding at least the final motion vector prediction precision information and the final motion vector difference information in the bitstream.

[0017] According to the first aspect, at least one motion vector precision in the variable-precision motion vector precision list corresponds to a unique motion vector prediction via a unique motion vector prediction method, and the remaining motion vector precisions in the variable-precision motion vector precision list correspond to the motion vector predictions in the motion vector prediction list based on historical information.

[0018] According to the first aspect, a part of the motion vector accuracy in the variable-precision motion vector accuracy list corresponds to the motion vector predictions in the spatial candidate list and the temporal candidate list obtained by the variable-precision motion vector method of spatiotemporal motion vector prediction binding, and the remaining part of the motion vector accuracy in the variable-precision motion vector accuracy list corresponds to the motion vector predictions in the motion vector prediction list based on historical information.

[0019] According to the first aspect, the corresponding order between the motion vector accuracy and the motion vector prediction is one of sequential correspondence and reverse correspondence, wherein: the sequential correspondence is that the order of the motion vector accuracy to be corresponded is consistent with the order of the motion vector prediction to be corresponded; the reverse correspondence is that the order of the motion vector accuracy to be corresponded is opposite to the order of the motion vector prediction to be corresponded.

[0020] According to the first aspect, when the number of the motion vector accuracy is greater than the number of the motion vector predictions, the motion vector accuracy among the motion vector accuracy that has not undergone corresponding operations is again corresponded to the motion vector predictions according to one of the sequential correspondence and the reverse correspondence followed by the motion vector accuracy that has undergone corresponding operations until all motion vector accuracy are corresponded.

[0021] According to the first aspect, when the number of the motion vector precisions is greater than the number of the motion vector predictions, the motion vector precisions in the motion vector precisions that have not undergone corresponding operations all correspond to a certain motion vector prediction in the motion vector predictions.

[0022] According to the first aspect, wherein, when the number of the motion vector precisions is greater than the number of the motion vector predictions, the motion vector precisions for which corresponding operations are not performed among the motion vector precisions do not correspond to any of the motion vector predictions.

[0023] According to the first aspect, one of the first motion vector accuracy and the last motion vector accuracy of the motion vector accuracy corresponds to the unique motion vector prediction, and the remaining motion vector accuracy of the motion vector accuracy corresponds to the motion vector prediction in the motion vector prediction list based on historical information, and the corresponding order is one of sequential correspondence and reverse correspondence, wherein: the sequential correspondence is: the order of the motion vector accuracy to be corresponded is consistent with the order of the motion vector prediction to be corresponded; and the reverse correspondence is: the order of the motion vector accuracy to be corresponded is opposite to the order of the motion vector prediction to be corresponded.

[0024] According to the first aspect, when the number of remaining motion vector precisions of the motion vector precisions is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions in the motion vector precisions that have not undergone corresponding operations all correspond to the unique motion vector prediction.

[0025] According to the first aspect, when the number of the remaining motion vector accuracy of the motion vector accuracy is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector accuracy that has not undergone corresponding operations is corresponded to the motion vector accuracy in one of the order of correspondence and the reverse order of correspondence followed by the motion vector accuracy that has undergone corresponding operations, and is again corresponded to the motion vector prediction in the motion vector prediction list based on historical information until all motion vector accuracy are corresponded.

[0026] According to the first aspect, when the number of remaining motion vector accuracy of the motion vector accuracy is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector accuracy on which corresponding operations have not been performed all correspond to a motion vector prediction in the motion vector prediction list based on historical information.

[0027] According to the first aspect, when the number of remaining motion vector precisions of the motion vector precisions is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions in which corresponding operations have not been performed do not correspond to any motion vector predictions.

[0028] According to the first aspect, the first part of the motion vector accuracy corresponds to the motion vector prediction in the spatial candidate list and the temporal candidate list, and the second part of the motion vector accuracy except the first part corresponds to the motion vector prediction in the motion vector prediction list based on historical information.

[0029] According to the first aspect, the corresponding order of the motion vector accuracy of the second part and the motion vector prediction in the motion vector prediction list based on historical information is one of sequential correspondence and reverse correspondence, wherein: the sequential correspondence is: the order of the motion vector accuracy to be corresponded is consistent with the order of the motion vector prediction to be corresponded; the reverse correspondence is: the order of the motion vector accuracy to be corresponded is opposite to the order of the motion vector prediction to be corresponded.

[0030] According to the first aspect, when the number of motion vector precisions in the second part is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions in the second part that have not undergone corresponding operations are corresponded again with the motion vector predictions in the motion vector prediction list based on historical information in one of the order correspondence and the reverse order correspondence followed by the motion vector precisions in the second part that have undergone corresponding operations, until all motion vector precisions are corresponded.

[0031] According to the first aspect, when the number of motion vector precisions in the second part is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions in the second part that have not undergone corresponding operations all correspond to a motion vector prediction in the motion vector prediction list based on historical information.

[0032] According to the first aspect, when the number of motion vector precisions in the second part is greater than the number of motion vector predictions in the motion vector prediction list based on history information, the motion vector precisions in the second part that have not undergone corresponding operations do not correspond to any motion vector prediction.

[0033] According to the first aspect, in the case where the current motion vector prediction has already appeared in the corresponding motion vector prediction, the current motion vector prediction is skipped, and the current motion vector accuracy corresponds to the motion vector prediction that meets the restrictions, wherein the restriction is: the motion vector prediction has not appeared in the corresponding motion vector prediction.

[0034] According to the first aspect, in the case where there is no candidate motion vector prediction that meets the restriction, the uncorrelated motion vector precisions all correspond to a certain motion vector prediction.

[0035] According to the first aspect, the method further includes: determining a prediction direction, and determining a reference frame based on the prediction direction.

[0036] According to the first aspect, the determining of the prediction direction includes: when the prediction direction of the motion vector prediction is a first direction that only refers to the first reference frame list, a second direction that only refers to the second reference frame list, or one of the third directions that refer to two reference frame lists, the prediction direction is determined as the referenced direction.

[0037] According to the first aspect, the determining of the prediction direction includes: when the prediction direction of the motion vector prediction is a first direction that only refers to the first reference frame list and a second direction that only refers to the second reference frame list, the prediction direction is determined as the referenced direction; when the prediction direction of the motion vector prediction is a third direction that refers to two reference frame lists, the prediction direction is determined as the first direction, the second direction and the third direction.

[0038] According to the first aspect, the determining of the reference frame based on the prediction direction comprises: determining the reference frame as a reference frame corresponding to the motion vector prediction in the determined prediction direction.

[0039] According to the first aspect, the determination of the final combination of motion vector accuracy and motion vector prediction and the determination of the final prediction vector difference based on the determined final motion vector prediction include: determining the optimal motion vector under different reference frames under different motion accuracy under different prediction directions by a motion search method and calculating the motion vector difference; and comparing the encoding cost of encoding the current block using the optimal motion vector under different reference frames under different prediction directions under different accuracy, so as to determine the final combination of motion vector accuracy and motion vector prediction, the final prediction direction, the final reference frame and the final motion vector difference under the final motion vector accuracy.

[0040] According to the first aspect, no matter what the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is, the prediction direction information is not encoded in the bitstream, but the prediction direction is considered to be the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy.

[0041] According to the first aspect, in the case where the prediction direction of the motion vector prediction is a first direction that only refers to the first reference frame list and a second direction that only refers to the second reference frame list, the prediction direction information is not encoded in the bitstream, but is regarded as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy; in the case where the prediction direction of the motion vector prediction is a third direction that refers to two reference frame lists, the prediction direction information is encoded into the bitstream together with the determined final motion vector accuracy information and the final motion vector difference information.

[0042] According to the first aspect, no matter what the final reference frame is, reference frame information is not encoded in the bitstream, but it is regarded as a reference frame for motion vector prediction corresponding to the final motion vector accuracy.

[0043] According to the first aspect, when the final prediction direction is a first direction that only refers to a first reference frame list or a second direction that only refers to a second reference frame list, reference frame information is not encoded in the bitstream, and the final reference frame is determined as a reference frame for motion vector prediction corresponding to the final motion accuracy; and when the final prediction direction is a third direction that refers to two reference frame lists, reference frame information is also encoded in the bitstream.

[0044] According to the first aspect, the method further includes: determining a final motion vector prediction mode, and encoding the final motion vector prediction mode in a bitstream.

[0045] According to the first aspect, the determining of the motion vector prediction mode includes: deriving a first coding cost for the current block in a first mode in which the correspondence between the motion vector accuracy at least partially corresponds to the motion vector prediction is not used; deriving a second coding cost for the current block in a second mode in which the correspondence between the motion vector accuracy at least partially corresponds to the motion vector prediction is used; and comparing the first coding cost with the second coding cost, and selecting a mode with a smaller coding cost as the final motion vector prediction mode.

[0046] According to the first aspect, it also includes: when the final motion vector prediction mode is the first mode, encoding the final motion vector prediction information in the code stream; and when the final motion vector prediction mode is the second mode, not encoding the final motion vector prediction information in the code stream.

[0047] In a second aspect of the present application, a motion vector information encoding device is provided, in which the method according to the first aspect is performed.

[0048] In a third aspect of the present application, a method for decoding motion vector information is provided, comprising: parsing motion vector accuracy information and motion vector difference information from a bitstream; determining a corresponding motion vector prediction based on the motion vector accuracy information obtained by parsing, based on a correspondence between at least a portion of the motion vector accuracy in a variable-precision motion vector accuracy list and a motion vector prediction in a motion vector prediction list based on historical information; and decoding the motion vector information based on the motion vector accuracy information, the motion vector difference information and the motion vector prediction.

[0049] According to the third aspect of the present application, at least one motion vector precision in the variable-precision motion vector precision list corresponds to a unique motion vector prediction via a unique motion vector prediction method, and the remaining motion vector precisions in the variable-precision motion vector precision list correspond to the motion vector predictions in the motion vector prediction list based on historical information.

[0050] According to the third aspect of the present application, a part of the motion vector accuracy in the variable-precision motion vector accuracy list corresponds to the motion vector predictions in the spatial candidate list and the temporal candidate list obtained by the variable-precision motion vector method via spatiotemporal motion vector prediction binding, and the remaining part of the motion vector accuracy in the variable-precision motion vector accuracy list corresponds to the motion vector predictions in the motion vector prediction list based on historical information.

[0051] According to the third aspect of the present application, the corresponding order between the motion vector accuracy and the motion vector prediction is one of sequential correspondence and reverse correspondence, wherein: the sequential correspondence is that the order of the motion vector accuracy to be corresponded is consistent with the order of the motion vector prediction to be corresponded; the reverse correspondence is that the order of the motion vector accuracy to be corresponded is opposite to the order of the motion vector prediction to be corresponded.

[0052] According to the third aspect of the present application, when the number of the motion vector precisions is greater than the number of the motion vector predictions, the motion vector precisions that have not undergone corresponding operations among the motion vector precisions are again corresponded to the motion vector predictions according to one of the sequential correspondence and the reverse correspondence followed by the motion vector precisions that have undergone corresponding operations until all motion vector precisions are corresponded.

[0053] According to a third aspect of the present application, when the number of the motion vector precisions is greater than the number of the motion vector predictions, the motion vector precisions in the motion vector precisions that have not undergone corresponding operations all correspond to a certain motion vector prediction in the motion vector predictions.

[0054] According to a third aspect of the present application, when the number of the motion vector precisions is greater than the number of the motion vector predictions, the motion vector precisions in the motion vector precisions that have not undergone corresponding operations do not correspond to any motion vector predictions in the motion vector predictions.

[0055] According to the third aspect of the present application, one of the first motion vector accuracy and the last motion vector accuracy of the motion vector accuracy corresponds to the unique motion vector prediction, and the remaining motion vector accuracy of the motion vector accuracy corresponds to the motion vector prediction in the motion vector prediction list based on historical information, and the corresponding order is one of sequential correspondence and reverse correspondence, wherein: the sequential correspondence is: the order of the motion vector accuracy to be corresponded is consistent with the order of the motion vector prediction to be corresponded; and the reverse correspondence is: the order of the motion vector accuracy to be corresponded is opposite to the order of the motion vector prediction to be corresponded.

[0056] According to the third aspect of the present application, when the number of remaining motion vector precisions of the motion vector precision is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions on which corresponding operations have not been performed all correspond to the unique motion vector prediction.

[0057] According to the third aspect of the present application, when the number of the remaining motion vector accuracy of the motion vector accuracy is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector accuracy that has not undergone corresponding operations is corresponded to the motion vector accuracy in one of the order of correspondence and the reverse order of correspondence followed by the motion vector accuracy that has undergone corresponding operations, and is again corresponded to the motion vector prediction in the motion vector prediction list based on historical information until all motion vector accuracy are corresponded.

[0058] According to the third aspect of the present application, when the number of remaining motion vector accuracy of the motion vector accuracy is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector accuracy on which corresponding operations have not been performed all correspond to a motion vector prediction in the motion vector prediction list based on historical information.

[0059] According to the third aspect of the present application, when the number of remaining motion vector precisions of the motion vector precisions is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions in the motion vector precisions on which corresponding operations have not been performed do not correspond to any motion vector predictions.

[0060] The third aspect of the present application is that the first part of the motion vector accuracy corresponds to the motion vector prediction in the spatial candidate list and the temporal candidate list, and the second part of the motion vector accuracy except the first part corresponds to the motion vector prediction in the motion vector prediction list based on historical information.

[0061] According to the third aspect of the present application, the corresponding order of the motion vector accuracy of the first part and the motion vector prediction in the spatial candidate list and the temporal candidate list is one of sequential correspondence and reverse correspondence, and the corresponding order of the motion vector accuracy of the second part and the motion vector prediction in the motion vector prediction list based on historical information is one of sequential correspondence and reverse correspondence, wherein: the sequential correspondence is: the order of the motion vector accuracy to be corresponded is consistent with the order of the motion vector prediction to be corresponded; the reverse correspondence is: the order of the motion vector accuracy to be corresponded is opposite to the order of the motion vector prediction to be corresponded.

[0062] According to the third aspect of the present application, when the number of motion vector precisions in the second part is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions in the second part that have not undergone corresponding operations are corresponded to the motion vector precisions in the second part according to one of the order correspondence and the reverse order correspondence followed by the motion vector precisions that have undergone corresponding operations in the second part, and are again corresponded to the motion vector predictions in the motion vector prediction list based on historical information until all motion vector precisions are corresponded.

[0063] According to the third aspect of the present application, when the number of motion vector precisions in the second part is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions in the second part that have not undergone corresponding operations all correspond to a motion vector prediction in the motion vector prediction list based on historical information.

[0064] According to the third aspect of the present application, when the number of motion vector precisions in the second part is greater than the number of motion vector predictions in the motion vector prediction list based on historical information, the motion vector precisions in the second part on which no corresponding operations are performed do not correspond to any motion vector predictions.

[0065] According to the third aspect of the present application, in the case where the current motion vector prediction has already appeared in the corresponding motion vector prediction, the current motion vector prediction is skipped, and the current motion vector accuracy corresponds to the motion vector prediction that meets the restrictions, wherein the restriction is: the motion vector prediction has not appeared in the corresponding motion vector prediction.

[0066] According to a third aspect of the present application, in the case where there is no candidate motion vector prediction that meets the restrictions, the uncorresponding motion vector accuracies all correspond to a certain motion vector prediction.

[0067] According to the third aspect of the present application, it also includes: determining prediction direction information and reference frame information; and decoding the motion vector information based on the motion vector accuracy information, the motion vector difference information, the motion vector prediction, the prediction direction information and the reference frame information.

[0068] According to a third aspect of the present application, the determining of prediction direction information includes: setting the prediction direction to be the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy.

[0069] According to the third aspect of the present application, the determination of prediction direction information includes: when the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is a first direction that only refers to the first reference frame list or a second direction that only refers to the second reference frame list, setting the prediction direction to be the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy; and when the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is a third direction that refers to two reference frame lists, parsing the prediction direction information from the bitstream.

[0070] According to a third aspect of the present application, the determining of the reference frame information includes: setting the reference frame to be the same as the reference frame of the motion vector prediction corresponding to the motion vector accuracy.

[0071] According to the third aspect of the present application, the determination of reference frame information includes: when the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is a first direction that only refers to the first reference frame list or a second direction that only refers to the second reference frame list, setting the reference frame to be the same as the reference frame of the motion vector prediction corresponding to the motion vector accuracy; when the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is a third direction that refers to two reference frame lists, parsing the reference frame information from the bitstream.

[0072] According to the third aspect of the present application, the method also includes: parsing motion vector prediction mode information from the bit stream, and when the motion vector prediction mode is a first mode that does not use the corresponding relationship and the motion vector prediction agreed upon by the encoder / decoder is not unique, parsing the motion vector prediction information from the bit stream.

[0073] In a fourth aspect of the present application, a device for decoding motion vector information is provided, in which the method according to the third aspect is performed.

[0074] In the fifth aspect of the present application, a method for binarizing motion vector information is provided, comprising: classifying a candidate motion information list; binarizing the index values ​​of the classified types using a first binarization method, and binarizing the index values ​​of the current motion information in the candidate motion information list type using a second binarization method; and writing the binarized information into a bitstream.

[0075] According to a fifth aspect of the present application, the classification categories of the candidate motion information list are greater than or equal to 2, and the first binarization method and the second binarization method are the same method.

[0076] According to a fifth aspect of the present application, the classification categories of the candidate motion information list are greater than or equal to 2, and the first binarization method and the second binarization method are different methods.

[0077] In the sixth aspect of the present application, a method for determining motion vector information is provided, comprising: obtaining from a bitstream binarization information of a type index value of a candidate motion information list and a binarization information of an index value of a current motion information in the type of the candidate motion information list; parsing out the type index value and the index value of the current motion information in the type of the candidate motion information list based on the obtained binarization information; classifying the candidate motion information list according to the same classification method as that used by the encoder side to classify the candidate motion information list; determining motion information according to the parsed type index value and the index value of the current motion information in the type of the candidate motion information list, and the classification type; and decoding according to the motion information.

[0078] According to the sixth aspect of the present application, the method of parsing the type index value and the index value of the current motion information in the candidate motion information list type based on the obtained binarization information includes: obtaining the type index value by a de-binarization method of a first binarization method using the binarization information of the type index in the bitstream; and obtaining the index value of the current motion information in the candidate motion information list type by a de-binarization method of a second binarization method using the binarization information of the index of the current motion information in the bitstream in the candidate motion information list type.

[0079] According to the sixth aspect of the present application, determining the motion information based on the parsed type index value, the index value of the current motion information in the candidate motion information list type, and the classified type includes: determining which type the current motion information is in by the type index value, and finding the motion information in the determined type by the index value of the current motion information in the candidate motion information list type.

[0080] In the seventh aspect of the present application, an encoder is provided, comprising: a classification unit configured to classify a candidate motion information list; a binarization unit configured to: use a first binarization method to binarize the index value of the classified type, and use a second binarization method to binarize the index value of the current motion information in the candidate motion information list type; and a binarization information writing unit configured to write the binarization information into a bitstream.

[0081] According to a seventh aspect of the present application, the classification categories of the candidate motion information list are greater than or equal to 2, and the first binarization method and the second binarization method are the same method.

[0082] According to a seventh aspect of the present application, the classification categories of the candidate motion information list are greater than or equal to 2, and the first binarization method and the second binarization method are different methods.

[0083] In the eighth aspect of the present application, a decoder is provided, comprising: an obtaining unit, configured to: obtain from a bitstream binarization information of a classified type index value of a candidate motion information list and binarization information of an index value of a current motion information in the type of the candidate motion information list; a parsing unit, configured to parse out the type index value and the index value of the current motion information in the type of the candidate motion information list based on the obtained binarization information; a classification unit, configured to classify the candidate motion information list according to the same classification method as that used by the encoder side to classify the candidate motion information list; and a determination unit, configured to determine the motion information according to the parsed type index value, the index value of the current motion information in the type of the candidate motion information list, and the classified type.

[0084] According to the eighth aspect of the present application, the parsing unit is further configured to: obtain the value of the type index by debinarizing the binarized information of the type index in the code stream through the first binarization method; obtain the value of the index of the current motion information in the candidate motion information list type by debinarizing the binarized information of the index of the current motion information in the code stream through the second binarization method.

[0085] According to the eighth aspect of the present application, the determination unit is further configured to: determine the type of the current motion information through the type index value, and find the motion information in the determined type through the index value of the current motion information in the candidate motion information list type.

[0086] Technical Effects

[0087] The present application introduces motion vector prediction based on historical information into the correspondence between motion vector accuracy and motion vector prediction of variable precision motion vector technology, which not only eliminates the overhead caused by indicating motion vector prediction, but also adds more candidate values ​​compared to motion vector prediction of only temporally and spatially adjacent blocks, which can effectively reduce the value of motion vector difference, thereby improving encoding performance.

[0088] In addition, after VVC or AVS3 adopts HMVP coding technology, the probability distribution of the index value of motion information is no longer suitable for the binarization method of truncated unary code. Therefore, the present invention proposes a method for binarizing the index value of motion information. First, according to the motion vector type in the candidate motion information list, the motion vectors in the candidate motion information list are divided into multiple types, recorded as type indexes, and the type indexes are binarized, and then the motion information index values ​​in the large type are binarized, which can effectively improve the efficiency of binarization and coding, thereby improving the video coding compression efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1a and Figure 1b Schematically shows the correspondence between the motion vector accuracy of the variable precision motion vector technology according to an embodiment of the present invention and the motion vector prediction in the motion vector prediction list based on historical information.

[0090] Figure 2a to Figure 2d Schematically shows the correspondence between the motion vector accuracy of the variable precision motion vector technology according to an embodiment of the present invention and the unique motion vector prediction obtained via the unique motion vector prediction technology and the motion vector prediction in the motion vector prediction list based on historical information.

[0091] Figure 3a to Figure 3b The figure exemplarily shows the correspondence between the motion vector accuracy of the variable precision motion vector technology according to an embodiment of the present invention and the motion vector prediction in the spatial candidate list, the temporal candidate list, and the motion vector prediction list based on historical information.

[0092] Figure 4 A flowchart 400 of a first embodiment of encoding motion vector information is shown in FIG.

[0093] Figure 5 A flow chart 500 of a second embodiment of encoding motion vector information is shown in FIG.

[0094] Figure 6 FIG. 6 schematically shows a flowchart 600 of a first embodiment of decoding motion vector information.

[0095] Figure 7A flowchart 700 of a second embodiment of decoding motion vector information is schematically shown in FIG.

[0096] Figure 8 The flowchart schematically shows a method for binarizing a motion information index in an inter-frame skip mode or an inter-frame direct mode at the encoder side.

[0097] Fig. 9 The flowchart of obtaining motion information based on binarization information on the decoder side is schematically shown.

[0098] Fig.10 The invention schematically shows a device for binarizing a motion information index in an inter-frame skip mode or an inter-frame direct mode.

[0099] Fig.11 The invention schematically shows an apparatus for obtaining motion information based on binarization information of a motion information index in an inter-frame skip mode or an inter-frame direct mode. DETAILED DESCRIPTION

[0100] The specific embodiments of the present invention will be described in detail below. It should be noted that the embodiments described herein are only for illustration and are not intended to limit the present invention. In the following description, a large number of specific details are set forth in order to provide a thorough understanding of the present invention. However, it is obvious to those of ordinary skill in the art that these specific details do not have to be used to implement the present invention. In other examples, in order to avoid confusing the present invention, known circuits, materials or methods are not specifically described.

[0101] Throughout the specification, references to "one embodiment", "an embodiment", "an example" or "an example" mean that a particular feature, structure or characteristic described in conjunction with the embodiment or example is included in at least one embodiment of the present invention. Therefore, the phrases "in one embodiment", "in an embodiment", "an example" or "an example" that appear in various places throughout the specification do not necessarily refer to the same embodiment or example. In addition, particular features, structures or characteristics may be combined in one or more embodiments or examples in any appropriate combination and / or sub-combination. In addition, it should be understood by those of ordinary skill in the art that the drawings provided herein are for illustrative purposes and that the drawings are not necessarily drawn to scale. It should be understood that when an element is said to be "coupled to" or "connected to" another element, it may be directly coupled or connected to another element or there may be an intermediate element. In contrast, when an element is said to be "directly coupled to" or "directly connected to" another element, there is no intermediate element. The same reference numerals indicate the same element. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0102] I. Correspondence between Motion Vector Accuracy and Motion Vector Prediction

[0103] In order to solve the problems existing in motion vector prediction in the prior art, the present invention forms a correspondence between the motion vector accuracy of the variable precision motion vector technology and the motion vector prediction in the motion vector prediction list based on historical information, thereby not only eliminating the overhead brought by indicating the motion vector prediction, but also adding more candidate values ​​compared to the motion vector prediction of only temporally and spatially adjacent blocks, which can effectively reduce the value of the motion vector difference, thereby improving the encoding performance.

[0104] The corresponding relationship between the motion vector accuracy of the variable precision motion vector technology (hereinafter referred to as motion vector accuracy) and the motion vector prediction in the motion vector prediction list based on historical information can be diversified. Not only can it correspond to the motion vector prediction in the motion vector prediction list based on historical information, but it can also correspond to the motion vector accuracy as a whole by introducing other motion vector predictions. Various corresponding relationships are exemplarily described below with reference to the accompanying drawings.

[0105] Motion vector accuracy only corresponds to the motion vector prediction in the motion vector prediction list based on historical information

[0106] Figure 1a and Figure 1b , shows the case where the motion vector accuracy according to an embodiment of the present invention corresponds only to the motion vector prediction in the motion vector prediction list based on historical information. The motion vector accuracy and the preset motion vector accuracy are agreed upon by the codec or specified in the codec standard, and a possible agreement is one-sixteenth pixel, one-eighth pixel, one-quarter pixel, one-half pixel, whole pixel, double pixel, four pixel, eight pixel, sixteen pixel, or other pixel accuracy of a power of two.

[0107] In this case, the first motion vector accuracy may correspond to the last motion vector prediction in the motion vector prediction list based on historical information, the second motion vector accuracy may correspond to the second to last motion vector prediction in the motion vector prediction list based on historical information, and so on. However, those skilled in the art should understand that this correspondence between motion vector accuracy and motion vector prediction is only listed for the purpose of convenience of illustration and description.

[0108] Alternatively, the first motion vector accuracy may correspond to the first motion vector prediction in the motion vector prediction list based on historical information, the second motion vector accuracy may correspond to the second motion vector prediction in the motion vector prediction list based on historical information, and so on.

[0109] Alternatively, the motion vector accuracy may correspond to the motion vector prediction in the motion vector prediction list based on the historical information in another correspondence relationship different from any of the above correspondence relationships.

[0110] For ease of description, in this example, it is assumed that the number of motion vector precisions is N, and the number of motion vector predictions in the motion vector prediction list based on historical information is M.

[0111] Figure 1a The corresponding diagram of the motion vector accuracy and the motion vector prediction in the motion vector prediction list based on historical information is exemplarily shown when M is greater than or equal to N. As shown, the first motion vector accuracy corresponds to the Mth motion vector prediction in the motion vector prediction list based on historical information, the second motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information... The Nth motion vector accuracy corresponds to the M-N+1th motion vector prediction in the motion vector prediction list based on historical information. At this time, for each motion vector accuracy, there is a corresponding motion vector prediction in the motion vector prediction list based on historical information.

[0112] Figure 1b The correspondence diagram of the motion vector accuracy and the motion vector prediction in the motion vector prediction list based on historical information is exemplarily shown when M is less than N. As shown, the first motion vector accuracy corresponds to the Mth motion vector prediction in the motion vector prediction list based on historical information, the second motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information... The Mth motion vector accuracy corresponds to the first motion vector prediction in the motion vector prediction list based on historical information.

[0113] At this time, for the M+1th to Nth motion vector accuracies, one of the following settings may be adopted:

[0114] (1) First setting: The M+1th to Nth motion vector accuracies all correspond to a certain motion vector prediction in the motion vector prediction list based on historical information. For example, the M+1th to Nth motion vector accuracies all correspond to the Mth motion vector prediction in the motion vector prediction list based on historical information.

[0115] (2) The second setting: the M+1th motion vector accuracy corresponds to the Mth motion vector prediction in the motion vector prediction list based on historical information, the M+2th motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information, and so on. When 2M≥N, at this time, for each motion vector accuracy, there is a corresponding motion vector prediction in the motion vector prediction list based on historical information. When 2M<N, the motion vector accuracy from 2M+1 to N is corresponded in the same manner as the motion vector accuracy from M+1 to 2M, and so on, until all motion vector accuracy correspond to the motion vector prediction in the motion vector prediction list based on historical information.

[0116] (3) The third setting: the M+1th to Nth motion vector precisions do not correspond to any motion vector prediction.

[0117] For any of the above-mentioned corresponding methods, there may be such a restriction: if the current motion vector prediction has appeared in the motion vector prediction that has been matched, the current motion vector prediction is skipped, and the current motion vector accuracy is matched with the next candidate motion vector prediction that meets the restriction in the above-mentioned corresponding order. For example, if the second motion vector accuracy is matched with the M-1th motion vector prediction in the motion vector prediction list based on historical information, and it is found that the M-1th motion vector prediction is completely consistent with the Mth motion vector prediction, then the M-1th motion vector prediction is skipped, and the second motion vector accuracy is matched with the M-2th motion vector prediction. If the M-2th motion vector prediction is still completely consistent with the Mth motion vector prediction, the matching is continued downward until a motion vector prediction inconsistent with the Mth motion vector prediction is found.

[0118] If there are no candidate motion vector predictions that meet the restriction in the motion vector prediction list based on historical information, the remaining uncorrelated motion vector accuracies can be corresponded to a motion vector prediction in the motion vector prediction list based on historical information. For example, the 2nd to Nth motion vector accuracies are all corresponded to the Mth motion vector prediction.

[0119] The motion vector accuracy corresponds to the unique motion vector prediction obtained by the unique motion vector prediction technique and the motion vector prediction in the motion vector prediction list based on historical information

[0120] Figure 2a to Figure 2d, the motion vector accuracy according to an embodiment of the present invention corresponds to the unique motion vector prediction obtained by the unique motion vector prediction technology and the motion vector prediction in the motion vector prediction list based on the historical information. The motion vector accuracy and the preset motion vector accuracy are agreed upon by the codec or specified in the codec standard. One possible agreement is one-sixteenth pixel, one-eighth pixel, one-quarter pixel, one-half pixel, whole pixel, double pixel, four pixels, eight pixels, sixteen pixels or other pixel accuracy of a power of two.

[0121] In this case, the first motion vector accuracy may correspond to the only motion vector prediction, the second motion vector accuracy may correspond to the last motion vector prediction in the motion vector prediction list based on historical information, the third motion vector accuracy may correspond to the second to last motion vector prediction in the motion vector prediction list based on historical information, and so on, until all motion vector accuracy have corresponding motion vector predictions. However, those skilled in the art should understand that this correspondence between motion vector accuracy and motion vector prediction is only listed for the purpose of convenience of illustration and description.

[0122] Alternatively, the last motion vector accuracy may correspond to a unique motion vector prediction.

[0123] Alternatively, the first motion vector accuracy may correspond to the first motion vector prediction in the motion vector prediction list based on historical information, the second motion vector accuracy may correspond to the second motion vector prediction in the motion vector prediction list based on historical information, and so on.

[0124] Alternatively, the motion vector accuracy may correspond to the motion vector prediction in the motion vector prediction list based on the historical information in another correspondence relationship different from any of the above correspondence relationships.

[0125] For ease of description, in this example, it is assumed that the number of motion vector precisions is N, and the number of motion vector predictions in the motion vector prediction list based on historical information is M.

[0126] Figure 2a and Figure 2b The corresponding diagram is shown when the 1st motion vector accuracy corresponds to the unique motion vector prediction.

[0127] in, Figure 2aThe corresponding diagram of the motion vector accuracy and the unique motion vector prediction obtained by the unique motion vector prediction technology and the motion vector prediction in the motion vector prediction list based on historical information when M+1 is greater than or equal to N is shown as an example. As shown, the first motion vector accuracy can correspond to the unique motion vector prediction, the second motion vector accuracy can correspond to the Mth motion vector prediction in the motion vector prediction list based on historical information, the third motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information... The Nth motion vector accuracy corresponds to the M-N+2th motion vector prediction in the motion vector prediction list based on historical information. At this time, for each motion vector accuracy, there is a corresponding motion vector prediction in the motion vector prediction list based on historical information.

[0128] Figure 2b The corresponding diagram of the motion vector accuracy and the unique motion vector prediction obtained by the unique motion vector prediction technology and the motion vector prediction in the motion vector prediction list based on historical information is exemplarily shown when M+1 is less than N. As shown, the first motion vector accuracy corresponds to the unique motion vector prediction, the second motion vector accuracy corresponds to the Mth motion vector prediction in the motion vector prediction list based on historical information, the third motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information... The M+1th motion vector accuracy corresponds to the first motion vector prediction in the motion vector prediction list based on historical information.

[0129] At this time, for the M+2th to Nth motion vector precisions, one of the following settings may be adopted:

[0130] (1) The first setting: the M+2th to Nth motion vector accuracies all correspond to a certain motion vector prediction in the motion vector prediction list based on historical information. For example, the M+2th to Nth motion vector accuracies all correspond to the Mth motion vector prediction in the motion vector prediction list based on historical information.

[0131] (2) The second setting: the M+2th to Nth motion vector accuracies all correspond to the unique motion vector prediction.

[0132] (3) The third setting: the M+2th motion vector accuracy corresponds to the Mth motion vector prediction in the motion vector prediction list based on historical information, the M+3th motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information, and so on. When 2M+1≥N, at this time, for each motion vector accuracy, there is a corresponding motion vector prediction in the motion vector prediction list based on historical information. When 2M+1<N, the motion vector accuracy from 2M+2 to N is corresponded in the same manner as the motion vector accuracy from M+2 to 2M+1, and so on, until all motion vector accuracy correspond to the motion vector prediction in the motion vector prediction list based on historical information.

[0133] (4) The fourth setting: the M+2th to Nth motion vector precisions do not correspond to any motion vector prediction.

[0134] For any of the above-mentioned corresponding methods, there may be such a restriction: if the current motion vector prediction has appeared in the motion vector prediction that has been matched, the current motion vector prediction is skipped, and the current motion vector accuracy is matched with the next candidate motion vector prediction that meets the restriction in the above-mentioned corresponding order. For example, if the third motion vector accuracy is matched with the M-1th motion vector prediction in the motion vector prediction list based on historical information, and it is found that the M-1th motion vector prediction is completely consistent with the Mth motion vector prediction, then the M-1th motion vector prediction is skipped, and the third motion vector accuracy is matched with the M-2th motion vector prediction. If the M-2th motion vector prediction is still completely consistent with the Mth motion vector prediction, the matching is continued downward until a motion vector prediction inconsistent with the Mth motion vector prediction is found.

[0135] If there are no candidate motion vector predictions that meet the restriction in the motion vector prediction list based on historical information, the remaining uncorrelated motion vector accuracies can be corresponded to a motion vector prediction in the motion vector prediction list based on historical information. For example, the 3rd to Nth motion vector accuracies are all corresponded to the Mth motion vector prediction.

[0136] Alternatively, if there are no candidate motion vector predictions that meet the restriction in the motion vector prediction list based on historical information, the remaining uncorrelated motion vector accuracies may all be corresponded to the unique motion vector prediction.

[0137] Figure 2c and Figure 2d The corresponding diagram is shown for the case when the last motion vector accuracy corresponds to a unique motion vector prediction.

[0138] in, Figure 2cThe corresponding diagram of the motion vector accuracy and the unique motion vector prediction obtained by the unique motion vector prediction technology and the motion vector prediction in the motion vector prediction list based on historical information is exemplarily shown when M+1 is greater than or equal to N. As shown, the last motion vector accuracy can correspond to the unique motion vector prediction, the first motion vector accuracy can correspond to the Mth motion vector prediction in the motion vector prediction list based on historical information, the second motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information, and so on. At this time, for each motion vector accuracy, there is a corresponding motion vector prediction in the motion vector prediction list based on historical information.

[0139] Figure 2d The corresponding diagram of the motion vector accuracy and the unique motion vector prediction obtained via the unique motion vector prediction technology and the motion vector prediction in the motion vector prediction list based on historical information is exemplarily shown when M+1 is less than N. As shown, the last motion vector accuracy corresponds to the unique motion vector prediction, the first motion vector accuracy corresponds to the Mth motion vector prediction in the motion vector prediction list based on historical information, the second motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information... The Mth motion vector accuracy corresponds to the first motion vector prediction in the motion vector prediction list based on historical information.

[0140] At this time, for the M+1th to N-1th motion vector accuracies, one of the following settings may be used:

[0141] (1) The first setting: the M+1th to N-1th motion vector accuracies all correspond to a certain motion vector prediction in the motion vector prediction list based on historical information. For example, the M+1th to N-1th motion vector accuracies all correspond to the Mth motion vector prediction in the motion vector prediction list based on historical information.

[0142] (2) The second setting: the M+1th to N-1th motion vector accuracies all correspond to unique motion vector predictions.

[0143] (3) The third setting: the M+1th motion vector accuracy corresponds to the Mth motion vector prediction in the motion vector prediction list based on historical information, the M+2th motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information, and so on. When 2M+1≥N, at this time, for each motion vector accuracy, there is a corresponding motion vector prediction in the motion vector prediction list based on historical information. When 2M+1

[0144] When <N, the motion vector accuracy from 2M+2 to N-1 will be corresponded in the same way as the motion vector accuracy from M+1 to 2M+1, and so on, until all motion vector accuracy correspond to the motion vector prediction in the motion vector prediction list based on historical information.

[0145] (4) The fourth setting: the M+1th to Nth motion vector precisions do not correspond to any motion vector prediction.

[0146] For any of the above-mentioned corresponding methods, there may be such a restriction: if the current motion vector prediction has appeared in the motion vector prediction that has been matched, the current motion vector prediction is skipped, and the current motion vector accuracy is matched with the next candidate motion vector prediction that meets the restriction in the above-mentioned corresponding order. For example, if the second motion vector accuracy is matched with the Mth motion vector prediction in the motion vector prediction list based on historical information, and it is found that the M-1th motion vector prediction is completely consistent with the Mth motion vector prediction, then the M-1th motion vector prediction is skipped, and the second motion vector accuracy is matched with the M-2th motion vector prediction. If the M-2th motion vector prediction is still completely consistent with the Mth motion vector prediction, the matching is continued downward until a motion vector prediction inconsistent with the Mth motion vector prediction is found.

[0147] If there are no candidate motion vector predictions that meet the restriction in the motion vector prediction list based on historical information, the remaining uncorrelated motion vector accuracies can be corresponded to a motion vector prediction in the motion vector prediction list based on historical information. For example, the 2nd to N-1th motion vector accuracies all correspond to the Mth motion vector prediction.

[0148] Alternatively, if there are no candidate motion vector predictions that meet the restriction in the motion vector prediction list based on historical information, the remaining uncorrelated motion vector accuracies may all be corresponded to the unique motion vector prediction.

[0149] The motion vector accuracy corresponds to the motion vector prediction in the spatial candidate list, the temporal candidate list, and the motion vector prediction list based on historical information

[0150] Figure 3a and Figure 3b2 shows the motion vector accuracy and the motion vector prediction in the spatial candidate list, the temporal candidate list, and the motion vector prediction list based on historical information according to an embodiment of the present invention. The motion vector accuracy and the preset motion vector accuracy are agreed upon by the codec or specified in the codec standard. One possible agreement is one-sixteenth pixel, one-eighth pixel, one-quarter pixel, one-half pixel, integer pixel, double pixel, four pixels, eight pixels, sixteen pixels, or other power-of-two pixel accuracy.

[0151] In this case, the motion vector accuracies in the first half are first matched with the motion vector predictions in the spatial candidate list and the temporal candidate list, and the specific matching method is not limited in the present invention. Then, the motion vector accuracies in the second half that are not matched with the motion vector predictions in the spatial candidate list and the temporal candidate list are matched with the motion vector predictions in the motion vector prediction list based on historical information. The number of motion vector accuracies in the first half can be the same as or different from the number of motion vector predictions in the spatial candidate list and the temporal candidate list. For example, Figure 3a As shown, the number of motion vector accuracies is N, the number of motion vector predictions corresponding to the motion vector accuracies in the spatial candidate list and the temporal candidate list is K (K < N), and the number of motion vector predictions in the motion vector prediction list based on historical information is M. At this time, the 1st to Kth motion vector prediction accuracies correspond to the motion vector predictions in the K spatial candidate list and the temporal candidate list, and the K+1th to Nth correspond to the motion vector predictions in the M motion vector prediction lists based on historical information.

[0152] The present invention does not limit the case where the 1st to Kth motion vector prediction accuracies correspond to the motion vector predictions in the K spatial candidate lists and the temporal candidate lists.

[0153] Regarding the case where the K+1th to Nth motion vector predictions correspond to the M motion vector prediction lists based on historical information, the K+1th motion vector accuracy can be used to correspond to the Mth motion vector prediction in the motion vector prediction list based on historical information, the K+2th motion vector accuracy can be used to correspond to the M-1th motion vector prediction in the motion vector prediction list based on historical information, and so on.

[0154] When NK≤M, the Nth motion vector accuracy corresponds to the M+1+KNth motion vector prediction in the motion vector prediction list based on historical information. At this time, the N motion vector accuracy has a corresponding motion vector prediction (such as Figure 3aWhen NK>M, the K+Mth corresponds to the first motion vector prediction in the motion vector prediction list based on historical information, and for the K+M+1th to Nth motion vector accuracies, one of the following settings can be used:

[0155] (1) The first setting: The K+M+1th to Nth motion vector accuracies all correspond to a certain motion vector prediction in the motion vector prediction list based on historical information. For example, the K+M+1th to Nth motion vector accuracies all correspond to the Mth motion vector prediction in the motion vector prediction list based on historical information.

[0156] (2) The second setting: the K+M+1th motion vector accuracy corresponds to the Mth motion vector prediction in the motion vector prediction list based on historical information, the K+M+2th motion vector accuracy corresponds to the M-1th motion vector prediction in the motion vector prediction list based on historical information, and so on, until all motion vector accuracy correspond to the motion vector prediction in the motion vector prediction list based on historical information.

[0157] (3) The third setting: the K+M+1th to Nth motion vector precisions do not correspond to any motion vector prediction.

[0158] For any of the above-mentioned corresponding methods, there may be such a restriction: if the current motion vector prediction has appeared in the motion vector prediction that has been matched, the current motion vector prediction is skipped, and the current motion vector accuracy is matched with the next candidate motion vector prediction that meets the restriction in the above-mentioned corresponding order. For example, if the K+2th motion vector accuracy is matched with the Mth motion vector prediction in the motion vector prediction list based on historical information, and it is found that the M-1th motion vector prediction is completely consistent with the Mth motion vector prediction, then the M-1th motion vector prediction is skipped, and the K+2th motion vector accuracy is matched with the M-2th motion vector prediction. If the M-2th motion vector prediction is still completely consistent with the Mth motion vector prediction, the matching is continued downward until a motion vector prediction inconsistent with the Mth motion vector prediction is found.

[0159] If there are no candidate motion vector predictions that meet the restriction in the motion vector prediction list based on historical information, the remaining uncorrelated motion vector accuracies can be corresponded to a certain motion vector prediction in the motion vector prediction list based on historical information. For example, motion vector accuracies from K+2 to N correspond to the M motion vector prediction.

[0160] Please note that the above correspondence between the motion vector prediction accuracy and each motion vector prediction is only listed for the purpose of convenience of illustration and description. Other motion vector predictions can also be introduced, which correspond to the motion vector accuracy as a whole with the motion vector prediction in the motion vector prediction list based on historical information.

[0161] II. Motion Vector Information Coding Method

[0162] The first embodiment of the motion vector information encoding method

[0163] According to the above correspondence method between motion vector accuracy and motion vector prediction, the present application provides a method for encoding motion vector information in video encoding and decoding.

[0164] Figure 4 FIG. 4 is a flowchart 400 of a first embodiment of encoding motion vector information based on the above-mentioned method of corresponding between motion vector accuracy and motion vector prediction.

[0165] In step 401, motion vector accuracy, motion vector prediction and motion vector difference are determined.

[0166] Regarding the method for determining motion vector accuracy, motion vector prediction, and motion vector difference, in one example, the encoder may traverse all candidate motion vector accuracy, and for each motion vector accuracy, find the corresponding motion vector prediction according to the above-mentioned method of corresponding motion vector accuracy and motion vector prediction.

[0167] Afterwards, for example, the optimal motion vector value under the determined motion vector precision can be determined by a motion search method, and the motion vector difference is calculated based on the optimal motion vector value under the motion vector precision and the motion vector prediction corresponding to the motion vector precision. At this time, there are multiple motion vector differences under multiple different motion vector precisions. Then, the coding costs required for encoding the current block using the optimal motion vector values ​​under different motion vector precisions are compared, so as to determine the optimal combination of motion vector precision and motion vector prediction and the motion vector difference under the optimal motion vector precision.

[0168] Regarding the method for determining motion vector accuracy, motion vector prediction, and motion vector difference, alternatively, in another example, the encoder may traverse all candidate motion vector values, determine the optimal combination of motion vector accuracy and motion vector prediction for each motion vector value, and then compare the encoding costs required for encoding the motion vector values ​​under their respective optimal motion vector accuracies, thereby determining the optimal combination of motion vector accuracy and motion vector prediction and the motion vector difference under this accuracy.

[0169] Among them, the accuracy of the candidate motion vector in step 401 is jointly agreed upon by the codec or specified in the encoding / decoding standard, and the accuracy of the candidate motion vector can be agreed upon as one-sixteenth pixel, one-eighth pixel, one-quarter pixel, half pixel, integer pixel, double pixel, four pixels, eight pixels, sixteen pixels or other pixel accuracy of a power of 2.

[0170] In step 402, the determined optimal motion vector accuracy and the motion vector difference information at the accuracy are written into the bitstream.

[0171] The optimal motion vector accuracy information can be written into the bitstream in the form of an index value, for example, and the motion vector difference information at this accuracy can be written into the bitstream using any existing motion vector difference encoding method.

[0172] Optionally, prediction direction information may be written into the bitstream as required. For the method of determining the prediction direction, one of the following methods may be used:

[0173] (1) Regardless of whether the prediction direction of the motion vector prediction refers to only the first reference frame list, only the second reference frame list, or both reference frame lists, the encoder tries these three directions, that is, the optional range of the prediction direction is these three directions.

[0174] (2) If the prediction direction of the motion vector prediction is to refer only to the first reference frame list, only to the second reference frame list, or to refer to one of the two reference frame lists, the encoder only tries the referenced direction.

[0175] (3) If the prediction direction of the motion vector prediction is to refer only to the first reference frame list or only to the second reference frame list, the encoder only tries that direction.

[0176] (4) If the prediction direction of motion vector prediction is to refer to two reference frame lists, the encoder tries these three directions.

[0177] Those skilled in the art should understand that the above prediction direction determination method is only listed as an example for the purpose of illustration and description, and any existing known or future developed new determination method may be adopted.

[0178] Optionally, reference frame information may be written into the bitstream as required. For the method of determining the reference frame, one of the following methods may be used:

[0179] (1) The encoder may traverse all reference frames in the reference frame list of the current prediction direction. The prediction value of the motion vector prediction in the reference frame is obtained by scaling the value of the motion vector prediction, and the present invention does not limit the scaling method.

[0180] (2) The encoder only attempts motion vector prediction for reference frames corresponding to the determined prediction direction.

[0181] Those skilled in the art should understand that the above reference frame determination method is only listed as an example for the purpose of illustration and description, and any existing known or future developed new determination method may be adopted.

[0182] Regarding the prediction direction information, whether to transmit the prediction direction information may be agreed upon by the codec or specified by the codec standard.

[0183] In an example, it may be stipulated that: no matter what the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is, the prediction direction information needs to be transmitted in the bitstream.

[0184] In one example, it can be stipulated that no matter what the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is, it is not necessary to transmit the prediction direction information in the bitstream, but it is assumed by default that the prediction direction is the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy.

[0185] In one example, it can be stipulated that: if the prediction direction of the motion vector prediction corresponding to the motion vector accuracy refers to only the first reference frame list or only the second reference frame list, it is not necessary to transmit the prediction direction information in the bitstream, but it is assumed by default that the prediction direction is the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy. If the prediction direction of the motion vector prediction corresponding to the motion vector accuracy refers to two reference frame lists, it is necessary to transmit the prediction direction information in the bitstream.

[0186] If it is determined that the prediction direction information needs to be transmitted in the bitstream, the prediction direction information may be encoded into the bitstream using any existing encoding method for the prediction direction information.

[0187] For reference frame information, whether to transmit the reference frame information may be agreed upon by the codec or specified by the codec standard.

[0188] In one example, it may be stipulated that: no matter what the reference frame of the motion vector prediction corresponding to the motion vector accuracy is, the reference frame information needs to be transmitted in the bitstream.

[0189] In one example, it can be stipulated that no matter what the reference frame of the motion vector prediction corresponding to the motion vector accuracy is, it is not necessary to transmit the reference frame information in the bitstream, but it is assumed by default that the reference frame is the same as the reference frame of the motion vector prediction corresponding to the motion vector accuracy.

[0190] In one example, it can be stipulated that: if the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is to refer only to the first reference frame list or only to the second reference frame list, it is not necessary to transmit the reference frame information in the bitstream, but it is assumed by default that the reference frame is the same as the reference frame of the motion vector prediction corresponding to the motion vector accuracy. If the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is to refer to two reference frame lists, it is necessary to transmit the reference frame information in the bitstream.

[0191] If it is determined that the reference frame information is to be transmitted in the bitstream, any existing reference frame information encoding method may be used to encode the reference frame information.

[0192] The second embodiment of the motion vector information encoding method

[0193] Figure 5 A flow chart 500 of a second embodiment of encoding motion vector information is shown in FIG.

[0194] In step 501, a motion vector prediction mode, a motion vector accuracy, a motion vector prediction and a motion vector difference are determined.

[0195] There are two types of motion vector prediction modes, one is not using the correspondence between motion vector prediction and motion vector accuracy, and the other is using the correspondence between motion vector prediction and motion vector accuracy.

[0196] The method for determining the motion vector prediction mode may be: the encoder attempts to obtain the coding cost of the current block in a mode that does not use the correspondence between the motion vector prediction and the motion vector accuracy, and the encoder attempts to obtain the coding cost of the current block in a mode that uses the correspondence between the motion vector prediction and the motion vector accuracy. The encoder compares the coding costs in the two modes and selects the mode with the smaller coding cost as the optimal motion vector prediction mode.

[0197] In a mode where the correspondence between the motion vector prediction and the motion vector accuracy is not used, the method of determining the motion vector accuracy, the motion vector prediction, and the motion vector difference may use any existing method.

[0198] In the mode of using the correspondence between motion vector prediction and motion vector accuracy, a possible implementation method for determining motion vector accuracy, motion vector prediction and motion vector difference is as follows: the encoder traverses all candidate motion vector accuracy, and for each motion vector accuracy, finds the corresponding motion vector prediction according to the above motion vector accuracy and motion vector prediction correspondence method. The optimal motion vector under the accuracy is determined by the motion search method and the motion vector difference is calculated, and then the encoding cost of encoding the current block using the optimal motion vector under different accuracy is compared, so as to determine the optimal combination of motion vector accuracy and motion vector prediction and the motion vector difference under the accuracy.

[0199] Another possible implementation method is that the encoder traverses all candidate motion vector values, determines the optimal combination of accuracy and motion vector prediction for each motion vector value, and then compares the encoding costs of encoding the motion vectors under their respective optimal motion vector accuracies, so as to determine the optimal combination of motion vector accuracy and motion vector prediction and the motion vector difference under this accuracy.

[0200] Among them, the accuracy of the candidate motion vector in step 501 is jointly agreed upon by the codec or specified in the encoding / decoding standard, and the accuracy of the candidate motion vector can be agreed upon as one-sixteenth pixel, one-eighth pixel, one-quarter pixel, half pixel, integer pixel, double pixel, four pixels, eight pixels, sixteen pixels or other pixel accuracy of a power of 2.

[0201] In step 502, the determined motion vector prediction mode, motion vector accuracy information, motion vector prediction (if necessary) and optimal motion vector difference information are written into the bitstream.

[0202] The motion vector prediction mode information can be written into the bitstream in the form of one-bit flag information.

[0203] One possible method is that if the motion vector prediction mode is not to use the correspondence between motion vector prediction and motion vector accuracy, the flag information is set to "0", otherwise it is set to "1".

[0204] Another possible method is that if the motion vector prediction mode is not to use the correspondence between motion vector prediction and motion vector accuracy, the flag information is set to "1", otherwise it is set to "0".

[0205] Motion vector accuracy information can be written into the bitstream in the form of index values, and the optimal motion vector difference information can be written into the bitstream using any existing motion vector difference encoding method. If the motion vector prediction mode is a mode that does not use the correspondence between motion vector prediction and motion vector accuracy and the motion vector prediction agreed by the codec is not unique, the motion vector prediction information needs to be transmitted in the bitstream, and the motion vector prediction information can be written into the bitstream using any existing motion vector prediction encoding method.

[0206] Optionally, prediction direction information may be written into the bitstream as required. For the method of determining the prediction direction, in the mode of using the correspondence between motion vector prediction and motion vector accuracy, one of the following methods may be used:

[0207] (1) Regardless of whether the prediction direction of the motion vector prediction refers to only the first reference frame list, only the second reference frame list, or both reference frame lists, the encoder tries these three directions, that is, the optional range of the prediction direction is these three directions.

[0208] (2) If the prediction direction of the motion vector prediction is to refer only to the first reference frame list, only to the second reference frame list, or to refer to one of the two reference frame lists, the encoder only tries the referenced direction.

[0209] (3) If the prediction direction of the motion vector prediction is to refer only to the first reference frame list or only to the second reference frame list, the encoder only tries that direction.

[0210] (4) If the prediction direction of motion vector prediction is to refer to two reference frame lists, the encoder tries these three directions.

[0211] Those skilled in the art should understand that the above prediction direction determination method is only listed as an example for the purpose of illustration and description, and any existing known or future developed new determination method may be adopted.

[0212] The method of determining the prediction direction in a mode in which the correspondence between the motion vector prediction and the motion vector accuracy is not used is not described again in order to obscure the present inventive concept.

[0213] Optionally, reference frame information may be written into the bitstream as required. As for the method for determining the reference frame, in the mode of using the correspondence between motion vector prediction and motion vector accuracy, one of the following methods may be used:

[0214] (1) The encoder may traverse all reference frames in the reference frame list of the current prediction direction. The prediction value of the motion vector prediction in the reference frame is obtained by scaling the value of the motion vector prediction, and the present invention does not limit the scaling method.

[0215] (2) The encoder only attempts motion vector prediction for reference frames corresponding to the determined prediction direction.

[0216] Those skilled in the art should understand that the above reference frame determination method is only listed as an example for the purpose of illustration and description, and any existing known or future developed new determination method may be adopted.

[0217] The method of determining a reference frame in a mode in which the correspondence between motion vector prediction and motion vector accuracy is not used is not described again in order to obscure the concept of the present invention.

[0218] In the mode using the correspondence between motion vector prediction and motion vector accuracy, for prediction direction information, whether to transmit the prediction direction information may be agreed upon by codecs or specified by a codec standard.

[0219] In one example, it may be stipulated that: in a mode using the correspondence between motion vector prediction and motion vector accuracy, prediction direction information needs to be transmitted in the bitstream regardless of the prediction direction of the motion vector prediction corresponding to the motion vector accuracy.

[0220] In one example, it can be stipulated that: in a mode using the correspondence between motion vector prediction and motion vector accuracy, no matter what the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is, it is not necessary to transmit the prediction direction information in the bit stream, but it is defaulted that the prediction direction is the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy.

[0221] In one example, it may be specified that: in a mode using the correspondence between motion vector prediction and motion vector accuracy, if the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is to refer only to the first reference frame list or only to the second reference frame list, it is not necessary to transmit the prediction direction information in the bitstream, but it is assumed by default that the prediction direction is the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy. If the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is to refer to two reference frame lists, it is necessary to transmit the prediction direction information in the bitstream.

[0222] If it is determined that the prediction direction information needs to be transmitted in the bitstream, the prediction direction information may be encoded into the bitstream using any existing encoding method for the prediction direction information.

[0223] In the mode using the correspondence between motion vector prediction and motion vector accuracy, for reference frame information, whether to transmit the reference frame information may be agreed upon by the codec or specified by the codec standard.

[0224] In one example, it may be stipulated that: in a mode using the correspondence between motion vector prediction and motion vector accuracy, reference frame information needs to be transmitted in the bitstream regardless of the reference frame of the motion vector prediction corresponding to the motion vector accuracy.

[0225] In one example, it can be stipulated that: in a mode using the correspondence between motion vector prediction and motion vector accuracy, no matter what the reference frame of the motion vector prediction corresponding to the motion vector accuracy is, it is not necessary to transmit the reference frame information in the bitstream, but it is defaulted that the reference frame is the same as the reference frame of the motion vector prediction corresponding to the motion vector accuracy.

[0226] In one example, it may be specified that: in a mode using the correspondence between motion vector prediction and motion vector accuracy, if the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is to refer only to the first reference frame list or only to the second reference frame list, it is not necessary to transmit the reference frame information in the bitstream, but it is assumed by default that the reference frame is the same as the reference frame of the motion vector prediction corresponding to the motion vector accuracy. If the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is to refer to two reference frame lists, it is necessary to transmit the reference frame information in the bitstream.

[0227] If it is determined that the reference frame information is to be transmitted in the bitstream, any existing reference frame information encoding method may be used to encode the reference frame information.

[0228] III. Motion Vector Information Decoding Method

[0229] ·The first embodiment of the motion vector information decoding method

[0230] Corresponding to the above-mentioned motion vector information encoding method based on the correspondence method between the above-mentioned motion vector accuracy and motion vector prediction provided in the present application, the present application proposes a motion vector information decoding method. Figure 6 FIG. 6 schematically shows a flowchart 600 of a first embodiment of decoding motion vector information based on the above-mentioned method for corresponding motion vector accuracy and motion vector prediction.

[0231] At step 601: the motion vector accuracy information and the motion vector difference information are parsed from the code stream, and the motion vector accuracy, the motion vector prediction and the motion vector difference under the motion vector accuracy are determined.

[0232] Specifically, a possible method for parsing the motion vector precision information is to parse and obtain a motion vector precision index value and determine the motion vector precision based on the index.

[0233] Specifically, a method for determining the motion vector prediction may be to determine the motion vector prediction according to the determined motion vector accuracy and the above-mentioned method for corresponding the motion vector accuracy and the motion vector prediction.

[0234] The method for parsing the motion vector difference information may be to use any existing motion vector difference parsing method.

[0235] Optionally, based on the description of the above encoding method, prediction direction information and / or reference frame information (if necessary) may also be obtained by parsing the bitstream.

[0236] Whether the prediction direction information needs to be parsed is agreed upon by the codec or specified by the codec standard.

[0237] In an example, it may be stipulated that: no matter what the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is, the prediction direction information needs to be parsed.

[0238] In one example, it can be stipulated that no matter what the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is, there is no need to parse the prediction direction information, but the prediction direction is set to be the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy by default.

[0239] In one example, it can be stipulated that: if the prediction direction of the motion vector prediction corresponding to the motion vector accuracy refers to only the first reference frame list or only the second reference frame list, it is not necessary to parse the prediction direction information, but the prediction direction is set to be the same as the prediction direction of the motion vector prediction corresponding to the motion vector accuracy by default. If the prediction direction of the motion vector prediction corresponding to the motion vector accuracy refers to two reference frame lists, it is necessary to parse the prediction direction information.

[0240] The method for parsing the prediction direction information may use any existing method for parsing the prediction direction information.

[0241] Whether the reference frame information needs to be parsed is agreed upon by the codec or specified by the codec standard.

[0242] In one example, it may be stipulated that: no matter what the reference frame of the motion vector prediction corresponding to the motion vector accuracy is, the reference frame information needs to be parsed.

[0243] In one example, it can be stipulated that no matter what the reference frame of the motion vector prediction corresponding to the motion vector accuracy is, there is no need to parse the reference frame information, but the reference frame is set to be the same as the reference frame of the motion vector prediction corresponding to the motion vector accuracy by default.

[0244] In one example, it can be stipulated that: if the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is to refer only to the first reference frame list or only to the second reference frame list, it is not necessary to parse the reference frame information, but the reference frame is set to be the same as the reference frame of the motion vector prediction corresponding to the motion vector accuracy by default. If the prediction direction of the motion vector prediction corresponding to the motion vector accuracy is to refer to two reference frame lists, it is necessary to parse the reference frame information.

[0245] The method for parsing the reference frame information may use any existing method for parsing the reference frame information.

[0246] At step 602: a motion vector is derived based on the determined motion vector accuracy, the motion vector prediction and the motion vector difference at the motion vector accuracy.

[0247] Optionally, in the case of parsing the prediction direction and reference frame, the prediction value of the motion vector prediction can be scaled according to the prediction direction, reference frame and prediction direction and reference frame of the motion vector prediction, and the scaling method is not limited by the present invention.

[0248] The motion vector difference at the current motion vector precision is scaled to obtain the motion vector difference at the reference motion vector precision.

[0249] The motion vector is derived based on the predicted value of the motion vector prediction or a scaling of the predicted value and the motion vector difference under the reference motion vector accuracy.

[0250] Step 603: After the motion vector value is derived, a reference block in the reference frame is obtained according to the motion vector value and a subsequent decoding operation is performed. The specific method is not disclosed and is not limited.

[0251] The second embodiment of the motion vector information decoding method

[0252] The present application also proposes another motion vector information decoding method. Figure 7 Schematically shows a flowchart 700 of the second embodiment for decoding motion vector information. The decoding method exemplarily shown in the flowchart 700 of the second embodiment can be regarded as similar to Figure 5 Corresponding to the encoding method illustrated in .

[0253] At step 701: motion vector prediction mode information, motion vector accuracy information, motion vector prediction information (if necessary) and motion vector difference information are parsed from the bitstream, and the motion vector accuracy, motion vector prediction and motion vector difference under the motion vector accuracy are determined.

[0254] One possible method of parsing the motion vector prediction mode information is that if the flag information of the motion vector prediction mode is "0", the motion vector prediction mode is not using the correspondence between the motion vector prediction and the motion vector accuracy. Otherwise, if the flag information of the motion vector prediction mode is "1", the motion vector prediction mode is using the correspondence between the motion vector prediction and the motion vector accuracy.

[0255] Another possible method of parsing the motion vector prediction mode information is that if the flag information of the motion vector prediction mode is "1", the motion vector prediction mode is not using the correspondence between the motion vector prediction and the motion vector accuracy. Otherwise, if the flag information of the motion vector prediction mode is "0", the motion vector prediction mode is using the correspondence between the motion vector prediction and the motion vector accuracy.

[0256] A possible method for parsing the motion vector precision information is to parse and obtain the motion vector precision index value and determine the motion vector precision based on it.

[0257] If the motion vector prediction mode is a mode that uses the correspondence between the motion vector prediction and the motion vector accuracy, the motion vector prediction is determined according to the determined motion vector accuracy and the correspondence method between the motion vector accuracy and the motion vector prediction. If the motion vector prediction mode is a mode that does not use the correspondence between the motion vector prediction and the motion vector accuracy, and the motion vector prediction agreed upon by the encoder / decoder is not unique, it is necessary to parse the motion vector prediction information. The method for parsing the motion vector prediction information can use any existing motion vector prediction parsing method, and the present invention does not impose any limitation.

[0258] The method for parsing the motion vector difference information may use any existing motion vector difference parsing method.

[0259] Optionally, when the prediction direction information and the reference frame information are written at the encoder, the decoder side may also parse out the prediction direction information and the reference frame information.

[0260] For the prediction direction information and the reference frame information, if the motion vector prediction mode is a mode that uses the correspondence between the motion vector prediction and the motion vector accuracy, whether the prediction direction information and the reference frame information need to be parsed and the parsing method can refer to the content described in step 601. If the motion vector prediction mode is a mode that does not use the correspondence between the motion vector prediction and the motion vector accuracy, the present invention does not limit the parsing of the prediction direction information and the reference frame information.

[0261] At step 702: a motion vector is derived based on the determined motion vector accuracy, the motion vector difference at the current motion vector accuracy, and the motion vector prediction.

[0262] The specific operation of deriving the motion vector according to the determined motion vector accuracy, the motion vector difference under the current motion vector accuracy and the motion vector prediction can refer to the description of step 602.

[0263] At step 703: after the motion vector value is derived, a reference block is obtained according to the motion vector value and a subsequent decoding operation is performed. The specific method is not disclosed and is not limited.

[0264] IV. Binarization of Motion Information Index Value

[0265] In order to solve the above problems existing in the prior art of binary motion information index value technology, the present application proposes a new binary motion information index value method. Figure 8 and Fig. 9 Provide explanation. Figure 8 A flowchart 800 schematically shows a method for binarizing a motion information index in an inter-frame skip mode or an inter-frame direct mode at an encoder side. Fig. 9A flowchart 900 is schematically shown in which the decoder side obtains motion information by decoding binarized information obtained by a binarization method of motion information indexes in inter-frame skip mode or inter-frame direct mode.

[0266] At step 801 , candidate motion information lists are classified into multiple types.

[0267] Specifically, when the candidate motion information list includes a motion vector prediction list based on historical information and a spatial candidate list and a temporal candidate list, a possible implementation method is to classify the temporal and spatial motion information of the surrounding blocks of the current block into one category, and record the value of the type index as "0"; classify the historical motion information into one category, and record the value of the type index as "1".

[0268] One possible implementation is to classify the historical motion information into one category and record the value of the type index as "0"; classify the temporal and spatial motion information of the surrounding blocks of the current block into one category and record the value of the type index as "1".

[0269] At step 802: the value of the type index and the index value of the current motion information in the candidate motion information list type are binarized.

[0270] Specifically, a possible implementation method is to encode the type index value into a fixed length, that is, the value of the type index "0" corresponds to the binary "0", and the value of the type index "1" corresponds to the binary "1"; the index value of the current motion information in the candidate motion information list type is truncated and binarized into a unary code.

[0271] Those skilled in the art should be able to understand that the method for binarizing the type index value and the method for binarizing the index value of the current motion information in the candidate motion information list type may be the same method or different methods.

[0272] There is no limitation on the method of binarizing the type index value and the index value of the current motion information in the candidate motion information list type, and any existing or future developed binarization method can be used.

[0273] At step 803: write the binarization information of the type index and the binarization information of the index value of the current motion information in the candidate motion information list type into the bitstream.

[0274] Fig. 9 A flowchart 900 is schematically shown in which the decoder side obtains motion information by decoding binarized information obtained by a binarization method of motion information indexes in inter-frame skip mode or inter-frame direct mode.

[0275] At step 901: the decoder parses the value of the type index and the index value of the current motion information in the candidate motion information list type from the bitstream.

[0276] Specifically, a possible implementation method is to obtain the value of the type index by using a fixed-length coding debinarization method to obtain the binarized information of the type index in the bitstream; and obtain the value of the index of the current motion information in the candidate motion information list type by using a truncated unary code debinarization method to obtain the value of the index of the current motion information in the candidate motion information list type.

[0277] Those skilled in the art should be able to understand that the method for debinarizing the binarized information of the type index in the bitstream and the binarized information of the index of the current motion information in the bitstream in the candidate motion information list type can be the same method or different methods.

[0278] There is no limitation on the debinarization method, and any existing or future developed binarization method may be used.

[0279] At step 902: the candidate motion information lists are divided into multiple types.

[0280] Specifically, a possible implementation manner is to classify the candidate motion information lists according to the same classification method as that used by the encoder side to classify the candidate motion information lists, so that the classification type obtained is the same as the classification type obtained by the encoder side.

[0281] Specifically, the scaling of the temporal and spatial motion information of the surrounding blocks of the current block is classified into one category, and the value of the type index is recorded as "0"; the historical motion information is classified into one category, and the value of the type index is recorded as "1".

[0282] One possible implementation is to classify the historical motion information into one category and record the value of the type index as "0"; classify the temporal and spatial motion information of the surrounding blocks of the current block into one category and record the value of the type index as "1".

[0283] At step 903: the motion information is determined according to the value of the parsed type index and the index value of the current motion information in the candidate motion information list type.

[0284] Specifically, a possible implementation is to determine the type of the current motion information by the value of the type index, and find the motion information in the determined type by the value of the index of the current motion information in the candidate motion information list type.

[0285] Corresponding to the above-mentioned method for processing binary information on the encoder / decoder side, the present application also proposes a device for executing the method, which will be referred to below. Fig.10 and Fig.11 Provide explanation.

[0286] Fig.10 The apparatus 1000 for binarizing a motion information index in an inter-frame skip mode or an inter-frame direct mode is schematically shown.

[0287] The apparatus 1000 may include a classification unit 1001 , a binarization unit 1002 , and a binarization information writing unit 1003 .

[0288] The classification unit 1001 may be configured to classify the candidate motion vector list into different types.

[0289] Exemplarily, when the candidate motion information list includes a motion vector prediction list based on historical information and a spatial candidate list and a temporal candidate list, a possible implementation method is to classify the temporal and spatial motion information of the surrounding blocks of the current block into one category, and record the value of the type index as "0"; classify the historical motion information into one category, and record the value of the type index as "1".

[0290] One possible implementation is to classify the historical motion information into one category and record the value of the type index as "0"; classify the temporal and spatial motion information of the surrounding blocks of the current block into one category and record the value of the type index as "1".

[0291] The binarization unit 1002 may be configured to binarize the values ​​of the type indexes of the multiple types of candidate motion information lists classified by the classification unit 1001 and the index value of the current motion information in the type of the candidate motion information list.

[0292] Exemplarily, a possible implementation method is to encode the type index value into a fixed length, that is, the value of the type index "0" corresponds to the binary "0", and the value of the type index "1" corresponds to the binary "1"; the index value of the current motion information in the candidate motion information list type is truncated and binarized into a unary code.

[0293] The binarization information writing unit 1003 may be configured to write the binarization result obtained in the binarization unit 1002 into the code stream.

[0294] Specifically, the binarization information writing unit 1003 may write the binarization results of the values ​​of the type indexes of the candidate motion information lists and the index value of the current motion information in the type of the candidate motion information list into the bitstream.

[0295] Fig.11 The apparatus 1100 for obtaining motion information based on indexed information of motion information in inter skip mode or inter direct mode is schematically shown.

[0296] The apparatus 1100 may include a parsing unit 1101 , a classification unit 1102 , and a determination unit 1103 .

[0297] The parsing unit 1101 may be configured to parse the value of the type index in the code stream and the index value of the current motion information in the type of the candidate motion information list.

[0298] Specifically, a possible implementation method is to obtain the value of the type index by using a fixed-length coding debinarization method to obtain the binarized information of the type index in the bitstream; and obtain the value of the index of the current motion information in the candidate motion information list type by using a truncated unary code debinarization method to obtain the value of the index of the current motion information in the candidate motion information list type.

[0299] The classification unit 1102 may be configured to classify the candidate motion vector list into different types.

[0300] Specifically, a possible implementation method is to classify the scaling of the temporal and spatial motion information of the surrounding blocks of the current block into one category, and record the value of the type index as "0"; classify the historical motion information into one category, and record the value of the type index as "1".

[0301] One possible implementation is to classify the historical motion information into one category and record the value of the type index as "0"; classify the temporal and spatial motion information of the surrounding blocks of the current block into one category and record the value of the type index as "1".

[0302] The determining unit 1103 may be configured to determine the motion information according to the value of the parsed type index and the index value of the current motion information in the candidate motion information list type.

[0303] Specifically, a possible implementation is to determine the type of the current motion information by the value of the type index, and find the motion information in the determined type by the value of the index of the current motion information in the candidate motion information list type.

[0304] Each module and unit described above can be realized by software, hardware, firmware or its combination. For example, it can be realized by a computer program including an instruction set maintained in a computer-readable medium. The instruction set is a code for performing the above operations. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transmission of a computer program from one place to another. Storage media can be any available medium that a computer can access. By way of example, and not limitation, such computer-readable media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to transmit or store desired program codes in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technology (for example, infrared, radio and microwave) is used to transmit software from a website, server or other remote source, then coaxial cable, optical fiber cable, twisted pair, DSL or wireless technology (for example, infrared, radio and microwave) are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray TM The disk may be a disk that reproduces data magnetically, where the disk typically reproduces data magnetically, while the disk reproduces data optically via a laser. Thus, in some aspects, computer readable media may include permanent computer readable media (e.g., tangible media). Additionally, in some aspects, computer readable media may include temporary computer readable media (e.g., signals). Combinations of the above should also be included within the scope of computer readable media.

[0305] Although specific embodiments have been described in detail above, the description is for illustrative purposes only. Therefore, it should be understood that many of the above aspects are not intended to be necessary or essential elements unless otherwise explicitly stated. In addition to the above exemplary implementations, without departing from the spirit and scope of the present disclosure as defined in the appended claims, a person of ordinary skill in the art who benefits from the present disclosure may make various corresponding modifications and equivalent operations to the disclosed aspects of the exemplary embodiments, and the scope of the present disclosure should be interpreted in the broadest sense so as to include these modifications and equivalent structures.

Claims

1. A method for encoding motion vector information, the method comprising: include: Selecting a motion vector precision for a current block from among a plurality of motion vector precisions; Obtaining a motion vector prediction corresponding to a motion vector precision for a current block from among M motion vector predictions included in a motion vector prediction list based on history information, where M is an integer; determining a motion vector difference based on the obtained motion vector prediction and a motion vector of the current block; as well as generating a code stream, the code stream including information indicating a motion vector prediction mode using the motion vector precision, information indicating a motion vector precision for a current block, and information indicating the motion vector difference value, Wherein, if the motion vector accuracy for the current block is the nth motion vector accuracy among the plurality of motion vector accuracy and M is greater than or equal to n, the motion vector accuracy for the current block corresponds to the (M-n+1)th motion vector prediction among the M motion vector predictions, and If M is less than n, the motion vector accuracy for the current block corresponds to the Mth motion vector prediction among the M motion vector predictions.

2. A device for encoding motion vector information, the device include: At least one processing unit is configured to: Selecting a motion vector precision for a current block from among a plurality of motion vector precisions; Obtaining a motion vector prediction corresponding to a motion vector precision for a current block from among M motion vector predictions included in a motion vector prediction list based on history information, where M is an integer; determining a motion vector difference based on the obtained motion vector prediction and a motion vector of the current block; as well as generating a code stream, the code stream including information indicating a motion vector prediction mode using the motion vector precision, information indicating a motion vector precision for a current block, and information indicating the motion vector difference value, Wherein, if the motion vector accuracy for the current block is the nth motion vector accuracy among the plurality of motion vector accuracy and M is greater than or equal to n, the motion vector accuracy for the current block corresponds to the (M-n+1)th motion vector prediction among the M motion vector predictions, and If M is less than n, the motion vector accuracy for the current block corresponds to the Mth motion vector prediction among the M motion vector predictions.

3. A method for decoding motion vector information, the method include: Obtaining information indicating a motion vector prediction mode using a motion vector precision from a bitstream; Obtaining information indicating a motion vector precision for a current block among a plurality of motion vector precisions and a motion vector difference from the bitstream; Obtaining a motion vector prediction from among M motion vector predictions included in a motion vector prediction list based on history information, where M is an integer; as well as Determine a motion vector of a current block based on the motion vector difference and the obtained motion vector prediction, Wherein, obtaining the motion vector prediction includes: If the motion vector accuracy for the current block is the nth motion vector accuracy among the plurality of motion vector accuracy and M is greater than or equal to n, obtaining the (M-n+1)th motion vector prediction among the M motion vector predictions, and If M is less than n, the Mth motion vector prediction of the M motion vector predictions is obtained.

4. A device for decoding motion vector information, the device include: At least one processing unit is configured to: Obtaining information indicating a motion vector prediction mode using a motion vector precision from a bitstream; Obtaining information indicating a motion vector precision for a current block among a plurality of motion vector precisions and a motion vector difference from the bitstream; Obtaining a motion vector prediction from among M motion vector predictions included in a motion vector prediction list based on history information, where M is an integer; as well as Determine a motion vector of a current block based on the motion vector difference and the obtained motion vector prediction, Wherein, obtaining the motion vector prediction includes: If the motion vector accuracy for the current block is the nth motion vector accuracy among the plurality of motion vector accuracy and M is greater than or equal to n, obtaining the (M-n+1)th motion vector prediction among the M motion vector predictions, and If M is less than n, the Mth motion vector prediction of the M motion vector predictions is obtained.