VIDEO CODING METHOD AND APPARATUS WITH PERIODIC REFRESH

Abstract: This invention concerns a method and apparatus for encoding data by predictive encoding and periodic refreshment of the data. The data is divided into segments and each segment of the data is either predictively encoded or is refreshed individually depending upon the history of predictions which were used to encode the segment. The large fluctuations in data rate associated with the transmission of digital television signals representing different types of picture are undesirable. The present invention provides a way of refreshing individual macro blocks of a picture by allocating a count (10) in memory to each macro block which is incremented (15) each time the segment is encoded. When the allocated count (10) reaches a predetermined value (11), the segment is refreshed (13) and the count is reset to zero (16).

Description: VIDEO CODING METHOD AND APPARATUS WITH PERIODIC REFRESH The present invention relates to a method and apparatus for encoding data by predictive encoding and periodic refreshment of the data. In the field of digital television signaling, it is already known to subject the digital signal to a number of digital compression techniques. Included amongst these techniques is that of predictive encoding. Conventionally, in this technique a continuous series of digitally coded pictures is transmitted including predicted pictures and reference pictures which refresh the entire picture. The reference pictures ensure that the decoded picture does not decay gradually in quality and permit the decoding of the signal to be started from a complete picture. The frames which are coded predictively normally represent predicted differences in pictures and require less data to represent them in the encoding process as compared to the reference pictures where the whole of the picture must be represented. The signal data rate from the encoding process is usually smoothed by using a buffer to produce a more even data rate. The large fluctuations in data rate associated with the transmission of the different types of picture are undesirable and requires, amongst other things, the use of a large buffer to smooth the output data flow to a steady stream. This results in a degree of latency being introduced which is undesirable in some applications. According to the present invention there is provided a method of encoding data by predictive encoding and periodic refreshment of the data, the method comprising; dividing the data into segments and predictively encoding or refreshing each segment individually depending upon the history of predictions which were used to encode the segment. Further according to the present invention there is provided apparatus for encoding data by predictive encoding and periodic refreshment of the data, the apparatus comprising means to divide the data into segments and means to predictively encode or refresh each segment individually depending on the history of predictions which were used to encode the segment. The invention will now be described, by way of example, with reference to the accompanying drawing which shows a block diagram of apparatus embodying the present invention. In a typical digital television broadcast system, the data that emanates from the encoder is a bit-rate reduced data stream. The format of the data stream has been subject to standardization by a working group which is known as the Moving Picture Experts Group (MPEG). The MPEG coding techniques include a compression algorithm based on discrete cosine transform (DCT), image segmentation where pictures are split into blocks of samples, motion estimation and compensation and predictive coding. Since temporal redundancy occurs between adjacent frames of television pictures, interframe compression calculates the differences between successive picture frames. The discrete cosine transformation is eventually carried out on blocks of picture elements, typically an array of 8 x 8 pixels. The blocks of information are grouped into macro blocks consisting of four blocks of luminance information so that each macro block is effectively 16 pixels x 16 lines of luminance values. The differences between successive picture frames are made on a macro block to macro block basis using motion compensation. Referring now to the drawing a digital encoder has two memories, A and B. The memories are arranged to store a count value for each macro block within a picture. The memories have means to pseudo-randomly initialise the count values to a value between 0 and a maximum value MAX. During the coding of a picture, the motion vectors used to motion compensate each macro block are also used to address the count value in memory A associated with each macro block used to predict the current macro block. There may be up to 4 values which are accessed by the motion vectors. From the memory A, the addressed count values are passed to a detector 10 which selects the maximum count value. The maximum count value from the detector 10 is supplied to a threshold circuit 11 which sets a flag in the event that the maximum count value has reached the preset value MAX. The flag is passed as an input to an OR gate 12 which responds by providing an indication that the current macro block requires to be refreshed. Refreshing means 13 in the encoder ensure that the macro block is refreshed within the video coding process. Another input to the OR gate 12 is provided to enable other processes within the overall video coding process to force the refreshing of the current macro block as indicated by the block 17. The output from the OR gate 12 is supplied as a control signal to a multiplexer 14. The multiplexer 14 receives as one input an incremental count from an incremental adder 15. The incremental adder 15 takes the maximum count value selected by the detector 10 and increments the maximum value by one. The incremental count from the adder 15 is output from the multiplexer 14 if the current macro block does not require refreshing. This is indicated by the control output from the OR gate 12. The incremental count value is entered in the memory B in a storage position associated with the current macro block being coded. Whenever the control signal supplied by the OR gate 12 indicates that the current macro block is to be refreshed, the multiplexer 14 is controlled to supply a value of zero from a reset block 16. The value zero is used to reset the count value for the current macro block in the memory B. The processing by the encoder continues until all the macro blocks in the current picture have been processed which implies that all the count values are either incremented by one in the memory B or reset to zero. Means are provided to transfer the updated count values in the memory B into the memory A so that the updated count values are available in time to process the macro blocks of the next picture. This process continues for each successive picture in the succession of pictures which are encoded by the encoder. In order to avoid a bunching of the macro blocks which are refreshed in response to the output from the OR gate 12, the logic within the block 17 may include means such as a pseudo-random number generator to supply signals to the OR gate 12 which affect the timing at which the macro blocks are refreshed. The OR gate 12 may thus be forced to supply an output at time when the threshold circuit 11 does not detect a count equal or exceeding the value of MAX. It is also contemplated that means may be provided to block the output from the OR gate 12 so that refreshing of the current macro block is delayed. The associated count stored in the memory B exceeds the value MAX plus one in this case. In one embodiment of the invention equal numbers of macro blocks may be refreshed in each frame. This may reduce the latency caused by large fluctuations in data rate. To achieve a regular refreshing pattern, it may be necessary to vary the value of MAX. However, care should be taken to ensure that MAX never exceeds a pre-determined limit, e.g. 15. Exceeding the limit may cause problems in channel switching and may also result in a reduction in picture quality. It will be seen that the encoder described can encode a succession of pictures in which the encoded data is compressed by predictive encoding and wherein the total picture area is divided into several tessellating picture areas that cover the entire picture area to be coded. Each one of these picture areas is allocated a count. On each new coding pass of a picture the count is incremented by 1. Whenever this count exceeds a predetermined value the picture area in question is refreshed and the count reset to zero. The counters may be individually initialised to any value less than the maximum. The counters can be over-ridden and forced to the maximum, thus making the next or current coding pass refresh that picture area. Most coding techniques use motion compensated prediction which means picture areas may be predicted from other areas in other pictures and it is possible for a picture area to have been repeatedly predicted from other areas that have not been refreshed for a considerable time. This will cause the picture quality to deteriorate and also prevent a decoder from being able to start the decode process in a deterministic manner. The described technique prevents this problem. On each new coding pass of a picture the count allocated to a picture area is the maximum of any of the count values associated with any picture area used in its prediction. The resulting value is then incremented and if this count exceeds the predetermined value MAX the picture area in question is refreshed and the count reset to zero. This technique guarantees that all parts of the picture will be refreshed in MAX + 1 pictures thus permitting a decoder to correctly decode the signal from any point in time. The picture will not deteriorate over time as all picture areas are guaranteed to be refreshed every MAX + 1 coding passes. Distortions will not propagate through the video sequence due to the motion compensated incrementing of the counters. This technique avoids the need for a periodic refresh of the entire picture area.

Claims: CLAIMS 1. A method of encoding data by predictive encoding and periodic refreshment of the data, the method comprising: dividing the data into segments and predictively encoding or refreshing each segment individually depending upon the history of predictions which were used to encode the segment. 2. The method as claimed in Claim 1 , applied to encoding data which represents digital video information. 3. The method as claimed in Claim 1 or 2, comprising allocating to each segment a count which is incremented each time the segment is encoded. 4. The method according to Claim 3, comprising refreshing each segment when the allocated count reaches a predetermined value. 5. The method according to Claim 4, further comprising refreshing one of said segments when the allocated count is less than said predetermined value. 6. Apparatus for encoding data by predictive encoding and periodic refreshment of the data, the apparatus comprising means to divide the data into segments and means to predictively encode or refresh each segment individually depending on the history of predictions which were used to encode the segment. 7. Apparatus according to Claim 6, adapted for encoding data which represents digital video information. 8. Apparatus as claimed in Claim 6 or 7, comprising means to allocate to each segment a count which is incremented each time the segment is encoded. 9. Apparatus according to Claim 8, wherein the means to predictively encode or refresh each segment is operable to refresh each segment when the allocated count reaches a predetermined value. 10. Apparatus according to Claim 9, comprising means to refresh one of said segments when the associate count in said memory is less than said predetermined value.

Inventors: TRIMBOY NEIL ADRIAN, TRIMBOY, NEIL, ADRIAN
Applicants: NDS LTD, TRIMBOY NEIL ADRIAN, NDS LTD., TRIMBOY, NEIL, ADRIAN
Application year: 1997
Main classification: H04N7
IPC codes: G06T9, H03M7, H04N7