U.S. patent application number 11/549127 was filed with the patent office on 2007-06-14 for method and related apparatus for motion estimation.
Invention is credited to Cheng-Tsai Ho.
Application Number | 20070133681 11/549127 |
Document ID | / |
Family ID | 34546502 |
Filed Date | 2007-06-14 |
United States Patent
Application |
20070133681 |
Kind Code |
A1 |
Ho; Cheng-Tsai |
June 14, 2007 |
METHOD AND RELATED APPARATUS FOR MOTION ESTIMATION
Abstract
Disclosed is a motion estimation method for selecting a target
motion vector from a plurality of candidate motion vectors in a
search range of a target picture for an encoding block having a lot
of pixels in a picture is disclosed. The method comprises:
utilizing a distortion function to calculate difference between the
pixels of the encoding block and the pixels in the search range of
a target picture to generate at least one distortion value;
utilizing an entropy function to determine the distribution of the
difference between the pixels of the encoding block and the pixels
in the search range of blocks corresponding to candidate motion
vectors to generate at least one distribution values; summing up
the distortion values and the distribution values to generate at
least one sum value; and selecting the target motion vector
according to the sum value.
Inventors: |
Ho; Cheng-Tsai; (Tai-Chung
City, TW) |
Correspondence
Address: |
NORTH AMERICA INTELLECTUAL PROPERTY CORPORATION
P.O. BOX 506
MERRIFIELD
VA
22116
US
|
Family ID: |
34546502 |
Appl. No.: |
11/549127 |
Filed: |
October 13, 2006 |
Related U.S. Patent Documents
|
|
|
|
|
|
Application
Number |
Filing Date |
Patent Number |
|
|
10904421 |
Nov 9, 2004 |
7145951 |
|
|
11549127 |
Oct 13, 2006 |
|
|
|
Current U.S.
Class: |
375/240.16 ;
375/E7.121 |
Current CPC
Class: |
H04N 19/567 20141101;
G06T 7/231 20170101 |
Class at
Publication: |
375/240.16 |
International
Class: |
H04N 11/02 20060101
H04N011/02 |
Foreign Application Data
Date |
Code |
Application Number |
Nov 11, 2003 |
TW |
092131565 |
Claims
1. A motion estimation method for selecting a target motion vector
from a plurality of candidate motion vectors in a search range of a
target picture for an encoding block having a lot of pixels, the
method comprising; utilizing a distortion function to calculate
difference between the pixels of the encoding block and the pixels
in the search range to generate at least one distortion value;
utilizing an entropy function to determine the distribution of the
difference between the pixels of the encoding block and the pixels
in the search range corresponding to candidate motion vectors to
generate at least one distribution value; summing up the distortion
value and the distribution value to generate at least one sum
value; and selecting the targetmotion vector according to the sum
value.
2. The method of claim 1, wherein the distortion function is
|C.sub.i,j-P.sub.i+x,j+y|, wherein C.sub.ij is the pixel in the
encoding block, and P.sub.i+x,j+y is the pixel in the search range
of the target picture.
3. The method of claim 1, wherein the entropy function is
g(|C.sub.i,j, P.sub.i+x,j+y|), wherein C.sub.ij is the pixel in the
encoding block, and P.sub.i+x,j+y is the pixel in the search range
of the target picture.
4. The method of claim 1, wherein the entropy function is h(Qp,
C.sub.i,j, P.sub.i+x,j+y), wherein C.sub.ij is the pixel in the
encoding block, and P.sub.i+x,j+y is the pixel in the search range
of the target picture.
5. The method of claim 4 wherein h(Qp, C.sub.i,j, P.sub.i+x,j+y) is
K.times.f(Qp).times.g(|C.sub.i,j-P.sub.i+x,j+y|), where K is a
constant and the function f(Qp) is a monotonic increasing
function.
6. The method of claim 4 wherein the larger Qp is, the larger the
function h(Qp, C.sub.i,j, P.sub.i+x,j+y) is.
7. A motion estimation device for selecting a target motion vector
from a plurality of candidate motion vectors in a search range for
an encoding block having a lot of pixels, the device comprising; a
distortion calculator for utilizing a distortion function for
calculating difference between the pixels of the encoding block and
the pixels in the search range of a target picture to generate at
least one distortion value; a spatial variation calculating module
for utilizing an entropy function to calculate the distribution of
the difference between the pixels of the encoding block and the
pixels in the search range corresponding to candidate motion
vectors to generate at least one distribution value; and a motion
vector determining module, coupled with the distortion calculator
and the spatial variation calculating module, for summing up the
distortion value and the distribution value to generate at least
one sum value and for determining the target motion vector
according to the sum value.
8. The device of claim 7, wherein the distortion function is
|C.sub.i,j-P.sub.i+x,j+y|, wherein C.sub.ij is the pixel in the
encoding block, and Pi+x,j+y is the pixel in the search range of
the target picture.
9. The device of claim 7, wherein the entropy function is
g(|C.sub.i,j, P.sub.i+x,j+y|), wherein C.sub.ij is the pixel in the
encoding block, and P.sub.i+x,j+y is the pixel in the search range
of the target picture.
10. The device of claim 7, wherein the entropy function is h(Qp,
C.sub.i,j, P.sub.i+x,j+y), wherein C.sub.ij is the pixel in the
encoding block, and P.sub.i+x,j+y is the pixel in the search range
of the target picture.
11. The device of claim 10, wherein h(Qp, C.sub.i,j, P.sub.i+x,j+y)
can be represented as
K.times.f(Qp).times.g(|C.sub.i,j-P.sub.i+x,j+y|), K being a
constant, and function f(Qp) being a monotonic increasing
function.
12. The device of claim 11, wherein the spatial variation
calculating module comprises: a first calculator for calculating
function g(|C.sub.i,j-P.sub.i+x,j+y|); a second calculator for
calculating function f(Qp); and a multiplier coupled with the first
calculator and the second calculator for calculating
K.times.f(Qp).times.g(|C.sub.i,j-P.sub.i+x,j+y|).
13. The device of claim 10, wherein the larger Qp is, the larger
the function h(Qp, C.sub.i,j, P.sub.i+x,j+y) is.
14. The device of claim 7, wherein the motion vector determining
module comprises: an adder, coupled with the distortion calculator
and the spatial variation calculating module for adding the
distortion value to the distribution value; an accumulator, coupled
with the adder, for calculating the sum value; and a determiner,
coupled with the accumulator for determining the target motion
vector.
15. The device of claim 14, wherein the determiner comprises: a
comparator, coupled with the accumulator, for outputting the target
motion vector; and a storage, coupled with the comparator for
storing the minimum value of the sum values that ever appears.
Description
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application is a continuation application of
applicant's earlier application, Ser. No. 10/904,421, filed Nov. 9,
2004, and is included herein by reference.
BACKGROUND OF INVENTION
[0002] 1. Field of the Invention
[0003] The invention relates to a method and related apparatus for
motion estimation in a video compression system, and more
particularly, to a method and related apparatus for motion
estimation using a cost function.
[0004] 2. Description of the Prior Art
[0005] As multimedia technology develops, more and more standards
related to video compression have been introduced. For instance,
various versions of MPEG are standards for digital video
compression, and ITU H.261, H.263, ISO 10918 are other
examples.
[0006] MPEG defines a standard for digital video compression. A
motion picture is composed of a series of pictures, and each
picture can be regarded as a two-dimensional array composed of a
plurality of pixels, which is called a frame of the motion picture.
MPEG standard defines four types of different pictures: I picture,
which is encoded without referring to any other pictures; P
picture, which is encoded through motion estimation referring to a
previous I picture or P picture; B picture, which is encoded
through motion estimation referring to a following I picture or P
picture; and D picture, which is used in fast forward search
mode.
[0007] Video compression systems complying with the standards
mentioned above utilize motion estimation technology based on
blocks or macroblocks in order to reduce the temporal redundancy.
During motion estimation, for a current encoding block in a current
picture, the video compression system will find a best matching
block, which is the most similar to the current encoding block,
from a target picture. In this case, for the current encoding
block, the video compression system can store (or transmit) the
motion vector and the residual calculated to represent data
included in the current encoding block (wherein the residual
represents a pixel value difference between the current encoding
block and the best matching block).
[0008] According to the prior art, when the video compression
system searches for the best matching block from a search range, a
cost function called "sum of absolute difference" is used, which is
obtained as follows: SAD .function. ( x , y ) = i = i .times.
.times. 0 i .times. .times. 1 .times. j = j .times. .times. 0 j
.times. .times. 1 .times. C i , j - P i + x , j + y ##EQU1##
[0009] (x, y) is a candidate motion vector in the search range,
(i1-i0)*(j1-j0) is the size of the current encoding block, C.sub.ij
is a pixel in the current encoding block, and P.sub.i+x,j+y is a
pixel in the search range of the target picture.
[0010] The conventional video compression system finds a candidate
motion vector (x, y), which minimizes the cost function, to be the
optimal motion vector (x1, y1) of the current encoding block. Such
a method is for finding the best matching block having the smallest
residual so that the residual can be better compressed. However,
the found optimal motion vector (x1, y1) may not result in better
compression; thus U.S. Pat. No. 5,847,776 discloses another cost
function that considers not only the sum of absolute difference but
also the volume of the motion vector during the searching for the
optimal motion vector so that a balance can be kept between the
found optimal motion vector and a residual corresponding to it.
[0011] However, most video compression systems utilize a discrete
cosine transform (DCT) algorithm to transform the residual in a
spatial domain into a frequency domain during the compressing of
the residual. Then the video compression system utilizes a
corresponding quantization matrix and a quantization step Qp, which
changes according to a bit rate selected by the system, to quantize
the residual in the frequency domain. Since the quantized matrix is
a two-dimensional matrix, the system further utilizes zig-zag scan
or alternate scan to scan the quantized two-dimensional data into
one-dimensional data. Finally, the video compression system
operates variable length coding.
[0012] During variable length coding, the smaller the frequency
distribution range of the residual in the frequency domain is, the
shorter the code length of the encoded residual is (i.e. the better
compressed the residual is). In other word, the smaller of the
frequency distribution range of the residual means that the degree
of disorder or randomness of the residual is smaller, i.e. entropy
(a measurement or function of disorder or randomness) of the
residual is smaller. However, neither the prior art nor the method
disclosed in U.S. Pat. No. 5,847,776 can find the best matching
block with the residual that has the smallest frequency
distribution range or has the smaller entropy. Even in the case
that the found best matching block results in a residual in the
spatial domain having the smallest sum of absolute difference,
after it has been operated on by DCT, quantization process, zig-zag
scan (or other scan methods), variable length coding, the residual
may not necessarily have the shortest code length, meaning that the
optimal compression cannot be achieved. This is a main problem in
the prior art.
[0013] Recently, a new MPEG technique H.264 is disclosed, which
calculates bit rate for each candidate motion vector to determine
an optimal motion vector. However, such method will cause heavy
calculation loading and is time consuming for processing such
calculation.
SUMMARY OF INVENTION
[0014] It is therefore a primary objective of the claimed invention
to provide a method and related apparatus utilizing an entropy
function and a distortion function to solve the problems mentioned
above.
[0015] The disclosed embodiment of the present invention discloses
a motion estimation method for selecting a target motion vector
from a plurality of candidate motion vectors in a search range of a
target picture for an encoding block having a lot of pixels in a
picture is disclosed. The method comprises: utilizing a distortion
function to calculate difference between the pixels of the encoding
block and the pixels in the search range of the target picture to
generate at least one distortion value; utilizing an entropy
function to determine the distribution or variation of the
difference between the pixels of the encoding block and the pixels
in the search range of blocks corresponding to candidate motion
vectors to generate at least one distribution values; summing up
the distortion values and the distribution values to generate at
least one sum value; and selecting the target motion vector
according to the sum value.
[0016] The disclosed embodiment also discloses a motion estimation
device for selecting a target motion vector from a plurality of
candidate motion vectors in a search range for an encoding block
having a lot of pixels. The device comprises: a distortion
calculator for utilizing a distortion function for calculating
difference between the pixels of the encoding block and the pixels
in the search range of a target picture to generate at least one
distortion value; a spatial variation calculating module for
utilizing an entropy function to determine the distribution or
variation of the difference between the pixels of the encoding
block and the pixels in the search range corresponding to candidate
motion vectors to generate at least one distribution value; and a
motion vector determining module, coupled with the distortion
calculator and the spatial variation calculating module, for
summing up the distortion value and the distribution value to
generate at least one sum value and for determining the target
motion vector according to the sum value.
[0017] These and other objectives of the present invention will no
doubt become obvious to those of ordinary skill in the art after
reading the following detailed description of the preferred
embodiment that is illustrated in the various figures and
drawings.
BRIEF DESCRIPTION OF DRAWINGS
[0018] FIG. 1 illustrates a flowchart of a method according to the
present invention.
[0019] FIG. 2 illustrates a motion estimation device in the video
compression system according to the present invention.
DETAILED DESCRIPTION
[0020] Please refer to FIG. 1 showing a flowchart of a method
according to the present invention. The method can be used in a
video compression system for motion estimation. The video
compression system divides a current picture into a plurality of
blocks. The method is shown in FIG. 1 as follows:
[0021] Step 110: Step through a plurality of candidate motion
vectors (x, y) in a search range for a current encoding block of a
current picture. The current encoding block includes
(i1-i0)*(j1-j0) pixels.
[0022] Step 120: Calculate a cost function for each candidate
motion vector (x, y) as follows: CF .function. ( x , y ) = i = i
.times. .times. 0 i .times. .times. 1 .times. j = j .times. .times.
0 j .times. .times. 1 .times. { C i , j - P i + x , j + y + h
.function. ( Q .times. .times. p , C i , j , P i + x , j + y ) }
##EQU2##
[0023] wherein C.sub.ij is a pixel in the current encoding block,
P.sub.i+x,j+y is a pixel in the search range of the target picture,
and Qp is a quantization step. As well-known by persons skilled in
the art, i = i .times. .times. 0 i .times. .times. 1 .times. j = j
.times. .times. 0 j .times. .times. 1 .times. C i , j - P i + x , j
+ y ##EQU3## is a distortion function for computing the difference
between the pixels of the encoding block and the pixels in the
search range of a target picture.
[0024] Step 130: Determine the candidate motion vector (x, y) in
the search range that meet a desired condition, such as minimizes
the cost function, to be a target motion vector (x1, y1) of the
current encoding block. Wherein, the target motion vector which
minimizes the cost function may regarded as an optimal motion
vector.
[0025] The present invention is different from the prior art
because the cost function used in the present invention considers
not only a sum of absolute difference calculated from a distortion
function (i.e. member |C.sub.i,j-P.sub.i+x,j+y|) but also other
members corresponding to the quantization step Qp and the
distribution or variation of the sum of absolute difference (i.e.
member h(Qp, C.sub.i,j, P.sub.i+x,j+y)).
[0026] For instance, function h(Qp, C.sub.i,j, P.sub.i+x,j+y) can
be represented as K.times.f(Qp).times.g(|C.sub.i,j-P.sub.i+x,j+y|),
wherein K is a constant. Therefore, function f(Qp) is a monotonic
increasing function, meaning that the larger Qp is, the larger
function f(Qp) is. In other words, f(Qp) can be regarded as an
amplifying factor for amplifying the effect of g(|C.sub.i,j,
P.sub.i+x,j+y|). Therefore, g(|C.sub.i,j,P.sub.i+x,j+y|) still can
be used to the present invention even if f(Qp) is removed. In this
case h(Qp, C.sub.i,j, P.sub.i+x,j+y) has a more important influence
on the cost function. Function g(|C.sub.i,j-P.sub.i+x,j+y|) is for
roughly calculating or determining the variation of the pixel
difference between the current encoding block and a block
corresponding to the current candidate motion vector (x, y) (i.e.
representing the distribution or variation of the residual in the
frequency domain). Generally, the smaller i = i .times. .times. 0 i
.times. .times. 1 .times. j = j .times. .times. 0 j .times. .times.
1 .times. g .function. ( C i , j - P i + x , j + y ) ##EQU4## is,
the better compressed the residual resulting from the candidate
motion vector (x, y) and operated by DCT, quantization process,
zig-zag scan (or other scan methods), and variable length
coding.
[0027] Here is an example of function g(|C.sub.i,j-P.sub.i+x,j+y|):
g .function. ( C i , j - P i + x , j + y ) = { C i , j - P i + x ,
j + y - ad_max , if .times. .times. C i , j - P i + x , j + y >
ad_max , ( i , j ) .noteq. ( 0 , 0 ) ad_min - C i , j - P i + x , j
+ y , if .times. .times. C i , j - P i + x , j + y < ad_min , (
i , j ) .noteq. ( 0 , 0 ) 0 , else ##EQU5##
[0028] Wherein ad_max and ad_min are shown as follows: ad_max = { C
0 , 0 - P x , y , if .times. .times. ( i , j ) = ( 0 , 0 ) max
.function. [ C i , j - P i + x , j + y , ad_max ] , if .times.
.times. ( i , j ) .noteq. ( 0 , 0 ) .times. .times. ad_min = { C 0
, 0 - P x , y , if .times. .times. ( i , j ) = ( 0 , 0 ) min
.function. [ C i , j - P i + x , j + y , ad_min ] , if .times.
.times. ( i , j ) .noteq. ( 0 , 0 ) ##EQU6##
[0029] In this example, whenever a function
g(|C.sub.i,j-P.sub.i+x,j+y|) corresponding to a set of (i, j) is
calculated, ad_max and ad_min can be refreshed for the later
calculation of functions g(|C.sub.i,j-P.sub.i+x,j+y|) corresponding
to (i, j).
[0030] Take the case of a 2*3 block, (i1-i0)=2, (j1-j0)=3. Imagine
if there are only two candidate motion vectors in the search range
respectively corresponding to a first block and a second block, the
absolute value of the pixel difference between the current encoding
block and the first block {8, 9, 6, 8, 7, 6}, and the absolute
value of the pixel difference between the current encoding block
and the second block {5, 10, 4, 22, 0, 0}. Calculating the cost
function by the sum of absolute difference according to the prior
art, the cost functions of the first block and the second block are
as follows:
[0031] first block: 8+9+6+8+7+6=44
[0032] second block: 5+10+4+22=41
[0033] Therefore the second block is taken as the best matching
block for the current encoding block according to the prior
art.
[0034] However, according to the present invention, where one
assumes K=1, f(Qp)=1, the cost functions of the first block and the
second block are as follows:
[0035] first block:
[8+0]+[9+(9-8)]+[6+(8-6)]+[8+0]+[7+0]+[6+0]=47
[0036] second block:
[5+0]+[10+(10-5)]+[4+(5-4)]+[22+(22-10)]+[0+(4-0)]+[0+0]=63
[0037] Obviously, according to the present invention, the first
block is taken as the best matching block for the current encoding
block. This is very different from the prior art.
[0038] According to function g(|C.sub.i,j-P.sub.i+x,j+y|) described
above, the cost function disclosed in the present invention can be
simplified as follows: CF .function. ( x , y ) = i = i .times.
.times. 0 i .times. .times. 1 .times. j = j .times. .times. 0 j
.times. .times. 1 .times. C i , j - P i + x , j + y + K f
.function. ( Q .times. .times. p ) ( ad_max - ad_min ) ##EQU7##
[0039] Wherein ad_max and ad_min are respectively the maximum and
the minimum of |C.sub.i,j-P.sub.i+x,j+y| between (i, j)=(i0, j0)
and (i, j)=(i1, j1).
[0040] The above-mentioned method can be summarized as follows:
[0041] First, utilize a distortion function such as
|C.sub.i,j-P.sub.i+x,j+y| to calculate difference between the
pixels of the encoding block and the pixels in the search range of
a target picture to generate at least one distortion value.
[0042] Second, utilize an entropy function such as h(Qp, C.sub.i,j,
P.sub.i+x,j+y) or g(|C.sub.i,j-P.sub.i+x,j+y|) to calculate the
distribution or variation of the difference between the pixels of
the encoding block and the pixels of blocks corresponding to
candidate motion vectors to generate at least one distribution
values.
[0043] Third, sum up the distortion values and the distribution
values to generate at least one sum value. For example, utilize a
cost function such as CF .function. ( x , y ) = i = i .times.
.times. 0 i .times. .times. 1 .times. j = j .times. .times. 0 j
.times. .times. 1 .times. { C i , j - P i + x , j + y + h
.function. ( Q .times. .times. p , C i , j , P i + x , j + y ) } ,
.times. or ##EQU8## CF .function. ( x , y ) = i = i .times. .times.
0 i .times. .times. 1 .times. j = j .times. .times. 0 j .times.
.times. 1 .times. { C i , j - P i + x , j + y + K g .function. ( C
i , j , P i + x , j + y ) } ##EQU8.2## to calculate the sum
value.
[0044] Fourth, select the target motion vector according to the sum
value.
[0045] That is, according to the present invention, the larger
distribution range or entropy of the pixel difference between the
current encoding block and a block corresponding to a candidate
motion vector (x, y) in the target picture (in the example above,
the larger the difference between the maximum and the minimum), the
larger the cost function is so that it is less easier to be
selected as the best matching block for the current encoding
block.
[0046] Please refer to FIG. 2 showing a motion estimation device
200 in the video compression system according to the present
invention. The video compression system divides a current picture
into a plurality of blocks. For a current encoding block in the
current picture, the device 200 can determine an optimal motion
vector (x1, y1) from a plurality of candidate motion vectors (x, y)
in a search range, wherein the current encoding block includes
(i1-10)*(j1-j0) pixels. As shown in FIG. 2, the device 200 includes
an distortion calculator 220 for calculating distortion between the
pixels of the encoding block and the pixels in the search range of
a target picture. For example, the distortion can be obtained from
|C.sub.i,j-P.sub.i+x,j+y|, wherein C.sub.ij is a pixel in the
current encoding block, and P.sub.i+x,j+y is a pixel in the search
range of the target picture; a spatial variation calculating module
240 for calculating distribution value by utilizing an entropy
function such as h(Qp, C.sub.i,j, P.sub.i+x,j+y), wherein Qp is a
quantization step; and a motion vector determining module 260
coupled with the distortion calculator 220 and the spatial
variation calculating module 240 for summing up the distortion
values and the variation values to generate at least one sum value
and for determining the target motion vector according to the sum
value. For example, the spatial variation calculating module 240
calculates a cost function as follows: i = i .times. .times. 0 i
.times. .times. 1 .times. j = j .times. .times. 0 j .times. .times.
1 .times. { C i , j - P i + x , j + y + h .function. ( Q .times.
.times. p , C i , j , P i + x , j + y ) } ##EQU9##
[0047] For instance, similar to the above description, function
h(Qp, C.sub.i,j, P.sub.i+x,j+y) can be represented as
K.times..intg.(Qp).times.g(|C.sub.i,j-P.sub.i+x,j+y|); therefore in
device 200, the spatial variation calculating module 240 includes a
first calculator 242 for calculating function
g(|C.sub.i,j-P.sub.i+x,j+y|), a second calculator 244 for
calculating function f(Qp), and a multiplier 246 coupled with the
first calculator 242 and the second calculator 244 for calculating
K.times.f(Qp).times.g(|C.sub.i,j-P.sub.i+x,j+y|). As described
above, f(Qp) can be regarded as an amplifying factor for amplifying
the effect of g(|C.sub.i,j, P.sub.i+x,j+y|). Therefore,
g(|C.sub.i,j, P.sub.i+x,j+y|) still can be used to the present
invention even if f(Qp) is removed.
[0048] The motion vector determining module 260 includes an adder
262 coupled with the distortion calculator 220 and the spatial
variation calculating module 240 for adding one of the distortion
value and one of the distribution value (for example,
|C.sub.i,j-P.sub.i+x,j+y|+h(Qp, C.sub.i,j, P.sub.i+x,j+y), an
accumulator 264 coupled with the adder 262 for calculating the sum
of the distortion values and distribution values (for example, i =
i .times. .times. 0 i .times. .times. 1 .times. j = j .times.
.times. 0 j .times. .times. 1 .times. { C i , j - P i + x , j + y +
h .function. ( Q .times. .times. p , C i , j , P i + x , j + y ) }
) , ##EQU10## and a determiner 270 coupled with the accumulator 246
for determining the candidate motion vector (x, y), which meet a
desired condition such as minimizes the cost function, to be the
target motion vector (x1, y1) of the current encoding block.
Wherein, the target motion vector which minimizes the cost function
may regard as an optimal motion vector.
[0049] For storing a smaller value of the sum value and comparing
different sum values generated from different candidate motion
vectors as shown in FIG. 2, the determiner 70 includes a comparator
272 coupled with the accumulator 264 for outputting the targetI
motion vector (x1, y1), and a storage 274 coupled with the
comparator 272 for storing the smaller value of the sum values,
[0050] In contrast to the prior art, the optimal motion vector in
the search range of the current encoding block can be obtained
according to a cost function different from that in the prior art.
Since the cost function of the present invention is influenced by
the variation of the pixel difference between the current encoding
block and a block corresponding to the current candidate motion
vector (x, y), the present invention can provide a better
compression efficiency on the residual corresponding to the optimal
motion vector after processing (by DCT, quantization process,
zig-zag scan and variable length coding).
[0051] Also, comparing with the above-mentioned H.264, the present
invention does not need to calculate the bit rate of each candidate
motion vectors and only needs a distortion function and an entropy
function to select a target motion vector. Thus the calculating
loading can be decreased and the speed can be increased.
[0052] Those skilled in the art will readily observe that numerous
modifications and alterations of the device and method may be made
while retaining the teachings of the invention. Accordingly, the
above disclosure should be construed as limited only by the metes
and bounds of the appended claims.
* * * * *