Abstract:
There is disclosed a method of digital signal compression, coding and representation, and more particularly a method of video compression, coding and representation system that uses multi-frame motion estimation and includes both device and method aspects. The invention also provides a computer program product, such as a recording medium, carrying program instructions readable by a computing device to cause the computing device to carry out a method according to the invention.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims the benefit of U.S. Provisional Application No. 60/556,363, filed Mar. 26, 2004, which is hereby incorporated herein by reference in its entirety. 
     
    
     FIELD OF INVENTION 
       [0002]    This invention relates generally to digital signal compression, coding and representation, and more particularly to a video compression, coding and representation system using multi-frame motion estimation and having both device and method aspects. It further relates to a computer program product, such as a recording medium, carrying program instructions readable by a computing device to cause the computing device to carry out a method according to the invention. 
       BACKGROUND OF THE INVENTION 
       [0003]    Due to the huge size of the raw digital video data (or image sequences), compression must be applied such data so that they may be transmitted and stored. There have been many important video compression standards, including the ISO/IEC MPEG-1, MPEG-2, MPEG-4 standards and the ITU-T H.261, H.263, H.263+, H.263++, H.264 standards. The ISO/IEC MPEG-1/2/4 standards are used extensively by the entertainment industry to distribute movies, digital video broadcast including video compact disk or VCD (MPEG-1), digital video disk or digital versatile disk or DVD (MPEG-2), recordable DVD (MPEG-2), digital video broadcast or DVB (MPEG-2), video-on-demand or VOD (MPEG-2), high definition television or HDTV in the US (MPEG-2), etc. The later MPEG-4 was more advanced than MPEG-2 and can achieve high quality video at lower bit rate, making it very suitable for video streaming over internet, digital wireless network (e.g. 3G network), multimedia messaging service (MMS standard from 3GPP), etc. MPEG-4 will be included in the next generation DVD players. The ITU-T H.261/3/4 standards are designed for low-delay video phone and video conferencing systems. The early H.261 was designed to operate at bit rates of p*64 kbit/s, with p=1,2, . . . , 31. The later H.263 is very successful and is widely used in modern day video conferencing systems, and in video streaming in broadband and in wireless network, including the multimedia messaging service (MMS) in 2.5G and 3G networks and beyond. The latest H.264 (also called MPEG-4 Version 10, or MPEG-4 AVC) is currently the state-of-the-art video compression standard. It is so powerful that MPEG decided to jointly develop with ITU-T in the framework of the Joint Video Team (JVT). The new standard is called H.264 in ITU-T and is called MPEG-4 Advance Video Coding (MPEG-4 AVC), or MPEG-4 Version 10. Based on H.264, a related standard called the Audio Visual Standard (AVS) is currently under development in China. Other related standards may be under development. 
         [0004]    H.264 has superior objective and subjective video quality over MPEG-1/2/4 and H.261/3. The basic encoding algorithm of H.264 is similar to H.263 or MPEG-4 except that integer 4×4 discrete cosine transform (DCT) is used instead of the traditional 8×8 DCT and there are additional features include intra prediction mode for I-frames, multiple block sizes and multiple reference frames for motion estimation/compensation, quarter pixel accuracy for motion estimation, in-loop deblocking filter, context adaptive binary arithmetic coding, etc. 
         [0005]    In particular, H.264 allows the encoder to store five reference pictures for motion estimation (ME) and motion compensation (MC). However, the processing time increases linearly with the number of reference pictures used. This is because motion estimation needs to be performed for each reference frame in a simple implementation. This full selection process (the examination of all five reference frames) provides the best coding result but the five-fold increase in computation is very high. 
       SUMMARY OF THE INVENTION 
       [0006]    The present invention seeks to provide new and useful multi-frame motion estimation techniques for any current frame in H.264 or MPEG-4 AVC or AVS or related video coding. 
         [0007]    According to the present invention there is provided a method of matching a first image object (original current frame) against a number of reference image object (reference frames), including; defining regions (e.g. non-overlapping rectangular blocks, or some expanded regions similar to those in the overlapping motion compensation in H.263) in the first image object (e.g. frame N); for each region in the first image object, defining the corresponding representative coordinate (e.g. upper left corner of a block within the current frame); for each region in the first image object, defining a search region (e.g. a search window of 3×4 in frame N-1, 5×8 in frame N-2, 7×12 in frame N-3 and so on) in each of the reference image objects, with different search regions of possibly different sizes; for each region in the first image and for a relative coordinate in the search region (a location of the search block within the search window) in each of the reference image objects, defining a relative coordinate (motion vector) with respect to the representative coordinate of the said region in the first image, and a mismatch measure (e.g. SAD or MSE or some rate-distortion cost function) between the said region in the first image and the corresponding region at the said relative location in the said reference image; for each region in the first image object, computing the mismatch measure at selected relative locations in the search regions of selected reference image objects and choosing one or more relative coordinates in the search regions of the selected reference image objects; followed possibly by an optional local search at integer-pixel and sub-pixel precision around the chosen relative coordinates for each region in the first image object, constructing a motion-compensated region by considering regions (such regions may or may not be of the same size as the said region in the first image, e.g. they can be the expanded regions used in overlapped motion compensation in H.263) at the said selected relative coordinates in the said selected reference image objects and applying linear or nonlinear operations to combine them to form a motion-compensated region (this region may or may not be of the same size as the said region in the first image); combining all the said motion-compensated regions to form a second image object (predictive frame) of the same size as the first image object; and forming a third image object (residue frame) of the same size as the first image object by subtracting the second image object (predictive frame) from the first image object (original current frame). 
         [0008]    The present invention provides for the intelligent selection of the reference image objects, and the intelligent selection of the relative coordinates. Such intelligent selection allows us to perform the mismatch calculation on a greatly reduced number of candidate reference frames and candidate relative locations (motion vectors). 
         [0009]    In a preferred embodiment a class is defined for each region in the first image object; for each region in the first image object, a class is defined for each of the reference image objects; for each region in the first image object, the selection of the reference image objects and the selection of relative coordinates in the said reference image objects for the computation of the mismatch measure depend on the class of the said region in the first image and the classes of the said reference image objects, and after the said mismatch computation, one or more relative coordinates in the search regions of the reference image objects are chosen. 
         [0010]    In a preferred embodiment a class is defined for each region in the first image object; for each region in the first image object, a class is defined for each of the reference image objects; for each region in the first image object, among all the reference image objects with the same or similar class, only a number of (e.g. one) image objects is selected for the computation of the mismatch measure; depending on the relationship between the class of the said region in the first image object and the class of any said selected reference image object, a number of the relative coordinates in the search area of the said selected reference image object are selected for mismatch computation. Complete or partial mismatch computations are both possible. After the said mismatch computation, one or more relative coordinates in the search regions of the reference image objects are chosen. This may be followed by an optional local search at integer-pixel or sub-pixel precision. In one version of this embodiment the selected image object within a class is the image object that is closest in time within the class (e.g. the nearest past frame with the same class). 
         [0011]    In a preferred embodiment of the invention for each region in the first image object, a class is defined for each of the reference image objects (a class is defined for each reference frame); for each region in the first image object (e.g. frame N), a second image object (e.g. frame N-1) is defined and a class is defined for the second image object; for each region in the first image object, a class is defined for the said region according to the class of the second image object, and the relative coordinate in the search area in the second image object achieving the least mismatch measure between the first image object and the second image object; for each region in the first image object, the selection of the reference image objects and the selection of relative coordinate in the said reference image objects for the computation of the mismatch measure depends on the class of the said region in the first image and the classes of the said reference image objects; and after the said mismatch computation, one or more relative coordinates in the search regions of the reference image objects are chosen. In one version of this embodiment the second image is the immediate past image object. 
         [0012]    In a preferred embodiment of the invention for each region in the first image object, a class is defined for each of the reference image objects; for each region in the first image object (e.g. frame N), a second image object (e.g. frame N-1) is defined and a class is defined for the second image object; a search region is defined in the second image and a number of relative coordinates in the search region are selected for mismatch computation. Complete or partial mismatch computations are both possible. For each region in the first image object, a class is defined for the said region according to the class of the second image object, and one or more of the selected relative coordinates in the search region in the second image object achieving the least mismatch measures between the first image object and the second image object. For each region in the first image object, the selection of the reference image objects and the selection of relative coordinate in the said reference image objects for the computation of the mismatch measure depends on the class of the said region in the first image and the classes of the said reference image objects. After the said mismatch computation, one or more relative coordinates in the search regions of the reference image objects are chosen. In a version of this embodiment the second image is the immediate past image object. 
         [0013]    In a preferred embodiment of the invention for each region in the first image object, a class is defined for each of the reference image objects; for each region in the first image object (e.g. frame N), a second image object (e.g. frame N-1) is defined and a class is defined for the second image object; a search region is defined in the second image and a number of relative coordinates in the search region are selected for mismatch computation. Complete or partial mismatch computation are both possible. For each region in the first image object, a class is defined according to the class of the second image object, and one or more of the selected relative coordinates in the search region in the second image object achieving the least mismatch measures between the first image object and the second image object. For each region in the first image object, among all the reference image objects with the same class, only one image object is selected for the computation of the mismatch measure. Depending on the relationship between the class of the said region in the first image object and the class of any said selected reference image object, a number of the relative coordinates in the search area of the said selected reference image object are selected for mismatch computation. Complete or partial mismatch computations are both possible. After the said mismatch measure computation, one or more relative coordinates in the search regions of the reference image objects are chosen. In a version of this embodiment the second image is the immediate past image object. In a version of this embodiment the selected image object is the image object that is closest in time within the class (e.g. the nearest past frame with the same class). 
         [0014]    In an embodiment of the invention a class is defined for each region in the first image object; for each region in the first image object, and for each relative coordinate in the corresponding search region in any of the reference image objects, a class is defined for the said relative coordinate; (a class is defined for each possible search point in each reference frame); for each region in the first image object, the selection of the reference image objects and the selection of relative coordinate in the said reference image objects for the computation of the mismatch measure depends on the class of the said region in the first image and the classes of the said relative coordinate in the said reference image objects. After the said mismatch computation, one or more relative coordinates in the search regions of the reference image objects are chosen. 
         [0015]    In an embodiment of the invention for each region in the first image object, and for each relative coordinate in the corresponding search region in any of the reference image objects, a class is defined for the said relative coordinate; (a class is defined for each possible search point in each reference frame); for each region in the first image object (e.g. frame N), a second image object (e.g. frame N-1) is defined and a search region is defined in the second image object and a class is defined for all the relative coordinates in the said search region in the second image object; a number of the relative coordinates in the search region are selected for mismatch computation. Complete or partial mismatch computations are both possible. For each region in the first image object, a class is defined according to (i) one or more relative coordinates in the search region in the second image object achieving the least mismatch measures between the first image object and the second image object, and (ii) the classes of the said relative coordinates in the second image object; For each region in the first image object, the selection of the reference image objects and the selection of relative coordinate in the said reference image objects for the computation of the mismatch measure depends on the class of the said region in the first image and the classes of the said relative coordinate in the said reference image objects. In one version of this embodiment the said second image is the immediate past image object. 
         [0016]    In an embodiment of the invention for each region in the first image object, and for each relative coordinate in the corresponding search region in any of the reference image objects, a class is defined for the said relative coordinate; (a class is defined for each possible search point in each reference frame). For each region in the first image object (e.g. frame N), a second image object (e.g. frame N-1) is defined and a search region is defined in the second image object and a class is defined for all the relative coordinates in the said search region in the second image object; for each region in the first image object, a class is defined according to (i) a number of relative coordinates in the search region in the second image object achieving the least mismatch measures between the first image object and the second image object, and (ii) the classes of the said relative coordinate in the second image object; (more than one relative coordinates used); for each region in the first image object, among all the reference image objects with the same class, only one image object is selected for the computation of the mismatch measure. Depending on the relationship between the class of the said region in the first image object and the class of any said selected reference image object, a number of the relative coordinates in the search area of the said selected reference image object are selected for mismatch computation. Complete or partial mismatch computations are both possible. After the said mismatch computation, one or more relative coordinates in the search regions of the reference image objects are chosen. In one version of this embodiment the said second image in is the immediate past image object. In one version of this embodiment the selected image object within a class is the image object that is closest in time within the class (e.g. the nearest past frame with the same class). 
         [0017]    In some embodiments of the invention, the classification of regions can be updated or reset because classification errors can occur in some classification methods and such errors can accumulate over time. The updating or resetting can be performed periodically or when certain situations occur. In some embodiments of the invention, the class of the said region, of the said second image object and the said reference image objects are updated, after the mismatch measure computation, depending on the behavior of the computed mismatch measure. In one embodiment, the classes can be pixel-location classes such as “integer location”, “half-pixel location”, “quarter-pixel location, “⅛-pixel location”, “ 1/16-pixel location”, In this embodiment, the pixel location classification of regions in the first image object may be determined with respect to the pixel location classification of the regions in the second image object. Thus any error in the pixel location classification of the regions in the second image object can affect the accuracy of the classification in the first image object, which in turn can affect future image objects. In one embodiment, the updating or resetting can be triggered when there is a large reduction in the mismatch measure as the motion estimation changed from one pixel precision to another (e.g. full integer pixel to half-pixel motion, or from half-pixel to quarter-pixel, and so on). In one embodiment, when there is a large reduction in the mismatch measure as the motion changed from integer pixel precision to half-pixel precision, the class of the selected reference image object may be updated or reset to “integer-pixel location”. In another embodiment, when there is a large reduction in the mismatch measure as the motion changed from half-pixel precision to quarter-pixel precision, the class of the selected reference image object may be updated or reset to “half-pixel location” and similarly when there is a large reduction in the mismatch measure as the motion changed from quarter-pixel to ⅛-pixel or ⅛-pixel to 1/16 pixel, the selected reference image object may be updated or reset to quarter-pixel or ⅛ pixel respectively. 
         [0018]    Viewed from another aspect the present invention provides an overall multi-frame motion estimation method such that single-frame motion estimation is performed with respect to the most recent reference frame; if best distortion is smaller than a threshold, the search terminates; otherwise, single-frame motion estimation is performed on other reference frames in such a way that only one frame from the same pixel-location class is examine, the one being the most recent frame. In the single-frame motion estimation, full search or fast search can be applied. In other words, complete or partial mismatch computations are both possible. 
         [0019]    In the above embodiments of the invention, the classes may be defined according to the pixel location, with classes such as “integer location”, “half-pixel location”, “quarter-pixel location”, “⅛-pixel location”, “ 1/16-pixel location”, etc. The classes may also be defined according to the type of regions (e.g. “smooth”, “edge”, “texture” etc), orientation of edges (e.g. “vertical edge”, “horizontal edge”, and edges with various angle of orientation or inclination, etc), width of the edges (e.g. “1-pixel wide edge”, “2-pixel wide edge”, etc), etc, or even a combination of various attributes. Some of these classifications of the first image object may require a second image object, while others do not. 
         [0020]    The embodiments of the invention given above are in terms of the current H.264 setting. While H.264 allows 5 reference frames, actually any amount of reference frames can be used. This invention can be applied with multiple block size, and the blocks do not necessarily be non-overlapping. The reference frames may be in the past or in the future. While only one of the reference frames is used in the above description, more than one frames can be used (e.g. a linear combination of several reference frames). While H.264 uses discrete cosine transform, any discrete transform can be applied. Actually, the use of “pixel location” classes in the decision of which reference frames to use, or not to use, can be extended to other decisions. The classification of situations according to “pixel location” due to horizontal and vertical translational motion can be generalized to classes due to translational and rotational motion in all possible directions. It can also be generalized to classes due to rigid or non-rigid objects at different spatial location, orientation and scale. While video is a sequence of “frames” which are 2-dimensional pictures of the world, the invention can be applied to sequences of lower (e.g. 1) or higher (e.g. 3) dimensional description of the world. 
         [0021]    For the video, one picture element (pixel) may have one or more components such as the luminance component, the red, green, blue (RGB) components, the YUV components, the YCrCb components, the infra-red components, the X-ray or other components. Each component of a picture element is a symbol that can be represented as a number, which may be a natural number, an integer, a real number or even a complex number. In the case of natural numbers, they may be 12-bit, 8-bit, or any other bit resolution. While the pixels in video are 2-dimensional samples with rectangular sampling grid and uniform sampling period, the sampling grid does not need to be rectangular and the sampling period does not need to be uniform. 
         [0022]    Moreover, the present invention in any of its aspect is applicable not only to the encoding of video, but also to the correspondence estimation in the encoding of audio signals, speech signals, video signals, seismic signals, medical signals, etc. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0023]    Embodiments of the invention will now be described for the sake of example only with reference to the following figures, in which: 
           [0024]      FIG. 1  illustrates examples of half-pixel motion and quarter-pixel motion 
           [0025]      FIG. 2  shows an example of selection of frames t- 1 , t- 2 , t- 3  for motion estimation of frame t. 
           [0026]      FIG. 3  shows the flow chart of the proposed method FMFME. 
           [0027]      FIG. 4  shows the PSNR comparison between full search and the proposed FMFME for a test sequence called “Coastguard”. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0028]    The present invention, at least in its preferred embodiments, provides a novel fast multi-frame selection scheme that requires significantly reduced computational cost while achieving similar visual quality and bit-rate as the full selection process. Instead of searching through all the possible reference frames, the proposed scheme tries to select only a few representative frames for motion estimation. This is very useful for real-time applications. 
         [0029]    Accurate prediction can efficiently reduce the degree of error between the original image and the predicted image. For this reason, quarter-pixel translational motion estimation/compensation is adopted in H.264 for better compression performance. Between two consecutive frames, the object motion may be an integer pixel motion, a half-pixel motion, or a quarter-pixel motion, ⅛-pixel motion, 1/16-pixel motion etc. Typically, sub-pixel motion estimation algorithms use interpolation to predict the sub-pixel shift of texture relative to the sampling grid. 
         [0030]    Suppose an object has edges aligned perfectly with the sensor boundaries at a particular time instant such that the object edge is clear and sharp. We will describe this object as having “integer-pixel location”. When the object undergoes an integer-pixel translational motion, the object will look exactly the same in the two consecutive frames except that one is a translation to another. And the moved object can be predicted perfectly by integer-pixel motion estimation. 
         [0031]    When the object  100  undergoes a half-pixel motion, the edges may be blurred as shown in  FIG. 1   a.  We will describe this object as having “half-pixel location”. The original zero-pixel-wide (sharp) object edge now becomes one pixel-wide (blurred). The pixel at the blurred object edges  106  may have only half the intensity of the original object, which can lead to difficulty in motion estimation. In particular, the block on the right  102  in  FIG. 1   a  can be predicted perfectly by block  100  using half-pixel motion estimation. However, block  100  cannot be predicted perfectly by block  102 . 
         [0032]    Similarly, when the object  100  undergoes a quarter-pixel motion, the edges may be blurred as shown in  FIG. 1   b.  We will describe this object as having “quarter-pixel location”. The zero-pixel-wide (sharp) object edge becomes one-pixel-wide (blurred). The pixels at the blurred edges may have ¾ ( 108 ) or ¼ ( 110 ) of the intensity. Again, the blurred “quarter-pixel location” object  104  can be predicted perfectly from the sharp “integer-pixel location” object  100  using quarter-pixel motion estimation, but not vice versa. 
         [0033]    In general, the objects can be classified into sub-pixel location classes, namely “integer-pixel location”, “half-pixel location” and “quarter-pixel location”. The edge (and probably texture) details in the three classes are different. 
         [0034]    The advantage of multi-frame ME is that it can further reduce the temporal redundancy in the video sequences by considering more than one reference frames. The best match is usually found by minimizing the cost function: 
         [0000]        J ( m, λ   MOTION )=SAD( s, c ( m ))+λ MOTION   ·R ( m−p ))   (1) 
         [0000]    with m=(m x , m y ) T  being the motion vector, p=(p x ,p y ) T  being the prediction for the motion vector and λ MOTION  being the Lagrange multiplier. The term R(m−p) represents the bits used to encode the motion information and are obtained by table-lookup. The SAD (Sum of Absolute Differences) is computed as: 
         [0000]    
       
         
           
             
               
                 
                   
                     S 
                      
                     
                         
                     
                      
                     A 
                      
                     
                         
                     
                      
                     
                       D 
                        
                       
                         ( 
                         
                           s 
                           , 
                           
                             c 
                              
                             
                               ( 
                               m 
                               ) 
                             
                           
                         
                         ) 
                       
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         
                           x 
                           = 
                           1 
                         
                         , 
                         
                           y 
                           = 
                           1 
                         
                       
                       
                         B 
                         , 
                         B 
                       
                     
                      
                     
                        
                       
                         
                           s 
                            
                           
                             [ 
                             
                               x 
                               , 
                               y 
                             
                             ] 
                           
                         
                         - 
                         
                           c 
                            
                           
                             [ 
                             
                               
                                 x 
                                 - 
                                 
                                   m 
                                   x 
                                 
                               
                               , 
                               
                                 y 
                                 - 
                                 
                                   m 
                                   y 
                                 
                               
                             
                             ] 
                           
                         
                       
                        
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0000]    with B=16, 8 or 4 and s being the original video signal and c being the coded video signal. 
         [0035]    There are basically two types of temporal redundancy that can be captured by using multiple reference frames but not the traditional single frames. The first type of redundancy is related to short-term memory. Suppose the current frame is frame t. Sometimes, objects may be distorted or absent in frame t- 1 , but well represented in frames t- 2  to t- 5 . An example is the blinking of an eye, which is a very fast motion. If multiple reference frames are allowed, the motion estimation and compensation can be significantly better than just a single reference frame. However, in our experiments, we observe that the previous reference frame (i.e. frame t- 1 ) still has the highest probability of being selected among the five possible reference frames. 
         [0036]    The second type is the sub-pixel movement of textures described above. Textures and objects with different version of “sub-pixel locations” (“integer-pixel”, “half-pixel” and “quarter-pixel”) may occur in successive video frames. In our experiments, we observe that there is a great tendency for the cost function to be especially small when the same shifted version of texture is used to do the motion estimation and compensation. In other words, the optimal reference frame tends to be the one with the same sub-pixel location as the current frame. 
         [0037]    The more reference frames used, the higher the probability for the current image to find a reference frame with the same sub-pixel location. Probably this is the reason why it has been suggested that sub-pixel motion compensation is more important in single-frame ME/MC than in multi-frame ME/MC. Nevertheless, multi-frame motion estimation together with sub-pixel accuracy motion estimation is a strong combination to tackle the sub-pixel movement of texture and edges. However, it is difficult to determine accurately the current sub-pixel location class a priori. 
         [0038]    We also observe that when there is more than one frame with the same sub-pixel location, the one closer to the current frame is usually better. As a result, the motion estimation speed can be increased by estimating the type of shifted version of texture (“sub-pixel location”) in the frame buffer. For example in  FIG. 2 , the black square means collocated macroblocks in Frame t and the multiple reference frames. 
         [0039]    So if the macroblock at Frame t- 1  and Frame t- 2  show the same shifting characteristics, then we can drop the redundant one (Frame t- 2 ) and reduce motion estimation complexity. 
         [0040]    Suppose we need to perform multi-frame motion estimation for frame t, as shown in  FIG. 2 . In the proposed fast multi-frame motion estimation (FMFME) algorithm, each macroblock (e.g., macroblock  200 ) in the reference frames (frames t- 5  to t- 1 ) is assumed to have a sub-pixel location. 
         [0041]    Before performing motion estimation for the current macroblock (with black frame) in frame t ( 202 ), the motion vectors of all the collocated macroblocks in frames t- 1  to t- 5  will be examined. If two or more macroblocks have the same sub-pixel location, only one frame is enabled for motion estimation. The sub-pixel location of two macroblocks are considered the same if both the x and y components of the sub-pixel location are equal. The process will enable the frame with smallest temporal distance (closest) to the current frame. 
         [0042]    Motion estimation is then performed on the immediate past frame (i.e. frame t- 1  ( 204 )), as this is the most likely frame to be the best. After the motion estimation process, the sub-pixel motion vectors obtained are added to the sub-pixel locations of the “dominant” reference macroblocks (with maximum overlapping area) to obtain the sub-pixel location of the current macroblock. So for  FIG. 2  if we assume frame t- 3  ( 206 ) is chosen to be the reference frame for the black (current) macroblock in frame t, the sub-pixel location of the current macroblock in frame t is obtained by adding its sub-pixel motion vector to the sub-pixel position of black macroblock in frame t- 3 . 
         [0043]    Several early termination checks are then performed. If the best SAD with respect to frame t- 1  is smaller than a threshold T 1 , we consider it “good enough” and would skip the motion estimation for other reference frames. If the current macroblock is sufficiently flat such that there is no strong texture inside the macroblock, we would also skip the multi-frame motion estimation because multi-frame motion estimation in such cases tends to have little performance gain over single-frame motion estimation. To determine the flatness of the macroblock, 4×4 Hadamard transform is performed for every 4×4 sub-block inside the macroblock. If all the AC coefficients of the 4×4 sub-blocks are equal to zero, we would consider the macroblock is sufficiently flat. Otherwise, motion estimation is performed on the enabled reference frames. 
         [0044]    There is also a sub-pixel location refreshing mechanism. Our sub-pixel location estimation of the macroblocks may not be 100% accurate, especially with potential error drifting over many frames. The accumulation of error can affect the performance of FMFME. Therefore, refreshing of sub-pixel location is necessary. We observe in our experiments that, for texture at integer-pixel, half-pixel or quarter-pixel locations, only the textures at integer-pixel location can give a large SAD reduction when it is interpolated/filtered into half pixel type texture for half-pixel motion estimation. When this occurs, we reset the sub-pixel location of the reference macroblock to be integer-pixel, and update the current sub-pixel location if appropriate. This refreshing can help to suppress the propagation of error. 
         [0045]    Here is how our refreshing mechanism works. During the motion estimation between the current and reference frame, the best SAD obtained using integer-pixel and half-pixel motion estimation is compared. If the half-pixel ME gives 50% reduction in SAD compared with the integer-pixel ME, the sub-pixel location type of the reference macroblock will be updated to be of integer-pixel.  FIG. 3  shows the flow chart  300  of the proposed algorithm. 
       Experimental Results 
       [0046]    The proposed FMFME was tested on four QCIF (176×144) sequences, “Akiyo”, “Coastguard”, “Stefan” and “Foreman”, with constant quantization factor, Qp=16 and T 1 =512. The proposed scheme was implemented in the H.264 reference software TML9.0. PMVFAST was used for fast motion estimation. 
         [0047]    Table 1 below gives the results of PSNR (peak signal-to-reconstructed image measure), bit rate and complexity reduction of the proposed FMFME in the testing sequences. The computational cost using a powerful performance analyzer in term of number of clock cycles is used. Compared with the full search (FS) multi-frame selection scheme in H.264, the proposed FMFME can reduce computational cost by 53% (equivalent complexity of performing PMVFAST on 2.6 frames instead of 5 reference frames) with negligibly small PSNR degradation (0.02 dB) and fewer bits (0.10%) on the average.  FIG. 4  shows a graph  400  the PSNR comparison for “Coastguard”. 
         [0000]    
       
         
               
             
               
               
               
               
             
               
             
               
               
               
               
               
               
             
               
             
               
               
               
               
               
               
             
               
             
               
               
               
               
               
               
             
               
             
               
               
               
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 Comparison of PSNR, bitrate and complexity 
               
               
                 for H.264 and proposed FMFME algorithm 
               
             
          
           
               
                   
                 Complexity 
                 PSNR(dB) 
                 Bitrate 
               
               
                   
                   
               
             
          
           
               
                 Coastguard 
               
             
          
           
               
                   
                 H.264 (FS) 
                 120.66 × 10 9   
                 34.01 
                 2472144 
                   
               
               
                   
                 FMFME 
                  64.92 × 10 9   
                 34.00 
                 2476936 
               
               
                   
                 Saving 
                 46.2%     
                 −0.01 
                 −0.19% 
               
             
          
           
               
                 Akiyo 
               
             
          
           
               
                   
                 H.264 (FS) 
                 102.43 × 10 9   
                 38.23 
                 287336 
                   
               
               
                   
                 FMFME 
                  28.73 × 10 9   
                 38.23 
                 287024 
               
               
                   
                 Saving 
                 72% 
                 0.00 
                 1.1% 
               
             
          
           
               
                 Stefan 
               
             
          
           
               
                   
                 H.264 (FS) 
                 122.98 × 10 9   
                 34.01 
                 4814040 
                   
               
               
                   
                 FMFME 
                  71.32 × 10 9   
                 33.99 
                 4838168 
               
               
                   
                 Saving 
                 42% 
                 −0.02 
                 −0.5% 
               
             
          
           
               
                 Foreman 
               
             
          
           
               
                   
                 H.264 (FS) 
                 126.77 × 10 9   
                 35.65 
                 1604520 
                   
               
               
                   
                 FMFME 
                  71.35 × 10 9   
                 35.60 
                 1617704 
               
               
                   
                 Saving 
                 43.64%     
                 −0.05 
                 −0.82% 
               
               
                   
                   
               
             
          
         
       
     
         [0048]    The fast motion estimation process of embodiments of the present invention is mainly targeted for fast, low-delay and low cost software and hardware implementation of H.264, or MPEG4 AVC, or AVS, or related video coding standards or methods. Possible applications include digital cameras, digital camcorders, digital video recorders, set-top boxes, personal digital assistants (PDA), multimedia-enabled cellular phones (2.5G, 3G, and beyond), video conferencing systems, video-on-demand systems, wireless LAN devices, bluetooth applications, web servers, video streaming server in low or high bandwidth applications, video transcoders (converter from one format to another), and other visual communication systems, etc. 
         [0049]    While several aspects of the present invention have been described and depicted herein, alternative aspects may be effected by those skilled in the art to accomplish the same objectives. Accordingly, it is intended by the appended claims to cover all such alternative aspects as fall within the true spirit and scope of the invention.