[summary of the invention]
The present invention is directed to existing searching algorithm complexity height, the defective that precision is low proposes a kind of searching algorithm of novelty, directly utilize the dependency prediction and the searching motion vector of phase place at frequency domain, this algorithm in inferior pel search process owing to do not need to get back to spatial domain, need not do interpolation calculation, avoid the calculation cost function, thereby greatly cut down the computing cost that motion search brings in the video coding, be applicable to the embedded platform that needs video content services.
What generally adopted by each video encoding standard at present is dct transform, and the algorithm flow of the sub-pixel motion searching algorithm in DCT territory is as follows:
7) determine that search window is N, being extracted in and putting in order picture element F with reference picture on the x direction is initial one-dimensional signal x
1(n) x of correspondence position and in the present image
2(n);
8), calculate x according to DCT and DST transformation for mula
1(n) and x
2(n) four discrete DCT/DST conversion coefficients;
9) calculate at [1, N] interval g
m S, by DCT and DST transformation for mula and satisfy equation and obtain:
10) according to g
mEquation analyze the positive negative direction of delta-response, draw m
xPositive negative direction on displacement;
11) on the y direction, repeat above step, draw the m on the y direction
yPositive negative direction on displacement;
12) carry parameter m
x, m
yQuestion blank 1 is determined the match point in the inferior pixel space location drawing, determines the half picture element movement vector simultaneously.
Table 1 m and motion vector
m
x |
m
y |
Match point |
Motion vector |
>0 |
>0 |
3 |
(0.5,0.5) |
>0 |
<0 |
8 |
(0.5,-0.5) |
>0 |
=0 |
5 |
(0.5,0) |
<0 |
>0 |
1 |
(-0.5,0.5) |
<0 |
<0 |
6 |
(-0.5,-0.5) |
<0 |
=0 |
4 |
(-0.5,0) |
=0 |
>0 |
2 |
(0,0.5) |
=0 |
<0 |
7 |
(0,-0.5) |
=0 |
=0 |
F |
(0,0) |
Above-mentioned g
mEquation:
Above-mentioned described DCT and DST transformation for mula, the DCT and the DST that are defined as follows are transformed to:
In the following formula,
The above-mentioned described equation that satisfies:
Wherein,
Above-mentionedly satisfy equation and can be rewritten as
Can prove that Z (k) is an orthogonal matrix, and λ Z is arranged
T(k) Z (k)=I
2, I
2It is one 2 * 2 unit matrix; Can solve equation like this:
Thereby can solve g
m C, g
m S
Will
The approximate replacement
Will
The approximate replacement
With further reduction amount of calculation.
The motion vector of 1/4 pixel accuracy if desired is by 6) in the motion vector of gained use the bi-linear filter interpolation, on the gained pixel block, repeat 1)-6) step.
Can analyze from above-mentioned algorithm and formula: g
m C, g
m SThese two variablees that belong to frequency domain have comprised translation information m, and therefrom extract m, just can realize the motion search in DCT territory.Rapid movement searching algorithm based on frequency domain comes the inspected object movable information by analyzing in the phase place of frequency domain, searching algorithm compared with spatial domain, this analytical technology is more near the essence of object of which movement, have its extremely low computation complexity, the computation complexity that the present invention proposes based on the sub-pixel motion searching algorithm of frequency domain approximately be the inferior pixel full-search algorithm of spatial domain 5% to 2 0% between, be specially adapted to embedded platform or handheld terminal.
[embodiment]
What generally adopted by each video encoding standard at present is dct transform, dct transform has the Energy Convergence energy near Karhunen-Loeve transformation, can by behind the low pass filter, can under high compression ratio, guarantee picture quality with most of concentration of energy in direct current and low frequency part.At this point, the present invention mainly calculates the translation in space from the phase place of dct transform domain, because the particularity of dct transform no longer has simple corresponding relation as Fourier in the DCT territory.
One-dimensional discrete signal { x is arranged
1(n) | n ∈ [0, N-1] } (N is the size of search window), behind the m that moves to right, form signal { x
2(n) | n ∈ [0, N-1] }:
According to DCT that is defined as follows and DST transform:,
In the following formula,
Prove that easily following equation is satisfied in these four conversion:
Wherein,
Equation in (8) is rewritten as
Can prove that Z (k) is an orthogonal matrix, and has:
λZ
T(k)Z(k)=I
2 (9)
I
2It is one 2 * 2 unit matrix.Like this, we can solve equation:
Thereby can solve g
m C, g
m S
Quadrature rule according to SIN function has following law:
Wherein, δ (n) is discrete impulse function.
According to formula (8), (10-12), can draw about g
mEquation:
We see that these two variablees that belong to frequency domain have comprised translation information m.If can find fast algorithm to solve g
m C, g
m S, and therefrom extract m, just can realize the motion search in DCT territory.
Analysis mode (13), (14), when m greater than 0, and when being positioned at search window [0, N], can find positive delta-response at the n=m place, find negative delta-response at the n=-m-1 place simultaneously; When m<0, and be positioned at search window negative mirror image [N, 0) time, can find negative delta-response at the n=m place, simultaneously find positive delta-response at the n=-m-1 place.Shown in Fig. 1 (a), Fig. 1 (b), gray area is a search window, if find positive delta-response in search window [0, N], means that then object has translation to the right, m>0; If find negative delta-response in search window [0, N], mean that then object has translation left, m<0.Hereinafter table 1 shows, when the positive negative direction of only knowing m, the demand concrete value of separating m can not determined the sub-pixel motion vector, greatly reduces amount of calculation.
When concrete calculating, can with
The approximate replacement
Will
The approximate replacement
With further reduction amount of calculation.
On the various basis of above setting up, the algorithm flow of the sub-pixel motion searching algorithm in DCT territory is as follows: the first step: determine that search window is N, being extracted in and putting in order picture element F with reference picture on the x direction is initial one-dimensional signal x
1(n) x of correspondence position and in the present image
2(n);
Second step:, calculate x according to formula (3-6)
1(n) and x
2(n) four discrete DCT/DST conversion coefficients;
The 3rd step: calculate at [1, N] interval g
m S, obtain by formula (3-6), (8):
The 4th step:, draw m according to the positive negative direction of formula (13) according to delta-response
xThe displacement of positive negative direction;
The 5th the step: with last step in like manner, draw the m on the y direction
yPositive negative direction displacement;
The 6th step: carry parameter m
x, m
yQuestion blank 1 is determined the match point in inferior pixel space position view,
Determine the half picture element movement vector simultaneously.
Table 1 m and motion vector
m
x |
m
y |
Match point |
Motion vector |
>0 |
>0 |
3 |
(0.5,0.5) |
>0 |
<0 |
8 |
(0.5,-0.5) |
>0 |
=0 |
5 |
(0.5,0) |
<0 |
>0 |
1 |
(-0.5,0.5) |
<0 |
<0 |
6 |
(-0.5,-0.5) |
<0 |
=0 |
4 |
(-0.5,0) |
=0 |
>0 |
2 |
(0,0.5) |
=0 |
<0 |
7 |
(0,-0.5) |
=0 |
=0 |
F |
(0,0) |
The motion vector of 1/4 pixel accuracy if desired is by 6) in the motion vector of gained use the bi-linear filter interpolation, on the gained pixel block, repeat 1)-6) step.
H.264, experiment is being carried out on the encoding platform, and the version of the test video encoding software of use is JM8.6 (issue of JVT official), and coding parameter is: quantization parameter=26,1 frame reference picture.The standard test sequences of using is that size is that QCIF, length are Foreman, Container, News, Silent, the Carphone of 100 frames.Fig. 3 is that algorithm and the computation complexity of full-search algorithm in inferior pel search of this paper compares.Because the image construction of each cycle tests is different, computation complexity has nothing in common with each other, and for simplicity, the full-search algorithm computation complexity in each cycle tests is made as 1, as a comparison benchmark.By can finding out among Fig. 3, the computation complexity that the present invention proposes based on the sub-pixel motion searching algorithm of frequency domain approximately be the inferior pixel full-search algorithm of spatial domain 5% to 20% between.
Shown in the test data following table of the coding efficiency of algorithm, use behind this algorithm coding the Y-PSNR of image to compare for different image measurement sequences with full-search algorithm, descend 0.04 to 0.65dB.
Following table is that the coding efficiency under different cycle testss changes:
Cycle tests |
Spatial domain full-search algorithm image PSNR (dB) |
Frequency domain sub-pixel motion searching algorithm image PSNR (dB) |
The variation of image PSNR (dB) |
Foreman |
36.77 |
36.16 |
-0.61 |
Container |
37.33 |
37.29 |
-0.04 |
News |
38.16 |
37.74 |
-0.42 |
Silent |
37.28 |
37.19 |
-0.09 |
Carphone |
38.38 |
37.73 |
-0.65 |
Come inspected object movable information by analyzing in the phase place of frequency domain based on the rapid movement searching algorithm of frequency domain, compared with the searching algorithm of spatial domain, this analytical technology is more near the essence of object of which movement.Because its extremely low computation complexity is specially adapted to embedded platform or handheld terminal.
In the above-described embodiments, only the present invention has been carried out exemplary description, but those skilled in the art can design various execution modes according to different actual needs under the situation of the scope and spirit that do not break away from the present invention and protected.