# Patent

## Title
Method and apparatus for time stretching to hide data packet pre-buffering delays

## Abstract

A special rendering mode for the first few seconds of play out of multimedia data minimizes the delay caused by pre-buffering of data packets in multimedia streaming applications. Instead of pre-buffering all incoming data packets until a certain threshold is reached, the streaming application starts playing out some of the data packets immediately after the arrival of the first data packet. Immediate play out of the first data packet, for example, results in minimum delay between channel selection and perception, thereby allowing a user to quickly scan through all available channels to quickly get a notion of the content. The immediate play out is done at a reduced speed.

## Background
The present application claims priority to U.S. patent application Ser. No. 09/518,677 filed on Mar. 3, 2000, the contents of which are incorporated herein by reference.
BACKGROUND OF THE INVENTION
1. Field of Invention
This invention relates to a method and apparatus for hiding data packet pre-buffering delays in multimedia streaming applications.
2. Description of Related Art
Currently, multimedia applications which transmit blocks of data from a source to a destination, e.g., datagram networks, without quality of service (QoS) guarantees have to build up a First-In, First-Out (FIFO) buffer of incoming packets to cope with problems associated with delay jitters, disordered packets, etc. These problems occur in the network layer; therefore, streaming applications are unable to eliminate them. Conventional multimedia streaming applications try to hide these delay jitters, disordered packets, etc. by pre-buffering data packets for several seconds before playing them out. However, this pre-buffering introduces a delay between selection and perception of a channel. For example, when a subscriber uses multimedia applications in datagram networks to play music, the subscriber may have to wait several seconds after a channel is selected before the subscriber hears any music. If existing implementations were to initiate play out immediately, the conventional multimedia streaming applications would generally not have any packets to play out. The user would, in the case of audio rendering, hear distortions such as pops and clicks or interspersed silence in the audio output.
SUMMARY OF THE INVENTION
This invention provides a special transient mode for rendering multimedia data in the first few seconds of play out, while minimizing both the distortion of the output and the delay between selection and play out caused by pre-buffering of data packets in multimedia streaming applications. Instead of pre-buffering all incoming data packets until a certain threshold is reached, the streaming application starts playing out some of the multimedia stream immediately after the arrival of the first data packet. Immediate play out of the first data packet, for example, results in minimum delay between channel selection and perception, thereby allowing a user to quickly scan through all available channels to quickly get a notion of the content. For example, when a subscriber selects a music channel when using multimedia applications in datagram networks, the subscriber can almost immediately hear a selected channel.
This immediate play out of data packets is done at a reduced speed with less than all incoming data packets. For example, if ten data packets are to be received, the first data packet can be played out immediately upon receipt. The remaining nine data packets can be pre-buffered in the background of this immediate play out. The reduced speed play out, e.g., slow mode, can continue until the buffer reaches a predetermined limit in the background. Instead of playing out every actual data packet in sequence after the initial data packet play out, fill packets can be inserted between the actual data packets.
The fill packets are packets synthesized from the earlier packets received from the channel or station and are used to stretch the initial few seconds of playback time in a pitch-preserving, or nearly pitch-preserving, fashion. For example, the first three seconds of received signals can be augmented by six seconds of synthesized signals which together result in a rendering out of over nine seconds of play out instead of the original three seconds.
Since data packets continue to arrive during the rendering of the augmented signals, e.g., during the excess six seconds in the example above, the rendering engine accumulates a buffer of packets which can allow the system to handle delay jitters and disordering of data packets. That is, after an initial interval of a few seconds in which the augmentation occurs, the number of data packets synthesized decreases as the buffer fills. Eventually, when the buffer is filled, synthesis ceases and the rendering proceeds as normal.
Audio and video signals generally contain considerable redundancy. The removal of such redundancy is the focus of modem source coding, i.e., signal compression, techniques. In many cases, there is redundancy not only within the frames encapsulated by a single packet, but also between frames encapsulated by two or more packets. The redundancy implies that in such cases a given packet may be predicted more or less from its neighboring packets.
This predictability may be calculated either in an objective classical signal-to-noise ratio (SNR) sense, or may be determined in a quasi-subjective way, via a perceptual model, e.g., as perceptual entropy, or in other ways previously developed or yet to be developed.
In order to reproduce a signal that is as close to an original signal as possible, the decision on which actual data packets to repeat as fill packets and how often is based on the signal's perceptual entropy. The better the perceptual entropy, the less likely that the actual data packet will be repeated as a fill packet. In order for the synthesized packets used to augment the initial rendered packets to introduce minimal distortion into the rendered, e.g., audio, signal, fill packets are synthesized from the subset of initial packets in which the predictability is known to be high, either from side information in the stream or by inference from data in the packet.
Time stretching usually causes some loss in signal quality, but the insertion of fill packets in the special rendering mode offers a signal quality that is good enough for the user to readily get an idea of the content of the selected channel without experiencing a long delay, while at the same time building a buffer of accumulated packets that allow the rendering system to improve the quality to a level provided by standard stream buffering techniques. After a few seconds of the special rendering mode, during which the application has pre-buffered actual data packets in the background, the system can seamlessly switch from the reduced speed mode to the real play out mode without user involvement, for example.
These and other aspects of the invention will be apparent or obvious from the following description.



BRIEF DESCRIPTION OF THE DRAWINGS
The invention is described in detail with reference to the following figures, wherein like numerals reference like elements, and wherein:
FIG. 1 illustrates an exemplary diagram of a time stretching system;
FIG. 2 illustrates an exemplary diagram for a time stretching special rendering mode; and
FIG. 3 shows a flow chart of an exemplary process of the time stretching system.



DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
The invention is described below in connection with a computer system. That is, as described below, subscribers select various channels to request multimedia streaming applications in datagram networks. However, it will be appreciated that the invention can be used with other types of communication systems, including wired and wireless communication systems, telecommunication systems, cable or other similar networks that transmit data packets.
Likewise, the term subscriber refers to any person or entity, such as a group of individuals or a computer, radio, television or other device that receives multimedia communications. Thus, the term subscriber is not restricted to including only human users in a computer network.
FIG. 1 shows an exemplary block diagram of a time stretching system 100. The time stretching system 100 includes a network 102, coupled to: a database 106, an e-mail server 108, service providers 132, portable communication devices such as a cellphone via mobile base stations 110 and towers 112, pagers via paging towers 116, terminals 124-130 (e.g., telephone stations, personal computers, etc.) via local access providers (LAP) 120 and 122, and a special rendering mode device 104, which can include a terminal 10 and a controller 11.
The network 102 may include a telephone network (e.g., local and/or long distance), a datagram network (e.g., transmitting blocks of data from source to destinations), a data network such as the Internet, or other wired or wireless networks either private or public. The LAPs 102 and 122 may be local exchange carriers or other network interfaces such as Internet Service Providers.
The controller 11 need not be a single contiguous entity. Instead, the controller 11 can be implemented, at least in part, as a plurality of general purpose data processors and/or a single special purpose integrated circuit (e.g., ASIC) or an array of ASICs each having a main or central processor section for overall, system-level control, and separate sections dedicated to performing various specific computations, functions and other processes under the control of the central processor section. The controller 11 can also be implemented using, or including, a plurality of separate dedicated programmable integrated or other electronic circuits or devices, e.g., hard-wired electronic or logic circuits, such as discrete element circuits or programmable logic devices. The controller 11 also preferably includes other devices, such as volatile or non-volatile memory devices, communication devices, and/or other circuitry or components necessary to perform the desired input/output or other functions. For example, the controller 11 can include an interface, such as a user interface including a keyboard, monitor, user pointing device, etc. that allows an operator to input information into and receive information from the controller 11. The interface may also include other communications devices, including modems or other data communication devices to allow the controller 11 to receive and send information with respect to switches or otherwise. The terminal 10 can be any multipurpose type terminal capable of receiving data.
A subscriber to the time stretching system 100 may subscribe to many other services. For example, the subscriber may subscribe to an Internet service which provides for transmitting blocks of data in multimedia streaming applications, and other types of services.
FIG. 2 shows an exemplary diagram for the time stretching special rendering mode 104. In the time stretching special rendering mode 104, data packets arrive in the same interval as data packets are played out. In addition, there preferably is no pre-buffering of the data packet that is initially played out. For example, when data packet 0 arrives, in that same interval, data packet 0 is played out. However, data packet 0 can be played out at less than actual speed to buy time in order to pre-buffer other incoming data packets.
By subjecting data packet 0 to time stretching, e.g., double play out, data signal extrapolation, or other kinds of data manipulations, data packet 0 is played out in a fashion very closely resembling the original signal but at a reduced speed. For example, data packet 0 can be stretched from 100 ms to 200 ms. However, this type of time stretching is not a fixed value, i.e., data packet 0 can be stretched three times its duration, 50% more, or any variable thereof. The quality of this immediate play out of data packet 0 is sufficient to give the user a quick notion of his or her selection. After playing out data packet 0 at a reduced speed, a fill packet can be subsequently played out. The fill packets can be generated from previously played out data packets, pre-buffered data packets, or a combination of the two, and can be repeatedly played out, if desired.
As further illustrated in FIG. 2, original data packet 1 can be played out after the first fill packet. The play out of original data packet 1 can be performed in a time interval subsequent to the arrival of original data packet 1. Similarly, original data packets 2, 3 and 4 can be played out in a time interval subsequent to the arrival of the respective data packets. Fill packets can be inserted in between the actual data packets. Which actual packets to repeat as fill packets and how many times the fill packets are repeated depends upon the perceptual entropy in each respective data packet or data packets being analyzed. The better the perceptual entropy, the less likely a data packet will be repeated as a fill packet.
In the background of playing out data packets using the special rendering mode 104, data packets are pre-buffered. Pre-buffering is necessary because of the problem in datagram networks associated with delay jitters and disordered packets. For example, if 10 data packets are to be received, one data packet is immediately played out and nine data packets can be buffered in a FIFO while the first data packet and/or fill packets are played out. After some data packets are pre-buffered, the system can switch to the normal rendering mode which is done at actual speed.
FIG. 3 shows a flowchart for a process of the special rendering mode 104. In step 1000, receipt of a first set of data packets is begun. In step 1010, at least one of the received data packets is immediately played out, eliminating silence in the beginning of play out. The immediate rendering of at least one data packet can be done at a reduced speed for a desired time, e.g., the first few seconds. This reduced speed play out of at least one data packet preferably resembles the play out of all actual data packets to be received or some subset of received data packets.
At step 1020, fill packets are ideally generated from previously played out data packets. The fill packets hide the delays caused by pre-buffering. Since data packets arrive in the same interval as packets are rendered, every fill packet buys time to pre-buffer an actual data packet.
At step 1030, fill packets are inserted and played out between actual data packets. Inserting the fill packets between the actual data packets causes a time stretching effect because for a time period data packets are being repeated, stretched, or manipulated in other ways at a reduced speed. Instead of rendering every data packet, a combination of actual data packets and fill packets can be rendered.
However, while playing out at least one of the data packets, the system can simultaneously pre-buffer the remaining data packets in step 1040. The data packets that are not played out immediately are pre-buffered in the background, unbeknown to the subscriber. This is because during the special rendering of data packets in accordance with the invention more data packets are received than are actually play out. There is a need to constantly buffer data packets in the background because of delay jitter problems in the network layer.
At step 1050, after the buffer is sufficiently filled, the system can switch to normal play out speed. The switch over from reduced play out to normal play out is preferably unnoticeable to the user.
While the invention has been described in conjunction with specific embodiments thereof, it is evident that many alternatives, modifications and variations will be apparent to those skilled in the art. Accordingly, preferred embodiments of the invention as set forth herein are intended to be illustrative, not limiting. Various changes may be made without departing from the spirit and scope of the invention.

## Claims

1. A method comprising:
receiving a first data packet in a plurality of data packets;
upon identifying the first packet, immediately playing the first data packet without buffering and without delay; and
while playing the first data packet, generating fill packets associated with the first data packet; and
after playing the first data packet, and before playing a second data packet directly following the first data packet in the plurality of data packets, inserting and playing the fill packets, wherein the number of fill packets inserted is associated with perceptual entropy of the first data packet.

2. The method of claim 1, wherein a pre-buffering delay is hidden by the fill packets.

3. The method of claim 1, wherein the fill packets mirror the first data packet.

4. The method of claim 1, wherein a stronger perceptual entropy corresponds to less repetition of the first data packet.

5. The method of claim 1, wherein while playing the first data packet, the method further comprises:
receiving additional packets in the plurality of data packets; and
buffering the additional packets in a buffer.

6. The method of claim 5, further comprising:
upon completion of the playing of the first data packet, playing the additional packets from the buffer.

7. A system comprising:
a processor; and
a computer-readable storage device having instructions stored which, when executed by the processor, cause the processor to perform operations comprising:
receiving a first data packet in a plurality of data packets;
upon identifying the first data packet, immediately playing the first data packet without buffering and without delay; and

while playing the first data packet, generating fill packets associated with the first data packet; and
after playing the first data packet, and before playing a second data packet directly following the first data packet in the plurality of data packets, inserting and playing the fill packets, wherein the number of fill packets inserted is associated with a perceptual entropy of the first data packet.

8. The system of claim 7, wherein a pre-buffering delay is hidden by the fill packets.

9. The system of claim 7, wherein the fill packets mirror the first data packet.

10. The system of claim 7, wherein a stronger perceptual entropy corresponds to less fill packets being inserted between the first data packet and the second data packet.

11. The system of claim 9, wherein a stronger perceptual entropy corresponds to less repetition of the first data packet.

12. The system of claim 7, the computer-readable storage device having additional instructions stored which result in the operations further comprising, while playing the first data packet:
receiving additional packets in the plurality of data packets; and
buffering the additional packets in a buffer.

13. The system of claim 12, the computer-readable storage device having additional instructions stored which result in the operations further comprising:
upon completion of the playing of the first data packet, playing the additional packets from the buffer.

14. A computer-readable storage device having instructions stored which, when executed by a computing device, result in the computing device performing operations comprising:
receiving a first data packet in a plurality of data packets;
upon identifying the first packet, immediately playing the first data packet without buffering and without delay; and
while playing the first data packet, generating fill packets associated with the first data packet; and
after playing the first data packet, and before playing a second data packet directly following the first data packet in the plurality of data packets, inserting and playing the fill packets, wherein the number of fill packets inserted is associated with perceptual entropy of the played portions.

15. The computer-readable storage device of claim 14, wherein a pre-buffering delay is hidden by the fill packets.

16. The computer-readable storage device of claim 14, wherein the fill packets mirror the first data packet.

17. The computer-readable storage device of claim 14, wherein a stronger perceptual entropy corresponds to less fill packets being inserted between the first data packet and the second data packet.

18. The computer-readable storage device of claim 14, wherein a stronger perceptual entropy corresponds to less repetition of the first data packet.

19. The computer-readable storage device of claim 14, the computer-readable storage device having additional instructions stored which result in the operations further comprising, while playing the first data packet:
receiving additional packets in the plurality of data packets; and
buffering the additional packets in a buffer.

20. The computer-readable storage device of claim 19, the computer-readable storage device having additional instructions stored which result in the operations further comprising:
upon completion of the playing of the first data packet, playing the additional packets from the buffer.