SYSTEM FOR DIGITAL DATA FORMAT CONVERSION AND BIT STREAM GENERATION

Abstract: A Conversion system (200) merges and converts data in a plurality of different data formats from a plurality of different sources (202, 230), to a selected output data format for transmission on a selected transmission channel. A method for digital data format conversion involves de-packetizing (210, 240) an input packetized datastream. A timing recovery parameter is formed in response to a desired output data format (214, 245). The depacketized data is re-packetized (216, 250) in response to the desired output data format and the timing recovery parameter is incorporated in the re-packetized data. The re-packetized data is multiplexed (218) in response to the selected format and provided to an output channel.

Description: SYSTEM FOR DIGITAL DATA FORMAT CONVERSION AND BIT STREAM GENERATION The invention relates to digital signal processing and i n particular to the conversion of data from different input sources and different input formats to form a digital bitstream for output in a selected output format. Homes and workplaces receive different types of data i n different data formats for a variety of applications. For example, a home may receive data from satellite or terrestrial sources comprising High Definition Television (HDTV) broadcasts, Multi-point Microwave Distribution System (MMDS) broadcasts, and Digital Video Broadcasts (DVB). A home may also receive data via telephone (e.g. the Internet) and coaxial lines (e.g. cable TV) and from domestic sources such as PCs, Digital Video Disk (DVD), CDROM, VHS and Digital VHS (DVHS™) type players and many other types of sources. Consequently, there is an increasing need for a Conversion system capable of accepting data in different data formats, from a plurality of different sources and that is capable of merging the data and converting it to a selected output data format for transmission on a selected transmission channel. Such a Conversion system is needed to support data processing activities including editing, storage and transmission for multi-media applications. In such a Conversion system, the input data from multiple sources is in the form of packetized digital data. Input data from other sources e.g. analog video broadcasts, is converted into packetized digital data for processing in the Conversion system. However, there are a number of problems in merging and converting multimedia packetized digital data from different input format sources into a selected output data format. For example, an important factor in determining the way data from one or more different inpu t sources may be merged and re-packetized is the range of data rate s that is permitted by a receiving device or by the coding requirements of the desired output signal format. The desired output data format typically imposes both a minimum and a maximum data rate limit in order to prevent underflow or overflow of an input data buffer in a receiving device. The data rate of the output format is also constrained by th e bandwidth characteristics of the transmission channel. Consequently, it is necessary to re-code and re-packetize the input data in a m anner that meets these data rate constraints. Other constraints on the format conversion of multimedia input data arise from differences in coding characteristics between the input data format and desired output data format. These coding characteristics include timing, error correction, conditional access and coding type characteristics. The problems involved in merging and converting digital data from different input format sources into a selected output data format are addressed by a system according to the present invention. In accordance with the principles of the present invention, a Conversion system merges and converts data in a plurality of different data formats from a plurality of different sources, to a selected output data format for transmission on a selected transmission channel. The Conversion system re-codes and re - packetizes the input data to include timing, error correction, conditional access and coding type parameters compatible with th e selected output format. The Conversion system also outputs data at a data rate compatible with selected data format, receiving device and transmission channel characteristics. A method for digital data format conversion involves d e - packetizing an input packetized datastream. A timing recovery parameter is formed in response to a desired output format. The depacketized data is re-packetized in response to the desired output format and the timing recovery parameter is incorporated in the re - packetized data. The re-packetized data is multiplexed in response to the selected format and provided to an output channel. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 shows a flowchart for a process for merging an d converting data in two different data formats from two different sources, to a selected output data format for transmission on a selected transmission channel. Figure 2 shows a system, according to the invention, for formatting, packetizing, merging and converting data in two different data formats from two different sources, to a selected output data format for transmission on a selected transmission channel. Figure 3 shows a decoder system, according to the invention, for receiving and decoding a datastream containing data from two different sources. Figure 4 shows a system for generating timing information for a datastream containing data from two different sources. Figure 5 shows a composite packetized datastream containing data from two different sources. Figure 6 shows a computer architecture implementing a Conversion system, according to the invention, for merging and converting data in two different data formats from two different sources, to a selected output data format for transmission on a selected transmission channel. Figure 7 shows a control and data signal implementation for the computer architecture of Figure 6. Figure 8 shows a memory allocation for the computer architecture of Figure 6. During the course of this description like elements will b e identified with like numbers according to the different figures th at illustrate the invention. A Conversion system according to the invention is illustrated in Figures 1 - 8. Although the Conversion system is described as providing a selected MPEG compatible output from tw o MPEG like transport stream input sources, it is exemplary only. The term MPEG (Moving Pictures Expert Group) refers to a widely adopted image encoding standard, hereinafter referred to as the "MPEG standard". The MPEG standard is comprised of a system encoding section (ISO/IEC 13818-1 , 10th June 1994) and a video encoding section (ISO/IEC 13818-2, 20th January 1995), hereinafter referred to as the "MPEG systems standard" and "MPEG video standard" respectively. It is to be noted that the conversion described also applies to audio data and miscellaneous data such as Digital Storage Media Control Commands (DSMCC) per annex A of the MPEG systems standard. The principles of the invention may also be applied to other types of Conversion involving non-MPEG compatible sources and non-MPEG compatible outputs. Non-MPEG compatible sources and outputs may include analog (NTSC) video, cable TV or telephone sources, for example. Further, although the disclosed system is described as processing broadcast program data, this is exemplary only. The term 'program' is used to represent any form of packetized data such as telephone messages, computer programs, Internet data or other communications, for example. As an overview, Figure 1 shows a flowchart for a process for merging and converting data in two different data formats from two different sources, to a selected output data format for transmission on a selected transmission channel. Antenna 202 of Figure 1 receives data from a satellite video broadcast source. A demodulator within the Conversion system is tuned, in step 204, to receive an input datastream from antenna 202. The input datastream is demodulated and decoded in step 206 to recover a transport stream containing a User requested program channel. The transport stream is demultiplexed in step 208 to recover data packets comprising the User requested program channel. The data in the recovered program channel packets is separated from ancillary header information in step 210. In steps 214 and 216, the header-less packets formed in step 210 are re-formatted to be in MPEG compatible transport packet form in response to an output data format selection by a User. In s tep 214, the header-less packets formed in step 210 are re-aligned an d added to new MPEG compatible headers incorporating output format compatible timing information. The re- aligning process of step 2 1 4 involves delaying one or other of the header-less packet data and the new headers in order to align and combine them in the correct sequence. In addition, conditional access information may b e incorporated in the header data in step 214 as determined by the requirements of the selected output data format. In step 216, error correction data is added to the packets with headers produced in step 214 to form MPEG compatible packets. Also in Figure 1, a transport datastream representing selected program material is recovered from a DVHS™ storage source in step 230. The transport stream is demultiplexed in step 235 to recover data packets comprising program material to be merged with the satellite source material previously derived from the antenna in step 202. The data in the DVHS™ data packets is separated from ancillary header information in step 240. In steps 245 and 250, the header-less packets formed i n step 240 are re-formatted to be in MPEG compatible transport packet form in response to the output data format selection of the User. I n step 245, the header-less packets formed in step 240 are re-aligned and added to new MPEG compatible headers incorporating output format compatible timing information. The re-aligning process of step 245 involves delaying one or other of the header-less packet data an d the new headers in order to align and combine them in the correct sequence. In addition, conditional access information may b e incorporated in the header data in step 245 as determined by the requirements of the selected output data format. In step 250, error correction data is added to the packets with headers produced in step 245 to form MPEG compatible packets. In step 218, the MPEG compatible packets formed in step s 216 and 250 are multiplexed. Also in step 218, additional packets containing conditional access or other application specific information compatible with the selected data output format may be inserted into the datastream. Such application specific information may include, for example, information concerning transmission characteristics such as modulation and coding type or information facilitating decoding of the multiplexed datastream. In addition, NULL packets may be inserted into the output datastream in step 218 to fill the unused data capacity at the output formed in step 218. In addition, in step 218, the merged data packets are buffered and output as a composite MPEG compatible transport datastream at a data rate compatible with the requirements of, the selected output data format, transmission channel bandwidth and the intended receiving device. The inventive principles governing the re-formatting, r e - packetizing, and merging steps (steps 214, 216, 218, 245 and 250) of the Conversion system discussed in connection with Figure 1 are discussed in more detail in connection with Figures 2-8 as follows. I t is to be noted that the inventive principles apply to the conversion of a computer system to support analog or digital television, or th e conversion and channeling of a DVD video bitstream or DVHS™ bitstream to an MPEG capable set-top box, or to switching a computer display bitstream to a VCR, or to video server applications, for example. Further, because the output data format conversion is controlled within the Conversion system by software, a wide variety of packetized input or output bitstreams may be supported including I.E.E.E. 1394, for example. The Conversion system is implemented, in this exemplary embodiment, within a desk top PC (personal computer) architecture shown as system 100 in Figure 6 which is discussed later. Figure 2 shows an encoder system 10 for formatting, packetizing, and multiplexing data from a satellite and a DVHS™ source, to form composite data in a selected output data format. I n unit 14 of Figure 2, header-less packets of satellite source data are reformatted to be in MPEG compatible form in response to a User request for MPEG format output data. Unit 14 re-aligns the header- less packets and adds MPEG compatible parameters incorporating output format compatible timing information. Unit 18b adds MPEG transport headers and forms MPEG transport packets with the data produced by unit 14 to form MPEG compatible packets. Similarly, in unit 12, header-less packets of DVHS™ source data are re-formatted to be in MPEG compatible form in response to the User request for MPEG format output data. Unit 12 re-aligns the header-less packets and adds MPEG compatible parameters incorporating output format compatible timing information. Unit 18a adds MPEG transport headers and forms MPEG packets with the data produced by unit 12 to form MPEG compatible packets. Timing and conditional access data compatible with the MPEG transport packets produced in units 12 an d 14 is formed in unit 16. Unit 18c periodically incorporates a system clock reference in the packets with headers to form MPEG compatible system transport packets. Unit 20 multiplexes and merges the satellite data, DVHS™ data and timing MPEG compatible packets, produced by units 1 8a, 18b and 18c respectively. The data rate and bandwidth of the unit 2 0 can accommodate a multitude of video, audio, timing, and conditional access data signals. Unit 20 also forms and inserts NULL packets into the multiplexed datastream to fill the unused data transmission capacity in the output datastream from unit 20. In addition, unit 2 0 buffers and outputs a composite MPEG compatible transport datastream at a data rate compatible with the requirements of the selected output data format, transmission channel bandwidth and a n intended receiving device, in accordance with the principles of th e invention. The composite datastream output from unit 20 is modulated to be suitable for transmission on a selected transmission channel by unit 22. In unit 22, the composite datastream output from unit 20 is digitally modulated, filtered, converted from digital to analog, and mixed with a carrier signal produced by local oscillator 24 in mixer 26. The resultant modulated signal is output on a transmission channel to a decoding device. Figure 3 shows a decoder system 30, according to the invention, for receiving and decoding a datastream containing data from two different sources. The modulated carrier signal 28 from system 10 of Figure 2 is converted to digital form and processed b y tuner 32 and demodulator 34. Tuner 32 includes radio frequency (RF) tuner and intermediate frequency (IF) mixer and amplification stages for down-converting the input signal to a lower frequency b and suitable for further processing. The resultant digital output signal is demodulated and decoded by unit 34 to provide a transport datastream for further decoding by decoder 30. The transport stream from unit 34 is demultiplexed b y unit 36 of decoder 30. Unit 36 separates data according to type bas ed on an analysis of Packet Identifiers (PIDs) contained within header information in the transport stream from unit 34. Unit 36 provides video information packets to unit 38a, audio information packets to unit 38b and timing and conditional access information packets to unit 38c. De-packetizer units 38a, 38b, and 38c provide data and control of associated buffers 40a, 40b and 40c that enables sequential output of video, audio and timing data to video decoder 44 and audio decoder 46. MPEG video and audio decoders 44 and 46 respectively, decode the input video and audio data from units 40a and 40b, i n accordance with the MPEG standard, using the timing and conditional access data provided by unit 42. The encoding and decoding system, comprising encoder 1 0 of Figure 2 and decoder 30 of Figure 3, can be modeled as a rate buffering system. It is necessary to control the data rate in this rate buffering system to keep the buffers 40a and 40b at the decoder 3 0 from overflowing or underflowing. This problem does not occur if th e average rate at which data is consumed at the decoder 30 is equal to the average rate at which data is produced by the encoder 10. Therefore, the encoder 10 and decoder 30 must be synchronized such that they are operating in step with each other. This is the purpose of the timing data provided with the MPEG video and audio data. Video and audio MPEG encoding is performed on frame boundaries. This implies that the video and audio composite output from the merged sources of system 10 of Figure 2 is constructed of digitally compressed MPEG data frames, derived from their respective sources. In general, compressed video frames are not the same size a s compressed audio frames. Decoding timing data and presentation timing data is produced with each compressed frame of video and audio data. This timing data is used by the decoder to synchronize th e decoding and presentation of video and audio frames as they enter the decoder's buffers. A sample of the decoding timing data is referred to as the DTS (Decoding Time Stamp) value. A presentation timing data sample is referred to as the PTS (Presentation Time Stamp) value. The DTS and PTS timing samples are derived from a common encoder system clock. Sampling the encoder system clock a t the video and audio target decoding intervals produces the DTS values for video and audio respectively. In a similar manner, sampling th e encoder system clock at the video frame rate and audio frame rate will produce the PTS values for video and audio respectively. As a n example, begin with the following definitions: F a « = Audio frame rate in audio frames per second F V p = Video frame rate in video frames per second T a p = Audio frame period = p — T v0 = Video frame period = — v rNp Tad( n ) = Audio target decoding time T v( j(n) = Video target decoding time DTS a = Audio decode time stamp DTS V = Video decode time stamp PTS a = Audio presentation time stamp PTS V = Video presentation time stamp 0 = Encoder system clock Then video and audio DTS and PTS samples are related to th e system encoder clock by the following equations: DTS a (n) = 0(T ad (n)) PTS a (n) = 0(nT ap ) DTS v (n) = 0(T v d(n)) PTS v (n) = 0(nT vp ) n = 1,2,3, -. The target decoding times, T ac j(n) and T vc j(n), may vary, whereas the presentation time periods, T a p and T V p, are fixed, and periodic. In addition to the DTS and PTS samples, periodic samples of th e encoder system clock are transmitted to the decoder 30. These samples of the encoder system clock are used by the decoder to synchronize the decoding process to the encoding process. Periodic samples of the encoder system clock are referred to as SCR (System Clock Reference) values. A decoder 30 (Figure 3) compatible with encoder 10 (Figure 2) will have a common decoder system clock for audio and video decoding. The SCR values transmitted by encoder system 10, are used by decoder 30 to set the decoder system clock to the same time as the encoder system clock. Figure 4 shows a system for generating timing information for a datastream containing data from two different sources. Continuing with the system of Figure 2, conditional access data derived in unit 16 is provided by encoding system 10 to provide security features to the transmitted data. This may entail the use of an encryption algorithm to scramble the compressed data produced by the satellite and DVHS™ sources in units 12 and 14 respectively. Decoder 30 decrypts the received scrambled data in units 38a an d 38b respectively before it is used by the video and audio MPEG decoders 44 and 46. The decryption function is activated b y transmitting a conditional access code to decoder 30. This enables a service provider to minimize unauthorized access to encrypted programs. In the exemplary embodiment of Figure 2, the data produced by units 12, 14 and 16 is formatted into fixed length transport packets. In addition, as previously mentioned, the audio and video data packets associated with the DVHS™ and satellite d ata sources are individually identified by a packet identifier code. I n encoder system 10 of Figure 2, there are four transport packet types . These are MPEG video packets, MPEG audio packets, system packets, and NULL packets. MPEG video packets contain MPEG video data, an d MPEG audio packets contain MPEG audio data. Typically, a group of transport packets are required to hold all the data associated with one MPEG video frame. This may also be true for an MPEG audio frame. Given this structure, one packet in a group of MPEG video packets will contain the DTS and PTS values for the MPEG video frame represented in that group. Similarly, one packet in a group of MPEG audio packets will contain the DTS and PTS values for the MPEG audio frame represented in that group. A system packet contains an SCR value an d conditional access data. NULL packets typically comprise zero-filled data. In encoder 10 (Figure 2), unit 20 multiplexes th e transport packets produced by units 12, 14 and 16 following processing in units 18a, 18b and 18c as previously described. The multiplexing process produces a continuous stream of transport packets containing data from the satellite and DVHS™ sources. Transport packets produced by a particular data source, appear in the multiplexed composite packet stream output by unit 20 at a frequency which is directly proportional to the data rate of its corresponding data source. Figure 5 shows a composite packetized datastream from unit 20 (Figure 2) containing data from the satellite and DVHS™ sources. In the exemplary embodiment, a fixed data rate, at th e output of unit 20, is chosen to accommodate the combined data rate s of all the data sources corresponding to units 12, 14 and 16. The output data rate capacity of unit 20 is typically greater than th e combined data rates of all the data sources. In the example shown i n Figure 5, filler transport packets are transmitted in order to match the output data rate capacity of unit 20. These filler packets are the NULL transport packets mentioned earlier. NULL packets do not contain any useful information for the decoder. Their purpose is to fill the remaining data rate capacity of unit 20 Digital modulator 22 (Figure 2) in encoder system 1 0 typically adds some form of error correction code to the output of th e unit 20. Error correction coding is used by the demodulator 34 of Figure 3 to correct for errors in the data received by decoder 30 of Figure 3. These error correction codes increase the reliability of transmitting the data. Each transport packet produced by the unit 20 (Figure 2) has a finite length error correction code added to it. Therefore, unit 20 leaves a finite length gap at the end of each transport packet in the composite output transport stream for th e insertion of this error correction code by the modulator 22. The added error correction code enables demodulator 34 of decoder 30 of Figure 3 to correct errors introduced into the packet data during transmission. Figure 6 shows a computer architecture implementing a Conversion system, according to the invention, for merging an d converting data in two different data formats from two different sources, to a selected output data format for transmission on a selected transmission channel. The Conversion system interface board 120 connects to one of the internal PC bus 110 card slots. Therefore, PC 100 with the Conversion system interface board plugged into it, constitutes the hardware implementation of the Conversion system. System 100 performs three initialization tasks in performing the process of data format conversion. Firstly, th e Conversion system interface board is configured for the selected input and output data formats. Secondly, the input data comprising data from the satellite and DVHS™ sources, as well as timing and conditional access data, is sequentially loaded into the RAM (Random Access Memory) of the PC 100. Then, a schedule for transmitting transport packets from each of the data sources is established. A PC was chosen as the computing platform due to its well known architecture and low cost. It is necessary to output composite transport stream data from unit 20 (Figure 2) at a rate compatible with the selected output data format requirements and the buffering capacity of decoder 30 (Figure 3). This requirement implies that data must flow through PC 100 at a data rate greater than, or equal to, th e output data rate of unit 20. There are tasks involved in the data format conversion other than transferring data. Consequently, it is required that the data transfer rate through the PC is several times greater than the target output data rate. PC 100 implements a n internal bus architecture that supports the data transfer rate required. The PC architecture provides three advantages including: 1 . High rate data transfers to the Conversion sy stem interface board 120 (Figure 6). 2. Flexibility through programmability. 3. Low cost implementation and established architecture. All transmitted data is stored in transport packet format. This format is maintained when the various data sources are loaded into the RAM of the PC. The flow of data through the Conversion system is from the PC RAM, across the internal bus 110 of the PC, and then to the Conversion system interface board 120. This data flow occurs at a rate of 32 bits per internal PC bus clock cycle. At the time of developing the Conversion system the maximum data transfer rate of the internal bus of the PC was 132 Mbps (Megabytes per second). This transfer rate exceeds the data rate required to meet MPEG format standards. A typical MPEG compatible output data rate is of the order of 30 Mbps (Megabits per second). Because the data transfer rate of the internal PC bus 110 is higher than the data rate a t the output of unit 20 of Figure 2, it is possible to accommodate a wide variety of data format conversions using the architecture shown in Figure 6. The Conversion system interface board 120 shown in Figure 7 performs data rate conversion using FIFO (First-In First-Out) memory 128. Data enters the FIFO at the data transfer rate of th e internal PC bus 110 and data leaves the FIFO 128 at the data rate of the multiplexed packet stream being generated. The output data rate of the Conversion system interface board 120 is controlled b y oscillator 132 on the board. The frequency of oscillator 132 is interpreted as a bit clock. Even though data flows through the Conversion system interface FIFO 128 at 32 bits at a time, it leaves the Conversion system interface board in either a bit serial format o r a byte serial format. Therefore, the output clock that accompanies th e data is either the same frequency as the oscillator clock 132, or it is the oscillator clock frequency divided by eight. These two output clocks are used for the bit serial output and byte serial output respectively. The MPEG standard permits various kinds of user data to be employed in particular applications. System 100 of Figure 6 generates two categories of user data at the picture layer. The first category includes user data which is essential. Each picture in the MPEG compliant composite bit stream employs this type of user data. For example, essential user data includes synchronization information required by decoder 30. The other category of user data is optional data that implements particular features such as subtitling, for example. System 100 generates user data fields at the MPEG picture layer to convey synchronization information including Presentation Time Stamp (PTS) and Decoding Time Stamp (DTS) timing indicators. The PTS is designed to synchronize the display process. The PTS specifies the intended time of presentation in the decoder of th e associated picture information. The DTS is used to synchronize th e decoding process. The DTS indicates the intended time at which the associated picture information is to be decoded. System 100 parses the MPEG elementary video bit stream inputs and calculates PTS and DTS indicators for each picture. The values of the PTS and DTS for a particular picture are computed according to display and decoding characteristics and the picture type, i.e., field picture or frame picture. Both PTS and DTS are measured in the number of periods of the system 100 encoder clock. In addition, system 100 generates a number of optional user data fields in response to user selection including closed captioning, subtitle, pan and scan, no color burst, chroma flag, and field display flag. Each of these user data types implements a specific function. For example, the pan and scan user data field may be us ed to convert a 16x9 video picture display format to a 4x3 display format. Upon user selection of the pan and scan option, system 1 00 software generates the pan and scan user data field and inserts it i n the composite output datastream. The subtitle user data field may b e used to insert closed captioning in multiple languages in the output composite datastream. This may be used, for example, in areas where English is not the native language and where video receivers do not have built-in closed captioning circuitry. A user may command system 100 to generate and insert subtitle user data in the output composite datastream with any combination of the supported languages via a keyboard interface, remote control, telephone keypad or any other interface system. System 100 may also be used to create bit streams in a selectable data format for test purposes such as for the multi-channel multi-point distribution system (MMDS) or the digital video disc (DVD), for example. Following insertion of the user data fields in the composite output datastream, system 100 formats the packets comprising this datastream into MPEG compatible transport packets. Each formatted packet consists of a fixed number of bytes comprising a header and a payload. The transport packet header supports generic transport services such as the encryption control, asynchronous cell multiplexing, and error control. The header consists of control information and a packet identifier (PID) to support the multiplexing capabilities of video, audio, and data services. The header also includes an adaptation field that may be used to pack the variable length MPEG data into fixed length cells. The transport packet payload includes data containing timing and conditional access information, and service specific data related to MPEG video services, for example. System 100 of Figure 6 generates the composite output converted datastream by initializing internal software parameters , and by configuring interface board 120 to provide a multiplexed composite output datastream. An important factor involved in initializing interface board 128 for data packet format conversion is the data rate that is to be used in outputting the composite datastream. The output data rate is dependent on a number of parameters including, transport packet size, the number of error correction bytes per packet, and the output clock frequency. A transport packet size is chosen based on the particular transport protocol desired for the converted composite datastream output format (here MPEG format). As previously discussed, each transport packet has an error correction code appended to it by modulator 22 (Figure 2). The size of the error correction code is equal to the number of error correction bytes for each transport packet. System 100 (Figure 6) leaves a gap of bytes a t the end of each transmitted packet. This gap has a size equal to the number of error correction bytes desired. Modulator 22 of Figure 2 inserts an error correction code in the packet stream where the byte gaps are left by system 100. Upon determining a transport packet size, and the number of error correction bytes per packet, a composite output transport stream is generated by multiplexing input data in a manner similar to that previously described in connection with unit 20 of Figure 2. Upon determination of the transport packet size, the number of error correction bytes per packet, and the output clock frequency, the output information data rate capacity is calculated. The information data rate capacity is interpreted as the maximum rate that data is transmitted through the Conversion system of s ys tem 100, without accounting for the additional data added by the error correction code. One bit of data is processed on each cycle of the clock so that the output clock may be interpreted as a bit clock. Therefore, the overall data rate capacity, including the data from the error correction code, is equal to the frequency of the output clock. The overall data rate and the information rate are therefore measured i n bps (Bits Per Second). The information data rate capacity is derived as Psize Psize + E s j ze where: R = Information data rate capacity in bps Y = Overall data rate capacity in bps Psize = Transport packet size in bytes EC s i ze = Number of error correction bytes Figure 8 shows a memory allocation for memory 108 of the computer architecture of Figure 6. Memory 108 is used to sequentially hold video and audio input data packets from the satellite, DVHS™ input sources and system and NULL packets. The allocated system 100 memory is segmented into buffers to store these transport packets. As previously mentioned, the contents of a system packet are the SCR value and the conditional access information. Each transmitted system packet is held in a single buffer and is used to continually update the SCR value because the SCR value represents the current time. The contents of NULL packets do not change over time. Therefore, one transport packet length buffer is also used to hold the NULL packet data. In order to establish the multiplexing schedule, the data rate for each of the transport packet types must be determined. The data rate for the NULL packet is handled differently however. This is due to the manner in which NULL packets are used. A NULL packet is used as a filler to make up for the unused information data rate capacity left by the other packet types. It is required that th e combined data rate of all packet types must equal R. Therefore, th e data rate for NULL packets depends on the combined data rate of th e other packet types. System 100 generates an MPEG compatible composite output datastream at a data rate computed to accommodate the data added during the user data insertion and packetization processing. The data added during this processing affects the information data rate required for the MPEG composite transport packet stream. The data rate is computed using the size of the MPEG transport packet data or file being converted, the video frame rate, and the number of compressed frames being converted as follows, F size*8* F rate BR = r count where: BR = information rate or bit rate in bps Fsize = s * ze i n bytes of MPEG transport packet data or file being converted. F rate = Frame rate in fps (Frames Per Second) F count = Frame count. This equation can be used for both MPEG video and MPEG audio transport packet streams. In addition, system 100 determines the multiplexing ratio for each of the transport packet types. The multiplexing ratio is a dimensionless number which indicates how often a particular transport packet type appears in the multiplexed composite packet stream. This number is a positive fraction between zero and one. A multiplexing ratio is established for all transport packet types with the exception of system packets. The multiplexing ratios for MPEG video, MPEG audio, and NULL packets is determined as follows. BR v ideo M R(video) R GE (0,1) BR audio M R(audio) = R— ^ W M R(NULL) = R = l Mn = Multiplexing ratio A packet schedule is established for each packet type. The packet schedule is a number that indicates when a particular packet typ e should be sent. After a packet is sent, the associated packet schedule is updated to reflect the next time when its corresponding packet type should be sent. Updating the packet schedule is done by adding the corresponding packet schedule delta to the current packet schedule number. The packet schedule delta equations for each packet type, except for system packets, are shown below. > S D( video) ≥ P Ϊ ) (NULL) M R(video) P S D(audio) _ ≥ P Ϊ>(NULL) M R(audio) where PSQ = Packet schedule delta The update equation for a packet schedule is given by PS(n+l) = P S D for n = 0 PS(n+l) = PS(n) + PS β for n > 0 where P(n) = Packet schedule at time instant n n = Packet transmission time instant Because system packets carry the SCR value, the schedule for sending system packets is based on a simple periodic transmission. It is typically required that the SCR value be sent a t least once every 100 milliseconds. It is possible to determine when to send a system packet by counting the number of packets that have been transmitted. This is true because knowledge of the information data rate, R, permits a determination of how much time it takes for one transport packet to flow out of the system 100 interface bo ard 120. This time is defined as Ptime- Therefore, Ptime ιs calculated as, p . * 8 p = slze time R A system packet is output by system 100 at least every T system seconds. The number of transport packets, N, transmitted for Tsystem seconds to elapse is an integer and N is the greatest integer less than or equal to the value given by, system N = ■ time System 100 outputs a system packet when the packet count reaches N. The SCR values are represented as cycles of the encoder system clock, 0. Therefore, system 100 may update the SCR value a s packets are transmitted from a knowledge of and 0. An initial SCR value is determined based upon a parameter known as the system delay and the initial input PTS value. The system delays the presentation of the first MPEG video frame by the value assigned to it. The update equation for the SCR is therefore, SCR(n) = PTS(O) - SYS de}ay for n = 0 SCR(n) = SCR(n-l) + ξ ime *0 for n > 0 where SCR(n) = SCR value at time n in cycles of 0 PTS(O) = First input PTS value SYS, , = System delay value As previously discussed, the data rate for the NULL packet was dependent on the combined data rates of the other packet types. The multiplexed output composite datastream is partitioned into packet slots (see Figure 5). In the absence of other input data sources, each packet slot in the multiplexed packet stream is occupied by a NULL packet. In this example, the data rate of the NULL packet would be equal to R. However, if an input MPEG video source is added, in some of the packet slots a NULL packet would be replaced by a n MPEG video packet. In this example the data rate of the NULL packet will be less than R. This concept can be extended if either more packet types are added to the multiplexed packet stream or if the data rate of one packet type is increased. Therefore, for each packet slot of th e multiplexed composite datastream a NULL packet will occupy that slot unless there is another packet type scheduled to fill that packet slot. Consequently, the multiplexing ratio for the NULL packet is one. The system 100 (Figure 6) multiplexing algorithm is derived based on treating the multiplexed packet stream as a partition of packet slots. An example of the system 100 multiplexing algorithm is given below for multiplexing audio, video, and NULL packets. The algorithm is readily extended to multiplex video and audio packets from two sources such as the previously discussed satellite and DVHS™ sources. Note that P C ount i the count of packets that have been transmitted. 1 - Pcount = Pcount + 1 SCR(n) = SCR(n) + P t ime*0 2. IF: Pcount = THEN: a) Send a system packet b) PS NULL (n+l) = PS NULL (n) + P5 )(NULL) c) Pcount = 0 d) GOTO 1 ELSE: Continue 3. IF: PSNULL < PSvideo ^ d PSNULL < PSaudio THEN: a) Send a NULL packet b) PSNULL (n+1) = PSNULL(n) + PSNULL) c) GOTO 1 ELSE IF: PSvideo £ PSaudio and PSvideo £ PSNULL THEN: a) Send a video packet b) PSvideo (n+1) = PS v ideo(n) + PS £)(video) c) PSNULL (n+1) = PSNULL(n) + d) GOTO 1 ELSE: a) Send an audio packet b) PS audi0 (n+1) = PS aud io (n) + P£> (audio) c) PSNULL (n+1) = PSNULL(n) + P %>(NULL) d) GOTO 1 The simplicity of this algorithm permits it to b e implemented in real-time using the computer architecture of sy stem 100 of Figure 6. The architecture of Figure 6 is not exclusive. Other architectures may be derived in accordance with the principles of the invention to accomplish the same objectives. Further, the functions of the elements of the Figure 6 architecture and the process steps of Figure 1 may be implemented in whole or in part in hardware or within the programmed instructions of a microprocessor such as processor 102 of Figure 6. In addition, the principles of the invention apply to non-MPEG compatible input and output data formats.

Claims: CLAIMS 1. A method for digital data format conversion, comprising the steps of: de-packetizing an input packetized datastream; forming a timing recovery parameter in response to a desired output data format; re-packetizing said depacketized data in response to said desired output data format; incorporating said timing recovery parameter in said r e - packetized data; multiplexing said re-packetized data in response to said desired output data format; and, outputting said multiplexed data onto an output channel. 2. A method for merging digital data from a plurality of data sources, comprising the steps of: de-packetizing a first input packetized datastream; de-packetizing a second input packetized datastream; forming timing recovery parameters in response to a desired output data format; re-packetizing said first depacketized input data to form first re-packetized data; re-packetizing said second depacketized input data to form second re-packetized data; incorporating said timing recovery parameters in said first and second re-packetized data; multiplexing said first and second re-packetized data in response to said desired output data format; and, outputting said multiplexed data onto an output channel. 3. A method according to claim 1 or 2, wherein said d e - packetizing step comprises the step of removing header information from packets of said input packetized datastream. 4. A method according to claim 1 or 2, wherein said r e - packetizing step comprises the step of adding header information compatible with said desired output data format to said depacketized data. 5. A method according to claim 1 or 2, wherein said re - packetizing step comprises the step of re-aligning said depacketized data. 6. A method according to claim 1 or 2, further including the step of incorporating an error correction code compatible with said desired output data format within said multiplexed data. 7. A method according to claim 1 or 2, further including the step of incorporating conditional access information compatible with said desired output data format within said multiplexed data. 8. A method according to claim 1, further including th e step of incorporating null data within said multiplexed data. 9. A method according to claim 1 or 2, further including the step of selecting said desired output data format from a plurality of output formats including an MPEG compatible format. 10. A method according to claim 1 or 2, wherein said multiplexing step includes the step of buffering said re-packetized data for output at a different data rate to data in said input packetized datastream. 11. A method according to claim 1, wherein said multiplexing step comprises the step of multiplexing packets from a source different to the source of said input packetized datastream with said re-packetized data to provide said multiplexed data. 12. A method according to claim 11, wherein said packets from said different source are packets of a type included in the group comprising: null data; conditional access data; timing data; and different program data. 13. A method according to claim 1 or 2, further including the step of converting data from an analog source to form said input packetized datastream. 14. A method according to claim 1, wherein said step of incorporating said timing recovery parameter comprises incorporating at least one of, a System Clock Reference (SCR), a Presentation Time stamp (PTS), and a Decoding Time S tamp (DTS), into said re-packetized data. 15. A method according to claim 1, further including th e step of demultiplexing an input datastream to form said input packetized datastream. 16. A method according to claim 2, wherein said r e - packetizing steps comprise the step of incorporating conditional access information compatible with said desired output data format within said first re-packetized input data and within said second re-packetized input data. 17. A method according to claim 2, further including th e step of adding null data to said depacketized first input packetized data. 18. A method according to claim 2, wherein said multiplexing step comprises the step of multiplexing packets of a type included in the group comprising: null data; conditional access data; and timing data, with packets of said first and second re-packetized data to provide said multiplexed data. 19. A method according to claim 2, wherein said step of incorporating said timing recovery parameter comprises incorporating at least one of, a System Clock Reference (SCR), a Presentation Time stamp (PTS), and a Decoding Time S tamp (DTS) into said multiplexed data. 20. Data format conversion apparatus for providing data in a desired output format, comprising: a processor (100), including a central processing unit (102), a cache (106), a memory controller (104), a system memory (108), an internal system bus (110), a storage device memory (118), a storage device controller (116), a graphics controller (112) and a monitor (114); and a system interface (120) for packetizing at least two signals from two signal sources, multiplexing data from said at least two signals, producing an encoded output and modifying the frequency of said encoded output, said system interface being coupled to said processor (100) via said system bus wherein said encoded output serves as the input for a decoding system. 21. Apparatus according to claim 20, wherein said system interface includes: means for adding header information compatible with said desired output format in producing said encoded output. 22. Apparatus according to claim 20, wherein said s ystem interface includes: means for buffering said encoded output to produce a buffered encoded output at a different data rate to data in said tw o signals from two signal sources. AMENDED CLAIMS [received by the International Bureau on 21 October 1998 (21.10.98) ; original claims 1-22 replaced by new claims 1-29 (6 pages) ] 1. A method for digital data format conversion, comprising the steps of: de-packetizing an input packetized datastream of a first data packet structure; forming a timing recovery parameter in response to a second data packet structure different to said first data packet structure; re-packetizing said depacketized data in response to said second data packet structure; incorporating said timing recovery parameter in said re-packetized data; multiplexing said re-packetized data in response to said second data packet structure; and, outputting said multiplexed data onto an output channel. 2. A method according to claim 1, wherein said d e - packetizing step comprises the step of removing header information from packets of said input packetized datastream. 3. A method according to claim 1, wherein said r e - packetizing step comprises the step of adding header information compatible with said second data packet structure to said depacketized data. 4. A method according to claim 1, wherein said r e - packetizing step comprises the step of re-aligning said depacketized data. 5. A method according to claim 1, further including the step of incorporating an error correction code compatible with said second data packet structure within said multiplexed data. 6. A method according to claim 1, further including th e step of incorporating conditional access information compatible with said second data packet structure within said multiplexed data. 7. A method according to claim 1, further including th e step of incorporating null data within said multiplexed data. 8. A method according to claim 1 , further including th e step of selecting said second data packet structure from a plurality of output packet structures different to said first data packet structure including an MPEG compatible packet structure. 9. A method according to claim 1, wherein said multiplexing step includes the step of buffering said re-packetized data for output at a different data rate to data in said input packetized datastream. 10. A method according to claim 1, wherein said multiplexing step includes the step of outputting said multiplexed data at a data rate exceeding the data rate of said input packetized datastream. 11. A method according to claim 10, wherein at least part of the excess bandwidth produced b y using said data rate exceeding the data rate of said input packetized datastream is occupied by data packets of at least one of the following types (a) null data; (b) conditional access data; (c) timing data; and (d) different program data. 12. A method according to claim 1, further including the step of converting data from an analog source to form said input packetized datastream. 13. A method according to claim 1, wherein said step of incorporating said timing recovery parameter comprises incorporating at least one of, a System Clock Reference (SCR), a Presentation Time stamp (PTS), and a Decoding Time Stamp (DTS), into said re-packetized data. 14. A method according to claim 1, further including the step of demultiplexing an input datastream to form said input packetized datastream. 15. A method for merging digital data from a plurality of data sources, comprising the steps of: de-packetizing a first input packetized datastream of a first data packet structure; de-packetizing a second input packetized datastream of a second data packet structure different to said first data packet structure; forming timing recovery parameters in response to said second data packet structure; re-packetizing said first depacketized input data to form first re-packetized data; re-packetizing said second depacketized input data to form second re-packetized data; incorporating said timing recovery parameters in said first and second re-packetized data; multiplexing said first and second re-packetized data in response to said second data packet structure; and, outputting said multiplexed data onto an output channel. 16. A method according to claim 15, wherein said d e - packetizing steps comprise the step of removing header information from packets of said first and second input packetized datastreams. 17. A method according to claim 15, wherein said r e - packetizing steps comprise the step of adding header information compatible with said second data packet structure to said first depacketized input data and to said second depacketized input data. 18. A method according to claim 15, wherein said re - packetizing steps comprise the step of re-aligning said first depacketized input data and said second depacketized input data. 19. A method according to claim 15, further including the step of adding an error correction code compatible with said second data packet structure to said multiplexed data. 20. A method according to claim 15, wherein said re - packetizing steps comprise the step of incorporating conditional access information compatible with said second data packet structure within said first re-packetized input data and within said second r e - packetized input data. 21. A method according to claim 15, further including the step of adding null data to said depacketized first input packetized data. 22. A method according to claim 15, further including the step of selecting said second data packet structure from a plurality of packet structures including an MPEG compatible packet structure. 23. A method according to claim 15, wherein said multiplexing step includes the step of outputting said multiplexed data at a data rate exceeding the effective composite data rate of said first and second input packetized datastreams. 24. A method according to claim 23, wherein at least part of the excess bandwidth produced b y using said data rate exceeding the effective composite data rate of said first and second input packetized datastreams is occupied b y data packets of at least one of the following types (a) null data; (b) conditional access data; and (c) timing data. 25. A method according to claim 15, further including the step of converting data from an analog source to form said first input packetized datastream. 26. A method according to claim 15, wherein said step of incorporating said timing recovery parameter comprises incorporating at least one of, a System Clock Reference (SCR), a Presentation Time stamp (PTS), and a Decoding Time Stamp (DTS) into said multiplexed data. 27. Data format conversion apparatus for providing data in a desired output format, comprising: a processor, including a central processing unit, a cache, a memory controller, a system memory, an internal system bus, a storage device memory, a storage device controller, a graphics controller and a monitor; and a system interface for packetizing at least two signals of different packet structure from two signal sources, multiplexing data from said at least two signals, producing an encoded output and modifying the frequency of said encoded output, said sy stem interface being coupled to said processor via said system bus wherein said encoded output serves as the input for a decoding system. 28. Apparatus according to claim 27, wherein said system interface includes: means for adding header information compatible with said desired output format in producing said encoded output. 29. Apparatus according to claim 27, wherein said system interface includes: means for buffering said encoded output to produce a buffered encoded output at a different data rate to data in said two signals from two signal sources.

Inventors: BRIDGEWATER KEVIN ELLIOTT, HORLANDER THOMAS EDWARD, LU LIGANG, SETTLE TIMOTHY FORREST, BRIDGEWATER, KEVIN, ELLIOTT, HORLANDER, THOMAS, EDWARD, LU, LIGANG, SETTLE, TIMOTHY, FORREST
Applicants: THOMSON CONSUMER ELECTRONICS, THOMSON CONSUMER ELECTRONICS, INC.
Application year: 1998
Main classification: H04N7
IPC codes: H04H1, H04L29, H04N7