CN100366092C - Search method for video frequency encoding based on motion vector prediction - Google Patents

Search method for video frequency encoding based on motion vector prediction Download PDF

Info

Publication number
CN100366092C
CN100366092C CNB2005100634417A CN200510063441A CN100366092C CN 100366092 C CN100366092 C CN 100366092C CN B2005100634417 A CNB2005100634417 A CN B2005100634417A CN 200510063441 A CN200510063441 A CN 200510063441A CN 100366092 C CN100366092 C CN 100366092C
Authority
CN
China
Prior art keywords
data block
motion vector
current data
motion
center
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
CNB2005100634417A
Other languages
Chinese (zh)
Other versions
CN1655618A (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.)
Mid Star Technology Ltd By Share Ltd
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CNB2005100634417A priority Critical patent/CN100366092C/en
Publication of CN1655618A publication Critical patent/CN1655618A/en
Application granted granted Critical
Publication of CN100366092C publication Critical patent/CN100366092C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention discloses a searching method based on motion vector prediction in video encoding, which comprises the following steps: step one, motion vectors of a plurality of data blocks adjacent to the position of a current data block are acquired; step two, the prediction motion vector of the current data block is acquired according to the motion vector of each data block; step three, the search of a small mould plate is carried out by taking the position of the prediction motion vector of the current data block as a center until to obtain a local optimum motion vector. Compared with the prior art, the present invention has the characteristics of simple algorithm, small calculated amount, high searching rate, accurate prediction, etc.

Description

In a kind of video coding based on the searching method of motion-vector prediction
Technical field
The present invention relates to the video signal coding field, the method for the motion-vector prediction in particularly a kind of video coding process.
Technical background
In the present video coding technique, motion vector (Motion Vector is called for short MV) prediction is the starting point of calculating kinematical vector field.If effective motion vectors field has been reduced the complexity and the amount of calculation of estimation so on the one hand, also help removing data redundancy on the other hand, improve the code efficiency of whole system.
But in the prior art, the MV prediction generally is a similitude of utilizing the motion of adjacent area in the frame, and level, vertical adjacent data blocks piece MV predicts the motion vector of current data block, is direct MV prediction.Shown in 1,2, suppose that E is current macro block, macroblock partition or child partition with reference to the accompanying drawings, A is the subregion or the child partition in E left side, and B is the subregion or the child partition of E top, and C is top-right subregion of E or child partition.If at the subregion of the left side of E appearance more than 1, the highest part will be selected by A in these subregions so; If the subregion more than 1 occurs above E, the part of the leftmost side will be selected by B in these subregions so.Fig. 1 represents is the selection of all subregions (being 16*16 here) adjacent sectors when all having same size.What Fig. 2 represented is, how to predict the selection of subregion when adjacent sectors and current subregion E have different size.Specify as follows:
(1), do not comprise that the motion vectors (MVp) of the partitions sizes of 16*8 and 8*16: E is the average of the motion vector of subregion A, B, C for the subregion that has transmitted;
(2) for the subregion of 16*8: the MVp of the subregion of the 16*8 of top is that the MVp of the subregion of the 16*8 of below is predicted by A by the B prediction.
(3) for the subregion of 8*16: the MVp of the subregion of the 8*16 of top is that the MVp of the subregion of the 8*16 of below is predicted by C by the A prediction.
(4) for the macro block of skipping: a 16*16 vector MVp will produce as the situation described in (1).(for example, encoding with the 16*16Inter pattern) just as piece.
Therefore such MV Forecasting Methodology amount of calculation is very little, but inaccuracy only adopts the prediction of direct MV at macro block seldom in an image, and the MV prediction of a large amount of macro blocks remains with traditional motion estimation algorithm calculates.
Traditional motion estimation algorithm is based upon on the motion search basis, and three-step approach is arranged, four step rule etc., and basic principle is:
At first, adopt an initial template, shown in the stain in the accompanying drawing 3, calculate mean square deviation (MSE, Mean Square Error) or absolute error and (SAD, the Sumof Absolute Difference) of each point and piece each point to be predicted then;
Then, template center is moved on to the difference smallest point, step-length reduces half, gets new template, shown in the point of the black and white in the accompanying drawing 3 half and half, recomputates the MSE or the SAD of each point;
At last, repeat previous step, shown in the white point of accompanying drawing 3, obtain predicting MV up to the end condition that satisfies search.
Traditional various motion estimation algorithm is to adopt different templates, and to reduce the amount of calculation of search, meticulousr search also can be adopted the calculating of both full-pixel and half-pix (even 1/4 pixel) position.Motion estimation algorithm accounts for whole amount of calculation 70% greatly in video coding, and the calculating of SAD is up to 60%, if adopt MSE, operand is just bigger so.
Summary of the invention
The objective of the invention is: in the video coding that at the deficiencies in the prior art, provide a kind of and predict accurately, algorithm is simple fast, operand is little based on the searching method of motion-vector prediction.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is: based on the searching method of motion-vector prediction, comprise the steps: in a kind of video coding
The motion vector of a plurality of data blocks that step 1, acquisition are adjacent with described current data block position;
Step 2, according to the motion vector of described each data block, obtain the motion vectors of current data block;
Step 3, be the center, carry out the search of little template, until the motion vector that obtains local optimum with the motion vectors position of described current data block.
In the described step 1, a plurality of data blocks adjacent with the current data block position can comprise left data block, top data block and the upper right side data block of current data block.
In the described step 2, the motion vectors of current data block=(2* left data block motion vector+top data block motion vector+upper right side data block motion vector)/4.
Described step 2 is specifically as follows according to the gradient of described each data block to current data block, obtains the motion vectors of current data block.
In the described step 2, can calculate the gradient of described each data block to current data block respectively, the motion vector of getting gradient minimal data piece is the motion vectors of current data block.
Further, described step 3 can be specially:
A, be the center, with one 5 little template, read the data of the data block in the little template, and carry out SAD and calculate with the motion vectors position of current data block;
B, judge whether described SAD result of calculation smallest point overlaps with the center, if, then jump to steps d, otherwise execution in step c;
C, to get SAD result of calculation smallest point be new center, reads the data of the data block in one 5 the little template again, and carry out SAD and calculate, and returns step b then;
D, the center when described SAD result of calculation smallest point overlaps with the center are the motion vector position of local optimum.
Described data block can be macro block or piece.
In technique scheme, the present invention has realized a kind of novel fast search algorithm, it utilizes the correlation of adjacent data blocks, reduced computational complexity, dwindle the hunting zone of current data block, thereby can improve the internal memory reading speed, and on this basis, adopt the search of little template to calculate, can obtain very accurate prediction MV and very low amount of calculation.
Description of drawings
Accompanying drawing 1 is the schematic diagram when the direct predicted method adjacent data of MV block size is consistent in the prior art;
Accompanying drawing 2 is the schematic diagram during not of uniform size the causing of the direct predicted method adjacent data blocks of MV in the prior art;
Accompanying drawing 3 is the schematic diagram of motion estimation algorithm in the prior art;
Accompanying drawing 4 is the flow chart of the inventive method;
Accompanying drawing 5 is the schematic diagram that adopts little template search in a kind of specific embodiment of the present invention.
Embodiment
Below in conjunction with Figure of description and specific embodiment the present invention is described in further detail.
With reference to the accompanying drawings 4, a kind of specific embodiment of the present invention provides in a kind of video coding the searching method based on motion-vector prediction, because the processing procedure of video coding mainly is at macro block (MacroBlock at present, MB) or piece (Block) carry out, the size of a macro block is 16 * 16 pixels, wherein can be divided into the piece of 48 * 8 pixels.Therefore, present embodiment is also operated at macro block or piece.Its step is as follows:
The a plurality of macro blocks that step 1, acquisition and described current macro or piece position are adjacent or the motion vector of piece.
Wherein, adjacent a plurality of macro blocks or piece follow the example of can with prior art in identical, with reference to the accompanying drawings 1,2, described current macro/piece is E, described adjacent a plurality of macro blocks or piece comprise left macroblock/block A, top macroblock/block B and upper right side macroblock/block C.When the varying in size of ABC and E, it is followed the example of can be with reference to the introduction of this specification technical background part.
Step 2, according to the motion vector of described each macroblock/block, obtain the motion vectors of current macro/piece.
The concrete method of implementing can have multiple, also can adopt method of the prior art.
Two kinds of preferable embodiments are provided in the specific embodiments of the invention:
Method one:
The predictor formula of getting E is: MV E=(2*MV A+ MV B+ MV C)/4.
Be the motion vectors MV of E EMotion vector MV by A A, B motion vector MV BMotion vector MV with C CCalculate.
Therefore this predictor formula can obtain the motion vectors of E comparatively accurately owing to considered the correlation of the macroblock/block that E is adjacent.
Method two:
Be based on the Forecasting Methodology of gradient calculation,, obtain the motion vectors of current macro/piece promptly according to the gradient of described each macroblock/block to current macro/piece.
Be specially: calculate described each macroblock/block A, B, the C gradient to current macro/piece E respectively, the motion vector of getting the macroblock/block of gradient minimum is the motion vectors of current macro/piece E.
In the actual implementation process, can choose the method for prior art according to the different images and the diverse location of image, a kind of enforcement in two kinds of methods perhaps provided by the invention.Its prediction accuracy is difference slightly.
Step 3, be the center, carry out the search of little template, until the motion vector that obtains local optimum with the motion vectors position of described current macro/piece.
The purpose of this step is to have obtained to carry out searching algorithm fast on the basis of preliminary motion vectors in step 2, thereby search obtains optimum motion vector.
The purpose of getting little template search is exactly in order to reduce amount of calculation, to improve search efficiency, guaranteeing the accuracy of search.Described little template can adopt step-length less, the less template of counting.As, adopting step-length is 23 point templates, perhaps step-length is 15 point templates etc.When adopting step-length greater than 1 the time, can reduce step-length and search for reference in the conventional motion estimation algorithm.Present embodiment is in order to improve the accuracy of search as much as possible, and having adopted step-length as shown in Figure 5 is 15 little template.
Its concrete search procedure is as follows:
The first step is the center with the motion vectors position of current macro/piece, gets one 5 little template, sees among Fig. 55 macroblock/block shown in a, b, c, d, the e, and wherein, the motion vectors MV that a represents in the step 2 to be obtained EThe position.
Read the data of this little template interior a, b, c, d, e macroblock/block, and carry out SAD respectively and calculate.
In second step, judge whether described SAD result of calculation smallest point overlaps with center a, if then jumped to for the 4th step, otherwise carried out for the 3rd step;
In the 3rd step, getting SAD result of calculation smallest point is new center, is b as new center, then gets one 5 little template again, promptly is made up of a, b, g, f, these 5 macroblock/block of h.
Read the data of the macroblock/block in this little template again, and carry out SAD respectively and calculate, returned for second step then;
In the 4th step, the center when described SAD result of calculation smallest point overlaps with the center is the motion vector position of local optimum.
So, then reached the purpose of this search optimal motion vector.
Clearly, the present invention at first passes through the correlation of adjacent macroblocks/piece, carry out preliminary motion-vector prediction, thereby can obtain the position of motion vectors roughly, and then the fast search algorithm by little template, predicted position is carried out quick search among a small circle again, and obtains the optimal motion vector.The relative undoubtedly prior art of this method, both accurate, quick again, also can significantly reduce operand.Facts have proved, after employing this method, owing to can only read the data block of motion vectors direction, so the hunting zone can be reduced into 1/3~1/4 of prior art.And its precision of prediction is than simple direct MV prediction algorithm height, and the complexity of calculating is lower than traditional motion estimation algorithm, is well positioned to meet the compromise requirement of the precision and the complexity of estimation.
Though above more at large described the present invention, these descriptions only are illustrative and not restrictive.Obviously, the present invention can change in many ways for those of ordinary skill.All such variations all belong within the scope of the present invention, and should not be considered to depart from scope of the present invention.The present invention is limited by marrow of claims and scope only.

Claims (6)

  1. In the video coding based on the searching method of motion-vector prediction, comprise the steps:
    The motion vector of a plurality of data blocks that step 1, acquisition are adjacent with the current data block position;
    Step 2, according to the motion vector of each data block, obtain the motion vectors of current data block;
    Step 3, be the center with the motion vectors position of described current data block, carry out the search of little template, until the motion vector that obtains local optimum, it is specially:
    A, be the center, with one 5 little template, read the data of the data block in the little template, and carry out SAD and calculate with the motion vectors position of current data block;
    B, judge whether described SAD result of calculation smallest point overlaps with the center, if, then jump to steps d, otherwise execution in step c;
    C, to get SAD result of calculation smallest point be new center, reads the data of the data block in one 5 the little template again, and carry out SAD and calculate, and returns step b then;
    D, the center when described SAD result of calculation smallest point overlaps with the center are the motion vector position of local optimum.
  2. 2. method according to claim 1, it is characterized in that: in the described step 1, a plurality of data blocks adjacent with the current data block position comprise left data block, top data block and the upper right side data block of current data block.
  3. 3. as method as described in the claim 2, it is characterized in that: in the described step 2, the motion vectors of current data block=(2* left data block motion vector+top data block motion vector+upper right side data block motion vector)/4.
  4. 4. method according to claim 1, it is characterized in that: described step 2 is specially according to the gradient of each data block to current data block, obtains the motion vectors of current data block.
  5. 5. as method as described in the claim 4, it is characterized in that: in the described step 2, calculate the gradient of described each data block to current data block respectively, the motion vector of getting gradient minimal data piece is the motion vectors of current data block.
  6. 6. as method as described in the claim 5, it is characterized in that: data block is macro block or piece.
CNB2005100634417A 2005-04-08 2005-04-08 Search method for video frequency encoding based on motion vector prediction Active CN100366092C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100634417A CN100366092C (en) 2005-04-08 2005-04-08 Search method for video frequency encoding based on motion vector prediction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100634417A CN100366092C (en) 2005-04-08 2005-04-08 Search method for video frequency encoding based on motion vector prediction

Publications (2)

Publication Number Publication Date
CN1655618A CN1655618A (en) 2005-08-17
CN100366092C true CN100366092C (en) 2008-01-30

Family

ID=34894623

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100634417A Active CN100366092C (en) 2005-04-08 2005-04-08 Search method for video frequency encoding based on motion vector prediction

Country Status (1)

Country Link
CN (1) CN100366092C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080002772A1 (en) * 2006-06-28 2008-01-03 Hong Kong Applied Science and Technology Research Institute Company Limited Motion vector estimation method
CN101557514B (en) * 2008-04-11 2011-02-09 华为技术有限公司 Method, device and system for inter-frame predicting encoding and decoding
CN109660799A (en) * 2017-10-12 2019-04-19 北京金山云网络技术有限公司 Method for estimating, device, electronic equipment and storage medium in Video coding
CN111931000B (en) * 2020-08-12 2023-12-19 武汉兆图科技有限公司 Large-scale vector field data processing method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1154051A (en) * 1995-11-08 1997-07-09 大宇电子株式会社 Method and apparatus for detecting motion vectors
CN1211872A (en) * 1997-06-04 1999-03-24 株式会社日立制作所 Image signal system converter and TV set
CN1333634A (en) * 2001-01-12 2002-01-30 北京航空航天大学 Quick video motion estimating method
CN1436002A (en) * 2002-01-26 2003-08-13 Lg电子株式会社 Adaptive motion vector search range determining method
CN1440203A (en) * 2002-02-23 2003-09-03 三星电子株式会社 Self-adaptive kinetic estimated device and method
CN1444406A (en) * 2003-01-24 2003-09-24 杭州国芯科技有限公司 Vidio motion estimation method
CN1506971A (en) * 2002-12-09 2004-06-23 ������������ʽ���� Semiconductor device, image data processing apparatus and method
CN1585487A (en) * 2004-05-21 2005-02-23 中国科学院计算技术研究所 Kinematic vector predicting method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1154051A (en) * 1995-11-08 1997-07-09 大宇电子株式会社 Method and apparatus for detecting motion vectors
CN1211872A (en) * 1997-06-04 1999-03-24 株式会社日立制作所 Image signal system converter and TV set
CN1333634A (en) * 2001-01-12 2002-01-30 北京航空航天大学 Quick video motion estimating method
CN1436002A (en) * 2002-01-26 2003-08-13 Lg电子株式会社 Adaptive motion vector search range determining method
CN1440203A (en) * 2002-02-23 2003-09-03 三星电子株式会社 Self-adaptive kinetic estimated device and method
CN1506971A (en) * 2002-12-09 2004-06-23 ������������ʽ���� Semiconductor device, image data processing apparatus and method
CN1444406A (en) * 2003-01-24 2003-09-24 杭州国芯科技有限公司 Vidio motion estimation method
CN1585487A (en) * 2004-05-21 2005-02-23 中国科学院计算技术研究所 Kinematic vector predicting method

Also Published As

Publication number Publication date
CN1655618A (en) 2005-08-17

Similar Documents

Publication Publication Date Title
CN1960496B (en) Motion vector detection apparatus
CN100468982C (en) Method and apparatus for performing high quality fast predictive motion search
CN104539963B (en) The method performed by video decoder
CN102291581B (en) Realizing method of self-adaptive motion estimation supporting frame field
CN110225346A (en) A kind of decoding method and its equipment
CN102075760B (en) Quick movement estimation method and device
CN103609125A (en) Method and apparatus for encoding and decoding motion vector of multi-view video
CN101605262B (en) Method and device for predicting size motion of variable block
CN101686393A (en) Fast-motion searching method and fast-motion searching device applied to template matching
CN106993187B (en) A kind of coding method of variable frame rate and device
CN102656889A (en) Image encoding device, image decoding device, image encoding method, and image decoding method
CN102811346B (en) coding mode selection method and system
CN101883286A (en) Calibration method and device, and motion estimation method and device in motion estimation
CN101505427A (en) Movement estimation apparatus in video compression encoding algorithm
CN103338377A (en) Method for confirming optimal motion vector in motion estimation
CN100366092C (en) Search method for video frequency encoding based on motion vector prediction
CN100401779C (en) Method for hierarchical motion estimation
CN102572424A (en) Image processing apparatus, method and program
CN107360433A (en) A kind of interframe prediction encoding method and device
Huang et al. Predictive line search: an efficient motion estimation algorithm for MPEG-4 encoding systems on multimedia processors
CN100385957C (en) Kinematic vector predicting method
CN101511019A (en) Method and apparatus for estimating variable mode motion
CN111901590B (en) Refined motion vector storage method and device for inter-frame prediction
CN103974077B (en) Quick integer motion estimation searching method used for H.264 coding
CN112261413A (en) Video encoding method, encoding device, electronic device, and storage medium

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
TR01 Transfer of patent right

Effective date of registration: 20171219

Address after: 519031 Guangdong city of Zhuhai province Hengqin Baohua Road No. 6, room 105, -23898 (central office)

Patentee after: Zhongxing Technology Co., Ltd.

Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 35, Nanjing Ning building, 15 Floor

Patentee before: Beijing Vimicro Corporation

TR01 Transfer of patent right
CP01 Change in the name or title of a patent holder

Address after: 519031 -23898, 105 room 6, Baohua Road, Hengqin New District, Zhuhai, Guangdong (centralized office area)

Patentee after: Mid Star Technology Limited by Share Ltd

Address before: 519031 -23898, 105 room 6, Baohua Road, Hengqin New District, Zhuhai, Guangdong (centralized office area)

Patentee before: Zhongxing Technology Co., Ltd.

CP01 Change in the name or title of a patent holder