This invention relates to processing a compressed signal which may be a video and/or audio signal.
MPEG is a well known form of signal compression, but certain versions of MPEG are susceptible to blocking artifacts. There are generally two types of blocking artifacts in a MPEG compressed/decompressed video signal. In spatially high active picture areas, blocking can occur when quantization reaches a high level and there are insufficient discrete cosine transform (DCT) coefficients to represent the full detail of the picture. This type of blocking can be reduced by spatial low-pass filters which may be located either within the encoder and decoder prediction loop, or as a post-processing operation after decoding the compressed video signal.
The second type of blocking is sometimes referred to as least significant bit (LSB) block noise or “posterisation”. This second type of blocking occurs in spatially inactive picture areas, i.e. areas such as sky, where there is no detail, but there are subtle changes of luminance and/or colour. In a source signal there is often a small amount of noise which tends to hide contouring between picture areas where the luminance and colour-difference signals change by only one least significant bit (LSB). However, this noise is removed in the compression process for all but extremely low quantization factors. Under most normal operating conditions, i.e. at normal bit rates, each block in these inactive areas is coded without any AC coefficient, thus decoding into a block with constant luminance and colour-difference signals. A spatial low-pass filter is unable to eliminate this type of blocking artefact because there are no frequency components that the filter is able to remove, i.e. the output of the filter would change by the same LSB as the input. Therefore, the blocking artefact remains untouched by any such filter.
This problem exists in all block-based compression systems in which the video component signals are represented by less than 10-bit numbers, for example, MPEG-2, MPEG-4 part 2, MPEG-4 part 10 (main profile) and SMPTE 421M (VC-1) all use 8-bit numbers for luminance and chrominance signals. However, there are also differences in the compression algorithm itself which can have an effect on the visibility of posterisation effects. It has been found that in MPEG-2 and MPEG-4 part 2 systems, the problem is less severe than in more advanced coding algorithms, such as MPEG-4 part 10 and VC-1. The reason is that small inverse DCT inaccuracies, together with mismatch control algorithms, defined in MPEG-2 and MPEG4 part 2, reintroduce a small amount of noise in the decoded picture which tends to hide LSB block noise to a certain extent. Since the transforms and inverse transforms in MPEG-4 part 10 and VC-1 are exactly defined integer operations, the transforms with these systems do not suffer from DCT inaccuracies and there is, therefore, no need for mismatch control. Because MPEG4 part 10 and VC-1 have bit accurate inverse transforms, they are able to sustain many prediction generations without the need for intra-coded pictures. The disadvantage is that because there is no noise added in the decoding process, LSB noise is not hidden.
The present invention seeks to overcome the foregoing disadvantage with MPEG-4 part 10 and VC-1 coding systems.
According to a first aspect of this invention there is provided a method as claimed in claim 1 herein.
According to a second aspect of the invention there is provided an apparatus as claimed in claim 6 herein.
Preferred features of the invention are defined by the dependent claims.
The invention will now be described, by way of example, with reference to the accompanying drawings, in which:
It is known to hide contouring artifacts in images by adding a small amount of noise using a system known as “dither”. Dither is a well known signal processing technique used in both audio and video processing where the dynamic range of signal variables is lower than the perception of an observer/listener. Dither, in known systems, is employed in encoding a signal.
In distinction, the present invention is directed toward a decoded signal. A difficulty encountered with post-decompression is that if dither is applied, it is not readily possible to control the amount of dither. That is, it is not readily possible to decide where in an image, and under what conditions, a particular amount of dither noise should be added. It would be undesirable if a constant amount of dither noise is added, regardless of picture content and quantization factor.
In this invention, dither is to be applied only in areas with low spatial detail and only if a local quantization factor is above a predetermined threshold value. The local quantization factor is given to a macro block, i.e. a block of four 8×8 pixels. Thus, the dither amplitude depends upon the local quantization factor.
Whether or not dither should be applied, and the polarity of the dither signal, is controlled in such a way that a spatial average of the final output signal is a closer approximation to the mean value of the surrounding pixels than is the raw signal.
Referring now to
Considering the following matrix of 3×3 pixels.
where Sxx are surrounding pixels above, below, left and right of the currently processed pixel C.
From these signals the following intermediate variables are calculated which are 8-bit values of luminance.
Note that both Mean and P are floating point variables.
Thus, P is representative of the polarity of sample C in relation to the surrounding pixels and will be positive or negative.
In the foregoing example, the dither amplitude is fixed to be 1 LSB and may be positive or negative in dependence upon the surrounding pixels. The dither signal removes LSB noise. If the current pixel signal is within 1 LSB of the mean of the surrounding pixels, then P will represent the probability with which a dither correction should be applied. Further, the dither signal, if applied, should be equal to the value “sign”. However, the dither signal is only applied if the 3×3 block of pixels does not contain higher amplitude detail, i.e. max−min<3, indicating that there is a plain scene, e.g. sky and the difference in mean pixel luminance from pixel C luminance is small. The requirement is, further, that the quantization parameter must be higher than a predetermined threshold. These conditions ensure that dither noise is only applied in those picture areas where LSB noise would have been made visible.
It is this latter computation that is performed by the dither logic circuit 3 which then provides a video output signal Vop at terminal 5 given by
Vop=C+dither
Note that in order to reduce LSB block noise effectively, the algorithm described above should be applied to all three video component signals Y, Cr and Cb independently.
The computation performed by the dither logic circuit 3 is arranged to remove LSB block noise. However, those skilled in the art will understand that the thresholds and amplitudes defined above may be varied in such a way that higher amplitude block noise may be handled by a higher amplitude dither signal.
In
Alternative embodiments of the invention can be implemented as a computer program product for use with a computer system, the computer program product being, for example, a series of computer instructions stored on a tangible data recording medium, such as a diskette, CD-ROM, ROM, or fixed disk, or embodied in a computer data signal, the signal being transmitted over a tangible medium or a wireless medium, for example microwave or infrared. The series of computer instructions can constitute all or part of the functionality described above, and can also be stored in any memory device, volatile or non-volatile, such as semiconductor, magnetic, optical or other memory device.
Although the present invention has been described with reference to preferred embodiments, workers skilled in the art will recognize that changes may be made in form and detail without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
GB 0522486.0 | Nov 2005 | GB | national |