1. Field of the Invention
Embodiments of the present invention generally relate to a method and apparatus for low cost expensive coefficient suppression algorithm for video compression.
2. Description of the Related Art
Suppressing expensive coefficients after quantization affects the video quality. Also, conventional suppression algorithm requires zig-zag scanning of the quantized coefficients and weighting of each zero-run, which may be computationally expensive or may increase the hardware scale to support such an algorithm.
For example, H.264 committee software developed has an algorithm that suppresses ‘expensive’ coefficients. Such software considers one or very few non-zero coefficients with its absolute level of 1 as expensive coefficients, in terms of bit usage, and sets them to zero. This algorithm contributes to high quality picture; however, the related hardware accelerator usually does not have such functionality. This results in a lacking function, which can not be compensated due to the current architecture.
Therefore, there is a need for a simpler method for video compensation with comparable video quality, which enables a more efficient implementation and/or more compact hardware.
Embodiments of the present invention relate to a method for video compression and a video encoder. The method for video compression includes finding a coefficient relating to inter-coded block with a biggest absolute value, determining the number of non-zero coefficients when the absolute value is less that 2, determining the number of non-zero coefficients is less than a threshold, and setting the coefficients to zero when the non-zero coefficients is less than the threshold.
So that the manner in which the above recited features of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are therefore not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments.
This document summarizes the impact of the lack of the expensive coefficients suppression on picture quality for future enhancement. A simplified algorithm is also proposed for a feasible implementation.
The quantized coefficient output from T/Q 310 is utilized by a Coefficient Suppression 314, which removes expensive coefficients to get better video quality in the given bitrate constraint. After Coefficient Suppression 314, the quantized coefficients go into context-adaptive binary arithmetic coding (CAMAC) 316 and inverse quantization and inverse transform (IQ/IT) 318 to get the reconstructed residual signal. The inter- or intra-prediction is added to this residual in order to get the reconstructed macroblock. This is stored in the intra-prediction buffer 320 for subsequent macroblocks. The same reconstructed macroblock is also loop-filtered by a Loop Filter 322 and stored in the frame memory 324 for inter-prediction for future frames (or fields).
For a luminan of a 4×4 transform, it may happen that for instance a macroblock has one nonzero coefficient with |Level|=1. This will probably be a very “expensive” coefficient in terms of bit usage. Hence, it maybe beneficial to set it to zero. For that reason a procedure to check single coefficient has been used for inter luma blocks. During the quantization process, a parameter is accumulated depending on Run and Level according to the following rule that if the Level=0 or (|Level|=1 and Run>5) nothing is added to the parameter, for example, Single_ctr. However, if |Level|>1, then a 9 is added to Single_ctr. Whereas, if |Level|=1 and Run<6, a value T(Run) is added to Single_ctr, where T(0:5)=(3, 2, 2, 1, 1, 1). If the accumulated parameters for a 8×8 block is less than 4, all coefficients of that luma block are set to zero. Similarly, if the accumulated Single_ctr for the whole macroblock is less than 6, all coefficients of that luma macroblock are set to zero.
For chrominance, a similar method to the one for luma is used. The parameter, for example, Single_ctr is calculated similarly for each chroma component, which would only include for AC coefficients and for the whole macroblock. If the accumulated Single_ctr for each chroma component of a macroblock is less than 7, all the AC chroma coefficients of that component for the whole macroblock are set to zero.
For luminance of an 8×8 transform, if the Level=0 or (|Level|=1 and Run>20) nothing is added to a parameter, for example, Single_ctr. If |Level|>1, 9 is added to Single_ctr. If |Level|=1 and Run<21, a value T(Run) is added to Single_ctr. where T(0:20)=(3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1). But if the accumulated Single_ctr for a 8×8 block is less than 4, all coefficients of that luma block are set to zero. Similarly, if the accumulated Single_ctr for the whole macroblock is less than 6, all coefficients of that luma macroblock are set to zero.
An improved algorithm is proposed in
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.
This application claims benefit of U.S. provisional patent application Ser. No. 61/360,015, filed Jun. 30, 2010, which is herein incorporated by reference.
Number | Date | Country | |
---|---|---|---|
61360015 | Jun 2010 | US |