Methods and circuits for synchronizing streaming data and systems using the same
First Claim
1. A method synchronizing data streaming in a system including a buffer in memory and a first-in-first-out memory comprising the steps of:
- receiving a reference sample along with a corresponding time stamp, the time stamp indicating a presentation time for the reference sample in system time clock units;
storing the reference sample in the buffer, the buffer storing previously received samples;
loading a selected number of samples from the buffer into the first-in-first-out-memory when the first-in-first-out memory empties to a predetermined level; and
determining a time difference in system time clock units between the presentation time and an output time of the reference sample from the first-in-first-out memory comprising the substeps of;
determining a first value representing a difference in system time clock units between the presentation time and a time of executing said step of loading;
determining a second value representing a delay in system time clock units required to transfer the reference sample through the buffer to an output of the first-in-first-out memory; and
taking the difference in system clock units between the first and second values.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for synchronizing stream processing with a locally generated system time clock is disclosed. A program clock reference is recovered from a transport layer and used to vary the frequency of the locally generated system time clock. A presentation time stamp is recovered from a packetized elementary stream derived from the transport layer. The relationship between a reference sample associated with the presentation time stamp from the packetized elementary stream and a current sample being streamed is determined relative to the system time clock. Data samples are added or subtracted from a stream of data samples being streamed in response to the step of determining to establish a relationship between the stream of samples and the presentation time stamp relative to the system time clock.
190 Citations
26 Claims
-
1. A method synchronizing data streaming in a system including a buffer in memory and a first-in-first-out memory comprising the steps of:
-
receiving a reference sample along with a corresponding time stamp, the time stamp indicating a presentation time for the reference sample in system time clock units;
storing the reference sample in the buffer, the buffer storing previously received samples;
loading a selected number of samples from the buffer into the first-in-first-out-memory when the first-in-first-out memory empties to a predetermined level; and
determining a time difference in system time clock units between the presentation time and an output time of the reference sample from the first-in-first-out memory comprising the substeps of;
determining a first value representing a difference in system time clock units between the presentation time and a time of executing said step of loading;
determining a second value representing a delay in system time clock units required to transfer the reference sample through the buffer to an output of the first-in-first-out memory; and
taking the difference in system clock units between the first and second values. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method synchronizing data streaming in a system including a buffer in memory and a first-in-first-out memory comprising the steps of:
-
receiving a reference sample along with a corresponding time stamp, the time stamp indicating a presentation time for the reference sample in system time clock units;
storing the reference sample in the buffer, the buffer storing previously received samples;
loading a selected number of samples from the buffer into the first-in-first-out memory when the first-in-first-out memory empties to a predetermined level; and
determining a difference in number of samples being output between the presentation time and the output time of the reference sample from the first-in-first-out memory comprising the substeps of;
determining a first value representing a difference in the number of samples between the current sample being output and the reference sample at the time of performing said step of loading;
subtracting a number of previously stored samples in the buffer and first-in-first-out memory from the first value. - View Dependent Claims (9, 10, 11, 12, 13, 14)
determining a difference in number of time clock units between the presentation time and the time of performing said step of loading; and
multiplying the difference in number of time clock units by a ratio of the sampling frequency and a frequency of the system time clock.
-
-
10. The method of claim 8 and further comprising the step of adding samples to a stream of samples output from the first-in-first-out memory when the difference in samples being output between the presentation time and the output time of the reference sample is a positive value and subtracting samples from the stream when the difference in samples is a negative value.
-
11. The method of claim 8 wherein said step of loading is performed when the first-in-first-out memory is half empty.
-
12. The method of claim 8 wherein the streaming data comprises a packetized elementary stream of data.
-
13. The method of claim 9 wherein the packetized stream comprises audio data.
-
14. The method of claim 8 and further comprising the step of determining a difference in number of samples prior to step of decompressing said prior data.
-
15. An audio decoder comprising:
-
an input port for receiving a packetized elementary stream of audio data, presentation time stamps periodically inserted in said stream;
a data buffer for storing audio samples retrieved from said stream;
an output first-in-first-out memory for sourcing decoded audio data to an external device at a selected sampling rate, said output first-in-first-out memory loaded from the data buffer when said first-in-first-out memory reaches a partially empty level; and
a digital signal processor for determining a time advantage between a time indicated by a said presentation time stamp for output of a reference sample from the first-in-first-out memory and an actual time of output of said reference sample in accordance with the formula;
TA=PTS−
STC_lhe−
{(DIPSTICK+FIFO_SIZE )*(STCfreq/Fs)}
wherein;
TA is the time advantage in system time clock units;
PTS is the presentation time stamp in units of the system time clock;
STC_lhe is the time of reload of the first-in-first-out memory;
DIPSTICK is the number of samples in the buffer at time of reload;
Fs is the frequency at which samples are output from the first-in-first-out memory;
STCfreq is the frequency of the system time clock; and
FIFO_SIZE is the number of samples in the first-in-first out memory. - View Dependent Claims (16, 17, 18, 19)
-
-
20. An audio decoder comprising:
-
an input port for receiving a packetized elementary stream of audio data, presentation time stamps periodically inserted in said stream;
a data buffer for storing audio samples retrieved from said stream;
an output first-in-first-out memory for sourcing decoded audio data to an external device at a selected sampling rate, said output first-in-first-out memory loaded from the data buffer when said first-in-first-out memory reaches a partially empty level; and
a digital signal processor for determining a sample advantage representing a difference in a number of samples being output between a presentation time indicated by a said presentation time stamp for output of a reference sample and an actual output time of the reference sample from the first-in-first-out memory in accordance with the formula;
SA={(PTS−
STC_lhe)*(Fs/STCfreq)}−
(DIPSTICK+FIFO_SIZE)
wherein;
TA is the time advantage in system time clock units;
PTS is the presentation time stamp in units of the system time clock;
STC_lhe is the time of reload of the first-in-first-out memory;
DIPSTICK is the number of samples in the buffer at time of reload;
F2 is the frequency at which samples are output from the first-in-first-out memory;
STCfreq is the frequency of the system time clock; and
FIFO_SIZE is the number of samples in the first-in-first-out memory. - View Dependent Claims (21, 22, 23, 24)
-
-
25. A method for synchronizing stream processing with a locally generated system time clock comprising the steps of:
-
recovering a program clock reference from a transport layer;
varying the frequency of the locally generated system time clock using the program clock reference;
recovering a presentation time stamp from a packetized elementary stream derived from the transport layer;
determining the relationship between a reference sample associated with the presentation time stamp from the packetized elementary stream and a current sample being streamed relative to the system time clock, comprising the substeps of;
storing the reference sample in a buffer holding previously received samples;
loading a selected number of samples from the buffer into a first-in-first-out-memory when the first-in-first-out memory empties to a predetermined level; and
determining a time difference in units of the system time clock between the presentation time and an output time of the reference sample from the first-in-first-out memory comprising the substeps of;
determining a first value representing a difference in system time clock units between a time indicated by the presentation time stamp and a time of executing said step of loading;
determining a second value representing a delay in system time clock units required to transfer the reference sample through the buffer to an output of the first-in-first-out memory; and
taking the difference in system clock units between the first and second values; and
adding and subtracting data samples from a stream of data samples being output in response to said step of determining to establish a relationship between the presentation time stamp and the stream of samples relative to the system time clock.
-
-
26. A method for synchronizing stream processing with a locally generated system time clock comprising the steps of:
-
recovering a program clock reference from a transport layer;
varying the frequency of the locally generated system time clock using the program clock reference;
recovering a presentation time stamp from a packetized elementary stream derived from the transport layer;
determining the relationship between a reference sample associated with the presentation time stamp from the packetized elementary stream and a current sample being streamed relative to the system time clock, comprising the substeps of;
loading a selected number of samples from a buffer into a first-in-first-out-memory when the first-in-first-out memory empties to a predetermined level; and
determining a difference in number of samples being output between the presentation time and the output time of the reference sample from the first-in-first-out memory comprising the substeps of;
determining a first value representing a difference in a number of samples between the current sample being output from the first-in-first-out memory and the reference sample at the time of performing said step of loading; and
subtracting a number of previously stored samples in the buffer and first-in-first-out memory from the first value; and
adding and subtracting data samples from a stream of data samples being output in response to said step of determining to establish a relationship between the presentation time stamp and the stream of samples relative to the system time clock.
-
Specification