CN110859057A - Motion vector determination method, apparatus, and machine-readable storage medium - Google Patents
Motion vector determination method, apparatus, and machine-readable storage medium Download PDFInfo
- Publication number
- CN110859057A CN110859057A CN201880038850.7A CN201880038850A CN110859057A CN 110859057 A CN110859057 A CN 110859057A CN 201880038850 A CN201880038850 A CN 201880038850A CN 110859057 A CN110859057 A CN 110859057A
- Authority
- CN
- China
- Prior art keywords
- motion vector
- block
- coded
- determining
- sub
- 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.)
- Pending
Links
- 239000013598 vector Substances 0.000 title claims abstract description 678
- 238000000034 method Methods 0.000 title claims abstract description 74
- 238000011156 evaluation Methods 0.000 claims abstract description 163
- 230000001186 cumulative effect Effects 0.000 description 38
- 238000010586 diagram Methods 0.000 description 17
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000006073 displacement reaction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
A motion vector determination method, apparatus and machine-readable storage medium, the method comprising: determining a candidate motion vector (101) from the motion vector of the encoded block; acquiring an evaluation parameter of a candidate motion vector and an evaluation parameter of an externally input global motion vector (102); if the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector, determining the candidate motion vector as a target motion vector of a block to be coded (103); and if the evaluation parameter of the global motion vector is superior to that of the candidate motion vector, determining the global motion vector as a target motion vector of the block to be coded (104). The method can reduce the search interval and the search times, improve the accuracy of motion search, improve the search efficiency, reduce the search resource consumption, improve the coding efficiency and improve the coding quality.
Description
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for determining a motion vector, and a machine-readable storage medium.
In order to achieve the purpose of saving space, video images are transmitted after being coded, and the complete video coding method comprises prediction, transformation, quantization, entropy coding, filtering and the like. The predictive coding comprises intra-frame coding and inter-frame coding, wherein the inter-frame coding is to use the correlation of a video time domain and use the pixels adjacent to a coded image to predict the pixels of a current image so as to achieve the aim of effectively removing the video time domain redundancy.
In inter-frame coding, a Motion Vector (MV) may be used to represent a relative displacement between a block to be coded of a current frame picture and a predictive coding block of a reference frame picture. For example, when an image block a1 of image a is transmitted, a motion search may be performed in image B to find an image block B1 matching image block a1, and determine the relative displacement between image block a1 and image block B1, which is the motion vector of image block a 1. The encoding end may send the motion vector to the decoding end, instead of sending the image block a1 to the decoding end, and the decoding end reconstructs the image block a1 according to the motion vector and the image block B1. Obviously, since the number of bits occupied by the motion vector is smaller than the number of bits occupied by the image block a1, a large number of bits can be saved.
For the process of performing a motion search in image B to find image block B1 that best matches image block a1, an externally input global motion vector may be received, and a search may be performed in a smaller area nearby with the global motion vector pointed to as the search starting point, to search for image block B1 that best matches image block a 1. However, if the global motion vector is inaccurate, the difference between the search area and the actual optimal search area may be relatively large, which seriously affects the search efficiency and even brings about a great reduction in the coding efficiency.
Disclosure of Invention
The invention provides a motion vector determination method, a motion vector determination device and a machine-readable storage medium, which can reduce search intervals and search times and can improve search efficiency and coding efficiency.
In a first aspect of the present invention, a method for determining a motion vector is provided, where the method includes:
determining candidate motion vectors according to the motion vectors of the coded blocks;
obtaining the evaluation parameters of the candidate motion vectors and the evaluation parameters of the externally input global motion vectors;
if the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector, determining the candidate motion vector as a target motion vector of a block to be coded;
and if the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector, determining the global motion vector as a target motion vector of the block to be coded.
In a second aspect of the present invention, a motion vector determining method is provided, where the method includes:
selecting at least one coded block associated with a block to be coded;
aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;
and determining the target motion vector of the block to be coded by using the average motion vector of each coded block.
In a third aspect of the present invention, there is provided a motion vector determination device comprising: a memory and a processor; the memory for storing program code; the processor to invoke the program code, the processor to perform the following when the program code is executed:
determining candidate motion vectors according to the motion vectors of the coded blocks;
obtaining the evaluation parameters of the candidate motion vectors and the evaluation parameters of the externally input global motion vectors;
if the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector, determining the candidate motion vector as a target motion vector of a block to be coded;
and if the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector, determining the global motion vector as a target motion vector of the block to be coded.
In a fourth aspect of the present invention, there is provided a motion vector determination device comprising: a memory and a processor; the memory for storing program code; the processor to invoke the program code, the processor to perform the following when the program code is executed:
selecting at least one coded block associated with a block to be coded;
aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;
and determining the target motion vector of the block to be coded by using the average motion vector of each coded block.
In a fifth aspect of the present invention, a machine-readable storage medium is provided, on which computer instructions are stored, and when the computer instructions are executed, the method for determining a motion vector is implemented.
Based on the technical scheme, in the embodiment of the invention, the candidate motion vector can be determined according to the motion vector of the coded block, the evaluation parameter of the candidate motion vector and the evaluation parameter of the global motion vector are obtained, and if the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector, the candidate motion vector is determined as the target motion vector of the block to be coded; and if the evaluation parameter of the global motion vector is superior to that of the candidate motion vector, determining the global motion vector as the target motion vector of the block to be coded. In the above manner, whether the global motion vector is reliable or not may be evaluated by using the candidate motion vector, if the global motion vector is reliable, the global motion vector is determined as the target motion vector of the block to be encoded, that is, the search is performed with the global motion vector pointing position as the search starting point, and if the global motion vector is unreliable, the candidate motion vector is determined as the target motion vector of the block to be encoded, that is, the search is performed with the candidate motion vector pointing position as the search starting point. By the method, the search interval and the search frequency can be reduced, the accuracy of motion search is improved, the search efficiency is improved, the search resource consumption is reduced, the coding efficiency is improved, and the coding quality is improved.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments of the present invention or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings may be obtained according to the drawings of the embodiments of the present invention.
FIG. 1 is a schematic diagram of an embodiment of a motion vector determination method;
FIG. 2 is a schematic diagram of another embodiment of a motion vector determination method;
FIG. 3 is a schematic diagram of partitioning encoded blocks;
FIG. 4 is a schematic diagram of an embodiment of another motion vector determination method;
FIG. 5 is a schematic diagram of an embodiment of another motion vector determination method;
FIG. 6 is a schematic diagram of an embodiment of another motion vector determination method;
FIG. 7 is a schematic diagram of an embodiment of another motion vector determination method;
fig. 8 is a schematic diagram of an embodiment of a motion vector determination device.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. In addition, the features in the embodiments and the examples described below may be combined with each other without conflict.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein and in the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
Although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. Depending on the context, moreover, the word "if" may be used is interpreted as "at … …," or "at … …," or "in response to a determination.
Example 1:
an embodiment of the present invention provides a motion vector determining method, configured to determine a target motion vector of a block to be encoded, and refer to fig. 1, which is a schematic flow diagram of the motion vector determining method, where the method includes:
Wherein, determining the candidate motion vector according to the motion vector of the encoded block may include, but is not limited to:
the first method is as follows: and selecting a coded block adjacent to the to-be-coded block from the current frame image to which the to-be-coded block belongs, and determining the motion vector of the selected coded block as a candidate motion vector of the to-be-coded block.
The second method comprises the following steps: and selecting at least one coded block associated with the block to be coded. And aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block. After obtaining the average motion vector of each encoded block, the candidate motion vector of the block to be encoded may be determined by using the average motion vector of each encoded block.
In one example, the selecting of the at least one encoded block associated with the block to be encoded may include, but is not limited to: selecting at least one coded block from a current frame image to which the to-be-coded block belongs; and/or selecting at least one coded block from a reference frame image corresponding to the block to be coded.
In one example, a sub image block of an encoded block may comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
In one example, determining the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block may include, but is not limited to: and aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using the motion vector of the sub image block and the number of pixel points of the sub image block. In addition, the number of pixel points of each sub-image block is used for determining a second accumulated value. After the first and second accumulated values of each sub image block are obtained, an average motion vector may be determined according to the first and second accumulated values of each sub image block.
In one example, determining the candidate motion vector of the block to be encoded by using the average motion vector of each encoded block may include, but is not limited to: and obtaining the motion vector average value by using the average motion vector of each coded block, and determining the motion vector average value as a candidate motion vector of the block to be coded.
In one example, the obtaining of the evaluation parameter of the candidate motion vector and the evaluation parameter of the externally input global motion vector may include, but is not limited to: selecting at least one coded block from a current frame image to which a to-be-coded block belongs; then, for each selected encoded block, the motion vector of the sub image block of the encoded block and the number of pixels of the sub image block may be used to determine the average motion vector of the encoded block. After the average motion vector of each encoded block is obtained, the average motion vector of each encoded block may be used to determine the evaluation parameters of the candidate motion vectors and the evaluation parameters of the global motion vector.
Wherein the sub image block of the encoded block may include: and dividing the coded blocks by using a specific division mode to obtain sub image blocks, wherein the specific division mode can comprise at least one division mode.
In one example, determining the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block may include, but is not limited to: for each sub image block of the encoded block, a first cumulative value of the sub image block may be determined by using the motion vector of the sub image block and the number of pixels of the sub image block. In addition, the number of pixel points of each sub-image block is used for determining a second accumulated value. After the first and second accumulated values of each sub image block are obtained, an average motion vector may be determined from the first and second accumulated values of each sub image block.
In one example, the average motion vector of each encoded block is used to determine the evaluation parameters of the candidate motion vector and the evaluation parameters of the global motion vector, including but not limited to: determining a first distance between the average motion vector and the candidate motion vector and a second distance between the average motion vector and the global motion vector aiming at the average motion vector of each coded block; if the first distance is smaller than the second distance, increasing the evaluation parameter of the candidate motion vector (for example, adding 1 to the evaluation parameter of the candidate motion vector); if the first distance is greater than the second distance, the evaluation parameter of the global motion vector is increased (for example, the evaluation parameter of the global motion vector is increased by 1).
In one example, determining a first distance of the average motion vector from the candidate motion vector and a second distance of the average motion vector from the global motion vector may include, but is not limited to: an absolute value of a difference between the average motion vector and the candidate motion vector may be determined as a first distance, and an absolute value of a difference between the average motion vector and the global motion vector may be determined as a second distance.
In the above embodiment, if the evaluation parameter of the candidate motion vector is greater than the evaluation parameter of the global motion vector, it is determined that the evaluation parameter of the candidate motion vector is better than the evaluation parameter of the global motion vector; and if the evaluation parameter of the candidate motion vector is smaller than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector.
And step 104, determining the global motion vector as a target motion vector of the block to be coded. That is, the motion search may be performed with the global motion vector pointing position as a search start point, which is not limited thereto.
Based on the mode, whether the global motion vector is reliable or not can be evaluated by using the candidate motion vector, if the global motion vector is reliable, the global motion vector is determined as the target motion vector of the block to be coded, the searching is carried out by taking the global motion vector pointing position as a searching starting point, if the global motion vector is unreliable, the candidate motion vector is determined as the target motion vector of the block to be coded, and the searching is carried out by taking the candidate motion vector pointing position as the searching starting point. By the method, the search interval and the search frequency are reduced, the accuracy of motion search is improved, the search efficiency is improved, the search resource consumption is reduced, the coding efficiency is improved, and the coding quality is improved.
Example 2:
on the basis of embodiment 1, the motion vector determination method is described in detail below with reference to specific application scenarios, and the method can be applied to scenarios such as an encoder, a camera, an unmanned aerial vehicle, an automobile driving assistance device, and a video recording device with a pan/tilt head. Referring to fig. 2, a flow chart of the method is shown.
The pan-tilt equipment or other control equipment can obtain a global motion vector (representing the average displacement of a reference frame image of a current frame image) according to the attitude information or motion information of the camera, and output the global motion vector to an encoder (taking the encoder as an example), so that the encoder can obtain the externally input global motion vector, and perform motion search in the reference frame image by taking the global motion vector pointing position as a search starting point, thereby finding a predictive coding block which is most matched with a block to be coded in the reference frame image.
However, if the global motion vector is inaccurate, the difference between the search area and the actual optimal search area may be relatively large, which seriously affects the search efficiency and greatly reduces the coding efficiency. Based on this, in this embodiment, after obtaining the global motion vector, instead of directly taking the global motion vector pointing position as the search starting point to perform motion search in the reference frame image, the subsequent steps are adopted to determine the target motion vector, and the target motion vector pointing position is taken as the search starting point to perform motion search in the reference frame image.
In step 202, at least one coded block associated with a block to be coded is selected from a reference frame image corresponding to the block to be coded, for example, all coded blocks in the reference frame image may be selected.
For example, assuming that the current coding frame is an mth frame and the current block to be coded is an nth coding block of the mth frame, the reference frame image may be determined to be an M-1 th frame, and of course, other frames may also be used, which is not limited thereto. Then, all the coding blocks of the M-1 th frame may be determined as coded blocks associated with the to-be-coded blocks, for example, coding block A1-coding block a100 of the M-1 th frame may be determined as coded blocks.
For the selected coding block a1, all sub image blocks of the coding block a1 are determined first, that is, all sub image blocks obtained by dividing the coding block a1 in a specific division manner are determined. For example, referring to fig. 3, as several examples of the specific division manner, the specific division manner may include an undivided division (as shown in (a) of fig. 3), a vertical division (as shown in (b) of fig. 3), a horizontal division (as shown in (c) of fig. 3), a quad division (as shown in (d) of fig. 3), a left-side asymmetric division (as shown in (e) of fig. 3), a right-side asymmetric division (as shown in (f) of fig. 3), an upper-side asymmetric division (as shown in (g) of fig. 3), and a lower-side asymmetric division (as shown in (h) of fig. 3). Of course, the above is only an example of a specific division manner, and no limitation is made to this.
In the process of processing the encoded block a1, it is assumed that the encoding block a1 is divided by a vertical division method to obtain a sub image block a11 and a sub image block a12, the encoding block a1 is divided by a horizontal division method to obtain a sub image block a13 and a sub image block a14, and the encoding block a1 is divided by a quad-division method to obtain a sub image block a15, a sub image block a16, a sub image block a17, and a sub image block a 18. In this way, sub-picture blocks a 11-sub-picture block a18 may be determined to be all sub-picture blocks of coded block a 1.
Then, the motion vector of the sub image block a11 and the number of pixels of the sub image block a11 may be used to determine a first cumulative value 1 of the sub image block a11, for example, the first cumulative value 1 is equal to the motion vector of the sub image block a11 multiplied by the number of pixels of the sub image block a 11; determining a first cumulative value 2 of the sub image block A12 by using the motion vector of the sub image block A12 and the number of pixels of the sub image block A12, if the first cumulative value 2 is equal to the number of pixels of the sub image block A12 multiplied by the motion vector of the sub image block A12; in this way, the motion vector of the sub image block a18 and the number of pixels of the sub image block a18 are used to determine the first cumulative value 8 of the sub image block a18, and if the first cumulative value 8 is equal to the number of pixels of the sub image block a18 multiplied by the motion vector of the sub image block a 18. In summary, the first integrated value 1 of sub image block a11, the first integrated value 2 of sub image block a12, the first integrated value 3 of sub image block a13, the first integrated value 4 of sub image block a14, the first integrated value 5 of sub image block a15, the first integrated value 6 of sub image block a16, the first integrated value 7 of sub image block a17, and the first integrated value 8 of sub image block a18 can be obtained.
The number of pixels in the sub image block a11 — the number of pixels in the sub image block a18 may also be used to determine a second cumulative value of all the sub image blocks, for example, the second cumulative value is equal to the number of pixels in the sub image block a11 and the number of pixels in the sub image block a 12.
Then, the average motion vector of the encoding block a1 may be determined using the first cumulative value and the second cumulative value of each sub image block, that is, may be the average of the first cumulative values. For example, the average motion vector of the code block a1 may be equal to (the first cumulative value 1+ the first cumulative value 2+ the first cumulative value 3+ the first cumulative value 4+ the first cumulative value 5+ the first cumulative value 6+ the first cumulative value 7+ the first cumulative value 8) divided by the second cumulative value.
In the above embodiment, since the motion vector may generally include two motion vector components (X, Y), the first cumulative value 1 may include the motion vector component X of the sub image block a11 multiplied by the number of pixels of the sub image block a11, and the motion vector component Y of the sub image block a11 multiplied by the number of pixels of the sub image block a11, and other cases of the first cumulative value are similar, and will not be described again here. Thus, the first cumulative value of each sub image block may include an X component cumulative value (i.e., the cumulative value obtained by multiplying the motion vector component X by the number of pixels) and a Y component cumulative value (i.e., the cumulative value obtained by multiplying the motion vector component Y by the number of pixels), and then the sum of the X component cumulative values of all sub image blocks is divided by the second cumulative value to obtain the X component of the average motion vector of the encoding block a1, and the sum of the Y component cumulative values of all sub image blocks is divided by the second cumulative value to obtain the Y component of the average motion vector of the encoding block a 1.
In the above embodiment, three accumulators, which may be respectively referred to as accumulator 1, accumulator 2 and accumulator 3, may be used, and when the motion search of the sub image block a11 is completed, accumulator 1 is used to accumulate the product of the motion vector component X of the sub image block a11 and the number of pixels of the sub image block a11, accumulator 2 is used to accumulate the product of the motion vector component Y of the sub image block a11 and the number of pixels of the sub image block a11, and accumulator 3 is used to accumulate the number of pixels of the sub image block a 11. In addition, when the motion search of sub image block a12 is completed, accumulator 1 is used to accumulate the product of motion vector component X of sub image block a12 and the number of pixels of sub image block a12, accumulator 2 is used to accumulate the product of motion vector component Y of sub image block a12 and the number of pixels of sub image block a12, and accumulator 3 is used to accumulate the number of pixels of sub image block a 12. By analogy, when the motion search of the sub image block a18 is completed, the accumulator 1 is used to accumulate the product of the motion vector component X of the sub image block a18 and the number of pixels of the sub image block a18, the accumulator 2 is used to accumulate the product of the motion vector component Y of the sub image block a18 and the number of pixels of the sub image block a18, and the accumulator 3 is used to accumulate the number of pixels of the sub image block a 18. Further, the division of the value of the accumulator 1 by the value of the accumulator 3 is the X component of the average motion vector of the coding block a1, and the division of the value of the accumulator 2 by the value of the accumulator 3 is the Y component of the average motion vector of the coding block a 1.
The average motion vector of the coding block A1 can be obtained through the above processing, and the average motion vectors of the coding blocks a 2-a 100 can be obtained through the same processing method, so that the average motion vectors of all the coded blocks can be obtained. Then, the candidate motion vector of the block to be encoded may be determined by using the average motion vectors of all the encoded blocks, specifically, the average motion vector of all the encoded blocks may be used to obtain the motion vector average value, and the motion vector average value may be determined as the candidate motion vector of the block to be encoded. For example, the candidate motion vector for the block to be encoded is equal to (the average motion vector of encoding block A1 + the average motion vector of encoding block a2 +. + the average motion vector of encoding block a 100) divided by the number of encoded blocks 100.
For example, assuming that the current coding frame is an mth frame and the current to-be-coded block is an nth coding block of the mth frame, at least one coded block may be selected from the mth frame, such as coding block 1-coding block N-1 in the mth frame, for example, the selected coding block may be assumed to be coding block B1-coding block B15.
And determining all sub image blocks of the coding block B1 aiming at the selected coding block B1, namely all sub image blocks obtained by dividing the coding block B1 by adopting a specific dividing mode. Then, for each sub image block, determining a first cumulative value of the sub image block by using the motion vector of the sub image block and the number of pixels of the sub image block, if the first cumulative value is equal to the number of pixels of the sub image block multiplied by the motion vector of the sub image block. In addition, the second accumulated value of the encoding block B1 may be determined by using the number of pixels of all the sub image blocks, for example, the second accumulated value is equal to the sum of the number of pixels of all the sub image blocks. Further, the first cumulative value and the second cumulative value of each sub image block may be used to determine an average motion vector of the encoding block B1, such as an average motion vector equal to the sum of all the first cumulative values divided by the second cumulative value.
For the way of determining the average motion vector of the encoding block B1, refer to the way of determining the average motion vector of the encoding block a1, which is not described herein again. In the same manner, the average motion vectors of the encoding blocks B2-B15 can be obtained, and thus the average motion vectors of all the encoded blocks can be obtained.
In one example, after obtaining the average motion vector of all the encoded blocks (e.g., the encoded block B1-the encoded block B15), the average motion vector of all the encoded blocks may be used to determine the evaluation parameter of the candidate motion vector and the evaluation parameter of the global motion vector. Specifically, assuming that the initial value of the evaluation parameter of the candidate motion vector is 0 and the initial value of the evaluation parameter of the global motion vector is 0, for the average motion vector of each encoded block, a first distance between the average motion vector and the candidate motion vector and a second distance between the average motion vector and the global motion vector may be determined. Further, if the first distance is smaller than the second distance, 1 may be added to the evaluation parameter of the candidate motion vector, if the first distance is greater than the second distance, 1 may be added to the evaluation parameter of the global motion vector, and if the first distance is equal to the second distance, 1 may be added to the evaluation parameter of the candidate motion vector and 1 may be added to the evaluation parameter of the global motion vector.
For example, if the first distance between the average motion vector of the coding block B1 and the candidate motion vector is smaller than the second distance between the average motion vector of the coding block B1 and the global motion vector, 1 may be added to the evaluation parameter of the candidate motion vector; further, if the first distance between the average motion vector of the coding block B2 and the candidate motion vector is greater than the second distance between the average motion vector of the coding block B2 and the global motion vector, 1 may be added to the evaluation parameter of the global motion vector; by analogy, the processing procedure for other coding blocks is similar, and will not be described again here. It is assumed that the evaluation parameter of the global motion vector is finally determined to be 8 and the evaluation parameter of the candidate motion vector is 7 based on the average motion vectors of the coding blocks B1-B15.
Wherein, an accumulator 1 can be set for the candidate motion vector, and an accumulator 2 can be set for the global motion vector, if the first distance between the average motion vector and the candidate motion vector is less than the second distance between the average motion vector and the global motion vector, 1 is added to the accumulator 1; if the first distance between the average motion vector and the candidate motion vector is greater than the second distance between the average motion vector and the global motion vector, adding 1 to the accumulator 2; if the first distance of the average motion vector from the candidate motion vector is equal to the second distance of the average motion vector from the global motion vector, 1 is added to the accumulator 1 and 1 is added to the accumulator 2. Based on this, after the above-described processing is performed on the average motion vectors of the encoding blocks B1-B15, the value of the accumulator 1 is the evaluation parameter of the candidate motion vector, and the value of the accumulator 2 is the evaluation parameter of the global motion vector.
In one example, the absolute value of the difference between the average motion vector and the candidate motion vector may be determined as the first distance, and the absolute value of the difference between the average motion vector and the global motion vector may be determined as the second distance. For example, the absolute value of the difference between the average motion vector of the coding block B1 and the candidate motion vector is determined as a first distance, and the absolute value of the difference between the average motion vector of the coding block B1 and the global motion vector is determined as a second distance. In practice, since the motion vector may include two motion vector components (X, Y), an absolute value 1 of the X component of the average motion vector and the X component of the candidate motion vector is determined, an absolute value 2 of the Y component of the average motion vector and the Y component of the candidate motion vector is determined, and a sum of the absolute value 1 and the absolute value 2 is determined as the first distance. Similarly, an absolute value 3 of the X-component of the average motion vector and the X-component of the global motion vector is determined, an absolute value 4 of the Y-component of the average motion vector and the Y-component of the global motion vector is determined, and the sum of the absolute value 3 and the absolute value 4 is determined as the second distance.
In one example, if the evaluation parameter of the candidate motion vector is greater than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the candidate motion vector is better than the evaluation parameter of the global motion vector; and if the evaluation parameter of the candidate motion vector is smaller than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector. For example, referring to the above embodiment, if the finally obtained value of the accumulator 1 is greater than the value of the accumulator 2, it may be determined that the evaluation parameter of the candidate motion vector is greater than the evaluation parameter of the global motion vector; if the resulting value of the accumulator 2 is greater than the value of the accumulator 1, it can be determined that the evaluation parameter of the global motion vector is greater than the evaluation parameter of the candidate motion vector.
In step 208, the global motion vector is determined as the target motion vector of the block to be encoded. That is, the motion search may be performed with the global motion vector pointing position as a search start point, which is not limited thereto.
In an example, if the evaluation parameter of the candidate motion vector is equal to the evaluation parameter of the global motion vector, the candidate motion vector may be determined as the target motion vector of the block to be encoded, or the global motion vector may also be determined as the target motion vector of the block to be encoded, which is not limited herein.
In a preferred embodiment, if the evaluation parameter of the candidate motion vector is equal to the evaluation parameter of the global motion vector, the candidate motion vector may be determined as the target motion vector of the block to be encoded.
Example 3:
referring to fig. 4, a flow chart of a motion vector determination method is schematically shown, where the method may include:
In step 404, the motion vector candidate of the block to be encoded is determined using the average motion vector of each encoded block, i.e. the motion vector candidate of the block to be encoded is determined using the average motion vectors of all encoded blocks.
The processing flow of step 402 to step 404 may refer to step 202 to step 204, but the difference is that the encoded block in this embodiment is an encoded block in the current frame image, and the encoded block in embodiment 2 is an encoded block in the reference frame image, and other processing procedures are similar and will not be described again.
In step 408, the global motion vector is determined as the target motion vector of the block to be encoded.
Example 4:
referring to fig. 5, a flow chart of a motion vector determination method is schematically shown, where the method may include:
In step 503, at least one coded block associated with the block to be coded is selected from the reference frame image corresponding to the block to be coded, for example, all coded blocks in the reference frame image may be selected. In subsequent embodiments, at least one encoded block in the reference frame picture is referred to as encoded block set B.
And 505, for each encoded block in the encoded block set B, determining an average motion vector of the encoded block by using the motion vector of the sub image block of the encoded block and the number of pixels of the sub image block, and determining a candidate motion vector 2 of the block to be encoded by using the average motion vector of each encoded block.
The processing flow of steps 502 to 505 can be seen from step 202 to step 204, except that in this embodiment, the coded block in the coded block set a is a coded block in the current frame picture, the coded block in the coded block set B is a coded block in the reference frame picture, and the candidate motion vector 1 is determined by using the coded blocks in the coded block set a, and the candidate motion vector 2 is determined by using the coded blocks in the coded block set B, that is, there are two candidate motion vectors in total.
Step 507 compares the evaluation parameter of candidate motion vector 1, the evaluation parameter of candidate motion vector 2, and the evaluation parameter of global motion vector. If the evaluation parameter of the candidate motion vector 1 is optimal, step 508 may be executed; if the evaluation parameter of the candidate motion vector 2 is optimal, step 509 may be executed; if the evaluation parameter of the global motion vector is optimal, step 510 may be performed.
In step 509, the candidate motion vector 2 is determined as the target motion vector of the block to be encoded.
Example 5:
referring to fig. 6, a flow chart of a motion vector determination method is schematically shown, where the method may include:
For example, an encoded block above the block to be encoded may be selected from a current frame image to which the block to be encoded belongs, and since the encoded block above the block to be encoded is already encoded, a motion vector of the encoded block is known, and the motion vector of the encoded block may be determined as a candidate motion vector of the block to be encoded. For another example, an encoded block on the left side of the block to be encoded may be selected from the current frame image to which the block to be encoded belongs, and since the encoded block on the left side of the block to be encoded is already encoded, the motion vector of the encoded block is known, and the motion vector of the encoded block may be determined as a candidate motion vector of the block to be encoded.
Example 6:
referring to fig. 7, a flow chart of a motion vector determination method is schematically shown, where the method may include:
Wherein, selecting at least one encoded block associated with the block to be encoded may include: the method comprises the steps of selecting at least one coded block from a current frame image to which a block to be coded belongs, for example, selecting at least one coded block associated with the block to be coded from the current frame image to which the block to be coded belongs, for example, determining all image blocks coded in the current frame image as the coded blocks. And/or selecting at least one coded block from a reference frame image corresponding to the to-be-coded block, for example, selecting at least one coded block associated with the to-be-coded block from the reference frame image corresponding to the to-be-coded block, for example, selecting all coded blocks in the reference frame image.
In one example, a sub image block of an encoded block may comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
In one example, determining the average motion vector of the encoded block using the motion vector of the sub-image block of the encoded block and the number of pixel points of the sub-image block may include, but is not limited to: and aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using the motion vector of the sub image block and the number of pixel points of the sub image block. In addition, the number of pixel points of each sub-image block is used for determining a second accumulated value. After the first and second accumulated values of each sub image block are obtained, an average motion vector may be determined according to the first and second accumulated values of each sub image block.
In one example, determining the target motion vector of the block to be encoded by using the average motion vector of each encoded block may include, but is not limited to: and obtaining the motion vector average value by using the average motion vector of each coded block, and determining the motion vector average value as the target motion vector of the block to be coded.
The processing flow of steps 701 to 703 may refer to steps 202 to 204, except that in this embodiment, the target motion vector of the block to be encoded is determined, and in embodiment 2, the candidate motion vector of the block to be encoded is determined, and other processing procedures are similar and will not be described herein again.
Based on the mode, at least one coded block related to the block to be coded can be selected, for each selected coded block, the motion vector of the sub-image block of the coded block and the number of pixels of the sub-image block are utilized to determine the average motion vector of the coded block, the target motion vector of the block to be coded is determined by utilizing the average motion vector of each coded block, and motion search is carried out by taking the pointing position of the target motion vector as a search starting point.
Example 7:
based on the same inventive concept as the above method, an embodiment of the present invention further provides a motion vector determining apparatus, as shown in fig. 8, the motion vector determining apparatus includes: a memory and a processor; the memory for storing program code; the processor is used for calling the program code.
In one example, the processor is configured to invoke the program code, and when the program code is executed, the processor is configured to:
determining candidate motion vectors according to the motion vectors of the coded blocks;
obtaining the evaluation parameters of the candidate motion vectors and the evaluation parameters of the externally input global motion vectors;
if the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector, determining the candidate motion vector as a target motion vector of a block to be coded;
and if the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector, determining the global motion vector as a target motion vector of the block to be coded.
The processor, when determining the candidate motion vector according to the motion vector of the encoded block, is specifically configured to:
selecting a coded block adjacent to the to-be-coded block from a current frame image to which the to-be-coded block belongs, and determining a motion vector of the selected coded block as a candidate motion vector of the to-be-coded block.
The processor, when determining the candidate motion vector according to the motion vector of the encoded block, is specifically configured to:
selecting at least one coded block associated with the block to be coded;
aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;
and determining the candidate motion vector of the block to be coded by using the average motion vector of each coded block.
The processor is specifically configured to, when selecting at least one coded block associated with the block to be coded:
selecting at least one coded block from a current frame image to which the to-be-coded block belongs; and/or the presence of a gas in the gas,
and selecting at least one coded block from the reference frame image corresponding to the block to be coded.
The sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
The processor determines the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block, and is specifically configured to:
aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;
determining a second accumulated value by using the number of pixel points of each sub-image block;
and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
The processor, when determining the candidate motion vector of the block to be encoded by using the average motion vector of each encoded block, is specifically configured to: obtaining the average value of the motion vectors by using the average motion vector of each coded block; and determining the motion vector average value as a candidate motion vector of the block to be coded.
The processor, when obtaining the evaluation parameter of the candidate motion vector and the evaluation parameter of the externally input global motion vector, is specifically configured to: selecting at least one coded block from a current frame image to which the to-be-coded block belongs; aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;
determining an evaluation parameter of the candidate motion vector and an evaluation parameter of the global motion vector using the average motion vector of each encoded block.
The sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
The processor determines the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block, and is specifically configured to:
aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;
determining a second accumulated value by using the number of pixel points of each sub-image block;
and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
The processor, when determining the evaluation parameter of the candidate motion vector and the evaluation parameter of the global motion vector by using the average motion vector of each encoded block, is specifically configured to:
for an average motion vector of each encoded block, determining a first distance of the average motion vector from the candidate motion vector and a second distance of the average motion vector from the global motion vector;
if the first distance is smaller than the second distance, increasing the evaluation parameter of the candidate motion vector;
and if the first distance is greater than the second distance, increasing the evaluation parameter of the global motion vector.
The processor, when determining the first distance between the average motion vector and the candidate motion vector and the second distance between the average motion vector and the global motion vector, is specifically configured to:
determining an absolute value of a difference between the average motion vector and the candidate motion vector as a first distance, and determining an absolute value of a difference between the average motion vector and the global motion vector as a second distance.
The processor is further configured to: if the evaluation parameter of the candidate motion vector is greater than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector; and if the evaluation parameter of the candidate motion vector is smaller than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector.
In another example, the processor is configured to invoke the program code, and when the program code is executed, the processor is configured to:
selecting at least one coded block associated with a block to be coded;
aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;
and determining the target motion vector of the block to be coded by using the average motion vector of each coded block.
The processor is specifically configured to, when selecting at least one coded block associated with a block to be coded:
selecting at least one coded block from a current frame image to which the to-be-coded block belongs; and/or the presence of a gas in the gas,
and selecting at least one coded block from the reference frame image corresponding to the block to be coded.
The sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
The processor determines the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block, and is specifically configured to:
aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;
determining a second accumulated value by using the number of pixel points of each sub-image block;
and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
The processor, when determining the target motion vector of the block to be encoded by using the average motion vector of each encoded block, is specifically configured to: obtaining the average value of the motion vectors by using the average motion vector of each coded block; and determining the motion vector average value as a target motion vector of the block to be coded.
Example 8:
based on the same inventive concept as the method, an embodiment of the present invention further provides a machine-readable storage medium, where computer instructions are stored, and when the computer instructions are executed, the method for determining a motion vector according to the embodiments is implemented.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by an article of manufacture with certain functionality. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims (37)
- A method for determining a motion vector, the method comprising:determining candidate motion vectors according to the motion vectors of the coded blocks;obtaining the evaluation parameters of the candidate motion vectors and the evaluation parameters of the externally input global motion vectors;if the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector, determining the candidate motion vector as a target motion vector of a block to be coded;and if the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector, determining the global motion vector as a target motion vector of the block to be coded.
- The method of claim 1,the determining a candidate motion vector based on the motion vector of the encoded block comprises:selecting a coded block adjacent to the to-be-coded block from a current frame image to which the to-be-coded block belongs, and determining a motion vector of the selected coded block as a candidate motion vector of the to-be-coded block.
- The method of claim 1,the determining a candidate motion vector based on the motion vector of the encoded block comprises:selecting at least one coded block associated with the block to be coded;aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;and determining the candidate motion vector of the block to be coded by using the average motion vector of each coded block.
- The method of claim 3,the selecting at least one coded block associated with the block to be coded includes:selecting at least one coded block from a current frame image to which the to-be-coded block belongs; and/or the presence of a gas in the gas,and selecting at least one coded block from the reference frame image corresponding to the block to be coded.
- The method of claim 3,the sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
- The method of claim 3,the determining the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block specifically includes:aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;determining a second accumulated value by using the number of pixel points of each sub-image block;and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
- The method according to claim 3, wherein the determining the candidate motion vector of the block to be coded by using the average motion vector of each coded block specifically comprises:obtaining the average value of the motion vectors by using the average motion vector of each coded block;and determining the motion vector average value as a candidate motion vector of the block to be coded.
- The method according to claim 1, wherein the obtaining of the evaluation parameter of the candidate motion vector and the evaluation parameter of the externally-input global motion vector specifically includes:selecting at least one coded block from a current frame image to which the to-be-coded block belongs;aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;determining an evaluation parameter of the candidate motion vector and an evaluation parameter of the global motion vector using the average motion vector of each encoded block.
- The method of claim 8,the sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
- The method of claim 8,the determining the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block specifically includes:aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;determining a second accumulated value by using the number of pixel points of each sub-image block;and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
- The method according to claim 3 or 8,the determining the evaluation parameter of the candidate motion vector and the evaluation parameter of the global motion vector by using the average motion vector of each encoded block specifically includes:for an average motion vector of each encoded block, determining a first distance of the average motion vector from the candidate motion vector and a second distance of the average motion vector from the global motion vector;if the first distance is smaller than the second distance, increasing the evaluation parameter of the candidate motion vector;and if the first distance is greater than the second distance, increasing the evaluation parameter of the global motion vector.
- The method of claim 11,said determining a first distance of said average motion vector from said candidate motion vector and a second distance of said average motion vector from said global motion vector comprises:determining an absolute value of a difference between the average motion vector and the candidate motion vector as a first distance, and determining an absolute value of a difference between the average motion vector and the global motion vector as a second distance.
- The method of claim 1, further comprising:if the evaluation parameter of the candidate motion vector is greater than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector;and if the evaluation parameter of the candidate motion vector is smaller than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector.
- A method for determining a motion vector, the method comprising:selecting at least one coded block associated with a block to be coded;aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;and determining the target motion vector of the block to be coded by using the average motion vector of each coded block.
- The method of claim 14,the selecting at least one coded block associated with the block to be coded includes:selecting at least one coded block from a current frame image to which the to-be-coded block belongs; and/or the presence of a gas in the gas,and selecting at least one coded block from the reference frame image corresponding to the block to be coded.
- The method of claim 14,the sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
- The method of claim 14,the determining the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block specifically includes:aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;determining a second accumulated value by using the number of pixel points of each sub-image block;and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
- The method according to claim 14, wherein the determining the target motion vector of the block to be encoded by using the average motion vector of each encoded block specifically comprises:obtaining the average value of the motion vectors by using the average motion vector of each coded block;and determining the motion vector average value as a target motion vector of the block to be coded.
- A motion vector determination device characterized by comprising: a memory and a processor; the memory for storing program code; the processor to invoke the program code, the processor to perform the following when the program code is executed:determining candidate motion vectors according to the motion vectors of the coded blocks;obtaining the evaluation parameters of the candidate motion vectors and the evaluation parameters of the externally input global motion vectors;if the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector, determining the candidate motion vector as a target motion vector of a block to be coded;and if the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector, determining the global motion vector as a target motion vector of the block to be coded.
- The apparatus of claim 19,the processor, when determining the candidate motion vector according to the motion vector of the encoded block, is specifically configured to:selecting a coded block adjacent to the to-be-coded block from a current frame image to which the to-be-coded block belongs, and determining a motion vector of the selected coded block as a candidate motion vector of the to-be-coded block.
- The apparatus of claim 19,the processor, when determining the candidate motion vector according to the motion vector of the encoded block, is specifically configured to:selecting at least one coded block associated with the block to be coded;aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;and determining the candidate motion vector of the block to be coded by using the average motion vector of each coded block.
- The apparatus of claim 21,the processor is specifically configured to, when selecting at least one coded block associated with the block to be coded:selecting at least one coded block from a current frame image to which the to-be-coded block belongs; and/or the presence of a gas in the gas,and selecting at least one coded block from the reference frame image corresponding to the block to be coded.
- The apparatus of claim 21,the sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
- The apparatus of claim 21,the processor determines the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block, and is specifically configured to:aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;determining a second accumulated value by using the number of pixel points of each sub-image block;and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
- The apparatus as claimed in claim 21, wherein said processor is configured to determine the candidate motion vector for the block to be encoded using the average motion vector for each block to be encoded, and is further configured to:obtaining the average value of the motion vectors by using the average motion vector of each coded block;and determining the motion vector average value as a candidate motion vector of the block to be coded.
- The apparatus according to claim 19, wherein the processor is configured to, when obtaining the evaluation parameter of the candidate motion vector and the evaluation parameter of the externally-input global motion vector:selecting at least one coded block from a current frame image to which the to-be-coded block belongs;aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;determining an evaluation parameter of the candidate motion vector and an evaluation parameter of the global motion vector using the average motion vector of each encoded block.
- The apparatus of claim 26,the sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
- The apparatus of claim 26,the processor determines the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block, and is specifically configured to:aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;determining a second accumulated value by using the number of pixel points of each sub-image block;and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
- The apparatus of claim 21 or 26,the processor, when determining the evaluation parameter of the candidate motion vector and the evaluation parameter of the global motion vector by using the average motion vector of each encoded block, is specifically configured to:for an average motion vector of each encoded block, determining a first distance of the average motion vector from the candidate motion vector and a second distance of the average motion vector from the global motion vector;if the first distance is smaller than the second distance, increasing the evaluation parameter of the candidate motion vector;and if the first distance is greater than the second distance, increasing the evaluation parameter of the global motion vector.
- The apparatus of claim 29,the processor, when determining the first distance between the average motion vector and the candidate motion vector and the second distance between the average motion vector and the global motion vector, is specifically configured to:determining an absolute value of a difference between the average motion vector and the candidate motion vector as a first distance, and determining an absolute value of a difference between the average motion vector and the global motion vector as a second distance.
- The device of claim 19, wherein the processor is further configured to:if the evaluation parameter of the candidate motion vector is greater than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the candidate motion vector is superior to the evaluation parameter of the global motion vector;and if the evaluation parameter of the candidate motion vector is smaller than the evaluation parameter of the global motion vector, determining that the evaluation parameter of the global motion vector is superior to the evaluation parameter of the candidate motion vector.
- A motion vector determination device characterized by comprising: a memory and a processor; the memory for storing program code; the processor to invoke the program code, the processor to perform the following when the program code is executed:selecting at least one coded block associated with a block to be coded;aiming at each selected coded block, determining the average motion vector of the coded block by using the motion vector of the sub-image block of the coded block and the number of pixel points of the sub-image block;and determining the target motion vector of the block to be coded by using the average motion vector of each coded block.
- The apparatus of claim 32,the processor is specifically configured to, when selecting at least one coded block associated with a block to be coded:selecting at least one coded block from a current frame image to which the to-be-coded block belongs; and/or the presence of a gas in the gas,and selecting at least one coded block from the reference frame image corresponding to the block to be coded.
- The apparatus of claim 32,the sub-image blocks of the encoded block comprise: and obtaining sub image blocks after the coded blocks are divided by adopting a specific division mode, wherein the specific division mode comprises at least one division mode.
- The apparatus of claim 32,the processor determines the average motion vector of the encoded block by using the motion vector of the sub-image block of the encoded block and the number of pixels of the sub-image block, and is specifically configured to:aiming at each sub image block of the coded block, determining a first accumulated value of the sub image block by using a motion vector of the sub image block and the number of pixel points of the sub image block;determining a second accumulated value by using the number of pixel points of each sub-image block;and determining an average motion vector according to the first accumulated value and the second accumulated value of each sub image block.
- The apparatus as claimed in claim 32, wherein the processor is configured to determine the target motion vector of the block to be encoded using the average motion vector of each block to be encoded, and is specifically configured to:obtaining the average value of the motion vectors by using the average motion vector of each coded block;and determining the motion vector average value as a target motion vector of the block to be coded.
- A machine-readable storage medium having stored thereon computer instructions which, when executed, implement the motion vector determination method of claims 1-13 or the motion vector determination method of claims 14-18.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2018/093850 WO2020000444A1 (en) | 2018-06-29 | 2018-06-29 | Method and device for determining motion vector, and machine-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110859057A true CN110859057A (en) | 2020-03-03 |
Family
ID=68985732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201880038850.7A Pending CN110859057A (en) | 2018-06-29 | 2018-06-29 | Motion vector determination method, apparatus, and machine-readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110859057A (en) |
WO (1) | WO2020000444A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111698517A (en) * | 2020-06-29 | 2020-09-22 | Oppo广东移动通信有限公司 | Method and device for determining motion vector, electronic equipment and readable storage medium |
CN111711823A (en) * | 2020-06-30 | 2020-09-25 | Oppo广东移动通信有限公司 | Motion vector processing method and device, electronic device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1440203A (en) * | 2002-02-23 | 2003-09-03 | 三星电子株式会社 | Self-adaptive kinetic estimated device and method |
CN101573983A (en) * | 2007-01-03 | 2009-11-04 | 三星电子株式会社 | Method and apparatus for predicting motion vector using global motion vector, encoder, decoder, and decoding method |
CN101588501A (en) * | 2008-05-19 | 2009-11-25 | 索尼株式会社 | Image processing apparatus and image processing method |
CN102611881A (en) * | 2011-01-19 | 2012-07-25 | 华为技术有限公司 | Method and module for obtaining reference motion vector, encoding and decoding device |
CN106060555A (en) * | 2016-06-29 | 2016-10-26 | 东华大学 | Encoder based on multi-core processor |
CN108134939A (en) * | 2016-12-01 | 2018-06-08 | 北京金山云网络技术有限公司 | A kind of method for estimating and device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101005620B (en) * | 2004-09-03 | 2011-08-10 | 微软公司 | Innovations in coding and decoding macroblock and motion information for interlaced and progressive video |
EP3175618A1 (en) * | 2014-09-11 | 2017-06-07 | Euclid Discoveries, LLC | Perceptual optimization for model-based video encoding |
US9807416B2 (en) * | 2015-09-21 | 2017-10-31 | Google Inc. | Low-latency two-pass video coding |
CN107483953B (en) * | 2017-10-10 | 2019-11-29 | 司马大大(北京)智能系统有限公司 | Inter frame motion estimation method, apparatus and electronic equipment |
-
2018
- 2018-06-29 WO PCT/CN2018/093850 patent/WO2020000444A1/en active Application Filing
- 2018-06-29 CN CN201880038850.7A patent/CN110859057A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1440203A (en) * | 2002-02-23 | 2003-09-03 | 三星电子株式会社 | Self-adaptive kinetic estimated device and method |
CN101573983A (en) * | 2007-01-03 | 2009-11-04 | 三星电子株式会社 | Method and apparatus for predicting motion vector using global motion vector, encoder, decoder, and decoding method |
CN101588501A (en) * | 2008-05-19 | 2009-11-25 | 索尼株式会社 | Image processing apparatus and image processing method |
CN102611881A (en) * | 2011-01-19 | 2012-07-25 | 华为技术有限公司 | Method and module for obtaining reference motion vector, encoding and decoding device |
CN106060555A (en) * | 2016-06-29 | 2016-10-26 | 东华大学 | Encoder based on multi-core processor |
CN108134939A (en) * | 2016-12-01 | 2018-06-08 | 北京金山云网络技术有限公司 | A kind of method for estimating and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111698517A (en) * | 2020-06-29 | 2020-09-22 | Oppo广东移动通信有限公司 | Method and device for determining motion vector, electronic equipment and readable storage medium |
CN111698517B (en) * | 2020-06-29 | 2022-07-12 | Oppo广东移动通信有限公司 | Method, apparatus, electronic device and readable storage medium for determining motion vector |
CN111711823A (en) * | 2020-06-30 | 2020-09-25 | Oppo广东移动通信有限公司 | Motion vector processing method and device, electronic device and storage medium |
CN111711823B (en) * | 2020-06-30 | 2022-11-15 | Oppo广东移动通信有限公司 | Motion vector processing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2020000444A1 (en) | 2020-01-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10771808B2 (en) | Video encoder and decoder for predictive partitioning | |
CN110870313B (en) | Method and apparatus for candidate list pruning | |
CA2883244C (en) | Video decoding apparatus, video coding apparatus, video decoding method, video coding method, and storage medium | |
US12075085B2 (en) | Encoding and decoding method, apparatus, and device | |
CN110859057A (en) | Motion vector determination method, apparatus, and machine-readable storage medium | |
CN113747166B (en) | Encoding and decoding method, device and equipment | |
WO2021056205A1 (en) | Video processing method and device, and storage medium | |
CN110365987B (en) | Motion vector determination method, device and equipment | |
HK40054476B (en) | Encoding and decoding method, apparatus and device | |
HK40054476A (en) | Encoding and decoding method, apparatus and device | |
JP2005323299A (en) | Motion vector search method and encoding apparatus | |
Choi et al. | Evaluation of the Image Backtrack-Based Fast Direct Mode Decision Algorithm |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200303 |
|
WD01 | Invention patent application deemed withdrawn after publication |