Jitter buffer management

A sample jitter buffer manager more or less aggressively conserves (rations) or discards data in a jitter buffer, based on the fluctuating amount of data in the jitter buffer. The jitter buffer manager counts, provides, discards and/or otherwise manages individual sample data units, rather than entire packets. Normally, enough data is removed from the jitter buffer to fill a data packet for a receiver. However, if the amount of data in the jitter buffer is low, less data is removed from the jitter buffer and placed into the packet, and the remainder of the packet is filled with duplicates of some of the data in the packet or in the jitter buffer. As the jitter buffer fills beyond a useful level, the jitter buffer discards progressively larger amounts of data, without necessarily discarding one or more entire packets. This fine-grained management of the amount of data in the jitter buffer maintains a buffer size that can provide a steady stream of packets to the receiver, without significantly impacting the fidelity of a signal represented by the data, and it mitigates the impact of fluctuations in packet inter-arrival times.

BACKGROUND OF THE INVENTION

The present invention relates to computer network jitter buffers and, more particularly, to jitter buffers that discard sample data or replicate sample data when the jitter buffers contain too much or too little sample data, respectively.

Packet-switched networks (such as local area networks (LANs) or the Internet) can be used to carry audio, video or other continuous signals, such as Internet telephony or video conferencing signals. In such an application, a sender and a receiver typically communicate with each other according to a protocol, such as the Real-time Transport Protocol (RTP), which is described in RFC 3550. The sender digitizes the continuous input signal, such as by sampling the signal at fixed or variable intervals. The sender sends a series of packets over the network to the receiver. Each packet contains data representing one or more discrete signal samples. (Sometimes, data representing a segment, such as a 10 millisecond segment, of the signal is referred to as a “sample,” even though such a sample includes many discrete digitized values. Discrete digitized values are referred to herein as “samples” or “sample data units,” which can be 8-bit bytes or other size data units.) The sender typically sends the packets at regular time intervals. The receiver reconstructs the continuous signal from the received samples and typically outputs the reconstructed signal, such as through a speaker or on a screen of a computer.

Optionally, the sender uses a compressor-decompressor (codec) to compress (also commonly referred to as “code”) the samples before sending the packets to the receiver. If the sender uses a codec, the receiver uses a compatible codec to decompress (decode) the samples before reconstructing the signal.

Senders and receivers use clocks to govern the rates at which they process data, however these clocks are typically not synchronized and typically operate at different speeds. This difference can cause a sender to send packets too frequently or not frequently enough, from a receiver's point of view, thereby causing the receiver's buffer to overflow or underflow. Furthermore, the Internet and most other networks, over which such real-time packets are sent, introduce variable and unpredictable propagation delays, which cause the packets to arrive at the receiver with variable and unpredictable inter-arrival times. This phenomenon is commonly referred to as “jitter.”

A jitter buffer is commonly used to compensate for differences in clock speeds between transmitters and receivers and variations in inter-arrival times of packets. A jitter buffer is an elastic store that accepts received packets whenever they arrive. Once the jitter buffer contains several packets, it begins supplying the packets to the receiver at a fixed rate. Generally, the elasticity of the jitter buffer enables the buffer to continue supplying packets to the receiver at the fixed rate, even if the packets from the sender arrive at the jitter buffer at a variable rate or no packets arrive for a short period of time.

However, if no or insufficient packets arrive at the jitter buffer for an extended period of time (as can occur if, for example, the network becomes congested), the buffer can become empty (“underflow”). An empty jitter buffer can not provide packets to the receiver, which causes an undesirable gap in the otherwise continuous signal output by the receiver until another packet arrives from the receiver. Such a gap is manifested as silence in an audio signal or as a blank or “frozen” screen in a video signal.

On the other hand, if more packets arrive at the jitter buffer over a short period of time than the buffer can accommodate (as can occur if, for example, a congested network suddenly becomes less busy), the jitter buffer can “overflow” and discard some of the arriving packets. This causes a loss of one or more entire packets of samples, which can cause an undesirable discontinuity or “jump” in the otherwise continuous signal output by the receiver.

A so-called “adaptive” jitter buffer can expand and contract (within limits), depending on the arrival rate of the packets. Although an adaptive jitter buffer is less likely to overflow than a fixed-size jitter buffer, an adaptive jitter buffer can experience underflow and cause the above-described gaps in the signal output by the receiver.

BRIEF SUMMARY OF THE INVENTION

The present invention provides methods and apparatus for managing jitter buffers in ways that reduce the likelihood of underflow or overflow of the buffers and that mitigate the impact on signals produced by receivers in the event of fluctuations in the inter-arrival times of packets at the jitter buffers. Embodiments of the present invention monitor and control data in jitter buffers with more resolution than in conventional jitter buffers. For example, in one embodiment, a jitter buffer can buffer, count, provide, discard and otherwise manage individual bytes, samples or other sample data units, rather than entire packets.

Under normal circumstances, when the subject jitter buffer is called upon to provide a packet of data to a receiver, enough data is removed from the jitter buffer to fill the data packet, and the packet is provided to the receiver. However, if network congestion has temporarily stopped or slowed the delivery of packets to the jitter buffer, or for some other reason the amount of data in the jitter buffer is low, less data is removed from the jitter buffer and placed into the packet for the receiver, and the remainder of the packet is filled with duplicates of some of the data in the packet or in the jitter buffer. Thus, the available data in the jitter buffer is “rationed” to “spread” the available data over more packets and, thus, supply more packets (albeit with some duplication of data) to the receiver than under normal circumstances.

Consequently, the jitter buffer does not become empty as quickly as it would under conventional jitter buffer management. This provides a steady stream of packets to the receiver while providing additional time for the network to decongest and/or for the jitter buffer to receive additional packets. The small amount of data duplication does not significantly effect the fidelity of the signal reproduced by the receiver. The ratio of the amount of duplicated data in the packet to the amount of data taken from the jitter buffer can be dynamically adjusted each time a packet is provided to the receiver, based on the amount of data then in the jitter buffer. Thus, as the amount of data in the jitter buffer decreases, the available data is spread over a larger number of packets, and as the amount of data in the jitter buffer increases, more data (up to a whole packet) is removed from the jitter buffer for each packet provided to the receiver.

On the other hand, if the jitter buffer fills beyond a useful level, the jitter buffer discards progressively larger amounts of data, without necessarily discarding one or more entire packets' worth of data. For example, one or more sample data units can be discarded each time a packet is provided to the receiver and/or at other times. Discarding small amounts of sample data, rather than entire packets, avoids creating large discontinuities in the signal. Furthermore, data at disparate locations within the jitter buffer can be selected for discard, thus avoiding significant discontinuities in the signal.

Thus, embodiments of the present invention more or less aggressively conserve (ration) or discard data in the jitter buffer, based on the fluctuating amount of data in the jitter buffer. This fine-grained management of the amount of data in the jitter buffer maintains a buffer size that can provide a steady stream of packets to the receiver, without requiring excessive storage capacity and without significantly impacting the fidelity of the signal.

These and other features, advantages, aspects and embodiments of the present invention will become more apparent to those skilled in the art from the Detailed Description of the Invention that follows.

DETAILED DESCRIPTION OF THE INVENTION

The contents of U.S. Provisional Patent Application No. 60/554,024, filed Mar. 16, 2004, titled “A Method for Jitter Buffer Management,” are hereby incorporated by reference herein.

Methods and apparatus are described herein for managing jitter buffers in ways that reduce the likelihood of underflow or overflow of the buffers and that mitigate the impact on signals produced by receivers in the event of fluctuations in inter-arrival times of packets at the jitter buffers. The presently disclosed system monitors and controls data in sample jitter buffers with more resolution than in conventional jitter buffers. For example, the disclosed sample jitter buffers can buffer, count, provide, discard and otherwise manage individual bytes, samples or other sample data units, rather than entire packets. Jitter buffers according to the present invention are referred to herein as “sample jitter buffers.”

FIG. 1illustrates an exemplary system in which one embodiment of a sample jitter buffer100acan be used. In this embodiment, the sample jitter buffer100ais part of a receiver102. A sender104digitizes a continuous input signal (not shown) and sends a series of packets containing digitized samples of the input signal over a network106, typically according to a real-time protocol, to the receiver102. The sample jitter buffer100areceives the packets (groups of data) and buffers the digitized samples (data) from the packets.

In this embodiment, the receiver102includes an application108. The sample jitter buffer100aprovides data to the application108at regular time intervals or upon request. The data can be provided to the application108in packets that are the same size as the packets sent by the sender104or in other size packets, as needed. Alternatively, the data is provided to the application108in a “raw” format, i.e. without packetizing the data. The data can be provided to the application108according to the real-time protocol used to communicate with the sender104, or a different protocol can be used.

FIG. 2illustrates an exemplary context in which another embodiment of the sample jitter buffer100bcan be used. In this embodiment, the sample jitter buffer100bis interposed between the network106and the receiver102. The sample jitter buffer100bcan be connected directly (not shown) to the receiver102or (as shown inFIG. 2) via a network200, such as a via low-jitter network. In this embodiment, the sample jitter buffer100bsends to the receiver102packets that are the same size as the packets sent by the sender104, using the same real-time protocol used by the sender104. Alternatively, the sample jitter buffer100bcan send packets of other sizes to the receiver102and/or communicate with the receiver using a different protocol.

In either embodiment, the sender104can compress (code) the sample data before sending packets containing the compressed data to the sample jitter buffer100aor sample jitter buffer100b(hereinafter collectively referred to as sample jitter buffer100). In these cases, the sample jitter buffer100decompresses (decodes) the data before buffering the data, as described in more detail below. Optionally, the sample jitter buffer100compresses the data before providing the (compressed) data to the application108(FIG. 1) or to the receiver102(FIG. 2), as applicable.

As noted, the disclosed system monitors and controls data in sample jitter buffers with more resolution than in conventional jitter buffers. For example, a sample jitter buffer can buffer, count, provide, discard and otherwise manage individual bytes, samples or other sample data units, rather than entire packets. When a sample jitter buffer receives a packet of data, the sample jitter buffer extracts the data from the packet (decompressing the data, if necessary) and handles the sample data units individually, rather than as a packet.

FIG. 3is a block diagram of a sample jitter buffer100that illustrates some of the operations performed by the sample jitter buffer. The sample jitter buffer100includes an elastic first-in/first-out store (FIFO)300and a jitter buffer manager302. The FIFO300can be implemented with a ring buffer, as discussed in more detail below, or with any other suitable software or hardware structure. Each cell of the FIFO300can store one sample data unit. Dimension N indicates the number of sample data units currently stored in the FIFO300.

When the sample jitter buffer100receives a packet, such as packet304, the packet's sample data306is added to the FIFO300. As shown inFIG. 4, if the received sample data306awas compressed (coded) by the sender104, an appropriate codec400is used to a decompress (decode) the received sample data306abefore it is added to the FIFO300. Uncompressed data and some compression algorithms (such as G.726 and G.729) yield a fixed number of sample data units per time unit of input signal. Other compression algorithms (such as AMR and MP3) yield a variable number of sample data units per time unit of input signal. Thus, although each received packet304typically represents a fixed amount (in time) of the input signal, the number of sample data units in the packet304can vary from packet to packet.

In general, newly arrived sample data units are added to the tail308of the FIFO300. However, due to different network paths taken by various packets or other network routing anomalies, sometimes packets arrive out of order. The jitter buffer manager302can use the packet's sequence number310, timestamp312or any suitable method to determine if the newly arrived packet304is in (or out) of order. If the packet304is out of order, the jitter buffer manager302does not add the received sample data306(or the decompressed received sample data306a) to the tail308of the FIFO300. Instead, the jitter buffer manager302uses the packet's timestamp312and/or sequence number310to insert the (decompressed, if necessary) received sample data306(a) in the proper time-based position in the FIFO300. That is, the received sample data306(a) is inserted between sample data in the FIFO300that has a timestamp before the timestamp of the received sample data306(a) and other sample data in the FIFO that has a timestamp after the timestamp of the received sample data. Thus, sample data is stored in the FIFO300in timestamp order, with the oldest (smallest timestamp) sample data at the head314of the FIFO, and the newest (largest timestamp) sample data at the tail308of the FIFO.

If the packet304does not include a timestamp, any suitable method can be used to properly place the received sample data306(a) into the FIFO300in time order. For example, a timestamp can be synthesized. If each packet represents a fixed-length (time) segment of the input signal, a timestamp for the packet304can be calculated by multiplying the packet's sequence number310by the length (in time) of the segment of input signal represented by the packet. If each packet304represents a variable-length segment of the input signal, the sample data306ain the packet is decompressed (decoded) to produce a series of sample data units that each represent a fixed-length (time) segment of the input signal. In this case, a timestamp for the packet304can be calculated by multiplying the number of these sample data units, the length (in time) of the segment of the input signal represented by each sample data unit and the packet's sequence number310.

For example, if the sample data306is uncompressed, or the sample data is compressed according to an algorithm that yields a fixed number of sample data units per time unit of input signal, a timestamp can be calculated by multiplying the packet's sequence number310by the length (in time) of the segment of the input signal represented by the sample data306.

Similarly, a timestamp can be calculated for each sample data unit in the received sample data306by using the position of the sample data unit within the received sample data (or the position of the decompressed sample data unit within the set of decompressed sample data, once the received sample data306ahas been decompressed). Optionally, each cell of the FIFO300also stores a timestamp for the corresponding sample data unit.

The sample jitter buffer100provides sample data316to the application108or to the receiver102(collectively hereinafter referred to as the receiver102) at regular time intervals or upon request. As noted, the sample data316can be provided in a raw format or in an optional packet318. In either case, dimension S indicates the number of sample data units (before compression, if necessary) provided by the sample data buffer100. Generally, S sample data units are removed from the head314of the FIFO300and provided to the receiver102. However, as discussed below, more or fewer than S sample data units can be removed from the head314of the FIFO300. The jitter buffer manager302maintains a timestamp320of the last sample data unit provided to the receiver102. Each time the sample jitter buffer100provides sample data316to the receiver102, the timestamp320is updated.

Some or all of the sample data306(a) in a received packet304may arrive at the sample jitter buffer100too late to be provided to the receiver102. If a sample data unit arrives at the sample jitter buffer100, but the sample jitter buffer has already provided to the receiver102a sample data unit that is newer (has a larger timestamp) than the newly arrived sample data unit, the newly arrived sample data unit is not added to the FIFO300. Instead, the newly arrived sample data unit, and any yet older sample data units in the same received packet304, are discarded. For example, if the newly received packet304arrives out of order, the FIFO300may have earlier stored newer data, and the sample jitter buffer100may have already provided to the receiver102the newer sample data, i.e. sample data having a larger timestamp than the newly received sample data306(a). (Sample data that arrives at the sample jitter buffer100too late to be provided to the receiver102is referred to herein as “late data.”)

When the sample jitter buffer100receives a packet304, the jitter buffer manager302consults the timestamp320of the last sample data unit provided to the receiver102and the timestamp of the received sample data306(a) to ascertain how much, if any, of the received sample data is late data. The late data is discarded, without adding the late data to the FIFO300. The remaining received sample data306(a) is placed into the proper time-based position within the FIFO300.

Although the sample jitter buffer100can provide raw (unpacketized) data to the receiver102, for simplicity, in the following description, data will be referred to as being provided to the receiver in packets. In general, the amount of data316provided to the receiver102remains constant from packet the packet. That is, for uncompressed data and for fixed-rate compression algorithms, a fixed number of sample data units are provided (or compressed and provided) to the receiver102for each packet. For variable-rate compression algorithms, enough sample data units are compressed to provide the receiver102with a fixed-length (time) segment of the signal. As noted, with variable-rate compression algorithms, the number of sample data units needed to create a fixed-length (time) segment of the signal for the receiver102can vary from packet to packet. Optionally, the FIFO300can provide a variable amount of data316in the packets to the receiver102.

In general, the amount of data provided in a packet to the receiver102is the same as the amount of data received in a packet from the sender104. That is, the length (duration) of the portion of the signal represented by the packet sent to the receiver102is the same as the length (duration) of the portion of the signal represented by the packet received from the sender104. Alternatively, the amount of data provided in a packet to the receiver102can be different than the amount of data received in a packet from the sender104.

The number of sample data units needed to create a packet for the receiver102is referred to herein as S, regardless of whether the data is uncompressed, compressed according to a fixed-rate compression algorithm or compressed according to a variable-rate compression algorithm. Thus, S sample data units are used to create a packet for the receiver102, although the actual value of S can vary from packet to packet. However, depending on the number N of sample data units in the FIFO300, exactly S, more than S or fewer than S sample data units are removed from the FIFO300to create the packet for the receiver102.

The operation of one embodiment is illustrated inFIGS. 5-7. A desired number D of sample data units in FIFO300is determined. In one embodiment, D is an integral multiple of the receiver's natural packet size. Alternatively, the multiplier need not be an integer. The multiplier can be selected based on the expected or actually measured jitter rate of the network106, or by any other suitable method. The multiplier can be static or dynamic. As shown inFIG. 5, if the FIFO300contains D sample data units, the jitter buffer manager302removes S sample data units from the head314of the FIFO300. The jitter buffer manager302compresses (if necessary) and provides these S sample data units to the receiver102.

As shown inFIG. 6, if the FIFO300contains fewer than D sample data units, the jitter buffer manager302removes fewer than S sample data units from the head314of the FIFO300. For example, one fewer than S sample data units are removed. The jitter buffer manager302repeats one of the sample data units (S−1) that was removed from the FIFO300, i.e. the jitter buffer manager provided the sample data unit (S−1) twice, (with or without compression) to the receiver102, as indicated at600and602. The repeated sample data unit602is referred to as an “added” sample data unit. The repeated sample data unit602is inserted in the packet at a position that most closely approximates the sample data unit's timestamp.

Thus, although a full packet of data is provided to the receiver102, less than a full packet of data is removed from the FIFO300. This rations (spreads) the available sample data units in the FIFO300over a larger number of packets. The small amount of data duplication (i.e. the added sample data unit602) does not significantly affect the fidelity of the signal produced by the receiver102.

Alternatively, instead of repeating one of the sample data units that was removed from the FIFO300, a sample data unit that is still in the FIFO can be copied and used as the added sample data unit. For example, after sample data units1,2,3, . . . (S−1) have been removed from the FIFO300, sample data unit H would be at the head314of the FIFO. Sample data unit H can be copied and provided (with or without compression) to the receiver102, without removing the sample data unit H from the FIFO300. The added sample data unit604is inserted in the packet at a position that most closely approximates the sample data unit's timestamp. In this case, the sample data unit H will also be provided to the receiver102in a subsequent packet. Thus, although the data606provided to the receiver102in a single packet does not contain two copies of any single sample data unit, a subset of the sample data units in the FIFO300are provided to the receiver, and at least one sample data unit H is repeated over the course of two or more successive packets provided to the receiver. “Repeating” data means providing the data more than once, whether the data is repeated in a single packet or repeated over the course of two or more packets.

As shown inFIG. 7, if the FIFO300contains more than D sample data units, the jitter buffer manager302removes more than S sample data units from the head314of the FIFO300. For example, one more than S sample data units are removed. The jitter buffer manager discards one of the removed sample data units. S sample data units are provided (with or without compression) to the receiver102. Thus, a full packet of data is provided to the receiver102, and a single sample data unit is discarded. The loss of a single sample data unit does not significantly affect the fidelity of the signal produced by the receiver102. Furthermore, the number of sample data units in FIFO300can be maintained at a preferred value without discarding an entire packet of data.

Thus, D can be considered a predetermined threshold value. In addition, if the FIFO300contains D sample data units, the FIFO can be considered to meet a criterion. If the FIFO300contains fewer than D sample data units, the FIFO can be considered to meet another criterion. Similarly, if the FIFO300contains more than D sample data units, the FIFO can be considered to meet yet another criterion.

Optionally, as shown inFIG. 8, if the FIFO300contains significantly fewer than D sample data units (for example, if the FIFO contains two fewer than D sample data units or fewer than 80% of D sample data units), fewer sample data units are removed from the head314of the FIFO300than shown inFIG. 6. For example, two fewer than S sample data units are removed. One of the sample data units (S−2) removed from the FIFO300is repeated twice, i.e. provided three times, (with or without compression) to the receiver102, as indicated at800,802and804. In this example, two fewer than D can be considered another predetermined threshold value T(LL), and if the FIFO300contains fewer than T(LL) sample data units, the FIFO can be considered to meet a criterion.

Alternatively, each of two individual sample data units (such as (S−3) and (S−2)) that are removed from the FIFO300can be repeated, i.e. provided twice, each (with or without compression) to the receiver102. Alternatively, instead of repeating two of the sample data units that were removed from the FIFO300, one or more sample data units that are still in the FIFO can be copied and used as the added sample data units, or a combination of sample data units that have been removed from the FIFO and sample data units that are still in the FIFO can be copied and used as the added sample data units.

In a manner similar to that described above with reference toFIG. 7, if the FIFO300contains significantly more than D sample data units (for example, if the FIFO contains two more than D sample data units or more than 120% of D sample data units), more sample data units are removed from the head314of the FIFO300than shown inFIG. 7. For example, two more than S sample data units are removed. Two of the sample data units are discarded, and S sample data units are provided to the receiver102. In this example, two more than D can be considered another predetermined threshold value T(HH).

Alternatively or additionally, sample data units can be discarded from the FIFO300at other times. For example, periodically or when a packet is received from the sender104, the jitter buffer manager302can ascertain the number N of sample data units in the FIFO300and, if appropriate, discard one or more of the sample data units.

Although operation of the sample jitter buffer100has been described in terms of repeating or discarding one or two sample data units, other numbers, such as five and ten, of sample data units can be repeated or discarded. The number of sample data units discarded from the FIFO300can also depend on the number N of sample data units currently in the FIFO. Furthermore, the discarded sample data units can be removed from disparate locations in the FIFO300to avoid creating large discontinuities in the signal.

In the examples described with reference toFIGS. 5-7, the desired number of sample data units in the FIFO300is a single number (threshold) D. If the actual number N of sample data units in the FIFO300is greater than or less than D, one or more sample data units are discarded or repeated. In other embodiments, a range of desirable numbers of sample data units in the FIFO300can be defined, such as by defining a lower threshold T(L) and an upper threshold T(H). In such an embodiment, if the number of sample data units in the FIFO300is between T(L) and T(H), S sample data units are removed from the head314of the FIFO and provided to the receiver102. If the number of sample data units in the FIFO300is below T(L), one or more sample data units are repeated, and if the number of sample data units in the FIFO is above T(H), one or more sample data units are discarded. Similarly, in the examples described with reference toFIGS. 7 and 8, the threshold T(LL) representing significantly fewer than D sample data units and the threshold T(HH) representing significantly more than D sample data units can be defined in terms of T(L) and T(H). Optionally, additional thresholds respectively above and below T(HH) and T(LL) can be defined, and yet more sample data units can be discarded or replicated if the FIFO300contains more or fewer than the additional thresholds of sample data units. If the FIFO300contains more than, fewer than, at least or at most one of these thresholds, the FIFO can be considered to meet a respective criterion.

Optionally, when a sample data unit is to be discarded or repeated, the FIFO300is searched for sample data units that represent silence (in an audio signal) or another predefined value (such as an all-black or all-white frame of a video signal), a set of identical contiguous sample data units or group of sample data units (such as a set of contiguous non-changing frames of a non-changing scene in a video signal) or another non-changing or minimally changing portion of the signal (collectively hereinafter referred to as “unimportant sample data unit(s)”). “Minimally changing” can be defined, for example, by a predetermined maximum difference between adjacent sample data units, samples, frames, etc. If one or more sample data units are to be discarded, the system preferentially discards an appropriate number of unimportant sample data unit(s). Consequently, relatively insignificant portions of the signal are discarded, and much of the meaningful content of the signal is preserved. If one or more sample data units are to be repeated, the system preferentially repeats an appropriate number of unimportant sample data unit(s). Consequently, the added portion of the signal is relatively inconspicuous.

As discussed with respect toFIG. 7, sample data units are discarded from the head314of the FIFO300. Alternatively or in addition, sample data units, such as unimportant sample data units, are discarded from any location within the FIFO300. For example, sample data units are discarded from any position within the set of sample data units removed from the head314of the FIFO300for forwarding to the receiver102, not necessarily from the first sample data unit(s) (S+1) removed from the head of the FIFO, as shown inFIG. 7. Sample data units can be discarded from the middle or tail308of the FIFO300, such as a portion of the FIFO that contains one or more unimportant sample data units, not necessarily from the set of sample data units removed from the head314of the FIFO300for forwarding to the receiver102. As noted, sample data units can be discarded at any time, not necessarily only when sample data units are removed from the FIFO300for forwarding to the receiver102. Similarly, sample data units, such as unimportant sample data units, can be repeated at any location within the FIFO300or within the sample data units removed from the head314of the FIFO for forwarding to the receiver102. In addition, sample data units can be repeated in the FIFO300at any time.

As noted, the FIFO300can be implemented as a circular buffer or other suitable hardware or software structure.FIGS. 9-11illustrate one implementation of the FIFO300as a circular buffer900. As shown inFIG. 9, the circular buffer900includes a predetermined number of cells902. The number of cells902can be fixed or dynamic. Some or all of the cells902are occupied by sample data units. The maximum number of cells902in the circular buffer900that can be occupied by sample data units is represented by a “buffer limit”904. The buffer limit904can be increased or decreased as needed, such as in response to measured jitter in the network106, the number of sample data units that have been replicated and/or discarded over a period of time or the quality of service requested by the receiver102.

The occupied cells of the circular buffer900constitute the FIFO300. The head314of the FIFO300is indicated by a “next out pointer”906. When the FIFO300is called upon to provide one or more sample data units, the next out pointer906is used to locate the first sample data unit that is removed from the FIFO. As sample data units are removed from the FIFO300, the next out pointer906is advanced to point to the new head of the FIFO.

A “next in pointer”908points to the next available cell in the circular buffer900. When sample data units are to be added to the FIFO300, the next in pointer908is used to locate the first available cell in the circular buffer900. As sample data units are added to the tail308of the FIFO300, the next in pointer908is advanced.

If either the next out pointer906or the next in pointer908reaches the buffer limit904, the pointer “wraps” back to the first cell910of the circular buffer900. A completely empty FIFO300is indicated by identical values in the next out pointer906and the next in pointer908. Similarly, a completely full FIFO300is indicated by identical values in the next out pointer906and the next in pointer908. Thus, a “buffer full flag”912is used to distinguish between these two cases.

As shown inFIG. 10, if the FIFO300is full or nearly full, the buffer limit904can be raised to a new value904ato make more cells1100available for the FIFO, as shown inFIG. 11. After the buffer limit904ais raised, the tail308of the FIFO300and some sample data units1000adjacent the tail may need to be relocated, as shown inFIG. 11.

Although exemplary embodiments have been described with reference to Internet telephony, videoconferencing and the Real-time Transfer Protocol (RTP), other embodiments can be used with other packetized media, signals, networks and protocols, such as cellular telephone networks and the Global System for Mobile Communication (GSM).

The functions described above can be performed by a central processing unit (CPU) executing instructions stored in a memory, such as a random access memory (RAM), read-only memory (ROM), flash memory or any other memory suitable for storing control software or other instructions and data. Those skilled in the art should readily appreciate that instructions or programs defining the functions of the present invention can be delivered to a processor in many forms, including, but not limited to, information permanently stored on non-writable storage media (e.g. read only memory devices within a computer such as ROM or CD-ROM disks readable by a computer I/O attachment), information alterably stored on writable storage media (e.g. floppy disks and hard drives) or information conveyed to a computer through communication media, such as computer networks. In addition, while the invention may be embodied in software, the functions necessary to implement the invention may alternatively be embodied in part or in whole using firmware and/or hardware components, such as Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs) or other hardware or some combination of hardware, software and/or firmware components.

While the invention is described through the above-described exemplary embodiments, it will be understood by those of ordinary skill in the art that modifications to, variations of and combinations and sub-combinations of the illustrated embodiments may be made without departing from the inventive concepts disclosed herein. Moreover, while the preferred embodiments are described in connection with various illustrative data structures, one skilled in the art will recognize that the system may be embodied using a variety of data structures. Accordingly, the invention should not be viewed as limited, except by the scope and spirit of the appended claims.