Compression of digital video data is needed for many applications. Transmission over limited bandwidth channels such as direct broadcast satellite (DBS) and storage on optical media (i.e., CD, DVD, etc.) are typical examples. In order to achieve efficient compression, complex, computationally intensive processes are used for encoding (or compressing) and decoding (or decompressing) digital video signals. For example, even though MPEG-2 is known as a very efficient method for compressing video, more efficient compression standards such as H.264 (and MPEG-4) are being developed.
Compression performance can be evaluated by measuring the cost versus the benefit of compressing an image. The cost or “rate” generally refers to the number of bits used to code the compressed data (e.g., video, audio, etc.). The benefit can be measured by how well the decompressed image approximates the original image (i.e., the amount of distortion introduced by the compression). Distortion generally refers to the signal-to-noise ratio (SNR) of the compressed data. In general, when the rate is decreased without simultaneously increasing the distortion, the rate-distortion (RD) of the compressed video is improved. For example, the video may look at least as good while requiring less storage and/or bandwidth to transmit.
One technique for improving rate-distortion (RD) of encoded video is coefficient cancellation prior to the entropy coding stage in an encoder. Blocks with all quantized coefficients set to zero require very few bits in standard video encoders due to a frequent occurrence. The very few bits result in efficient signaling (i.e., coded block pattern) for blocks with all quantized coefficients set to zero in the compressed video bitstream syntax. Similarly, macroblocks with only zero coefficients are also efficiently signaled (i.e., “skipped” macroblocks). When the entire residual block (or macroblock) is set to zero, the decoded reconstructed compressed video block becomes exactly the prediction for that block.
Two existing classes of measurements used in coefficient cancellation include 1) a calculation of a macroblock-based sum-of-absolute differences (or similar efficient parallel measurement) on predicted versus original pixels and 2) a calculation of a more accurate block-cost measurement based on the number and coding order of very small (e.g., +1 and −1) non-zero quantized coefficients. In the first class, the measurement is calculated prior to transformation and quantization. However, by only estimating which macroblocks to skip, the first class of measurement can fail to take advantage of efficiency that can be realized through setting individual blocks to zero.
In the second class, the measurement is calculated after transformation, quantization, and zig-zag scanning (i.e., serialization) of the coefficients. The measurement can even be performed after the entropy coding when an exact calculation of the precise rate cost of block cancellation is desired (i.e., a so-called “greedy” estimate of the rate cost since it does not necessarily go to the last stage of taking into account future coding decisions).
The disadvantage of the existing coefficient cancellation techniques is primarily that they achieve a poor trade-off between implementation complexity and estimation accuracy. A solution that improves rate-distortion performance of a video encoder would be desirable.