Method and apparatus for recording digital data streams

- LG Electronics

A method and apparatus for recording digital data streams. When a digital broadcast data stream received by a set top box is transmitted through a communication interface such as an IEEE-1394 bus to a streamer, program clock references contained in the data stream become different from the actual arrival time of the digital data stream because of different clock frequencies of the digital data stream and communication interface. The difference is compensated before the digital data stream is recorded on the streamer. The method in accordance with the present invention comprises detecting program clock references contained in received digital transport stream packets, creating the transport time reference of each transport stream packet based upon the detected program clock references and arrival times of the transport stream packets, and creating transport stream units by adding each of the created transport time reference to the associated transport stream packet.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a method and apparatus for recording a digital data stream received by a set top box and transmitted through a communication interface on a streamer, with the capability of compensating the arrival time of the received digital data stream and adding the compensated arrival time to the data stream as transport time references of the data stream.

[0003] 2. Description of the Related Art

[0004] In conventional analog television broadcast, video signals are transmitted over the air or through cables after being AM or FM modulated. With the recent rapid advance of digital technologies such as digital image compression or digital modulation/demodulation, standardization for digital television broadcast is in rapid progress. Based upon the Moving Picture Experts Group (MPEG) format, satellite and cable broadcast industry also moves towards digital broadcast.

[0005] Digital broadcast offers several advantages that its analog counterpart cannot provide. For example, digital broadcast is capable of providing services with far more improved video/audio quality, transmitting several different programs within a fixed bandwidth, and offering enhanced compatibility with digital communication media or digital storage media.

[0006] FIG. 1 depicts a simplified block diagram of an MPEG encoder. An audio/video encoder 11 converts source audio and video signals into a video elementary stream and one or more audio elementary streams. The compressed audio and video elementary streams are converted into packets by a program elementary stream (PES) packetizer 13, wherein a presentation time stamp (PTS) and decoding time stamp (DTS) are inserted into each PES packet header. Both PTS and DTS are expressed in terms of an encoder system clock 15 and used by a decoder to synchronize the decoder time clock with the encoder system clock. The audio and video PES packets generated from a number of different programs are multiplxed into a transport stream (TS), wherein program clock references (PCRs) are inserted in the transport stream packet headers.

[0007] The transport stream, as shown in FIG. 3, comprises a series of transport stream packets, each transport stream packet having a fixed length of 188 bytes. The transport stream is to be transported through channels subject to transmission errors. Each transport stream packet further comprises a packet header and payload. The packet header includes a synchronization value, for use in identifying the boundaries of each transport stream packet, followed by a packet identifier or PID. The purpose of the PID is to label the transport stream packet. All packets with a particular PID have related contents, e.g., all have PES packet data for a particular elementary stream, etc. In digital broadcast systems, a plurality of programs can be multiplexed into a single transport stream.

[0008] Each program has a single time base established by a system time clock at the encoder in relation to which all elementary streams of the particular program are encoded. The system time clock typically has a frequency of 27 MHz. The PCR is simply a snapshot of this encoder system time clock for a particular program. As depicted in FIG. 3, the PCR comprises a 33-bit PCR base field of a 90 KHz, a 9-bit PCR extension of a 27 MHz, and a 6-bit reserved field for byte alignment. The 9-bit PCR extension provides a modulo-300 counter that is incremented at 37 ns intervals, whereas the 33-bit PCR base is incremented at 0.11 &mgr;s intervals. The PCR, therefore, can represent from 0 s up to 95443.7 s.

[0009] The transmitted transport stream is received by a set top box at the receiver and demultiplexed into transport streams of a plurality of programs. If a desired program is selected from among the demultiplexed programs, a transport stream depacketizer 21 of the system decoder as shown FIG. 2 contained in the set top box extracts the PCR values from the transport stream of the selected program, thereby enabling to synchronize the decoder system clock with the encoder system clock.

[0010] The value of PCR (i) is a count which reflects the value of the encoder system clock for the associated program at the time the i-th PCR bytes were inserted into the transport stream. Since the decoder do not know the value of PCR (i) until it receives PCR (i), there is a time difference between the encoder and decoder due to transmission a time delay. The time delay, however, is negligible because the decoder clock is synchronized with the encoder clock using the detected PCR values

[0011] A PES depacketizer 22 in the decoder of FIG. 2 depacketizes the PES packets yielded by transport stream depacketizer 21 into elementary streams and extracts the DTSs and PTSs. An audio/video decoder 24 adjusts the decoding clock of the elementary streams using the PCRs and DTSs. The presentation time of the decoded audio and video signals are adjusted using the PCRs and PTSs and finally the decoded audio and video signals are outputted to A/V output devices such as television sets.

[0012] It is also possible to store the received digital broadcast signals on a storage medium instead of directly outputting the received broadcast signals to A/V output devices. The stored digital broadcast signals can be edited and presented afterwards. For example, the digital data stream received by a set top box can be stored in a streamer such as a digital video disk (DVD) through communication interfaces like an IEEE-1394 isochronous bus. Later, the stored digital data stream can be edited and transmitted back to the set top box so that the original digital audio and video data can be presented.

[0013] The system clock frequency of digital broadcast transport streams based upon the MPEG format is 27 MHz, whereas that of the IEEE-1394 isochronous bus is 24.576 MHz. A DVD recording/reproducing apparatus as a streamer uses the system clock of 27 MHz. Hence, if transport streams using the system clock of 27 MHz are transmitted through the IEEE-1394 isochronous bus using the system clock of 24.576 MHz, the time interval between two successive transport stream packets can change because of the different system clock frequencies.

[0014] For each program carried in a given transport stream, PCRs must be generated at least once every 100 ms and inserted into the transport stream packets carrying one of the elementary streams that make up that program. Not every transport stream packet, therefore, contains the PCR. Suppose that the time interval between a transport stream packet without a PCR and its preceding packet has changed while transmitted through the IEEE-1394 isochronous bus. If the transport stream packets are recorded by a DVD recording/reproducing apparatus, it may cause a serious problem when reproducing the transport stream because the time interval remains wrong at the time the transport stream is transmitted through the IEEE-1394 isochronous bus back to the set top box.

[0015] Currently, the transport stream is required to contain a PCR that has a frequency tolerance of 30 ppm (parts per million). If the time intervals between transport stream packets are drastically distorted by the IEEE-1394 isochronous bus, the required frequency tolerance may not be guaranteed.

SUMMARY OF THE INVENTION

[0016] It is an object of the present invention to provide a method and apparatus for recording a digital data stream. When recording a digital data stream transmitted through a communication interface in a streamer, transport time references of transport stream packets are created and added to the data stream, the transport time references being synchronized with program clock references inserted in the transport stream packets.

[0017] The method for recording a digital data stream in accordance with the present invention comprises detecting program clock references contained in received digital transport stream packets, creating the transport time reference for each transport stream packet based upon the detected program clock references and arrival times of the transport stream packets, and creating transport stream units by adding each of the created transport time reference to the associated transport stream packet.

[0018] The apparatus for recording a digital data stream in accordance with the present invention comprises a means for detecting program clock reference values contained in received digital transport stream packets, a means for comparing the detected program clock reference values with the arrival times of the transport stream packets, a means for creating the transport time reference of each transport stream packet based upon the comparison result, and a means for constructing transport stream units by adding the transport time reference of each transport stream packet to the associated transport stream packet.

BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are included to provide a further understanding of the invention, illustrate the preferred embodiments of the invention, and together with the description, serve to explain the principles of the present invention.

[0020] In the drawings:

[0021] FIG. 1 is a block diagram of an MPEG encoder depicted for explaining the procedure by which time stamps are recorded in a transport stream;

[0022] FIG. 2 is a block diagram of an MPEG decoder depicted for explaining the procedure by which a transport stream is decoded using the time stamps contained in a transport stream;

[0023] FIG. 3 is a pictorial representation of the syntax of a transport stream;

[0024] FIG. 4 is an apparatus in which a preferred embodiment of the invention may be practiced;

[0025] FIG. 5a is a pictorial representation of the syntax of a data stream transmitted through the communication interface shown in FIG. 4;

[0026] FIG. 5b is a pictorial representation of the syntax of a data stream stored in the streamer shown in FIG. 4;

[0027] FIG. 6 is a block diagram for explaining the method to compensate the clock references of a transport stream distorted by the communication interface shown in FIG. 4; and

[0028] FIG. 7 is an apparatus for compensating the clock references of a transport stream in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0029] In order that the invention may be fully understood, preferred embodiments thereof will now be described with reference to the accompanying drawings.

[0030] FIG. 4 depicts a system in which the present invention may be advantageously employed, comprising a set top box 100, a communication interface (IEEE-1394), and a streamer 200.

[0031] Receiving a transport stream into which a plurality of programs are multiplexed, set top box 100 demultiplexes the transport stream into different types of transport stream packets, decodes the transport stream of a user-chosen program by a system decoder 110, and presents the decoded transport stream through a television set or transmits the chosen transport stream through an IEEE-1394 isochronous bus to streamer 200 for storing the program.

[0032] A digital transport processing unit 120 interfacing in the IEEE-1394 bus divides the transport stream of the chosen program into 188-byte transport stream packets using a system clock of 24.576 MHz generated by a clock controller 130 and adds a 4-byte transport header to each transport stream packet as shown in FIG. 5a before transmitting the transport stream through a IEEE-1394 isochronous bus. The transport header includes a time stamp (TS1) expressed in terms of the system clock of 24.576 MHz.

[0033] Receiving the transport stream transmitted through the IEEE-1394 isochronous bus from set top box 100, a digital receiving processing unit 210 included in streamer 200 outputs transport stream packets after removing the time stamps (TS1s) from the transport headers. A stream recording unit 230 receives the transport stream from digital receiving processing unit 210, converts the transport stream into a program stream the syntax of which is shown in FIG. 5b, and records the program stream on a recording medium 250 such as a DVD. The program stream stored on recording medium 250 may comprise units containing a 2048-byte pack, a 12-byte unit block ID code, and a 4-byte cyclic redundancy check (CRC) code. The pack may further comprise a plurality of transport stream packets (for example, 10 packets), an application header (Appl. Header) regarding the packets, a substream ID (Substr. ID) code, a program elementary stream (PES) header, and a pack header having a system clock reference (SCR).

[0034] As shown in FIG. 6, while the transport stream packets are transmitted from set top box 100 through the IEEE-1394 interface to stream recording unit 230, the time interval between two successive transport stream packets undergoes a change because the clock frequency of the transport stream packets is different from that of the IEEE-1394 communication interface.

[0035] To solve such a problem, stream recording unit 230 compensates the arrival time of each transport stream packet using a compensation method to be explained in detail below and records the transport stream in the format shown in FIG. 5b after adding a transport time reference corresponding to the compensated arrival time to each transport stream header.

[0036] A stream reproducing unit 260 retrieves the original transport stream from streamer 200 and outputs the transport stream to a digital transport processing unit 270. Receiving the retrieved transport stream, a digital transport processing unit 270 of the streamer 200 extracts transport stream packets from the transport stream and adds a 4-byte transport header having a time stamp of a clock of 24.576 MHz to each extracted transport stream packet as shown in FIG. 5a. Then the transport stream packets are transmitted through the IEEE-1394 isochronous bus to set top box 100, the transmission of the transport stream packets being synchronized with the transport time reference values of the transport stream.

[0037] In set top box 100, a digital receiving processing unit 140 receives the transport stream from streamer 200 and extracts time stamps contained in the transport headers. Using the extracted time stamps and the system clock of 24.576 MHz, transport stream packets are outputted to system decoder 110.

[0038] The method and apparatus for compensating clock references using PCRs contained in transport stream packets transmitted through the IEEE-1394 communication interface will be explained in detail with reference to FIGS. 6 and 7. It is assumed that PCR values are contained only in transport stream packets P1, P4, and P3 shaded in FIG. 6.

[0039] If a PCR detector 50 detects a PCR value contained in the transport stream packet P1, a subtracter 51 subtracts the output of a counter 57 from the PCR value. Subtracter 51 ignores the offset, initial difference between the PCR value and the output of counter 57 in subtraction operations. The subtraction result, which is a digital error signal (e1), is converted into an analog error signal and applied to a low-pass filter 53. The low-pass filtered error signal is then applied to a voltage-controlled oscillator (VCO) 55, thereby adjusting the oscillation frequency of VCO 55 so that the oscillator clock can be locked with the PCR value. The digital error signal (e1), the PCR value, and the counter value (t1) at the time the transport stream packet P1 is received are temporarily stored in a buffer 59 and the transport stream packet P1 is stored in a buffer 63.

[0040] If a second and third transport stream packets P2 and P3 having no PCR values are received, the outputs of counter 57 are temporarily stored in buffer 59 as temporary transport time references of the transport stream packets and the transport stream packets P2 and P3 are sequentially stored in buffer 63.

[0041] Subsequently, when the PCR value of a forth transport stream packet P4 is detected by PCR detector 50, subtractor 57 subtracts the value of counter 57 from the detected PCR value. The oscillation frequency of VCO 55 is adjusted based upon the subtraction result (e4). Also, the error signal (e4), the counter value (t4), and the PCR value are temporarily stored in buffer 59 and the transport stream packet P4 is stored in buffer 63.

[0042] Next, a compensation unit 61 loads the PCR value of the first transport stream packet P1 from buffer 59 and transmits the PCR value to a time stamper 64. Time stamper 64 reads the first transport stream packet P1 from buffer 63 and records the received PCR value in the header of the transport stream packet P1 as a receiving time stamp, which will be used as a time reference for transmitting the transport stream packet P1 in playback. Then compensation unit 61 calculates the transport time references of the second and third transport stream packets P2 and P3 in the following way. First, the time interval &Dgr; t between the counter values t1 and t4 is calculated. Second, the difference &Dgr; t2 between t1 and the temporary clock reference of P2 stored in buffer 59 is calculated. Likewise, the difference &Dgr; t3 between t1 and the temporary clock reference of P3 stored in buffer 59 is calculated. Then, the difference &Dgr; p between the PCR values of the transport stream packets P1 and P4 is calculated. The difference between &Dgr; t and &Dgr; p is denoted by the error &Dgr; e, which will be used to compensate the temporary transport time reference values of P2 and P3.

[0043] The values &Dgr; ex&Dgr; t2/&Dgr; t and &Dgr; ex&Dgr; t3/&Dgr; t are added to the temporary transport time reference values of P2 and P3 respectively and the compensated transport time reference values are transmitted to time stamper 64. Time stamper 64 loads the transport stream packets P2 and P3 from buffer 63 and records each received compensated transport time reference value in the header of the associated transport stream packet as a recording time stamp. Then compensation unit 61 loads the PCR value of the transport stream packet P4 from buffer 59 and outputs the value to time stamper 64. Time stamper 64 loads the transport stream packet P4 from buffer 63 and records the received PCR value in the header of the transport stream packet P4 as a recording time stamp.

[0044] The same procedure is repeated for the following transport stream packets P5, P6, . . . Pn and therefore the temporary transport time reference values of the transport stream packets distorted by the digital communication interface can be compensated.

[0045] As explained so far, stream recording unit 230 in streamer 200 compensates the transport time references of transport stream packets based on the PCR values before recording the transport stream packets. For presentation of the transport stream, the stored transport stream packets are transmitted through the IEEE-1394 isochronous bus to set top box 100. Even though the time intervals of the transport stream packets are distorted when transmitted to streamer 200, the time intervals of the transport stream packets remain compensate when transmitted to set top box 100 for presentation.

[0046] The invention may be embodied in other specific forms without departing from the sprit or essential characteristics thereof. For example, unlike the previous embodiment, it is also possible that set top box 100 creates PCR values for transport stream packets with no PCR values and inserts the created PCR values to associated transport stream packets before transmitting the transport stream packets through the IEEE-1394 isochronous interface to streamer 200. In this case, since every transport stream packet contains a PCR, the decoder clock can be adjusted precisely using the PCR values though the time intervals between consecutive transport stream packets are distorted by the IEEE-1394 interface.

[0047] According to the apparatus and method for compensating the transport time references of a digital data stream, failures in a seamless presentation of data retrieved from a streamer can be prevented in the streamer, though program clock references contained in the data stream become different from the actual arrival time of the digital data stream because of different clock frequencies of the digital data stream and the IEEE-1394 communication interface and the digital data is stored on the streamer as transmitted.

[0048] The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein

Claims

1. A method for creating digital transport stream units, comprising the steps of:

(a) detecting program clock references contained in received digital transport stream packets;
(b) creating the transport time reference for each transport stream packet based upon the detected program clock references and arrival times of the correspondent transport stream packet; and
(c) creating transport stream units by adding each of the created transport time reference to the associated transport stream packet.

2. A method set forth in claim 1, wherein said step (b) creates the transport time reference of each transport stream packet based upon an error, defined as the difference between the time difference of selectively inserted program clock references and the arrival time difference of transport stream packets containing the program clock references.

3. A method set forth in claim 2, wherein said step (b) increases or decreases the transport time reference by the time corresponding to said error.

4. A method set forth in claim 2, wherein said step (b) creates the transport time reference for an arbitrary transport stream packet received between two transport stream packets having program clock references by compensating the arrival time of the arbitrary transport stream packet by the amount corresponding to the proportion of the arrival time difference between the arbitrary transport stream packet and a first transport stream packet of said two packets to the arrival time difference of said two transport stream packets.

5. A method set forth in claim 1, wherein said transport time reference is the reference information upon which the timing of the transmission of the transport stream packets is based when the transport packets are transmitted to an external device after the transport stream packets are reproduced from a storage medium.

6. A method set forth in claim 1, further comprising a step of recording the created transport stream units on a rewritable recording medium having a digital data recording format.

7. A method for creating digital transport stream units, comprising the steps of:

(a) storing received digital transport stream packets together with their arrival times temporarily;
(b) compensating the temporarily stored arrival time of each transport stream packet based upon the time difference of program clock references and the arrival time difference of the transport stream packets when more than two program clock references are detected from said received digital transport stream packets; and
(c) creating transport stream units by adding each of the compensated arrival times to the associated transport stream packet as a transport time reference.

8. A method for creating digital transport stream units, comprising the steps of:

(a) detecting program clock references from received transport stream packets while storing the received digital transport stream packets together with their arrival times;
(b) detecting the stored arrival times of the transport stream packets containing the detected program clock references;
(c) comparing the difference of the two program clock references detected in said step (a) with the arrival time difference of the two transport stream packets detected in said step (b);
(d) compensating the stored arrival time of each transport stream packet based upon the comparison result; and
(e) creating transport stream units by adding the compensated arrival time to each transport stream packet as a transport time reference

9. An apparatus for recording digital transport streams, comprising:

a means for detecting program clock references contained in received digital transport stream packets;
a means for comparing the detected program clock references with the arrival times of the transport stream packets;
a means for creating the transport time reference of said each transport stream packet based upon the comparison result; and
a means for constructing transport stream units by adding the created transport time reference of said each transport stream packet to the associated transport stream packet.

10. An apparatus for recording digital transport streams, comprising:

a means for creating arrival times of received digital transport stream packets;
a means for detecting program clock references contained in the received digital transport stream packets;
a means for comparing the detected program clock references with the created arrival times;
a means for compensating the created arrival times based upon the comparison result; and
a means for constructing transport stream units by adding the compensated arrival times to the corresponding transport stream packets as transport time references.

11. An apparatus set forth in claim 10, wherein said compensating means compensates the created arrival times of the received digital transport stream packets so that the difference between the detected program clock references equals to the difference between the arrival times of the transport stream packets containing the detected program clock references.

12. An apparatus for recording digital transport streams, comprising:

time information extractor of detecting program clock references contained in received digital transport stream packets;
time comparator of comparing the detected program clock references from said time information extractor with the arrival times of the transport stream packets;
transport time generator of creating the transport time reference of said each transport stream packet based upon the comparison result from said time comparator; and
data constructor of constructing transport stream units by adding the created transport time reference from said transport time generator of said each transport stream packet to the associated transport stream packet.

13. An apparatus set forth in claim 12, wherein said transport time generator creates the transport time reference of each transport stream packet based upon an error, defined as the difference between the time difference of the detected program clock references and the arrival time difference of transport stream packets containing the program clock references.

14. An apparatus set forth in claim 13, wherein said transport time generator increases or decreases the transport time reference by the time proportional to said error.

15. An apparatus set forth in claim 13, wherein said transport time generator creates the transport time reference for an arbitrary transport stream packet received between two transport stream packets having program clock references by compensating the arrival time of the arbitrary transport stream packet by the amount corresponding to the proportion of the arrival time difference between the arbitrary transport stream packet and a first transport stream packet of said two packets to the arrival time difference of said two transport stream packets.

16. An apparatus for recording digital transport streams, comprising:

transport time generator of creating arrival times of received digital transport stream packets
time information extractor of detecting program clock references contained in the received digital transport stream packets;
time comparator of comparing the detected program clock references from said time information generator with the created arrival times from said transport time generator;
time compensator of compensating the created arrival times from said transport time generator based upon the comparison result of said time comparator; and
data constructor of constructing transport stream units by adding the compensated arrival times from said time compensator to the corresponding transport stream packets as transport time references.

17. An apparatus set forth in claim 16, wherein said time compensator compensates the created arrival time based upon an error, defined as the difference between the time difference of the detected program clock references and the arrival time difference of transport stream packets containing the program clock references.

18. An apparatus set forth in claim 17, wherein said time compensator increases or decreases the created arrival time by the time proportional to said error.

19. An apparatus set forth in claim 17, wherein said time compensator compensate the created arrival time of an arbitrary transport stream packet received between two transport stream packets having program clock references by the amount corresponding to the proportion of the arrival time difference between the arbitrary transport stream packet and a first transport stream packet of said two packets to the arrival time difference of said two transport stream packets.

Patent History
Publication number: 20020150392
Type: Application
Filed: Jun 11, 2002
Publication Date: Oct 17, 2002
Applicant: LG Electronics Inc.
Inventors: Jea-Yong Yoo (Seoul), Byung-Jin Kim (Kyunggi-do), Kang-Soo Seo (Kyunggi-do)
Application Number: 10167801
Classifications
Current U.S. Class: 386/111; Arrangements For Multiplexing One Video Signal, One Or More Audio Signals, And A Synchronizing Signal (348/423.1)
International Classification: H04N005/76; H04N007/12; H04N011/02; H04N011/04;