DEVICE AND METHOD FOR RATE ADAPTATION BETWEEN BIT STREAMS
Field of invention
The invention relates to a connecting device, in particular to a connecting device sending and receiving bit streams of different rate.
Description of prior art
In the transmission of a data stream via a connecting device, the problem occurs that the physical data rate of a stream input to the connecting device and the physical data rate of a stream sent by the connecting device may be different, while the information transmitted via the input stream and the information transmitted by the output stream should be the same. To this end methods for rate adaptation using redundant bits have been developed. Such a method is described in the specification V.14 of the International Telecommunications Union - Telecommunications (ITU-T) dating from March 1993. According to this specification detectable redundant bits, so called stop bits are inserted into an input stream by a rate adaptation device. An output stream of higher rate than the input stream is transmitted by the rate adaptation device, the output stream comprising the detectable redundant bits. When the output stream is received by a further device, the redundant bits can be detected and the relevant information can be reconstructed. Accordingly, if the output stream is transmitted with a lower rate than the input stream, the input stream has to comprise detectable redundant bits. The rate adaptation device removes the redundant bits from the input stream and sends an output stream comprising the relevant information that has been transmitted by the input stream.
To detect the redundant bits in the input stream respectively to insert the redundant bits in the output stream, the input stream has to be continuously monitored, which is a method consuming large resources of processing power.
Summary of the invention
It is object of the invention to provide a connecting device for rate adaptation between a first and a second bit stream that saves resources of processing power. This object is solved by the connecting device of claim 1, the Media Gateway of claim 8, the method of claim 9 and the computer program of claim 10. Advantageous embodiments are described in the dependent claims.
According to the present invention a connecting device receives a first bit stream of a first rate and sends a second bit stream of a second rate. The first rate differs from the second rate. The connecting device comprises a buffer and a rate adaptation device. The connecting device is operable according to a first and a second mode of operation. In the first mode of operation the buffer receives the first bit stream as an input and sends the second bit stream as an output. In this first mode of operation the difference between the first and the second rate causes a change of a fill level of the buffer. In the second mode of operation the buffer and the rate adaptation device are connected in a serial connection receiving the first bit stream as an input and sending the second bit stream as an output. In the second mode of operation the input rate and the output rate of the buffer differ in a way that causes a change of the fill level of the buffer in an opposite direction than the change of the fill level in the first mode of operation.
In an advantageous embodiment of the invention a first threshold value indicating a high fill level and a second threshold value indicating a low fill level are defined for the buffer. The buffer comprises means for detecting a fill level of the buffer that triggers a switch between the modes of operation if the fill level of the buffer reaches the first or the second threshold value.
A switch between the first and the second mode of operation is made if the fill level of the buffer reaches the first respectively the second threshold value.
By this it is ensured that the buffer does not receive data that cannot be stored by the buffer and it is insured that the buffer stores enough data to be able to send data in an uninterrupted stream.
In an embodiment of the connecting device the first rate is higher than the second rate and in the second mode of operation the input rate of the buffer is lower than the output rate of the buffer.
In an embodiment of the connecting device the rate adaptation device receives a stream comprising detectable redundant bits and the rate adaptation device removes at least a portion of the redundant bits. By this the relevant information transmitted by the second bit stream is not changed.
In another embodiment of the connecting device the first rate is lower than the second rate and in the second mode of operation the input rate of the buffer is higher than the output rate of the buffer.
In an advantageous embodiment of the connecting device the rate adaptation device sends a stream comprising detectable redundant bits inserted by the rate adaptation device. By this the relevant information transmitted by the second bit stream can be reconstructed easily.
The first or the second bit stream can be a synchronous bit stream.
In an embodiment of the invention a Media Gateway comprises a connecting device as described above.
The present invention provides a method for controlling a connecting device. This connecting device receives a first bit stream of a first rate and sends a second bit stream of a second rate wherein the first rate differs from the second rate. The connecting device comprises a buffer and a rate adaptation device. For the buffer a first threshold value indicating a high fill level and a second threshold value indicating a low fill level are defined. The buffer comprises means for detecting a fill level. The connecting device is
operable according to a first and a second mode of operation. In the first mode of operation the buffer receives the first bit stream as an input and sends the second bit stream as an output and the difference between the first and the second rate causes a change of a fill level of the buffer. In the second mode of operation the buffer and the rate adaptation device are connected in a serial connection receiving the first bit stream as an input and sending the second bit stream as an output. In the second mode of operation the input rate and the output rate of the buffer differ in a way that causes a change of the fill level of the buffer in an opposite direction than the change of the fill level in the first mode of operation. The method of the invention comprises the steps of detecting that the fill level of the buffer has reached the first or the second threshold value and changing in response to the detecting the mode of operation from the first to the second mode or vice versa.
According to an aspect of the invention a computer program controls a connecting device in a way that it performs the method described above.
Brief description of the drawings
The following figures show:
Fig. 1. depicts a source device and a destination device connected by a connecting device that is operated according to a first mode of operation.
Fig. 2. depicts the source device, the destination device and the connecting device connecting the source and the destination device, wherein the connecting device is operated according to a second mode of operation.
Detailed description of embodiments
In the following the invention is described in more detail by means of embodiments and figures. Equal reference signs indicate equal elements.
Figure 1 depicts a source device 1 sending a first bit stream of a first rate to a connecting device 8. Furthermore figure 1 depicts a destination device 5 receiving a second bit stream of a second rate from this connecting device 8. The first and the second rate are different. The first stream is received by the connecting device 8 via a first link 2 and the second stream is sent by the connecting device 8 via a second link 6. In the context of a telecommunication network the source device 1 and the destination device 5 can be e.g. a modem or a mobile station and the connecting device can be comprised in a Media Gateway. The first and the second bit stream comprise the same relevant information. Additionally the first and the second bit stream can comprise detectable redundant bits. The first and the second bit stream can be synchronous bit streams.
The connecting device is operated in a first mode of operation, in which the first bit stream is received by a buffer 4, the data comprised in the first bit stream is stored by the buffer 4 and the second bit stream is output of the buffer 4. The fill level of the buffer 4 changes continuously according to the difference between the first and the second rate. I.e. if the first rate is higher than the second rate the fill level is continuously rising and if the first rate is lower than the second rate the fill level is continuously falling. To compensate the change of the fill level of the buffer 4 during the operation according to the first mode, a second mode of operation of the connecting device exists, that will be explained in more detail in the description of figure 2.
The switch between the first and the second mode of operation can be based for example on a predefined time scheme or on counters. Alternatively the switch can be based on the fill level of the buffer 4. In this case for the buffer 4 a first threshold value 7 indicating a high fill level and a second threshold value 3 indicating a low fill level can be defined. Furthermore the buffer can comprise means for detecting a fill level of the buffer that triggers a switch between the modes of operation if the fill level of the buffer 4 reaches the first 7 or the second threshold value 3.
To be more precise, if the first rate is higher than the second rate and the fill level of the buffer 4 is continuously rising in the first mode of operation, a switch from the first to the
second mode of operation is made if the fill level has reached the first threshold value indicating a high fill level. By this the situation is avoided that the buffer 4 receives data exceeding the capacity of the buffer 4 (overflow).
In the alternative case in which the first data rate is lower than the second data rate and the fill level is continuously falling in the first mode of operation, a switch from the first to the second mode of operation is made if the fill level reaches the second threshold value 3 indicating a low fill level. By this the situation can be avoided that the buffer 4 is running empty (underflow).
Figure 2 depicts the source device 1, the first link 2, the connecting device 8, the second link 6 and the destination device 5 of figure 2 with the difference that the connecting device 8 is operated according to a second mode of operation. Elements that are equal to the elements depicted in figure 1 are indicated by the same reference signs as in figure 1 and will not be described newly.
In addition to the elements shown in figure 1 figure 2 depicts a rate adaptation device 9 connected in a serial connection with the buffer 4 via the connection 10. In figure 2 the rate adaptation device 9 and the buffer 4 are ordered such that the buffer 4 is arranged upstream in relation to the rate adaptation device 9. However in an alternative embodiment of the invention the buffer 4 could be arranged downstream in relation to the buffer. In the embodiment of figure 2 a third stream of a third rate is output by the buffer 4 and transmitted via the connection 10 to the rate adaptation device 9.
In the second mode of operation of the connecting device 8 the input rate and the output rate of the buffer are chosen such that the difference between the input rate and the output arte of the buffer causes a change of the fill level in the opposite direction than the change of the fill level in the first mode of operation.
To be more specific, if the first rate is higher than the second rate and the fill level of the buffer is rising in the first mode of operation, then in the second mode of operation the input rate of the buffer has to be lower than the output rate of the buffer, such that the fill
level of the buffer is continuously falling. In the embodiment of the invention that is depicted in figure 2 this can be achieved by choosing the third rate such that it is higher than the first rate. In the alternative embodiment in which the buffer 4 is arranged downstream in relation to the rate adaptation device 9, the input rate of the buffer had to be chosen such that it is lower than the second rate.
In both cases the rate adaptation device has to compensate the rate difference between an input rate that is higher than the output rate. This can be achieved by the removal of detectable redundant bits by the rate adaptation device, wherein the detectable redundant bits have been comprised in the third bit stream. To this end a method for removing stop bits according to the specification V.14 of the International Telecommunications Union - Telecommunications (ITU-T) can be used. This method comprises the conversion of a synchronous bit stream input to the rate adaptation device to an asynchronous bit stream and the conversion of this asynchronous bit stream to a synchronous bit stream output by the rate adaptation device.
In the embodiments of the invention in which the fill level of the buffer is rising in the first mode of operation and the fill level of the buffer is falling in the second mode of operation, a switch from the first to the second mode of operation is made if the fill level of the buffer reaches the first threshold value 7 indicating a high fill level. By this the situation is avoided that the buffer 4 receives data exceeding the capacity of the buffer 4 (overflow). Accordingly in these embodiments a switch from the second to the first mode of operation is made if the fill level of the buffer reaches the second threshold value 3 indicating a low fill level. By this the situation is avoided that the buffer 4 is running empty (underflow).
If the first rate is lower than the second rate and the fill level of the buffer is falling in the first mode of operation, then in the second mode of operation the input rate of the buffer has to be higher than the output rate of the buffer such that the fill level of the buffer is continuously rising. In the embodiment of the invention that is depicted in figure 2 this can be achieved by choosing the third rate such that it is lower than the first rate. In the
alternative embodiment in that the buffer 4 is arranged downstream in relation to the rate adaptation device 9, the input rate of the buffer had to be chosen such that it is higher than the second rate.
In both of these cases the rate adaptation device has to compensate the rate difference between an input rate that is lower than the output rate. This can be achieved by the insertion of detectable redundant bits by the rate adaptation device. To this end a method for insertion of stop bits according to the specification V.14 of the International Telecommunications Union - Telecommunications (ITU-T) can be used. This method comprises the conversion of a synchronous bit stream input to the rate adaptation device to an asynchronous bit stream and the conversion of this asynchronous bit stream to a synchronous bit stream output by the rate adaptation device.
In the embodiments of the invention in which the fill level of the buffer is falling in the first mode of operation and the fill level of the buffer is rising in the second mode of operation, a switch from the first to the second mode of operation is made if the fill level of the buffer reaches the second threshold value 3 indicating a low fill level. By this the situation is avoided that the buffer 4 is running empty (underflow). Accordingly in these embodiments a switch from the second to the first mode of operation is made if the fill level of the buffer reaches the first threshold value 7 indicating a high fill level. By this the situation is avoided that the buffer 4 receives data exceeding the capacity of the buffer 4 (overflow)