CN102547258B - Method for searching sub-pixels in interframe codes, motion searching method and module thereof - Google Patents

Method for searching sub-pixels in interframe codes, motion searching method and module thereof Download PDF

Info

Publication number
CN102547258B
CN102547258B CN201010588416.1A CN201010588416A CN102547258B CN 102547258 B CN102547258 B CN 102547258B CN 201010588416 A CN201010588416 A CN 201010588416A CN 102547258 B CN102547258 B CN 102547258B
Authority
CN
China
Prior art keywords
picture element
sub
searched
motion vector
picture
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.)
Active
Application number
CN201010588416.1A
Other languages
Chinese (zh)
Other versions
CN102547258A (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.)
Leadcore Technology Co Ltd
Original Assignee
Leadcore Technology Co Ltd
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 Leadcore Technology Co Ltd filed Critical Leadcore Technology Co Ltd
Priority to CN201010588416.1A priority Critical patent/CN102547258B/en
Publication of CN102547258A publication Critical patent/CN102547258A/en
Application granted granted Critical
Publication of CN102547258B publication Critical patent/CN102547258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a method for searching sub-pixels in interframe codes, a motion searching method and a module thereof. Pre-judgment is carried out before the sub-pixels are searched, search points of possible non-optimal-matching sub-pixels are eliminated, accordingly, the quantity of pixels needing to be searched is reduced, and sub-pixel searching speed is increased. The pre-judgment is completed according to relative positions of a predicted motion vector of a current macroblock and a motion vector of an integral pixel, accuracy of the pre-judgment is guaranteed, accordingly, search points of the sub-pixels are reduced on the premises that the subjective quality of a reconstructed image is unaffected and change of code flows is tiny, and motion search efficiency is improved. In addition, the distance from the predicted motion vector of the current macroblock to the motion vector of the integral pixel is computed, five sub-pixels around the integral pixel are searched if the distance is larger than the size of the pixel, three sub-pixels around the integral pixel are searched if the distance is not larger than the size of the pixel, and accordingly, search points of the sub-pixels are further reduced on the premise of unaffecting the coding quality.

Description

Sub-pel search method, method for searching motion and module thereof in a kind of interframe encode
Technical field
The present invention relates to Video coding compression field, particularly relate to subpixel interframe search compression algorithm.
Background technology
Along with the develop rapidly of science and technology, multimedia, network service have become the part in our life, and people wish no matter when and where can both to transmit easily and flexibly, use, process video.Video compression technology is the prerequisite of transmission, process video.After video signal digitization, data bandwidth is very high, and usually more than 20MB/ second, therefore transmission needs to take massive band width, Internet Transmission length consuming time, and due to capacity too large, computer is difficult to preserve it and process.
Although digitized video image information amount is very large, is height correlation between vedio data, have bulk redundancy information between adjacent image in the inside of piece image or image sequence, this which includes the form such as time redundancy, spatial redundancy.Eliminate the starting point that redundancy is encoding video pictures compression, after adopting compress technique, data bandwidth can drop to 1-10MB/ second usually, so just vision signal can be preserved in a computer and be correspondingly processed, fast and effective video Coding Compression Technology is one of key technology of multimedia transmission equally.
In the video compression protocols be widely used at present, the compress technique that major part all adopts intraframe coding to combine with inter prediction.Intraframe coding is mainly used in removing spatial redundancy, the redundant information namely in piece image.Intraframe coding compression ratio is lower, but can reduce the distortion rate of image.
In practical application, in order to save transmission bandwidth, most coded frame is all used interframe encode compression.Specifically, in the video sequence, because the motion of two two field pictures closed on keeps certain correlation, therefore, when encoding current frame image, can in units of macro block, in the encoded reconstructed frame completed, near current macro correspondence position, search for the best matching blocks (passing through motion estimation algorithm) of current macro, distance between best matching blocks and current macro is designated as motion vector, and both differences are converted, quantize and encoded, realize video compression, as shown in Figure 1.As a rule, carrying out taking the maximum module of resource in the encoder of interframe encode is exactly motion search module.
Motion estimation algorithm, is divided into following step usually:
Step one: motion-vector prediction
In the sequence of motion, between the pixel of adjacent two two field pictures, there is similitude, and inner at same two field picture, and between adjacent macro block, movement tendency may be consistent.Motion estimation algorithm, according to above-mentioned 2 points, before carrying out motion search to current block, first according to the motion vector of completed adjacent macroblocks of encoding in present frame, predicts the motion vector of current macro.Different video compression protocols, the specific mode of adjacent macroblocks, the mode obtaining motion vector predictor (MVP), adjacent macroblocks availability and motion vector default value have difference.
Step 2: whole picture element movement search
Whole pel search algorithm is near the motion vector of prediction, and institute in the certain rectangular extent region centered by future position a little, is all calculated to a matching result, and therefrom selects the result of optimal match point as whole pel search.
Step 3: sub-pixel motion is searched for
After searching the whole picture element of optimum Match, around rough grade optimal match point, (calculate the thin precision optimal match point of search (the minimum search precision of different agreement is different) by search successively.Such as, first around the best whole Pixel match point, search for best 1/2 Accuracy Matching point, then search for 1/4 precision optimal match point around best 1/2 Accuracy Matching point.
Area coverage algorithm is the best algorithm of effect, and it can guarantee to obtain best match point.But it is too large that its obvious shortcoming is exactly amount of calculation, must travel through a little once during process by region of search, and this is difficult to accept to the consumption of hardware resource.In different agreement, number of macroblocks, the size in region to be searched are different.To search for the macro block of 16*16 size, often once mate, calculate comprise ask poor 256 times, 256 absolute values and 255 summation operation, and then to compare, find out optimal match point wherein.If points all in region to be searched is all carried out a matching primitives, for the hunting zone of general protocol " 16 ", the macro block of each 16*16 size needs to search 1089 match points, and this very difficult software processes in real time.
Therefore, in actual applications, fast search algorithm for whole pixel needs reduce hunting zone and delete Searching point usually, thus Searching point is reduced in a large number, but 8 sub-picture elements do not omit around each whole picture element, still need to search for it, if also need the subpixel point searching for thinner precision, the operand of sub-pel search also needs to increase.
As can be seen from foregoing description, carry out the whole pixel of rough search in whole motion search process, proportion is almost suitable with the sub-pel search point of thin precision, although decrease the Searching point of whole pixel, still has sub-pel search and takies excess resource.And the efficiency of above-mentioned motion search directly affects code efficiency, searched match point quantity is directly related with motion search efficiency, matching degree between searched piece and current block directly affects video compression ratio again, therefore fast, efficiently, accurately motion estimation algorithm be one of key factor affecting code efficiency and quality, select suitable motion estimation algorithm for compressed encoding, seem particularly important.
Summary of the invention
The technical problem that the present invention mainly solves is to provide sub-pel search method, method for searching motion and module thereof in a kind of interframe encode, make do not affecting under reconstructed image subjective quality and encoding code stream change small prerequisite, reduce sub-pel search point, lifter motion search efficiency.
In order to solve the problems of the technologies described above, the invention provides sub-pel search method in the compression of a kind of video code between frames, comprising following steps:
A determines the relative bearing between the motion vectors of current macro and the motion vector of whole picture element;
B searches for the N number of subpixel point in this relative bearing in 8 sub-picture elements around this whole picture element, and N is the integer of 3 to 5;
C carries out matching primitives to the subpixel point searched for successively, determines the optimal match point of subpixel.
As the improvement of technique scheme, following steps can also be comprised: calculate the distance between the motion vectors of current macro and the motion vector of whole picture element before step B, if distance is greater than a picture element, then in step B, 5 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for; If distance is less than or equal to a picture element, then in step B, 3 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for.
As the improvement of technique scheme, carry out in the process of matching primitives to the subpixel point searched for successively in step C:
If the matching primitives result of searched for sub-picture element is greater than the threshold value preset, then matching primitives is carried out to the next subpixel point of search; If instead the matching primitives result of this subpixel point is less than or equal to this threshold value, then determine that this subpixel point is optimal match point, the search in step B stops.
Present invention also offers the method for searching motion of a kind of video code between frames compression, comprise following steps:
The motion vector of prediction current macro;
Carry out whole picture element movement search, the whole picture element mated most;
Adopt above-mentioned sub-pel search method to carry out sub-pel search, obtain the optimal match point of subpixel, using the motion vector of this subpixel optimal match point as motion search result.
Present invention also offers sub-pel search module in the compression of a kind of video code between frames, comprise:
Direction locator module, for determining the relative bearing between the motion vectors of current macro and the motion vector of whole picture element;
Search submodule, for searching for the N number of subpixel point in this relative bearing in 8 sub-picture elements around this whole picture element, N is the integer of 3 to 5;
Matching primitives submodule, for carrying out matching primitives to the subpixel point searched for successively;
Optimal match point confirms submodule, for according to this matching primitives result, determines the optimal match point of subpixel.
As the improvement of technique scheme, search submodule can also be used for calculating the distance between the motion vectors of current macro and the motion vector of whole picture element;
If distance is greater than a picture element, then searches for submodule and 5 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for;
If distance is less than or equal to a picture element, then searches for submodule and 3 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for.
As the improvement of technique scheme, optimal match point confirms that the matching primitives result that submodule can also be used for matching primitives submodule exports judges, if matching primitives result is greater than the threshold value preset, then the next subpixel point of matching primitives submodule to search sub-block searches is indicated to carry out matching primitives; If instead matching primitives result is less than or equal to this threshold value, then determine that this subpixel point is optimal match point, instruction search submodule stops search.
Present invention also offers the motion search module of a kind of video code between frames compression, comprise:
The module of the motion vector of prediction current macro;
Carry out whole picture element movement search, the module of the whole picture element mated most;
As above sub-pel search module;
The motion vector of subpixel optimal match point sub-pel search block search obtained is as motion search result.
Embodiment of the present invention compared with prior art, the main distinction and effect thereof are: according to the relative bearing between the motion vectors of current macro and the motion vector of whole picture element, N number of subpixel point in this relative bearing in 8 sub-picture elements around this whole picture element is searched for, and successively matching primitives is carried out to the subpixel point searched for, determine the optimal match point of subpixel, wherein N is the integer of 3 to 5, thus do not affecting under reconstructed image subjective quality and encoding code stream change small prerequisite, reduce sub-pel search point, lifter motion search efficiency.
Calculate the distance between the motion vectors of current macro and the motion vector of whole picture element, if distance is greater than a picture element, then search for 5 sub-picture elements around this whole picture element; Otherwise, then 3 sub-picture elements around this whole picture element are only searched for.Further minimizing sub-pel search point, and do not affect coding quality.
Exit criteria is in advance set, if the matching primitives result of searched for sub-picture element is greater than the threshold value preset, then matching primitives is carried out to the next subpixel point of search; If instead the matching primitives result of this subpixel point is less than or equal to this threshold value, then determines that this subpixel point is optimal match point, stop search, accelerate coding rate further.
Adopt motion estimation algorithm of the present invention, compared with subpixel full-search algorithm, the minimizing of counting of average sub-pel search is about 50%, but the Y-PSNR of image (PSNR) value is declined by less than 0.1db, after decoding, sequence subjective quality is unaffected, and coding rate obviously speeds.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, the present invention is described in further detail.
Fig. 1 is motion search schematic diagram in prior art;
Fig. 2 is sub-pel search method flow diagram in the video code between frames compression of first embodiment of the invention;
Fig. 3 is 5 sub-picture element schematic diagrames to be searched in the motion vectors of current macro in first embodiment of the invention and the relative bearing of whole picture element motion vector;
Fig. 4 is 3 sub-picture element schematic diagrames to be searched in the motion vectors of current macro in first embodiment of the invention and the relative bearing of whole picture element motion vector;
Fig. 5 is sub-pel search function structure chart in the video code between frames compression of second embodiment of the invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiments of the present invention are described in further detail.
First embodiment of the invention relates to sub-pel search method in the compression of a kind of video code between frames, for carrying out the motion search of video code between frames compression.Motion search process mainly comprises three steps: the motion vector first predicting current macro; Next carries out whole picture element movement search, the whole picture element mated most; After completing the search of whole picture element movement, carry out sub-pixel motion search.
In present embodiment method of motion vector prediction and whole pel search method same as the prior art, as required, different prior aries can be adopted, do not repeat them here.The algorithm that present embodiment difference with the prior art is to use sub-pel search algorithm fast to replace whole subpixel all searched, idiographic flow as shown in Figure 2.
In step 201, determine the relative bearing between the motion vectors of current macro and the motion vector of whole picture element.
In step 202, calculate the distance between the motion vectors of current macro and the motion vector of whole picture element, if the distance calculated is greater than a picture element, then enter step 203,5 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for successively; If the distance calculated is less than or equal to a picture element, then enter step 204,3 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for successively.
In step 205, carry out matching primitives to the subpixel point searched for successively, concrete matching algorithm can adopt different prior aries as required.
In step 206, judge whether matching primitives result is greater than the threshold value preset, if be greater than, then continue in step 205 to carry out matching primitives to the next subpixel point of search, if completed the matching operation of all sub-pel search points (5 or 3) in step 205, enter step 208; If this matching primitives result is less than or equal to this threshold value (namely matching result is in threshold range) in step 206, then determine that this subpixel point is optimal match point, the motion vector of this subpixel optimal match point is the result of motion search.Then enter step 207, stop the search operation in step 203 or step 204, exit search and the matching process of subpixel in advance.
In step 208, according to the matching result of each subpixel point searched for, select optimal match point, the motion vector of this subpixel optimal match point is the result of motion search.
For example, suppose the whole picture element " 0 " searching optimum Match in the search of whole picture element movement, judge the motion vectors of current macro and the Distance geometry relative bearing of whole picture element motion vector, if more than a distance difference pixel, then search for 5 sub-picture elements around this whole picture element in this relative bearing successively according to the method for full search, as shown in Figure 3; Otherwise search for 3 sub-picture elements around this whole picture element in this relative bearing successively according to the method for full search, as shown in Figure 4.
Specifically, as shown in Figure 3, in relative bearing, 5 sub-picture elements are respectively:
The motion vectors of current macro when the upper right side of the motion vector of whole picture element, Searching point " 1 ", point " 2 ", point " 3 ", point " 5 ", point " 8 ";
The motion vectors of current macro when the right side of the motion vector of whole picture element, Searching point " 2 ", point " 3 ", point " 5 ", point " 7 ", point " 8 ";
The motion vectors of current macro when the lower right of the motion vector of whole picture element, Searching point " 3 ", point " 5 ", point " 6 ", point " 7 ", point " 8 ";
When the motion vectors of current macro is immediately below the motion vector of whole picture element, Searching point " 4 ", point " 5 ", point " 6 ", point " 7 ", point " 8 ";
The motion vectors of current macro when the lower left of the motion vector of whole picture element, Searching point " 1 ", point " 4 ", point " 6 ", point " 7 ", point " 8 ";
The motion vectors of current macro when the left side of the motion vector of whole picture element, Searching point " 1 ", point " 2 ", point " 4 ", point " 6 ", point " 7 ";
The motion vectors of current macro when the upper left side of the motion vector of whole picture element, Searching point " 1 ", point " 2 ", point " 3 ", point " 4 ", point " 6 ";
When the motion vectors of current macro is directly over the motion vector of whole picture element, Searching point " 1 ", point " 2 ", point " 3 ", point " 4 ", point " 5 ".
Concrete search order and searching method with reference to prior art, can not limit at this.
As shown in Figure 4, in relative bearing, 3 sub-picture elements are respectively:
The motion vectors of current macro when the upper right side of the motion vector of whole picture element, Searching point " 2 ", point " 3 ", point " 5 ";
The motion vectors of current macro when the right side of the motion vector of whole picture element, Searching point " 3 ", point " 5 ", point " 8 ";
The motion vectors of current macro when the lower right of the motion vector of whole picture element, Searching point " 5 ", point " 7 ", point " 8 ";
When the motion vectors of current macro is immediately below the motion vector of whole picture element, Searching point " 6 ", point " 7 ", point " 8 ";
The motion vectors of current macro when the lower left of the motion vector of whole picture element, Searching point " 4 ", point " 6 ", point " 7 ";
The motion vectors of current macro when the left side of the motion vector of whole picture element, Searching point " 1 ", point " 4 ", point " 6 ";
The motion vectors of current macro when the upper left side of the motion vector of whole picture element, Searching point " 1 ", point " 2 ", point " 4 ";
When the motion vectors of current macro is directly over the motion vector of whole picture element, Searching point " 1 ", point " 2 ", point " 3 ".
When searching a sub-picture element at every turn, matching primitives is carried out to this subpixel point, and result of calculation and the threshold value preset are compared, if in this threshold range, then assert that current subpixel point is optimal match point, the subpixel point search of current block and matching process terminate in advance.If result of calculation is not in threshold range, then proceed search and the matching process of subpixel point.After search and completeer all (3 or 5) subpixel points, if still the matching primitives result of neither one subpixel point is in this threshold value, then according to the matching result of these subpixel points, select optimal match point, the motion vector of this subpixel optimal match point is the result of motion search.
In sum, in present embodiment, judge first in advance before carrying out sub-pel search, eliminating may not be the sub-pel search point of optimum Match, thus reduces the subpixel quantity needing search, accelerates sub-pel search speed.According to the relative bearing between the motion vectors of current macro and the motion vector of whole picture element, complete above-mentioned pre-judgement, the pre-accuracy rate judged is protected, thus do not affecting under reconstructed image subjective quality and encoding code stream change small prerequisite, reduce sub-pel search point, lifter motion search efficiency.
Further, the distance between the motion vectors of current macro and the motion vector of whole picture element is calculated, the Searching point quantity difference that different distances is corresponding.If distance is greater than a picture element, then search for 5 sub-picture elements around this whole picture element; Otherwise, then only searching for 3 sub-picture elements around this whole picture element, not affecting under reconstructed image subjective quality and encoding code stream change small prerequisite, reducing sub-pel search point further.
In addition, exit criteria is in advance set, after the calculating completing each subpixel match point, all to this in advance exit criteria judge, if the matching primitives result of searched for sub-picture element is greater than the threshold value preset, then matching primitives (until predetermined subpixel point all completes coupling) is carried out to the next subpixel point of search; If instead the matching primitives result of this subpixel point is less than or equal to this threshold value, then determine that this subpixel point is optimal match point, stop search, exit sub-pel search and coupling flow process in advance, not affecting under reconstructed image subjective quality and encoding code stream change small prerequisite, accelerate coding rate further.
Adopt the motion estimation algorithm of present embodiment, compared with subpixel full-search algorithm, the minimizing of counting of average sub-pel search is about 50%, but the Y-PSNR of image (PSNR) value is declined by less than 0.1db, after decoding, sequence subjective quality is unaffected, and coding rate obviously speeds.
Second embodiment of the invention relates to sub-pel search module in the compression of a kind of video code between frames, as shown in Figure 5, comprises: direction locator module, for determining the relative bearing between the motion vectors of current macro and the motion vector of whole picture element; Search submodule, for searching for the N number of subpixel point in this relative bearing in 8 sub-picture elements around this whole picture element, N is the integer of 3 to 5; Matching primitives submodule, for carrying out matching primitives to the subpixel point searched for successively; Optimal match point confirms submodule, for according to this matching primitives result, determines the optimal match point of subpixel.Owing to judging first in advance before carrying out sub-pel search, eliminating may not be the sub-pel search point of optimum Match, thus reduces the subpixel quantity needing search, accelerates sub-pel search speed.According to the relative bearing between the motion vectors of current macro and the motion vector of whole picture element, complete above-mentioned pre-judgement, the pre-accuracy rate judged is protected, thus do not affecting under reconstructed image subjective quality and encoding code stream change small prerequisite, reduce sub-pel search point, lifter motion search efficiency.
As the improvement of technique scheme, search submodule can also be used for calculating the distance between the motion vectors of current macro and the motion vector of whole picture element; If distance is greater than a picture element, then searches for submodule and 5 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for; If distance is less than or equal to a picture element, then searches for submodule and 3 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for.Not affecting under reconstructed image subjective quality and encoding code stream change small prerequisite, reduce sub-pel search point further.
As the improvement of technique scheme, this optimal match point confirms that the matching primitives result that submodule can also be used for matching primitives submodule exports judges, if matching primitives result is greater than the threshold value preset, then the next subpixel point of matching primitives submodule to search sub-block searches is indicated to carry out matching primitives; If instead matching primitives result is less than or equal to this threshold value, then determine that this subpixel point is optimal match point, instruction search submodule stops search, exit sub-pel search and coupling flow process in advance, not affecting under reconstructed image subjective quality and encoding code stream change small prerequisite, accelerate coding rate further.
Wherein, 3 sub-picture elements around whole picture element in 8 sub-picture elements in this relative bearing are:
The motion vectors of current macro is when the upper right side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively top picture element, upper right side picture element, right picture element;
The motion vectors of current macro is when the right side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively upper right side picture element, right picture element, lower right picture element;
The motion vectors of current macro is when the lower right of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively right picture element, lower right picture element, below picture element;
When the motion vectors of current macro is immediately below the motion vector of whole picture element, 3 sub-picture elements to be searched are respectively lower right picture element, below picture element, lower left picture element;
The motion vectors of current macro is when the lower left of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively below picture element, lower left picture element, left picture element;
The motion vectors of current macro is when the left side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively lower left picture element, left picture element, upper left side picture element;
The motion vectors of current macro is when the upper left side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively left picture element, upper left side picture element, top picture element;
When the motion vectors of current macro is directly over the motion vector of whole picture element, 3 sub-picture elements to be searched are respectively upper left side picture element, top picture element, upper right side picture element.
5 sub-picture elements around whole picture element in 8 sub-picture elements in this relative bearing are:
The motion vectors of current macro is when the upper right side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively upper left side picture element, top picture element, upper right side picture element, right picture element, lower right picture element;
The motion vectors of current macro is when the right side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively top picture element, upper right side picture element, right picture element, lower right picture element, below picture element;
The motion vectors of current macro is when the lower right of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively upper right side picture element, right picture element, lower right picture element, below picture element, lower left picture element;
When the motion vectors of current macro is immediately below the motion vector of whole picture element, 5 sub-picture elements to be searched are respectively right picture element, lower right picture element, below picture element, lower left picture element, left picture element;
The motion vectors of current macro is when the lower left of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively lower right picture element, below picture element, lower left picture element, left picture element, upper left side picture element;
The motion vectors of current macro is when the left side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively below picture element, lower left picture element, left picture element, upper left side picture element, top picture element;
The motion vectors of current macro is when the upper left side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively lower left picture element, left picture element, upper left side picture element, top picture element, upper right side picture element;
When the motion vectors of current macro is directly over the motion vector of whole picture element, 5 sub-picture elements to be searched are respectively left picture element, upper left side picture element, top picture element, upper right side picture element, right picture element.
Adopt the motion estimation algorithm of present embodiment, compared with subpixel full-search algorithm, the minimizing of counting of average sub-pel search is about 50%, but the Y-PSNR of image (PSNR) value is declined by less than 0.1db, after decoding, sequence subjective quality is unaffected, and coding rate obviously speeds.
Third embodiment of the invention relates to the motion search module of a kind of video code between frames compression, comprises: the module of the motion vector of prediction current macro; Carry out whole picture element movement search, the module of the whole picture element mated most; As above sub-pel search module; The motion vector of subpixel optimal match point sub-pel search block search obtained is as motion search result.
Although by referring to some of the preferred embodiment of the invention, to invention has been diagram and describing, but those of ordinary skill in the art should be understood that and can do various change to it in the form and details, and without departing from the spirit and scope of the present invention.

Claims (10)

1. a sub-pel search method in video code between frames compression, is characterized in that, comprise following steps:
A determines the relative bearing between the motion vectors of current macro and the motion vector of whole picture element;
B searches for the N number of subpixel point in this relative bearing in 8 sub-picture elements around this whole picture element, and described N is the integer of 3 to 5; Wherein, calculate the distance between the motion vectors of current macro and the motion vector of whole picture element, if described distance is greater than a picture element, then 5 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for; If described distance is less than or equal to a picture element, then 3 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element are searched for;
C carries out matching primitives to the subpixel point searched for successively, determines the optimal match point of subpixel.
2. sub-pel search method in video code between frames compression according to claim 1, is characterized in that, carry out in the process of matching primitives successively in described step C to the subpixel point searched for:
If the matching primitives result of searched for sub-picture element is greater than the threshold value preset, then matching primitives is carried out to the next subpixel point of search; If instead the matching primitives result of this subpixel point is less than or equal to described threshold value, then determine that this subpixel point is optimal match point, the search in described step B stops.
3. sub-pel search method in video code between frames compression according to claim 1, it is characterized in that, 3 sub-picture elements around described whole picture element in 8 sub-picture elements in this relative bearing are:
The motion vectors of current macro is when the upper right side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively top picture element, upper right side picture element, right picture element;
The motion vectors of current macro is when the right side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively upper right side picture element, right picture element, lower right picture element;
The motion vectors of current macro is when the lower right of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively right picture element, lower right picture element, below picture element;
When the motion vectors of current macro is immediately below the motion vector of whole picture element, 3 sub-picture elements to be searched are respectively lower right picture element, below picture element, lower left picture element;
The motion vectors of current macro is when the lower left of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively below picture element, lower left picture element, left picture element;
The motion vectors of current macro is when the left side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively lower left picture element, left picture element, upper left side picture element;
The motion vectors of current macro is when the upper left side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively left picture element, upper left side picture element, top picture element;
When the motion vectors of current macro is directly over the motion vector of whole picture element, 3 sub-picture elements to be searched are respectively upper left side picture element, top picture element, upper right side picture element.
4. sub-pel search method in video code between frames compression according to claim 1, it is characterized in that, 5 sub-picture elements around described whole picture element in 8 sub-picture elements in this relative bearing are:
The motion vectors of current macro is when the upper right side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively upper left side picture element, top picture element, upper right side picture element, right picture element, lower right picture element;
The motion vectors of current macro is when the right side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively top picture element, upper right side picture element, right picture element, lower right picture element, below picture element;
The motion vectors of current macro is when the lower right of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively upper right side picture element, right picture element, lower right picture element, below picture element, lower left picture element;
When the motion vectors of current macro is immediately below the motion vector of whole picture element, 5 sub-picture elements to be searched are respectively right picture element, lower right picture element, below picture element, lower left picture element, left picture element;
The motion vectors of current macro is when the lower left of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively lower right picture element, below picture element, lower left picture element, left picture element, upper left side picture element;
The motion vectors of current macro is when the left side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively below picture element, lower left picture element, left picture element, upper left side picture element, top picture element;
The motion vectors of current macro is when the upper left side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively lower left picture element, left picture element, upper left side picture element, top picture element, upper right side picture element;
When the motion vectors of current macro is directly over the motion vector of whole picture element, 5 sub-picture elements to be searched are respectively left picture element, upper left side picture element, top picture element, upper right side picture element, right picture element.
5. a method for searching motion for video code between frames compression, is characterized in that, comprise following steps:
The motion vector of prediction current macro;
Carry out whole picture element movement search, the whole picture element mated most;
Adopt the sub-pel search method in Claims 1-4 described in any one to carry out sub-pel search, obtain the optimal match point of subpixel, using the motion vector of this subpixel optimal match point as motion search result.
6. a sub-pel search module in video code between frames compression, is characterized in that, comprise:
Direction locator module, for determining the relative bearing between the motion vectors of current macro and the motion vector of whole picture element;
Search submodule, for searching for the N number of subpixel point in this relative bearing in 8 sub-picture elements around this whole picture element, described N is the integer of 3 to 5;
Matching primitives submodule, for carrying out matching primitives to the subpixel point searched for successively;
Optimal match point confirms submodule, for according to described matching primitives result, determines the optimal match point of subpixel;
Wherein, described search submodule is also for calculating the distance between the motion vectors of current macro and the motion vector of whole picture element;
If described distance is greater than a picture element, then described search submodule is searched for 5 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element;
If described distance is less than or equal to a picture element, then described search submodule is searched for 3 sub-picture elements in this relative bearing in 8 sub-picture elements around this whole picture element.
7. sub-pel search module in video code between frames compression according to claim 6, it is characterized in that, described optimal match point confirms that the matching primitives result of submodule also for exporting described matching primitives submodule judges, if described matching primitives result is greater than the threshold value preset, then the next subpixel point of described matching primitives submodule to described search sub-block searches is indicated to carry out matching primitives; If instead described matching primitives result is less than or equal to described threshold value, then determines that this subpixel point is optimal match point, indicate described search submodule to stop search.
8. sub-pel search module in video code between frames compression according to claim 6, it is characterized in that, 3 sub-picture elements around described whole picture element in 8 sub-picture elements in this relative bearing are:
The motion vectors of current macro is when the upper right side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively top picture element, upper right side picture element, right picture element;
The motion vectors of current macro is when the right side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively upper right side picture element, right picture element, lower right picture element;
The motion vectors of current macro is when the lower right of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively right picture element, lower right picture element, below picture element;
When the motion vectors of current macro is immediately below the motion vector of whole picture element, 3 sub-picture elements to be searched are respectively lower right picture element, below picture element, lower left picture element;
The motion vectors of current macro is when the lower left of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively below picture element, lower left picture element, left picture element;
The motion vectors of current macro is when the left side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively lower left picture element, left picture element, upper left side picture element;
The motion vectors of current macro is when the upper left side of the motion vector of whole picture element, and 3 sub-picture elements to be searched are respectively left picture element, upper left side picture element, top picture element;
When the motion vectors of current macro is directly over the motion vector of whole picture element, 3 sub-picture elements to be searched are respectively upper left side picture element, top picture element, upper right side picture element.
9. sub-pel search module in video code between frames compression according to claim 6, it is characterized in that, 5 sub-picture elements around described whole picture element in 8 sub-picture elements in this relative bearing are:
The motion vectors of current macro is when the upper right side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively upper left side picture element, top picture element, upper right side picture element, right picture element, lower right picture element;
The motion vectors of current macro is when the right side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively top picture element, upper right side picture element, right picture element, lower right picture element, below picture element;
The motion vectors of current macro is when the lower right of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively upper right side picture element, right picture element, lower right picture element, below picture element, lower left picture element;
When the motion vectors of current macro is immediately below the motion vector of whole picture element, 5 sub-picture elements to be searched are respectively right picture element, lower right picture element, below picture element, lower left picture element, left picture element;
The motion vectors of current macro is when the lower left of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively lower right picture element, below picture element, lower left picture element, left picture element, upper left side picture element;
The motion vectors of current macro is when the left side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively below picture element, lower left picture element, left picture element, upper left side picture element, top picture element;
The motion vectors of current macro is when the upper left side of the motion vector of whole picture element, and 5 sub-picture elements to be searched are respectively lower left picture element, left picture element, upper left side picture element, top picture element, upper right side picture element;
When the motion vectors of current macro is directly over the motion vector of whole picture element, 5 sub-picture elements to be searched are respectively left picture element, upper left side picture element, top picture element, upper right side picture element, right picture element.
10. a motion search module for video code between frames compression, is characterized in that, comprise:
The module of the motion vector of prediction current macro;
Carry out whole picture element movement search, the module of the whole picture element mated most;
According to the sub-pel search module in claim 6 to 9 described in any one, the motion vector of the subpixel optimal match point described sub-pel search block search obtained is as motion search result.
CN201010588416.1A 2010-12-14 2010-12-14 Method for searching sub-pixels in interframe codes, motion searching method and module thereof Active CN102547258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010588416.1A CN102547258B (en) 2010-12-14 2010-12-14 Method for searching sub-pixels in interframe codes, motion searching method and module thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010588416.1A CN102547258B (en) 2010-12-14 2010-12-14 Method for searching sub-pixels in interframe codes, motion searching method and module thereof

Publications (2)

Publication Number Publication Date
CN102547258A CN102547258A (en) 2012-07-04
CN102547258B true CN102547258B (en) 2015-05-20

Family

ID=46353065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010588416.1A Active CN102547258B (en) 2010-12-14 2010-12-14 Method for searching sub-pixels in interframe codes, motion searching method and module thereof

Country Status (1)

Country Link
CN (1) CN102547258B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595991B (en) * 2013-11-04 2015-10-28 天津大学 The Pixel-level Forecasting Methodology of deep video coding
CN109660799A (en) * 2017-10-12 2019-04-19 北京金山云网络技术有限公司 Method for estimating, device, electronic equipment and storage medium in Video coding
CN113992914B (en) * 2019-09-24 2023-04-14 Oppo广东移动通信有限公司 Inter-frame prediction method and device, equipment and storage medium
CN113365078B (en) * 2020-03-03 2024-06-25 炬芯科技股份有限公司 Inter-frame coding motion estimation method, inter-frame coding motion estimation device and readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6859494B2 (en) * 2001-07-27 2005-02-22 General Instrument Corporation Methods and apparatus for sub-pixel motion estimation
US7324596B2 (en) * 2003-07-15 2008-01-29 Lsi Logic Corporation Low complexity block size decision for variable block size motion estimation
CN100544442C (en) * 2007-08-07 2009-09-23 华亚微电子(上海)有限公司 A kind of method that is applicable to the sheet stored of estimation
CN101299818B (en) * 2008-06-04 2010-11-17 浙江大学 N level sub-pixel search method based on whole pixel searching result
CN101600111B (en) * 2009-07-14 2010-11-10 清华大学 Searching method for realizing secondary coding of self-adaptive interpolation filter
CN101860747B (en) * 2010-03-31 2012-05-23 北京大学 Sub-pixel movement estimation system and method

Also Published As

Publication number Publication date
CN102547258A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
KR100955152B1 (en) Multi-dimensional neighboring block prediction for video encoding
US9621917B2 (en) Continuous block tracking for temporal prediction in video encoding
US6954502B2 (en) Method for encoding and decoding video information, a motion compensated video encoder and a corresponding decoder
US6785333B2 (en) Motion vector coding method
KR100964515B1 (en) Non-integer pixel sharing for video encoding
CN107087200B (en) Skip coding mode advanced decision method for high-efficiency video coding standard
JPH11112994A (en) Motion vector coding method of mpeg-4
US20140044181A1 (en) Method and a system for video signal encoding and decoding with motion estimation
US20120300845A1 (en) Method, apparatus and computer program product for image motion prediction
CN102077599B (en) Apparatus and method for high quality intra mode prediction in a video coder
JP2008523724A (en) Motion estimation technology for video coding
CN103647972A (en) Moving picture decoding method and moving picture encoding method
KR100597397B1 (en) Method For Encording Moving Picture Using Fast Motion Estimation Algorithm, And Apparatus For The Same
JP5560009B2 (en) Video encoding device
JP2003284091A (en) Motion picture coding method and motion picture coding apparatus
CN108401185B (en) Reference frame selection method, video transcoding method, electronic device and storage medium
CN102547258B (en) Method for searching sub-pixels in interframe codes, motion searching method and module thereof
US11601651B2 (en) Method and apparatus for motion vector refinement
FI109634B (en) Method and apparatus for encoding a video image
JP2004032355A (en) Motion picture encoding method, motion picture decoding method, and apparatus for the both method
CN105282557B (en) A kind of H.264 rapid motion estimating method of predicted motion vector
CN112954365A (en) HEVC interframe motion estimation pixel search improvement method
US20130170565A1 (en) Motion Estimation Complexity Reduction
KR100586103B1 (en) Method for moving picture coding
KR100293445B1 (en) Method for coding motion vector

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20120704

Assignee: Shanghai Li Ke Semiconductor Technology Co., Ltd.

Assignor: Leadcore Technology Co., Ltd.

Contract record no.: 2018990000159

Denomination of invention: Method for searching sub-pixels in interframe codes, motion searching method and module thereof

Granted publication date: 20150520

License type: Common License

Record date: 20180615