CN1649414A - Optimizing distribution method in moving evaluation for hardware computing power resource - Google Patents
Optimizing distribution method in moving evaluation for hardware computing power resource Download PDFInfo
- Publication number
- CN1649414A CN1649414A CN 200510049261 CN200510049261A CN1649414A CN 1649414 A CN1649414 A CN 1649414A CN 200510049261 CN200510049261 CN 200510049261 CN 200510049261 A CN200510049261 A CN 200510049261A CN 1649414 A CN1649414 A CN 1649414A
- Authority
- CN
- China
- Prior art keywords
- macro block
- estimation
- macro
- current
- computing capability
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000011156 evaluation Methods 0.000 title 1
- 230000008878 coupling Effects 0.000 claims description 4
- 238000010168 coupling process Methods 0.000 claims description 4
- 238000005859 coupling reaction Methods 0.000 claims description 4
- 229910003460 diamond Inorganic materials 0.000 claims description 4
- 239000010432 diamond Substances 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000010845 search algorithm Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000008602 contraction Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
This invention discloses an optimized distribution method of a hardware computing capacity resource in motion estimation. H 264 is a new generation video encode standard, which absorbs the advantages of present video code standard and puts forward many new algorithms and greatly increases encode efficiency and image quality yet it needs the support by carious hardware. This invention puts forward optimizing motion estimate, so as to distribute hardware resource reasonably further to get the optimum peak SN ratio and code rate to realize balanced adjustment of operation complexity and predictive accuracy.
Description
Technical field
The present invention relates to the multimedia technology field under the different hardware condition is supported, particularly relate to the optimized distribution method of a kind of hardware computing capability resource in estimation.
Background technology
H.264 be the present up-to-date video encoding standard that ITU-T and MPEG group joint specialist group JVT formulates, this coding standard can obtain very high code efficiency, especially be significantly improved than MPEG-4 at low bit rate connection, be fit to very much the needs of low broadband, high network quality Video Applications.But, H.264, adopted the algorithm of many high computation complexities in order to improve code efficiency, make the encoding and decoding amount of calculation very big, therefore very high to the requirement of software and hardware, also strengthened the difficulty of encoding and decoding simultaneously.Because under normal conditions, a lot of methods can't be implemented under the condition of limited hardware support, make coding quality reach optimum.H.264 can be relatively easy in the application system of the low high time property of code check, realize in order making, must to be optimized its encryption algorithm.Can draw each algoritic module analysis of encoder H.264, the amount of calculation of motion estimation module has accounted for more than 80% of whole encoder operand.Therefore, be optimized whole encoder, motion estimation module should be as first-selection.
H.264 when carrying out estimation, first-selection is carried out motion vector prediction, after prediction obtains initial motion vector, this initial motion vector is carried out the piece match search as search center, adopt full-search algorithm during contraction, promptly provide a search center scope on every side, all points in the rectangular area in this scope, all to calculate matching result one time, therefrom select the result of optimal match point as whole pixel search.H.264 full-search algorithm, advantage are global optimum's matching results that can find in the limited range, and the estimation precision is very high.Its deficiency is that the complexity of algorithm is too high, becomes a part the most consuming time in the whole coding scheme, therefore, under as far as possible little mass loss prerequisite, improves motion estimation search speed, is the key to H.264 being optimized.
At present because the characteristic difference of various hardware devices, so its operational capability is also different with ability to work, and universal along with portable mobile equipment for example is based on the multimedia application emerge in multitude of portable mobile equipment.Because there are problems such as computing capability is weak in portable mobile equipment, and in the multimedia, the computation complexity of video decode is higher relatively, and therefore traditional video coding mode is used for portable mobile equipment, can't satisfy the user to the multimedia especially demand of video technique related application.Therefore at the difference of different hardware equipment computing capability, need when estimation, be optimized, thereby reach the purpose that hardware resource preferably distributes, and then obtain optimized PSNR and code check.
Summary of the invention
The object of the present invention is to provide the optimized distribution method of a kind of hardware computing capability resource in estimation, the situation that has the various computing ability at existing hardware, when H.264 taking exercises estimation, need be optimized, reach the limited hardware reasonable resources and distribute the effect of the optimum of finally getting.
The technical solution used in the present invention is as follows:
(1) based on the absolute error of macro block and size carry out priority and divide, be divided into 16 * 16 macro block according to the size of frame, then a macro block of the present frame macro block corresponding with former frame carried out difference, obtain absolute error and, again according to absolute error and size macro block carried out priority divide, absolute error and computing formula as follows:
Wherein
SAD be absolute error and,
F is the primitive definition of present frame,
G is the primitive definition of former frame;
(2) according to the size of the priority macro block E the highest to current priority (if the macro block of identical limit priority is arranged, then select macro block more placed in the middle as target macroblock) left side A, top B, the adjacent grand estimation of carrying out of upper right side C, again the motion vector MV of resulting adjacent macroblocks A, B, C
A, MV
R, MV
CAnd MV
MedianCandidate's future position as macro block E carries out estimation to current macro E at last, calculates the error of each reference macroblock of current macro and its coupling, and the macro block of Select Error minimum is the optimal reference macro block, obtains the motion vector of current macro E at last;
(3) if the current macro block that identical limit priority is arranged, according to how much selecting of the known MV number of their adjacent macroblocks (left side A, top B, upper right side C) separately, if the known motion vector number of certain macro block E adjacent macroblocks is many more, then this macro block E as target macroblock;
(4) make the estimation that whether stops this frame macro block according to the present situation of current computing capability, the remaining macro block of estimating of not taking exercises is thought that its motion vector equals 0, prepares next frame is proceeded estimation simultaneously.
After in the step (1) present frame being cut apart, according to the absolute error of being calculated and size macro block carried out priority divide, and when the absolute error of two macro blocks and the scope of difference 100 in the time, think that the priority of these two macro blocks is equal to, stipulate that simultaneously absolute error and big its priority of macro block are high more, on the contrary then low more;
In the step (2) when for the first time selecting the limit priority macro block, if the current macro block that identical limit priority is arranged, then macro block more placed in the middle as target macroblock E;
Need obtain the motion vector of its left side A, top B, upper right side C adjacent macroblocks in the step (2) to current macro E.If upper right side C not in present frame, then selects upper left macro block C ' to replace upper right side macro block C;
When in the step (2) adjacent macroblocks of left side A, the top B of current macro E, upper right side C being asked MV,, otherwise adopt the diamond search method if its SAD<default in advance value then adopts the horizontal vertical searching method;
When in the step (2) current macro E being given a forecast, candidate's future position has (0,0), MV
A, MV
B, MV
C, MV
Median:
In the step (2) current macro E is taken exercises when estimating, calculate current macro and its coupling each reference macroblock absolute error and, selecting absolute error and minimum macro block is the optimal reference macro block, obtains the motion vector of current macro E at last;
Step (3) if in the current macro block that identical limit priority is arranged, how much selecting then according to the known motion vector number of their adjacent macroblocks (left side A, top B, upper right side C), if the known motion vector of the adjacent macroblocks of certain macro block is many more, then this macro block as target macroblock;
Computing capability owing to hardware in the step (3) is limited, in the end, make the residue macro block that whether stops this frame according to the present situation of its current computing capability and carry out estimation, stop if being judged as, then the remaining macro block of estimating of not taking exercises is thought that its motion vector equals 0, prepares next frame is proceeded estimation simultaneously.
The useful effect that the present invention has is: can carry out estimation to the vision signal of various forms, especially under hardware computing capability condition of limited, more can embody the superiority of this invention, if under the very strong situation of hardware computing capability, the present invention does not influence the final optimization pass result who obtains after the estimation, because all done estimation for each macro block in each frame this moment.On the contrary, if under hardware computing capability condition of limited, the present invention has demonstrated fully its inherent superiority, because the method that the present invention proposes makes in the frame those absolute errors and bigger macro block at first carry out estimation, according to priority from big to small each macro block is carried out estimation, certainly during estimation, the present invention also fully takes into account the limit of the computing capability of hardware, so adopt the whole bag of tricks to handle, thereby reach optimized effect.
Description of drawings
Fig. 1 is that the position of current macro and adjacent macroblocks concerns schematic diagram in the existing spatial domain;
Fig. 2 is a macro block priority decision method schematic diagram of the present invention;
Fig. 3 is existing diamond search method schematic diagram;
Fig. 4 is existing horizontal vertical searching method schematic diagram;
Fig. 5 is target macroblock system of selection one schematic diagram of the present invention;
Fig. 6 is target macroblock system of selection two schematic diagrames of the present invention;
Fig. 7 is target macroblock system of selection three schematic diagrames of the present invention.
Embodiment
The present invention proposes is used under the limited prerequisite of hardware computing capability the method that estimation is carried out hardware computing capability resource reasonable distribution mainly is applicable under the condition with various computing ability hardware supports and uses.Mainly carry out as follows:
1. the division of macro block priority
Present frame is carried out the division of macro block, is divided into 16 * 16 macro block, then a macro block of the present frame macro block corresponding with former frame carried out difference, obtain absolute error and.Again according to absolute error and size macro block carried out priority divide.When the absolute error of two macro blocks and the scope of difference 100 in the time, think that the priority of these two macro blocks is equal to.Stipulate that simultaneously absolute error and big its priority of macro block are high more, on the contrary then low more.Wherein the position of current macro and adjacent macroblocks relation is seen Fig. 1.
2. select for the first time the highest target macroblock of priority
When selecting the highest macro block E of current priority,, then directly select the highest macro block of priority, the macro block of identical limit priority is arranged else if, then select macro block more placed in the middle as target macroblock E as target macroblock if there is not the macro block of equal priority.Current as shown in Figure 2 two macro block E1 and the E2 that equal priority is arranged, their absolute error and be respectively S1, S2, if | during S2-S1|<=S (S=100), then select macro block E1 placed in the middle as target macroblock.
3. adopt different searching methods
At the different absolute error of macro block and, adopts different searching methods, this is because can be avoided searching for unnecessary like this and the search deficiency.
1) adopts the diamond search method under absolute error and big situation, to use, thereby can find optimum point fast.Divide three kinds of situations, Fig. 3 a is x or y direction translation search, and Fig. 3 b is oblique translation search, and Fig. 3 c is to center search, respectively as shown in Figure 3.
2) adopt the horizontal vertical searching method can reduce the search point, and reach comparatively ideal effect.As shown in Figure 4: establish a starting point, at first seek absolute error and minimum point on its horizontal direction, seek absolute error and minimum point again on the vertical direction of horizontal optimum point, the result of search is final optimum point.Therefore search procedure is as follows: search center is No. 1 point, compare on its left side and No. 2 points, draw the absolute error of No. 1 point and littler, compare with No. 3 points in the right of 1 again, draw No. 1 point absolute error and minimum, therefore No. 1 point is the optimum point on the horizontal direction, in like manner, continuation is searched on the vertical direction of No. 1 point, and final result is that No. 5 points are optimum points.
4. by (Half-Stop) criterion
When the absolute error of estimation point and (SAD)<T, motion estimation process ends, and wherein T is a thresholding, and getting definite value at 16 * 16 macro block in the test is 400.For example ought detect the absolute error of certain point and (SAD) be 300, end search procedure, confirm as best search match point.
5. select the highest target macroblock of priority
If the current macro block E that identical limit priority and discrete appearance are arranged
i, E
I+1..., E
j(be designated as set A, and 1≤i, j≤M * N, i≤j, wherein M * N is the total macroblock number of a frame, gets 6 * 6 among the figure), then (left side A, top B, upper right side C, wherein how much the motion vector number that i≤p≤j) is known selects according to their adjacent macroblocks.In deterministic process, have multiple situation, as follows:
1) in the identical macro block of these priority, first kind of situation wishes to find a unique macro block E
P, the known motion vector of its adjacent macroblocks is maximum, and this moment can be this macro block E
PDirectly as target macroblock; As shown in Figure 5: E
PAdjacent macroblocks A, B, C in have 3 MV known, and remove E
pThe known MV number of adjacent macroblocks of outer other macro block E all is no more than 3.So select E
pBe target macroblock.
2) in the identical macro block of these priority, if above-mentioned situation can't satisfy, if the macro block E of a plurality of discrete appearance is promptly arranged
m, E
M+1..., E
n, simultaneously the known motion vector number of their adjacent macroblocks is identical.Then at these macro blocks E
m, E
M+1..., E
nIf in the known MV of adjacent macroblocks ≠ 0 number of some macro blocks in them maximum, then selecting this macro block is target macroblock, as shown in Figure 6: E
qAdjacent macroblocks 3 known MV are arranged and all are not equal to 0, and remove E
qThe known MV of the adjacent macroblocks of outer other macro block E exists and equals 0 situation.So select E
qBe target macroblock.
3), then select macro block more placed in the middle as target macroblock if when above-mentioned two methods all can't be selected target macroblock.As shown in Figure 7: compare the identical macro block E of current priority
tAnd E, select macro block E more placed in the middle
tAs target macroblock.The reason of doing the like this likelihood ratio that to be macro block placed in the middle occur as the predicted value of other macro blocks is bigger.
The present invention has tested on the H.264 encoder of independent development and has passed through following technology during H.264 this encoder has adopted:
1) reference frame number: 1;
2) 2) frame type: I frame, P frame;
3) 3) rate-distortion optimization (RDO);
4) adopt the CAVAL entropy coding;
5) whole pixel motion estimation range: 16;
6) motion estimation mode: 16 * 16;
7) whole pixel search.
The result of the test of the inventive method shows: under the support of E-Sitsang-PXA255 hardware, use foreman, and mobile, video sequence such as news are tested, and form is CIF (352 * 288), and the result can reach about 35fps.Obtain reasonable snr value and code check simultaneously.
Claims (9)
1. the optimized distribution method of a hardware computing capability resource in estimation is characterized in that:
(1) based on the absolute error of macro block and size carry out priority and divide, be divided into 16 * 16 macro block according to the size of frame, then a macro block of the present frame macro block corresponding with former frame carried out difference, obtain absolute error and, again according to absolute error and size macro block carried out priority divide, absolute error and computing formula as follows:
Wherein
SAD be absolute error and,
F is the primitive definition of present frame,
G is the primitive definition of former frame;
(2) according to the size of priority to left side A, the top B of the highest macro block E of current priority, the adjacent grand estimation of carrying out of upper right side C, again the motion vector MV of resulting adjacent macroblocks A, B, C
A, MV
B, MV
CAnd MV
MedianCandidate's future position as macro block E carries out estimation to current macro E at last, calculates the error of each reference macroblock of current macro and its coupling, and the macro block of Select Error minimum is the optimal reference macro block, obtains the motion vector of current macro E at last;
(3) if the current macro block that identical limit priority is arranged, according to how much selecting of the known MV number of their adjacent macroblocks left side A, top B, upper right side C separately, if the known motion vector number of certain macro block E adjacent macroblocks is many more, then this macro block E as target macroblock;
(4) make the estimation that whether stops this frame macro block according to the present situation of current computing capability, the remaining macro block of estimating of not taking exercises is thought that its motion vector equals 0, prepares next frame is proceeded estimation simultaneously.
2. the optimized distribution method of a kind of hardware computing capability resource according to claim 1 in estimation, it is characterized in that: after in the step (1) present frame being cut apart, according to the absolute error of being calculated and size macro block carried out priority divide, and when the absolute error of two macro blocks and the scope of difference 100 in the time, think that the priority of these two macro blocks is equal to, stipulate that simultaneously absolute error and big its priority of macro block are high more, on the contrary then low more.
3. the optimized distribution method of a kind of hardware computing capability resource according to claim 1 in estimation, it is characterized in that: in the step (2) when for the first time selecting the limit priority macro block, if the current macro block that identical limit priority is arranged, then macro block more placed in the middle as target macroblock E.
4. the optimized distribution method of a kind of hardware computing capability resource according to claim 1 in estimation, it is characterized in that: the motion vector that need obtain its left side A, top B, upper right side C adjacent macroblocks in the step (2) to current macro E, if upper right side C not in present frame, then selects upper left macro block C ' to replace upper right side macro block C.
5. the optimized distribution method of a kind of hardware computing capability resource according to claim 1 in estimation, when the adjacent macroblocks that it is characterized in that in the step (2) left side A, top B, upper right side C to current macro E is asked MV, if its SAD<default in advance value, then adopt the horizontal vertical searching method, otherwise adopt the diamond search method.
6. the optimized distribution method of a kind of hardware computing capability resource according to claim 1 in estimation is characterized in that: when in the step (2) current macro E being given a forecast, candidate's future position has (0,0), MV
A, MV
B, MV
C, Mv
Median
7. the optimized distribution method of a kind of hardware computing capability resource according to claim 1 in estimation, it is characterized in that: in the step (2) current macro E is taken exercises when estimating, calculate current macro and its coupling each reference macroblock absolute error and, selecting absolute error and minimum macro block is the optimal reference macro block, obtains the motion vector of current macro E at last.
8. the optimized distribution method of a kind of hardware computing capability resource according to claim 1 in estimation, it is characterized in that: step (3) if in the current macro block that identical limit priority is arranged, then according to their adjacent macroblocks, left side A, top B, upper right side C, how much selecting of known motion vector number, if the known motion vector of the adjacent macroblocks of certain macro block is many more, then this macro block as target macroblock.
9. the optimized distribution method of a kind of people's hardware computing capability resource according to claim 1 in estimation, it is characterized in that: the computing capability owing to hardware in the step (3) is limited, in the end, make the residue macro block that whether stops this frame according to the present situation of its current computing capability and carry out estimation, stop if being judged as, then the remaining macro block of estimating of not taking exercises is thought that its motion vector equals 0, prepares next frame is proceeded estimation simultaneously.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100492613A CN1319384C (en) | 2005-01-27 | 2005-01-27 | Optimizing distribution method in moving evaluation for hardware computing power resource |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100492613A CN1319384C (en) | 2005-01-27 | 2005-01-27 | Optimizing distribution method in moving evaluation for hardware computing power resource |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1649414A true CN1649414A (en) | 2005-08-03 |
CN1319384C CN1319384C (en) | 2007-05-30 |
Family
ID=34876549
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005100492613A Expired - Fee Related CN1319384C (en) | 2005-01-27 | 2005-01-27 | Optimizing distribution method in moving evaluation for hardware computing power resource |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1319384C (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102227132A (en) * | 2011-05-25 | 2011-10-26 | 深圳市融创天下科技股份有限公司 | Motion vector prediction coding and decoding method, apparatus thereof and coding and decoding system |
CN102118612B (en) * | 2009-12-31 | 2012-11-14 | Tcl集团股份有限公司 | Method and system for acquiring memory resource of audio and video hard decoding chip |
US9219914B2 (en) | 2008-10-06 | 2015-12-22 | Lg Electronics Inc. | Method and an apparatus for decoding a video signal |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE4342305A1 (en) * | 1993-12-11 | 1995-06-29 | Thomson Brandt Gmbh | Method for hierarchical motion estimation in a television signal |
JPH11122624A (en) * | 1997-10-16 | 1999-04-30 | Matsushita Electric Ind Co Ltd | Method and system for reducing video decoder processing amount |
KR100833228B1 (en) * | 2002-02-21 | 2008-05-28 | 삼성전자주식회사 | Method for encoding motion image having fixed computational complexity and apparatus thereof |
CN1245028C (en) * | 2003-03-03 | 2006-03-08 | 清华大学 | Non-uniform multilayer hexaploid lattice full pixel kinematic search method |
-
2005
- 2005-01-27 CN CNB2005100492613A patent/CN1319384C/en not_active Expired - Fee Related
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9219914B2 (en) | 2008-10-06 | 2015-12-22 | Lg Electronics Inc. | Method and an apparatus for decoding a video signal |
US10063877B2 (en) | 2008-10-06 | 2018-08-28 | Lg Electronics Inc. | Method and an apparatus for processing a video signal |
US10631000B2 (en) | 2008-10-06 | 2020-04-21 | Lg Electronics Inc. | Method and an apparatus for processing a video signal |
US11190795B2 (en) | 2008-10-06 | 2021-11-30 | Lg Electronics Inc. | Method and an apparatus for processing a video signal |
CN102118612B (en) * | 2009-12-31 | 2012-11-14 | Tcl集团股份有限公司 | Method and system for acquiring memory resource of audio and video hard decoding chip |
CN102227132A (en) * | 2011-05-25 | 2011-10-26 | 深圳市融创天下科技股份有限公司 | Motion vector prediction coding and decoding method, apparatus thereof and coding and decoding system |
CN102227132B (en) * | 2011-05-25 | 2017-04-12 | 深圳市云宙多媒体技术有限公司 | Motion vector prediction coding and decoding method, apparatus thereof and coding and decoding system |
Also Published As
Publication number | Publication date |
---|---|
CN1319384C (en) | 2007-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102835106B (en) | Data compression for video | |
CN1136734C (en) | Variable bitrate video coding method and corresponding video coder | |
CN100579229C (en) | Method for processing interlaced video with a plurality of reference diagrams | |
CN101815215B (en) | Selecting method for coding mode and a device thereof | |
CN1128547C (en) | Decoding and coding method of moving image signal, and decoding and coding apparatus | |
CN100338957C (en) | Complexity hierarchical mode selection method | |
BRPI1000861A2 (en) | intra-prediction method and apparatus for a group of samples in an image being encoded | |
CN1874519A (en) | Intraprediction method and apparatus using video symmetry and encoding and decoding method and apparatus | |
CN1533675A (en) | Method and apparatus for sub-pixel motion estimation | |
CN1929611A (en) | Methods and apparatus for video intraprediction encoding and decoding | |
CN1719735A (en) | Method or device for coding a sequence of source pictures | |
CN1525762A (en) | A coding/decoding end bothway prediction method for video coding | |
CN1643912A (en) | Method for coding motion in a video sequence | |
CN1725863A (en) | The method of intra-prediction and the equipment that are used for video data | |
CN1830213A (en) | Method and apparatus for video encoding | |
CN1585495A (en) | Quick selection of prediction modes in H.264/AVC frame | |
CN1976476A (en) | Fast inter-frame mode adjudging method capable of fusing multi-reference frame selection and motion estimation | |
CN1236624C (en) | Quick full pixel movement evaluation method of multiple kinds of modules | |
CN1794816A (en) | Moving picture compression encoding method, apparatus and program | |
CN1198465C (en) | Code converter and cod convertion method | |
CN1774933A (en) | Method and apparatus for determining search range for adaptive motion vector for use in video encoder | |
CN1604653A (en) | Differential video coding method | |
Zuo et al. | Fast mode decision method for all intra spatial scalability in SHVC | |
CN1604650A (en) | Method for hierarchical motion estimation | |
CN1482810A (en) | Method for motion estimation (me) through discrete cosine transform (dct) and an apparatus therefor |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20070530 Termination date: 20160127 |
|
EXPY | Termination of patent right or utility model |