BUFFER CONTROL IN A CODED DATA TRANSMISSION SYSTEM

Abstract: According to one aspect of the present invention there is provided a method of changing the throughput of data in a digital data transmission system, comprising, monitoring the rate of data input to an encoder buffer to determine the decoder buffer requirements downstream; and controlling the encoder buffer in response to the monitoring step such that a change in the rate of data output from the encoder is lagged by a predetermined time period from any change in rate of data input to the encoder buffer. This predictive technique achieves the requirement of instantly changing bitrate in a seamless manner. A seamless bitrate change implies that there is no break in the decoding of the bitstream at the receiver, and also no abnormal artefacts at the receiver. Therefore to change bitrate seamlessly the receiver buffer should not be overflowed or underflowed, and the time stamp offset in the bitstream (the rate buffer delay) should remain constant so that the receiver need not gain or skip frames.

Description: BUFFER CONTROL IN A CODED DATA TRANSMISSION SYSTEM This invention relates to improvements in data transmission, particularly in the transmission of digitally encoded data. A typical system for transmitting and/or receiving digital data may allow several video, audio and associated services to be multiplexed, sent over a single digital transmission channel, received and subsequently decoded. This is the type of system which might operate under the MPEG II standard. The number of services and hence the cost of transmission bandwidth per service is determined by the bitrate. Any improvement in picture quality or reduction in bitrate is thus very important to a service provider. Improvements in bitrate and quality have been achieved using a Statistical Multiplexing approach as is described in our co-pending application GB9517130.2. In this application the bitrate of data through individual channels or encoders is varied depending on the overall resources available to the system as a whole. By grouping encoders together in "Stat Mux groups",_and making real time decisions about the bitrate requirements for those encoders, bitrate can be allocated to maximise picture quality for the group. Clearly if the bitrate is continually changing the management of data storage in buffers at both transmitter and receiver ends is important. The storage buffers are found either just after the encoder or just before the decoder. One of the main problems which is encountered with the present systems, either in fixed mode or Statistical Multiplexing mode, is the problem of changing the bitrate. Typically when systems attempt to change the bitrate there is either an increase or decrease of the data rate This change in data rate can result in either an overflow or underflow of the decoder buffer, which can cause problems in the receiver in the production of a picture The present invention addresses the problems of managing the data within encoder and decoder buffers for systems that are operating both in Statistical Multiplexing mode or in standard fixed bitrate, variable quality mode In particular the invention deals with the problems of changing the bitrate of the system whilst preserving picture quality, and preventing decoder buffer overflow and underflow. According to one aspect of the present invention there is provided a method of transmitting data in a digital data transmission system, comprising, monitoring the rate of data input to an encoder buffer to determine the decoder buffer requirements downstream form the encoder buffer, and controlling the encoder buffer in response to the monitoring step to delay a change in the rate of data output from the encoder by a predetermined time period relative to any change in rate of data input to the encoder buffer This predictive technique achieves the requirement of instantly changing bitrate in a seamless manner A seamless bitrate change implies that there is no break in the decoding of the bitstream at the receiver, and also no abnormal artefacts at the receiver Therefore to change bitrate seamlessly the receiver buffer should not be overflowed or underflowed, and the time stamp offset in the bitstream (the rate buffer delay) should remain constant so that the receiver need not gain or skip frames. Advantageously the output of data is delayed by a time period dependant on the time taken for the data to enter the encoder and leave the decoder buffers. In a preferred example this time period is set to the time stamp of the decoder. According to a second aspect of the present invention there is provided apparatus for transmitting data in a digital data transmission system, comprising monitoring means for monitoring the rate of data input to an encoder buffer to determine the decoder buffer requirements downstream of the encoder buffer; and a controller for controlling the encoder buffer in response to the monitoring step to delay a change in the rate of data output from the encoder by a predetermined time period relative to any change in rate of data input to the encoder buffer. Reference will now be made, by way of example, to the accompanying drawings, in which: Figure 1 is a schematic diagram of a broadcasting system according to the invention; Figure 2 is a diagram of encoder and decoder buffers; Figure 3 is a diagram for illustrating the features of the encoder buffer; Figure 4 is a diagram for illustrating how to achieve seamless bitrate changes according to a first embodiment of the present invention; Figure 5 is a diagram for illustrating buffer management in a statistical multiplexing system; Figure 6 is a diagram for illustrating the effect on buffer occupancy of different frame types; Figure 7 is a graph for showing the relationship between the encoder pre-quantisation scaling parameter and linear quality; and Figure 8 is a diagram for illustrating how to achieve seamless bitrate changes according to a second embodiment of the present invention. The broadcasting system is illustrated in Figure 1 and includes a statistical multiplexing system 10. The statistical multiplexing system may be as described in the above mentioned co-pending application or may be any other type of statistical multiplexing system. A signal 12, such as a video signal is encoded by one of a plurality of encoders 14 and passes through the statistical multiplexing system and a transmission signal 16 is generated. Typically the video signal will be compressed by the encoder The transmission signal is then transmitted to a receiver 18 where it is decoded back into a video signal by one of a plurality of decoders 20. This video signal may then either be displayed for viewing or re-transmitted to another receiver, if necessary. In the figure 1 system, the transmission from the transmission end to the receiver end is via a satellite 22. Clearly other means of transmission could be used in place of satellite transmission. The encoders and decoders each include a buffer 13 and 23 respectively which are described in greater detail below. The system in figure 1 shows a statistical multiplexing (Stat Mux) system. However, it is to be understood that in certain circumstances the user may not wish to operate the broadcasting system in a 'Stat Mux' mode, but in a fixed mode. It is possible to operate the system in either mode as is clear from below. An MPEG receiver or decoder buffer is limited to 1.8Mbits or greater in size. This rate buffer can sustain a certain amount of bitrate variation. However it cannot support an unlimited variation of bitrate without an underflow or overflow occurring in the decoder buffer. The present invention provides a technique for improving the range of seamless bitrate changes by managing the encoder rate buffer so that the receiver buffer limits are not infringed. Figure 2 shows the encoder and decoder rate buffers 24 and 27 respectively. As previously mentioned the MPEG standard specifies that the maximum receiver rate buffer size is 1.8 Mbit. In order to prevent underfiowing or overflowing of any receiver fitted with an MPEG standard decoder buffer the encoder must also assume the maximum rate buffer of 1.8Mbit. The encoder buffer itself comprises two parts, a rate buffer 25 and a storage area 26 below the rate buffer. This storage area is referred to herein as the stuffing buffer and has an upper level which is referred to as the stuffing level. The stuffing level is equivalent to the virtual floor of the rate buffer which will be described in greater detail below. The rate buffer is the part of the encoder buffer used to smooth the arrival of data. In the case of compressed video data the data arrives at a 'bursty' rate. The rate buffer is provided in the encoder to smooth this bursty data into a near constant stable output bitrate. A feedback mechanism exists from the rate buffer to the video compressor (not shown), such that if more data passes into the buffer than is leaving then the buffer fills. As the rate buffer fills a higher quantisation factor Q P is selected. The effect of this is that less data passes into the rate buffer. A mapping then takes place between the encoder rate buffer occupancy and the quantisation factor. The higher the occupancy, the higher is the mapping. Thus when the rate buffer is empty the lowest quantisation factor of 1 is selected and when the rate buffer is full the highest quantisation factor is selected. Transferring compressed data from the input of the encoder buffer to the point where it is extracted from the decoder buffer takes a specific length of time. This time is known as the dt s delay and is forced by the timestamping. The timestamp is associated with a given frame of data and is used by the receiver to identify which frame should be removed from the decoder buffer and decompressed next. The decoder time stamp is selected such that the amount of data in the system is split between the encoder and decoder buffers. The total amount of data in the encoder and decoder buffers is given by: total data = dt s delay x bitrate 1 A reciprocal relationship exists between the occupancy of the encoder rate buffer and the decoder rate buffer. As the encoder rate buffer fills the decoder rate buffer empties and vice versa. Thus the maximum size of the encoder rate buffer is the same as that of the decoder buffer, to prevent overflow and underflow at the receiver. The total amount of data in the system at any point in time can also be expressed in terms of the amount and type of buffer capacity. In other words the total amount of data is equal to the buffer space available in both the rate buffer and the so called stuffing buffer, i.e.: total data = stuffing buffer capacity + rate buffer capacity Since the rate buffer capacity is equal to 1.8Mbit in an MPEG II compatible system: total data = stuffing buffer capacity + 1.8Mbit 2 1 into 2 gives: stuffing buffer capacity = (dt s delay x bitrate) - 1.8Mbit The value of dt s delay can be varied by the user or by a control computer within the system, however it is preferred that this variable is left unchanged. Accordingly in order to change the bitrate it has been determined that it is necessary to alter the stuffing buffer capacity. The ability to change the bitrate from one value to another has long been sought. The present invention provides a so called seamless bitrate change which has the following features. a) A change of bitrate that does not result in a crash (underflow or overflow) of the receiver; b) A bitrate change that does not modify the dt s delay i.e. the timestamp offset on the video, so that the receiver need not gain or skip frames; and c) A bitrate change that does not result in excess encoding artefacts. Seamless bitrate changes can be achieved either instantly or over a period of time and the range of an instantaneous bitrate change can be calculated. For a given encoder rate buffer size, dt s delay and stuffing buffer size the instantaneous maximum bitrate that can be determined: _ RATE BUFFER SIZE + STUFFING BUFFER SIZE BITRA TE MAXI msτ 3 The minimum bitrate that can occur instantaneously is dependant on the encoder buffer occupancy. The more data in the encoder buffers, the higher the minimum bitrate. The minimum bitrate is given by: Encoder Occupancy dt s This describes the lowest bitrate that can be achieved instantly and does not cause underflow of the receiver buffer. To achieve bitrates outside of these instantaneous ranges defined above, gradual bitrate changes can be used in which the bitrate change takes place in finite steps. From formula 3 and given that dt s delay is fixed, rate buffer size is limited to a maximum of 1.8M bit, then: 1.8 x 10 C + STUFFING B UFFER SIZE BITRATE MAX , = If the capacity of the stuffing buffer is increased then higher maximum bitrates can be achieved. In practice the capacity of the stuffing buffer can be increased without limit at a rate of 100 Kb its/frame. It will be appreciated that other rates may also be used depending on the system requirements. The mechanism for increasing the stuffing buffer capacity is shown with reference to Figure 3. The encoder buffer 24 includes the two sections previously identified, namely the rate buffer 25 and the 'stuffing buffer' 26. The encoder rate buffer is provided with a virtual floor 54 and ceiling 56. The whole of the rate buffer is typically fixed in absolute size, but is capable of sliding up and down within the encoder buffer itself. Sliding the rate buffer 25 gradually upwards, simultaneously increases the bitrate of the channel. This sliding up of the rate buffer forces more data into the encoder buffer because the quantisation factor Q P recedes naturally for a given occupancy as the rate buffer slides up. Figures 4a τ 4b, 4c and 4d illustrates one embodiment for carrying out the function of the seamless bitrate change. For the purposes of this explanation it is assumed that the rate of data in is equal to the rate of data out. It will of course be appreciated that this may not be the case, since neither the receiver buffer limits and their effects, or the effect of the quantisation factor on data in are being taken into consideration. In figure 4a normal levels of the rate buffer (RB) and stuffing buffer (SB) are shown. The data is at a quantisation factor of Q a within the rate buffer. If the incoming data changes it may be necessary to transmit data to the decoder at a higher bitrate. If this higher bitrate is greater than that which can be achieved instantly, then it will be necessary to increase the capacity of the stuffing buffer. If this is the case, the rate buffer slides up the encoder buffer, thereby increasing the capacity of the stuffing buffer. Since in this example the data level remains unchanged, the effect of this is that the quantisation factor will lower. In other words Q a > Q b , although the total amount of data in the system is the same. As the requirements for still higher bitrates occur the rate buffer slides still further up the encoder buffer, making the stuffing buffer still larger If the rate of data in and out remains the same, Q a > Q b > Q c If the bitrate requirements drop, then the rate buffer can gradually slip down to be in the position shown in Figure 4d Here the quantisation factor Q d of the data is very high Simultaneously bitrates lower than those that can be achieved instantly can be selected by decreasing the stuffing buffer to a minimum of 0 After this still lower bitrates can be achieved by reducing the size of the rate buffer to less than 1 8 Mbits. An example of the possible variations is shown below with respect to figure 3, where. 1800000+ 200000 Max Inst Bitrate- Λ 2000000 0.5 If an instantaneous bitrate change to 8 Mbits were required this could be achieved from a bitrate of 2000000 bits/s in steps of 100 Kb/frame i.e 6000000/100000 i e 60 steps in 60 frame periods. A bitrate of 8 Mbits/s would require a stuffing buffer given by stuffing buffer = bitrate x d ts -delay = rate buffer + (8000000 + 0.5) - 1800000 = 2.2 Mbits. The lowest possible bitrate is dependant on what size rate buffer is felt to be acceptable but typically 0 5 Mbits should be acceptable Therefore for the above example the minimum rate buffer = 0.5 Mbit and minimum stuffing buffer = 0 Mbits In a fixed rate system the buffer management must be taken into account to ensure that the system operates satisfactorily. The major features which must be taken into account are as follows: the fact that the decoder buffer has a finite size; a seamless bitrate change is required (i.e. no visual effect or decoder crash); and since I frames generally generate large amounts of data, to prevent multiple changes of Q p (the encoder pre-quantisation scaling parameter) within a single I frame the encoder is allowed to fill. If this latter point is not taken into consideration, subjectively poor results often result. In a Statistical Multiplexing (Stat Mux) system, the buffer time delay is generally already allocated and cannot be varied or controlled for buffer management purposes. The Stat Mux system will initialise the buffer levels in such a way that it is able to jump equally well to higher or lower bitrates and still retain adequate data to be able to smooth I frames. It is necessary to balance the bitrate swing with the I frame smoothing. In addition it is preferable to have as little data as possible stored in the encoder, since residual data in the encoder can also inhibit the bitrate swing. Typically about 0.6Mbit are required for I frame smoothing and accordingly the decoder should be split and the decoder buffer level centred at that point. Thus a Stat Mux system with a 2 Mbit decoder buffer would be initialised with a decoder level of 1.3Mbit. The bitrate that creates this initial level will be determined by the Multiplexer code. Assuming the buffer delay is fixed by time stamping then the decoder and encoder levels can be calculated. For example, in a system in which the Stat Mux computer decides that 8Mbit/s is the best estimate for bitrate and T is 0.2s, then the buffer levels would be as shown in Figure 5. The bitrate B could jump from a maximum bitrate of 11.5Mbit/s to a minimum of 4.5Mbit/s as is described above. After each adjustment of the bitrate the value of Q p must be reallocated, since each bitrate adjustment must be assumed to be the last. This must be done to ensure that during I frames the encoder buffer does not overfill causing the decoder to empty. By following the technique detailed above it is possible to ensure that bitrate does not fall to a level at which the new maximum encoder data level (Q p = 31) becomes lower than the current data level. If this were to happen then the integrity of the data would be at risk. A second embodiment of the present invention is now described with reference to figure 8. As in the previous embodiment the encoder buffer 80 includes two parts. These are the rate buffer 82 and a variable or stuffing buffer 84. Also indicated on the diagram are the bitrates A, B, and C at various points in the encoder buffer. Bitrate A is the bitrate of data entering the encoder or rate buffer, bitrate B is the bitrate from the rate buffer to the variable buffer and bitrate C is the bitrate leaving the encoder or variable buffer. The encoder buffer is controlled such that the amount of data leaving the rate buffer is always equal to the amount of data entering the rate buffer. In other words bitrate A is equal to bitrate B. As with previous embodiments of the invention it is not possible to know how the bitrate into the encoder buffer changes with time It will be dependant on the type of material being transmitted or broadcast. Accordingly, bitrate A is always changing and so therefore is bitrate B. The changes made to bitrate B occur instantly as bitrate A changes in dependence on the source of the material broadcast. In order to ensure that the decoder or receiver buffer 90 does not underflow or overflow bitrate C cannot change instantly in dependence on bitrate A and/or B. If it did there would be a good chance that the decoder would either overfill or underfill, in either case causing the decoder to fail. Bitrate C must be controlled to ensure that there is not too much or too little data transmitted to the receiver buffer In the present embodiment this is done by delaying the change in bitrate of C. A typical delay implemented would be the time stamp period dt s . In other words bitrate C lags bitrate A (or B) by one time stamp period. As previously described the time stamp period is the time from which the data is 'inserted' into the encoder buffer, to the time it is 'removed' from the decoder buffer for decoding. In other words the time stamp delay is the total time the date is in the system illustrated herein. By lagging the change of bitrate C by this delay a very steady level of data is established in the decoder buffer and the likelihood of overfill or underfill is zero Since I frames tend to create more data than either B or P frames, they tend to cause the encoder buffer level to rise. Accordingly it is possible that the system would try to change the value of Q p throughout the I frame. This would result in poorer picture quality at the lower part of the screen and subjectively worsening outputs Accordingly, the present invention establishes a predictive track which aims to keep Q p the same and brings the encoder buffer back to a given point across an entire group of pictures. The predictive track results in a triangular waveform for the encoder buffer occupancy, which is shown in Figure 6. The solid line shows the target track and the two dotted line show higher and lower Q p tracks. If the level strays from the target compensation can be made and the target re-established. This tracking scheme for calculating Q p suits both Stat Mux and fixed rate systems. The scheme handles the stabilisation of Q p within a frame, allowing the Stat Mux to stabilise Q p across multiple frames. Having identified the value of Q p at various points it is possible to estimate the linear quality Q A which is a vital requirement in a Stat Mux system. The relationship between Q p and Q A is shown in the graph of Figure 7. It should be noted that in the present system there are more than one pair of encoders and decoders and that each pair may be operated as described above. In the preferred system, when operating in Stat Mux mode, the operation of one pair of encoder and decoder buffers may be influenced by operation of another pair. This may be particularly the case when the two pairs are in the same Stat Mux group and bitrate is restricted. In the present system the main controlling factor on operation of the system is the fact that the incoming data is the driving force. The system works on a predictive basis and adjustments are made in response to the incoming data and the prediction of what will occur downstream. All data input into the system must be managed and caused to pass therethrough with the minimum degradation of quality At the decoder end there is a finite restriction for space and it is essential in the present invention to deal with the problems this may create before the system collapses This means that the system is capable of predicting the problems which will result at the receiver end and manipulate the data in the transmitter end in such a way that the problems are prevented In other words the system can operate as an open loop system By predicting the value of Q P of the video signal being provided to the encoder it is possible to estimate whether the decoder buffers are going to experience underflow or overflow If either are likely to happen the encoder data is manipulated in such a way that the expected underflow or overflow are prevented It should be noted that the data referred to throughout the above description, is video type data and includes headers and footers which are commonly associated with that data The other data which would normally be transmitted has not been described in great detail This data includes audio, synchronisation information and other data as will be apparent to the skilled person This data will be transmitted in the normal way The above described techniques provide seamlessly changing bitrates in an MPEG video encoder across an unlimited range of values A narrow range of bitrates can be achieved instantly using a control computer such as the MCC (Multiplex Control Computer) or the like and a wider range that are not instant rely on having a variable size stuffing buffer and a movable rate buffer The non instant bitrate changes rely on the bitrate being changed incrementally and also an accompanying incremental adjustment to the stuffing buffer.

Claims: CLAIMS 1 . A method of transmitting data in a digital data transmission system, comprising: monitoring the rate of data input to an encoder buffer to determine the decoder buffer requirements downstream from the encoder buffer; and controlling the encoder buffer in response to the monitoring step to delay a change in the rate of data output from the encoder by a predetermined time period relative to any change in rate of data input to the encoder buffer. 2. The method of claim 1 , further comprising delaying the output of data by a time period dependant on the time taken for the data to enter the encoder and leave the decoder buffers. 3. The method of claim 2, further comprising setting the predetermined delay to the time stamp of the decoder. 4. The method of any preceding claim, further comprising providing the encoder buffer with at least a first portion and a second portion, the first one of which is substantially fixed in size. 5. The method of claim 4, further comprising providing the second portion of variable size. 6. The method of claim 4 or claim 5, further comprising transferring data from the first portion to the second portion. 7. The method of claim 6, further comprising changing the rate of data flow from the first portion to the second portion in dependence on the change in rate of data input to the encoder buffer. 8. The method of any preceding claim, further comprising transmitting data from the encoder buffer to the decoder buffer. 9. The method of any preceding claim, further comprising providing the system as a broadcasting system. 10. The method of claim 9, further comprising providing the broadcasting system having a statistical multiplexing capability. 1 1 . Apparatus for transmitting data in a digital data transmission system, comprising: monitoring means for monitoring the rate of data input to an encoder buffer to determine the decoder buffer requirements downstream from the encoder buffer; and a controller for controlling the encoder buffer in response to the monitoring step to delay a change in the rate of data output from the encoder by a predetermined time period relative to any change in rate of data input to the encoder buffer. 12. The apparatus of claim 1 1 , wherein the output of data from the encoder buffer is delayed by a time period dependant on the time taken for the data to enter the encoder and leave the decoder buffers. 13. The apparatus of claim 12, wherein the time period is set to the time stamp of the decoder. 14. The apparatus of any of claims 11 to 13, wherein the encoder buffer comprises at least a first portion and a second portion, the first one of which is substantially fixed in size. 15. The apparatus of claim 14, wherein the second portion is of variable size. 16. The apparatus of claim 14 or claim 15, wherein data is transmitted from the first portion to the second portion. 17. The apparatus of claim 16, wherein the change in the rate of data flow from the first portion to the second portion is directly dependant on the change in rate of data input to the encoder buffer. 18. The apparatus of any preceding claim, wherein data is transmitted from the encoder buffer to the decoder buffer. 19. The apparatus of any preceding claim, wherein the system is a broadcasting system. 20. The apparatus of claim 19, wherein the broadcasting system has a statistical multiplexing capability.

Inventors: BUDGE MICHAEL RICHARD JOSEPH, JORDAN JOHN, BUDGE, MICHAEL, RICHARD, JOSEPH, JORDAN, JOHN
Applicants: BUDGE MICHAEL RICHARD JOSEPH, JORDAN JOHN, NDS LTD, BUDGE, MICHAEL, RICHARD, JOSEPH, JORDAN, JOHN, NDS LIMITED
Application year: 1997
Main classification: H04N7
IPC codes: H04J3, H04L13, H04N7