JP2006067568A - Data processor, program, and recording medium - Google Patents

Data processor, program, and recording medium Download PDF

Info

Publication number
JP2006067568A
JP2006067568A JP2005217074A JP2005217074A JP2006067568A JP 2006067568 A JP2006067568 A JP 2006067568A JP 2005217074 A JP2005217074 A JP 2005217074A JP 2005217074 A JP2005217074 A JP 2005217074A JP 2006067568 A JP2006067568 A JP 2006067568A
Authority
JP
Japan
Prior art keywords
packet
time information
information
input
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005217074A
Other languages
Japanese (ja)
Inventor
Satoru Matsuyama
悟 松山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2005217074A priority Critical patent/JP2006067568A/en
Publication of JP2006067568A publication Critical patent/JP2006067568A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data processor where a time stamp synchronized with the clock of an encoder can be added to a TS (Transport Stream)packet at low costs, and to provide a program and a recording medium. <P>SOLUTION: A PCR extraction means 34 extracts a PCR (Program Clock Reference) from the TS packet containing the PCR. A time stamp shaping means 38 shapes the PCR into a prescribed shape and loads the PCR to a counter 16 to correct a counted value, and sends the PCR to a time stamp adding means 40. The time stamp adding means 40 adds the PCR to the TS packet containing the PCR as a time stamp, and adds the counted value of the counter 16 to the TS packet which does not contain the PCR as the time stamp. By correcting the counted value of the counter 16 by the PCR, the time stamp synchronized with the clock of an encoder can be added to the TS packet. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、データ処理装置、プログラムおよび記録媒体に関し、特に、MPEG(Moving Picture Experts Group)2−TS(Transport Stream)形式に従うデータを伝送するシステムにおいてジッタを軽減し、符号化装置と復号化装置との間のクロックを同期させるためのデータ処理装置、プログラムおよび記録媒体に関するものである。   The present invention relates to a data processing apparatus, a program, and a recording medium, and more particularly to an encoding apparatus and a decoding apparatus that reduce jitter in a system that transmits data according to MPEG (Moving Picture Experts Group) 2-TS (Transport Stream) format. The present invention relates to a data processing device, a program, and a recording medium for synchronizing the clock with

ホームネットワークにおいて、MPEG(Moving Picture Experts Group)2−TS(Transport Stream)形式に従って符号化された映像や音声などのデータをIP(Internet Protocol)に従って伝送させる技術が広がりつつある。   In home networks, a technique for transmitting data such as video and audio encoded according to MPEG (Moving Picture Experts Group) 2-TS (Transport Stream) format according to IP (Internet Protocol) is spreading.

画像圧縮符号化の国際標準規格であるMPEG2規格に従ってストリームを生成するMPEG2システムでは、伝送ビットエラーの発生の少ない蓄積媒体からの伝送を想定し、1本のストリームで1つのプログラムを構成するMPEG2−PS(Program Stream)形式と、伝送ビットエラーの発生が予想される通信回線を用いた伝送を想定し、1本のストリームで複数のプログラムを構成可能なMPEG2−TS形式の2種類のフォーマットとを規定している。   In an MPEG2 system for generating a stream in accordance with the MPEG2 standard, which is an international standard for image compression coding, MPEG2-, which constitutes one program with one stream, is assumed to be transmitted from a storage medium with few transmission bit errors. PS (Program Stream) format and two formats of MPEG2-TS format that can configure a plurality of programs with one stream assuming transmission using a communication line in which transmission bit errors are expected to occur. It prescribes.

MPEG2−TSを伝送するシステムにおいてエンコーダ(符号化装置)におけるクロックとデコーダ(復号化装置)におけるクロックが同期していない場合、単位時間に伝送されるデータ量と再生されるデータ量に違いが生じるため映像や音声が乱れるという問題が生じる。エンコーダとデコーダとの間でクロックを同期させるため、エンコーダからPCR(Program Clock Reference、プログラム時刻基準参照値)と称される基準クロック情報が送信される。PCRは100ミリ秒以内に最低1つ送られるようMPEG2システムの規格によって定められる。   In the MPEG2-TS transmission system, when the clock in the encoder (encoding device) and the clock in the decoder (decoding device) are not synchronized, there is a difference between the amount of data transmitted per unit time and the amount of data reproduced. Therefore, there arises a problem that the video and audio are disturbed. In order to synchronize the clock between the encoder and the decoder, reference clock information called PCR (Program Clock Reference) is transmitted from the encoder. According to the MPEG2 system standard, at least one PCR is sent within 100 milliseconds.

PCRはMPEG2−TS形式に従って符号化されたパケット(以下TSパケットと称する)に挿入されて送信される。PCRはエンコーダのクロックを計数器(カウンタ)でカウントした値である。MPEG2システムではクロックの周波数は27MHz±810Hzと定められる。   The PCR is inserted into a packet encoded in accordance with the MPEG2-TS format (hereinafter referred to as a TS packet) and transmitted. PCR is a value obtained by counting the clock of the encoder with a counter. In the MPEG2 system, the clock frequency is defined as 27 MHz ± 810 Hz.

デコーダはエンコーダとクロックを同期させるため、PLL(Phase Locked Loop)回路を有する。PLL回路はPCRの値とPCRを含むTSパケットが到着する時間間隔とを参照し、デコーダのクロックの周波数がエンコーダのクロックの周波数に一致するようにクロックの周波数を変化させる。   The decoder has a PLL (Phase Locked Loop) circuit to synchronize the clock with the encoder. The PLL circuit refers to the PCR value and the time interval at which the TS packet including the PCR arrives, and changes the clock frequency so that the decoder clock frequency matches the encoder clock frequency.

PLL回路の動作を安定させるため、各TSパケットは、伝送ゆらぎ(ジッタ)が極力発生しないように、つまり、エンコーダから出力された時間間隔を保ちながらデコーダまで伝送されることが必要である。ジッタが生じる場合としては、たとえばネットワークの負荷が高い状態が一時的に発生してデータ伝送に遅延が生じた場合や、ネットワーク上でパケットの欠落が生じたために受信装置が送信装置にパケットの再送を要求する場合などがある。   In order to stabilize the operation of the PLL circuit, each TS packet needs to be transmitted to the decoder so that transmission fluctuation (jitter) does not occur as much as possible, that is, while maintaining the time interval output from the encoder. When jitter occurs, for example, when a high network load occurs temporarily and data transmission is delayed, or when a packet is lost on the network, the receiving device retransmits the packet to the transmitting device. May be required.

IPネットワークは基本的にジッタを補正する機能を有していない。よって、ホームネットワークにおいてTSパケットがIPパケットにカプセル化されてデコーダに伝送される場合、IPネットワーク上で生じたジッタによってデコーダにおけるPCRの値に対するPCRの到着間隔の誤差が大きくなる可能性がある。なお、カプセル化とは、ネットワークプロトコルにおいて上位層に属するデータを下位層の情報によって処理することをいう。   An IP network basically has no function for correcting jitter. Therefore, when a TS packet is encapsulated in an IP packet and transmitted to a decoder in the home network, an error in the PCR arrival interval with respect to the PCR value in the decoder may increase due to jitter generated on the IP network. Encapsulation means that data belonging to an upper layer in a network protocol is processed by lower layer information.

この場合、PLL回路の動作が収束しないのでエンコーダとデコーダとの間でクロックが同期しない。その結果、再生された映像や音声に乱れが生じることになる。   In this case, since the operation of the PLL circuit does not converge, the clock is not synchronized between the encoder and the decoder. As a result, the reproduced video and audio are disturbed.

図20は、従来の伝送システムの構成例を示す図である。
図20を参照して、コンテンツ作成元101における符号化手段101AによってTSパケットが生成される。TSパケットは符号化手段101Aから家庭内システム102に送られる。
FIG. 20 is a diagram illustrating a configuration example of a conventional transmission system.
Referring to FIG. 20, a TS packet is generated by encoding means 101A in content creator 101. The TS packet is sent from the encoding means 101A to the home system 102.

家庭内システム102は、チューナ103と、送信コントローラ104と、ネットワーク105と、受信コントローラ106と、再生装置107とを備える。以下、送信コントローラ104および受信コントローラ106の動作について概要を説明する。   The home system 102 includes a tuner 103, a transmission controller 104, a network 105, a reception controller 106, and a playback device 107. Hereinafter, an outline of operations of the transmission controller 104 and the reception controller 106 will be described.

送信コントローラ104はTSパケットをIPパケットにカプセル化する前に、符号化手段101Aのクロックと同じ周波数(27MHz)の固定クロック111およびカウンタ116によってTSパケットを受けるごとにカウンタ116のカウント値をTSパケットに付加する。このカウント値はジッタを補正するための情報であり、タイムスタンプと称される。なお、タイムスタンプはTSパケットのヘッダ情報として付加されるので、以後、このヘッダをタイムスタンプヘッダと称することにする。   Before the transmission controller 104 encapsulates the TS packet into the IP packet, every time the TS packet is received by the fixed clock 111 having the same frequency (27 MHz) as the clock of the encoding unit 101A and the counter 116, the count value of the counter 116 is changed to the TS packet. Append to This count value is information for correcting jitter and is called a time stamp. Since the time stamp is added as header information of the TS packet, hereinafter, this header will be referred to as a time stamp header.

タイムスタンプヘッダが付加されたTSパケットは、通信パケット形成手段112において、たとえばHTTP(HyperText Transfer Protocol)、TCP(Transmission Control Protocol)、IPなどの各プロトコルに従うヘッダが付加されることによってカプセル化される。カプセル化されたパケット(IPパケット)はネットワーク105を経由し、受信コントローラ106に送られる。   The TS packet to which the time stamp header is added is encapsulated in the communication packet forming means 112 by adding a header according to each protocol such as HTTP (HyperText Transfer Protocol), TCP (Transmission Control Protocol), or IP. . The encapsulated packet (IP packet) is sent to the reception controller 106 via the network 105.

受信コントローラ106は受信したIPパケットのプロトコル処理を通信コントローラ120や通信パケット分離手段121で行ない、TSパケットを取り出す。タイムスタンプヘッダが付加されたTSパケットはジッタ補正手段122に送られる。ジッタ補正手段122は図示されないバッファを含む。ジッタ補正手段122はTSパケットの送信タイミングをクロック123に同期させてバッファから復号化手段125にTSパケットを出力する。つまり、ジッタ補正手段122はタイムスタンプの値がカウンタ124のカウント値と一致するTSパケットを出力する。   The reception controller 106 performs protocol processing of the received IP packet by the communication controller 120 and the communication packet separation unit 121, and extracts the TS packet. The TS packet to which the time stamp header is added is sent to the jitter correction unit 122. The jitter correction unit 122 includes a buffer (not shown). The jitter correction unit 122 outputs the TS packet from the buffer to the decoding unit 125 in synchronization with the transmission timing of the TS packet. That is, the jitter correction unit 122 outputs a TS packet whose time stamp value matches the count value of the counter 124.

よって、ジッタ補正手段122は送信コントローラ104がTSパケットを受信したタイミングに同期させて復号化手段125にTSパケットを送信することが可能になる。なお、タイムスタンプヘッダは復号化手段125にTSパケットが出力される前にジッタ補正手段122によって取り除かれる。   Therefore, the jitter correction unit 122 can transmit the TS packet to the decoding unit 125 in synchronization with the timing at which the transmission controller 104 receives the TS packet. The time stamp header is removed by the jitter correcting unit 122 before the TS packet is output to the decoding unit 125.

ジッタを補正する方法の例として、たとえば特開2000−156838号公報(特許文献1)には、PLL回路を用いてAVビットストリームにあらかじめ記録されている時刻情報から基準クロックを生成し、基準クロックにしたがうタイムスタンプを各TSパケットに付与するタイムスタンプ付与システムの例が開示されている。
特開2000−156838号公報
As an example of a method for correcting jitter, for example, Japanese Patent Laid-Open No. 2000-156838 (Patent Document 1) uses a PLL circuit to generate a reference clock from time information recorded in advance in an AV bit stream, and An example of a time stamp assigning system that assigns a time stamp conforming to each TS packet is disclosed.
JP 2000-156838 A

図20に示されるように、家庭内システム102におけるクロックの周波数(固定クロック111の周波数およびクロック123の周波数)はジッタを補正するため、MPEG2規格で定められた27MHzに設定される。しかし、符号化手段101Aのクロックと家庭内システム102のクロックとは同期していないので、厳密には各クロックの周波数は異なっている。よって、符号化手段101AからTSパケットの送出が行なわれるにつれ、符号化手段101Aの送信タイミングに対するタイムスタンプの値の誤差が徐々に大きくなり、最終的には復号化手段125においてジッタを補正することができず、映像や音声が乱れる。   As shown in FIG. 20, the clock frequency (the frequency of the fixed clock 111 and the frequency of the clock 123) in the home system 102 is set to 27 MHz defined in the MPEG2 standard in order to correct jitter. However, since the clock of the encoding unit 101A and the clock of the home system 102 are not synchronized, the frequency of each clock is strictly different. Therefore, as the TS packet is transmitted from the encoding unit 101A, the error in the time stamp value with respect to the transmission timing of the encoding unit 101A gradually increases, and finally the decoding unit 125 corrects the jitter. Cannot be produced and the video and audio are distorted.

以上のことからタイムスタンプの値はエンコーダのTSパケット送信タイミングと同期させた値であることが必要である。しかし、エンコーダによるTSパケットの送信タイミングと送信コントローラのタイムスタンプ付加タイミングを同期させるため送信コントローラにPLL回路を備える場合、VCO(電圧制御発振器)やローパスフィルタなどが必要になるのでコストが上昇する。   From the above, it is necessary that the time stamp value is synchronized with the TS packet transmission timing of the encoder. However, if the transmission controller is provided with a PLL circuit in order to synchronize the transmission timing of the TS packet by the encoder and the time stamp addition timing of the transmission controller, a cost increases because a VCO (voltage controlled oscillator), a low-pass filter, and the like are required.

この発明は上述の課題を解決するものであって、その目的は、低コストでエンコーダのクロックと同期したタイムスタンプをTSパケットに付加することが可能なデータ処理装置、プログラムおよび記録媒体を提供するものである。   The present invention solves the above-described problems, and an object thereof is to provide a data processing device, a program, and a recording medium capable of adding a time stamp synchronized with an encoder clock at a low cost to a TS packet. Is.

この発明は、要約すれば、データ処理装置であって、符号化データがパケット化されたパケットを入力するためのデータ入力手段と、データ入力手段に入力されたパケットのうちの送信時刻情報を含む第1のパケットから送信時刻情報を抽出して出力するとともに第1のパケットを出力する抽出手段と、送信時刻情報を受け、送信時刻情報に応じた第1の時刻情報を生成する第1の生成手段と、クロック信号に応じたクロック情報を第1の時刻情報の入力に応じて補正し、送信時刻情報を含まない第2のパケットが再生されるべき時刻の基準となる時刻を示す第2の時刻情報を生成する第2の生成手段と、第1のパケットに第1の時刻情報を付加し、第2のパケットに第2の時刻情報を付加する付加手段とを備える。   In summary, the present invention is a data processing device including data input means for inputting a packet in which encoded data is packetized, and transmission time information of the packets input to the data input means Extraction means for extracting and outputting the transmission time information from the first packet and outputting the first packet, and first generation for receiving the transmission time information and generating the first time information according to the transmission time information Means and a clock signal corresponding to the clock signal is corrected in accordance with the input of the first time information, and a second time indicating a reference time of the second packet that does not include the transmission time information is to be reproduced A second generating unit configured to generate time information; and an adding unit configured to add the first time information to the first packet and add the second time information to the second packet.

好ましくは、データ入力手段で入力されたパケットが第1のパケットであるか第2のパケットであるかを判定し、付加手段においてパケットに第1の時刻情報と第2の時刻情報のいずれを付加するかを決定するパケット解析手段をさらに備える。   Preferably, it is determined whether the packet input by the data input means is the first packet or the second packet, and the adding means adds either the first time information or the second time information to the packet. Packet analysis means for determining whether to do so is further provided.

より好ましくは、パケット解析手段は、パケットの属性を示すパケット識別情報を、予め設定した値と照合し、パケットが第1のパケットであるか第2のパケットであるかを判定する。   More preferably, the packet analysis means collates packet identification information indicating the attribute of the packet with a preset value, and determines whether the packet is the first packet or the second packet.

より好ましくは、パケット解析手段は、パケットの属性を示すパケット識別情報を、予め設定した値と照合し、不要なパケットを破棄するかどうかを判定する。   More preferably, the packet analysis means collates packet identification information indicating a packet attribute with a preset value, and determines whether or not to discard an unnecessary packet.

さらに好ましくは、入力されたパケットのうちのいずれかのパケットには、パケット識別情報の属性が記述されているパケット構成情報が含まれ、パケット解析手段は、パケット構成情報を解析して、パケット識別情報の値を設定する。   More preferably, any of the input packets includes packet configuration information in which an attribute of the packet identification information is described, and the packet analysis means analyzes the packet configuration information to identify the packet Set the information value.

さらに好ましくは、入力されたパケットのうちのいずれかのパケットには、パケット識別情報の属性が記述されているパケット構成情報が含まれ、パケット解析手段は、第1の時刻情報が含まれていることを示すパケット識別情報との照合のため、パケット構成情報を解析する機器から転送された解析結果を、予め設定した値として設定する。   More preferably, any of the input packets includes packet configuration information in which an attribute of packet identification information is described, and the packet analysis means includes first time information. For comparison with packet identification information indicating this, an analysis result transferred from a device that analyzes packet configuration information is set as a preset value.

さらに好ましくは、パケット識別情報はPID(Packet Identifier)であり、パケット構成情報はPAT(Packet Association Table)、およびPMT(Packet Map Table)である。   More preferably, the packet identification information is PID (Packet Identifier), and the packet configuration information is PAT (Packet Association Table) and PMT (Packet Map Table).

より好ましくは、付加手段は、パケット解析手段がパケットに第1の時刻情報と第2の時刻情報とのいずれを付加するかを決定できない場合には、パケットに第2の時刻情報を付加する。   More preferably, the adding means adds the second time information to the packet when the packet analyzing means cannot determine which of the first time information and the second time information is added to the packet.

より好ましくは、第2の生成手段は、第1のパケットに続いて第2のパケットが入力されると、第1の時刻情報の入力が完了し、さらに、第1のパケットの入力時刻と第2のパケットの入力時刻との差に相当する時間差が経過した後に時間差を反映させた第2の時刻情報を出力する。   More preferably, when the second packet is input subsequent to the first packet, the second generation means completes the input of the first time information, and further, the input time of the first packet and the first packet Second time information reflecting the time difference is output after a time difference corresponding to the difference between the input time of the second packet and the time elapsed.

より好ましくは、第1の生成手段は、第1のパケットの入力が開始されてからクロック情報の補正が完了するまでの経過時間と第2のパケットの入力が開始されてから第2の時刻情報が送信されるまでの経過時間との差に応じた値を送信時刻情報に付加して第1の時刻情報を生成する。   More preferably, the first generation means includes the elapsed time from the start of the input of the first packet until the correction of the clock information is completed, and the second time information from the start of the input of the second packet. The first time information is generated by adding a value corresponding to the difference from the elapsed time until the transmission to the transmission time information.

好ましくは、付加手段は、第2の時刻情報をパケットに付加した後にパケットを解析し、パケットが第1のパケットである場合には第2の時刻情報を第1の時刻情報に置換する。   Preferably, the adding means analyzes the packet after adding the second time information to the packet, and replaces the second time information with the first time information when the packet is the first packet.

さらに好ましくは、第1の生成手段は、クロック情報のデータ形式と同一になるように送信時刻情報を変換した第1の時刻情報を生成する。   More preferably, a 1st production | generation means produces | generates the 1st time information which converted transmission time information so that it may become the same as the data format of clock information.

この発明の他の局面に従うと、データ処理装置であって、符号化データがパケット化されたパケットを入力するためのデータ入力手段と、データ入力手段に入力されたパケットのうちの送信時刻情報を含む第1および第2のパケットの各々から送信時刻情報を抽出するとともに、第1および第2のパケットを出力する抽出手段とを備える。抽出手段は、第1および第2のパケットから抽出した送信時刻情報の差分と、第1および第2のパケットの入力間隔に応じて生じるクロック情報の差分との誤差を算出する。データ処理装置は、クロック情報を誤差に応じて補正し、補正されたクロック情報に基づきパケットが再生されるべき時刻の基準となる時刻を示す再生基準時刻情報を生成する生成手段と、パケットに再生基準時刻情報を付加する付加手段とをさらに備える。   According to another aspect of the present invention, there is provided a data processing device including data input means for inputting a packet in which encoded data is packetized, and transmission time information in the packet input to the data input means. Extraction means for extracting transmission time information from each of the first and second packets, and outputting the first and second packets. The extraction means calculates an error between the difference between the transmission time information extracted from the first and second packets and the difference between the clock information generated according to the input interval of the first and second packets. The data processing apparatus corrects the clock information according to the error, generates reproduction reference time information indicating a time that is a reference of the time at which the packet should be reproduced based on the corrected clock information, and reproduces the packet And an adding means for adding the reference time information.

好ましくは、抽出手段は、第1および第2のパケットの各々から抽出した送信時刻情報の値が連続しているか否かを判定し、不連続の場合には誤差を出力しない。   Preferably, the extraction unit determines whether or not the values of the transmission time information extracted from each of the first and second packets are continuous, and does not output an error if they are discontinuous.

より好ましくは、抽出手段は、第1のパケットの入力から一定期間、第2のパケットが入力されない場合には、送信時刻情報の値が不連続であると判定する。   More preferably, the extraction unit determines that the value of the transmission time information is discontinuous when the second packet is not input for a certain period from the input of the first packet.

より好ましくは、抽出手段は、第1および第2のパケットの少なくとも一方に送信時刻情報の値が不連続であることを示す情報が含まれている場合には、送信時刻情報の値が不連続であると判定する。   More preferably, the extracting means includes a value indicating that the value of the transmission time information is discontinuous when at least one of the first and second packets includes information indicating that the value of the transmission time information is discontinuous. It is determined that

さらに好ましくは、符号化データは、MPEG(Moving Picture Experts Group)2−トランスポートストリーム形式に従うデータであり、送信時刻情報は、プログラム時刻基準参照値である。   More preferably, the encoded data is data according to the MPEG (Moving Picture Experts Group) 2-transport stream format, and the transmission time information is a program time reference reference value.

さらに好ましくは、符号化データは、MPEG(Moving Picture Experts Group)2−プログラムストリーム形式に従うデータであり、送信時刻情報は、システム時刻基準参照値である。   More preferably, the encoded data is data according to MPEG (Moving Picture Experts Group) 2-program stream format, and the transmission time information is a system time reference reference value.

この発明のさらに他の局面に従うと、プログラムであって、符号化データがパケット化されたパケットを入力するためのステップと、データ入力手段に入力されたパケットのうちの送信時刻情報を含む第1のパケットから送信時刻情報を抽出して出力するとともに第1のパケットを出力するステップと、送信時刻情報を受け、送信時刻情報に応じた第1の時刻情報を生成するステップと、クロック信号に応じたクロック情報を第1の時刻情報の入力に応じて補正し、送信時刻情報を含まない第2のパケットが再生されるべき時刻の基準となる時刻を示す第2の時刻情報を生成するステップと、第1のパケットに第1の時刻情報を付加し、第2のパケットに第2の時刻情報を付加するステップとをコンピュータに実行させる。   According to still another aspect of the present invention, there is provided a first program including a step for inputting a packet in which encoded data is packetized, and transmission time information in the packet input to the data input means. Extracting and outputting the transmission time information from the packet and outputting the first packet; receiving the transmission time information; generating the first time information according to the transmission time information; and according to the clock signal Correcting the clock information according to the input of the first time information, and generating second time information indicating a time that is a reference of the time at which the second packet not including the transmission time information is to be reproduced; , Adding the first time information to the first packet and adding the second time information to the second packet.

好ましくは、パケットを入力するステップで入力されたパケットが第1のパケットであるか第2のパケットであるかを判定し、付加するステップにおいてパケットに第1の時刻情報と第2の時刻情報のいずれを付加するかを決定するステップをさらにコンピュータに実行させる。   Preferably, it is determined whether the packet input in the step of inputting a packet is a first packet or a second packet, and in the adding step, the first time information and the second time information are added to the packet. Further causing the computer to execute a step of determining which to add.

より好ましくは、決定するステップは、パケットの属性を示すパケット識別情報を、予め設定した値と照合し、パケットが第1のパケットであるか第2のパケットであるかを判定する。   More preferably, the determining step compares packet identification information indicating a packet attribute with a preset value to determine whether the packet is a first packet or a second packet.

より好ましくは、決定するステップは、パケットの属性を示すパケット識別情報を、予め設定した値と照合し、不要なパケットを破棄するかどうかを判定する。   More preferably, in the determining step, packet identification information indicating a packet attribute is compared with a preset value to determine whether or not to discard an unnecessary packet.

さらに好ましくは、入力されたパケットのうちのいずれかのパケットには、パケット識別情報の属性が記述されているパケット構成情報が含まれ、決定するステップは、パケット構成情報を解析して、パケット識別情報の値を設定する。   More preferably, any of the input packets includes packet configuration information in which an attribute of the packet identification information is described, and the determining step analyzes the packet configuration information to identify the packet Set the information value.

さらに好ましくは、入力されたパケットのうちのいずれかのパケットには、パケット識別情報の属性が記述されているパケット構成情報が含まれ、決定するステップは、第1の時刻情報が含まれていることを示すパケット識別情報との照合のため、パケット構成情報を解析する機器を用いて得られたパケット構成情報の解析結果を、予め設定した値として設定する。   More preferably, any of the input packets includes packet configuration information in which attributes of packet identification information are described, and the determining step includes first time information. In order to collate with packet identification information indicating this, the analysis result of the packet configuration information obtained using a device that analyzes the packet configuration information is set as a preset value.

さらに好ましくは、パケット識別情報はPID(Packet Identifier)であり、パケット構成情報はPAT(Packet Association Table)、およびPMT(Packet Map Table)である。   More preferably, the packet identification information is PID (Packet Identifier), and the packet configuration information is PAT (Packet Association Table) and PMT (Packet Map Table).

より好ましくは、付加するステップは、決定するステップがパケットに第1の時刻情報と第2の時刻情報とのいずれを付加するかを決定できない場合には、パケットに第2の時刻情報を付加する。   More preferably, the adding step adds the second time information to the packet when the determining step cannot determine which of the first time information and the second time information is added to the packet. .

より好ましくは、第2の時刻情報を生成するステップは、第1のパケットに続いて第2のパケットが入力されると、第1の時刻情報の入力が完了し、さらに、第1のパケットの入力時刻と第2のパケットの入力時刻との差に相当する時間差が経過した後に時間差を反映させた第2の時刻情報を出力する。   More preferably, in the step of generating the second time information, when the second packet is input subsequent to the first packet, the input of the first time information is completed. Second time information reflecting the time difference is output after a time difference corresponding to the difference between the input time and the input time of the second packet has elapsed.

より好ましくは、第1の時刻情報を生成するステップは、第1のパケットの入力が開始されてからクロック情報の補正が完了するまでの経過時間と第2のパケットの入力が開始されてから第2の時刻情報が送信されるまでの経過時間との差に応じた値を送信時刻情報に付加して第1の時刻情報を生成する。   More preferably, the step of generating the first time information includes the elapsed time from the start of the input of the first packet until the correction of the clock information is completed and the input of the second packet from the start of the input of the second packet. The first time information is generated by adding a value corresponding to the difference from the elapsed time until the second time information is transmitted to the transmission time information.

好ましくは、付加するステップは、第2の時刻情報をパケットに付加した後にパケットを解析し、パケットが第1のパケットである場合には第2の時刻情報を第1の時刻情報に置換する。   Preferably, the adding step analyzes the packet after adding the second time information to the packet, and replaces the second time information with the first time information when the packet is the first packet.

さらに好ましくは、第1の時刻情報を生成するステップは、クロック情報のデータ形式と同一になるように送信時刻情報を変換した第1の時刻情報を生成する。   More preferably, the step of generating the first time information generates the first time information obtained by converting the transmission time information so as to be the same as the data format of the clock information.

この発明のさらに他の局面に従うと、プログラムであって、符号化データがパケット化されたパケットを入力するためのステップと、入力されたパケットのうちの送信時刻情報を含む第1および第2のパケットの各々から送信時刻情報を抽出し、第1および第2のパケットを出力するとともに、第1および第2のパケットから抽出した送信時刻情報の差分と、第1および第2のパケットの入力間隔に応じて生じるクロック情報の差分との誤差を算出するステップと、クロック情報を、誤差に応じて補正し、補正されたクロック情報に基づきパケットが再生されるべき時刻の基準となる時刻を示す再生基準時刻情報を生成するステップと、パケットに再生基準時刻情報を付加するステップとをコンピュータに実行させる。   According to still another aspect of the present invention, there is provided a program that includes a step for inputting a packet in which encoded data is packetized, and first and second steps including transmission time information in the input packet. The transmission time information is extracted from each of the packets, the first and second packets are output, the difference between the transmission time information extracted from the first and second packets, and the input interval of the first and second packets A step of calculating an error from a difference in clock information generated according to the time, and a reproduction that indicates a time that is a reference of a time at which a packet is to be reproduced based on the corrected clock information by correcting the clock information according to the error The computer is caused to execute a step of generating reference time information and a step of adding reproduction reference time information to the packet.

好ましくは、算出するステップは、第1および第2のパケットの各々から抽出した送信時刻情報の値が連続しているかどうかを判定し、送信時刻情報の値が不連続の場合には、誤差を0とする。   Preferably, the step of calculating determines whether or not the value of the transmission time information extracted from each of the first and second packets is continuous, and if the value of the transmission time information is discontinuous, an error is calculated. 0.

より好ましくは、算出するステップは、第1のパケットの入力から一定期間、第2のパケットが入力されない場合には、送信時刻情報の値が不連続であると判定する。   More preferably, the calculating step determines that the value of the transmission time information is discontinuous when the second packet is not input for a certain period from the input of the first packet.

より好ましくは、算出するステップは、第1および第2のパケットの少なくとも一方に、送信時刻情報の値が不連続であることを示す情報が含まれている場合には、送信時刻情報の値が不連続であると判定する。   More preferably, in the calculating step, when information indicating that the value of the transmission time information is discontinuous is included in at least one of the first and second packets, the value of the transmission time information is Judged to be discontinuous.

さらに好ましくは、符号化データは、MPEG(Moving Picture Experts Group)2−トランスポートストリーム形式に従うデータであり、送信時刻情報は、プログラム時刻基準参照値である。   More preferably, the encoded data is data according to the MPEG (Moving Picture Experts Group) 2-transport stream format, and the transmission time information is a program time reference reference value.

さらに好ましくは、符号化データは、MPEG(Moving Picture Experts Group)2−プログラムストリーム形式に従うデータであり、送信時刻情報は、システム時刻基準参照値である。   More preferably, the encoded data is data according to MPEG (Moving Picture Experts Group) 2-program stream format, and the transmission time information is a system time reference reference value.

この発明のさらに他の局面に従うと、上記のプログラムを記録したコンピュータ読み取り可能な記録媒体である。   According to still another aspect of the present invention, a computer-readable recording medium recording the above program.

この発明のデータ処理装置、プログラムおよび記録媒体によれば、低コストでエンコーダの時刻と同期したタイムスタンプをTSパケットに付加することが可能になる。   According to the data processing device, program, and recording medium of the present invention, it is possible to add a time stamp synchronized with the time of the encoder to the TS packet at a low cost.

以下において、本発明の実施の形態について図面を参照して詳しく説明する。なお、図中同一符号は、同一または相当部分を示す。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In addition, the same code | symbol in a figure shows the same or an equivalent part.

[実施の形態1]
図1は、この発明のデータ処理装置が含まれるシステムの構成例を示す図である。
[Embodiment 1]
FIG. 1 is a diagram showing a configuration example of a system including a data processing apparatus of the present invention.

図1を参照して、コンテンツ作成元1は、たとえばデジタルテレビ放送の放送局である。コンテンツ作成元1は符号化手段1Aを含む。符号化手段1AはMPEG2規格で定められた符号化規則に従って映像や音楽などの情報を符号化し、符号化データをTSパケットとして出力する。符号化手段1Aは100ミリ秒以内に最低1つのPCRを送信する。後述するようにPCRはTSパケットに挿入される。   Referring to FIG. 1, content creator 1 is, for example, a broadcasting station for digital television broadcasting. The content creator 1 includes encoding means 1A. The encoding means 1A encodes information such as video and music according to an encoding rule defined in the MPEG2 standard, and outputs the encoded data as a TS packet. The encoding means 1A transmits at least one PCR within 100 milliseconds. As will be described later, the PCR is inserted into the TS packet.

家庭内システム2は符号化手段1AからTSパケットを受信する。家庭内システム2は、チューナ3と、送信コントローラ4と、ネットワーク5と、受信コントローラ6と、再生装置7とを備える。   The home system 2 receives the TS packet from the encoding means 1A. The home system 2 includes a tuner 3, a transmission controller 4, a network 5, a reception controller 6, and a playback device 7.

チューナ3は符号化手段1AがTSパケットを送信する際の送信間隔と同一の時間間隔でTSパケットを受信する。チューナ3で受信されたTSパケットは、送信コントローラ4に送られる。   The tuner 3 receives TS packets at the same time interval as the transmission interval when the encoding means 1A transmits TS packets. The TS packet received by the tuner 3 is sent to the transmission controller 4.

送信コントローラ4は受信したTSパケットの中から再生装置7によって再生されるプログラムのデータが含まれるTSパケットを選択し、TSパケットをIPパケットにカプセル化してネットワーク5に送信する。送信コントローラ4は、たとえば通信機能を備えたデジタルビデオレコーダに含まれる。   The transmission controller 4 selects a TS packet including program data reproduced by the reproduction device 7 from the received TS packets, encapsulates the TS packet into an IP packet, and transmits the packet to the network 5. The transmission controller 4 is included in a digital video recorder having a communication function, for example.

送信コントローラ4は、データ処理手段10と、固定クロック11と、通信パケット形成手段12と、通信コントローラ13とを含む。   The transmission controller 4 includes a data processing unit 10, a fixed clock 11, a communication packet forming unit 12, and a communication controller 13.

データ処理手段10はTSパケットにタイムスタンプヘッダを付加する。データ処理手段10はPCRを含むTSパケットに対し、PCRをタイムスタンプヘッダとして付加するとともに、PCRの値を用いてタイムスタンプの値を補正する。なお、データ処理手段10はPCRが含まれないTSパケットに対し、送信コントローラ4のクロックのカウント値をタイムスタンプとしてTSパケットに付加する。データ処理手段10における処理については後述する。   The data processing means 10 adds a time stamp header to the TS packet. The data processing means 10 adds the PCR as a time stamp header to the TS packet including the PCR and corrects the time stamp value using the PCR value. The data processing means 10 adds the count value of the clock of the transmission controller 4 to the TS packet as a time stamp for the TS packet not including the PCR. The processing in the data processing means 10 will be described later.

データ処理手段10は、チューナ3から受けるTSパケットのうち、必要なTSパケットのみを分離する分離手段14と、タイムスタンプヘッダを付加するヘッダ付加手段15と、クロックをカウントするカウンタ16とを含む。クロックのカウント値は後述するようにタイムスタンプとして用いられる。   The data processing means 10 includes a separating means 14 for separating only necessary TS packets from TS packets received from the tuner 3, a header adding means 15 for adding a time stamp header, and a counter 16 for counting clocks. The clock count value is used as a time stamp as described later.

分離手段14は後述する方法によってTSパケットを解析し、PCRが含まれるTSパケットからPCRを抽出する(読み出す)。ヘッダ付加手段15は分離手段14からTSパケットを受けるとカウンタ16に信号を送ってカウント値を取得し、取得したカウント値をTSパケットに付加する。カウンタ16はたとえば32ビットカウンタである。   The separation unit 14 analyzes the TS packet by a method described later, and extracts (reads) the PCR from the TS packet including the PCR. When the header adding means 15 receives the TS packet from the separating means 14, it sends a signal to the counter 16 to acquire the count value, and adds the acquired count value to the TS packet. The counter 16 is a 32-bit counter, for example.

固定クロック11はたとえば水晶振動子や発振器であり、VCOのように印加される電圧によって周波数を変動させる機能を有さない。固定クロック11の周波数はMPEG2規格で定められた27MHzである。   The fixed clock 11 is a crystal oscillator or an oscillator, for example, and does not have a function of changing the frequency depending on a voltage applied like a VCO. The frequency of the fixed clock 11 is 27 MHz defined by the MPEG2 standard.

通信パケット形成手段12はデータ処理手段10から出力されたTSパケットをカプセル化してIPパケットを形成する。通信パケット形成手段12は、たとえば複数のTSパケットをまとめ、RTPヘッダ,UDP(User Datagram Protocol)ヘッダ,IPヘッダの各ヘッダを付加する。   The communication packet forming unit 12 encapsulates the TS packet output from the data processing unit 10 to form an IP packet. The communication packet forming means 12 collects, for example, a plurality of TS packets and adds each header of an RTP header, a UDP (User Datagram Protocol) header, and an IP header.

RTPはIPネットワークにおいてリアルタイムに音声や動画を送受信するためのプロトコル(通信規約)であり、データ受信側でのパケットの順序訂正によってネットワークでのジッタを補正するために利用される。UDPは、トランスポートプロトコルの一種であり、動画や音声をリアルタイムで送信する際に利用される。IPはネットワークに参加している機器の住所付け(アドレッシング)や、相互に接続された複数のネットワーク内での通信経路の選定(ルーティング)をするための方法を定義するために利用される。   RTP is a protocol (communication protocol) for transmitting and receiving voice and moving images in real time in an IP network, and is used for correcting jitter in the network by correcting the order of packets on the data receiving side. UDP is a type of transport protocol and is used when moving images and audio are transmitted in real time. IP is used to define a method for assigning addresses (addressing) of devices participating in a network and selecting communication routes (routing) in a plurality of interconnected networks.

なお、各プロトコルはRTP、UDP、IPの順に下位のプロトコルとなる。つまり、カプセル化とは複数のTSパケットをまとめた後に、まずRTPヘッダを付加し、次にUDPヘッダを付加し、最後にIPヘッダを付加することである。以後、RTPヘッダ、UDPヘッダ、IPヘッダをまとめて「TCP/IPヘッダ」と称することにする。なお、上記の説明は一例であり、たとえば複数のTSパケットがHTTP、TCP、IPの各プロトコルによってカプセル化されて転送される場合がある。この場合、各プロトコルはHTTP、TCP、IPの順に下位のプロトコルとなる。   Each protocol is a lower protocol in the order of RTP, UDP, and IP. In other words, the encapsulation means that a plurality of TS packets are collected, an RTP header is added first, a UDP header is added next, and an IP header is finally added. Hereinafter, the RTP header, UDP header, and IP header are collectively referred to as “TCP / IP header”. The above description is an example. For example, a plurality of TS packets may be encapsulated and transferred by HTTP, TCP, and IP protocols. In this case, each protocol is a lower protocol in the order of HTTP, TCP, and IP.

通信コントローラ13は、通信パケット形成手段12で生成されたIPパケットをネットワーク5に出力する。通信コントローラ13は、たとえばイーサネット(登録商標)カードである。ネットワーク5は、たとえば無線LAN(Local Area Network)であるが、有線のLANであってもよい。   The communication controller 13 outputs the IP packet generated by the communication packet forming unit 12 to the network 5. The communication controller 13 is, for example, an Ethernet (registered trademark) card. The network 5 is, for example, a wireless LAN (Local Area Network), but may be a wired LAN.

受信コントローラ6はネットワーク5からIPパケットを受信する。受信コントローラ6は受信したIPパケットのプロトコル処理、ジッタ補正処理を行ない、再生装置7にTSパケットを送る。受信コントローラ6はたとえば通信機能を備えたテレビに含まれる。   The reception controller 6 receives an IP packet from the network 5. The reception controller 6 performs protocol processing and jitter correction processing on the received IP packet, and sends the TS packet to the playback device 7. The reception controller 6 is included in a television having a communication function, for example.

受信コントローラ6は、通信コントローラ20と、通信パケット分離手段21と、ジッタ補正手段22と、クロック23と、カウンタ24とを含む。   The reception controller 6 includes a communication controller 20, a communication packet separation unit 21, a jitter correction unit 22, a clock 23, and a counter 24.

通信コントローラ20は、ネットワーク5からIPパケットを受信する。通信コントローラ20は、通信コントローラ13と同様に、たとえばイーサネット(登録商標)カードである。   The communication controller 20 receives an IP packet from the network 5. Similar to the communication controller 13, the communication controller 20 is, for example, an Ethernet (registered trademark) card.

通信パケット分離手段21はIPパケットからTCP/IPヘッダを外し、TSパケットを取り出す。また、通信パケット分離手段21はTSパケットからタイムスタンプを読出し、TSパケットおよびタイムスタンプをジッタ補正手段22に送る。   The communication packet separator 21 removes the TCP / IP header from the IP packet and takes out the TS packet. Further, the communication packet separation unit 21 reads a time stamp from the TS packet, and sends the TS packet and the time stamp to the jitter correction unit 22.

ジッタ補正手段22はTSパケットの送信タイミングをクロック23に同期させて復号化手段25にTSパケットを出力する。つまり、ジッタ補正手段22はタイムスタンプの値がカウンタ24のカウント値と一致するTSパケットを出力する。   The jitter correction unit 22 synchronizes the transmission timing of the TS packet with the clock 23 and outputs the TS packet to the decoding unit 25. That is, the jitter correction unit 22 outputs a TS packet whose time stamp value matches the count value of the counter 24.

よって、ジッタ補正手段22は送信コントローラ4がTSパケットを受信したタイミングに同期させて復号化手段25にTSパケットを送信することが可能になる。なお、タイムスタンプヘッダは復号化手段25にTSパケットが出力される前にジッタ補正手段22によって取り除かれる。   Therefore, the jitter correcting unit 22 can transmit the TS packet to the decoding unit 25 in synchronization with the timing at which the transmission controller 4 receives the TS packet. The time stamp header is removed by the jitter correcting unit 22 before the TS packet is output to the decoding unit 25.

また、クロック23は符号化手段1Aと同期していることが望ましいが、最終的に再生装置7のクロック26を符号化手段1Aと同期させるための何らかの手段がジッタ補正手段22に存在すれば、固定クロック11と同様に、たとえば水晶振動子や発振器であり、クロックの周波数は27MHzの固定クロックであってもよい。   Further, it is desirable that the clock 23 is synchronized with the encoding means 1A. However, if any means for finally synchronizing the clock 26 of the reproducing apparatus 7 with the encoding means 1A exists in the jitter correction means 22, Similarly to the fixed clock 11, for example, a crystal resonator or an oscillator, and the clock frequency may be a fixed clock of 27 MHz.

再生装置7はたとえばテレビである。再生装置7は復号化手段25とクロック26とを含む。復号化手段25はジッタ補正手段22から出力されたデータの復号を行なう。クロック26はPCRとTSパケットの入力タイミングとを参照して符号化手段1Aと同期したクロック信号を生成し、復号化手段25にクロック信号を送る。クロック26はPLL回路から構成される。   The playback device 7 is a television, for example. The playback device 7 includes a decoding unit 25 and a clock 26. The decoding unit 25 decodes the data output from the jitter correction unit 22. The clock 26 refers to the PCR and the input timing of the TS packet, generates a clock signal synchronized with the encoding means 1A, and sends the clock signal to the decoding means 25. The clock 26 is composed of a PLL circuit.

図2は、TSパケットのうち、PCRを含むパケットの構成の一例を示す図である。
図2を参照して、TSパケットP0は固定長(188バイト)のデータである。TSパケットP0は固定長(4バイト)のパケットヘッダと、可変長のアダプテーションフィールドおよびペイロードからなる。
FIG. 2 is a diagram illustrating an example of a configuration of a packet including a PCR among TS packets.
Referring to FIG. 2, TS packet P0 is data of a fixed length (188 bytes). The TS packet P0 includes a fixed length (4 bytes) packet header, a variable length adaptation field, and a payload.

パケットヘッダにはパケットの個別ストリーム属性を示す、13ビットからなるPID(Packet Identification)が含まれる。また、アダプテーションフィールドにはPCRを格納するための6バイトの領域が設けられる。TSパケットにPCRが含まれているか否かの判別には後述するようにPIDが参照される。なお、TSパケットはPCRを含む場合と含まない場合とで構成が異なる。また、TSパケットのパケットヘッダ以外の部分はアダプテーションフィールドかペイロードかのいずれか一方のみの場合がある。   The packet header includes a 13-bit PID (Packet Identification) indicating the individual stream attribute of the packet. The adaptation field is provided with a 6-byte area for storing the PCR. As will be described later, the PID is referred to in determining whether the TS packet includes the PCR. Note that the TS packet has a different configuration depending on whether the PCR is included or not. In addition, there is a case where only a part other than the packet header of the TS packet is either an adaptation field or a payload.

図3は、図1の送信コントローラ4で行なわれる処理の概要を示す模式図である。
図3を参照して、図の上から順に、符号化手段1Aから出力されるTSパケット、カウンタ16のカウント値(タイムスタンプ)が格納されたデータ領域、ヘッダ付加手段15から出力されるTSパケット、および通信パケット形成手段12から出力されるIPパケットが示される。
FIG. 3 is a schematic diagram showing an outline of processing performed by the transmission controller 4 of FIG.
Referring to FIG. 3, in order from the top of the figure, the TS packet output from encoding means 1A, the data area in which the count value (time stamp) of counter 16 is stored, and the TS packet output from header addition means 15 IP packets output from the communication packet forming means 12 are shown.

符号化手段1AはTSパケットP1〜Pnを送出する。TSパケットP2、PnはPCRを含む。領域PCR1はTSパケットP2においてPCRが格納された領域である。同様に領域PCRnはTSパケットPnにおいてPCRが格納された領域である。   The encoding means 1A sends out TS packets P1 to Pn. TS packets P2 and Pn include PCR. The region PCR1 is a region where the PCR is stored in the TS packet P2. Similarly, the region PCRn is a region where the PCR is stored in the TS packet Pn.

カウンタ16はクロックをカウントする。TSパケットP1〜Pnがデータ処理手段10に入力されたときのカウンタ16のカウント値がタイムスタンプである。なお、カウント値は32ビット(4バイト)のデータである。   The counter 16 counts the clock. The count value of the counter 16 when the TS packets P1 to Pn are input to the data processing means 10 is a time stamp. The count value is 32-bit (4 bytes) data.

図3ではTSパケットP1〜Pnのそれぞれに応じたカウント値が、取得したカウント値を一時的格納するヘッダ付加手段15中の領域CT1〜CTnに格納されているものとする。TSパケットP2がデータ処理手段10に入力されると、カウンタ16にはPCRの値がロードされる。つまり、領域CT2に格納されているカウント値はPCRの値に置換され、カウンタ16はリセットされる。同様に、TSパケットPnが入力されると、領域CTnに格納されているカウント値はPCRの値に置換される。   In FIG. 3, it is assumed that the count values corresponding to the TS packets P1 to Pn are stored in the areas CT1 to CTn in the header adding means 15 for temporarily storing the acquired count values. When the TS packet P2 is input to the data processing means 10, the counter 16 is loaded with the PCR value. That is, the count value stored in the area CT2 is replaced with the PCR value, and the counter 16 is reset. Similarly, when the TS packet Pn is input, the count value stored in the region CTn is replaced with the PCR value.

ヘッダ付加手段15は、TSパケットにタイムスタンプを付加する。たとえばTSパケットTP1のようにPCRを含まないTSパケットにはカウンタ16に信号が送られたときのカウント値がタイムスタンプとして付加される。つまり、領域CT1に格納されているカウント値がヘッダ付加手段15によってヘッダHD1に格納される。一方、たとえばTSパケットTP2のようにPCRが含まれるTSパケットには領域PCR1に格納されたPCRがヘッダHD2に格納される。   The header adding means 15 adds a time stamp to the TS packet. For example, a count value when a signal is sent to the counter 16 is added as a time stamp to a TS packet that does not include PCR, such as the TS packet TP1. That is, the count value stored in the area CT1 is stored in the header HD1 by the header adding means 15. On the other hand, the PCR stored in the region PCR1 is stored in the header HD2 in the TS packet including the PCR like the TS packet TP2, for example.

通信パケット形成手段12ではTSパケットTP1〜TP4、および0個ないし1個以上のTSパケットを結合してTCP/IPヘッダ(RTPヘッダ、UDPヘッダおよびIPヘッダ)を付加し、IPパケットI0を出力する。   The communication packet forming means 12 combines the TS packets TP1 to TP4 and 0 to 1 or more TS packets, adds a TCP / IP header (RTP header, UDP header and IP header), and outputs an IP packet I0. .

図4は、図1のデータ処理手段10の構成を示すブロック図である。
図4を参照して、分離手段14は、データ入力手段30と、パケット解析手段32と、PCR抽出手段34とを含む。
FIG. 4 is a block diagram showing the configuration of the data processing means 10 of FIG.
Referring to FIG. 4, separation means 14 includes data input means 30, packet analysis means 32, and PCR extraction means 34.

データ入力手段30は、チューナ3から受けたTSパケットをパケット解析手段32に転送する。パケット解析手段32は入力されたTSパケットを解析し、TSパケットにPCRが含まれているか否かを後述する方法により判定する。パケット解析手段32は、TSパケットにPCRが含まれていると判定する場合にはTSパケットをPCR抽出手段34に転送し、TSパケットにPCRが含まれていないと判定する場合にはTSパケットをヘッダ付加手段15に転送する。つまり、パケット解析手段32はTSパケットに付加するタイムスタンプがPCRかカウンタ16のカウント値かのいずれであるかを決定する。   The data input means 30 transfers the TS packet received from the tuner 3 to the packet analysis means 32. The packet analysis unit 32 analyzes the input TS packet and determines whether or not the TS packet includes a PCR by a method described later. The packet analyzing unit 32 transfers the TS packet to the PCR extracting unit 34 when determining that the TS packet includes PCR, and when determining that the TS packet does not include PCR, the packet analyzing unit 32 transfers the TS packet. Transfer to the header adding means 15. That is, the packet analysis means 32 determines whether the time stamp added to the TS packet is a PCR or a count value of the counter 16.

PCR抽出手段34はPCRが含まれたTSパケットを受け、図2において示される、TSパケットの定められた領域に記述されたデータをPCRとして抽出する。PCR抽出手段34は抽出したPCRおよびTSパケットをヘッダ付加手段15に転送する。   The PCR extracting means 34 receives the TS packet including the PCR, and extracts the data described in the defined area of the TS packet shown in FIG. 2 as the PCR. The PCR extracting unit 34 transfers the extracted PCR and TS packets to the header adding unit 15.

ヘッダ付加手段15は、バッファ36と、タイムスタンプ整形手段38と、タイムスタンプ付加手段40と、データ出力手段42とを含む。   The header adding unit 15 includes a buffer 36, a time stamp shaping unit 38, a time stamp adding unit 40, and a data output unit 42.

バッファ36はPCRを含まないTSパケットを一時的に格納する。TSパケットが格納されるごとに、バッファ36はラッチ信号をカウンタ16に出力する。また、バッファ36はタイムスタンプ付加手段40にTSパケットを順次転送する。   The buffer 36 temporarily stores TS packets that do not include PCR. Each time a TS packet is stored, the buffer 36 outputs a latch signal to the counter 16. Further, the buffer 36 sequentially transfers the TS packets to the time stamp adding means 40.

タイムスタンプ整形手段38はPCR抽出手段34から受けたPCRをタイムスタンプのフォーマットに整形し、整形後のPCR(タイムスタンプ)をタイムスタンプ付加手段40に転送するとともに、カウンタ16に転送する。カウンタ16はバッファから送られるラッチ信号を検出すると、そのときのカウント値をタイムスタンプとしてタイムスタンプ付加手段40に転送する。また、カウンタ16はタイムスタンプ整形手段38から受けたタイムスタンプの値をロードしてカウント値をタイムスタンプの値に更新する。   The time stamp shaping means 38 shapes the PCR received from the PCR extracting means 34 into a time stamp format, and transfers the shaped PCR (time stamp) to the time stamp adding means 40 and also to the counter 16. When the counter 16 detects the latch signal sent from the buffer, it transfers the count value at that time to the time stamp adding means 40 as a time stamp. The counter 16 loads the time stamp value received from the time stamp shaping means 38 and updates the count value to the time stamp value.

タイムスタンプ付加手段40はTSパケットに付加すべきタイムスタンプを順次付加し、データ出力手段42にTSパケットを転送する。データ出力手段42はタイムスタンプ付加手段40から入力された、タイムスタンプが付加されたTSパケットを順次出力する。TSパケットの出力先は図1における通信パケット形成手段12である。   The time stamp adding means 40 sequentially adds time stamps to be added to the TS packet, and transfers the TS packet to the data output means 42. The data output means 42 sequentially outputs the TS packets to which the time stamp is added, input from the time stamp adding means 40. The output destination of the TS packet is the communication packet forming means 12 in FIG.

図4のデータ処理手段10における処理を要約すると以下のようになる。PCR抽出手段34はPCRを含むTSパケットからPCRを抽出する。タイムスタンプ整形手段38はPCRを所定の形式に整形してカウンタ16にPCRをロードしてカウント値を補正するとともにタイムスタンプ付加手段40にPCRを送る。タイムスタンプ付加手段40はPCRを含むTSパケットにはPCRをタイムスタンプとして付加し、PCRを含まないTSパケットにはカウンタ16のカウント値をタイムスタンプとして付加する。カウンタ16のカウント値がPCRで補正されることによりエンコーダのクロックと同期させたタイムスタンプをTSパケットに付加することが可能になる。   The processing in the data processing means 10 in FIG. 4 is summarized as follows. The PCR extracting unit 34 extracts the PCR from the TS packet including the PCR. The time stamp shaping means 38 shapes the PCR into a predetermined format, loads the PCR into the counter 16 to correct the count value, and sends the PCR to the time stamp adding means 40. The time stamp adding means 40 adds the PCR as a time stamp to a TS packet including PCR, and adds the count value of the counter 16 as a time stamp to a TS packet not including PCR. When the count value of the counter 16 is corrected by PCR, a time stamp synchronized with the encoder clock can be added to the TS packet.

次に、図4におけるパケット解析手段32およびタイムスタンプ整形手段38の動作について、より具体的に説明する。   Next, the operations of the packet analysis unit 32 and the time stamp shaping unit 38 in FIG. 4 will be described more specifically.

パケット解析手段32は所定の方法によりTSにPCRが含まれているか否かを判断する。ここで「所定の方法」とは、たとえば、TSパケットのヘッダ部分(図2におけるパケットヘッダ)に記述されているPIDが、TSパケットにPCRが含まれていることを示す予め設定された値と一致するか否かを判定し、一致すれば該当のTSパケットにPCRが含まれていると判定するという方法である。   The packet analysis means 32 determines whether PCR is included in the TS by a predetermined method. Here, the “predetermined method” is, for example, a preset value indicating that the PID described in the header portion of the TS packet (packet header in FIG. 2) includes PCR in the TS packet. In this method, it is determined whether or not they match, and if they match, it is determined that PCR is included in the corresponding TS packet.

PCRが含まれていることを示すPIDの値は、TSパケットのいずれかに含まれているパケット構成情報であるPAT(Program Association Table)および、PMT(Program Map Table)をパケット解析手段32で解析することによって得ることが可能である。ここでPIDはパケットの属性を示すパケット識別情報に該当する。また、パケット構成情報にはパケット識別情報の属性が記述されている。   The PID value indicating that the PCR is included is analyzed by the packet analysis means 32 using a PAT (Program Association Table) and a PMT (Program Map Table), which are packet configuration information included in any TS packet. Can be obtained. Here, the PID corresponds to packet identification information indicating a packet attribute. The packet configuration information describes the attributes of packet identification information.

尚、複数のプログラムがTSパケットにより転送される場合、受信側で視聴者がどのプログラムを選択しているかは送信側では不明である。よって、どのPIDが、選択されているプログラムのPCRを含むことを示しているのか、送信側では判断することができない。しかし選択したプログラムのPCRを含むPIDの値を、データを受信する機器(たとえば受信コントローラ6)側から転送し、その値をパケット解析手段32に予め設定することによって、パケット解析手段32では抽出すべきPCRを得ることができる。この場合、データを受信する機器はパケット構成情報を解析し、その解析結果(PIDの値)をパケット解析手段32に送信する。   When a plurality of programs are transferred by TS packets, it is unknown on the transmission side which program the viewer has selected on the reception side. Therefore, the transmitting side cannot determine which PID indicates that it includes the PCR of the selected program. However, the packet analysis unit 32 extracts the PID value including the PCR of the selected program by transferring the data from the data receiving device (for example, the reception controller 6) and setting the value in the packet analysis unit 32 in advance. Power PCR can be obtained. In this case, the device that receives the data analyzes the packet configuration information, and transmits the analysis result (PID value) to the packet analysis means 32.

さらに、受信側から不要なプログラムのPIDを転送し、そのPIDの値をパケット解析手段32に設定することによって、パケット解析手段32が不要と判定したパケットに対してはタイムスタンプが付加されずに破棄されてもよい。   Furthermore, by transferring the PID of an unnecessary program from the receiving side and setting the value of the PID in the packet analysis unit 32, a time stamp is not added to a packet that the packet analysis unit 32 determines to be unnecessary. It may be discarded.

尚、PCRが含まれていることを示すPIDの値が設定されていない場合には、パケット解析手段32はTSパケットにPCRとカウント値とのいずれをタイムスタンプとして付加するかを決定できない。この場合には、暫定的にカウンタ16のカウント値をタイムスタンプとしてTSパケットに付加するよう、タイムスタンプ付加手段40が処理を行なってもよい。   If the PID value indicating that the PCR is included is not set, the packet analysis unit 32 cannot determine which of the PCR and the count value is added to the TS packet as a time stamp. In this case, the time stamp adding means 40 may perform processing so that the count value of the counter 16 is provisionally added to the TS packet as a time stamp.

タイムスタンプ整形手段38は抽出されたPCRをTSパケットに付加すべきタイムスタンプのフォーマットに整形する。   The time stamp shaping means 38 shapes the extracted PCR into a time stamp format to be added to the TS packet.

TSパケットに設けられるPCRの領域は6バイト(48ビット)であるが、実データは上位33ビットと下位9ビットの合計42ビットである。さらに42ビットのうち下位9ビットは27MHzの周波数でカウントアップするタイムスタンプであり、上位33ビットは90kHzの周波数でカウントアップするタイムスタンプである。カウンタ16が32ビットカウンタである場合、タイムスタンプ整形手段38は下記の計算式(1)に従ってPCRの値を整形する。   The PCR area provided in the TS packet is 6 bytes (48 bits), but the actual data is a total of 42 bits including the upper 33 bits and the lower 9 bits. Further, of the 42 bits, the lower 9 bits are a time stamp that counts up at a frequency of 27 MHz, and the upper 33 bits are a time stamp that counts up at a frequency of 90 kHz. When the counter 16 is a 32-bit counter, the time stamp shaping means 38 shapes the PCR value according to the following calculation formula (1).

タイムスタンプ=((上位33ビット)×300+(下位9ビット)) MOD 232 …(1)
ここで、MODは除算の余りを求める関数である。
Time stamp = ((upper 33 bits) × 300 + (lower 9 bits)) MOD 2 32 (1)
Here, MOD is a function for calculating the remainder of division.

以下、実施の形態1によって得られる効果について説明する。
図5は、図1のカウンタ16の補正が行なわれない場合におけるPCRとタイムスタンプとの誤差を説明する図である。
Hereinafter, effects obtained by the first embodiment will be described.
FIG. 5 is a diagram for explaining an error between the PCR and the time stamp when the counter 16 of FIG. 1 is not corrected.

図5を参照して、図の上から順に、符号化手段1Aから出力されるTSパケット、ヘッダ付加手段15から出力されるTSパケット、通信パケット分離手段21から出力されるTSパケット、およびジッタ補正手段22から出力されるTSパケットが示される。また各TSパケットは、クロックのカウント値に相当する時間間隔で出力される。   Referring to FIG. 5, in order from the top of the figure, TS packet output from encoding means 1A, TS packet output from header addition means 15, TS packet output from communication packet separation means 21, and jitter correction A TS packet output from the means 22 is shown. Each TS packet is output at a time interval corresponding to the clock count value.

なお、図5において示されるTSパケットの数およびクロックのカウント値は、この発明を説明するための一例である。   The number of TS packets and the clock count value shown in FIG. 5 are examples for explaining the present invention.

TSパケットP1〜P5の各々は、クロックのカウント値が1000増えるごとに符号化手段1Aから送出される。図5においてTSパケットP1、P4にはPCRが格納される。TSパケットP1の領域PCR1に格納されるPCRの値を0とするとTSパケットP4の領域PCR2に格納されるPCRの値は3000になる。   Each of the TS packets P1 to P5 is sent from the encoding means 1A every time the clock count value increases by 1000. In FIG. 5, PCR is stored in TS packets P1 and P4. If the PCR value stored in the region PCR1 of the TS packet P1 is 0, the PCR value stored in the region PCR2 of the TS packet P4 is 3000.

次に、ヘッダ付加手段15はTSパケットP1〜P5の各々が入力されるとラッチ信号をカウンタ16に送信し、取得したカウント値(タイムスタンプ)をパケットにヘッダとして付加する。TSパケットTP1〜TP5のそれぞれのタイムスタンプヘッダをヘッダHD1〜HD5とする。   Next, when each of the TS packets P1 to P5 is input, the header adding means 15 transmits a latch signal to the counter 16, and adds the acquired count value (time stamp) to the packet as a header. The time stamp headers of the TS packets TP1 to TP5 are set as headers HD1 to HD5.

図5において、符号化手段1Aのクロックの周波数とヘッダ付加手段15のクロックの周波数(図1における固定クロック11の周波数)は一致せず、符号化手段1Aにおいてカウント値が1000増える間にカウンタ16ではカウント値が999増えるものとする。よって、符号化手段1AにおけるTSパケットの送信間隔が保たれたままヘッダ付加手段15にTSパケットP1〜P5が入力された場合、TSパケットTP1〜TP5のそれぞれのヘッダに格納されるタイムスタンプは999ずつ増加する。ヘッダHD1に格納されるタイムスタンプが0の場合、ヘッダHD2,HD3,HD4,HD5に格納されるタイムスタンプはそれぞれ999,1998,2997,3996になる。   In FIG. 5, the clock frequency of the encoding means 1A and the clock frequency of the header addition means 15 (the frequency of the fixed clock 11 in FIG. 1) do not match, and the counter 16 increases while the count value increases by 1000 in the encoding means 1A. Then, it is assumed that the count value increases by 999. Therefore, when TS packets P1 to P5 are input to the header adding unit 15 while the transmission interval of TS packets in the encoding unit 1A is maintained, the time stamp stored in each header of the TS packets TP1 to TP5 is 999. Increase by increments. When the time stamp stored in the header HD1 is 0, the time stamps stored in the headers HD2, HD3, HD4, and HD5 are 999, 1998, 2997, and 3996, respectively.

次にTSパケットTP1〜TP5は、別々にネットワーク5に送られる。ネットワーク5でジッタが発生すると、各TSパケットのタイムスタンプに対して受信間隔を示すクロックのカウント値は相違する。通信パケット分離手段21から出力されるTSパケットTP1〜TP5の送信間隔は仮に受信コントローラ6のクロック23が符号化手段1Aのクロックと同期しているとした場合のカウンタ24のカウント値で示すと、たとえば1000、1010,990,1000になる。   Next, the TS packets TP1 to TP5 are sent to the network 5 separately. When jitter occurs in the network 5, the clock count value indicating the reception interval differs for the time stamp of each TS packet. The transmission interval of the TS packets TP1 to TP5 output from the communication packet separation unit 21 is represented by the count value of the counter 24 when the clock 23 of the reception controller 6 is synchronized with the clock of the encoding unit 1A. For example, 1000, 1010, 990, 1000.

ジッタ補正手段22はタイムスタンプがカウンタ24のカウント値と一致したTSパケットを出力する。よって、ジッタ補正手段22はカウンタ24のカウント値が999増加するごとにTSパケットを出力する。なお、説明の便宜上、ジッタ補正手段22から出力されるTSパケットにはタイムスタンプヘッダが付加されたままであるとする。   The jitter correction unit 22 outputs a TS packet whose time stamp matches the count value of the counter 24. Therefore, the jitter correction unit 22 outputs a TS packet every time the count value of the counter 24 increases by 999. For convenience of explanation, it is assumed that the time stamp header is still added to the TS packet output from the jitter correction unit 22.

領域PCR1に格納されたPCRと領域PCR2に格納されたPCRとの値の差は3000である。これに対し、ジッタ補正手段22がTSパケットTP1の出力を開始する時刻からTSパケットTP4の出力を開始するまでの時間をカウンタ24のカウント値で示すと、999+999+999=2997である。つまりPCRの送出間隔に対し、TSパケットがジッタ補正手段22から出力されるタイミングがずれた状態である。このような状態が長時間続くと、再生装置7においてPLL回路の動作が収束しなくなり映像や音声が乱れる。   The difference in value between the PCR stored in the region PCR1 and the PCR stored in the region PCR2 is 3000. On the other hand, when the time from when the jitter correction unit 22 starts outputting the TS packet TP1 to when the output of the TS packet TP4 is started is indicated by the count value of the counter 24, 999 + 999 + 999 = 2997. That is, the timing at which TS packets are output from the jitter correction means 22 is shifted with respect to the PCR transmission interval. If such a state continues for a long time, the operation of the PLL circuit does not converge in the playback apparatus 7, and the video and audio are disturbed.

図6は、図1のカウンタ16の補正が行なわれた場合におけるPCRとタイムスタンプとの誤差を説明する図である。   FIG. 6 is a diagram for explaining an error between the PCR and the time stamp when the counter 16 of FIG. 1 is corrected.

図5,図6を参照して、TSパケットを出力する各手段は図5と同様であり、クロックの条件も図5と同様であるとする。   Referring to FIGS. 5 and 6, each means for outputting a TS packet is the same as in FIG. 5, and the clock condition is also the same as in FIG.

なお、以下では図5と相違する部分について特に説明するが、図5と同様に、TSパケットの数およびクロックのカウント値はこの発明を説明するための一例である。   In the following, portions different from FIG. 5 will be described in particular. However, as in FIG. 5, the number of TS packets and the clock count value are examples for explaining the present invention.

符号化手段1AにおけるTSパケットP1〜P5の送信間隔に相当するクロックのカウント値は1000である。ヘッダ付加手段15はTSパケットに対し、PCRの値をタイムスタンプとして付加し、TSパケットTP1を出力する。よってヘッダHD1には0が格納される。また、図示されないカウンタ16にはPCRがロードされる。カウンタ16のカウント値はPCRの値を初期値として増加する。よって、ヘッダHD2に格納されるタイムスタンプは999である。また、ヘッダHD3に格納されるタイムスタンプは1998である。ただし、HD1〜HD3のタイムスタンプは図5の場合と同様である。   The count value of the clock corresponding to the transmission interval of the TS packets P1 to P5 in the encoding means 1A is 1000. The header adding means 15 adds the PCR value as a time stamp to the TS packet and outputs the TS packet TP1. Therefore, 0 is stored in the header HD1. The counter 16 (not shown) is loaded with PCR. The count value of the counter 16 increases with the PCR value as an initial value. Therefore, the time stamp stored in the header HD2 is 999. The time stamp stored in the header HD3 is 1998. However, the time stamps of HD1 to HD3 are the same as those in FIG.

次に、ヘッダ付加手段15はTSパケットP4に対してヘッダを付加し、TSパケットTP4を生成する。この場合、ヘッダHD4にはPCRの値である3000が格納される。図5ではヘッダHD4に格納されるタイムスタンプは2997である。また、図6のヘッダHD5には補正された後のカウンタ16のカウント値である3999(=3000+999)が格納される。図5ではヘッダHD5に格納されるタイムスタンプは3996である。   Next, the header adding means 15 adds a header to the TS packet P4 to generate a TS packet TP4. In this case, 3000, which is a PCR value, is stored in the header HD4. In FIG. 5, the time stamp stored in the header HD4 is 2997. Also, 3999 (= 3000 + 999), which is the count value of the counter 16 after correction, is stored in the header HD5 of FIG. In FIG. 5, the time stamp stored in the header HD5 is 3996.

ジッタ補正手段22においてTSパケットTP1の出力を開始する時刻からTSパケットTP4の出力を開始するまでの時間を仮に受信コントローラ6のクロック23が符号化手段1Aのクロックと同期しているとした場合のカウンタ24のカウント値で示すとPCRの値の差と同じ3000になる。よって、再生装置7においてTSパケットTP1〜TP4をすべて受信するのに要する時間は符号化手段1AがTSパケットP1〜P4を送信するのに要する時間と同じである。   In the case where it is assumed that the clock 23 of the reception controller 6 is synchronized with the clock of the encoding means 1A from the time when the output of the TS packet TP1 is started in the jitter correction means 22 until the output of the TS packet TP4 is started. The count value of the counter 24 is 3000, which is the same as the difference in PCR value. Therefore, the time required for the reproduction apparatus 7 to receive all the TS packets TP1 to TP4 is the same as the time required for the encoding means 1A to transmit the TS packets P1 to P4.

なお、図6においてジッタ補正手段22から出力される各TSパケットの送信間隔について、たとえばTSパケットTP2,TP3の間隔は999カウントである。一方、TP3,TP4の間隔は1002カウントである。つまり、各TSパケットの送信間隔は一致していない。ただし、再生装置7に含まれるPLL回路はクロックを符号化手段1Aのクロックと同期させるためPCRのみを評価する。よって、PCRが含まれないTSパケットの場合、再生装置7がTSパケットを受信する間隔と符号化手段1AがTSパケットを送信する間隔が厳密に一致しなくても、符号化手段1Aと復号化手段25との間でクロックを同期させることが可能である。   In FIG. 6, for example, the interval between the TS packets TP2 and TP3 is 999 counts for the transmission interval of each TS packet output from the jitter correction means 22. On the other hand, the interval between TP3 and TP4 is 1002 counts. That is, the transmission intervals of the TS packets do not match. However, the PLL circuit included in the reproducing apparatus 7 evaluates only the PCR in order to synchronize the clock with the clock of the encoding means 1A. Therefore, in the case of a TS packet that does not include PCR, even if the interval at which the playback device 7 receives the TS packet and the interval at which the encoding unit 1A transmits the TS packet do not exactly match, the encoding unit 1A and the decoding unit It is possible to synchronize the clock with the means 25.

よって、データ処理手段10はPCRが含まれるTSパケットに対し、PCRに完全に同期させたタイムスタンプを付加した上でTSパケットを転送することができ、その他のTSパケットに対し、実用上は問題にならない程度の誤差のタイムスタンプを付加した上でデータの転送を行なうことができる。   Therefore, the data processing means 10 can transfer the TS packet after adding a time stamp that is completely synchronized with the PCR to the TS packet including the PCR. Data transfer can be performed after adding a time stamp with an error that does not occur.

また、タイムスタンプをエンコーダのクロックと同期させるため、システムにPLL回路を備える方法があるが、この場合、PLL回路を構成するためVCOや差分回路、ローパスフィルタなどが必要になり、システムのコストが上昇する。一方、実施の形態1ではPLL回路を用いなくてもタイムスタンプをエンコーダのクロックと同期させることが可能であり、システムのコストを低減することが可能になる。   In order to synchronize the time stamp with the clock of the encoder, there is a method of providing a PLL circuit in the system. In this case, a VCO, a differential circuit, a low-pass filter, etc. are required to configure the PLL circuit, and the system cost is reduced. To rise. On the other hand, in the first embodiment, the time stamp can be synchronized with the encoder clock without using a PLL circuit, and the cost of the system can be reduced.

さらに、入力ソースの数が2以上になる場合(たとえば衛星デジタル放送や地上デジタルテレビ放送を受信する場合)、各放送局のエンコーダのクロックは互いに同期していない。よって上述のようなエンコーダのクロックとタイムスタンプとを同期するためのPLL回路を備えるシステムの場合、入力ソースの数に応じた数のPLL回路が必要である。しかし、実施の形態1によれば、VCOよりも安価な固定クロック(水晶振動子など)を1つ備え、かつ、各入力ソースに対応するカウンタを備えれば対応可能である。よって実施の形態1によれば、入力ソースの数が増えるほど、システムの低コスト化を図ることが可能になる。   Furthermore, when the number of input sources is 2 or more (for example, when receiving satellite digital broadcast or terrestrial digital television broadcast), the encoder clocks of the broadcast stations are not synchronized with each other. Therefore, in the case of a system including a PLL circuit for synchronizing the encoder clock and the time stamp as described above, the number of PLL circuits corresponding to the number of input sources is necessary. However, according to the first embodiment, it is possible to provide one fixed clock (such as a crystal resonator) that is cheaper than the VCO and a counter corresponding to each input source. Thus, according to the first embodiment, the cost of the system can be reduced as the number of input sources increases.

なお、PCRを含むTSパケットとPCRを含まないTSパケットとが短い間隔で順にデータ処理手段10に入力された場合、タイムスタンプ整形手段38からカウンタ16へのタイムスタンプのロードが完了するよりも先にバッファ36からラッチ信号が送られる可能性がある。この場合、PCRを含まないTSパケットに対するカウント値がPCRの値より小さくなり、タイムスタンプの値の大小関係がTSパケットの入力順序に対して逆転することが想定される。このような現象を避けるための方法として、以下のようなものが考えられる。   When a TS packet including PCR and a TS packet not including PCR are sequentially input to the data processing means 10 at short intervals, the time stamp is loaded from the time stamp shaping means 38 to the counter 16 before completion. There is a possibility that a latch signal is sent from the buffer 36. In this case, it is assumed that the count value for the TS packet not including the PCR is smaller than the PCR value, and the magnitude relationship of the time stamp values is reversed with respect to the TS packet input order. The following can be considered as a method for avoiding such a phenomenon.

たとえばカウンタ16に送られるラッチ信号をタイムスタンプ値のロードが完了するまで遅延させる方法がある。ラッチ信号の送信を遅延させるための具体的な方法としては図4に示されるように、タイムスタンプ整形手段38がカウンタ16にタイムスタンプのロードが完了した後、ラッチ信号を送ることを許可するラッチ開始指示をバッファ36に対し送る方法がある。バッファ36はラッチ開始指示を受けてラッチ信号を送信する。なお、バッファ36はラッチ開始指示を受けた後、所定の時間が経過した後にラッチ信号を送信してもよい。   For example, there is a method of delaying the latch signal sent to the counter 16 until the loading of the time stamp value is completed. As a specific method for delaying the transmission of the latch signal, as shown in FIG. 4, the time stamp shaping means 38 allows the counter 16 to send a latch signal after the time stamp has been loaded. There is a method of sending a start instruction to the buffer 36. The buffer 36 receives a latch start instruction and transmits a latch signal. Note that the buffer 36 may transmit the latch signal after a predetermined time has elapsed after receiving the latch start instruction.

また、ラッチ信号が送られない場合であっても、バッファ36はPCRを含まないTSパケットを受けると、タイムスタンプのロードが完了するまでの時間に相当する遅延時間が経過した後にラッチ信号を送ればよい。   Even if the latch signal is not sent, if the buffer 36 receives a TS packet that does not include PCR, the buffer 36 can send the latch signal after a delay time corresponding to the time until loading of the time stamp has elapsed. That's fine.

また、PCRを含むTSパケットがデータ入力手段30に入力されたときからカウンタ16にタイムスタンプのロードが完了するまでの経過時間(以下、第1の経過時間と称する)が、PCRを含まないTSパケットがデータ入力手段30に入力されてからカウンタ16がタイムスタンプを送信するまでの経過時間(以下、第2の経過時間と称する)よりも長い場合がある。この場合において、特に問題になるのはタイムスタンプのロードが完了する前後にカウンタ16からタイムスタンプが取得された場合である。   In addition, an elapsed time (hereinafter referred to as a first elapsed time) from when a TS packet including a PCR is input to the data input means 30 until the time stamp is loaded into the counter 16 is a TS that does not include the PCR. There are cases where the elapsed time from when the packet is input to the data input means 30 until the counter 16 transmits the time stamp (hereinafter referred to as the second elapsed time) is longer. In this case, a particular problem occurs when the time stamp is acquired from the counter 16 before and after the time stamp is completely loaded.

以下、具体的に説明する。たとえば第1の経過時間を示すカウント値が100カウント、第2の経過時間を示すカウント値が20カウントとする。PCRの値は3000とし、PCRを含む第1のTSパケット、およびPCRを含まない第2,3のTSパケットはカウンタ16のカウント値がそれぞれ3000,3050,3090のときに入力されたとする。補正処理が行なわれない場合、第2のTSパケットのタイムスタンプの値は3070(=3050+20)であり、第3のTSパケットのタイムスタンプの値は3010である(カウント値が3100になったときにタイムスタンプのロードが完了し、カウント値は3000に補正される)。つまり、第3のTSパケットが第2のTSパケットより先に入力されたことになる。   This will be specifically described below. For example, the count value indicating the first elapsed time is 100 counts, and the count value indicating the second elapsed time is 20 counts. It is assumed that the PCR value is 3000, and the first TS packet including the PCR and the second and third TS packets not including the PCR are input when the count values of the counter 16 are 3000, 3050, and 3090, respectively. When correction processing is not performed, the time stamp value of the second TS packet is 3070 (= 3050 + 20), and the time stamp value of the third TS packet is 3010 (when the count value reaches 3100) Time stamp is loaded, and the count value is corrected to 3000). That is, the third TS packet is input before the second TS packet.

この場合、タイムスタンプ整形手段38は第1の経過時間と第2の経過時間との差に応じた時間をPCRに付加したタイムスタンプを生成する補正処理を行ない、カウンタ16に補正後のタイムスタンプをロードすればよい。つまり、ロードするタイムスタンプの値を3080(=3000+100−20)とすれば、第3のTSパケットのタイムスタンプは3090になる。よって、第2のTSパケットに対し、後に入力されたことを示すタイムスタンプが付加される。このとき、補正値が常に一定なので、タイムスタンプとPCRとの同期は保たれる。   In this case, the time stamp shaping means 38 performs a correction process for generating a time stamp in which a time corresponding to the difference between the first elapsed time and the second elapsed time is added to the PCR, and causes the counter 16 to perform the corrected time stamp. Just load it. That is, if the value of the time stamp to be loaded is 3080 (= 3000 + 100−20), the time stamp of the third TS packet is 3090. Therefore, a time stamp indicating that it has been input later is added to the second TS packet. At this time, since the correction value is always constant, synchronization between the time stamp and the PCR is maintained.

これによって、カウンタ16にタイムスタンプをロードするための時間の差によって順番が逆転する可能性があるTSパケットについても、より正確にPCRに同期したタイムスタンプを付加することが可能になる。   As a result, even for TS packets whose order may be reversed due to the difference in time for loading the time stamp into the counter 16, it is possible to add a time stamp synchronized with the PCR more accurately.

以上のように、実施の形態1のデータ処理装置によれば、低コストでエンコーダとデコーダとの間でクロックの同期をとることが可能になる。   As described above, according to the data processing apparatus of the first embodiment, it is possible to synchronize clocks between the encoder and the decoder at a low cost.

[実施の形態1の変形例]
図7は、実施の形態1の変形例に係るシステムの構成例を示す図である。
[Modification of Embodiment 1]
FIG. 7 is a diagram illustrating a configuration example of a system according to a modification of the first embodiment.

図7を参照して、家庭内システム2Aは、送信コントローラ4Aを含む点において図1の家庭内システム2と異なるが、その他の部分については同様である。よって、その他の部分に関する以後の説明は繰り返さない。   Referring to FIG. 7, home system 2A is different from home system 2 of FIG. 1 in that it includes transmission controller 4A, but the other parts are the same. Therefore, the subsequent description regarding other parts will not be repeated.

送信コントローラ4Aは、CPU(Central Processing Unit)10AおよびROM(Read Only Memory)18を含む点において図1の送信コントローラ4と異なるが、その他の部分については同様である。よって、その他の部分に関する以後の説明は繰り返さない。   The transmission controller 4A differs from the transmission controller 4 of FIG. 1 in that it includes a CPU (Central Processing Unit) 10A and a ROM (Read Only Memory) 18, but the other parts are the same. Therefore, the subsequent description regarding other parts will not be repeated.

CPU10Aは、後述するステップに従ってチューナ3から受けるTSパケットにタイムスタンプヘッダを付加する。図1における分離手段14、ヘッダ付加手段15およびカウンタ16の各機能は、図7ではプログラムをCPU10Aに実行させることによって実現される。ROM18は、CPU10AがTSパケットにタイムスタンプを付加するための各ステップをコンピュータ(CPU10A)に実行させるためのプログラムを格納する。つまり、ROM18はコンピュータ読み取り可能な記録媒体である。   The CPU 10A adds a time stamp header to the TS packet received from the tuner 3 in accordance with steps to be described later. The functions of the separating unit 14, the header adding unit 15 and the counter 16 in FIG. 1 are realized by causing the CPU 10A to execute a program in FIG. The ROM 18 stores a program for causing the computer (CPU 10A) to execute each step for the CPU 10A to add a time stamp to the TS packet. That is, the ROM 18 is a computer-readable recording medium.

図7ではコンピュータ読み取り可能な記録媒体としてROM18が示されるが、記録媒体はROMに限定されるものではない。たとえばフラッシュメモリやハードディスク、DVD(Digital Versatile Disc)、フロッピー(登録商標)ディスク、磁気テープなどが想定される。   In FIG. 7, the ROM 18 is shown as a computer-readable recording medium, but the recording medium is not limited to the ROM. For example, a flash memory, a hard disk, a DVD (Digital Versatile Disc), a floppy (registered trademark) disk, a magnetic tape, and the like are assumed.

また、ROM18は半導体装置に限定されず、たとえばCD(Compact Disc)−ROMであってもよい。さらに、ROM18はCPU10Aに含まれてもよい。   The ROM 18 is not limited to a semiconductor device, and may be a CD (Compact Disc) -ROM, for example. Further, the ROM 18 may be included in the CPU 10A.

図8は、図7の送信コントローラ4Aが含まれる装置の外観例を示す図である。
図8を参照して、通信装置50は、送信コントローラ4Aが含まれるコンピュータ本体51と、ディスプレイ装置52と、FD(Flexible Disk)54が装着されるFDドライブ53と、キーボード55と、マウス56と、CD−ROM58が装着されるCD−ROM装置57と、ネットワーク5に接続するためのケーブル59とを備える。この発明のデータ処理を実現するプログラム(この発明のデータ処理が含まれた、通信装置50の機能を実現するためのプログラムであってもよい)は、FD54またはCD−ROM58あるいはコンピュータ本体51に内蔵されたROM(図示されない)等の記録媒体によって供給される。プログラムがコンピュータ本体51によって実行されることにより、後述するデータ処理が行なわれる。
FIG. 8 is a diagram illustrating an external appearance example of an apparatus including the transmission controller 4A of FIG.
Referring to FIG. 8, the communication device 50 includes a computer main body 51 including the transmission controller 4 </ b> A, a display device 52, an FD drive 53 in which an FD (Flexible Disk) 54 is mounted, a keyboard 55, and a mouse 56. A CD-ROM device 57 to which the CD-ROM 58 is mounted and a cable 59 for connecting to the network 5 are provided. A program for realizing the data processing of the present invention (which may be a program for realizing the functions of the communication device 50 including the data processing of the present invention) is built in the FD 54, the CD-ROM 58, or the computer main body 51. Supplied by a recording medium such as a ROM (not shown). When the program is executed by the computer main body 51, data processing described later is performed.

なお、プログラムは家庭内にある他のコンピュータから、ケーブル59およびネットワーク5を経由してコンピュータ本体51に供給されてもよい。さらに、プログラムは、外部にあるサーバーから外部のネットワーク、ネットワーク5およびケーブル59を経由してコンピュータ本体51に供給されてもよい。   The program may be supplied to the computer main body 51 from another computer in the home via the cable 59 and the network 5. Further, the program may be supplied from the external server to the computer main body 51 via the external network, the network 5 and the cable 59.

図9は、図7のCPU10Aによる処理を示すフローチャートである。
図9を参照して、処理が開始されると、まずステップS1ではTSパケットが入力される。次にステップS2では、TSパケットにPCRが含まれるか否かが判定される。判定方法は上述のように、たとえばTSパケットに含まれるPIDが予め設定された値と一致すれば該当のTSパケットにPCRが含まれていると判定する方法である。
FIG. 9 is a flowchart showing processing by the CPU 10A of FIG.
Referring to FIG. 9, when the process is started, a TS packet is first input in step S1. Next, in step S2, it is determined whether PCR is included in the TS packet. As described above, the determination method is a method for determining that a PCR is included in the corresponding TS packet if, for example, the PID included in the TS packet matches a preset value.

ステップS2においてPCRがTSパケットに含まれていないと判断される場合、続いてステップS3に進む。一方、ステップS2においてPCRがTSパケットに含まれていると判断される場合、後述するステップS6に進む。   If it is determined in step S2 that the PCR is not included in the TS packet, the process proceeds to step S3. On the other hand, when it is determined in step S2 that the PCR is included in the TS packet, the process proceeds to step S6 described later.

ステップS3では、PCRが含まれていないTSパケットはCPU10Aに内蔵されるバッファ(図示されない)に一旦転送される。次にステップS4ではカウント値がたとえば図示されないメモリ上の配列に格納される。続いてステップS5では、前述の配列に格納されたカウント値がタイムスタンプとしてTSパケットに付加される。   In step S3, the TS packet not including the PCR is once transferred to a buffer (not shown) built in the CPU 10A. Next, in step S4, the count value is stored in an array on a memory (not shown), for example. Subsequently, in step S5, the count value stored in the aforementioned array is added to the TS packet as a time stamp.

一方、ステップS6ではTSパケットからPCRの値が抽出される。次にステップS7では抽出されたPCRが上述の計算式(1)に従ってタイムスタンプのフォーマットと一致するように整形される。   On the other hand, in step S6, the PCR value is extracted from the TS packet. Next, in step S7, the extracted PCR is shaped so as to match the format of the time stamp according to the above-described calculation formula (1).

ステップS7に続いてステップS8ではステップS5と同様に、ステップS7で得られたタイムスタンプ(整形されたPCR)がTSパケットに付加される。また、ステップS8ではカウンタにステップS7で得られたタイムスタンプ(整形されたPCR)の値がロードされてカウンタのカウント値が補正される。   Subsequent to step S7, in step S8, as in step S5, the time stamp (shaped PCR) obtained in step S7 is added to the TS packet. In step S8, the counter is loaded with the value of the time stamp (shaped PCR) obtained in step S7 and the count value of the counter is corrected.

ステップS5またはステップS8での処理に続いてステップS9ではタイムスタンプが付加されたTSパケットが出力される。   Following the processing in step S5 or step S8, in step S9, a TS packet with a time stamp added is output.

実施の形態1の変形例による効果は実施の形態1と同様である。つまり、PCRが含まれたTSパケットについてはPCRに完全に同期したタイムスタンプを付加される。よって符号化手段1Aと復号化手段25との間で時刻を同期させることが可能になる。   The effect of the modification of the first embodiment is the same as that of the first embodiment. That is, a time stamp that is completely synchronized with the PCR is added to the TS packet including the PCR. Therefore, the time can be synchronized between the encoding unit 1A and the decoding unit 25.

さらに、実施の形態1の変形例は図1における分離手段14、カウンタ16、ヘッダ付加手段15がCPU10Aで動作するプログラムで実装されるので、コストダウンの効果がより発揮される。   Further, in the modification of the first embodiment, since the separating unit 14, the counter 16, and the header adding unit 15 in FIG. 1 are implemented by a program that operates on the CPU 10A, the effect of cost reduction is further exhibited.

以上のように、実施の形態1の変形例によれば、実施の形態1と同様に、従来よりも低コストでエンコーダとデコーダとの間でクロックの同期を取ることが可能になる。   As described above, according to the modification of the first embodiment, as in the first embodiment, it is possible to synchronize the clock between the encoder and the decoder at a lower cost than in the past.

[実施の形態2]
図10は、実施の形態2のデータ処理装置が含まれるシステムの構成例を示す図である。
[Embodiment 2]
FIG. 10 is a diagram illustrating a configuration example of a system including the data processing apparatus according to the second embodiment.

図10を参照して、家庭内システム2Bは送信コントローラ4Bを含む点において図1の家庭内システム2と異なるが、他の部分については同様である。よって、他の部分の説明は以後繰り返さない。   Referring to FIG. 10, home system 2B is different from home system 2 of FIG. 1 in that it includes transmission controller 4B, but the other parts are the same. Therefore, description of other parts will not be repeated hereinafter.

送信コントローラ4Bはデータ処理手段10Bを含む点において図1の送信コントローラ4と異なるが、他の部分については同様である。よって、他の部分についての説明は以後繰り返さない。   The transmission controller 4B is different from the transmission controller 4 of FIG. 1 in that it includes the data processing means 10B, but the other parts are the same. Therefore, description of other parts will not be repeated hereinafter.

データ処理手段10Bは、分離手段14Bとヘッダ付加手段15Bとを含む点において図1のデータ処理手段10と異なるが、他の部分については同様である。よって、他の部分についての説明は以後繰り返さない。   The data processing means 10B is different from the data processing means 10 of FIG. 1 in that it includes a separating means 14B and a header adding means 15B, but the other parts are the same. Therefore, description of other parts will not be repeated hereinafter.

分離手段14Bは、チューナ3からTSパケットを受けて必要なTSパケットのみを分離するとともにカウンタ16に信号を送り、カウント値を取得する。ヘッダ付加手段15Bは分離手段14BからTSパケットを受け、カウンタ16のカウント値をタイムスタンプヘッダとしてTSパケットに付加する。ヘッダ付加手段15Bはタイムスタンプヘッダを付加した後にTSパケットを解析し、TSパケットにPCRが含まれている場合にはTSパケットからPCRを抽出して、そのTSパケットのタイムスタンプを書き換える。さらに、ヘッダ付加手段15Bはカウンタ16にPCRをロードしてカウント値をPCRの値に変更する。つまり、データ処理手段10BはTSパケットがPCRを含むか否かに関わらず、まずカウンタ16のカウント値をTSパケットに付加する点において図1のデータ処理手段10と異なる。   The separating means 14B receives TS packets from the tuner 3 and separates only necessary TS packets and sends a signal to the counter 16 to obtain a count value. The header adding means 15B receives the TS packet from the separating means 14B, and adds the count value of the counter 16 to the TS packet as a time stamp header. The header adding unit 15B analyzes the TS packet after adding the time stamp header, extracts the PCR from the TS packet when the TS packet includes the PCR, and rewrites the time stamp of the TS packet. Further, the header adding means 15B loads the PCR to the counter 16 and changes the count value to the PCR value. That is, the data processing means 10B differs from the data processing means 10 in FIG. 1 in that the count value of the counter 16 is first added to the TS packet regardless of whether or not the TS packet includes PCR.

図11は、図10の送信コントローラ4Bで行なわれる処理の概要を示す模式図である。   FIG. 11 is a schematic diagram showing an outline of processing performed by the transmission controller 4B of FIG.

図11を参照して、図の上から順に、符号化手段1Aから出力されるTSパケット、カウンタ16のカウント値(タイムスタンプ)が格納されたデータ領域、ヘッダ付加手段15Bにおいて処理されるTSパケット、および通信パケット形成手段12から出力されるIPパケットが示される。   Referring to FIG. 11, in order from the top of the figure, the TS packet output from encoding means 1A, the data area in which the count value (time stamp) of counter 16 is stored, and the TS packet processed in header addition means 15B IP packets output from the communication packet forming means 12 are shown.

符号化手段1Aは図3と同様にTSパケットP1A〜PnAを送出する。TSパケットP2A、PnAはPCRを含む。領域PCR1AはTSパケットP2AにおいてPCRが格納された領域である。同様に領域PCRnAはTSパケットPnAにおいてPCRが格納された領域である。   The encoding means 1A sends out TS packets P1A to PnA as in FIG. TS packets P2A and PnA include PCR. Area PCR1A is an area in which PCR is stored in TS packet P2A. Similarly, the region PCRnA is a region where PCR is stored in the TS packet PnA.

カウンタ16はクロックをカウントする。TSパケットP1A〜PnAのそれぞれの入力時刻に応じたカウント値は、取得したカウント値を一時的格納するヘッダ付加手段15中の領域CT1A〜CTnAに格納される。   The counter 16 counts the clock. The count values corresponding to the input times of the TS packets P1A to PnA are stored in areas CT1A to CTnA in the header adding means 15 for temporarily storing the acquired count values.

ヘッダ付加手段15Bは、TSパケットP1A〜PnAのそれぞれに領域CT1A〜CTnAに格納されたカウント値を付加する。TSパケットTP1A〜TPnAはタイムスタンプヘッダが付加されたTSパケットである。次にヘッダ付加手段15BはTSパケットを解析し、TSパケットにPCRが含まれる場合、タイムスタンプをPCRの値に置換する。図11ではTSパケットTP2A,TPnAにPCRが含まれる。よって、ヘッダHD2A,HDnAに格納されるタイムスタンプはそれぞれTSパケットTP2A,TPnAに含まれるPCRの値に置換される。   The header adding means 15B adds the count values stored in the areas CT1A to CTnA to the TS packets P1A to PnA, respectively. TS packets TP1A to TPnA are TS packets to which a time stamp header is added. Next, the header adding means 15B analyzes the TS packet, and if the TS packet includes a PCR, the time stamp is replaced with the PCR value. In FIG. 11, PCR is included in TS packets TP2A and TPnA. Therefore, the time stamps stored in the headers HD2A and HDnA are replaced with the PCR values included in the TS packets TP2A and TPnA, respectively.

通信パケット形成手段12では図3と同様に、TSパケットTP1A〜TP4A、および0個ないし1個以上のTSパケットを結合してTCP/IPヘッダを付加し、IPパケットI1を出力する。   As in FIG. 3, the communication packet forming means 12 combines the TS packets TP1A to TP4A and 0 to 1 or more TS packets, adds a TCP / IP header, and outputs an IP packet I1.

図3の領域PCR1に格納されるPCRと領域PCR1Aに格納されるPCRが同一の値であるとすると、TSパケットTP2Aに格納されるタイムスタンプとTSパケットTP2に格納されるタイムスタンプは同一である。つまり、実施の形態2では実施の形態1と同様にエンコーダとデコーダとの間でクロックを同期させることが可能になる。   If the PCR stored in the region PCR1 and the PCR stored in the region PCR1A have the same value, the time stamp stored in the TS packet TP2A and the time stamp stored in the TS packet TP2 are the same. . That is, in the second embodiment, the clock can be synchronized between the encoder and the decoder as in the first embodiment.

図12は、図10のデータ処理手段10Bの構成を示す図である。
図12を参照して、分離手段14Bはデータ入力手段30Bを含む。データ入力手段30Bは受けたTSパケットをヘッダ付加手段15Bに出力するとともに、カウンタ16に対してラッチ信号を出力する。
FIG. 12 is a diagram showing the configuration of the data processing means 10B of FIG.
Referring to FIG. 12, separation means 14B includes data input means 30B. The data input means 30B outputs the received TS packet to the header addition means 15B and outputs a latch signal to the counter 16.

ヘッダ付加手段15Bは、タイムスタンプ付加手段40Bとパケット解析手段32Bとを含む。タイムスタンプ付加手段40Bはカウンタ16からカウント値を取得し、データ入力手段30Bから受けたTSパケットにカウント値をタイムスタンプヘッダとして付加する。パケット解析手段32Bは、たとえば図4のパケット解析手段32と同様の方法によってTSパケットを解析して、TSパケットにPCRが含まれているか否かを判定する。なお、パケット解析手段32Bはタイムスタンプ付加手段40Bに含まれてもよい。   The header addition means 15B includes a time stamp addition means 40B and a packet analysis means 32B. The time stamp adding means 40B acquires the count value from the counter 16, and adds the count value as a time stamp header to the TS packet received from the data input means 30B. The packet analysis unit 32B analyzes the TS packet by, for example, the same method as the packet analysis unit 32 of FIG. 4, and determines whether or not the TS packet includes a PCR. The packet analysis means 32B may be included in the time stamp addition means 40B.

ヘッダ付加手段15Bは、さらに、PCR抽出手段34Bと、タイムスタンプ整形手段38と、タイムスタンプ補正手段60とを含む。PCR抽出手段34Bは図4のPCR抽出手段34と同様にTSパケットの定められた場所に記述されているデータをPCRとして抽出する。また、PCR抽出手段34BはPCRをタイムスタンプ整形手段38に転送するとともにTSパケットをタイムスタンプ補正手段60に出力する。   The header adding unit 15B further includes a PCR extracting unit 34B, a time stamp shaping unit 38, and a time stamp correcting unit 60. The PCR extracting unit 34B extracts the data described in the defined place of the TS packet as the PCR, like the PCR extracting unit 34 of FIG. The PCR extracting unit 34B transfers the PCR to the time stamp shaping unit 38 and outputs the TS packet to the time stamp correcting unit 60.

タイムスタンプ整形手段38はカウンタ16のカウンタ長がPCRよりも短い場合にPCRを整形してタイムスタンプを生成する。また、タイムスタンプ整形手段38はタイムスタンプをカウンタ16に出力するともにタイムスタンプ補正手段60に送出する。   The time stamp shaping means 38 shapes the PCR and generates a time stamp when the counter length of the counter 16 is shorter than the PCR. The time stamp shaping means 38 outputs the time stamp to the counter 16 and sends it to the time stamp correction means 60.

タイムスタンプ補正手段60は、タイムスタンプ整形手段38からタイムスタンプを受けるともにPCR抽出手段34BからTSパケットを受け、TSパケットに付加されたタイムスタンプの値をタイムスタンプ整形手段38から受けたタイムスタンプの値に置換する。つまり、タイムスタンプ補正手段60はタイムスタンプ付加手段40Bと同様にTSパケットにタイムスタンプを付加する機能を有する。   The time stamp correcting means 60 receives the time stamp from the time stamp shaping means 38 and the TS packet from the PCR extracting means 34B, and the time stamp value added to the TS packet is received from the time stamp shaping means 38. Replace with a value. That is, the time stamp correction unit 60 has a function of adding a time stamp to the TS packet, similar to the time stamp addition unit 40B.

データ出力手段42は、パケット解析手段32Bまたはタイムスタンプ補正手段60から受けたTSパケットを出力する。   The data output means 42 outputs the TS packet received from the packet analysis means 32B or the time stamp correction means 60.

以上のように、実施の形態2のデータ処理装置によれば、実施の形態1と同様に低コストでエンコーダとデコーダとの間のクロックを同期させることが可能になる。   As described above, according to the data processing apparatus of the second embodiment, it is possible to synchronize the clocks between the encoder and the decoder at a low cost as in the first embodiment.

[実施の形態2の変形例]
図13は、実施の形態2の変形例に係るシステムの構成例を示す図である。
[Modification of Embodiment 2]
FIG. 13 is a diagram illustrating a configuration example of a system according to a modification of the second embodiment.

図13を参照して、家庭内システム2Cは送信コントローラ4Cを含む点において図10の家庭内システム2Bと異なるが、その他の部分については同様である。よって、その他の部分に関する以後の説明は繰り返さない。   Referring to FIG. 13, home system 2C is different from home system 2B of FIG. 10 in that it includes transmission controller 4C, but the other parts are the same. Therefore, the subsequent description regarding other parts will not be repeated.

送信コントローラ4Cは、CPU10AおよびROM18Cを含む点において図10の送信コントローラ4Bと異なるが、その他の部分については同様である。よって、その他の部分に関する以後の説明は繰り返さない。   The transmission controller 4C is different from the transmission controller 4B of FIG. 10 in that it includes a CPU 10A and a ROM 18C, but the other parts are the same. Therefore, the subsequent description regarding other parts will not be repeated.

図10における分離手段14B、ヘッダ付加手段15Bおよびカウンタ16の各機能は、図13ではプログラムをCPU10Aに実行させることによって実現される。ROM18Cは、ROM18と同様にCPU10AがTSパケットにタイムスタンプを付加するための各ステップをコンピュータに実行させるためのプログラムを格納する。つまり、ROM18Cはコンピュータ読み取り可能な記録媒体である。   The functions of the separating unit 14B, the header adding unit 15B, and the counter 16 in FIG. 10 are realized by causing the CPU 10A to execute a program in FIG. The ROM 18C stores a program for causing the computer to execute each step for adding a time stamp to the TS packet by the CPU 10A, like the ROM 18. That is, the ROM 18C is a computer-readable recording medium.

なお、実施の形態1の変形例と同様に記録媒体はROMに限定されるものではなく、たとえばフラッシュメモリやハードディスク、DVD、フロッピー(登録商標)ディスク、磁気テープなどが想定される。また、図7のROM18と同様に、ROM18Cは半導体装置に限定されず、たとえばCD−ROMであってもよい。さらにROM18CはCPU10Aに含まれていてもよい。   As in the modification of the first embodiment, the recording medium is not limited to the ROM, and for example, a flash memory, a hard disk, a DVD, a floppy (registered trademark) disk, a magnetic tape, and the like are assumed. Further, like the ROM 18 in FIG. 7, the ROM 18C is not limited to a semiconductor device, and may be a CD-ROM, for example. Furthermore, the ROM 18C may be included in the CPU 10A.

また、実施の形態2の変形例において、送信コントローラ4Cが含まれる通信装置の外観は、たとえば図8における通信装置50と同様である。よって通信装置の外観についての説明は以後繰り返さない。この場合、実施の形態2の変形例において実施の形態1の変形例と同様に、プログラムは記録媒体によって通信装置に供給されることが可能である。   Moreover, in the modification of Embodiment 2, the external appearance of the communication apparatus including the transmission controller 4C is the same as that of the communication apparatus 50 in FIG. 8, for example. Therefore, description of the appearance of the communication device will not be repeated hereinafter. In this case, in the modified example of the second embodiment, as in the modified example of the first embodiment, the program can be supplied to the communication device by the recording medium.

図14は、図13のCPU10Aによる処理を示すフローチャートである。
図14を参照して、処理が開始されるとステップS11ではTSパケットが入力される。続いてステップS12では、TSパケットが入力された時刻を記録するため、カウンタのカウント値がメモリ上の配列に格納される。続いてステップS13では前述の配列に格納されたカウンタの値がタイムスタンプとしてTSパケットに付加される。
FIG. 14 is a flowchart showing processing by the CPU 10A of FIG.
Referring to FIG. 14, when the process is started, a TS packet is input in step S11. In step S12, the count value of the counter is stored in an array on the memory in order to record the time when the TS packet is input. Subsequently, in step S13, the counter values stored in the array are added to the TS packet as a time stamp.

続いてステップS14では、図9に示されるフローチャートにおけるステップS2と同様にTSパケットにPCRが含まれているかどうかが判断される。PCRが含まれていない場合はステップS18に進む。ステップS18では、タイムスタンプが付加されたTSパケットがそのまま出力される。   Subsequently, in step S14, it is determined whether PCR is included in the TS packet as in step S2 in the flowchart shown in FIG. If no PCR is included, the process proceeds to step S18. In step S18, the TS packet to which the time stamp is added is output as it is.

一方、ステップS14においてTSパケットにPCRが含まれると判断される場合、ステップS15に進む。ステップS15では、PCRがTSパケットから抽出される。続いてステップS16において、PCRはタイムスタンプに応じたフォーマットに整形される。   On the other hand, if it is determined in step S14 that the TS packet includes PCR, the process proceeds to step S15. In step S15, the PCR is extracted from the TS packet. Subsequently, in step S16, the PCR is shaped into a format corresponding to the time stamp.

続いてステップS17では、ステップS16で得られたタイムスタンプの値がカウンタにロードされてカウンタの値が書き換わる。また、ステップS17では、TSパケットに付加されたタイムスタンプがステップS16で得られたタイムスタンプに置換される補正が行なわれる。ステップS17に続いてステップS18では、タイムスタンプが置換されたTSパケットが出力される。   Subsequently, in step S17, the time stamp value obtained in step S16 is loaded into the counter, and the counter value is rewritten. In step S17, correction is performed in which the time stamp added to the TS packet is replaced with the time stamp obtained in step S16. In step S18 following step S17, the TS packet with the time stamp replaced is output.

以上のように実施の形態2の変形例によれば、実施の形態1と同様に、エンコーダとデコーダとの間のクロックを同期させることが可能になる。   As described above, according to the modification of the second embodiment, the clock between the encoder and the decoder can be synchronized as in the first embodiment.

[実施の形態3]
図15は、実施の形態3のデータ処理装置が含まれるシステムの構成例を示す図である。
[Embodiment 3]
FIG. 15 is a diagram illustrating a configuration example of a system including the data processing apparatus according to the third embodiment.

図15を参照して、家庭内システム2Dは図1の送信コントローラとは異なる機能を有する送信コントローラ4Dを含む点において図1の家庭内システム2と異なるが、他の部分については同様である。よって、他の部分の説明は以後繰り返さない。   Referring to FIG. 15, home system 2D is different from home system 2 in FIG. 1 in that it includes a transmission controller 4D having a function different from that of the transmission controller in FIG. 1, but the other parts are the same. Therefore, description of other parts will not be repeated hereinafter.

送信コントローラ4Dはデータ処理手段10Dを含む点において図1の送信コントローラ4と異なるが、他の部分については同様である。よって、他の部分についての説明は以後繰り返さない。   The transmission controller 4D is different from the transmission controller 4 of FIG. 1 in that it includes the data processing means 10D, but the other parts are the same. Therefore, description of other parts will not be repeated hereinafter.

データ処理手段10Dは、分離手段14Dとヘッダ付加手段15Dとカウンタ10Dを含む点において図1のデータ処理手段10と異なるが、他の部分については同様である。よって、他の部分についての説明は以後繰り返さない。   The data processing means 10D is different from the data processing means 10 of FIG. 1 in that it includes a separating means 14D, a header adding means 15D, and a counter 10D, but the other parts are the same. Therefore, description of other parts will not be repeated hereinafter.

分離手段14Dは、チューナ3からTSパケットを受けてPCRを抽出し、先に受けたPCRを含むTSパケットとの到達時間間隔とPCRの進み方との差分値を算出するとともに、差分値をカウンタ16に送出し、カウント値を補正する。ヘッダ付加手段15Dは分離手段14DからTSパケットを受け、カウンタ16のカウント値をタイムスタンプヘッダとしてすべてのTSパケットに付加する。つまり、データ処理手段10DはTSパケットがPCRを含む場合にカウント値の補正のみを行ない、カウンタ16のカウント値をすべてのTSパケットに付加する点において図1のデータ処理手段10と異なる。   The separation unit 14D receives the TS packet from the tuner 3 and extracts the PCR, calculates a difference value between the arrival time interval of the TS packet including the previously received PCR and the way the PCR proceeds, and counts the difference value 16 and the count value is corrected. The header adding means 15D receives the TS packet from the separating means 14D, and adds the count value of the counter 16 to all TS packets as a time stamp header. That is, the data processing means 10D differs from the data processing means 10 in FIG. 1 in that only the count value is corrected when the TS packet includes PCR, and the count value of the counter 16 is added to all TS packets.

図16は、図15の送信コントローラ4Dで行なわれる処理の概要を示す模式図である。   FIG. 16 is a schematic diagram showing an outline of processing performed by the transmission controller 4D of FIG.

図16を参照して、図の上から順に、符号化手段1Aから出力されるTSパケット、カウンタ16のカウント値(タイムスタンプ)が格納されたデータ領域、ヘッダ付加手段15Dにおいて処理されるTSパケット、および通信パケット形成手段12から出力されるIPパケットが示される。   Referring to FIG. 16, in order from the top of the figure, the TS packet output from encoding means 1A, the data area in which the count value (time stamp) of counter 16 is stored, and the TS packet processed in header addition means 15D IP packets output from the communication packet forming means 12 are shown.

符号化手段1Aは図3と同様にTSパケットP1B〜PnBを送出する。TSパケットP2B、P(n−a)、PnBはPCRを含む。領域PCR1BはTSパケットP2BにおいてPCRが格納された領域であり、領域PCR(n−a)BはTSパケットP(n−a)BにおいてPCRが格納された領域、領域PCRnBはTSパケットPnBにおいてPCRが格納された領域である。   The encoding means 1A sends out TS packets P1B to PnB as in FIG. TS packets P2B, P (na), and PnB include PCR. The region PCR1B is a region where the PCR is stored in the TS packet P2B, the region PCR (na) B is a region where the PCR is stored in the TS packet P (na) B, and the region PCRnB is a PCR in the TS packet PnB. Is an area in which is stored.

カウンタ16はクロックをカウントする。TSパケットP1B〜PnBのそれぞれの入力時刻に応じたカウント値は取得したカウント値を一時的格納するヘッダ付加手段中の領域CT1B〜CTnBに格納される。TSパケットPnBがデータ処理手段10Dに入力されると、先に到着したPCRを含むTSパケットP(n−a)Bの入力時刻に応じたカウント値が格納されていたCT(n−a)Bの値とCTnBとの差と、PCR(n−a)BとPCRnBとの差との差分値を領域CTnBに格納されているカウント値に加える。ここで先に到着したPCRを含むTSパケットP(n−a)Bは通常ひとつ前に到着したPCRを含むTSパケットであるが、複数個前に到着したPCRを含むTSパケットで差分値を算出してもよい。   The counter 16 counts the clock. The count values corresponding to the input times of the TS packets P1B to PnB are stored in areas CT1B to CTnB in the header adding means for temporarily storing the acquired count values. When the TS packet PnB is input to the data processing means 10D, the count value corresponding to the input time of the TS packet P (na) B including the previously arrived PCR is stored in CT (na) B. And a difference value between the difference between the value of CTnB and the difference between PCR (na) B and PCRnB is added to the count value stored in the region CTnB. Here, the TS packet P (na) B including the PCR arriving first is usually a TS packet including the PCR arriving immediately before, but the difference value is calculated by the TS packet including the PCR arriving before a plurality of times. May be.

ヘッダ付加手段15Dは、TSパケットがPCRパケットを含むか含まないかにかかわらず、TSパケットにタイムスタンプを付加する。つまり、CT1B〜CTnBに格納されていたカウント値がヘッダ付加手段15DによってヘッダHD1B〜HDnBに格納される。   The header adding unit 15D adds a time stamp to the TS packet regardless of whether the TS packet includes a PCR packet or not. That is, the count values stored in CT1B to CTnB are stored in the headers HD1B to HDnB by the header adding means 15D.

通信パケット形成手段12では図3と同様に、TSパケットTP1B〜TP3B、および0個ないし1個以上のTSパケットを結合してTCP/IPヘッダを付加し、IPパケットI2を出力する。   As in FIG. 3, the communication packet forming means 12 combines the TS packets TP1B to TP3B and 0 to 1 or more TS packets, adds a TCP / IP header, and outputs an IP packet I2.

図17は、図15のデータ処理手段10Dの構成を示す図である。
図17を参照して、分離手段14Dはデータ入力手段30Dと、パケット解析手段32DとPCR抽出手段34Dと、PCR差分算出手段70とを含む。PCR抽出手段34DとPCR差分算出手段70とは本発明における「抽出手段」を構成する。
FIG. 17 is a diagram showing the configuration of the data processing means 10D of FIG.
Referring to FIG. 17, separation means 14D includes data input means 30D, packet analysis means 32D, PCR extraction means 34D, and PCR difference calculation means 70. The PCR extracting means 34D and the PCR difference calculating means 70 constitute the “extracting means” in the present invention.

データ入力手段30Dは受けたTSパケットをパケット解析手段32Dに転送する。パケット解析手段32Dはパケット解析手段32と同様に入力されたパケットを解析し、TSパケットにPCRが含まれているか否かを判定する。パケット解析手段32は、TSパケットにPCRが含まれていると判定する場合には、TSパケットをPCR抽出手段34Dに転送し、TSパケットにPCRが含まれていないと判定する場合にはTSパケットをヘッダ付加手段15Dに転送する。   The data input means 30D transfers the received TS packet to the packet analysis means 32D. The packet analysis unit 32D analyzes the input packet in the same manner as the packet analysis unit 32, and determines whether the TS packet includes a PCR. The packet analysis unit 32 transfers the TS packet to the PCR extraction unit 34D when determining that the TS packet includes the PCR, and the TS packet when determining that the TS packet does not include the PCR. Is transferred to the header adding means 15D.

PCR抽出手段34DはPCR抽出手段34と同様にPCRが含まれたTSパケットを受け、抽出したPCRをPCR差分算出手段70に転送し、TSパケットをヘッダ付加手段15Dに転送する。   The PCR extracting unit 34D receives the TS packet including the PCR, similarly to the PCR extracting unit 34, transfers the extracted PCR to the PCR difference calculating unit 70, and transfers the TS packet to the header adding unit 15D.

PCR差分算出手段70はPCR抽出手段34DからPCRを受信するとラッチ信号をカウンタ16に出力し、カウンタ16からのカウント値(クロック情報)を取得する。このときPCRの値とカウント値は一時保存しておく。次のPCRを受けたときには、同様の方法で今回のPCRの受信に応じたカウント値を取得する。このとき一時保存しておいたPCRの値と今回受信したPCRの値を比較したPCRの増分と、それぞれに対応するカウント値の増分を比較することにより、カウンタの進み具合と、PCRの進み具合の違いに起因する誤差を差分値として算出する。この算出された差分値をカウンタ16に転送し、カウンタ16はPCR差分算出手段70から転送された差分値をカウント値に加える。   When the PCR difference calculation means 70 receives the PCR from the PCR extraction means 34D, it outputs a latch signal to the counter 16 and acquires the count value (clock information) from the counter 16. At this time, the PCR value and the count value are temporarily stored. When the next PCR is received, a count value corresponding to the reception of the current PCR is acquired by the same method. At this time, by comparing the PCR increment temporarily compared with the PCR value received this time and the increment of the corresponding count value, the progress of the counter and the progress of the PCR are compared. The error resulting from the difference is calculated as a difference value. The calculated difference value is transferred to the counter 16, and the counter 16 adds the difference value transferred from the PCR difference calculation means 70 to the count value.

一方、ヘッダ付加手段15Dはバッファ36Dとタイムスタンプ付加手段40Dと、データ出力手段42Dとを含む。   On the other hand, the header adding means 15D includes a buffer 36D, a time stamp adding means 40D, and a data output means 42D.

バッファ36DはTSパケットを一時的に格納する。TSパケットが格納されるごとに、バッファ36Dはラッチ信号をカウンタ16に出力する。また、バッファ36Dはタイムスタンプ付加手段40DにTSパケットを順次転送する。カウンタ16はバッファ36Dから送られるラッチ信号を検出すると、そのときのカウント値をタイムスタンプ付加手段40Dに転送する。   The buffer 36D temporarily stores TS packets. Each time a TS packet is stored, the buffer 36D outputs a latch signal to the counter 16. Further, the buffer 36D sequentially transfers the TS packets to the time stamp adding means 40D. When the counter 16 detects the latch signal sent from the buffer 36D, it transfers the count value at that time to the time stamp adding means 40D.

タイムスタンプ付加手段40Dはカウンタ16から送られてきたカウント値をTSパケットに付加すべきタイムスタンプとして順次付加し、タイムスタンプが付加されたTSパケットをデータ出力手段42Dに転送する。データ出力手段42Dはタイムスタンプ付加手段40Dから入力された、タイムスタンプが付加されたTSパケットを順次出力する。   The time stamp adding means 40D sequentially adds the count value sent from the counter 16 as a time stamp to be added to the TS packet, and transfers the TS packet with the time stamp added to the data output means 42D. The data output means 42D sequentially outputs TS packets to which time stamps are input, which are input from the time stamp addition means 40D.

次に、図17におけるPCR差分算出手段70における動作について補足する。PCR差分算出手段70はPCRの値が連続しているかどうかを判定し、不連続の場合には誤差を出力しない(誤差を0とする)。   Next, the operation of the PCR difference calculation means 70 in FIG. 17 will be supplemented. The PCR difference calculating means 70 determines whether or not the PCR values are continuous, and does not output an error if the value is discontinuous (the error is set to 0).

PCR差分算出手段70はPCRの差分を算出するため、PCRを含むTSパケットを2個以上受信する必要がある。あるPCRを受信してから一定期間(たとえば100ミリ秒)以内に1回以上受信すべきPCRを、100ミリ秒以上経っても受信していない場合、あるいはPCRが不連続になったことを示すフラグをTSパケットのヘッダから検出した場合など、PCRの増分を誤差として正しく評価できない場合が生じると、PCR差分算出手段70はPCRの値が不連続であると判定する。この場合、PCR差分算出手段70はカウンタへの差分値の転送を一時停止し、比較対象として一時保存したPCR値とそのときのカウント値とを消去する。よってPCRの値が不連続の場合、PCR差分算出手段70から誤差が出力されない。   The PCR difference calculation means 70 needs to receive two or more TS packets including the PCR in order to calculate the PCR difference. Indicates that a PCR that should be received at least once within a certain period of time (for example, 100 milliseconds) after receiving a PCR has not been received even after 100 milliseconds, or that the PCR has become discontinuous. When there is a case where the PCR increment cannot be correctly evaluated as an error, such as when the flag is detected from the header of the TS packet, the PCR difference calculation means 70 determines that the PCR value is discontinuous. In this case, the PCR difference calculation means 70 temporarily stops the transfer of the difference value to the counter, and deletes the PCR value temporarily stored as a comparison target and the count value at that time. Therefore, when the PCR value is discontinuous, no error is output from the PCR difference calculation means 70.

以上のように、実施の形態3のデータ処理装置によれば、実施の形態1と同様に低コストでエンコーダとデコーダとの間のクロックを同期させることが可能になる。   As described above, according to the data processing apparatus of the third embodiment, it is possible to synchronize the clock between the encoder and the decoder at a low cost as in the first embodiment.

[実施の形態3の変形例]
図18は、実施の形態3のデータ処理装置の変形例が含まれるシステムの構成例を示す図である。
[Modification of Embodiment 3]
FIG. 18 is a diagram illustrating a configuration example of a system including a modification of the data processing device according to the third embodiment.

図18を参照して、家庭内システム2Eは図15の送信コントローラとは異なる構造の送信コントローラ4Eを含む点において図15の家庭内システム2Cと異なるが、その他の部分については同様である。よって、その他の部分に関する以後の説明は繰り返さない。   Referring to FIG. 18, home system 2E is different from home system 2C in FIG. 15 in that it includes transmission controller 4E having a structure different from that in FIG. 15, but the other parts are the same. Therefore, the subsequent description regarding other parts will not be repeated.

送信コントローラ4Eは、CPU10AおよびROM18Eを含む点において図15の送信コントローラ4Cと異なるが、その他の部分については同様である。よって、その他の部分に関する以後の説明は繰り返さない。   The transmission controller 4E is different from the transmission controller 4C of FIG. 15 in that it includes the CPU 10A and the ROM 18E, but the other parts are the same. Therefore, the subsequent description regarding other parts will not be repeated.

図15における分離手段14D、ヘッダ付加手段15Dおよびカウンタ16の各機能は、図18ではプログラムをCPU10Aに実行させることによって実現される。ROM18Eは、ROM18と同様にCPU10AがTSパケットにタイムスタンプを付加するための各ステップをコンピュータに実行させるためのプログラムを格納する。つまり、ROM18Eはコンピュータ読み取り可能な記録媒体である。   The functions of the separating unit 14D, the header adding unit 15D, and the counter 16 in FIG. 15 are realized by causing the CPU 10A to execute a program in FIG. The ROM 18E stores a program for causing the computer to execute each step for adding a time stamp to the TS packet by the CPU 10A, like the ROM 18. That is, the ROM 18E is a computer-readable recording medium.

なお、実施の形態1の変形例と同様に記録媒体はROMに限定されるものではなく、たとえばフラッシュメモリやハードディスク、DVD、フロッピー(登録商標)ディスク、磁気テープなどが想定される。また、図7のROM18と同様に、ROM18Eは半導体装置に限定されず、たとえばCD−ROMであってもよい。さらにROM18EはCPU10Aに含まれていてもよい。   As in the modification of the first embodiment, the recording medium is not limited to the ROM, and for example, a flash memory, a hard disk, a DVD, a floppy (registered trademark) disk, a magnetic tape, and the like are assumed. Further, like the ROM 18 in FIG. 7, the ROM 18E is not limited to a semiconductor device, and may be a CD-ROM, for example. Further, the ROM 18E may be included in the CPU 10A.

また、実施の形態3の変形例において、送信コントローラ4Eが含まれる通信装置の外観は、たとえば図8における通信装置50と同様である。よって通信装置の外観についての説明は以後繰り返さない。この場合、実施の形態3の変形例において実施の形態1の変形例と同様に、プログラムは記録媒体によって通信装置に供給されることが可能である。   Moreover, in the modification of Embodiment 3, the external appearance of the communication apparatus including the transmission controller 4E is the same as, for example, the communication apparatus 50 in FIG. Therefore, description of the appearance of the communication device will not be repeated hereinafter. In this case, in the modified example of the third embodiment, as in the modified example of the first embodiment, the program can be supplied to the communication device by the recording medium.

図19は、図18のCPU10Aによる処理を示すフローチャートである。
図19を参照して、処理が開始されるとステップS21ではTSパケットが入力される。続いてステップS22では図9に示されるフローチャートにおけるステップS2と同様にTSパケットにPCRが含まれているかどうかが判断される。PCRが含まれていると判断される場合はステップS23に進む。一方TSパケットにPCRが含まれていない場合は後述するステップS27に進む。
FIG. 19 is a flowchart showing processing by the CPU 10A of FIG.
Referring to FIG. 19, when the process is started, a TS packet is input in step S21. Subsequently, in step S22, it is determined whether PCR is included in the TS packet as in step S2 in the flowchart shown in FIG. If it is determined that the PCR is included, the process proceeds to step S23. On the other hand, if the PCR is not included in the TS packet, the process proceeds to step S27 described later.

ステップS23では、TSパケットからPCRの値が抽出される。次にステップS24では抽出されたPCRの値がそのときのカウント値とともにたとえば図示されないメモリ上の配列に格納される。このとき既に格納している数回のPCRの値とカウント値の履歴を上書きしないように格納される。   In step S23, the PCR value is extracted from the TS packet. In step S24, the extracted PCR value is stored together with the count value at that time, for example, in an array on a memory (not shown). At this time, it is stored so as not to overwrite the history of the PCR values and count values that have already been stored several times.

続いてステップS25では、前述の配列に格納されたPCRの値とカウント値の履歴をもとに、PCRの増分とカウンタの増分との差分を算出する。さらに、ステップS26ではこの算出された差分値をカウンタに加えることによってカウンタのカウント値を補正し、ステップS27に進む。   In step S25, the difference between the PCR increment and the counter increment is calculated based on the PCR value and count value history stored in the array. Further, in step S26, the count value of the counter is corrected by adding the calculated difference value to the counter, and the process proceeds to step S27.

ステップS27では、すべてのTSパケットがCPU10Aに内蔵されるバッファ(図示されない)に一旦転送される。   In step S27, all TS packets are temporarily transferred to a buffer (not shown) built in the CPU 10A.

ステップS28および、ステップ29では、図9に示されるフローチャートにおけるステップS4および、ステップS5と同様に、タイムスタンプがTSパケットに付加される。   In step S28 and step 29, a time stamp is added to the TS packet in the same manner as in step S4 and step S5 in the flowchart shown in FIG.

ステップS29での処理に続いてステップS30ではタイムスタンプが付加されたTSパケットが出力される。   Subsequent to the processing in step S29, a TS packet to which a time stamp is added is output in step S30.

以上のように実施の形態3の変形例によれば、実施の形態1と同様に、エンコーダとデコーダとの間のクロックを同期させることが可能になる。   As described above, according to the modification of the third embodiment, the clock between the encoder and the decoder can be synchronized as in the first embodiment.

なお、この発明の他の応用例について以下に説明する。
たとえばエンコーダからTSパケットを直接受ける場合やハードディスクなどの外部記憶装置(ストレージ)に保存されたTSパケットを受ける場合にもこの発明のデータ処理装置、プログラム、記録媒体は適用可能である。この場合、受けたTSパケットのうちPCRが含まれるTSパケットからPCRを抽出し、上述の実施の形態1または2または3に示される処理を行うことによってTSパケットにPCRと同期したタイムスタンプヘッダを付加することが可能である。
Other application examples of the present invention will be described below.
For example, the data processing device, the program, and the recording medium of the present invention can be applied when receiving TS packets directly from an encoder or when receiving TS packets stored in an external storage device (storage) such as a hard disk. In this case, the PCR is extracted from the TS packet including the PCR among the received TS packets, and the time stamp header synchronized with the PCR is added to the TS packet by performing the processing described in the first, second, or third embodiment. It is possible to add.

また、エンコーダやチューナから受けたTSパケットを、一旦ストレージに保存する場合にもこの発明は適用可能である。この場合、この発明に従うタイムスタンプ付加処理が行なわれたTSパケットが保存されるので、デコーダは正常に情報を再生することができる。   The present invention can also be applied to a case where TS packets received from an encoder or tuner are temporarily stored in a storage. In this case, since the TS packet subjected to the time stamp addition processing according to the present invention is stored, the decoder can reproduce information normally.

さらに、伝送されるデータはMPEG−PS形式のパケットであってもよい。この場合、PCRに代えてSCR(System Clock Reference、システム時刻基準情報参照値)がタイムスタンプとして用いられる。なお、MPEG−PS形式のパケットの利用例として、たとえば通信機能を備えたDVD録画装置によるデータ転送の例がある。   Furthermore, the transmitted data may be a packet in the MPEG-PS format. In this case, instead of PCR, SCR (System Clock Reference) is used as a time stamp. As an example of the use of MPEG-PS format packets, for example, there is an example of data transfer by a DVD recording apparatus having a communication function.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

この発明のデータ処理装置が含まれるシステムの構成例を示す図である。It is a figure which shows the structural example of the system in which the data processor of this invention is included. TSパケットのうち、PCRを含むパケットの構成の一例を示す図である。It is a figure which shows an example of a structure of the packet containing PCR among TS packets. 図1の送信コントローラ4で行なわれる処理の概要を示す模式図である。It is a schematic diagram which shows the outline | summary of the process performed by the transmission controller 4 of FIG. 図1のデータ処理手段10の構成を示すブロック図である。It is a block diagram which shows the structure of the data processing means 10 of FIG. 図1のカウンタ16の補正が行なわれない場合におけるPCRとタイムスタンプとの誤差を説明する図である。It is a figure explaining the error of PCR and time stamp in case the correction of the counter 16 of FIG. 1 is not performed. 図1のカウンタ16の補正が行なわれた場合におけるPCRとタイムスタンプとの誤差を説明する図である。It is a figure explaining the difference | error of PCR and a time stamp when the correction of the counter 16 of FIG. 1 is performed. 実施の形態1の変形例に係るシステムの構成例を示す図である。6 is a diagram illustrating a configuration example of a system according to a modification of the first embodiment. FIG. 図7の送信コントローラ4Aが含まれる装置の外観例を示す図である。It is a figure which shows the example of an external appearance of the apparatus containing the transmission controller 4A of FIG. 図7のCPU10Aによる処理を示すフローチャートである。It is a flowchart which shows the process by CPU10A of FIG. 実施の形態2のデータ処理装置が含まれるシステムの構成例を示す図である。It is a figure which shows the structural example of the system in which the data processor of Embodiment 2 is included. 図10の送信コントローラ4Bで行なわれる処理の概要を示す模式図である。It is a schematic diagram which shows the outline | summary of the process performed by the transmission controller 4B of FIG. 図10のデータ処理手段10Bの構成を示す図である。It is a figure which shows the structure of the data processing means 10B of FIG. 実施の形態2の変形例に係るシステムの構成例を示す図である。FIG. 10 is a diagram illustrating a configuration example of a system according to a modified example of the second embodiment. 図13のCPU10Aによる処理を示すフローチャートである。It is a flowchart which shows the process by CPU10A of FIG. 実施の形態3のデータ処理装置が含まれるシステムの構成例を示す図である。FIG. 10 is a diagram illustrating a configuration example of a system including a data processing device according to a third embodiment. 図15の送信コントローラ4Dで行なわれる処理の概要を示す模式図である。It is a schematic diagram which shows the outline | summary of the process performed by transmission controller 4D of FIG. 図15のデータ処理手段10Dの構成を示す図である。It is a figure which shows the structure of the data processing means 10D of FIG. 実施の形態3のデータ処理装置の変形例が含まれるシステムの構成例を示す図である。FIG. 10 is a diagram illustrating a configuration example of a system including a modification of the data processing device according to the third embodiment. 図18のCPU10Aによる処理を示すフローチャートである。It is a flowchart which shows the process by CPU10A of FIG. 従来の伝送システムの構成例を示す図である。It is a figure which shows the structural example of the conventional transmission system.

符号の説明Explanation of symbols

1,101 コンテンツ作成元、1A,101A 符号化手段、2,2A〜2E,102 家庭内システム、3,103 チューナ、4,4A〜4E,104 送信コントローラ、5,105 ネットワーク、6,106 受信コントローラ、7,107 再生装置、10,10B,10D データ処理手段、10A CPU、11,111 固定クロック、12,112 通信パケット形成手段、13 通信コントローラ、14,14B,14D 分離手段、15,15B,15D ヘッダ付加手段、16,116 カウンタ、18,18C,18E ROM、20,120 通信コントローラ、21,121 通信パケット分離手段、22,122 ジッタ補正手段、23,123,26,126 クロック、24,124 カウンタ、25,125 復号化手段、30,30B,30D データ入力手段、32,32B,32D パケット解析手段、34,34B,34D PCR抽出手段、36,36D バッファ、38 タイムスタンプ整形手段、40,40B,40D タイムスタンプ付加手段、42 データ出力手段、50 通信装置、51 コンピュータ本体、52 ディスプレイ装置、53 FDドライブ、54 FD、55 キーボード、56 マウス、57 CD−ROM装置、58 CD−ROM、59 ケーブル、60 タイムスタンプ補正手段、70 PCR差分算出手段、CT1〜CTn,CT1A〜CTnA 領域、HD1〜HDn,HD1A〜HDnA,HD1B〜HDnB ヘッダ、I0,I1,I2 IPパケット、P0,P1〜Pn,P1A〜PnA,P1B〜PnB,TP1〜TPn,TP1A〜TPnA,TP1B〜TPnB TSパケット、PCR1,PCR1A,PCR1B,PCR2,PCRn,PCRnA,PCRnB 領域、S1〜S30 ステップ。   1,101 Content creation source, 1A, 101A encoding means, 2,2A-2E, 102 Home system, 3,103 tuner, 4,4A-4E, 104 Transmission controller, 5,105 network, 6,106 Reception controller 7, 107 Playback device, 10, 10B, 10D Data processing means, 10A CPU, 11, 111 fixed clock, 12, 112 communication packet forming means, 13 communication controller, 14, 14B, 14D separating means, 15, 15B, 15D Header addition means, 16, 116 counter, 18, 18C, 18E ROM, 20, 120 communication controller, 21, 121 communication packet separation means, 22, 122 jitter correction means, 23, 123, 26, 126 clock, 24, 124 counter , 25,125 Encoding means, 30, 30B, 30D data input means, 32, 32B, 32D packet analysis means, 34, 34B, 34D PCR extraction means, 36, 36D buffer, 38 time stamp shaping means, 40, 40B, 40D time stamp addition Means, 42 data output means, 50 communication device, 51 computer main body, 52 display device, 53 FD drive, 54 FD, 55 keyboard, 56 mouse, 57 CD-ROM device, 58 CD-ROM, 59 cable, 60 time stamp correction Means, 70 PCR difference calculation means, CT1-CTn, CT1A-CTnA area, HD1-HDn, HD1A-HDnA, HD1B-HDnB header, I0, I1, I2 IP packet, P0, P1-Pn, P1A-PnA, P1B- PnB, P1~TPn, TP1A~TPnA, TP1B~TPnB TS packet, PCR1, PCR1A, PCR1B, PCR2, PCRn, PCRnA, PCRnB region, S1~S30 step.

Claims (37)

符号化データがパケット化されたパケットを入力するためのデータ入力手段と、
前記データ入力手段に入力されたパケットのうちの送信時刻情報を含む第1のパケットから前記送信時刻情報を抽出して出力するとともに前記第1のパケットを出力する抽出手段と、
前記送信時刻情報を受け、前記送信時刻情報に応じた第1の時刻情報を生成する第1の生成手段と、
クロック信号に応じたクロック情報を前記第1の時刻情報の入力に応じて補正し、前記送信時刻情報を含まない第2のパケットが再生されるべき時刻の基準となる時刻を示す第2の時刻情報を生成する第2の生成手段と、
前記第1のパケットに前記第1の時刻情報を付加し、前記第2のパケットに前記第2の時刻情報を付加する付加手段とを備える、データ処理装置。
Data input means for inputting a packet in which encoded data is packetized;
Extraction means for extracting and outputting the transmission time information from a first packet including transmission time information among the packets input to the data input means; and outputting the first packet;
First generation means for receiving the transmission time information and generating first time information according to the transmission time information;
A second time indicating a time serving as a reference of a time at which the second packet not including the transmission time information is corrected by correcting the clock information corresponding to the clock signal according to the input of the first time information. A second generating means for generating information;
A data processing apparatus comprising: adding means for adding the first time information to the first packet and adding the second time information to the second packet.
前記データ入力手段で入力されたパケットが前記第1のパケットであるか前記第2のパケットであるかを判定し、前記付加手段において前記パケットに前記第1の時刻情報と前記第2の時刻情報のいずれを付加するかを決定するパケット解析手段をさらに備える、請求項1に記載のデータ処理装置。   It is determined whether the packet input by the data input means is the first packet or the second packet, and the adding means adds the first time information and the second time information to the packet. The data processing apparatus according to claim 1, further comprising: a packet analysis unit that determines which one to add. 前記パケット解析手段は、前記パケットの属性を示すパケット識別情報を、予め設定した値と照合し、前記パケットが前記第1のパケットであるか前記第2のパケットであるかを判定する、請求項2に記載のデータ処理装置。   The packet analysis means collates packet identification information indicating an attribute of the packet with a preset value, and determines whether the packet is the first packet or the second packet. 2. A data processing apparatus according to 2. 前記パケット解析手段は、前記パケットの属性を示すパケット識別情報を、予め設定した値と照合し、不要なパケットを破棄するかどうかを判定する、請求項2に記載のデータ処理装置。   The data processing apparatus according to claim 2, wherein the packet analysis unit collates packet identification information indicating an attribute of the packet with a preset value and determines whether to discard an unnecessary packet. 前記入力されたパケットのうちのいずれかのパケットには、前記パケット識別情報の属性が記述されているパケット構成情報が含まれ、
前記パケット解析手段は、前記パケット構成情報を解析して、前記パケット識別情報の値を設定する、請求項3または4に記載のデータ処理装置。
Any of the input packets includes packet configuration information in which an attribute of the packet identification information is described,
The data processing apparatus according to claim 3 or 4, wherein the packet analysis means analyzes the packet configuration information and sets a value of the packet identification information.
前記入力されたパケットのうちのいずれかのパケットには、前記パケット識別情報の属性が記述されているパケット構成情報が含まれ、
前記パケット解析手段は、前記第1の時刻情報が含まれていることを示す前記パケット識別情報との照合のため、前記パケット構成情報を解析する機器から転送された解析結果を、前記予め設定した値として設定する、請求項3または4に記載のデータ処理装置。
Any of the input packets includes packet configuration information in which an attribute of the packet identification information is described,
The packet analysis means sets the analysis result transferred from the device analyzing the packet configuration information in advance for collation with the packet identification information indicating that the first time information is included. The data processing apparatus according to claim 3 or 4, wherein the data processing apparatus is set as a value.
前記パケット識別情報はPID(Packet Identifier)であり、
前記パケット構成情報はPAT(Packet Association Table)、およびPMT(Packet Map Table)である、請求項3から6のいずれか1項に記載のデータ処理装置。
The packet identification information is a PID (Packet Identifier),
7. The data processing apparatus according to claim 3, wherein the packet configuration information is a PAT (Packet Association Table) and a PMT (Packet Map Table).
前記付加手段は、前記パケット解析手段が前記パケットに前記第1の時刻情報と前記第2の時刻情報とのいずれを付加するかを決定できない場合には、前記パケットに前記第2の時刻情報を付加する、請求項2に記載のデータ処理装置。   If the packet analyzing unit cannot determine which of the first time information and the second time information is added to the packet, the adding unit adds the second time information to the packet. The data processing apparatus according to claim 2, which is added. 前記第2の生成手段は、前記第1のパケットに続いて前記第2のパケットが入力されると、前記第1の時刻情報の入力が完了し、さらに、前記第1のパケットの入力時刻と前記第2のパケットの入力時刻との差に相当する時間差が経過した後に前記時間差を反映させた前記第2の時刻情報を出力する、請求項2に記載のデータ処理装置。   When the second packet is input following the first packet, the second generation means completes the input of the first time information, and further includes the input time of the first packet, The data processing apparatus according to claim 2, wherein the second time information reflecting the time difference is output after a time difference corresponding to a difference from an input time of the second packet has elapsed. 前記第1の生成手段は、前記第1のパケットの入力が開始されてから前記クロック情報の補正が完了するまでの経過時間と前記第2のパケットの入力が開始されてから第2の時刻情報が送信されるまでの経過時間との差に応じた値を前記送信時刻情報に付加して前記第1の時刻情報を生成する、請求項2に記載のデータ処理装置。   The first generation means includes an elapsed time from when the input of the first packet is started until the correction of the clock information is completed, and second time information after the input of the second packet is started. The data processing device according to claim 2, wherein the first time information is generated by adding a value corresponding to a difference from an elapsed time until the first time information is transmitted to the transmission time information. 前記付加手段は、前記第2の時刻情報を前記パケットに付加した後に前記パケットを解析し、前記パケットが前記第1のパケットである場合には前記第2の時刻情報を前記第1の時刻情報に置換する、請求項1に記載のデータ処理装置。   The adding means analyzes the packet after adding the second time information to the packet, and if the packet is the first packet, the adding means converts the second time information to the first time information. The data processing apparatus according to claim 1, wherein 前記第1の生成手段は、前記クロック情報のデータ形式と同一になるように前記送信時刻情報を変換した前記第1の時刻情報を生成する、請求項1から11のいずれか1項に記載のデータ処理装置。   The said 1st production | generation means produces | generates the said 1st time information which converted the said transmission time information so that it may become the same as the data format of the said clock information, The statement of any one of Claim 1 to 11 Data processing device. 符号化データがパケット化されたパケットを入力するためのデータ入力手段と、
前記データ入力手段に入力されたパケットのうちの送信時刻情報を含む第1および第2のパケットの各々から前記送信時刻情報を抽出するとともに、前記第1および第2のパケットを出力する抽出手段とを備え、
前記抽出手段は、前記第1および第2のパケットから抽出した前記送信時刻情報の差分と、前記第1および第2のパケットの入力間隔に応じて生じるクロック情報の差分との誤差を算出し、
前記クロック情報を前記誤差に応じて補正し、補正されたクロック情報に基づき前記パケットが再生されるべき時刻の基準となる時刻を示す再生基準時刻情報を生成する生成手段と、
前記パケットに前記再生基準時刻情報を付加する付加手段とをさらに備える、データ処理装置。
Data input means for inputting a packet in which encoded data is packetized;
Extraction means for extracting the transmission time information from each of the first and second packets including the transmission time information among the packets input to the data input means, and outputting the first and second packets; With
The extraction means calculates an error between a difference between the transmission time information extracted from the first and second packets and a difference between clock information generated according to an input interval of the first and second packets;
Generating means for correcting the clock information according to the error, and generating reproduction reference time information indicating a time that is a reference of a time at which the packet is to be reproduced based on the corrected clock information;
A data processing apparatus, further comprising an adding unit that adds the reproduction reference time information to the packet.
前記抽出手段は、前記第1および第2のパケットの各々から抽出した前記送信時刻情報の値が連続しているか否かを判定し、不連続の場合には前記誤差を出力しない、請求項13に記載のデータ処理装置。   The extraction means determines whether or not the value of the transmission time information extracted from each of the first and second packets is continuous, and does not output the error when discontinuous. The data processing apparatus described in 1. 前記抽出手段は、前記第1のパケットの入力から一定期間、前記第2のパケットが入力されない場合には、前記送信時刻情報の値が不連続であると判定する、請求項14に記載のデータ処理装置。   The data according to claim 14, wherein the extraction means determines that the value of the transmission time information is discontinuous when the second packet is not input for a certain period from the input of the first packet. Processing equipment. 前記抽出手段は、前記第1および第2のパケットの少なくとも一方に前記送信時刻情報の値が不連続であることを示す情報が含まれている場合には、前記送信時刻情報の値が不連続であると判定する、請求項14に記載のデータ処理装置。   In the extraction means, when at least one of the first and second packets includes information indicating that the value of the transmission time information is discontinuous, the value of the transmission time information is discontinuous. The data processing device according to claim 14, wherein the data processing device is determined to be. 前記符号化データは、MPEG(Moving Picture Experts Group)2−トランスポートストリーム形式に従うデータであり、
前記送信時刻情報は、プログラム時刻基準参照値である、請求項1から16のいずれか1項に記載のデータ処理装置。
The encoded data is data according to MPEG (Moving Picture Experts Group) 2-transport stream format,
The data processing apparatus according to claim 1, wherein the transmission time information is a program time reference reference value.
前記符号化データは、MPEG(Moving Picture Experts Group)2−プログラムスト
リーム形式に従うデータであり、
前記送信時刻情報は、システム時刻基準参照値である、請求項1から16のいずれか1項に記載のデータ処理装置。
The encoded data is data according to MPEG (Moving Picture Experts Group) 2-program stream format,
The data processing apparatus according to claim 1, wherein the transmission time information is a system time reference reference value.
符号化データがパケット化されたパケットを入力するためのステップと、
前記データ入力手段に入力されたパケットのうちの送信時刻情報を含む第1のパケットから前記送信時刻情報を抽出して出力するとともに前記第1のパケットを出力するステップと、
前記送信時刻情報を受け、前記送信時刻情報に応じた第1の時刻情報を生成するステップと、
クロック信号に応じたクロック情報を前記第1の時刻情報の入力に応じて補正し、前記送信時刻情報を含まない第2のパケットが再生されるべき時刻の基準となる時刻を示す第2の時刻情報を生成するステップと、
前記第1のパケットに前記第1の時刻情報を付加し、前記第2のパケットに前記第2の時刻情報を付加するステップとをコンピュータに実行させるプログラム。
A step for inputting a packet in which encoded data is packetized;
Extracting and outputting the transmission time information from a first packet including transmission time information among packets input to the data input means, and outputting the first packet;
Receiving the transmission time information and generating first time information according to the transmission time information;
A second time indicating a time serving as a reference of a time at which the second packet not including the transmission time information is corrected by correcting the clock information corresponding to the clock signal according to the input of the first time information. Generating information;
A program for causing a computer to execute the step of adding the first time information to the first packet and adding the second time information to the second packet.
前記パケットを入力するステップで入力されたパケットが前記第1のパケットであるか前記第2のパケットであるかを判定し、前記付加するステップにおいて前記パケットに前記第1の時刻情報と前記第2の時刻情報のいずれを付加するかを決定するステップをさらにコンピュータに実行させる、請求項19に記載のプログラム。   It is determined whether the packet input in the step of inputting the packet is the first packet or the second packet, and in the adding step, the first time information and the second packet are added to the packet. The program according to claim 19, further causing the computer to execute a step of determining which time information to add. 前記決定するステップは、前記パケットの属性を示すパケット識別情報を、予め設定した値と照合し、前記パケットが前記第1のパケットであるか前記第2のパケットであるかを判定する、請求項20に記載のプログラム。   The step of determining includes comparing packet identification information indicating an attribute of the packet with a preset value to determine whether the packet is the first packet or the second packet. 20. The program according to 20. 前記決定するステップは、前記パケットの属性を示すパケット識別情報を、予め設定した値と照合し、不要なパケットを破棄するかどうかを判定する、請求項20に記載のプログラム。   21. The program according to claim 20, wherein the determining step compares packet identification information indicating an attribute of the packet with a preset value and determines whether to discard an unnecessary packet. 前記入力されたパケットのうちのいずれかのパケットには、前記パケット識別情報の属性が記述されているパケット構成情報が含まれ、
前記決定するステップは、前記パケット構成情報を解析して、前記パケット識別情報の値を設定する、請求項21または22に記載のプログラム。
Any of the input packets includes packet configuration information in which an attribute of the packet identification information is described,
The program according to claim 21 or 22, wherein the determining step analyzes the packet configuration information and sets a value of the packet identification information.
前記入力されたパケットのうちのいずれかのパケットには、前記パケット識別情報の属性が記述されているパケット構成情報が含まれ、
前記決定するステップは、前記第1の時刻情報が含まれていることを示す前記パケット識別情報との照合のため、前記パケット構成情報を解析する機器を用いて得られた前記パケット構成情報の解析結果を、前記予め設定した値として設定する、請求項21または22に記載のプログラム。
Any of the input packets includes packet configuration information in which an attribute of the packet identification information is described,
The determining step includes analyzing the packet configuration information obtained by using a device that analyzes the packet configuration information for collation with the packet identification information indicating that the first time information is included. The program according to claim 21 or 22, wherein a result is set as the preset value.
前記パケット識別情報はPID(Packet Identifier)であり、
前記パケット構成情報はPAT(Packet Association Table)、およびPMT(Packet Map Table)である、請求項21から24のいずれか1項に記載のプログラム。
The packet identification information is a PID (Packet Identifier),
The program according to any one of claims 21 to 24, wherein the packet configuration information is a PAT (Packet Association Table) and a PMT (Packet Map Table).
前記付加するステップは、前記決定するステップが前記パケットに前記第1の時刻情報と前記第2の時刻情報とのいずれを付加するかを決定できない場合には、前記パケットに前記第2の時刻情報を付加する、請求項20に記載のプログラム。   In the adding step, when the determining step cannot determine which of the first time information and the second time information is added to the packet, the second time information is added to the packet. 21. The program according to claim 20, wherein: 前記第2の時刻情報を生成するステップは、前記第1のパケットに続いて前記第2のパケットが入力されると、前記第1の時刻情報の入力が完了し、さらに、前記第1のパケットの入力時刻と前記第2のパケットの入力時刻との差に相当する時間差が経過した後に前記時間差を反映させた前記第2の時刻情報を出力する、請求項20に記載のプログラム。   In the step of generating the second time information, when the second packet is input subsequent to the first packet, the input of the first time information is completed, and the first packet is further generated. The program according to claim 20, wherein the second time information reflecting the time difference is output after a time difference corresponding to the difference between the input time of the second packet and the input time of the second packet has elapsed. 前記第1の時刻情報を生成するステップは、前記第1のパケットの入力が開始されてから前記クロック情報の補正が完了するまでの経過時間と前記第2のパケットの入力が開始されてから第2の時刻情報が送信されるまでの経過時間との差に応じた値を前記送信時刻情報に付加して前記第1の時刻情報を生成する、請求項20に記載のプログラム。   The step of generating the first time information includes an elapsed time from when the input of the first packet is started until the correction of the clock information is completed, and after the input of the second packet is started. 21. The program according to claim 20, wherein the first time information is generated by adding a value corresponding to a difference from an elapsed time until the second time information is transmitted to the transmission time information. 前記付加するステップは、前記第2の時刻情報を前記パケットに付加した後に前記パケットを解析し、前記パケットが前記第1のパケットである場合には前記第2の時刻情報を前記第1の時刻情報に置換する、請求項20に記載のプログラム。   The adding step analyzes the packet after adding the second time information to the packet, and if the packet is the first packet, the second time information is added to the first time. The program according to claim 20, wherein the program is replaced with information. 前記第1の時刻情報を生成するステップは、前記クロック情報のデータ形式と同一になるように前記送信時刻情報を変換した前記第1の時刻情報を生成する、請求項19から28のいずれか1項に記載のプログラム。   The step of generating the first time information generates the first time information obtained by converting the transmission time information so as to be the same as the data format of the clock information. The program described in the section. 符号化データがパケット化されたパケットを入力するためのステップと、
入力された前記パケットのうちの送信時刻情報を含む第1および第2のパケットの各々から前記送信時刻情報を抽出し、前記第1および第2のパケットを出力するとともに、前記第1および第2のパケットから抽出した前記送信時刻情報の差分と、前記第1および第2のパケットの入力間隔に応じて生じるクロック情報の差分との誤差を算出するステップと、
前記クロック情報を、前記誤差に応じて補正し、補正されたクロック情報に基づき前記パケットが再生されるべき時刻の基準となる時刻を示す再生基準時刻情報を生成するステップと、
前記パケットに前記再生基準時刻情報を付加するステップとをコンピュータに実行させるプログラム。
A step for inputting a packet in which encoded data is packetized;
The transmission time information is extracted from each of the first and second packets including the transmission time information among the input packets, and the first and second packets are output. Calculating an error between a difference between the transmission time information extracted from the packet and a difference between clock information generated according to an input interval of the first and second packets;
Correcting the clock information according to the error, and generating reproduction reference time information indicating a time that is a reference of a time at which the packet is to be reproduced based on the corrected clock information;
A program for causing a computer to execute the step of adding the reproduction reference time information to the packet.
前記算出するステップは、前記第1および第2のパケットの各々から抽出した前記送信時刻情報の値が連続しているかどうかを判定し、前記送信時刻情報の値が不連続の場合には、前記誤差を0とする、請求項31に記載のプログラム。   The calculating step determines whether or not the value of the transmission time information extracted from each of the first and second packets is continuous, and when the value of the transmission time information is discontinuous, 32. The program according to claim 31, wherein the error is zero. 前記算出するステップは、前記第1のパケットの入力から一定期間、前記第2のパケットが入力されない場合には、前記送信時刻情報の値が不連続であると判定する、請求項32に記載のプログラム。   33. The calculation according to claim 32, wherein the calculating step determines that the value of the transmission time information is discontinuous when the second packet is not input for a certain period from the input of the first packet. program. 前記算出するステップは、前記第1および第2のパケットの少なくとも一方に、前記送信時刻情報の値が不連続であることを示す情報が含まれている場合には、前記送信時刻情報の値が不連続であると判定する、請求項32に記載のプログラム。   In the calculating step, when at least one of the first and second packets includes information indicating that the value of the transmission time information is discontinuous, the value of the transmission time information is The program according to claim 32, wherein the program is determined to be discontinuous. 前記符号化データは、MPEG(Moving Picture Experts Group)2−トランスポートストリーム形式に従うデータであり、
前記送信時刻情報は、プログラム時刻基準参照値である、請求項19から33のいずれか1項に記載のプログラム。
The encoded data is data according to MPEG (Moving Picture Experts Group) 2-transport stream format,
The program according to any one of claims 19 to 33, wherein the transmission time information is a program time base reference value.
前記符号化データは、MPEG(Moving Picture Experts Group)2−プログラムストリーム形式に従うデータであり、
前記送信時刻情報は、システム時刻基準参照値である、請求項19から33のいずれか1項に記載のプログラム。
The encoded data is data according to MPEG (Moving Picture Experts Group) 2-program stream format,
The program according to any one of claims 19 to 33, wherein the transmission time information is a system time base reference value.
請求項19から36のいずれか1項に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the program according to any one of claims 19 to 36 is recorded.
JP2005217074A 2004-07-30 2005-07-27 Data processor, program, and recording medium Withdrawn JP2006067568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005217074A JP2006067568A (en) 2004-07-30 2005-07-27 Data processor, program, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004223405 2004-07-30
JP2005217074A JP2006067568A (en) 2004-07-30 2005-07-27 Data processor, program, and recording medium

Publications (1)

Publication Number Publication Date
JP2006067568A true JP2006067568A (en) 2006-03-09

Family

ID=36113584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005217074A Withdrawn JP2006067568A (en) 2004-07-30 2005-07-27 Data processor, program, and recording medium

Country Status (1)

Country Link
JP (1) JP2006067568A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008245061A (en) * 2007-03-28 2008-10-09 Fujitsu Ltd Pcr reproduction system in ip stream transmission
JP2008252843A (en) * 2007-03-30 2008-10-16 Toshiba Corp Stream reproducing device
JP2010045592A (en) * 2008-08-12 2010-02-25 Sony Corp Time stamp adding device, time stamp adding method, and time stamp adding program
JP2014216786A (en) * 2013-04-24 2014-11-17 株式会社チノー Sensing system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008245061A (en) * 2007-03-28 2008-10-09 Fujitsu Ltd Pcr reproduction system in ip stream transmission
JP2008252843A (en) * 2007-03-30 2008-10-16 Toshiba Corp Stream reproducing device
JP2010045592A (en) * 2008-08-12 2010-02-25 Sony Corp Time stamp adding device, time stamp adding method, and time stamp adding program
JP4609546B2 (en) * 2008-08-12 2011-01-12 ソニー株式会社 Time stamp adding apparatus, time stamp adding method, and time stamp adding program
US7995587B2 (en) 2008-08-12 2011-08-09 Sony Corporation Time stamp adding device, time stamp adding method, and time stamp adding program
JP2014216786A (en) * 2013-04-24 2014-11-17 株式会社チノー Sensing system

Similar Documents

Publication Publication Date Title
US11962632B2 (en) Transmission method, reception method, transmission apparatus, and reception apparatus
EP1553774B1 (en) Content receiving apparatus and content transmitting apparatus
US7372858B2 (en) Data transmission device and data transmission method
US7983345B2 (en) Content receiving apparatus, video/audio output timing control method, and content provision system
US10361801B2 (en) Transmission method, transmission apparatus and system
US8107538B2 (en) Moving image distribution system and moving image distribution server
WO2015155907A1 (en) Transmission apparatus, transmission method, reception apparatus and reception method
JP2005534219A (en) Jitter correction method for system with wall clock
JP2006186580A (en) Reproducing device and decoding control method
JP2015149680A (en) Transmitting device and receiving device
JP4616343B2 (en) Packet transmission method in transmission system
WO2016080043A1 (en) Receiving device, relay device, television receiver, and signal processing method
US7346054B2 (en) Method and system for co-relating transport packets on different channels using a cyclic redundancy check (CRC)
US7415014B2 (en) Method and system for co-relating transport packets on different channels using a packet prioritization scheme
JP2006067568A (en) Data processor, program, and recording medium
JP6957186B2 (en) Information processing equipment, information processing methods, programs, and recording medium manufacturing methods
JP3906712B2 (en) Data stream processing device
JP7517389B2 (en) Transmission method and receiving device
JP4192766B2 (en) Receiving apparatus and method, recording medium, and program
JP5092493B2 (en) Reception program, reception apparatus, communication system, and communication method
JP3893643B2 (en) Signal multiplexing method and transmission signal generating apparatus using the same
US20150062431A1 (en) Device and method for digital data distribution, device and method for digital data reproduction, synchronized reproduction system, program, and recording medium
JP4026556B2 (en) Data transmission device
JP4882213B2 (en) Content receiving apparatus, video / audio output timing control method, and content providing system
JP7034926B2 (en) Information processing equipment, information processing methods, and programs

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20081007