Abstract:
A method of speeding the computation of backward motion vector estimates which are derived from fields which are available from forward motion vector estimates as based on nearest neighbor criterion. The method allows for the generation of multi-frame backwards motion vectors. The invention of the present method for estimating backward motion vectors is particularly well-suited for use with the MPEG-2 video standard.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS  
         [0001]    Not Applicable  
         STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT  
         [0002]    Not Applicable  
         REFERENCE TO A COMPUTER PROGRAM APPENDIX  
         [0003]    Not Applicable  
         NOTICE OF MATERIAL SUBJECT TO COPYRIGHT PROTECTION  
         [0004]    A portion of the material in this patent document is subject to copyright protection under the copyright laws of the United States and of other countries. The owner of the copyright rights has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the United States Patent and Trademark Office file or records, but otherwise reserves all copyright rights whatsoever. The copyright owner does not hereby waive any of its rights to have this patent document maintained in secrecy, including without limitation its rights pursuant to 37 C.F.R. § 1.14.  
         BACKGROUND OF THE INVENTION  
         [0005]    1. Field of the Invention  
           [0006]    This invention pertains generally to motion estimation within video sequences, and more particularly to a method of estimating backward motion vectors from forward motion vectors.  
           [0007]    2. Description of the Background Art  
           [0008]    The efficiency with which video may be encoded and decoded is critical to the cost effective implementation of a number of video systems, in particular those applications that require real-time encoding or decoding of video. A video frame diagram is exemplified in FIG. 1 being divided into a multiplicity of macroblocks, although only nine are shown by way of example for the sake of simplicity. Each macroblock comprises a number of pixels, such as a 16×16 macroblock of pixels as utilized within MPEG-2 for frame motion vectors. The use of MPEG-2 encoding for video signals has been increasing steadily.  
           [0009]    It will be appreciated, that the estimation of motion within a video sequence, such as encoded within an MPEG-2 format, is a computationally intensive process. By way of example, with CCIR 601 video, about 90% of the required computation within an encoder for ISO MPEG-2 is for estimating motion. The time required to encode the video can be a large multiple of the time required to decode the given video sequence. In particular, an encoder implemented as an ISO MPEG-2 technical report encoder based on Test Model 5 (TM5) requires approximately 100 times the CPU execution time on an Ultra-SPARC 80 to encode a video sequence with a horizontal search range of +/−63 pixels and vertical search range of +/−32 pixels than is required in the corresponding decoding process. As a result, although real-time decoding of MPEG-2 video has become feasible, real-time encoding still poses a challenge.  
           [0010]    To appreciate the computational intensity, it should be recognized that MPEG-2 is a hybrid type of lossy coding scheme utilizing intra-coding and inter-coding in which redundant information contained in both the spatial domain and the temporal domain are removed to facilitate compression. Intra-coding is the compression performed on the image data in the spatial domain to generate an I-picture, also referred to as an intra-picture. Inter-coding is compression performed in the time domain to create predicted pictures, P-pictures, and bi-directional, B-pictures. Motion vectors for B-pictures may only be generated after computing forward and backward motion vectors for the preceding P-pictures and I-pictures. The I-pictures are independently encoded in relation to other near pictures, such as framing signals or field signals, while the P-pictures encode predicted and interpolated movement in response to the movement of elements from previous I-pictures and P-pictures. The B-pictures are encoded as difference signals for predicted or interpolated movements whose encoding considers the motion within previous and upcoming pictures which may be encoded only after considering the correlation of the movement of the previous I-pictures and P-pictures. The encoding mode which provides the lowest prediction error rate within the modes of forward, reverse, along with forward and reverse, is selected for use in the B-pictures. Typically, the picture structure utilized according to MPEG-2 follows a pattern I, B, B, P, B, B, P, an example of which is shown in FIG. 2 and referred to herein a macroblock vector diagram.  
           [0011]    The frames, pictures, within a video sequence, such as within the MPEG-2 standard, are grouped together to form a group-of-pictures (GOP). A popular GOP structure described in MPEG-2 Test model 5 (TM4) is specified by the integer M and N. In TM5, the value N expresses the number of pictures in a GOP and M−1 is the number of B frames between two successive I or P frames. One typical value that may be utilized for M is three, which corresponds to having two B pictures between successive I or P pictures as was shown in FIG. 2 illustrating macroblock  1  and macroblock  3 .  
           [0012]    The macroblocks may be displaced in moving forward or backward in the frame sequence. FIG. 3 depicts a current frame  10  and a subsequent frame  12  wherein macroblock  14  in current frame  10  which has moved from a location  18  in a subsequent frame by the backward motion vector  16 . The corresponding motion vectors are represented in FIG. 4 as B 1 , B 2 , B 3 , B 4 . Depicted in FIG. 5 is a frame diagram of current frame  10  and a previous frame  20 , wherein macroblock  22  in current frame  10  moves from a location  26  in previous frame  20  by a forward motion vector  24 . FIG. 6 is a macroblock vector diagram of the conventional single-frame distance forward motion vectors associated with the frame shown in FIG. 5.  
           [0013]    In the case of TM5 with M=3, an encoder is required to compute the motion vectors B 1 , B 2 . If the encoder uses a search window of H×V pixels to find the motion vectors B 2 , and if it is assumed that the search window size scales with the frame distance between two pictures, then the computational complexity for the motion vectors B 1  and B 2  using full search is about H×V+4(H×V)=5(H×V), while the memory complexity is approximately 4(H×V).  
           [0014]    A number of motion estimation methods have been devised to speed the computations within the encoding process. These methods generally must be utilized in combination to achieve the performance gains necessary to provide for real-time encoding with sufficient picture quality. For example, if method “A” can speed up the computations by a factor of five, and method “B” can speed up computations by a factor of two, and the computation methods are orthogonal, then the combined methods can result in a factor of ten speed increase. It will be appreciated that utilizing a combination of non-orthogonal methods will reduce the attainable increase in speed.  
           [0015]    Therefore, a need exists for a method of increasing motion estimation speed that may be beneficially applied in combination with other motion estimation enhancements. The present invention satisfies those needs, as well as others, and overcomes the deficiencies of previously developed motion estimation methods.  
         BRIEF SUMMARY OF THE INVENTION  
         [0016]    A motion estimation method is provided which eliminates a significant amount of the computation associated with backwards motion estimation when forward motion vector fields between successive fields are available.  
           [0017]    The computations of both forward and backward vectors are generally performed during the encoding process. The present invention has recognized that a generally parallel relationship exists between the respective forward and backward motion vectors and provides a method for simplifying the computation of the backward motion vectors when the forward motion vectors are available, thereby reducing overall computational overhead. Furthermore, the present method remains generally orthogonal to current speed enhancement methods, wherein the full speed advantages of the technique are available.  
           [0018]    Estimation of backwards motion within the present invention is predicated on the use of an nearest neighbor criterion and the fact that relative forward motion of an object in one picture will be parallel to its relative backward motion in the previous frame. So that by analyzing the forward motion vectors, the reverse motion vectors can often be more readily estimated.  
           [0019]    An object of the invention is to provide for rapid backwards motion vector computations utilizing information about the computed forward motion vectors.  
           [0020]    Another object of the invention is to provide a backwards motion vector estimation method that is orthogonal to conventional vector computation speed enhancement methods.  
           [0021]    Another object of the invention is to provide a method which increases the speed of backward motion vector computation for various MPEG-2 and other encoding and decoding operations and which makes real-time MPEG-2 encoding feasible.  
           [0022]    Another object of the invention is to provide a method of estimating backward motion vectors for macroblocks that can be linked to successive frames within a multi-frame video sequence.  
           [0023]    Further objects and advantages of the invention will be brought out in the following portions of the specification, wherein the detailed description is for the purpose of fully disclosing preferred embodiments of the invention without placing limitations thereon. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0024]    The invention will be more fully understood by reference to the following drawings which are for illustrative purposes only:  
         [0025]    [0025]FIG. 1 is a video frame diagram showing that a frame may be divided into a multiplicity of macroblocks, each comprising 16×16 pixels as found in MPEG-2.  
         [0026]    [0026]FIG. 2 is a macroblock vector diagram illustrating the conventional availability of two B pictures between successive I/P pictures.  
         [0027]    [0027]FIG. 3 is a video frame diagram showing a macroblock in a current frame moving from a location in a subsequent frame by backward motion vector.  
         [0028]    [0028]FIG. 4 is a macroblock vector diagram showing a set of backward motion vectors such as for FIG. 3.  
         [0029]    [0029]FIG. 5 is a frame diagram showing a macroblock in the current frame moving from a location in a previous frame by a forward motion vector.  
         [0030]    [0030]FIG. 6 is a macroblock vector diagram of conventional single-frame distance forward motion vectors.  
         [0031]    [0031]FIG. 7 is a macroblock vector diagram depicting a forward motion vector assignment to the nearest macroblock in the current frame to form a backward motion vector with the same magnitude but opposite in direction of the forward motion vector according to an aspect of the present invention.  
         [0032]    [0032]FIG. 8 is a macroblock vector diagram depicting single frame distanced backward motion vectors being derived from single frame distanced forward motion vectors based on the nearest macroblock criterion according to an aspect of the present invention.  
         [0033]    [0033]FIG. 9 is a macroblock vector diagram illustrating linking of single-frame backward motion vectors to form multi-frame backward motion vectors according to an aspect of the present invention.  
         [0034]    [0034]FIG. 10 is a macroblock vector diagram illustrating when backward motion vectors, such as b 3  and b 4 , according to the present invention are not obtainable from the forward motion vectors.  
         [0035]    [0035]FIG. 11 is a flowchart of the general backward estimation method according to an embodiment of the present invention. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0036]    Referring more specifically to the drawings, for illustrative purposes the present invention is embodied in the apparatus generally shown in FIG. 7 through FIG. 11. It will be appreciated that the apparatus may vary as to configuration and as to details of the parts, and that the method may vary as to the specific steps and sequence, without departing from the basic concepts as disclosed herein.  
         [0037]    The computation involved in the generation of backward motion vectors can be significantly reduced by utilizing the method of the present invention when the forward motion vector fields are available between successive frames, as was shown in FIG. 6. This reduction is achieved by deriving the single frame distanced backward motion vectors from the nearest neighbor single frame distanced forward motion vectors as shown in FIG. 7 and FIG. 8, and then by linking the single frame distanced backward motion vectors to multiple frame distanced backward motion vector as shown in FIG. 9.  
         [0038]    As shown in FIG. 7, a single frame distanced backward motion vector of a current frame  10  is obtained from a single frame distanced forward motion vector of the next frame  12  in the following manor. Let the given integer pel forward motion vector  38  of a macroblock  40  in the next frame  12  be the two dimensional vector (u,v). And let the top left pixel of the macroblock  40  be located at (x,y). Therefore, the macroblock  40  is moved from the 16×16 pixels  32  located at (x+u,y+v) in the current frame with the forward motion vector (u,v).  
         [0039]    Since motion is relative, we interpret that the 16×16 pixels  32  moves from the position (x+u,y+v) in the current frame to the next frame at the position (x,y) with the backward motion vector (−u,−v). However the position (x+u,y+v) is not necessarily located at the top left corner of macroblock. To obtain the backward motion vector of a macroblock, we assign the backward motion vector (−u,−v) to the macroblock whose top left corner (X m ,y m ) is nearest to (x+u,y+v). Therefore, 
           x   m =16*(( x+u+ 8)/16), 
           y   m =16*(( y+v+ 8)/16), 
         [0040]    where “*” is integer multiply, and “/” is integer divide with truncation as defined in the C programming language.  
         [0041]    A side effect of the assignment process is that there is no guarantee that each macroblock in the current frame will be assigned with one and only one backward motion vector. It is possible that some macroblocks may be assigned with multiple backward motion vectors and some macroblocks may not be assigned with any backward motion vectors at all. For example in FIG. 8, macroblock  1  of frame B 2  was not assigned with any backward motion vector. Therefore, the present invention provides a method for detecting which macroblocks remain unassigned with any backward motion vector. Backward motion vectors may then be assigned to these unassigned macroblocks by any convenient means, such as by using conventional backward motion vector computations. In addition, a method is provided for selecting one of the backward motion vectors when multiple assignments are made to the same macroblock.  
         [0042]    [0042]FIG. 9 illustrates backward motion vectors, wherein the motion vector b 2  is actually b 31 . An approximation of the motion vector b 1  is obtained by adding the vector b 31  and b 32  . The vector b 31  is selected because it originates at the same position as the motion vector b 1 , while motion vector b 32  is selected because the starting point of b 32  is the nearest to the end point of vector b 31  among all single frame distanced backward motion vectors in frame B 2 . The approximation of b 2  is further improved by selecting the motion vector which minimizes the sum of absolute differences (SAD) within +/−2 horizontal times +/−1 pels from the vector b 31 +b 32  to form b 1 .  
         [0043]    As previously described, not every valid backward motion vector of every macroblock may be determined utilizing the present method. For example, the vector b 3  and b 4  in FIG. 10 cannot be determined because the motion vector b 23  for constructing them is not valid and therefore not available. When a valid backward motion vector of a macroblock cannot be determined by the above method, the backward motion vectors should not be utilized for encoding that macroblock, and they can be generated by any convenient means. Furthermore, it will be remembered that each macroblock in the frame could be assigned with multiple backward motion vectors. Wherein one of the backward motion vectors may be selected for use, such as the backward motion vector which most closely approximates the resultant location, or a combination of the vectors may be computed and utilized and assigned to the macroblock.  
         [0044]    One method of detecting unassigned macroblocks is by preassigning all macroblocks with an invalid motion vector, such as pointing outside the frame, prior to the following iterative process, wherein the unassigned macroblock may be easily detected. The iterative process of determining the backward motion vectors is then executed for each of the macroblocks within the next frame.  
         [0045]    For every macroblock in the next frame at (x,y), its forward motion vector (u,v) is converted into a new backward motion vector (−u,−v). Then the new backward motion vector is used to replace the old backward motion vector of the macroblock at (x m ,y m ) in the current frame. Consequently only one backward motion vector, which may be valid or invalid, is kept at any one time for each macroblock in the current frame.  
         [0046]    Once found, the single-frame distance backward motion vectors can be utilized to generate the multi-frame backward motion vectors. Let b im  be the single frame distanced backward motion vector of the i-th macroblock of the m-th frame to the (m+1)-th frame. Let b imn  be the backward motion vector of the i-th macroblock of the m-th frame to the n-th frame. Consequently, we arrive at b im =b im(m+1) .  
         [0047]    An iterative linking process can be utilized within the present invention to find multi-frame backward motion vectors b imn  of the i-th macroblock of the m-th frame to the n-th frame by linking the motion vectors in between successive frames. Let the i-th macroblock of the m-th frame be located at (x im ,y im ).  
         [0048]    The iterative process is first initialized prior to the determination of backward motion vectors from forward motion vectors. The single-frame distanced motion vector b im  is obtained and it is designated as b im(m+1) , and then k is initialized as k=(m+1). If b im  is an invalid motion vector the iterative process is continued. If b im  is not an invalid motion vector an invalid vector is assigned to b imn  and the linking process is terminated.  
         [0049]    The multi-frame distanced backward motion vector b imn  is iteratively found. Once a valid b imk =(u imk ,v imk ) is found, a motion vector b im(k+1)  is constructed from b imk  by using the single frame distanced backward motion vector b jk  of the j-th macroblock of k-th frame, where the j-th macroblock is located at (x jk ,y jk ) and 
           x   jk =16*(( x   im   +u   imk +8)/16), 
           y   jk =16*(( y   im   +v   imk +8)/16), 
         [0050]    and “*” is integer multiply, and “/” is integer divide with truncation as defined in the C programming language. If b jk  is an invalid motion vector, it is assigned an invalid vector to b imn  and the process is terminated. If b jk  is a valid motion vector, it is assigned 
           b   im(k+1)   =b   imk   +b   jk . 
         [0051]    The value k is increased by one, and the iterative process above is repeated until b imn  is assigned. Then after b imn  is assigned, that is if b imn  is a valid motion vector, it is further improved by replacing it with the motion vector which minimizes the sum of absolute differences (SAD) within a +/−2 horizontal times +/−1 pels from b imn . If b imn  is not a valid motion vector, the backward motion vector should not be used to encode the corresponding macroblock.  
         [0052]    [0052]FIG. 11 depicts generalized steps according to the present invention. To provide a simple means of detecting whether a backward motion vector has been validly assigned within the iterative process, a predetermined invalid motion vector is first assigned to all macroblocks, as shown in block  100 . For example, in the current implementation for MPEG-2 , the invalid motion vector may comprise a motion vector that points outside of a frame. It will be appreciated that the detection process is not required for every application, and when utilized it may be implemented in a number of ways that will be obvious to one of ordinary skill in the art.  
         [0053]    A previously non-selected macroblock is selected at (x,y) in the next frame and its two dimensional forward motion vector (u,v) is obtained as per block  102 . The macroblock may be of any size, such as one comprising 16×16 pixels. A macroblock is selected from within the current frame that is nearest to a location (x+u,y+v), as represented by block  104 . Then the backward motion vector of the macroblock nearest to (x+u,y+v) may be replaced by (−u,−v) as represented by block  106 . It should be appreciated that alternative methods may be utilized when multiple corresponding forward motion vectors are available, such as selecting the closest one, or combining the vectors in a computation to arrive at the backward motion vector. The above steps, as shown in blocks  102 ,  104 ,  106  are then iteratively performed until macroblocks in the next frame have been selected, as represented by block  108 . Linking may be performed on the backward motion vectors as described for use within a multi-frame video sequence.  
         [0054]    Accordingly, it will be seen that the inventive method for estimating backwards motion vectors from forward motion vectors that can be implemented with numerous variations which will be obvious to those skilled in the art. It will be appreciated that the particular steps and order of steps may be implemented in a number of alternative ways by one of ordinary skill in the art without departing from the teachings of the invention as claimed.  
         [0055]    Although the description above contains many specificities, these should not be construed as limiting the scope of the invention but as merely providing illustrations of some of the presently preferred embodiments of this invention. Therefore, it will be appreciated that the scope of the present invention fully encompasses other embodiments which may become obvious to those skilled in the art, and that the scope of the present invention is accordingly to be limited by nothing other than the appended claims, in which reference to an element in the singular is not intended to mean “one and only one” unless explicitly so stated, but rather “one or more.” All structural, chemical, and functional equivalents to the elements of the above-described preferred embodiment that are known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the present claims. Moreover, it is not necessary for a device or method to address each and every problem sought to be solved by the present invention, for it to be encompassed by the present claims. Furthermore, no element, component, or method step in the present disclosure is intended to be dedicated to the public regardless of whether the element, component, or method step is explicitly recited in the claims. No claim element herein is to be construed under the provisions of 35 U.S.C. 112, sixth paragraph, unless the element is expressly recited using the phrase “means for.”