Video encoding method, decoding method and terminal
By using the motion vector of adjacent blocks to correct the motion vector of the current image block in the video encoding method, the problem of insufficient precision of the motion vector and large information transmission in the prior art is solved, and the bit rate saving under the same video quality is achieved. Accurate motion vector reconstruction.
Patent Information
- Application Number
- CN202010916417.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-09-30
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2036-09-30
AI Technical Summary
When the existing video encoding method is predicted inter-frame, the motion vector is not accurate enough and the information transmission amount is large, resulting in a high code rate.
By obtaining the predicted motion information of the current image block, using the motion vectors of the adjacent blocks for correction, the correspondence between the motion vector difference and the predicted value is determined, thereby accurately reconstructing the motion vector and saving transmission bits.
While keeping the video quality unchanged, the amount of information to be transmitted is reduced, the bit rate is reduced, and the accuracy of the motion vector is improved.
Smart Images

Figure CN112218073B_ABST
Abstract
Description
[0001] This application is a divisional of a Chinese patent application filed with the China Patent Office on September 30, 2016, with application number 201680089072.5 and application name “Video Coding Method, Decoding Method and Terminal”. All contents of this application are included in the parent case. Technical Field
[0002] The present invention relates to the field of video encoding and decoding, and in particular to a video encoding method, a decoding method and a terminal. Background Art
[0003] The basic principle of video coding compression is to use the correlation between the spatial domain, the temporal domain and the codewords to remove redundancy as much as possible. Among them, the block-based hybrid video coding framework is a more popular approach, which implements video coding compression through intra-frame prediction, inter-frame prediction, transformation, quantization, entropy coding and other steps. Both the Moving Picture Expert Group (MPEG) and the High Efficiency Video Coding (HEVC) standard use this block-based hybrid video coding framework.
[0004] When performing inter-frame prediction, each image block needs to determine its own motion information, so as to generate its prediction block through the motion compensation process. The motion information includes reference image information and motion vector.
[0005] When determining the motion information of the current image block, commonly used methods include Merge Mode and non-merge mode. The merge mode may include the following steps:
[0006] 1. Construct a candidate motion information list, where the candidate motion information in the list is derived from the motion information of neighboring blocks of the current image block in space or time.
[0007] 2. Select one motion information from the candidate motion information list, transmit its index in the list, and specify all motion information of the current image block through this motion information index.
[0008] Since the motion vector in the merge mode completely copies the motion vector of the neighboring block, the motion vector of the current image block is not accurate enough.
[0009] In the non-merge mode, the motion information of the current image block can be determined by the following steps:
[0010] 1. Transmit reference image information, wherein the reference image information includes: unidirectional / bidirectional prediction information, a reference image list, and a reference image index corresponding to the reference image list.
[0011] 2. Construct a list of candidate motion vector prediction values, where the candidate motion vector prediction values in the list are derived from motion information of neighboring blocks of the current image block.
[0012] 3. Select a motion vector prediction value from the candidate motion vector prediction value list, transmit its index in the list, and specify the motion vector prediction value of the current image block through this motion vector prediction value index.
[0013] 4. Transmit the motion vector difference. The motion vector of the current image block is obtained by adding the motion vector difference to the motion vector prediction value.
[0014] In the non-merge mode, reference image information, motion vector prediction value index and corresponding motion vector difference need to be transmitted. The motion information is more accurate, but more information is transmitted and the bit rate is higher. Summary of the invention
[0015] The embodiments of the present invention provide a video encoding method, a decoding method and a terminal, which can reduce the information to be transmitted under the condition of the same video quality, thereby saving a certain amount of transmission bits.
[0016] A first aspect of an embodiment of the present invention discloses a video decoding method, comprising: obtaining an index of predicted motion information of a current image block in a candidate predicted motion information list from a bitstream, wherein the predicted motion information includes reference image information and a motion vector prediction value, and the candidate predicted motion information in the candidate predicted motion information list is motion information of a temporal or spatial domain neighboring block of the current image block; querying the candidate predicted motion information list according to the index, and using the queried candidate predicted motion information as the predicted motion information; determining a correspondence between a motion vector difference and the motion vector prediction value according to the predicted motion information, and obtaining the motion vector difference from the bitstream; and adding the motion vector prediction value to the corresponding motion vector difference according to the correspondence to obtain the motion vector of the current image block.
[0017] In this embodiment, the motion vector difference is used to correct the motion vector prediction value of the current image block, so that the reconstructed motion vector of the current image block is more accurate, and based on the corresponding relationship between the motion vector difference and the motion vector prediction value, the motion vector difference is more effectively determined, saving transmission bits.
[0018] As an optional implementation, determining the correspondence between the motion vector difference and the motion vector prediction value based on the predicted motion information includes: determining a prediction mode of the current image block based on the reference image information, wherein the prediction mode includes unidirectional prediction or bidirectional prediction; determining the number of the motion vector differences based on the prediction mode; determining the correspondence between the motion vector differences and the motion vector prediction value based on the number of the motion vector differences and the predicted motion information.
[0019] In this embodiment, the corresponding relationship between the motion vector difference and the motion vector prediction value is determined, and then the motion vector prediction value is corrected using the motion vector difference corresponding to the motion vector prediction value, so that the reconstructed motion vector of the current image block is more accurate.
[0020] As an optional implementation, determining the number of motion vector differences according to the prediction mode includes: if the prediction mode is the unidirectional prediction, determining the motion vector difference to be one; or, if the prediction mode is the bidirectional prediction, and the reference image information includes the image sequence number of the reference image, determining the number of motion vector differences according to the image sequence number of the reference image of the current image block; or, if the prediction mode is the bidirectional prediction, obtaining the number of motion vector differences from at least one of the slice level header information, the image level header information and the sequence level header information of the code stream.
[0021] The beneficial effect of this implementation is that the motion vector prediction value of the current image block is corrected by using the motion vector difference, so that the reconstructed motion vector of the current image block is more accurate.
[0022] As an optional implementation, determining the number of motion vector differences based on the image sequence number of the reference image of the current image block includes: if the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, then determining that the motion vector difference is two; if the image sequence numbers of the reference images of the current image block are all greater than the image sequence number of the current image block, or the image sequence numbers of the reference images of the current image block are all less than the image sequence number of the current image block, then determining that the motion vector difference is one.
[0023] The beneficial effect of this implementation is that the motion vector prediction value of the current image block is corrected by using the motion vector difference, so that the reconstructed motion vector of the current image block is more accurate.
[0024] As an optional implementation, if the prediction mode is the bidirectional prediction, the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value, and determining the correspondence between the motion vector differences and the motion vector prediction values according to the number of the motion vector differences and the predicted motion information includes: if the motion vector differences are two, then the two motion vector differences are used as the motion vector differences corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; if the motion vector difference is one, then the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value, and the motion vector difference corresponding to the second motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the second motion vector prediction value, and the motion vector difference corresponding to the first motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; or, information that the motion vector difference corresponds to the first motion vector prediction value or the second motion vector prediction value is obtained from the code stream.
[0025] The beneficial effect of this implementation is that the motion vector prediction value of the current image block is corrected by using the motion vector difference, so that the reconstructed motion vector of the current image block is more accurate, and based on the corresponding relationship between the motion vector difference and the motion vector prediction value, the motion vector difference is determined more effectively, saving transmission bits.
[0026] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is obtained from at least one of the slice level header information, picture level header information and sequence level header information of the code stream.
[0027] The beneficial effect of this implementation is that the motion vector prediction value of the current image block is corrected by using the motion vector difference, so that the reconstructed motion vector of the current image block is more accurate.
[0028] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is smaller than the number of motion information in the motion information list in the merge mode.
[0029] The beneficial effect of this implementation is that the computational complexity is reduced by controlling the number of candidate prediction motion information in the candidate prediction motion information list, thereby improving the decoding speed.
[0030] As an optional implementation manner, it includes: the current image block is any prediction unit of the current image block to be reconstructed corresponding to the code stream.
[0031] The beneficial effect of this implementation is that the motion vector prediction value of the current image block is corrected by using the motion vector difference, so that the reconstructed motion vector of the current image block is more accurate, and based on the corresponding relationship between the motion vector difference and the motion vector prediction value, the motion vector difference is determined more effectively, saving transmission bits.
[0032] A second aspect of an embodiment of the present invention discloses a video decoding terminal, characterized in that the video decoding terminal includes: a processor and a memory, wherein the processor is used to perform the following operations: obtain an index of predicted motion information of a current image block in a candidate predicted motion information list from a bitstream, wherein the predicted motion information includes reference image information and a motion vector prediction value, and the candidate predicted motion information in the candidate predicted motion information list is motion information of a temporal or spatial domain neighboring block of the current image block; query the candidate predicted motion information list according to the index, and use the queried candidate predicted motion information as the predicted motion information; determine a correspondence between a motion vector difference and the motion vector prediction value according to the predicted motion information, and obtain the motion vector difference from the bitstream; and add the motion vector prediction value to the corresponding motion vector difference according to the correspondence to obtain the motion vector of the current image block.
[0033] As an optional implementation, the processor determines the correspondence between the motion vector difference and the motion vector prediction value based on the predicted motion information, including: determining a prediction mode of the current image block based on the reference image information, wherein the prediction mode includes unidirectional prediction or bidirectional prediction; determining the number of the motion vector differences based on the prediction mode; determining the correspondence between the motion vector differences and the motion vector prediction value based on the number of the motion vector differences and the predicted motion information.
[0034] As an optional implementation, the processor determines the number of motion vector differences according to the prediction mode, including: if the prediction mode is the unidirectional prediction, determining that the motion vector difference is one; or, if the prediction mode is the bidirectional prediction, and the reference image information includes the image sequence number of the reference image, determining the number of motion vector differences according to the image sequence number of the reference image of the current image block; or, if the prediction mode is the bidirectional prediction, obtaining the number of motion vector differences from at least one of the slice level header information, the image level header information, and the sequence level header information of the code stream.
[0035] As an optional implementation, the processor determines the number of motion vector differences based on the image sequence number of the reference image of the current image block, including: if the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, then determining that the motion vector difference is two; if the image sequence numbers of the reference images of the current image block are all greater than the image sequence number of the current image block, or the image sequence numbers of the reference images of the current image block are all less than the image sequence number of the current image block, then determining that the motion vector difference is one.
[0036] As an optional implementation, if the prediction mode is the bidirectional prediction, the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value, and the processor determines the correspondence between the motion vector difference and the motion vector prediction value according to the number of the motion vector differences and the predicted motion information, including: if the motion vector differences are two, the two motion vector differences are used as the motion vector differences corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; if the motion vector difference is one, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value, and the motion vector difference corresponding to the second motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the second motion vector prediction value, and the motion vector difference corresponding to the first motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; or, the information that the motion vector difference corresponds to the first motion vector prediction value or the second motion vector prediction value is obtained from the code stream.
[0037] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is obtained from at least one of the slice level header information, picture level header information and sequence level header information of the code stream.
[0038] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is smaller than the number of motion information in the motion information list in the merge mode.
[0039] As an optional implementation manner, it includes: the current image block is any prediction unit of the current image block to be reconstructed corresponding to the code stream.
[0040] The third aspect of an embodiment of the present invention discloses a video decoding terminal, comprising: a first acquisition unit, used to obtain the index of the predicted motion information of the current image block in the candidate predicted motion information list from the code stream, wherein the predicted motion information includes reference image information and a motion vector prediction value, and the candidate predicted motion information in the candidate predicted motion information list is the motion information of the temporal or spatial domain neighboring blocks of the current image block; a query unit, used to query the candidate predicted motion information list according to the index, and use the queried candidate predicted motion information as the predicted motion information; a determination unit, used to determine the correspondence between the motion vector difference and the motion vector prediction value according to the predicted motion information; a second acquisition unit, used to obtain the motion vector difference from the code stream; and a calculation unit, used to add the motion vector prediction value to the corresponding motion vector difference according to the correspondence to obtain the motion vector of the current image block.
[0041] As an optional implementation, the determination unit includes: a first determination subunit, used to determine a prediction mode of the current image block based on the reference image information, wherein the prediction mode includes unidirectional prediction or bidirectional prediction; a second determination subunit, used to determine the number of motion vector differences based on the prediction mode; and a third determination subunit, used to determine the correspondence between the motion vector differences and the motion vector prediction value based on the number of motion vector differences and the predicted motion information.
[0042] As an optional implementation, the second determination subunit is specifically used to: if the prediction mode is the unidirectional prediction, determine that the motion vector difference is one; or, if the prediction mode is the bidirectional prediction, and the reference image information includes the image sequence number of the reference image, determine the number of motion vector differences according to the image sequence number of the reference image of the current image block; or, if the prediction mode is the bidirectional prediction, obtain the number of motion vector differences from at least one of the slice level header information, the image level header information and the sequence level header information of the code stream.
[0043] As an optional implementation, the second determination subunit is used to determine the number of motion vector differences based on the image sequence number of the reference image of the current image block, specifically for: if the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, then determining that the motion vector difference is two; if the image sequence numbers of the reference images of the current image block are all greater than the image sequence number of the current image block, or the image sequence numbers of the reference images of the current image block are all less than the image sequence number of the current image block, then determining that the motion vector difference is one.
[0044] As an optional implementation, if the prediction mode is the bidirectional prediction, the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value, and the third determination subunit is specifically used to: if the motion vector difference is two, use the two motion vector differences as the motion vector differences corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; if the motion vector difference is one, use the motion vector difference as the motion vector difference corresponding to the first motion vector prediction value, and set the motion vector difference corresponding to the second motion vector prediction value to 0; or, use the motion vector difference as the motion vector difference corresponding to the second motion vector prediction value, and set the motion vector difference corresponding to the first motion vector prediction value to 0; or, use the motion vector difference as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; or, obtain information from the code stream that the motion vector difference corresponds to the first motion vector prediction value or the second motion vector prediction value.
[0045] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is obtained from at least one of the slice level header information, picture level header information and sequence level header information of the code stream.
[0046] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is smaller than the number of motion information in the motion information list in the merge mode.
[0047] As an optional implementation manner, it includes: the current image block is any prediction unit of the current image block to be reconstructed corresponding to the code stream.
[0048] A fourth aspect of an embodiment of the present invention discloses a video encoding method, comprising: constructing a candidate prediction motion information list of a current image block, the candidate prediction motion information contained in the candidate prediction motion information list being motion information of temporal or spatial neighboring blocks of the current image block; selecting, according to a motion vector obtained in motion estimation of the current image block, from the candidate prediction motion information list a candidate prediction motion information as the prediction motion information of the current image block, and determining an index of the selected candidate prediction motion information in the candidate prediction motion information list, the prediction motion information comprising reference image information and a motion vector prediction value; determining, according to the prediction motion information, a correspondence between a motion vector difference and the motion vector prediction value; obtaining, according to the correspondence and the motion vector, a motion vector difference corresponding to the motion vector prediction value; encoding the index and the motion vector difference into a bitstream.
[0049] As an optional implementation, determining the correspondence between the motion vector difference and the motion vector prediction value based on the predicted motion information includes: determining a prediction mode of the current image block based on the reference image information, wherein the prediction mode includes unidirectional prediction or bidirectional prediction; determining the number of the motion vector differences based on the prediction mode; determining the correspondence between the motion vector differences and the motion vector prediction value based on the number of the motion vector differences and the predicted motion information.
[0050] As an optional implementation, determining the number of motion vector differences according to the prediction mode includes: if the prediction mode is the unidirectional prediction, determining the motion vector difference to be one; or, if the prediction mode is the bidirectional prediction, and the reference image information includes the image sequence number of the reference image of the current image block, determining the number of motion vector differences according to the image sequence number of the reference image of the current image block; or, if the prediction mode is the bidirectional prediction, encoding the preset number of motion vector differences into at least one of the slice level header information, the picture level header information and the sequence level header information of the code stream.
[0051] As an optional implementation, determining the number of motion vector differences based on the image sequence number of the reference image of the current image block includes: if the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, then determining that the motion vector difference is two; if the image sequence numbers of the reference images of the current image block are all greater than the image sequence number of the current image block, or the image sequence numbers of the reference images of the current image block are all less than the image sequence number of the current image block, then determining that the motion vector difference is one.
[0052] As an optional implementation, if the prediction mode is the bidirectional prediction, the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value, and determining the correspondence between the motion vector differences and the motion vector prediction values according to the number of the motion vector differences and the predicted motion information includes: if the motion vector differences are two, the two motion vector differences are used as the motion vector differences corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; if the motion vector difference is one, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value, and the motion vector difference corresponding to the second motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the second motion vector prediction value, and the motion vector difference corresponding to the first motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; or, the correspondence between the motion vector difference and the first motion vector prediction value and the second motion vector prediction value is determined according to a preset correspondence, and the preset correspondence is encoded into the bitstream.
[0053] As an optional implementation, it includes: encoding the number of candidate prediction motion information in the candidate prediction motion information list into at least one of the slice level header information, picture level header information and sequence level header information of the code stream.
[0054] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is smaller than the number of motion information in the motion information list in the merge mode.
[0055] As an optional implementation manner, it includes: the current image block is any prediction unit of the current image block to be encoded corresponding to the code stream.
[0056] A fifth aspect of an embodiment of the present invention discloses a video encoding terminal, characterized in that the video encoding terminal includes: a processor and a memory, wherein the processor is used to perform the following operations: construct a candidate prediction motion information list of a current image block, the candidate prediction motion information contained in the candidate prediction motion information list is the motion information of the temporal or spatial domain neighboring blocks of the current image block; according to the motion vector obtained in the motion estimation of the current image block, select one candidate prediction motion information from the candidate prediction motion information list as the prediction motion information of the current image block, and determine the index of the selected candidate prediction motion information in the candidate prediction motion information list, the prediction motion information includes reference image information and a motion vector prediction value; according to the prediction motion information, determine the correspondence between the motion vector difference and the motion vector prediction value; according to the correspondence and the motion vector, obtain the motion vector difference corresponding to the motion vector prediction value; encode the index and the motion vector difference into a bitstream.
[0057] As an optional implementation, the processor determines the correspondence between the motion vector difference and the motion vector prediction value based on the predicted motion information, including: determining a prediction mode of the current image block based on the reference image information, wherein the prediction mode includes unidirectional prediction or bidirectional prediction; determining the number of the motion vector differences based on the prediction mode; determining the correspondence between the motion vector differences and the motion vector prediction value based on the number of the motion vector differences and the predicted motion information.
[0058] As an optional implementation, the processor determines the number of motion vector differences according to the prediction mode, including: if the prediction mode is the unidirectional prediction, determining the motion vector difference to be one; or, if the prediction mode is the bidirectional prediction, the reference image information includes the image sequence number of the reference image of the current image block, then determining the number of motion vector differences according to the image sequence number of the reference image of the current image block; or, if the prediction mode is the bidirectional prediction, encoding the preset number of motion vector differences into at least one of the slice level header information, the picture level header information and the sequence level header information of the code stream.
[0059] As an optional implementation, the processor determines the number of motion vector differences based on the image sequence number of the reference image of the current image block, including: if the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, then determining that the motion vector difference is two; if the image sequence numbers of the reference images of the current image block are all greater than the image sequence number of the current image block, or the image sequence numbers of the reference images of the current image block are all less than the image sequence number of the current image block, then determining that the motion vector difference is one.
[0060] As an optional implementation, if the prediction mode is the bidirectional prediction, the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value, and the processor determines the correspondence between the motion vector difference and the motion vector prediction value according to the number of the motion vector differences and the predicted motion information, including: if the motion vector differences are two, the two motion vector differences are used as the motion vector differences corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; if the motion vector difference is one, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value, and the motion vector difference corresponding to the second motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the second motion vector prediction value, and the motion vector difference corresponding to the first motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; or, the correspondence between the motion vector difference and the first motion vector prediction value and the second motion vector prediction value is determined according to a preset correspondence, and the preset correspondence is encoded into the bitstream.
[0061] As an optional implementation, it includes: encoding the number of candidate prediction motion information in the candidate prediction motion information list into at least one of the slice level header information, picture level header information and sequence level header information of the code stream.
[0062] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is smaller than the number of motion information in the motion information list in the merge mode.
[0063] As an optional implementation manner, it includes: the current image block is any prediction unit of the current image block to be encoded corresponding to the code stream.
[0064] The sixth aspect of an embodiment of the present invention discloses a video encoding terminal, comprising: a table building unit, used to construct a candidate prediction motion information list of a current image block, the candidate prediction motion information contained in the candidate prediction motion information list is the motion information of the temporal or spatial domain neighboring blocks of the current image block; a selection unit, used to select one candidate prediction motion information from the candidate prediction motion information list as the prediction motion information of the current image block according to the motion vector obtained in motion estimation of the current image block, the prediction motion information including reference image information and a motion vector prediction value; a first determination unit, used to determine the index of the selected candidate prediction motion information in the candidate prediction motion information list; a second determination unit, used to determine the correspondence between the motion vector difference and the motion vector prediction value according to the prediction motion information; an acquisition unit, used to acquire the motion vector difference corresponding to the motion vector prediction value according to the correspondence and the motion vector; and a first encoding unit, used to encode the index and the motion vector difference into a bitstream.
[0065] As an optional implementation, the second determination unit includes: a first determination subunit, used to determine the prediction mode of the current image block based on the reference image information, wherein the prediction mode includes unidirectional prediction or bidirectional prediction; a second determination subunit, used to determine the number of motion vector differences based on the prediction mode; and a third determination subunit, used to determine the correspondence between the motion vector differences and the motion vector prediction value based on the number of motion vector differences and the predicted motion information.
[0066] As an optional implementation, the second determination subunit is specifically used to: if the prediction mode is the unidirectional prediction, determine the motion vector difference to be one; or, if the prediction mode is the bidirectional prediction, and the reference image information includes the image sequence number of the reference image of the current image block, determine the number of motion vector differences according to the image sequence number of the reference image of the current image block; or, if the prediction mode is the bidirectional prediction, encode the preset number of motion vector differences into at least one of the slice level header information, the image level header information and the sequence level header information of the code stream.
[0067] As an optional implementation, the second determination subunit is used to determine the number of motion vector differences based on the image sequence number of the reference image of the current image block, specifically for: if the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, then determining that the motion vector difference is two; if the image sequence numbers of the reference images of the current image block are all greater than the image sequence number of the current image block, or the image sequence numbers of the reference images of the current image block are all less than the image sequence number of the current image block, then determining that the motion vector difference is one.
[0068] As an optional implementation, if the prediction mode is the bidirectional prediction, the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value, and the third determination subunit is specifically used to: if the motion vector difference is two, then the two motion vector differences are used as the motion vector differences corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; if the motion vector difference is one, then the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value, and the motion vector difference corresponding to the second motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the second motion vector prediction value, and the motion vector difference corresponding to the first motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; or, determine the correspondence between the motion vector difference and the first motion vector prediction value and the second motion vector prediction value according to a preset correspondence, and encode the preset correspondence into the bitstream.
[0069] As an optional implementation, the terminal also includes: a second encoding unit, used to encode the number of candidate prediction motion information in the candidate prediction motion information list into at least one of the slice level header information, picture level header information and sequence level header information of the code stream.
[0070] As an optional implementation, it includes: the number of candidate prediction motion information in the candidate prediction motion information list is smaller than the number of motion information in the motion information list in the merge mode.
[0071] As an optional implementation manner, it includes: the current image block is any prediction unit of the current image block to be encoded corresponding to the code stream.
[0072] A seventh aspect of an embodiment of the present invention discloses a computer storage medium for storing computer software instructions as described in the first aspect and the fourth aspect, which includes a program designed for executing the above aspects.
[0073] It should be understood that the second to seventh aspects of the embodiments of the present invention are consistent with the technical solutions of the first aspect of the embodiments of the present invention, and the beneficial effects achieved are similar, which will not be repeated here.
[0074] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages: In the embodiments of the present invention, the reference image information of the adjacent blocks is obtained as the reference image information of the current image block; and for the motion vector, the motion vector of the current image block is predicted using the motion vector of the adjacent blocks, and the motion vector difference is transmitted to correct the motion vector prediction value to achieve a higher motion vector accuracy. At the same time, and based on the corresponding relationship between the motion vector difference and the motion vector prediction value, the motion vector difference is more effectively determined, saving transmission bits. It can be seen that the implementation of the embodiments of the present invention can reduce the information to be transmitted under the same video quality, thereby saving a certain amount of transmission bits. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0076] Figure 1 A schematic diagram of a flow chart of a video decoding method disclosed in an embodiment of the present invention;
[0077] Figure 2 A schematic diagram of the structure of a video decoding terminal disclosed in an embodiment of the present invention;
[0078] Figure 3 A schematic diagram of the structure of another video decoding terminal disclosed in an embodiment of the present invention;
[0079] Figure 4 A schematic diagram of a flow chart of a video encoding method disclosed in an embodiment of the present invention;
[0080] Figure 5 A schematic diagram of the structure of a video encoding terminal disclosed in an embodiment of the present invention;
[0081] Figure 6 A schematic diagram of the structure of another video encoding terminal disclosed in an embodiment of the present invention;
[0082] Figure 7A schematic diagram of the structure of a video encoding and decoding device or electronic device disclosed in an embodiment of the present invention;
[0083] Figure 8 The present invention is a schematic diagram of the structure of a video encoding and decoding system disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0085] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods or devices.
[0086] The embodiments of the present invention provide a video encoding method, a decoding method and a terminal, which can reduce the information to be transmitted under the same video quality, thereby saving a certain amount of transmission bits.
[0087] See also Figure 1 , Figure 1 1 is a flow chart of a video decoding method disclosed in an embodiment of the present invention. Figure 1 The video decoding method shown may include the following steps:
[0088] 101. Obtain, from a bitstream, an index of the predicted motion information of the current image block in a candidate predicted motion information list.
[0089] In the embodiment of the present invention, the predicted motion information includes reference image information and motion vector prediction values, and the candidate predicted motion information in the candidate predicted motion information list is motion information of a temporal or spatial neighboring block of the current image block.
[0090] In the embodiment of the present invention, the current image block may be any prediction unit of the current image block to be reconstructed corresponding to the bitstream. In some embodiments of the invention, the current image block may also be any transform unit or decoding unit of the current image block to be reconstructed corresponding to the bitstream, without limitation.
[0091] The number of candidate prediction motion information in the candidate prediction motion information list may be obtained from at least one of slice level header information, picture level header information and sequence level header information of the code stream.
[0092] In addition, the number of candidate prediction motion information in the candidate prediction motion information list is less than the number of motion information in the motion information list in the merge mode. The above merge mode is a method for inter-frame prediction in the High Efficiency Video Coding (HEVC) standard. In the merge mode, the motion information of the current image block is specified by directly selecting the motion information of a neighboring block of the current image block in the motion information list, and the number of motion information in the motion information list is relatively large; while in the embodiment of the present invention, the number of candidate prediction motion information in the candidate prediction motion information list is less than the number of motion information in the motion information list in the merge mode to reduce the complexity of calculation.
[0093] 102. Query a candidate prediction motion information list according to the above index, and use the queried candidate prediction motion information as the above prediction motion information.
[0094] Generally speaking, the probability that the reference image information of adjacent image blocks is exactly the same is very high, while the motion vector generally has a slight deviation. Therefore, in the embodiment of the present invention, the candidate predicted motion information queried is used as the predicted motion information, and the motion vector difference is obtained to correct the motion vector prediction value contained in the predicted motion information, so as to obtain a more accurate motion vector of the current image block.
[0095] 103. Determine a correspondence between a motion vector difference and a motion vector prediction value according to the predicted motion information, and obtain the motion vector difference from the code stream.
[0096] As an optional implementation manner, the corresponding relationship between the motion vector difference and the motion vector prediction value may be determined according to the predicted motion information in the following manner:
[0097] Determine a prediction mode of the current image block according to the reference image information, wherein the prediction mode is unidirectional prediction or bidirectional prediction;
[0098] According to the above prediction mode, determining the number of motion vector differences;
[0099] According to the number of motion vector differences and the predicted motion information, the corresponding relationship between the motion vector differences and the motion vector prediction values is determined.
[0100] In the above implementation of determining the correspondence between the motion vector difference and the motion vector prediction value, the step of determining the number of motion vector differences according to the above prediction mode can be implemented in the following manner:
[0101] If the prediction mode is unidirectional prediction, the motion vector difference is determined to be one;
[0102] Alternatively, if the prediction mode is bidirectional prediction, and the reference image information includes the image sequence number of the reference image, the number of motion vector differences is determined according to the image sequence number of the reference image of the current image block:
[0103] If the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, then the motion vector difference is determined to be two; if the image sequence numbers of the reference images of the current image block are all greater than the image sequence number of the current image block, or the image sequence numbers of the reference images of the current image block are all less than the image sequence number of the current image block, then the motion vector difference is determined to be one.
[0104] Alternatively, if the prediction mode is bidirectional prediction, the number of motion vector differences is obtained from at least one of the slice level header information, the picture level header information and the sequence level header information of the bitstream and the bitstream of the current image block.
[0105] After obtaining the number of motion vector differences, the corresponding relationship between the motion vector differences and the motion vector prediction values can be determined in the following manner:
[0106] If the prediction mode is bidirectional prediction, the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value.
[0107] If there are two motion vector differences, the two motion vector differences are used as motion vector differences corresponding to the first motion vector prediction value and the second motion vector prediction value respectively;
[0108] If the motion vector difference is one, then the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value, and the motion vector difference corresponding to the second motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the second motion vector prediction value, and the motion vector difference corresponding to the first motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; or, information that the motion vector difference corresponds to the first motion vector prediction value or the second motion vector prediction value is obtained from the bitstream, and the correspondence between the motion vector difference and the motion vector prediction value is determined based on the obtained information.
[0109] It should be understood that in one possible implementation mode, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively, that is, the motion vector difference is multiplexed, which saves the consumption of encoding the motion vector difference and improves efficiency.
[0110] 104. According to the above correspondence, the motion vector prediction value is added to the corresponding motion vector difference to obtain the motion vector of the current image block.
[0111] In the embodiment of the present invention, the motion vector prediction value is added to the corresponding motion vector difference, so as to correct the deviation of the motion vector prediction value and restore the motion vector of the current image block more accurately.
[0112] It can be seen that using Figure 1 The described video decoding method can restore the motion vector of the current image block more accurately, so that the output video quality is higher at the same bit rate.
[0113] See also Figure 2 , Figure 2 Schematic diagram of the structure of a video decoding terminal disclosed in an embodiment of the present invention. Figure 2 As shown, the terminal includes: a processor 201 and a memory 202; wherein the memory 202 can be used as a cache required by the processor 201 to perform data processing, and can also be used to provide storage space for data called by the processor 201 to perform data processing and obtained result data.
[0114] In the embodiment of the present invention, the processor 201 is used to perform the following operations by calling the program code stored in the memory 202:
[0115] Obtaining an index of the predicted motion information of the current image block in the candidate predicted motion information list from the bitstream, wherein the predicted motion information includes reference image information and a motion vector prediction value, and the candidate predicted motion information in the candidate predicted motion information list is motion information of a temporal or spatial domain neighboring block of the current image block;
[0116] querying a candidate prediction motion information list according to the index, and using the queried candidate prediction motion information as the above-mentioned prediction motion information;
[0117] Determine the corresponding relationship between the motion vector difference and the motion vector prediction value according to the predicted motion information, and obtain the motion vector difference from the bitstream;
[0118] According to the above correspondence, the motion vector prediction value is added to the corresponding motion vector difference to obtain the motion vector of the current image block.
[0119] use Figure 2 The described video decoding terminal can restore the motion vector of the current image block more accurately, so that the output video quality is higher at the same bit rate.
[0120] See also Figure 3 , Figure 3FIG. 1 is a schematic diagram of the structure of another video decoding terminal disclosed in an embodiment of the present invention. Figure 3 As shown, the terminal may include:
[0121] The first acquisition unit 301 is used to obtain the index of the predicted motion information of the current image block in the candidate predicted motion information list from the code stream, wherein the predicted motion information includes reference image information and a motion vector prediction value, and the candidate predicted motion information in the candidate predicted motion information list is the motion information of the temporal or spatial domain neighboring blocks of the current image block.
[0122] The query unit 302 is used to query the candidate prediction motion information list according to the index, and use the queried candidate prediction motion information as the above-mentioned prediction motion information.
[0123] The determination unit 303 is used to determine the corresponding relationship between the motion vector difference and the motion vector prediction value according to the predicted motion information.
[0124] The second acquisition unit 304 is configured to acquire the motion vector difference from the bit stream.
[0125] The operation unit 305 is used to add the motion vector prediction value and the corresponding motion vector difference according to the above correspondence to obtain the motion vector of the current image block.
[0126] use Figure 3 The described video decoding terminal can restore the motion vector of the current image block more accurately, so that the output video quality is higher at the same bit rate.
[0127] See also Figure 4 , Figure 4 is a flow chart of a video encoding method disclosed in an embodiment of the present invention. Figure 4 The video encoding method shown may include the following steps:
[0128] 401. Construct a candidate prediction motion information list of a current image block, where the candidate prediction motion information included in the candidate prediction motion information list is motion information of temporal or spatial domain neighboring blocks of the current image block.
[0129] In the embodiment of the present invention, the current image block is any prediction unit of the current image block to be encoded corresponding to the code stream. In some embodiments of the invention, the current image block can also be any transform unit or decoding unit of the current image block to be encoded corresponding to the code stream, without limitation.
[0130] As an optional implementation manner, the number of candidate prediction motion information in the candidate prediction motion information list may be encoded into at least one of the slice level header information, the picture level header information and the sequence level header information of the bitstream.
[0131] In addition, the number of candidate prediction motion information in the candidate prediction motion information list is less than the number of motion information in the motion information list in the merge mode. The above merge mode is a method for inter-frame prediction in the High Efficiency Video Coding (HEVC) standard. In the merge mode, the motion information of the current image block is specified by directly selecting the motion information of a neighboring block of the current image block in the motion information list, and the number of motion information in the motion information list is relatively large; while in the embodiment of the present invention, the number of candidate prediction motion information in the candidate prediction motion information list is less than the number of motion information in the motion information list in the merge mode to reduce the complexity of calculation.
[0132] 402. According to the motion vector obtained in the motion estimation of the current image block, select a candidate prediction motion information from the candidate prediction motion information list as the prediction motion information of the current image block, and determine the index of the selected candidate prediction motion information in the candidate prediction motion information list, the prediction motion information includes reference image information and motion vector prediction value.
[0133] In the embodiment of the present invention, motion estimation is performed on the current image block using motion information of neighboring blocks. As an optional implementation, positions of multiple motion vectors are obtained in motion estimation, and a motion vector with the minimum rate-distortion cost is selected as the motion vector of the current image block.
[0134] In a feasible implementation, the candidate prediction motion information in the candidate prediction motion information list is traversed, and the rate-distortion cost is calculated using each candidate prediction motion information as the prediction motion information of the current image block, and the candidate prediction motion information with the smallest rate-distortion cost is selected as the prediction motion information of the current image block.
[0135] 403. Determine the corresponding relationship between the motion vector difference and the motion vector prediction value according to the predicted motion information.
[0136] In the embodiment of the present invention, the corresponding relationship between the motion vector difference and the motion vector prediction value can be determined in the following manner:
[0137] Determine a prediction mode of the current image block according to the reference image information, wherein the prediction mode is unidirectional prediction or bidirectional prediction;
[0138] Determining the number of motion vector differences according to the prediction mode;
[0139] According to the number of motion vector differences and the predicted motion information, the corresponding relationship between the motion vector differences and the motion vector prediction values is determined.
[0140] The above-mentioned determination of the number of motion vector differences according to the prediction mode can be implemented in the following manner:
[0141] If the prediction mode is unidirectional prediction, the motion vector difference is determined to be one;
[0142] Alternatively, if the prediction mode is bidirectional prediction, and the reference image information includes the image sequence number of the reference image of the current image block, the number of motion vector differences is determined according to the image sequence number of the reference image of the current image block:
[0143] If the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, then the motion vector difference is determined to be two; if the image sequence numbers of the reference images of the current image block are all greater than the image sequence number of the current image block, or the image sequence numbers of the reference images of the current image block are all less than the image sequence number of the current image block, then the motion vector difference is determined to be one.
[0144] Alternatively, if the prediction mode is bidirectional prediction, the preset number of motion vector differences is encoded into at least one of the slice level header information, the picture level header information and the sequence level header information of the bitstream and the bitstream of the current image block.
[0145] After the number of motion vector differences is determined, the corresponding relationship between the motion vector differences and the motion vector prediction values can be determined in the following manner:
[0146] If there are two motion vector differences, the two motion vector differences are used as motion vector differences corresponding to the first motion vector prediction value and the second motion vector prediction value respectively;
[0147] If the motion vector difference is one, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value, and the motion vector difference corresponding to the second motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the second motion vector prediction value, and the motion vector difference corresponding to the first motion vector prediction value is set to 0; or, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively; or, the correspondence between the motion vector difference and the first motion vector prediction value and the second motion vector prediction value is determined according to a preset correspondence, and the preset correspondence is encoded into the bitstream.
[0148] It should be understood that in one possible implementation mode, the motion vector difference is used as the motion vector difference corresponding to the first motion vector prediction value and the second motion vector prediction value respectively, that is, the motion vector difference is multiplexed, which saves the consumption of encoding the motion vector difference and improves efficiency.
[0149] 404. Obtain a motion vector difference corresponding to the motion vector prediction value according to the corresponding relationship and the motion vector.
[0150] Since the motion vector of the current image block has been determined in step 402, the motion vector difference corresponding to the motion vector prediction value can be obtained by subtracting the motion vector prediction value from the motion vector of the current image block.
[0151] 405. Encode the above index and motion vector difference into a bitstream.
[0152] It can be seen that using Figure 4 In the described video encoding method, only the index and the motion vector difference need to be transmitted in the bitstream, and the motion information of the current image block can be restored at the decoding end. Therefore, under the same video quality, a certain bit rate can be saved by using this method.
[0153] See also Figure 5 , Figure 5 Schematic diagram of the structure of a video encoding terminal disclosed in an embodiment of the present invention. Figure 5 As shown, the terminal device includes: a processor 501 and a memory 502; wherein the memory 502 can be used for caching required by the processor 501 to perform data processing, and can also be used to provide storage space for data called by the processor 501 to perform data processing and the obtained result data.
[0154] In the embodiment of the present invention, the processor 501 is used to perform the following operations by calling the program code stored in the memory 502:
[0155] Constructing a candidate prediction motion information list of the current image block, wherein the candidate prediction motion information included in the candidate prediction motion information list is motion information of a temporal or spatial domain neighboring block of the current image block;
[0156] According to the motion vector obtained in motion estimation of the current image block, select a candidate prediction motion information from the candidate prediction motion information list as the prediction motion information of the current image block, and determine the index of the selected candidate prediction motion information in the candidate prediction motion information list, the prediction motion information includes reference image information and a motion vector prediction value;
[0157] Determine the corresponding relationship between the motion vector difference and the motion vector prediction value according to the predicted motion information;
[0158] According to the above correspondence relationship and the motion vector, a motion vector difference corresponding to the motion vector prediction value is obtained;
[0159] The above index and motion vector difference are encoded into the bitstream.
[0160] It can be seen that using Figure 5The described video encoding terminal only needs to transmit the index and the motion vector difference in the bitstream, and the motion information of the current image block can be restored at the decoding end. Therefore, under the same video quality, the method can save a certain bit rate.
[0161] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of the structure of another video encoding terminal disclosed in an embodiment of the present invention. Figure 6 As shown, the terminal may include:
[0162] The table building unit 601 is used to build a candidate prediction motion information list of the current image block. The candidate prediction motion information included in the candidate prediction motion information list is the motion information of the temporal or spatial domain neighboring blocks of the current image block.
[0163] The selection unit 602 is used to select a candidate prediction motion information from the candidate prediction motion information list as the prediction motion information of the current image block according to the motion vector obtained in the motion estimation of the current image block, and the prediction motion information includes reference image information and a motion vector prediction value.
[0164] The first determining unit 603 is configured to determine an index of the selected candidate prediction motion information in the candidate prediction motion information list.
[0165] The second determining unit 604 is configured to determine a correspondence between a motion vector difference and a motion vector prediction value according to the predicted motion information.
[0166] The acquisition unit 605 is used to acquire the motion vector difference corresponding to the motion vector prediction value according to the above correspondence relationship and the motion vector.
[0167] The first encoding unit 606 is used to encode the above index and motion vector difference into a bitstream.
[0168] It can be seen that using Figure 6 The described video encoding terminal only needs to transmit the index and the motion vector difference in the bitstream, and the motion information of the current image block can be restored at the decoding end. Therefore, under the same video quality, the method can save a certain bit rate.
[0169] See also Figure 7 , Figure 7 1 is a schematic diagram of the structure of a video coding and decoding device or electronic device 50 disclosed in an embodiment of the present invention. The device or electronic device may be incorporated into a codec according to an embodiment of the present invention. Detailed description is given below.
[0170] The electronic device 50 may be, for example, a mobile terminal or user equipment of a wireless communication system. It should be understood that the embodiments of the present invention may be implemented in any electronic device or apparatus that may need to encode and decode video images, or encode or decode.
[0171] The device 50 may include a housing 30 for incorporating and protecting the device. The device 50 may also include a display 32 in the form of a liquid crystal display. In other embodiments of the present invention, the display may be any suitable display technology suitable for displaying images or videos. The device 50 may also include a keypad 34. In other embodiments of the present invention, any suitable data or user interface mechanism may be used. For example, the user interface may be implemented as a virtual keyboard or a data entry system as part of a touch-sensitive display. The device may include a microphone 36 or any suitable audio input, which may be a digital or analog signal input. The device 50 may also include an audio output device, which may be any of the following in an embodiment of the present invention: headphones 38, speakers, or analog audio or digital audio output connections. The device 50 may also include a battery 40, and in other embodiments of the present invention, the device may be powered by any suitable mobile energy device, such as a solar cell, a fuel cell, or a clockwork generator. The device may also include an infrared port 42 for short-range line-of-sight communication with other devices. In other embodiments, the device 50 may also include any suitable short-range communication solution, such as a Bluetooth wireless connection or a USB / Firewire wired connection.
[0172] The apparatus 50 may include a controller 56 or processor for controlling the apparatus 50. The controller 56 may be connected to a memory 58, which in embodiments of the present invention may store data in the form of images and audio data, and / or may also store instructions for implementation on the controller 56. The controller 56 may also be connected to a codec circuit 54 suitable for implementing encoding and decoding of audio and / or video data or auxiliary encoding and decoding implemented by the controller 56.
[0173] The apparatus 50 may also include a card reader 48 and a smart card 46, such as a UICC and a UICC reader, for providing user information and adapted to provide authentication information for authenticating and authorizing the user at the network.
[0174] The device 50 may further include a radio interface circuit 52 connected to the controller and adapted to generate wireless communication signals, for example, for communicating with a cellular communication network, a wireless communication system or a wireless local area network. The device 50 may further include an antenna 44 connected to the radio interface circuit 52 for transmitting radio frequency signals generated in the radio interface circuit 52 to other (multiple) devices and for receiving radio frequency signals from other (multiple) devices.
[0175] In some embodiments of the invention, the apparatus 50 includes a camera capable of recording or detecting single frames, and the codec 54 or controller receives these single frames and processes them. In some embodiments of the invention, the apparatus may receive video image data to be processed from another device before transmission and / or storage. In some embodiments of the invention, the apparatus 50 may receive images for encoding / decoding via a wireless or wired connection.
[0176] In the embodiment of the present invention, the codec 54 can be used to perform Figure 1 The video decoding method described or Figure 4 A video encoding method is described.
[0177] See also Figure 8 , Figure 8 FIG. 1 is a schematic diagram of the structure of a video encoding and decoding system disclosed in an embodiment of the present invention. Figure 8 As shown, video codec system 10 includes source device 12 and destination device 14. Source device 12 generates encoded video data. Therefore, source device 12 may be referred to as a video encoding device or a video encoding apparatus. Destination device 14 may decode the encoded video data generated by source device 12. Therefore, destination device 14 may be referred to as a video decoding device or a video decoding apparatus. Source device 12 and destination device 14 may be examples of video codec devices or video codec apparatus. Source device 12 and destination device 14 may include a wide range of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handheld devices such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
[0178] Destination device 14 may receive the encoded video data from source device 12 via channel 16. Channel 16 may include one or more media and / or devices capable of moving the encoded video data from source device 12 to destination device 14. In one example, channel 16 may include one or more communication media that enable source device 12 to transmit the encoded video data directly to destination device 14 in real time. In this example, source device 12 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and may transmit the modulated video data to destination device 14. The one or more communication media may include wireless and / or wired communication media, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other equipment that facilitates communication from source device 12 to destination device 14.
[0179] In another example, channel 16 may include a storage medium that stores the encoded video data generated by source device 12. In this example, destination device 14 may access the storage medium via disk access or card access. The storage medium may include a variety of locally accessible data storage media such as Blu-ray discs, DVDs, CD-ROMs, flash memory, or other suitable digital storage media for storing encoded video data.
[0180] In another example, channel 16 may include a file server or another intermediate storage device that stores the encoded video data generated by source device 12. In this example, destination device 14 may access the encoded video data stored at the file server or other intermediate storage device via streaming or downloading. The file server may be a type of server capable of storing the encoded video data and transmitting the encoded video data to destination device 14. Example file servers include a web server (e.g., for a website), a file transfer protocol (FTP) server, a network attached storage (NAS) device, and a local disk drive.
[0181] Destination device 14 may access the encoded video data via a standard data connection, such as an Internet connection. Example types of data connections include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both that is suitable for accessing the encoded video data stored on a file server. The transmission of the encoded video data from the file server may be a streaming transmission, a download transmission, or a combination of both.
[0182] The technology of the present invention is not limited to wireless application scenarios. For example, the technology can be applied to video encoding and decoding supporting various multimedia applications such as the following applications: over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., via the Internet), encoding of video data stored on a data storage medium, decoding of video data stored on a data storage medium, or other applications. In some examples, the video encoding and decoding system 10 can be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and / or video telephony.
[0183] exist Figure 8 In an example of , source device 12 includes a video source 18, a video encoder 20, and an output interface 22. In some examples, output interface 22 may include a modulator / demodulator (modem) and / or a transmitter. Video source 18 may include a video capture device (e.g., a video camera), a video archive containing previously captured video data, a video input interface to receive video data from a video content provider, and / or a computer graphics system for generating video data, or a combination of the above video data sources.
[0184] Video encoder 20 may encode video data from video source 18. In some examples, source device 12 transmits the encoded video data directly to destination device 14 via output interface 22. The encoded video data may also be stored on a storage medium or file server for later access by destination device 14 for decoding and / or playback.
[0185] exist Figure 8 In an example of , destination device 14 includes input interface 28, video decoder 30, and display device 32. In some examples, input interface 28 includes a receiver and / or a modem. Input interface 28 may receive the encoded video data via channel 16. Display device 32 may be integrated with destination device 14 or may be external to destination device 14. In general, display device 32 displays the decoded video data. Display device 32 may include a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
[0186] Video encoder 20 and video decoder 30 may operate according to a video compression standard, such as the High Efficiency Video Codec H.265 standard, and may conform to the HEVC Test Model (HM). The text description of the H.265 standard, ITU-T H.265 (V3) (04 / 2015), was published on April 29, 2015 and can be downloaded from http: / / handle.itu.int / 11.1002 / 1000 / 12455, the entire contents of which are incorporated herein by reference.
[0187] Alternatively, video encoder 20 and video decoder 30 may operate according to other proprietary or industry standards, including ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual, ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC), including scalable video coding (SVC) and multi-view video coding (MVC) extensions. It should be understood that the techniques of this disclosure are not limited to any particular codec standard or technique.
[0188] also, Figure 8 This is merely an example and the techniques of this disclosure may be applied to video encoding and decoding applications that do not necessarily include any data communication between the encoding device and the decoding device (e.g., one-sided video encoding or video decoding). In other examples, data is retrieved from local memory, streamed over a network, or manipulated in a similar manner. The encoding device may encode data and store the data to memory, and / or the decoding device may retrieve data from memory and decode the data. In many examples, encoding and decoding are performed by multiple devices that do not communicate with each other but only encode data to memory and / or retrieve data from memory and decode data.
[0189] Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the techniques are implemented partially or entirely in software, the device may store the instructions for the software in a suitable non-transitory computer-readable storage medium, and may use one or more processors to execute the instructions in hardware to perform the techniques of this disclosure. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered to be one or more processors. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) in other devices.
[0190] This disclosure may generally refer to video encoder 20 "signaling" certain information to another device (e.g., video decoder 30). The term "signaling" may generally refer to the communication of syntax elements and / or representations of encoded video data. This communication may occur in real time or near real time. Alternatively, this communication may occur over a time span, such as when syntax elements are stored in a computer-readable storage medium at the time of encoding with the resulting binary data after encoding, which may then be retrieved by a decoding device at any time after being stored in such a medium.
[0191] It is worth noting that the above-mentioned device is only divided according to functional logic, but is not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific name of each functional unit is only for the convenience of distinguishing each other, and is not used to limit the scope of protection of the present invention.
[0192] In addition, a person skilled in the art will appreciate that all or part of the steps in the above-mentioned method embodiments can be implemented by instructing related hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.
[0193] The above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the embodiments of the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A video decoding method, characterized in that: include: Obtaining an index of predicted motion information of a current image block in a candidate predicted motion information list from a bitstream, wherein the predicted motion information includes reference image information and a motion vector prediction value, and the candidate predicted motion information in the candidate predicted motion information list is motion information of a temporal or spatial domain neighboring block of the current image block, wherein the prediction mode is bidirectional prediction, and the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value; and the reference image information includes an image sequence number of a first reference image and an image sequence number of a second reference image; querying the candidate prediction motion information list according to the index, and using the queried candidate prediction motion information as the prediction motion information; If the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, two motion vector differences are obtained from the bitstream, and the first motion vector prediction value and the second motion vector prediction value are respectively added to the two motion vector differences to obtain the motion vector of the current image block; or If the image sequence number of the first reference image and the image sequence number of the second reference image are both greater than the image sequence number of the current image block, or the image sequence number of the first reference image and the image sequence number of the second reference image are both greater than and less than the image sequence number of the current image block, a motion vector difference is obtained from the code stream, and the first motion vector prediction value and the second motion vector prediction value are respectively added to the one motion vector difference to obtain the motion vector of the current image block.
2. The method according to claim 1, characterized in that: include: The number of candidate prediction motion information in the candidate prediction motion information list is obtained from at least one of slice level header information, picture level header information and sequence level header information of the code stream.
3. The method according to claim 1 or 2, characterized in that: include: The number of candidate prediction motion information in the candidate prediction motion information list is smaller than the number of motion information in the motion information list in the merge mode.
4. The method according to claim 1 or 2, characterized in that: include: The current image block is any prediction unit of the current image block to be reconstructed corresponding to the code stream.
5. A video decoding terminal, characterized in that: include: A first acquisition unit is used to acquire an index of the predicted motion information of the current image block in the candidate predicted motion information list from the bitstream, wherein the predicted motion information includes reference image information and a motion vector prediction value, and the candidate predicted motion information in the candidate predicted motion information list is motion information of a temporal or spatial domain neighboring block of the current image block, wherein the prediction mode is bidirectional prediction, and the predicted motion information includes two motion vector prediction values, namely a first motion vector prediction value and a second motion vector prediction value; and the reference image information includes an image sequence number of the first reference image and an image sequence number of the second reference image; A query unit, configured to query the candidate prediction motion information list according to the index, and use the queried candidate prediction motion information as the prediction motion information; A second acquisition unit is used for acquiring two motion vector differences from the code stream if the image sequence number of the first reference image of the current image block is greater than the image sequence number of the current image block, and the image sequence number of the second reference image of the current image block is less than the image sequence number of the current image block, or the second acquisition unit is used for acquiring one motion vector difference from the code stream if both the image sequence number of the first reference image and the image sequence number of the second reference image are greater than the image sequence number of the current image block, or both the image sequence number of the first reference image and the image sequence number of the second reference image are greater than and less than the image sequence number of the current image block; an operation unit, configured to, when the second acquisition unit acquires two motion vector differences, add the first motion vector prediction value and the second motion vector prediction value to the two motion vector differences to obtain the motion vector of the current image block; or, when acquiring one motion vector difference in the code stream, add the first motion vector prediction value and the second motion vector prediction value to the one motion vector difference to obtain the motion vector of the current image block.
6. The terminal according to claim 5, characterized in that: include: The number of candidate prediction motion information in the candidate prediction motion information list is obtained from at least one of slice level header information, picture level header information and sequence level header information of the code stream.
7. The terminal according to claim 5 or 6, characterized in that: include: The number of candidate prediction motion information in the candidate prediction motion information list is smaller than the number of motion information in the motion information list in the merge mode.
8. The terminal according to claim 5 or 6, characterized in that: include: The current image block is any prediction unit of the current image block to be reconstructed corresponding to the code stream.
9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Image coding method, decoding method, encoder, decoder, coding / decoding method and encoder / decoder
CN101137065A
Method for video coding and an apparatus
CN103999468A
Video decoder, video decoding method, video decoding program, receiver, receiving method, and receiving program
JP2013132046A
Inter-view predicted motion vector for 3D video
US20140098882A1
Method of motion information coding
WO2015149698A1
