CN101217667A - 1/4 pixel interpolation method and device - Google Patents

1/4 pixel interpolation method and device Download PDF

Info

Publication number
CN101217667A
CN101217667A CN 200810056109 CN200810056109A CN101217667A CN 101217667 A CN101217667 A CN 101217667A CN 200810056109 CN200810056109 CN 200810056109 CN 200810056109 A CN200810056109 A CN 200810056109A CN 101217667 A CN101217667 A CN 101217667A
Authority
CN
China
Prior art keywords
tmv
present frame
motion vector
frame
value
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 200810056109
Other languages
Chinese (zh)
Other versions
CN101217667B (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.)
Vimicro Corp
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 CN 200810056109 priority Critical patent/CN101217667B/en
Publication of CN101217667A publication Critical patent/CN101217667A/en
Application granted granted Critical
Publication of CN101217667B publication Critical patent/CN101217667B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a quarter pixel interpolating method and a device thereof. A filter coefficient for quarter pixel interpolating is selected according to preset quantized coefficient threshold value, the total motion vector of current frames, the offset of total motion vector of current frames and the average motion vector of coded reference frames before the current frames; the current frames are interpolated according to the selected filter coefficient. The quarter pixel interpolating method and the device thereof can choose self-adaptively proper filter coefficient for quarter pixel interpolating, which improves the efficiency of interpolation.

Description

1/4 pixel interpolation method and device
Technical field
The present invention relates to technical field of video processing, particularly 1/4 pixel interpolation method and device.
Background technology
At present, the AVS video standard has adopted the block motion compensation technology of 1/4 pixel precision and 4 kinds of sizes, with traditional video encoding standard as standard H.264 different be, the AVS video standard has used 4 tap filtering coefficients (1,5,5 when 1/2nd picture element interpolations,-1), 4 tap filtering coefficients (1,7,7 have been used during 1/4 pixel interpolation, 1), compare H.264 standard, 1/2nd picture element interpolations of AVS are simpler than H.264, but 1/4 pixel interpolation is than H.264 complicated.But as can be known by test, when some sequential coding, 1/4 pixel interpolation adopts (1,7,7,1) filter factor is the too late linear interpolation filter factor (1,1) that adopts on code efficiency, therefore under some image sequence situation, the interpolation effect of the 1/4 pixel interpolation of AVS standard is not ideal enough.
Summary of the invention
The embodiment of the invention provides a kind of 1/4 pixel interpolation method, can improve the interpolation effect.
The embodiment of the invention provides a kind of 1/4 pixel interpolation device, can improve the interpolation effect.
For achieving the above object, technical scheme of the present invention specifically is achieved in that
A kind of 1/4 pixel interpolation method, this method comprises:
According to the average motion vector of the reference frame of having encoded before total motion vector skew of total motion vector of default quantization parameter threshold value and present frame, present frame, the present frame, select the filter factor of 1/4 pixel interpolation;
According to the described filter factor of selecting present frame is carried out interpolation.
Preferably, after described filter factor according to selection carried out interpolation to present frame, further comprise: the filter factor information of the described 1/4 pixel interpolation that will select write in the code stream of video coding.
Preferably, the average motion vector of the reference frame of having encoded before total motion vector skew of the quantization parameter threshold value that described basis is default and total motion vector of present frame, present frame, the present frame, select further to comprise before the filter factor of 1/4 pixel interpolation:
Judge that whether present frame is key frame and whether as the reference frame of next code frame, if present frame is not a key frame and as the reference frame of next code frame, then carry out the average motion vector of the reference frame of having encoded before the total motion vector skew, present frame of total motion vector, the present frame of default quantization parameter threshold value of described basis and present frame, select the step of the filter factor of 1/4 pixel interpolation.
Preferably, describedly judge that whether present frame is key frame and whether as the reference frame of next code frame, if present frame is a key frame, then selects the filter factor of the filter factor of (1,7,7,1) as 1/4 pixel interpolation.
Preferably, the average motion vector of the reference frame of having encoded before total motion vector skew of the quantization parameter threshold value that described basis is default and total motion vector of present frame, present frame, the present frame, the filter factor of selection 1/4 pixel interpolation comprises:
If total motion vector of present frame be TMV, the skew of total motion vector for before OTMV, the present frame the average motion vector of coded frame be that ATMV, quantization parameter threshold value are T QP
Calculate the value of TMV, OTMV and ATMV, and in the quantization parameter value of present frame greater than T QPValue the time, the value of OTMV is set to 0;
If the value of TMV is less than one value maximum among OTMV and the ATMV-OTMV, perhaps the value of TMV is greater than the value of ATMV+OTMV, then select (1,1) filter factor is the filter factor of 1/4 pixel interpolation, otherwise select (1,7,7,1) filter factor is the filter factor of 1/4 pixel interpolation.
Preferably, described TMV is by formula TMV=TMV x+ TMV yCalculate, wherein TMV xBe the horizontal component of total motion vector TMV, TMV yVertical component for total motion vector TMV;
Described TMV XBy formula TMV x = Σ i = 0 a Σ j = 0 b | X ij | Calculate, wherein | X Ij| be in (i, j) absolute value of 8 * 8 of the position horizontal motion vector in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction;
Described TMV yBy formula TMV y = Σ i = 0 a Σ j = 0 b | Y ij | Calculate, wherein | Y Ij| be in (i, j) absolute value of 8 * 8 of the position vertical motion vectors in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction.
Preferably, described OTMV is calculated by formula OTMV=motmv * n, and wherein motmv represents the mean motion side-play amount of each macro block, and n represents the sum of macro block in the present frame.
Preferably, described motmv is set to fixed value 8.
Preferably, (ATMV * N+TMV)/(N+1) calculate, wherein N represents the number of the reference frame that present frame had been encoded before to described ATMV by formula ATMV=.
Preferably, described default quantization parameter threshold value T QPBe fixed value 30.
A kind of 1/4 pixel interpolation device, this device comprises:
The filtering interpolation coefficient is selected module, the average motion vector that is used for the reference frame of having encoded before the total motion vector skew, present frame of total motion vector, present frame according to default quantization parameter threshold value and present frame is selected the filter factor of 1/4 pixel interpolation;
Interpolating module is used for according to the described filter factor of selecting present frame being carried out interpolation.
Preferably, this device further comprises:
Filtering interpolation coefficient coding module, the filter factor information that is used for the 1/4 pixel interpolation that will select writes the code stream of video coding.
Preferably, described filtering interpolation coefficient selects module to comprise:
Total motion vector calculation unit is used for according to formula TMV=TMV x+ TMV yCalculate the value of TMV, wherein TMV xBe the horizontal component of total motion vector TMV, TM yVertical component for total motion vector TMV;
Described TMV xBy formula TMV x = Σ i = 0 a Σ j = 0 b | X ij | Calculate, wherein | X Ij| be in (i, j) absolute value of 8 * 8 of the position horizontal motion vector in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction;
Described TMV yBy formula TMV y = Σ i = 0 a Σ j = 0 b | Y ij | Calculate, wherein | Y Ij| be in (i, j) absolute value of 8 * 8 of the position vertical motion vectors in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction;
Total motion vector calculations of offset unit is used for the value according to formula OTMV=motmv * n calculating OTMV, and wherein motmv represents the mean motion side-play amount of each macro block, is set to fixed value 8; N represents the sum of macro block in the present frame;
The average motion vector computing unit is used for that (ATMV * N+TMV)/(N+1) calculates the value of ATMV, and wherein N represents the number of the reference frame of having encoded before the present frame according to formula ATMV=;
The quantization parameter comparing unit is used for quantization parameter value and T with present frame QPCompare, and in the quantization parameter value of present frame greater than T QPValue the time, the value of OTMV is set to 0;
The coefficient selected cell, be used to select 1/4th filtering interpolation coefficients, if the value of TMV is less than one value maximum among OTMV and the ATMV-OTMV, perhaps the value of TMV is greater than the value of ATMV+OTMV, and then selecting the filter factor of (1,1) is the filter factor of 1/4 pixel interpolation, otherwise select (1,7,7,1) filter factor is the filter factor of 1/4 pixel interpolation.
Preferably, described filtering interpolation coefficient selects module further to comprise:
The frame type judging unit is used to judge the frame type of present frame, if present frame is a key frame, then selecting the filter factor of (1,7,7,1) is the filter factor of 1/4 pixel interpolation.
As seen from the above technical solutions, the average motion vector of the reference frame of having encoded before total motion vector skew of the quantization parameter threshold value that this basis of the present invention is default and total motion vector of present frame, present frame, the present frame, select the filter factor of 1/4 pixel interpolation, and present frame is carried out the method and apparatus of interpolation according to the described filter factor of selecting, can be according to the motion conditions of picture frame, / 4th interpolation rate wave system numbers that adaptive selection is suitable have improved the interpolation effect.
Description of drawings
Fig. 1 is the overview flow chart of the 1/4 pixel interpolation method of the embodiment of the invention;
Fig. 2 is the concrete system of selection flow chart of filter factor of the 1/4 pixel interpolation of the embodiment of the invention;
Fig. 3 is the concrete structure figure of the 1/4 pixel interpolation device of the embodiment of the invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
The embodiment of the invention mainly is the average motion vector according to the reference frame that total motion vector is offset, present frame has been encoded before of total motion vector of default quantization parameter threshold value and present frame, present frame, select the filter factor of 1/4 pixel interpolation, current encoded frame is carried out interpolation according to the filter factor of selecting.By judgement to different video image motion situations, select suitable filtering interpolation coefficient, thereby reduce the coding cost, improve code efficiency.
Fig. 1 is the overview flow chart of the 1/4 pixel interpolation method of the embodiment of the invention, and as shown in Figure 1, this flow process specifically comprises the steps:
Step 101 according to the average motion vector of the reference frame of having encoded before total motion vector skew of total motion vector of default quantization parameter threshold value and present frame, present frame, the present frame, is selected the filter factor of 1/4 pixel interpolation.
Step 102 is carried out interpolation according to the filter factor of selecting to current encoded frame.
Wherein, can know for decoding end and to adopt which type of filter factor to decode that after step 102, the filter factor information that can further include the 1/4 pixel interpolation that will select writes the step in the code stream of video coding.This filter factor information can use arbitrarily that form writes the code stream of video coding, as long as can distinguish two kinds of filter factors.
In addition, before step 101, can also judge further that whether present frame is key frame and whether as the reference frame of next code frame, if present frame is not a key frame and as the reference frame of next code frame, then carry out the average motion vector of the reference frame of having encoded before the total motion vector skew, present frame of total motion vector, the present frame of default quantization parameter threshold value of described basis and present frame, select the step of the filter factor of 1/4 pixel interpolation.If present frame is a key frame, then select the filter factor of the filter factor of (1,7,7,1) as 1/4 pixel interpolation.
In step 101, the reference frame of having encoded before the present frame can be all reference frames of having encoded, or a part of reference frame of having encoded, concrete what reference frames of having encoded that adopt can be provided with as required, be example with all reference frames of having encoded below, total motion vector of establishing current encoded frame be TMV, the skew of total motion vector for before OTMV, the present frame all the average motion vector of coded frame be that ATMV, quantization parameter threshold value are T QPSo according to before total motion vector of current encoded frame, total motion vector skew, the present frame all the average motion vector of coded frame and the filter factor that the quantization parameter threshold value that presets is selected 1/4 pixel interpolation concrete grammar as shown in Figure 2.
Fig. 2 is the concrete system of selection flow chart of filter factor of the 1/4 pixel interpolation of the embodiment of the invention; This flow process comprises the steps:
Step 201, the value of calculating TMV, OTMV and ATMV;
Wherein, TMV=TMV x+ TMV y, TMV XThe horizontal component of total motion vector TMV, TMV yVertical component for total motion vector TMV;
Described TMV XBy formula TMV x = Σ i = 0 a Σ j = 0 b | X ij | Calculate, wherein | X Ij| be in (i, j) absolute value of 8 * 8 of the position horizontal motion vector in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction.
Described TMV yBy formula TMV y = Σ i = 0 a Σ j = 0 b | Y ij | Calculate, wherein | Y Ij| be in (i, j) absolute value of 8 * 8 of the position vertical motion vectors in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction.
In the above formula, a and b decide according to the form of present frame, for example present frame is the QCIF form, be that resolution is 176 * 144, the block mode with 8 * 8 is divided, and horizontal direction has 22 8 * 8 in a frame so, vertical direction has 18 8 * 8, if therefore the zero point of the position of expression piece in frame is since 0, a should be 21 so, and b should be 17.Need to prove that here in the AVS standard, minimum branch module unit is 8 * 8, so statistics MV is a unit with 8 * 8, even the block type of certain macro block is 16 * 16, also it is divided into 48 * 8 and adds up.
In like manner, if present frame is the CIF form, be that resolution is 352 * 288, block mode with 8 * 8 is divided, and horizontal direction has 44 8 * 8 in a frame so, and vertical direction has 36 8 * 8, if therefore the zero point of the position of expression piece in frame is since 0, a should be 43 so, and b should be 35, by that analogy.
OTMV is calculated by formula OTMV=motmv * n, and so-called total motion excursion amount OTMV just is meant that generally speaking when the motion of picture frame was relatively milder, total motion vector value of this frame, this value were used for judging the severe degree of picture frame motion.Wherein in the motmv presentation graphs picture frame, the mean motion side-play amount of each macro block; N represents the sum of macro block in the present frame.Motmv can freely be provided with, and it is 8 better that this value is set to, and when promptly being divided into 48 * 8 in one 16 * 16 the macro block, the motion vector value of each sub-piece is 2 o'clock, can think that motion is milder, and this moment, the motion vector of one 16 * 16 macro block was exactly 8.
The value of the macro block of present frame sum n is according to the picture format decision of present frame, such as present frame is the QCIF form, be that image resolution ratio is 176 * 144 pixels, always have 11 * 9 totally 99 16 * 16 macro blocks so in the two field picture, at this moment n just should be set to 99; In like manner, if the CIF form, promptly image resolution ratio is 352 * 288, always has 22 * 18 totally 396 16 * 16 macro blocks so in the two field picture, and this moment, n should be set to 396, by that analogy.
(ATMV * N+TMV)/(N+1) calculate, wherein N represents the number of the reference frame that present frame had been encoded before to ATMV by formula ATMV=.Average total motion vector ATMV as its name suggests, just is meant the mean value of the motion vector of all images frame.Encode one during with reference to the P frame at every turn, the TMV that obtains is weighted on the ATMV, obtain present frame total motion vector mean value of all P frames of having encoded before.
Step 202, whether the quantization parameter value QP that judges present frame is greater than T QPValue, if QP is greater than T QPThen execution in step 203; Otherwise execution in step 204.
Generally speaking, when the QP value is bigger, coefficient after the conversion can be many through quantizing the back loss, if the residual error that interpolation obtains is more or less the same, probably after quantification, obtain identical value, under these circumstances, use relatively simple linear interpolation coefficient (1,1) comparatively suitable.Therefore, the main purpose of this step is exactly when the QP of present frame value is bigger, makes the filtering interpolation coefficient selection tend to select (1,1) more.
Specifically, T QPValue can be provided with arbitrarily, but obtain T through experiment QPValue be set at 30 o'clock, effect is best.
Step 203, the value of OTMV is set to 0.
Step 204, if the value of TMV is less than one value maximum among OTMV and the ATMV-OTMV, perhaps the value of TMV is greater than the value of ATMV+OTMV, then execution in step 205; Otherwise execution in step 206.
Generally speaking, if total motion vector of picture frame is smaller, then the correlation between the pixel can be bigger, and selection filter factor (1,1) just can well embody the relation between interpolation pixel and the surrounding pixel; If total motion vector of picture frame is bigger, then the ratio that descends of the correlation between the pixel is very fast, selects filter factor (1,7,7,1) to be unfavorable for embodying correlation this feature that obviously descends, and therefore also tends to select filter factor (1,1).If total motion vector is promptly not very big, also not really little, at this moment the correlation between the pixel is in the milder stage, and it is proper then adopting filter factor (1,7,7,1) to come 1/4th pixels are carried out interpolation.
Therefore, in this step, the value of total motion vector TMV of present frame satisfy inequality TMV<max (ATMV-OTMV, OTMV) or TMV>during ATMV+OTMV, according to above-mentioned standard, select filter factor (1,1), otherwise select filter factor (1,7,7,1).
Step 205, the filtering interpolation coefficient of selection (1,1), process ends.
Step 206, the filtering interpolation coefficient of selection (1,7,7,1), process ends.
Introduce the 1/4 pixel interpolation method of the embodiment of the invention above, will introduce the concrete structure of the 1/4 pixel interpolation device of this method of application below in detail.
Fig. 3 is the concrete structure figure of the 1/4 pixel interpolation device of the embodiment of the invention, and as shown in Figure 3, this device comprises: the filtering interpolation coefficient is selected module 301 and interpolating module 302.
Wherein the filtering interpolation coefficient selects module 301 to be used for the total motion vector according to present frame, total motion vector skew and the present frame filter factor of the average motion vector selection 1/4 pixel interpolation of all reference frames of having encoded before.
Interpolating module 302 is used for according to the described filter factor of selecting current encoded frame being carried out interpolation.
Can know which type of filter factor of employing for decoding end and decode that this device may further include: filtering interpolation coefficient coding module 303.
The filter factor information that filtering interpolation coefficient coding module 303 is used for the 1/4 pixel interpolation that will select writes the code stream of video coding.This filter factor information can use arbitrarily that form writes the code stream of video coding, as long as can distinguish two kinds of filter factors.
This filtering interpolation coefficient selects module 301 specifically to comprise: total motion vector calculation unit 304, total motion vector calculations of offset unit 305, average motion vector computing unit 306 and coefficient selected cell 307.
Wherein, total motion vector calculation unit 304 is used for according to formula TMV=TMV x+ TMV yCalculate the value of TMV, wherein TMV xBe the horizontal component of total motion vector TMV, TMV yVertical component for total motion vector TMV.
Described TMV XBy formula TMV x = Σ i = 0 a Σ j = 0 b | X ij | Calculate, wherein | X Ij| be in (i, j) absolute value of 8 * 8 of the position horizontal motion vector in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction.
Described TMV yBy formula TMV y = Σ i = 0 a Σ j = 0 b | Y ij | Calculate, wherein | Y Ij| be in (i, j) absolute value of 8 * 8 of the position vertical motion vectors in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction.
Total motion vector calculations of offset unit 305 is used for calculating according to formula OTMV=motmv * n the value of OTMV, and wherein motmv represents the mean motion side-play amount of each macro block, is set to fixed value 8; N represents the sum of macro block in the present frame.
Average motion vector computing unit 306 is used for that (ATMV * N+TMV)/(N+1) calculates the value of ATMV, and wherein N represents the number of the reference frame of having encoded before the present frame according to formula ATMV=.
The quantization parameter comparing unit is used for quantization parameter value and the T with present frame QPCompare, and when the quantization parameter value of present frame greater than T QPValue the time, the value of OTMV is set to 0.
Coefficient selected cell 307 is used to select 1/4th filtering interpolation coefficients, if the value of TMV is less than one value maximum among OTMV and the ATMV-OTMV, perhaps the value of TMV is greater than the value of ATMV+OTMV, then select (1,1) filter factor is the filter factor of 1/4 pixel interpolation, otherwise selects (1,7,7,1) filter factor is the filter factor of 1/4 pixel interpolation.
If current coded frame is a key frame, he does not just have motion vector to carry out reference so, directly uses the filter factor of (1,7,7,1) to get final product generally speaking.At this moment, select to can further include in the module 301 at the filtering interpolation coefficient: frame type judging unit 308.
This frame type judging unit 308 is used to judge the frame type of present frame, if present frame is a key frame, then selects (1,7,7,1) filter factor is the filter factor of 1/4 pixel interpolation, if not key frame and as the reference frame of next code, then do not deal with.
By the above embodiments as seen, the average motion vector of the reference frame of having encoded before total motion vector skew of the quantization parameter threshold value that this basis of the present invention is default and total motion vector of present frame, present frame, the present frame, the filter factor of selection 1/4 pixel interpolation; According to the described filter factor of selecting present frame is carried out the method and apparatus of interpolation, can be according to the motion conditions of picture frame, 1/4th interpolation rate wave system numbers that adaptive selection is suitable have improved the interpolation effect.
Institute is understood that; the above is a better embodiment of the present invention only, and is not intended to limit the scope of the invention, and is within the spirit and principles in the present invention all; any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. a 1/4 pixel interpolation method is characterized in that, this method comprises:
According to the average motion vector of the reference frame of having encoded before total motion vector skew of total motion vector of default quantization parameter threshold value and present frame, present frame, the present frame, select the filter factor of 1/4 pixel interpolation;
According to the described filter factor of selecting present frame is carried out interpolation.
2. 1/4 pixel interpolation method as claimed in claim 1, it is characterized in that, after described filter factor according to selection carried out interpolation to present frame, further comprise: the filter factor information of the described 1/4 pixel interpolation that will select write in the code stream of video coding.
3. 1/4 pixel interpolation method as claimed in claim 1, it is characterized in that, the average motion vector of the reference frame of having encoded before total motion vector skew of the quantization parameter threshold value that described basis is default and total motion vector of present frame, present frame, the present frame, select further to comprise before the filter factor of 1/4 pixel interpolation:
Judge that whether present frame is key frame and whether as the reference frame of next code frame, if present frame is not a key frame and as the reference frame of next code frame, then carry out the average motion vector of the reference frame of having encoded before the total motion vector skew, present frame of total motion vector, the present frame of default quantization parameter threshold value of described basis and present frame, select the step of the filter factor of 1/4 pixel interpolation.
4. 1/4 pixel interpolation method as claimed in claim 3 is characterized in that, describedly judges that whether present frame is key frame and whether as the reference frame of next code frame, if present frame is a key frame, then select (1,7,7,1) filter factor is as the filter factor of 1/4 pixel interpolation.
5. 1/4 pixel interpolation method as claimed in claim 1, it is characterized in that, the average motion vector of the reference frame of having encoded before total motion vector skew of the quantization parameter threshold value that described basis is default and total motion vector of present frame, present frame, the present frame, select the filter factor of 1/4 pixel interpolation, comprising:
If total motion vector of present frame be TMV, the skew of total motion vector for before OTMV, the present frame the average motion vector of coded frame be that ATMV, quantization parameter threshold value are T QP
Calculate the value of TMV, OTMV and ATMV, and in the quantization parameter value of present frame greater than T QPValue the time, the value of OTMV is set to 0;
If the value of TMV is less than one value maximum among OTMV and the ATMV-OTMV, perhaps the value of TMV is greater than the value of ATMV+OTMV, then select (1,1) filter factor is the filter factor of 1/4 pixel interpolation, otherwise select (1,7,7,1) filter factor is the filter factor of 1/4 pixel interpolation.
6. 1/4 pixel interpolation method as claimed in claim 5 is characterized in that described TMV is by formula TMV=TMV x+ TMV yCalculate, wherein TMV xBe the horizontal component of total motion vector TMV, TMV yVertical component for total motion vector TMV;
Described TMV xBy formula TMV x = Σ i = 0 a Σ j = 0 b | X ij | Calculate, wherein | X Ij| be in (i, j) absolute value of 8 * 8 of the position horizontal motion vector in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction;
Described TMV yBy formula TMV y = Σ i = 0 a Σ j = 0 b | Y ij | Calculate, wherein | Y Ij| be in (i, j) absolute value of 8 * 8 of the position vertical motion vectors in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction.
7. 1/4 pixel interpolation method as claimed in claim 5 is characterized in that described OTMV is calculated by formula OTMV=motmv * n, and wherein motmv represents the mean motion side-play amount of each macro block, and n represents the sum of macro block in the present frame.
8. 1/4 pixel interpolation method as claimed in claim 7 is characterized in that described motmv is set to fixed value 8.
9. 1/4 pixel interpolation method as claimed in claim 5 is characterized in that, (ATMV * N+TMV)/(N+1) calculate, wherein N represents the number of the reference frame that present frame had been encoded before to described ATMV by formula ATMV=.
10. 1/4 pixel interpolation method as claimed in claim 5 is characterized in that, described default quantization parameter threshold value T QPBe fixed value 30.
11. a 1/4 pixel interpolation device is characterized in that, this device comprises:
The filtering interpolation coefficient is selected module, the average motion vector that is used for the reference frame of having encoded before the total motion vector skew, present frame of total motion vector, present frame according to default quantization parameter threshold value and present frame is selected the filter factor of 1/4 pixel interpolation;
Interpolating module is used for according to the described filter factor of selecting present frame being carried out interpolation.
12. 1/4 pixel interpolation device as claimed in claim 11 is characterized in that, this device further comprises:
Filtering interpolation coefficient coding module, the filter factor information that is used for the 1/4 pixel interpolation that will select writes the code stream of video coding.
13. 1/4 pixel interpolation device as claimed in claim 11 is characterized in that, described filtering interpolation coefficient selects module to comprise:
Total motion vector calculation unit is used for according to formula TMV=TMV x+ TMV yCalculate the value of TMV, wherein TMV xBe the horizontal component of total motion vector TMV, TMV yVertical component for total motion vector TMV;
Described TMV xBy formula TMV x = Σ i = 0 a Σ j = 0 b | X ij | Calculate, wherein | X Ij| be in (i, j) absolute value of 8 * 8 of the position horizontal motion vector in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction;
Described TMV yBy formula TMV y = Σ i = 0 a Σ j = 0 b | Y ij | Calculate, wherein | Y Ij| be in (i, j) absolute value of 8 * 8 of the position vertical motion vectors in the expression present frame; A is 8 * 8 a number maximum on the horizontal direction, and b is 8 * 8 a number maximum on the vertical direction;
Total motion vector calculations of offset unit is used for the value according to formula OTMV=motmv * n calculating OTMV, and wherein motmv represents the mean motion side-play amount of each macro block, is set to fixed value 8; N represents the sum of macro block in the present frame;
The average motion vector computing unit is used for that (ATMV * N+TMV)/(N+1) calculates the value of ATMV, and wherein N represents the number of the reference frame of having encoded before the present frame according to formula ATMV=;
The quantization parameter comparing unit is used for quantization parameter value and T with present frame QPCompare, and in the quantization parameter value of present frame greater than T QPValue the time, the value of OTMV is set to 0;
The coefficient selected cell, be used to select 1/4th filtering interpolation coefficients, if the value of TMV is less than one value maximum among OTMV and the ATMV-OTMV, perhaps the value of TMV is greater than the value of ATMV+OTMV, and then selecting the filter factor of (1,1) is the filter factor of 1/4 pixel interpolation, otherwise select (1,7,7,1) filter factor is the filter factor of 1/4 pixel interpolation.
14. 1/4 pixel interpolation device as claimed in claim 13 is characterized in that, described filtering interpolation coefficient selects module further to comprise:
The frame type judging unit is used to judge the frame type of present frame, if present frame is a key frame, then selecting the filter factor of (1,7,7,1) is the filter factor of 1/4 pixel interpolation.
CN 200810056109 2008-01-11 2008-01-11 1/4 pixel interpolation method and device Expired - Fee Related CN101217667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810056109 CN101217667B (en) 2008-01-11 2008-01-11 1/4 pixel interpolation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810056109 CN101217667B (en) 2008-01-11 2008-01-11 1/4 pixel interpolation method and device

Publications (2)

Publication Number Publication Date
CN101217667A true CN101217667A (en) 2008-07-09
CN101217667B CN101217667B (en) 2011-02-16

Family

ID=39624020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810056109 Expired - Fee Related CN101217667B (en) 2008-01-11 2008-01-11 1/4 pixel interpolation method and device

Country Status (1)

Country Link
CN (1) CN101217667B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841701B (en) * 2009-03-20 2012-05-23 华为技术有限公司 Encoding and decoding method and device based on macroblock pair
CN101902632B (en) * 2009-05-25 2013-03-20 华为技术有限公司 Pixel interpolation filtering method and device, decoding method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841701B (en) * 2009-03-20 2012-05-23 华为技术有限公司 Encoding and decoding method and device based on macroblock pair
CN101902632B (en) * 2009-05-25 2013-03-20 华为技术有限公司 Pixel interpolation filtering method and device, decoding method and system

Also Published As

Publication number Publication date
CN101217667B (en) 2011-02-16

Similar Documents

Publication Publication Date Title
US9706202B2 (en) Image encoding apparatus, image encoding method, image decoding apparatus, and image decoding method
CN101939993B (en) Encoding filter coefficients
CN1846444B (en) Adaptive reference picture generation
KR101213704B1 (en) Method and apparatus for video coding and decoding based on variable color format
CN101491106A (en) Image processing device, method, and program
US9414091B2 (en) Video encoder with an integrated temporal filter
KR20180122354A (en) Apparatus and methods for adaptive computation of quantization parameters in display stream compression
CN102017626B (en) Method of coding, decoding, coder and decoder
CN1947146B (en) Method of down-sampling data values
CN103069803A (en) Video encoding method, video decoding method, video encoding device, video decoding device, and programs for same
CN102238386A (en) Method for coding a picture sequence, corresponding method for reconstruction and stream of coded data representative of said sequence
US20060133491A1 (en) Video codec
CN1826814A (en) Video encoder with low complexity noise reduction
JP5571542B2 (en) Video encoding method and video decoding method
CN102196253A (en) Video coding method and device based on frame type self-adaption selection
CN101742323B (en) Method and device for coding and decoding re-loss-free video
CN101217667B (en) 1/4 pixel interpolation method and device
CN1848960B (en) Residual coding in compliance with a video standard using non-standardized vector quantization coder
US8218639B2 (en) Method for pixel prediction with low complexity
CN109302615B (en) Self-adaptive template prediction method for video compression
US20210306662A1 (en) Bitstream decoder
GB2580036A (en) Bitstream decoding

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

Termination date: 20200111

CF01 Termination of patent right due to non-payment of annual fee