Abstract:
An apparatus for motion estimation which supports multiple video compression standards and the method thereof is provided. The apparatus uses an interpolation filter with fixed coefficients. The apparatus also adjusts block sizes and calculation details of cost functions according to various video compression standards. Therefore the apparatus is capable of supporting multiple standards and providing high-quality video compression.

Description:
CROSS-REFERENCE TO RELATED APPLICATION  
       [0001]     This application claims the priority benefit of Taiwan application Ser. No. 9,4137,241, filed on Oct. 25, 2005. All disclosure of the Taiwan application is incorporated herein by reference.  
       BACKGROUND OF THE INVENTION  
       [0002]     1. Field of Invention  
         [0003]     The present invention relates to apparatus and method for motion estimation, used in video compression. More particularly, the present invention relates to apparatus and method for motion estimation, which is supporting multiple video compression standards.  
         [0004]     2. Description of Related Art  
         [0005]     Generally, the motion estimation is implemented by a manner, as shown in  FIG. 1  about a motion estimation apparatus  100 . The integer part estimator  101  receives the data  111  of original frames and the data  112  of reference frames, and performs a wide search for the integer part. Then, the decimal part estimator  102  performs a small search for the decimal part on the motion vectors with best results. The searching method is calculating a cost function value for each of the motion vectors, and comparing the cost function values to select the best one of the motion vectors and its corresponding block mode  113 .  
         [0006]     In different video compression standards, the block size available for use may be different, and the filter coefficient used for interpolating the decimal reference frame may be different, either. The conventional method takes a specific video compression standard with the block size and a specific interpolation filter to implement the motion estimation. This may cause that the same motion estimation mode cannot effectively support the coding in multiple standards. For example, the block size for the standard of H.264/AVC (Advanced Video Coding) can change from 16×16 to 4×4. The interpolation filter is the 6-tap Wiener filter. However, the block for the MPEG-4 (Motion Picture Expert Group-4) can only support 16×16 or 8×8, and the interpolation filter is the 2-tap Bilinear filter or the 8-tap Wiener filter. The motion estimation modes for above two designs with specific standards cannot be compatible to each other.  
         [0007]     Even though the U.S. Pat. No. 5,920,353 proposes a multi-standard coder, it is just related to the function block belonging to the decoding loop of the coder. So far, the conventional technology still cannot provide the high-quality compressing function under condition of supporting the multiple video compression standard.  
       SUMMARY OF THE INVENTION  
       [0008]     The invention provides an apparatus for motion estimation, capable of supporting multiple video compression standards, and providing a high-quality compression under the condition of supporting multiple video compression standards.  
         [0009]     The invention also provides a method for motion estimation, capable of supporting multiple video compression standards, and providing a high-quality compression under the condition of supporting multiple video compression standards.  
         [0010]     For having the forgoing capabilities, the invention provides an apparatus for motion estimation, which is supporting multiple video compression standards. The apparatus includes an integer part estimator and a decimal part estimator. The integer part estimator calculates the cost function at the integer-point position on the multiple candidate sets of macroblock, and selects at least one of the candidate sets according to the cost functions. Each candidate set includes a block configuration of the macroblock and motion vectors respectively for all of the blocks in the macroblock. The block size of the block configuration is determined according to the external input of the block size mask. Then, the decimal part estimator uses the interpolation filter with fixed coefficients to recalculate the motion vectors and the cost functions at the decimal-point position from the candidate sets selected by the integer part estimator, and then selects one of the candidate sets according to the cost functions. The block size of the candidate set is also determined according to the external input of the block size mask.  
         [0011]     For the forgoing apparatus for motion estimation with supporting multiple video compression standards, in an embodiment, the interpolation filter is a 2-tap bilinear filter.  
         [0012]     For the forgoing apparatus for motion estimation with supporting multiple video compression standards, in an embodiment, each cost function is an addition of a sum of absolute difference (SAD) and a coding-need bit rate multiplied by a Lagrange multiplying number.  
         [0013]     For the forgoing apparatus for motion estimation with supporting multiple video compression standards, in an embodiment, the value of the Lagrange multiplying number is adjusted according to the video compression standard being supported.  
         [0014]     From another aspect, the invention also provides a method for motion estimation with supporting multiple video compression standards. The method can also be seen in the foregoing apparatus of motion estimation, and the descriptions are omitted here.  
         [0015]     According to the embodiments of the invention, the apparatus and method for motion estimation of the invention use the interpolation filter with fixed coefficients, such as the 2-tap bilinear filter, which has good compression result and can be used in multiple standards. In addition, the invention can adjust the block size and the calculation algorithm of the cost function, according to the video compression standard. As a result, the invention can support the multiple standards and also improve capability of high-quality compression. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0016]     The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.  
         [0017]      FIG. 1  is drawing, schematically illustrating a conventional apparatus of motion estimation.  
         [0018]      FIG. 2  is a drawing, schematically illustrating an apparatus of motion estimation, according to an embodiment of the invention.  
     
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0019]      FIG. 2  is a drawing, schematically illustrating an apparatus of motion estimation  200 , according to an embodiment of the invention. In  FIG. 2 , the apparatus of motion estimation  200  includes an integer part estimator  201  and a decimal part estimator  202 . The integer part estimator  201  includes a calculation unit  203  and a comparator  204 , and the decimal part estimator  202  includes an interpolation unit  205 , a calculation unit  206 , and a comparator  207 .  
         [0020]     First, in the integer part estimator  201 , the calculation unit  203  calculates the cost functions of several candidate sets in the macroblock at the integer-point position from multiple candidate sets of macroblock, according to the original frame data  211  and the reference frame data  212 . Each candidate set includes a block configuration of the macroblock about how to divide the macroblock into smaller blocks, and motion vectors for every block in the block configuration.  
         [0021]     All of the block sizes are determined according to the external input of the block size mask  213 . In order to support multiple standards, the embodiment uses four block sizes of 16×16, 16×8, 8×16, and 8×8. Because not all of the video compression standards can support all of the block sizes, according to the block size mask  213 , the apparatus of motion estimation  200  can mask the block size, which is not supported by the current video compression standard and is not used.  
         [0022]     The current video compression standard does not have specific requirement about how to calculate the cost functions for the candidate sets, and the designer has the free option. In the embodiment, the cost function takes an addition of a sum of absolute difference (SAD) and a coding-need bit rate multiplied by a Lagrange multiplying number. The value of the Lagrange multiplying number is adjusted according to the video compression standard being supported. In the embodiment, the value of the Lagrange multiplying number is determined according to the external input signal  214 . Of course, the invention can also be applied to a more complicate cost function, and the calculation detail can be different in accordance with different video compression standard, indicated by the input signal  214 .  
         [0023]     After the cost functions of the candidate sets are calculated out by the calculation unit  203 , the comparator  204  compares the values of the cost functions. Then, according to the comparing result, at least one of the candidate sets is selected. In the embodiment, the cost function represents the value of information loss after compression. In this manner, the comparator  204  selects the candidate set with smaller cost function.  
         [0024]     The candidate set, selected by the comparator  204 , then enters the decimal part estimator  202 . Likewise, the block size used by the decimal part estimator  202  is determined, according to the block size mask  213 . The Lagrange multiplying number in the cost function is also determined, according to the input signal  214 .  
         [0025]     In the decimal part estimator  202 , first, the interpolation unit  205  uses the interpolation filter with fixed coefficients to produce a reference frame data at the decimal-point position. The interpolation filter used in the invention is 2-tap bilinear filter. Since this kind of filter can support multiple standards, it is easy in use, and the compression quality is good. The calculation unit  206  uses the reference frame data provided from the interpolation unit  205 , and then recalculates the motion vectors and the cost functions at the decimal-point position from the candidate sets selected by the integer part estimator  201 . Then, the comparator  207  compares the values of the cost functions and selects one of the selected candidate sets, according to the comparing result. In the embodiment, it is the one with the smallest cost function. The selected candidate set is the output  215 .  
         [0026]     The apparatus of motion estimation  200  of the embodiment can support multiple compression standards, at least including H.264, MPEG-1, MPEG-2, MPEG-4, and SMPTE (Society of Motion Picture and Television Engineer) VC-1. The compression quality is also quite good. For example, according to the experimental results, in comparing the embodiment with the H.264/AVC, the file size for the compressed files is just about 3% difference.  
         [0027]     In addition to the foregoing apparatus of motion estimation in embodiment, the invention also provides a method for motion estimation with supporting for multiple compression standards. Actually, the method has been implemented in the apparatus of motion estimation  200  as shown in  FIG. 2 , and is not further described.  
         [0028]     In summary, the apparatus and method for motion estimation use the interpolation filter with fixed coefficients, such as the 2-tap bilinear filter with high-quality compression and suitable for use in multiple standards. In addition, the invention can adjust the block size and the calculation algorithm of the cost function, according to different video compression standard. As a result, the invention can support multiple standards and provide high-quality compression.  
         [0029]     It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing descriptions, it is intended that the present invention covers modifications and variations of this invention if they fall within the scope of the following claims and their equivalents.