CN110636290A - Video image motion vector encoding/decoding method and encoder/decoder - Google Patents

Video image motion vector encoding/decoding method and encoder/decoder Download PDF

Info

Publication number
CN110636290A
CN110636290A CN201910817030.4A CN201910817030A CN110636290A CN 110636290 A CN110636290 A CN 110636290A CN 201910817030 A CN201910817030 A CN 201910817030A CN 110636290 A CN110636290 A CN 110636290A
Authority
CN
China
Prior art keywords
motion vector
precision
vector precision
difference value
decoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910817030.4A
Other languages
Chinese (zh)
Other versions
CN110636290B (en
Inventor
马思伟
雷萌
罗法蕾
王苫社
高文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University
Peng Cheng Laboratory
Original Assignee
Peking University
Peng Cheng Laboratory
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University, Peng Cheng Laboratory filed Critical Peking University
Priority to CN201910817030.4A priority Critical patent/CN110636290B/en
Publication of CN110636290A publication Critical patent/CN110636290A/en
Application granted granted Critical
Publication of CN110636290B publication Critical patent/CN110636290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application provides a motion vector coding and decoding method of a video image, an encoder and a decoder. The method for encoding the motion vector of the video image comprises the following steps: selecting the motion vector precision with the minimum rate distortion cost as a first motion vector precision, judging the coding condition of a motion vector difference value, adjusting the first motion vector precision within a corresponding first motion vector precision set range according to the judgment result, determining a second motion vector precision, coding the motion vector difference value according to the second motion vector precision to obtain motion vector information, writing the motion vector information and an identifier corresponding to the first motion vector precision into a code stream, and then sending the code stream to a decoding end. By the scheme, the precision of the motion vector needing to be identified can be reduced, and the code rate and the coding time required by coding the motion vector are reduced while the predictive performance is maintained, so that the coding efficiency is improved, and the coding gain is brought.

Description

Video image motion vector encoding/decoding method and encoder/decoder
Technical Field
The present invention relates to the field of digital signal processing, and in particular, to a motion vector encoding/decoding method and encoder/decoder for video images.
Background
Predictive coding is a basic coding tool in video compression, and common predictive coding is inter-frame prediction and intra-frame prediction. Inter-frame prediction refers to using the correlation of video time domain and using the pixels adjacent to the coded image to predict the pixels of the current image so as to achieve the purpose of effectively removing the video time domain redundancy, and the basic principle is as follows: based on that a video sequence usually has strong temporal correlation, a best matching reference block is searched in a previously coded image for each current coding block of a current image, a pixel value of a pixel point in the reference block is used as a predicted value of a pixel point in the current coding block, and motion information of each current coding block is obtained, wherein displacement from the reference block to the current coding block is called a Motion Vector (MV), the coded image is also called a reference image, and the motion information comprises indication information and a motion vector MV of the reference image. Therefore, the encoding side does not need to send all information of each image to the decoding side, and only needs to transmit the motion information in the current image to the decoding side, and the decoding side can decode the current image according to the motion information.
Since the motion of a natural object is continuous, most of the time it is not exactly the distance of moving the whole pixel level, and therefore, if the motion vector uses the precision of the whole pixel, it may not be possible to accurately describe the motion of the object in many cases. The problem can be solved well by increasing the accuracy of the motion vector, i.e. artificially interpolating the value of each sub-pixel position between the integer pixel and the integer pixel, for example, 1/2 pixel accuracy is to upsample the image by 2 times in both the horizontal and vertical directions, 1/4 pixel accuracy is to upsample the image by 4 times in both the horizontal and vertical directions, and 1/2 pixel accuracy or 1/4 pixel accuracy can be used for the motion vector.
Fixed 1/4 pixel accuracy is used in both AVS (Audio Video Coding Standard) and HEVC (High Efficiency Video Coding). The high-precision motion vector can better approach the real motion situation, and the prediction performance is improved; on the other hand, however, a high-precision motion vector requires more bits to encode the motion vector. The AVS2 uses the asymptotic motion vector precision, and the 1/4 pixel precision can be adaptively adjusted to 1/2 pixel precision according to the range of the motion vector difference value. Adaptive motion vector accuracy is adopted in both AVS3 and VVC (Versatile Video Coding) Video codec standards, 1/4,1/2,1,2,4 kinds of motion vector accuracy are adopted in AVS3, and 1/4,1,4 kinds of motion vector accuracy are adopted in VVC. On one hand, the precision of various self-adaptive motion vectors is high in complexity, and on the other hand, some motion vectors are low in prediction efficiency and bring extra bit cost, so that the proportion of motion vector information in a code stream is continuously increased, and therefore, how to effectively compress the motion vector information becomes a key for further improving the video compression efficiency.
Disclosure of Invention
The present application provides a method and an encoder for encoding a motion vector of a video image, and a method and a decoder for decoding a motion vector of a video image.
A first aspect of the present application provides a method for encoding a motion vector of a video image, including:
constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier;
obtaining a motion vector difference value of a current coding block in a current image according to a reference image;
calculating the rate distortion cost of coding the motion vector difference value by using each motion vector precision in the second motion vector precision set, and selecting the motion vector precision with the minimum rate distortion cost as the first motion vector precision;
judging the coding condition of the motion vector difference value, and adjusting the first motion vector precision within a corresponding first motion vector precision set range according to the judgment result to determine a second motion vector precision;
and coding the motion vector difference value according to the second motion vector precision to obtain motion vector information, writing the motion vector information and the identifier corresponding to the first motion vector precision into a code stream, and then sending the code stream to a decoding end.
A second aspect of the present application provides a method for decoding a motion vector of a video image, including:
receiving code stream data sent by an encoding end;
detecting a motion vector precision identifier of a current decoding block in code stream data, and determining a first motion vector precision corresponding to the motion vector precision identifier; the corresponding relation between the motion vector precision identifier and the first motion vector precision is constructed by a coding end, and specifically comprises the following steps: constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier; the current decoding block belongs to a current image to be decoded;
judging decoding conditions of the first motion vector precision, and determining second motion vector precision used for encoding motion vector information in the code stream data, wherein the second motion vector precision belongs to a first motion vector precision set corresponding to the first motion vector precision;
and decoding the motion vector information according to the second motion vector precision to obtain a motion vector difference value of the current decoding block.
A third aspect of the present application provides an encoder comprising:
the device comprises a construction module, a calculation module and a calculation module, wherein the construction module is used for constructing a plurality of mutually disjoint first motion vector precision sets, the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier;
the motion vector module is used for obtaining a motion vector difference value of a current coding block in a current image according to a reference image; calculating the rate distortion cost of coding the motion vector difference value by using each motion vector precision in the second motion vector precision set, and selecting the motion vector precision with the minimum rate distortion cost as the first motion vector precision;
the coding condition module is used for judging the coding condition of the motion vector difference value, adjusting the first motion vector precision within a corresponding first motion vector precision set range according to the judgment result and determining second motion vector precision;
and the coding module is used for coding the motion vector difference value according to the second motion vector precision to obtain motion vector information, writing the motion vector information and the identifier corresponding to the first motion vector precision into a code stream, and then sending the code stream to a decoding end.
A fourth aspect of the present application provides a decoder comprising:
the receiving module is used for receiving code stream data sent by the encoding end;
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for detecting a motion vector precision identifier of a current decoding block in code stream data and determining first motion vector precision corresponding to the motion vector precision identifier; the corresponding relation between the motion vector precision identifier and the first motion vector precision is constructed by a coding end, and specifically comprises the following steps: constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier; the current decoding block belongs to a current image to be decoded;
a decoding condition module, configured to perform decoding condition judgment on the first motion vector precision, and determine a second motion vector precision used for encoding motion vector information in the code stream data, where the second motion vector precision belongs to a first motion vector precision set corresponding to the first motion vector precision;
and the decoding module is used for decoding the motion vector information according to the second motion vector precision to obtain a motion vector difference value of the current decoding block.
Compared with the prior art, the motion vector coding method of the video image selects the motion vector precision with the minimum rate distortion cost as the first motion vector precision, judges the coding condition of the motion vector difference, adjusts the first motion vector precision within the range of the corresponding first motion vector precision set according to the judgment result, determines the second motion vector precision, codes the motion vector difference according to the second motion vector precision to obtain the motion vector information, writes the motion vector information and the identifier corresponding to the first motion vector precision into the code stream, and sends the code stream to the decoding end. By the scheme, the precision of the motion vector needing to be identified can be reduced, and meanwhile, the precision of the motion vector is further adjusted at the encoding and decoding end according to the range of the motion vector difference value of the current encoding block, so that the code rate and the encoding time required by encoding the motion vector are reduced while the predictive performance is kept, the encoding efficiency is improved, and the encoding gain is brought.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 illustrates a flow chart of a method for encoding a motion vector of a video image according to some embodiments of the present application;
fig. 2 illustrates a flow chart of a method for decoding motion vectors of video images according to some embodiments of the present application;
FIG. 3 illustrates a schematic diagram of an encoder provided by some embodiments of the present application;
fig. 4 shows a schematic diagram of a decoder provided in some embodiments of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It is to be noted that, unless otherwise specified, technical or scientific terms used herein shall have the ordinary meaning as understood by those skilled in the art to which this application belongs.
In addition, the terms "first" and "second", etc. are used to distinguish different objects, rather than to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The embodiments of the present application provide a method and an encoder for encoding a motion vector of a video image, and a method and a decoder for decoding a motion vector of a video image, which are described below with reference to the accompanying drawings.
Referring to fig. 1, which illustrates a flowchart of a method for encoding a motion vector of a video image according to some embodiments of the present application, as shown in the figure, the method for encoding a motion vector of a video image may include the following steps:
step S101: and constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to one identifier.
Taking AVS3 as an example, as shown in table 1, five kinds of motion vector precisions, 1/4,1/2,1,2,4, are used in AVS3 at present, the precision unit is one pixel unit, 5 kinds of motion vector precisions are selected at the encoding end by the rate distortion cost, and the corresponding motion vector precision is selected at the decoding end by decoding the corresponding flag. It can be seen that as the precision of the motion vector increases, the number of bits required for identification increases, more code rates are consumed, and more coding time is consumed.
Identification 0 1 2 3 4
Motion vector accuracy 1/4 1/2 1 2 4
Bits 0 10 110 1110 1111
TABLE 1
In the present application, a plurality of motion vector precisions for encoding motion vectors are grouped to form a plurality of mutually disjoint motion vector precision sets, the minimum motion vector precision in each motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to one identifier.
For example, the 1/4 precision and the 1/2 precision are grouped into one group, the 1 precision and the 2 precision are grouped into one group, the 4 precision is separately grouped into one group, the minimum group in each group forms another motion vector precision set, and each group corresponds to one identifier, as shown in table 2, it can be seen that the consumption of bits is reduced after grouping the identifiers. It can be understood that the motion vector precisions divided into the same group share one identifier, each group may include more precisions, the number of specific groups may be determined according to actual situations, and the present application is not limited thereto.
Identification 0 1 2
Motion vector accuracy 1/4 1/2 1
Bits 0 10 110
TABLE 2
Step S102: and obtaining the motion vector difference value of the current coding block in the current image according to the reference image.
In the embodiment of the present application, step S102 specifically includes: and according to the reference image, obtaining a motion vector predicted value and a motion vector of a current coding block in the current image, and subtracting the motion vector predicted value from the motion vector to obtain the motion vector difference value. The step adopts a corresponding technology, which is not described in detail in the present application.
Step S103: and calculating the rate distortion cost of coding the motion vector difference value by using each motion vector precision in the second motion vector precision set, and selecting the motion vector precision with the minimum rate distortion cost as the first motion vector precision.
In the embodiment of the present application, the rate distortion cost is calculated by using a corresponding technique, which is not described in detail herein. Specifically, when the motion vector difference is coded, 1/4,1,4 precision coding is used respectively, the rate distortion cost under each precision is calculated, the precision with the minimum rate distortion cost is coded according to the coding mode in table 2, and the identifier of the precision is written into the code stream.
Step S104: and judging the coding condition of the motion vector difference value, adjusting the first motion vector precision within the corresponding first motion vector precision set range according to the judgment result, and determining the second motion vector precision.
In the embodiment of the application, the precision with the minimum rate distortion cost in the above steps is used as an optimal motion vector precision candidate, and the motion vector difference is subjected to coding condition judgment to further adjust the motion vector precision. For example, the precision with the minimum rate-distortion cost is 1/4, and when the motion vector difference is determined by the encoding condition and the determination result is that 1/2 precision encoding of the same group is used, the prediction performance can be maintained, and the code rate can be further reduced, so that 1/2 motion vector precision is adopted in actual encoding.
Thus, in some embodiments of the present application, step S104 may be implemented as: and aligning the motion vector predicted value under the first motion vector precision to a second motion vector precision, calculating to obtain a motion vector difference under the second motion vector precision, and judging whether the motion vector difference under the second motion vector precision is greater than a preset precision judgment threshold value or not. And if so, adjusting the first motion vector precision to the second motion vector precision.
The specific conditions are as follows:
inputting: MV, MVP, CTR, TH
And (3) outputting: MVD
–If|MVx-CTRx|>TH
–MVDx=(MVx+CTRx+sign(MVx-CTRx)*TH)/2–MVPx
–MVDy=(Mvy–CTRy)/2
–Elseif|MVy-CTRy|>TH
–MVDx=(MVx–CTRx)/2
–MVDy=(MVy+CTRy+sign(MVy-CTRy)*TH)/2–MVPy
–Else
–MVDx=MVx–MVPx
–MVDy=MVy–MVPy
In the above conditions, MV is a motion vector, MVP is a motion vector predictor, CTR indicates that the first motion vector precision is aligned to the second motion vector precision, TH is a preset precision decision threshold, and MVD is a motion vector difference.
Step S105: and coding the motion vector difference value according to the second motion vector precision to obtain motion vector information, writing the motion vector information and the identifier corresponding to the first motion vector precision into a code stream, and then sending the code stream to a decoding end.
Compared with the prior art, the motion vector decoding method of the video image selects the motion vector precision with the minimum rate distortion cost as the first motion vector precision, judges the coding condition of the motion vector difference, adjusts the first motion vector precision within the range of the corresponding first motion vector precision set according to the judgment result, determines the second motion vector precision, codes the motion vector difference according to the second motion vector precision to obtain the motion vector information, writes the motion vector information and the identifier corresponding to the first motion vector precision into the code stream, and sends the code stream to the decoding end. By the scheme, the precision of the motion vector needing to be identified can be reduced, and meanwhile, the precision of the motion vector is further adjusted at the encoding and decoding end according to the range of the motion vector difference value of the current encoding block, so that the code rate and the encoding time required by encoding the motion vector are reduced while the predictive performance is kept, the encoding efficiency is improved, and the encoding gain is brought.
In the above embodiments, a method for encoding a motion vector of a video image is provided, and correspondingly, the present application also provides a method for decoding a motion vector of a video image, where a decoding end corresponds to an encoding end, and the embodiments are basically similar, so that the description is relatively simple, and the relevant points can be referred to the partial description of the embodiments of the encoding end. Referring to fig. 2, which illustrates a flowchart of a method for decoding a motion vector of a video image according to some embodiments of the present application, as shown in the figure, the method for decoding a motion vector of a video image may include the following steps:
step 201: and receiving code stream data sent by the encoding end.
Step 202: detecting a motion vector precision identifier of a current decoding block in code stream data, and determining a first motion vector precision corresponding to the motion vector precision identifier; the corresponding relation between the motion vector precision identifier and the first motion vector precision is constructed by a coding end, and specifically comprises the following steps: constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier; the current decoding block belongs to a current image to be decoded.
Step 203: and judging the decoding condition of the first motion vector precision, and determining a second motion vector precision used for encoding motion vector information in the code stream data, wherein the second motion vector precision belongs to a first motion vector precision set corresponding to the first motion vector precision.
In the embodiment of the present application, step 203 is specifically implemented as: calculating a first difference value of a motion vector predicted value under the first motion vector precision and a motion vector predicted value under the second motion vector precision, and judging whether the difference value between the motion vector difference value under the first motion vector precision and the first difference value is greater than a preset precision judgment threshold value or not; and if so, adjusting the first motion vector precision to the second motion vector precision for decoding. The specific conditions are as follows:
inputting: MVD, MVP, CTR, TH
And (3) outputting: MV (Medium Voltage) data base
–CTRDx=CTRx-MVPx
–CTRDy=CTRy-MVPy
–If|MVDx-CTRDx|>TH
–MVx=MVPx+MVDx*2-CTRDx-sign(MVDx-CTRDx)*TH
–MVy=MVPy+MVDy*2+CTRDy
–Elseif|MVDy-CTRDy|>TH
–MVx=MVPx+MVDx*2+CTRDx
–MVy=MVPy+MVDy*2-CTRDy-sign(MVDy-CTRDy)*TH
–Else
–MVx=MVDx+MVPx
–MVy=MVDy+MVPy
Step 204: and decoding the motion vector information according to the second motion vector precision to obtain a motion vector difference value of the current decoding block.
The method for encoding a motion vector of a video image provided by the embodiment of the present application and the method for decoding a motion vector of a video image provided by the foregoing embodiment of the present application have the same advantages and are based on the same inventive concept.
In the above embodiments, a method for encoding a motion vector of a video image and a method for decoding a motion vector of a video image are provided, and accordingly, an encoder and a decoder are provided. The encoder provided by the embodiment of the present application may implement the motion vector encoding method of the video image, and the decoder provided by the embodiment of the present application may implement the motion vector decoding method of the video image. Please refer to fig. 3, which illustrates a schematic diagram of an encoder according to some embodiments of the present application. Please refer to fig. 4, which illustrates a schematic diagram of a decoder according to some embodiments of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
As shown in fig. 3, the encoder 10 may include:
a constructing module 101, configured to construct a plurality of mutually disjoint first motion vector precision sets, where a minimum motion vector precision in each first motion vector precision set constitutes a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier;
a motion vector module 102, configured to obtain a motion vector difference of a current coding block in a current image according to a reference image; calculating the rate distortion cost of coding the motion vector difference value by using each motion vector precision in the second motion vector precision set, and selecting the motion vector precision with the minimum rate distortion cost as the first motion vector precision;
the encoding condition module 103 is configured to perform encoding condition judgment on the motion vector difference, adjust the first motion vector precision within a corresponding first motion vector precision set range according to a judgment result, and determine a second motion vector precision;
and the encoding module 104 is configured to encode the motion vector difference according to the second motion vector precision to obtain motion vector information, write an identifier corresponding to the motion vector information and the first motion vector precision into a code stream, and send the code stream to a decoding end.
In some implementations of the embodiments of the present application, the motion vector module 102 is specifically configured to:
according to the reference image, obtaining a motion vector predicted value and a motion vector of a current coding block in the current image;
and subtracting the motion vector predicted value from the motion vector to obtain the motion vector difference value.
In some implementations of the embodiments of the present application, the encoding condition module 103 is specifically configured to:
aligning the motion vector predicted value under the first motion vector precision to the second motion vector precision, and calculating to obtain a motion vector difference under the second motion vector precision;
judging whether the motion vector difference value under the second motion vector precision is larger than a preset precision judgment threshold value or not; and if so, adjusting the first motion vector precision to the second motion vector precision.
The encoder 10 provided in the embodiment of the present application has the same advantageous effects as the method for encoding a motion vector of a video image provided in the foregoing embodiment of the present application.
As shown in fig. 4, the decoder 20 may include:
a receiving module 201, configured to receive code stream data sent by an encoding end;
a determining module 202, configured to detect a motion vector precision identifier of a current decoding block in code stream data, and determine a first motion vector precision corresponding to the motion vector precision identifier; the corresponding relation between the motion vector precision identifier and the first motion vector precision is constructed by a coding end, and specifically comprises the following steps: constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier; the current decoding block belongs to a current image to be decoded;
a decoding condition module 203, configured to perform decoding condition judgment on the first motion vector precision, and determine a second motion vector precision used for encoding motion vector information in the code stream data, where the second motion vector precision belongs to a first motion vector precision set corresponding to the first motion vector precision;
and the decoding module 204 is configured to decode the motion vector information according to the second motion vector precision to obtain a motion vector difference of the current decoded block.
In some implementations of the embodiments of the present application, the decoding condition module 203 is specifically configured to:
calculating a first difference value between the motion vector predicted value under the first motion vector precision and the motion vector predicted value under the second motion vector precision;
judging whether the difference value between the motion vector difference value under the first motion vector precision and the first difference value is larger than a preset precision judgment threshold value or not; and if so, adjusting the first motion vector precision to the second motion vector precision for decoding.
The decoder 20 provided in the embodiment of the present application has the same advantageous effects as the motion vector decoding method of the video image provided in the foregoing embodiment of the present application.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present disclosure, and the present disclosure should be construed as being covered by the claims and the specification.

Claims (10)

1. A method for motion vector encoding of a video image, comprising:
constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier;
obtaining a motion vector difference value of a current coding block in a current image according to a reference image;
calculating the rate distortion cost of coding the motion vector difference value by using each motion vector precision in the second motion vector precision set, and selecting the motion vector precision with the minimum rate distortion cost as the first motion vector precision;
judging the coding condition of the motion vector difference value, and adjusting the first motion vector precision within a corresponding first motion vector precision set range according to the judgment result to determine a second motion vector precision;
and coding the motion vector difference value according to the second motion vector precision to obtain motion vector information, writing the motion vector information and the identifier corresponding to the first motion vector precision into a code stream, and then sending the code stream to a decoding end.
2. The method of claim 1, wherein obtaining the motion vector difference value of the current coding block in the current picture according to the reference picture comprises:
according to the reference image, obtaining a motion vector predicted value and a motion vector of a current coding block in the current image;
and subtracting the motion vector predicted value from the motion vector to obtain the motion vector difference value.
3. The method according to claim 2, wherein said determining the encoding condition of the motion vector difference value and adjusting the first motion vector precision within the range of the corresponding first motion vector precision set according to the determination result to determine the second motion vector precision comprises:
aligning the motion vector predicted value under the first motion vector precision to the second motion vector precision, and calculating to obtain a motion vector difference under the second motion vector precision;
judging whether the motion vector difference value under the second motion vector precision is larger than a preset precision judgment threshold value or not; and if so, adjusting the first motion vector precision to the second motion vector precision.
4. A method for decoding a motion vector of a video picture, comprising:
receiving code stream data sent by an encoding end;
detecting a motion vector precision identifier of a current decoding block in code stream data, and determining a first motion vector precision corresponding to the motion vector precision identifier; the corresponding relation between the motion vector precision identifier and the first motion vector precision is constructed by a coding end, and specifically comprises the following steps: constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier; the current decoding block belongs to a current image to be decoded;
judging decoding conditions of the first motion vector precision, and determining second motion vector precision used for encoding motion vector information in the code stream data, wherein the second motion vector precision belongs to a first motion vector precision set corresponding to the first motion vector precision;
and decoding the motion vector information according to the second motion vector precision to obtain a motion vector difference value of the current decoding block.
5. The method of claim 4, wherein said determining a decoding condition for the first motion vector precision and determining a second motion vector precision used for encoding motion vector information in the code stream data comprises:
calculating a first difference value between the motion vector predicted value under the first motion vector precision and the motion vector predicted value under the second motion vector precision;
judging whether the difference value between the motion vector difference value under the first motion vector precision and the first difference value is larger than a preset precision judgment threshold value or not; and if so, adjusting the first motion vector precision to the second motion vector precision for decoding.
6. An encoder, comprising:
the device comprises a construction module, a calculation module and a calculation module, wherein the construction module is used for constructing a plurality of mutually disjoint first motion vector precision sets, the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier;
the motion vector module is used for obtaining a motion vector difference value of a current coding block in a current image according to a reference image; calculating the rate distortion cost of coding the motion vector difference value by using each motion vector precision in the second motion vector precision set, and selecting the motion vector precision with the minimum rate distortion cost as the first motion vector precision;
the coding condition module is used for judging the coding condition of the motion vector difference value, adjusting the first motion vector precision within a corresponding first motion vector precision set range according to the judgment result and determining second motion vector precision;
and the coding module is used for coding the motion vector difference value according to the second motion vector precision to obtain motion vector information, writing the motion vector information and the identifier corresponding to the first motion vector precision into a code stream, and then sending the code stream to a decoding end.
7. The encoder according to claim 6, wherein the motion vector module is specifically configured to:
according to the reference image, obtaining a motion vector predicted value and a motion vector of a current coding block in the current image;
and subtracting the motion vector predicted value from the motion vector to obtain the motion vector difference value.
8. The encoder according to claim 7, wherein the encoding condition module is specifically configured to:
aligning the motion vector predicted value under the first motion vector precision to the second motion vector precision, and calculating to obtain a motion vector difference under the second motion vector precision;
judging whether the motion vector difference value under the second motion vector precision is larger than a preset precision judgment threshold value or not; and if so, adjusting the first motion vector precision to the second motion vector precision.
9. A decoder, comprising:
the receiving module is used for receiving code stream data sent by the encoding end;
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for detecting a motion vector precision identifier of a current decoding block in code stream data and determining first motion vector precision corresponding to the motion vector precision identifier; the corresponding relation between the motion vector precision identifier and the first motion vector precision is constructed by a coding end, and specifically comprises the following steps: constructing a plurality of mutually disjoint first motion vector precision sets, wherein the minimum motion vector precision in each first motion vector precision set forms a second motion vector precision set, and each minimum motion vector precision corresponds to an identifier; the current decoding block belongs to a current image to be decoded;
a decoding condition module, configured to perform decoding condition judgment on the first motion vector precision, and determine a second motion vector precision used for encoding motion vector information in the code stream data, where the second motion vector precision belongs to a first motion vector precision set corresponding to the first motion vector precision;
and the decoding module is used for decoding the motion vector information according to the second motion vector precision to obtain a motion vector difference value of the current decoding block.
10. The decoder according to claim 9, wherein the decoding condition module is specifically configured to:
calculating a first difference value between the motion vector predicted value under the first motion vector precision and the motion vector predicted value under the second motion vector precision;
judging whether the difference value between the motion vector difference value under the first motion vector precision and the first difference value is larger than a preset precision judgment threshold value or not; and if so, adjusting the first motion vector precision to the second motion vector precision for decoding.
CN201910817030.4A 2019-08-30 2019-08-30 Video image motion vector encoding/decoding method and encoder/decoder Active CN110636290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910817030.4A CN110636290B (en) 2019-08-30 2019-08-30 Video image motion vector encoding/decoding method and encoder/decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910817030.4A CN110636290B (en) 2019-08-30 2019-08-30 Video image motion vector encoding/decoding method and encoder/decoder

Publications (2)

Publication Number Publication Date
CN110636290A true CN110636290A (en) 2019-12-31
CN110636290B CN110636290B (en) 2021-12-03

Family

ID=68969759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910817030.4A Active CN110636290B (en) 2019-08-30 2019-08-30 Video image motion vector encoding/decoding method and encoder/decoder

Country Status (1)

Country Link
CN (1) CN110636290B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911313A (en) * 2021-01-14 2021-06-04 北京博雅慧视智能技术研究院有限公司 Sub-pixel motion estimation method and circuit device thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2466894A2 (en) * 2003-09-07 2012-06-20 Microsoft Corporation Advanced bi-directional predictive coding of interlaced video
CN102595135A (en) * 2012-02-24 2012-07-18 中国科学技术大学 Method and device for scalable video coding
CN102638678A (en) * 2011-02-12 2012-08-15 乐金电子(中国)研究开发中心有限公司 Video encoding and decoding interframe image predicting method and video codec
US20140003524A1 (en) * 2010-09-02 2014-01-02 Lg Electronics (China) R&D Center Co., Ltd. Inter picture prediction method for video coding and decoding and codec
CN103533376A (en) * 2012-07-02 2014-01-22 华为技术有限公司 Method and apparatus for motion information processing of interframe prediction coding, and coding and decoding system
CN110166778A (en) * 2018-02-12 2019-08-23 华为技术有限公司 Video encoding/decoding method, Video Decoder and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2466894A2 (en) * 2003-09-07 2012-06-20 Microsoft Corporation Advanced bi-directional predictive coding of interlaced video
US20140003524A1 (en) * 2010-09-02 2014-01-02 Lg Electronics (China) R&D Center Co., Ltd. Inter picture prediction method for video coding and decoding and codec
CN102638678A (en) * 2011-02-12 2012-08-15 乐金电子(中国)研究开发中心有限公司 Video encoding and decoding interframe image predicting method and video codec
CN102595135A (en) * 2012-02-24 2012-07-18 中国科学技术大学 Method and device for scalable video coding
CN103533376A (en) * 2012-07-02 2014-01-22 华为技术有限公司 Method and apparatus for motion information processing of interframe prediction coding, and coding and decoding system
CN110166778A (en) * 2018-02-12 2019-08-23 华为技术有限公司 Video encoding/decoding method, Video Decoder and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911313A (en) * 2021-01-14 2021-06-04 北京博雅慧视智能技术研究院有限公司 Sub-pixel motion estimation method and circuit device thereof
CN112911313B (en) * 2021-01-14 2023-06-02 北京博雅慧视智能技术研究院有限公司 Sub-pixel motion estimation method and circuit device thereof

Also Published As

Publication number Publication date
CN110636290B (en) 2021-12-03

Similar Documents

Publication Publication Date Title
AU2020207857B2 (en) Image encoding method and apparatus, and image decoding method and apparatus
CN102833533B (en) Video decoding apparatus and video decoding method
US6498810B1 (en) Method for motion vector coding of MPEG-4
CN102860006A (en) Managing predicted motion vector candidates
JP2013225892A (en) Direct mode coding and decoding device
US20140286429A1 (en) Moving picture coding device, moving picture coding method, and moving picture coding program, and moving picture decoding device, moving picture decoding method, and moving picture decoding program
US11930205B2 (en) Side motion refinement in video encoding/decoding systems
CN103081466A (en) Method and system for encoding video frames using a plurality of processors
CN110636290B (en) Video image motion vector encoding/decoding method and encoder/decoder
JP2016042727A (en) Moving picture coding device, moving picture coding method and moving picture coding program, and transmission device, transmission method and transmission program
CN113727118B (en) Decoding method, encoding method, device, equipment and machine readable storage medium
EP3741122A1 (en) Restricted overlapped block motion compensation
CN101653008A (en) Method and an apparatus for processing a video signal
JP2013153431A (en) Video decoding device, video decoding method, and video decoding program
US20220103826A1 (en) Encoding/decoding method and apparatus for motion vector information
CN112449180A (en) Encoding and decoding method, device and equipment
CN103916672A (en) Data coding and decoding method, related device and system
CN110868611B (en) Video encoding and decoding methods and devices
CN113382248B (en) Interframe prediction value correction method, encoder and computer-readable storage medium
KR100668463B1 (en) Method for Selecting Multiple Reference Frame in Moving Pictures Data Encoding
US20150092857A1 (en) Methods for Encoding Motion Vectors
Li et al. A One-dimensional HEVC video steganalysis method using the Optimality of Predicted Motion Vectors
JP2016027768A (en) Video decoding device, video decoding method, video decoding program, receiving device, receiving method, and receiving program
CN117156153A (en) HEVC (high efficiency video coding) steganalysis method utilizing optimality of prediction motion vector
JP2012235278A (en) Moving image encoding apparatus, moving image encoding method and moving image encoding program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant