CN101340582A - Motion vector synthesizing method in resolution decreasing video code conversion - Google Patents

Motion vector synthesizing method in resolution decreasing video code conversion Download PDF

Info

Publication number
CN101340582A
CN101340582A CN 200810048800 CN200810048800A CN101340582A CN 101340582 A CN101340582 A CN 101340582A CN 200810048800 CN200810048800 CN 200810048800 CN 200810048800 A CN200810048800 A CN 200810048800A CN 101340582 A CN101340582 A CN 101340582A
Authority
CN
China
Prior art keywords
motion vector
sad
sigma
centerdot
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200810048800
Other languages
Chinese (zh)
Other versions
CN101340582B (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.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN 200810048800 priority Critical patent/CN101340582B/en
Publication of CN101340582A publication Critical patent/CN101340582A/en
Application granted granted Critical
Publication of CN101340582B publication Critical patent/CN101340582B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a synthetic method for motion vectors in a degrading resolution video transcoding. Firstly, a first synthesized motion vector is calculated according to weight when the precisions of a plurality of input motion vectors are comparatively consistent or inconsistent; and the sum of absolute difference, bit number and lagrange multiplier which correspond to a median motion vector and a furthest motion vector apart from the first resultant motion vector in the adjacent motion vectors are calculated; and then a rate-distortion function value corresponding to each motion vector is calculated and the motion vector of the minimum rate-distortion function value is selected as a second resultant motion vector; finally, by adopting the second resultant motion vector as a center, a new search with a small window is carried out so as to obtain the final resultant motion vector. In the first synthesization of the invention, a weighted average is carried out to the motion vector based on the precision while a rate-distortion selection is carried out to the motion vector based on the precision in the second synthesization, thereby reducing errors in selecting the synthesization.

Description

Motion vector synthesizing method in a kind of resolution decreasing video code conversion
Technical field
The present invention relates to a kind of resolution decreasing video code conversion method, the motion vector synthesizing method in particularly a kind of resolution decreasing video code conversion belongs to multimedia video transcoding field.
Background technology
Video code conversion can be converted to another kind of form from a kind of form (as resolution, frame per second, code check etc.) with the video flowing that has compressed, with network and the terminal that adapts to different performance.As one of key technology of video code conversion, resolution decreasing video code conversion can be low resolution with compressed video by high resolution conversion by the space down-sampling, to adapt to the restriction of terminal display capabilities and disposal ability.In the resolution decreasing transcoding, a plurality of macro blocks in the high-definition picture need synthesize a macro block in the low-resolution image, and correspondingly a plurality of motion vectors also need synthetic new motion vector.Therefore motion vector becomes the key issue of resolution decreasing video code conversion.
Existing motion vector composition algorithm can be summarized as two kinds: first kind is to select, and second kind is summation.According to first kind of thinking, list of references 1 (Rajeev Kumar, Vasant Pati], An efficientmotion vector composition scheme for arbitrary frame down-sampling videotranscoder.IEEE Transactions on Circuits and Systems for VideoTechnology, 2006,16 (9): 1148~1152) proposed the leading vector in space and selected composition algorithm, from a plurality of input motion vectors, selected to have the motion vector of maximum coverage area as the output movement vector.According to second kind of thinking, list of references 2 (Jiao Wang, En-hui Yang, Xiang Yu, An efficientmotion estimation method for is video transcoding with spatialresolution conversion.In:Proceedings of 2007 IEEE InternationalConference on Multimedia and Expo H.264-based, Bei jing, China, 2007:444~447) proposed composition algorithm, a plurality of input motion vectors have been weighted summation according to linear model coefficients obtain the output movement vector based on linear degenerated mode.
Though above-mentioned algorithm makes moderate progress to the synthetic performance of motion vector, but exists a common problem: do not consider the accuracy of input motion vector, suppose that promptly the input motion vector is enough accurate.But in resolution decreasing video code conversion, this time is established and might not be set up.At first, when the sampling area of input motion vector correspondence less than the search area (for example when search for area be 16 * 16 and sampling area is 4 * 4) time, though it is the input motion vector is enough accurate with respect to the search area, then not necessarily enough accurate with respect to sampling area.Secondly, during the motion vector accuracy that video flowing the adopted tolerance before and after the transcoding different (for example when the H.264 video flowing of exporting behind the MPEG-2 video flowing of input before the transcoding and the transcoding adopt SAD (absolute difference with) and rate distortion function tolerance respectively) as the motion vector accuracy, though it is the input motion vector is enough accurate with respect to input video stream, then not necessarily enough accurate with respect to outputting video streams.
Summary of the invention
The purpose of this invention is to provide the motion vector synthesizing method in a kind of resolution decreasing video code conversion.
Technical scheme of the present invention may further comprise the steps:
(1) calculates input motion vector and weight between two kind situation between time lower, higher in accuracy.The precision of motion vector can be by the ratio S of its corresponding sampling area and search area i/ S defines, ratio S i/ S is higher greater than 3/4 accuracy, ratio S i/ S is lower less than 1/4 accuracy, and other are then between low and between the two higher.Calculate input motion vector MV according to following formula iAnd weight A between two kind situation between time lower, higher in accuracy i, B iAnd C i:
A i = S i / SAD i S i = S i 2 / SAD i
B i = S i · SAD i S i = SAD i
C i=S i
S wherein i, SAD iRepresent MV respectively iCorresponding sampling area, absolute difference and, SAD i/ S iThe absolute difference of representation unit sampling area and, S iCalculate SAD by the sampling ratio iObtain by decoding transcoding input video stream.
(2) the resultant motion first time vector when more consistent according to a plurality of input motion vector of weight calculation accuracy.Calculate the first time resultant motion vector of a plurality of input motion vector accuracy when more consistent according to following formula:
MV A = Σ i = 0 n ( A i · MV i ) Σ i = 0 n A i = Σ i = 0 n ( S i 2 / SAD i · MV i ) Σ i = 0 n ( S i 2 / SAD i )
MV B = Σ i = 0 n ( B i · MV i ) Σ i = 0 n B i = Σ i = 0 n ( SAD i · MV i ) Σ i = 0 n SAD i
MV C = Σ i = 0 n ( C i · MV i ) Σ i = 0 n C i = Σ i = 0 n ( S i · MV i ) Σ i = 0 n S i
MV wherein A, MV B, MV CRepresent all lower, the higher and resultant motion first time vector between two kinds of situations time of a plurality of input motion vector accuracy respectively, n represents the number of input motion vector;
(3) the resultant motion first time vector when inconsistent according to a plurality of input motion vector of weight calculation accuracy.Calculate the first time resultant motion vector MV of a plurality of input motion vector accuracy when inconsistent according to following formula D:
MV D = Σ i = 0 n ( D i · MV i ) Σ i = 0 n D i
D wherein iExpression input motion vector MV iWeight when accuracy is inconsistent, formula specific as follows is calculated:
Figure A20081004880000074
Wherein S represents MV iCorresponding search area.
(4) calculate the vector of resultant motion for the first time correspondence absolute difference and, calculate MV respectively according to following formula A, MV B, MV CAnd MV DCorresponding absolute difference and SAD A, SAD B, SAD CAnd SAD D:
SAD A = Σ i = 0 n ( A i · SAD i ) Σ i = 0 n A i = Σ i = 0 n S i 2 Σ i = 0 n ( S i 2 / SAD i )
SAD B = Σ i = 0 n ( B i · SAD i ) Σ i = 0 n B i = Σ i = 0 n SAD i 2 Σ i = 0 n SAD i
SAD C = Σ i = 0 n ( C i · SAD i ) Σ i = 0 n C i = Σ i = 0 n ( S i · SAD i ) Σ i = 0 n S i
SAD D = Σ i = 0 n ( D i · SAD i ) Σ i = 0 n D i
(5) calculate a current macro left side, last, upper right, upper left four adjacent motion vectors middle distances resultant motion for the first time vector farthest motion vector and the pairing absolute difference of intermediate value motion vector and;
(6) calculate the bit number of each motion vector correspondence according to motion vector, the motion vectors of current block and subsequent block;
(7) quantization step according to current block calculates Lagrange multiplier;
(8) according to the absolute difference of each motion vector correspondence and, bit number, Lagrange multiplier, calculate the rate distortion function value of each motion vector correspondence, calculate the rate distortion function value J (MV of each motion vector correspondence according to following formula m):
J(MV m)=SAD mMOTIONR m
MV wherein mCandidate's scope comprises the adjacent motion vectors MV in the transcoding output stream N, MV FWith the synthetic motion vector MV that the obtains first time A, MV B, MV C, MV DNumber.
(9) select to have the motion vector of minimum rate distortion function value as resultant motion second time vector;
(10) be the center with the resultant motion second time vector that obtains in the step (9), the motion vector that carries out wicket is heavily searched for and is obtained final resultant motion vector.The search window that motion vector is heavily searched for is [2,2].
The present invention and prior art contrast, effect is positive and tangible: the present invention is weighted on average motion vector based on accuracy in synthesizing for the first time, in synthesizing for the second time, motion vector is carried out rate distortion and select, thereby make the synthetic error of selection reduce based on accuracy.
Description of drawings
Accompanying drawing is the The simulation experiment result figure of Stefan cycle tests of the present invention.
Embodiment
Below be the concrete steps of the embodiment of the invention, what this embodiment carried out is that MPEG-2 arrives video code conversion H.264:
(1) precision of motion vector is by the ratio S of its corresponding sampling area and search area i/ S defines, ratio S i/ S is higher greater than 3/4 accuracy, ratio S i/ S is lower less than 1/4 accuracy, and other are then between low and between the two higher.Calculate input motion vector MV respectively according to following formula iAnd weight A between lower, higher two kind situations between time lower, higher in accuracy i, B iAnd C i:
A i = S i / SAD i S i = S i 2 / SAD i - - - ( 1 )
B i = S i · SAD i S i = SAD i - - - ( 2 )
C i=S i (3)
S wherein i, SAD iRepresent MV respectively iCorresponding sampling area, absolute difference and, SAD i/ S iThe absolute difference of representation unit sampling area and, S iSAD can be calculated by the sampling ratio iThen can obtain by decoding transcoding input video stream;
(2) calculate a plurality of input motion vector accuracy resultant motion first time vector when consistent respectively according to following formula:
MV A = Σ i = 0 n ( A i · MV i ) Σ i = 0 n A i = Σ i = 0 n ( S i 2 / SAD i · MV i ) Σ i = 0 n ( S i 2 / SAD i ) - - - ( 4 )
MV B = Σ i = 0 n ( B i · MV i ) Σ i = 0 n B i = Σ i = 0 n ( SAD i · MV i ) Σ i = 0 n SAD i - - - ( 5 )
MV C = Σ i = 0 n ( C i · MV i ) Σ i = 0 n C i = Σ i = 0 n ( S i · MV i ) Σ i = 0 n S i - - - ( 6 )
MV wherein A, MV B, MV CRepresent all lower, the higher and resultant motion first time vector between two kinds of situations time of a plurality of input motion vector accuracy respectively, n represents the number of input motion vector;
(3) calculate the first time resultant motion vector MV of a plurality of input motion vector accuracy when inconsistent according to following formula D:
MV D = Σ i = 0 n ( D i · MV i ) Σ i = 0 n D i - - - ( 7 )
D wherein iExpression input motion vector MV iWeight when accuracy is inconsistent, formula specific as follows is calculated:
Wherein S represents MV iCorresponding search area;
(4) calculate MV respectively according to following formula A, MV B, MV CAnd MV DCorresponding absolute difference and SAD A, SAD B, SAD CAnd SAD D:
SAD A = Σ i = 0 n ( A i · SAD i ) Σ i = 0 n A i = Σ i = 0 n S i 2 Σ i = 0 n ( S i 2 / SAD i ) - - - ( 9 )
SAD B = Σ i = 0 n ( B i · SAD i ) Σ i = 0 n B i = Σ i = 0 n SAD i 2 Σ i = 0 n SAD i - - - ( 10 )
SAD C = Σ i = 0 n ( C i · SAD i ) Σ i = 0 n C i = Σ i = 0 n ( S i · SAD i ) Σ i = 0 n S i - - - ( 11 )
SAD D = Σ i = 0 n ( D i · SAD i ) Σ i = 0 n D i - - - ( 12 )
(5) a current macro left side, last, upper right, upper left four adjacent motion vectors middle distances resultant motion vector first time motion vector and intermediate value motion vector farthest are designated as MV respectively FAnd MV F, and calculate MV F, MV FCorresponding absolute difference and SAD F, SAD F
(6) calculate the bit number R of each motion vector correspondence respectively according to following formula m:
R m=R(MV m-MV p)+R(MV′ m-MV′ p(MV′ m)) (13)
MV wherein mThe motion vector of expression current block, MV pThe motion vectors of expression current block, MV ' mThe motion vector of expression subsequent block, MV ' p(MV ' m) represent that subsequent block is MV at the current block motion vector mThe time motion vectors.For the number of coded bits of current block motion vector difference, because MV mWith MV pAll known, therefore the number of coded bits of difference can directly obtain by tabling look-up between the two.For the number of coded bits of subsequent block motion vector difference, MV ' p(MV ' m) can be according to current block motion vector MV mAnd other adjacent motion vectors obtain MV ' mCan obtain the number of coded bits of motion vector difference then by tabling look-up with the motion vector approximate substitution of subsequent block in the transcoding inlet flow;
(7) according to list of references 3 (Zhang Y, Gao W, Lu Y, et al.Joint source-channelrate-distortion optimization for is video coding over error-pronenetworks.IEEE Transactions on Multimedia.2007 H.264,9 (3): macro block Lagrange multiplier formula 445-454), calculate Lagrange multiplier λ by the current macro quantization step MOTION
(8) calculate the rate distortion function value J (MV of each motion vector correspondence according to following formula m):
J(MV m)=SAD mMOTIONR m (14)
MV wherein mCandidate's scope comprises the adjacent motion vectors MV in the transcoding output stream E, MV FWith the synthetic motion vector MV that the obtains first time A, MV B, MV C, MV D
(9) select to have the motion vector of minimum rate distortion function value as resultant motion second time vector;
(10) be the center with resultant motion second time vector, carry out search window and heavily search for for the motion vector of [2,2] and obtain final resultant motion vector.
Realize effect: in the embodiment of video code conversion H.264, adopt method of the present invention that the Stefan cycle tests is tested at MPEG-2.Experimental result shows that the method for complexity of the inventive method and list of references 2 is suitable substantially; And the signal to noise ratio of the inventive method as shown in drawings, compares with all direction search method and improved about 1.2dB.

Claims (7)

1. the motion vector synthesizing method in the resolution decreasing video code conversion is characterized in that may further comprise the steps:
(1) calculates input motion vector and weight between two kind situation between time lower, higher in accuracy;
(2) the resultant motion first time vector when more consistent according to a plurality of input motion vector of weight calculation accuracy;
(3) the resultant motion first time vector when inconsistent according to a plurality of input motion vector of weight calculation accuracy;
(4) calculate the vector of resultant motion for the first time correspondence absolute difference and;
(5) calculate a current macro left side, last, upper right, upper left four adjacent motion vectors middle distances resultant motion for the first time vector farthest motion vector and the pairing absolute difference of intermediate value motion vector and;
(6) calculate the bit number of each motion vector correspondence according to motion vector, the motion vectors of current block and subsequent block;
(7) quantization step according to current block calculates Lagrange multiplier;
(8) according to the absolute difference of each motion vector correspondence and, bit number, Lagrange multiplier, calculate the rate distortion function value of each motion vector correspondence;
(9) select to have the motion vector of minimum rate distortion function value as resultant motion second time vector;
(10) be the center with the resultant motion second time vector that obtains in the step (9), the motion vector that carries out wicket is heavily searched for and is obtained final resultant motion vector.
2. method according to claim 1 is characterized in that calculating input motion vector MV according to following formula in the step (1) iAnd weight A between two kind situation between time lower, higher in accuracy i, B iAnd C i:
A i = S i / SAD i S i = S i 2 / SAD i
B i = S i · SAD i S i = SAD i
C i=S i
S wherein i, SAD iRepresent MV respectively iCorresponding sampling area, absolute difference and, SAD i/ S iThe absolute difference of representation unit sampling area and, S iCalculate SAD by the sampling ratio iThen obtain by decoding transcoding input video stream.
3. method according to claim 1 is characterized in that in the step (2) calculating the first time resultant motion vector of a plurality of input motion vector accuracy when more consistent according to following formula:
MV A = Σ i = 0 n ( A i · M V i ) Σ i = 0 n A i = Σ i = 0 n ( S i 2 / SAD i · M V i ) Σ i = 0 n ( S i 2 / SAD i )
MV B = Σ i = 0 n ( B i · M V i ) Σ i = 0 n B i = Σ i = 0 n ( SAD i · M V i ) Σ i = 0 n SAD i
MV C = Σ i = 0 n ( C i · M V i ) Σ i = 0 n C i = Σ i = 0 n ( S i · MV i ) Σ i = 0 n S i
MV wherein A, MV B, MV CRepresent all lower, the higher and resultant motion first time vector between two kinds of situations time of a plurality of input motion vector accuracy respectively, n represents the number of input motion vector.
4. method according to claim 1 is characterized in that: calculate the first time resultant motion vector MV of a plurality of input motion vector accuracy when inconsistent according to following formula in the step (3) D:
MV D = Σ i = 0 n ( D i · M V i ) Σ i = 0 n D i
D wherein iExpression input motion vector MV iWeight when accuracy is inconsistent, formula specific as follows is calculated:
Figure A2008100488000003C5
Wherein S represents MV iCorresponding search area.
5. method according to claim 1 is characterized in that: step is calculated MV respectively according to following formula in (4) A, MV B, MV CAnd MV DCorresponding absolute difference and SAD A, SAD B, SAD CAnd SAD D:
SAD A = Σ i = 0 n ( A i · SAD i ) Σ i = 0 n A i = Σ i = 0 n S i 2 Σ i = 0 n ( S i 2 / SAD i )
SAD B = Σ i = 0 n ( B i · SAD i ) Σ i = 0 n B i = Σ i = 0 n SAD i 2 Σ i = 0 n SAD i
SAD C = Σ i = 0 n ( C i · SAD i ) Σ i = 0 n C i = Σ i = 0 n ( S i · SAD i ) Σ i = 0 n S i
SAD D = Σ i = 0 n ( D i · SAD i ) Σ i = 0 n D i
6. method according to claim 1 is characterized in that: the rate distortion function value J (MV that calculates each motion vector correspondence in the step (8) according to following formula m):
J(MV m)=SAD mMOTIONR m
MV wherein mCandidate's scope comprises the adjacent motion vectors MV in the transcoding output stream E, MV FWith the synthetic motion vector MV that the obtains first time A, MV B, MV C, MV DNumber.
7. method according to claim 1 is characterized in that: the search window that motion vector is heavily searched in the step (10) is [2,2].
CN 200810048800 2008-08-13 2008-08-13 Motion vector synthesizing method in resolution decreasing video code conversion Expired - Fee Related CN101340582B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810048800 CN101340582B (en) 2008-08-13 2008-08-13 Motion vector synthesizing method in resolution decreasing video code conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810048800 CN101340582B (en) 2008-08-13 2008-08-13 Motion vector synthesizing method in resolution decreasing video code conversion

Publications (2)

Publication Number Publication Date
CN101340582A true CN101340582A (en) 2009-01-07
CN101340582B CN101340582B (en) 2010-07-28

Family

ID=40214513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810048800 Expired - Fee Related CN101340582B (en) 2008-08-13 2008-08-13 Motion vector synthesizing method in resolution decreasing video code conversion

Country Status (1)

Country Link
CN (1) CN101340582B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986630A (en) * 2010-10-18 2011-03-16 武汉大学 Spherical vector quantization coding and decoding method
CN102044069A (en) * 2010-12-01 2011-05-04 华中科技大学 Method for segmenting white blood cell image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986630A (en) * 2010-10-18 2011-03-16 武汉大学 Spherical vector quantization coding and decoding method
CN101986630B (en) * 2010-10-18 2012-11-21 武汉大学 Spherical vector quantization coding and decoding method
CN102044069A (en) * 2010-12-01 2011-05-04 华中科技大学 Method for segmenting white blood cell image

Also Published As

Publication number Publication date
CN101340582B (en) 2010-07-28

Similar Documents

Publication Publication Date Title
CN100558168C (en) The method and apparatus that generates coded picture data and coded picture data is decoded
CN1926875B (en) Motion compensation method
CN1331353C (en) Method for sub-pixel valve interpolation
CN101010964B (en) Method and apparatus for using frame rate up conversion techniques in scalable video coding
CN101860748A (en) Side information generating system and method based on distribution type video encoding
CN101610413B (en) Video coding/decoding method and device
US20020034250A1 (en) Motion vector coding method
CN101877789A (en) Encoder-assisted adaptive video frame interpolation
CN103119935A (en) Image interpolation method and apparatus
CN101090502A (en) Controllable quick motion valuation algorithm for prediction quality
CN102685438B (en) A kind of up-conversion method of video frame rate based on time-domain evolution
CN100456836C (en) Coding device and method thereof
CN101340593B (en) Rate distortion optimizing method in error tolerant video code conversion
CN106165420A (en) For showing the system and method for the Pingdu detection of stream compression (DSC)
CN101562750B (en) Device and method for fast selecting video coding mode
JP2008502196A (en) Global motion vector search method
CN102572428B (en) Side information estimating method oriented to distributed coding and decoding of multimedia sensor network
CN101309404A (en) Resolution descending video transcoding method and transcoding device thereof
CN101765011A (en) Method and device for scaling motion estimation
CN101340582B (en) Motion vector synthesizing method in resolution decreasing video code conversion
TW200534714A (en) Rate controlling method and apparatus for use in a transcoder
CN101783956B (en) Backward-prediction method based on spatio-temporal neighbor information
CN101933334A (en) Method for measuring flicker
KR100595616B1 (en) Motion estimation method for digital video trans-coding
CN100499816C (en) Stream-type video pixel domain code conversion method

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: 20100728

Termination date: 20140813

EXPY Termination of patent right or utility model