The present invention relates generally to a method of compressing or coding digital video with bits and, specifically, to an effective method for estimating and encoding motion vectors in motion-compensated video coding.
In classical motion estimation the current frame to be encoded is decomposed into image blocks of the same size, typically blocks of 16×16 pixels, called “macroblocks.” For each current macroblock, the encoder searches for the block in a previously encoded frame (the “reference frame”) that best matches the current macroblock. The coordinate shift between a current macroblock and its best match in the reference frame is represented by a two-dimensional vector (the “motion vector”) of the macroblock. Each component of the motion vector is measured in pixel units.
For example, if the best match for a current macroblock happens to be at the same location, as is the typical case in stationary background, the motion vector for the current macroblock is (0,0). If the best match is found two pixels to the right and three pixels up from the coordinates of the current macroblock, the motion vector is (2,3). Such motion vectors are said to have integer pixel (or “integer-pel” or “full-pel”) accuracy, since their horizontal X and vertical Y components are integer pixel values. In
Moving objects in a video scene do not move in integer pixel increments from frame to frame. True motion can take any real value along the X and Y directions. Consequently, a better match for a current macroblock can often be found by interpolating the previous frame by a factor N×N and then searching for the best match in the interpolated frame. The motion vectors can then take values in increments of 1/N pixel along X and Y and are said to have 1/N pixel (or “1/N-pel”) accuracy.
In “Response to Call for Proposals for H.26L,” ITU-Telecommunications Standardization Sector, Q.15/SG16, doc. Q15-F-11, Seoul, Nov. 98, and “Enhancement of the Telenor proposal for H.26L,” ITU-Telecommunications Standardization Sector, Q.15/SG16, doc. Q15-G-25, Monterey, Feb. 99, Gisle Bjontegaard proposed using ⅓-pel accurate motion vectors and cubic-like interpolation for the H26L video coding standard (the “Telenor encoder”). To do so this, the Telenor encoder interpolates or “up-samples” the reference frame by 3×3 using a cubic-like interpolation filter. This interpolated version requires nine times more memory than the reference frame. At a given macroblock, the Telenor encoder estimates the best motion vector in two steps: the encoder first searches for the best integer-pel vector and then the Telenor encoder searches for the best ⅓-pixel accurate vector V1/3 near V1. Using
Most known video compression methods estimate and encode motion vectors with ⅓½-pixel accuracy, because early studies suggested that higher or adaptive motion accuracies would increase computational complexity without providing additional compression gains. These early studies, however, did not estimate the motion vectors using optimized rate-distortion criteria, did not exploit the convexity properties of such criteria to reduce computational complexity, and did not use effective strategies to encode the motion vectors and their accuracies.
One such early study was Bernd Girod's “Motion-Compensating Prediction with Fractional-Pel Accuracy,” IEEE Transactions on Communications, Vol. 41, No. 4, pp. 604-612, April 1993 (the “Girod work”). The Girod work is the first fundamental analysis on the benefits of using sub-pixel motion accuracy for video coding. Girod used a simple, hierarchical strategy to search for the best motion vector in sub-pixel space. He also used simple mean absolute difference (“MAD”) criteria to select the best motion vector for a given accuracy. The best accuracy was selected using a formula that is not useful in practice since it is based on idealized assumptions, is very complex, and restricts all motion vectors to have the same accuracy within a frame. Finally, Girod focused only on prediction error energy and did not address how to use bits to encode the motion vectors.
Another early study was Smita Gupta's and Allen Gersho's “On Fractional Pixel Motion Estimation,” Proc. SPIE VCIP, Vol. 2094, pp. 408-419, Cambridge, November 1993 (the “Gupta work”). The Gupta work presented a method for computing, selecting, and encoding motion vectors with sub-pixel accuracy for video compression. The Gupta work disclosed a formula based on mean squared error (“MSE”) and bilinear interpolation, used this formula to find an ideal motion vector, and then quantized such vector to the desired motion accuracy. The best motion vector for a given accuracy was found using the sub-optimal MSE criteria and the best accuracy was selected using the largest decrease in difference energy per distortion bit, which is a greedy (sub-optimal) criteria. A given motion vector was coded by first encoding that vector with ½-pel accuracy and then encoding the higher accuracy with refinement bits. Course-to-fine coding tends to require significant bit overhead.
In “On the Optimal Motion Vector Accuracy for Block-Based Motion-Compensated Video Coders,” Proc. IST/SPIE Digital Video Compression: Algorithms and Technologies, pp. 302-314, San Jose, February 1996 (the “Ribas work”), Jordi Ribas-Corbera and David L. Neuhoff, modeled the effect of motion accuracy on bit rate and proposed several methods to estimate the optimal accuracies that minimize bit rate. The Ribas work set forth a full-search approach for computing motion vectors for a given accuracy and considered only bilinear interpolation. The best motion vector was found by minimizing MSE and the best accuracy was selected using some formulas derived from a rate-distortion optimization. The motion vectors and accuracies were encoded with frame-adaptive entropy coders, which are complex to implement in real-time applications.
In “Proposal for a new core experiment on prediction enhancement at higher bitrates,” ISO/IEC JTC1/SC29/WG11 Coding of Moving Pictures and Audio, MPEG 97/1827, Sevilla, February 1997 and “Performance Evaluation of a Reduced Complexity Implementation for Quarter Pel Motion Compensation,” ISO/IEC JTC1/SC29/WG11 Coding of Moving Pictures and Audio, MPEG 97/3146, San Jose, January 1998, Ulrich Benzler proposed using ¼-pel accurate motion vectors for the video sequence and more advanced interpolation filters for the MPEG4 video coding standard. Benzler, however, used the Girod's fast-search technique to find the ¼-pel motion vectors. Benzler did consider different interpolation filters, but proposed a complex filter at the first stage and a simpler filter at the second stage and interpolated one macroblock at a time. This approach does not require much cache memory, but it is computationally expensive because of its complexity and because all motion vectors are computed with ¼-pel accuracy for all the possible modes in a macroblock (e.g., 16×16, four-8×8, sixteen-4×4, etc.) and then the best mode is determined. Benzler used the MAD criteria to find the best motion vector which was fixed to ¼-pel accuracy for the whole sequence, and hence he did not address how to select the best motion accuracy. Finally, Benzler encoded the motion vectors with a variable-length code (“VLC”) table that could be used for encoding ½ and ¼ pixel½- and ¼-pixel accurate vectors.
The references discussed above do not estimate the motion vectors using optimized rate-distortion criteria and do not exploit the convexity properties of such criteria to reduce computational complexity. Further, these references do not use effective strategies to encode motion vectors and their accuracies.
One preferred embodiment of the present invention addresses the problems of the prior art by computing motion vectors of high pixel accuracy (also denoted as “fractional” or “sub-pixel” accuracy) with a minor increase in computation.
Experiments have demonstrated that, by using the search strategy of the present invention, a video encoder can achieve significant compression gains (e.g., up to thirty percent in bit rate savings over the classical choices of motion accuracy) using similar levels of computation. Since the motion accuracies are adaptively computed and selected, the present invention may be described as adaptive motion accuracy (“AMA”).
One preferred embodiment of the present invention uses fast-search strategies in sub-pixel space that smartly searches for the best motion vectors. This technique estimates motion vectors in motion-compensated video coding by finding a best motion vector for a macroblock. The first step is searching a first set of motion vector candidates in a grid of sub-pixel resolution of a predetermined square radius centered on V1 to find a best motion vector V2. Next, a second set of motion vector candidates in a grid of sub-pixel resolution of a predetermined square radius centered on V2 is searched to find a best motion vector V3. Then, a third set of motion vector candidates in a grid of sub-pixel resolution of a predetermined square radius centered on V3 is searched to find the best motion vector of the macroblock.
In an alternate preferred embodiment of the present invention, a technique for estimating high-accurate motion vectors may use different interpolation filters at different stages in order to reduce computational complexity.
Another alternate preferred embodiment of the present invention selects the best vectors and accuracies in a rate-distortion (“RD”) sense. This embodiment uses rate-distortion criteria that adapts according to the different motion accuracies to determine both the best motion vectors and the best motion accuracies.
Still further, another alternate preferred embodiment of the present invention encodes the motion vector and accuracies with an effective VLC approach. This technique uses a VLC table that is interpreted differently at different coding units, according to the associated motion vector accuracy.
The foregoing and other objectives, features, and advantages of the invention will be more readily understood upon consideration of the following detailed description of the invention, taken in conjunction with the accompanying drawings.
The methods of the present invention are described herein in terms of the motion accuracy being modified at each image block. These methods, however, may be applied when the accuracy is fixed for the whole sequence or modified on a frame-by-frame basis. The present invention is also described as using Telenor's video encoders (and particularly the Telenor encoder) as described in the Background of the Invention. Although described in terms of Telenor's video encoders, the techniques described herein are applicable to any other motion-compensated video coder.
Most video coders use motion vectors with half pixel (or “½-pel”) accuracy and bilinear interpolation. The first version of Telenor's encoder also used ½-pel motion vectors and bilinear interpolation. The latest version of Telenor's encoder, however, incorporated ⅓-pel vectors and cubic-like interpolation because of the additional compression gains. Specifically, at a given macroblock, Telenor's encoder estimates the best motion vector in two steps shown in
The technology of the present invention allows the encoder to choose between any set of motion accuracies (for example, ½, ⅓, and ⅙-pel accurate motion vectors) using either a full search strategy or a fast search strategy.
Full-Search AMA Search Strategy
As shown in
A critical issue in the motion vector search is the choice of a measure or criterion for establishing which block is the best match for the given macroblock. In practice, most methods use either the mean squared error (“MSE”) or mean absolute difference (“MAD”) criteria. The MSE between two blocks consists of subtracting the pixel values of the two blocks, squaring the pixel differences, and then taking the average. The MAD difference between two blocks is a similar distortion measure, except that the absolute value of the pixel differences is computed instead of the squares. If two image blocks are similar to each other, the MSE and MAD values will be small. If, however, the image blocks are dissimilar, these values will be large. Hence, typical video coders find the best match for a macroblock by selecting the motion vector that produces either the smallest MSE or the smallest MAD. In other words, the block associated to the best motion vector is the one closest to the given macroblock in an MSE or MAD sense.
Unfortunately, the MSE and MAD distortion measures do not take into account the cost in bits of actually encoding the vector. For example, a given motion vector may minimize the MSE, but it may be very costly to encode with bits, so it may not be the best choice from a coding standpoint.
To deal with this, advanced encoders such as those described by Telenor use rate-distortion (“RD”) criteria of the type “distortion+L*Bits” to select the best motion vector. The value of “distortion” is typically the MSE or MAD, “L” is a constant that depends on the compression level (i.e., the quantization step size), and “Bits” is the number of bits required to code the motion vector. In general, any RD criteria of this type would work with the present invention. However, in the present invention “Bits” include the bits needed for encoding the vector and those for encoding the accuracy of the vector. In fact, some candidates can have several “Bits” values, because they can have several accuracy modes. For example, the candidate at location (½, −½) can be thought of having ½ or ⅓ pixel1/6-pixel accuracy.
Fast-Search AMA Search Strategy
As shown in
Experimental data has shown that, on average, this simple fast search strategy typically checks the RD cost of about eighteen locations in sub-pixel space (ten more than Telenor's search strategy), and hence the overall computational complexity is only moderately increased.
The experimental data discussed below in connection with
Alternate embodiments of the invention replace one or more of the steps 108-120. These embodiments have also been effective and have further reduced the number of motion vector candidates to check in the sub-pixel velocity space.
Computation And Memory Savings
Because step 108 checks only motion vector candidates of ½-pixel accuracy, the computation and memory requirements for the hardware or software implementation are significantly reduced. To be specific, in a smart implementation embodiment of this fast-search the reference frame is interpolated by 2×2 in order to obtain the RD costs for the ½-pel vector candidates. A significant amount of fast (or cache) memory for a hardware or software encoder is saved as compared to Telenor's approach that needed to interpolate the reference frame by 3×3. In comparison to the Telenor encoder, this is a cache memory savings of 9/4or9/4, or a factor of 2.25. The few additional interpolations can be done later on a block-by-block basis.
Additionally, since the interpolations in step 108 are used to direct the search towards the lower values of the RD cost function, a complex filter is not needed for these interpolations. Accordingly, computation power may be saved by using a simple bilinear filter for step 108.
Also, other key coding decisions such as selecting the mode of a macroblock (e.g., 16×16, four-8×8, etc.) can be done using the ½-pel vectors because such decisions do not benefit significantly from using higher accuracies. Then, the encoder can use a more complex cubic filter to interpolate the required sub-pixel values for the few additional vector candidates to check in the remaining steps. Since the macroblock mode has already been chosen, these final interpolations only need to be done for the chosen mode.
Use of multiple-filters obtained computation savings of over twenty percent in running time on a Sparc Ultra 10 Workstation in comparison to Telenor's approach, which uses a cubic interpolation all the time. Additionally, the fast-memory requirements were reduced by nearly half. Also, there was little or no loss in compression performance. Comparing one preferred embodiment of the fast-search, Benzler's technique requires about 70 interpolations per pixel in the Telenor encoder and the present invention requires only about 7 interpolations per pixel.
Coding The Motion Vector And Accuracies With Bits
Once the best motion vector and accuracy are determined, the encoder encodes both the motion vector and accuracy is values with bits. One approach is to encode the motion vector with a given accuracy (e.g., half-pixel accuracy) and then add some extra bits for refining the vector to the higher motion accuracy. This is the strategy suggested by B. Girod, but it is sub-optimal in a rate-distortion sense.
In one preferred embodiment of the present invention, the accuracy of the motion vector for a macroblock is first encoded using a simple code such as the one given in Table 1. Any other table with code lengths {1, 2, 2} could be used as well. The bit rate could be further reduced using a typical DPCM approach.
Next, the value of the vector/s in the respective accuracy space is encoded. These bits can be obtained from entries of a single VLC table such as the one used in the H26L codec. The key idea is that these bits are interpreted differently depending on the motion accuracy for the macroblock. For example, if the motion accuracy is ⅓ and the code bits for the X component of the difference motion vector are 00001100001 (observe that this code is the fourth entry (code number 3) of H26L's VLC table in [6]), the X component of the vector is Vx=⅔. If the accuracy is ½, such code corresponds to Vx=1.
Compared to the Benzler method for encoding the motion vectors with a variable length code (“VLC”) table that could be used for encoding ½and ¼pixel accurate vectors, the method of the present invention can be used for encoding vectors of any motion accuracy and the table can be interpreted differently at each frame and macroblock. Further, the general method of the present invention can be used for any motion accuracy, not necessarily those that are multiples of each other or those that are of the type 1/n (with n an integer). The number of increments in the given sub-pixel space is simply counted and the bits in the associated entry of the table is used as the code.
From the decoder's viewpoint, once the motion accuracy is decoded, the motion vector can also be easily decoded. After that, the associated block in the previous frame is reconstructed using a typical 4-tap cubic interpolator. There is a different 4-tap filter for each motion accuracy.
The AMA does not increase decoding complexity, because the number of operations needed to reconstruct the predicted block are the same, regardless of the motion accuracy.
Experimental Results
The video sequences are commonly used by the video coding community, except for “Paris Shaked.” The latter is a synthetic sequence obtained by shifting the well-known sequence “Paris” by a motion vector whose X and Y components take a random value within [−1,1]. This synthetic sequence simulates small movements caused by a hand-held camera in a typical video phone scene.
Comparison Of Full-Search And Fast-Search AMA
The experimental results shown in
Combining AMA And Multiple Reference Frames
In the plot shown in
The experiments show that the gains with AMA add to those obtained using multiple reference frames. The gain from AMA in the one-reference case can be measured by comparing the curve labeled with a “+” (Telenor AMA+c+1r) with the curve labeled with an “x” (Telenor ⅓+1r), and the gain in the five-reference case can be measured between the curve labeled with a “diamond” (Telenor AMA+c+5r) with the curve labeled with a “*” (Telenor ⅓+5r).
It should be noted that the present invention may be implemented at the frame level so that different frames could use different motion accuracies, but within a frame all motion vectors would use the same accuracy. Preferably in this embodiment the motion vector accuracy would then be signaled only once at the frame layer. Experiments have shown that using the best, fixed motion accuracy for the whole frame should also produce compression gains as those presented here for the macroblock-adaptive case.
In another frame-based embodiment the encoder could do motion compensation on the entire frame with the different vector accuracies and then select the best accuracy according to the RD criteria. This approach is not suitable for pipeline, one-pass encoders, but it could be appropriate for software-based or more complex encoders. StillIn still another fame-based embodiment, the encoder could use previous statistics and/or formulas to predict what will be the best accuracy for a given frame (e.g., the formulas in set forth in the Ribas work or a variation thereof can be used). This approach would be well-suited for one-pass encoders, although the performance gains would depend on the precision of the formulas used for the prediction.
The terms and expressions which have been employed in the foregoing specification are used therein as terms of description and not of limitation, and there is no intention, in the use of such terms and expressions, of excluding equivalents of the features shown and described or portions thereof, it being recognized that the scope of the invention is defined and limited only by the claims that follow.
This application is a Continuation Reissue Application of co-pending U.S. application Ser. No. 11/984,661 filed on Nov. 20, 2007. U.S. application Ser. No. 11/984,661 is a Reissue of U.S. application Ser. No. 09/615,791, filed on Jul. 13, 2000, now U.S. Pat. No. 6,968,008, which claims the benefit of priority of U.S. Provisional Application No. 60/146,102, filed on Jul. 27, 1999, now expired. The entire contents of all of the above applications are incorporated herein by reference. This application claims the benefit of Provisional Application No. 60/146,102, filed Jul., 27, 1999.
Number | Name | Date | Kind |
---|---|---|---|
4864393 | Harradine et al. | Sep 1989 | A |
4937666 | Yang | Jun 1990 | A |
5105271 | Niihara | Apr 1992 | A |
5408269 | Tsukagoshi | Apr 1995 | A |
5489949 | Jeong et al. | Feb 1996 | A |
5610658 | Uchida et al. | Mar 1997 | A |
5623313 | Naveen | Apr 1997 | A |
5682205 | Sezan et al. | Oct 1997 | A |
5694179 | Kwak et al. | Dec 1997 | A |
5754240 | Wilson | May 1998 | A |
5767907 | Pearlstein | Jun 1998 | A |
5844616 | Collet et al. | Dec 1998 | A |
5987181 | Makiyama et al. | Nov 1999 | A |
6005509 | Buckreuss et al. | Dec 1999 | A |
6205176 | Sugiyama | Mar 2001 | B1 |
6249318 | Girod et al. | Jun 2001 | B1 |
6269174 | Koba et al. | Jul 2001 | B1 |
6275532 | Hibi et al. | Aug 2001 | B1 |
6714593 | Benzler et al. | Mar 2004 | B1 |
6968008 | Ribas-Corbera et al. | Nov 2005 | B1 |
7224733 | Benzler et al. | May 2007 | B1 |
RE44012 | Ribas-Corbera et al. | Feb 2013 | E |
RE45014 | Ribas-Corbera et al. | Jul 2014 | E |
20010017889 | Borer | Aug 2001 | A1 |
Number | Date | Country |
---|---|---|
19730305 | Jan 1999 | DE |
0420653 | Apr 1991 | EP |
1073276 | Jan 2001 | EP |
2 305 569 | Apr 1997 | GB |
4-264889 | Sep 1992 | JP |
7-95585 | Apr 1995 | JP |
8-116532 | May 1996 | JP |
9-153820 | Jun 1997 | JP |
1042295 | Feb 1998 | JP |
11-46364 | Feb 1999 | JP |
11-55673 | Feb 1999 | JP |
2001-189934 | Jul 2001 | JP |
2011-35928 | Feb 2011 | JP |
2012-75175 | Apr 2012 | JP |
WO 9841011 | Sep 1998 | WO |
WO 9904574 | Jan 1999 | WO |
WO 9904574 | Jan 1999 | WO |
Entry |
---|
Chan et al., “Review of Block Matching Based Motion Estimation Algorithms for Video Compression,” Electrical and Computer Engineering, Canadian Conference on Vancouver, BC, Canada 14-17, Sep. 14, 1993, New York, NY, USA, IEEE, pp. 151-154, XP010117942. |
Ebrahimi et al., “A video codec based on perceptually derived and localized wavelet transform for mobile applications,” Signal Processing Theories and Applications, Brussels, Aug. 24-27, 1992, vol. 3, pp. 1361-1364, XP000356495. |
Extended European Search Report, dated May 24, 2011, for European Application No. 10013511.0. |
Fujiwara, “Point illustrated Newest MPEG Textbook,” ASCII Corporation, 1994, p. 114. |
Joshi et al., “Lossy Encoding of Motion Vectors Using Entropy-Constrained Vector Quantization,” IEEE Comp. Soc. Press, US, Proceedings of the International Conference on Image Processing (ICIP). Washington, Oct. 23-26, 1995, vol. 3, Los Alamitos, pp. 109-112, XP010197142. |
Lee, “Rate-Distortion Optimized Motion Smoothing for MPEG-2 Encoding,” Proceedings of the International Conference on Image Processing (ICIP), Los Alamitos, CA, vol. 2, Jan. 1, 1997, pp. 45-48, XP000914163. |
Netravali et al., “A Codec for HDTV,” IEEE Transactions on Consumer Electronics, IEEE Service Center, New York, NY, US, vol. 38, No. 3, Aug. 1, 1992, pp. 325-340, XP000311862. |
Ohm, “Motion-Compensated 3-D Subband Coding with Multiresolution Representation of Motion Parameters,” IEEE, Proceedings of the International Conference on Image Processing (ICIP), Nov. 13-16, 1994, vol. 3, Conf. 1, pp. 250-254, XP010146425. |
Pang et al., “Optimum Loop Filter in Hybrid Coders”, IEEE Transactions on Circuits and Systems for Video Technology, vol. 4, No. 2, pp. 158-167, Apr. 1994, XP000489688. |
Shen et al., “Adaptive motion accuracy (AMA) in Telenor's proposal”, ITU—Telecommunications Standardization Section, Study Group 16, Video Coding Experts Group (Question 15), Q15-H-20, Eight Meeting, Berlin, Aug. 3-6, 1999, XP030002958. |
Wedi, “Results of core experiment on Adaptive Motion Accuracy (AMA) with ½, ¼ and ⅛-pel accuracy,” ITU Study Group 16—Video Coding Experts Group, May 16, 2000, pp. 1-9, XP002301984. |
Bernd Girod, Motion-Compensating Prediction with Fractional-Pel Accuracy, IEEE Transactions on Communications, vol. 41, No. 4, pp. 604-612, (Apr. 1993). |
Smita Gupta and Allen Gersho, On Fractional Pixel Motion Estimation, Proc. SPIE VCIP, vol. 2094, pp. 408-419, Cambridge, (Nov. 1993). |
Xiaoming Li and Cesar Gonzales, A Locally Quadratic Model of the Motion Estimation Error Criterion Function and Its Application to Subpixel Interpolations, IEEE Transactions on Circuits and Systems for Video Technology, vol. 6, No. 1, (Feb. 1996). |
Jordi Ribas-Corbera and David L. Neuhoff, On the Optimal Motion Vector Accuracy for Block-Based Motion-Compensated Video Coders, Proc. IST/SPIE Digital Video Compression: Algorithms and Technologies, pp. 302-314, San Jose, (Feb. 1996). |
Ulrich Benzler, Proposal for a new core experiment on prediction enhancement at higher bitrates, ISO/IEC JTC1/SC29/WG11 Coding of Moving Pictures and Audio, MPEG 97/1827, Sevilla, (Feb. 1997). |
Ulrich Benzler, Performance Evaluation of a Reduced Complexity Implementation for Quarter Pel Motion Compensation, ISO/IEC JTC1/SC29/WG11 Coding of Moving Pictures and Audio, MPEG 97/3146, San Jose, (Jan. 1998). |
Response to Call for Proposals for H.26L, ITU-Telecommunications Standardization Section, Q.15/SG16, doc. Q15-F-11, Seoul, (Nov. 1998). |
Enhancement for the Telenor proposal for H.26L, ITU-Telecommunications Standardization Section, Q. 15/SG16, doc. Q15-G-25, Monterey, (Feb. 1999). |
Number | Date | Country | |
---|---|---|---|
60146102 | Jul 1999 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 11984661 | Nov 2007 | US |
Child | 09615791 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09615791 | Jul 2000 | US |
Child | 14170134 | US | |
Parent | 09615791 | Jul 2000 | US |
Child | 11984661 | US |