The present application relates to a method for storing reference frames in a video coding system. More particularly, the present application outlines a system for compressing a reference frame when storing it in a reference frame buffer in such a way that parts of the reference frame may be accessed without the need for retrieving and decompressing the entire compressed structure from the buffer.
It is a fundamental aspect in video coding systems that temporal redundancy in video imagery can be removed by exploiting motion predictive coding. For that purpose, video coding standards including for example MPEG-4, H.263, H.261 and H.264 utilize an internal memory buffer to store previously reconstructed (reference) frames. Subsequent frames may be generated with reference to the changes that have occurred from the reference frame. The internal memory buffer in which reference frames are stored is frequently referred to as the “reference frames buffer”.
Supporting a certain number of reference frames is one of the limitations in the design of video coding systems because of internal memory requirements for the reference-frame buffer.
A known solution to this fundamental problem is to compress reference frames. In particular, it is possible to compress a reference frame after its reconstruction and store it in the reference frames buffer for subsequent use. When needed, a particular reference frame (or part of it) can be decompressed and employed for the motion predictive coding\decoding.
It will be appreciated that not all methods of data or image compression are suitable for this task. Methods such as Huffman data compression or JPEG image coding are complex by their nature and may demand significant computational resources, especially during the encoding process. Also, these methods provide variable compression rate depending on the amount of spatial redundancy in the encoded data and thus cannot guarantee that compressed structure will fit into the available memory. Finally parts of an encoded image in such methods cannot be accessed without decompression of the whole image. Since modern video coding systems are based on the concept of dividing an image into smaller blocks, called ‘macroblocks’, for encoding, having to decode an entire image to process an individual macroblock can be seen as quite a significant disadvantage.
As a result, the above compression methods are difficult to utilize in video coding systems as a method for reference compression.
Many researchers have attempted to reduce memory requirements for a video coding system. Current approaches to the problem are ranged from relatively simple methods, such as U.S. Pat. No. 5,825,424, where sub-sampling to a lower resolution or truncation of pixel values to a lower precision is used, to complicated techniques such as is described in U.S. Pat. No. 6,272,180, where the Haar block-based 2D wavelet transform is utilized.
For the compression systems mentioned above, achieving a constant compression rate for a reference frame in a video coding system introduces a drift, which reveals itself as a visible temporal cycling in reconstructed picture quality due to losses introduced at the decoding stage. While simple compression methods such as lower resolution sub-sampling, have the advantage of low computational complexity, they suffer from disadvantage of higher drift. Attempts to reduce the drift have lead to the elaboration of the method and therefore a significant increase in complexity, especially at the encoding stage.
The present application seeks to reduce memory requirements of the video coding system by exploiting a lossy data compression for reference frames stored in the reference frames buffer. The reference frame storage method presented herein has the advantage of relatively low drift that is particularly suited to hardware implementation within a video coding system. This allows for a system with low computational complexity, low drift and a constant compression rate of 50%. An important aspect is that the compressed reference frame may be accessed and decompressed without a need to retrieve and decompress the entire frame, which makes it particularly suitable for block-structured image data such as, for example, those utilized in video coding systems such as H.264, MPEG-4, H.263.
Accordingly, the present application provides for systems and methods as explained in the detailed description which follows and as set out in the independent claims, with advantageous features and embodiments set forth in the dependent claims.
The present application will now be described with reference to the accompanying drawings in which:
The embodiments disclosed below were selected by way of illustration and not by way of limitation. Indeed, many minor variations to the disclosed embodiments may be appropriate for a specific actual implementation.
A general structure of a reference frames memory (RFM) in the video coding system that may exploit the compression apparatus of the present application, as shown in
The frame compressor 1 processes a frame as a sequence of blocks of data 6 from a frame 5 and produces a corresponding sequence of blocks with a reduced block size 7. Thus in the illustrated example, each incoming block of 2×2 bytes is reduced into a block of 2×1 bytes (a byte pair) allowing the frame to be stored in a reduced size memory.
The reduction of block size is made by analysing the distribution of values within the data block and selecting a distribution pattern of two data values from the four data values of the block which may be used to represent the block. The distribution pattern is selected such that the optimum distribution pattern is selected from a plurality of pre-defined patterns. Once the optimum distribution pattern and the corresponding two data values have been selected for each 2×2 block, the pattern and data values are then encoded into a byte pair providing a compressed structure for the 2×2 block.
Byte pairs are stored in compressed frame memory 2. When a reference frame or part of a reference frame is required, a frame decompressor 3 decompresses the required byte pairs 7 into 2×2 reconstructed blocks. Reconstructed blocks are stored in the block memory 4 and eventually form the de-compressed frame or required part of the frame, which may be employed as a reference frame or part of a reference frame and may be employed conventionally within the video coding system. It will be appreciated that the term video coding system is used generally herein and may refer to a video encoding or a video decoding system.
Typically, reference frames are stored in the video coding systems in YUV colour space. The present application is suitable for but not limited to YUV. In YUV image compression each colour component (Y, U or V) has a fixed length, for example eight bits. Suitably, the encoding and decoding processes described herein are performed separately for each colour component, i.e. the Y, U and V are processed separately.
Quantization introduced in the compression process means that the colour samples of original block before encoding are not equal to the samples of a reconstructed block after decoding. However, as with other image compression techniques, this application exploits the fact that some losses are almost imperceptible to the human observer.
As illustrated in
The encoding process will now be described with reference to
During Pattern Decision ES1, possible losses from decompression are estimated through calculation of the distortion for each of seven pre-defined reconstruction patterns as shown in
First, during ES1 two colour samples are selected 8 as shown in
This process may be repeated for each pattern, when all patterns have been examined 14, the currently identified preferred pattern is selected as the final pattern for the block. The selected samples passed for Quantization ES2. If not all patterns were examined so far, then next pattern is selected 15. During the preferred pattern selection process in the event 13 that the distortion is measured as being at or below a minimum threshold (e.g. zero) for a pattern, this pattern may be selected as the final preferred pattern and distortion calculations for the remaining patterns negated as unnecessary.
Statistically, certain patterns are more likely to be identified as the preferred pattern, accordingly the encoding speed may be improved by examining the patterns in a most appropriate statistical order, namely when patterns are examined ranging from the most probable to the least probable. The examination order of the patterns illustrated in
The Byte Pairs Encoding process is illustrated in
During the quantization ES2, the number of bits needed to represent the colour component is reduced to allow for the pattern to be encoded within the compressed data. The data values may be reduced from 8 bits to 7 or 6 bits, depending on the selected pattern. Thus if the selected pattern is 3×16, then colour samples are quantized to 6 bits 18. For patterns 0-2, colour samples are quantized to 7 bits 17. The quantization is performed by eliminating the least significant bit or bits, e.g. by dividing the colour value by a quantization coefficient (2 or 4) as shown in
After the quantisation process has been completed, there is space in the byte pairs for mode bits insertion ES3 in
Specific mode bits placement is illustrated in
The decoding process is illustrated in
During DS1 primary bits 31 are extracted first 22, then if they both are ‘1’ 23, which indicates that 3× mode has been used, the secondary mode bits 32 are also extracted 24.
Then, the colour samples are de-quantized 25, 27, based on the primary mode bits. During DS2 the number of bits needed to represent the colour component is increased to 8 by multiplying a quantized value by de-quantization coefficient (left shifting by one or two bits), as shown in
Finally, at the DS3 step, the 2×2 blocks are reconstructed 26, 28 using the mode bits 31 and 32 (for 3× modes) as a pattern number plus de-quantized colour samples obtained previously on the step DS2, as shown in
Whilst the present application has been described with reference to an exemplary embodiment, these are not to be taken as limited and it will be appreciated that a variety of alterations may be made without departing from the spirit or the scope of the invention as set forth in the claims which follow.
| Number | Date | Country | Kind |
|---|---|---|---|
| 0802310.3 | Feb 2008 | GB | national |
| Filing Document | Filing Date | Country | Kind | 371c Date |
|---|---|---|---|---|
| PCT/EP09/51415 | 2/6/2009 | WO | 00 | 9/15/2010 |