JP4689231B2 - Transport stream switching device - Google Patents

Transport stream switching device Download PDF

Info

Publication number
JP4689231B2
JP4689231B2 JP2004309790A JP2004309790A JP4689231B2 JP 4689231 B2 JP4689231 B2 JP 4689231B2 JP 2004309790 A JP2004309790 A JP 2004309790A JP 2004309790 A JP2004309790 A JP 2004309790A JP 4689231 B2 JP4689231 B2 JP 4689231B2
Authority
JP
Japan
Prior art keywords
pcr
transport stream
time stamp
time
stream
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.)
Expired - Fee Related
Application number
JP2004309790A
Other languages
Japanese (ja)
Other versions
JP2006121601A (en
Inventor
光晴 佐藤
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.)
Ikegami Tsushinki Co Ltd
Original Assignee
Ikegami Tsushinki Co Ltd
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 Ikegami Tsushinki Co Ltd filed Critical Ikegami Tsushinki Co Ltd
Priority to JP2004309790A priority Critical patent/JP4689231B2/en
Publication of JP2006121601A publication Critical patent/JP2006121601A/en
Application granted granted Critical
Publication of JP4689231B2 publication Critical patent/JP4689231B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、複数のMPEG方式のトランスポートストリームを切り換えて出力するトランスポートストリーム切換装置に関するものである。   The present invention relates to a transport stream switching device for switching and outputting a plurality of MPEG transport streams.

デジタル伝送システムには、番組を構成する映像、音声、その他のデータをエレメンタリストリーム(ES:Elementary Stream )に符号化し、それらを多重化したITU−T勧告H.222.0|ISO/IEC13818−1(Systems)に従うMPEG方式のトランスポートストリーム(TS:Transport Stream)を伝送するシステムがある。受信側では多重分離処理を行い、トランスポートストリームからエレメンタリストリームを取り出し復号器において番組の再生を行う。図6はこのデジタル伝送システムの符号化器と復号器の一例を示すブロック図である。   In the digital transmission system, ITU-T recommendation H.264, which encodes video, audio, and other data constituting a program into an elementary stream (ES) and multiplexes them. 222.0 | There is a system for transmitting a transport stream (TS) according to ISO / IEC13818-1 (Systems). The receiving side performs demultiplexing processing, takes out the elementary stream from the transport stream, and reproduces the program in the decoder. FIG. 6 is a block diagram showing an example of an encoder and a decoder of this digital transmission system.

エレメンタリストリームは、PES(Packetized Elementary Stream)パケットと呼ばれるパケットで構成され、PESヘッダが付加される。PESヘッダには個別のストリームを識別するコードやパケットのサイズ、PTS(Presentation Time Stamp )やDTS(Decoding Time Stamp )と呼ばれる同期再生のための時間情報、その他の制御情報などが記述される。(以下、PTS及びDTSの両方の時刻情報をタイムスタンプと呼ぶ)PESパケットはヘッダに含まれるPID(Packet Identifier:パケット識別子)番号が同じである複数の188バイトより構成されるTSパケットのペイロードに分割して伝送される。トランスポートストリームはTSパケットが複数個集まって構成されている。   The elementary stream is composed of a packet called a PES (Packetized Elementary Stream) packet, and a PES header is added. In the PES header, codes for identifying individual streams, packet sizes, time information for synchronous reproduction called PTS (Presentation Time Stamp) and DTS (Decoding Time Stamp), and other control information are described. (Hereinafter, time information of both PTS and DTS is referred to as a time stamp.) A PES packet is a payload of a TS packet composed of a plurality of 188 bytes having the same PID (Packet Identifier) number included in the header. Divided and transmitted. The transport stream is composed of a plurality of TS packets.

TSパケットの種類は、4バイト固定長のパケットヘッダと可変長のアダプテーションフィールド(adaptation field )及びペイロード(paylaod)で構成されている。パケットのヘッダには、PID(パケット識別子)や各種のフラグが定義されている。このPIDによりTSパケットの種類が識別されている。アダプテーションフィールドにはPCR(Progam Clock Reference)などの情報の伝送及びTSパケットを188パケット固定長にするためのTSパケット内でのスタッフィング機能がある。   The type of TS packet is composed of a 4-byte fixed length packet header, a variable length adaptation field, and a payload. A PID (packet identifier) and various flags are defined in the header of the packet. The type of TS packet is identified by this PID. The adaptation field has a stuffing function in the TS packet for transmitting information such as PCR (Progam Clock Reference) and making the TS packet a fixed length of 188 packets.

デジタル伝送システムには、符号化器と復号器とが共通の基準時刻であるSTC(System Time Clock )を持っている。符号化器のシステムクロック(27MHz)であるSTCをPCRに符号化しTS伝送する。それを復号器で再生することで両者の同期を実現する。ストリーム多重化装置では、複数のストリームを多重化する際、同時に入力されるトランスポートストリームを共通基準クロックに同期するように補正して多重化している(例えば、特許文献1参照)。   In a digital transmission system, an encoder and a decoder have an STC (System Time Clock) that is a common reference time. The STC, which is the system clock (27 MHz) of the encoder, is encoded into PCR and transmitted by TS. The two are synchronized by reproducing them with a decoder. In a stream multiplexing apparatus, when a plurality of streams are multiplexed, a transport stream that is simultaneously input is corrected and multiplexed so as to be synchronized with a common reference clock (see, for example, Patent Document 1).

特開2001−53703号公報(明細書段落〔0011〕〜〔0017〕,図面図1)JP 2001-53703 A (paragraphs [0011] to [0017], drawing FIG. 1)

ストリーム多重化装置とは異なり、あるトランスポートストリームから他のトランスポートに切り換える場合がある。図7はトランスポートストリーム切換装置のブロック図であり、番組提供者(放送局など)がトランスポートストリームの一部の番組を、この切換装置により切り換える場合がある。例えば、ある番組から他の異なる内容の素材やコマーシャルなどの内容のストリームに切り換えて受信側に供給する場合、ストリームの途中で切り換えると、ストリームの連続性を保つことができないという問題が生じる。このようなストリームの連続性を保つことができない理由として、それぞれのストリームがベースバンド信号の映像フレームと同期しておらず、さらにSTCなどの時刻情報も独立しているからである。   Unlike a stream multiplexing device, there is a case where a transport stream is switched to another transport. FIG. 7 is a block diagram of a transport stream switching device, and a program provider (such as a broadcast station) may switch some programs in the transport stream using this switching device. For example, when switching from a certain program to a stream with different contents or commercial contents and supplying the stream to the receiving side, there is a problem that the continuity of the stream cannot be maintained if switching in the middle of the stream. The reason why such continuity of streams cannot be maintained is that each stream is not synchronized with the video frame of the baseband signal, and time information such as STC is also independent.

各ストリームの時間情報が独立しているとは、図8(a),(b)を参照して説明する。なお、図8(a),(b)は横軸が時間軸であり、符号化開始(例えば、符号化器の起動時)からの経過時間を示し、縦軸が時間の経過とともに増加するPCR或いはタイムスタンプの値である。図8(a)は、第一ストリームと第二ストリームの符号化開始時刻が一致していない、或いは同期手段がない(非同期)場合を示し、切り換え位置でのPCR値が異なっている。すなわち、各ストリームの時間情報が独立していることを示している。従って、このようなストリームの切り換えを行うと、同図(b)に示すように、PCRやタイムスタンプの時刻情報が不連続になる。ストリームは直線上の離散値を符号化したPCR或いはタイムスタンプの値が伝送されており、同図(b)で示すような値を参照して処理を制御している復号器では正常に動作ができなくなる。   The fact that the time information of each stream is independent will be described with reference to FIGS. 8 (a) and 8 (b). In FIGS. 8A and 8B, the horizontal axis is the time axis, the elapsed time from the start of encoding (for example, when the encoder is started), and the vertical axis is PCR that increases with the passage of time. Alternatively, it is a time stamp value. FIG. 8A shows a case where the encoding start times of the first stream and the second stream do not match or there is no synchronization means (asynchronous), and the PCR values at the switching position are different. That is, the time information of each stream is independent. Therefore, when such stream switching is performed, time information of PCR and time stamp becomes discontinuous as shown in FIG. The stream is transmitted with a PCR or time stamp value obtained by encoding a discrete value on a straight line, and a decoder that controls processing with reference to a value as shown in FIG. become unable.

このような問題を対処するためにストリームを一旦復号してからベースバンド信号の映像で切り換え、再度MPEGストリームに符号化することが行われる。このような方法により切り換えた場合は、処理やメモリを多く必要とする復号処理や符号化処理を行うため回路規模が大きくなり、遅延が増大し、さらに、再符号化による映像品質の劣化が生じるといった課題があり、好ましいものではない。   In order to deal with such a problem, the stream is once decoded, then switched with the video of the baseband signal, and encoded again into the MPEG stream. When switching by such a method, the circuit scale becomes large because the decoding process and the encoding process that require a lot of processing and memory are performed, the delay increases, and further, the video quality deteriorates due to the re-encoding. However, this is not preferable.

また、上記とは別の観点から従来の切り換え方法を見た場合、基準時刻を同期させるために関係する装置を別個に設けて、切り換え時の基準時刻に同期させる仕組みが必要となり、システムが複雑になるおそれがあり、殊に、遠隔地から送信されるトランスポートストリームを切り換える場合には基準時刻が異なる場合もあり、時間差を調整して同期させる必要があり、このようなシステムを構築するのは困難な面がある。   In addition, when the conventional switching method is viewed from a different point of view, it is necessary to provide a separate device to synchronize the reference time and synchronize with the reference time at the time of switching, which complicates the system. In particular, when switching a transport stream transmitted from a remote location, the reference time may be different, and it is necessary to adjust the time difference and synchronize. There are difficult aspects.

本発明は上記課題に鑑みてなされたものであり、それぞれのトランスポートストリームで独立している非同期な時刻情報を同期させ、トランスポートストリームの切り換え時の時刻情報の連続性を確保し得るトランスポートストリーム切換装置を提供することを目的とするものである。   The present invention has been made in view of the above problems, and transport that can synchronize independent asynchronous time information in each transport stream and ensure continuity of time information when switching transport streams. An object of the present invention is to provide a stream switching device.

本発明は、上記課題を達成したものであり、請求項1の発明は、少なくとも2系統のトランスポートストリームを切り換えるトランスポートストリーム切換装置であって、
基準となる第一トランスポートストリームのPCRを取得するPCR取得手段と、
前記第一トランスポートストリームのタイムスタンプ情報を取得するタイムスタンプ情報取得手段と、
独立した自走システムクロック発振器と基準時刻カウンタとから構成され、前記第一トランスポートストリームのPCRより基準時刻を生成する基準時刻生成手段と、
前記第一トランスポートストリームのタイムスタンプ情報及び前記基準時刻並びに変更前の第二トランスポートストリームのPCRよりタイムスタンプ補正情報を算出するタイムスタンプ補正情報算出手段と、
前記第二トランスポートストリームよりPCRを取得し、前記基準時刻に基づき該PCRを変更するPCR変更手段と、
前記第二トランスポートストリームのタイムスタンプ情報を取得し、前記タイムスタンプ補正情報で変更するタイムスタンプ変更手段と、
前記第一トランスポートストリームと前記PCR及び前記タイムスタンプ情報を変更した前記第二トランスポートストリームを切り換える切換手段とを備え
前記基準時刻カウンタが、前記第一トランスポートストリームのPCRと前記基準時刻カウンタとの差より補正値を求め、所定間隔毎に前記基準時刻カウンタを補正する基準時刻補正手段とをする
ことを特徴とするトランスポートストリーム切換装置である。なお、基準時刻カウンタはMPEG−2システムで規定されているPCRフィールドと同一構成からなる。
The present invention achieves the above-mentioned problems, and the invention of claim 1 is a transport stream switching device for switching at least two transport streams,
PCR acquisition means for acquiring the PCR of the reference first transport stream;
Time stamp information obtaining means for obtaining time stamp information of the first transport stream;
A reference time generation unit configured by an independent self-running system clock oscillator and a reference time counter, and generating a reference time from the PCR of the first transport stream;
Time stamp correction information calculating means for calculating time stamp correction information from the time stamp information of the first transport stream, the reference time, and the PCR of the second transport stream before the change;
PCR changing means for obtaining a PCR from the second transport stream and changing the PCR based on the reference time;
Time stamp changing means for obtaining time stamp information of the second transport stream and changing the time stamp correction information;
Switching means for switching the first transport stream and the second transport stream in which the PCR and the time stamp information are changed ,
The reference time counter is a reference time correction unit that obtains a correction value from a difference between the PCR of the first transport stream and the reference time counter, and corrects the reference time counter at predetermined intervals. A transport stream switching device. The reference time counter has the same configuration as the PCR field defined in the MPEG-2 system.

また、請求項2の発明は、請求項1に記載のトランスポートストリーム切換装置において、
前記タイムスタンプ補正情報が、前記第二トランスポートストリームのPCRと前記基準時刻との差分情報より生成することを特徴とするトランスポートストリーム切換装置である。
The invention according to claim 2 is the transport stream switching device according to claim 1,
The transport stream switching device, wherein the time stamp correction information is generated from difference information between a PCR of the second transport stream and the reference time .

また、請求項3の発明は、請求項に記載のトランスポートストリーム切換装置において、
前記第一及び第二トランスポートストリームのタイムスタンプ情報が、前記第一及び第二トランスポートストリームのGOP先頭ピクチャより検出することを特徴とするトランスポートストリーム切換装置である。
The invention according to claim 3 is the transport stream switching device according to claim 1 ,
The transport stream switching device is characterized in that the time stamp information of the first and second transport streams is detected from the GOP head pictures of the first and second transport streams .

また、請求項4の発明は、請求項1に記載のトランスポートストリーム切換装置において、
前記基準時刻と前記タイムスタンプ情報取得手段によるタイムスタンプ情報の差が、変更前の第二トランスポートストリームのPCRとタイムスタンプ情報の差と等しくなるように前記差分情報を補正することを特徴とするトランスポートストリーム切換装置である。
The invention according to claim 4 is the transport stream switching device according to claim 1,
The difference information is corrected so that a difference between the reference time and the time stamp information obtained by the time stamp information acquisition unit is equal to a difference between the PCR of the second transport stream before the change and the time stamp information. It is a transport stream switching device.

請求項1の発明では、少なくとも2系統のトランスポートストリームを切り換えるトランスポートストリーム切換装置であって、
基準となる第一トランスポートストリームのPCRを取得するPCR取得手段と、
前記第一トランスポートストリームのタイムスタンプ情報を取得するタイムスタンプ情報取得手段と、
独立した自走システムクロック発振器と基準時刻カウンタとから構成され、前記第一トランスポートストリームのPCRより基準時刻を生成する基準時刻生成手段と、
前記第一トランスポートストリームのタイムスタンプ情報及び前記基準時刻並びに変更前の第二トランスポートストリームのPCRよりタイムスタンプ補正情報を算出するタイムスタンプ補正情報算出手段と、
前記第二トランスポートストリームよりPCRを取得し、前記基準時刻に基づき該PCRを変更するPCR変更手段と、
前記第二トランスポートストリームのタイムスタンプ情報を取得し、前記タイムスタンプ補正情報で変更するタイムスタンプ変更手段と、
前記第一トランスポートストリームと前記PCR及び前記タイムスタンプ情報を変更した前記第二トランスポートストリームを切り換える切換手段とを備え
前記基準時刻カウンタが、前記第一トランスポートストリームのPCRと前記基準時刻カウンタとの差より補正値を求め、所定間隔毎に前記基準時刻カウンタを補正する基準時刻補正手段とをすることを特徴とするトランスポートストリーム切換装置であるので、第一トランスポートストリームのPCR及びタイムスタンプ情報を基準とし、第二トランスポートストリームのPCR及びタイムスタンプ情報を変更して時刻情報の連続性を確保し、トランスポートストリームの連続性を保ち、トランスポートストリームを切り換えたときに受信側での復号映像がフリーズすることがなく、適切な映像が復調することができるトランスポートストリーム切換装置を提供することができる。
The invention of claim 1 is a transport stream switching device for switching at least two transport streams,
PCR acquisition means for acquiring the PCR of the reference first transport stream;
Time stamp information obtaining means for obtaining time stamp information of the first transport stream;
A reference time generation unit configured by an independent self-running system clock oscillator and a reference time counter, and generating a reference time from the PCR of the first transport stream;
Time stamp correction information calculating means for calculating time stamp correction information from the time stamp information of the first transport stream, the reference time, and the PCR of the second transport stream before the change;
PCR changing means for obtaining a PCR from the second transport stream and changing the PCR based on the reference time;
Time stamp changing means for obtaining time stamp information of the second transport stream and changing the time stamp correction information;
Switching means for switching the first transport stream and the second transport stream in which the PCR and the time stamp information are changed ,
The reference time counter includes a reference time correction unit that obtains a correction value from a difference between the PCR of the first transport stream and the reference time counter, and corrects the reference time counter at predetermined intervals. Therefore, the continuity of time information is secured by changing the PCR and time stamp information of the second transport stream on the basis of the PCR and time stamp information of the first transport stream. It is possible to provide a transport stream switching device that can maintain the continuity of the port stream, and that the decoded video on the receiving side does not freeze when the transport stream is switched, and the appropriate video can be demodulated.

また、請求項1の発明では、自走クロックにより切り換え対象となるトランスポートストリームの時刻情報を共通化することができる利点がある。また、基準時刻カウンタがMPEG−2システムで規定されているPCRフィールドと同一構成からなり、切り換え対象にトランスポートストリームとのマッチングが良好であり、処理が簡便なものとなる。   Further, the invention of claim 1 has an advantage that the time information of the transport stream to be switched can be shared by the free-running clock. In addition, the reference time counter has the same configuration as the PCR field defined in the MPEG-2 system, matching with the transport stream is good for switching, and the processing becomes simple.

また、請求項1の発明では、基準時刻カウンタの情報を利用した簡単な方法により高精度に基準時刻を生成することができる。よって、第一トランスポートストリームのPCRと基準時刻との誤差を少なくすることができ、連続性が良好となる利点がある。   According to the first aspect of the present invention, the reference time can be generated with high accuracy by a simple method using information of the reference time counter. Therefore, there is an advantage that the error between the PCR of the first transport stream and the reference time can be reduced, and the continuity is good.

また、請求項の発明によれば、請求項1に記載のトランスポートストリーム切換装置において、前記タイムスタンプ補正情報が、前記第二トランスポートストリームのPCRと前記基準時刻と差分情報より生成しているので、基準時刻カウンタ値とトランスポートストリームのPCRを利用することにより、第二トランスポートストリームのタイムスタンプを高精度に変更することができる。 According to a second aspect of the present invention, in the transport stream switching device according to the first aspect, the time stamp correction information is generated from the PCR of the second transport stream, the reference time, and difference information. Therefore, the time stamp of the second transport stream can be changed with high accuracy by using the reference time counter value and the PCR of the transport stream.

また、請求項の発明によれば、請求項1に記載のトランスポートストリーム切換装置において、前記第一及び第二トランスポートストリームのタイムスタンプ情報が、前記第一及び第二トランスポートストリームのGOP先頭ピクチャより検出しているので、PCRとタイムスタンプの差の変動を抑えることができる。なお、GOP単位での符号量が概ね一定であり、GOPの先頭位置は等間隔である正確な値が得られる。 According to a third aspect of the present invention, in the transport stream switching device according to the first aspect, the time stamp information of the first and second transport streams is the GOP of the first and second transport streams. Since the detection is performed from the first picture, fluctuations in the difference between the PCR and the time stamp can be suppressed. It should be noted that the code amount per GOP is substantially constant, and an accurate value is obtained in which the GOP head positions are equally spaced.

また、請求項の発明によれば、請求項1に記載のトランスポートストリーム切換装置において、前記基準時刻と前記タイムスタンプ情報取得手段によるタイムスタンプ情報の差が、変更前の第二トランスポートストリームのPCRとタイムスタンプ情報の差と等しくなるように前記差分情報を補正しているので、第一トランスポートストリームとタイムスタンプの差と変更前の第二トランスポートストリームのPCRとタイムスタンプの差が同じになるように補正情報を修正することにより、タイムスタンプが不連続となることを防止することができる。
According to a fourth aspect of the present invention, in the transport stream switching device according to the first aspect, the difference between the reference time and the time stamp information obtained by the time stamp information obtaining means is the second transport stream before the change. Since the difference information is corrected so as to be equal to the difference between the PCR and the time stamp information, the difference between the first transport stream and the time stamp and the difference between the PCR and the time stamp before the change in the second transport stream are By correcting the correction information so as to be the same, it is possible to prevent the time stamp from becoming discontinuous.

以下、本発明に係るトランスポートストリーム切換装置の実施の形態について図面を参照し説明する。   Embodiments of a transport stream switching device according to the present invention will be described below with reference to the drawings.

図1は、本発明の一実施形態を示すブロック図であり、二つのトランスポートストリームを同期させ切り換えるトランスポートストリーム切換装置である。先ず、本実施形態の構成について同図を参照し説明すると、1は第一トランスポートストリーム(以下、第一ストリームと称する)の入力端子で、2は第二トランスポートストリーム(以下、第二ストリームと称する)の入力端子であり、3は入力端子1から入力される第一ストリームのPCR取得部であり、4は入力端子1から入力される第一ストリームのタイムスタンプ取得部である。5は発振器(自走システムクロック発振器)であり、6は発振器5からのシステムクロック周波数とPCR取得部3の出力とから基準時刻を生成する基準時刻生成部、7は入力端子2から入力される第二ストリームのPCR取得及び変更部、8は基準時刻生成部6とタイムスタンプ取得部4と第二ストリームのPCR取得及び変更部7とからの出力によりタイムスタンプ補正値を算出するタイムスタンプ算出部、9はPCR取得及び変更部7とタイムスタンプ算出部8からの出力によりタイムスタンプ値を変更する第二ストリームのタイムスタンプ取得及び変更部、10は第一と第二ストリームを同期させて切り換え出力する切り換え部、11は出力ストリームの出力端子である。   FIG. 1 is a block diagram showing an embodiment of the present invention, which is a transport stream switching device for switching two transport streams in synchronization. First, the configuration of the present embodiment will be described with reference to FIG. 1. 1 is an input terminal of a first transport stream (hereinafter referred to as a first stream), and 2 is a second transport stream (hereinafter referred to as a second stream). 3 is a first stream PCR acquisition unit input from the input terminal 1, and 4 is a first stream time stamp acquisition unit input from the input terminal 1. 5 is an oscillator (self-running system clock oscillator), 6 is a reference time generation unit that generates a reference time from the system clock frequency from the oscillator 5 and the output of the PCR acquisition unit 3, and 7 is input from the input terminal 2. The second stream PCR acquisition and change unit 8 is a time stamp calculation unit that calculates a time stamp correction value based on outputs from the reference time generation unit 6, the time stamp acquisition unit 4, and the second stream PCR acquisition and change unit 7. , 9 is a time stamp acquisition / change unit for the second stream that changes the time stamp value according to outputs from the PCR acquisition / change unit 7 and the time stamp calculation unit 8, and 10 is a switching output that synchronizes the first and second streams. A switching unit 11 is an output stream output terminal.

次に、本実施形態の動作について構成別に説明する。第一ストリームのPCR取得部3は、第一ストリームのPCR(Program clock reference :時刻参照値)を取得する。PCRの取得は次のように行う。PID(Packet Identifier:パケット識別子)が0x0000(16進数で13ビット)のPAT(Program Association Table:TSパケットを特定するためのテーブル)パケットを取得する。PATのプログラム・アソシエーション・セクション(Program Association Section)にPMT(Program Map Table)のPIDを示すプログラム・マップPID(Program Map PID)がある。Program Map PIDのPID値を持つPMTパケットを取得すると、PMTのTSプログラム マップ セクション(TS Program Map Section )にPCRが含まれるパケットのPIDを示すPCR PIDがある。PCR PIDのPID値を持つパケットを取得し、アダプテーション・フィールド(Adaptation field)の有無を示すアダプテーション・フィールド・コントロール(Adaptation field control)を調べ、アダプテーション・フィールドがあればPCRの有無を示すPCRフラグを見て、PCRがあるならばプログラム・クロック・リファレンス・ベース(Program clock reference base)とプログラム・クロック・リファレンス・エクステンション(Program clock reference extension )、すなわちPCRを取得する。PCR取得部3はこのようなPCR取得手段である。   Next, the operation of this embodiment will be described for each configuration. The PCR acquisition unit 3 of the first stream acquires the PCR (Program clock reference: time reference value) of the first stream. PCR is obtained as follows. A PAT (Program Association Table) table having a PID (Packet Identifier) of 0x0000 (hexadecimal 13 bits) is acquired. There is a program map PID (Program Map PID) indicating a PID of a PMT (Program Map Table) in the Program Association Section of the PAT. When a PMT packet having a PID value of Program Map PID is acquired, there is a PCR PID indicating the PID of the packet including the PCR in the TS program map section of the PMT. A packet having a PID value of PCR PID is acquired, and an adaptation field control (Adaptation field control) indicating the presence or absence of an adaptation field (Adaptation field) is examined. As seen, if there is a PCR, a program clock reference base and a program clock reference extension, that is, a PCR, are obtained. The PCR acquisition unit 3 is such a PCR acquisition unit.

第一ストリームのタイムスタンプ取得部4は、第一ストリームのタイムスタンプを取得する。タイムスタンプの取得は、次のように行う。先ず、PIDが0x0000(16進数で13ビット)のPAT(Program Association Table )パケットを取得する。PATのプログラム・アソシエーション・セクション(Program association section )にPMT(Program Map Table )のPIDを示すプログラム・マップPID(Program Map PID)がある。Program Map PIDのPID値を持つPMTパケットを取得すると、PMTのTSプログラム・マップ・セクション(Program association section )に番組を構成する要素の種類(映像か音声かなど)を示すパケットのTSヘッダのペイロード・ユニット・スタート・インディケータ(payload unit start indicator )により、ペイロードがPESパケットの先頭から開始しているか否かが判断できる。PESパケットのヘッダ部分にPTS・DTSフラグがあり、その値からPTSとDTS(同期再生のための時間情報)の存在がわかる。これらの手順により、番組構成要素(PID)ごとにPTSやDTSのタイムスタンプを取得する。タイムスタンプ取得部4は、このようなタイムスタンプ取得手段である。因みに、PTS・DTSフラグが「10」(2進数で2ビット)の場合はPTSのみ存在し、「11」の場合はPTSとDTSが存在する。「00」の場合はPTSとDTSは存在しない。「01」は禁止されている。   The time stamp acquisition unit 4 of the first stream acquires the time stamp of the first stream. The time stamp is acquired as follows. First, a PAT (Program Association Table) packet having a PID of 0x0000 (13 bits in hexadecimal) is acquired. There is a program map PID (Program Map PID) indicating the PID of the PMT (Program Map Table) in the program association section of the PAT. When a PMT packet having a PID value of Program Map PID is acquired, the payload of the TS header of the packet indicating the type of elements (video or audio, etc.) constituting the program in the TS program map section (Program association section) of the PMT -It is possible to determine whether or not the payload starts from the beginning of the PES packet by using a unit start indicator (payload unit start indicator). There is a PTS / DTS flag in the header portion of the PES packet, and the presence of PTS and DTS (time information for synchronous reproduction) can be understood from the value. By these procedures, the time stamp of PTS or DTS is acquired for each program component (PID). The time stamp acquisition unit 4 is such a time stamp acquisition means. Incidentally, when the PTS / DTS flag is “10” (2 bits in binary), only PTS exists, and when it is “11”, PTS and DTS exist. In the case of “00”, PTS and DTS do not exist. “01” is prohibited.

基準時刻生成部6は発振器5によるシステムクロックにより、基準となるトランスポートストリームのPCRから同期を実現するための基準時刻を生成する基準時刻生成手段である。基準時刻は処理を容易にするためにMPEG−2システムで規定されているPCRフィールドと同一構成とし、基準時刻カウンタ(図示なし)はこのようなPCRフィールドからなる構成とする。すなわち、基準時刻カウンタは、システムクロック周波数の27MHzを単位とする program clock reference extension(以下、pcr_exと呼ぶ)を9ビットで表す部分と、90KHzを単位とするprogram clock reference base(以下、pcr_bsと呼ぶ)を33ビットで表す部分とからなる。システムクロック周波数の27MHzは発振器5より供給する。基準となるPCRは第一ストリームのPCR取得部3より供給する。基準時刻生成部6では、MPEG−2システム規格のPCRフィールドと同じ構成としたpcr_exとpcr_bsとからなる基準時刻カウンタに、第一ストリームのPCRをセットする。基準時刻カウンタは発振器5が持つシステムクロックにより駆動する。pcr_exはシステムクロックに同期して動作し0から299まで1ずつ増加する。299の次は0に戻り巡回する。pcr_bsはpcr_exが299に達するごとに1ずつ増加する。すなわち、pcr_bsは90KHz(27000/300=90KHz)で動作するカウンタである。   The reference time generation unit 6 is a reference time generation unit that generates a reference time for realizing synchronization from the PCR of a transport stream serving as a reference, based on a system clock by the oscillator 5. In order to facilitate processing, the reference time has the same configuration as a PCR field defined in the MPEG-2 system, and a reference time counter (not shown) has such a PCR field. That is, the reference time counter has a portion representing a 9-bit program clock reference extension (hereinafter referred to as pcr_ex) having a system clock frequency of 27 MHz as a unit, and a program clock reference base (hereinafter referred to as pcr_bs) having a unit of 90 KHz. ) Is represented by 33 bits. A system clock frequency of 27 MHz is supplied from the oscillator 5. The reference PCR is supplied from the PCR acquisition unit 3 of the first stream. The reference time generation unit 6 sets the PCR of the first stream in the reference time counter composed of pcr_ex and pcr_bs having the same configuration as the PCR field of the MPEG-2 system standard. The reference time counter is driven by the system clock of the oscillator 5. pcr_ex operates in synchronization with the system clock and increases by 1 from 0 to 299. After 299, it returns to 0 and goes around. pcr_bs increases by 1 every time pcr_ex reaches 299. That is, pcr_bs is a counter that operates at 90 KHz (27000/300 = 90 KHz).

次に、第二ストリームのPCR取得及び変更部7について説明する。先ず、第二ストリームのPCR取得については第一ストリームのPCR取得と同じ動作で第二ストリームのPCRを取得する。PCR取得及び変更部7には上記と同様のPCR取得手段を有するとともに、以下に説明するPCR変更手段を有する。   Next, the PCR acquisition and change unit 7 of the second stream will be described. First, for the second stream PCR acquisition, the second stream PCR is acquired by the same operation as the first stream PCR acquisition. The PCR acquisition and change unit 7 has the same PCR acquisition means as described above, and also has a PCR change means described below.

以下、PCR取得及び変更部7による第二ストリームのPCRの変更方法について説明する。PCRの変更方法はPCR変更手段により変更する。このPCR変更手段は、第二ストリームのPCRを検出し、その瞬間に基準時刻生成部6の基準時刻カウンタの値を読み取る。そして、第二ストリームのPCRは読み取った基準時刻カウンタの値に変更する。このようにして、第二ストリームの時刻情報は第一ストリームと同じ時刻情報を参照することによって、第一ストリームのPCRに同期したものとすることができる。このように任意の切換タイミングで第一ストリームと第二ストリームとを切り換えても、図2に示すように、PCR値が不連続にならないので、切換処理を容易に行うことができるし、上記図8(a),(b)を参照して説明したストリーム切り換え時の問題が改善できる。   Hereinafter, a method for changing the PCR of the second stream by the PCR acquisition and change unit 7 will be described. The PCR changing method is changed by the PCR changing means. This PCR changing means detects the PCR of the second stream, and reads the value of the reference time counter of the reference time generating unit 6 at that moment. Then, the PCR of the second stream is changed to the value of the read reference time counter. In this way, the time information of the second stream can be synchronized with the PCR of the first stream by referring to the same time information as the first stream. Thus, even if the first stream and the second stream are switched at an arbitrary switching timing, the PCR value does not become discontinuous as shown in FIG. 2, so that the switching process can be easily performed. The problem at the time of stream switching described with reference to 8 (a) and (b) can be improved.

なお、第一ストリームと第二ストリームは同期していると述べたが、厳密にはそうではない場合がある。第一ストリームのPCRは発振器5とは別の符号化装置のシステムクロックから生成されるのに対し、基準時刻カウンタは発振器5のシステムクロックから生成されている。従って、両者は別のシステムクロックであることから周波数が完全に一致するとは限らない。このため第一ストリームのPCRと、基準時刻生成部6で生成した基準時刻カウンタの値には少しずつ誤差が生じる。例えば、規格に適合するシステムクロック周波数を用いたとしても、基準の第一ストリームのPCRを取得してから次のPCRが到着するまで時間が50ミリ秒もあると、基準時刻カウンタとは約40クロック程度の誤差が生じることがある。これはPCRジッタにすると1000ナノ秒以上にもなり±500ナノ秒という規格の許容値を大幅に上回り、受信側の復号処理に悪影響を及ぼし映像や音声が乱れる恐れがある。   Although the first stream and the second stream have been described as being synchronized, there are cases in which this is not strictly the case. The PCR of the first stream is generated from the system clock of an encoding device different from the oscillator 5, whereas the reference time counter is generated from the system clock of the oscillator 5. Therefore, since the two are different system clocks, the frequencies do not always coincide completely. For this reason, an error occurs little by little between the PCR of the first stream and the value of the reference time counter generated by the reference time generation unit 6. For example, even if a system clock frequency conforming to the standard is used, if the time from the acquisition of the reference first stream PCR to the arrival of the next PCR is 50 milliseconds, the reference time counter is about 40 An error of the order of a clock may occur. This is more than 1000 nanoseconds in terms of PCR jitter, which is significantly higher than the allowable value of the standard of ± 500 nanoseconds, which adversely affects the decoding process on the receiving side and may disturb video and audio.

このような受信側の悪影響を解消する方法としては、基準時刻カウンタの精度を向上させるためにPCRに基づいて、PLL(Phase Locked Loop :位相同期回路)によりシステムクロックを再生し、符号化器と同期したシステムクロックを作成する手法を用いることができる。このような作成方法により高精度にシステムクロックを再生することが可能であるが、複雑な処理が必要なるとともに、回路規模が増大するといった課題がある。無論、このようなPCR変更手段であってもよいが、以下に説明するPCR変更手段が最も好ましい。   As a method of eliminating such a bad influence on the receiving side, in order to improve the accuracy of the reference time counter, the system clock is regenerated by a PLL (Phase Locked Loop) based on the PCR, A technique for creating a synchronized system clock can be used. Although it is possible to reproduce the system clock with high accuracy by such a creation method, there are problems that complicated processing is required and the circuit scale increases. Of course, such a PCR changing means may be used, but the PCR changing means described below is most preferable.

以下に回路規模を増大させない簡単な回路による基準時刻補正方法について説明する。この基準時刻補正方法は、基準時刻生成部6で第一ストリームのPCR取得時に、このPCRと基準時刻カウンタ値との差を求め、その差分だけ基準時刻カウンタ値の補正を行う方法である。補正開始時には第一ストリームのPCRをそのまま基準時刻カウンタにセットする。第一ストリームの次のPCRを取得したとき、下記〔数1〕に基づいて、初期補正値D0を求める。   A reference time correction method using a simple circuit that does not increase the circuit scale will be described below. This reference time correction method is a method for obtaining a difference between the PCR and the reference time counter value when the reference time generating unit 6 acquires the PCR of the first stream, and correcting the reference time counter value by the difference. At the start of correction, the PCR of the first stream is set in the reference time counter as it is. When the next PCR of the first stream is acquired, an initial correction value D0 is obtained based on the following [Equation 1].

Figure 0004689231
Figure 0004689231

その後、下記〔数2〕に基づいて、第一ストリームのPCRを取得する度に補正値Dnを求める。   Thereafter, the correction value Dn is obtained every time the PCR of the first stream is acquired based on the following [Equation 2].

Figure 0004689231
Figure 0004689231

基準時刻補正は、図3に示したように、図3の上側の基準時刻補正図では、基準時刻カウンタの値を一回で補正すると大きな誤差(ジッタ)になる恐れがあるが、図3の下側の基準時刻補正図では、時間的な間隔(pcr_exが1巡回する時間間隔)をあけて1ずつ徐々に補正を行い、第一ストリームの次のPCRを取得するまでにDn(最初の補正の場合はD0)だけ補正する。すなわち、第二ストリームのPCRを検出したときに基準時刻カウンタの値を読み取るが、このPCRはいつ来るか特定できないし、一定間隔に来ることもあれば、不定間隔で到来することもある。また、基準時刻カウンタを補正する直前に来ることもあれば、補正直後に来ることもある。例えば、補正直前に到着した場合、前述したような40クロック程度の補正を行う必要があるとすれば、その分だけの誤差を含んだ基準時刻カウンタ値で第二ストリームのPCRを変更してしまい、非常に大きなPCRジッタが生じてしまう。従って、図3の下側の基準時刻補正図のように、1クロックずつ補正を行うならば、補正直前であっても直後であっても誤差は1クロック分だけであり、最小限のジッタに抑えることができる。なお、ここでは1クロックずつ補正するが、この実施形態に限定することなく、5クロック程度まで増やして補正を行うこともできる。このときのPCRジッタは200ナノ秒以下であり大きな問題にならない。   As shown in FIG. 3, the reference time correction may cause a large error (jitter) in the reference time correction diagram on the upper side of FIG. 3 if the value of the reference time counter is corrected once. In the lower reference time correction diagram, the correction is gradually performed one by one with a time interval (time interval for one round of pcr_ex), and Dn (the first correction is made until the next PCR of the first stream is acquired. In this case, only D0) is corrected. That is, when the PCR of the second stream is detected, the value of the reference time counter is read, but it is not possible to specify when this PCR will come, and it may come at a fixed interval or may arrive at an indefinite interval. Also, it may come immediately before correcting the reference time counter, or may come immediately after correction. For example, if it arrives immediately before the correction, if it is necessary to perform the correction of about 40 clocks as described above, the PCR of the second stream is changed with the reference time counter value including an error corresponding thereto. A very large PCR jitter will occur. Therefore, as shown in the reference time correction diagram on the lower side of FIG. 3, if correction is performed one clock at a time, the error is only one clock, immediately before or after correction, and the jitter is minimized. Can be suppressed. Here, the correction is performed one clock at a time, but the present invention is not limited to this embodiment, and the correction can be performed by increasing to about 5 clocks. The PCR jitter at this time is 200 nanoseconds or less, which is not a big problem.

続いて、基準時刻補正について、より具体的に説明する。基準時刻カウンタにはpcr_exが存在し、このpcr_exが300クロック、すなわち約11マイクロ秒で巡回することを利用し、pcr_exが0になるごとに基準時刻カウンタを1ずつ補正する。補正値Dnが40であれば、約40マイクロ秒の時間をかけて補正が完了することになる。補正はpcr_exが0以外の時でも良い。このようにすれば、PLLのような複雑な回路や補正タイミングを得るためのタイマーを別に設ける必要もなく簡単に補正することが可能になる。なお、この説明では、pcr_exが一巡回する度に補正するようにしているが、二回以上巡回するごとに補正しても良いし、逆に一回巡回する中で二回以上の補正を行うことも可能である。また、前述したように補正一回当たり1以上の補正値にすることもできる。このような処理により、PCR値の誤差を少なくすることができる。   Subsequently, the reference time correction will be described more specifically. There is pcr_ex in the reference time counter. This pcr_ex is circulated at 300 clocks, that is, about 11 microseconds, and each time pcr_ex becomes 0, the reference time counter is corrected by one. If the correction value Dn is 40, the correction is completed in about 40 microseconds. The correction may be performed when pcr_ex is other than zero. In this way, it is possible to easily perform correction without the need for providing a complicated circuit such as a PLL or a timer for obtaining correction timing. In this description, correction is made every time pcr_ex makes a round. However, the correction may be made every two or more rounds, or conversely, two or more rounds may be corrected during one round. It is also possible. Further, as described above, one or more correction values can be set per correction time. Such processing can reduce the error of the PCR value.

次に、タイムスタンプ算出部8について説明する。タイムスタンプ算出部8はタイムスタンプ補正情報算出手段を有する。タイムスタンプは、program clock reference baseと同様に90KHzを単位としている。第二ストリームのPCRの変更にあわせて、復号時刻や表示時刻を正確に示すために、タイムスタンプ補正情報算出手段によりタイムスタンプも変更する。タイムスタンプはDTS及びPTS(同期再生のための時間情報)両方について変更する。なお、PCRと同様、変更するのは、図2に示したように、タイムスタンプのみが不連続となるので、第二ストリームのタイムスタンプだけを変更する。先ず、第二ストリームのPCR取得及び変更部7よりPCR変更(同期)前の第二ストリームのPCRを取得し、基準時刻カウンタ値との差分DTを下記〔数3〕に基づいて求める。タイムスタンプは90KHzの精度であることからpcr_bsの差だけを求めればよい。PCRの取得も同様にpcr_bsだけでよい。   Next, the time stamp calculation unit 8 will be described. The time stamp calculation unit 8 has time stamp correction information calculation means. The time stamp has a unit of 90 KHz as in the program clock reference base. In accordance with the change in the PCR of the second stream, the time stamp is also changed by the time stamp correction information calculating means in order to accurately indicate the decoding time and the display time. The time stamp is changed for both DTS and PTS (time information for synchronous reproduction). As in the case of PCR, only the time stamp of the second stream is changed because only the time stamp becomes discontinuous as shown in FIG. First, the PCR of the second stream before the PCR change (synchronization) is acquired from the PCR acquisition and change unit 7 of the second stream, and the difference DT from the reference time counter value is obtained based on the following [Equation 3]. Since the time stamp has an accuracy of 90 KHz, only the difference of pcr_bs needs to be obtained. Similarly, it is only necessary to obtain pcr_bs for PCR.

Figure 0004689231
Figure 0004689231

なお、上記〔数3〕において、第二ストリームのPCRのpcr_bsを基準時刻カウンタと演算を行って差分DTを求めるのは、既に基準時刻カウンタが第一ストリームに同期しているからである。また、第二ストリームを取得した時点で即座に演算が可能であり都合がよい。さらに、第一ストリームのPCRと第二ストリームのPCRは同時に取得(到着)するわけではないから、同時に到着しなければ一方が到着してから他方が到着するまで待つ必要があり、その間に時間が経過しジッタが生じてしまうからである。次に、第二ストリームのタイムスタンプを取得し、このタイムスタンプに差分DTを加算してタイムスタンプの変更値を算出する。   In the above [Equation 3], the difference DT is obtained by calculating pcr_bs of the PCR of the second stream with the reference time counter because the reference time counter is already synchronized with the first stream. In addition, it is convenient that the calculation can be performed immediately when the second stream is acquired. Furthermore, since the PCR of the first stream and the PCR of the second stream are not acquired (arrived) at the same time, if they do not arrive at the same time, it is necessary to wait for one to arrive and the other to arrive. This is because jitter will occur after a lapse of time. Next, a time stamp of the second stream is acquired, and a difference DT is added to this time stamp to calculate a time stamp change value.

タイムスタンプ取得及び変更部9は、タイムスタンプ取得手段とタイムスタンプ変更手段とを備え、第二ストリームのタイムスタンプを第一ストリームのタイムスタンプ取得部4と同じタイムスタンプ取得手段で取得する。その後、タイムスタンプ算出部8の結果に基づいて第二ストリームのタイムスタンプをタイムスタンプ変更手段により変更し、新たなタイムスタンプとする。   The time stamp acquisition / change unit 9 includes a time stamp acquisition unit and a time stamp change unit, and acquires the time stamp of the second stream by the same time stamp acquisition unit as the time stamp acquisition unit 4 of the first stream. Thereafter, the time stamp of the second stream is changed by the time stamp changing means on the basis of the result of the time stamp calculating unit 8 to obtain a new time stamp.

このような手段により基準時刻(PCR)からタイムスタンプを補正し同期させることができる。このような切り換えを図示したものが図4であり、図4(a)が第一ストリームと第二ストリームのPCRとタイムスタンプとを示し,図4(b)が第一ストリームと第二ストリームとを切り換え位置で第一ストリームから第二ストリームに切り換えた際のPCRとタイムスタンプとを示し、同期したストリーム切換時の時刻情報を表している。しかし、この方法を適用する際に前提となるのはPCRとタイムスタンプの差が第一ストリームと第二ストリームで等しいことが条件である。   By such means, the time stamp can be corrected and synchronized from the reference time (PCR). FIG. 4 shows such switching, FIG. 4 (a) shows the PCR and time stamp of the first stream and the second stream, and FIG. 4 (b) shows the first stream and the second stream. Indicates the PCR and time stamp when switching from the first stream to the second stream at the switching position, and represents time information at the time of synchronized stream switching. However, the precondition for applying this method is that the difference between the PCR and the time stamp is equal between the first stream and the second stream.

ストリームの切り換えの際、PCRとタイムスタンプの差が第一ストリームと第二ストリームで等しくない場合、PCRは同期し連続性を保つことができたとしても、タイムスタンプは不連続となってしまい、復号が困難になる。すなわち、タイムスタンプを補正する場合には第一ストリームのPCRとタイムスタンプの差と第二ストリームのPCRとタイムスタンプの差を考慮しなければならない。ここで、問題となるのがMPEG−2ビデオのストリームのようなピクチャ(フレーム)ごとにデータ量が異なる場合のタイムスタンプである。ベースバンド信号の映像フレームの間隔は等間隔であるので、ストリームのタイムスタンプは3003ずつ増加する。MPEG−2で符号化するとフレーム内符号化のI(イントラ)ピクチャは符号量が多く、双方向フレーム間予測符号化のBピクチャは符号量が少ない。ピクチャをPESパケット化する際にタイムスタンプを付けるが、その位置は等間隔ではない。図5はピクチャ符号量とタイムスタンプ位置の関係を示したものである。このようなピクチャを一定のビットレートで伝送すると、符号量が大きければ伝送に時間がかかり、符号量が少なければ短時間で済むことから明らかである。従って、任意のピクチャのタイムスタンプを取得してPCRとの差を求めたのでは、その時々によって大きく異なり正確な変更ができない。   At the time of stream switching, if the difference between the PCR and the time stamp is not equal between the first stream and the second stream, the time stamp becomes discontinuous even if the PCR is synchronized and can maintain continuity. Decoding becomes difficult. That is, when correcting the time stamp, it is necessary to consider the difference between the PCR and time stamp of the first stream and the difference between the PCR and time stamp of the second stream. Here, the problem is the time stamp when the data amount differs for each picture (frame) such as an MPEG-2 video stream. Since the interval between video frames of the baseband signal is equal, the time stamp of the stream increases by 3003. When encoded with MPEG-2, the intra-frame encoded I (intra) picture has a large amount of code, and the B picture for bidirectional interframe predictive encoding has a small amount of code. A time stamp is attached when a picture is made into a PES packet, but the positions are not equally spaced. FIG. 5 shows the relationship between the picture code amount and the time stamp position. When such a picture is transmitted at a constant bit rate, it is clear that the transmission takes time if the code amount is large, and the time is short if the code amount is small. Therefore, if the time stamp of an arbitrary picture is acquired and the difference from the PCR is obtained, it varies greatly from time to time and cannot be changed accurately.

そこで、PCRとタイムスタンプの差の変動をできるだけ抑える方法について説明する。MPEG−2ビデオで符号化伝送する場合には通常GOP(Group Of Picture)を大きな単位として符号化を行う。デジタル放送など固定ビットレートで伝送する場合には、GOP内の各ピクチャの符号量は大きく変動することがあるが、GOP単位での符号量は概ね一定になるように制御される。この特徴を利用すると、GOPの先頭位置は等間隔であるといえるので、GOPの先頭ピクチャのタイムスタンプを取得し、PCRとの差を求めるならば、差を求めるごとに大きく変動することは抑えられ正確な値が得られる。なお、GOPの開始位置は、GOPヘッダの開始を示すgroup start code(特定の32ビットパターン、16進数表示で000001 B8)を容易に検出できる。   Therefore, a method for suppressing the variation in the difference between the PCR and the time stamp as much as possible will be described. When encoding and transmitting with MPEG-2 video, encoding is usually performed with GOP (Group Of Picture) as a large unit. When transmitting at a fixed bit rate such as digital broadcasting, the code amount of each picture in the GOP may vary greatly, but the code amount in GOP units is controlled to be substantially constant. If this feature is used, it can be said that the start positions of the GOP are equally spaced. Therefore, if the time stamp of the start picture of the GOP is obtained and the difference from the PCR is obtained, it is possible to suppress a large fluctuation every time the difference is obtained. Accurate value can be obtained. The GOP start position can easily detect a group start code (specific 32-bit pattern, 000001 B8 in hexadecimal notation) indicating the start of the GOP header.

タイムスタンプ算出部(タイムスタンプ補正情報算出手段)8では、このようなGOPの先頭ピクチャのタイムスタンプを利用して、第一ストリームのPCR(基準時刻)とタイムスタンプとの差分と、変更前の第二ストリームのPCRとタイムスタンプの差分とを比較して得られる差分情報に基づいて、両者が同等になるように前述で求めた差分DTを補正し、補正した差分DTよりタイムスタンプ変更値を算出する。このようにして第二ストリームのタイムスタンプを変更することで同期が実現できる。従って、任意の切換タイミングで第一ストリームと第二ストリームを切り換えてもタイムスタンプが不連続にならないので、切換処理を容易に行うことができる。   The time stamp calculation unit (time stamp correction information calculation means) 8 uses such a time stamp of the first picture of the GOP, the difference between the PCR (reference time) of the first stream and the time stamp, and the pre-change time. Based on the difference information obtained by comparing the PCR of the second stream and the difference between the time stamps, the difference DT obtained above is corrected so that they are equal, and the time stamp change value is calculated from the corrected difference DT. calculate. In this way, synchronization can be realized by changing the time stamp of the second stream. Therefore, even if the first stream and the second stream are switched at an arbitrary switching timing, the time stamp does not become discontinuous, so that the switching process can be easily performed.

切り換え部(切換手段)10は、第一ストリームからPCR及びタイムスタンプを変更した第二ストリームに切り換える切り換え器であり、出力端子11より新たな第二ストリームを出力する。本実施形態のトランスポートストリーム切換装置は、以上のように動作する。   The switching unit (switching unit) 10 is a switching unit that switches from the first stream to the second stream with the changed PCR and time stamp, and outputs a new second stream from the output terminal 11. The transport stream switching device of the present embodiment operates as described above.

本発明の活用例としては、編集装置などの映像機器或いは放送設備に利用することができる。   As an application example of the present invention, it can be used for video equipment such as an editing apparatus or broadcasting equipment.

本発明のトランスポートストリーム切換装置の一実施形態を示すブロック図である。It is a block diagram which shows one Embodiment of the transport stream switching apparatus of this invention. 本実施形態におけるPCRの同期についての説明図である。It is explanatory drawing about the synchronization of PCR in this embodiment. 本実施形態における基準時刻補正を説明する図であり、上側の基準時刻補正図が誤差が大となり、下側の基準時刻補正図が誤差が小となることを示す基準時刻補正図である。It is a figure explaining the reference time correction in this embodiment, and an upper reference time correction figure is a reference time correction figure which shows that an error becomes large, and a lower reference time correction figure shows that an error becomes small. 本実施形態における切り換え後のストリームを基準とするストリームの時刻情報に同期した時刻情報とする説明図である。It is explanatory drawing made into time information synchronizing with the time information of the stream on the basis of the stream after switching in this embodiment. ピクチャ符号量とタイムスタンプ位置についての説明図である。It is explanatory drawing about a picture code amount and a time stamp position. 符号化器と復号器によるトランスポートストリームの伝送例を示すブロック図である。It is a block diagram which shows the transmission example of the transport stream by an encoder and a decoder. 従来のトランスポートストリーム切換装置を示すブロック図である。It is a block diagram which shows the conventional transport stream switching apparatus. 従来の装置によるストリーム切換時の時刻情報についての説明図であり、(a)が切換対象のトランスポートストリームの時刻情報を示し、(b)が切り換え時の時刻情報を示している。It is explanatory drawing about the time information at the time of the stream switching by the conventional apparatus, (a) shows the time information of the transport stream of switching object, (b) has shown the time information at the time of switching.

符号の説明Explanation of symbols

1,2 入力端子
3 PCR取得部
4 タイムスタンプ取得部
5 発振器
6 基準時刻生成部
7 PCR取得及び変更部
8 タイムスタンプ算出部
9 タイムスタンプ取得及び変更部
10 切り換え部
11 出力端子
DESCRIPTION OF SYMBOLS 1, 2 Input terminal 3 PCR acquisition part 4 Time stamp acquisition part 5 Oscillator 6 Reference time generation part 7 PCR acquisition and change part 8 Time stamp calculation part 9 Time stamp acquisition and change part 10 Switching part 11 Output terminal

Claims (4)

少なくとも2系統のトランスポートストリームを切り換えるトランスポートストリーム切換装置であって、
基準となる第一トランスポートストリームのPCRを取得するPCR取得手段と、
前記第一トランスポートストリームのタイムスタンプ情報を取得するタイムスタンプ情報取得手段と、
独立した自走システムクロック発振器と基準時刻カウンタとから構成され、前記第一トランスポートストリームのPCRより基準時刻を生成する基準時刻生成手段と、
前記第一トランスポートストリームのタイムスタンプ情報及び前記基準時刻並びに変更前の第二トランスポートストリームのPCRよりタイムスタンプ補正情報を算出するタイムスタンプ補正情報算出手段と、
前記第二トランスポートストリームよりPCRを取得し、前記基準時刻に基づき該PCRを変更するPCR変更手段と、
前記第二トランスポートストリームのタイムスタンプ情報を取得し、前記タイムスタンプ補正情報で変更するタイムスタンプ変更手段と、
前記第一トランスポートストリームと前記PCR及び前記タイムスタンプ情報を変更した前記第二トランスポートストリームを切り換える切換手段とを備え
前記基準時刻カウンタが、前記第一トランスポートストリームのPCRと前記基準時刻カウンタとの差より補正値を求め、所定間隔毎に前記基準時刻カウンタを補正する基準時刻補正手段とをする
ことを特徴とするトランスポートストリーム切換装置。
A transport stream switching device for switching at least two transport streams,
PCR acquisition means for acquiring the PCR of the reference first transport stream;
Time stamp information obtaining means for obtaining time stamp information of the first transport stream;
A reference time generation unit configured by an independent self-running system clock oscillator and a reference time counter, and generating a reference time from the PCR of the first transport stream;
Time stamp correction information calculating means for calculating time stamp correction information from the time stamp information of the first transport stream, the reference time, and the PCR of the second transport stream before the change;
PCR changing means for obtaining a PCR from the second transport stream and changing the PCR based on the reference time;
Time stamp changing means for obtaining time stamp information of the second transport stream and changing the time stamp correction information;
Switching means for switching the first transport stream and the second transport stream in which the PCR and the time stamp information are changed ,
The reference time counter is a reference time correction unit that obtains a correction value from a difference between the PCR of the first transport stream and the reference time counter, and corrects the reference time counter at predetermined intervals. Transport stream switching device.
請求項1に記載のトランスポートストリーム切換装置において、
前記タイムスタンプ補正情報が、前記第二トランスポートストリームのPCRと前記基準時刻との差分情報より生成することを特徴とするトランスポートストリーム切換装置。
In the transport stream switching device according to claim 1,
The transport stream switching device , wherein the time stamp correction information is generated from difference information between a PCR of the second transport stream and the reference time .
請求項に記載のトランスポートストリーム切換装置において、
前記第一及び第二トランスポートストリームのタイムスタンプ情報が、前記第一及び第二トランスポートストリームのGOP先頭ピクチャより検出することを特徴とするトランスポートストリーム切換装置。
In the transport stream switching device according to claim 1 ,
The transport stream switching device , wherein time stamp information of the first and second transport streams is detected from a GOP head picture of the first and second transport streams .
請求項1に記載のトランスポートストリーム切換装置において、
前記基準時刻と前記タイムスタンプ情報取得手段によるタイムスタンプ情報の差が、変更前の第二トランスポートストリームのPCRとタイムスタンプ情報の差と等しくなるように前記差分情報を補正することを特徴とするトランスポートストリーム切換装置。
In the transport stream switching device according to claim 1,
The difference information is corrected so that a difference between the reference time and the time stamp information obtained by the time stamp information acquisition unit is equal to a difference between the PCR of the second transport stream before the change and the time stamp information. Transport stream switching device.
JP2004309790A 2004-10-25 2004-10-25 Transport stream switching device Expired - Fee Related JP4689231B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004309790A JP4689231B2 (en) 2004-10-25 2004-10-25 Transport stream switching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004309790A JP4689231B2 (en) 2004-10-25 2004-10-25 Transport stream switching device

Publications (2)

Publication Number Publication Date
JP2006121601A JP2006121601A (en) 2006-05-11
JP4689231B2 true JP4689231B2 (en) 2011-05-25

Family

ID=36539040

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004309790A Expired - Fee Related JP4689231B2 (en) 2004-10-25 2004-10-25 Transport stream switching device

Country Status (1)

Country Link
JP (1) JP4689231B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9456243B1 (en) 2003-06-06 2016-09-27 Arris Enterprises, Inc. Methods and apparatus for processing time-based content
US9286214B2 (en) 2003-06-06 2016-03-15 Arris Enterprises, Inc. Content distribution and switching amongst data streams
US8966103B2 (en) 2007-12-21 2015-02-24 General Instrument Corporation Methods and system for processing time-based content
JP5369599B2 (en) * 2008-10-20 2013-12-18 富士通株式会社 Video encoding apparatus and video encoding method
KR100972792B1 (en) * 2008-11-04 2010-07-29 한국전자통신연구원 Synchronizer and synchronizing method for stereoscopic image, apparatus and method for providing stereoscopic image
WO2011155099A1 (en) * 2010-06-11 2011-12-15 三菱電機株式会社 Image display device
JP5352545B2 (en) * 2010-08-10 2013-11-27 株式会社日立国際電気 Digital broadcast transmission device
JP5466633B2 (en) * 2010-12-29 2014-04-09 株式会社日立国際電気 Stream switching method and digital broadcast transmission system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11112452A (en) * 1997-10-03 1999-04-23 Sony Corp Information processor, method therefor and transmission medium
JP2003158712A (en) * 2001-11-21 2003-05-30 Victor Co Of Japan Ltd Method and apparatus for editing data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11112452A (en) * 1997-10-03 1999-04-23 Sony Corp Information processor, method therefor and transmission medium
JP2003158712A (en) * 2001-11-21 2003-05-30 Victor Co Of Japan Ltd Method and apparatus for editing data

Also Published As

Publication number Publication date
JP2006121601A (en) 2006-05-11

Similar Documents

Publication Publication Date Title
US6993081B1 (en) Seamless splicing/spot-insertion for MPEG-2 digital video/audio stream
KR100316031B1 (en) Method of and system capable of precisely clipping a continuous medium obtained from a multiplexed bit stream
US6404818B1 (en) Video transmission device and its method
US7227899B2 (en) Method and system for re-multiplexing of content-modified MPEG-2 transport streams using interpolation of packet arrival times
EP2728858B1 (en) Receiving apparatus and receiving method thereof
US20030066094A1 (en) Robust method for recovering a program time base in MPEG-2 transport streams and achieving audio/video sychronization
JP4208398B2 (en) Moving picture decoding / reproducing apparatus, moving picture decoding / reproducing method, and multimedia information receiving apparatus
JP2001513606A (en) Processing coded video
TWI455573B (en) Method for reconstructing system time clock (stc) without carrying pcr
JP4248703B2 (en) Stream multiplexing device, data broadcasting device
WO2014188960A1 (en) Transmission device, transmission method, reception device and reception method
US7693222B2 (en) Method and system for re-multiplexing of content-modified MPEG-2 transport streams using PCR interpolation
JP2011101360A (en) Method and apparatus for measuring delay variation within digital stream
JP4689231B2 (en) Transport stream switching device
JP2018182677A (en) Information processing apparatus, information processing method, program, and recording medium manufacturing method
JP2006254298A (en) Device and method for moving picture reproduction
JP4092705B2 (en) Stream transmitting apparatus, receiving apparatus, and transmission / reception method
WO2020017499A1 (en) Video/audio transmission system, transmission method, transmission device, and reception device
JP2018182617A (en) Information processing apparatus, information processing method, program, and recording medium manufacturing method
JP3893643B2 (en) Signal multiplexing method and transmission signal generating apparatus using the same
JP3350365B2 (en) Video synchronization signal correction device
JP4192766B2 (en) Receiving apparatus and method, recording medium, and program
JPH11205789A (en) Transmission rate converter of mpeg2 transport stream
JPH1141193A (en) Data packet re-multiplexing method and re-multiplexer
JP2004015553A (en) Synchronization control method and apparatus thereof, synchronization reproduction apparatus and tv receiving apparatus using the control method and apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070823

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101019

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101216

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110118

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110216

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140225

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees